diff --git a/CHANGELOG.md b/CHANGELOG.md index 61b40ae..80e26a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## v0.9.0 + +- feat: Update `sentry` to v0.49.5 and `@sentry/browser` to v11 (#49) +- feat: Tag events with the process, webview and window they came from (#42) +- feat: Normalise web-view URLs to `app:///` (#43) +- feat: Add breadcrumbs for Tauri app, window and webview events (#44) +- feat: Sync scope from the webview to the Rust SDK (#45) +- feat: Add app, Tauri runtime, webview and screen context. Add the `wry` feature, on by default, which adds the webview version to the `browser` context (#46) +- feat: Capture webview process crashes. Add the `webview-crashes` feature, on by default, which enables `wry` and the `release-health` feature of `sentry` (#47) + ## v0.8.0 - feat: Add `tauri_plugin_sentry::Sentry`, which is both a Tauri plugin and a Sentry integration. Add a clone to `sentry::ClientOptions` before `sentry::init` and pass the original to `tauri::Builder::plugin`. The integration adds `tauri` to the SDK integrations and adds the `cargo:tauri-plugin-sentry` package to the SDK metadata of events, which includes minidump events from the crash reporter process. `init`, `init_with_options` and `init_with_no_injection` still work. (#41) diff --git a/Cargo.toml b/Cargo.toml index 005389b..6edaa37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ license = "MIT OR Apache-2.0" name = "tauri-plugin-sentry" readme = "README.md" repository = "https://github.com/timfish/sentry-tauri" -version = "0.8.0" +version = "0.9.0" links = "tauri-plugin-sentry" exclude = ["/examples", "/node_modules", "/target", "/test"] @@ -23,7 +23,7 @@ webview-crashes = [ [dependencies] base64 = "0.23" -sentry = { version = "0.49", default-features = false } +sentry = { version = "0.49.5", default-features = false } serde = "1" serde_json = "1" tauri = { version = "2.12", default-features = false } @@ -46,4 +46,4 @@ webkit2gtk = { version = "2", features = ["v2_20"], optional = true } tauri-plugin = { version = "2", features = ["build"] } [dev-dependencies] -sentry = { version = "0.49", default-features = false, features = ["test"] } +sentry = { version = "0.49.5", default-features = false, features = ["test"] } diff --git a/README.md b/README.md index a355cfc..d0eaaae 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ Add `sentry` and `tauri-plugin-sentry` to dependencies in `Cargo.toml`: ```toml [dependencies] -sentry = "0.49" -tauri-plugin-sentry = "0.8" +sentry = "0.49.5" +tauri-plugin-sentry = "0.9" ``` Run one of these commands to add the capabilities: @@ -70,7 +70,7 @@ If your app does not use the wry runtime, turn off the default features and enable only `minidump`: ```toml -tauri-plugin-sentry = { version = "0.8", default-features = false, features = ["minidump"] } +tauri-plugin-sentry = { version = "0.9", default-features = false, features = ["minidump"] } ``` This also turns off `webview-crashes`. Without `wry`, events have no diff --git a/dist/index.js b/dist/index.js index 00d8fdf..727157a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -60,4 +60,6 @@ export const defaultOptions = { ], transport: makeRendererTransport, beforeBreadcrumb: sendBreadcrumbToRust, + // The Rust SDK cannot parse streamed span envelope items + traceLifecycle: 'static', }; diff --git a/dist/inject.min.js b/dist/inject.min.js index 649f2b9..af1415d 100644 --- a/dist/inject.min.js +++ b/dist/inject.min.js @@ -1 +1 @@ -!function(){"use strict";const e="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,t=globalThis,n="10.8.0";function r(){return o(t),t}function o(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||n,t[n]=t[n]||{}}function s(e,r,o=t){const s=o.__SENTRY__=o.__SENTRY__||{},i=s[n]=s[n]||{};return i[e]||(i[e]=r())}const i=["debug","info","warn","error","log","assert","trace"],a={};function c(e){if(!("console"in t))return e();const n=t.console,r={},o=Object.keys(a);o.forEach(e=>{const t=a[e];r[e]=n[e],n[e]=t});try{return e()}finally{o.forEach(e=>{n[e]=r[e]})}}function u(){return d().enabled}function l(n,...r){e&&u()&&c(()=>{t.console[n](`Sentry Logger [${n}]:`,...r)})}function d(){return e?s("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const p={enable:function(){d().enabled=!0},disable:function(){d().enabled=!1},isEnabled:u,log:function(...e){l("log",...e)},warn:function(...e){l("warn",...e)},error:function(...e){l("error",...e)}},h="?",f=/\(error: (.*)\)/,m=/captureMessage|captureException/;function g(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let e=n;e1024&&(n=n.slice(0,1024));const i=f.test(n)?n.replace(f,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){o.push(t);break}}if(o.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(_(t).function||"")&&t.pop();t.reverse(),m.test(_(t).function||"")&&(t.pop(),m.test(_(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||_(t).filename,function:e.function||h}))}(o.slice(r))}}function _(e){return e[e.length-1]||{}}const y="";function v(e){try{return e&&"function"==typeof e&&e.name||y}catch{return y}}function b(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}const S={},w={};function k(e,t){S[e]=S[e]||[],S[e].push(t)}function E(t,n){if(!w[t]){w[t]=!0;try{n()}catch(n){e&&p.error(`Error while instrumenting ${t}`,n)}}}function x(t,n){const r=t&&S[t];if(r)for(const o of r)try{o(n)}catch(n){e&&p.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${v(o)}\nError:`,n)}}let C=null;function I(e){const t="error";k(t,e),E(t,T)}function T(){C=t.onerror,t.onerror=function(e,t,n,r,o){return x("error",{column:r,error:o,line:n,msg:e,url:t}),!!C&&C.apply(this,arguments)},t.onerror.__SENTRY_INSTRUMENTED__=!0}let M=null;function R(e){const t="unhandledrejection";k(t,e),E(t,O)}function O(){M=t.onunhandledrejection,t.onunhandledrejection=function(e){return x("unhandledrejection",e),!M||M.apply(this,arguments)},t.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const A=Object.prototype.toString;function L(e){switch(A.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return z(e,Error)}}function D(e,t){return A.call(e)===`[object ${t}]`}function N(e){return D(e,"ErrorEvent")}function P(e){return D(e,"DOMError")}function F(e){return D(e,"String")}function $(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function B(e){return null===e||$(e)||"object"!=typeof e&&"function"!=typeof e}function U(e){return D(e,"Object")}function j(e){return"undefined"!=typeof Event&&z(e,Event)}function H(e){return Boolean(e?.then&&"function"==typeof e.then)}function z(e,t){try{return e instanceof t}catch{return!1}}function q(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}function W(e){return"undefined"!=typeof Request&&z(e,Request)}const V=t;function G(e,t={}){if(!e)return"";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++1&&i+o.length*c+u.length>=d));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return""}}function K(e,t){const n=e,r=[];if(!n?.tagName)return"";if(V.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(o?.length)o.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&F(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const s=["aria-label","type","name","title","alt"];for(const e of s){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function J(){try{return V.document.location.href}catch{return""}}function Y(e){if(!V.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function X(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function Z(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),see(e,t,n))}function ne(t,n,r){if(!(n in t))return;const o=t[n];if("function"!=typeof o)return;const s=r(o);"function"==typeof s&&oe(s,o);try{t[n]=s}catch{e&&p.log(`Failed to replace method "${n}" in object`,t)}}function re(t,n,r){try{Object.defineProperty(t,n,{value:r,writable:!0,configurable:!0})}catch{e&&p.log(`Failed to add non-enumerable property "${n}" to object`,t)}}function oe(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,re(e,"__sentry_original__",t)}catch{}}function se(e){return e.__sentry_original__}function ie(e){if(L(e))return{message:e.message,name:e.name,stack:e.stack,...ce(e)};if(j(e)){const t={type:e.type,target:ae(e.target),currentTarget:ae(e.currentTarget),...ce(e)};return"undefined"!=typeof CustomEvent&&z(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ae(e){try{return t=e,"undefined"!=typeof Element&&z(t,Element)?G(e):Object.prototype.toString.call(e)}catch{return""}var t}function ce(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function ue(e=function(){const e=t;return e.crypto||e.msCrypto}()){let n=()=>16*Math.random();try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function le(e){return e.exception?.values?.[0]}function de(e){const{message:t,event_id:n}=e;if(t)return t;const r=le(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function pe(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function he(e,t){const n=le(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function fe(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{re(e,"__sentry_captured__",!0)}catch{}return!1}function me(){return Date.now()/1e3}let ge,_e;function ye(){return(ge??(ge=function(){const{performance:e}=t;if(!e?.now||!e.timeOrigin)return me;const n=e.timeOrigin;return()=>(n+e.now())/1e3}()))()}function ve(){return _e||(_e=function(){const{performance:e}=t;if(!e?.now)return[void 0,"none"];const n=36e5,r=e.now(),o=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+r-o):n,i=sfunction(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${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}}}(n)};return e&&Se(n,e),n}function Se(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||ye(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ue()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const 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),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function we(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=we(r[e],t[e],n-1));return r}function ke(){return ue()}function Ee(){return ue().substring(16)}const xe="_sentrySpan";function Ce(e,t){t?re(e,xe,t):delete e[xe]}function Ie(e){return e[xe]}class Te{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ke(),sampleRand:Math.random()}}clone(){const e=new Te;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,Ce(e,Ie(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Se(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},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 null===t?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;const t="function"==typeof e?e(this):e,n=t instanceof Te?t.getScopeData():U(t)?e:void 0,{tags:r,extra:o,user:s,contexts:i,level:a,fingerprint:c=[],propagationContext:u}=n||{};return this._tags={...this._tags,...r},this._extra={...this._extra,...o},this._contexts={...this._contexts,...i},s&&Object.keys(s).length&&(this._user=s),a&&(this._level=a),c.length&&(this._fingerprint=c),u&&(this._propagationContext=u),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Ce(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ke(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:me(),...e,message:e.message?X(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,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ie(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=we(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||ue();if(!this._client)return e&&p.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r?.event_id||ue();if(!this._client)return e&&p.warn("No client configured on scope - will not capture message!"),o;const s=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){const r=n?.event_id||ue();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(e&&p.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}class Me{constructor(e,t){let n,r;n=e||new Te,r=t||new Te,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return H(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(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(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Re(){const e=o(r());return e.stack=e.stack||new Me(s("defaultCurrentScope",()=>new Te),s("defaultIsolationScope",()=>new Te))}function Oe(e){return Re().withScope(e)}function Ae(e,t){const n=Re();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Le(e){return Re().withScope(()=>e(Re().getIsolationScope()))}function De(e){const t=o(e);return t.acs?t.acs:{withIsolationScope:Le,withScope:Oe,withSetScope:Ae,withSetIsolationScope:(e,t)=>Le(t),getCurrentScope:()=>Re().getScope(),getIsolationScope:()=>Re().getIsolationScope()}}function Ne(){return De(r()).getCurrentScope()}function Pe(){return De(r()).getIsolationScope()}function Fe(){return s("globalScope",()=>new Te)}function $e(...e){const t=De(r());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Be(){return Ne().getClient()}function Ue(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||Ee()};return r&&(s.parent_span_id=r),s}const je="sentry.source",He="sentry.sample_rate",ze="sentry.previous_trace_sample_rate",qe="sentry.op",We="sentry.origin",Ve="sentry.idle_span_finish_reason",Ge="sentry.measurement_unit",Ke="sentry.measurement_value",Je="sentry.custom_span_name",Ye="sentry.profile_id",Xe="sentry.exclusive_time",Ze="http.request.method",Qe="url.full",et="sentry.link.type";function tt(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}function nt(e,t){e.setAttribute("http.response.status_code",t);const n=tt(t);"unknown_error"!==n.message&&e.setStatus(n)}const rt="_sentryScope",ot="_sentryIsolationScope";function st(e){return{scope:e[rt],isolationScope:e[ot]}}const it="sentry-",at=/^sentry-/;function ct(e){const t=function(e){if(!e||!F(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=lt(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return lt(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(at)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function ut(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce((t,[n,r],o)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=0===o?s:`${t},${s}`;return i.length>8192?(e&&p.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}(Object.entries(t).reduce((e,[t,n])=>(n&&(e[`${it}${t}`]=n),e),{}))}function lt(e){return e.split(",").map(e=>e.split("=").map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const dt=/^o(\d+)\./,pt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ht(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function ft(e){const t=pt.exec(e);if(!t)return void c(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,o="",s="",i="",a=""]=t.slice(1);let u="",l=a;const d=l.split("/");if(d.length>1&&(u=d.slice(0,-1).join("/"),l=d.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return mt({host:s,pass:o,path:u,projectId:l,port:i,protocol:n,publicKey:r})}function mt(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function gt(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(dt);return t?.[1]}(n)),r}function _t(t){const n="string"==typeof t?ft(t):mt(t);if(n&&function(t){if(!e)return!0;const{port:n,projectId:r,protocol:o}=t;return!(["protocol","publicKey","host","projectId"].find(e=>!t[e]&&(p.error(`Invalid Sentry Dsn: ${e} missing`),!0))||(r.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(o)?n&&isNaN(parseInt(n,10))&&(p.error(`Invalid Sentry Dsn: Invalid port ${n}`),1):(p.error(`Invalid Sentry Dsn: Invalid protocol ${o}`),1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),1)))}(n))return n}function yt(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}const vt=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function bt(e,t){const n=function(e){if(!e)return;const t=e.match(vt);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=ct(t);if(!n?.traceId)return{traceId:ke(),sampleRand:Math.random()};const o=function(e,t){const n=yt(t?.sample_rand);if(void 0!==n)return n;const r=yt(t?.sample_rate);return r&&void 0!==e?.parentSampled?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function St(e=ke(),t=Ee(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}let wt=!1;function kt(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=Mt(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Et(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Mt(e).parent_span_id,s=st(e).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||Ee():t,trace_id:n}}function xt(e){const{traceId:t,spanId:n}=e.spanContext();return St(t,n,Rt(e))}function Ct(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:1===n,attributes:o,...r})):void 0}function It(e){return"number"==typeof e?Tt(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Tt(e.getTime()):ye()}function Tt(e){return e>9999999999?e/1e3:e}function Mt(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0,start_timestamp:It(o),timestamp:It(i)||void 0,status:Ot(a),op:r[qe],origin:r[We],links:Ct(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Rt(e){const{traceFlags:t}=e.spanContext();return 1===t}function Ot(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const At="_sentryChildSpans",Lt="_sentryRootSpan";function Dt(e,t){const n=e[Lt]||e;re(t,Lt,n),e[At]?e[At].add(t):re(e,At,new Set([t]))}function Nt(e){const t=new Set;return function e(n){if(!t.has(n)&&Rt(n)){t.add(n);const r=n[At]?Array.from(n[At]):[];for(const t of r)e(t)}}(e),Array.from(t)}function Pt(e){return e[Lt]||e}function Ft(){const e=De(r());return e.getActiveSpan?e.getActiveSpan():Ie(Ne())}function $t(){wt||(c(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),wt=!0)}let Bt=!1;function Ut(){function t(){const t=Ft(),n=t&&Pt(t);if(n){const t="internal_error";e&&p.log(`[Tracing] Root span: ${t} -> Global error occurred`),n.setStatus({code:2,message:t})}}Bt||(t.tag="sentry_tracingErrorCallback",Bt=!0,I(t),R(t))}function jt(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||Be()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}const Ht="production",zt="_frozenDsc";function qt(e,t){re(e,zt,t)}function Wt(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Ht,release:n.release,public_key:r,trace_id:e,org_id:gt(t)};return t.emit("createDsc",o),o}function Vt(e,t){const n=t.getPropagationContext();return n.dsc||Wt(n.traceId,e)}function Gt(e){const t=Be();if(!t)return{};const n=Pt(e),r=Mt(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[He]??o[ze];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n[zt];if(c)return a(c);const u=s?.get("sentry.dsc"),l=u&&ct(u);if(l)return a(l);const d=Wt(e.spanContext().traceId,t),p=o[je],h=r.description;return"url"!==p&&h&&(d.transaction=h),jt()&&(d.sampled=String(Rt(n)),d.sample_rand=s?.get("sentry.sample_rand")??st(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}class Kt{constructor(e={}){this._traceId=e.traceId||ke(),this._spanId=e.spanId||Ee()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function Jt(e,t=100,n=1/0){try{return Xt("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Yt(e,t=3,n=102400){const r=Jt(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?Yt(e,t-1,n):r;var o}function Xt(e,t,n=1/0,r=1/0,o=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(q(t))return"[VueViewModel]";if(U(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${v(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(s(t))return"[Circular ~]";const u=t;if(u&&"function"==typeof u.toJSON)try{return Xt("",u.toJSON(),c-1,r,o)}catch{}const l=Array.isArray(t)?[]:{};let d=0;const p=ie(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=r){l[e]="[MaxProperties ~]";break}const t=p[e];l[e]=Xt(e,t,c-1,r,o),d++}return i(t),l}function Zt(e,t=[]){return[e,t]}function Qt(e,t){const[n,r]=e;return[n,[...r,t]]}function en(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function tn(e,t){return en(e,(e,n)=>t.includes(n))}function nn(e){const n=o(t);return n.encodePolyfill?n.encodePolyfill(e):(new TextEncoder).encode(e)}function rn(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[nn(r),e]:r.push("string"==typeof e?nn(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Jt(n))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function on(e){let n="string"==typeof e?nn(e):e;function r(e){const t=n.subarray(0,e);return n=n.subarray(e+1),t}function s(){let e=n.indexOf(10);return e<0&&(e=n.length),JSON.parse(function(e){const n=o(t);return n.decodePolyfill?n.decodePolyfill(e):(new TextDecoder).decode(e)}(r(e)))}const i=s(),a=[];for(;n.length;){const e=s(),t="number"==typeof e.length?e.length:void 0;a.push([e,t?r(t):s()])}return[i,a]}function sn(e){return[{type:"span"},e]}function an(e){const t="string"==typeof e.data?nn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const cn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function un(e){return cn[e]}function ln(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function dn(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ht(r)},...o&&{trace:o}}}function pn(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(fn(n)){if(ee(e.description,n))return!0;continue}if(!n.name&&!n.op)continue;const t=!n.name||ee(e.description,n.name),r=!n.op||e.op&&ee(e.op,n.op);if(t&&r)return!0}return!1}function hn(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function fn(e){return"string"==typeof e||e instanceof RegExp}function mn(t,n,r,o=Ft()){const s=o&&Pt(o);s&&(e&&p.log(`[Measurement] Setting measurement on root span: ${t} = ${n} ${r}`),s.addEvent(t,{[Ke]:n,[Ge]:r}))}function gn(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[Ge],o=n[Ke];"string"==typeof r&&"number"==typeof o&&(t[e.name]={value:o,unit:r})}),t}class _n{constructor(e={}){this._traceId=e.traceId||ke(),this._spanId=e.spanId||Ee(),this._startTime=e.startTimestamp||ye(),this._links=e.links,this._attributes={},this.setAttributes({[We]:"manual",[qe]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=It(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(je,"custom"),this}end(t){this._endTime||(this._endTime=It(t),function(t){if(!e)return;const{description:n="< unknown name >",op:r="< unknown op >"}=Mt(t),{spanId:o}=t.spanContext(),s=`[Tracing] Finishing "${r}" ${Pt(t)===t?"root ":""}span "${n}" with ID ${o}`;p.log(s)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[qe],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ot(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[We],profile_id:this._attributes[Ye],exclusive_time:this._attributes[Xe],measurements:gn(this._events),is_segment:this._isStandaloneSpan&&Pt(this)===this||void 0,segment_id:this._isStandaloneSpan?Pt(this).spanContext().spanId:void 0,links:Ct(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){e&&p.log("[Tracing] Adding an event to span:",t);const o=yn(n)?n:r||ye(),s=yn(n)?{}:n||{},i={name:t,time:It(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Be();t&&t.emit("spanEnd",this);if(!(this._isStandaloneSpan||this===Pt(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=Be();if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(function(e,t){const n=Gt(e[0]),r=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!o&&r&&{dsn:ht(r)}},{beforeSendSpan:i,ignoreSpans:a}=t?.getOptions()||{},c=a?.length?e.filter(e=>!pn(Mt(e),a)):e,u=e.length-c.length;u&&t?.recordDroppedEvent("before_send","span",u);const l=i?e=>{const t=Mt(e);return i(t)||($t(),t)}:Mt,d=[];for(const e of c){const t=l(e);t&&d.push(sn(t))}return Zt(s,d)}([this],t)):(e&&p.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span")));const n=this._convertSpanToTransaction();if(n){(st(this).scope||Ne()).captureEvent(n)}}_convertSpanToTransaction(){if(!vn(Mt(this)))return;this._name||(e&&p.warn("Transaction has no name, falling back to ``."),this._name="");const{scope:t,isolationScope:n}=st(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;const o=Nt(this).filter(e=>e!==this&&!function(e){return e instanceof _n&&e.isStandaloneSpan()}(e)).map(e=>Mt(e)).filter(vn),s=this._attributes[je];delete this._attributes[Je],o.forEach(e=>{delete e.data[Je]});const i={contexts:{trace:kt(this)},spans:o.length>1e3?o.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Gt(this)},request:r,...s&&{transaction_info:{source:s}}},a=gn(this._events);return a&&Object.keys(a).length&&(e&&p.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),i.measurements=a),i}}function yn(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function vn(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}function bn(e,t,n=()=>{}){let r;try{r=e()}catch(e){throw t(e),n(),e}return function(e,t,n){if(H(e))return e.then(e=>(n(),e),e=>{throw t(e),n(),e});return n(),e}(r,t,n)}const Sn="__SENTRY_SUPPRESS_TRACING__";function wn(e,t){const n=Mn();if(n.startSpan)return n.startSpan(e,t);const r=Tn(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return $e(a,()=>An(s)(()=>{const n=Ne(),i=On(n,s),a=e.onlyIfParent&&!i?new Kt:In({parentSpan:i,spanArguments:r,forceTransaction:o,scope:n});return Ce(n,a),bn(()=>t(a),()=>{const{status:e}=Mt(a);!a.isRecording()||e&&"ok"!==e||a.setStatus({code:2,message:"internal_error"})},()=>{a.end()})}))}function kn(e){const t=Mn();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Tn(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?t=>$e(e.scope,t):void 0!==o?e=>En(o,e):e=>e())(()=>{const t=Ne(),s=On(t,o);return e.onlyIfParent&&!s?new Kt:In({parentSpan:s,spanArguments:n,forceTransaction:r,scope:t})})}function En(e,t){const n=Mn();return n.withActiveSpan?n.withActiveSpan(e,t):$e(n=>(Ce(n,e||void 0),t(n)))}function xn(e){const t=Mn();return t.suppressTracing?t.suppressTracing(e):$e(t=>{t.setSDKProcessingMetadata({[Sn]:!0});const n=e();return t.setSDKProcessingMetadata({[Sn]:void 0}),n})}function Cn(t){return $e(n=>(n.setPropagationContext({traceId:ke(),sampleRand:Math.random()}),e&&p.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),En(null,t)))}function In({parentSpan:t,spanArguments:n,forceTransaction:r,scope:o}){if(!jt()){const e=new Kt;if(r||!t){qt(e,{sampled:"false",sample_rate:"0",transaction:n.name,...Gt(e)})}return e}const s=Pe();let i;if(t&&!r)i=function(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=!t.getScopeData().sdkProcessingMetadata[Sn]&&Rt(e),i=s?new _n({...n,parentSpanId:r,traceId:o,sampled:s}):new Kt({traceId:o});Dt(e,i);const a=Be();a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i));return i}(t,o,n),Dt(t,i);else if(t){const e=Gt(t),{traceId:r,spanId:s}=t.spanContext(),a=Rt(t);i=Rn({traceId:r,parentSpanId:s,...n},o,a),qt(i,e)}else{const{traceId:e,dsc:t,parentSpanId:r,sampled:a}={...s.getPropagationContext(),...o.getPropagationContext()};i=Rn({traceId:e,parentSpanId:r,...n},o,a),t&&qt(i,t)}return function(t){if(!e)return;const{description:n="< unknown name >",op:r="< unknown op >",parent_span_id:o}=Mt(t),{spanId:s}=t.spanContext(),i=Rt(t),a=Pt(t),c=a===t,u=`[Tracing] Starting ${i?"sampled":"unsampled"} ${c?"root ":""}span`,l=[`op: ${r}`,`name: ${n}`,`ID: ${s}`];if(o&&l.push(`parent ID: ${o}`),!c){const{op:e,description:t}=Mt(a);l.push(`root ID: ${a.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}p.log(`${u}\n ${l.join("\n ")}`)}(i),function(e,t,n){e&&(re(e,ot,n),re(e,rt,t))}(i,o,s),i}function Tn(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=It(e.startTime),delete n.startTime,n}return t}function Mn(){return De(r())}function Rn(t,n,r){const o=Be(),s=o?.getOptions()||{},{name:i=""}=t,a={spanAttributes:{...t.attributes},spanName:i,parentSampled:r};o?.emit("beforeSampling",a,{decision:!1});const c=a.parentSampled??r,u=a.spanAttributes,l=n.getPropagationContext(),[d,h,f]=n.getScopeData().sdkProcessingMetadata[Sn]?[!1]:function(t,n,r){if(!jt(t))return[!1];let o,s;"function"==typeof t.tracesSampler?(s=t.tracesSampler({...n,inheritOrSampleWith:e=>"number"==typeof n.parentSampleRate?n.parentSampleRate:"boolean"==typeof n.parentSampled?Number(n.parentSampled):e}),o=!0):void 0!==n.parentSampled?s=n.parentSampled:void 0!==t.tracesSampleRate&&(s=t.tracesSampleRate,o=!0);const i=yt(s);if(void 0===i)return e&&p.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return e&&p.log("[Tracing] Discarding transaction because "+("function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,i,o];const a=rEn(e,t):e=>e()}const Ln={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function Dn(t,n={}){const r=new Map;let o,s=!1,i="externalFinish",a=!n.disableAutoFinish;const c=[],{idleTimeout:u=Ln.idleTimeout,finalTimeout:l=Ln.finalTimeout,childSpanTimeout:d=Ln.childSpanTimeout,beforeSpanEnd:h}=n,f=Be();if(!f||!jt()){const e=new Kt;return qt(e,{sample_rate:"0",sampled:"false",...Gt(e)}),e}const m=Ne(),g=Ft(),_=function(t){const n=kn(t);return Ce(Ne(),n),e&&p.log("[Tracing] Started span is an idle span"),n}(t);function y(){o&&(clearTimeout(o),o=void 0)}function v(e){y(),o=setTimeout(()=>{!s&&0===r.size&&a&&(i="idleTimeout",_.end(e))},u)}function b(e){o=setTimeout(()=>{!s&&a&&(i="heartbeatFailed",_.end(e))},d)}function S(t){s=!0,r.clear(),c.forEach(e=>e()),Ce(m,g);const n=Mt(_),{start_timestamp:o}=n;if(!o)return;n.data[Ve]||_.setAttribute(Ve,i),p.log(`[Tracing] Idle span "${n.op}" finished`);const a=Nt(_).filter(e=>e!==_);let d=0;a.forEach(n=>{n.isRecording()&&(n.setStatus({code:2,message:"cancelled"}),n.end(t),e&&p.log("[Tracing] Cancelling span since span ended early",JSON.stringify(n,void 0,2)));const r=Mt(n),{timestamp:o=0,start_timestamp:s=0}=r,i=s<=t,a=o-s<=(l+u)/1e3;if(e){const e=JSON.stringify(n,void 0,2);i?a||p.log("[Tracing] Discarding span since it finished after idle span final timeout",e):p.log("[Tracing] Discarding span since it happened after idle span was finished",e)}a&&i||(!function(e,t){e[At]&&e[At].delete(t)}(_,n),d++)}),d>0&&_.setAttribute("sentry.idle_span_discarded_spans",d)}return _.end=new Proxy(_.end,{apply(e,t,n){if(h&&h(_),t instanceof Kt)return;const[r,...o]=n,s=It(r||ye()),i=Nt(_).filter(e=>e!==_);if(!i.length)return S(s),Reflect.apply(e,t,[s,...o]);const a=i.map(e=>Mt(e).timestamp).filter(e=>!!e),c=a.length?Math.max(...a):void 0,u=Mt(_).start_timestamp,d=Math.min(u?u+l/1e3:1/0,Math.max(u||-1/0,Math.min(s,c||1/0)));return S(d),Reflect.apply(e,t,[d,...o])}}),c.push(f.on("spanStart",e=>{if(s||e===_||Mt(e).timestamp||e instanceof _n&&e.isStandaloneSpan())return;var t;Nt(_).includes(e)&&(t=e.spanContext().spanId,y(),r.set(t,!0),b(ye()+d/1e3))})),c.push(f.on("spanEnd",e=>{var t;s||(t=e.spanContext().spanId,r.has(t)&&r.delete(t),0===r.size&&v(ye()+u/1e3))})),c.push(f.on("idleSpanEnableAutoFinish",e=>{e===_&&(a=!0,v(),r.size&&b())})),n.disableAutoFinish||v(),setTimeout(()=>{s||(_.setStatus({code:2,message:"deadline_exceeded"}),i="finalTimeout",_.end())},l),_}function Nn(e){return new Fn(t=>{t(e)})}function Pn(e){return new Fn((t,n)=>{n(e)})}class Fn{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new Fn((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new Fn((t,n)=>{let r,o;return this.then(t=>{o=!1,r=t,e&&e()},t=>{o=!0,r=t,e&&e()}).then(()=>{o?n(r):t(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(H(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(e){r(e)}}}function $n(t,n,r,o=0){return new Fn((s,i)=>{const a=t[o];if(null===n||"function"!=typeof a)s(n);else{const c=a({...n},r);e&&a.id&&null===c&&p.log(`Event processor "${a.id}" dropped event`),H(c)?c.then(e=>$n(t,e,r,o+1).then(s)).then(null,i):$n(t,c,r,o+1).then(s).then(null,i)}})}function Bn(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(o).length&&(e.user={...o,...e.user});Object.keys(s).length&&(e.contexts={...s,...e.contexts});i&&(e.level=i);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Et(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Gt(t),...e.sdkProcessingMetadata};const n=Pt(t),r=Mt(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(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}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}function Un(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:f}=t;jn(e,"extra",n),jn(e,"tags",r),jn(e,"user",o),jn(e,"contexts",s),e.sdkProcessingMetadata=we(e.sdkProcessingMetadata,a,2),i&&(e.level=i),h&&(e.transactionName=h),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function jn(e,t,n){e[t]=we(e[t],n,1)}let Hn,zn,qn;function Wn(e){const n=t._sentryDebugIds;if(!n)return{};const r=Object.keys(n);return qn&&r.length===zn||(zn=r.length,qn=r.reduce((t,r)=>{Hn||(Hn={});const o=Hn[r];if(o)t[o[0]]=o[1];else{const o=e(r);for(let e=o.length-1;e>=0;e--){const s=o[e],i=s?.filename,a=n[r];if(i&&a){t[i]=a,Hn[r]=[i,a];break}}}return t},{})),qn}function Vn(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ue(),timestamp:t.timestamp||me()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s=250}=t;e.environment=e.environment||n||Ht,!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&(i.url=X(i.url,s))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=Wn(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(c,e.stackParser);const l=function(e,t){if(!t)return e;const n=e?e.clone():new Te;return n.update(t),n}(r,n.captureContext);n.mechanism&&he(c,n.mechanism);const d=o?o.getEventProcessors():[],p=Fe().getScopeData();if(s){Un(p,s.getScopeData())}if(l){Un(p,l.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),Bn(c,p);return $n([...d,...p.eventProcessors],c,n).then(e=>(e&&function(e){const 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)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Jt(e.data,t,n)}}))},...e.user&&{user:Jt(e.user,t,n)},...e.contexts&&{contexts:Jt(e.contexts,t,n)},...e.extra&&{extra:Jt(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Jt(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Jt(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=Jt(e.contexts.flags,3,n));return r}(e,i,a):e))}function Gn(e){if(e)return function(e){return e instanceof Te||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>Kn.includes(e))}(e)?{captureContext:e}:e}const Kn=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jn(e,t){return Ne().captureException(e,Gn(t))}function Yn(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return Ne().captureMessage(e,n,r)}function Xn(e,t){return Ne().captureEvent(e,t)}function Zn(e,t){Pe().setContext(e,t)}function Qn(){return Pe().lastEventId()}function er(){const e=Be();return!1!==e?.getOptions().enabled&&!!e?.getTransport()}function tr(e){Pe().addEventProcessor(e)}function nr(e){const n=Pe(),r=Ne(),{userAgent:o}=t.navigator||{},s=be({user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),i=n.getSession();return"ok"===i?.status&&Se(i,{status:"exited"}),rr(),n.setSession(s),s}function rr(){const e=Pe(),t=Ne().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Se(e,t)}(t),or(),e.setSession()}function or(){const e=Pe(),t=Be(),n=e.getSession();n&&t&&t.captureSession(n)}function sr(e=!1){e?rr():or()}function ir(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function ar(e,t,n){return t||`${function(e){return`${ir(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const cr=[];function ur(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function lr(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function dr(t,n,r){if(r[n.name])e&&p.log(`Integration skipped because it was already installed: ${n.name}`);else{if(r[n.name]=n,-1===cr.indexOf(n.name)&&"function"==typeof n.setupOnce&&(n.setupOnce(),cr.push(n.name)),n.setup&&"function"==typeof n.setup&&n.setup(t),"function"==typeof n.preprocessEvent){const e=n.preprocessEvent.bind(n);t.on("preprocessEvent",(n,r)=>e(n,r,t))}if("function"==typeof n.processEvent){const e=n.processEvent.bind(n),r=Object.assign((n,r)=>e(n,r,t),{id:n.name});t.addEventProcessor(r)}e&&p.log(`Integration installed: ${n.name}`)}}function pr(t){const n=Be();n?n.addIntegration(t):e&&p.warn(`Cannot add integration "${t.name}" because no SDK Client is available.`)}function hr(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const fr="Not capturing exception because it's already been captured.",mr="Discarded session because of missing or non-string release",gr=Symbol.for("SentryInternalError"),_r=Symbol.for("SentryDoNotSendEventError");function yr(e){return{message:e,[gr]:!0}}function vr(e){return{message:e,[_r]:!0}}function br(e){return!!e&&"object"==typeof e&&gr in e}function Sr(e){return!!e&&"object"==typeof e&&_r in e}class wr{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=_t(t.dsn):e&&p.warn("No DSN provided, client will not send events."),this._dsn){const e=ar(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,n,r){const o=ue();if(fe(t))return e&&p.log(fr),o;const s={event_id:o,...n};return this._process(this.eventFromException(t,s).then(e=>this._captureEvent(e,s,r))),s.event_id}captureMessage(e,t,n,r){const o={event_id:ue(),...n},s=$(e)?e:String(e),i=B(e)?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(i.then(e=>this._captureEvent(e,o,r))),o.event_id}captureEvent(t,n,r){const o=ue();if(n?.originalException&&fe(n.originalException))return e&&p.log(fr),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(t,s,a||r,c)),s.event_id}captureSession(e){this.sendSession(e),Se(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):Nn(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];dr(this,e,this._integrations),t||lr(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const o=ln(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};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,n?.sdk);const i=dn(e,o,r,t);return delete e.sdkProcessingMetadata,Zt(i,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Qt(n,an(e));const r=this.sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(t){const{release:n,environment:r=Ht}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n)return void(e&&p.warn(mr));o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n)return void(e&&p.warn(mr));t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=function(e,t,n,r){const o=ln(n);return Zt({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:ht(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;e&&p.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,t=>(e&&p.error("Error while sending envelope:",t),t)):(e&&p.error("Transport disabled"),Nn({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&dr(e,t,n)}),n}(this,e),lr(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(!1===t?.handled){n=!0;break}}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Se(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Fn(t=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s?.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Vn(o,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:Ue(n),...e.contexts};const r=Vt(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(t,n={},r=Ne(),o=Pe()){return e&&kr(t)&&p.log(`Captured error event \`${hr(t)[0]||""}\``),this._processEvent(t,n,r,o).then(e=>e.event_id,t=>{e&&(Sr(t)?p.log(t.message):br(t)?p.warn(t.message):p.warn(t))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:s}=o,i=Er(e),a=kr(e),c=e.type||"error",u=`before send for type \`${c}\``,l=void 0===s?void 0:yt(s);if(a&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),Pn(vr(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const d="replay_event"===c?"replay":c;return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",d),vr("An event processor returned `null`, will not send event.");if(t.data&&!0===t.data.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t;let c=n;if(kr(c)&&o)return o(c,r);if(Er(c)){if(i||a){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[Ye],exclusive_time:i?.[Xe],measurements:e.measurements,is_segment:!0}}(c);if(a?.length&&pn(t,a))return null;if(i){const e=i(t);e?c=we(n,{type:"transaction",timestamp:(u=e).timestamp,start_timestamp:u.start_timestamp,transaction:u.description,contexts:{trace:{trace_id:u.trace_id,span_id:u.span_id,parent_span_id:u.parent_span_id,op:u.op,status:u.status,origin:u.origin,data:{...u.data,...u.profile_id&&{[Ye]:u.profile_id},...u.exclusive_time&&{[Xe]:u.exclusive_time}}}},measurements:u.measurements}):$t()}if(c.spans){const t=[],n=c.spans;for(const e of n)if(a?.length&&pn(e,a))hn(n,e);else if(i){const n=i(e);n?t.push(n):($t(),t.push(e))}else t.push(e);const r=c.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),c.spans=t}}if(s){if(c.spans){const e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return s(c,r)}}var u;return c}(this,o,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(H(e))return e.then(e=>{if(!U(e)&&null!==e)throw yr(n);return e},e=>{throw yr(`${t} rejected with ${e}`)});if(!U(e)&&null!==e)throw yr(n);return e}(n,u)}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",d),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw vr(`${u} returned \`null\`, will not send event.`)}const s=n.getSession()||r.getSession();if(a&&s&&this._updateSessionFromEvent(s,o),i){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const c=o.transaction_info;if(i&&c&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...c,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(Sr(e)||br(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),yr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){e&&p.log("Flushing outcomes...");const t=this._clearOutcomes();if(0===t.length)return void(e&&p.log("No outcomes to send"));if(!this._dsn)return void(e&&p.log("No dsn provided, will not send outcomes"));e&&p.log("Sending outcomes:",t);const n=(r=t,Zt((o=this._options.tunnel&&ht(this._dsn))?{dsn:o}:{},[[{type:"client_report"},{timestamp:me(),discarded_events:r}]]));var r,o;this.sendEnvelope(n)}}function kr(e){return void 0===e.type}function Er(e){return"transaction"===e.type}const xr={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Cr(e,t,n,r=!0){!n||e[t]&&!r||(e[t]=n)}function Ir(e,t){const n=Or(),r=Rr(e);void 0===r?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=100&&Mr(e,r))}function Tr(t,n=Be(),r=Ne(),o=Ir){if(!n)return void(e&&p.warn("No client available to capture log."));const{release:s,environment:i,enableLogs:a=!1,beforeSendLog:u}=n.getOptions();if(!a)return void(e&&p.warn("logging option not enabled, log will not be captured."));const[,l]=function(e,t){return t?$e(t,()=>{const n=Ft(),r=n?Et(n):Ue(t);return[n?Gt(n):Vt(e,t),r]}):[void 0,void 0]}(n,r),d={...t.attributes},{user:{id:h,email:f,username:m}}=function(e){const t=Fe().getScopeData();return Un(t,Pe().getScopeData()),Un(t,e.getScopeData()),t}(r);Cr(d,"user.id",h,!1),Cr(d,"user.email",f,!1),Cr(d,"user.name",m,!1),Cr(d,"sentry.release",s),Cr(d,"sentry.environment",i);const{name:g,version:_}=n.getSdkMetadata()?.sdk??{};Cr(d,"sentry.sdk.name",g),Cr(d,"sentry.sdk.version",_);const y=t.message;if($(y)){const{__sentry_template_string__:e,__sentry_template_values__:t=[]}=y;d["sentry.message.template"]=e,t.forEach((e,t)=>{d[`sentry.message.parameter.${t}`]=e})}const v=Ie(r);Cr(d,"sentry.trace.parent_span_id",v?.spanContext().spanId);const b={...t,attributes:d};n.emit("beforeCaptureLog",b);const S=u?c(()=>u(b)):b;if(!S)return n.recordDroppedEvent("before_send","log_item",1),void(e&&p.warn("beforeSendLog returned null, log will not be captured."));const{level:w,message:k,attributes:E={},severityNumber:x}=S;o(n,{timestamp:ye(),level:w,body:k,trace_id:l?.trace_id,severity_number:x??xr[w],attributes:Object.keys(E).reduce((e,t)=>(e[t]=function(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}(E[t]),e),{})}),n.emit("afterCaptureLog",S)}function Mr(e,t){const n=t??Rr(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=ht(r)),Zt(o,[(s=e,[{type:"log",item_count:s.length,content_type:"application/vnd.sentry.items.log+json"},{items:s}])]);var s}(n,r._metadata,r.tunnel,e.getDsn());Or().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Rr(e){return Or().get(e)}function Or(){return s("clientToLogBufferMap",()=>new WeakMap)}function Ar(e){Ne().setClient(e)}const Lr=Symbol.for("SentryBufferFullError");function Dr(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(o)).then(null,()=>n(o).then(null,()=>{})),o},drain:function(e){return new Fn((n,r)=>{let o=t.length;if(!o)return n(!0);const s=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Nn(e).then(()=>{--o||(clearTimeout(s),n(!0))},r)})})}}}function Nr(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function Pr(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function Fr(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n,,,s]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e&&s&&!s.split(";").includes("custom")||(o[e]=r+a);else o.all=r+a}else i?o.all=r+Nr(i,r):429===t&&(o.all=r+6e4);return o}function $r(t,n,r=Dr(t.bufferSize||64)){let o={};return{send:function(s){const i=[];if(en(s,(e,n)=>{const r=un(n);Pr(o,r)?t.recordDroppedEvent("ratelimit_backoff",r):i.push(e)}),0===i.length)return Nn({});const a=Zt(s[0],i),c=e=>{en(a,(n,r)=>{t.recordDroppedEvent(e,un(r))})};return r.add(()=>n({body:rn(a)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&e&&p.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),o=Fr(o,t),t),t=>{throw c("network_error"),e&&p.error("Encountered error running transport request:",t),t})).then(e=>e,t=>{if(t===Lr)return e&&p.error("Skipped sending event because buffer is full."),c("queue_overflow"),Nn({});throw t})},flush:e=>r.drain(e)}}const Br=5e3;function Ur(t){function n(...t){e&&p.log("[Offline]:",...t)}return e=>{const r=t(e);if(!e.createStore)throw new Error("No `createStore` function was provided");const o=e.createStore(e);let s,i=Br;function a(e){s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const e=await o.shift();e&&(n("Attempting to send previously queued event"),e[0].sent_at=(new Date).toISOString(),u(e,!0).catch(e=>{n("Failed to retry sending",e)}))},e),"number"!=typeof s&&s.unref&&s.unref()}function c(){s||(a(i),i=Math.min(2*i,36e5))}async function u(t,s=!1){if(!s&&tn(t,["replay_event","replay_recording"]))return await o.push(t),a(100),{};try{if(e.shouldSend&&!1===await e.shouldSend(t))throw new Error("Envelope not sent because `shouldSend` callback returned false");const n=await r.send(t);let o=100;if(n)if(n.headers?.["retry-after"])o=Nr(n.headers["retry-after"]);else if(n.headers?.["x-sentry-rate-limits"])o=6e4;else if((n.statusCode||0)>=400)return n;return a(o),i=Br,n}catch(r){if(await function(t,n,r){return!tn(t,["client_report"])&&(!e.shouldStore||e.shouldStore(t,n,r))}(t,r,i))return s?await o.unshift(t):await o.push(t),c(),n("Error sending. Event queued.",r),{};throw r}}return e.flushAtStartup&&c(),{send:u,flush:e=>(void 0===e&&(i=Br,a(100)),r.flush(e))}}}function jr(e,t){let n;return en(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function Hr(e){return"isRelative"in e}function zr(e,t){const n=e.indexOf("://")<=0&&0!==e.indexOf("//"),r=n?"thismessage:/":void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function qr(e){if(Hr(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Wr(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Vr(e){return e.split(/[?#]/,1)[0]}function Gr(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return function(e,t){const n=zr(e);if(!n||Hr(n))return!1;return!!t&&(n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search))}(e,n)||function(e,t){if(!t)return!1;return Kr(e)===Kr(t)}(e,r)}function Kr(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function Jr(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const Yr=Jr;function Xr(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function Zr(e={}){const t=e.client||Be();if(!er()||!t)return{};const n=De(r());if(n.getTraceData)return n.getTraceData(e);const o=e.scope||Ne(),s=e.span||Ft(),i=s?xt(s):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return St(t,r,n)}(o),a=ut(s?Gt(s):Vt(t,o));return vt.test(i)?{"sentry-trace":i,baggage:a}:(p.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}const Qr=100;function eo(e,t){const n=Be(),r=Pe();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Qr}=n.getOptions();if(s<=0)return;const i={timestamp:me(),...e},a=o?c(()=>o(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}let to;const no=new WeakMap,ro=()=>({name:"FunctionToString",setupOnce(){to=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=se(this),n=no.has(Be())&&void 0!==t?t:this;return to.apply(n,e)}}catch{}},setup(e){no.set(e,!0)}}),oo=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],so=(t={})=>{let n;return{name:"EventFilters",setup(e){const r=e.getOptions();n=ao(t,r)},processEvent(r,o,s){if(!n){const e=s.getOptions();n=ao(t,e)}return function(t,n){if(t.type){if("transaction"===t.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&te(n,t)}(t,n.ignoreTransactions))return e&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${de(t)}`),!0}else{if(function(e,t){if(!t?.length)return!1;return hr(e).some(e=>te(e,t))}(t,n.ignoreErrors))return e&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${de(t)}`),!0;if(function(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(t))return e&&p.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${de(t)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=co(e);return!!n&&te(n,t)}(t,n.denyUrls))return e&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${de(t)}.\nUrl: ${co(t)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=co(e);return!n||te(n,t)}(t,n.allowUrls))return e&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${de(t)}.\nUrl: ${co(t)}`),!0}return!1}(r,n)?null:r}}},io=(e={})=>({...so(e),name:"InboundFilters"});function ao(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:oo],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function co(t){try{const e=[...t.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=e?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return e&&p.error(`Cannot extract url for event ${de(t)}`),null}}function uo(e,t,n,r,o,s){if(!o.exception?.values||!s||!z(s.originalException,Error))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=lo(e,t,r,s.originalException,n,o.exception.values,i,0))}function lo(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(z(r[o],Error)){po(i,a);const s=e(t,r[o]),u=c.length;ho(s,o,u,a),c=lo(e,t,n,r[o],o,[s,...c],s,u)}return Array.isArray(r.errors)&&r.errors.forEach((r,s)=>{if(z(r,Error)){po(i,a);const u=e(t,r),l=c.length;ho(u,`errors[${s}]`,l,a),c=lo(e,t,n,r,o,[u,...c],u,l)}}),c}function po(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function ho(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const fo=new Map,mo=new Set;function go(e,n){return function(e){if(t._sentryModuleMetadata)for(const n of Object.keys(t._sentryModuleMetadata)){const r=t._sentryModuleMetadata[n];if(mo.has(n))continue;mo.add(n);const o=e(n);for(const e of o.reverse())if(e.filename){fo.set(e.filename,r);break}}}(e),fo.get(n)}function _o(e,t){try{t.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[]){if(!n.filename||n.module_metadata)continue;const t=go(e,n.filename);t&&(n.module_metadata=t)}})}catch{}}function yo(e){try{e.exception.values.forEach(e=>{if(e.stacktrace)for(const t of e.stacktrace.frames||[])delete t.module_metadata})}catch{}}const vo=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",e=>{en(e,(e,t)=>{if("event"===t){const t=Array.isArray(e)?e[1]:void 0;t&&(yo(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;_o(e.getOptions().stackParser,t)})}});function bo(e){const t="console";k(t,e),E(t,So)}function So(){"console"in t&&i.forEach(function(e){e in t.console&&ne(t.console,e,function(n){return a[e]=n,function(...n){x("console",{args:n,level:e});const r=a[e];r?.apply(t.console,n)}})})}function wo(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ko=(e={})=>{const n=e.levels||i,r=e.handled??!0;return{name:"CaptureConsole",setup(e){"console"in t&&bo(({args:t,level:o})=>{Be()===e&&n.includes(o)&&function(e,t,n){const r={level:wo(t),extra:{arguments:e}};$e(o=>{if(o.addEventProcessor(e=>(e.logger="console",he(e,{handled:n,type:"console"}),e)),"assert"===t){if(!e[0]){const t=`Assertion failed: ${Q(e.slice(1)," ")||"console.assert"}`;o.setExtra("arguments",e.slice(1)),Yn(t,r)}return}const s=e.find(e=>e instanceof Error);if(s)return void Jn(s,r);Yn(Q(e," "),r)})}(t,o,r)})}}};const Eo=()=>{let t;return{name:"Dedupe",processEvent(n){if(n.type)return n;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Co(e,t))return!1;if(!xo(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Io(t),r=Io(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Co(e,t))return!1;if(!xo(e,t))return!1;return!0}(e,t))return!0;return!1}(n,t))return e&&p.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=n}}};function xo(e,t){let n=b(e),r=b(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:"ExtraErrorData",processEvent(e,r,o){const{maxValueLength:s=250}=o.getOptions();return function(e,t={},n,r,o){if(!t.originalException||!L(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=Mo(t.originalException,r,o);if(i){const t={...e.contexts},r=Jt(i,n);return U(r)&&(re(r,"__sentry_skip_normalization__",!0),t[s]=r),{...e,contexts:t}}return e}(e,r,t,n,s)}}};function Mo(t,n,r){try{const e=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const n of Object.keys(t)){if(-1!==e.indexOf(n))continue;const s=t[n];o[n]=L(s)||"string"==typeof s?X(`${s}`,r):s}if(n&&void 0!==t.cause)if(L(t.cause)){const e=t.cause.name||t.cause.constructor.name;o.cause={[e]:Mo(t.cause,!1,r)}}else o.cause=t.cause;if("function"==typeof t.toJSON){const e=t.toJSON();for(const t of Object.keys(e)){const n=e[t];o[t]=L(n)?n.toString():n}}return o}catch(t){e&&p.error("Unable to extract extra data from the Error object:",t)}return null}const Ro=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Oo(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n="/"===o.charAt(0))}return t=function(e,t){let n=0;for(let t=e.length-1;t>=0;t--){const r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."}function Ao(e){let t=0;for(;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function Lo(e,t){return function(e){const t=e.length>1024?`${e.slice(-1024)}`:e,n=Ro.exec(t);return n?n.slice(1):[]}(e)[2]||""}const Do=(e={})=>{const n=e.root,r=e.prefix||"app:///",o="window"in t&&!!t.window,s=e.iteratee||function({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const e=r.filename;0===e.indexOf(t)&&(r.filename=e.replace(t,n))}}else if(o||s){const e=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,s=t?function(e,t){e=Oo(e).slice(1),t=Oo(t).slice(1);const n=Ao(e.split("/")),r=Ao(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let e=0;e{return{...e,...e.stacktrace&&{stacktrace:(t=e.stacktrace,{...t,frames:t?.frames?.map(e=>s(e))})}};var t})}}}catch{return e}}(t)),t}}};const No=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],Po=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],Fo={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},$o=["select","insert","upsert","update","delete"];function Bo(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Uo(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function jo(e,t){if(""===t||"*"===t)return"select(*)";if("select"===e)return`select(${t})`;if("or"===e||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return o=n?.startsWith("fts")?"textSearch":n?.startsWith("plfts")?"textSearch[plain]":n?.startsWith("phfts")?"textSearch[phrase]":n?.startsWith("wfts")?"textSearch[websearch]":n&&Fo[n]||"filter",`${o}(${e}, ${r.join(".")})`}function Ho(e,t=!1){return new Proxy(e,{apply:(n,r,o)=>wn({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[We]:"auto.db.supabase",[qe]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},e=>Reflect.apply(n,r,o).then(t=>(t&&"object"==typeof t&&"error"in t&&t.error?(e.setStatus({code:2}),Jn(t.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),Jn(t,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),t}).then(...o))})}function zo(t){Uo(t.prototype.from)||(t.prototype.from=new Proxy(t.prototype.from,{apply(t,n,r){const o=Reflect.apply(t,n,r);return function(t){for(const n of $o)Uo(t.prototype[n])||(t.prototype[n]=new Proxy(t.prototype[n],{apply(t,r,o){const s=Reflect.apply(t,r,o),i=s.constructor;return e&&p.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),qo(i),s}}),Bo(t.prototype[n]))}(o.constructor),o}}),Bo(t.prototype.from))}function qo(e){Uo(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(e,t,n){const r=$o,o=t,s=function(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return""}}(o.method,o.headers);if(!r.includes(s))return Reflect.apply(e,t,n);if(!o?.url?.pathname||"string"!=typeof o.url.pathname)return Reflect.apply(e,t,n);const i=o.url.pathname.split("/"),a=i.length>0?i[i.length-1]:"",c=[];for(const[e,t]of o.url.searchParams.entries())c.push(jo(e,t));const u=Object.create(null);if(U(o.body))for(const[e,t]of Object.entries(o.body))u[e]=t;const l=`${"select"===s?"":`${s}${u?"(...) ":""}`}${c.join(" ")} from(${a})`,d={"db.table":a,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":o.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[We]:"auto.db.supabase",[qe]:"db"};return c.length&&(d["db.query"]=c),Object.keys(u).length&&(d["db.body"]=u),wn({name:l,attributes:d},r=>Reflect.apply(e,t,[]).then(e=>{if(r&&(e&&"object"==typeof e&&"status"in e&&nt(r,e.status||500),r.end()),e.error){const t=new Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);const n={};c.length&&(n.query=c),Object.keys(u).length&&(n.body=u),Jn(t,e=>(e.addEventProcessor(e=>(he(e,{handled:!1,type:"auto.db.supabase.postgres"}),e)),e.setContext("supabase",n),e))}const t={type:"supabase",category:`db.${s}`,message:l},n={};return c.length&&(n.query=c),Object.keys(u).length&&(n.body=u),Object.keys(n).length&&(t.data=n),eo(t),e},e=>{throw r&&(nt(r,500),r.end()),e}).then(...n))}}),Bo(e.prototype.then))}const Wo=t=>{if(!t)return void(e&&p.warn("Supabase integration was not installed because no Supabase client was provided."));zo(t.constructor===Function?t:t.constructor),function(e){const t=e.auth;if(t&&!Uo(e.auth)){for(const n of No){const r=t[n];r&&"function"==typeof e.auth[n]&&(e.auth[n]=Ho(r))}for(const n of Po){const r=t.admin[n];r&&"function"==typeof e.auth.admin[n]&&(e.auth.admin[n]=Ho(r,!0))}Bo(e.auth)}}(t)},Vo=e=>{return t=e.supabaseClient,{setupOnce(){Wo(t)},name:"Supabase"};var t};function Go(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function Ko(e){return e.map(e=>"number"==typeof e?"":e).join(".")}function Jo(e){const t=new Set;for(const n of e.issues){const e=Ko(n.path);e.length>0&&t.add(e)}const n=Array.from(t);if(0===n.length){let t="variable";if(e.issues.length>0){const n=e.issues[0];void 0!==n&&"expected"in n&&"string"==typeof n.expected&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${X(n.join(", "),100)}`}function Yo(e,t=!1,n,r){if(!(n.exception?.values&&r.originalException&&(o=r.originalException,L(o)&&"ZodError"===o.name&&Array.isArray(o.issues))&&0!==r.originalException.issues.length))return n;var o;try{const o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(Go);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:Jo(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:"unknown"}}}}}const Xo=(e={})=>{const t=e.limit??10;return{name:"ZodErrors",processEvent:(n,r)=>Yo(t,e.saveZodIssuesAsAttachment,n,r)}},Zo=e=>({name:"ThirdPartyErrorsFilter",setup(e){e.on("beforeEnvelope",e=>{en(e,(e,t)=>{if("event"===t){const t=Array.isArray(e)?e[1]:void 0;t&&(yo(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;_o(e.getOptions().stackParser,t)})},processEvent(t){const n=function(e){const t=b(e);if(!t)return;return t.filter(e=>!!e.filename).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(Qo)).map(e=>e.slice(Qo.length)):[])}(t);if(n){const r=n["drop-error-if-contains-third-party-frames"===e.behaviour||"apply-tag-if-contains-third-party-frames"===e.behaviour?"some":"every"](t=>!t.some(t=>e.filterKeys.includes(t)));if(r){if("drop-error-if-contains-third-party-frames"===e.behaviour||"drop-error-if-exclusively-contains-third-party-frames"===e.behaviour)return null;t.tags={...t.tags,third_party_code:!0}}}return t}});const Qo="_sentryBundlerPluginAppKey:",es="flag.evaluation.";function ts(e){const t=Ne().getScopeData().contexts.flags,n=t?t.values:[];return n.length?(void 0===e.contexts&&(e.contexts={}),e.contexts.flags={values:[...n]},e):e}function ns(t,n,r=100){const o=Ne().getScopeData().contexts;o.flags||(o.flags={values:[]});!function(t,n,r,o){if("boolean"!=typeof r)return;if(t.length>o)return void(e&&p.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${o}`));const s=t.findIndex(e=>e.flag===n);-1!==s&&t.splice(s,1);t.length===o&&t.shift();t.push({flag:n,result:r})}(o.flags.values,t,n,r)}function rs(e,t,n=10){if("boolean"!=typeof t)return;const r=Ft();if(!r)return;const o=Mt(r).data;if(`${es}${e}`in o)return void r.setAttribute(`${es}${e}`,t);Object.keys(o).filter(e=>e.startsWith(es)).length({name:"FeatureFlags",processEvent:(e,t,n)=>ts(e),addFeatureFlag(e,t){ns(e,t),rs(e,t)}});function ss(e,t,n,r,o="auto.http.browser"){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=jt()&&t(i);if(e.endTimestamp&&a){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(!function(e,t){if(t.response){nt(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),delete r[t]))}const c=!!Ft(),u=a&&c?kn(function(e,t,n){const r=zr(e);return{name:r?`${t} ${qr(r)}`:t,attributes:as(e,r,t,n)}}(i,s,o)):new Kt;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const t=e.args[0],n=e.args[1]||{},r=function(e,t,n){const r=Zr({span:n}),o=r["sentry-trace"],s=r.baggage;if(!o)return;const i=t.headers||(W(e)?e.headers:void 0);if(i){if(function(e){return"undefined"!=typeof Headers&&z(e,Headers)}(i)){const e=new Headers(i);if(e.get("sentry-trace")||e.set("sentry-trace",o),s){const t=e.get("baggage");t?is(t)||e.set("baggage",`${t},${s}`):e.set("baggage",s)}return e}if(Array.isArray(i)){const e=[...i];i.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",o]);const t=i.find(e=>"baggage"===e[0]&&is(e[1]));return s&&!t&&e.push(["baggage",s]),e}{const e="sentry-trace"in i?i["sentry-trace"]:void 0,t="baggage"in i?i.baggage:void 0,n=t?Array.isArray(t)?[...t]:[t]:[],r=t&&(Array.isArray(t)?t.find(e=>is(e)):is(t));return s&&!r&&n.push(s),{...i,"sentry-trace":e??o,baggage:n.length>0?n.join(","):void 0}}}return{...r}}(t,n,jt()&&c?u:void 0);r&&(e.args[1]=n,n.headers=r)}const l=Be();if(l){const t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};l.emit("beforeOutgoingRequestSpan",u,t)}return u}function is(e){return e.split(",").some(e=>e.trim().startsWith(it))}function as(e,t,n,r){const o={url:e,type:"fetch","http.method":n,[We]:r,[qe]:"http.client"};return t&&(Hr(t)||(o["http.url"]=t.href,o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function cs(e,t={},n=Ne()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,l={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},d=n?.getClient()||Be();d&&d.emit("beforeSendFeedback",l,t);return n.captureEvent(l,t)}const us={[We]:"auto.console.logging"},ls=(t={})=>{const n=t.levels||i;return{name:"ConsoleLogs",setup(t){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=t.getOptions();r?bo(({args:e,level:r})=>{if(Be()!==t||!n.includes(r))return;if("assert"===r){if(!e[0]){const t=e.slice(1);Tr({level:"error",message:t.length>0?`Assertion failed: ${ds(t,o,s)}`:"Assertion failed",attributes:us})}return}const i="log"===r;Tr({level:i?"info":r,message:ds(e,o,s),severityNumber:i?10:void 0,attributes:us})}):e&&p.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled")}}};function ds(e,n,r){return"util"in t&&"function"==typeof t.util.format?t.util.format(...e):function(e,t,n){return e.map(e=>B(e)?String(e):JSON.stringify(Jt(e,t,n))).join(" ")}(e,n,r)}function ps(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const hs=t;function fs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ms(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in hs))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(fs(hs.fetch))return!0;let t=!1;const n=hs.document;if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e),e.contentWindow?.fetch&&(t=fs(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){e&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t}function gs(e,t){const n="fetch";k(n,e),E(n,()=>_s(void 0,t))}function _s(e,n=!1){n&&!ms()||ne(t,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:bs(t),method:vs(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:bs(t),method:vs(t,"method")?String(t.method).toUpperCase():"GET"}}(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:1e3*ye(),virtualError:o,headers:Ss(r)};return e||x("fetch",{...a}),n.apply(t,r).then(async t=>(e?e(t):x("fetch",{...a,endTimestamp:1e3*ye(),response:t}),t),e=>{if(x("fetch",{...a,endTimestamp:1e3*ye(),error:e}),L(e)&&void 0===e.stack&&(e.stack=o.stack,re(e,"framesToPop",1)),e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(a.fetchData.url);e.message=`${e.message} (${t.host})`}catch{}throw e})}})}function ys(e){let t;try{t=e.clone()}catch{return}!async function(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(e),o&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(e)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{x("fetch-body-resolved",{endTimestamp:1e3*ye(),response:e})})}function vs(e,t){return!!e&&"object"==typeof e&&!!e[t]}function bs(e){return"string"==typeof e?e:e?vs(e,"url")?e.url:e.toString?e.toString():"":""}function Ss(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(W(t))return new Headers(t.headers)}catch{}}function ws(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function ks(){return"undefined"!=typeof window&&(!ws()||function(){const e=t.process;return"renderer"===e?.type}())}const Es=t,xs=Es.document,Cs=Es.navigator,Is="Report a Bug",Ts=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=Be();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&Ne().setTags(e.tags);const r=cs({source:"api",url:J(),...e},t);return new Promise((e,t)=>{const o=setTimeout(()=>t("Unable to determine if Feedback was correctly sent."),3e4),s=n.on("afterSendEvent",(n,i)=>{if(n.event_id===r)return clearTimeout(o),s(),i?.statusCode&&i.statusCode>=200&&i.statusCode<300?e(r):t(403===i?.statusCode?"Unable to send feedback. This could be because this domain is not in your list of allowed domains.":"Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.")})})},Ms="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Rs(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Os(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}function As({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=xs.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||Is,o.appendChild(function(){const e=e=>Es.document.createElementNS("http://www.w3.org/2000/svg",e),t=Os(e("svg"),{width:"20",height:"20",viewBox:"0 0 20 20",fill:"var(--actor-color, var(--foreground))"}),n=Os(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Os(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),s=Os(e("clipPath"),{id:"clip0_57_80"}),i=Os(e("rect"),{width:"20",height:"20",fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}()),e){const t=xs.createElement("span");t.appendChild(xs.createTextNode(e)),o.appendChild(t)}const s=function(e){const t=xs.createElement("style");return t.textContent='\n.widget__actor {\n position: fixed;\n z-index: var(--z-index);\n margin: var(--page-margin);\n inset: var(--actor-inset);\n\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 16px;\n\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n line-height: 1.14em;\n text-decoration: none;\n\n background: var(--actor-background, var(--background));\n border-radius: var(--actor-border-radius, 1.7em/50%);\n border: var(--actor-border, var(--border));\n box-shadow: var(--actor-box-shadow, var(--box-shadow));\n color: var(--actor-color, var(--foreground));\n fill: var(--actor-color, var(--foreground));\n cursor: pointer;\n opacity: 1;\n transition: transform 0.2s ease-in-out;\n transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden="true"] {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n background: var(--actor-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n width: 1.14em;\n height: 1.14em;\n}\n\n@media (max-width: 600px) {\n .widget__actor span {\n display: none;\n }\n}\n',e&&t.setAttribute("nonce",e),t}(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const Ls="rgba(88, 74, 192, 1)",Ds={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Ls,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},Ns={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Ls,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function Ps(e){return`\n --foreground: ${e.foreground};\n --background: ${e.background};\n --accent-foreground: ${e.accentForeground};\n --accent-background: ${e.accentBackground};\n --success-color: ${e.successColor};\n --error-color: ${e.errorColor};\n --border: ${e.border};\n --box-shadow: ${e.boxShadow};\n --outline: ${e.outline};\n --interactive-filter: ${e.interactiveFilter};\n `}const Fs=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:r="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:i=!1,isNameRequired:a=!1,showEmail:c=!0,showName:u=!0,enableScreenshot:l=!0,useSentryUser:d={email:"email",name:"username"},tags:h,styleNonce:f,scriptNonce:m,colorScheme:g="system",themeLight:_={},themeDark:y={},addScreenshotButtonLabel:v="Add a screenshot",cancelButtonLabel:b="Cancel",confirmButtonLabel:S="Confirm",emailLabel:w="Email",emailPlaceholder:k="your.email@example.org",formTitle:E="Report a Bug",isRequiredLabel:x="(required)",messageLabel:C="Description",messagePlaceholder:I="What's the bug? What did you expect?",nameLabel:T="Name",namePlaceholder:M="Your Name",removeScreenshotButtonLabel:R="Remove screenshot",submitButtonLabel:O="Send Bug Report",successMessageText:A="Thank you for your report!",triggerLabel:L=Is,triggerAriaLabel:D="",onFormOpen:N,onFormClose:P,onSubmitSuccess:F,onSubmitError:$,onFormSubmitted:B}={})=>{const U={id:r,autoInject:o,showBranding:s,isEmailRequired:i,isNameRequired:a,showEmail:c,showName:u,enableScreenshot:l,useSentryUser:d,tags:h,styleNonce:f,scriptNonce:m,colorScheme:g,themeDark:y,themeLight:_,triggerLabel:L,triggerAriaLabel:D,cancelButtonLabel:b,submitButtonLabel:O,confirmButtonLabel:S,formTitle:E,emailLabel:w,emailPlaceholder:k,messageLabel:C,messagePlaceholder:I,nameLabel:T,namePlaceholder:M,successMessageText:A,isRequiredLabel:x,addScreenshotButtonLabel:v,removeScreenshotButtonLabel:R,onFormClose:P,onFormOpen:N,onSubmitError:$,onSubmitSuccess:F,onFormSubmitted:B};let j=null,H=[];const z=e=>{if(!j){const t=xs.createElement("div");t.id=String(e.id),xs.body.appendChild(t),j=t.attachShadow({mode:"open"}),j.appendChild(function({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=xs.createElement("style");return o.textContent=`\n:host {\n --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n --font-size: 14px;\n --z-index: 100000;\n\n --page-margin: 16px;\n --inset: auto 0 0 auto;\n --actor-inset: var(--inset);\n\n font-family: var(--font-family);\n font-size: var(--font-size);\n\n ${"system"!==e?"color-scheme: only light;":""}\n\n ${Ps("dark"===e?{...Ns,...t}:{...Ds,...n})}\n}\n\n${"system"===e?`\n@media (prefers-color-scheme: dark) {\n :host {\n ${Ps({...Ns,...t})}\n }\n}`:""}\n}\n`,r&&o.setAttribute("nonce",r),o}(e))}return j},q=async r=>{const o=r.enableScreenshot&&!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Cs.userAgent)||/Macintosh/i.test(Cs.userAgent)&&Cs.maxTouchPoints&&Cs.maxTouchPoints>1||!isSecureContext);let s,i;try{s=(t?t():await e("feedbackModalIntegration",m))(),pr(s)}catch{throw Ms&&p.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const t=o?n?n():await e("feedbackScreenshotIntegration",m):void 0;t&&(i=t(),pr(i))}catch{Ms&&p.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const a=s.createDialog({options:{...r,onFormClose:()=>{a?.close(),r.onFormClose?.()},onFormSubmitted:()=>{a?.close(),r.onFormSubmitted?.()}},screenshotIntegration:i,sendFeedback:Ts,shadow:z(r)});return a},W=(e,t={})=>{const n=Rs(U,t),r="string"==typeof e?xs.querySelector(e):"function"==typeof e.addEventListener?e:null;if(!r)throw Ms&&p.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let o=null;const s=async()=>{o||(o=await q({...n,onFormSubmitted:()=>{o?.removeFromDom(),n.onFormSubmitted?.()}})),o.appendToDom(),o.open()};r.addEventListener("click",s);const i=()=>{H=H.filter(e=>e!==i),o?.removeFromDom(),o=null,r.removeEventListener("click",s)};return H.push(i),i},V=(e={})=>{const t=Rs(U,e),n=z(t),r=As({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:f});return W(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:"Feedback",setupOnce(){ks()&&U.autoInject&&("loading"===xs.readyState?xs.addEventListener("DOMContentLoaded",()=>V().appendToDom()):V().appendToDom())},attachTo:W,createWidget(e={}){const t=V(Rs(U,e));return t.appendToDom(),t},createForm:async(e={})=>q(Rs(U,e)),remove(){j&&(j.parentElement?.remove(),j=null),H.forEach(e=>e()),H=[]}}};var $s,Bs,Us,js,Hs,zs,qs,Ws={},Vs=[],Gs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ks=Array.isArray;function Js(e,t){for(var n in t)e[n]=t[n];return e}function Ys(e){var t=e.parentNode;t&&t.removeChild(e)}function Xs(e,t,n){var r,o,s,i={};for(s in t)"key"==s?r=t[s]:"ref"==s?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?$s.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===i[s]&&(i[s]=e.defaultProps[s]);return Zs(e,i,r,o,null)}function Zs(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++Us:o,__i:-1,__u:0};return null==o&&null!=Bs.vnode&&Bs.vnode(s),s}function Qs(e){return e.children}function ei(e,t){this.props=e,this.context=t}function ti(e,t){if(null==t)return e.__?ti(e.__,e.__i+1):null;for(var n;tn?(fi(r,t,o),o.length=r.length=0,t=void 0,js.sort(qs)):t&&Bs.__c&&Bs.__c(t,Vs));t&&fi(r,t,o),si.__r=0}function ii(e,t,n,r,o,s,i,a,c,u,l){var d,p,h,f,m,g=r&&r.__k||Vs,_=t.length;for(n.__d=c,function(e,t,n){var r,o,s,i,a,c=t.length,u=n.length,l=u,d=0;for(e.__k=[],r=0;r0?Zs(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,a=ci(o,n,i=r+d,l),o.__i=a,s=null,-1!==a&&(l--,(s=n[a])&&(s.__u|=131072)),null==s||null===s.__v?(-1==a&&d--,"function"!=typeof o.type&&(o.__u|=65536)):a!==i&&(a===i+1?d++:a>i?l>c-i?d+=a-i:d--:d=a(null==c||131072&c.__u?0:1))for(;i>=0||a=0){if((c=t[i])&&!(131072&c.__u)&&o==c.key&&s===c.type)return i;i--}if(a=n.__.length&&n.__.push({__V:Ei}),n.__[e]}function Li(e){return wi=1,Di(qi,e)}function Di(e,t,n){var r=Ai(yi++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):qi(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=vi,!vi.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(e){return!!e.__c});if(o.every(function(e){return!e.__N}))return!s||s.call(this,e,t,n);var i=!1;return o.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),!(!i&&r.__c.props===e)&&(!s||s.call(this,e,t,n))};vi.u=!0;var s=vi.shouldComponentUpdate,i=vi.componentWillUpdate;vi.componentWillUpdate=function(e,t,n){if(this.__e){var r=s;s=void 0,o(e,t,n),s=r}i&&i.call(this,e,t,n)},vi.shouldComponentUpdate=o}return r.__N||r.__}function Ni(e,t){var n=Ai(yi++,4);!xi.__s&&zi(n.__H,t)&&(n.__=e,n.i=t,vi.__h.push(n))}function Pi(e,t){var n=Ai(yi++,7);return zi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Fi(e,t){return wi=8,Pi(function(){return e},t)}function $i(){for(var e;e=ki.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ji),e.__H.__h.forEach(Hi),e.__H.__h=[]}catch(t){e.__H.__h=[],xi.__e(t,e.__v)}}xi.__b=function(e){vi=null,Ci&&Ci(e)},xi.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Oi&&Oi(e,t)},xi.__r=function(e){Ii&&Ii(e),yi=0;var t=(vi=e.__c).__H;t&&(bi===vi?(t.__h=[],vi.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=Ei,e.__N=e.i=void 0})):(t.__h.forEach(ji),t.__h.forEach(Hi),t.__h=[],yi=0)),bi=vi},xi.diffed=function(e){Ti&&Ti(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ki.push(t)&&Si===xi.requestAnimationFrame||((Si=xi.requestAnimationFrame)||Ui)($i)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==Ei&&(e.__=e.__V),e.i=void 0,e.__V=Ei})),bi=vi=null},xi.__c=function(e,t){t.some(function(e){try{e.__h.forEach(ji),e.__h=e.__h.filter(function(e){return!e.__||Hi(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],xi.__e(n,e.__v)}}),Mi&&Mi(e,t)},xi.unmount=function(e){Ri&&Ri(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{ji(e)}catch(e){t=e}}),n.__H=void 0,t&&xi.__e(t,n.__v))};var Bi="function"==typeof requestAnimationFrame;function Ui(e){var t,n=function(){clearTimeout(r),Bi&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Bi&&(t=requestAnimationFrame(n))}function ji(e){var t=vi,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),vi=t}function Hi(e){var t=vi;e.__c=e.__(),vi=t}function zi(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function qi(e,t){return"function"==typeof t?t(e):t}const Wi=Object.defineProperty({__proto__:null,useCallback:Fi,useContext:function(e){var t=vi.context[e.__c],n=Ai(yi++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(vi)),t.props.value):e.__},useDebugValue:function(e,t){xi.useDebugValue&&xi.useDebugValue(t?t(e):e)},useEffect:function(e,t){var n=Ai(yi++,3);!xi.__s&&zi(n.__H,t)&&(n.__=e,n.i=t,vi.__H.__h.push(n))},useErrorBoundary:function(e){var t=Ai(yi++,10),n=Li();return t.__=e,vi.componentDidCatch||(vi.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:function(){var e=Ai(yi++,11);if(!e.__){for(var t=vi.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__},useImperativeHandle:function(e,t,n){wi=6,Ni(function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},null==n?n:n.concat(e))},useLayoutEffect:Ni,useMemo:Pi,useReducer:Di,useRef:function(e){return wi=5,Pi(function(){return{current:e}},[])},useState:Li},Symbol.toStringTag,{value:"Module"});function Vi(){const e=e=>xs.createElementNS("http://www.w3.org/2000/svg",e),t=Os(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Os(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function Gi({options:e}){const t=Pi(()=>({__html:Vi().outerHTML}),[]);return Xs("h2",{class:"dialog__header"},Xs("span",{class:"dialog__title"},e.formTitle),e.showBranding?Xs("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function Ki(e,t){const n=e.get(t);return"string"==typeof n?n.trim():""}function Ji({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:l,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:h,cancelButtonLabel:f,emailLabel:m,emailPlaceholder:g,isEmailRequired:_,isNameRequired:y,messageLabel:v,messagePlaceholder:b,nameLabel:S,namePlaceholder:w,submitButtonLabel:k,isRequiredLabel:E}=e,[x,C]=Li(!1),[I,T]=Li(null),[M,R]=Li(!1),O=u?.input,[A,L]=Li(null),D=Fi(e=>{L(e),R(!1)},[]),N=Fi(e=>{const t=function(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}(e,{emailLabel:m,isEmailRequired:_,isNameRequired:y,messageLabel:v,nameLabel:S});return t.length>0?T(`Please enter in the following required fields: ${t.join(", ")}`):T(null),0===t.length},[m,_,y,v,S]),P=Fi(async e=>{C(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;const t=new FormData(e.target),n=await(u&&M?u.value():void 0),r={name:Ki(t,"name"),email:Ki(t,"email"),message:Ki(t,"message"),attachments:n?[n]:void 0};if(!N(r))return;try{const e=await o({name:r.name,email:r.email,message:r.message,source:"widget",tags:l},{attachments:r.attachments});s(r,e)}catch(e){Ms&&p.error(e),T(e),i(e)}}finally{C(!1)}},[u&&M,s,i]);return Xs("form",{class:"form",onSubmit:P},O&&M?Xs(O,{onError:D}):null,Xs("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:x},Xs("div",{class:"form__top"},I?Xs("div",{class:"form__error-container"},I):null,c?Xs("label",{for:"name",class:"form__label"},Xs(Yi,{label:S,isRequiredLabel:E,isRequired:y}),Xs("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:w,required:y,type:"text"})):Xs("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?Xs("label",{for:"email",class:"form__label"},Xs(Yi,{label:m,isRequiredLabel:E,isRequired:_}),Xs("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:g,required:_,type:"email"})):Xs("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Xs("label",{for:"message",class:"form__label"},Xs(Yi,{label:v,isRequiredLabel:E,isRequired:!0}),Xs("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:b,required:!0,rows:5})),O?Xs("label",{for:"screenshot",class:"form__label"},Xs("button",{class:"btn btn--default",disabled:x,type:"button",onClick:()=>{L(null),R(e=>!e)}},M?h:d),A?Xs("div",{class:"form__error-container"},A.message):null):null),Xs("div",{class:"btn-group"},Xs("button",{class:"btn btn--primary",disabled:x,type:"submit"},k),Xs("button",{class:"btn btn--default",disabled:x,type:"button",onClick:r},f))))}function Yi({label:e,isRequired:t,isRequiredLabel:n}){return Xs("span",{class:"form__label__text"},e,t&&Xs("span",{class:"form__label__text--required"},n))}function Xi(){const e=e=>Es.document.createElementNS("http://www.w3.org/2000/svg",e),t=Os(e("svg"),{width:"16",height:"17",viewBox:"0 0 16 17",fill:"inherit"}),n=Os(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Os(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Os(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=Os(e("clipPath"),{id:"clip0_57_156"}),a=Os(e("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function Zi({open:e,onFormSubmitted:t,...n}){const r=n.options,o=Pi(()=>({__html:Xi().outerHTML}),[]),[s,i]=Li(null),a=Fi(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=Fi((e,r)=>{n.onSubmitSuccess(e,r),i(setTimeout(()=>{t(),i(null)},5e3))},[t]);return Xs(Qs,null,s?Xs("div",{class:"success__position",onClick:a},Xs("div",{class:"success__content"},r.successMessageText,Xs("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):Xs("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Xs("div",{class:"dialog__position"},Xs("div",{class:"dialog__content",onClick:e=>{e.stopPropagation()}},Xs(Gi,{options:r}),Xs(Ji,{...n,onSubmitSuccess:c})))))}const Qi=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=function(){const e=Ne().getUser(),t=Pe().getUser(),n=Fe().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}(),a=xs.createElement("div"),c=function(e){const t=xs.createElement("style");return t.textContent="\n:host {\n --dialog-inset: var(--inset);\n}\n\n\n.dialog {\n position: fixed;\n z-index: var(--z-index);\n margin: 0;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n height: 100vh;\n width: 100vw;\n\n color: var(--dialog-color, var(--foreground));\n fill: var(--dialog-color, var(--foreground));\n line-height: 1.75em;\n\n background-color: rgba(0, 0, 0, 0.05);\n border: none;\n inset: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n position: fixed;\n z-index: var(--z-index);\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n display: flex;\n max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n .dialog__position {\n inset: var(--page-margin);\n padding: 0;\n }\n}\n\n.dialog__position:has(.editor) {\n inset: var(--page-margin);\n padding: 0;\n}\n\n.dialog:not([open]) {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: var(--dialog-padding, 24px);\n max-width: 100%;\n width: 100%;\n max-height: 100%;\n overflow: auto;\n\n background: var(--dialog-background, var(--background));\n border-radius: var(--dialog-border-radius, 20px);\n border: var(--dialog-border, var(--border));\n box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n transform: translate(0, 0) scale(1);\n transition: transform 0.2s ease-in-out;\n}\n\n\n\n.dialog__header {\n display: flex;\n gap: 4px;\n justify-content: space-between;\n font-weight: var(--dialog-header-weight, 600);\n margin: 0;\n}\n.dialog__title {\n align-self: center;\n width: var(--form-width, 272px);\n}\n\n@media (max-width: 600px) {\n .dialog__title {\n width: auto;\n }\n}\n\n.dialog__position:has(.editor) .dialog__title {\n width: auto;\n}\n\n\n.brand-link {\n display: inline-flex;\n}\n.brand-link:focus-visible {\n outline: var(--outline);\n}\n\n\n.form {\n display: flex;\n overflow: auto;\n flex-direction: row;\n gap: 16px;\n flex: 1 0;\n}\n\n.form fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n.form__right {\n flex: 0 0 auto;\n display: flex;\n overflow: auto;\n flex-direction: column;\n justify-content: space-between;\n gap: 20px;\n width: var(--form-width, 100%);\n}\n\n.dialog__position:has(.editor) .form__right {\n width: var(--form-width, 272px);\n}\n\n.form__top {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form__error-container {\n color: var(--error-color);\n fill: var(--error-color);\n}\n\n.form__label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0px;\n}\n\n.form__label__text {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.form__label__text--required {\n font-size: 0.85em;\n}\n\n.form__input {\n font-family: inherit;\n line-height: inherit;\n background: transparent;\n box-sizing: border-box;\n border: var(--input-border, var(--border));\n border-radius: var(--input-border-radius, 6px);\n color: var(--input-color, inherit);\n fill: var(--input-color, inherit);\n font-size: var(--input-font-size, inherit);\n font-weight: var(--input-font-weight, 500);\n padding: 6px 12px;\n}\n\n.form__input::placeholder {\n opacity: 0.65;\n color: var(--input-placeholder-color, inherit);\n filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n font-family: inherit;\n resize: vertical;\n}\n\n.error {\n color: var(--error-color);\n fill: var(--error-color);\n}\n\n\n.btn-group {\n display: grid;\n gap: 8px;\n}\n\n.btn {\n line-height: inherit;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--button-font-size, inherit);\n font-weight: var(--button-font-weight, 600);\n padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.btn--primary {\n color: var(--button-primary-color, var(--accent-foreground));\n fill: var(--button-primary-color, var(--accent-foreground));\n background: var(--button-primary-background, var(--accent-background));\n border: var(--button-primary-border, var(--border));\n border-radius: var(--button-primary-border-radius, 6px);\n font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n color: var(--button-primary-hover-color, var(--accent-foreground));\n fill: var(--button-primary-hover-color, var(--accent-foreground));\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-background, var(--background));\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n outline: var(--button-focus-outline, var(--outline));\n}\n\n\n.success__position {\n position: fixed;\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n z-index: var(--z-index);\n}\n.success__content {\n background: var(--success-background, var(--background));\n border: var(--success-border, var(--border));\n border-radius: var(--success-border-radius, 1.7em/50%);\n box-shadow: var(--success-box-shadow, var(--box-shadow));\n font-weight: var(--success-font-weight, 600);\n color: var(--success-color);\n fill: var(--success-color);\n padding: 12px 24px;\n line-height: 1.75em;\n\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n gap: 6px;\n cursor: default;\n}\n\n.success__icon {\n display: flex;\n}\n\n",e&&t.setAttribute("nonce",e),t}(e.styleNonce);let u="";const l={get el(){return a},appendToDom(){o.contains(c)||o.contains(a)||(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),xs.body.style.overflow=u},open(){p(!0),e.onFormOpen?.(),Be()?.emit("openFeedbackWidget"),u=xs.body.style.overflow,xs.body.style.overflow="hidden"},close(){p(!1),xs.body.style.overflow=u}},d=t?.createInput({h:Xs,hooks:Wi,dialog:l,options:e}),p=t=>{!function(e,t){var n,r,o;Bs.__&&Bs.__(e,t),n=t.__k,r=[],o=[],hi(t,e=t.__k=Xs(Qs,null,[e]),n||Ws,Ws,void 0!==t.ownerSVGElement,n?null:t.firstChild?$s.call(t.childNodes):null,r,n?n.__e:t.firstChild,!1,o),e.__d=void 0,fi(r,e,o)}(Xs(Zi,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:s&&i?.[s.name]||"",defaultEmail:s&&i?.[s.email]||"",onFormClose:()=>{p(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(t,n)=>{p(!1),e.onSubmitSuccess?.(t,n)},onSubmitError:t=>{e.onSubmitError?.(t)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:t}),a)};return l}});function ea(e){const t=xs.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`\n.editor {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n\n.editor__image-container {\n justify-items: center;\n padding: 15px;\n position: relative;\n height: 100%;\n border-radius: var(--menu-border-radius, 6px);\n\n background-color: ${n};\n background-image: repeating-linear-gradient(\n -145deg,\n transparent,\n transparent 8px,\n ${n} 8px,\n ${n} 11px\n ),\n repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 15px,\n ${r} 15px,\n ${r} 16px\n );\n}\n\n.editor__canvas-container {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.editor__canvas-container > * {\n object-fit: contain;\n position: absolute;\n}\n\n.editor__tool-container {\n padding-top: 8px;\n display: flex;\n justify-content: center;\n}\n\n.editor__tool-bar {\n display: flex;\n gap: 8px;\n}\n\n.editor__tool {\n display: flex;\n padding: 8px 12px;\n justify-content: center;\n align-items: center;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n background: var(--button-background, var(--background));\n color: var(--button-color, var(--foreground));\n}\n\n.editor__tool--active {\n background: var(--button-primary-background, var(--accent-background));\n color: var(--button-primary-color, var(--accent-foreground));\n}\n\n.editor__rect {\n position: absolute;\n z-index: 2;\n}\n\n.editor__rect button {\n opacity: 0;\n position: absolute;\n top: -12px;\n right: -12px;\n cursor: pointer;\n padding: 0;\n z-index: 3;\n border: none;\n background: none;\n}\n\n.editor__rect:hover button {\n opacity: 1;\n}\n`,e&&t.setAttribute("nonce",e),t}function ta({hooks:e}){return function({onBeforeScreenshot:t,onScreenshot:n,onAfterScreenshot:r,onError:o}){const s=function(){const[t,n]=e.useState(Es.devicePixelRatio??1);return e.useEffect(()=>{const e=()=>{n(Es.devicePixelRatio)},t=matchMedia(`(resolution: ${Es.devicePixelRatio}dppx)`);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}},[]),t}();e.useEffect(()=>{(async()=>{t();const e=await Cs.mediaDevices.getDisplayMedia({video:{width:Es.innerWidth*s,height:Es.innerHeight*s},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),o=xs.createElement("video");await new Promise((t,r)=>{o.srcObject=e,o.onloadedmetadata=()=>{n(o,s),e.getTracks().forEach(e=>e.stop()),t()},o.play().catch(r)}),r()})().catch(o)},[])}}function na(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function ra(e,t){na(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function oa(e,t,n){na(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle="rgba(0, 0, 0, 0.25)",r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{!function(e,t,n){switch(e.type){case"highlight":t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break;case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h)}}(e,r,t)})})}function sa({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=ta({hooks:t}),i=function({h:e}){return function({action:t,setAction:n}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:"editor__tool "+("highlight"===t?"editor__tool--active":""),onClick:()=>{n("highlight"===t?"":"highlight")}},"Highlight"),e("button",{type:"button",class:"editor__tool "+("hide"===t?"editor__tool--active":""),onClick:()=>{n("hide"===t?"":"hide")}},"Hide")))}}({h:e}),a=function({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}({h:e}),c={__html:ea(o.styleNonce).innerText},u=r.el.style,l=({screenshot:r})=>{const[s,u]=t.useState("highlight"),[l,d]=t.useState([]),p=t.useRef(null),h=t.useRef(null),f=t.useRef(null),m=t.useRef(null),[g,_]=t.useState(1),y=t.useMemo(()=>{const e=xs.getElementById(o.id);if(!e)return"white";const t=getComputedStyle(e);return t.getPropertyValue("--button-primary-background")||t.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const e=()=>{const t=p.current;t&&(na(r.canvas,{alpha:!1},e=>{const n=Math.min(t.clientWidth/e.width,t.clientHeight/e.height);_(n)}),0!==t.clientHeight&&0!==t.clientWidth||setTimeout(e,0))};return e(),Es.addEventListener("resize",e),()=>{Es.removeEventListener("resize",e)}},[r]);const v=t.useCallback((e,t)=>{na(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{v(h.current,r.dpi),ra(h.current,r.canvas)},[r]),t.useEffect(()=>{v(f.current,r.dpi),na(f.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),oa(f.current,y,l)},[l,y]),t.useEffect(()=>{v(n,r.dpi),ra(n,r.canvas),na(xs.createElement("canvas"),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,oa(e,y,l),ra(n,e)})},[l,r,y]);const b=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{const n=[...t];return n.splice(e,1),n})},[]),S={width:r.canvas.width*g+"px",height:r.canvas.height*g+"px"},w=e=>{e.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:p},e("canvas",{ref:h,id:"background",style:S}),e("canvas",{ref:f,id:"foreground",style:S}),e("div",{ref:m,onMouseDown:e=>{if(!s||!m.current)return;const t=m.current.getBoundingClientRect(),n={type:s,x:e.offsetX/g,y:e.offsetY/g},r=(e,n)=>{const r=(n.clientX-t.x)/g,o=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,o),w:Math.abs(r-e.x),h:Math.abs(o-e.y)}},o=e=>{na(f.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),oa(f.current,y,[...l,r(n,e)])},i=e=>{const t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),xs.removeEventListener("mousemove",o),xs.removeEventListener("mouseup",i)};xs.addEventListener("mousemove",o),xs.addEventListener("mouseup",i)},style:S},l.map((t,n)=>e("div",{key:n,class:"editor__rect",style:{top:t.y*g+"px",left:t.x*g+"px",width:t.w*g+"px",height:t.h*g+"px"}},e("button",{"aria-label":"Remove",onClick:b(n),onMouseDown:w,onMouseUp:w,type:"button"},e(a,null))))))),e(i,{action:s,setAction:u}))};return function({onError:r}){const[o,i]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((e,t)=>{na(xs.createElement("canvas"),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),i({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(e=>{u.display="block",r(e)},[])}),o?e(l,{screenshot:o}):e("div",null)}}const ia=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=xs.createElement("canvas");return{input:sa({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const e=await new Promise(e=>{o.toBlob(e,"image/png")});if(e){return{data:new Uint8Array(await e.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}}),aa=t;let ca=0;function ua(){return ca>0}function la(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(se(e))return e}catch{return e}const n=function(...n){try{const r=n.map(e=>la(e,t));return e.apply(this,r)}catch(e){throw ca++,setTimeout(()=>{ca--}),$e(r=>{r.addEventProcessor(e=>(t.mechanism&&(pe(e,void 0),he(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),Jn(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}oe(n,e),re(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function da(){const e=J(),{referrer:t}=aa.document||{},{userAgent:n}=aa.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}const pa={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},ha=aa;async function fa(e,t){const r=pa[e],o=ha.Sentry=ha.Sentry||{};if(!r)throw new Error(`Cannot lazy load integration: ${e}`);const s=o[e];if("function"==typeof s&&!("_isShim"in s))return s;const i=function(e){const t=Be(),r=t?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${n}/${e}.min.js`,r).toString()}(r),a=aa.document.createElement("script");a.src=i,a.crossOrigin="anonymous",a.referrerPolicy="strict-origin",t&&a.setAttribute("nonce",t);const c=new Promise((e,t)=>{a.addEventListener("load",()=>e()),a.addEventListener("error",t)}),u=aa.document.currentScript,l=aa.document.body||aa.document.head||u?.parentElement;if(!l)throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);l.appendChild(a);try{await c}catch{throw new Error(`Error when loading integration: ${e}`)}const d=o[e];if("function"!=typeof d)throw new Error(`Could not load integration: ${e}`);return d}const ma=Fs({lazyLoadIntegration:fa}),ga=Fs({getModalIntegration:()=>Qi,getScreenshotIntegration:()=>ia});function _a(e,t,n,r){Tr({level:e,message:t,attributes:n,severityNumber:r})}var ya=Object.freeze({__proto__:null,debug:function(e,t){_a("debug",e,t)},error:function(e,t){_a("error",e,t)},fatal:function(e,t){_a("fatal",e,t)},fmt:Yr,info:function(e,t){_a("info",e,t)},trace:function(e,t){_a("trace",e,t)},warn:function(e,t){_a("warn",e,t)}});function va(e,t){const n=wa(e,t),r={type:xa(t),value:Ca(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ba(e,t,n,r){const o=Be(),s=o?.getOptions().normalizeDepth,i=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(t),a={__serialized__:Yt(t,s)};if(i)return{exception:{values:[va(e,i)]},extra:a};const c={exception:{values:[{type:j(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Oa(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=wa(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Sa(e,t){return{exception:{values:[va(e,t)]}}}function wa(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&ka.test(e.message))return 1;return 0}(t),o=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,o)}catch{}return[]}const ka=/Minified React error #\d+;/i;function Ea(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function xa(e){const t=e?.name;if(!t&&Ea(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function Ca(e){const t=e?.message;return Ea(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Ia(e,t,n,r){const o=Ma(e,t,n?.syntheticException||void 0,r);return he(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Nn(o)}function Ta(e,t,n="info",r,o){const s=Ra(e,t,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Nn(s)}function Ma(e,t,n,r,o){let s;if(N(t)&&t.error){return Sa(e,t.error)}if(P(t)||D(t,"DOMException")){const o=t;if("stack"in t)s=Sa(e,t);else{const t=o.name||(P(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Ra(e,i,n,r),pe(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}if(L(t))return Sa(e,t);if(U(t)||j(t)){return s=ba(e,t,n,o),he(s,{synthetic:!0}),s}return s=Ra(e,t,n,r),pe(s,`${t}`),he(s,{synthetic:!0}),s}function Ra(e,t,n,r){const o={};if(r&&n){const r=wa(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),he(o,{synthetic:!0})}if($(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Oa(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(ie(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return X(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:X(r,t)}return""}(e),r=t?"promise rejection":"exception";if(N(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(j(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class Aa extends wr{constructor(e){const t=(r=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:aa.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...r});var r;!function(e,t,r=[t],o="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:r.map(e=>({name:`${o}:@sentry/${e}`,version:n})),version:n}),e._metadata=s}(t,"browser",["browser"],aa.SENTRY_SDK_SOURCE||"npm"),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?"auto":"never",...t._metadata.sdk.settings}),super(t);const{sendDefaultPii:o,sendClientReports:s,enableLogs:i}=this._options;aa.document&&(s||i)&&aa.document.addEventListener("visibilitychange",()=>{"hidden"===aa.document.visibilityState&&(s&&this._flushOutcomes(),i&&Mr(this))}),i&&(this.on("flush",()=>{Mr(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Mr(this)},5e3)})),o&&this.on("beforeSendSession",Xr)}eventFromException(e,t){return Ia(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return Ta(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)}}const La="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Da=t,Na=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Pa=(e=!0)=>{const t=Da.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart{const e=Pa();return e?.activationStart??0},$a=(e,t=-1)=>{const n=Pa();let r="navigate";n&&(Da.document?.prerendering||Fa()>0?r="prerender":Da.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-")));return{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Ba=new WeakMap;function Ua(e,t){return Ba.get(e)||Ba.set(e,new t),Ba.get(e)}class ja{constructor(){ja.prototype.__init.call(this),ja.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const Ha=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},za=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let qa=-1;const Wa=e=>{"hidden"===Da.document.visibilityState&&qa>-1&&(qa="visibilitychange"===e.type?e.timeStamp:0,Va())},Va=()=>{removeEventListener("visibilitychange",Wa,!0),removeEventListener("prerenderingchange",Wa,!0)},Ga=()=>{if(Da.document&&qa<0){const e=Fa(),t=Da.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;qa=t??("hidden"!==Da.document?.visibilityState||Da.document?.prerendering?1/0:0),addEventListener("visibilitychange",Wa,!0),addEventListener("prerenderingchange",Wa,!0)}return{get firstHiddenTime(){return qa}}},Ka=e=>{Da.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Ja=[1800,3e3],Ya=[.1,.25],Xa=(e,t={})=>{((e,t={})=>{Ka(()=>{const n=Ga(),r=$a("FCP");let o;const s=Ha("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime{const n=$a("CLS",0);let r;const o=Ua(t,ja),s=e=>{for(const t of e)o._processEntry(t);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},i=Ha("layout-shift",s);i&&(r=Na(e,n,Ya,t.reportAllChanges),Da.document?.addEventListener("visibilitychange",()=>{"hidden"===Da.document?.visibilityState&&(s(i.takeRecords()),r(!0))}),Da?.setTimeout?.(r))}))};let Za=0,Qa=1/0,ec=0;const tc=e=>{e.forEach(e=>{e.interactionId&&(Qa=Math.min(Qa,e.interactionId),ec=Math.max(ec,e.interactionId),Za=ec?(ec-Qa)/7+1:0)})};let nc;const rc=()=>nc?Za:performance.interactionCount||0,oc=()=>{"interactionCount"in performance||nc||(nc=Ha("event",tc,{type:"event",buffered:!0,durationThreshold:0}))};let sc=0;class ic{constructor(){ic.prototype.__init.call(this),ic.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){sc=rc(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((rc()-sc)/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<10||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>10){const e=this._longestInteractionList.splice(10);for(const t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}}const ac=e=>{const t=t=>{"pagehide"!==t.type&&"hidden"!==Da.document?.visibilityState||e(t)};Da.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},cc=e=>{const t=Da.requestIdleCallback||Da.setTimeout;"hidden"===Da.document?.visibilityState?e():(t(e=za(e)),ac(e))},uc=[200,500];class lc{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const dc=[2500,4e3],pc=[800,1800],hc=e=>{Da.document?.prerendering?Ka(()=>hc(e)):"complete"!==Da.document?.readyState?addEventListener("load",()=>hc(e),!0):setTimeout(e)},fc={},mc={};let gc,_c,yc,vc;function bc(e,t=!1){return Mc("cls",e,xc,gc,t)}function Sc(e,t=!1){return Mc("lcp",e,Cc,_c,t)}function wc(e){return Mc("inp",e,Tc,vc)}function kc(e,t){return Rc(e,t),mc[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);Ha(e,t=>{Ec(e,{entries:t})},t)}(e),mc[e]=!0),Oc(e,t)}function Ec(e,t){const n=fc[e];if(n?.length)for(const r of n)try{r(t)}catch(t){La&&p.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${v(r)}\nError:`,t)}}function xc(){return Xa(e=>{Ec("cls",{metric:e}),gc=e},{reportAllChanges:!0})}function Cc(){return((e,t={})=>{Ka(()=>{const n=Ga(),r=$a("LCP");let o;const s=Ua(t,lc),i=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)s._processEntry(t),t.startTime{i(a.takeRecords()),a.disconnect(),o(!0)});for(const e of["keydown","click","visibilitychange"])Da.document&&addEventListener(e,()=>cc(n),{capture:!0,once:!0})}})})(e=>{Ec("lcp",{metric:e}),_c=e},{reportAllChanges:!0})}function Ic(){return((e,t={})=>{const n=$a("TTFB"),r=Na(e,n,pc,t.reportAllChanges);hc(()=>{const e=Pa();e&&(n.value=Math.max(e.responseStart-Fa(),0),n.entries=[e],r(!0))})})(e=>{Ec("ttfb",{metric:e}),yc=e})}function Tc(){return((e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Ka(()=>{oc();const n=$a("INP");let r;const o=Ua(t,ic),s=e=>{cc(()=>{for(const t of e)o._processEntry(t);const t=o._estimateP98LongestInteraction();t&&t._latency!==n.value&&(n.value=t._latency,n.entries=t.entries,r())})},i=Ha("event",s,{durationThreshold:t.durationThreshold??40});r=Na(e,n,uc,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),ac(()=>{s(i.takeRecords()),r(!0)}))})})(e=>{Ec("inp",{metric:e}),vc=e})}function Mc(e,t,n,r,o=!1){let s;return Rc(e,t),mc[e]||(s=n(),mc[e]=!0),r&&t({metric:r}),Oc(e,t,o?s:void 0)}function Rc(e,t){fc[e]=fc[e]||[],fc[e].push(t)}function Oc(e,t,n){return()=>{n&&n();const r=fc[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}function Ac(e){return"number"==typeof e&&isFinite(e)}function Lc(e,t,n,{...r}){const o=Mt(e).start_timestamp;return o&&o>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),En(e,()=>{const e=kn({startTime:t,...r});return e&&e.end(n),e})}function Dc(e){const t=Be();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a,sendDefaultPii:c}=t.getOptions(),u=t.getIntegrationByName("Replay"),l=u?.getReplayId(),d=Ne(),p=d.getUser(),h=void 0!==p?p.email||p.id||p.ip_address:void 0;let f;try{f=d.getScopeData().contexts.profile.profile_id}catch{}return kn({name:n,attributes:{release:i,environment:a,user:h||void 0,profile_id:f||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":Da.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o},startTime:s,experimental:{standalone:!0}})}function Nc(){return Da.addEventListener&&Da.performance}function Pc(e){return e/1e3}function Fc(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function $c(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Bc(e,t){let n,r=!1;function o(e){!r&&n&&t(e,n),r=!0}ac(()=>{o("pagehide")});const s=e.on("beforeStartNavigationSpan",(e,t)=>{t?.isRedirect||(o("navigation"),Uc(s,i))}),i=e.on("afterStartPageLoadSpan",e=>{n=e.spanContext().spanId,Uc(i)})}function Uc(...e){e.forEach(e=>e&&setTimeout(e,0))}function jc(e){let t,n=0;if(!$c("layout-shift"))return;const r=bc(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Bc(e,(e,o)=>{!function(e,t,n,r){La&&p.log(`Sending CLS span (${e})`);const o=Pc((ve()||0)+(t?.startTime||0)),s=Ne().getScopeData().transactionName,i=t?G(t.sources[0]?.node):"Layout shift",a={[We]:"auto.http.browser.cls",[qe]:"ui.webvital.cls",[Xe]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{a[`cls.source.${t+1}`]=G(e.node)});const c=Dc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[Ge]:"",[Ke]:e}),c.end(o))}(n,t,o,e),r()})}function Hc(e){let t,n=0;if(!$c("largest-contentful-paint"))return;const r=Sc(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Bc(e,(e,o)=>{!function(e,t,n,r){La&&p.log(`Sending LCP span (${e})`);const o=Pc((ve()||0)+(t?.startTime||0)),s=Ne().getScopeData().transactionName,i=t?G(t.element):"Largest contentful paint",a={[We]:"auto.http.browser.lcp",[qe]:"ui.webvital.lcp",[Xe]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=G(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),null!=t.loadTime&&(a["lcp.loadTime"]=t.loadTime),null!=t.renderTime&&(a["lcp.renderTime"]=t.renderTime),null!=t.size&&(a["lcp.size"]=t.size));const c=Dc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[Ge]:"millisecond",[Ke]:e}),c.end(o))}(n,t,o,e),r()})}let zc,qc,Wc=0,Vc={};function Gc({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Nc();if(r&&ve()){r.mark&&Da.performance.mark("sentry-tracing-init");const o=t?Hc(n):Sc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Vc.lcp={value:e.value,unit:"millisecond"},zc=t)},!0),s=Mc("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(Vc.ttfb={value:e.value,unit:"millisecond"})},Ic,yc),i=e?jc(n):bc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Vc.cls={value:e.value,unit:""},qc=t)},!0);return()=>{o?.(),s(),i?.()}}return()=>{}}function Kc(e,t){const n=Nc(),r=ve();if(!n?.getEntries||!r)return;const o=Pc(r),s=n.getEntries(),{op:i,start_timestamp:a}=Mt(e);s.slice(Wc).forEach(n=>{const r=Pc(n.startTime),s=Pc(Math.max(0,n.duration));if(!("navigation"===i&&a&&o+r{Jc(e,t,r,n)}),Jc(e,t,"secureConnection",n,"TLS/SSL"),Jc(e,t,"fetch",n,"cache"),Jc(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+Pc(t.requestStart),o=n+Pc(t.responseEnd),s=n+Pc(t.responseStart);t.responseEnd&&(Lc(e,r,o,{op:"browser.request",name:t.name,attributes:{[We]:"auto.ui.browser.metrics"}}),Lc(e,s,o,{op:"browser.response",name:t.name,attributes:{[We]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,n,o);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o,s){if(["mark","measure"].includes(t.entryType)&&te(t.name,s))return;const i=Pa(!1),a=Pc(i?i.requestStart:0),c=o+Math.max(n,a),u=o+n,l=u+r,d={[We]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c);(function(e,t){try{const n=t.detail;if(!n)return;if("object"==typeof n){for(const[t,r]of Object.entries(n))if(r&&B(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(B(n))return void(e["sentry.browser.measure.detail"]=n);try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}})(d,t),c<=l&&Lc(e,c,l,{name:t.name,op:t.entryType,attributes:d})}(e,n,r,s,o,t.ignorePerformanceApiSpans);const i=Ga(),a=n.startTime{mn(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",Fa()),function(e,t){zc&&t.recordLcpOnPageloadSpan&&(zc.element&&e.setAttribute("lcp.element",G(zc.element)),zc.id&&e.setAttribute("lcp.id",zc.id),zc.url&&e.setAttribute("lcp.url",zc.url.trim().slice(0,200)),null!=zc.loadTime&&e.setAttribute("lcp.loadTime",zc.loadTime),null!=zc.renderTime&&e.setAttribute("lcp.renderTime",zc.renderTime),e.setAttribute("lcp.size",zc.size));qc?.sources&&t.recordClsOnPageloadSpan&&qc.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,G(t.node)))}(e,t)),zc=void 0,qc=void 0,Vc={}}function Jc(e,t,n,r,o=n){const s=function(e){if("secureConnection"===e)return"connectEnd";if("fetch"===e)return"domainLookupStart";return`${e}End`}(n),i=t[s],a=t[`${n}Start`];a&&i&&Lc(e,r+Pc(a),r+Pc(i),{op:`browser.${o}`,name:t.name,attributes:{[We]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}function Yc(e,t,n,r){const o=t[n];null!=o&&o<2147483647&&(e[r]=o)}const Xc=({entries:e})=>{const t=Ft(),n=t?Pt(t):void 0,r=n?Mt(n).description:Ne().getScopeData().transactionName;e.forEach(e=>{const t=e;if(!t.identifier)return;const n=t.name,o=t.renderTime,s=t.loadTime,[i,a]=s?[Pc(s),"load-time"]:o?[Pc(o),"render-time"]:[ye(),"entry-emission"],c="image-paint"===n?Pc(Math.max(0,(o??0)-(s??0))):0,u={[We]:"auto.ui.browser.elementtiming",[qe]:"ui.elementtiming",[je]:"component","sentry.span_start_time_source":a,"sentry.transaction_name":r,"element.id":t.id,"element.type":t.element?.tagName?.toLowerCase()||"unknown","element.size":t.naturalWidth&&t.naturalHeight?`${t.naturalWidth}x${t.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":s,"element.url":t.url||void 0,"element.identifier":t.identifier,"element.paint_type":n};wn({name:`element[${t.identifier}]`,attributes:u,startTime:i,onlyIfParent:!0},e=>{e.end(i+c)})})};let Zc,Qc,eu,tu;function nu(e){k("dom",e),E("dom",ru)}function ru(){if(!Da.document)return;const e=x.bind(null,"dom"),t=ou(e,!0);Da.document.addEventListener("click",t,!1),Da.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Da,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ne(r,"addEventListener",function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=ou(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch{}return t.call(this,n,r,o)}}),ne(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function ou(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;re(n,"_sentryCaptured",!0),r&&!r._sentryId&&re(r,"_sentryId",ue());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==Qc)return!1;try{if(!e.target||e.target._sentryId!==eu)return!1}catch{}return!0}(n)){e({event:n,name:o,global:t}),Qc=n.type,eu=r?r._sentryId:void 0}clearTimeout(Zc),Zc=Da.setTimeout(()=>{eu=void 0,Qc=void 0},1e3)}}function su(e){const t="history";k(t,e),E(t,iu)}function iu(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=tu,o=function(e){try{return new URL(e,Da.location.origin).toString()}catch{return e}}(String(n));if(tu=o,r===o)return e.apply(this,t);x("history",{from:r,to:o})}return e.apply(this,t)}}Da.addEventListener("popstate",()=>{const e=Da.location.href,t=tu;if(tu=e,t===e)return;x("history",{from:t,to:e})}),"history"in hs&&hs.history&&(ne(Da.history,"pushState",e),ne(Da.history,"replaceState",e))}const au={};function cu(e){const t=au[e];if(t)return t;let n=Da[e];if(fs(n))return au[e]=n.bind(Da);const r=Da.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){La&&p.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?au[e]=n.bind(Da):n}function uu(e){au[e]=void 0}function lu(...e){return cu("setTimeout")(...e)}const du="__sentry_xhr_v3__";function pu(e){k("xhr",e),E("xhr",hu)}function hu(){if(!Da.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*ye(),s=F(n[0])?n[0].toUpperCase():void 0,i=function(e){if(F(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!s||!i)return e.apply(t,n);t[du]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[du];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}x("xhr",{endTimestamp:1e3*ye(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,s=t[du];return s&&F(r)&&F(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[du];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return x("xhr",{startTimestamp:1e3*ye(),xhr:t}),e.apply(t,n)}})}function fu(e){return new URLSearchParams(e).toString()}function mu(e,t=p){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[fu(e)];if(!e)return[void 0]}catch(n){return La&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return La&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function gu(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}const _u=[],yu=new Map;function vu(){if(Nc()&&ve()){const e=wc(Su);return()=>{e()}}return()=>{}}const bu={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};const Su=({metric:e})=>{if(null==e.value)return;const t=Pc(e.value);if(t>60)return;const n=e.entries.find(t=>t.duration===e.value&&bu[t.name]);if(!n)return;const{interactionId:r}=n,o=bu[n.name],s=Pc(ve()+n.startTime),i=Ft(),a=i?Pt(i):void 0,c=(null!=r?yu.get(r):void 0)||a,u=c?Mt(c).description:Ne().getScopeData().transactionName,l=Dc({name:G(n.target),transaction:u,attributes:{[We]:"auto.http.browser.inp",[qe]:`ui.interaction.${o}`,[Xe]:n.duration},startTime:s});l&&(l.addEvent("inp",{[Ge]:"millisecond",[Ke]:e.value}),l.end(s+t))};function wu(e,t=cu("fetch")){let n=0,r=0;return $r(e,function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return uu("fetch"),Pn("No fetch implementation available");try{return t(e.url,i).then(e=>(n-=s,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return uu("fetch"),n-=s,r--,Pn(e)}})}function ku(e,t,n,r){const o={filename:e,function:""===t?h:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Eu=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,xu=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Cu=/\((\S*)(?::(\d+))(?::(\d+))\)/,Iu=/at (.+?) ?\(data:(.+?),/,Tu=[30,e=>{const t=e.match(Iu);if(t)return{filename:``,function:t[1]};const n=Eu.exec(e);if(n){const[,e,t,r]=n;return ku(e,h,+t,+r)}const r=xu.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){const e=Cu.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Uu(r[1]||h,r[2]);return ku(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Mu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ru=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ou=[50,e=>{const t=Mu.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ru.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]||h;return[n,e]=Uu(n,e),ku(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Au=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Lu=[40,e=>{const t=Au.exec(e);return t?ku(t[2],t[1]||h,+t[3],t[4]?+t[4]:void 0):void 0}],Du=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Nu=[10,e=>{const t=Du.exec(e);return t?ku(t[2],t[3]||h,+t[1]):void 0}],Pu=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Fu=[20,e=>{const t=Pu.exec(e);return t?ku(t[5],t[3]||t[4]||h,+t[1],+t[2]):void 0}],$u=[Tu,Ou],Bu=g(...$u),Uu=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:h,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};const ju="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Hu=1024,zu=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.console&&bo(function(e){return function(t){if(Be()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:wo(t.level),message:Q(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${Q(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}eo(n,{input:t.args,level:t.level})}}(e)),t.dom&&nu(function(e,t){return function(n){if(Be()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>Hu&&(ju&&p.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Hu),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=G(t,{keyAttrs:s,maxStringLength:i}),o=Y(t)}catch{r=""}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),eo(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&pu(function(e){return function(t){if(Be()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[du];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,u={method:s,url:i,status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:ps(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),eo(d,l)}}(e)),t.fetch&&gs(function(e){return function(t){if(Be()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.fetchData.method,t.fetchData.url,t.error){const o=t.fetchData,s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},i={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,s),eo(i,s)}else{const o=t.response,s={...t.fetchData,status_code:o?.status};t.fetchData.request_body_size,t.fetchData.response_body_size;const i={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:ps(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),eo(a,i)}}}(e)),t.history&&su(function(e){return function(t){if(Be()!==e)return;let n=t.from,r=t.to;const o=Wr(aa.location.href);let s=n?Wr(n):void 0;const i=Wr(r);s?.path||(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),eo({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Be()===e&&eo({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:de(t)},{event:t})}}(e))}}};const qu=["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"],Wu=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&ne(aa,"setTimeout",Vu),t.setInterval&&ne(aa,"setInterval",Vu),t.requestAnimationFrame&&ne(aa,"requestAnimationFrame",Gu),t.XMLHttpRequest&&"XMLHttpRequest"in aa&&ne(XMLHttpRequest.prototype,"send",Ku);const e=t.eventTarget;if(e){(Array.isArray(e)?e:qu).forEach(e=>function(e,t){const n=aa,r=n[e]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;ne(r,"addEventListener",function(n){return function(r,o,s){try{"function"==typeof o.handleEvent&&(o.handleEvent=la(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:v(o),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,o),n.apply(this,[r,la(o,{mechanism:{data:{function:"addEventListener",handler:v(o),target:e},handled:!1,type:"instrument"}}),s])}}),ne(r,"removeEventListener",function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function Vu(e){return function(...t){const n=t[0];return t[0]=la(n,{mechanism:{data:{function:v(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Gu(e){return function(t){return e.apply(this,[la(t,{mechanism:{data:{function:"requestAnimationFrame",handler:v(e)},handled:!1,type:"instrument"}})])}}function Ku(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&ne(n,e,function(t){const n={mechanism:{data:{function:e,handler:v(t)},handled:!1,type:"instrument"}},r=se(t);return r&&(n.mechanism.data.handler=v(r)),la(t,n)})}),e.apply(this,t)}}const Ju=()=>({name:"BrowserSession",setupOnce(){void 0!==aa.document?(nr({ignoreDuration:!0}),sr(),su(({from:e,to:t})=>{void 0!==e&&e!==t&&(nr({ignoreDuration:!0}),sr())})):ju&&p.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),Yu=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){I(t=>{const{stackParser:n,attachStacktrace:r}=Zu();if(Be()!==e||ua())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=function(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,l=n,d=function(e){if(!F(e)||0===e.length)return;if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/);return``}return e.slice(0,1024)}(t)??J();0===c.length&&c.push({colno:u,filename:d,function:h,in_app:!0,lineno:l});return e}(Ma(n,c||o,void 0,r,!1),s,i,a);u.level="error",Xn(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Xu("onerror")),t.onunhandledrejection&&(!function(e){R(t=>{const{stackParser:n,attachStacktrace:r}=Zu();if(Be()!==e||ua())return;const o=function(e){if(B(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}(t),s=B(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Ma(n,o,void 0,r,!0);s.level="error",Xn(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Xu("onunhandledrejection"))}}};function Xu(e){ju&&p.log(`Global Handler attached: ${e}`)}function Zu(){const e=Be();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Qu=()=>({name:"HttpContext",preprocessEvent(e){if(!aa.navigator&&!aa.location&&!aa.document)return;const t=da(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),el=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){uo(va,o.getOptions().stackParser,n,t,e,r)}}};function tl(){return!!function(){if(void 0===aa.window)return!1;const e=aa;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=J(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(aa===aa.top&&r.some(e=>n.startsWith(`${e}://`)))}()&&(ju&&c(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}function nl(e){return[io(),ro(),Wu(),zu(),Yu(),el(),Eo(),Qu(),Ju()]}function rl(t={}){const n=!t.skipBrowserExtensionCheck&&tl(),r={...t,enabled:!n&&t.enabled,stackParser:(o=t.stackParser||Bu,Array.isArray(o)?g(...o):o),integrations:ur({integrations:t.integrations,defaultIntegrations:null==t.defaultIntegrations?nl():t.defaultIntegrations}),transport:t.transport||wu};var o;return function(t,n){!0===n.debug&&(e?p.enable():c(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Ne().update(n.initialScope);const r=new t(n);return Ar(r),r.init(),r}(Aa,r)}const ol=t,sl=new WeakMap,il=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(e){if(sl.has(Be()))for(const t of e)$e(e=>{e.setExtra("url",t.url);const n=`ReportingObserver [${t.type}]`;let r="No details available";if(t.body){const n={};for(const e in t.body)n[e]=t.body[e];if(e.setExtra("body",n),"crash"===t.type){const e=t.body;r=[e.crashId||"",e.reason||""].join(" ").trim()||r}else{r=t.body.message||r}}Yn(`${n}: ${r}`)})}return{name:"ReportingObserver",setupOnce(){if(!("ReportingObserver"in hs))return;new ol.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){sl.set(e,!0)}}},al=(e={})=>{const n={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:"HttpClient",setup(e){!function(e,t){if(!ms())return;gs(n=>{if(Be()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&function(e,t,n,r,o){if(dl(e,n.status,n.url)){const e=function(e,t){if(!t&&e instanceof Request)return e;if(e instanceof Request&&e.bodyUsed)return e;return new Request(e,t)}(t,r);let s,i,a,c;hl()&&([s,a]=cl("Cookie",e),[i,c]=cl("Set-Cookie",n));Xn(pl({url:e.url,method:e.method,status:n.status,requestHeaders:s,responseHeaders:i,requestCookies:a,responseCookies:c,error:o}))}}(t,a,r,c,s||i)},!1)}(e,n),function(e,n){if(!("XMLHttpRequest"in t))return;pu(t=>{if(Be()!==e)return;const{error:r,virtualError:o}=t,s=t.xhr,i=s[du];if(!i)return;const{method:a,request_headers:c}=i;try{!function(e,t,n,r,o){if(dl(e,t.status,t.responseURL)){let e,s,i;if(hl()){try{const e=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;e&&(s=ll(e))}catch{}try{i=function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return n&&r&&(e[n]=r),e},{})}(t)}catch{}e=r}Xn(pl({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:i,responseCookies:s,error:o}))}}(n,s,a,c,r||o)}catch(e){ju&&p.warn("Error while extracting response event form XHR response",e)}})}(e,n)}}};function cl(e,t){const n=function(e){const t={};return e.forEach((e,n)=>{t[n]=e}),t}(t.headers);let r;try{const t=n[e]||n[e.toLowerCase()]||void 0;t&&(r=ll(t))}catch{}return[n,r]}function ul(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function ll(e){return e.split("; ").reduce((e,t)=>{const[n,r]=t.split("=");return n&&r&&(e[n]=r),e},{})}function dl(e,t,n){return function(e,t){return e.some(e=>"number"==typeof e?e===t:t>=e[0]&&t<=e[1])}(e.failedRequestStatusCodes,t)&&(r=e.failedRequestTargets,o=n,r.some(e=>"string"==typeof e?o.includes(e):e.test(o)))&&!Gr(n,Be());var r,o}function pl(e){const t=Be(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:ul(e.responseHeaders)}}};return he(s,{type:"http.client",handled:!1}),s}function hl(){const e=Be();return!!e&&Boolean(e.getOptions().sendDefaultPii)}const fl=t,ml=(e={})=>{const t=null!=e.frameContextLines?e.frameContextLines:7;return{name:"ContextLines",processEvent:e=>function(e,t){const n=fl.document,r=fl.location&&Vr(fl.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["","",...s.split("\n"),""];return o.forEach(e=>{const n=e.stacktrace;n?.frames&&(n.frames=n.frames.map(e=>function(e,t,n,r){if(e.filename!==n||!e.lineno||!t.length)return e;return function(e,t,n=5){if(void 0===t.lineno)return;const r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(e=>Z(e,0));const s=Math.min(r-1,o);t.context_line=Z(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(e=>Z(e,0))}(t,e,r),e}(e,i,r,t)))}),e}(e,t)}};function gl(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=function(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);if(o)return{operationType:o[1],operationName:void 0};return{operationType:void 0,operationName:void 0}}(t);return r?`${o} ${r}`:`${o}`}function _l(e){let t;if("xhr"in e){const n=e.xhr[du];t=n&&mu(n.body)[0]}else{t=mu(gu(e.input))[0]}return t}function yl(e){let t;try{const n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}const vl=e=>({name:"GraphQLClient",setup(t){!function(e,t){e.on("beforeOutgoingRequestSpan",(e,n)=>{const r=Mt(e).data||{};if(!("http.client"===r[qe]))return;const o=r[Qe]||r["http.url"],s=r[Ze]||r["http.method"];if(!F(o)||!F(s))return;const{endpoints:i}=t,a=te(o,i),c=_l(n);if(a&&c){const t=yl(c);if(t){const n=gl(t);e.updateName(`${s} ${o} (${n})`),e.setAttribute("graphql.document",c)}}})}(t,e),function(e,t){e.on("beforeOutgoingRequestBreadcrumb",(e,n)=>{const{category:r,type:o,data:s}=e;if("http"===o&&("fetch"===r||"xhr"===r)){const e=s?.url,{endpoints:r}=t,o=te(e,r),i=_l(n);if(o&&s&&i){const e=yl(i);if(!s.graphql&&e){const t=gl(e);s["graphql.document"]=e.query,s["graphql.operation"]=t}}}})}(t,e)}}),bl=t,Sl="sentryReplaySession",wl="Unable to send Replay",kl=15e4,El=5e3,xl=2e7,Cl=36e5;var Il=Object.defineProperty,Tl=(e,t,n)=>((e,t,n)=>t in e?Il(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Ml=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Ml||{});function Rl(e){const t=e?.host;return Boolean(t?.shadowRoot===e)}function Ol(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Al(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,Ll).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function Ll(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=Al(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;nthis.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Nl({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function Pl({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function Fl(e){return e.toLowerCase()}function $l(e){return e.toUpperCase()}const Bl="__rrweb_original__";function Ul(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Fl(t):null}function jl(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Hl(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(e){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return r?.[1]??null}const zl={};function ql(e){const t=zl[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return zl[e]=r.bind(window)}function Wl(...e){return ql("setTimeout")(...e)}function Vl(...e){return ql("clearTimeout")(...e)}function Gl(e){try{return e.contentDocument}catch(e){}}let Kl=1;const Jl=new RegExp("[^a-z0-9-_:]");function Yl(){return Kl++}let Xl,Zl;const Ql=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ed=/^(?:[a-z+]+:)?\/\//i,td=/^www\..*/i,nd=/^(data:)([^,]*),(.*)/i;function rd(e,t){return(e||"").replace(Ql,(e,n,r,o,s,i)=>{const a=r||s||i,c=n||o||"";if(!a)return e;if(ed.test(a)||td.test(a))return`url(${c}${a}${c})`;if(nd.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const u=t.split("/"),l=a.split("/");u.pop();for(const e of l)"."!==e&&(".."===e?u.pop():u.push(e));return`url(${c}${u.join("/")}${c})`})}const od=/^[^ \t\n\r\u000c]+/,sd=/^[, \t\n\r\u000c]+/;const id=new WeakMap;function ad(e,t){return t&&""!==t.trim()?ud(e,t):t}function cd(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function ud(e,t){let n=id.get(e);if(n||(n=e.createElement("a"),id.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function ld(e,t,n,r,o,s){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?ad(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(sd),!(n>=t.length);){let s=r(od);if(","===s.slice(-1))s=ad(e,s.substring(0,s.length-1)),o.push(s);else{let r="";s=ad(e,s);let i=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((s+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,o.push((s+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?rd(r,ud(e)):"object"===t&&"data"===n?ad(e,r):"function"==typeof s?s(n,r,o):r:ad(e,r):r}function dd(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function pd(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:pd(e.parentNode,t,n,r+1):-1}function hd(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function fd(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(s){if(c=pd(i,hd(r,o)),c<0)return!0;a=pd(i,hd(t,n),c>=0?c:1/0)}else{if(a=pd(i,hd(t,n)),a<0)return!1;c=pd(i,hd(r,o),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!s}catch(e){}return!!s}function md(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:f={},maskTextFn:m,maskInputFn:g,dataURLOptions:_={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1}=t,w=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Ml.Document,childNodes:[],compatMode:e.compatMode}:{type:Ml.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ml.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m,maskTextClass:g,unmaskTextClass:_,maskTextSelector:y,unmaskTextSelector:v}=t,b=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,s),S=function(e){if(e instanceof HTMLFormElement)return"form";const t=Fl(e.tagName);return Jl.test(t)?"div":t}(e);let w={};const k=e.attributes.length;for(let t=0;tt.href===e.href);let r=null;t&&(r=Al(t)),r&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=rd(r,t.href))}if("style"===S&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=Al(e.sheet);t&&(w._cssText=rd(t,ud(n)))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const t=e,n=Ul(t),r=jl(t,$l(S),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=fd(t,g,y,_,v,Nl({type:n,tagName:$l(S),maskInputOptions:a}));w.value=Pl({isMasked:e,element:t,value:r,maskInputFn:u})}o&&(w.checked=o)}"option"===S&&(e.selected&&!a.select?w.selected=!0:delete w.selected);if("canvas"===S&&p)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n0!==e))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(w.rr_dataURL=t)}if("img"===S&&d){Xl||(Xl=n.createElement("canvas"),Zl=Xl.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"",o=t.crossOrigin,s=()=>{t.removeEventListener("load",s);try{Xl.width=t.naturalWidth,Xl.height=t.naturalHeight,Zl.drawImage(t,0,0),w.rr_dataURL=Xl.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?w.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}"audio"!==S&&"video"!==S||(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime);f||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop));if(b){const{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==S||h(w.src)||(b||Gl(e)||(w.rr_src=w.src),delete w.src);let E;try{customElements.get(S)&&(E=!0)}catch(e){}return{type:Ml.Element,tagName:S,attributes:w,childNodes:[],isSVG:cd(e)||void 0,needBlock:b,rootId:m,isCustom:E}}(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:f,maskInputFn:g,dataURLOptions:_,inlineImages:y,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:w,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,f="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=Al(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=rd(p,ud(t.doc))}f&&(p="SCRIPT_PLACEHOLDER");const g=fd(e,r,s,o,i,n);h||f||m||!p||!g||(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*"));m&&p&&(c.textarea||g)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*"));if("OPTION"===d&&p){p=Pl({isMasked:fd(e,r,s,o,i,Nl({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:u})}return{type:Ml.Text,textContent:p||"",isStyle:h,rootId:l}}(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:f,maskInputFn:g,rootId:w});case e.CDATA_SECTION_NODE:return{type:Ml.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:Ml.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function gd(e){return null==e?"":e.toLowerCase()}function _d(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E=5e3,onBlockedImageLoad:x,onStylesheetLoad:C,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:M=!1}=t;let{preserveWhiteSpace:R=!0}=t;const O=md(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:T,newlyAddedElement:M});if(!O)return console.warn(e,"not serialized"),null;let A;A=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===Ml.Comment)return!0;if(e.type===Ml.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Hl(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(gd(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===gd(e.attributes.name)||"icon"===gd(e.attributes.rel)||"apple-touch-icon"===gd(e.attributes.rel)||"shortcut icon"===gd(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&gd(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(gd(e.attributes.property).match(/^(og|twitter|fb):/)||gd(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===gd(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===gd(e.attributes.name)||"googlebot"===gd(e.attributes.name)||"bingbot"===gd(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===gd(e.attributes.name)||"generator"===gd(e.attributes.name)||"framework"===gd(e.attributes.name)||"publisher"===gd(e.attributes.name)||"progid"===gd(e.attributes.name)||gd(e.attributes.property).match(/^article:/)||gd(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===gd(e.attributes.name)||"yandex-verification"===gd(e.attributes.name)||"csrf-token"===gd(e.attributes.name)||"p:domain_verify"===gd(e.attributes.name)||"verify-v1"===gd(e.attributes.name)||"verification"===gd(e.attributes.name)||"shopify-checkout-api-token"===gd(e.attributes.name)))return!0}}return!1}(O,y)&&(R||O.type!==Ml.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?Yl():-2;const L=Object.assign(O,{id:A});if(r.add(e,L),-2===A)return null;w&&w(e);let D=!p;if(L.type===Ml.Element){D=D&&!L.needBlock;const t=e.shadowRoot;t&&Ol(t)&&(L.isShadowHost=!0)}if((L.type===Ml.Document||L.type===Ml.Element)&&D){y.headWhitespace&&L.type===Ml.Element&&"head"===L.tagName&&(R=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onBlockedImageLoad:x,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:T},M=e.childNodes?Array.from(e.childNodes):[];for(const e of M){const n=_d(e,t);n&&L.childNodes.push(n)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=_d(n,t);r&&(Ol(e.shadowRoot)&&(r.isShadow=!0),L.childNodes.push(r))}}if(e.parentNode&&Rl(e.parentNode)&&Ol(e.parentNode)&&(L.isShadow=!0),L.type!==Ml.Element||"iframe"!==L.tagName||L.needBlock||function(e,t,n){const r=e.contentWindow;if(!r)return;let o,s=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=Wl(()=>{s||(t(),s=!0)},n);return void e.addEventListener("load",()=>{Vl(r),s=!0,t()})}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return Wl(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=Gl(e);if(t&&k){const n=_d(t,{doc:t,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:T});n&&k(e,n)}},E),L.type===Ml.Element&&"img"===L.tagName&&!e.complete&&L.needBlock){const t=e,n=()=>{if(t.isConnected&&!t.complete&&x)try{const e=t.getBoundingClientRect();e.width>0&&e.height>0&&x(t,L,e)}catch(e){}t.removeEventListener("load",n)};t.isConnected&&t.addEventListener("load",n)}return L.type===Ml.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===Hl(L.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const s=Wl(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{Vl(s),o=!0,t()})}(e,()=>{if(C){const t=_d(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:R,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:T});t&&C(e,t)}},I),L.type===Ml.Element&&delete L.needBlock,L}function yd(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const vd="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let bd={map:{},getId:()=>(console.error(vd),-1),getNode:()=>(console.error(vd),null),removeNodeFromMap(){console.error(vd)},has:()=>(console.error(vd),!1),reset(){console.error(vd)}};function Sd(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||!1!==n.leading||(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(!function(...e){jd("clearTimeout")(...e)}(r),r=null),o=i,e.apply(c,s)):r||!1===n.trailing||(r=Hd(()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},a))}}function wd(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){Hd(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>wd(e,t,s||{},!0)}function kd(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(bd=new Proxy(bd,{get:(e,t,n)=>("map"===t&&console.error(vd),Reflect.get(e,t,n))}));let Ed=Date.now;function xd(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Cd(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Id(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Td(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}function Md(e,t,n,r,o){if(!e)return!1;const s=Td(e);if(!s)return!1;const i=hd(t,n);if(!o){const e=r&&s.matches(r);return i(s)&&!e}const a=pd(s,i);let c=-1;return!(a<0)&&(r&&(c=pd(s,hd(null,r))),a>-1&&c<0||a(new Date).getTime());class Pd{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Fd(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function $d(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=Fd(n);)n=t;return n}(e);return t.contains(n)}function Bd(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||$d(e))}const Ud={};function jd(e){const t=Ud[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return Ud[e]=r.bind(window)}function Hd(...e){return jd("setTimeout")(...e)}var zd=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(zd||{}),qd=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(qd||{}),Wd=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Wd||{}),Vd=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Vd||{}),Gd=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Gd||{});function Kd(e){try{return e.contentDocument}catch(e){}}function Jd(e){return"__ln"in e}class Yd{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n`${e}@${t}`;class Zd{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Yd,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!Bd(o))return;const s=Rl(o.parentNode)?this.mirror.getId(Fd(o)):this.mirror.getId(o.parentNode),i=r(o);if(-1===s||-1===i)return n.addNode(o);const a=_d(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Ld(e,this.mirror)&&!Md(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),Dd(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Nd(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{Md(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})}});a&&(e.push({parentId:s,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)ep(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)tp(this.droppedSet,e)||ep(this.removes,e,this.mirror)?tp(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let s=null;for(;n.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}s=e.previous,n.removeNode(e.value),o(e.value)}const i={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!Rd(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Md(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:fd(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Td(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Ul(t),o=t.tagName;r=jl(t,o,n);const s=Nl({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=Pl({isMasked:fd(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(Md(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(Kd(t))return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!dd(t.tagName,n)&&(o.attributes[n]=ld(this.doc,Fl(t.tagName),Fl(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||s!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===s?r:[r,s]:o._unchangedStyles[e]=[r,s]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(Md(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=Rl(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Md(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Rd(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Qd(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Od(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xd(n,r)]?Qd(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Rl(e.target)||!Ol(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Rd(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Xd(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Md(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),Nd(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Qd(e,t){e.delete(t),t.childNodes?.forEach(t=>Qd(e,t))}function ep(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}(e,t,n)}function tp(e,t){return 0!==e.size&&np(e,t)}function np(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||np(e,n))}let rp;const op=e=>{if(!rp)return e;return(...t)=>{try{return e(...t)}catch(e){if(rp&&!0===rp(e))return()=>{};throw e}}},sp=[];function ip(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function ap(e,t){const n=new Zd;sp.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(op(t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function cp({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let u=null;return Object.keys(Wd).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(i=>{let a=Fl(i);const l=(t=>i=>{const a=ip(i);if(Md(a,r,o,s,!0))return;let c=null,l=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=Vd.Mouse;break;case"touch":c=Vd.Touch;break;case"pen":c=Vd.Pen}c===Vd.Touch?Wd[t]===Wd.MouseDown?l="TouchStart":Wd[t]===Wd.MouseUp&&(l="TouchEnd"):Vd.Pen}else Ad(i)&&(c=Vd.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===Vd.Touch||l.startsWith("Mouse")&&c===Vd.Mouse)&&(c=null)):Wd[t]===Wd.Click&&(c=u,u=null);const d=Ad(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:f}=d;op(e)({type:Wd[l],id:p,x:h,y:f,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(Wd[i]){case Wd.MouseDown:case Wd.MouseUp:a=a.replace("mouse","pointer");break;case Wd.TouchStart:case Wd.TouchEnd:return}c.push(yd(a,l,t))}),op(()=>{c.forEach(e=>e())})}function up({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return yd("scroll",op(Sd(op(i=>{const a=ip(i);if(!a||Md(a,r,o,s,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=xd(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}const lp=["INPUT","TEXTAREA","SELECT"],dp=new WeakMap;function pp({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:m}){function g(e){let n=ip(e);const l=e.isTrusted,g=n&&$l(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||lp.indexOf(g)<0||Md(n,r,o,s,!0))return;const y=n;if(y.classList.contains(i)||a&&y.matches(a))return;const v=Ul(n);let b=jl(y,g,v),S=!1;const w=Nl({maskInputOptions:c,tagName:g,type:v}),k=fd(n,p,f,h,m,w);"radio"!==v&&"checkbox"!==v||(S=n.checked),b=Pl({isMasked:k,element:n,value:b,maskInputFn:u}),_(n,d?{text:b,isChecked:S,userTriggered:l}:{text:b,isChecked:S});const E=n.name;"radio"===v&&E&&S&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach(e=>{if(e!==n){const t=Pl({isMasked:k,element:e,value:jl(e,g,v),maskInputFn:u});_(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}})}function _(t,r){const o=dp.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){dp.set(t,r);const o=n.getId(t);op(e)({...r,id:o})}}const y=("last"===l.input?["change"]:["input","change"]).map(e=>yd(e,op(g),t)),v=t.defaultView;if(!v)return()=>{y.forEach(e=>e())};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&y.push(...S.map(e=>wd(e[0],e[1],{set(){op(g)({target:this,isTrusted:!1})}},!1,v))),op(()=>{y.forEach(e=>e())})}function hp(e){return function(e,t){if(_p("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||_p("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||_p("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||_p("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function fp(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function mp({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const o="#document"===n.nodeName?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(e){const n=s.set?.call(this,e);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),op(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function gp(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=ap(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=Sd(op(t=>{const n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),s),u=op(Sd(op(e=>{const t=ip(e),{clientX:n,clientY:o}=Ad(e)?e.changedTouches[0]:e;i||(i=Ed()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Ed()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?qd.Drag:e instanceof MouseEvent?qd.MouseMove:qd.TouchMove)}),o,{trailing:!1})),l=[yd("mousemove",u,n),yd("touchmove",u,n),yd("drag",u,n)];return op(()=>{l.forEach(e=>e())})}(e),s=cp(e),i=up(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return yd("resize",op(Sd(op(()=>{const t=Cd(),o=Id();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)}),200)),t)}(e,{win:n}),c=pp(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=op(i=>Sd(op(s=>{const a=ip(s);if(!a||Md(a,t,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:d}=a;e({type:i,id:o.getId(a),currentTime:c,volume:u,muted:l,playbackRate:d})}),s.media||500)),c=[yd("play",a(Gd.Play),i),yd("pause",a(Gd.Pause),i),yd("seeked",a(Gd.Seeked),i),yd("volumechange",a(Gd.VolumeChange),i),yd("ratechange",a(Gd.RateChange),i)];return op(()=>{c.forEach(e=>e())})}(e);let l=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(l=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:op((r,o,s)=>{const[i,a]=s,{id:c,styleId:u}=fp(o,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:a}]}),r.apply(o,s)})});const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:op((r,o,s)=>{const[i]=s,{id:a,styleId:c}=fp(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(o,s)})}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:op((r,o,s)=>{const[i]=s,{id:a,styleId:c}=fp(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(o,s)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:op((r,o,s)=>{const[i]=s,{id:a,styleId:c}=fp(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(o,s)})}));const c={};yp("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(yp("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),yp("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),yp("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([r,o])=>{u[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(u[r].insertRule,{apply:op((r,o,s)=>{const[i,a]=s,{id:c,styleId:u}=fp(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:[...hp(o),a||0]}]}),r.apply(o,s)})}),o.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:op((r,o,s)=>{const[i]=s,{id:a,styleId:c}=fp(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...hp(o),i]}]}),r.apply(o,s)})})}),op(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:n}),d=mp(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:op((o,i,a)=>{const[c,u,l]=a;if(n.has(c))return s.apply(i,[c,u,l]);const{id:d,styleId:p}=fp(i.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:l},index:hp(i.parentRule)}),o.apply(i,a)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:op((o,s,a)=>{const[c]=a;if(n.has(c))return i.apply(s,[c]);const{id:u,styleId:l}=fp(s.parentRule?.parentStyleSheet,t,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&e({id:u,styleId:l,remove:{property:c},index:hp(s.parentRule)}),o.apply(s,a)})}),op(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=kd(t.fonts,"add",function(t){return function(n){return Hd(op(()=>{const t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(i),op(()=>{r.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=op(()=>{const e=t.getSelection();if(!e||a&&e?.isCollapsed)return;a=e.isCollapsed||!1;const c=[],u=e.rangeCount||0;for(let t=0;t{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return op(()=>{sp.forEach(e=>e.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),l(),d(),p(),h(),f(),m(),g.forEach(e=>e())})}function _p(e){return void 0!==window[e]}function yp(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class vp{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),s.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class bp{constructor(){this.crossOriginIframeMirror=new vp(Yl),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Sp{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new vp(Yl),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new vp(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&e.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const n=Kd(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case zd.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:zd.IncrementalSnapshot,data:{source:qd.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case zd.Meta:case zd.Load:case zd.DomContentLoaded:return!1;case zd.Plugin:return t;case zd.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case zd.IncrementalSnapshot:switch(t.data.source){case qd.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case qd.Drag:case qd.TouchMove:case qd.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case qd.ViewportResize:return!1;case qd.MediaInteraction:case qd.MouseInteraction:case qd.Scroll:case qd.CanvasMutation:case qd.Input:return this.replaceIds(t.data,e,["id"]),t;case qd.StyleSheetRule:case qd.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case qd.Font:return t;case qd.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case qd.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===Ml.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class wp{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class kp{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ol(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=ap({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(up({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Hd(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(mp({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=Kd(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(kd(e.prototype,"attachShadow",function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&Bd(this)&&n.addShadowRoot(this.shadowRoot,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var Ep="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xp="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Cp=0;Cp<64;Cp++)xp[Ep.charCodeAt(Cp)]=Cp;class Ip{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Tp{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Pd,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:Ll(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Mp{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){jd("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Rp,Op;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ap=new Dl;function Lp(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:y,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:w,sampling:k={},dataURLOptions:E={},mousemoveWait:x,recordDOM:C=!0,recordCanvas:I=!1,recordCrossOriginIframes:T=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:R=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:L,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:N=new Set([]),errorHandler:P,onMutation:F,getCanvasManager:$}=e;rp=P;const B=!T||window.parent===window;let U=!1;if(!B)try{window.parent.document&&(U=!1)}catch(e){U=!0}if(B&&!t)throw new Error("emit function is required");if(!B&&!U)return()=>{};void 0!==x&&void 0===k.mousemove&&(k.mousemove=x),Ap.reset();const j=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},H=!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===_,headMetaDescKeywords:"all"===_}:_||{};let z;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let q=0;const W=e=>{for(const t of L||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!U&&(e=w(e)),e};Rp=(e,o)=>{const s=e;if(s.timestamp=Ed(),!sp[0]?.isFrozen()||s.type===zd.FullSnapshot||s.type===zd.IncrementalSnapshot&&s.data.source===qd.Mutation||sp.forEach(e=>e.unfreeze()),B)t?.(W(s),o);else if(U){const e={type:"rrweb",event:W(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===zd.FullSnapshot)z=s,q=0;else if(s.type===zd.IncrementalSnapshot){if(s.data.source===qd.Mutation&&s.data.isAttachIframe)return;q++;const e=r&&q>=r,t=n&&z&&s.timestamp-z.timestamp>n;(e||t)&&ee(!0)}};const V=e=>{Rp({type:zd.IncrementalSnapshot,data:{source:qd.Mutation,...e}})},G=e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.Scroll,...e}}),K=e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.CanvasMutation,...e}}),J=new Tp({mutationCb:V,adoptedStyleSheetCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new bp:new Sp({mirror:Ap,mutationCb:V,stylesheetManager:J,recordCrossOriginIframes:T,wrappedEmit:Rp});for(const e of L||[])e.getMirror&&e.getMirror({nodeMirror:Ap,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const X=new Mp,Z=function(e,t){try{return e?e(t):new Ip}catch{return console.warn("Unable to initialize CanvasManager"),new Ip}}($,{mirror:Ap,win:window,mutationCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.CanvasMutation,...e}}),recordCanvas:I,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:k.canvas,dataURLOptions:E,errorHandler:P}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new wp:new kp({mutationCb:V,scrollCb:G,bypassOptions:{onMutation:F,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:j,dataURLOptions:E,maskAttributeFn:y,maskTextFn:b,maskInputFn:v,recordCanvas:I,inlineImages:A,sampling:k,slimDOMOptions:H,iframeManager:Y,stylesheetManager:J,canvasManager:Z,keepIframeSrcFn:D,processedNodeManager:X},mirror:Ap}),ee=(e=!1)=>{if(!C)return;Rp({type:zd.Meta,data:{href:window.location.href,width:Id(),height:Cd()}},e),J.reset(),Q.init(),sp.forEach(e=>e.lock());const t=function(e,t){const{mirror:n=new Dl,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOM:y=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:x,stylesheetLoadTimeout:C,keepIframeSrcFn:I=()=>!1}=t||{};return _d(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:x,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:Ap,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskAllInputs:j,maskAttributeFn:y,maskInputFn:v,maskTextFn:b,slimDOM:H,dataURLOptions:E,recordCanvas:I,inlineImages:A,onSerialize:e=>{Ld(e,Ap)&&Y.addIframe(e),Dd(e,Ap)&&J.trackLinkElement(e),Nd(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),e.contentWindow&&Z.addWindow(e.contentWindow),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{J.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{V({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:D});if(!t)return console.warn("Failed to snapshot the document");Rp({type:zd.FullSnapshot,data:{node:t,initialOffset:xd(window)}}),sp.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&J.adoptStyleSheets(document.adoptedStyleSheets,Ap.getId(document))};Op=ee;try{const e=[],t=e=>op(gp)({onMutation:F,mutationCb:V,mousemoveCb:(e,t)=>Rp({type:zd.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.MouseInteraction,...e}}),scrollCb:G,viewportResizeCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.ViewportResize,...e}}),inputCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.Input,...e}}),mediaInteractionCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.MediaInteraction,...e}}),styleSheetRuleCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.StyleSheetRule,...e}}),styleDeclarationCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.StyleDeclaration,...e}}),canvasMutationCb:K,fontCb:e=>Rp({type:zd.IncrementalSnapshot,data:{source:qd.Font,...e}}),selectionCb:e=>{Rp({type:zd.IncrementalSnapshot,data:{source:qd.Selection,...e}})},customElementCb:e=>{Rp({type:zd.IncrementalSnapshot,data:{source:qd.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:j,inlineStylesheet:f,sampling:k,recordDOM:C,recordCanvas:I,inlineImages:A,userTriggeredOnInput:R,collectFonts:O,doc:e,maskAttributeFn:y,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:D,blockSelector:s,unblockSelector:i,slimDOMOptions:H,dataURLOptions:E,mirror:Ap,iframeManager:Y,stylesheetManager:J,shadowDomManager:Q,processedNodeManager:X,canvasManager:Z,ignoreCSSAttributes:N,plugins:L?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>Rp({type:zd.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});Y.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(yd("DOMContentLoaded",()=>{Rp({type:zd.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&n()})),e.push(yd("load",()=>{Rp({type:zd.Load,data:{}}),"load"===M&&n()},window))),()=>{e.forEach(e=>e()),X.destroy(),Op=void 0,rp=void 0}}catch(e){console.warn(e)}}var Dp,Np;Lp.mirror=Ap,Lp.takeFullSnapshot=function(e){if(!Op)throw new Error("please take full snapshot after start recording");Op(e)},(Np=Dp||(Dp={}))[Np.NotStarted=0]="NotStarted",Np[Np.Running=1]="Running",Np[Np.Stopped=2]="Stopped";function Pp(e){return e>9999999999?e:1e3*e}function Fp(e){return e>9999999999?e/1e3:e}function $p(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:zd.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:Jt(t,10,1e3)}}),"console"===t.category)))}function Bp(e){return e.closest("button,a")||e}function Up(e){const t=jp(e);return t&&t instanceof Element?Bp(t):t}function jp(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let Hp;function zp(e){return Hp||(Hp=[],ne(bl,"open",function(e){return function(...t){if(Hp)try{Hp.forEach(e=>e())}catch{}return e.apply(bl,t)}})),Hp.push(e),()=>{const t=Hp?Hp.indexOf(e):-1;t>-1&&Hp.splice(t,1)}}const qp=new Set([qd.Mutation,qd.StyleSheetRule,qd.StyleDeclaration,qd.AdoptedStyleSheet,qd.CanvasMutation,qd.Selection,qd.MediaInteraction]);class Wp{constructor(e,t,n=$p){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=zp(()=>{this._lastMutation=Gp()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!Vp.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:Fp(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Fp(e)}registerScroll(e=Date.now()){this._lastScroll=Fp(e)}registerClick(e){const t=Bp(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=Gp();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:s,clickBreadcrumb:i}=e;if(o){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:bl.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:s||1}};return void this._addBreadcrumbEvent(t,o)}if(s>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:bl.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=lu(()=>this._checkClicks(),1e3)}}const Vp=["A","BUTTON","INPUT"];function Gp(){return Date.now()/1e3}function Kp(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(qp.has(n)&&e.registerMutation(t.timestamp),n===qd.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===qd.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=Lp.mirror.getNode(r);o instanceof HTMLElement&&n===Wd.Click&&e.registerClick(o)}}catch{}}function Jp(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Yp=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Yp||{});const Xp=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Zp(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(Xp.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}const Qp=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?Up(e.event):jp(e.event),n=G(r,{maxStringLength:200})||""}catch{n=""}return{target:r,message:n}}(e);return Jp({category:`ui.${e.name}`,...eh(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;var s,i,a;!(r&&e.clickDetector&&o?.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(s=e.clickDetector,i=n,a=Up(t.event),s.handleClick(i,a)),$p(e,n)};function eh(e,t){const n=Lp.mirror.getId(e),r=n&&Lp.mirror.getNode(n),o=r&&Lp.mirror.getMeta(r),s=o&&function(e){return e.type===Yp.Element}(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>e.type===Yp.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:Zp(s.attributes)}}:{}}}function th(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(i)||!s)return null;const a=t||r||o,c=1===s.length;if(!a&&c)return null;const u=G(i,{maxStringLength:200})||"",l=eh(i,u);return Jp({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}(t);n&&$p(e,n)}const nh={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:sh(s),end:sh(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=sh(o);return{type:n,name:r,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=e;if(0===o)return null;return{type:`${t}.${m}`,start:sh(h),end:sh(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:s,redirectCount:p}}}};function rh(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function oh(e){const t=nh[e.entryType];return t?t(e):null}function sh(e){return((ve()||bl.performance.timeOrigin)+e)/1e3}function ih(e){const t=e.entries[e.entries.length-1];return lh(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function ah(e){return void 0!==e.sources}function ch(e){const t=[],n=[];for(const r of e.entries)if(ah(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=Lp.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return lh(e,"cumulative-layout-shift",n,t)}function uh(e){const t=e.entries[e.entries.length-1];return lh(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function lh(e,t,n,r){const o=e.value,s=e.rating,i=sh(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(e=>Lp.mirror.getId(e)):void 0,attributions:r}}}const dh="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;const ph=["log","warn","error"],hh="[Replay] ";function fh(e,t="info"){eo({category:"console",data:{logger:"replay"},level:t,message:`${hh}${e}`},{level:t})}const mh=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return dh?(ph.forEach(e=>{n[e]=(...n)=>{p[e](hh,...n),t&&fh(n.join(""),wo(e))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),p.error(hh,r),e?Jn(r):t&&fh(r,"error")},n.infoTick=(...e)=>{p.log(hh,...e),t&&setTimeout(()=>fh(e[0]),0)}):ph.forEach(e=>{n[e]=()=>{}}),n}();class gh extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class _h{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>xl)throw new gh;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(e=>e.timestamp).sort()[0];return e?Pp(e):null}}class yh{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():t()},{once:!0}),this._worker.addEventListener("error",e=>{t(e)},{once:!0})})),this._ensureReadyPromise}destroy(){dh&&mh.log("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise((r,o)=>{const s=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",s),!i.success)return dh&&mh.error("Error in compression worker: ",i.response),void o(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class vh{constructor(e){this._worker=new yh(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=Pp(e.timestamp);(!this._earliestTimestamp||txl?Promise.reject(new gh):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{dh&&mh.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class bh{constructor(e){this._fallback=new _h,this._compression=new vh(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(dh&&mh.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){dh&&mh.exception(e,"Failed to add events when switching buffers.")}}}function Sh({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s>f]=l}else for(o=new n(i),s=0;s>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;sd&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<e))break;w+=m-(1<>=y;w>0;){var M=o[s].s;p[M]=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;oi.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}();return""}();if(!t)return;dh&&mh.log("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new bh(n)}catch(e){dh&&mh.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return dh&&mh.log("Using simple buffer"),new _h}function wh(){try{return"sessionStorage"in bl&&!!bl.sessionStorage}catch{return!1}}function kh(e){!function(){if(!wh())return;try{bl.sessionStorage.removeItem(Sl)}catch{}}(),e.session=void 0}function Eh(e){return void 0!==e&&Math.random()e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(dh&&mh.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function Nh(e){return!e.type}function Ph(e){return"transaction"===e.type}function Fh(e){return"feedback"===e.type}function $h(e){return(t,n)=>{if(!e.isEnabled()||!Nh(t)&&!Ph(t))return;const r=n?.statusCode;!r||r<200||r>=300||(Ph(t)?function(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,t):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();if("function"==typeof r&&!r(t))return;lu(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t))}}function Bh(e){return t=>{e.isEnabled()&&Nh(t)&&function(e,t){const n=t.exception?.values?.[0]?.value;if("string"!=typeof n)return;if(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){$p(e,Jp({category:"replay.hydrate-error",data:{url:J()}}))}}(e,t)}}function Uh(e){const t=Be();t&&t.on("beforeAddBreadcrumb",t=>function(e,t){if(!e.isEnabled()||!jh(t))return;const n=function(e){if(!jh(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(e){const t=e.data?.arguments;if(!Array.isArray(t)||0===t.length)return Jp(e);let n=!1;const r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>El?(n=!0,`${e.slice(0,El)}…`):e;if("object"==typeof e)try{const t=Jt(e,7);return JSON.stringify(t).length>El?(n=!0,`${JSON.stringify(t,null,2).slice(0,El)}…`):t}catch{}return e});return Jp({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return Jp(e)}(t);n&&$p(e,n)}(e,t))}function jh(e){return!!e.category}function Hh(){const e=Ne().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ft();if(t){delete Gt(t).replay_id}}function zh(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!Nh(t)&&!Ph(t)&&!Fh(t))return t;if(!e.checkAndHandleExpiredSession())return Hh(),t;if(Fh(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:zd.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t),t;if(function(e,t){return!(e.type||!e.exception?.values?.length||!t.originalException?.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return dh&&mh.log("Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==wl&&!(!t.exception||t.type)&&Eh(e.getOptions().errorSampleRate)}(e,t);return(r||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t},{id:"Replay"})}function qh(e,t){return t.map(({type:t,start:n,end:r,name:o,data:s})=>{const i=e.throttledAddEvent({type:zd.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof i?Promise.resolve(null):i})}function Wh(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(qh(e,[n]),!1)))}}function Vh(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!dh||!e.getOptions()._experiments.traceInternals)&&Gr(t,Be())}(e,t.name)||e.addUpdate(()=>(qh(e,[t]),!0)))}function Gh(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=fu(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Kh(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Jh(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Yh(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function Xh(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Zh(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>kl,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,kl);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Qh(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function ef(e,t){const n=function(e,t=bl.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(bl.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;if(!e.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(e);return te(n,t)}async function tf(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=ef(i,n.networkDetailAllowUrls)&&!ef(i,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?function(e,t){if(1===e.length&&"string"!=typeof e[0])return rf(e[0],t);if(2===e.length)return rf(e[1],t);return{}}(n,t):{};if(!e)return Zh(o,r,void 0);const s=gu(n),[i,a]=mu(s,mh),c=Zh(o,r,i);if(a)return Jh(c,a);return c}(n,t.input,u):Xh(u),h=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return Xh(o);const s=r?nf(r.headers,n):{};if(!r||!t&&void 0!==o)return Zh(s,o,void 0);const[i,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){dh&&mh.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const r=lu(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return await e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(dh&&mh.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(dh&&mh.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(r),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&void 0===n?Gh(e):n;return r?Zh(o,s,t?e:void 0):Xh(s)}catch(e){return dh&&mh.exception(e,"Failed to serialize response body"),Zh(o,n,void 0)}}(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});if(a)return Jh(c,a);return c}(d,n,t.response,l);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:h}}(e,t,n),o=Yh("resource.fetch",r);Vh(n.replay,o)}catch(e){dh&&mh.exception(e,"Failed to capture fetch breadcrumb")}}function nf(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function rf(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?nf(n,t):Array.isArray(n)?{}:Qh(n,t):{}}async function of(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!ef(c,n.networkDetailAllowUrls)||ef(c,n.networkDetailDenyUrls)){return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:Xh(d),response:Xh(p)}}const h=a[du],f=h?Qh(h.request_headers,n.networkRequestHeaders):{},m=Qh(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{})}(a),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?mu(i,mh):[void 0],[y,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return dh&&mh.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return dh&&mh.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return dh&&mh.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],b=Zh(f,d,g),S=Zh(m,p,y);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:_?Jh(b,_):b,response:v?Jh(S,v):S}}(e,t,n),o=Yh("resource.xhr",r);Vh(n.replay,o)}catch(e){dh&&mh.exception(e,"Failed to capture xhr breadcrumb")}}function sf(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Gh(r),s=n.getResponseHeader("content-length")?Kh(n.getResponseHeader("content-length")):function(e,t){try{return Gh("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}function af(e){const t=Be();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e?.xhr}(n)&&(sf(t,n),of(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e?.response}(n)&&(!function(e,t){const{input:n,response:r}=t,o=Gh(n?gu(n):void 0),s=r?Kh(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),tf(t,n,e))}catch(e){dh&&mh.exception(e,"Error when enriching network breadcrumb")}}(a,e,t))}catch{}}function cf(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function uf(e,t,n){return function(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){void 0!==o&&clearTimeout(o),void 0!==s&&clearTimeout(s),o=s=void 0}function l(){return o&&clearTimeout(o),o=a(c,t),i&&void 0===s&&(s=a(c,i)),r}return l.cancel=u,l.flush=function(){return void 0!==o||void 0!==s?c():r},l}(e,t,{...n,setTimeoutImpl:lu})}const lf=t.navigator;function df(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(dh&&mh.warn("Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&Kp(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Ah(e,n,o))return!0;if(!o)return!1;const t=e.session;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;Ah(e,function(e){const t=e.getOptions();return{type:zd.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(dh&&mh.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&xh(t))}return t?.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}}async function pf({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=Be(),p=Ne(),h=d?.getTransport(),f=d?.getDsn();if(!(d&&h&&f&&s.sampled))return Nn({});const m={type:"replay_event",replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},g=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const s=await Vn(e.getOptions(),r,o,t,e,Pe());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c,settings:u}=i?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},s}({scope:p,client:d,replayId:t,event:m});if(!g)return d.recordDroppedEvent("event_processor","replay"),dh&&mh.log("An event processor returned `null`, will not send event."),Nn({});delete g.sdkProcessingMetadata;const _=function(e,t,n,r){return Zt(dn(e,ln(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,i,f,d.getOptions().tunnel);let y;try{y=await h.send(_)}catch(e){const t=new Error(wl);try{t.cause=e}catch{}throw t}if("number"==typeof y.statusCode&&(y.statusCode<200||y.statusCode>=300))throw new hf(y.statusCode);const v=Fr({},y);if(Pr(v,"replay"))throw new ff(v);return y}class hf extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class ff extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function mf(e,t={count:0,interval:5e3}){const{recordingData:n,onError:r}=e;if(n.length)try{return await pf(e),!0}catch(n){if(n instanceof hf||n instanceof ff)throw n;if(Zn("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${wl} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{lu(async()=>{try{await mf(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}const gf="__THROTTLED";function _f(e,t,n){const r=new Map;let o=!1;return(...s)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach((e,n)=>{ne+t,0)>=t){const e=o;return o=!0,e?"__SKIPPED":gf}o=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...s)}}class yf{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=uf(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=_f((e,t)=>function(e,t,n){return Dh(e,t)?Lh(e,t,n):Promise.resolve(null)}(this,e,t),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new Wp(this,o)),dh){const t=e._experiments;mh.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===bl.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const e=Jp({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{const e=Jp({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{th(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){dh&&mh.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",dh&&mh.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):dh&&mh.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(dh&&mh.log("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(dh&&mh.log("Buffering is in progress, call `flush()` to save the replay"));dh&&mh.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Oh({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(dh&&mh.log("Buffering is in progress, call `flush()` to save the replay"));dh&&mh.infoTick("Starting replay in buffer mode");const e=Oh({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Lp({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:df(this),.../iPhone|iPad|iPod/i.test(lf?.userAgent??"")||/Macintosh/i.test(lf?.userAgent??"")&&lf?.maxTouchPoints&&lf?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{dh&&mh.log("Stopping Replay"+(t?` triggered by ${t}`:"")),Hh(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,kh(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),dh&&mh.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),dh&&mh.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();dh&&mh.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session?.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Th(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${bl.location.pathname}${bl.location.hash}${bl.location.search}`,t=`${bl.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===gf){const e=Jp({category:"replay.throttled"});this.addUpdate(()=>!Ah(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||Ft(),t=e&&Pt(e),n=(t&&Mt(t).data||{})[je];if(t&&n&&["route","custom"].includes(n))return Mt(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Sh({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Oh({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!Rh(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{bl.document.addEventListener("visibilitychange",this._handleVisibilityChange),bl.addEventListener("blur",this._handleWindowBlur),bl.addEventListener("focus",this._handleWindowFocus),bl.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(e){const t=Be();nu(Qp(e)),su(Wh(e)),Uh(e),af(e),tr(zh(e)),t&&(t.on("beforeSendEvent",Bh(e)),t.on("afterSendEvent",$h(e)),t.on("createDsc",t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on("spanStart",t=>{e.lastActiveSpan=t}),t.on("spanEnd",t=>{e.lastActiveSpan=t}),t.on("beforeSendFeedback",async(t,n)=>{const r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&("api"===t.contexts.feedback.source&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(e=>{r.push(kc(e,n))}),r.push(Sc(rh(ih,e)),bc(rh(ch,e)),wc(rh(uh,e))),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{bl.document.removeEventListener("visibilitychange",this._handleVisibilityChange),bl.removeEventListener("blur",this._handleWindowBlur),bl.removeEventListener("focus",this._handleWindowFocus),bl.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;Mh(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):dh&&mh.log("Document has become active, but session has expired")}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:zd.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(oh).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(qh(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&nthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await mf({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=Be();if(t){const n=e instanceof ff?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else dh&&mh.error("No session or eventBuffer found to flush.")}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(dh&&mh.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=nthis._options.maxReplayDuration+5e3;if(r||o)return dh&&mh.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const s=this.eventBuffer;s&&0===this.session.segmentId&&!s.hasCheckout&&dh&&mh.log("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&xh(this.session)}_onMutationHandler(e){const{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{const n=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e.target),r=t.join(",");return n?.matches(r)}))return!1;const n=e.length,r=this._options.mutationLimit,o=r&&n>r;if(n>this._options.mutationBreadcrumbLimit||o){const e=Jp({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(e)}return!o||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function vf(e,t){return[...e,...t].join(",")}const bf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Sf=["content-length","content-type","accept"];let wf=!1;class kf{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:s=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:y=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder","aria-label"],unmask:w=[],block:k=[],unblock:E=[],ignore:x=[],maskFn:C,beforeAddRecordingEvent:I,beforeErrorSampling:T,onError:M}={}){this.name="Replay";const R=function({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:vf(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:vf(t,[]),blockSelector:vf(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:vf(r,[]),ignoreSelector:vf(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:b,unmask:w,block:k,unblock:E,ignore:x});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:C,maskInputFn:C,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s:s}({maskAttributes:S,maskAllText:c,privacyOptions:R,key:e,value:t,el:n}),...R,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,Cl),stickySession:o,useCompression:s,workerUrl:i,blockAllMedia:l,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:f,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:Ef(y),networkResponseHeaders:Ef(v),beforeAddRecordingEvent:I,beforeErrorSampling:T,onError:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${bf}`:bf),this._isInitialized&&ks())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return wf}set _isInitialized(e){wf=e}afterAllSetup(e){ks()&&!this._replay&&(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=function(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=yt(n.replaysSessionSampleRate),s=yt(n.replaysOnErrorSampleRate);null==o&&null==s&&c(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")});null!=o&&(r.sessionSampleRate=o);null!=s&&(r.errorSampleRate=s);return r}(this._initialOptions,e);this._replay=new yf({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function Ef(e){return[...Sf,...e.map(e=>e.toLowerCase())]}var xf=Object.defineProperty,Cf=(e,t,n)=>((e,t,n)=>t in e?xf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class If{constructor(){Cf(this,"idNodeMap",new Map),Cf(this,"nodeMetaMap",new WeakMap)}getId(e){if(!e)return-1;const t=this.getMeta(e)?.id;return t??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Tf(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Tf(e.parentNode,t,n,r+1):-1}function Mf(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}const Rf="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Of={map:{},getId:()=>(console.error(Rf),-1),getNode:()=>(console.error(Rf),null),removeNodeFromMap(){console.error(Rf)},has:()=>(console.error(Rf),!1),reset(){console.error(Rf)}};function Af(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){$f(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>Af(e,t,s||{},!0)}function Lf(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function Df(e,t,n,r,o){if(!e)return!1;const s=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}(e);if(!s)return!1;const i=Tf(s,Mf(t,n));let a=-1;return!(i<0)&&(r&&(a=Tf(s,Mf(null,r))),i>-1&&a<0||i("map"===t&&console.error(Rf),Reflect.get(e,t,n))})),Date.now().toString();const Nf={};function Pf(e){const t=Nf[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return Nf[e]=r.bind(window)}function Ff(...e){return Pf("requestAnimationFrame")(...e)}function $f(...e){return Pf("setTimeout")(...e)}var Bf=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Bf||{});let Uf;const jf=e=>{if(!Uf)return e;return(...t)=>{try{return e(...t)}catch(e){if(Uf&&!0===Uf(e))return()=>{};throw e}}};for(var Hf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zf="undefined"==typeof Uint8Array?[]:new Uint8Array(256),qf=0;qf<64;qf++)zf[Hf.charCodeAt(qf)]=qf;const Wf=new Map;const Vf=(e,t,n)=>{if(!e||!Jf(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=Wf.get(e);return n||(n=new Map,Wf.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function Gf(e,t,n){if(e instanceof Array)return e.map(e=>Gf(e,t,n));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t>2],o+=Hf[(3&n[t])<<4|n[t+1]>>4],o+=Hf[(15&n[t+1])<<2|n[t+2]>>6],o+=Hf[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Gf(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Gf(e.data,t,n),e.width,e.height]}}if(Jf(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Vf(e,t,n)}}return e}const Kf=(e,t,n)=>e.map(e=>Gf(e,t,n)),Jf=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(n.find(n=>e instanceof t[n]))};function Yf(e,t,n,r,o){const s=[];try{const i=Lf(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(s,...i){if(!Df(this,t,n,r)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(s);if("__context"in this||(this.__context=e),o&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[s,...i])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(e=>e())}}function Xf(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const i of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if("function"!=typeof e[i])continue;const u=Lf(e,i,function(e){return function(...c){const u=e.apply(this,c);if(Vf(u,a,this),"tagName"in this.canvas&&!Df(this.canvas,r,o,s)){const e=Kf(c,a,this),r={type:t,property:i,args:e};n(this.canvas,r)}return u}});c.push(u)}catch{const r=Af(e,i,{set(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});c.push(r)}return c}class Zf{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{enableManualSnapshot:t,sampling:n="all",win:r,recordCanvas:o,errorHandler:s}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,s&&(Uf=s),(o&&"number"==typeof n||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),t||jf(()=>{o&&"all"===n&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&"number"==typeof n&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){const{sampling:t="all",blockClass:n,blockSelector:r,unblockSelector:o,recordCanvas:s,enableManualSnapshot:i}=this.options;if(!this.windowsSet.has(e)){if(i)return this.windowsSet.add(e),void this.windows.push(new WeakRef(e));jf(()=>{if(s&&"all"===t&&this.initCanvasMutationObserver(e,n,r,o),s&&"number"==typeof t){const t=Yf(e,n,r,o,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){t?.skipRequestAnimationFrame?this.takeSnapshot(performance.now(),!0,e):Ff(t=>this.takeSnapshot(t,!0,e))}initFPSWorker(){const e=new Worker(function(){const e=new Blob(['for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};']);return URL.createObjectURL(e)}());return e.onmessage=e=>{const t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!("base64"in t))return;const{base64:r,type:o,width:s,height:i}=t;this.mutationCb({id:n,type:Bf["2D"],commands:[{property:"clearRect",args:[0,0,s,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:o}]},0,0,s,i]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;const t=n=>{this.takeSnapshot(n,!1),e=Ff(t)};e=Ff(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){const o=Yf(e,t,n,r,!1),s=function(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])continue;const i=Lf(t.CanvasRenderingContext2D.prototype,a,function(s){return function(...i){return Df(this.canvas,n,r,o)||$f(()=>{const n=Kf(i,t,this);e(this.canvas,{type:Bf["2D"],property:a,args:n})},0),s.apply(this,i)}});s.push(i)}catch{const n=Af(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:Bf["2D"],property:a,args:[t],setter:!0})}});s.push(n)}return()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r),i=function(e,t,n,r,o){const s=[];return s.push(...Xf(t.WebGLRenderingContext.prototype,Bf.WebGL,e,n,r,o,0,t)),void 0!==t.WebGL2RenderingContext&&s.push(...Xf(t.WebGL2RenderingContext.prototype,Bf.WebGL2,e,n,r,o,0,t)),()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{o(),s(),i()})}getCanvasElements(e,t,n){const r=[],o=o=>{o.querySelectorAll("canvas").forEach(o=>{Df(o,e,t,n)||r.push(o)})};for(const e of this.windows){const t=e.deref();let n;try{n=t&&t.document}catch{}n&&o(n)}for(const e of this.shadowDoms){const t=e.deref();t&&o(t)}return r}takeSnapshot(e,t,n){const{sampling:r,blockClass:o,blockSelector:s,unblockSelector:i,dataURLOptions:a,maxCanvasSize:c}=this.options,u=1e3/("all"===r?2:r||2);if(this.lastSnapshotTime&&e-this.lastSnapshotTime{const n=this.mirror.getId(e);if(this.mirror.hasNode(e)&&e.width&&e.height&&!this.snapshotInProgressMap.get(n)){if(this.snapshotInProgressMap.set(n,!0),!t&&["webgl","webgl2"].includes(e.__context)){const t=e.getContext(e.__context);!1===t?.getContextAttributes()?.preserveDrawingBuffer&&t.clear(t.COLOR_BUFFER_BIT)}createImageBitmap(e).then(t=>{this.worker?.postMessage({id:n,bitmap:t,width:e.width,height:e.height,dataURLOptions:a,maxCanvasSize:c},[t])}).catch(e=>{jf(()=>{throw this.snapshotInProgressMap.delete(n),e})()})}}),!0}startPendingCanvasMutationFlusher(){Ff(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,Ff(e)};Ff(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),Ff(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map(e=>{const{type:t,...n}=e;return n}),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Qf;new If,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Qf||(Qf={}));const em={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},tm=1280,nm=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,tm):tm,n?Math.min(n,tm):tm]};let o;const s=new Promise(e=>o=e);return{name:"ReplayCanvas",getOptions(){const{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{const r=new Zf({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{"object"==typeof e&&(e.__rrweb__=!0)}catch{}}});return o(r),r},...em[e]||em.medium}},async snapshot(e,t){(await s).snapshot(e,t)}}};function rm(e=0){return((ve()||performance.timeOrigin)+e)/1e3}const om=new WeakMap,sm=new Map,im={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function am(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c}={...im,...t},u="function"==typeof s?s:e=>!0,l=e=>function(e,t){const n=J();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?te(r.toString(),t)||s&&te(r.pathname,t):s}{const n=!!e.match(/^\/(?!\/)/);return t?te(e,t):n}}(e,a),d={};n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){const t=sm.get(e.span_id);t&&(e.timestamp=t/1e3,sm.delete(e.span_id))}}),e)),o&&function(e){const t="fetch-body-resolved";k(t,e),E(t,()=>_s(ys))}(e=>{if(e.response){const t=om.get(e.response);t&&e.endTimestamp&&sm.set(t,e.endTimestamp)}}),gs(e=>{const t=ss(e,u,l,d);if(e.response&&e.fetchData.__span&&om.set(e.response,e.fetchData.__span),t){const n=um(e.fetchData.url),r=n?Wr(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r}),i&&cm(t),c?.(t,{headers:e.headers})}})),r&&pu(e=>{const t=function(e,t,n,r){const o=e.xhr,s=o?.[du];if(!o||o.__sentry_own_request__||!s)return;const{url:i,method:a}=s,c=jt()&&t(i);if(e.endTimestamp&&c){const e=o.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==s.status_code&&(nt(t,s.status_code),t.end(),delete r[e]))}const u=um(i),l=Wr(u||i),d=Vr(i),p=!!Ft(),h=c&&p?kn({name:`${a} ${d}`,attributes:{url:i,type:"xhr","http.method":a,"http.url":u,"server.address":l?.host,[We]:"auto.http.browser",[qe]:"http.client",...l?.search&&{"http.query":l?.search},...l?.hash&&{"http.fragment":l?.hash}}}):new Kt;o.__sentry_xhr_span_id__=h.spanContext().spanId,r[o.__sentry_xhr_span_id__]=h,n(i)&&function(e,t){const{"sentry-trace":n,baggage:r}=Zr({span:t});n&&function(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(r?.["sentry-trace"])return;try{if(e.setRequestHeader("sentry-trace",t),n){const t=r?.baggage;t&&t.split(",").some(e=>e.trim().startsWith("sentry-"))||e.setRequestHeader("baggage",n)}}catch{}}(e,n,r)}(o,jt()&&p?h:void 0);const f=Be();f&&f.emit("beforeOutgoingRequestSpan",h,e);return h}(e,u,l,d);if(t){let n;i&&cm(t);try{n=new Headers(e.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(t,{headers:n})}})}function cm(e){const{url:t}=Mt(e).data;if(!t||"string"!=typeof t)return;const n=kc("resource",({entries:r})=>{r.forEach(r=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(r)&&r.name.endsWith(t)){(function(e){const t=[];if(null!=e.nextHopProtocol){const{name:n,version:r}=Fc(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return ve()?[...t,["http.request.redirect_start",rm(e.redirectStart)],["http.request.fetch_start",rm(e.fetchStart)],["http.request.domain_lookup_start",rm(e.domainLookupStart)],["http.request.domain_lookup_end",rm(e.domainLookupEnd)],["http.request.connect_start",rm(e.connectStart)],["http.request.secure_connection_start",rm(e.secureConnectionStart)],["http.request.connection_end",rm(e.connectEnd)],["http.request.request_start",rm(e.requestStart)],["http.request.response_start",rm(e.responseStart)],["http.request.response_end",rm(e.responseEnd)]]:t})(r).forEach(t=>e.setAttribute(...t)),setTimeout(n)}})})}function um(e){try{return new URL(e,aa.location.origin).href}catch{return}}const lm="sentry_previous_trace",dm="sentry.previous_trace";function pm(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r="session-storage"===t;let o=r?function(){try{const e=aa.sessionStorage?.getItem(lm);return JSON.parse(e)}catch{return}}():void 0;e.on("spanStart",e=>{if(Pt(e)!==e)return;const t=Ne().getPropagationContext();o=function(e,t,n){const r=Mt(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[He])}catch{return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;if(i.traceId===r.trace_id)return e;Date.now()/1e3-e.startTimestamp<=3600&&(ju&&p.log(`Adding previous_trace ${i} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:i,attributes:{[et]:"previous_trace"}}),t.setAttribute(dm,`${i.traceId}-${i.spanId}-${hm(i)?1:0}`));return s}(o,e,t),r&&function(e){try{aa.sessionStorage.setItem(lm,JSON.stringify(e))}catch(e){ju&&p.warn("Could not store previous trace in sessionStorage",e)}}(o)});let s=!0;n&&e.on("beforeSampling",e=>{if(!o)return;const t=Ne(),n=t.getPropagationContext();s&&n.parentSpanId?s=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(o.sampleRate),sampled:String(hm(o.spanContext))},sampleRand:o.sampleRand}),e.parentSampled=hm(o.spanContext),e.parentSampleRate=o.sampleRate,e.spanAttributes={...e.spanAttributes,[ze]:o.sampleRate})})}function hm(e){return 1===e.traceFlags}const fm={...Ln,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...im};function mm(e,t,n){e.emit("startPageLoadSpan",t,n),Ne().setTransactionName(t.name);const r=vm(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function gm(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});const s=Ne();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...da(),url:r}}),vm(e)}function _m(e){const t=aa.document,n=t?.querySelector(`meta[name=${e}]`);return n?.getAttribute("content")||void 0}const ym="_sentry_idleSpan";function vm(e){return e[ym]}function bm(e,t){re(e,ym,t)}const Sm=1.5;function wm(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function km(e){return wm(e.getAllKeys())}function Em(e){let t;function n(){return null==t&&(t=function(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=wm(n);return e=>r.then(n=>e(n.transaction(t,"readwrite").objectStore(t)))}(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async t=>{try{const r=await rn(t);await function(e,t,n){return e(e=>km(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),wm(e.transaction)}))}(n(),r,e.maxQueueSize||30)}catch{}},unshift:async t=>{try{const r=await rn(t);await function(e,t,n){return e(e=>km(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.min(...r,0)-1),wm(e.transaction)}))}(n(),r,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const e=await function(e){return e(e=>km(e).then(t=>{const n=t[0];if(null!=n)return wm(e.get(n)).then(t=>(e.delete(n),wm(e.transaction).then(()=>t)))}))}(n());if(e)return on(e)}catch{}}}}const xm=1e6,Cm=String(0),Im="main",Tm=aa.navigator;let Mm="",Rm="",Om="",Am=Tm?.userAgent||"",Lm="";const Dm=Tm?.language||Tm?.languages?.[0]||"";const Nm=Tm?.userAgentData;var Pm;function Fm(e){return function(e){return!("thread_metadata"in e)}(e)?function(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Cm]:{name:Im}}},o=e.samples[0];if(!o)return r;const s=o.timestamp,i=ve(),a="number"==typeof performance.timeOrigin?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((o,i)=>{if(void 0===o.stackId)return void 0===t&&(t=n,r.stacks[t]=[],n++),void(r.samples[i]={elapsed_since_start_ns:((o.timestamp+c-s)*xm).toFixed(0),stack_id:t,thread_id:Cm});let a=e.stacks[o.stackId];const u=[];for(;a;){u.push(a.frameId);const t=e.frames[a.frameId];t&&void 0===r.frames[a.frameId]&&(r.frames[a.frameId]={function:t.name,abs_path:"number"==typeof t.resourceId?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),a=void 0===a.parentId?void 0:e.stacks[a.parentId]}const l={elapsed_since_start_ns:((o.timestamp+c-s)*xm).toFixed(0),stack_id:n,thread_id:Cm};r.stacks[n]=u,r.samples[i]=l,n++}),r}(e):e}function $m(e,t,n,r){if("transaction"!==r.type)throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(null==n)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const o=function(e){const t=e.contexts?.trace?.trace_id;return"string"==typeof t&&32!==t.length&&ju&&p.log(`[Profiling] Invalid traceId: ${t} on profiled event`),"string"!=typeof t?"":t}(r),s=Fm(n),i=t||("number"==typeof r.start_timestamp?1e3*r.start_timestamp:1e3*ye()),a="number"==typeof r.timestamp?1e3*r.timestamp:1e3*ye();return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Ht,runtime:{name:"javascript",version:aa.navigator.userAgent},os:{name:Mm,version:Rm,build_number:Am},device:{locale:Dm,model:Lm,manufacturer:Am,architecture:Om,is_emulator:!1},debug_meta:{images:Um(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||ue(),trace_id:o,active_thread_id:Cm,relative_start_ns:"0",relative_end_ns:(1e6*(a-i)).toFixed(0)}]}}function Bm(e){return"pageload"===Mt(e).op}function Um(e){const t=Be(),n=t?.getOptions(),r=n?.stackParser;return r?function(e,t){const n=Wn(e);if(!n)return[];const r=[];for(const e of t)e&&n[e]&&r.push({type:"sourcemap",code_file:e,debug_id:n[e]});return r}(r,e):[]}"object"==typeof(Pm=Nm)&&null!==Pm&&"getHighEntropyValues"in Pm&&Nm.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Mm=e.platform||"",Om=e.architecture||"",Lm=e.model||"",Rm=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Am=`${t.brand} ${t.version}`}}).catch(e=>{});let jm=!1;function Hm(e){if(jm)return ju&&p.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return ju&&p.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=Be(),n=t?.getOptions();if(!n)return ju&&p.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;if(!("number"!=typeof(o=r)&&"boolean"!=typeof o||"number"==typeof o&&isNaN(o)?(ju&&p.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),0):!0===o||!1===o||!(o<0||o>1)||(ju&&p.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${o}.`),0)))return ju&&p.warn("[Profiling] Discarding profile because of invalid sample rate."),!1;var o;if(!r)return ju&&p.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1;return!!(!0===r||Math.random(){s&&(aa.clearTimeout(s),s=void 0),ju&&p.log(`[Profiling] stopped profiling of span: ${Mt(e).description}`),t?function(e,t){if(qm.set(e,t),qm.size>30){const e=qm.keys().next().value;qm.delete(e)}}(r,t):ju&&p.log(`[Profiling] profiler returned null profile for: ${Mt(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started")}).catch(e=>{ju&&p.log("[Profiling] error while stopping profiler:",e)})}Ne().setContext("profile",{profile_id:r,start_timestamp:t});let s=aa.setTimeout(()=>{ju&&p.log("[Profiling] max profile duration elapsed, stopping profiling for:",Mt(e).description),o()},3e4);const i=e.end.bind(e);e.end=function(){return e?(o().then(()=>{i()},()=>{i()}),e):i()}}const Gm=()=>({name:"BrowserProfiling",setup(e){const t=Ft(),n=t&&Pt(t);n&&Bm(n)&&Hm(n)&&Vm(n),e.on("spanStart",e=>{e===Pt(e)&&Hm(e)&&Vm(e)}),e.on("beforeEnvelope",e=>{if(!qm.size)return;const t=function(e){const t=[];return en(e,(e,n)=>{if("transaction"===n)for(let n=1;n{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:"SpotlightBrowser",setup:()=>{ju&&p.log("Using Sidecar URL",t)},processEvent:e=>function(e){return Boolean("transaction"===e.type&&e.spans&&e.contexts?.trace&&"ui.action.click"===e.contexts.trace.op&&e.spans.some(({description:e})=>e?.includes("#sentry-spotlight")))}(e)?null:e,afterAllSetup:e=>{!function(e,t){const n=cu("fetch");let r=0;e.on("beforeEnvelope",e=>{r>3?p.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r):n(t,{method:"POST",body:rn(e),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,p.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",e)})})}(e,t)}}};const Jm=()=>({name:"LaunchDarkly",processEvent:(e,t,n)=>ts(e)});const Ym=()=>({name:"OpenFeature",processEvent:(e,t,n)=>ts(e)});const Xm=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){ne(e.prototype,"isEnabled",Zm)},processEvent:(e,t,n)=>ts(e)});function Zm(e){return function(...t){const n=t[0],r=e.apply(this,t);return"string"==typeof n&&"boolean"==typeof r?(ns(n,r),rs(n,r)):ju&&p.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const Qm=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",e=>{ns(e.gate.name,e.gate.value),rs(e.gate.name,e.gate.value)})},processEvent:(e,t,n)=>ts(e)});const eg=({worker:e})=>({name:"WebWorker",setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>tg(e))},addWorker:e=>tg(e)});function tg(e){e.addEventListener("message",e=>{var t;U(t=e.data)&&!0===t._sentryMessage&&"_sentryDebugIds"in t&&(U(t._sentryDebugIds)||void 0===t._sentryDebugIds)&&(e.stopImmediatePropagation(),ju&&p.log("Sentry debugId web worker message received",e.data),aa._sentryDebugIds={...e.data._sentryDebugIds,...aa._sentryDebugIds})})}var ng=Object.freeze({__proto__:null,BrowserClient:Aa,OpenFeatureIntegrationHook:class{after(e,t){ns(t.flagKey,t.value),rs(t.flagKey,t.value)}error(e,t,n){ns(e.flagKey,e.defaultValue),rs(e.flagKey,e.defaultValue)}},SDK_VERSION:n,SEMANTIC_ATTRIBUTE_SENTRY_OP:qe,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:We,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:He,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:je,Scope:Te,WINDOW:aa,addBreadcrumb:eo,addEventProcessor:tr,addIntegration:pr,breadcrumbsIntegration:zu,browserApiErrorsIntegration:Wu,browserProfilingIntegration:Gm,browserSessionIntegration:Ju,browserTracingIntegration:(e={})=>{const n={name:void 0,source:void 0},r=aa.document,{enableInp:o,enableElementTiming:s,enableLongTask:i,enableLongAnimationFrame:a,_experiments:{enableInteractions:c,enableStandaloneClsSpans:u,enableStandaloneLcpSpans:l},beforeStartSpan:d,idleTimeout:h,finalTimeout:f,childSpanTimeout:m,markBackgroundSpan:g,traceFetch:_,traceXHR:y,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:b,enableHTTPTimings:S,ignoreResourceSpans:w,ignorePerformanceApiSpans:k,instrumentPageLoad:E,instrumentNavigation:x,detectRedirects:C,linkPreviousTrace:I,consistentTraceSampling:T,onRequestSpanStart:M}={...fm,...e};let R,O;function A(e,t,o=!0){const s="pageload"===t.op,i=d?d(t):t,a=i.attributes||{};if(t.name!==i.name&&(a[je]="custom",i.attributes=a),!o){const e=me();return void kn({...i,startTime:e}).end(e)}n.name=i.name,n.source=a[je];const c=Dn(i,{idleTimeout:h,finalTimeout:f,childSpanTimeout:m,disableAutoFinish:s,beforeSpanEnd:t=>{R?.(),Kc(t,{recordClsOnPageloadSpan:!u,recordLcpOnPageloadSpan:!l,ignoreResourceSpans:w,ignorePerformanceApiSpans:k}),bm(e,void 0);const n=Ne(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:c.spanContext().traceId,sampled:Rt(c),dsc:Gt(t)})}});function p(){r&&["interactive","complete"].includes(r.readyState)&&e.emit("idleSpanEnableAutoFinish",c)}bm(e,c),s&&r&&(r.addEventListener("readystatechange",()=>{p()}),p())}return{name:"BrowserTracing",setup(e){if(Ut(),R=Gc({recordClsStandaloneSpans:u||!1,recordLcpStandaloneSpans:l||!1,client:e}),o&&vu(),s&&Nc()&&ve()&&kc("element",Xc),a&&t.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(e=>{const t=Ft();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=Pc(ve()+n.startTime),{start_timestamp:r,op:o}=Mt(t);if("navigation"===o&&r&&e{const t=Ft();if(!t)return;const{op:n,start_timestamp:r}=Mt(t);for(const o of e){const e=Pc(ve()+o.startTime),s=Pc(o.duration);"navigation"===n&&r&&e{const t=Ft();if(t)for(const n of e)if("click"===n.name){const e=Pc(ve()+n.startTime),r=Pc(n.duration),o={name:G(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[We]:"auto.ui.browser.metrics"}},s=Y(n.target);s&&(o.attributes["ui.component_name"]=s),Lc(t,e,e+r,o)}}),C&&r){const e=()=>{O=ye()};addEventListener("click",e,{capture:!0}),addEventListener("keydown",e,{capture:!0,passive:!0})}function n(){const t=vm(e);t&&!Mt(t).timestamp&&(ju&&p.log(`[Tracing] Finishing current active span with op: ${Mt(t).op}`),t.setAttribute(Ve,"cancelled"),t.end())}e.on("startNavigationSpan",(t,r)=>{if(Be()!==e)return;if(r?.isRedirect)return ju&&p.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void A(e,{op:"navigation.redirect",...t},!1);O=void 0,n(),Pe().setPropagationContext({traceId:ke(),sampleRand:Math.random()});const o=Ne();o.setPropagationContext({traceId:ke(),sampleRand:Math.random()}),o.setSDKProcessingMetadata({normalizedRequest:void 0}),A(e,{op:"navigation",...t})}),e.on("startPageLoadSpan",(t,r={})=>{if(Be()!==e)return;n();const o=bt(r.sentryTrace||_m("sentry-trace"),r.baggage||_m("baggage")),s=Ne();s.setPropagationContext(o),s.setSDKProcessingMetadata({normalizedRequest:da()}),A(e,{op:"pageload",...t})})},afterAllSetup(e){let t=J();if("off"!==I&&pm(e,{linkPreviousTrace:I,consistentTraceSampling:T}),aa.location){if(E){const t=ve();mm(e,{name:aa.location.pathname,startTime:t?t/1e3:void 0,attributes:{[je]:"url",[We]:"auto.pageload.browser"}})}x&&su(({to:n,from:r})=>{if(void 0===r&&-1!==t?.indexOf(n))return void(t=void 0);t=void 0;const o=zr(n),s=vm(e),i=s&&C&&function(e,t){const n=Mt(e),r=me(),o=n.start_timestamp;if(r-o>Sm)return!1;if(t&&r-t<=Sm)return!1;return!0}(s,O);gm(e,{name:o?.pathname||aa.location.pathname,attributes:{[je]:"url",[We]:"auto.navigation.browser"}},{url:n,isRedirect:i})})}g&&(aa.document?aa.document.addEventListener("visibilitychange",()=>{const e=Ft();if(!e)return;const t=Pt(e);if(aa.document.hidden&&t){const e="cancelled",{op:n,status:r}=Mt(t);ju&&p.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):ju&&p.warn("[Tracing] Could not set up background tab detection due to lack of global document")),c&&function(e,t,n,r,o){const s=aa.document;let i;const a=()=>{const s="ui.action.click",a=vm(e);if(a){const e=Mt(a).op;if(["navigation","pageload"].includes(e))return void(ju&&p.warn(`[Tracing] Did not create ${s} span because a pageload or navigation span is in progress.`))}i&&(i.setAttribute(Ve,"interactionInterrupted"),i.end(),i=void 0),o.name?i=Dn({name:o.name,op:s,attributes:{[je]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r}):ju&&p.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`)};s&&addEventListener("click",a,{capture:!0})}(e,h,f,m,n),o&&function(){const e=({entries:e})=>{const t=Ft(),n=t&&Pt(t);e.forEach(e=>{if(!function(e){return"duration"in e}(e)||!n)return;const t=e.interactionId;if(null!=t&&!yu.has(t)){if(_u.length>10){const e=_u.shift();yu.delete(e)}_u.push(t),yu.set(t,n)}})};kc("event",e),kc("first-input",e)}(),am(e,{traceFetch:_,traceXHR:y,trackFetchStreamPerformance:v,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:S,onRequestSpanStart:M})}}},buildLaunchDarklyFlagUsedHandler:function(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{ns(e,t.value),rs(e,t.value)}}},captureConsoleIntegration:ko,captureEvent:Xn,captureException:Jn,captureFeedback:cs,captureMessage:Yn,captureSession:sr,chromeStackLineParser:Tu,close:async function(t){const n=Be();return n?n.close(t):(e&&p.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))},consoleLoggingIntegration:ls,contextLinesIntegration:ml,continueTrace:(e,t)=>{const n=De(r());if(n.continueTrace)return n.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=Be(),a=ct(s);return i&&!function(e,t){const n=gt(e);return t&&n&&t!==n?(p.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):!e.getOptions().strictTraceContinuation||!(t&&!n||!t&&n)||(p.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1)}(i,a?.org_id)?Cn(t):$e(e=>{const n=bt(o,s);return e.setPropagationContext(n),t()})},createTransport:$r,createUserFeedbackEnvelope:function(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:(new Date).toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ht(r)}},s=function(e){return[{type:"user_report"},e]}(e);return Zt(o,[s])},dedupeIntegration:Eo,defaultRequestInstrumentationOptions:im,defaultStackLineParsers:$u,defaultStackParser:Bu,diagnoseSdkConnectivity:async function(){const e=Be();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await xn(()=>fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}},endSession:rr,eventFiltersIntegration:so,eventFromException:Ia,eventFromMessage:Ta,exceptionFromError:va,extraErrorDataIntegration:To,featureFlagsIntegration:os,feedbackAsyncIntegration:ma,feedbackIntegration:ga,feedbackSyncIntegration:ga,flush:async function(t){const n=Be();return n?n.flush(t):(e&&p.warn("Cannot flush events. No client defined."),Promise.resolve(!1))},forceLoad:function(){},functionToStringIntegration:ro,geckoStackLineParser:Ou,getActiveSpan:Ft,getClient:Be,getCurrentScope:Ne,getDefaultIntegrations:nl,getFeedback:function(){const e=Be();return e?.getIntegrationByName("Feedback")},getGlobalScope:Fe,getIsolationScope:Pe,getReplay:function(){const e=Be();return e?.getIntegrationByName("Replay")},getRootSpan:Pt,getSpanDescendants:Nt,getSpanStatusFromHttpCode:tt,getTraceData:Zr,globalHandlersIntegration:Yu,graphqlClientIntegration:vl,httpClientIntegration:al,httpContextIntegration:Qu,inboundFiltersIntegration:io,init:rl,instrumentOutgoingRequests:am,instrumentSupabaseClient:Wo,isEnabled:er,isInitialized:function(){return!!Be()},lastEventId:Qn,launchDarklyIntegration:Jm,lazyLoadIntegration:fa,linkedErrorsIntegration:el,logger:ya,makeBrowserOfflineTransport:function(e=wu){return function(e){return t=>{const n=e({...t,createStore:Em});return aa.addEventListener("online",async e=>{await n.flush()}),n}}(Ur(e))},makeFetchTransport:wu,makeMultiplexedTransport:function(e,t){return n=>{const r=e(n),o=new Map;function s(t,r){const s=r?`${t}:${r}`:t;let i=o.get(s);if(!i){const a=ft(t);if(!a)return;const c=ar(a,n.tunnel);i=r?function(e,t){return n=>{const r=e(n);return{...r,send:async e=>{const n=jr(e,["event","transaction","profile","replay_event"]);return n&&(n.release=t),r.send(e)}}}}(e,r)({...n,url:c}):e({...n,url:c}),o.set(s,i)}return[t,i]}return{send:async function(e){const n=t({envelope:e,getEvent:function(t){return jr(e,t?.length?t:["event"])}}).map(e=>"string"==typeof e?s(e,void 0):s(e.dsn,e.release)).filter(e=>!!e),o=n.length?n:[["",r]];return(await Promise.all(o.map(([t,n])=>n.send(function(e,t){return Zt(t?{...e[0],dsn:t}:e[0],e[1])}(e,t)))))[0]},flush:async function(e){const t=[...o.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}}}},moduleMetadataIntegration:vo,onLoad:function(e){e()},openFeatureIntegration:Ym,opera10StackLineParser:Nu,opera11StackLineParser:Fu,parameterize:Jr,registerSpanErrorInstrumentation:Ut,registerWebWorker:function({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0})},replayCanvasIntegration:nm,replayIntegration:e=>new kf(e),reportingObserverIntegration:il,rewriteFramesIntegration:Do,sendFeedback:Ts,setContext:Zn,setCurrentClient:Ar,setExtra:function(e,t){Pe().setExtra(e,t)},setExtras:function(e){Pe().setExtras(e)},setHttpStatus:nt,setMeasurement:mn,setTag:function(e,t){Pe().setTag(e,t)},setTags:function(e){Pe().setTags(e)},setUser:function(e){Pe().setUser(e)},showReportDialog:function(e={}){const t=aa.document,n=t?.head||t?.body;if(!n)return void(ju&&p.error("[showReportDialog] Global document not defined"));const r=Ne(),o=Be(),s=o?.getDsn();if(!s)return void(ju&&p.error("[showReportDialog] DSN not configured"));const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Qn()},a=aa.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=function(e,t){const n=_t(e);if(!n)return"";const r=`${ir(n)}embed/error-page/`;let o=`dsn=${ht(n)}`;for(const e in t)if("dsn"!==e&&"onClose"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(o+=`&name=${encodeURIComponent(e.name)}`),e.email&&(o+=`&email=${encodeURIComponent(e.email)}`)}else o+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${o}`}(s,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{u()}finally{aa.removeEventListener("message",e)}};aa.addEventListener("message",e)}n.appendChild(a)},spanToBaggageHeader:function(e){return ut(Gt(e))},spanToJSON:Mt,spanToTraceHeader:xt,spotlightBrowserIntegration:Km,startBrowserTracingNavigationSpan:gm,startBrowserTracingPageLoadSpan:mm,startInactiveSpan:kn,startNewTrace:Cn,startSession:nr,startSpan:wn,startSpanManual:function(e,t){const n=Mn();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Tn(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return $e(a,()=>An(s)(()=>{const n=Ne(),i=On(n,s),a=e.onlyIfParent&&!i?new Kt:In({parentSpan:i,spanArguments:r,forceTransaction:o,scope:n});return Ce(n,a),bn(()=>t(a,()=>a.end()),()=>{const{status:e}=Mt(a);!a.isRecording()||e&&"ok"!==e||a.setStatus({code:2,message:"internal_error"})})}))},statsigIntegration:Qm,supabaseIntegration:Vo,suppressTracing:xn,thirdPartyErrorFilterIntegration:Zo,unleashIntegration:Xm,updateSpanName:function(e,t){e.updateName(t),e.setAttributes({[je]:"custom",[Je]:t})},webWorkerIntegration:eg,winjsStackLineParser:Lu,withActiveSpan:En,withIsolationScope:function(...e){const t=De(r());if(2===e.length){const[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])},withScope:$e,zodErrorsIntegration:Xo});async function rg(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}"function"==typeof SuppressedError&&SuppressedError;const og=()=>({name:"TauriNormalizeUrls",processEvent:e=>function(e,t){const n=new RegExp(`${r=t,r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|(?=[?#\\s])|$)`,"g");var r;const o=e=>e.replace(n,"app:///");for(const t of e.exception?.values||[])for(const e of t.stacktrace?.frames||[])e.filename&&(e.filename=o(e.filename)),e.abs_path&&(e.abs_path=o(e.abs_path));for(const t of e.debug_meta?.images||[])"sourcemap"===t.type&&(t.code_file=o(t.code_file));e.transaction&&(e.transaction=o(e.transaction)),e.request?.url&&(e.request.url=o(e.request.url));for(const t of e.spans||[]){t.description&&(t.description=o(t.description));for(const e of["url","url.full","http.url"]){const n=t.data?.[e];"string"==typeof n&&(t.data[e]=o(n))}}const s=e.urls;return Array.isArray(s)&&(e.urls=s.map(e=>"string"==typeof e?o(e):e)),e}(e,window.location.origin)});function sg(e){try{return JSON.stringify(e)}catch{return}}function ig(e,t){const n={},r=new Set;for(const[o,s]of Object.entries(t)){const t=void 0===s?void 0:sg(s);void 0!==t&&(r.add(o),e.get(o)!==t&&(e.set(o,t),n[o]=s))}for(const t of e.keys())r.has(t)||(e.delete(t),n[t]=null);return Object.keys(n).length?n:void 0}function ag(){return{name:"ScopeToRust",setup(){const e=function(){const e=new Map,t=new Map,n=new Map,r=new Map;return o=>{const s={};ig(e,o.user||{})&&(s.user=e.size?Object.fromEntries([...e].map(([e,t])=>[e,JSON.parse(t)])):null);const i=ig(t,o.tags||{});i&&(s.tags=i);const a=ig(n,o.extra||{});a&&(s.extra=a);const c=ig(r,o.contexts||{});return c&&(s.contexts=c),Object.keys(s).length?s:void 0}}();let t=!1,n=!1;const r=()=>{n=!1;const r=e(function(){const e=[Fe(),Pe(),Ne()].map(e=>e.getScopeData()),t=t=>Object.assign({},...e.map(e=>e[t]));return{user:t("user"),tags:t("tags"),extra:t("extra"),contexts:t("contexts")}}());r&&!t&&rg("plugin:sentry|scope",{scope:r}).catch(e=>{console.error("Failed to send scope to Rust:",e),t=!0})},o=()=>{n||(n=!0,queueMicrotask(r))};Fe().addScopeListener(o),Pe().addScopeListener(o),Ne().addScopeListener(o),o()}}}let cg=!1;const ug={dsn:"https://123456@dummy.dsn/0",integrations:e=>[...e.filter(e=>"BrowserSession"!==e.name),ag(),og()],transport:function(e){return $r(e,async e=>{if(cg)return{statusCode:200};try{await rg("plugin:sentry|envelope",{envelope:e.body})}catch(e){console.error("Failed to send envelope to Rust:",e),cg=!0}return{statusCode:200}})},beforeBreadcrumb:function(e){return cg||"string"==typeof e.data?.url&&(e.data.url.startsWith("ipc://")||e.data.url.match(/^https?:\/\/ipc\.localhost/))||rg("plugin:sentry|breadcrumb",{breadcrumb:e}).catch(e=>{console.error("Failed to send breadcrumb to Rust:",e),cg=!0}),null}};window.Sentry=ng,rl({...ug,debug:__DEBUG__})}(); +!function(){"use strict";const e="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,t=globalThis,n="11.10.0";function r(){return o(t),t}function o(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||n,t[n]=t[n]||{}}function s(e,r,o=t){const s=o.__SENTRY__=o.__SENTRY__||{},i=s[n]=s[n]||{};return i[e]||(i[e]=r())}const i=["debug","info","warn","error","log","assert","trace"],a={};function c(e){if(!("console"in t))return e();const n=t.console,r={},o=Object.keys(a);o.forEach(e=>{const t=a[e];r[e]=n[e],n[e]=t});try{return e()}finally{o.forEach(e=>{n[e]=r[e]})}}function u(){return d().enabled}function l(n,...r){e&&u()&&c(()=>{t.console[n](`Sentry Logger [${n}]:`,...r)})}function d(){return e?s("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const p={enable:function(){d().enabled=!0},disable:function(){d().enabled=!1},isEnabled:u,log:function(...e){l("log",...e)},warn:function(...e){l("warn",...e)},error:function(...e){l("error",...e)}},f="?",h=/\(error: (.*)\)/,m=/captureMessage|captureException/;function g(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let e=n;e1024&&(n=n.slice(0,1024));const i=h.test(n)?n.replace(h,"$1"):n;if(!i.includes("Error: ")){for(const e of t){const t=e(i);if(t){o.push(t);break}}if(o.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(y(t).function||"")&&t.pop();t.reverse(),m.test(y(t).function||"")&&(t.pop(),m.test(y(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||y(t).filename,function:e.function||f}))}(o.slice(r))}}function y(e){return e[e.length-1]||{}}const _="";function v(e){try{return e&&"function"==typeof e&&e.name||_}catch{return _}}function b(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function S(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const w={},k={};function E(e,t){return w[e]=w[e]||[],w[e].push(t),()=>{const n=w[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function x(t,n){if(!k[t]){k[t]=!0;try{n()}catch(n){e&&p.error(`Error while instrumenting ${t}`,n)}}}function T(t,n){const r=t&&w[t];if(r)for(const o of r)try{o(n)}catch(n){e&&p.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${v(o)}\nError:`,n)}}let I=null;function C(e){const t="error";E(t,e),x(t,R)}function R(){I=t.onerror,t.onerror=function(e,t,n,r,o){return T("error",{column:r,error:o,line:n,msg:e,url:t}),!!I&&I.apply(this,arguments)},t.onerror.__SENTRY_INSTRUMENTED__=!0}let M=null;function O(e){const t="unhandledrejection";E(t,e),x(t,A)}function A(){M=t.onunhandledrejection,t.onunhandledrejection=function(e){return T("unhandledrejection",e),!M||M.apply(this,arguments)},t.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const L=Object.prototype.toString;function P(e){switch(L.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return G(e,Error)}}function D(e,t){return L.call(e)===`[object ${t}]`}function N(e){return D(e,"ErrorEvent")}function $(e){return D(e,"DOMError")}function F(e){return D(e,"String")}function B(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function j(e){return null===e||B(e)||"object"!=typeof e&&"function"!=typeof e}function U(e){return D(e,"Object")}function z(e){return"object"==typeof e&&null!==e}function q(e){return"undefined"!=typeof Event&&G(e,Event)}function W(e){return D(e,"RegExp")}function H(e){return Boolean(e?.then&&"function"==typeof e.then)}function G(e,t){try{return e instanceof t}catch{return!1}}function J(e){return"undefined"!=typeof Request&&G(e,Request)}function V(t,n,r){if(!(n in t))return;const o=t[n];if("function"!=typeof o)return;const s=r(o);"function"==typeof s&&Y(s,o);try{t[n]=s}catch{e&&p.log(`Failed to replace method "${n}" in object`,t)}}function K(t,n,r){try{Object.defineProperty(t,n,{value:r,writable:!0,configurable:!0})}catch{e&&p.log(`Failed to add non-enumerable property "${String(n)}" to object`,t)}}function Y(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,K(e,"__sentry_original__",t)}catch{}}function X(e){return e.__sentry_original__}function Q(e){if(P(e))return{message:e.message,name:e.name,stack:e.stack,...Z(e)};if(q(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...Z(e)}}return e}function Z(e){return z(e)?Object.fromEntries(Object.entries(e)):{}}let ee;function te(e){if(void 0!==ee)return ee?ee(e):e();const n=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=t;return n in r&&"function"==typeof r[n]?(ee=r[n],ee(e)):(ee=null,e())}function ne(){return te(()=>Math.random())}function re(){return te(()=>Date.now())}const oe=Symbol.for("sentry.skipNormalization"),se=Symbol.for("sentry.overrideNormalizationDepth");let ie,ae;function ce(e,t=100,n=1/0){try{return le("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function ue(e,t=3,n=102400){const r=ce(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?ue(e,t-1,n):r;var o}function le(e,t,n=1/0,r=1/0,o=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=de(e,t);if(!a.startsWith("[object "))return a;if(function(e){return Boolean(e[oe])}(t))return t;const c=function(e){const t=e[se];return"number"==typeof t?t:void 0}(t),u=void 0!==c?c:n;if(0===u)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return le("",l.toJSON(),u-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let p=0;const f=Q(t);for(const e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(p>=r){d[e]="[MaxProperties ~]";break}const t=f[e];d[e]=le(e,t,u-1,r,o),p++}return i(t),d}function de(e,t){try{if(ie){const e=ie(t);if(e)return e}if("undefined"!=typeof global&&t===global)return"[Global]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${v(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const e=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return`[object ${e}]`}catch(e){return`**non-serializable** (${e})`}}function pe(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function fe(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),se.randomUUID()).replace(/-/g,"")}catch{}return ae||(ae="10000000100040008000100000000000"),ae.replace(/[018]/g,e=>(e^(16*ne()&15)>>e/4).toString(16))}function _e(e){return e.exception?.values?.[0]}function ve(e){const{message:t,event_id:n}=e;if(t)return t;const r=_e(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function be(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Se(e,t){const n=_e(e);n&&we(n,t)}function we(e,t){const n=e.mechanism;e.mechanism={type:"generic",handled:!0,...n,...t},t&&"data"in t&&(e.mechanism.data={...n?.data,...t.data})}function ke(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{K(e,"__sentry_captured__",!0)}catch{}return!1}const Ee=1e3;function xe(){return re()/Ee}let Te,Ie=[];function Ce(){const{performance:e}=t;return e?.now?te(()=>e.now()):void 0}let Re=!1;function Me(e,t=e){const n=Ae(t);return null==n?void 0:(n+e)/Ee}function Oe(){return(Te??(Te=function(){const{performance:e}=t;if(!e?.now||!e.timeOrigin)return e?.now&&(Ie=[{from:0,origin:re()-te(()=>e.now())}]),xe;let n=e.timeOrigin;Ie=[{from:0,origin:n}];let r=!0,o=0;return()=>te(()=>{const t=e.now(),s=Date.now();return Math.abs(n+t-s)>1e3&&(n=s-t,r?Ie=[{from:0,origin:n}]:(Ie.push({from:o,origin:n}),Ie.length>100&&Ie.splice(1,1))),r=!1,o=t,(n+t)/Ee})}()))()}function Ae(e=0){let t;Re||(Re=!0,Promise.resolve().then(()=>{Re=!1}),Oe());for(const n of Ie){if(t&&n.from>e)break;t=n}return t?.origin}function Le(e){const t=Oe(),n={sid:ye(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${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}}}(n)};return e&&Pe(n,e),n}function Pe(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||Oe(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ye()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const 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),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function De(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=De(r[e],t[e],n-1));return r}function Ne(){return ye()}function $e(){return ye().substring(16)}class Fe{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},K(this,"refs",{}),this._propagationContext={traceId:Ne(),sampleRand:ne()}}clone(){const e=new Fe;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,e.refs={...this.refs},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&&Pe(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 null===t?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;const t="function"==typeof e?e(this):e,n=t instanceof Fe?t.getScopeData():U(t)?e:void 0,{tags:r,attributes:o,extra:s,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:l,conversationId:d}=n||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),d&&(this._conversationId=d),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:xe(),...e,message:e.message?pe(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n)),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,conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=De(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||ye();if(!this._client)return e&&p.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r?.event_id||ye();if(!this._client)return e&&p.warn("No client configured on scope - will not capture message!"),o;const s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){const r=t.event_id||n?.event_id||ye();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(e&&p.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const Be="__SENTRY_SUPPRESS_TRACING__",je=e=>e instanceof Promise&&!e[Ue],Ue=Symbol("chained PromiseLike"),ze=(e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return je(r)&&je(e)?r:qe(e,r)},qe=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const o=e[r];"function"==typeof o?Object.defineProperty(t,r,{value:(...t)=>o.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[Ue]:!0}),t};class We{constructor(e,t){let n,r;n=e||new Fe,r=t||new Fe,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return H(n)?ze(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(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function He(){const e=o(r());return e.stack=e.stack||new We(s("defaultCurrentScope",()=>new Fe),s("defaultIsolationScope",()=>new Fe))}function Ge(e){return He().withScope(e)}function Je(e,t){const n=He();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ve(e){return He().withScope(()=>e(He().getIsolationScope()))}function Ke(e){return Ge(t=>{t.setSDKProcessingMetadata({[Be]:!0});const n=e();return t.setSDKProcessingMetadata({[Be]:void 0}),n})}function Ye(e){const t=o(e);return t.acs?t.acs:{suppressTracing:Ke,withIsolationScope:Ve,withScope:Ge,withSetScope:Je,withSetIsolationScope:(e,t)=>Ve(t),getCurrentScope:()=>He().getScope(),getIsolationScope:()=>He().getIsolationScope()}}function Xe(e,t){const{value:n,unit:r}="object"==typeof(o=e)&&null!=o&&!Array.isArray(o)&&Object.keys(o).includes("value")?e:{value:e,unit:void 0};var o;const s=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),i=r&&"string"==typeof r?{unit:r}:{};if(s)return{...s,...i};if(!t||"skip-undefined"===t&&void 0===n)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...i}}function Qe(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const e=Xe(o,t);e&&(n[r]=e)}return n}function Ze(e){if(!e)return 0;let t=0;for(const[n,r]of Object.entries(e)){t+=2*n.length,t+=2*r.type.length,t+=2*(r.unit?.length??0);const e=r.value;Array.isArray(e)?t+=et(e[0])*e.length:j(e)?t+=et(e):t+=100}return t}function et(e){return"string"==typeof e?2*e.length:"boolean"==typeof e?4:"number"==typeof e?8:0}function tt(){return o(r()).externalPropagationContextProvider?.()}function nt(){return Ye(r()).getCurrentScope()}function rt(){return Ye(r()).getIsolationScope()}function ot(){return s("globalScope",()=>new Fe)}function st(...e){const t=Ye(r());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function it(){return nt().getClient()}function at(e){const t=tt();if(t)return{trace_id:t.traceId,span_id:t.spanId};const n=e.getPropagationContext(),{traceId:r,parentSpanId:o,propagationSpanId:s}=n,i={trace_id:r,span_id:s||$e()};return o&&(i.parent_span_id=o),i}const ct="browser.bfcache.frame",ut="browser.bfcache.not_restored_reason_count",lt="browser.bfcache.outcome",dt="browser.bfcache.reason",pt="browser.navigation.id",ft="browser.navigation.type",ht="browser.paint.type",mt="browser.web_vital.inp.target",gt="db.operation.name",yt="db.system.name",_t="graphql.document",vt="graphql.operation.name",bt="graphql.operation.type",St="http.method",wt="http.request.method",kt="http.request.same_origin",Et="http.response.body.size",xt="http.response.size",Tt="http.response.status_code",It="http.route",Ct="network.connection.effective_type",Rt="network.connection.rtt",Mt="network.connection.type",Ot="router.navigation.route.id",At="sentry.environment",Lt="sentry.exclusive_time",Pt="sentry.idle_span_finish_reason",Dt="sentry.is_localhost",Nt="sentry.link.type",$t="sentry.op",Ft="sentry.origin",Bt="sentry.profile_id",jt="sentry.release",Ut="sentry.replay_id",zt="sentry.sdk.integrations",qt="sentry.sdk.name",Wt="sentry.sdk.version",Ht="sentry.segment.id",Gt="sentry.segment.name",Jt="sentry.segment.name.source",Vt="sentry.status.message",Kt="sentry.trace_lifecycle",Yt="sentry.transaction",Xt="server.address",Qt="ui.component_name",Zt="url.domain",en="url.fragment",tn="url.full",nn="url.path",rn="url.query",on="url.scheme",sn="url.template",an="user_agent.original",cn="user.email",un="user.id",ln="user.ip_address",dn="user.name",pn="sentry.sample_rate",fn="sentry.previous_trace_sample_rate",hn="sentry.measurement_unit",mn="sentry.measurement_value",gn="sentry.custom_span_name",yn=["ok","deadline_exceeded","unauthenticated","permission_denied","not_found","resource_exhausted","invalid_argument","unimplemented","unavailable","internal_error","unknown_error","cancelled","already_exists","failed_precondition","aborted","out_of_range","data_loss"];function _n(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}function vn(e,t){e.setAttribute("http.response.status_code",t);const n=_n(t);"unknown_error"!==n.message&&e.setStatus(n)}function bn(e){try{const n=t.WeakRef;if("function"==typeof n)return new n(e)}catch{}return e}function Sn(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}const wn="_sentryScope",kn="_sentryIsolationScope",En=Symbol.for("sentry.tracerProviderSpan");function xn(e,t,n){e&&(K(e,kn,bn(n)),K(e,wn,t))}function Tn(e){const t=e;return{scope:t[wn],isolationScope:Sn(t[kn])}}function In(e){return!0===e[En]}const Cn="sentry-";function Rn(e){const t=function(e){if(!e||!F(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=On(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return On(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(Cn)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function Mn(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce((t,[n,r],o)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=0===o?s:`${t},${s}`;return i.length>8192?(e&&p.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}(Object.entries(t).reduce((e,[t,n])=>(n&&(e[`${Cn}${t}`]=n),e),{}))}function On(e){return e.split(",").map(e=>{const t=e.indexOf("=");if(-1===t)return[];return[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),{})}const An=/^o(\d+)\./,Ln=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Pn(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function Dn(e){const t=Ln.exec(e);if(!t)return void c(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,o="",s="",i="",a=""]=t.slice(1);let u="",l=a;const d=l.split("/");if(d.length>1&&(u=d.slice(0,-1).join("/"),l=d.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Nn({host:s,pass:o,path:u,projectId:l,port:i,protocol:n,publicKey:r})}function Nn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function $n(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(An);return t?.[1]}(n)),r}function Fn(t){const n="string"==typeof t?Dn(t):Nn(t);if(n&&function(t){if(!e)return!0;const{port:n,projectId:r,protocol:o}=t;return!(["protocol","publicKey","host","projectId"].find(e=>!t[e]&&(p.error(`Invalid Sentry Dsn: ${e} missing`),!0))||(r.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(o)?n&&isNaN(parseInt(n,10))&&(p.error(`Invalid Sentry Dsn: Invalid port ${n}`),1):(p.error(`Invalid Sentry Dsn: Invalid protocol ${o}`),1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),1)))}(n))return n}function Bn(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}const jn=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Un(e,t){const n=function(e){if(!e)return;const t=e.match(jn);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=Rn(t);if(!n?.traceId)return{traceId:Ne(),sampleRand:ne()};const o=function(e,t){const n=Bn(t?.sample_rand);if(void 0!==n)return n;const r=Bn(t?.sample_rate);return r&&void 0!==e?.parentSampled?e.parentSampled?ne()*r:r+ne()*(1-r):ne()}(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function zn(e=Ne(),t=$e(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function qn(e=Ne(),t=$e(),n){return`00-${e}-${t}-${n?"01":"00"}`}const Wn="span";function Hn(e,t){t?e.refs[Wn]=bn(t):delete e.refs[Wn]}function Gn(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=Zn(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Jn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Zn(e).parent_span_id,s=Tn(e).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||$e():t,trace_id:n}}function Vn(e){const{traceId:t,spanId:n}=e.spanContext();return zn(t,n,sr(e))}function Kn(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:1===n,attributes:o,...r})):void 0}function Yn(e){return e?.length?e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:1===n,attributes:r})):void 0}function Xn(e){return"number"==typeof e?Qn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Qn(e.getTime()):Oe()}function Qn(e){return e>9999999999?e/1e3:e}function Zn(e){if(or(e))return e.getStaticSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(rr(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:tr(e),start_timestamp:Xn(o),timestamp:Xn(i)||void 0,status:ir(a),op:r[$t],origin:r[Ft],links:Kn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,status:"ok",data:{}}}function er(e){if(or(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(rr(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{name:s,span_id:t,trace_id:n,parent_span_id:tr(e),start_timestamp:Xn(o),end_timestamp:Xn(i)||void 0,is_segment:mr(e),status:ar(a),attributes:cr(r,a),links:Yn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",status:"ok",is_segment:mr(e),attributes:{}}}function tr(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function nr(e){return{...e,end_timestamp:e.end_timestamp??e.start_timestamp,attributes:Qe(e.attributes),links:e.links?.map(e=>({...e,attributes:Qe(e.attributes)}))}}function rr(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function or(e){return"function"==typeof e.getSpanJSON}function sr(e){const{traceFlags:t}=e.spanContext();return 1===t}function ir(e){return e&&0!==e.code?1===e.code?"ok":e.message&&("ok"!==(t=e.message)&&yn.includes(t))?e.message:"internal_error":"ok";var t}function ar(e){return e&&1!==e.code&&0!==e.code&&"cancelled"!==e.message?"error":"ok"}function cr(e,t){const n="error"===ar(t)?t?.message:void 0;return{...n&&{[Vt]:n},...e}}const ur="_sentryChildSpans",lr="_sentryRootSpan";function dr(e,t){const n=e[lr]||e;K(t,lr,n),t.setAttribute(Jt,void 0),sr(e)&&(e.isRecording()||n.isRecording())&&(e[ur]?e[ur].add(t):K(e,ur,new Set([t])))}function pr(e){const t=new Set;return function e(n){if(!t.has(n)&&sr(n)){t.add(n);const r=n[ur]?Array.from(n[ur]):[];for(const t of r)e(t)}}(e),Array.from(t)}const fr=hr;function hr(e){return e[lr]||e}function mr(e){return e===hr(e)}function gr(e){const t=Ye(r());return t.getActiveSpan?t.getActiveSpan(e):function(e){return Sn(e.refs[Wn])}(e||nt())}function yr(e,t){mr(e)&&e.setAttribute(Jt,t)}let _r=!1;function vr(){function t(){const t=gr(),n=t&&fr(t);if(n){const t="internal_error";e&&p.log(`[Tracing] Root span: ${t} -> Global error occurred`),n.setStatus({code:2,message:t})}}_r||(_r=!0,C(t),O(t))}function br(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||it()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function Sr(e){p.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function wr(t,n){if(!n?.length)return!1;for(const r of n){if(xr(r)){if(t.description&&me(t.description,r))return e&&Sr(t),!0;continue}const n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;const o=!r.name||t.description&&me(t.description,r.name),s=!r.op||t.op&&me(t.op,r.op),i=!r.attributes||Object.entries(r.attributes).every(([e,n])=>kr(t.attributes?.[e],n));if(o&&s&&i)return e&&Sr(t),!0}return!1}function kr(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?me(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Er(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function xr(e){return"string"==typeof e||e instanceof RegExp}const Tr=[];function Ir(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function Cr(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Rr(t,n,r){if(r[n.name])e&&p.log(`Integration skipped because it was already installed: ${n.name}`);else{if(r[n.name]=n,Tr.includes(n.name)||"function"!=typeof n.setupOnce||(n.setupOnce(),Tr.push(n.name)),n.setup&&"function"==typeof n.setup&&n.setup(t),"function"==typeof n.preprocessEvent){const e=n.preprocessEvent.bind(n);t.on("preprocessEvent",(n,r)=>e(n,r,t))}if("function"==typeof n.processEvent){const e=n.processEvent.bind(n),r=Object.assign((n,r)=>e(n,r,t),{id:n.name});t.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach(e=>{const r=n[e];"function"==typeof r&&t.on(e,e=>r.call(n,e,t))}),e&&p.log(`Integration installed: ${n.name}`)}}function Mr(t){const n=it();n?n.addIntegration(t):e&&p.warn(`Cannot add integration "${t.name}" because no SDK Client is available.`)}const Or="production",Ar=Symbol.for("sentry.nonRecordingSpan");class Lr{constructor(e={}){this._traceId=e.traceId||Ne(),this._spanId=e.spanId||$e(),this.dropReason=e.dropReason,K(this,Ar,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function Pr(e){return!!e&&!0===e[Ar]}const Dr="_frozenDsc";function Nr(e,t){K(e,Dr,t)}function $r(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Or,release:n.release,public_key:r,trace_id:e,org_id:$n(t)};return t.emit("createDsc",o),o}function Fr(e,t){if(tt())return;const n=t.getPropagationContext();return n.dsc||$r(n.traceId,e)}function Br(e){const t=it();if(!t)return{};const n=fr(e),r=Zn(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[pn]??o[fn];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n[Dr];if(c)return a(c);const u=Pr(n),l=u&&"ignored"===n.dropReason;if(u&&(!br(t.getOptions())||l)){const e=Tn(n).scope,r=e&&Fr(t,e);if(r){const e={...r};return l&&(e.sampled="false"),a(e)}}const d=s?.get("sentry.dsc"),p=d&&Rn(d);if(p)return a(p);const f=$r(e.spanContext().traceId,t),h=o[Jt],m=r.description;return"url"!==h&&m&&(f.transaction=m),br()&&(f.sampled=String(sr(n)),f.sample_rand=s?.get("sentry.sample_rand")??Tn(n).scope?.getPropagationContext().sampleRand.toString()),a(f),t.emit("createDsc",f,n),f}function jr(e,t){const{fingerprint:n,breadcrumbs:r,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(o).length&&(e.user={...o,...e.user});Object.keys(s).length&&(e.contexts={...s,...e.contexts});i&&(e.level=i);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),function(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}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,r),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function Ur(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:d,attachments:p,propagationContext:f,transactionName:h}=t;zr(e,"extra",n),zr(e,"tags",r),zr(e,"attributes",o),zr(e,"user",s),zr(e,"contexts",i),e.sdkProcessingMetadata=De(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...f}}function zr(e,t,n){e[t]=De(e[t],n,1)}function qr(e,t){const n=ot().getScopeData();return e&&Ur(n,e.getScopeData()),t&&Ur(n,t.getScopeData()),n}const Wr=Symbol.for("SentryCallbackError");function Hr(e,t,n){let r;try{r=t()}catch(t){return Gr(e,t,n)}return H(r)?r.then(void 0,t=>Gr(e,t,n)):r}function Gr(t,n,r){return e&&p.error(t,n),r(n)}function Jr(e){return!!e&&"function"==typeof e&&"_static"in e&&!!e._static}function Vr(t,n){return Hr(e?"The `beforeSendSpan` callback threw an error, sending the span unmodified:":"",()=>n(t),()=>t)||t}function Kr(e){return nr({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,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links})}function Yr(e,t){const n=er(e);n.attributes&&delete n.attributes[gn];const r=hr(e),o=er(r),{isolationScope:s,scope:i}=Tn(e),a=qr(s,i);!function(e,t,n,r){Xr(e,Qr(t,n,r))}(n,o,t,a),t.emit("preprocessSpan",n),n.is_segment&&(!function(e,t){const n=function(e){const t={},{response:n,profile:r,cloud_resource:o,culture:s,state:i}=e;if(n&&(null!=n.status_code&&(t["http.response.status_code"]=n.status_code),null!=n.body_size&&(t["http.response.body.size"]=n.body_size)),r&&(r.profile_id&&(t["sentry.profile_id"]=r.profile_id),r.profiler_id&&(t["sentry.profiler_id"]=r.profiler_id)),o)for(const[e,n]of Object.entries(o))null!=n&&(t[e]=n);s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i?.state&&"string"==typeof i.state.type&&(t["state.type"]=i.state.type);const a=e.angular;if(a){const e=a.version;"string"!=typeof e&&"number"!=typeof e||(t["angular.version"]=e)}const c=e.react;if(c){const e=c.version;"string"!=typeof e&&"number"!=typeof e||(t["react.version"]=e)}return t}(t.contexts);Xr(e,n)}(n,a),function(e,t){const n=t.getIntegrationNames();if(!n.length)return;Xr(e,{[zt]:n})}(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);const{beforeSendSpan:c,traceLifecycle:u}=t.getOptions();return{...nr("static"!==u&&c&&!Jr(c)?Vr(n,c):n),_segmentSpan:r}}function Xr(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function Qr(e,t,n,r=!0){const o=t.getSdkMetadata(),{release:s,environment:i}=t.getOptions();return{[Kt]:"stream",[Gt]:e.name,[Ht]:e.span_id,[qt]:o?.sdk?.name,[Wt]:o?.sdk?.version,[jt]:s,[At]:i||Or,[un]:n.user?.id,[cn]:n.user?.email,[ln]:n.user?.ip_address,[dn]:n.user?.username,...r?n.attributes:void 0}}function Zr(e){return"stream"===e.getOptions().traceLifecycle}function eo(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function to(e,t=[]){return[e,t]}function no(e,t){const[n,r]=e;return[n,[...r,t]]}function ro(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function oo(e,t){return ro(e,(e,n)=>t.includes(n))}function so(e){const n=o(t);return n.encodePolyfill?n.encodePolyfill(e):(new TextEncoder).encode(e)}function io(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[so(r),e]:r.push("string"==typeof e?so(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(ce(n))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function ao(e){let n="string"==typeof e?so(e):e;function r(e){const t=n.subarray(0,e);return n=n.subarray(e+1),t}function s(){let e=n.indexOf(10);return e<0&&(e=n.length),JSON.parse(function(e){const n=o(t);return n.decodePolyfill?n.decodePolyfill(e):(new TextDecoder).decode(e)}(r(e)))}const i=s(),a=[];for(;n.length;){const e=s(),t="number"==typeof e.length?e.length:void 0;a.push([e,t?r(t):s()])}return[i,a]}function co(e){const t="string"==typeof e.data?so(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const uo={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",metric:"trace_metric"};function lo(e){return function(e){return e in uo}(e)?uo[e]:e}function po(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function fo(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(re()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Pn(r)},...o&&{trace:o}}}function ho(e){return"replay_event"===e?"replay":e||"error"}function mo(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function go(){return"undefined"!=typeof window&&(!mo()||function(){const e=t.process;return"renderer"===e?.type}())}function yo(e,t,n){const r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=po(r._metadata);return to({sent_at:new Date(re()).toISOString(),...vo(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:Pn(o)}},[_o(e,n)])}function _o(e,t){const n=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,ingest_settings:go()?{infer_ip:n,infer_user_agent:n}:void 0,items:e}]}function vo(e){return!!e.trace_id&&!!e.public_key}class bo{constructor(e,t){this._traceBuckets=new Map,this._client=e;const{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:o}=t??{};this._maxSpanLimit=n&&n>0&&n<=1e3?n:1e3,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=o&&o>0?o:5e6,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(e=>{clearTimeout(e.timeout)}),this._traceBuckets.clear()})}add(e){const t=e.trace_id;let n=this._traceBuckets.get(t);n||(n={spans:new Set,size:0,timeout:eo(setTimeout(()=>{this.flush(t)},this._flushInterval))},this._traceBuckets.set(t,n)),n.spans.add(e),n.size+=function(e){let t=156;if(t+=2*e.name.length,t+=Ze(e.attributes),e.links&&e.links.length>0){const n=e.links[0],r=n?.attributes;t+=(100+(r?Ze(r):0))*e.links.length}return t}(e),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(t)}drain(){this._traceBuckets.size&&(e&&p.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((e,t)=>{this.flush(t)}))}flush(t){const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size)return void this._removeTrace(t);const r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o)return e&&p.warn("No segment span reference found on span JSON, cannot compute DSC"),void this._removeTrace(t);const s=Br(o),i=r.map(e=>{const{_segmentSpan:t,...n}=e;return n}),a=yo(i,s,this._client);e&&p.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,t=>{e&&p.error("Error while sending streamed span envelope:",t)}),this._removeTrace(t)}_removeTrace(e){const t=this._traceBuckets.get(e);t&&clearTimeout(t.timeout),this._traceBuckets.delete(e)}}const So="SpanStreaming",wo=(t={})=>{const n=t.flushOnSegmentEnd??!0;return{name:So,setup(t){if(!Zr(t))return void(e&&p.log(`[${So}] \`traceLifecycle\` is "static", skipping setup.`));const r=new bo(t);t.on("afterSpanEnd",e=>{sr(e)&&r.add(Yr(e,t))}),t.on("flushTraceSpans",e=>{r.flush(e)}),n&&t.on("afterSegmentSpanEnd",e=>{const t=e.spanContext().traceId;eo(setTimeout(()=>{r.flush(t)},500))})}}};function ko(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(e){throw t(e),n(),e}return function(e,t,n,r){if(H(e))return ze(e,e=>{n(),r(e)},e=>{t(e),n()});return n(),r(e),e}(o,t,n,r)}const Eo=new WeakMap;function xo(e){return j(e)?void 0:e}function To(t,n,r){if(!br(t))return[!1];const o=function(t,n){const{tracesSampler:r,tracesSampleRate:o}=t;if("function"==typeof r){const t=Hr(e?"The `tracesSampler` callback threw an error, falling back to the parent sampling decision or `tracesSampleRate`:":"",()=>[r({...n,inheritOrSampleWith:e=>"number"==typeof n.parentSampleRate?n.parentSampleRate:"boolean"==typeof n.parentSampled?Number(n.parentSampled):e}),!0],()=>{});if(t)return t}if(void 0!==n.parentSampled)return[n.parentSampled];if(void 0!==o)return[o,!0];return}(t,n);if(!o)return[!1,void 0,void 0,"callback_error"];const[s,i]=o,a=Bn(s);if(void 0===a)return e&&p.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!a)return e&&p.log("[Tracing] Discarding transaction because "+("function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,a,i];const c=r{const n=e.attributes||{},r=n[hn],o=n[mn];"string"==typeof r&&"number"==typeof o&&(t[e.name]={value:o,unit:r})}),t}function Ro(){return o(r()).segmentSpanCaptureStrategy}const Mo=1e3;class Oo{constructor(e={}){this._traceId=e.traceId||Ne(),this._spanId=e.spanId||$e(),e.startTimestamp?this._startTime=e.startTimestamp:(this._startTime=Oe(),this._startPerformanceNow=Ce()),this._links=e.links,this._attributes={},this.setAttributes({[Ft]:"manual",[$t]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),this._events=[],this._isStandaloneSpan=e.isStandalone}addLink(e){return this._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(t,n){return this._frozen?this:t!==Jt||void 0===n||mr(this)?(void 0===n?delete this._attributes[t]:this._attributes[t]=n,this):(e&&p.warn("[Tracing] Ignoring name source on a child span: this attribute is only valid on the root span."),this)}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=Ao(this,e),this._startPerformanceNow=void 0)}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen||(this._name=e,yr(this,"custom")),this}end(t){this._endTime||(this._endTime=null==t?this._getEndTimeFromDuration():Ao(this,t),function(t){if(!e)return;const{description:n="< unknown name >",op:r="< unknown op >"}=Zn(t),{spanId:o}=t.spanContext(),s=`[Tracing] Finishing "${r}" ${fr(t)===t?"root ":""}span "${n}" with ID ${o}`;p.log(s)}(this),this._onSpanEnded(),this._frozen=In(this))}getStaticSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[$t],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ir(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Ft],profile_id:this._attributes[Bt],exclusive_time:this._attributes[Lt],measurements:Co(this._events),links:Kn(this._links)}}getSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime,is_segment:mr(this),status:ar(this._status),attributes:cr(this._attributes,this._status),links:Yn(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){if(this._frozen)return this;e&&p.log("[Tracing] Adding an event to span:",t);const o=Lo(n)?n:r||void 0,s=Lo(n)?{}:n||{},i={name:t,time:Ao(this,o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_getEndTimeFromDuration(){const e=Ce();return null==this._startPerformanceNow||null==e?Oe():this._startTime+(e-this._startPerformanceNow)/1e3}_onSpanEnded(){const t=it();if(t?.emit("spanEnd",this),this._isStandaloneSpan){if(!t)return;return this._sampled?void function(e,t){const{beforeSendSpan:n,traceLifecycle:r}=t.getOptions();if("static"===r&&Jr(n)){const r=function(e,t,n){const r=Zn(e),o=er(hr(e)),{isolationScope:s,scope:i}=Tn(e),a=Qr(o,t,qr(s,i),!1);return Object.entries(a).forEach(([e,t])=>{null==t||e in r.data||(r.data[e]=t)}),Kr(Vr(r,n))}(e,t,n),o=Br(e);return void t.sendEnvelope(yo([r],o,t))}const{_segmentSpan:o,...s}=Yr(e,t),i=Br(o);t.sendEnvelope(yo([s],i,t))}(this,t):void(e&&p.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."))}t?.emit("afterSpanEnd",this);const n=fr(this);if(n!==this){const e=Ro();if(e){const t=Tn(this).scope||nt();e.onChildSpanEnded(this,n,e=>this._convertSpanToTransaction(e),t)}return}if(t&&Zr(t))return void t.emit("afterSegmentSpanEnd",this);const r=Tn(this).scope||nt(),o=Ro();if(o)o.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),r);else{const e=this._convertSpanToTransaction();e&&r.captureEvent(e)}}_convertSpanToTransaction(t={}){if(!Po(Zn(this)))return;this._name||(e&&p.warn("Transaction has no name, falling back to ``."),this._name="");const{scope:n,isolationScope:r}=Tn(this),o=n?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;t.onSpanCaptured?.(this);const s=[];let i=0;for(const e of pr(this)){if(e===this||Do(e)||t.isSpanAlreadyCaptured?.(e))continue;const n=Zn(e);Po(n)?(t.onSpanCaptured?.(e),s.push(n)):t.onSpanCaptured||i++}const a=n?.getClient()||it();i&&a?.recordDroppedEvent("invalid","span",i),s.length>Mo&&a?.recordDroppedEvent("buffer_overflow","span",s.length-Mo);const c=this._attributes[Jt];delete this._attributes[gn];let u=!1;s.forEach(e=>{delete e.data[gn],e.op?.startsWith("gen_ai.")&&(u=!0)});const l={contexts:{trace:Gn(this)},spans:s.length>Mo?s.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Mo):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:Br(this),hasGenAiSpans:u},request:o,...c&&{transaction_info:{source:c}}},d=Co(this._events);return d&&Object.keys(d).length&&(e&&p.log("[Measurements] Adding measurements to transaction event",JSON.stringify(d,void 0,2)),l.measurements=d),l}}function Ao(e,t){return In(e)?function(e){return"number"!=typeof e?Xn(e):e<1e12?Me(e)??Oe():e/1e3}(t):Xn(t)}function Lo(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function Po(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}function Do(e){return e instanceof Oo&&e.isStandaloneSpan()}function No(e,t){const n=Wo(e),{forceTransaction:r,parentSpan:o,scope:s}=e,i=s?.clone();return st(i,()=>Vo(o)(()=>{const i=nt(),a=Jo(s??i,o),c=e.onlyIfParent&&!a?zo(i,it()):qo({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i}),u=!Ko(c)||!a;return Yo(c,u,()=>t(c,()=>c.end()))}))}function $o(e){const t=Wo(e),{forceTransaction:n,parentSpan:r,scope:o}=e;return(o?e=>st(o,e):void 0!==r?e=>Fo(r,e):e=>e())(()=>{const s=nt(),i=Jo(o??s,r),a=it();return e.onlyIfParent&&!i?zo(s,a):qo({parentSpan:i,spanArguments:t,forceTransaction:n,scope:s})})}function Fo(e,t){const n=Ho();return n.withActiveSpan?n.withActiveSpan(e,t):st(n=>(Hn(n,e||void 0),t(n)))}function Bo(e){const t=Ho();return t.suppressTracing?t.suppressTracing(e):st(t=>(t.setSDKProcessingMetadata({[Be]:!0}),e()))}function jo(e=nt()){const t=Ho();return t.isTracingSuppressed?t.isTracingSuppressed(e):!0===e.getScopeData().sdkProcessingMetadata[Be]}function Uo(t){const n=Ho();return n.startNewTrace?n.startNewTrace(t):Fo(null,()=>st(n=>(n.setPropagationContext({traceId:Ne(),sampleRand:ne()}),e&&p.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),t())))}function zo(e,t){t?.recordDroppedEvent("no_parent_span","span");const n=new Lr({dropReason:"no_parent_span",traceId:e.getPropagationContext().traceId});return xn(n,e,rt()),n}function qo({parentSpan:t,spanArguments:n,forceTransaction:r,scope:o}){const s=rt(),i={scope:o,parentSpan:t};it()?.emit("prepareSpanScope",i);const{scope:a,parentSpan:c}=i;if(!br()){const e=a.getPropagationContext(),t=c?c.spanContext().traceId:e.traceId,n=new Lr({traceId:t});return c&&!r&&dr(c,n),xn(n,a,s),n}const u=it();if(function(e,t){const n=e?.getOptions().ignoreSpans;if(!e||!Zr(e)||!n?.length)return!1;return wr({description:t.name||"",op:t.attributes?.[$t]||t.op,attributes:t.attributes},n)}(u,n)){jo(a)||u?.recordDroppedEvent("ignored","span");const e=new Lr({dropReason:"ignored",traceId:c?.spanContext().traceId??a.getPropagationContext().traceId});return c&&!r&&dr(c,e),xn(e,a,s),e}let l;if(c&&!r)l=function(e,t,n,r){const{spanId:o,traceId:s}=e.spanContext(),i=jo(t),a=!i&&sr(e),c=a?new Oo({...n,parentSpanId:o,traceId:s,sampled:a}):new Lr({traceId:s});dr(e,c),xn(c,t,r);const u=it();if(!u)return c;Pr(c)&&(Pr(e)&&e.dropReason?(c.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):i||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span")));return u.emit("spanStart",c),c}(c,a,n,s),dr(c,l);else if(c){const e=Br(c),{traceId:t,spanId:r}=c.spanContext(),o=sr(c);l=Go({traceId:t,parentSpanId:r,...n},a,s,o),Nr(l,e)}else{const{traceId:e,dsc:t,parentSpanId:r,sampled:o,sampleRand:i}=a.getPropagationContext();if(l=Go({traceId:e,parentSpanId:r,...n},a,s,o),t){Nr(l,0===Object.keys(t).length&&void 0!==i?{sample_rand:i.toString()}:t)}}return function(t){if(!e)return;const{description:n="< unknown name >",op:r="< unknown op >",parent_span_id:o}=Zn(t),{spanId:s}=t.spanContext(),i=sr(t),a=fr(t),c=a===t,u=`[Tracing] Starting ${i?"sampled":"unsampled"} ${c?"root ":""}span`,l=[`op: ${r}`,`name: ${n}`,`ID: ${s}`];if(o&&l.push(`parent ID: ${o}`),!c){const{op:e,description:t}=Zn(a);l.push(`root ID: ${a.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}p.log(`${u}\n ${l.join("\n ")}`)}(l),l}function Wo(e){const t={isStandalone:e.experimental?.standalone,...e};if(e.op&&(t.attributes={[$t]:e.op,...e.attributes}),e.startTime){const n={...t};return n.startTimestamp=Xn(e.startTime),delete n.startTime,n}return t}function Ho(){return Ye(r())}function Go(t,n,r,o){const s=it(),i=s?.getOptions()||{},{name:a=""}=t,c={spanAttributes:{...t.attributes},spanName:a,parentSampled:o};s?.emit("beforeSampling",c,{decision:!1});const u=c.parentSampled??o,l=c.spanAttributes,d=n.getPropagationContext(),f=jo(n),[h,m,g,y]=f?[!1]:To(i,{name:a,parentSampled:u,attributes:l,normalizedRequest:r.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:Bn(d.dsc?.sample_rate)},d.sampleRand),_=new Oo({...t,attributes:{[Jt]:"custom",[pn]:void 0!==m&&g?m:void 0,...l},sampled:h});if(!h&&s&&!f){e&&p.log("[Tracing] Discarding root span because its trace was not chosen to be sampled.");const n=y||"sample_rate";Zr(s)||t.isStandalone||s.recordDroppedEvent(n,"transaction"),s.recordDroppedEvent(n,"span")}return xn(_,n,r),s&&s.emit("spanStart",_),_}function Jo(e,t){if(t)return t;if(null===t)return;const n=gr(e);if(!n)return;const r=it();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?fr(n):n}function Vo(e){return void 0!==e?t=>Fo(e,t):e=>e()}function Ko(e){return Pr(e)&&"ignored"===e.dropReason}function Yo(e,t,n,r){return(t?t=>Fo(e,()=>{const n=nt(),r=Tn(e).scope;return r&&n.setPropagationContext(r.getPropagationContext()),xn(e,n,rt()),t()}):e=>e())(()=>ko(()=>n(),t=>{!function(e,t){const n=xo(e);n&&sr(t)&&!Eo.has(n)&&Eo.set(n,Jn(t))}(t,e);const{status:n}=Zn(e);e.isRecording()&&"ok"===n&&e.setStatus({code:2,message:"internal_error"})},r))}const Xo=new WeakSet;function Qo(e=it()){e&&!Xo.has(e)&&Zr(e)&&(Xo.add(e),e.addIntegration(wo()))}function Zo(e){return Qo(),$o(e)}const es={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function ts(t,n={}){const r=it();Qo(r);const o=new Map;let s,i,a=!1,c="externalFinish",u=!n.disableAutoFinish;const l=[],{idleTimeout:d=es.idleTimeout,finalTimeout:f=es.finalTimeout,childSpanTimeout:h=es.childSpanTimeout,trimIdleSpanEndTimestamp:m=!0}=n,g=nt();if(!r||!br()){const e=new Lr({traceId:g.getPropagationContext().traceId});return xn(e,g,rt()),e}const y=gr(),_=$o(t);function v(){s&&(clearTimeout(s),s=void 0)}function b(){i&&(clearTimeout(i),i=void 0)}function S(e){v(),s=setTimeout(()=>{!a&&0===o.size&&u&&(c="idleTimeout",_.end(e))},d)}function w(e){b(),i=setTimeout(()=>{!a&&u&&(c="heartbeatFailed",_.end(e))},h)}function k(t){a=!0,o.clear(),l.forEach(e=>e()),Hn(g,y);const n=Zn(_),{start_timestamp:r}=n;if(!r)return;n.data[Pt]||_.setAttribute(Pt,c);const s=n.status;s&&"unknown"!==s||_.setStatus({code:1}),p.log(`[Tracing] Idle span "${n.op}" finished`);const i=pr(_).filter(e=>e!==_);let u=0;i.forEach(n=>{n.isRecording()&&(n.setStatus({code:2,message:"cancelled"}),n.end(t),e&&p.log("[Tracing] Cancelling span since span ended early",JSON.stringify(n,void 0,2)));const r=Zn(n),{timestamp:o=0,start_timestamp:s=0}=r,i=s<=t,a=o-s<=(f+d)/1e3;if(e){const e=JSON.stringify(n,void 0,2);i?a||p.log("[Tracing] Discarding span since it finished after idle span final timeout",e):p.log("[Tracing] Discarding span since it happened after idle span was finished",e)}a&&i||(!function(e,t){e[ur]&&e[ur].delete(t)}(_,n),u++)}),u>0&&_.setAttribute("sentry.idle_span_discarded_spans",u)}return Hn(nt(),_),e&&p.log("[Tracing] Started span is an idle span"),_.end=new Proxy(_.end,{apply(e,t,n){if(r.emit("beforeIdleSpanEnd",_),Pr(t))return;const[o,...s]=n,i=Xn(o||Oe()),a=pr(_).filter(e=>e!==_),c=Zn(_);if(!a.length||!m)return k(i),Reflect.apply(e,t,[i,...s]);const u=r.getOptions().ignoreSpans,l=a?.reduce((e,t)=>{const n=Zn(t);return n.timestamp?u&&wr({description:n.description,op:n.op,attributes:n.data},u)?e:e?Math.max(e,n.timestamp):n.timestamp:e},void 0),d=c.start_timestamp,p=Math.min(d?d+f/1e3:1/0,Math.max(d||-1/0,Math.min(i,l||1/0)));return k(p),Reflect.apply(e,t,[p,...s])}}),l.push(r.on("spanStart",e=>{if(a||e===_||er(e).end_timestamp||e instanceof Oo&&e.isStandaloneSpan())return;var t;pr(_).includes(e)&&(t=e.spanContext().spanId,v(),o.set(t,!0),w(Oe()+h/1e3))})),l.push(r.on("spanEnd",e=>{var t;a||(t=e.spanContext().spanId,o.has(t)&&o.delete(t),0===o.size&&(S(Oe()+d/1e3),b()))})),l.push(r.on("idleSpanEnableAutoFinish",e=>{e===_&&(u=!0,S(),o.size&&w())})),n.disableAutoFinish||S(),setTimeout(()=>{a||(_.setStatus({code:2,message:"deadline_exceeded"}),c="finalTimeout",_.end())},f),_}const ns=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],rs=["removeListener","off","removeEventListener"],os=Symbol("SentryScopeBoundListeners");let ss;function is(e){return"function"==typeof e}function as(e,t,n){return function(...r){const o=r[0],s=r[1],i=r.slice(2);if(!is(s)||function(e){return void 0!==ss&&(e===ss||e.listener===ss)}(s))return t.apply(this,r);const a=ls(e)||us(e);let c=a.get(o);c||(c=new WeakMap,a.set(o,c));let u=c.get(s);u||(u=function(e,t){return function(...n){return st(t,()=>e.apply(this,n))}}(s,n),c.set(s,u));const l=ss;ss=u;try{return t.call(this,o,u,...i)}finally{ss=l}}}function cs(e,t){return function(...n){const r=n[0],o=n[1],s=n.slice(2),i=is(o)?ls(e)?.get(r)?.get(o):void 0;return i?t.call(this,r,i,...s):t.apply(this,n)}}function us(e){const t=new Map;return e[os]=t,t}function ls(e){return e[os]}const ds="navigation",ps="resource.other",fs="browser.paint",hs="browser.unload_event",ms="browser.redirect",gs="browser.dom_content_loaded_event",ys="browser.load_event",_s="browser.connect",vs="browser.tls_ssl",bs="browser.cache",Ss="browser.dns",ws="browser.request",ks="browser.response",Es="ui.interaction.click",xs="ui.action.click",Ts="http.client",Is="Pageload",Cs="Navigation",Rs="Resource",Ms="Main UI thread blocked",Os="Click",As="Click",Ls="Largest contentful paint",Ps="Layout shift",Ds={[bs]:"Cache lookup",[Ss]:"DNS lookup",[_s]:"Connect",[vs]:"TLS handshake",[ms]:"Redirect",[ws]:"Request",[ks]:"Response",[hs]:"Unload event",[gs]:"DOMContentLoaded event",[ys]:"Load event"};function Ns(e){return new Fs(t=>{t(e)})}function $s(e){return new Fs((t,n)=>{n(e)})}class Fs{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new Fs((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new Fs((t,n)=>{let r,o;return this.then(t=>{o=!1,r=t,e&&e()},t=>{o=!0,r=t,e&&e()}).then(()=>{o?n(r):t(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(H(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(e){r(e)}}}function Bs(e,t,n,r=0,o){try{const s=js(t,n,e,r,o);return H(s)?s:Ns(s)}catch(e){return $s(e)}}function js(t,n,r,o,s){const i=r[o];if(!t||!i)return t;const a=`Event processor "${i.id||"?"}"`;let c=!1;const u=Hr(e?`${a} threw an error, dropping event:`:"",()=>i({...t},n),()=>(c=!0,null));return e&&null===u&&p.log(`${a} dropped event`),H(u)?u.then(e=>e?js(e,n,r,o+1,s):(s?.(c?"callback_error":"event_processor"),null)):u?js(u,n,r,o+1,s):(s?.(c?"callback_error":"event_processor"),null)}let Us,zs,qs,Ws;function Hs(e){const n=t._sentryDebugIds,r=t._debugIds;if(!n&&!r)return{};const o=n?Object.keys(n):[],s=r?Object.keys(r):[];if(Ws&&o.length===zs&&s.length===qs)return Ws;zs=o.length,qs=s.length,Ws={},Us||(Us={});const i=(t,n)=>{for(const r of t){const t=n[r],o=Us?.[r];if(o&&Ws&&t)Ws[o[0]]=t,Us&&(Us[r]=[o[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const o=n[e],s=o?.filename;if(s&&Ws&&Us){Ws[s]=t,Us[r]=[s,t];break}}}}};return n&&i(o,n),r&&i(s,r),Ws}function Gs(e){return!0===e.data?.__sentry__}function Js(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Vs(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ye(),timestamp:t.timestamp||xe()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Or,!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=pe(i.url,s));s&&e.exception?.values?.forEach(e=>{e.value&&(e.value=pe(e.value,s))})}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=Hs(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(c,e.stackParser);const l=function(e,t){if(!t)return e;const n=e?e.clone():new Fe;return n.update(t),n}(r,n.captureContext);n.mechanism&&function(e,t){const n=e.exception?.values,r=n?.find(e=>0===e.mechanism?.exception_id)??n?.[0];r&&we(r,t)}(c,n.mechanism);const d=o?o.getEventProcessors():[],p=qr(s,l),f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),jr(c,p);const h=gr(l);h&&function(e,t){e.contexts={trace:Jn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Br(t),...e.sdkProcessingMetadata};const n=Zn(fr(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(c,h),function(e,t,n){const r=xo(t.originalException),o=r&&Eo.get(r);if(!o)return;const s=e.contexts?.trace;(s?.trace_id??(n&&at(n).trace_id))===o.trace_id&&(e.contexts={...e.contexts,trace:{...s,...o}})}(c,n,l);const m=[...d,...p.eventProcessors],g="transaction"===t.type,y=t.spans?.length||0;return(Gs(n)?Ns(c):Bs(m,c,n,0,e=>{o&&(o.recordDroppedEvent(e,ho(t.type)),g&&o.recordDroppedEvent(e,"span",1+y))})).then(e=>{if(!e)return null;if(g&&o){const t=y-(e.spans?.length||0);t>0&&o.recordDroppedEvent("event_processor","span",t)}return function(e){const 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)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:ce(e.data,t,n)}}))},...e.user&&{user:ce(e.user,t,n)},...e.contexts&&{contexts:ce(e.contexts,t,n)},...e.extra&&{extra:ce(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ce(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:ce(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=ce(e.contexts.flags,3,n));return r}(e,i,a):e})}function Ks(e){if(e)return function(e){return e instanceof Fe||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>Ys.includes(e))}(e)?{captureContext:e}:e}const Ys=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Xs(e,t){return nt().captureException(e,Ks(t))}function Qs(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return nt().captureMessage(e,n,r)}function Zs(e,t){return nt().captureEvent(e,t)}function ei(e,t){rt().setContext(e,t)}function ti(){return rt().lastEventId()}function ni(){const e=it();return!1!==e?.getOptions().enabled&&!!e?.getTransport()}function ri(e){rt().addEventProcessor(e)}function oi(e){const n=rt(),{user:r}=qr(n,nt()),{userAgent:o}=t.navigator||{},s=Le({user:r,...o&&{userAgent:o},...e}),i=n.getSession();return"ok"===i?.status&&Pe(i,{status:"exited"}),si(),n.setSession(s),s}function si(){const e=rt(),t=nt().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Pe(e,t)}(t),ii(),e.setSession()}function ii(){const e=rt(),t=it(),n=e.getSession();n&&t&&t.captureSession(n)}function ai(e=!1){e?si():ii()}function ci(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function ui(e,t,n){return t||`${function(e){return`${ci(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}let li,di=0;function pi(e){const t=Math.floor(1e3*e);void 0!==li&&t!==li&&(di=0);const n=di;return di++,li=t,{key:"sentry.timestamp.sequence",value:{value:n,type:"integer"}}}function fi(e,t){return t?st(t,()=>{const n=gr(),r=n?Jn(n):at(t);return[n?Br(n):Fr(e,t),r]}):[void 0,void 0]}const hi={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function mi(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...go()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function gi(e,t,n,r=!0){!n||e[t]&&!r||(e[t]=n)}function yi(e,t){const n=Si(),r=bi(e);void 0===r?n.set(e,[t]):r.length>=100?(vi(e,r),n.set(e,[t])):n.set(e,[...r,t])}function _i(t,n=nt(),r=yi){const o=n?.getClient()??it();if(!o)return void(e&&p.warn("No client available to capture log."));const{release:s,environment:i,beforeSendLog:a}=o.getOptions(),[,u]=fi(o,n),l={...t.attributes},{user:{id:d,email:f,username:h},attributes:m}=qr(rt(),n);gi(l,"user.id",d,!1),gi(l,"user.email",f,!1),gi(l,"user.name",h,!1),gi(l,"sentry.release",s),gi(l,"sentry.environment",i);const{name:g,version:y}=o.getSdkMetadata()?.sdk??{};gi(l,"sentry.sdk.name",g),gi(l,"sentry.sdk.version",y);const _=o.getIntegrationByName("Replay"),v=_?.getReplayId(!0);gi(l,"sentry.replay_id",v),v&&"buffer"===_?.getRecordingMode()&&gi(l,"sentry._internal.replay_is_buffering",!0);const b=t.message;if(B(b)){const{__sentry_template_string__:e,__sentry_template_values__:t=[]}=b;t?.length&&(l["sentry.message.template"]=e),t.forEach((e,t)=>{l[`sentry.message.parameter.${t}`]=e})}const S=gr(n);gi(l,"sentry.trace.parent_span_id",S?.spanContext().spanId);const w={...t,attributes:l};o.emit("beforeCaptureLog",w);const k=a?Hr(e?"The `beforeSendLog` callback threw an error, dropping the log:":"",()=>c(()=>a(w)),()=>Wr):w;if(k===Wr)return void o.recordDroppedEvent("callback_error","log_item",1);if(!k)return o.recordDroppedEvent("before_send","log_item",1),void(e&&p.warn("beforeSendLog returned null, log will not be captured."));const{level:E,message:x,attributes:T={},severityNumber:I}=k,C=Oe(),R=pi(C);r(o,{timestamp:C,level:E,body:ki(String(x)),trace_id:u?.trace_id,severity_number:I??hi[E],attributes:wi({...Qe(m),...Qe(T,!0),[R.key]:R.value})}),o.emit("afterCaptureLog",k)}function vi(e,t){const n=t??bi(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Pn(r)),to(s,[mi(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Si().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function bi(e){return Si().get(e)}function Si(){return s("clientToLogBufferMap",()=>new WeakMap)}function wi(e){const t={};for(const[n,r]of Object.entries(e)){const e=ki(n);"string"===r.type?t[e]={...r,value:ki(r.value)}:t[e]=r}return t}function ki(e){const t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return"function"==typeof n&&"function"==typeof r?n.call(e)?e:r.call(e):e}function Ei(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...go()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function xi(e,t,n,r=!0){!n||!r&&t in e||(e[t]=n)}function Ti(e,t){const n=Mi(),r=Ri(e);void 0===r?n.set(e,[t]):r.length>=1e3?(Ci(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Ii(t,n){const r=n?.scope??nt(),o=n?.captureSerializedMetric??Ti,s=r?.getClient()??it();if(!s)return void(e&&p.warn("No client available to capture metric."));const{beforeSendMetric:i}=s.getOptions(),{user:a,attributes:c}=qr(rt(),r),u=function(e,t,n){const{release:r,environment:o}=t.getOptions(),s={...e.attributes};xi(s,"user.id",n.id,!1),xi(s,"user.email",n.email,!1),xi(s,"user.name",n.username,!1),xi(s,"sentry.release",r),xi(s,"sentry.environment",o);const{name:i,version:a}=t.getSdkMetadata()?.sdk??{};xi(s,"sentry.sdk.name",i),xi(s,"sentry.sdk.version",a);const c=t.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return xi(s,"sentry.replay_id",u),u&&"buffer"===c?.getRecordingMode()&&xi(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}(t,s,a);s.emit("processMetric",u);const l=i?Hr(e?"The `beforeSendMetric` callback threw an error, dropping the metric:":"",()=>i(u),()=>Wr):u;if(l===Wr)return void s.recordDroppedEvent("callback_error","trace_metric",1);if(!l)return s.recordDroppedEvent("before_send","trace_metric",1),void(e&&p.log("`beforeSendMetric` returned `null`, will not send metric."));const d=function(e,t,n,r){const[,o]=fi(t,n),s=gr(n),i=s?s.spanContext().traceId:o?.trace_id,a=s?s.spanContext().spanId:void 0,c=Oe(),u=pi(c);return{timestamp:c,trace_id:i??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...Qe(r),...Qe(e.attributes,"skip-undefined"),[u.key]:u.value}}}(l,s,r,c);e&&p.log("[Metric]",d),o(s,d),s.emit("afterCaptureMetric",l)}function Ci(e,t){const n=t??Ri(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Pn(r)),to(s,[Ei(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Mi().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Ri(e){return Mi().get(e)}function Mi(){return s("clientToMetricBufferMap",()=>new WeakMap)}const Oi=Symbol.for("SentryBufferFullError");function Ai(e=100){const t=new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.sizen(o),()=>n(o)),o},drain:function(e){if(!t.size)return Ns(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>eo(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function Li(e,t=re()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function Pi(e,t,n=re()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function Di(e,{statusCode:t,headers:n},r=re()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n,,,s]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e&&s&&!s.split(";").includes("custom")||(o[e]=r+a);else o.all=r+a}else i?o.all=r+Li(i,r):429===t&&(o.all=r+6e4);return o}function Ni(t,n,r=Ai(t.bufferSize||64)){let o={};function s(e,[n,r],o){const s=lo(o);"transaction"===o&&t.recordDroppedEvent(e,"span",(r.spans?.length??0)+1),t.recordDroppedEvent(e,s,"number"==typeof n.item_count?n.item_count:1)}return{send:function(t){const i=[];if(ro(t,(e,t)=>{Pi(o,lo(t))?s("ratelimit_backoff",e,t):i.push(e)}),0===i.length)return Promise.resolve({});const a=to(t[0],i),c=t=>{oo(a,["client_report"])?e&&p.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`):ro(a,(e,n)=>{s(t,e,n)})};return r.add(()=>n({body:io(a)}).then(t=>413===t.statusCode?(e&&p.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),t):(e&&void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&p.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),o=Di(o,t),t),t=>{throw c("network_error"),e&&p.error("Encountered error running transport request:",t),t})).then(e=>e,t=>{if(t===Oi)return e&&p.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw t})},flush:e=>r.drain(e)}}const $i={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},mcp:{inputs:!0,outputs:!0},databaseQueryData:!0,queues:!0,stackFrameVariables:!0,frameContextLines:5};const Fi="Not capturing exception because it's already been captured.",Bi="Discarded session because of missing or non-string release",ji=Symbol.for("SentryInternalError"),Ui=Symbol.for("SentryDoNotSendEventError"),zi=Symbol.for("SentryClosedClient");function qi(e){return{message:e,[ji]:!0}}function Wi(e){return{message:e,[Ui]:!0}}function Hi(e){return Wi(`Discarding event because it's not included in the random sample (sampling rate = ${e})`)}function Gi(e){return z(e)&&ji in e}function Ji(e){return z(e)&&Ui in e}function Vi(e,t,n,r,o){let s,i=0,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,t=>{if(i+=r(t),i>=8e5)o(e);else if(!a){const t=e.getOptions()._flushInterval??5e3;t>0&&(a=!0,s=eo(setTimeout(()=>{o(e)},t)))}}),e.on("flush",()=>{o(e)})}class Ki{constructor(t){this._options={attachStacktrace:!0,...t,traceLifecycle:"static"===t.traceLifecycle?"static":"stream"},this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Ai(t.transportOptions?.bufferSize??64),this._dataCollection=function(e){const t=e.dataCollection??{};return{userInfo:t.userInfo??$i.userInfo,cookies:t.cookies??$i.cookies,httpHeaders:(n=t.httpHeaders,void 0===n?{...$i.httpHeaders}:"boolean"==typeof(r=n)||"allow"in r||"deny"in r?{request:n,response:n}:{request:n.request??$i.httpHeaders.request,response:n.response??$i.httpHeaders.response}),httpBodies:t.httpBodies??$i.httpBodies,urlQueryParams:t.urlQueryParams??$i.urlQueryParams,graphQL:{document:t.graphQL?.document??$i.graphQL.document,variables:t.graphQL?.variables??$i.graphQL.variables},genAI:{inputs:t.genAI?.inputs??$i.genAI.inputs,outputs:t.genAI?.outputs??$i.genAI.outputs},mcp:{inputs:t.mcp?.inputs??$i.mcp.inputs,outputs:t.mcp?.outputs??$i.mcp.outputs},databaseQueryData:t.databaseQueryData??$i.databaseQueryData,queues:t.queues??$i.queues,stackFrameVariables:t.stackFrameVariables??$i.stackFrameVariables,frameContextLines:t.frameContextLines??$i.frameContextLines};var n,r}(t),this._unhandledSessionStatus="crashed",t.dsn?this._dsn=Fn(t.dsn):e&&p.warn("No DSN provided, client will not send events.");const{beforeSendSpan:n,traceLifecycle:r}=this._options;if(e&&n&&Jr(n)!==("static"===r)&&c(()=>{console.warn(`Ignoring \`beforeSendSpan\`: ${"static"===r?"wrap it with":"remove"} \`Sentry.withStaticSpan\` to use it with \`traceLifecycle: "${r}"\`.`)}),this._dsn){const e=ui(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})}Vi(this,"afterCaptureLog","flushLogs",Zi,vi),Vi(this,"afterCaptureMetric","flushMetrics",Qi,Ci)}captureException(t,n,r){const o=ye();if(ke(t))return e&&p.log(Fi),o;const s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(e=>this._captureEvent(e,s,r)).then(e=>e),"error"),s.event_id}captureMessage(e,t,n,r){const o={event_id:ye(),...n},s=B(e)?e:String(e),i=j(e),a=i?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,r)),i?"unknown":"error"),o.event_id}captureEvent(t,n,r){const o=ye();if(n?.originalException&&ke(n.originalException))return e&&p.log(Fi),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=ho(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(e){this.sendSession(e),Pe(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){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){Object.defineProperty(this,zi,{value:!0});const 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(){var e;(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&(this._setupIntegrations(),"stream"===(e=this._options).traceLifecycle&&(e.beforeSendTransaction||e.ignoreTransactions?.length)&&c(()=>{console.warn("[Sentry] `beforeSendTransaction` and `ignoreTransactions` are ignored with `traceLifecycle: 'stream'` (enabled by default). Use `beforeSendSpan` and `ignoreSpans` instead, or set `traceLifecycle: 'static'`.")}))}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Rr(this,e,this._integrations),t||Cr(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||Zr(t))return;const n=[],r=[];for(const t of e.spans)t.op?.startsWith("gen_ai.")?n.push(Kr(t)):r.push(t);return 0!==n.length?(e.spans=r,_o(n,t)):void 0}(e,this);let r=function(e,t,n,r){const o=po(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};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,n?.sdk);const i=fo(e,o,r,t);return delete e.sdkProcessingMetadata,to(i,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);if(!Gs(t))for(const e of t.attachments||[])r=no(r,co(e));n&&(r=no(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(t){const{release:n,environment:r=Or}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n)return void(e&&p.warn(Bi));o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n)return void(e&&p.warn(Bi));t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=function(e,t,n,r){const o=po(n);return to({sent_at:new Date(re()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Pn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;e&&p.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{const e=await this._transport.send(t);return this.emit("afterEnvelope",t),e}catch(t){return e&&p.error("Error while sending envelope:",t),{}}return e&&p.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Rr(e,t,n)}),n}(this,e),Cr(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0,n=!1;for(const e of o)if(!1===e.mechanism?.handled){n=!0;break}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Pe(e,{...n&&{status:this._unhandledSessionStatus},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||tsetTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),s=this.getIntegrationNames();return!t.integrations&&s.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Vs(o,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...at(n)},...e.contexts};const r=Fr(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(t,n={},r=nt(),o=rt()){return e&&Yi(t)&&p.log(`Captured error event \`${Js(t)[0]||""}\``),this._processEvent(t,n,r,o).then(e=>e.event_id,t=>{e&&(Ji(t)?p.log(t.message):Gi(t)?p.warn(t.message):p.warn(t))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=Xi(t),c=Yi(t),u=`before send for type \`${t.type||"error"}\``;let l="before_send",d=0;const p=void 0===i?void 0:Bn(i),f=c&&"number"==typeof p&&ne()>p,h=ho(t.type);let m=0;const g=r.getSession()||o.getSession();return f&&"ok"!==g?.status?(this.recordDroppedEvent("sample_rate","error"),$s(Hi(i))):this._prepareEvent(t,n,r,o).then(t=>{if(null===t)throw Wi("An event processor returned `null`, will not send event.");return m=t.spans?.length||0,Gs(n)?t:function(t,n,r,o,s){const{beforeSend:i,ignoreSpans:a,beforeSendTransaction:c}=t,u=Jr(t.beforeSendSpan)&&t.beforeSendSpan;let l=n;if(Yi(l)&&i){const t=l;return Hr(e?"The `beforeSend` callback threw an error, dropping the event:":"",()=>i(t,r),()=>(o("callback_error"),null))}if(Xi(l)){if(u||a){const e=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o??"ok",timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[Bt],exclusive_time:i?.[Lt],measurements:e.measurements,is_segment:!0}}(l);if(a?.length&&wr({description:e.description,op:e.op,attributes:e.data},a))return o("ignored"),null;if(u){const t=Vr(e,u);l=De(n,{type:"transaction",timestamp:(d=t).timestamp,start_timestamp:d.start_timestamp,transaction:d.description,contexts:{trace:{trace_id:d.trace_id,span_id:d.span_id,parent_span_id:d.parent_span_id,op:d.op,status:d.status,origin:d.origin,data:{...d.data,...d.profile_id&&{[Bt]:d.profile_id},...d.exclusive_time&&{[Lt]:d.exclusive_time}}}},measurements:d.measurements})}if(l.spans){const e=[],t=l.spans;for(const n of t)a?.length&&wr({description:n.description,op:n.op,attributes:n.data},a)?Er(t,n):u?e.push(Vr(n,u)):e.push(n);s(t.length-e.length),l.spans=e}}if(c)return Hr(e?"The `beforeSendTransaction` callback threw an error, dropping the event:":"",()=>c(l,r),()=>(o("callback_error"),null))}var d;return l}(s,t,n,e=>{l=e},e=>{d=e})}).then(e=>{d&&this.recordDroppedEvent("ignored","span",d);if(!U(e)||null===e){if(this.recordDroppedEvent(l,h),a&&this.recordDroppedEvent(l,"span",1+m-d),null!==e)throw qi(`${u} must return \`null\` or a valid event.`);throw Wi(`${"ignored"===l?"Transaction matched `ignoreSpans`":`${u} ${"callback_error"===l?"threw an error":"returned `null`"}`}, will not send event.`)}if(c&&g&&this._updateSessionFromEvent(g,e),f)throw this.recordDroppedEvent("sample_rate","error"),Hi(i);if(a){const t=m-d-(e.spans?.length||0);t>0&&this.recordDroppedEvent("before_send","span",t)}const r=e.transaction_info;if(a&&r&&e.transaction!==t.transaction){const t="custom";e.transaction_info={...r,source:t}}return this.sendEvent(e,n),e}).then(null,e=>{if(Ji(e)||Gi(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),qi(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Oi&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){e&&p.log("Flushing outcomes...");const t=this._clearOutcomes();if(0===t.length)return void(e&&p.log("No outcomes to send"));if(!this._dsn)return void(e&&p.log("No dsn provided, will not send outcomes"));e&&p.log("Sending outcomes:",t);const n=(r=t,to((o=this._options.tunnel&&Pn(this._dsn))?{dsn:o}:{},[[{type:"client_report"},{timestamp:xe(),discarded_events:r}]]));var r,o;this.sendEnvelope(n)}}function Yi(e){return void 0===e.type}function Xi(e){return"transaction"===e.type}function Qi(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+ea(e.attributes)}function Zi(e){let t=0;return e.message&&(t+=2*e.message.length),t+ea(e.attributes)}function ea(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*ta(e[0]):j(e)?t+=ta(e):t+=100}),t}function ta(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function na(t,n){!0===n.debug&&(e?p.enable():c(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),function(){const e=it();return e&&!function(e){return zi in e}(e)?e:void 0}()&&c(()=>{console.warn("[Sentry] `Sentry.init()` was called more than once. The new client replaces the active client, but the active client is not closed, so state from both can mix. Call `Sentry.init()` only once, or call `await Sentry.close()` before you call it again.")});nt().update(n.initialScope);const r=new t(n);return ra(r),r.init(),r}function ra(e){nt().setClient(e)}const oa=5e3;function sa(t){function n(...t){e&&p.log("[Offline]:",...t)}return e=>{const r=t(e);if(!e.createStore)throw new Error("No `createStore` function was provided");const o=e.createStore(e);let s,i=oa;function a(e){s&&clearTimeout(s),s=eo(setTimeout(async()=>{s=void 0;const e=await o.shift();e&&(n("Attempting to send previously queued event"),e[0].sent_at=new Date(re()).toISOString(),u(e,!0).catch(e=>{n("Failed to retry sending",e)}))},e))}function c(){s||(a(i),i=Math.min(2*i,36e5))}async function u(t,s=!1){if(!s&&oo(t,["replay_event","replay_recording"]))return await o.push(t),a(100),{};try{if(e.shouldSend){const n=e.shouldSend(t);if(!1===(H(n)?await n:n))throw new Error("Envelope not sent because `shouldSend` callback returned false")}const n=await r.send(t);let o=100;if(n)if(n.headers?.["retry-after"])o=Li(n.headers["retry-after"]);else if(n.headers?.["x-sentry-rate-limits"])o=6e4;else if((n.statusCode||0)>=400)return n;return a(o),i=oa,n}catch(r){const a=function(t,n,r){return!oo(t,["client_report"])&&(!e.shouldStore||e.shouldStore(t,n,r))}(t,r,i);if(H(a)?await a:a)return s?await o.unshift(t):await o.push(t),c(),n("Error sending. Event queued.",r),{};throw r}}return e.flushAtStartup&&c(),{send:u,flush:e=>(void 0===e&&(i=oa,a(100)),r.flush(e))}}}const ia="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function aa(e,t){let n;return ro(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}const ca="[Filtered]",ua=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],la=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function da(e,t,n){if(!1===t)return!0;const r=e.toLowerCase(),o=null!=n?[...ua,...n]:ua;if(function(e,t){return t.some(t=>e.includes(t))}(r,o))return!0;if(!0===t)return!1;const s=("deny"in t?t.deny:t.allow).some(e=>r.includes(e.toLowerCase()));return"deny"in t?s:!s}function pa(e,t,n){if(!1===t)return{};const r={};for(const o of Object.keys(e))r[o]=da(o,t,n)?ca:e[o];return r}function fa(e){const t=e.length>1&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e;try{return-1!==t.indexOf("%")?decodeURIComponent(t):t}catch{return t}}function ha(e,t,n){if(!1===t)return{};const r=function(e){const t={};for(const[n,r]of e)void 0===t[n]&&(t[n]=""===n?ca:fa(r));return t}(function(e,t){return(Array.isArray(e)?e:[e]).flatMap(e=>"string"!=typeof e?[]:"set-cookie"===t?function(e){return e.split(/,(?=[^;=,]*=)/)}(e).map(e=>e.split(";")[0]):e.split(";")).map(e=>e.trim()).filter(e=>""!==e&&"="!==e).map(e=>{const t=e.indexOf("=");return-1===t?["",e]:[e.slice(0,t).trim(),e.slice(t+1).trim()]})}(e,n));return pa(r,t,la)}function ma(e,t){if(e&&!1!==t)return e.split("&").map(e=>{const n=e.indexOf("="),r=-1===n?e:e.slice(0,n),o=new URLSearchParams(`${r}=`).keys().next().value;return void 0!==o&&da(o,t)?`${r}=${ca}`:e}).join("&")}function ga(e){return(e??it())?.getDataCollectionOptions().urlQueryParams??!0}function ya(e,t){return void 0===e?void 0:function(e,t){const n=e.indexOf("#"),r=-1===n?e.length:n,o=e.indexOf("?");if(-1===o||o>r)return e;const s=e.slice(0,o),i=e.slice(o+1,r),a=e.slice(r),c=ma(i,t);return c?`${s}?${c}${a}`:`${s}${a}`}(e,ga(t))}function _a(e,t){return e?ma(e,ga(t)):void 0}function va(e){return"isRelative"in e}function ba(e,t){const n=e.indexOf("://")<=0&&0!==e.indexOf("//"),r=t??(n?"thismessage:/":void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Sa(e){if(va(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function wa(e){return e?.replace(/^\?/,"")||void 0}function ka(e){return e?.replace(/^#/,"")||void 0}function Ea(e,t){try{return new URL(e,t).hostname||void 0}catch{return}}function xa(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Ta(e){return e.split(/[?#]/,1)[0]}function Ia(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&-1!==s){const t=e.slice(s+1);i=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}function Ca(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return function(e,t){const n=ba(e);if(!n||va(n))return!1;if(!t)return!1;return r=n.hostname,o=t.host,(r===o||o.length>0&&r.endsWith(`.${o}`))&&/(^|&|\?)sentry_key=/.test(n.search);var r,o}(e,n)||function(e,t){if(!t)return!1;return Ra(e)===Ra(t)}(e,r)}function Ra(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function Ma(e,...t){const n=e.map((t,n)=>t??e.raw[n]),r=new String(String.raw({raw:n},...t));return r.__sentry_template_string__=n.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),r.__sentry_template_values__=t,r}const Oa=Ma;function Aa(e){const t=e?Fn(e):it()?.getDsn();return t?`/${function(e){let t=2166136261;for(let n=0;n>>0}(Pn(t)).toString(36)}`:void 0}function La(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function Pa(e={}){const t=e.client||it();if(!ni()||!t)return{};const n=Ye(r());if(n.getTraceData)return n.getTraceData(e);const s=e.scope||nt(),i=e.span||gr(),a=Pr(i)&&!br(t.getOptions());if(!i&&void 0!==o(r()).externalPropagationContextProvider)return{};const c=i&&!a?Vn(i):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return zn(t,r,n)}(s),u=Mn(i?Br(i):Fr(t,s));if(!jn.test(c))return p.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const l={"sentry-trace":c,baggage:u};return e.propagateTraceparent&&(l.traceparent=i&&!a?function(e){const{traceId:t,spanId:n}=e.spanContext();return qn(t,n,sr(e))}(i):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return qn(t,r,n)}(s)),l}const Da=new WeakMap;function Na(e){const t=`${e.flags.replace(/[gy]/g,"")}${e.ignoreCase?"":"i"}`;if(t===e.flags)return e;const n=Da.get(e);if(n)return n;const r=new RegExp(e.source,t);return Da.set(e,r),r}function $a(e,t,n=!1){const r=e.toLowerCase();for(const o of t)if(F(o)){const e=o.toLowerCase();if(n?r===e:r.includes(e))return!0}else if(W(o)&&Na(o).test(e))return!0;return!1}const Fa=100;function Ba(t,n){const r=it(),o=rt();if(!r)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=Fa}=r.getOptions();if(i<=0)return;const a={timestamp:xe(),...t},u=s?Hr(e?"The `beforeBreadcrumb` callback threw an error, dropping the breadcrumb:":"",()=>c(()=>s(a,n)),()=>null):a;null!==u&&(r.emit&&r.emit("beforeAddBreadcrumb",u,n),o.addBreadcrumb(u,i))}const ja=new WeakMap,Ua=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=X(this);let r;try{ja.has(it())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){ja.set(e,!0)}}),za=[/^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$/,/Java object is gone$/],qa=(t={})=>{let n;return{name:"EventFilters",setup(e){const r=e.getOptions();n=Wa(t,r)},processEvent(r,o,s){if(!n){const e=s.getOptions();n=Wa(t,e)}return function(t,n){if(t.type){if("transaction"===t.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&ge(n,t)}(t,n.ignoreTransactions))return e&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${ve(t)}`),!0}else{if(function(e,t){if(!t?.length)return!1;return Js(e).some(e=>ge(e,t))}(t,n.ignoreErrors))return e&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ve(t)}`),!0;if(function(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(t))return e&&p.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${ve(t)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=Ha(e);return!!n&&ge(n,t)}(t,n.denyUrls))return e&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ve(t)}.\nUrl: ${Ha(t)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=Ha(e);return!n||ge(n,t)}(t,n.allowUrls))return e&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ve(t)}.\nUrl: ${Ha(t)}`),!0}return!1}(r,n)?null:r}}};function Wa(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:za],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ha(t){try{const e=[...t.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=e?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return e&&p.error(`Cannot extract url for event ${ve(t)}`),null}}function Ga(e,t,n,r,o,s){if(!o.exception?.values||!s||!P(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=Ja(e,t,r,s.originalException,n,o.exception.values,i,0))}function Ja(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(P(r[o])){Ka(i,a,r);const s=e(t,r[o]),u=c.length;Ya(s,o,u,a),c=Ja(e,t,n,r[o],o,[s,...c],s,u)}return Va(r)&&r.errors.forEach((s,u)=>{if(P(s)){Ka(i,a,r);const l=e(t,s),d=c.length;Ya(l,`errors[${u}]`,d,a),c=Ja(e,t,n,s,o,[l,...c],l,d)}}),function(e){return"error"in e&&"suppressed"in e}(r)&&["error","suppressed"].forEach(s=>{const u=r[s];if(P(u)){Ka(i,a,r);const l=e(t,u),d=c.length;Ya(l,s,d,a),c=Ja(e,t,n,u,o,[l,...c],l,d)}}),c}function Va(e){return Array.isArray(e.errors)}function Ka(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Va(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Ya(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Xa(e){return function(e){return P(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const Qa=new Map,Za=new Set;function ec(e,n){return function(e){if(t._sentryModuleMetadata)for(const n of Object.keys(t._sentryModuleMetadata)){const r=t._sentryModuleMetadata[n];if(Za.has(n))continue;Za.add(n);const o=e(n);for(const e of o.reverse())if(e.filename){Qa.set(e.filename,r);break}}}(e),Qa.get(n)}function tc(e,t){t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{if(!t.filename||t.module_metadata)return;const n=ec(e,t.filename);n&&(t.module_metadata=n)})})}function nc(e){e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{delete e.module_metadata})})}const rc=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",e=>{ro(e,(e,t)=>{if("event"===t){const t=Array.isArray(e)?e[1]:void 0;t&&(nc(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;tc(e.getOptions().stackParser,t)})}}),oc=new Set([]);function sc(e){const t="console",n=E(t,e);return x(t,ac),n}const ic=new Set;function ac(){"console"in t&&i.forEach(function(n){!ic.has(n)&&n in t.console&&(ic.add(n),V(t.console,n,function(r){return a[n]=r,function(...r){const o=r[0],s=a[n],i=oc.size&&"string"==typeof o&&ge(o,oc);i||T("console",{args:r,level:n}),(!i||e&&p.isEnabled())&&s?.apply(t.console,r)}}))})}function cc(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const uc=(e={})=>{const n=e.levels||i,r=e.handled??!0;return{name:"CaptureConsole",setup(e){"console"in t&&sc(({args:t,level:o})=>{it()===e&&n.includes(o)&&function(e,t,n){const r=cc(t),o=new Error,s={level:cc(t),extra:{arguments:e}};st(i=>{if(i.addEventProcessor(e=>(e.logger="console",Se(e,{handled:n,type:"auto.core.capture_console"}),e)),"assert"===t){if(!e[0]){const t=`Assertion failed: ${he(e.slice(1)," ")||"console.assert"}`;i.setExtra("arguments",e.slice(1)),i.captureMessage(t,r,{captureContext:s,syntheticException:o})}return}const a=e.find(e=>e instanceof Error);if(a)return void Xs(a,s);const c=he(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}(t,o,r)})}}};const lc=()=>{let t;return{name:"Dedupe",processEvent(n){if(n.type)return n;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!pc(e,t))return!1;if(!dc(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=fc(t),r=fc(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!pc(e,t))return!1;if(!dc(e,t))return!1;return!0}(e,t))return!0;return!1}(n,t))return e&&p.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=n}}};function dc(e,t){const n=b(e),r=b(t);if(!n||!r)return!n&&!r;if(r.length!==n.length)return!1;for(let e=0;e{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:"ExtraErrorData",processEvent(e,r,o){const{maxValueLength:s}=o.getOptions();return function(e,t={},n,r,o){if(!t.originalException||!P(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=mc(t.originalException,r,o);if(i){const t={...e.contexts},r=ce(i,n);return U(r)&&(K(r,oe,!0),t[s]=r),{...e,contexts:t}}return e}(e,r,t,n,s)}}};function mc(t,n,r){try{const e=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const n of Object.keys(t)){if(-1!==e.indexOf(n))continue;const s=t[n];o[n]=P(s)||"string"==typeof s?r?pe(`${s}`,r):`${s}`:s}if(n&&void 0!==t.cause)if(P(t.cause)){const e=t.cause.name||t.cause.constructor.name;o.cause={[e]:mc(t.cause,!1,r)}}else o.cause=t.cause;if("function"==typeof t.toJSON){const e=t.toJSON();for(const t of Object.keys(e)){const n=e[t];o[t]=P(n)?n.toString():n}}return o}catch(t){e&&p.error("Unable to extract extra data from the Error object:",t)}return null}const gc=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function yc(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n="/"===o.charAt(0))}return t=function(e,t){let n=0;for(let t=e.length-1;t>=0;t--){const r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."}function _c(e){let t=0;for(;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function vc(e,t){return function(e){const t=e.length>1024?`${e.slice(-1024)}`:e,n=gc.exec(t);return n?n.slice(1):[]}(e)[2]||""}const bc=(e={})=>{const n=e.root,r=e.prefix||"app:///",o="window"in t&&!!t.window,s=e.iteratee||function({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const e=r.filename;0===e.indexOf(t)&&(r.filename=e.replace(t,n))}}else if(o||s){const e=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,s=t?function(e,t){e=yc(e).slice(1),t=yc(t).slice(1);const n=_c(e.split("/")),r=_c(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let e=0;e{return{...e,...e.stacktrace&&{stacktrace:(t=e.stacktrace,{...t,frames:t?.frames?.map(e=>s(e))})}};var t})}}}catch{return e}}(t)),t}}};const Sc=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],wc=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],kc={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},Ec=["select","insert","upsert","update","delete"];function xc(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Tc(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Ic(e,t){return Object.keys(t).length>0?t:Array.isArray(e)&&e.length>0?e:void 0}function Cc(e,t){if(!e)return;if("function"==typeof e.get)return e.get(t)??void 0;const n=e,r=t.toLowerCase(),o=Object.keys(n).find(e=>e.toLowerCase()===r);return void 0!==o?n[o]:void 0}function Rc(e,t){if(""===t||"*"===t)return"select(*)";if("select"===e)return`select(${t})`;if("or"===e||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return o=n?.startsWith("fts")?"textSearch":n?.startsWith("plfts")?"textSearch[plain]":n?.startsWith("phfts")?"textSearch[phrase]":n?.startsWith("wfts")?"textSearch[websearch]":n&&kc[n]||"filter",`${o}(${e}, ${r.join(".")})`}function Mc(e,t=!1){return new Proxy(e,{apply(n,r,o){const s=`auth${t?".admin":""}.${e.name}`,i=it();return No({name:i&&Zr(i)?s:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[Ft]:"auto.db.supabase",[$t]:"db",[yt]:"postgresql",[gt]:s}},e=>Reflect.apply(n,r,o).then(t=>(z(t)&&"error"in t&&t.error?(e.setStatus({code:2}),Xs(t.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),Xs(t,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),t}).then(...o))}})}function Oc(t,n){Tc(t.prototype.from)||(t.prototype.from=new Proxy(t.prototype.from,{apply(t,r,o){const s=Reflect.apply(t,r,o);return function(t,n){for(const r of Ec)Tc(t.prototype[r])||(t.prototype[r]=new Proxy(t.prototype[r],{apply(t,o,s){const i=Reflect.apply(t,o,s),a=i.constructor;return e&&p.log(`Instrumenting ${r} operation's PostgRESTFilterBuilder`),Ac(a,n),i}}),xc(t.prototype[r]))}(s.constructor,n),s}}),xc(t.prototype.from))}function Ac(e,t){Tc(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(e,n,r){const o=Ec,s=n,i=function(e,t={}){switch(e){case"GET":case"QUERY":return"select";case"POST":return Cc(t,"Prefer")?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return""}}(s.method,s.headers);if(!o.includes(i))return Reflect.apply(e,n,r);if(!s?.url?.pathname||"string"!=typeof s.url.pathname)return Reflect.apply(e,n,r);const a=s.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(const[e,t]of s.url.searchParams.entries())u.push(Rc(e,t));const l=Object.create(null);if(U(s.body))for(const[e,t]of Object.entries(s.body))l[e]=t;const d=it(),p=t.sendOperationData??!0===d?.getDataCollectionOptions().databaseQueryData,f=Ic(s.body,l),h="select"===i?"":`${i}${m=s.body,g=l,void 0!==Ic(m,g)?"(...) ":""}`;var m,g;const y=p?u.join(" "):u.length>0?"[redacted]":"",_=[h.trimEnd(),y].filter(Boolean).join(" "),v=_?`${_} from(${c})`:`from(${c})`,b=d&&Zr(d)?`${i}${c?` ${c}`:""}`:v,S={"db.table":c,"db.schema":s.schema,"db.url":s.url.origin,"db.sdk":Cc(s.headers,"X-Client-Info"),[yt]:"postgresql",[gt]:i,[Ft]:"auto.db.supabase",[$t]:"db"};return u.length&&p&&(S["db.query"]=u),void 0!==f&&p&&(S["db.body"]=f),No({name:b,attributes:S},t=>Reflect.apply(e,n,[]).then(e=>{if(t&&(e&&"object"==typeof e&&"status"in e&&vn(t,e.status||500),t.end()),e?.error){const t=new Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);const n={};u.length&&p&&(n.query=u),void 0!==f&&p&&(n.body=f),Xs(t,e=>(e.addEventProcessor(e=>(Se(e,{handled:!1,type:"auto.db.supabase.postgres"}),e)),e.setContext("supabase",n),e))}const n={type:"supabase",category:`db.${i}`,message:v},r={};return u.length&&p&&(r.query=u),void 0!==f&&p&&(r.body=f),Object.keys(r).length&&(n.data=r),Ba(n),e},e=>{throw t&&(vn(t,500),t.end()),e}).then(...r))}}),xc(e.prototype.then))}const Lc=(t,n={})=>{if(!t)return void(e&&p.warn("Supabase integration was not installed because no Supabase client was provided."));Oc(t.constructor===Function?t:t.constructor,n),function(e){const t=e.auth;if(t&&!Tc(e.auth)){for(const n of Sc){const r=t[n];r&&"function"==typeof e.auth[n]&&(e.auth[n]=Mc(r))}for(const n of wc){const r=t.admin[n];r&&"function"==typeof e.auth.admin[n]&&(e.auth.admin[n]=Mc(r,!0))}xc(e.auth)}}(t)},Pc=e=>((e,t)=>({setupOnce(){Lc(e,t)},name:"Supabase"}))(e.supabaseClient,{sendOperationData:e.sendOperationData});function Dc(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function Nc(e){return e.map(e=>"number"==typeof e?"":e).join(".")}function $c(e){const t=new Set;for(const n of e.issues){const e=Nc(n.path);e.length>0&&t.add(e)}const n=Array.from(t);if(0===n.length){let t="variable";if(e.issues.length>0){const n=e.issues[0];void 0!==n&&"expected"in n&&"string"==typeof n.expected&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${pe(n.join(", "),100)}`}function Fc(e,t=!1,n,r){if(!(n.exception?.values&&r.originalException&&(o=r.originalException,P(o)&&"ZodError"===o.name&&Array.isArray(o.issues))&&0!==r.originalException.issues.length))return n;var o;try{const o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(Dc);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:$c(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:"unknown"}}}}}const Bc=(e={})=>{const t=e.limit??10;return{name:"ZodErrors",processEvent:(n,r)=>Fc(t,e.saveZodIssuesAsAttachment,n,r)}},jc=e=>{const n=e.ignoreSentryInternalFrames??!1;return{name:"ThirdPartyErrorsFilter",setup(e){e.on("beforeEnvelope",e=>{ro(e,(e,t)=>{if("event"===t){const t=Array.isArray(e)?e[1]:void 0;t&&(nc(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;tc(e.getOptions().stackParser,t)})},preprocessEvent(e){n&&(t._sentryWrappedDepth??0)>0&&(e.sdkProcessingMetadata={...e.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){const r=!!n&&(!0===t.sdkProcessingMetadata?.insideSentryWrapped&&1===t.exception?.values?.length),o=function(e,t,n){const r=b(e);if(!r)return;return r.filter((e,r)=>!!e.filename&&((null!=e.lineno||null!=e.colno||null!=e.instruction_addr)&&(!t||!function(e,t,n){if(0!==t)return!1;if(n&&function(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}(e))return!0;if("sentryWrapped"===e.function)return!0;if(!e.context_line||!e.filename)return!1;if(!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(qc))return!1;if(e.pre_context){const t=e.pre_context.length;for(let n=0;ne.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(Uc)).map(e=>e.slice(Uc.length)):[])}(t,n,r);if(o){const n=o["drop-error-if-contains-third-party-frames"===e.behaviour||"apply-tag-if-contains-third-party-frames"===e.behaviour?"some":"every"](t=>!t.some(t=>e.filterKeys.includes(t)));if(n){if("drop-error-if-contains-third-party-frames"===e.behaviour||"drop-error-if-exclusively-contains-third-party-frames"===e.behaviour)return null;t.tags={...t.tags,third_party_code:!0}}}return t}}};const Uc="_sentryBundlerPluginAppKey:",zc="Attempt to invoke user-land function",qc="fn.apply(this, wrappedArguments)",Wc=(e={})=>{const t=new Set(e.levels||i);return{name:"Console",setup(n){const r=sc(({args:e,level:r})=>{it()===n&&t.has(r)&&function(e,t){const n={category:"console",data:{arguments:t,logger:"console"},level:cc(e),message:Hc(t)};if("assert"===e){if(!1!==t[0])return;{const e=t.slice(1);n.message=e.length>0?`Assertion failed: ${Hc(e)}`:"Assertion failed",n.data.arguments=e}}Ba(n,{input:t,level:e})}(r,e)});if(n.registerCleanup(r),e.filter){const t=function(e){for(const t of e)oc.add(t);return()=>{for(const t of e)oc.delete(t)}}(e.filter);n.registerCleanup(t)}}}};function Hc(e){return"util"in t&&"function"==typeof t.util.format?t.util.format(...e):he(e," ")}const Gc="flag.evaluation.";function Jc(e){if(e.type)return e;const t=nt().getScopeData().contexts.flags,n=t?t.values:[];return n.length?(void 0===e.contexts&&(e.contexts={}),e.contexts.flags={values:[...n]},e):e}function Vc(t,n,r=100){const o=nt().getScopeData().contexts;o.flags||(o.flags={values:[]});!function(t,n,r,o){if("boolean"!=typeof r)return;if(t.length>o)return void(e&&p.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${o}`));const s=t.findIndex(e=>e.flag===n);-1!==s&&t.splice(s,1);t.length===o&&t.shift();t.push({flag:n,result:r})}(o.flags.values,t,n,r)}function Kc(e,t,n=10){if("boolean"!=typeof t)return;const r=gr();if(!r)return;const o=Zn(r).data;if(`${Gc}${e}`in o)return void r.setAttribute(`${Gc}${e}`,t);Object.keys(o).filter(e=>e.startsWith(Gc)).length({name:"FeatureFlags",processEvent:(e,t,n)=>Jc(e),addFeatureFlag(e,t){Vc(e,t),Kc(e,t)}}),Xc=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;"function"==typeof t.isOn&&V(t,"isOn",Qc),"function"==typeof t.getFeatureValue&&V(t,"getFeatureValue",Qc)},processEvent:(e,t,n)=>Jc(e)});function Qc(e){return function(...t){const n=t[0],r=e.apply(this,t);return"string"==typeof n&&"boolean"==typeof r&&(Vc(n,r),Kc(n,r)),r}}const Zc=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=nt().getScopeData(),n=rt().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:o}=Zn(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!o?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function eu(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=br()&&t(i);if(e.endTimestamp){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(a&&(function(e,t){if(t.response){vn(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute(Et,t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),function(e,t,n){n?.onRequestSpanEnd?.(e,{headers:t.response?.headers,error:t.error})}(n,e,o)),delete r[t]))}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1,urlBase:l}=o??{},d=it(),p=!!gr(),f=p||!!d&&Zr(d),h=a&&f?$o(function(e,t,n,r,o){const s=!!r&&Zr(r),i=Ea(e,o);if(e.startsWith("data:")){const o=Ia(e);return{name:s?t:`${t} ${o}`,attributes:nu(e,void 0,t,n,r,i)}}const a=ba(e),c=a?Sa(a):e;return{name:s?i?`${t} ${i}`:t:`${t} ${c}`,attributes:nu(e,a,t,n,r,i)}}(i,s,c,d,l)):new Lr,m=Ko(h)&&p?void 0:h;if(a&&!f&&d?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(e.fetchData.url)){const t=e.args[0],n={...e.args[1]||{}},r=function(e,t,n,r){const o=Pa({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(J(e)?e.headers:void 0);if(c){if(function(e){return"undefined"!=typeof Headers&&G(e,Headers)}(c)){const e=new Headers(c);if(e.get("sentry-trace")||e.set("sentry-trace",s),r&&a&&!e.get("traceparent")&&e.set("traceparent",a),i){const t=e.get("baggage");t?tu(t)||e.set("baggage",`${t},${i}`):e.set("baggage",i)}return e}if(function(e){if(!Array.isArray(e))return!1;return e.every(e=>Array.isArray(e)&&2===e.length&&"string"==typeof e[0])}(c)){const e=[...c];e.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",s]),r&&a&&!e.find(e=>"traceparent"===e[0])&&e.push(["traceparent",a]);const t=c.find(e=>"baggage"===e[0]&&"string"==typeof e[1]&&tu(e[1]));return i&&!t&&e.push(["baggage",i]),e}{const e="sentry-trace"in c?c["sentry-trace"]:void 0,t="traceparent"in c?c.traceparent:void 0,n="baggage"in c?c.baggage:void 0,o=n?Array.isArray(n)?[...n]:[n]:[],u=n&&(Array.isArray(n)?n.find(e=>tu(e)):tu(n));i&&!u&&o.push(i);const l=Object.assign({},c,{"sentry-trace":e??s,...o.length>0&&{baggage:o.join(",")}});return r&&a&&!t&&(l.traceparent=a),l}}return{"sentry-trace":s,...i&&{baggage:i},...a&&{traceparent:a}}}(t,n,br()&&f?m:void 0,u);r&&(e.args[1]=n,n.headers=r)}if(d){const t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",h,t)}return h}function tu(e){return"string"==typeof e&&e.split(",").some(e=>e.trim().startsWith(Cn))}function nu(e,t,n,r,o,s){const i={[tn]:ya(Ia(e),o),type:"fetch",[wt]:n,[Ft]:r,[$t]:Ts,[Zt]:s};return t&&(va(t)||(i[tn]=ya(Ia(t.href),o),i[Xt]=t.hostname,i["server.port"]=t.port?Number(t.port):void 0),i[rn]=_a(wa(t.search),o),i[en]=ka(t.hash)),i}const ru=t;function ou(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function su(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in ru))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(ou(ru.fetch))return!0;let t=!1;const n=ru.document;if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e),e.contentWindow?.fetch&&(t=ou(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){e&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t}function iu(e){const t="fetch",n=E(t,e);return x(t,()=>au()),n}function au(e){go()&&!su()||V(t,"fetch",function(n){return new Proxy(n,{apply(n,r,o){const s=new Error,{method:i,url:a}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:lu(t),method:uu(n,"method")?String(n.method).toUpperCase():J(t)&&uu(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:lu(t),method:uu(t,"method")?String(t.method).toUpperCase():"GET"}}(o),c={args:o,fetchData:{method:i,url:a},startTimestamp:1e3*Oe(),virtualError:s,headers:du(o)};return e||T("fetch",{...c}),Reflect.apply(n,t,o).then(async t=>(e?e(t):T("fetch",{...c,endTimestamp:1e3*Oe(),response:t}),t),e=>{T("fetch",{...c,endTimestamp:1e3*Oe(),error:e}),P(e)&&void 0===e.stack&&(e.stack=s.stack,K(e,"framesToPop",1));const n=it(),r=n?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==r&&P(e)&&"TypeError"===e.name&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const n=new URL(c.fetchData.url,t.location?.href).host;n&&("always"===r?e.message=`${e.message} (${n})`:K(e,"__sentry_fetch_url_host__",n))}catch{}throw e})}})})}function cu(e){let t;try{t=e.clone()}catch{return}!async function(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(e),o&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(e)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{T("fetch-body-resolved",{endTimestamp:1e3*Oe(),response:e})})}function uu(e,t){return z(e)&&!!e[t]}function lu(e){return"string"==typeof e?e:e?uu(e,"url")?e.url:e.toString?e.toString():"":""}function du(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(J(t))return new Headers(t.headers)}catch{}}function pu(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}class fu{constructor(e){this._maxSize=e,this._cache=new Map}get size(){return this._cache.size}get(e){const t=this._cache.get(e);if(void 0!==t)return this._cache.delete(e),this._cache.set(e,t),t}set(e,t){if(this._cache.delete(e),this._cache.size>=this._maxSize){const e=this._cache.keys().next().value;this._cache.delete(e)}this._cache.set(e,t)}remove(e){const t=this._cache.get(e);return t&&this._cache.delete(e),t}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){const e=[];return this._cache.forEach(t=>e.push(t)),e}}function hu(e,t={},n=nt()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,l={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},d=n?.getClient()||it();d&&d.emit("beforeSendFeedback",l,t);return n.captureEvent(l,t)}function mu(e,t,n,r,o){_i({level:e,message:t,attributes:n,severityNumber:o},r)}var gu=Object.freeze({__proto__:null,debug:function(e,t,{scope:n}={}){mu("debug",e,t,n)},error:function(e,t,{scope:n}={}){mu("error",e,t,n)},fatal:function(e,t,{scope:n}={}){mu("fatal",e,t,n)},fmt:Oa,info:function(e,t,{scope:n}={}){mu("info",e,t,n)},trace:function(e,t,{scope:n}={}){mu("trace",e,t,n)},warn:function(e,t,{scope:n}={}){mu("warn",e,t,n)}});function yu(e,n,r){return"util"in t&&"function"==typeof t.util.format?t.util.format(...e):function(e,t,n){return e.map(e=>j(e)?String(e):JSON.stringify(ce(e,t,n))).join(" ")}(e,n,r)}function _u(e){return/%[sdifocO]/.test(e)}function vu(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((e,t)=>{n[`sentry.message.parameter.${t}`]=e}),n}const bu={[Ft]:"auto.log.console"},Su=(e={})=>{const t=e.levels||i;return{name:"ConsoleLogs",setup(e){const{normalizeDepth:n=3,normalizeMaxBreadth:r=1e3}=e.getOptions(),o=sc(({args:o,level:s})=>{if(it()!==e||!t.includes(s))return;const i=o[0],a=o.slice(1);if("assert"===s){if(!i){_i({level:"error",message:a.length>0?`Assertion failed: ${yu(a,n,r)}`:"Assertion failed",attributes:bu})}return}const c="log"===s,u={...bu};if(U(i)){Object.assign(u,ce(i,n,r));const e="string"==typeof o[1]?2:1;o.slice(e).forEach((e,t)=>{u[`sentry.message.parameter.${t}`]=ce(e,n,r)})}else{if(a.length>0&&"string"==typeof i&&!_u(i)){const e=vu(i,a);for(const[t,o]of Object.entries(e))u[t]=t.startsWith("sentry.message.parameter.")?ce(o,n,r):o}}_i({level:c?"info":s,message:yu(o,n,r),severityNumber:c?10:void 0,attributes:u})});e.registerCleanup(o)}}};function wu(e,t,n,r){Ii({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function ku(e,t=1,n){wu("counter",e,t,n)}function Eu(e,t,n){wu("distribution",e,t,n)}var xu=Object.freeze({__proto__:null,count:ku,distribution:Eu,gauge:function(e,t,n){wu("gauge",e,t,n)}});const Tu=["trace","debug","info","warn","error","fatal"];const Iu={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},Cu={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};const Ru=t,Mu=Ru.document,Ou=Ru.navigator,Au="Report a Bug",Lu="Unable to submit feedback with empty message",Pu="No client setup, cannot send feedback.",Du="Unable to determine if Feedback was correctly sent.",Nu="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",$u="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",Fu={ERROR_EMPTY_MESSAGE:Lu,ERROR_NO_CLIENT:Pu,ERROR_TIMEOUT:Du,ERROR_FORBIDDEN:Nu,ERROR_GENERIC:$u};function Bu(e,t){return new Error(function(e,t){return t?.[e]??Fu[e]}(e,t))}const ju=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw Bu("ERROR_EMPTY_MESSAGE",n);const r=it();if(!r)throw Bu("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&nt().setTags(e.tags);const o=hu({source:"api",url:Uu(),...e},t);return new Promise((e,t)=>{const s=setTimeout(()=>{i(),t(Bu("ERROR_TIMEOUT",n))},3e4),i=r.on("afterSendEvent",(r,a)=>{if(r.event_id===o)return clearTimeout(s),i(),a?.statusCode&&a.statusCode>=200&&a.statusCode<300?e(o):t(Bu(403===a?.statusCode?"ERROR_FORBIDDEN":"ERROR_GENERIC",n))})})};function Uu(){try{return Ru.document.location.href}catch{return""}}const zu="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function qu(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Wu(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}function Hu({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=Mu.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||Au,o.appendChild(function(){const e=e=>Ru.document.createElementNS("http://www.w3.org/2000/svg",e),t=Wu(e("svg"),{width:"20",height:"20",viewBox:"0 0 20 20",fill:"var(--actor-color, var(--foreground))"}),n=Wu(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Wu(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),s=Wu(e("clipPath"),{id:"clip0_57_80"}),i=Wu(e("rect"),{width:"20",height:"20",fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}()),e){const t=Mu.createElement("span");t.appendChild(Mu.createTextNode(e)),o.appendChild(t)}const s=function(e){const t=Mu.createElement("style");return t.textContent='\n.widget__actor {\n position: fixed;\n z-index: var(--z-index);\n margin: var(--page-margin);\n inset: var(--actor-inset);\n\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 16px;\n\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n line-height: 1.14em;\n text-decoration: none;\n\n background: var(--actor-background, var(--background));\n border-radius: var(--actor-border-radius, 1.7em/50%);\n border: var(--actor-border, var(--border));\n box-shadow: var(--actor-box-shadow, var(--box-shadow));\n color: var(--actor-color, var(--foreground));\n fill: var(--actor-color, var(--foreground));\n cursor: pointer;\n opacity: 1;\n transition: transform 0.2s ease-in-out;\n transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden="true"] {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n background: var(--actor-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n width: 1.14em;\n height: 1.14em;\n}\n\n@media (max-width: 600px) {\n .widget__actor span {\n display: none;\n }\n}\n',e&&t.setAttribute("nonce",e),t}(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const Gu="rgba(88, 74, 192, 1)",Ju={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Gu,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},Vu={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Gu,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function Ku(e){return`\n --foreground: ${e.foreground};\n --background: ${e.background};\n --accent-foreground: ${e.accentForeground};\n --accent-background: ${e.accentBackground};\n --success-color: ${e.successColor};\n --error-color: ${e.errorColor};\n --border: ${e.border};\n --box-shadow: ${e.boxShadow};\n --outline: ${e.outline};\n --interactive-filter: ${e.interactiveFilter};\n `}function Yu({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=Mu.createElement("style");return o.textContent=`\n:host {\n --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n --font-size: 14px;\n --z-index: 100000;\n\n --page-margin: 16px;\n --inset: auto 0 0 auto;\n --actor-inset: var(--inset);\n\n font-family: var(--font-family);\n font-size: var(--font-size);\n\n ${"system"!==e?`color-scheme: only ${e};`:""}\n\n ${Ku("dark"===e?{...Vu,...t}:{...Ju,...n})}\n}\n\n${"system"===e?`\n@media (prefers-color-scheme: dark) {\n :host {\n color-scheme: only dark;\n\n ${Ku({...Vu,...t})}\n }\n}`:""}\n`,r&&o.setAttribute("nonce",r),o}const Xu=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:r="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:i=!1,isNameRequired:a=!1,showEmail:c=!0,showName:u=!0,enableScreenshot:l=!0,useSentryUser:d={email:"email",name:"username"},tags:f,styleNonce:h,scriptNonce:m,colorScheme:g="system",themeLight:y={},themeDark:_={},addScreenshotButtonLabel:v="Add a screenshot",cancelButtonLabel:b="Cancel",confirmButtonLabel:S="Confirm",emailLabel:w="Email",emailPlaceholder:k="your.email@example.org",formTitle:E="Report a Bug",isRequiredLabel:x="(required)",messageLabel:T="Description",messagePlaceholder:I="What's the bug? What did you expect?",nameLabel:C="Name",namePlaceholder:R="Your Name",removeScreenshotButtonLabel:M="Remove screenshot",submitButtonLabel:O="Send Bug Report",successMessageText:A="Thank you for your report!",triggerLabel:L=Au,triggerAriaLabel:P="",highlightToolText:D="Highlight",hideToolText:N="Hide",removeHighlightText:$="Remove",errorEmptyMessageText:F=Lu,errorNoClientText:B=Pu,errorTimeoutText:j=Du,errorForbiddenText:U=Nu,errorGenericText:z=$u,onFormOpen:q,onFormClose:W,onSubmitSuccess:H,onSubmitError:G,onFormSubmitted:J}={})=>{const V={id:r,autoInject:o,showBranding:s,isEmailRequired:i,isNameRequired:a,showEmail:c,showName:u,enableScreenshot:l,useSentryUser:d,tags:f,styleNonce:h,scriptNonce:m,colorScheme:g,themeDark:_,themeLight:y,triggerLabel:L,triggerAriaLabel:P,cancelButtonLabel:b,submitButtonLabel:O,confirmButtonLabel:S,formTitle:E,emailLabel:w,emailPlaceholder:k,messageLabel:T,messagePlaceholder:I,nameLabel:C,namePlaceholder:R,successMessageText:A,isRequiredLabel:x,addScreenshotButtonLabel:v,removeScreenshotButtonLabel:M,highlightToolText:D,hideToolText:N,removeHighlightText:$,errorEmptyMessageText:F,errorNoClientText:B,errorTimeoutText:j,errorForbiddenText:U,errorGenericText:z,onFormClose:W,onFormOpen:q,onSubmitError:G,onSubmitSuccess:H,onFormSubmitted:J};let K=null,Y=null,X=[];const Q=e=>{if(!K){const t=Mu.createElement("div");t.id=String(e.id),Mu.body.appendChild(t),K=t.attachShadow({mode:"open"}),Y=Yu(e),K.appendChild(Y)}return K},Z=async r=>{const o=r.enableScreenshot&&!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Ou.userAgent)||/Macintosh/i.test(Ou.userAgent)&&Ou.maxTouchPoints&&Ou.maxTouchPoints>1||!isSecureContext);let s,i;try{s=(t?t():await e("feedbackModalIntegration",m))(),Mr(s)}catch{throw zu&&p.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const t=o?n?n():await e("feedbackScreenshotIntegration",m):void 0;t&&(i=t(),Mr(i))}catch{zu&&p.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const a={ERROR_EMPTY_MESSAGE:r.errorEmptyMessageText,ERROR_NO_CLIENT:r.errorNoClientText,ERROR_TIMEOUT:r.errorTimeoutText,ERROR_FORBIDDEN:r.errorForbiddenText,ERROR_GENERIC:r.errorGenericText},c=s.createDialog({options:{...r,onFormClose:()=>{c?.close(),r.onFormClose?.()},onFormSubmitted:()=>{c?.close(),r.onFormSubmitted?.()}},screenshotIntegration:i,sendFeedback:(e,t)=>ju(e,{includeReplay:!0,...t,errorMessages:a}),shadow:Q(r)});return c},ee=(e,t={})=>{const n=qu(V,t),r="string"==typeof e?Mu.querySelector(e):"function"==typeof e.addEventListener?e:null;if(!r)throw zu&&p.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let o=null;const s=async()=>{o||(o=await Z({...n,onFormSubmitted:()=>{o?.removeFromDom(),n.onFormSubmitted?.()}})),o.appendToDom(),o.open()};r.addEventListener("click",s);const i=()=>{X=X.filter(e=>e!==i),o?.removeFromDom(),o=null,r.removeEventListener("click",s)};return X.push(i),i},te=(e={})=>{const t=qu(V,e),n=Q(t),r=Hu({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:h});return ee(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:"Feedback",setupOnce(){go()&&V.autoInject&&("loading"===Mu.readyState?Mu.addEventListener("DOMContentLoaded",()=>te().appendToDom()):te().appendToDom())},attachTo:ee,createWidget(e={}){const t=te(qu(V,e));return t.appendToDom(),t},createForm:async(e={})=>Z(qu(V,e)),setTheme(e){if(V.colorScheme=e,K){const e=Yu(V);Y?K.replaceChild(e,Y):K.prepend(e),Y=e}},remove(){K&&(K.parentElement?.remove(),K=null,Y=null),X.forEach(e=>e()),X=[]}}};var Qu,Zu,el,tl,nl,rl,ol,sl,il,al,cl,ul,ll,dl,pl={},fl=[],hl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ml=Array.isArray;function gl(e,t){for(var n in t)e[n]=t[n];return e}function yl(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _l(e,t,n){var r,o,s,i={};for(s in t)"key"==s?r=t[s]:"ref"==s?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?Qu.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===i[s]&&(i[s]=e.defaultProps[s]);return vl(e,i,r,o,null)}function vl(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++el:o,__i:-1,__u:0};return null==o&&null!=Zu.vnode&&Zu.vnode(s),s}function bl(e){return e.children}function Sl(e,t){this.props=e,this.context=t}function wl(e,t){if(null==t)return e.__?wl(e.__,e.__i+1):null;for(var n;tt&&tl.sort(ol),e=tl.shift(),t=tl.length,kl(e)}finally{tl.length=Tl.__r=0}}function Il(e,t,n,r,o,s,i,a,c,u,l){var d,p,f,h,m,g,y=r&&r.__k||fl,_=t.length;for(c=function(e,t,n,r,o){var s,i,a,c,u,l=n.length,d=l,p=0;for(e.__k=new Array(o),s=0;s0?i=e.__k[s]=vl(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):e.__k[s]=i,c=s+p,i.__=e,i.__b=e.__b+1,a=null,-1!=(u=i.__i=Rl(i,n,c,d))&&(d--,(a=n[u])&&(a.__u|=2)),null==a||null==a.__v?(-1==u&&(o>l?p--:oc?p--:p++,i.__u|=4))):e.__k[s]=null;if(d)for(s=0;s(l?1:0))for(o=n-1,s=n+1;o>=0||s=0?o--:s++])&&!(2&u.__u)&&a==u.key&&c==u.type)return i;return-1}function Ml(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||hl.test(t)?n:n+"px"}function Ol(e,t,n,r,o){var s,i;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ml(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Ml(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])s=t!=(t=t.replace(cl,"$1")),i=t.toLowerCase(),t=i in e||"onFocusOut"==t||"onFocusIn"==t?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n[al]=r[al]:(n[al]=ul,e.addEventListener(t,s?dl:ll,s)):e.removeEventListener(t,s?dl:ll,s);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function Al(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t[il])t[il]=ul++;else if(t[il]0?e:ml(e)?e.map(Nl):void 0!==e.constructor?null:gl({},e)}function $l(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){Zu.__e(e,n)}}function Fl(e,t,n){var r,o;if(Zu.unmount&&Zu.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||$l(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Zu.__e(e,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(o=0;o=n.__.length&&n.__.push({}),n.__[e]}function ed(e){return Wl=1,td(dd,e)}function td(e,t,n){var r=Zl(jl++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):dd(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ul,!Ul.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=!1,i=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){o=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),s){var a=s.call(this,e,t,n);return o?a||i:a}return!o||i};Ul.__f=!0;var s=Ul.shouldComponentUpdate,i=Ul.componentWillUpdate;Ul.componentWillUpdate=function(e,t,n){if(this.__e){var r=s;s=void 0,o(e,t,n),s=r}i&&i.call(this,e,t,n)},Ul.shouldComponentUpdate=o}return r.__N||r.__}function nd(e,t){var n=Zl(jl++,4);!Gl.__s&&ld(n.__H,t)&&(n.__=e,n.u=t,Ul.__h.push(n))}function rd(e,t){var n=Zl(jl++,7);return ld(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function od(e,t){return Wl=8,rd(function(){return e},t)}function sd(){for(var e;e=Hl.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(cd),t.__h.some(ud),t.__h=[]}catch(n){t.__h=[],Gl.__e(n,e.__v)}}}Gl.__b=function(e){Ul=null,Jl&&Jl(e)},Gl.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ql&&Ql(e,t)},Gl.__r=function(e){Vl&&Vl(e),jl=0;var t=(Ul=e.__c).__H;t&&(zl===Ul?(t.__h=[],Ul.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(cd),t.__h.some(ud),t.__h=[],jl=0)),zl=Ul},Gl.diffed=function(e){Kl&&Kl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Hl.push(t)&&ql===Gl.requestAnimationFrame||((ql=Gl.requestAnimationFrame)||ad)(sd)),t.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),zl=Ul=null},Gl.__c=function(e,t){t.some(function(e){try{e.__h.some(cd),e.__h=e.__h.filter(function(e){return!e.__||ud(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],Gl.__e(n,e.__v)}}),Yl&&Yl(e,t)},Gl.unmount=function(e){Xl&&Xl(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{cd(e)}catch(e){t=e}}),n.__H=void 0,t&&Gl.__e(t,n.__v))};var id="function"==typeof requestAnimationFrame;function ad(e){var t,n=function(){clearTimeout(r),id&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);id&&(t=requestAnimationFrame(n))}function cd(e){var t=Ul,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ul=t}function ud(e){var t=Ul;e.__c=e.__(),Ul=t}function ld(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function dd(e,t){return"function"==typeof t?t(e):t}const pd=Object.defineProperty({__proto__:null,useCallback:od,useContext:function(e){var t=Ul.context[e.__c],n=Zl(jl++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Ul)),t.props.value):e.__},useDebugValue:function(e,t){Gl.useDebugValue&&Gl.useDebugValue(t?t(e):e)},useEffect:function(e,t){var n=Zl(jl++,3);!Gl.__s&&ld(n.__H,t)&&(n.__=e,n.u=t,Ul.__H.__h.push(n))},useErrorBoundary:function(e){var t=Zl(jl++,10),n=ed();return t.__=e,Ul.componentDidCatch||(Ul.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:function(){var e=Zl(jl++,11);if(!e.__){for(var t=Ul.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__},useImperativeHandle:function(e,t,n){Wl=6,nd(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))},useLayoutEffect:nd,useMemo:rd,useReducer:td,useRef:function(e){return Wl=5,rd(function(){return{current:e}},[])},useState:ed},Symbol.toStringTag,{value:"Module"});function fd(){const e=e=>Mu.createElementNS("http://www.w3.org/2000/svg",e),t=Wu(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Wu(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function hd({options:e}){const t=rd(()=>({__html:fd().outerHTML}),[]);return _l("h2",{class:"dialog__header"},_l("span",{class:"dialog__title"},e.formTitle),e.showBranding?_l("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function md(e,t){const n=e.get(t);return"string"==typeof n?n.trim():""}function gd({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:l,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:f,cancelButtonLabel:h,emailLabel:m,emailPlaceholder:g,isEmailRequired:y,isNameRequired:_,messageLabel:v,messagePlaceholder:b,nameLabel:S,namePlaceholder:w,submitButtonLabel:k,isRequiredLabel:E}=e,[x,T]=ed(!1),[I,C]=ed(null),[R,M]=ed(!1),O=u?.input,[A,L]=ed(null),P=od(e=>{L(e),M(!1)},[]),D=od(e=>{const t=function(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}(e,{emailLabel:m,isEmailRequired:y,isNameRequired:_,messageLabel:v,nameLabel:S});return t.length>0?C(`Please enter in the following required fields: ${t.join(", ")}`):C(null),0===t.length},[m,y,_,v,S]),N=od(async e=>{T(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;const t=new FormData(e.target),n=await(u&&R?u.value():void 0),r={name:md(t,"name"),email:md(t,"email"),message:md(t,"message"),attachments:n?[n]:void 0};if(!D(r))return;try{const e=await o({name:r.name,email:r.email,message:r.message,source:"widget",tags:l},{attachments:r.attachments});s(r,e)}catch(e){zu&&p.error(e);const t=e;C(t.message),i(t)}}finally{T(!1)}},[u&&R,s,i]);return _l("form",{class:"form",onSubmit:N},O&&R?_l(O,{onError:P}):null,_l("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:x},_l("div",{class:"form__top"},I?_l("div",{class:"form__error-container"},I):null,c?_l("label",{for:"name",class:"form__label"},_l(yd,{label:S,isRequiredLabel:E,isRequired:_}),_l("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:w,required:_,type:"text"})):_l("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?_l("label",{for:"email",class:"form__label"},_l(yd,{label:m,isRequiredLabel:E,isRequired:y}),_l("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:g,required:y,type:"email"})):_l("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),_l("label",{for:"message",class:"form__label"},_l(yd,{label:v,isRequiredLabel:E,isRequired:!0}),_l("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:b,required:!0,rows:5})),O?_l("label",{for:"screenshot",class:"form__label"},_l("button",{class:"btn btn--default",disabled:x,type:"button",onClick:()=>{L(null),M(e=>!e)}},R?f:d),A?_l("div",{class:"form__error-container"},A.message):null):null),_l("div",{class:"btn-group"},_l("button",{class:"btn btn--primary",disabled:x,type:"submit"},k),_l("button",{class:"btn btn--default",disabled:x,type:"button",onClick:r},h))))}function yd({label:e,isRequired:t,isRequiredLabel:n}){return _l("span",{class:"form__label__text"},e,t&&_l("span",{class:"form__label__text--required"},n))}function _d(){const e=e=>Ru.document.createElementNS("http://www.w3.org/2000/svg",e),t=Wu(e("svg"),{width:"16",height:"17",viewBox:"0 0 16 17",fill:"inherit"}),n=Wu(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Wu(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Wu(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=Wu(e("clipPath"),{id:"clip0_57_156"}),a=Wu(e("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function vd({open:e,onFormSubmitted:t,...n}){const r=n.options,o=rd(()=>({__html:_d().outerHTML}),[]),[s,i]=ed(null),a=od(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=od((e,r)=>{n.onSubmitSuccess(e,r),i(setTimeout(()=>{t(),i(null)},5e3))},[t]);return _l(bl,null,s?_l("div",{class:"success__position",onClick:a},_l("div",{class:"success__content"},r.successMessageText,_l("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):_l("dialog",{class:"dialog",onClick:r.onFormClose,open:e},_l("div",{class:"dialog__position"},_l("div",{class:"dialog__content",onClick:e=>{e.stopPropagation()}},_l(hd,{options:r}),_l(gd,{...n,onSubmitSuccess:c})))))}const bd=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=function(){const e=nt().getUser(),t=rt().getUser(),n=ot().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}(),a=Mu.createElement("div"),c=function(e){const t=Mu.createElement("style");return t.textContent="\n:host {\n --dialog-inset: var(--inset);\n}\n\n\n.dialog {\n position: fixed;\n z-index: var(--z-index);\n margin: 0;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n height: 100vh;\n width: 100vw;\n\n color: var(--dialog-color, var(--foreground));\n fill: var(--dialog-color, var(--foreground));\n line-height: 1.75em;\n\n background-color: rgba(0, 0, 0, 0.05);\n border: none;\n inset: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n position: fixed;\n z-index: var(--z-index);\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n display: flex;\n max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n .dialog__position {\n inset: var(--page-margin);\n padding: 0;\n }\n}\n\n.dialog__position:has(.editor) {\n inset: var(--page-margin);\n padding: 0;\n}\n\n.dialog:not([open]) {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: var(--dialog-padding, 24px);\n max-width: 100%;\n width: 100%;\n max-height: 100%;\n overflow: auto;\n\n background: var(--dialog-background, var(--background));\n border-radius: var(--dialog-border-radius, 20px);\n border: var(--dialog-border, var(--border));\n box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n transform: translate(0, 0) scale(1);\n transition: transform 0.2s ease-in-out;\n}\n\n\n\n.dialog__header {\n display: flex;\n gap: 4px;\n justify-content: space-between;\n font-weight: var(--dialog-header-weight, 600);\n margin: 0;\n}\n.dialog__title {\n align-self: center;\n width: var(--form-width, 272px);\n}\n\n@media (max-width: 600px) {\n .dialog__title {\n width: auto;\n }\n}\n\n.dialog__position:has(.editor) .dialog__title {\n width: auto;\n}\n\n\n.brand-link {\n display: inline-flex;\n}\n.brand-link:focus-visible {\n outline: var(--outline);\n}\n\n\n.form {\n display: flex;\n overflow: auto;\n flex-direction: row;\n gap: 16px;\n flex: 1 0;\n}\n\n.form fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n.form__right {\n flex: 0 0 auto;\n display: flex;\n overflow: auto;\n flex-direction: column;\n justify-content: space-between;\n gap: 20px;\n width: var(--form-width, 100%);\n}\n\n.dialog__position:has(.editor) .form__right {\n width: var(--form-width, 272px);\n}\n\n.form__top {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form__error-container {\n color: var(--error-color);\n fill: var(--error-color);\n width: 0;\n min-width: 100%;\n overflow-wrap: break-word;\n}\n\n.form__label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0px;\n}\n\n.form__label__text {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.form__label__text--required {\n font-size: 0.85em;\n}\n\n.form__input {\n font-family: inherit;\n line-height: inherit;\n background: transparent;\n box-sizing: border-box;\n border: var(--input-border, var(--border));\n border-radius: var(--input-border-radius, 6px);\n color: var(--input-color, inherit);\n fill: var(--input-color, inherit);\n font-size: var(--input-font-size, inherit);\n font-weight: var(--input-font-weight, 500);\n padding: 6px 12px;\n}\n\n.form__input::placeholder {\n opacity: 0.65;\n color: var(--input-placeholder-color, inherit);\n filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n font-family: inherit;\n resize: vertical;\n}\n\n.error {\n color: var(--error-color);\n fill: var(--error-color);\n}\n\n\n.btn-group {\n display: grid;\n gap: 8px;\n}\n\n.btn {\n line-height: inherit;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--button-font-size, inherit);\n font-weight: var(--button-font-weight, 600);\n padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.btn--primary {\n color: var(--button-primary-color, var(--accent-foreground));\n fill: var(--button-primary-color, var(--accent-foreground));\n background: var(--button-primary-background, var(--accent-background));\n border: var(--button-primary-border, var(--border));\n border-radius: var(--button-primary-border-radius, 6px);\n font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n color: var(--button-primary-hover-color, var(--accent-foreground));\n fill: var(--button-primary-hover-color, var(--accent-foreground));\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-background, var(--background));\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n outline: var(--button-focus-outline, var(--outline));\n}\n\n\n.success__position {\n position: fixed;\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n z-index: var(--z-index);\n}\n.success__content {\n background: var(--success-background, var(--background));\n border: var(--success-border, var(--border));\n border-radius: var(--success-border-radius, 1.7em/50%);\n box-shadow: var(--success-box-shadow, var(--box-shadow));\n font-weight: var(--success-font-weight, 600);\n color: var(--success-color);\n fill: var(--success-color);\n padding: 12px 24px;\n line-height: 1.75em;\n\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n gap: 6px;\n cursor: default;\n}\n\n.success__icon {\n display: flex;\n}\n\n",e&&t.setAttribute("nonce",e),t}(e.styleNonce);let u="";const l={get el(){return a},appendToDom(){o.contains(c)||o.contains(a)||(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),Mu.body.style.overflow=u},open(){p(!0),e.onFormOpen?.(),it()?.emit("openFeedbackWidget"),u=Mu.body.style.overflow,Mu.body.style.overflow="hidden"},close(){p(!1),Mu.body.style.overflow=u}},d=t?.createInput({h:_l,hooks:pd,dialog:l,options:e}),p=t=>{!function(e,t){var n,r,o;t==document&&(t=document.documentElement),Zu.__&&Zu.__(e,t),n=t.__k,r=[],o=[],Ll(t,e=t.__k=_l(bl,null,[e]),n||pl,pl,t.namespaceURI,n?null:t.firstChild?Qu.call(t.childNodes):null,r,n?n.__e:t.firstChild,!1,o),Dl(r,e,o),e.props.children=null}(_l(vd,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&i?.[s.name]||""),defaultEmail:String(s&&i?.[s.email]||""),onFormClose:()=>{p(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(t,n)=>{p(!1),e.onSubmitSuccess?.(t,n)},onSubmitError:t=>{e.onSubmitError?.(t)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:t}),a)};return l}});function Sd(e){const t=Mu.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`\n.editor {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n\n.editor__image-container {\n justify-items: center;\n padding: 15px;\n position: relative;\n height: 100%;\n border-radius: var(--menu-border-radius, 6px);\n\n background-color: ${n};\n background-image: repeating-linear-gradient(\n -145deg,\n transparent,\n transparent 8px,\n ${n} 8px,\n ${n} 11px\n ),\n repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 15px,\n ${r} 15px,\n ${r} 16px\n );\n}\n\n.editor__canvas-container {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.editor__canvas-container > * {\n object-fit: contain;\n position: absolute;\n}\n\n.editor__tool-container {\n padding-top: 8px;\n display: flex;\n justify-content: center;\n}\n\n.editor__tool-bar {\n display: flex;\n gap: 8px;\n}\n\n.editor__tool {\n display: flex;\n padding: 8px 12px;\n justify-content: center;\n align-items: center;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n background: var(--button-background, var(--background));\n color: var(--button-color, var(--foreground));\n}\n\n.editor__tool--active {\n background: var(--button-primary-background, var(--accent-background));\n color: var(--button-primary-color, var(--accent-foreground));\n}\n\n.editor__rect {\n position: absolute;\n z-index: 2;\n}\n\n.editor__rect button {\n opacity: 0;\n position: absolute;\n top: -12px;\n right: -12px;\n cursor: pointer;\n padding: 0;\n z-index: 3;\n border: none;\n background: none;\n}\n\n.editor__rect:hover button {\n opacity: 1;\n}\n`,e&&t.setAttribute("nonce",e),t}function wd({hooks:e}){return function({onBeforeScreenshot:t,onScreenshot:n,onAfterScreenshot:r,onError:o}){const s=function(){const[t,n]=e.useState(Ru.devicePixelRatio??1);return e.useEffect(()=>{const e=()=>{n(Ru.devicePixelRatio)},t=matchMedia(`(resolution: ${Ru.devicePixelRatio}dppx)`);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}},[]),t}();e.useEffect(()=>{(async()=>{var e,o;t(),await(e=2,o=300,new Promise(t=>{const n=setTimeout(t,o);let r=e;const s=()=>{r-=1,r>0?Ru.requestAnimationFrame(s):(clearTimeout(n),t())};Ru.requestAnimationFrame(s)}));const i=await Ou.mediaDevices.getDisplayMedia({video:{width:Ru.innerWidth*s,height:Ru.innerHeight*s},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),a=Mu.createElement("video");await new Promise((e,t)=>{a.srcObject=i,a.onloadedmetadata=()=>{n(a,s),i.getTracks().forEach(e=>e.stop()),e()},a.play().catch(t)}),r()})().catch(o)},[])}}function kd(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Ed(e,t){kd(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function xd(e,t,n){kd(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle="rgba(0, 0, 0, 0.25)",r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{!function(e,t,n){switch(e.type){case"highlight":t.save(),t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h),t.restore();break;case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h)}}(e,r,t)})})}function Td({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=wd({hooks:t}),i=function({h:e}){return function({action:t,setAction:n,options:r}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:"editor__tool "+("highlight"===t?"editor__tool--active":""),onClick:()=>{n("highlight"===t?"":"highlight")}},r.highlightToolText),e("button",{type:"button",class:"editor__tool "+("hide"===t?"editor__tool--active":""),onClick:()=>{n("hide"===t?"":"hide")}},r.hideToolText)))}}({h:e}),a=function({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}({h:e}),c={__html:Sd(o.styleNonce).innerText},u=r.el.style,l=({screenshot:r})=>{const[s,u]=t.useState("highlight"),[l,d]=t.useState([]),p=t.useRef(null),f=t.useRef(null),h=t.useRef(null),m=t.useRef(null),[g,y]=t.useState(1),_=t.useMemo(()=>{const e=Mu.getElementById(o.id);if(!e)return"white";const t=getComputedStyle(e);return t.getPropertyValue("--button-primary-background")||t.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const e=()=>{const t=p.current;t&&(kd(r.canvas,{alpha:!1},e=>{const n=Math.min(t.clientWidth/e.width,t.clientHeight/e.height);y(n)}),0!==t.clientHeight&&0!==t.clientWidth||setTimeout(e,0))};return e(),Ru.addEventListener("resize",e),()=>{Ru.removeEventListener("resize",e)}},[r]);const v=t.useCallback((e,t)=>{kd(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{v(f.current,r.dpi),Ed(f.current,r.canvas)},[r]),t.useEffect(()=>{v(h.current,r.dpi),kd(h.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),xd(h.current,_,l)},[l,_]),t.useEffect(()=>{v(n,r.dpi),Ed(n,r.canvas),kd(Mu.createElement("canvas"),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,xd(e,_,l),Ed(n,e)})},[l,r,_]);const b=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{const n=[...t];return n.splice(e,1),n})},[]),S={width:r.canvas.width*g+"px",height:r.canvas.height*g+"px"},w=e=>{e.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:p},e("canvas",{ref:f,id:"background",style:S}),e("canvas",{ref:h,id:"foreground",style:S}),e("div",{ref:m,onMouseDown:e=>{if(!s||!m.current)return;const t=m.current.getBoundingClientRect(),n={type:s,x:(e.clientX-t.x)/g,y:(e.clientY-t.y)/g},r=(e,n)=>{const r=(n.clientX-t.x)/g,o=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,o),w:Math.abs(r-e.x),h:Math.abs(o-e.y)}},o=e=>{kd(h.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),xd(h.current,_,[...l,r(n,e)])},i=e=>{const t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),Mu.removeEventListener("mousemove",o),Mu.removeEventListener("mouseup",i)};Mu.addEventListener("mousemove",o),Mu.addEventListener("mouseup",i)},style:S},l.map((t,n)=>e("div",{key:n,class:"editor__rect",style:{top:t.y*g+"px",left:t.x*g+"px",width:t.w*g+"px",height:t.h*g+"px"}},e("button",{"aria-label":o.removeHighlightText,onClick:b(n),onMouseDown:w,onMouseUp:w,type:"button"},e(a,null))))))),e(i,{options:o,action:s,setAction:u}))};return function({onError:r}){const[o,i]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((e,t)=>{kd(Mu.createElement("canvas"),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),i({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(e=>{u.display="block",r(e)},[])}),o?e(l,{screenshot:o}):e("div",null)}}const Id=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=Mu.createElement("canvas");return{input:Td({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const e=await new Promise(e=>{o.toBlob(e,"image/png")});if(e){return{data:new Uint8Array(await e.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}});let Cd=-1;const Rd=()=>Cd,Md=e=>{addEventListener("pageshow",t=>{t.persisted&&(Cd=t.timeStamp,e(t))},!0)},Od=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Ad=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},Ld=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStartLd()?.activationStart??0;let Dd=-1;const Nd=new Set,$d=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Fd=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of Nd)e();isFinite(Dd)||(Dd="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Fd,!0))}},Bd=(e=!1)=>{if(e&&(Dd=1/0),Dd<0){const e=Pd(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;Dd=t??$d(),addEventListener("visibilitychange",Fd,!0),addEventListener("prerenderingchange",Fd,!0),Md(()=>{setTimeout(()=>{Dd=$d()})})}return{get firstHiddenTime(){return Dd},onHidden(e){Nd.add(e)}}},jd=(e,t=-1,n,r=0,o,s,i)=>{const a=Ld(),c=a?.navigationId||0;let u="navigate";return n?u=n:Rd()>=0?u="back-forward-cache":a&&(document.prerendering||Pd()>0?u="prerender":document.wasDiscarded?u="restore":a.type&&(u=a.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:u,navigationId:r||c,navigationInteractionId:o,navigationURL:s||a?.name,navigationStartTime:i||0}},Ud=new WeakMap;function zd(e,t){let n=Ud.get(t);return n||(n=new WeakMap,Ud.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}class qd{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const Wd=(e,t,n={})=>{try{const r=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(r.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();r.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of r)e.observe({type:t,buffered:!0,...n});return e}}catch{}},Hd=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,Gd=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},Jd=e=>{let t=!1;return()=>{t||(e(),t=!0)}};class Vd{l}const Kd=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},Yd=[1800,3e3],Xd=(e,t={})=>{const n=Hd(t);Kd(()=>{const r=zd(t,Vd),o=Bd();let s,i=jd("FCP");const a=Wd(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(a.disconnect(),t.startTime{i=jd("FCP",-1,"back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,Rd()),s=Od(e,i,Yd,t.reportAllChanges),Ad(()=>{i.value=performance.now()-n.timeStamp,s(!0)})})),n&&Wd(["soft-navigation"],n=>{n.forEach(n=>{r.l&&n.navigationId&&Gd(r.l,n);const o=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);i=jd("FCP",o,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),s=Od(e,i,Yd,t.reportAllChanges),s(!0)})},t)})},Qd=[.1,.25];let Zd=0,ep=1/0,tp=0;const np=e=>{for(const t of e)t.interactionId&&(ep=Math.min(ep,t.interactionId),tp=Math.max(tp,t.interactionId),Zd=tp?(tp-ep)/7+1:0)};let rp;const op=()=>rp?Zd:performance.interactionCount??0;class sp{u=0;v=[];m=new Map;p;T;_(){return op()-this.u}M(){this.u=op(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}}const ip=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,r=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const o=Jd(e);let s=-1;const i=()=>{r(s),o()};addEventListener("visibilitychange",i,{once:!0,capture:!0}),s=n(()=>{removeEventListener("visibilitychange",i,{capture:!0}),o()},{timeout:t})}},ap=[200,500],cp=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=Bd();Kd(()=>{"interactionCount"in performance||rp||(rp=Wd(["event"],np,{durationThreshold:0}));let r,o=jd("INP");const s=zd(t,sp),i=(n,i,a,c,u)=>{s.M(),o=jd("INP",-1,n,i,a,c,u),r=Od(e,o,ap,t.reportAllChanges)},a=()=>{const e=s.L(o.navigationType);e&&e.P!==o.value&&(o.value=e.P,o.entries=e.entries,r())},c=e=>{a(),r(!0),i("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},u=(e,t=!1)=>{ip(()=>{for(const t of e)"soft-navigation"!==t.entryType?s.h(t):c(t);a(),t&&r(!0)})},l=["event","first-input"];Hd(t)&&l.push("soft-navigation");const d=Wd(l,u,{...t,durationThreshold:t.durationThreshold??40});r=Od(e,o,ap,t.reportAllChanges),d&&(n.onHidden(()=>{u(d.takeRecords(),!0)}),Md(()=>{i("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Rd())}))})};class up{p;l;h(e){this.p?.(e)}}const lp=[2500,4e3],dp=[800,1800],pp=e=>{document.prerendering?Kd(()=>pp(e)):"complete"!==document.readyState?addEventListener("load",()=>pp(e),!0):setTimeout(e)},fp="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,hp={},mp={};let gp,yp,_p,vp,bp;const Sp={};let wp=!1,kp=!1;function Ep(e,t=!1){return Dp("cls",e,Mp,gp,t)}function xp(e,t=!1){return Dp("lcp",e,Op,yp,t)}function Tp(e){return Dp("inp",e,Pp,vp)}function Ip(e,t){return Np(e,t),mp[e]||(!function(e){const t={type:e,buffered:!0};"event"===e&&(t.durationThreshold=0);try{if(PerformanceObserver.supportedEntryTypes.includes(e)){new PerformanceObserver(t=>{Promise.resolve().then(()=>{Cp(e,{entries:t.getEntries()})})}).observe(t)}}catch{}}(e),mp[e]=!0),$p(e,t)}function Cp(e,t){const n=hp[e];if(n?.length)for(const r of n)try{r(t)}catch(t){fp&&p.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${v(r)}\nError:`,t)}}function Rp(e){return t=>{(kp||"back-forward-cache"!==t.navigationType)&&e(t)}}function Mp(){return((e,t={})=>{const n=Bd();Xd(Jd(()=>{let r,o=jd("CLS",0);const s=zd(t,qd),i=(n,i,a,c,u)=>{o=jd("CLS",0,n,i,a,c,u),s.i=0,r=Od(e,o,Qd,t.reportAllChanges)},a=(e=!1)=>{s.i>o.value&&(o.value=s.i,o.entries=s.o),r(e)},c=e=>{a(!0),i("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},u=e=>{for(const t of e)"soft-navigation"!==t.entryType?s.h(t):c(t);a()},l=["layout-shift"];Hd(t)&&l.push("soft-navigation");const d=Wd(l,u);d&&(r=Od(e,o,Qd,t.reportAllChanges),n.onHidden(()=>{u(d.takeRecords()),r(!0)}),Md(()=>{i("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Rd()),Ad(r)}),setTimeout(r))}))})(Rp(e=>{Cp("cls",{metric:e}),gp=e}),{reportAllChanges:!wp&&!kp,reportSoftNavs:wp})}function Op(){return((e,t={})=>{let n=!1;const r=Hd(t);Kd(()=>{let o,s=Bd(),i=jd("LCP");const a=zd(t,up),c=(r,a,c,u,l)=>{i=jd("LCP",-1,r,a,c,u,l),o=Od(e,i,lp,t.reportAllChanges),n=!1,"soft-navigation"===r&&(s=Bd(!0))},u=e=>{a.l&&e.navigationId&&Gd(a.l,e),n||o(!0),c("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&l([t])},l=e=>{t.reportAllChanges||r||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){u(t);continue}let e=0,n=[],r=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-Pd(),0),a.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const o=t;if(!i.navigationId)continue;if("interactionId"in o&&o.interactionId!=i.navigationInteractionId)continue;r=o.largestContentfulPaint?.renderTime||0,e=Math.max(r-t.startTime,0),o.largestContentfulPaint&&(a.h(o.largestContentfulPaint),n=[o.largestContentfulPaint])}r{if(e.isTrusted&&!n){const e=i.id;ip(()=>{if(!n){if(!r){p.disconnect();for(const e of s)removeEventListener(e,a,{capture:!0})}e===i.id&&(n=!0,o(!0))}})}};for(const e of s)addEventListener(e,a,{capture:!0});Md(r=>{c("back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,Rd()),o=Od(e,i,lp,t.reportAllChanges),Ad(()=>{i.value=performance.now()-r.timeStamp,n=!0,o(!0)})})}})})(Rp(e=>{Cp("lcp",{metric:e}),yp=e}),{reportAllChanges:!wp&&!kp,reportSoftNavs:wp})}function Ap(){return((e,t={})=>{const n=Hd(t);let r=jd("TTFB"),o=Od(e,r,dp,t.reportAllChanges);pp(()=>{const s=Ld();if(s){const i=s.responseStart;r.value=Math.max(i-Pd(),0),r.entries=[s],o(!0),Md(()=>{r=jd("TTFB",0,"back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,Rd()),o=Od(e,r,dp,t.reportAllChanges),o(!0)}),n&&Wd(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(r=jd("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),r.entries=[n],o=Od(e,r,dp,t.reportAllChanges),o(!0))})},t)}})})(Rp(e=>{Cp("ttfb",{metric:e}),_p=e}))}function Lp(){return Xd(Rp(e=>{Cp("fcp",{metric:e}),bp=e}))}function Pp(){return cp(Rp(e=>{Cp("inp",{metric:e}),vp=e}),{reportSoftNavs:wp})}function Dp(e,t,n,r,o=!1){return Np(e,t),mp[e]||(mp[e]=!0,Promise.resolve().then(()=>{Sp[e]=n()})),r&&t({metric:r}),$p(e,t,o)}function Np(e,t){hp[e]=hp[e]||[],hp[e].push(t)}function $p(e,t,n=!1){return()=>{n&&Sp[e]?.();const r=hp[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}function Fp(e){return"duration"in e}const Bp=t;let jp,Up,zp;const qp=new fu(5),Wp=new fu(5);let Hp=!1;function Gp(e,t){return Math.abs(e-t)<=5}function Jp(){try{return PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&"function"==typeof Bp.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint}catch{return!1}}function Vp(e){return"number"==typeof e&&isFinite(e)}function Kp(e,t,n,{...r}){const o=Zn(e).start_timestamp;return o&&o>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),Fo(e,()=>{const e=Zo({startTime:t,...r});return e&&e.end(n),e})}function Yp(){return Bp.addEventListener&&Bp.performance}function Xp(e){return e/1e3}function Qp(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Zp(e){const t={};if(null!=e.nextHopProtocol){const{name:n,version:r}=function(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}if(void 0===Me(e.startTime))return t;const n=t=>t?Me(t,e.startTime):t;return r={...t,"http.request.redirect_start":n(e.redirectStart),"http.request.redirect_end":n(e.redirectEnd),"http.request.worker_start":n(e.workerStart),"http.request.fetch_start":n(e.fetchStart),"http.request.domain_lookup_start":n(e.domainLookupStart),"http.request.domain_lookup_end":n(e.domainLookupEnd),"http.request.connect_start":n(e.connectStart),"http.request.secure_connection_start":n(e.secureConnectionStart),"http.request.connection_end":n(e.connectEnd),"http.request.request_start":n(e.requestStart),"http.request.response_start":n(e.responseStart),"http.request.response_end":n(e.responseEnd),"http.request.time_to_first_byte":null!=e.responseStart?Xp(e.responseStart):void 0},Object.fromEntries(Object.entries(r).filter(([,e])=>null!=e));var r}const ef=2147483647;let tf=0;function nf(e,t){const n=Yp();if(!n?.getEntries)return;const{spanStreamingEnabled:r,ignoreResourceSpans:o}=t,s=n.getEntries(),{attributes:i,start_timestamp:a}=er(e);s.slice(tf).forEach(t=>{const n=Me(t.startTime);if(!n)return;const s=Xp(Math.max(0,t.duration));if(!("navigation"===i[$t]&&a&&n{const o=e[n];null!=o&&("number"==typeof o&&o";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=Array.isArray(t)?void 0:t.maskAttributeFn,p=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++1&&i+o.length*c+u.length>=p));)o.push(u),i+=u.length,n=cf(n,"parentNode");return o.reverse().join(a)}catch{return""}}function lf(e,t,n){const r=[],o=cf(e,"tagName");if(!o)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=cf(e,"dataset");if(t){if(t.sentryComponent)return n?n("data-sentry-component",t.sentryComponent,e):t.sentryComponent;if(t.sentryElement)return n?n("data-sentry-element",t.sentryElement,e):t.sentryElement}}r.push(o.toLowerCase());const s=t?.length?t.filter(t=>cf(e,"getAttribute",t)).map(t=>[t,cf(e,"getAttribute",t)]):null;if(s?.length)s.forEach(([t,o])=>{r.push(`[${t}="${n&&o?n(t,o,e):o}"]`)});else{const t=cf(e,"id");t&&r.push(`#${n?n("id",t,e):t}`);const o=cf(e,"className");if(o&&F(o)){const t=(n?n("class",o,e):o).split(/\s+/);for(const e of t)r.push(`.${e}`)}}for(const t of["aria-label","type","name","title","alt"]){const o=cf(e,"getAttribute",t);o&&r.push(`[${t}="${n?n(t,o,e):o}"]`)}return r.join("")}function df(e){return null!=e&&e>0&&e<=6e4}function pf(e,t,n){Bp.document&&Bp.addEventListener(e,t,n)}function ff(e,t,n){Bp.document&&Bp.removeEventListener(e,t,n)}const hf=(e=!0)=>{const t=Bp.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart{const e=hf();return e?.activationStart??0};let gf=-1;const yf=new Set,_f=e=>{if("hidden"===Bp.document?.visibilityState&&gf>-1){if("visibilitychange"===e.type)for(const e of yf)e();isFinite(gf)||(gf="visibilitychange"===e.type?e.timeStamp:0,ff("prerenderingchange",_f,!0))}},vf=()=>{if(Bp.document&&gf<0){const e=mf(),t=Bp.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;gf=t??("hidden"!==Bp.document?.visibilityState||Bp.document?.prerendering?1/0:0),pf("visibilitychange",_f,!0),pf("prerenderingchange",_f,!0)}return{get firstHiddenTime(){return gf},onHidden(e){yf.add(e)}}};let bf,Sf,wf,kf={};function Ef({trackCls:e,trackLcp:t}){if(Yp()&&Ae()){const n=t?xp(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&df(e.value)&&(kf.lcp={value:e.value,unit:"millisecond"},bf=t)},!0):void 0,r=e?Ep(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(kf.cls={value:e.value,unit:""},Sf=t)},!0):void 0,o=Dp("ttfb",({metric:e})=>{wf=e.navigationType,e.entries[e.entries.length-1]&&(kf.ttfb={value:e.value,unit:"millisecond"})},Ap,_p),s=function(e){return Dp("fcp",e,Lp,bp)}(({metric:e})=>{wf=e.navigationType,kf.fcp={value:e.value,unit:"millisecond"}}),i=Ip("paint",({entries:e})=>{const t=vf();for(const n of e)"first-paint"===n.name&&n.startTime{o(),s(),i(),n?.(),r?.()}}return()=>{}}function xf(e,t){const n=Ae();if(!Yp()?.getEntries||!n)return void Tf();const{spanStreamingEnabled:r,recordClsOnPageloadSpan:o,recordLcpOnPageloadSpan:s}=t,i=Xp(n);if("pageload"===er(e).attributes[$t]){if(function(e){const t=hf(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(kf),function(e){const t=e.fp;t&&(t.value=Math.max(t.value-mf(),0))}(kf),r){const t=(t,n,r)=>{const o=r??`browser.web_vital.${t}.value`;e.setAttribute(o,n),fp&&p.log("Setting web vital attribute",{[o]:n},"on pageload span")};["ttfb","fp","fcp"].forEach(e=>{kf[e]&&t(e,kf[e].value)}),kf["ttfb.requestTime"]&&t("ttfb.requestTime",kf["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else o||delete kf.cls,s||delete kf.lcp,Object.entries(kf).forEach(([t,n])=>{Io(t,n.value,n.unit,e)}),function(e,t){bf&&t.recordLcpOnPageloadSpan&&(bf.element&&e.setAttribute("lcp.element",uf(bf.element)),bf.id&&e.setAttribute("lcp.id",bf.id),bf.url&&e.setAttribute("lcp.url",ya(bf.url.trim()).slice(0,200)),null!=bf.loadTime&&e.setAttribute("lcp.loadTime",bf.loadTime),null!=bf.renderTime&&e.setAttribute("lcp.renderTime",bf.renderTime),e.setAttribute("lcp.size",bf.size));Sf?.sources&&t.recordClsOnPageloadSpan&&Sf.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,uf(t.node)))}(e,t);wf&&e.setAttribute(ft,wf),e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",mf())}Tf()}function Tf(){bf=void 0,Sf=void 0,wf=void 0,kf={}}const If=()=>({name:"ElementTiming",setup(){Yp()&&Ae()&&Ip("element",({entries:e})=>{for(const t of e){const e=t;if(!e.identifier)continue;const n=e.identifier,r=e.name,o=e.renderTime,s=e.loadTime,i={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":n};r&&(i["ui.element.paint_type"]=r),e.id&&(i["ui.element.id"]=e.id),e.element&&(i["ui.element.type"]=e.element.tagName.toLowerCase()),e.url&&(i["ui.element.url"]=ya(e.url)),e.naturalWidth&&(i["ui.element.width"]=e.naturalWidth),e.naturalHeight&&(i["ui.element.height"]=e.naturalHeight),o>0&&Eu("ui.element.render_time",o,{unit:"millisecond",attributes:i}),s>0&&Eu("ui.element.load_time",s,{unit:"millisecond",attributes:i})}})}}),Cf=[],Rf=new Map,Mf="",Of=new Map,Af={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Lf(){const e=Object.keys(Af);function t(e){const t=e.target;if(!t)return;const n=uf(t),r=Math.round(e.timeStamp);if(n&&n!==Mf&&!Of.has(r)&&(Of.set(r,n),Of.size>50)){const e=Of.keys().next().value;void 0!==e&&Of.delete(e)}}go()&&e.forEach(e=>{Bp.addEventListener(e,t,{capture:!0,passive:!0})});const n=({entries:e})=>{const t=gr(),n=t&&fr(t);e.forEach(e=>{if(!Fp(e))return;const t=e.interactionId;if(null==t)return;if(Rf.has(t))return;const r=e.target?uf(e.target):function(e){const t=Math.round(e.startTime);let n=Of.get(t);if(!n)for(let e=-5;e<=5;e++){const r=Of.get(t+e);if(r){n=r;break}}return n||Mf}(e);if(Cf.length>10){const e=Cf.shift();Rf.delete(e)}Cf.push(t),Rf.set(t,{span:n,elementName:r})})};Ip("event",n),Ip("first-input",n)}const Pf=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function Df(){const e=Bp.navigator;return!!e?.userAgent&&Pf.test(e.userAgent)}function Nf(e,n=5){if(!t.HTMLElement)return null;let r=e;for(let e=0;e({name:"Interactions",setup(t){if(Df())return;const n={name:void 0,source:void 0,routeId:void 0,urlTemplate:void 0,httpRoute:void 0,urlPath:void 0,urlFull:void 0};let r;function o(e){const{name:t,attributes:r}=er(e);n.name=t,n.source=r["sentry.source"]||r[Jt],n.routeId=r[Ot],n.urlTemplate=r[sn],n.httpRoute=r[It],n.urlPath=r[nn],n.urlFull=r[tn]}t.on("spanStart",e=>{(function(e){if(fr(e)!==e)return!1;const t=er(e).attributes[$t];return"pageload"===t||"navigation"===t})(e)&&(r=e,o(e))}),t.on("spanEnd",e=>{e===r&&(r=void 0,o(e))}),function(e,t,n,r){if(!Bp.document)return;let o;addEventListener("click",()=>{if(n())return void(fp&&p.warn(`[Tracing] Did not create ${xs} span because a pageload or navigation span is in progress.`));if(o&&(o.setAttribute(Pt,"interactionInterrupted"),o.end(),o=void 0),!t.name)return void(fp&&p.warn(`[Tracing] Did not create ${xs} span because the latest route name is missing.`));const s=Zr(e),i=t.routeId||t.urlTemplate||t.httpRoute,a=i||Os,c=!i||t.routeId?"custom":"route";o=ts({name:s?a:t.name,attributes:{[$t]:xs,[Jt]:s?c:t.source||"url",[Ft]:"auto.browser.interactions",...s&&{[Gt]:a},...t.routeId&&{[Ot]:t.routeId},...t.urlTemplate&&{[sn]:t.urlTemplate},...t.httpRoute&&{[It]:t.httpRoute},...t.urlPath&&{[nn]:t.urlPath},...t.urlFull&&{[tn]:ya(t.urlFull)}}},r)},{capture:!0})}(t,n,()=>r,e),function(e){Ip("event",({entries:t})=>{const n=gr();if(n)for(const r of t)if("click"===r.name){const t=Me(r.startTime);if(!t)continue;const o=Xp(r.duration),s=uf(r.target),i=Nf(r.target),a={name:Zr(e)?i||As:s,startTime:t,attributes:{[$t]:Es,[Ft]:"auto.browser.interactions",...s&&s!==Mf&&{[mt]:s}}};i&&(a.attributes[Qt]=i),Kp(n,t,t+o,a)}})}(t)}});function Ff(){try{return Bp.document?.location.href??""}catch{return""}}const Bf=new WeakMap;function jf(e,t=it()){t?(fp&&Uf(t)&&p.warn("A route provider is already registered for this client and will be replaced. Routes only the previous provider knows about will no longer resolve."),Bf.set(t,e)):fp&&p.warn("Cannot set a route provider without a client.")}function Uf(e=it()){return e&&Bf.get(e)}function zf(e=it()){const t=Uf(e);return Hr(fp?"Route provider threw while resolving a route:":"",()=>t?.resolveCurrentRoute()||void 0,()=>{})}function qf(e){return{resolveRoute:e,resolveCurrentRoute:()=>{const t=Wf(Ff());return t&&e(t)}}}function Wf(e){return e?ba(e,Ff()||void 0):void 0}const Hf=(e={})=>({name:"UserTiming",setup(t){const n=Yp();if(!n?.getEntries)return;let r=0;t.on("beforeIdleSpanEnd",t=>{const{attributes:o,start_timestamp:s}=er(t),i=o[$t];if("pageload"!==i&&"navigation"!==i)return;const a=hf(!1)?.requestStart??0,c=n.getEntries();for(const n of c.slice(r)){if("mark"!==n.entryType&&"measure"!==n.entryType)continue;const r=Me(n.startTime);if(!r)continue;if("navigation"===i&&s&&r{o()},pf("visibilitychange",e=>{"hidden"===Bp.document?.visibilityState&&s(e)},{capture:!0});const i=e.on("beforeStartNavigationSpan",(e,t)=>{t?.isRedirect||(o(),i(),a())}),a=e.on("afterStartPageLoadSpan",e=>{n=e,a()})}const Kf={click:Es,hover:"ui.interaction.hover",drag:"ui.interaction.drag",press:"ui.interaction.press"},Yf={click:As,hover:"Hover",drag:"Drag",press:"Key press"};function Xf(e,t,n){let r,o;e.on("afterStartPageLoadSpan",e=>{r=e}),e.on("spanStart",e=>{const t=er(e).attributes;t?.[$t]===ds&&"back-forward-cache"===t[ft]&&(o=e)}),t(({metric:e})=>{const t=function(e){if("soft-navigation"!==e.navigationType)return;const t=Wp.get(e.navigationId);return t||(null!=e.navigationInteractionId?qp.get(e.navigationInteractionId):void 0)}(e);"soft-navigation"!==e.navigationType?"back-forward-cache"!==e.navigationType?n(e,r,void 0):n(e,o,void 0):t?n(e,t,e.navigationId):fp&&p.log(`[SoftNav] Dropping ${e.name} for uncorrelated soft navigation ${e.navigationId}`)})}function Qf(e,t,n,r,o,s){if(!df(e))return;fp&&p.log(`Sending LCP span (${e})`);const i=s||0,a=Me(i)??Xp(i),c=t?Me(t.startTime,i)??Xp(t.startTime):a+Xp(e),u=t?uf(t.element):void 0,l=t?.element?Nf(t.element):null,d=it(),f=!!d&&Zr(d)?l||Ls:u??Ls,h={};u&&(h["browser.web_vital.lcp.element"]=u),l&&(h[Qt]=l),t?.id&&(h["browser.web_vital.lcp.id"]=t.id),t?.url&&(h["browser.web_vital.lcp.url"]=ya(t.url,d)),null!=t?.loadTime&&(h["browser.web_vital.lcp.load_time"]=t.loadTime),null!=t?.renderTime&&(h["browser.web_vital.lcp.render_time"]=t.renderTime),null!=t?.size&&(h["browser.web_vital.lcp.size"]=t.size),Jf({name:f,op:"ui.webvital.lcp",origin:"auto.ui.browser.lcp",metricName:"lcp",value:e,attributes:h,parentSpan:n,startTime:a,endTime:c,softNavigationId:r,navigationType:o})}function Zf(e,t,n,r,o,s){fp&&p.log(`Sending CLS span (${e})`);const i=Me(t?.startTime??s??0)??Oe(),a=t?.sources[0]?.node,c=t?uf(a):void 0,u=a?Nf(a):null,l=it(),d=!!l&&Zr(l)?u||Ps:c??Ps,f={};u&&(f[Qt]=u),t?.sources&&t.sources.forEach((e,t)=>{f[`browser.web_vital.cls.source.${t+1}`]=uf(e.node)}),Jf({name:d,op:"ui.webvital.cls",origin:"auto.ui.browser.cls",metricName:"cls",value:e,attributes:f,parentSpan:n,startTime:i,softNavigationId:r,navigationType:o})}function eh(e){return null!=e.value&&Xp(e.value)<=60}function th(e){return e.entries.find(t=>t.duration===e.value&&Af[t.name])}function nh(e,t,n=!1,r,o,s){fp&&p.log(`Sending INP span (${e})`);const i=Me(t?.startTime??s?.navigationStartTime??0);if(!i)return;const a=Xp(e),c=t&&Af[t.name],u=c||"click",l=t&&(null!=(d=t.interactionId)?Rf.get(d):void 0);var d;const f=gr(),h=f?fr(f):void 0,m=r||l?.span||h,g=l?.elementName||(t?uf(t.target):void 0),y=t?.target?Nf(t.target):null,_=it(),v=!!_&&Zr(_)?y||Yf[u]:g??"Interaction to next paint",b={[Lt]:t?.duration??e};g&&g!==Mf&&(b[mt]=g),c&&(b["browser.web_vital.inp.interaction_type"]=c),y&&(b[Qt]=y),Jf({name:v,op:Kf[u],origin:"auto.ui.browser.inp",metricName:"inp",value:e,attributes:b,startTime:i,endTime:i+a,navigationType:s?.navigationType,parentSpan:m,standalone:n,softNavigationId:o})}let rh,oh,sh,ih;function ah(e){return"boolean"==typeof e?e:!!e?.capture}function ch(e){E("dom",e),x("dom",uh)}function uh(){if(!Bp.document)return;const e=T.bind(null,"dom"),t=lh(e,!0);Bp.document.addEventListener("click",t,!1),Bp.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Bp,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(V(r,"addEventListener",function(t){return function(n,r,o){if(("click"===n||"keypress"==n)&&r)try{const s=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=s[n]=s[n]||{captureListeners:new WeakSet,bubbleListeners:new WeakSet,listenerCount:0},a=ah(o);if(!i.handler){const r=lh(e);i.handler=r,i.capture=a,t.call(this,n,r,i.capture)}const c=i[a?"captureListeners":"bubbleListeners"];c.has(r)||("object"==typeof o&&(o?.once||o?.signal)?i.sticky=!0:(c.add(r),i.listenerCount++))}catch{}return t.call(this,n,r,o)}}),V(r,"removeEventListener",function(e){return function(t,n,r){if(("click"===t||"keypress"==t)&&n)try{const o=this.__sentry_instrumentation_handlers__||{},s=o[t];s?.[ah(r)?"captureListeners":"bubbleListeners"].delete(n)&&(--s.listenerCount||s.sticky||(e.call(this,t,s.handler,s.capture),s.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function lh(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;K(n,"_sentryCaptured",!0),r&&!r._sentryId&&K(r,"_sentryId",ye());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==oh)return!1;try{if(!e.target||e.target._sentryId!==sh)return!1}catch{}return!0}(n)){e({event:n,name:o,global:t}),oh=n.type,sh=r?r._sentryId:void 0}clearTimeout(rh),rh=Bp.setTimeout(()=>{sh=void 0,oh=void 0},1e3)}}function dh(e){const t="history";E(t,e),x(t,ph)}function ph(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=ih,o=function(e){try{return new URL(e,Bp.location.origin).toString()}catch{return e}}(String(n));if(ih=o,r===o)return e.apply(this,t);T("history",{from:r,to:o})}return e.apply(this,t)}}Bp.addEventListener("popstate",()=>{const e=Bp.location.href,t=ih;if(ih=e,t===e)return;T("history",{from:t,to:e})}),"history"in Bp&&Bp.history&&(V(Bp.history,"pushState",e),V(Bp.history,"replaceState",e))}const fh={};function hh(e){const t=fh[e];if(t)return t;let n=Bp[e];if(ou(n))return fh[e]=n.bind(Bp);const r=Bp.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){fp&&p.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?fh[e]=n.bind(Bp):n}function mh(...e){try{return hh("setTimeout")(...e)}catch(t){fp&&p.warn("Could not use native setTimeout implementation, falling back to window.setTimeout: ",t);const n=Bp.setTimeout.bind(Bp);return fh.setTimeout=n,n(...e)}}const gh="__sentry_xhr_v3__";function yh(e){E("xhr",e),x("xhr",_h)}function _h(){if(!Bp.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=new Error;const o=1e3*Oe(),s=F(n[0])?n[0].toUpperCase():void 0,i=function(e){if(F(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!s||!i)return e.apply(t,n);t[gh]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[gh];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}T("xhr",{endTimestamp:1e3*Oe(),startTimestamp:o,xhr:t,virtualError:r}),r=void 0,t.removeEventListener("readystatechange",a)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,s=t[gh];return s&&F(r)&&F(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[gh];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return T("xhr",{startTimestamp:1e3*Oe(),xhr:t}),e.apply(t,n)}})}const vh=Symbol.for("sentry__originalRequestBody");function bh(e){return new URLSearchParams(e).toString()}function Sh(e,t=p){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[bh(e)];if(!e)return[void 0]}catch(n){return fp&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return fp&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function wh(e=[]){if(e.length>=2&&e[1]&&"object"==typeof e[1]&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const t=e[0][vh];return void 0!==t?t:void 0}}function kh(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return fp&&p.error(t,"Failed to get xhr response headers",e),{}}return t?t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{}}const Eh=t;let xh=0;const Th=[];function Ih(e){if(xh>0)return!0;const t=e?Th.findIndex(t=>function(e,t){return e.msg===t.msg&&e.url===t.url&&e.line===t.line&&e.column===t.column}(t,e)):-1;return-1!==t&&(Th.splice(t,1),!0)}function Ch(e,n={}){if("function"!=typeof e)return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if(X(e))return e}catch{return e}const r=function(...r){t._sentryWrappedDepth=(t._sentryWrappedDepth||0)+1;try{const t=r.map(e=>Ch(e,n));return e.apply(this,t)}catch(e){throw xh++,setTimeout(()=>{xh--}),st(t=>{t.addEventProcessor(e=>(n.mechanism&&(be(e,void 0),Se(e,n.mechanism)),e.extra={...e.extra,arguments:r},e)),Xs(e)}),e}finally{t._sentryWrappedDepth=(t._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}Y(r,e),K(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch{}return r}function Rh(e){const t=Ff(),{referrer:n}=Eh.document||{},{userAgent:r}=Eh.navigator||{};return{url:t,headers:{...n&&{Referer:ya(n,e)},...r&&{"User-Agent":r}}}}const Mh=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","userTimingIntegration","interactionsIntegration","moduleMetadataIntegration"],Oh={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};const Ah=Eh;async function Lh(e,t){const r=Mh.includes(e)?function(e){return Oh[e]||e.replace("Integration","").toLowerCase()}(e):void 0,o=Ah.Sentry=Ah.Sentry||{};if(!r)throw new Error(`Cannot lazy load integration: ${e}`);const s=o[e];if("function"==typeof s&&!("_isShim"in s))return s;const i=function(e){const t=it(),r=t?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${n}/${e}.min.js`,r).toString()}(r),a=Eh.document.createElement("script");a.src=i,a.crossOrigin="anonymous",a.referrerPolicy="strict-origin",t&&a.setAttribute("nonce",t);const c=new Promise((e,t)=>{a.addEventListener("load",()=>e()),a.addEventListener("error",t)}),u=Eh.document.currentScript,l=Eh.document.body||Eh.document.head||u?.parentElement;if(!l)throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);l.appendChild(a);try{await c}catch{throw new Error(`Error when loading integration: ${e}`)}const d=o[e];if("function"!=typeof d)throw new Error(`Could not load integration: ${e}`);return d}const Ph=Xu({lazyLoadIntegration:Lh}),Dh=Xu({getModalIntegration:()=>bd,getScreenshotIntegration:()=>Id});function Nh(e,t){const n=Bh(e,t),r={type:zh(t),value:qh(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function $h(e,t,n,r){const o=it(),s=o?.getOptions().normalizeDepth,i=(a=t,Object.values(a).find(P));var a;const c={__serialized__:ue(t,s)};if(i)return{exception:{values:[Nh(e,i)]},extra:c};const u={exception:{values:[{type:q(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Vh(t,{isUnhandledRejection:r})}]},extra:c};if(n){const t=Bh(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function Fh(e,t){return{exception:{values:[Nh(e,t)]}}}function Bh(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&jh.test(e.message))return 1;return 0}(t),o=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,o)}catch{}return[]}const jh=/Minified React error #\d+;/i;function Uh(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function zh(e){const t=e?.name;if(!t&&Uh(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function qh(e){const t=e?.message;return Uh(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?Xa(t.error):Xa(e):"No error message"}function Wh(e,t,n,r){const o=Gh(e,t,n?.syntheticException||void 0,r);return Se(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Ns(o)}function Hh(e,t,n="info",r,o){const s=Jh(e,t,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Ns(s)}function Gh(e,t,n,r,o){let s;if(N(t)&&t.error){return Fh(e,t.error)}if($(t)||D(t,"DOMException")){const o=t;if("stack"in t){s=Fh(e,t);const o=s.exception?.values?.[0];if(r&&n&&o&&!o.stacktrace){const t=Bh(e,n);t.length&&(o.stacktrace={frames:t},Se(s,{synthetic:!0}))}}else{const t=o.name||($(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Jh(e,i,n,r),be(s,i)}return s}if(P(t))return Fh(e,t);if(U(t)||q(t)){return s=$h(e,t,n,o),Se(s,{synthetic:!0}),s}const i=String(t);return s=Jh(e,i,n,r),be(s,i),Se(s,{synthetic:!0}),s}function Jh(e,t,n,r){const o={};if(r&&n){const r=Bh(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),Se(o,{synthetic:!0})}if(B(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Vh(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(Q(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";if(N(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(q(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class Kh extends Ki{constructor(e){const t=(r=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Eh.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...r});var r;!function(e,t,r=[t],o="npm"){const s=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${t}`,s.packages=r.map(e=>({name:`${o}:@sentry/${e}`,version:n})),s.version=n)}(t,"browser",["browser"],Eh.SENTRY_SDK_SOURCE||"npm"),super(t),t.routeProvider&&jf(t.routeProvider,this),this._unhandledSessionStatus="unhandled";const{userInfo:o}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:o?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:s}=this._options,i=()=>{Oe()},a=[[Eh.document,"visibilitychange",()=>{i(),"hidden"===Eh.document.visibilityState&&(s&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}],[Eh.document,"freeze",i],[Eh.document,"resume",i],[Eh,"pagehide",i],[Eh,"pageshow",i]];a.forEach(([e,t,n])=>e?.addEventListener?.(t,n)),this.on("close",()=>a.forEach(([e,t,n])=>e?.removeEventListener?.(t,n))),o&&this.on("beforeSendSession",La)}eventFromException(e,t){return Wh(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return Hh(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 Yh(e,t=hh("fetch")){let n=0,r=0;return Ni(e,async function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,i);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 fh["fetch"]=void 0,e}finally{n-=s,r--}},Ai(e.bufferSize||40))}const Xh="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;const Qh={startProfiler:function(){const e=it();if(!e)return void(Xh&&p.warn("No Sentry client available, profiling is not started"));e.getIntegrationByName("BrowserProfiling")?e.emit("startUIProfiler"):Xh&&p.warn("BrowserProfiling integration is not available")},stopProfiler:function(){const e=it();if(!e)return void(Xh&&p.warn("No Sentry client available, profiling is not started"));e.getIntegrationByName("BrowserProfiling")?e.emit("stopUIProfiler"):Xh&&p.warn("ProfilingIntegration is not available")}};function Zh(e,t,n,r){const o={filename:e,function:""===t?f:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const em=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,tm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nm=/\((\S*)(?::(\d+))(?::(\d+))\)/,rm=/at (.+?) ?\(data:(.+?),/,om=[30,e=>{const t=e.match(rm);if(t)return{filename:``,function:t[1]};const n=em.exec(e);if(n){const[,e,t,r]=n;return Zh(e,f,+t,+r)}const r=tm.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=nm.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=gm(r[1]||f,r[2]);return Zh(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],sm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,im=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,am=[50,e=>{const t=sm.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=im.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]||f;return[n,e]=gm(n,e),Zh(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],cm=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,um=[40,e=>{const t=cm.exec(e);return t?Zh(t[2],t[1]||f,+t[3],t[4]?+t[4]:void 0):void 0}],lm=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,dm=[10,e=>{const t=lm.exec(e);return t?Zh(t[2],t[3]||f,+t[1]):void 0}],pm=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,fm=[20,e=>{const t=pm.exec(e);return t?Zh(t[5],t[3]||t[4]||f,+t[1],+t[2]):void 0}],hm=[om,am],mm=g(...hm),gm=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:f,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};const ym=1024,_m=(e={})=>{const t={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.dom&&ch(function(e,t){return function(n){if(it()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>ym&&(Xh&&p.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=ym),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=uf(t,{keyAttrs:s,maxStringLength:i}),o=Nf(t)}catch{r=""}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),Ba(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&yh(function(e){return function(t){if(it()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[gh];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,u={method:s,url:ya(i),status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:pu(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),Ba(d,l)}}(e)),t.fetch&&iu(function(e){return function(t){if(it()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:{...t.fetchData,url:ya(t.fetchData.url)},level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),Ba(s,o)}else{const o=t.response,s={...t.fetchData,url:ya(t.fetchData.url),status_code:o?.status},i={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:pu(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),Ba(a,i)}}}(e)),t.history&&dh(function(e){return function(t){if(it()!==e)return;let n=t.from,r=t.to;const o=xa(Eh.location.href);let s=n?xa(n):void 0;const i=xa(r);s?.path||(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),Ba({category:"navigation",data:{from:ya(n),to:ya(r)}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){it()===e&&Ba({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:ve(t)},{event:t})}}(e))}}};const vm="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(","),bm=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&V(Eh,"setTimeout",Sm),t.setInterval&&V(Eh,"setInterval",Sm),t.requestAnimationFrame&&V(Eh,"requestAnimationFrame",wm),t.XMLHttpRequest&&"XMLHttpRequest"in Eh&&V(XMLHttpRequest.prototype,"send",km);const e=t.eventTarget;if(e){(Array.isArray(e)?e:vm).forEach(e=>function(e,t){const n=Eh,r=n[e]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;V(r,"addEventListener",function(n){return function(r,o,s){try{"function"==typeof o.handleEvent&&(o.handleEvent=Ch(o.handleEvent,{mechanism:{data:{handler:v(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,o),n.apply(this,[r,Ch(o,{mechanism:{data:{handler:v(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),s])}}),V(r,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function Sm(e){return function(...t){const n=t[0];return t[0]=Ch(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${v(e)}`}}),e.apply(this,t)}}function wm(e){return function(t){return e.apply(this,[Ch(t,{mechanism:{data:{handler:v(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function km(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&V(n,e,function(t){const n={mechanism:{data:{handler:v(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=X(t);return r&&(n.mechanism.data.handler=v(r)),Ch(t,n)})}),e.apply(this,t)}}const Em=(e={})=>{const t=e.lifecycle??"page";return{name:"BrowserSession",setupOnce(){if(void 0===Eh.document)return void(Xh&&p.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));oi({ignoreDuration:!0});let e=!1;(e=>{const t=Bp.requestIdleCallback||Bp.setTimeout;if("hidden"===Bp.document?.visibilityState)e();else{let n=!1;const r=()=>{n||(e(),n=!0)};pf("visibilitychange",r,{once:!0,capture:!0}),t(()=>{r(),ff("visibilitychange",r,{capture:!0})})}})(()=>{e||(ai(),e=!0)});const n=rt();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&ai())}),"route"===t&&dh(({from:t,to:n})=>{t!==n&&(oi({ignoreDuration:!0}),ai(),e=!0)})}}},xm=()=>({name:"CultureContext",preprocessEvent(e){const t=Tm();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=Tm();t&&Xr(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function Tm(){try{const e=Eh.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const Im=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){C(t=>{const{stackParser:n,attachStacktrace:r}=Am();if(it()!==e||Ih(t))return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=Mm(Gh(n,c||o,void 0,r,!1),s,i,a);u.level="error",Zs(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Om("onerror")),t.onunhandledrejection&&(!function(e){O(t=>{const{stackParser:n,attachStacktrace:r}=Am();if(it()!==e||Ih())return;const o=Cm(t),s=j(o)?Rm(o):Gh(n,o,void 0,r,!0);s.level="error",Zs(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Om("onunhandledrejection"))}}};function Cm(e){if(j(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 Rm(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Mm(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];return 0===c.length&&c.push({colno:r,lineno:n,filename:Lm(t)??Ff(),function:f,in_app:!0}),e}function Om(e){Xh&&p.log(`Global Handler attached: ${e}`)}function Am(){const e=it();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Lm(e){if(F(e)&&0!==e.length)return e.startsWith("data:")?`<${Ia(e,!1)}>`:e}const Pm=()=>({name:"HttpContext",preprocessEvent(e,t,n){if(!Eh.navigator&&!Eh.location&&!Eh.document)return;const{url:r,headers:o}=Rh(n),s=n.getDataCollectionOptions().httpHeaders.request,i=Object.entries(e.request?.headers??{}).filter(([e])=>!(e in o)),a={...pa(o,s),...Object.fromEntries(i)};e.request={url:ya(r,n),...e.request,...Object.keys(a).length>0?{headers:a}:{headers:void 0}}},processSpan(e,t){if(!Eh.navigator&&!Eh.location&&!Eh.document)return;const n=Rh(t),r=pa(n.headers,t.getDataCollectionOptions().httpHeaders.request),o=r.Referer,{hostname:s,protocol:i}=Eh.location||{};Xr(e,{[an]:r["User-Agent"],[Dt]:"file:"===i||"localhost"===s||"127.0.0.1"===s||"[::1]"===s||!!s?.endsWith(".localhost"),...e.is_segment&&{[tn]:"http.client"!==e.attributes?.[$t]?ya(n.url):void 0,"http.request.header.referer":o?[o]:void 0}})}}),Dm=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){Ga(Nh,o.getOptions().stackParser,n,t,e,r)}}},Nm=/^HTML(\w*)Element$/;function $m(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(Nm.test(t))return`[HTMLElement: ${uf(e)}]`}}function Fm(){return!!function(){if(void 0===Eh.window)return!1;const e=Eh;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=Ff();return!(Eh===Eh.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}()&&(Xh&&c(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}function Bm(e){const{tunnel:t,dsn:n,transportOptions:r}=e;if(!t||"string"==typeof t)return{tunnel:t,transportOptions:r};const o=!0===t?{}:t,s=n&&Fn(n),i=o.path??(s&&Aa(s));if(!i)return{tunnel:void 0,transportOptions:r};const a=`${function(e){const t=(e?.startsWith("./")?e.slice(1):e??"").replace(/\/$/,"");return!t||t.startsWith("/")?t:`/${t}`}(o.basePath)}${i}${o.trailingSlash?"/":""}`;return Xh&&p.log(`Tunneling events to "${a}"`),{tunnel:a,transportOptions:{...r,headers:{"Content-Type":"application/x-sentry-envelope",...r?.headers}}}}function jm(e){return[qa(),Ua(),Zc(),bm(),_m(),Wc(),Im(),Dm(),lc(),Pm(),xm(),Em()]}function Um(e={}){const t=!e.skipBrowserExtensionCheck&&Fm();let n=null==e.defaultIntegrations?jm():e.defaultIntegrations;const r=Ir({integrations:e.integrations,defaultIntegrations:n}),o={...e,...Bm(e),enabled:!t&&e.enabled,stackParser:(s=e.stackParser||mm,Array.isArray(s)?g(...s):s),integrations:r,transport:e.transport||Yh};var s;return ie=$m,na(Kh,o)}const zm=t;const qm=new WeakMap,Wm=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(e){if(qm.has(it()))for(const t of e)st(e=>{e.setExtra("url",t.url);const n=`ReportingObserver [${t.type}]`;let r="No details available";if(t.body){const n={};for(const e in t.body)n[e]=t.body[e];if(e.setExtra("body",n),"crash"===t.type){const e=t.body;r=[e.crashId||"",e.reason||""].join(" ").trim()||r}else{r=t.body.message||r}}Qs(`${n}: ${r}`)})}return{name:"ReportingObserver",setupOnce(){if(!("ReportingObserver"in zm))return;new zm.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){qm.set(e,!0)}}},Hm=(e={})=>{const n={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:"HttpClient",setup(e){!function(e,t){iu(n=>{if(it()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&function(e,t,n,r,o){if(Vm(e,n.status,n.url)){const e=function(e,t){if(!t&&e instanceof Request)return e;if(e instanceof Request&&e.bodyUsed)return e;return new Request(e,t)}(t,r);let s,i,a,c;const u=Ym();if(!1!==u.requestHeaders&&(s=pa(Jm(e.headers),u.requestHeaders)),!1!==u.responseHeaders&&(i=pa(Jm(n.headers),u.responseHeaders)),!1!==u.cookies){const t=e.headers.get("Cookie")||void 0;t&&(a=ha(t,u.cookies,"cookie"));const r=n.headers.get("Set-Cookie")||void 0;r&&(c=ha(r,u.cookies,"set-cookie"))}Zs(Km({url:e.url,method:e.method,status:n.status,requestHeaders:s,responseHeaders:i,requestCookies:a,responseCookies:c,error:o,type:"fetch"}))}}(t,a,r,c,s||i)})}(e,n),function(e,n){if(!("XMLHttpRequest"in t))return;yh(t=>{if(it()!==e)return;const{error:r,virtualError:o}=t,s=t.xhr,i=s[gh];if(!i)return;const{method:a,request_headers:c}=i;try{!function(e,t,n,r,o){if(Vm(e,t.status,t.responseURL)){let e,s,i;const a=Ym();if(!1!==a.cookies)try{const e=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;e&&(s=ha(e,a.cookies,"set-cookie"))}catch{}if(!1!==a.responseHeaders)try{i=pa(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return n&&r&&(e[n]=r),e},{})}(t),a.responseHeaders)}catch{}!1!==a.requestHeaders&&(e=pa(r,a.requestHeaders));Zs(Km({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:i,responseCookies:s,error:o,type:"xhr"}))}}(n,s,a,c,r||o)}catch(e){Xh&&p.warn("Error while extracting response event form XHR response",e)}})}(e,n)}}};function Gm(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Jm(e){const t={};return e.forEach((e,n)=>{t[n]=e}),t}function Vm(e,t,n){return function(e,t){return e.some(e=>"number"==typeof e?e===t:t>=e[0]&&t<=e[1])}(e.failedRequestStatusCodes,t)&&(r=e.failedRequestTargets,o=n,r.some(e=>"string"==typeof e?o.includes(e):e.test(o)))&&!Ca(n,it());var r,o}function Km(e){const t=it(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:Gm(e.responseHeaders)}}};return Se(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function Ym(){const e=it();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};const{cookies:t,httpHeaders:n}=e.getDataCollectionOptions();return{cookies:t,requestHeaders:n.request,responseHeaders:n.response}}const Xm=t,Qm=(e={})=>({name:"ContextLines",processEvent:(t,n,r)=>function(e,t){const n=Xm.document,r=Xm.location&&Ta(Xm.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["","",...s.split("\n"),""];return o.forEach(e=>{const n=e.stacktrace;n?.frames&&(n.frames=n.frames.map(e=>function(e,t,n,r){if(e.filename!==n||!e.lineno||!t.length)return e;return function(e,t,n=5){if(void 0===t.lineno)return;const r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(e=>fe(e,0));const s=Math.min(r-1,o);t.context_line=fe(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(e=>fe(e,0))}(t,e,r),e}(e,i,r,t)))}),e}(t,e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??5)});function Zm(e){if(rg(e))return{operationName:e.operationName,operationType:void 0};if(ng(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=function(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);if(o)return{operationType:o[1],operationName:void 0};return{operationType:void 0,operationName:void 0}}(t);return{operationName:r,operationType:o}}return{operationName:void 0,operationType:void 0}}function eg(e){if(rg(e))return`persisted ${e.operationName}`;if(ng(e)){const{operationName:t,operationType:n}=Zm(e);return t?`${n} ${t}`:`${n}`}return"unknown"}function tg(e){let t;if("xhr"in e){const n=e.xhr[gh];t=n&&Sh(n.body)[0]}else{t=Sh(wh(e.input))[0]}return t}function ng(e){return z(e)&&"string"==typeof e.query}function rg(e){return z(e)&&"string"==typeof e.operationName&&z(e.extensions)&&z(e.extensions.persistedQuery)&&"string"==typeof e.extensions.persistedQuery.sha256Hash&&"number"==typeof e.extensions.persistedQuery.version}function og(e){try{const t=JSON.parse(e);return ng(t)||rg(t)?t:void 0}catch{return}}const sg=e=>({name:"GraphQLClient",setup(t){!function(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const o=er(n).attributes;if(!("http.client"===o[$t]))return;const s=o[tn],i=o[wt]||o[St];if(!F(s)||!F(i))return;const{endpoints:a}=t,c=ge(s,a),u=tg(r);if(c&&u){const t=og(u);if(t){Zr(e)||n.updateName(`${i} ${s} (${eg(t)})`);const{operationName:r,operationType:o}=Zm(t);n.setAttribute(vt,r),n.setAttribute(bt,o),ng(t)&&!0===e.getDataCollectionOptions().graphQL.document&&n.setAttribute(_t,t.query),rg(t)&&(n.setAttribute("graphql.persisted_query.hash.sha256",t.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",t.extensions.persistedQuery.version))}}})}(t,e),function(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if("http"===s&&("fetch"===o||"xhr"===o)){const n=i?.url,{endpoints:o}=t,s=ge(n,o),a=tg(r);if(s&&i&&a){const t=og(a);if(!i.graphql&&t){const n=eg(t);i["graphql.operation"]=n,ng(t)&&!0===e.getDataCollectionOptions().graphQL.document&&(i[_t]=t.query),rg(t)&&(i["graphql.persisted_query.hash.sha256"]=t.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=t.extensions.persistedQuery.version)}}}})}(t,e)}}),ig=(e={})=>{const t=["script"];function n(r,o,s=0){if(!r)return;const i="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const r of i){if(!(r instanceof HTMLElement))continue;const i=Nf(r,1)||void 0,a=r.tagName.toLowerCase();if(t.includes(a))continue;const c=e.onElement?.({element:r,componentName:i,tagName:a,depth:s})||{};if("skip"===c)continue;if("children"===c){n(r,o,s+1);continue}const{x:u,y:l,width:d,height:p}=r.getBoundingClientRect(),f={identifier:r.id||void 0,type:i||a,visible:!0,alpha:1,height:p,width:d,x:u,y:l,...c},h=[];f.children=h,n(r,f.children,s+1),o.push(f)}}return{name:"ViewHierarchy",processEvent:(t,r)=>{if(void 0!==t.type||!1===e.shouldAttach?.(t,r))return t;const o={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||Eh.document.body,o.windows);const s={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(o)};return r.attachments=r.attachments||[],r.attachments.push(s),t}}},ag=t,cg="sentryReplaySession",ug="Unable to send Replay",lg=15e4,dg=5e3,pg=2e7,fg=36e5;var hg=Object.defineProperty,mg=(e,t,n)=>((e,t,n)=>t in e?hg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),gg=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(gg||{});function yg(e){return e.nodeType===e.ELEMENT_NODE}function _g(e){const t=e?.host;return Boolean(t?.shadowRoot===e)}function vg(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function bg(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,Sg).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function Sg(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=bg(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;nthis.removeNodeFromMap(e)),yg(e)&&e.shadowRoot&&this.removeNodeFromMap(e.shadowRoot)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function kg({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function Eg({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function xg(e){return e.toLowerCase()}function Tg(e){return e.toUpperCase()}const Ig="__rrweb_original__";function Cg(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?xg(t):null}function Rg(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Mg(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(e){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return r?.[1]??null}const Og={};function Ag(e){const t=Og[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&"function"==typeof o.createElement)try{const t=o.createElement("iframe");t.hidden=!0,o.head.appendChild(t);const s=t.contentWindow;if(s&&s[e]){const t=s[e].bind(window);r=(...r)=>{try{return t(...r)}catch{return Og[e]=n,n(...r)}}}o.head.removeChild(t)}catch(e){}return Og[e]=r}function Lg(...e){return Ag("setTimeout")(...e)}function Pg(...e){return Ag("clearTimeout")(...e)}function Dg(e){try{return e.contentDocument}catch{}}let Ng=1;const $g=new RegExp("[^a-z0-9-_:]");function Fg(){return Ng++}let Bg,jg;const Ug=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zg=/^(?:[a-z+]+:)?\/\//i,qg=/^www\..*/i,Wg=/^(data:)([^,]*),(.*)/i;function Hg(e,t){return(e||"").replace(Ug,(e,n,r,o,s,i)=>{const a=r||s||i,c=n||o||"";if(!a)return e;if(zg.test(a)||qg.test(a))return`url(${c}${a}${c})`;if(Wg.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const u=t.split("/"),l=a.split("/");u.pop();for(const e of l)"."!==e&&(".."===e?u.pop():u.push(e));return`url(${c}${u.join("/")}${c})`})}const Gg=/^[^ \t\n\r\u000c]+/,Jg=/^[, \t\n\r\u000c]+/;const Vg=new WeakMap;function Kg(e,t){return t&&""!==t.trim()?Xg(e,t):t}function Yg(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Xg(e,t){let n=Vg.get(e);if(n||(n=e.createElement("a"),Vg.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Qg(e,t,n,r,o,s,i){if(!r)return r;if("src"===n||"href"===n&&("use"!==t||"#"!==r[0]))return Kg(e,r);if("xlink:href"===n&&"#"!==r[0])return Kg(e,r);if("background"===n&&("table"===t||"td"===t||"th"===t))return Kg(e,r);if("srcset"===n)return function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(Jg),!(n>=t.length);){let s=r(Gg);if(","===s.slice(-1))s=Kg(e,s.substring(0,s.length-1)),o.push(s);else{let r="";s=Kg(e,s);let i=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((s+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,o.push((s+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r);if("style"===n){let t=Hg(r,Xg(e));return i&&i.size>0&&(t=function(e,t){if(!e||0===t.size)return e;try{const n=e.split(";"),r=[];for(let e of n){if(e=e.trim(),!e)continue;const n=e.indexOf(":");if(-1===n){r.push(e);continue}const o=e.slice(0,n).trim();t.has(o)||r.push(e)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(t){return console.warn("Error filtering CSS properties:",t),e}}(t,i)),t}return"object"===t&&"data"===n?Kg(e,r):"function"==typeof s?s(n,r,o):r}function Zg(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function ey(e,t,n=1/0,r=0){return e?_g(e)?ey(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ey(e.parentNode,t,n,r+1):-1}function ty(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function ny(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(s){if(c=ey(i,ty(r,o)),c<0)return!0;a=ey(i,ty(t,n),c>=0?c:1/0)}else{if(a=ey(i,ty(t,n)),a<0)return!1;c=ey(i,ty(r,o),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!s}catch(e){}return!!s}function ry(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1,ignoreCSSAttributes:w}=t,k=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:gg.Document,childNodes:[],compatMode:e.compatMode}:{type:gg.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:gg.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:m,maskTextClass:g,unmaskTextClass:y,maskTextSelector:_,unmaskTextSelector:v,ignoreCSSAttributes:b}=t,S=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,s),w=function(e){if(e instanceof HTMLFormElement)return"form";const t=xg(e.tagName);return $g.test(t)?"div":t}(e);let k={};const E=e.attributes.length;for(let t=0;tt.href===e.href);let r=null;t&&(r=bg(t)),r&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=Hg(r,t.href))}if("style"===w&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=bg(e.sheet);t&&(k._cssText=Hg(t,Xg(n)))}if("input"===w||"textarea"===w||"select"===w||"option"===w){const t=e,n=Cg(t),r=Rg(t,Tg(w),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=ny(t,g,_,y,v,kg({type:n,tagName:Tg(w),maskInputOptions:a}));k.value=Eg({isMasked:e,element:t,value:r,maskInputFn:u})}o&&(k.checked=o)}"option"===w&&(e.selected&&!a.select?k.selected=!0:delete k.selected);if("canvas"===w&&p)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n0!==e))return!1}return!0})(e)||(k.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(k.rr_dataURL=t)}if("img"===w&&d){Bg||(Bg=n.createElement("canvas"),jg=Bg.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"",o=t.crossOrigin,s=()=>{t.removeEventListener("load",s);try{Bg.width=t.naturalWidth,Bg.height=t.naturalHeight,jg.drawImage(t,0,0),k.rr_dataURL=Bg.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?k.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}"audio"!==w&&"video"!==w||(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime);h||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop));if(S){const{width:t,height:n}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==w||f(k.src)||(S||Dg(e)||(k.rr_src=k.src),delete k.src);let x;try{customElements.get(w)&&(x=!0)}catch(e){}return{type:gg.Element,tagName:w,attributes:k,childNodes:[],isSVG:Yg(e)||void 0,needBlock:S,rootId:m,isCustom:x}}(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:h,maskInputFn:g,dataURLOptions:y,inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:k,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:w});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const f="STYLE"===d||void 0,h="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=bg(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=Hg(p,Xg(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");const g=ny(e,r,s,o,i,n);f||h||m||!p||!g||(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*"));m&&p&&(c.textarea||g)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*"));if("OPTION"===d&&p){p=Eg({isMasked:ny(e,r,s,o,i,kg({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:u})}return{type:gg.Text,textContent:p||"",isStyle:f,rootId:l}}(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:h,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:gg.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:gg.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function oy(e){return null==e?"":e.toLowerCase()}function sy(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E=5e3,onBlockedImageLoad:x,onStylesheetLoad:T,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:R=!1,ignoreCSSAttributes:M}=t;let{preserveWhiteSpace:O=!0}=t;const A=ry(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:C,newlyAddedElement:R,ignoreCSSAttributes:M});if(!A)return console.warn(e,"not serialized"),null;let L;L=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===gg.Comment)return!0;if(e.type===gg.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Mg(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(oy(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===oy(e.attributes.name)||"icon"===oy(e.attributes.rel)||"apple-touch-icon"===oy(e.attributes.rel)||"shortcut icon"===oy(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&oy(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(oy(e.attributes.property).match(/^(og|twitter|fb):/)||oy(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===oy(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===oy(e.attributes.name)||"googlebot"===oy(e.attributes.name)||"bingbot"===oy(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===oy(e.attributes.name)||"generator"===oy(e.attributes.name)||"framework"===oy(e.attributes.name)||"publisher"===oy(e.attributes.name)||"progid"===oy(e.attributes.name)||oy(e.attributes.property).match(/^article:/)||oy(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===oy(e.attributes.name)||"yandex-verification"===oy(e.attributes.name)||"csrf-token"===oy(e.attributes.name)||"p:domain_verify"===oy(e.attributes.name)||"verify-v1"===oy(e.attributes.name)||"verification"===oy(e.attributes.name)||"shopify-checkout-api-token"===oy(e.attributes.name)))return!0}}return!1}(A,_)&&(O||A.type!==gg.Text||A.isStyle||A.textContent.trim().length)?Fg():-2;const P=Object.assign(A,{id:L});if(r.add(e,P),-2===L)return null;w&&w(e);let D=!p;if(P.type===gg.Element){D=D&&!P.needBlock;const t=e.shadowRoot;t&&vg(t)&&(P.isShadowHost=!0)}if((P.type===gg.Document||P.type===gg.Element)&&D){_.headWhitespace&&P.type===gg.Element&&"head"===P.tagName&&(O=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onBlockedImageLoad:x,onStylesheetLoad:T,stylesheetLoadTimeout:I,keepIframeSrcFn:C,ignoreCSSAttributes:M},R=e.childNodes?Array.from(e.childNodes):[];for(const e of R){const n=sy(e,t);n&&P.childNodes.push(n)}if(yg(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=sy(n,t);r&&(vg(e.shadowRoot)&&(r.isShadow=!0),P.childNodes.push(r))}}if(e.parentNode&&_g(e.parentNode)&&vg(e.parentNode)&&(P.isShadow=!0),P.type!==gg.Element||"iframe"!==P.tagName||P.needBlock||function(e,t,n){const r=function(e){try{return e.contentWindow}catch{}}(e);if(!r)return;let o,s=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=Lg(()=>{s||(t(),s=!0)},n);return void e.addEventListener("load",()=>{Pg(r),s=!0,t()})}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return Lg(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=Dg(e);if(t&&k){const n=sy(t,{doc:t,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:I,keepIframeSrcFn:C,ignoreCSSAttributes:M});n&&k(e,n)}},E),P.type===gg.Element&&"img"===P.tagName&&!e.complete&&P.needBlock){const t=e,n=()=>{if(t.isConnected&&!t.complete&&x)try{const e=t.getBoundingClientRect();e.width>0&&e.height>0&&x(t,P,e)}catch(e){}t.removeEventListener("load",n)};t.isConnected&&t.addEventListener("load",n)}return P.type===gg.Element&&"link"===P.tagName&&"string"==typeof P.attributes.rel&&("stylesheet"===P.attributes.rel||"preload"===P.attributes.rel&&"string"==typeof P.attributes.href&&"css"===Mg(P.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){r=null}if(r)return;const s=Lg(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{Pg(s),o=!0,t()})}(e,()=>{if(T){const t=sy(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:I,keepIframeSrcFn:C,ignoreCSSAttributes:M});t&&T(e,t)}},I),P.type===gg.Element&&delete P.needBlock,P}function iy(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const ay="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let cy={map:{},getId:()=>(console.error(ay),-1),getNode:()=>(console.error(ay),null),removeNodeFromMap(){console.error(ay)},has:()=>(console.error(ay),!1),reset(){console.error(ay)}};function uy(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||!1!==n.leading||(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(!function(...e){Ry("clearTimeout")(...e)}(r),r=null),o=i,e.apply(c,s)):r||!1===n.trailing||(r=My(()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},a))}}function ly(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){My(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>ly(e,t,s||{},!0)}function dy(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(cy=new Proxy(cy,{get:(e,t,n)=>("map"===t&&console.error(ay),Reflect.get(e,t,n))}));let py=Date.now;function fy(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function hy(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function my(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function gy(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}function yy(e,t,n,r,o){if(!e)return!1;const s=gy(e);if(!s)return!1;const i=ty(t,n);if(!o){const e=r&&s.matches(r);return i(s)&&!e}const a=ey(s,i);let c=-1;return!(a<0)&&(r&&(c=ey(s,ty(null,r))),a>-1&&c<0||a(new Date).getTime());class Ey{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function xy(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Ty(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=xy(n);)n=t;return n}(e);return t.contains(n)}function Iy(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||Ty(e))}const Cy={};function Ry(e){const t=Cy[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&"function"==typeof o.createElement)try{const t=o.createElement("iframe");t.hidden=!0,o.head.appendChild(t);const s=t.contentWindow;if(s&&s[e]){const t=s[e].bind(window);r=(...r)=>{try{return t(...r)}catch{return Cy[e]=n,n(...r)}}}o.head.removeChild(t)}catch(e){}return Cy[e]=r}function My(...e){return Ry("setTimeout")(...e)}var Oy=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Oy||{}),Ay=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Ay||{}),Ly=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Ly||{}),Py=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Py||{}),Dy=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Dy||{});let Ny;const $y=e=>{if(!Ny)return e;return(...t)=>{try{return e(...t)}catch(e){if(Ny&&!0===Ny(e))return()=>{};throw e}}};for(var Fy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",By="undefined"==typeof Uint8Array?[]:new Uint8Array(256),jy=0;jy<64;jy++)By[Fy.charCodeAt(jy)]=jy;class Uy{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function zy(e){try{return e.contentDocument}catch(e){}}function qy(e){try{return e.contentWindow}catch(e){}}class Wy{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if("undefined"==typeof CSSStyleSheet||"function"!=typeof CSSStyleSheet.prototype.replaceSync)return null;try{const t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);const n=t.cssRules[0];return n&&n.type===CSSRule.STYLE_RULE?n.style:null}catch{return null}}parseWithDetachedElement(e){const t=this.getUnattachedDoc().createElement("span");return t.setAttribute("style",e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}}function Hy(e){return"__ln"in e}class Gy{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n`${e}@${t}`;class Vy{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Gy,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!Iy(o))return;const s=_g(o.parentNode)?this.mirror.getId(xy(o)):this.mirror.getId(o.parentNode),i=r(o);if(-1===s||-1===i)return n.addNode(o);const a=sy(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Sy(e,this.mirror)&&!yy(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),wy(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),ky(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(yy(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);const n=qy(e);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});a&&(e.push({parentId:s,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;){const e=this.mapRemoves.shift();this.mirror.removeNodeFromMap(e),this.shadowDomManager.removeShadowRootsFor(e)}for(const e of this.movedSet)Yy(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)Xy(this.droppedSet,e)||Yy(this.removes,e,this.mirror)?Xy(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let s=null;for(;n.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}s=e.previous,n.removeNode(e.value),o(e.value)}const i={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!_y(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;yy(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:ny(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,gy(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Cg(t),o=t.tagName;r=Rg(t,o,n);const s=kg({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=Eg({isMasked:ny(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(yy(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(zy(t))return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Zg(t.tagName,n)&&(o.attributes[n]=Qg(this.doc,xg(t.tagName),xg(n),r,t,this.maskAttributeFn),"style"===n)){const n=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r!==(n?.getPropertyValue(e)||"")||s!==(n?.getPropertyPriority(e)||"")?o.styleDiff[e]=""===s?r:[r,s]:o._unchangedStyles[e]=[r,s]}if(n)for(const e of Array.from(n))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(yy(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=_g(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);yy(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||_y(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Ky(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||vy(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Jy(n,r)]?Ky(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!_g(e.target)||!vg(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(_y(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Jy(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);yy(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),ky(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new Wy(this.doc)}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}release(e){for(e.forEach(e=>{"childList"===e.type&&e.removedNodes.forEach(e=>this.mapRemoves.push(e))});this.mapRemoves.length;){const e=this.mapRemoves.shift();Iy(e)||(this.mirror.removeNodeFromMap(e),this.shadowDomManager.removeShadowRootsFor(e))}}}function Ky(e,t){e.delete(t),t.childNodes?.forEach(t=>Ky(e,t))}function Yy(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}(e,t,n)}function Xy(e,t){return 0!==e.size&&Qy(e,t)}function Qy(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Qy(e,n))}const Zy=[];function e_(e){[...Zy].forEach(e)}const t_=new WeakMap;function n_(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function r_(e,t){const n=new Vy;Zy.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const{onMutation:s,blockClass:i,blockSelector:a,unblockSelector:c}=e,u={isBlocked:e=>yy(e,i,a,c,!0)},l=new r($y(e=>{let t=e;if(s){const n=s(e,u);if(!1===n)return;Array.isArray(n)&&(t=n)}n.processMutations(t)}));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t_.set(l,n),l}function o_({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let u=null;return Object.keys(Ly).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(i=>{let a=xg(i);const l=(t=>i=>{const a=n_(i);if(yy(a,r,o,s,!0))return;let c=null,l=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=Py.Mouse;break;case"touch":c=Py.Touch;break;case"pen":c=Py.Pen}c===Py.Touch?Ly[t]===Ly.MouseDown?l="TouchStart":Ly[t]===Ly.MouseUp&&(l="TouchEnd"):Py.Pen}else by(i)&&(c=Py.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===Py.Touch||l.startsWith("Mouse")&&c===Py.Mouse)&&(c=null)):Ly[t]===Ly.Click&&(c=u,u=null);const d=by(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:f,clientY:h}=d;$y(e)({type:Ly[l],id:p,x:f,y:h,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(Ly[i]){case Ly.MouseDown:case Ly.MouseUp:a=a.replace("mouse","pointer");break;case Ly.TouchStart:case Ly.TouchEnd:return}c.push(iy(a,l,t))}),$y(()=>{c.forEach(e=>e())})}function s_({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return iy("scroll",$y(uy($y(i=>{const a=n_(i);if(!a||yy(a,r,o,s,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=fy(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}const i_=["INPUT","TEXTAREA","SELECT"],a_=new WeakMap;function c_({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:m}){function g(e){let n=n_(e);const l=e.isTrusted,g=n&&Tg(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||i_.indexOf(g)<0||yy(n,r,o,s,!0))return;const _=n;if(_.classList.contains(i)||a&&_.matches(a))return;const v=Cg(n);let b=Rg(_,g,v),S=!1;const w=kg({maskInputOptions:c,tagName:g,type:v}),k=ny(n,p,h,f,m,w);"radio"!==v&&"checkbox"!==v||(S=n.checked),b=Eg({isMasked:k,element:n,value:b,maskInputFn:u}),y(n,d?{text:b,isChecked:S,userTriggered:l}:{text:b,isChecked:S});const E=n.name;"radio"===v&&E&&S&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach(e=>{if(e!==n){const t=Eg({isMasked:k,element:e,value:Rg(e,g,v),maskInputFn:u});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}})}function y(t,r){const o=a_.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){a_.set(t,r);const o=n.getId(t);$y(e)({...r,id:o})}}const _=("last"===l.input?["change"]:["input","change"]).map(e=>iy(e,$y(g),t)),v=t.defaultView;if(!v)return()=>{_.forEach(e=>e())};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&_.push(...S.map(e=>ly(e[0],e[1],{set(){$y(g)({target:this,isTrusted:!1})}},!1,v))),$y(()=>{_.forEach(e=>e())})}function u_(e){return function(e,t){if(f_("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||f_("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||f_("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||f_("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function l_(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function d_({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const o="#document"===n.nodeName?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(e){const n=s.set?.call(this,e);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),$y(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function p_(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=r_(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=uy($y(t=>{const n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),s),u=$y(uy($y(e=>{const t=n_(e),{clientX:n,clientY:o}=by(e)?e.changedTouches[0]:e;i||(i=py()),a.push({x:n,y:o,id:r.getId(t),timeOffset:py()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?Ay.Drag:e instanceof MouseEvent?Ay.MouseMove:Ay.TouchMove)}),o,{trailing:!1})),l=[iy("mousemove",u,n),iy("touchmove",u,n),iy("drag",u,n)];return $y(()=>{l.forEach(e=>e())})}(e),s=o_(e),i=s_(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return iy("resize",$y(uy($y(()=>{const t=hy(),o=my();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)}),200)),t)}(e,{win:n}),c=c_(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=$y(i=>uy($y(s=>{const a=n_(s);if(!a||yy(a,t,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:d}=a;e({type:i,id:o.getId(a),currentTime:c,volume:u,muted:l,playbackRate:d})}),s.media||500)),c=[iy("play",a(Dy.Play),i),iy("pause",a(Dy.Pause),i),iy("seeked",a(Dy.Seeked),i),iy("volumechange",a(Dy.VolumeChange),i),iy("ratechange",a(Dy.RateChange),i)];return $y(()=>{c.forEach(e=>e())})}(e);let l=()=>{},d=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(l=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:$y((r,o,s)=>{const[i,a]=s,{id:c,styleId:u}=l_(o,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:a}]}),r.apply(o,s)})});const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:$y((r,o,s)=>{const[i]=s,{id:a,styleId:c}=l_(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(o,s)})}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:$y((r,o,s)=>{const[i]=s,{id:a,styleId:c}=l_(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(o,s)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:$y((r,o,s)=>{const[i]=s,{id:a,styleId:c}=l_(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(o,s)})}));const c={};h_("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(h_("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),h_("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),h_("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([r,o])=>{u[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(u[r].insertRule,{apply:$y((r,o,s)=>{const[i,a]=s,{id:c,styleId:u}=l_(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:[...u_(o),a||0]}]}),r.apply(o,s)})}),o.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:$y((r,o,s)=>{const[i]=s,{id:a,styleId:c}=l_(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...u_(o),i]}]}),r.apply(o,s)})})}),$y(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:n}),d=d_(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:$y((o,i,a)=>{const[c,u,l]=a;if(n.has(c))return s.apply(i,[c,u,l]);const{id:d,styleId:p}=l_(i.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:l},index:u_(i.parentRule)}),o.apply(i,a)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:$y((o,s,a)=>{const[c]=a;if(n.has(c))return i.apply(s,[c]);const{id:u,styleId:l}=l_(s.parentRule?.parentStyleSheet,t,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&e({id:u,styleId:l,remove:{property:c},index:u_(s.parentRule)}),o.apply(s,a)})}),$y(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:n}),e.collectFonts&&(f=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=dy(t.fonts,"add",function(t){return function(n){return My($y(()=>{const t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(i),$y(()=>{r.forEach(e=>e())})}(e)));const h=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=$y(()=>{const e=t.getSelection();if(!e||a&&e?.isCollapsed)return;a=e.isCollapsed||!1;const c=[],u=e.rangeCount||0;for(let t=0;t{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return $y(()=>{e_(e=>e.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),l(),d(),p(),f(),h(),m(),g.forEach(e=>e())})}function f_(e){return void 0!==window[e]}function h_(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class m_{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),s.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class g_{constructor(){this.crossOriginIframeMirror=new m_(Fg),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class y_{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new m_(Fg),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new m_(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0);const t=qy(e);t&&this.crossOriginIframeMap.set(t,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&qy(e)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const n=zy(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Oy.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Oy.IncrementalSnapshot,data:{source:Ay.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Oy.Meta:case Oy.Load:case Oy.DomContentLoaded:return!1;case Oy.Plugin:return t;case Oy.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Oy.IncrementalSnapshot:switch(t.data.source){case Ay.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Ay.Drag:case Ay.TouchMove:case Ay.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Ay.ViewportResize:return!1;case Ay.MediaInteraction:case Ay.MouseInteraction:case Ay.Scroll:case Ay.CanvasMutation:case Ay.Input:return this.replaceIds(t.data,e,["id"]),t;case Ay.StyleSheetRule:case Ay.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Ay.Font:return t;case Ay.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Ay.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===gg.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class __{init(){}addShadowRoot(){}observeAttachShadow(){}removeShadowRootsFor(){}reset(){}}class v_{constructor(e){this.shadowDoms=new WeakSet,this.shadowRootTeardowns=new Map,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!vg(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=[];this.shadowRootTeardowns.set(e,n),this.bypassOptions.canvasManager.addShadowRoot(e);const r=r_({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);n.push(()=>function(e){const t=e.takeRecords();e.disconnect();const n=t_.get(e);if(n){n.release(t);const r=Zy.indexOf(n);-1!==r&&Zy.splice(r,1),t_.delete(e)}}(r)),n.push(s_({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),My(()=>{this.shadowRootTeardowns.get(e)===n&&(e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),n.push(d_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)))},0)}removeShadowRoot(e){const t=this.shadowRootTeardowns.get(e);t&&(t.forEach(e=>{try{e()}catch(e){}}),this.shadowRootTeardowns.delete(e)),this.shadowDoms.delete(e)}removeShadowRootsFor(e){if(0!==this.shadowRootTeardowns.size){if(ky(e)){const t=e.shadowRoot;this.shadowDoms.has(t)&&!Iy(e)&&this.removeShadowRoot(t),this.removeShadowRootsFor(t)}e.childNodes?.forEach(e=>this.removeShadowRootsFor(e))}}observeAttachShadow(e){const t=zy(e),n=qy(e);if(!t||!n)return;let r;try{r=n.Element}catch(e){return}r&&this.patchAttachShadow(r,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(dy(e.prototype,"attachShadow",function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&Iy(this)&&n.addShadowRoot(this.shadowRoot,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowRootTeardowns.forEach(e=>{e.forEach(e=>{try{e()}catch(e){}})}),this.shadowRootTeardowns=new Map,this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class b_{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Ey,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:Sg(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class S_{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){Ry("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let w_,k_;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const E_=new wg;function x_(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:w,sampling:k={},dataURLOptions:E={},mousemoveWait:x,recordDOM:T=!0,recordCanvas:I=!1,recordCrossOriginIframes:C=!1,recordAfter:R=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:M=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:L,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:D=new Set([]),errorHandler:N,onMutation:$,getCanvasManager:F}=e;Ny=N;const B=!C||window.parent===window;let j=!1;if(!B)try{window.parent.document&&(j=!1)}catch(e){j=!0}if(B&&!t)throw new Error("emit function is required");if(!B&&!j)return()=>{};void 0!==x&&void 0===k.mousemove&&(k.mousemove=x),E_.reset();const U=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,hidden:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},z=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let q=0,W=0,H=0;const G=e=>{for(const t of L||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!j&&(e=w(e)),e};w_=(e,o)=>{const s=e;if(s.timestamp=py(),!Zy[0]?.isFrozen()||s.type===Oy.FullSnapshot||s.type===Oy.IncrementalSnapshot&&s.data.source===Ay.Mutation||e_(e=>e.unfreeze()),B)t?.(G(s),o);else if(j){const e={type:"rrweb",event:G(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===Oy.FullSnapshot)q=s.timestamp,W=0,H=0;else if(s.type===Oy.IncrementalSnapshot){if(s.data.source===Ay.Mutation&&s.data.isAttachIframe)return;W++;const e=r&&W>=r,t=n&&q&&s.timestamp-q>n;(e||t)&&te(!0)}};const J=e=>{w_({type:Oy.IncrementalSnapshot,data:{source:Ay.Mutation,...e}})},V=e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.Scroll,...e}}),K=e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.CanvasMutation,...e}}),Y=new b_({mutationCb:J,adoptedStyleSheetCb:e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.AdoptedStyleSheet,...e}})}),X="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new g_:new y_({mirror:E_,mutationCb:J,stylesheetManager:Y,recordCrossOriginIframes:C,wrappedEmit:w_});for(const e of L||[])e.getMirror&&e.getMirror({nodeMirror:E_,crossOriginIframeMirror:X.crossOriginIframeMirror,crossOriginIframeStyleMirror:X.crossOriginIframeStyleMirror});const Q=new S_,Z=function(e,t){try{return e?e(t):new Uy}catch{return console.warn("Unable to initialize CanvasManager"),new Uy}}(F,{mirror:E_,win:window,mutationCb:e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.CanvasMutation,...e}}),recordCanvas:I,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:k.canvas,dataURLOptions:E,errorHandler:N}),ee="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new __:new v_({mutationCb:J,scrollCb:V,bypassOptions:{onMutation:$,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:U,dataURLOptions:E,maskAttributeFn:_,maskTextFn:b,maskInputFn:v,recordCanvas:I,inlineImages:A,sampling:k,slimDOMOptions:z,iframeManager:X,stylesheetManager:Y,canvasManager:Z,keepIframeSrcFn:P,processedNodeManager:Q,ignoreCSSAttributes:D},mirror:E_}),te=(e=!1)=>{if(!T)return;w_({type:Oy.Meta,data:{href:window.location.href,width:my(),height:hy()}},e),Y.reset(),ee.init(),e_(e=>e.lock());let t=!1;try{const e=function(e,t){const{mirror:n=new wg,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:_=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:I=()=>!1,ignoreCSSAttributes:C=new Set([])}=t||{};return sy(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,hidden:!0,textarea:!0,select:!0}:!1===h?{}:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:v,inlineImages:p,recordCanvas:f,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:I,newlyAddedElement:!1,ignoreCSSAttributes:C})}(document,{mirror:E_,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:U,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,slimDOM:z,dataURLOptions:E,recordCanvas:I,inlineImages:A,onSerialize:e=>{Sy(e,E_)&&X.addIframe(e),wy(e,E_)&&Y.trackLinkElement(e),ky(e)&&ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{X.attachIframe(e,t);const n=qy(e);n&&Z.addWindow(n),ee.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{J({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:P,ignoreCSSAttributes:D});if(!e)return console.warn("Failed to snapshot the document");w_({type:Oy.FullSnapshot,data:{node:e,initialOffset:fy(window)}}),t=!0}finally{if(!t){if(H++,n){const e=Math.min(1e3*2**(H-1),n);q=py()-n+e}W=0}e_(e=>e.unlock())}document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,E_.getId(document))};k_=te;try{const e=[],t=e=>$y(p_)({onMutation:$,mutationCb:J,mousemoveCb:(e,t)=>w_({type:Oy.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.MouseInteraction,...e}}),scrollCb:V,viewportResizeCb:e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.ViewportResize,...e}}),inputCb:e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.Input,...e}}),mediaInteractionCb:e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.MediaInteraction,...e}}),styleSheetRuleCb:e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.StyleSheetRule,...e}}),styleDeclarationCb:e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.StyleDeclaration,...e}}),canvasMutationCb:K,fontCb:e=>w_({type:Oy.IncrementalSnapshot,data:{source:Ay.Font,...e}}),selectionCb:e=>{w_({type:Oy.IncrementalSnapshot,data:{source:Ay.Selection,...e}})},customElementCb:e=>{w_({type:Oy.IncrementalSnapshot,data:{source:Ay.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:U,inlineStylesheet:h,sampling:k,recordDOM:T,recordCanvas:I,inlineImages:A,userTriggeredOnInput:M,collectFonts:O,doc:e,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:P,blockSelector:s,unblockSelector:i,slimDOMOptions:z,dataURLOptions:E,mirror:E_,iframeManager:X,stylesheetManager:Y,shadowDomManager:ee,processedNodeManager:Q,canvasManager:Z,ignoreCSSAttributes:D,plugins:L?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>w_({type:Oy.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});X.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});const n=()=>{te(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(iy("DOMContentLoaded",()=>{w_({type:Oy.DomContentLoaded,data:{}}),"DOMContentLoaded"===R&&n()})),e.push(iy("load",()=>{w_({type:Oy.Load,data:{}}),"load"===R&&n()},window))),()=>{e.forEach(e=>e()),Q.destroy(),k_=void 0,Ny=void 0}}catch(e){console.warn(e)}}var T_,I_;x_.mirror=E_,x_.takeFullSnapshot=function(e){if(!k_)throw new Error("please take full snapshot after start recording");k_(e)},(I_=T_||(T_={}))[I_.NotStarted=0]="NotStarted",I_[I_.Running=1]="Running",I_[I_.Stopped=2]="Stopped";function C_(e){return e>9999999999?e:1e3*e}function R_(e){return e>9999999999?e/1e3:e}function M_(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Oy.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:ce(t,10,1e3)}}),"console"===t.category)))}function O_(e){return e.closest("button,a")||e}function A_(e){const t=L_(e);return t&&t instanceof Element?O_(t):t}function L_(e){return function(e){return z(e)&&"target"in e}(e)?e.target:e}let P_;function D_(e){return P_||(P_=[],V(ag,"open",function(e){return function(...t){if(P_)try{P_.forEach(e=>e())}catch{}return e.apply(ag,t)}})),P_.push(e),()=>{const t=P_?P_.indexOf(e):-1;t>-1&&P_.splice(t,1)}}const N_=new Set([Ay.Mutation,Ay.StyleSheetRule,Ay.StyleDeclaration,Ay.AdoptedStyleSheet,Ay.CanvasMutation,Ay.Selection,Ay.MediaInteraction]);class $_{constructor(e,t,n=M_){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=D_(()=>{this._lastMutation=B_()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!F_.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:R_(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=R_(e)}registerScroll(e=Date.now()){this._lastScroll=R_(e)}registerClick(e){const t=O_(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=B_();this._clicks.forEach(n=>{void 0===n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),void 0===n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=void 0!==e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=void 0!==e.mutationAfter&&e.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:s,clickBreadcrumb:i}=e;if(o){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:ag.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:s||1}};return void this._addBreadcrumbEvent(t,o)}if(s>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:ag.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=mh(()=>this._checkClicks(),1e3)}}const F_=["A","BUTTON","INPUT"];function B_(){return Date.now()/1e3}function j_(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(N_.has(n)&&e.registerMutation(t.timestamp),n===Ay.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===Ay.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=x_.mirror.getNode(r);o instanceof HTMLElement&&n===Ly.Click&&e.registerClick(o)}}catch{}}function U_(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var z_=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(z_||{});const q_=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),W_=new Set([...q_,"data-sentry-element"]);function H_(e){const t={};for(const n in e)if(q_.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return!t["data-sentry-component"]&&e["data-sentry-element"]&&(t["data-sentry-component"]=e["data-sentry-element"]),t}const G_=e=>t=>{if(!e.isEnabled())return;const n=function(e,t){const{target:n,message:r}=function(e,t){const n="click"===e.name;let r,o=null;try{o=n?A_(e.event):L_(e.event),r=uf(o,{maxStringLength:200,maskAttributeFn:t})||""}catch{r=""}return{target:o,message:r}}(e,t);return U_({category:`ui.${e.name}`,...J_(n,r)})}(t,e.getMaskAttributeFn());if(!n)return;const r="click"===t.name,o=r?t.event:void 0;var s,i,a;!(r&&e.clickDetector&&o?.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(s=e.clickDetector,i=n,a=A_(t.event),s.handleClick(i,a)),M_(e,n)};function J_(e,t){const n=x_.mirror.getId(e),r=n&&x_.mirror.getNode(n),o=r&&x_.mirror.getMeta(r),s=o&&function(e){return e.type===z_.Element}(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>e.type===z_.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:H_(s.attributes)}}:{}}}function V_(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e,t){const{metaKey:n,shiftKey:r,ctrlKey:o,altKey:s,key:i,target:a}=e;if(!a||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(a)||!i)return null;const c=n||o||s,u=1===i.length;if(!c&&u)return null;const l=uf(a,{maxStringLength:200,maskAttributeFn:t})||"",d=J_(a,l);return U_({category:"ui.keyDown",message:l,data:{...d.data,metaKey:n,shiftKey:r,ctrlKey:o,altKey:s,key:i}})}(t,e.getMaskAttributeFn());n&&M_(e,n)}const K_={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:Q_(s),end:Q_(o,s),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Q_(o);return{type:n,name:r,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:f,transferSize:h,type:m}=e;if(0===o)return null;return{type:`${t}.${m}`,start:Q_(f),end:Q_(s,f),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:s,redirectCount:p}}}};function Y_(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function X_(e){const t=K_[e.entryType];return t?t(e):null}function Q_(e,t=e){return Me(e,t)}function Z_(e){const t=e.entries[e.entries.length-1];return rv(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function ev(e){return void 0!==e.sources}function tv(e){const t=[],n=[];for(const r of e.entries)if(ev(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=x_.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return rv(e,"cumulative-layout-shift",n,t)}function nv(e){const t=e.entries[e.entries.length-1];return rv(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function rv(e,t,n,r){const o=e.value,s=e.rating,i=e.entries[e.entries.length-1],a=Q_(i?.startTime??(e.navigationStartTime??0)+o);return{type:"web-vital",name:t,start:a,end:a,data:{value:o,size:o,rating:s,nodeIds:n?n.map(e=>x_.mirror.getId(e)):void 0,attributions:r}}}const ov="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;const sv=["log","warn","error"],iv="[Replay] ";function av(e,t="info"){Ba({category:"console",data:{logger:"replay"},level:t,message:`${iv}${e}`},{level:t})}const cv=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return ov?(sv.forEach(e=>{n[e]=(...n)=>{p[e](iv,...n),t&&av(n.join(""),cc(e))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),p.error(iv,r),e?Xs(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&av(r,"error")},n.infoTick=(...e)=>{p.log(iv,...e),t&&setTimeout(()=>av(e[0]),0)}):sv.forEach(e=>{n[e]=()=>{}}),n}();class uv extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class lv extends Error{constructor(){super("Worker destroyed")}}class dv{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>pg)throw new uv;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(const{timestamp:t}of this.events)(null===e||t{const t=e;if("number"!=typeof t.id)return;const n=this._pending.get(t.id);if(n&&n.method===t.method){if(this._pending.delete(t.id),!t.success)return ov&&cv.error("Error in compression worker: ",t.response),void n.reject(new Error("Error in compression worker"));n.resolve(t.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():(ov&&cv.warn("Received worker message with unsuccessful status",n),t(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",e=>{ov&&cv.warn("Failed to load Replay compression worker",e),t(new Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})})),this._ensureReadyPromise}destroy(){ov&&cv.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(e=>e.reject(new lv)),this._pending.clear(),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise((r,o)=>{this._pending.set(n,{method:e,resolve:r,reject:o});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),o(e)}})}_getAndIncrementId(){return this._id++}}class fv{constructor(e){this._worker=new pv(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=C_(e.timestamp);(!this._earliestTimestamp||tpg?Promise.reject(new uv):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{ov&&cv.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class hv{constructor(e){this._fallback=new dv,this._compression=new fv(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(ov&&cv.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){if(e instanceof lv)return;ov&&cv.exception(e,"Failed to add events when switching buffers.")}}}function mv({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=new Blob(['var t=Uint8Array,r=Uint16Array,n=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new r(31),s=0;s<31;++s)i[s]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,n,e){for(var i=t.length,s=0,a=new r(n);s>f]=l}else for(o=new r(i),s=0;s>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(r,n,e){return(null==e||e>r.length)&&(e=r.length),new t(r.subarray(n,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,r,n){var e=new Error(r||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!n)throw e;return e},z=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8},_=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8,t[e+2]|=n>>16},x=function(n,e){for(var i=[],s=0;sd&&(d=o[s].s);var p=new r(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<e))break;w+=m-(1<>=y;w>0;){var M=o[s].s;p[M]=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,r,n){return-1==t.s?Math.max(A(t.l,r,n+1),A(t.r,r,n+1)):r[t.s]=n},D=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new r(++n),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=n;++h)if(t[h]==s&&h!=n)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:n}},T=function(t,r){for(var n=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(n,m,t.subarray(c,c+v));if(z(n,m,1+(X15&&(z(n,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B255){_(n,m,N[(rt=nt>>18&31)+257]),m+=P[rt+257],rt>7&&(z(n,m,nt>>23&31),m+=e[rt]);var et=31&nt;_(n,m,Q[et]),m+=R[et],et>3&&(_(n,m,nt>>5&8191),m+=i[et])}else _(n,m,N[nt]),m+=P[nt]}return _(n,m,N[256]),m+P[256]},C=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),r=0;r<256;++r){for(var n=r,e=9;--e;)n=(1&n&&-306674912)^n>>>1;t[r]=n}return t}(),S=function(){var t=1,r=0;return{p:function(n){for(var e=t,i=r,s=0|n.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a>16),i=(65535&i)+15*(i>>16)}t=e,r=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(r%=65521))<<8|r>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),rt=0;for(P=0;Prt&&(rt=et,K=nt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,r,n){for(;n;++r)t[r]=n,n>>>=8},j=function(){function r(r,n){if("function"==typeof r&&(n=r,r={}),this.ondata=n,this.o=r||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return r.prototype.p=function(t,r){this.ondata(L(t,this.o,0,0,this.s),r)},r.prototype.push=function(r,n){this.ondata||E(5),this.s.l&&E(4);var e=r.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(r.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(r.subarray(s),32768),this.s.z=r.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(r,this.s.z),this.s.z+=r.length;this.s.l=1&n,(this.s.z>this.s.w+8191||n)&&(this.p(this.b,n||!1),this.s.w=this.s.i,this.s.i-=2),n&&(this.s=this.o={},this.b=F)},r.prototype.flush=function(r){if(this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,r){var n=new t(6);n[0]=this.s.r>>3;var e=k(n,this.s.r,F);this.s.r=0,this.ondata(n.subarray(0,e>>3),!1)}},r}();function q(t,r){r||(r={});var n=function(){var t=-1;return{p:function(r){for(var n=t,e=0;e>>8;t=n},d:function(){return~t}}}(),e=t.length;n.p(t);var i,s=L(t,r,10+((i=r).filename?i.filename.length+1:0),8),a=s.length;return function(t,r){var n=r.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=r.level<2?4:9==r.level?2:0,t[9]=3,0!=r.mtime&&O(t,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),n){t[3]=8;for(var e=0;e<=n.length;++e)t[e+10]=n.charCodeAt(e)}}(s,r),O(s,a-8,n.d()),O(s,a-4,e),s}var B=function(){function t(t,r){this.c=S(),this.v=1,j.call(this,t,r)}return t.prototype.push=function(t,r){this.c.p(t),j.prototype.push.call(this,t,r)},t.prototype.p=function(t,r){var n=L(t,this.o,this.v&&(this.o.dictionary?6:2),r&&4,this.s);this.v&&(function(t,r){var n=r.level,e=0==n?0:n<6?1:9==n?3:2;if(t[0]=120,t[1]=e<<6|(r.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,r.dictionary){var i=S();i.p(r.dictionary),O(t,2,i.d())}}(n,this.o),this.v=0),r&&O(n,n.length-4,this.c.d()),this.ondata(n,r)},t.prototype.flush=function(t){j.prototype.flush.call(this,t)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,r){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=r||!1)},t}();function K(r,n){if(G)return G.encode(r);for(var e=r.length,i=new t(r.length+(r.length>>1)),s=0,a=function(t){i[s++]=t},o=0;oi.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=r.charCodeAt(o);f<128||n?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&r.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const r=this._hasEvents?",":"";this.stream.push(r+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let r=0;for(const n of t)r+=n.length;const n=new Uint8Array(r);for(let r=0,e=0,i=t.length;r{this._deflatedData.push(t)},this.stream=new J((t,r)=>{this.deflate.push(t,r)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const r=t.data.method,n=t.data.id,e=t.data.arg;if(r in P&&"function"==typeof P[r])try{const t=P[r](e);postMessage({id:n,method:r,success:!0,response:t})}catch(t){postMessage({id:n,method:r,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});'],{type:"text/javascript"});return URL.createObjectURL(e)}();return""}();if(!t)return;ov&&cv.log("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new hv(n)}catch(e){ov&&cv.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return ov&&cv.log("Using simple buffer"),new dv}function gv(){try{return"sessionStorage"in ag&&!!ag.sessionStorage}catch{return!1}}function yv(e){!function(){if(!gv())return;try{ag.sessionStorage.removeItem(cg)}catch{}}(),e.session=void 0}function _v(e){return void 0!==e&&Math.random()e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(ov&&cv.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function Cv(e,t,n){const r=e.getContext();t&&r.traceIds.size<100&&r.traceIds.add(t),n&&r.segmentNames.size<100&&r.segmentNames.add(n)}function Rv(e){return!e.type}function Mv(e){return"transaction"===e.type}function Ov(e){return"feedback"===e.type}function Av(e){return(t,n)=>{if(!e.isEnabled()||!Rv(t)&&!Mv(t))return;const r=n.statusCode;!r||r<200||r>=300||(Mv(t)?function(e,t){Cv(e,t.contexts?.trace?.trace_id,t.transaction)}(e,t):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();if("function"==typeof r&&!r(t))return;mh(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t))}}function Lv(e){return t=>{e.isEnabled()&&Rv(t)&&function(e,t){const n=t.exception?.values?.[0]?.value;if("string"!=typeof n)return;if(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){M_(e,U_({category:"replay.hydrate-error",data:{url:Ff()}}))}}(e,t)}}function Pv(e){const t=it();t&&t.on("beforeAddBreadcrumb",t=>function(e,t){if(!e.isEnabled()||!Dv(t))return;const n=function(e){if(!Dv(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(e){const t=e.data?.arguments;if(!Array.isArray(t)||0===t.length)return U_(e);let n=!1;const r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>dg?(n=!0,`${e.slice(0,dg)}…`):e;if("object"==typeof e)try{const t=ce(e,7);return JSON.stringify(t).length>dg?(n=!0,`${JSON.stringify(t,null,2).slice(0,dg)}…`):t}catch{}return e});return U_({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return U_(e)}(t);n&&M_(e,n)}(e,t))}function Dv(e){return!!e.category}function Nv(){const e=nt().getPropagationContext().dsc;e&&delete e.replay_id;const t=gr();if(t){delete Br(t).replay_id}}function $v(e){const t=nt().getPropagationContext().dsc;t&&(t.replay_id=e);const n=gr();if(n){Br(n).replay_id=e}}function Fv(e){return Object.assign((t,n)=>{if(e.session&&kv(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Nv(),!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!Rv(t)&&!Mv(t)&&!Ov(t))return t;if(!e.checkAndHandleExpiredSession())return Nv(),t;if(Ov(t)){const n=e.getSessionId(),r=t.contexts.feedback.replay_id;return r&&r!==n||(e.flush(),t.contexts.feedback.replay_id=n,function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:Oy.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t)),t}if(function(e,t){return!(e.type||!e.exception?.values?.length||!t.originalException?.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return ov&&cv.log("Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==ug&&!(!t.exception||t.type)&&_v(e.getOptions().errorSampleRate)}(e,t);if((r||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&"buffer"===e.recordingMode&&"buffer"===e.session?.sampled){const t=e.session;t.dirty=!0,e.getOptions().stickySession&&vv(t)}return t},{id:"Replay"})}function Bv(e,t){return t.map(({type:t,start:n,end:r,name:o,data:s})=>{const i=e.throttledAddEvent({type:Oy.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof i?Promise.resolve(null):i})}function jv(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Bv(e,[n]),!1)))}}function Uv(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!ov||!e.getOptions()._experiments.traceInternals)&&Ca(t,it())}(e,t.name)||e.addUpdate(()=>(Bv(e,[t]),!0)))}function zv(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=bh(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function qv(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Wv(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Hv(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function Gv(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Jv(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>lg,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,lg);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Vv(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function Kv(e,t){const n=function(e,t=ag.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ag.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;if(!e.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(e);return ge(n,t)}async function Yv(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=Kv(i,n.networkDetailAllowUrls)&&!Kv(i,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?function(e,t){if(1===e.length&&"string"!=typeof e[0])return Qv(e[0],t);if(2===e.length)return Qv(e[1],t);return{}}(n,t):{};if(!e)return Jv(o,r,void 0);const s=wh(n),[i,a]=Sh(s,cv),c=Jv(o,r,i);if(a)return Wv(c,a);return c}(n,t.input,u):Gv(u),f=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return Gv(o);const s=r?Xv(r.headers,n):{};if(!r||!t&&void 0!==o)return Jv(s,o,void 0);const[i,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){ov&&cv.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const r=mh(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(ov&&cv.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(ov&&cv.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(r),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&void 0===n?zv(e):n;return r?Jv(o,s,t?e:void 0):Gv(s)}catch(e){return ov&&cv.exception(e,"Failed to serialize response body"),Jv(o,n,void 0)}}(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});if(a)return Wv(c,a);return c}(d,n,t.response,l);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:f}}(e,t,n),o=Hv("resource.fetch",r);Uv(n.replay,o)}catch(e){ov&&cv.exception(e,"Failed to capture fetch breadcrumb")}}function Xv(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function Qv(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Xv(n,t):Array.isArray(n)?{}:Vv(n,t):{}}async function Zv(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!Kv(c,n.networkDetailAllowUrls)||Kv(c,n.networkDetailDenyUrls)){return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:Gv(d),response:Gv(p)}}const f=a[gh],h=f?Vv(f.request_headers,n.networkRequestHeaders):{},m=Vv(kh(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?Sh(i,cv):[void 0],[_,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&z(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return ov&&cv.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return ov&&cv.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return ov&&cv.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],b=Jv(h,d,g),S=Jv(m,p,_);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:y?Wv(b,y):b,response:v?Wv(S,v):S}}(e,t,n),o=Hv("resource.xhr",r);Uv(n.replay,o)}catch(e){ov&&cv.exception(e,"Failed to capture xhr breadcrumb")}}function eb(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=zv(r),s=n.getResponseHeader("content-length")?qv(n.getResponseHeader("content-length")):function(e,t){try{return zv("json"===t&&z(e)?JSON.stringify(e):e)}catch{return}}(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}function tb(e){const t=it();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e?.xhr}(n)&&(eb(t,n),Zv(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return void 0!==e?.input}(n)&&(!function(e,t){const{input:n,response:r}=t,o=zv(n?wh(n):void 0),s=r?qv(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),Yv(t,n,e))}catch(e){ov&&cv.exception(e,"Error when enriching network breadcrumb")}}(a,e,t))}catch{}}function nb(e){const t=it();ch(G_(e)),dh(jv(e)),Pv(e),tb(e);if(ri(Fv(e)),t){let n;t.on("beforeSendEvent",Lv(e)),t.on("afterSendEvent",Av(e)),t.on("createDsc",t=>{const n=e.getSessionId();if(n&&e.isEnabled()&&"session"===e.recordingMode){e.checkAndHandleExpiredSession()&&(t.replay_id=n)}}),t.on("processSegmentSpan",function(e){return t=>{e.isEnabled()&&Cv(e,t.trace_id,t.name||void 0)}}(e)),t.on("spanStart",t=>{e.lastActiveSpan=t}),t.on("spanEnd",t=>{e.lastActiveSpan=t}),t.on("beforeSendFeedback",async(t,r)=>{const o=t.contexts?.feedback;if(!r?.includeReplay||!o)return;if("widget"===o.source&&n)return o.replay_id=n,void(n=void 0);const s=e.getSessionId();e.isEnabled()&&s&&("api"===o.source&&await e.sendBufferedReplayOrFlush(),o.replay_id=s)}),t.on("openFeedbackWidget",async()=>{n=void 0,await e.sendBufferedReplayOrFlush(),n=e.isEnabled()?e.getSessionId():void 0})}}function rb(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function ob(e,t,n){return function(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){void 0!==o&&clearTimeout(o),void 0!==s&&clearTimeout(s),o=s=void 0}function l(){return o&&clearTimeout(o),o=a(c,t),i&&void 0===s&&(s=a(c,i)),r}return l.cancel=u,l.flush=function(){return void 0!==o||void 0!==s?c():r},l}(e,t,{...n,setTimeoutImpl:mh})}const sb=t.navigator;function ib(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession())return void(ov&&cv.warn("Received replay event after session expired."));const o=r||!t;t=!0,function(e){const t=e.data;if(!(e.type===Oy.IncrementalSnapshot&&t&&"object"==typeof t&&"source"in t&&t.source===Ay.Mutation&&"attributes"in t&&Array.isArray(t.attributes)))return;for(const e of t.attributes){const t=x_.mirror.getNode(e.id),n=t&&x_.mirror.getMeta(t);if(!t||n?.type!==z_.Element)continue;const r={...n.attributes};let o=!1;for(const[t,n]of Object.entries(e.attributes))W_.has(t)&&(null===n?delete r[t]:r[t]=n,o=!0);o&&x_.mirror.add(t,{...n,attributes:r})}}(n),e.clickDetector&&j_(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!xv(e,n,o))return!0;if(!o)return!1;const t=e.session;if(function(e,t){if(!t||0!==e.session?.segmentId)return;xv(e,function(e){const t=e.getOptions();return{type:Oy.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),"buffer"===e.recordingMode&&t&&e.eventBuffer&&!t.dirty){const n=e.eventBuffer.getEarliestTimestamp();n&&(ov&&cv.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&vv(t))}return t?.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}catch(t){e.handleException(t)}}}async function ab({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,segmentNames:l,initialTimestamp:d}=r,p=it(),f=nt(),h=p?.getTransport(),m=p?.getDsn();if(!(p&&h&&m&&s.sampled))return Promise.resolve({});const g={type:"replay_event",replay_start_timestamp:d/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,segment_names:l,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},y=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const s=await Vs(e.getOptions(),r,o,t,e,rt());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c,settings:u}=i?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},s}({scope:f,client:p,replayId:t,event:g});if(!y)return ov&&cv.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const _=function(e,t,n,r){return to(fo(e,po(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(y,i,m,p.getOptions().tunnel);let v;try{v=await h.send(_)}catch(e){const t=new Error(ug);try{t.cause=e}catch{}throw t}const b=Di({},v);if(Pi(b,"replay"))throw new ub(b);if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new cb(v.statusCode);return v}class cb extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class ub extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}class lb extends Error{constructor(){super("Session is too long, not sending replay")}}async function db(e,t={count:0,interval:5e3}){const{recordingData:n,onError:r}=e;if(n.length)try{return await ab(e),!0}catch(n){if(n instanceof cb||n instanceof ub)throw n;if(ei("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${ug} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{mh(async()=>{try{await db(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}const pb="__THROTTLED";function fb(e,t,n){const r=new Map;let o=!1;return(...s)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach((e,n)=>{ne+t,0)>=t){const e=o;return o=!0,e?"__SKIPPED":pb}o=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...s)}}class hb{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=ob(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=fb((e,t)=>function(e,t,n){return Iv(e,t)?Tv(e,t,n):Promise.resolve(null)}(this,e,t),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new $_(this,o)),ov){const t=e._experiments;cv.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===ag.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const e=U_({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{const e=U_({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{V_(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}getMaskAttributeFn(){return this._recordingOptions.maskAttributeFn}handleException(e){ov&&cv.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",ov&&cv.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):ov&&cv.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(ov&&cv.log("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(ov&&cv.log("Buffering is in progress, call `flush()` to save the replay"));ov&&cv.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Ev({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(ov&&cv.log("Buffering is in progress, call `flush()` to save the replay"));ov&&cv.infoTick("Starting replay in buffer mode");const e=Ev({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=x_({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:ib(this),.../iPhone|iPad|iPod/i.test(sb?.userAgent??"")||/Macintosh/i.test(sb?.userAgent??"")&&sb?.maxTouchPoints&&sb?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const n=t??"manual";it()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{ov&&cv.log(`Stopping Replay triggered by ${n}`),Nv(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,yv(this)}catch(e){this.handleException(e)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),ov&&cv.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),ov&&cv.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();ov&&cv.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession(),$v(this.session.id)),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!e||!1!==this.session?.sampled)return this.session?.id}checkAndHandleExpiredSession(){if(!this._lastActivity||!wv(this._lastActivity,this.timeouts.sessionIdlePause)||"session"!==this.session?.sampled)return!!this._checkSession();this.pause()}setInitialState(){const e=`${ag.location.pathname}${ag.location.hash}${ag.location.search}`,t=`${ag.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===pb){const e=U_({category:"replay.throttled"});this.addUpdate(()=>!xv(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||gr(),t=e&&fr(e);if(!t)return;const n=er(t),r=n.attributes["sentry.segment.name.source"];return r&&["route","custom"].includes(r)?n.name:void 0}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=mv({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&it()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),"session"===this.recordingMode&&this.session&&$v(this.session.id)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Ev({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!kv(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(e.id))}_addListeners(){try{ag.document.addEventListener("visibilitychange",this._handleVisibilityChange),ag.addEventListener("blur",this._handleWindowBlur),ag.addEventListener("focus",this._handleWindowFocus),ag.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(nb(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(e=>{r.push(Ip(e,n))}),r.push(xp(Y_(Z_,e)),Ep(Y_(tv,e)),Tp(Y_(nv,e))),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{ag.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ag.removeEventListener("blur",this._handleWindowBlur),ag.removeEventListener("focus",this._handleWindowFocus),ag.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;kv(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})?Nv():(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):ov&&cv.log("Document has become active, but session has expired")}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:Oy.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(X_).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(Bv(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&nthis._options.maxReplayDuration+3e4)throw new lb;const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await db({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendError"});const t=it();if(t){let n;n=e instanceof ub?"ratelimit_backoff":e instanceof lb?"invalid":"send_error",t.recordDroppedEvent(n,"replay")}}}else ov&&cv.error("No session or eventBuffer found to flush.")}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(ov&&cv.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=nthis._options.maxReplayDuration+5e3;if(r||o)return ov&&cv.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const s=this.eventBuffer;s&&0===this.session.segmentId&&!s.hasCheckout&&ov&&cv.log("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&vv(this.session)}_onMutationHandler(e){const{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{const n=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e.target),r=t.join(",");return n?.matches(r)}))return!1;const n=e.length,r=this._options.mutationLimit,o=r&&n>r;if(n>this._options.mutationBreadcrumbLimit||o){const e=U_({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(e)}return!o||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function mb(e,t){return[...e,...t].join(",")}const gb='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',yb=["content-length","content-type","accept"],_b=Symbol.for("sentry__originalRequestBody");let vb=!1,bb=!1;class Sb{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:s=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:f=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:_=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder","aria-label"],unmask:w=[],block:k=[],unblock:E=[],ignore:x=[],maskFn:T,beforeAddRecordingEvent:I,beforeErrorSampling:C,onError:R,attachRawBodyFromRequest:M=!1}={}){this.name="Replay";const O=function({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:mb(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:mb(t,[]),blockSelector:mb(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:mb(r,[]),ignoreSelector:mb(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:b,unmask:w,block:k,unblock:E,ignore:x});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return s;const i=n.includes(t),a=r&&"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"");return i||a?s.replace(/[\S]/g,"*"):s}({maskAttributes:S,maskAllText:c,privacyOptions:O,key:e,value:t,el:n}),...O,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,5e4),maxReplayDuration:Math.min(r,fg),stickySession:o,useCompression:s,workerUrl:i,blockAllMedia:l,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:f,slowClickIgnoreSelectors:h,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:wb(_),networkResponseHeaders:wb(v),beforeAddRecordingEvent:I,beforeErrorSampling:C,onError:R,attachRawBodyFromRequest:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${gb}`:gb,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&go())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return vb}set _isInitialized(e){vb=e}afterAllSetup(e){go()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&function(){if("undefined"==typeof Request||bb)return;const e=Request;try{const n=function(t,n){const r=new e(t,n);return null!=n?.body&&(r[_b]=n.body),r};n.prototype=e.prototype,t.Request=n,bb=!0}catch{}}(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(e){return this._replay?this._replay.stop({forceFlush:e?.flush??"session"===this._replay.recordingMode,reason:"manual"}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(e){const t=this.getReplayId(!0);t&&(Xr(e,{"sentry.replay_id":t}),"buffer"===this.getRecordingMode()&&Xr(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=function(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=Bn(n.replaysSessionSampleRate),s=Bn(n.replaysOnErrorSampleRate);null==o&&null==s&&c(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")});null!=o&&(r.sessionSampleRate=o);null!=s&&(r.errorSampleRate=s);return r}(this._initialOptions,e);this._replay=new hb({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function wb(e){return[...yb,...e.map(e=>e.toLowerCase())]}var kb=Object.defineProperty,Eb=(e,t,n)=>((e,t,n)=>t in e?kb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);class xb{constructor(){Eb(this,"idNodeMap",new Map),Eb(this,"nodeMetaMap",new WeakMap)}getId(e){if(!e)return-1;const t=this.getMeta(e)?.id;return t??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e)),function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot&&this.removeNodeFromMap(e.shadowRoot)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Tb(e,t,n=1/0,r=0){return e?function(e){const t=e?.host;return Boolean(t?.shadowRoot===e)}(e)?Tb(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Tb(e.parentNode,t,n,r+1):-1}function Ib(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}const Cb="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Rb={map:{},getId:()=>(console.error(Cb),-1),getNode:()=>(console.error(Cb),null),removeNodeFromMap(){console.error(Cb)},has:()=>(console.error(Cb),!1),reset(){console.error(Cb)}};function Mb(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){Nb(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>Mb(e,t,s||{},!0)}function Ob(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function Ab(e,t,n,r,o){if(!e)return!1;const s=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}(e);if(!s)return!1;const i=Tb(s,Ib(t,n));let a=-1;return!(i<0)&&(r&&(a=Tb(s,Ib(null,r))),i>-1&&a<0||i("map"===t&&console.error(Cb),Reflect.get(e,t,n))})),Date.now().toString();const Lb={};function Pb(e){const t=Lb[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&"function"==typeof o.createElement)try{const t=o.createElement("iframe");t.hidden=!0,o.head.appendChild(t);const s=t.contentWindow;if(s&&s[e]){const t=s[e].bind(window);r=(...r)=>{try{return t(...r)}catch{return Lb[e]=n,n(...r)}}}o.head.removeChild(t)}catch(e){}return Lb[e]=r}function Db(...e){return Pb("requestAnimationFrame")(...e)}function Nb(...e){return Pb("setTimeout")(...e)}var $b=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))($b||{});let Fb;const Bb=e=>{if(!Fb)return e;return(...t)=>{try{return e(...t)}catch(e){if(Fb&&!0===Fb(e))return()=>{};throw e}}};for(var jb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ub="undefined"==typeof Uint8Array?[]:new Uint8Array(256),zb=0;zb<64;zb++)Ub[jb.charCodeAt(zb)]=zb;const qb=new Map;const Wb=(e,t,n)=>{if(!e||!Jb(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=qb.get(e);return n||(n=new Map,qb.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function Hb(e,t,n){if(e instanceof Array)return e.map(e=>Hb(e,t,n));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t>2],o+=jb[(3&n[t])<<4|n[t+1]>>4],o+=jb[(15&n[t+1])<<2|n[t+2]>>6],o+=jb[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Hb(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Hb(e.data,t,n),e.width,e.height]}}if(Jb(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Wb(e,t,n)}}return e}const Gb=(e,t,n)=>e.map(e=>Hb(e,t,n)),Jb=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(n.find(n=>e instanceof t[n]))};function Vb(e,t,n,r,o){const s=[];try{const i=Ob(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(s,...i){if(!Ab(this,t,n,r)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(s);if("__context"in this||(this.__context=e),o&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[s,...i])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(e=>e())}}function Kb(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const i of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if("function"!=typeof e[i])continue;const u=Ob(e,i,function(e){return function(...c){const u=e.apply(this,c);if(Wb(u,a,this),"tagName"in this.canvas&&!Ab(this.canvas,r,o,s)){const e=Gb(c,a,this),r={type:t,property:i,args:e};n(this.canvas,r)}return u}});c.push(u)}catch{const r=Mb(e,i,{set(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});c.push(r)}return c}class Yb{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{enableManualSnapshot:t,sampling:n="all",win:r,recordCanvas:o,errorHandler:s}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,s&&(Fb=s),(o&&"number"==typeof n||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),t||Bb(()=>{o&&"all"===n&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&"number"==typeof n&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){const{sampling:t="all",blockClass:n,blockSelector:r,unblockSelector:o,recordCanvas:s,enableManualSnapshot:i}=this.options;if(!this.windowsSet.has(e)){if(i)return this.windowsSet.add(e),void this.windows.push(new WeakRef(e));Bb(()=>{if(s&&"all"===t&&this.initCanvasMutationObserver(e,n,r,o),s&&"number"==typeof t){const t=Vb(e,n,r,o,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){t?.skipRequestAnimationFrame?this.takeSnapshot(performance.now(),e):Db(t=>this.takeSnapshot(t,e))}initFPSWorker(){const e=new Worker(function(){const e=new Blob(['for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};']);return URL.createObjectURL(e)}());return e.onmessage=e=>{const t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!("base64"in t))return;const{base64:r,type:o,width:s,height:i}=t;this.mutationCb({id:n,type:$b["2D"],commands:[{property:"clearRect",args:[0,0,s,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:o}]},0,0,s,i]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;const t=n=>{this.takeSnapshot(n),e=Db(t)};e=Db(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){const o=Vb(e,t,n,r,!1),s=function(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])continue;const i=Ob(t.CanvasRenderingContext2D.prototype,a,function(s){return function(...i){return Ab(this.canvas,n,r,o)||Nb(()=>{const n=Gb(i,t,this);e(this.canvas,{type:$b["2D"],property:a,args:n})},0),s.apply(this,i)}});s.push(i)}catch{const n=Mb(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:$b["2D"],property:a,args:[t],setter:!0})}});s.push(n)}return()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r),i=function(e,t,n,r,o){const s=[];return s.push(...Kb(t.WebGLRenderingContext.prototype,$b.WebGL,e,n,r,o,0,t)),void 0!==t.WebGL2RenderingContext&&s.push(...Kb(t.WebGL2RenderingContext.prototype,$b.WebGL2,e,n,r,o,0,t)),()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{o(),s(),i()})}getCanvasElements(e,t,n){const r=[],o=o=>{o.querySelectorAll("canvas").forEach(o=>{Ab(o,e,t,n)||r.push(o)})};for(const e of this.windows){const t=e.deref();let n;try{n=t&&t.document}catch{}n&&o(n)}for(const e of this.shadowDoms){const t=e.deref();t&&o(t)}return r}takeSnapshot(e,t){const{sampling:n,blockClass:r,blockSelector:o,unblockSelector:s,dataURLOptions:i,maxCanvasSize:a}=this.options,c=1e3/("all"===n?2:n||2);if(this.lastSnapshotTime&&e-this.lastSnapshotTime{const t=this.mirror.getId(e);this.mirror.hasNode(e)&&e.width&&e.height&&!this.snapshotInProgressMap.get(t)&&(this.snapshotInProgressMap.set(t,!0),createImageBitmap(e).then(n=>{this.worker?.postMessage({id:t,bitmap:n,width:e.width,height:e.height,dataURLOptions:i,maxCanvasSize:a},[n])}).catch(e=>{Bb(()=>{throw this.snapshotInProgressMap.delete(t),e})()}))}),!0}startPendingCanvasMutationFlusher(){Db(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,Db(e)};Db(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),Db(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map(e=>{const{type:t,...n}=e;return n}),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Xb;new xb,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Xb||(Xb={}));const Qb={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},Zb=1280,eS=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Zb):Zb,n?Math.min(n,Zb):Zb]};let o,s;const i=new Promise(e=>s=e);return{name:"ReplayCanvas",getOptions(){const{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{const r=new Yb({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{"object"==typeof e&&(e.__rrweb__=!0)}catch{}}});return o=r,s(r),r},...Qb[e]||Qb.medium}},async snapshot(e,t){(o||await i).snapshot(e,t)}}};function tS(e){try{return new URL(e,Eh.location?.href).href}catch{return}}function nS(e){try{return new Headers(e)}catch{return}}const rS={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function oS(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:i,onRequestSpanStart:a,onRequestSpanEnd:c}={...rS,...t},u="function"==typeof o?o:e=>!0,l=e=>function(e,t){const n=Ff();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?$a(r.toString(),t)||s&&$a(r.pathname,t):s}{const n=!!e.match(/^\/(?!\/)/);return t?$a(e,t):n}}(e,i),d={},p=e.getOptions().propagateTraceparent;n&&iu(t=>{const n=eu(t,u,l,d,{propagateTraceparent:p,onRequestSpanEnd:c,urlBase:Eh.location?.href});if(n){const r=tS(t.fetchData.url),o=r?xa(r).host?.replace(/^.*@/,""):void 0,i=r?Ia(r):void 0;n.setAttributes({[tn]:ya(i),[Xt]:o}),s&&iS(n,e),a?.(n,{headers:t.headers})}}),r&&yh(t=>{const n=function(e,t,n,r,o,s){const i=e.xhr,a=i?.[gh];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,l=br()&&t(c);if(e.endTimestamp){const t=i.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&(l&&void 0!==a.status_code&&(vn(n,a.status_code),n.end(),s?.(n,{headers:nS(kh(i)),error:e.error})),delete r[t]))}const d=tS(c),p=xa(d||c),f=d?Ia(d):void 0,h=Ia(Ta(c)),m=it(),g=!!gr(),y=g||!!m&&Zr(m),_=p?.host?.replace(/^.*@/,""),v=Ea(d||c),b=v?`${u} ${v}`:u,S=l&&y?Zo({name:m&&Zr(m)?b:`${u} ${h}`,attributes:{type:"xhr",[wt]:u,[tn]:ya(f),[Xt]:_,[Zt]:v,[Ft]:"auto.http.browser",[$t]:Ts,[rn]:_a(wa(p?.search)),[en]:ka(p?.hash)}}):new Lr,w=Ko(S)&&g?void 0:S;l&&!y&&m?.recordDroppedEvent("no_parent_span","span");i.__sentry_xhr_span_id__=S.spanContext().spanId,r[i.__sentry_xhr_span_id__]=S,n(c)&&function(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=Pa({span:t,propagateTraceparent:n});r&&function(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(o?.["sentry-trace"]||!e.setRequestHeader)return;try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const t=o?.baggage;t&&t.split(",").some(e=>e.trim().startsWith("sentry-"))||e.setRequestHeader("baggage",n)}}catch{}}(e,r,o,s)}(i,br()&&y?w:void 0,o);m&&m.emit("beforeOutgoingRequestSpan",S,e);return S}(t,u,l,d,p,c);n&&(s&&iS(n,e),a?.(n,{headers:nS(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}const sS=300;function iS(e,t){const n=er(e).attributes[tn];if(!n||"string"!=typeof n)return;let r=()=>{setTimeout(o)};if(Zr(t)){const t=e.end.bind(e);e.end=e=>{const n=e??Oe();let s=!1;const i=()=>{s||(s=!0,setTimeout(o),t(n),clearTimeout(a))};r=i;const a=setTimeout(i,sS)}}const o=Ip("resource",({entries:t})=>{t.forEach(t=>{(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)})(t)&&t.name.endsWith(n)&&(e.setAttributes(Zp(t)),r())})})}const aS="WebVitals",cS=(e={})=>{const{ignore:t=[],softNavigations:n=!0,bfcacheNavigations:r=!0}=e,o=new Set(t);return{name:aS,setup(e){const t=Zr(e),s=n&&t&&Jp(),i=r&&t,a=s||i;s&&(wp=!0,function(e){if(Hp||!Jp())return;Hp=!0;const t=e=>{e.isTrusted&&(zp=e.timeStamp)};Bp.addEventListener("click",t,{capture:!0,passive:!0}),Bp.addEventListener("keydown",t,{capture:!0,passive:!0}),e.on("spanStart",e=>{if("navigation"!==er(e).attributes?.[$t])return;jp=void 0;const t=zp;return null!=t?Up?.interactionTimestamp===t?(qp.set(Up.interactionId,e),void(Up=void 0)):void(jp={span:e,interactionTimestamp:t}):void 0});const n=({entries:e})=>{for(const t of e){if(!Fp(t)||!t.interactionId)continue;const e=jp;e&&Gp(t.startTime,e.interactionTimestamp)?(qp.set(t.interactionId,e.span),jp=void 0):qp.get(t.interactionId)||null!=zp&&Gp(t.startTime,zp)&&(Up={interactionId:t.interactionId,interactionTimestamp:zp})}};Ip("event",n),Ip("first-input",n),Ip("soft-navigation",({entries:e})=>{for(const t of e){const e=qp.get(t.interactionId);e?(Wp.set(t.navigationId,e),e.setAttribute(pt,t.navigationId)):fp&&p.log(`[SoftNav] No navigation span found for soft navigation ${t.navigationId}`,t)}})}(e)),i&&(kp=!0);const c=!t&&!o.has("cls"),u=!t&&!o.has("lcp"),l=Ef({trackCls:c,trackLcp:u}),d=new WeakSet;e.on("afterStartPageLoadSpan",e=>{d.add(e)}),e.on("spanEnd",e=>{d.delete(e)&&(l(),xf(e,{recordClsOnPageloadSpan:c,recordLcpOnPageloadSpan:u,spanStreamingEnabled:t}))}),t&&(o.has("lcp")||function(e,t=!1){if(!Qp("largest-contentful-paint"))return;if(t)return void Xf(e,xp,(e,t,n)=>{const r=e.entries[e.entries.length-1];Qf(e.value,r,t,n,e.navigationType,e.navigationStartTime)});let n,r,o=0;const s=xp(({metric:e})=>{r=e.navigationType;const t=e.entries[e.entries.length-1];t&&df(e.value)&&(o=e.value,n=t)},!0);Vf(e,e=>{Qf(o,n,e,void 0,r),s()})}(e,a),o.has("cls")||function(e,t=!1){if(!Qp("layout-shift"))return;if(t)return void Xf(e,Ep,(e,t,n)=>{const r=e.entries[e.entries.length-1];Zf(e.value,r,t,n,e.navigationType,e.navigationStartTime)});let n,r,o=0;const s=Ep(({metric:e})=>{r=e.navigationType;const t=e.entries[e.entries.length-1];t&&(o=e.value,n=t)},!0);Vf(e,e=>{Zf(o,n,e,void 0,r),s()})}(e,a)),o.has("inp")||function(e,t=!1){if(!Yp()||!Ae())return;const n=!Zr(e);if(t)return void Xf(e,Tp,(e,t,r)=>{eh(e)&&nh(e.value,th(e),n,t,r,e)});Tp(({metric:e})=>{eh(e)&&nh(e.value,th(e),n,void 0,void 0,e)})}(e,a)},afterAllSetup(){o.has("inp")||Lf()}}};const uS="sentry_previous_trace",lS="sentry.previous_trace";function dS(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r="session-storage"===t;let o=r?function(){try{const e=Eh.sessionStorage?.getItem(uS);return JSON.parse(e)}catch{return}}():void 0;e.on("spanStart",e=>{if(fr(e)!==e)return;const t=nt().getPropagationContext();o=function(e,t,n){const r=er(t);function o(){try{const e=Number(r.attributes[pn]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;if(i.traceId===r.trace_id)return e;Date.now()/1e3-e.startTimestamp<=3600&&(Xh&&p.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.attributes[$t],...t.spanContext()})}\``),t.addLink({context:i,attributes:{[Nt]:"previous_trace"}}),t.setAttribute(lS,`${i.traceId}-${i.spanId}-${pS(i)?1:0}`));return s}(o,e,t),r&&function(e){try{Eh.sessionStorage.setItem(uS,JSON.stringify(e))}catch(e){Xh&&p.warn("Could not store previous trace in sessionStorage",e)}}(o)});let s=!0;n&&e.on("beforeSampling",e=>{if(!o)return;const t=nt(),n=t.getPropagationContext();s&&n.parentSpanId?s=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(o.sampleRate),sampled:String(pS(o.spanContext))},sampleRand:o.sampleRand}),e.parentSampled=pS(o.spanContext),e.parentSampleRate=o.sampleRate,e.spanAttributes={...e.spanAttributes,[fn]:o.sampleRate})})}function pS(e){return 1===e.traceFlags}const fS={...es,instrumentNavigation:!0,instrumentBfcacheRestore:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,...rS};function hS(e,t,n){const r=t.name===Is;nt().setTransactionName(r?Eh.location?.pathname:t.name);const o=Ae(),s={...t,startTime:t.startTime??(o?o/1e3:void 0)};e.emit("startPageLoadSpan",s,n);const i=vS(e);return i&&e.emit("afterStartPageLoadSpan",i),i}function mS(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o,url:r}),e.emit("startNavigationSpan",t,{isRedirect:o,url:r});const s=nt(),i=t.name===Cs;return s.setTransactionName(i?r&&ba(r)?.pathname||Eh.location?.pathname:t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Rh(e),url:ya(r,e)}}),vS(e)}function gS(e){const t=Eh.document,n=t?.querySelector(`meta[name=${e}]`);return n?.getAttribute("content")||void 0}function yS(e){const t=Eh.performance?.getEntriesByType?.("navigation")[0],n=t?.serverTiming?.find(t=>t.name===e);return n?.description}const _S="_sentry_idleSpan";function vS(e){return e[_S]}function bS(e,t){K(e,_S,t)}const SS=1.5;const wS=new WeakMap,kS=new WeakMap,ES=["text/event-stream","application/x-ndjson","application/stream+json"],xS=()=>({name:"FetchStreamPerformance",setup(e){!function(e){const t="fetch-body-resolved",n=E(t,e);x(t,()=>au(cu))}(e=>{if(e.response){const t=wS.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=kS.get(e.response);n&&clearTimeout(n)}}}),iu(t=>{if(t.endTimestamp&&t.response){const n=t.response.headers?.get("content-type")||"";if(t.response.headers?.get("content-length")||!ES.some(e=>n.startsWith(e)))return;const r=t.fetchData?.url||"",o=t.fetchData?.method||"GET",s=ba(r),i=r.startsWith("data:")?Ia(r):s?Sa(s):r,a=Ea(r,Eh.location?.href),c=a?`${o} ${a}`:o,u=Zo({name:Zr(e)?c:`${o} ${i}`,startTime:t.endTimestamp,attributes:{[tn]:ya(Ia(r)),[Zt]:a,[wt]:o,type:"fetch",[$t]:"http.client.stream",[Ft]:"auto.http.browser.stream"}});wS.set(t.response,u);const l=setTimeout(()=>{u.isRecording()&&u.end()},9e4);kS.set(t.response,l)}})}}),TS="BfcacheMetrics",IS=(e={})=>{const t=function(e){if(null==e)return 1/0;if(e<1)return Xh&&p.warn(`[${TS}] \`maxReasons\` must be at least 1, got ${e}. Using 1 instead.`),1;return e}(e.maxReasons);return{name:TS,setupOnce(){Eh.addEventListener&&Eh.performance?.getEntriesByType?Eh.addEventListener("pageshow",function(e){const n=zf()||nt().getScopeData().transactionName||Eh.location?.pathname;if(e.persisted)return void CS("hit",0,n);const r=Eh.performance.getEntriesByType("navigation")[0];if("back_forward"!==r?.type)return;const o=function(e,t){const n=[];if(!e||t<=0)return n;return RS(e,"top",n,t),n}(r.notRestoredReasons,t);CS("miss",o.length,n),"number"==typeof r.duration&&r.duration>0&&Eu("browser.bfcache.reload.duration",r.duration,{unit:"millisecond",attributes:MS({[Gt]:n})}),o.forEach(e=>function({reason:e,frame:t},n){ku("browser.bfcache.not_restored",1,{attributes:MS({[dt]:e,[ct]:t,[Gt]:n})})}(e,n))},!0):Xh&&p.log(`[${TS}] Browser APIs unavailable, skipping instrumentation.`)}}};function CS(e,t,n){ku("browser.bfcache.navigation",1,{attributes:MS({[lt]:e,[ut]:t||void 0,[Gt]:n})})}function RS(e,t,n,r){n.length>=r||(e.reasons?.forEach(e=>{if(n.length>=r)return;const o="string"==typeof e?e:e.reason;o&&n.push({reason:o,frame:t})}),e.children?.forEach(e=>{RS(e,"child",n,r)}))}function MS(e){return e[Ft]="auto.browser.bfcache",e}function OS(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function AS(e){return OS(e.getAllKeys())}function LS(e){let t;function n(){return null==t&&(t=function(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=OS(n);return e=>r.then(n=>e(n.transaction(t,"readwrite").objectStore(t)))}(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async t=>{try{const r=io(t);await function(e,t,n){return e(e=>AS(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),OS(e.transaction)}))}(n(),r,e.maxQueueSize||30)}catch{}},unshift:async t=>{try{const r=io(t);await function(e,t,n){return e(e=>AS(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.min(...r,0)-1),OS(e.transaction)}))}(n(),r,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const e=await function(e){return e(e=>AS(e).then(t=>{const n=t[0];if(null!=n)return OS(e.get(n)).then(t=>(e.delete(n),OS(e.transaction).then(()=>t)))}))}(n());if(e)return ao(e)}catch{}}}}const PS="window"in t&&t.window===t&&"undefined"==typeof importScripts,DS=String(0),NS=PS?"main":"worker";function $S(e,t,n){if(null==e)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=function(e){const t=[];for(let n=0;n1)||(Xh&&p.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${n}.`),0))?t?Math.random()<=t:(Xh&&p.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(Xh&&p.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1);var n}function US(e){e.setAttribute("thread.id",DS),e.setAttribute("thread.name",NS)}class zS{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(e){const t=e.getOptions().profileLifecycle,n=jS(e.getOptions());Xh&&p.log(`[Profiling] Initializing profiler (lifecycle='${t}').`),n||Xh&&p.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=ye(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,"trace"===t&&this._setupTraceLifecycleListeners(e),e.on("spanStart",e=>{this._isRunning&&US(e)})}start(){"trace"!==this._lifecycleMode?this._isRunning?Xh&&p.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op."):this._sessionSampled?this._beginProfiling():Xh&&p.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op."):Xh&&p.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.')}stop(){"trace"!==this._lifecycleMode?this._isRunning?this._endProfiling():Xh&&p.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op."):Xh&&p.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.')}notifyRootSpanActive(e){if("trace"!==this._lifecycleMode||!this._sessionSampled||!e.isRecording())return;const t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);const n=this._activeRootSpanIds.size;1===n&&(Xh&&p.log("[Profiling] Detected already active root span during setup. Active root spans now:",n),this._beginProfiling()),this._isRunning&&US(e)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,Xh&&p.log("[Profiling] Started profiling with profiler ID:",this._profilerId),ot().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler)return Xh&&p.log("[Profiling] Failed to start JS Profiler; stopping."),void this._resetProfilerInfo();this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{Xh&&p.error("[Profiling] Failed to collect current profile chunk on `stop()`:",e)}),"manual"===this._lifecycleMode&&ot().setContext("profile",{}))}_setupTraceLifecycleListeners(e){e.on("spanStart",e=>{if(!this._sessionSampled)return void(Xh&&p.log("[Profiling] Span not profiled because of negative sampling decision for user session."));if(e!==fr(e))return;if(!e.isRecording())return void(Xh&&p.log("[Profiling] Discarding profile because root span was not sampled."));const t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);const n=this._activeRootSpanIds.size;1===n&&(Xh&&p.log(`[Profiling] Root span ${t} started. Profiling active while there are active root spans (count=${n}).`),this._beginProfiling())}),e.on("spanEnd",e=>{if(!this._sessionSampled)return;const t=e.spanContext().spanId;if(!t||!this._activeRootSpanIds.has(t))return;this._activeRootSpanIds.delete(t);const n=this._activeRootSpanIds.size;Xh&&p.log(`[Profiling] Root span with ID ${t} ended. Will continue profiling for as long as there are active root spans (currently: ${n}).`),0===n&&(this._collectCurrentChunk().catch(e=>{Xh&&p.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",e)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,ot().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);const t=setTimeout(()=>this._onRootSpanTimeout(e),3e5);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){if(!1===this._profiler?.stopped)return;const e=function(){const e=Eh.Profiler;if("function"!=typeof e)return void(Xh&&p.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."));const t=Math.floor(3e3);try{return new e({sampleInterval:10,maxBufferSize:t})}catch{Xh&&(p.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),p.log("[Profiling] Disabling profiling for current user session.")),BS=!0}}();e?this._profiler=e:Xh&&p.log("[Profiling] Failed to start JS Profiler.")}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{Xh&&p.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",e)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler)return void this._resetProfilerInfo();this._startPeriodicChunking()}},6e4))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&(Xh&&p.log(`[Profiling] Reached 5-minute timeout for root span ${e}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(e),0===this._activeRootSpanIds.size&&this._endProfiling()))}async _collectCurrentChunk(){const e=this._profiler;if(this._profiler=void 0,e)try{const t=$S(await e.stop(),this._client,this._profilerId),n=function(e){try{if(!e||"object"!=typeof e)return{reason:"chunk is not an object"};const t=e=>"string"==typeof e&&/^[a-f0-9]{32}$/.test(e);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?Array.isArray(n.frames)&&n.frames.length?Array.isArray(n.stacks)&&n.stacks.length?Array.isArray(n.samples)&&n.samples.length?{valid:!0}:{reason:"profile has no samples"}:{reason:"profile has no stacks"}:{reason:"profile has no frames"}:{reason:"missing profile data"}}catch(e){return{reason:`unknown validation error: ${e}`}}}(t);if("reason"in n)return void(Xh&&p.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",n.reason));this._sendProfileChunk(t),Xh&&p.log("[Profiling] Collected browser profile chunk.")}catch(e){Xh&&p.log("[Profiling] Error while stopping JS Profiler for chunk:",e)}}_sendProfileChunk(e){const t=this._client,n=po(t.getSdkMetadata?.()),r=t.getDsn(),o=t.getOptions().tunnel,s=to({event_id:ye(),sent_at:(new Date).toISOString(),...n&&{sdk:n},...!!o&&r&&{dsn:Pn(r)}},[[{type:"profile_chunk",platform:"javascript"},e]]);t.sendEnvelope(s).then(null,e=>{Xh&&p.error("Error while sending profile chunk envelope:",e)})}}const qS=()=>({name:"BrowserProfiling",setup(e){const t=e.getOptions(),n=new zS;t.profileLifecycle||(t.profileLifecycle="manual");const r=gr(),o=r&&fr(r),s=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),"manual"===s)n.initialize(e);else if("trace"===s){if(!br(t))return void(Xh&&p.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing."));n.initialize(e),o&&n.notifyRootSpanActive(o),Eh.setTimeout(()=>{const e=gr(),t=e&&fr(e);t&&n.notifyRootSpanActive(t)},0)}}}),WS=[{op:Es,name:"#sentry-spotlight"},{op:Es,attributes:{[mt]:"#sentry-spotlight"}}];const HS=(e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:"SpotlightBrowser",setup:()=>{Xh&&p.log("Using Sidecar URL",t)},beforeSetup(e){const t=e.getOptions();t.ignoreSpans=[...t.ignoreSpans||[],...WS]},afterAllSetup:e=>{!function(e,t){const n=hh("fetch");let r=0;e.on("beforeEnvelope",e=>{r>3?p.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r):n(t,{method:"POST",body:io(e),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,p.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",e)})})}(e,t)}}},GS=()=>({name:"LaunchDarkly",processEvent:(e,t,n)=>Jc(e)});const JS=()=>({name:"OpenFeature",processEvent:(e,t,n)=>Jc(e)});const VS=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){V(e.prototype,"isEnabled",KS)},processEvent:(e,t,n)=>Jc(e)});function KS(e){return function(...t){const n=t[0],r=e.apply(this,t);return"string"==typeof n&&"boolean"==typeof r?(Vc(n,r),Kc(n,r)):Xh&&p.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const YS=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",e=>{Vc(e.gate.name,e.gate.value),Kc(e.gate.name,e.gate.value)})},processEvent:(e,t,n)=>Jc(e)});const XS=({worker:e})=>({name:"WebWorker",setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>QS(e))},addWorker:e=>QS(e)});function QS(e){const t=[];e.addEventListener("error",({message:e,filename:n,lineno:r,colno:o})=>{const s=t.findIndex(t=>t.message===e&&t.url===n&&t.lineno===r&&t.colno===o);var i;-1!==s&&(t.splice(0,s+1),i={msg:e,url:n,line:r,column:o},Th.push(i),setTimeout(()=>{const e=Th.indexOf(i);-1!==e&&Th.splice(e,1)}))}),e.addEventListener("message",e=>{if(function(e){if(!U(e)||!0!==e._sentryMessage)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;if(!(t||n||r||o))return!1;if(t&&!U(e._sentryDebugIds)&&void 0!==e._sentryDebugIds)return!1;if(n&&!U(e._sentryModuleMetadata)&&void 0!==e._sentryModuleMetadata)return!1;if(r&&!U(e._sentryWorkerError))return!1;if(o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(e=>U(e)&&"string"==typeof e.code_file)))return!1;return!0}(e.data)){if(e.stopImmediatePropagation(),e.data._sentryDebugIds&&(Xh&&p.log("Sentry debugId web worker message received",e.data),Eh._sentryDebugIds={...e.data._sentryDebugIds,...Eh._sentryDebugIds}),e.data._sentryModuleMetadata&&(Xh&&p.log("Sentry module metadata web worker message received",e.data),Eh._sentryModuleMetadata={...e.data._sentryModuleMetadata,...Eh._sentryModuleMetadata}),e.data._sentryWasmImages){Xh&&p.log("Sentry WASM images web worker message received",e.data);const t=Eh._sentryWasmImages||[],n=e.data._sentryWasmImages.filter(e=>U(e)&&"string"==typeof e.code_file&&!t.some(t=>t.code_file===e.code_file));Eh._sentryWasmImages=[...t,...n]}if(e.data._sentryWorkerError){Xh&&p.log("Sentry worker error message received",e.data._sentryWorkerError);const{kind:n,message:r,url:o,lineno:s,colno:i}=e.data._sentryWorkerError;"error"===n&&t.push({message:r,url:o,lineno:s,colno:i})>20&&t.shift(),function(e){const{reason:t,kind:n,name:r,filename:o,url:s,lineno:i,colno:a,plainError:c}=e,u="error"!==n,l=c&&U(t)?function(e){const t=new Error(String(e.message));return t.stack="string"==typeof e.stack?e.stack:void 0,t}(t):t;r&&P(l)&&l.name!==r&&K(l,"name",r);const d=it();if(!d)return;const{stackParser:f,attachStacktrace:h}=d.getOptions(),m=u&&j(l)?Rm(l):Gh(f,l,void 0,h,u);u||Mm(m,s||o,i,a);m.level="error",o&&(m.contexts={...m.contexts,worker:{filename:o}});Zs(m,{originalException:l,mechanism:{handled:!1,type:u?"auto.browser.web_worker.onunhandledrejection":"auto.browser.web_worker.onerror"}}),Xh&&p.log("Captured worker "+(u?"unhandled rejection":"error"),l)}(e.data._sentryWorkerError)}}})}var ZS=Object.freeze({__proto__:null,BrowserClient:Kh,MULTIPLEXED_TRANSPORT_EXTRA_KEY:ia,OpenFeatureIntegrationHook:class{after(e,t){Vc(t.flagKey,t.value),Kc(t.flagKey,t.value)}error(e,t,n){Vc(e.flagKey,e.defaultValue),Kc(e.flagKey,e.defaultValue)}},SDK_VERSION:n,SEMANTIC_ATTRIBUTE_SENTRY_OP:"sentry.op",SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:"sentry.origin",SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:pn,Scope:Fe,WINDOW:Eh,addBreadcrumb:Ba,addEventProcessor:ri,addIntegration:Mr,bfcacheMetricsIntegration:IS,bindScopeToEmitter:function(e,t=nt()){const n=e;if(ls(n))return e;us(n);for(const e of ns)"function"==typeof n[e]&&(n[e]=as(n,n[e],t));for(const e of rs)"function"==typeof n[e]&&(n[e]=cs(n,n[e]));return"function"==typeof n.removeAllListeners&&(n.removeAllListeners=function(e,t){return function(...n){const r=ls(e);if(r)if(0===n.length)us(e);else{const e=n[0];r.delete(e)}return t.apply(this,n)}}(n,n.removeAllListeners)),e},breadcrumbsIntegration:_m,browserApiErrorsIntegration:bm,browserProfilingIntegration:qS,browserSessionIntegration:Em,browserTracingIntegration:(e={})=>{"enableElementTiming"in e&&c(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const n=Eh.document,{enableInp:r,enableLongTask:o,enableLongAnimationFrame:s,webVitals:i,beforeStartSpan:a,idleTimeout:u,finalTimeout:l,childSpanTimeout:d,markBackgroundSpan:f,traceFetch:h,traceXHR:m,shouldCreateSpanForRequest:g,enableHTTPTimings:y,ignoreResourceSpans:_,instrumentPageLoad:v,instrumentNavigation:b,instrumentBfcacheRestore:S,detectRedirects:w,linkPreviousTrace:k,consistentTraceSampling:E,enableReportPageLoaded:x,onRequestSpanStart:T,onRequestSpanEnd:I}={...fS,...e},C=Df();let R,M;function O(e,t,r=!0,o){const s="pageload"===t.op,i=t.name,c=a?a(t):t,p=ba(o||Ff()),f={...p?.pathname&&{[nn]:p.pathname},...p&&!va(p)&&{[tn]:ya(p.href)},...c.attributes};if(i!==c.name&&(f[Jt]="custom"),c.attributes=f,!r){const e=xe();return void Zo({...c,startTime:e}).end(e)}const h=ts(c,{idleTimeout:u,finalTimeout:l,childSpanTimeout:d,disableAutoFinish:s,trimIdleSpanEndTimestamp:!x});function m(){n&&["interactive","complete"].includes(n.readyState)&&(e.emit("idleSpanEnableAutoFinish",h),n.removeEventListener("readystatechange",m))}s&&x&&(M=h),bS(e,h),s&&!x&&n&&(n.addEventListener("readystatechange",m),m())}return{name:"BrowserTracing",setup(e){if(C)Xh&&p.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");else{if(vr(),s&&t.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?new PerformanceObserver(e=>{const t=gr();if(t)for(const n of e.getEntries()){const e=Me(n.startTime);if(!e||!n.scripts[0])continue;const{start_timestamp:r,attributes:{[$t]:o}}=er(t);if("navigation"===o&&r&&e{const t=gr();if(!t)return;const{attributes:n,start_timestamp:r}=er(t);for(const o of e){const e=Me(o.startTime);if(!e)continue;const s=Xp(o.duration);"navigation"===n[$t]&&r&&e{R=Oe()};addEventListener("click",e,{capture:!0}),addEventListener("keydown",e,{capture:!0,passive:!0})}e.on("beforeIdleSpanEnd",t=>{if(vS(e)!==t)return;nf(t,{ignoreResourceSpans:_,spanStreamingEnabled:Zr(e)}),bS(e,void 0);const n=nt(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:t.spanContext().traceId,sampled:sr(t),dsc:Br(t)}),M===t&&(M=void 0)}),e.on("startNavigationSpan",(t,n)=>{if(it()!==e)return;if(n?.isRedirect)return Xh&&p.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void O(e,{op:"navigation.redirect",...t},!1,n.url);R=void 0,r();const o=nt();o.setPropagationContext({traceId:Ne(),sampleRand:Math.random(),propagationSpanId:br()?void 0:$e()}),o.setSDKProcessingMetadata({normalizedRequest:void 0}),O(e,{op:ds,...t,parentSpan:null},!0,n?.url)}),e.on("startPageLoadSpan",(t,n={})=>{if(it()!==e)return;r();const o=Un(n.sentryTrace||gS("sentry-trace")||yS("sentry-trace"),n.baggage||gS("baggage")||yS("baggage")),s=nt();s.setPropagationContext(o),br()||(s.getPropagationContext().propagationSpanId=$e());const i=Rh(e);s.setSDKProcessingMetadata({normalizedRequest:{...i,url:ya(i.url,e)}}),O(e,{op:"pageload",...t})}),e.on("endPageloadSpan",()=>{x&&M&&(M.setAttribute(Pt,"reportPageLoaded"),M.end())}),Eh.addEventListener?.("pagehide",()=>{const t=vS(e);t&&!er(t).end_timestamp&&(t.setAttribute(Pt,"documentHidden"),t.end()),e.flush()})}function r(){const t=vS(e);t&&!er(t).end_timestamp&&(Xh&&p.log(`[Tracing] Finishing current active span with op: ${er(t).attributes[$t]}`),t.setAttribute(Pt,"cancelled"),t.end())}},afterAllSetup(e){if(C)return;if(Qo(e),e.addIntegration&&!e.getIntegrationByName?.(aS)){const t=i?.ignore??[];e.addIntegration(cS({...i,ignore:r||t.includes("inp")?t:[...t,"inp"]}))}let t=Ff();"off"!==k&&dS(e,{linkPreviousTrace:k,consistentTraceSampling:E}),Eh.location&&(v&&hS(e,{name:Zr(e)?Is:Eh.location.pathname,attributes:{[Jt]:"url",[Ft]:"auto.pageload.browser"}}),b&&dh(({to:n,from:r})=>{if(void 0===r&&void 0!==t&&-1!==t.indexOf(n))return void(t=void 0);t=void 0;const o=ba(n),s=vS(e),i=s&&w&&function(e,t){const n=er(e),r=xe(),o=n.start_timestamp;if(r-o>SS)return!1;if(t&&r-t<=SS)return!1;return!0}(s,R);mS(e,{name:Zr(e)?Cs:o?.pathname||Eh.location.pathname,attributes:{[Jt]:"url",[Ft]:"auto.navigation.browser"}},{url:n,isRedirect:i})}),S&&Eh.addEventListener?.("pageshow",n=>{n.persisted&&(t=void 0,mS(e,{name:Zr(e)?Cs:Eh.location?.pathname||"/",attributes:{[Jt]:"url",[Ft]:"auto.navigation.browser.bfcache",[ft]:"back-forward-cache"}},{url:Eh.location?.href}))})),f&&(Eh.document?Eh.document.addEventListener("visibilitychange",()=>{const e=gr();if(!e)return;const t=fr(e);if(Eh.document.hidden&&t){const e="cancelled",{attributes:{[$t]:n},status:r}=er(t);Xh&&p.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),"ok"===r&&t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Xh&&p.warn("[Tracing] Could not set up background tab detection due to lack of global document")),oS(e,{traceFetch:h,traceXHR:m,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:g,enableHTTPTimings:y,onRequestSpanStart:T,onRequestSpanEnd:I})}}},buildLaunchDarklyFlagUsedHandler:function(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Vc(e,t.value),Kc(e,t.value)}}},captureConsoleIntegration:uc,captureEvent:Zs,captureException:Xs,captureFeedback:hu,captureMessage:Qs,captureSession:ai,chromeStackLineParser:om,close:async function(t){const n=nt(),r=n.getClient();if(r){const e=await r.close(t);return n.getClient()===r&&n.setClient(void 0),e}return e&&p.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1)},consoleIntegration:Wc,consoleLoggingIntegration:Su,contextLinesIntegration:Qm,continueTrace:(e,t)=>{const n=Ye(r());if(n.continueTrace)return n.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=it(),a=Rn(s);return i&&!function(e,t){const n=$n(e);return t&&n&&t!==n?(p.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):!e.getOptions().strictTraceContinuation||!(t&&!n||!t&&n)||(p.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1)}(i,a?.org_id)?Uo(t):st(e=>{const n=Un(o,s);return e.setPropagationContext(n),Fo(null,t)})},createCachedRouteProvider:function(e=50){const t=new fu(e);return{...qf(e=>t.get(e.pathname)),record(e,n){e&&n&&t.set(e,n)}}},createConsolaReporter:function(e={}){const t=new Set(e.levels??Tu),n=e.client;return{log(e){const{type:r,level:o,message:s,args:i,tag:a,date:c,...u}=e,l=n||it();if(!l)return;const d=function(e,t){if("verbose"===e)return"debug";if("silent"===e)return"trace";if(e){const t=Iu[e];if(t)return t}if("number"==typeof t){const e=Cu[t];if(e)return e}return"info"}(r,o);if(!t.has(d))return;const{normalizeDepth:p=3,normalizeMaxBreadth:f=1e3}=l.getOptions(),h={};for(const[e,t]of Object.entries(u))h[e]=ce(t,p,f);h["sentry.origin"]="auto.log.consola",a&&(h["consola.tag"]=a),r&&(h["consola.type"]=r),null!=o&&"number"==typeof o&&(h["consola.level"]=o);const m=function(e,t,n){const{message:r,attributes:o,messageTemplate:s,messageParameters:i}=e,a={};if(s&&i){const e=vu(s,i);for(const[r,o]of Object.entries(e))a[r]=r.startsWith("sentry.message.parameter.")?ce(o,t,n):o}else i&&i.length>0&&i.forEach((e,r)=>{a[`sentry.message.parameter.${r}`]=ce(e,t,n)});return{message:r,attributes:{...ce(o,t,n),...a}}}(function(e,t,n){if(!e?.length)return{message:""};const r=yu(e,t,n),o=e[0];if(U(o)){const t="string"==typeof e[1]?2:1;return{message:r,attributes:o,messageParameters:e.slice(t)}}{const t=e.slice(1),n=t.length>0&&"string"==typeof o&&!_u(o);return{message:r,messageTemplate:n?o:void 0,messageParameters:n?t:void 0}}}(i,p,f),p,f);m?.attributes&&Object.assign(h,m.attributes),_i({level:d,message:m?.message||s||i&&yu(i,p,f)||"",attributes:h})}}},createTransport:Ni,createUrlRouteProvider:qf,createUserFeedbackEnvelope:function(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:(new Date).toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Pn(r)}},s=function(e){return[{type:"user_report"},e]}(e);return to(o,[s])},cultureContextIntegration:xm,dedupeIntegration:lc,defaultRequestInstrumentationOptions:rS,defaultStackLineParsers:hm,defaultStackParser:mm,diagnoseSdkConnectivity:async function(){const e=it();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const t=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await Bo(()=>fetch(t,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}},elementTimingIntegration:If,endSession:si,eventFiltersIntegration:qa,eventFromException:Wh,eventFromMessage:Hh,exceptionFromError:Nh,extraErrorDataIntegration:hc,featureFlagsIntegration:Yc,feedbackAsyncIntegration:Ph,feedbackIntegration:Dh,feedbackSyncIntegration:Dh,fetchStreamPerformanceIntegration:xS,flush:async function(t){const n=it();return n?n.flush(t):(e&&p.warn("Cannot flush events. No client defined."),Promise.resolve(!1))},forceLoad:function(){},functionToStringIntegration:Ua,geckoStackLineParser:am,getAbsoluteUrl:function(e){try{return new URL(e,Bp.location.origin).toString()}catch{return e}},getActiveSpan:gr,getClient:it,getCurrentScope:nt,getDefaultIntegrations:jm,getFeedback:function(){const e=it();return e?.getIntegrationByName("Feedback")},getGlobalScope:ot,getIsolationScope:rt,getReplay:function(){const e=it();return e?.getIntegrationByName("Replay")},getRootSpan:fr,getRouteProvider:Uf,getSpanDescendants:pr,getSpanStatusFromHttpCode:_n,getTraceData:Pa,globalHandlersIntegration:Im,graphqlClientIntegration:sg,growthbookIntegration:({growthbookClass:e})=>Xc({growthbookClass:e}),httpClientIntegration:Hm,httpContextIntegration:Pm,init:Um,instrumentOutgoingRequests:oS,instrumentSupabaseClient:Lc,interactionsIntegration:$f,isBotUserAgent:Df,isEnabled:ni,isInitialized:function(){return!!it()},lastEventId:ti,launchDarklyIntegration:GS,lazyLoadIntegration:Lh,linkedErrorsIntegration:Dm,logger:gu,makeBrowserOfflineTransport:function(e=Yh){return function(e){return t=>{const n=e({...t,createStore:LS});return Eh.addEventListener("online",async e=>{await n.flush()}),n}}(sa(e))},makeFetchTransport:Yh,makeMultiplexedTransport:function(e,t){return n=>{const r=e(n),o=new Map,s=t||(e=>{const t=e.getEvent();return t?.extra?.[ia]&&Array.isArray(t.extra[ia])?t.extra[ia]:[]});function i(t,r){const s=r?`${t}:${r}`:t;let i=o.get(s);if(!i){const a=Dn(t);if(!a)return;const c=ui(a,n.tunnel);i=r?function(e,t){return n=>{const r=e(n);return{...r,send:async e=>{const n=aa(e,["event","transaction","profile","replay_event"]);return n&&(n.release=t),r.send(e)}}}}(e,r)({...n,url:c}):e({...n,url:c}),o.set(s,i)}return[t,i]}return{send:async function(e){const t=s({envelope:e,getEvent:function(t){return aa(e,t?.length?t:["event"])}}).map(e=>"string"==typeof e?i(e,void 0):i(e.dsn,e.release)).filter(e=>!!e),n=t.length?t:[["",r]];return(await Promise.all(n.map(([t,n])=>n.send(function(e,t){return to(t?{...e[0],dsn:t}:e[0],e[1])}(e,t)))))[0]},flush:async function(e){const t=[...o.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}}}},metrics:xu,moduleMetadataIntegration:rc,normalizeStringifyValue:$m,onLoad:function(e){e()},openFeatureIntegration:JS,opera10StackLineParser:dm,opera11StackLineParser:fm,parameterize:Ma,registerSpanErrorInstrumentation:vr,registerWebWorker:function({self:e}){Error.stackTraceLimit=50,e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0});const t=t=>{const{reason:n}=t;Xh&&p.log(`[Sentry Worker] Forwarding ${t.kind} to parent`,t),function(e,t){try{return void e.postMessage({_sentryMessage:!0,_sentryWorkerError:t})}catch{}const{reason:n}=t,r=P(n),o=r?{message:qh(n),stack:n.stack}:ce(n);try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:{...t,reason:o,plainError:r}})}catch{}}(e,{...t,filename:e.location?.href,name:P(n)?zh(n):void 0})};e.addEventListener("error",e=>{const{error:n,message:r,filename:o,lineno:s,colno:i}=e;t({kind:"error",reason:n??r,message:r,url:o,lineno:s,colno:i})}),e.addEventListener("unhandledrejection",e=>{t({kind:"unhandledrejection",reason:Cm(e)})}),Xh&&p.log("[Sentry Worker] Registered worker with error and unhandled rejection handling")},replayCanvasIntegration:eS,replayIntegration:e=>new Sb(e),reportPageLoaded:function(e=it()){e?.emit("endPageloadSpan")},reportingObserverIntegration:Wm,resolveCurrentRoute:zf,resolveRoute:function(e,t=it()){const n=Uf(t);if(!n)return;const r="string"==typeof e?Wf(e):e;return r?Hr(fp?"Route provider threw while resolving a route:":"",()=>n.resolveRoute(r)||void 0,()=>{}):void 0},rewriteFramesIntegration:bc,sendFeedback:ju,setActiveSpanInBrowser:function(e){const t=gr();if(t===e)return;const n=nt();e.end=new Proxy(e.end,{apply:(e,r,o)=>(Hn(n,t),Reflect.apply(e,r,o))}),Hn(n,e)},setAttribute:function(e,t){rt().setAttribute(e,t)},setAttributes:function(e){rt().setAttributes(e)},setContext:ei,setConversationId:function(e){rt().setConversationId(e)},setCurrentClient:ra,setExtra:function(e,t){rt().setExtra(e,t)},setExtras:function(e){rt().setExtras(e)},setHttpStatus:vn,setMeasurement:Io,setRouteProvider:jf,setTag:function(e,t){rt().setTag(e,t)},setTags:function(e){rt().setTags(e)},setUser:function(e){rt().setUser(e)},showReportDialog:function(e={}){const t=Eh.document,n=t?.head||t?.body;if(!n)return void(Xh&&p.error("[showReportDialog] Global document not defined"));const r=nt(),o=it(),s=o?.getDsn();if(!s)return void(Xh&&p.error("[showReportDialog] DSN not configured"));const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||ti()},{onLoad:a,onClose:c,onError:u}=i;if(!i.eventId)return Xh&&p.error("[showReportDialog] No event ID"),void u?.(new Error("No event ID to show the report dialog for"));const l=Eh.document.createElement("script");if(l.async=!0,l.crossOrigin="anonymous",l.src=function(e,t){const n=Fn(e);if(!n)return"";const r=`${ci(n)}embed/error-page/`;let o=`dsn=${Pn(n)}`;for(const e in t)if("dsn"!==e&&"onClose"!==e&&"onError"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(o+=`&name=${encodeURIComponent(e.name)}`),e.email&&(o+=`&email=${encodeURIComponent(e.email)}`)}else o+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${o}`}(s,i),a&&(l.onload=a),u&&(l.onerror=()=>{u(new Error("Failed to load the report dialog script"))}),c){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{c()}finally{Eh.removeEventListener("message",e)}};Eh.addEventListener("message",e),l.addEventListener("error",()=>{Eh.removeEventListener("message",e)})}n.appendChild(l)},spanStreamingIntegration:wo,spanToBaggageHeader:function(e){return Mn(Br(e))},spanToJSON:er,spanToStaticSpanJSON:Zn,spanToTraceHeader:Vn,spotlightBrowserIntegration:HS,startBrowserTracingNavigationSpan:mS,startBrowserTracingPageLoadSpan:hS,startInactiveSpan:Zo,startNewTrace:Uo,startSession:oi,startSpan:function(e,t){return Qo(),function(e,t){const n=Wo(e),{forceTransaction:r,parentSpan:o,scope:s}=e,i=s?.clone();return st(i,()=>Vo(o)(()=>{const i=nt(),a=Jo(s??i,o),c=it(),u=e.onlyIfParent&&!a?zo(i,c):qo({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i}),l=!Ko(u)||!a;return Yo(u,l,()=>t(u),()=>u.end())}))}(e,t)},startSpanManual:function(e,t){return Qo(),No(e,t)},statsigIntegration:YS,supabaseIntegration:Pc,suppressTracing:Bo,thirdPartyErrorFilterIntegration:jc,uiProfiler:Qh,unleashIntegration:VS,updateSpanName:function(e,t){e.updateName(t),e.setAttributes({[gn]:t}),yr(e,"custom")},userTimingIntegration:Hf,viewHierarchyIntegration:ig,webVitalsIntegration:cS,webWorkerIntegration:XS,winjsStackLineParser:um,withActiveSpan:Fo,withIsolationScope:function(...e){const t=Ye(r());if(2===e.length){const[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])},withScope:st,withStaticSpan:function(e){return K(e,"_static",!0),e},withStreamedSpan:function(e){return e},zodErrorsIntegration:Bc});async function ew(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}"function"==typeof SuppressedError&&SuppressedError;const tw=()=>({name:"TauriNormalizeUrls",processEvent:e=>function(e,t){const n=new RegExp(`${r=t,r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|(?=[?#\\s])|$)`,"g");var r;const o=e=>e.replace(n,"app:///");for(const t of e.exception?.values||[])for(const e of t.stacktrace?.frames||[])e.filename&&(e.filename=o(e.filename)),e.abs_path&&(e.abs_path=o(e.abs_path));for(const t of e.debug_meta?.images||[])"sourcemap"===t.type&&(t.code_file=o(t.code_file));e.transaction&&(e.transaction=o(e.transaction)),e.request?.url&&(e.request.url=o(e.request.url));for(const t of e.spans||[]){t.description&&(t.description=o(t.description));for(const e of["url","url.full","http.url"]){const n=t.data?.[e];"string"==typeof n&&(t.data[e]=o(n))}}const s=e.urls;return Array.isArray(s)&&(e.urls=s.map(e=>"string"==typeof e?o(e):e)),e}(e,window.location.origin)});function nw(e){try{return JSON.stringify(e)}catch{return}}function rw(e,t){const n={},r=new Set;for(const[o,s]of Object.entries(t)){const t=void 0===s?void 0:nw(s);void 0!==t&&(r.add(o),e.get(o)!==t&&(e.set(o,t),n[o]=s))}for(const t of e.keys())r.has(t)||(e.delete(t),n[t]=null);return Object.keys(n).length?n:void 0}function ow(){return{name:"ScopeToRust",setup(){const e=function(){const e=new Map,t=new Map,n=new Map,r=new Map;return o=>{const s={};rw(e,o.user||{})&&(s.user=e.size?Object.fromEntries([...e].map(([e,t])=>[e,JSON.parse(t)])):null);const i=rw(t,o.tags||{});i&&(s.tags=i);const a=rw(n,o.extra||{});a&&(s.extra=a);const c=rw(r,o.contexts||{});return c&&(s.contexts=c),Object.keys(s).length?s:void 0}}();let t=!1,n=!1;const r=()=>{n=!1;const r=e(function(){const e=[ot(),rt(),nt()].map(e=>e.getScopeData()),t=t=>Object.assign({},...e.map(e=>e[t]));return{user:t("user"),tags:t("tags"),extra:t("extra"),contexts:t("contexts")}}());r&&!t&&ew("plugin:sentry|scope",{scope:r}).catch(e=>{console.error("Failed to send scope to Rust:",e),t=!0})},o=()=>{n||(n=!0,queueMicrotask(r))};ot().addScopeListener(o),rt().addScopeListener(o),nt().addScopeListener(o),o()}}}let sw=!1;const iw={dsn:"https://123456@dummy.dsn/0",integrations:e=>[...e.filter(e=>"BrowserSession"!==e.name),ow(),tw()],transport:function(e){return Ni(e,async e=>{if(sw)return{statusCode:200};try{await ew("plugin:sentry|envelope",{envelope:e.body})}catch(e){console.error("Failed to send envelope to Rust:",e),sw=!0}return{statusCode:200}})},beforeBreadcrumb:function(e){return sw||"string"==typeof e.data?.url&&(e.data.url.startsWith("ipc://")||e.data.url.match(/^https?:\/\/ipc\.localhost/))||ew("plugin:sentry|breadcrumb",{breadcrumb:e}).catch(e=>{console.error("Failed to send breadcrumb to Rust:",e),sw=!0}),null},traceLifecycle:"static"};window.Sentry=ZS,Um({...iw,debug:__DEBUG__})}(); diff --git a/dist/normalize.d.ts b/dist/normalize.d.ts index 3755f6b..5c5e3f4 100644 --- a/dist/normalize.d.ts +++ b/dist/normalize.d.ts @@ -12,4 +12,6 @@ export declare function normalizeUrls(event: Event, origin: string): Event; * Tauri serves the app from `tauri://localhost` on macOS, iOS and Linux and * from `http://tauri.localhost` on Windows and Android. */ -export declare const normalizeUrlsIntegration: () => import("@sentry/core").Integration; +export declare const normalizeUrlsIntegration: () => import("@sentry/core").Integration & { + name: string; +}; diff --git a/examples/basic-app/src-tauri/Cargo.toml b/examples/basic-app/src-tauri/Cargo.toml index 6e569fd..f2cc100 100644 --- a/examples/basic-app/src-tauri/Cargo.toml +++ b/examples/basic-app/src-tauri/Cargo.toml @@ -12,7 +12,7 @@ version = "0.1.0" tauri-build = { version = "2", features = [] } [dependencies] -sentry = "0.49" +sentry = "0.49.5" sadness-generator = "0.6" tauri-plugin-sentry = { path = "../../.." } serde = { version = "1.0", features = ["derive"] } diff --git a/js/index.ts b/js/index.ts index 861aeae..cfde3f7 100644 --- a/js/index.ts +++ b/js/index.ts @@ -79,4 +79,6 @@ export const defaultOptions: BrowserOptions = { ], transport: makeRendererTransport, beforeBreadcrumb: sendBreadcrumbToRust, + // The Rust SDK cannot parse streamed span envelope items + traceLifecycle: 'static', }; diff --git a/package.json b/package.json index 1ec88cb..8fbaaff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tauri-plugin-sentry-api", - "version": "0.8.0", + "version": "0.9.0", "description": "Tauri Plugin for Sentry", "license": "Apache-2.0 OR MIT", "files": [ @@ -21,8 +21,8 @@ }, "devDependencies": { "@rollup/plugin-node-resolve": "^16.0.1", - "@sentry/browser": "^10.8.0", - "@sentry/core": "^10.8.0", + "@sentry/browser": "^11.10.0", + "@sentry/core": "^11.10.0", "rollup": "^4.50.0", "@rollup/plugin-terser": "^0.4.4", "typescript": "^5.1.6", diff --git a/test/e2e/app/src-tauri/Cargo.toml b/test/e2e/app/src-tauri/Cargo.toml index 755c7a4..4545189 100644 --- a/test/e2e/app/src-tauri/Cargo.toml +++ b/test/e2e/app/src-tauri/Cargo.toml @@ -9,7 +9,7 @@ tauri-build = { version = "2", features = [] } [dependencies] sadness-generator = "0.6" -sentry = "0.49" +sentry = "0.49.5" tauri = { version = "2", features = ["custom-protocol"] } tauri-plugin-sentry = { path = "../../../.." } diff --git a/yarn.lock b/yarn.lock index 8ea6e9c..8dadd55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -441,51 +441,61 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.64.6.tgz#28210903891d003eccc5f769671787d92f54fb13" integrity sha512-9/c9PWdr5GCIHkkxiHM1HjNBQMVdftP4O8QTcoUAaRza2FSqJ4axbf8QAnBuE6BIGQDl71SaRPeDdDYid5ecTw== -"@sentry-internal/browser-utils@10.8.0": - version "10.8.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-10.8.0.tgz#a028e8067566cb80026c112cd62b5c119415e337" - integrity sha512-FaQX9eefc8sh3h3ZQy16U73KiH0xgDldXnrFiWK6OeWg8X4bJpnYbLqEi96LgHiQhjnnz+UQP1GDzH5oFuu5fA== +"@sentry/browser-utils@11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@sentry/browser-utils/-/browser-utils-11.10.0.tgz#25df36858b270a9fc361e160f3185e59457f856f" + integrity sha512-P/bYHTgj76sYBYCZa524YoZ/hZac2XCW3i3qShrMXnh7s63x1cweUjD7BDVDb0L/lGMwtuObuZeRnCif4hWLNg== dependencies: - "@sentry/core" "10.8.0" - -"@sentry-internal/feedback@10.8.0": - version "10.8.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-10.8.0.tgz#fa562fe64c806d429f4c33acd8e7ca0f929053f3" - integrity sha512-n7SqgFQItq4QSPG7bCjcZcIwK6AatKnnmSDJ/i6e8jXNIyLwkEuY2NyvTXACxVdO/kafGD5VmrwnTo3Ekc1AMg== + "@sentry/conventions" "^0.29.0" + "@sentry/core" "11.10.0" + web-vitals "^6.2.3" + +"@sentry/browser@^11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-11.10.0.tgz#e88ca4285e666dc821ee77c682ee6c5f5d5dda38" + integrity sha512-kU8Inx3K/PaaDGqTu4lBW8XCYNsYNTwwPIZNIRDas/mTXtepXpM7M0KxxrTSZXBTWX0RfDU4t7vsL9ay0o4+NQ== dependencies: - "@sentry/core" "10.8.0" - -"@sentry-internal/replay-canvas@10.8.0": - version "10.8.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-10.8.0.tgz#5adc2f3aa7036fed46415fcb6eabd4d8a6d335e3" - integrity sha512-jC4OOwiNgrlIPeXIPMLkaW53BSS1do+toYHoWzzO5AXGpN6jRhanoSj36FpVuH2N3kFnxKVfVxrwh8L+/3vFWg== + "@sentry/browser-utils" "11.10.0" + "@sentry/conventions" "^0.29.0" + "@sentry/core" "11.10.0" + "@sentry/feedback" "11.10.0" + "@sentry/replay" "11.10.0" + "@sentry/replay-canvas" "11.10.0" + +"@sentry/conventions@^0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@sentry/conventions/-/conventions-0.29.0.tgz#37599c2ca3fad40638e03e8245f7a5d5fef9b6ba" + integrity sha512-kYq9/HJ/l6MYP/srIc20dy1W4mWyJfCF0OWFF+RhBGZwyr/wCmtabRFKyw7kqM+DTwZXQOjSTSZUcJhDowcInQ== + +"@sentry/core@11.10.0", "@sentry/core@^11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-11.10.0.tgz#33473062514bfd54b8b5751760ac290d7add5641" + integrity sha512-l/OtTo1v+TQgZtHG2Q5N4IX+gFdAE1tZ27K/P21UCzJglWk54TPEm+d9T2lulPqMK06kZcLwDgRAhE2GO4YS5w== dependencies: - "@sentry-internal/replay" "10.8.0" - "@sentry/core" "10.8.0" + "@sentry/conventions" "^0.29.0" -"@sentry-internal/replay@10.8.0": - version "10.8.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-10.8.0.tgz#3f14329924ff744611296ce4e9588530e5f168e4" - integrity sha512-9+qDEoEjv4VopLuOzK1zM4LcvcUsvB5N0iJ+FRCM3XzzOCbebJOniXTQbt5HflJc3XLnQNKFdKfTfgj8M/0RKQ== +"@sentry/feedback@11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@sentry/feedback/-/feedback-11.10.0.tgz#571d72e0a47e4068ea1a9cd96cd09e075062ecbe" + integrity sha512-jZqxVHPoUeZ6W7xSlhJdTMuM/GUJLA/K4U9OFmkP+g+TvtXhdwWxeiT23m2Wm5NmTHjaB07jSc05ayuflD8ETw== dependencies: - "@sentry-internal/browser-utils" "10.8.0" - "@sentry/core" "10.8.0" + "@sentry/core" "11.10.0" -"@sentry/browser@^10.8.0": - version "10.8.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-10.8.0.tgz#f33b95f48e3967db661db1666ad3e1dc0a6922fb" - integrity sha512-2J7HST8/ixCaboq17yFn/j/OEokXSXoCBMXRrFx4FKJggKWZ90e2Iau5mP/IPPhrW+W9zCptCgNMY0167wS4qA== +"@sentry/replay-canvas@11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@sentry/replay-canvas/-/replay-canvas-11.10.0.tgz#b219df5255c18e1441f806bf85973bfeb8c1545b" + integrity sha512-i0Fsjbl8ChzTMntLVhZvn72+p395tGNtL4iflsprnzPhTVSOGW9IYgUYfO87UcujUf5CmYn7ELBKUc5V0Ipfdg== dependencies: - "@sentry-internal/browser-utils" "10.8.0" - "@sentry-internal/feedback" "10.8.0" - "@sentry-internal/replay" "10.8.0" - "@sentry-internal/replay-canvas" "10.8.0" - "@sentry/core" "10.8.0" + "@sentry/core" "11.10.0" + "@sentry/replay" "11.10.0" -"@sentry/core@10.8.0", "@sentry/core@^10.8.0": - version "10.8.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-10.8.0.tgz#71f71f8ecb5a06c41a426f5ccee2d9767b7d7cfd" - integrity sha512-scYzM/UOItu4PjEq6CpHLdArpXjIS0laHYxE4YjkIbYIH6VMcXGQbD/FSBClsnCr1wXRnlXfXBzj0hrQAFyw+Q== +"@sentry/replay@11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-11.10.0.tgz#f2909afa8dc32195ee7911d6a3645b4bbeb96082" + integrity sha512-0rcg+43tkO278VyrKcbmg0JQm2yxuguXKLbr9ieiNsynaxj22JC8baie4Uxizf2jM2ukfqA3O+o0Pbqaed8P2Q== + dependencies: + "@sentry/browser-utils" "11.10.0" + "@sentry/core" "11.10.0" "@tauri-apps/api@2.0.0-beta.8": version "2.0.0-beta.8" @@ -1048,6 +1058,11 @@ vitest@^3.2.4: vite-node "3.2.4" why-is-node-running "^2.3.0" +web-vitals@^6.2.3: + version "6.2.3" + resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-6.2.3.tgz#8581188b2a46875d04b9536ab06b352e3a0468b8" + integrity sha512-Dmy+vdO1UPMqXiAtZSNayhl4f794Bxfd94W4HIj2HlYtczEQfEOon969memlcpcHrTuOKLa5baFjX7WbgmOq+A== + why-is-node-running@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz#a3f69a97107f494b3cdc3bdddd883a7d65cebf04"