import"./_sentry-release-injection-file.RX0oWDBO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3bae48f8-5038-4bd8-af01-fd347565bfbf",e._sentryDebugIdIdentifier="sentry-dbid-3bae48f8-5038-4bd8-af01-fd347565bfbf")}catch{}})();const lo=Object.prototype.toString;function us(e){switch(lo.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Fe(e,Error)}}function Dt(e,t){return lo.call(e)===`[object ${t}]`}function fo(e){return Dt(e,"ErrorEvent")}function Gs(e){return Dt(e,"DOMError")}function kc(e){return Dt(e,"DOMException")}function Pe(e){return Dt(e,"String")}function ls(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ds(e){return e===null||ls(e)||typeof e!="object"&&typeof e!="function"}function wt(e){return Dt(e,"Object")}function Jn(e){return typeof Event<"u"&&Fe(e,Event)}function Rc(e){return typeof Element<"u"&&Fe(e,Element)}function Cc(e){return Dt(e,"RegExp")}function Qn(e){return!!(e&&e.then&&typeof e.then=="function")}function Mc(e){return wt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Fe(e,t){try{return e instanceof t}catch{return!1}}function po(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Tt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ys(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{po(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Ac(e,t,n=!1){return Pe(e)?Cc(t)?t.test(e):Pe(t)?n?e===t:e.includes(t):!1:!1}function Ge(e,t=[],n=!1){return t.some(r=>Ac(e,r,n))}function xc(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!Fe(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=Oc(Mr(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function Mr(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(Fe(r[s],Error)){Vs(o,a);const u=e(t,r[s]),l=c.length;Ks(u,s,l,a),c=Mr(e,t,n,r[s],s,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if(Fe(u,Error)){Vs(o,a);const d=e(t,u),f=c.length;Ks(d,`errors[${l}]`,f,a),c=Mr(e,t,n,u,s,[d,...c],d,f)}}),c}function Vs(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Ks(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Oc(e,t){return e.map(n=>(n.value&&(n.value=Tt(n.value,t)),n))}const it="8.23.0",$=globalThis;function fs(e,t,n){const r=$,s=r.__SENTRY__=r.__SENTRY__||{},i=s[it]=s[it]||{};return i[e]||(i[e]=t())}const It=$,Nc=80;function Ke(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Nc;for(;n&&i++<r&&(u=Dc(n,l),!(u==="html"||i>1&&o+s.length*c+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function Dc(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(It.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s&&s.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Pe(o)){const a=o.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function ho(){try{return It.document.location.href}catch{return""}}function Lc(e){return It.document&&It.document.querySelector?It.document.querySelector(e):null}function mo(e){if(!It.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}const Lt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Pc="Sentry Logger ",Ar=["debug","info","warn","error","log","assert","trace"],Dn={};function Pt(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(Dn);r.forEach(s=>{const i=Dn[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function Fc(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Lt?Ar.forEach(n=>{t[n]=(...r)=>{e&&Pt(()=>{$.console[n](`${Pc}[${n}]:`,...r)})}}):Ar.forEach(n=>{t[n]=()=>{}}),t}const m=Fc(),Bc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function $c(e){return e==="http"||e==="https"}function sn(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function Uc(e){const t=Bc.exec(e);if(!t){Pt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return go({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function go(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Hc(e){if(!Lt)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(m.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?$c(r)?t&&isNaN(parseInt(t,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Wc(e){const t=typeof e=="string"?Uc(e):go(e);if(!(!t||!Hc(t)))return t}class Me extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function se(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&_o(s,r),e[t]=s}function Se(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Lt&&m.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function _o(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Se(e,"__sentry_original__",t)}catch{}}function ps(e){return e.__sentry_original__}function zc(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function yo(e){if(us(e))return{message:e.message,name:e.name,stack:e.stack,...Js(e)};if(Jn(e)){const t={type:e.type,target:Xs(e.target),currentTarget:Xs(e.currentTarget),...Js(e)};return typeof CustomEvent<"u"&&Fe(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Xs(e){try{return Rc(e)?Ke(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Js(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function jc(e,t=40){const n=Object.keys(yo(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Tt(r,t);for(let s=n.length;s>0;s--){const i=n.slice(0,s).join(", ");if(!(i.length>t))return s===n.length?i:Tt(i,t)}return""}function ie(e){return xr(e,new Map)}function xr(e,t){if(qc(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.keys(e))typeof e[s]<"u"&&(r[s]=xr(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(xr(s,t))}),r}return e}function qc(e){if(!wt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const So=50,lt="?",Qs=/\(error: (.*)\)/,Zs=/captureMessage|captureException/;function Eo(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(`
`);for(let a=r;a<o.length;a++){const c=o[a];if(c.length>1024)continue;const u=Qs.test(c)?c.replace(Qs,"$1"):c;if(!u.match(/\S*Error: /)){for(const l of t){const d=l(u);if(d){i.push(d);break}}if(i.length>=So+s)break}}return Yc(i.slice(s))}}function Gc(e){return Array.isArray(e)?Eo(...e):e}function Yc(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(gn(t).function||"")&&t.pop(),t.reverse(),Zs.test(gn(t).function||"")&&(t.pop(),Zs.test(gn(t).function||"")&&t.pop()),t.slice(0,So).map(n=>({...n,filename:n.filename||gn(t).filename,function:n.function||lt}))}function gn(e){return e[e.length-1]||{}}const yr="<anonymous>";function Be(e){try{return!e||typeof e!="function"?yr:e.name||yr}catch{return yr}}function ei(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Cn={},ti={};function Je(e,t){Cn[e]=Cn[e]||[],Cn[e].push(t)}function Qe(e,t){ti[e]||(t(),ti[e]=!0)}function ye(e,t){const n=e&&Cn[e];if(n)for(const r of n)try{r(t)}catch(s){Lt&&m.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${Be(r)}
Error:`,s)}}function Vc(e){const t="console";Je(t,e),Qe(t,Kc)}function Kc(){"console"in $&&Ar.forEach(function(e){e in $.console&&se($.console,e,function(t){return Dn[e]=t,function(...n){ye("console",{args:n,level:e});const s=Dn[e];s&&s.apply($.console,n)}})})}const Or=$;function bo(){if(!("fetch"in Or))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Nr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Xc(){if(typeof EdgeRuntime=="string")return!0;if(!bo())return!1;if(Nr(Or.fetch))return!0;let e=!1;const t=Or.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Nr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Lt&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}const vo=1e3;function on(){return Date.now()/vo}function Jc(){const{performance:e}=$;if(!e||!e.now)return on;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/vo}const de=Jc(),me=(()=>{const{performance:e}=$;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=e.timing&&e.timing.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):t,u=c<t;return i||u?s<=c?e.timeOrigin:o:r})();function To(e,t){const n="fetch";Je(n,e),Qe(n,()=>Io(void 0,t))}function Qc(e){const t="fetch-body-resolved";Je(t,e),Qe(t,()=>Io(eu))}function Io(e,t=!1){t&&!Xc()||se($,"fetch",function(n){return function(...r){const{method:s,url:i}=tu(r),o={args:r,fetchData:{method:s,url:i},startTimestamp:de()*1e3};e||ye("fetch",{...o});const a=new Error().stack;return n.apply($,r).then(async c=>(e?e(c):ye("fetch",{...o,endTimestamp:de()*1e3,response:c}),c),c=>{throw ye("fetch",{...o,endTimestamp:de()*1e3,error:c}),us(c)&&c.stack===void 0&&(c.stack=a,Se(c,"framesToPop",1)),c})}})}async function Zc(e,t){if(e&&e.body){const n=e.body.getReader();async function r({done:s}){if(s)return Promise.resolve();try{const i=await Promise.race([n.read(),new Promise(o=>{setTimeout(()=>{o({done:!0})},5e3)})]);await r(i)}catch{}}return n.read().then(r).then(t).catch(()=>{})}}async function eu(e){let t;try{t=e.clone()}catch{return}await Zc(t,()=>{ye("fetch-body-resolved",{endTimestamp:de()*1e3,response:e})})}function Dr(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ni(e){return typeof e=="string"?e:e?Dr(e,"url")?e.url:e.toString?e.toString():"":""}function tu(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:ni(n),method:Dr(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:ni(t),method:Dr(t,"method")?String(t.method).toUpperCase():"GET"}}let _n=null;function wo(e){const t="error";Je(t,e),Qe(t,nu)}function nu(){_n=$.onerror,$.onerror=function(e,t,n,r,s){return ye("error",{column:r,error:s,line:n,msg:e,url:t}),_n&&!_n.__SENTRY_LOADER__?_n.apply(this,arguments):!1},$.onerror.__SENTRY_INSTRUMENTED__=!0}let yn=null;function ko(e){const t="unhandledrejection";Je(t,e),Qe(t,ru)}function ru(){yn=$.onunhandledrejection,$.onunhandledrejection=function(e){return ye("unhandledrejection",e),yn&&!yn.__SENTRY_LOADER__?yn.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function su(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function iu(){return"npm"}function ou(){return!su()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ri(){return typeof window<"u"&&(!ou()||au())}function au(){return $.process!==void 0&&$.process.type==="renderer"}function cu(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let i=0;i<t.length;i++)if(t[i]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let i=0;i<t.length;i++)if(t[i]===s){t.splice(i,1);break}}return[n,r]}function K(){const e=$,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Ro(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function He(e){const{message:t,event_id:n}=e;if(t)return t;const r=Ro(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Lr(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function Kt(e,t){const n=Ro(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s&&s.data,...t.data};n.mechanism.data=i}}function si(e){if(e&&e.__sentry_captured__)return!0;try{Se(e,"__sentry_captured__",!0)}catch{}return!1}function Co(e){return Array.isArray(e)?e:[e]}function Ce(e,t=100,n=1/0){try{return Pr("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Mo(e,t=3,n=100*1024){const r=Ce(e,t);return fu(r)>n?Mo(e,t-1,n):r}function Pr(e,t,n=1/0,r=1/0,s=cu()){const[i,o]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;const a=uu(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return Pr("",p,c-1,r,s)}catch{}const l=Array.isArray(t)?[]:{};let d=0;const f=yo(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){l[p]="[MaxProperties ~]";break}const h=f[p];l[p]=Pr(p,h,c-1,r,s),d++}return o(t),l}function uu(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(po(t))return"[VueViewModel]";if(Mc(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Be(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=lu(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function lu(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function du(e){return~-encodeURI(e).split(/%..|./).length}function fu(e){return du(JSON.stringify(e))}var Ne;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Ne||(Ne={}));function $e(e){return new _e(t=>{t(e)})}function Ln(e){return new _e((t,n)=>{n(e)})}class _e{constructor(t){_e.prototype.__init.call(this),_e.prototype.__init2.call(this),_e.prototype.__init3.call(this),_e.prototype.__init4.call(this),this._state=Ne.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new _e((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new _e((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(Ne.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ne.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Ne.PENDING){if(Qn(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ne.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Ne.RESOLVED&&n[1](this._value),this._state===Ne.REJECTED&&n[2](this._value),n[0]=!0)})}}}function pu(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function s(o){if(!n())return Ln(new Me("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new _e((a,c)=>{let u=t.length;if(!u)return a(!0);const l=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{$e(d).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:t,add:s,drain:i}}function ot(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}}const hu=["fatal","error","warning","log","info","debug"];function mu(e){return e==="warn"?"warning":hu.includes(e)?e:"log"}const Fr="baggage",Ao="sentry-",gu=/^sentry-/,_u=8192;function xo(e){const t=yu(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(gu)){const o=s.slice(Ao.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Oo(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Ao}${r}`]=s),n),{});return Su(t)}function yu(e){if(!(!e||!Pe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=ii(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):ii(e)}function ii(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Su(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>_u?(Lt&&m.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const Eu=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function bu(e){if(!e)return;const t=e.match(Eu);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function vu(e,t){const n=bu(e),r=xo(t),{traceId:s,parentSpanId:i,parentSampled:o}=n||{};return n?{traceId:s||K(),parentSpanId:i||K().substring(16),spanId:K().substring(16),sampled:o,dsc:r||{}}:{traceId:s||K(),spanId:K().substring(16)}}function hs(e=K(),t=K().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function pt(e,t=[]){return[e,t]}function Tu(e,t){const[n,r]=e;return[n,[...r,t]]}function oi(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Br(e){return $.__SENTRY__&&$.__SENTRY__.encodePolyfill?$.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Iu(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Br(r),i]:r.push(typeof i=="string"?Br(i):i)}for(const i of n){const[o,a]=i;if(s(`
${JSON.stringify(o)}
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ce(a))}s(c)}}return typeof r=="string"?r:wu(r)}function wu(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function ku(e){return[{type:"span"},e]}function Ru(e){const t=typeof e.data=="string"?Br(e.data):e.data;return[ie({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Cu={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",statsd:"metric_bucket"};function ai(e){return Cu[e]}function ms(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function No(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:sn(r)},...s&&{trace:ie({...s})}}}function Mu(e,t,n){const r=[{type:"client_report"},{timestamp:on(),discarded_events:e}];return pt(t?{dsn:t}:{},[r])}const Au=60*1e3;function xu(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Au:r-t}function Ou(e,t){return e[t]||e.all||0}function Do(e,t,n=Date.now()){return Ou(e,t)>n}function Lo(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,l]=a.split(":",5),d=parseInt(c,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+xu(o,r):t===429&&(s.all=r+60*1e3);return s}function Nu(e,t){return e??t()}function Mn(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Pn(){return{traceId:K(),spanId:K().substring(16)}}const Sn=$;function Du(){const e=Sn.chrome,t=e&&e.app&&e.app.runtime,n="history"in Sn&&!!Sn.history.pushState&&!!Sn.history.replaceState;return!t&&n}const M=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ft(){return gs($),$}function gs(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||it,t[it]=t[it]||{}}function Lu(e){const t=de(),n={sid:K(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Fu(n)};return e&&kt(n,e),n}function kt(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||de(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:K()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Pu(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),kt(e,n)}function Fu(e){return ie({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const $r="_sentrySpan";function Xt(e,t){t?Se(e,$r,t):delete e[$r]}function Fn(e){return e[$r]}const Bu=100;class _s{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Pn()}clone(){const t=new _s;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Xt(t,Fn(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&kt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,s]=n instanceof dt?[n.getScopeData(),n.getRequestSession()]:wt(n)?[t,t.requestSession]:[],{tags:i,extra:o,user:a,contexts:c,level:u,fingerprint:l=[],propagationContext:d}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),l.length&&(this._fingerprint=l),d&&(this._propagationContext=d),s&&(this._requestSession=s),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._requestSession=void 0,this._session=void 0,Xt(this,void 0),this._attachments=[],this._propagationContext=Pn(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Bu;if(r<=0)return this;const s={timestamp:on(),...t},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Fn(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:K();if(!this._client)return m.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r&&r.event_id?r.event_id:K();if(!this._client)return m.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:K();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(m.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const dt=_s;function $u(){return fs("defaultCurrentScope",()=>new dt)}function Uu(){return fs("defaultIsolationScope",()=>new dt)}class Hu{constructor(t,n){let r;t?r=t:r=new dt;let s;n?s=n:s=new dt,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return Qn(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Rt(){const e=Ft(),t=gs(e);return t.stack=t.stack||new Hu($u(),Uu())}function Wu(e){return Rt().withScope(e)}function zu(e,t){const n=Rt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function ci(e){return Rt().withScope(()=>e(Rt().getIsolationScope()))}function ju(){return{withIsolationScope:ci,withScope:Wu,withSetScope:zu,withSetIsolationScope:(e,t)=>ci(t),getCurrentScope:()=>Rt().getScope(),getIsolationScope:()=>Rt().getIsolationScope()}}function an(e){const t=gs(e);return t.acs?t.acs:ju()}function J(){const e=Ft();return an(e).getCurrentScope()}function Ee(){const e=Ft();return an(e).getIsolationScope()}function qu(){return fs("globalScope",()=>new dt)}function ys(...e){const t=Ft(),n=an(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function L(){return J().getClient()}const Gu="_sentryMetrics";function Ur(e){const t=e[Gu];if(!t)return;const n={};for(const[,[r,s]]of t)(n[r]||(n[r]=[])).push(ie(s));return n}const Le="sentry.source",Po="sentry.sample_rate",Jt="sentry.op",ae="sentry.origin",Hr="sentry.idle_span_finish_reason",Ss="sentry.measurement_unit",Es="sentry.measurement_value",Yu="sentry.profile_id",Fo="sentry.exclusive_time",Vu=0,Bo=1,ne=2;function Ku(e){if(e<400&&e>=100)return{code:Bo};if(e>=400&&e<500)switch(e){case 401:return{code:ne,message:"unauthenticated"};case 403:return{code:ne,message:"permission_denied"};case 404:return{code:ne,message:"not_found"};case 409:return{code:ne,message:"already_exists"};case 413:return{code:ne,message:"failed_precondition"};case 429:return{code:ne,message:"resource_exhausted"};case 499:return{code:ne,message:"cancelled"};default:return{code:ne,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:ne,message:"unimplemented"};case 503:return{code:ne,message:"unavailable"};case 504:return{code:ne,message:"deadline_exceeded"};default:return{code:ne,message:"internal_error"}}return{code:ne,message:"unknown_error"}}function $o(e,t){e.setAttribute("http.response.status_code",t);const n=Ku(t);n.message!=="unknown_error"&&e.setStatus(n)}const Uo=0,Ho=1;function Xu(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a}=U(e);return ie({parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a})}function Ju(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=U(e);return ie({parent_span_id:r,span_id:t,trace_id:n})}function Wo(e){const{traceId:t,spanId:n}=e.spanContext(),r=ht(e);return hs(t,n,r)}function at(e){return typeof e=="number"?ui(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ui(e.getTime()):de()}function ui(e){return e>9999999999?e/1e3:e}function U(e){if(Zu(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(Qu(e)){const{attributes:r,startTime:s,name:i,endTime:o,parentSpanId:a,status:c}=e;return ie({span_id:t,trace_id:n,data:r,description:i,parent_span_id:a,start_timestamp:at(s),timestamp:at(o)||void 0,status:zo(c),op:r[Jt],origin:r[ae],_metrics_summary:Ur(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Qu(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Zu(e){return typeof e.getSpanJSON=="function"}function ht(e){const{traceFlags:t}=e.spanContext();return t===Ho}function zo(e){if(!(!e||e.code===Vu))return e.code===Bo?"ok":e.message||"unknown_error"}const ct="_sentryChildSpans",Wr="_sentryRootSpan";function jo(e,t){const n=e[Wr]||e;Se(t,Wr,n),e[ct]?e[ct].add(t):Se(e,ct,new Set([t]))}function el(e,t){e[ct]&&e[ct].delete(t)}function An(e){const t=new Set;function n(r){if(!t.has(r)&&ht(r)){t.add(r);const s=r[ct]?Array.from(r[ct]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function ce(e){return e[Wr]||e}function fe(){const e=Ft(),t=an(e);return t.getActiveSpan?t.getActiveSpan():Fn(J())}let li=!1;function tl(){li||(li=!0,wo(zr),ko(zr))}function zr(){const e=fe(),t=e&&ce(e);if(t){const n="internal_error";M&&m.log(`[Tracing] Root span: ${n} -> Global error occured`),t.setStatus({code:ne,message:n})}}zr.tag="sentry_tracingErrorCallback";const qo="_sentryScope",Go="_sentryIsolationScope";function nl(e,t,n){e&&(Se(e,Go,n),Se(e,qo,t))}function di(e){return{scope:e[qo],isolationScope:e[Go]}}function Ue(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||rl();return!!t&&(t.enableTracing||"tracesSampleRate"in t||"tracesSampler"in t)}function rl(){const e=L();return e&&e.getOptions()}class Bt{constructor(t={}){this._traceId=t.traceId||K(),this._spanId=t.spanId||K().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Uo}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}const bs="production",Yo="_frozenDsc";function fi(e,t){Se(e,Yo,t)}function Zn(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=ie({environment:n.environment||bs,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function mt(e){const t=L();if(!t)return{};const n=Zn(U(e).trace_id||"",t),r=ce(e),s=r[Yo];if(s)return s;const i=r.spanContext().traceState,o=i&&i.get("sentry.dsc"),a=o&&xo(o);if(a)return a;const c=U(r),u=c.data||{},l=u[Po];l!=null&&(n.sample_rate=`${l}`);const d=u[Le],f=c.description;return d!=="url"&&f&&(n.transaction=f),n.sampled=String(ht(r)),t.emit("createDsc",n,r),n}function sl(e){if(!M)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=U(e),{spanId:s}=e.spanContext(),i=ht(e),o=ce(e),a=o===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:l,description:d}=U(o);u.push(`root ID: ${o.spanContext().spanId}`),l&&u.push(`root op: ${l}`),d&&u.push(`root description: ${d}`)}m.log(`${c}
  ${u.join(`
  `)}`)}function il(e){if(!M)return;const{description:t="< unknown name >",op:n="< unknown op >"}=U(e),{spanId:r}=e.spanContext(),i=ce(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;m.log(o)}function Bn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){M&&m.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function ol(e,t){if(!Ue(e))return[!1];let n;typeof e.tracesSampler=="function"?n=e.tracesSampler(t):t.parentSampled!==void 0?n=t.parentSampled:typeof e.tracesSampleRate<"u"?n=e.tracesSampleRate:n=1;const r=Bn(n);return r===void 0?(M&&m.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()<r?[!0,r]:(M&&m.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,r]):(M&&m.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,r])}function al(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function cl(e,t,n,r){const s=ms(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:sn(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return pt(i,[o])}function ul(e,t,n,r){const s=ms(n),i=e.type&&e.type!=="replay_event"?e.type:"event";al(e,n&&n.sdk);const o=No(e,s,r,t);return delete e.sdkProcessingMetadata,pt(o,[[{type:i},e]])}function ll(e,t){function n(l){return!!l.trace_id&&!!l.public_key}const r=mt(e[0]),s=t&&t.getDsn(),i=t&&t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:sn(s)}},a=t&&t.getOptions().beforeSendSpan,c=a?l=>a(U(l)):l=>U(l),u=[];for(const l of e){const d=c(l);d&&u.push(ku(d))}return pt(o,u)}function dl(e,t,n){const r=fe(),s=r&&ce(r);s&&s.addEvent(e,{[Es]:t,[Ss]:n})}function pi(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[Ss],i=r[Es];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const hi=1e3;class vs{constructor(t={}){this._traceId=t.traceId||K(),this._spanId=t.spanId||K().substring(16),this._startTime=t.startTimestamp||de(),this._attributes={},this.setAttributes({[ae]:"manual",[Jt]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this}addLinks(t){return this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Ho:Uo}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=at(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this}end(t){this._endTime||(this._endTime=at(t),il(this),this._onSpanEnded())}getSpanJSON(){return ie({data:this._attributes,description:this._name,op:this._attributes[Jt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:zo(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ae],_metrics_summary:Ur(this),profile_id:this._attributes[Yu],exclusive_time:this._attributes[Fo],measurements:pi(this._events),is_segment:this._isStandaloneSpan&&ce(this)===this||void 0,segment_id:this._isStandaloneSpan?ce(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){M&&m.log("[Tracing] Adding an event to span:",t);const s=mi(n)?n:r||de(),i=mi(n)?{}:n||{},o={name:t,time:at(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=L();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===ce(this)))return;if(this._isStandaloneSpan){this._sampled?pl(ll([this],t)):(M&&m.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(di(this).scope||J()).captureEvent(r)}_convertSpanToTransaction(){if(!gi(U(this)))return;this._name||(M&&m.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=di(this),s=(t||J()).getClient()||L();if(this._sampled!==!0){M&&m.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),s&&s.recordDroppedEvent("sample_rate","transaction");return}const o=An(this).filter(d=>d!==this&&!fl(d)).map(d=>U(d)).filter(gi),a=this._attributes[Le],c={contexts:{trace:Xu(this)},spans:o.length>hi?o.sort((d,f)=>d.start_timestamp-f.start_timestamp).slice(0,hi):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...ie({dynamicSamplingContext:mt(this)})},_metrics_summary:Ur(this),...a&&{transaction_info:{source:a}}},u=pi(this._events);return u&&Object.keys(u).length&&(M&&m.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}}function mi(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function gi(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function fl(e){return e instanceof vs&&e.isStandaloneSpan()}function pl(e){const t=L();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}const r=t.getTransport();r&&r.send(e).then(null,s=>{M&&m.error("Error while sending span:",s)})}const Vo="__SENTRY_SUPPRESS_TRACING__";function Ze(e){const t=Xo();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=ml(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>ys(e.scope,o):s!==void 0?o=>Ko(s,o):o=>o())(()=>{const o=J(),a=_l(o);return e.onlyIfParent&&!a?new Bt:hl({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function Ko(e,t){const n=Xo();return n.withActiveSpan?n.withActiveSpan(e,t):ys(r=>(Xt(r,e||void 0),t(r)))}function hl({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ue())return new Bt;const s=Ee();let i;if(e&&!n)i=gl(e,r,t),jo(e,i);else if(e){const o=mt(e),{traceId:a,spanId:c}=e.spanContext(),u=ht(e);i=_i({traceId:a,parentSpanId:c,...t},r,u),fi(i,o)}else{const{traceId:o,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=_i({traceId:o,parentSpanId:c,...t},r,u),a&&fi(i,a)}return sl(i),nl(i,r,s),i}function ml(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=at(e.startTime),delete r.startTime,r}return n}function Xo(){const e=Ft();return an(e)}function _i(e,t,n){const r=L(),s=r&&r.getOptions()||{},{name:i="",attributes:o}=e,[a,c]=t.getScopeData().sdkProcessingMetadata[Vo]?[!1]:ol(s,{name:i,parentSampled:n,attributes:o,transactionContext:{name:i,parentSampled:n}}),u=new vs({...e,attributes:{[Le]:"custom",...e.attributes},sampled:a});return c!==void 0&&u.setAttribute(Po,c),r&&r.emit("spanStart",u),u}function gl(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[Vo]?!1:ht(e),o=i?new vs({...n,parentSpanId:r,traceId:s,sampled:i}):new Bt({traceId:s});jo(e,o);const a=L();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function _l(e){const t=Fn(e);if(!t)return;const n=L();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?ce(t):t}const xn={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},yl="heartbeatFailed",Sl="idleTimeout",El="finalTimeout",bl="externalFinish";function Jo(e,t={}){const n=new Map;let r=!1,s,i=bl,o=!t.disableAutoFinish;const a=[],{idleTimeout:c=xn.idleTimeout,finalTimeout:u=xn.finalTimeout,childSpanTimeout:l=xn.childSpanTimeout,beforeSpanEnd:d}=t,f=L();if(!f||!Ue())return new Bt;const p=J(),h=fe(),g=vl(e);g.end=new Proxy(g.end,{apply(_,y,k){d&&d(g);const[P,...b]=k,w=P||de(),A=at(w),Y=An(g).filter(z=>z!==g);if(!Y.length)return x(A),Reflect.apply(_,y,[A,...b]);const V=Y.map(z=>U(z).timestamp).filter(z=>!!z),te=V.length?Math.max(...V):void 0,O=U(g).start_timestamp,oe=Math.min(O?O+u/1e3:1/0,Math.max(O||-1/0,Math.min(A,te||1/0)));return x(oe),Reflect.apply(_,y,[oe,...b])}});function E(){s&&(clearTimeout(s),s=void 0)}function S(_){E(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=Sl,g.end(_))},c)}function v(_){s=setTimeout(()=>{!r&&o&&(i=yl,g.end(_))},l)}function I(_){E(),n.set(_,!0);const y=de();v(y+l/1e3)}function T(_){if(n.has(_)&&n.delete(_),n.size===0){const y=de();S(y+c/1e3)}}function x(_){r=!0,n.clear(),a.forEach(A=>A()),Xt(p,h);const y=U(g),{start_timestamp:k}=y;if(!k)return;(y.data||{})[Hr]||g.setAttribute(Hr,i),m.log(`[Tracing] Idle span "${y.op}" finished`);const b=An(g).filter(A=>A!==g);let w=0;b.forEach(A=>{A.isRecording()&&(A.setStatus({code:ne,message:"cancelled"}),A.end(_),M&&m.log("[Tracing] Cancelling span since span ended early",JSON.stringify(A,void 0,2)));const Y=U(A),{timestamp:V=0,start_timestamp:te=0}=Y,O=te<=_,oe=(u+c)/1e3,z=V-te<=oe;if(M){const pe=JSON.stringify(A,void 0,2);O?z||m.log("[Tracing] Discarding span since it finished after idle span final timeout",pe):m.log("[Tracing] Discarding span since it happened after idle span was finished",pe)}(!z||!O)&&(el(g,A),w++)}),w>0&&g.setAttribute("sentry.idle_span_discarded_spans",w)}return a.push(f.on("spanStart",_=>{if(r||_===g||U(_).timestamp)return;An(g).includes(_)&&I(_.spanContext().spanId)})),a.push(f.on("spanEnd",_=>{r||T(_.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",_=>{_===g&&(o=!0,S(),n.size&&v())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(g.setStatus({code:ne,message:"deadline_exceeded"}),i=El,g.end())},u),g}function vl(e){const t=Ze(e);return Xt(J(),t),M&&m.log("[Tracing] Started span is an idle span"),t}function jr(e,t,n,r=0){return new _e((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o({...t},n);M&&o.id&&a===null&&m.log(`Event processor "${o.id}" dropped event`),Qn(a)?a.then(c=>jr(e,c,n,r+1).then(s)).then(null,i):jr(e,a,n,r+1).then(s).then(null,i)}})}function Tl(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;Il(e,t),r&&Rl(e,r),Cl(e,n),wl(e,s),kl(e,i)}function yi(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:f,transactionName:p,span:h}=t;Wt(e,"extra",n),Wt(e,"tags",r),Wt(e,"user",s),Wt(e,"contexts",i),Wt(e,"sdkProcessingMetadata",a),o&&(e.level=o),p&&(e.transactionName=p),h&&(e.span=h),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,...f}}function Wt(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function Il(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t,c=ie(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=ie(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const l=ie(s);l&&Object.keys(l).length&&(e.user={...l,...e.user});const d=ie(i);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function wl(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function kl(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Rl(e,t){e.contexts={trace:Ju(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:mt(t),...e.sdkProcessingMetadata};const n=ce(t),r=U(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Cl(e,t){e.fingerprint=e.fingerprint?Co(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Qo(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||K(),timestamp:t.timestamp||on()},u=n.integrations||e.integrations.map(E=>E.name);Ml(c,e),Ol(c,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&Al(c,e.stackParser);const l=Dl(r,n.captureContext);n.mechanism&&Kt(c,n.mechanism);const d=s?s.getEventProcessors():[],f=qu().getScopeData();if(i){const E=i.getScopeData();yi(f,E)}if(l){const E=l.getScopeData();yi(f,E)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Tl(c,f);const h=[...d,...f.eventProcessors];return jr(h,c,n).then(E=>(E&&xl(E),typeof o=="number"&&o>0?Nl(E,o,a):E))}function Ml(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:bs),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=Tt(e.message,i));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=Tt(o.value,i));const a=e.request;a&&a.url&&(a.url=Tt(a.url,i))}const Si=new WeakMap;function Al(e,t){const n=$._sentryDebugIds;if(!n)return;let r;const s=Si.get(t);s?r=s:(r=new Map,Si.set(t,r));const i=Object.entries(n).reduce((o,[a,c])=>{let u;const l=r.get(a);l?u=l:(u=t(a),r.set(a,u));for(let d=u.length-1;d>=0;d--){const f=u[d];if(f.filename){o[f.filename]=c;break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function xl(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function Ol(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Nl(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:Ce(s.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)}};return e.contexts&&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(s=>({...s,...s.data&&{data:Ce(s.data,t,n)}}))),r}function Dl(e,t){if(!t)return e;const n=e?e.clone():new dt;return n.update(t),n}function Ts(e,t){return J().captureException(e,void 0)}function Zo(e,t){return J().captureEvent(e,t)}function Ll(e,t){Ee().setContext(e,t)}function Pl(e){Ee().addEventProcessor(e)}function Ei(e){const t=L(),n=Ee(),r=J(),{release:s,environment:i=bs}=t&&t.getOptions()||{},{userAgent:o}=$.navigator||{},a=Lu({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status==="ok"&&kt(c,{status:"exited"}),ea(),n.setSession(a),r.setSession(a),a}function ea(){const e=Ee(),t=J(),n=t.getSession()||e.getSession();n&&Pu(n),ta(),e.setSession(),t.setSession()}function ta(){const e=Ee(),t=J(),n=L(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function bi(e=!1){if(e){ea();return}ta()}const Fl="7";function Bl(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function $l(e){return`${Bl(e)}${e.projectId}/envelope/`}function Ul(e,t){return zc({sentry_key:e.publicKey,sentry_version:Fl,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Hl(e,t,n){return t||`${$l(e)}?${Ul(e,n)}`}const vi=[];function Wl(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function zl(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Co(n(t)):r=t;const s=Wl(r),i=s.findIndex(o=>o.name==="Debug");if(i>-1){const[o]=s.splice(i,1);s.push(o)}return s}function jl(e,t){const n={};return t.forEach(r=>{r&&na(e,r,n)}),n}function Ti(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function na(e,t,n){if(n[t.name]){M&&m.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,vi.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),vi.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}M&&m.log(`Integration installed: ${t.name}`)}const Ii="Not capturing exception because it's already been captured.";class ql{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Wc(t.dsn):M&&m.warn("No DSN provided, client will not send events."),this._dsn){const n=Hl(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const s=K();if(si(t))return M&&m.log(Ii),s;const i={event_id:s,...n};return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,s){const i={event_id:K(),...r},o=ls(t)?t:String(t),a=ds(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,s))),i.event_id}captureEvent(t,n,r){const s=K();if(n&&n.originalException&&si(n.originalException))return M&&m.log(Ii),s;const i={event_id:s,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||r)),i.event_id}captureSession(t){typeof t.release!="string"?M&&m.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),kt(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):$e(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];na(this,t,this._integrations),n||Ti(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=ul(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Tu(r,Ru(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=cl(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${t}:${n}`;M&&m.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(M&&m.error("Error while sending event:",n),n)):(M&&m.error("Transport disabled"),$e({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=jl(this,t),Ti(this,t)}_updateSessionFromEvent(t,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const c of i){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(kt(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new _e(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=Ee()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),Qo(i,t,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:l,spanId:d,parentSpanId:f,dsc:p}=c;a.contexts={trace:ie({trace_id:l,span_id:d,parent_span_id:f}),...a.contexts};const h=p||Zn(l,this);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(M){const i=s;i.logLevel==="log"?m.log(i.message):m.warn(i)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=sa(t),a=ra(t),c=t.type||"error",u=`before send for type \`${c}\``,l=typeof i>"u"?void 0:Bn(i);if(a&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",t),Ln(new Me(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d=c==="replay_event"?"replay":c,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,p).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",d,t),new Me("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return h;const E=Yl(this,s,h,n);return Gl(E,u)}).then(h=>{if(h===null){if(this.recordDroppedEvent("before_send",d,t),o){const v=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",v)}throw new Me(`${u} returned \`null\`, will not send event.`,"log")}const g=r&&r.getSession();if(!o&&g&&this._updateSessionFromEvent(g,h),o){const S=h.sdkProcessingMetadata&&h.sdkProcessingMetadata.spanCountBeforeProcessing||0,v=h.spans?h.spans.length:0,I=S-v;I>0&&this.recordDroppedEvent("before_send","span",I)}const E=h.transaction_info;if(o&&E&&h.transaction!==t.transaction){const S="custom";h.transaction_info={...E,source:S}}return this.sendEvent(h,n),h}).then(null,h=>{throw h instanceof Me?h:(this.captureException(h,{data:{__sentry__:!0},originalException:h}),new Me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${h}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){M&&m.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){M&&m.log("No outcomes to send");return}if(!this._dsn){M&&m.log("No dsn provided, will not send outcomes");return}M&&m.log("Sending outcomes:",t);const n=Mu(t,this._options.tunnel&&sn(this._dsn));this.sendEnvelope(n)}}function Gl(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Qn(e))return e.then(r=>{if(!wt(r)&&r!==null)throw new Me(n);return r},r=>{throw new Me(`${t} rejected with ${r}`)});if(!wt(e)&&e!==null)throw new Me(n);return e}function Yl(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=t;if(ra(n)&&s)return s(n,r);if(sa(n)){if(n.spans&&o){const a=[];for(const c of n.spans){const u=o(c);u?a.push(u):e.recordDroppedEvent("before_send","span")}n.spans=a}if(i){if(n.spans){const a=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(n,r)}}return n}function ra(e){return e.type===void 0}function sa(e){return e.type==="transaction"}function Vl(e,t){t.debug===!0&&(M?m.enable():Pt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),J().update(t.initialScope);const r=new e(t);return Kl(r),r.init(),r}function Kl(e){J().setClient(e)}const Xl=64;function Jl(e,t,n=pu(e.bufferSize||Xl)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(oi(o,(d,f)=>{const p=ai(f);if(Do(r,p)){const h=wi(d,f);e.recordDroppedEvent("ratelimit_backoff",p,h)}else a.push(d)}),a.length===0)return $e({});const c=pt(o[0],a),u=d=>{oi(c,(f,p)=>{const h=wi(f,p);e.recordDroppedEvent(d,ai(p),h)})},l=()=>t({body:Iu(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&M&&m.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Lo(r,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof Me)return M&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),$e({});throw d})}return{send:i,flush:s}}function wi(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Ql(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return ed(e,n)||Zl(e,r)}function Zl(e,t){return t?ki(e)===ki(t):!1}function ed(e,t){return t?e.includes(t.host):!1}function ki(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ia(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:it})),version:it}),e._metadata=s}const td=100;function Xe(e,t){const n=L(),r=Ee();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=td}=n.getOptions();if(i<=0)return;const a={timestamp:on(),...e},c=s?Pt(()=>s(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}let Ri;const nd="FunctionToString",Ci=new WeakMap,rd=()=>({name:nd,setupOnce(){Ri=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=ps(this),n=Ci.has(L())&&t!==void 0?t:this;return Ri.apply(n,e)}}catch{}},setup(e){Ci.set(e,!0)}}),sd=rd,id=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],od="InboundFilters",ad=(e={})=>({name:od,processEvent(t,n,r){const s=r.getOptions(),i=ud(e,s);return ld(t,i)?null:t}}),cd=ad;function ud(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:id],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function ld(e,t){return t.ignoreInternal&&gd(e)?(M&&m.warn(`Event dropped due to being internal Sentry Error.
Event: ${He(e)}`),!0):dd(e,t.ignoreErrors)?(M&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${He(e)}`),!0):yd(e)?(M&&m.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${He(e)}`),!0):fd(e,t.ignoreTransactions)?(M&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${He(e)}`),!0):pd(e,t.denyUrls)?(M&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${He(e)}.
Url: ${$n(e)}`),!0):hd(e,t.allowUrls)?!1:(M&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${He(e)}.
Url: ${$n(e)}`),!0)}function dd(e,t){return e.type||!t||!t.length?!1:md(e).some(n=>Ge(n,t))}function fd(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Ge(n,t):!1}function pd(e,t){if(!t||!t.length)return!1;const n=$n(e);return n?Ge(n,t):!1}function hd(e,t){if(!t||!t.length)return!0;const n=$n(e);return n?Ge(n,t):!0}function md(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function gd(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function _d(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function $n(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?_d(t):null}catch{return M&&m.error(`Cannot extract url for event ${He(e)}`),null}}function yd(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}const Sd="Dedupe",Ed=()=>{let e;return{name:Sd,processEvent(t){if(t.type)return t;try{if(vd(t,e))return M&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},bd=Ed;function vd(e,t){return t?!!(Td(e,t)||Id(e,t)):!1}function Td(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!aa(e,t)||!oa(e,t))}function Id(e,t){const n=Mi(t),r=Mi(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!aa(e,t)||!oa(e,t))}function oa(e,t){let n=ei(e),r=ei(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function aa(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Mi(e){return e.exception&&e.exception.values&&e.exception.values[0]}function wd(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const i=Ue()&&t(e.fetchData.url);if(e.endTimestamp&&i){const h=e.fetchData.__span;if(!h)return;const g=r[h];g&&(Cd(g,e),delete r[h]);return}const o=J(),a=L(),{method:c,url:u}=e.fetchData,l=Rd(u),d=l?ot(l).host:void 0,f=!!fe(),p=i&&f?Ze({name:`${c} ${u}`,attributes:{url:u,type:"fetch","http.method":c,"http.url":l,"server.address":d,[ae]:s,[Jt]:"http.client"}}):new Bt;if(e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(e.fetchData.url)&&a){const h=e.args[0];e.args[1]=e.args[1]||{};const g=e.args[1];g.headers=kd(h,a,o,g,Ue()&&f?p:void 0)}return p}function kd(e,t,n,r,s){const i=Ee(),{traceId:o,spanId:a,sampled:c,dsc:u}={...i.getPropagationContext(),...n.getPropagationContext()},l=s?Wo(s):hs(o,a,c),d=Oo(u||(s?mt(s):Zn(o,t))),f=r.headers||(typeof Request<"u"&&Fe(e,Request)?e.headers:void 0);if(f)if(typeof Headers<"u"&&Fe(f,Headers)){const p=new Headers(f);return p.append("sentry-trace",l),d&&p.append(Fr,d),p}else if(Array.isArray(f)){const p=[...f,["sentry-trace",l]];return d&&p.push([Fr,d]),p}else{const p="baggage"in f?f.baggage:void 0,h=[];return Array.isArray(p)?h.push(...p):p&&h.push(p),d&&h.push(d),{...f,"sentry-trace":l,baggage:h.length>0?h.join(","):void 0}}else return{"sentry-trace":l,baggage:d}}function Rd(e){try{return new URL(e).href}catch{return}}function Cd(e,t){if(t.response){$o(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:ne,message:"internal_error"});e.end()}const C=$;let qr=0;function ca(){return qr>0}function Md(){qr++,setTimeout(()=>{qr--})}function Ct(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return s;if(ps(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{const i=s.map(o=>Ct(o,t));return e.apply(this,i)}catch(i){throw Md(),ys(o=>{o.addEventProcessor(a=>(t.mechanism&&(Lr(a,void 0),Kt(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Ts(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}_o(r,e),Se(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const we=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Is(e,t){const n=ws(e,t),r={type:t&&t.name,value:Dd(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ad(e,t,n,r){const s=L(),i=s&&s.getOptions().normalizeDepth,o=$d(t),a={__serialized__:Mo(t,i)};if(o)return{exception:{values:[Is(e,o)]},extra:a};const c={exception:{values:[{type:Jn(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Fd(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=ws(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Sr(e,t){return{exception:{values:[Is(e,t)]}}}function ws(e,t){const n=t.stacktrace||t.stack||"",r=Od(t),s=Nd(t);try{return e(n,r,s)}catch{}return[]}const xd=/Minified React error #\d+;/i;function Od(e){return e&&xd.test(e.message)?1:0}function Nd(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Dd(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Ld(e,t,n,r){const s=n&&n.syntheticException||void 0,i=ks(e,t,s,r);return Kt(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),$e(i)}function Pd(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=Gr(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),$e(o)}function ks(e,t,n,r,s){let i;if(fo(t)&&t.error)return Sr(e,t.error);if(Gs(t)||kc(t)){const o=t;if("stack"in t)i=Sr(e,t);else{const a=o.name||(Gs(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=Gr(e,c,n,r),Lr(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return us(t)?Sr(e,t):wt(t)||Jn(t)?(i=Ad(e,t,n,s),Kt(i,{synthetic:!0}),i):(i=Gr(e,t,n,r),Lr(i,`${t}`),Kt(i,{synthetic:!0}),i)}function Gr(e,t,n,r){const s={};if(r&&n){const i=ws(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(ls(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Fd(e,{isUnhandledRejection:t}){const n=jc(e),r=t?"promise rejection":"exception";return fo(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Jn(e)?`Event \`${Bd(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Bd(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function $d(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function Ud(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:sn(r)}},i=Hd(e);return pt(s,[i])}function Hd(e){return[{type:"user_report"},e]}class Wd extends ql{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=C.SENTRY_SDK_SOURCE||iu();ia(n,"browser",["browser"],r),super(n),n.sendClientReports&&C.document&&C.document.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Ld(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Pd(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){we&&m.warn("SDK not enabled, will not capture user feedback.");return}const n=Ud(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const ge=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,zd=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",$t=(e,t,n,r)=>{let s,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(s||0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=zd(t.value,n),e(t)))}},R=$,jd=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,cn=()=>R.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],er=()=>{const e=cn();return e&&e.activationStart||0},Ut=(e,t)=>{const n=cn();let r="navigate";return n&&(R.document&&R.document.prerendering||er()>0?r="prerender":R.document&&R.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:jd(),navigationType:r}},gt=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},tr=e=>{const t=n=>{(n.type==="pagehide"||R.document&&R.document.visibilityState==="hidden")&&e(n)};R.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Rs=e=>{let t=!1;return n=>{t||(e(n),t=!0)}};let Qt=-1;const qd=()=>{Qt=R.document.visibilityState==="hidden"&&!R.document.prerendering?0:1/0},Un=e=>{R.document.visibilityState==="hidden"&&Qt>-1&&(Qt=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("visibilitychange",Un,!0),removeEventListener("prerenderingchange",Un,!0))},Gd=()=>{addEventListener("visibilitychange",Un,!0),addEventListener("prerenderingchange",Un,!0)},nr=()=>(R.document&&Qt<0&&(qd(),Gd()),{get firstHiddenTime(){return Qt}}),un=e=>{R.document&&R.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Yd=[1800,3e3],Vd=(e,t={})=>{un(()=>{const n=nr(),r=Ut("FCP");let s;const o=gt("paint",a=>{a.forEach(c=>{c.name==="first-contentful-paint"&&(o.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-er(),0),r.entries.push(c),s(!0)))})});o&&(s=$t(e,r,Yd,t.reportAllChanges))})},Kd=[.1,.25],Xd=(e,t={})=>{Vd(Rs(()=>{const n=Ut("CLS",0);let r,s=0,i=[];const o=c=>{c.forEach(u=>{if(!u.hadRecentInput){const l=i[0],d=i[i.length-1];s&&l&&d&&u.startTime-d.startTime<1e3&&u.startTime-l.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u])}}),s>n.value&&(n.value=s,n.entries=i,r())},a=gt("layout-shift",o);a&&(r=$t(e,n,Kd,t.reportAllChanges),tr(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},Jd=[100,300],Qd=(e,t={})=>{un(()=>{const n=nr(),r=Ut("FID");let s;const i=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),s(!0))},o=c=>{c.forEach(i)},a=gt("first-input",o);s=$t(e,r,Jd,t.reportAllChanges),a&&tr(Rs(()=>{o(a.takeRecords()),a.disconnect()}))})};let ua=0,Er=1/0,En=0;const Zd=e=>{e.forEach(t=>{t.interactionId&&(Er=Math.min(Er,t.interactionId),En=Math.max(En,t.interactionId),ua=En?(En-Er)/7+1:0)})};let Yr;const ef=()=>Yr?ua:performance.interactionCount||0,tf=()=>{"interactionCount"in performance||Yr||(Yr=gt("event",Zd,{type:"event",buffered:!0,durationThreshold:0}))},nf=[200,500],rf=0,la=()=>ef()-rf,Ai=10,De=[],br={},xi=e=>{const t=De[De.length-1],n=br[e.interactionId];if(n||De.length<Ai||t&&e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};br[r.id]=r,De.push(r)}De.sort((r,s)=>s.latency-r.latency),De.splice(Ai).forEach(r=>{delete br[r.id]})}},sf=()=>{const e=Math.min(De.length-1,Math.floor(la()/50));return De[e]},of=(e,t={})=>{un(()=>{tf();const n=Ut("INP");let r;const s=o=>{o.forEach(c=>{c.interactionId&&xi(c),c.entryType==="first-input"&&!De.some(l=>l.entries.some(d=>c.duration===d.duration&&c.startTime===d.startTime))&&xi(c)});const a=sf();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=gt("event",s,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:40});r=$t(e,n,nf,t.reportAllChanges),i&&("PerformanceEventTiming"in R&&"interactionId"in PerformanceEventTiming.prototype&&i.observe({type:"first-input",buffered:!0}),tr(()=>{s(i.takeRecords()),n.value<0&&la()>0&&(n.value=0,n.entries=[]),r(!0)}))})},af=[2500,4e3],Oi={},cf=(e,t={})=>{un(()=>{const n=nr(),r=Ut("LCP");let s;const i=a=>{const c=a[a.length-1];c&&c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-er(),0),r.entries=[c],s())},o=gt("largest-contentful-paint",i);if(o){s=$t(e,r,af,t.reportAllChanges);const a=Rs(()=>{Oi[r.id]||(i(o.takeRecords()),o.disconnect(),Oi[r.id]=!0,s(!0))});["keydown","click"].forEach(c=>{R.document&&addEventListener(c,()=>setTimeout(a,0),!0)}),tr(a)}})},uf=[800,1800],Vr=e=>{R.document&&R.document.prerendering?un(()=>Vr(e)):R.document&&R.document.readyState!=="complete"?addEventListener("load",()=>Vr(e),!0):setTimeout(e,0)},lf=(e,t={})=>{const n=Ut("TTFB"),r=$t(e,n,uf,t.reportAllChanges);Vr(()=>{const s=cn();if(s){const i=s.responseStart;if(i<=0||i>performance.now())return;n.value=Math.max(i-er(),0),n.entries=[s],r(!0)}})},jt={},Hn={};let da,fa,pa,ha,ma;function ga(e,t=!1){return ln("cls",e,ff,da,t)}function _a(e,t=!1){return ln("lcp",e,hf,pa,t)}function ya(e){return ln("fid",e,pf,fa)}function df(e){return ln("ttfb",e,mf,ha)}function Sa(e){return ln("inp",e,gf,ma)}function Mt(e,t){return Ea(e,t),Hn[e]||(_f(e),Hn[e]=!0),ba(e,t)}function Ht(e,t){const n=jt[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){ge&&m.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${Be(r)}
Error:`,s)}}function ff(){return Xd(e=>{Ht("cls",{metric:e}),da=e},{reportAllChanges:!0})}function pf(){return Qd(e=>{Ht("fid",{metric:e}),fa=e})}function hf(){return cf(e=>{Ht("lcp",{metric:e}),pa=e},{reportAllChanges:!0})}function mf(){return lf(e=>{Ht("ttfb",{metric:e}),ha=e})}function gf(){return of(e=>{Ht("inp",{metric:e}),ma=e})}function ln(e,t,n,r,s=!1){Ea(e,t);let i;return Hn[e]||(i=n(),Hn[e]=!0),r&&t({metric:r}),ba(e,t,s?i:void 0)}function _f(e){const t={};e==="event"&&(t.durationThreshold=0),gt(e,n=>{Ht(e,{entries:n})},t)}function Ea(e,t){jt[e]=jt[e]||[],jt[e].push(t)}function ba(e,t,n){return()=>{n&&n();const r=jt[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function yf(e){return"duration"in e}function vr(e){return typeof e=="number"&&isFinite(e)}function At(e,t,n,{...r}){const s=U(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Ko(e,()=>{const i=Ze({startTime:t,...r});return i&&i.end(n),i})}function Cs(){return R&&R.addEventListener&&R.performance}function Z(e){return e/1e3}const Sf=2147483647;let Ni=0,re={},Re,qt;function Ef(){const e=Cs();if(e&&me){e.mark&&R.performance.mark("sentry-tracing-init");const t=kf(),n=If(),r=wf(),s=Rf();return()=>{t(),n(),r(),s()}}return()=>{}}function bf(){Mt("longtask",({entries:e})=>{if(fe())for(const t of e){const n=Z(me+t.startTime),r=Z(t.duration),s=Ze({name:"Main UI thread blocked",op:"ui.long-task",startTime:n,attributes:{[ae]:"auto.ui.browser.metrics"}});s&&s.end(n+r)}})}function vf(){new PerformanceObserver(t=>{if(fe())for(const n of t.getEntries()){if(!n.scripts[0])continue;const r=Z(me+n.startTime),s=Z(n.duration),i={[ae]:"auto.ui.browser.metrics"},o=n.scripts[0],{invoker:a,invokerType:c,sourceURL:u,sourceFunctionName:l,sourceCharPosition:d}=o;i["browser.script.invoker"]=a,i["browser.script.invoker_type"]=c,u&&(i["code.filepath"]=u),l&&(i["code.function"]=l),d!==-1&&(i["browser.script.source_char_position"]=d);const f=Ze({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:r,attributes:i});f&&f.end(r+s)}}).observe({type:"long-animation-frame",buffered:!0})}function Tf(){Mt("event",({entries:e})=>{if(fe()){for(const t of e)if(t.name==="click"){const n=Z(me+t.startTime),r=Z(t.duration),s={name:Ke(t.target),op:`ui.interaction.${t.name}`,startTime:n,attributes:{[ae]:"auto.ui.browser.metrics"}},i=mo(t.target);i&&(s.attributes["ui.component_name"]=i);const o=Ze(s);o&&o.end(n+r)}}})}function If(){return ga(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ge&&m.log("[Measurements] Adding CLS"),re.cls={value:e.value,unit:""},qt=t)},!0)}function wf(){return _a(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ge&&m.log("[Measurements] Adding LCP"),re.lcp={value:e.value,unit:"millisecond"},Re=t)},!0)}function kf(){return ya(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Z(me),r=Z(t.startTime);ge&&m.log("[Measurements] Adding FID"),re.fid={value:e.value,unit:"millisecond"},re["mark.fid"]={value:n+r,unit:"second"}})}function Rf(){return df(({metric:e})=>{e.entries[e.entries.length-1]&&(ge&&m.log("[Measurements] Adding TTFB"),re.ttfb={value:e.value,unit:"millisecond"})})}function Cf(e){const t=Cs();if(!t||!R.performance.getEntries||!me)return;ge&&m.log("[Tracing] Adding & adjusting spans using Performance API");const n=Z(me),r=t.getEntries(),{op:s,start_timestamp:i}=U(e);if(r.slice(Ni).forEach(o=>{const a=Z(o.startTime),c=Z(Math.max(0,o.duration));if(!(s==="navigation"&&i&&n+a<i))switch(o.entryType){case"navigation":{Af(e,o,n);break}case"mark":case"paint":case"measure":{Mf(e,o,a,c,n);const u=nr(),l=o.startTime<u.firstHiddenTime;o.name==="first-paint"&&l&&(ge&&m.log("[Measurements] Adding FP"),re.fp={value:o.startTime,unit:"millisecond"}),o.name==="first-contentful-paint"&&l&&(ge&&m.log("[Measurements] Adding FCP"),re.fcp={value:o.startTime,unit:"millisecond"});break}case"resource":{Of(e,o,o.name,a,c,n);break}}}),Ni=Math.max(r.length-1,0),Nf(e),s==="pageload"){Lf(re),["fcp","fp","lcp"].forEach(a=>{const c=re[a];if(!c||!i||n>=i)return;const u=c.value,l=n+Z(u),d=Math.abs((l-i)*1e3),f=d-u;ge&&m.log(`[Measurements] Normalized ${a} from ${u} to ${d} (${f})`),c.value=d});const o=re["mark.fid"];o&&re.fid&&(At(e,o.value,o.value+Z(re.fid.value),{name:"first input delay",op:"ui.action",attributes:{[ae]:"auto.ui.browser.metrics"}}),delete re["mark.fid"]),"fcp"in re||delete re.cls,Object.entries(re).forEach(([a,c])=>{dl(a,c.value,c.unit)}),Df(e)}Re=void 0,qt=void 0,re={}}function Mf(e,t,n,r,s){const i=cn(),o=Z(i?i.requestStart:0),a=s+Math.max(n,o),c=s+n,u=c+r,l={[ae]:"auto.resource.browser.metrics"};return a!==c&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=a),At(e,a,u,{name:t.name,op:t.entryType,attributes:l}),a}function Af(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{bn(e,t,r,n)}),bn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),bn(e,t,"fetch",n,"cache","domainLookupStart"),bn(e,t,"domainLookup",n,"DNS"),xf(e,t,n)}function bn(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||At(e,r+Z(a),r+Z(o),{op:"browser",name:s||n,attributes:{[ae]:"auto.ui.browser.metrics"}})}function xf(e,t,n){const r=n+Z(t.requestStart),s=n+Z(t.responseEnd),i=n+Z(t.responseStart);t.responseEnd&&(At(e,r,s,{op:"browser",name:"request",attributes:{[ae]:"auto.ui.browser.metrics"}}),At(e,i,s,{op:"browser",name:"response",attributes:{[ae]:"auto.ui.browser.metrics"}}))}function Of(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=ot(n),a={[ae]:"auto.resource.browser.metrics"};Tr(a,t,"transferSize","http.response_transfer_size"),Tr(a,t,"encodedBodySize","http.response_content_length"),Tr(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(R.location.origin);const c=i+r,u=c+s;At(e,c,u,{name:n.replace(R.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function Nf(e){const t=R.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),vr(n.rtt)&&(re["connection.rtt"]={value:n.rtt,unit:"millisecond"})),vr(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),vr(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Df(e){Re&&(ge&&m.log("[Measurements] Adding LCP Data"),Re.element&&e.setAttribute("lcp.element",Ke(Re.element)),Re.id&&e.setAttribute("lcp.id",Re.id),Re.url&&e.setAttribute("lcp.url",Re.url.trim().slice(0,200)),e.setAttribute("lcp.size",Re.size)),qt&&qt.sources&&(ge&&m.log("[Measurements] Adding CLS Data"),qt.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Ke(t.node))))}function Tr(e,t,n,r){const s=t[n];s!=null&&s<Sf&&(e[r]=s)}function Lf(e){const t=cn();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(ge&&m.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Pf=1e3;let Di,Kr,Xr;function va(e){const t="dom";Je(t,e),Qe(t,Ff)}function Ff(){if(!R.document)return;const e=ye.bind(null,"dom"),t=Li(e,!0);R.document.addEventListener("click",t,!1),R.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=R[n]&&R[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(se(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{refCount:0};if(!l.handler){const d=Li(e);l.handler=d,s.call(this,i,d,a)}l.refCount++}catch{}return s.call(this,i,o,a)}}),se(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[i];l&&(l.refCount--,l.refCount<=0&&(s.call(this,i,l.handler,a),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}function Bf(e){if(e.type!==Kr)return!1;try{if(!e.target||e.target._sentryId!==Xr)return!1}catch{}return!0}function $f(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Li(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Uf(n);if($f(n.type,r))return;Se(n,"_sentryCaptured",!0),r&&!r._sentryId&&Se(r,"_sentryId",K());const s=n.type==="keypress"?"input":n.type;Bf(n)||(e({event:n,name:s,global:t}),Kr=n.type,Xr=r?r._sentryId:void 0),clearTimeout(Di),Di=R.setTimeout(()=>{Xr=void 0,Kr=void 0},Pf)}}function Uf(e){try{return e.target}catch{return null}}let vn;function rr(e){const t="history";Je(t,e),Qe(t,Hf)}function Hf(){if(!Du())return;const e=R.onpopstate;R.onpopstate=function(...n){const r=R.location.href,s=vn;if(vn=r,ye("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=vn,o=String(s);vn=o,ye("history",{from:i,to:o})}return n.apply(this,r)}}se(R.history,"pushState",t),se(R.history,"replaceState",t)}const On={};function Ta(e){const t=On[e];if(t)return t;let n=R[e];if(Nr(n))return On[e]=n.bind(R);const r=R.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){ge&&m.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(On[e]=n.bind(R))}function Pi(e){On[e]=void 0}function ft(...e){return Ta("setTimeout")(...e)}const rt="__sentry_xhr_v3__";function Ia(e){const t="xhr";Je(t,e),Qe(t,Wf)}function Wf(){if(!R.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;se(e,"open",function(t){return function(...n){const r=de()*1e3,s=Pe(n[0])?n[0].toUpperCase():void 0,i=zf(n[1]);if(!s||!i)return t.apply(this,n);this[rt]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const a=this[rt];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={endTimestamp:de()*1e3,startTimestamp:r,xhr:this};ye("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?se(this,"onreadystatechange",function(a){return function(...c){return o(),a.apply(this,c)}}):this.addEventListener("readystatechange",o),se(this,"setRequestHeader",function(a){return function(...c){const[u,l]=c,d=this[rt];return d&&Pe(u)&&Pe(l)&&(d.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),t.apply(this,n)}}),se(e,"send",function(t){return function(...n){const r=this[rt];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={startTimestamp:de()*1e3,xhr:this};return ye("xhr",s),t.apply(this,n)}})}function zf(e){if(Pe(e))return e;try{return e.toString()}catch{}}const Ir=[],Nn=new Map;function jf(){if(Cs()&&me){const t=qf();return()=>{t()}}return()=>{}}const Fi={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 qf(){return Sa(({metric:e})=>{const t=L();if(!t||e.value==null)return;const n=e.entries.find(_=>_.duration===e.value&&Fi[_.name]);if(!n)return;const{interactionId:r}=n,s=Fi[n.name],i=t.getOptions(),o=Z(me+n.startTime),a=Z(e.value),c=J(),u=fe(),l=u?ce(u):void 0,f=(r!=null?Nn.get(r):void 0)||l,p=f?U(f).description:c.getScopeData().transactionName,h=c.getUser(),g=t.getIntegrationByName("Replay"),E=g&&g.getReplayId(),S=h!==void 0?h.email||h.id||h.ip_address:void 0;let v;try{v=c.getScopeData().contexts.profile.profile_id}catch{}const I=Ke(n.target),T=ie({release:i.release,environment:i.environment,transaction:p,[Fo]:e.value,[ae]:"auto.http.browser.inp",user:S||void 0,profile_id:v||void 0,replay_id:E||void 0,"user_agent.original":R.navigator&&R.navigator.userAgent}),x=Ze({name:I,op:`ui.interaction.${s}`,attributes:T,startTime:o,experimental:{standalone:!0}});x.addEvent("inp",{[Ss]:"millisecond",[Es]:e.value}),x.end(o+a)})}function Gf(e){const t=({entries:n})=>{const r=fe(),s=r&&ce(r);n.forEach(i=>{if(!yf(i)||!s)return;const o=i.interactionId;if(o!=null&&!Nn.has(o)){if(Ir.length>10){const a=Ir.shift();Nn.delete(a)}Ir.push(o),Nn.set(o,s)}})};Mt("event",t),Mt("first-input",t)}function Yf(e,t=Ta("fetch")){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Pi("fetch"),Ln("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Pi("fetch"),n-=o,r--,Ln(c)}}return Jl(e,s)}const Vf=30,Kf=50;function Jr(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?lt:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Xf=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Jf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Qf=/\((\S*)(?::(\d+))(?::(\d+))\)/,Zf=e=>{const t=Xf.exec(e);if(t){const[,r,s,i]=t;return Jr(r,lt,+s,+i)}const n=Jf.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=Qf.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=wa(n[1]||lt,n[2]);return Jr(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},ep=[Vf,Zf],tp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,np=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rp=e=>{const t=tp.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=np.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||lt;return[s,r]=wa(s,r),Jr(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},sp=[Kf,rp],ip=[ep,sp],op=Eo(...ip),wa=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:lt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Tn=1024,ap="Breadcrumbs",cp=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:ap,setup(n){t.console&&Vc(fp(n)),t.dom&&va(dp(n,t.dom)),t.xhr&&Ia(pp(n)),t.fetch&&To(hp(n)),t.history&&rr(mp(n)),t.sentry&&n.on("beforeSendEvent",lp(n))}}},up=cp;function lp(e){return function(n){L()===e&&Xe({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:He(n)},{event:n})}}function dp(e,t){return function(r){if(L()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Tn&&(we&&m.warn(`\`dom.maxStringLength\` cannot exceed ${Tn}, but a value of ${a} was configured. Sentry will use ${Tn} instead.`),a=Tn),typeof o=="string"&&(o=[o]);try{const u=r.event,l=gp(u)?u.target:u;s=Ke(l,{keyAttrs:o,maxStringLength:a}),i=mo(l)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),Xe(c,{event:r.event,name:r.name,global:r.global})}}function fp(e){return function(n){if(L()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:mu(n.level),message:Ys(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Ys(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Xe(r,{input:n.args,level:n.level})}}function pp(e){return function(n){if(L()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[rt];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:u}=i,l={method:o,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};Xe({category:"xhr",data:l,type:"http"},d)}}function hp(e){return function(n){if(L()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};Xe({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s};Xe({category:"fetch",data:o,type:"http"},a)}}}function mp(e){return function(n){if(L()!==e)return;let r=n.from,s=n.to;const i=ot(C.location.href);let o=r?ot(r):void 0;const a=ot(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),Xe({category:"navigation",data:{from:r,to:s}})}}function gp(e){return!!e&&!!e.target}const _p=["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"],yp="BrowserApiErrors",Sp=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:yp,setupOnce(){t.setTimeout&&se(C,"setTimeout",Bi),t.setInterval&&se(C,"setInterval",Bi),t.requestAnimationFrame&&se(C,"requestAnimationFrame",bp),t.XMLHttpRequest&&"XMLHttpRequest"in C&&se(XMLHttpRequest.prototype,"send",vp);const n=t.eventTarget;n&&(Array.isArray(n)?n:_p).forEach(Tp)}}},Ep=Sp;function Bi(e){return function(...t){const n=t[0];return t[0]=Ct(n,{mechanism:{data:{function:Be(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function bp(e){return function(t){return e.apply(this,[Ct(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Be(e)},handled:!1,type:"instrument"}})])}}function vp(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&se(n,s,function(i){const o={mechanism:{data:{function:s,handler:Be(i)},handled:!1,type:"instrument"}},a=ps(i);return a&&(o.mechanism.data.handler=Be(a)),Ct(i,o)})}),e.apply(this,t)}}function Tp(e){const t=C,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(se(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=Ct(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Be(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Ct(i,{mechanism:{data:{function:"addEventListener",handler:Be(i),target:e},handled:!1,type:"instrument"}}),o])}}),se(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,o)}catch{}return r.call(this,s,a,o)}}))}const Ip="GlobalHandlers",wp=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ip,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Rp(n),$i("onerror")),t.onunhandledrejection&&(Cp(n),$i("onunhandledrejection"))}}},kp=wp;function Rp(e){wo(t=>{const{stackParser:n,attachStacktrace:r}=ka();if(L()!==e||ca())return;const{msg:s,url:i,line:o,column:a,error:c}=t,u=xp(ks(n,c||s,void 0,r,!1),i,o,a);u.level="error",Zo(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Cp(e){ko(t=>{const{stackParser:n,attachStacktrace:r}=ka();if(L()!==e||ca())return;const s=Mp(t),i=ds(s)?Ap(s):ks(n,s,void 0,r,!0);i.level="error",Zo(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Mp(e){if(ds(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 Ap(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function xp(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=Pe(t)&&t.length>0?t:ho();return c.length===0&&c.push({colno:u,filename:d,function:lt,in_app:!0,lineno:l}),e}function $i(e){we&&m.log(`Global Handler attached: ${e}`)}function ka(){const e=L();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Op=()=>({name:"HttpContext",preprocessEvent(e){if(!C.navigator&&!C.location&&!C.document)return;const t=e.request&&e.request.url||C.location&&C.location.href,{referrer:n}=C.document||{},{userAgent:r}=C.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}}),Np="cause",Dp=5,Lp="LinkedErrors",Pp=(e={})=>{const t=e.limit||Dp,n=e.key||Np;return{name:Lp,preprocessEvent(r,s,i){const o=i.getOptions();xc(Is,o.stackParser,o.maxValueLength,n,t,r,s)}}},Fp=Pp;function Ra(e){return[cd(),sd(),Ep(),up(),kp(),Fp(),bd(),Op()]}function Bp(e={}){return{...{defaultIntegrations:Ra(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:C.SENTRY_RELEASE&&C.SENTRY_RELEASE.id?C.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0},...e}}function $p(){const e=typeof C.window<"u"&&C;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,s=C.location&&C.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:"],o=!!r&&C===C.top&&i.some(c=>s.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!r&&!o&&!a}function Up(e={}){const t=Bp(e);if($p()){Pt(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}we&&(bo()||m.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:Gc(t.stackParser||op),integrations:zl(t),transport:t.transport||Yf},r=Vl(Wd,n);return t.autoSessionTracking&&Hp(),r}function Hp(){if(typeof C.document>"u"){we&&m.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Ei({ignoreDuration:!0}),bi(),rr(({from:e,to:t})=>{e!==void 0&&e!==t&&(Ei({ignoreDuration:!0}),bi())})}const G=$,Ms="sentryReplaySession",Wp="replay_event",As="Unable to send Replay",zp=3e5,jp=9e5,qp=5e3,Gp=5500,Yp=6e4,Vp=5e3,Kp=3,Ui=15e4,In=5e3,Xp=3e3,Jp=300,xs=2e7,Qp=4999,Zp=15e3,Hi=36e5;function Qr(e,t){return e??t()}function Zt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var ee;(function(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"})(ee||(ee={}));function eh(e){return e.nodeType===e.ELEMENT_NODE}function Gt(e){const t=Zt([e,"optionalAccess",n=>n.host]);return Zt([t,"optionalAccess",n=>n.shadowRoot])===e}function Yt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function th(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function nh(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(" ")+";"}function Wn(e){try{const t=e.rules||e.cssRules;return t?th(Array.from(t,Ca).join("")):null}catch{return null}}function Ca(e){let t;if(sh(e))try{t=Wn(e.styleSheet)||nh(e)}catch{}else if(ih(e)&&e.selectorText.includes(":"))return rh(e.cssText);return t||e.cssText}function rh(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function sh(e){return"styleSheet"in e}function ih(e){return"selectorText"in e}class Ma{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=Zt([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return Qr(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function oh(){return new Ma}function sr({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function en({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function xt(e){return e.toLowerCase()}function Zr(e){return e.toUpperCase()}const Wi="__rrweb_original__";function ah(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=Wi in i?i[Wi]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Os(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?xt(t):null}function zn(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Aa(e,t){let n;try{n=new URL(e,Qr(t,()=>window.location.href))}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return Qr(Zt([s,"optionalAccess",i=>i[1]]),()=>null)}const zi={};function xa(e){const t=zi[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return zi[e]=r.bind(window)}function es(...e){return xa("setTimeout")(...e)}function Oa(...e){return xa("clearTimeout")(...e)}let ch=1;const uh=new RegExp("[^a-z0-9-_:]"),tn=-2;function Ns(){return ch++}function lh(e){if(e instanceof HTMLFormElement)return"form";const t=xt(e.tagName);return uh.test(t)?"div":t}function dh(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let _t,ji;const fh=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ph=/^(?:[a-z+]+:)?\/\//i,hh=/^www\..*/i,mh=/^(data:)([^,]*),(.*)/i;function jn(e,t){return(e||"").replace(fh,(n,r,s,i,o,a)=>{const c=s||o||a,u=r||i||"";if(!c)return n;if(ph.test(c)||hh.test(c))return`url(${u}${c}${u})`;if(mh.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${dh(t)+c}${u})`;const l=t.split("/"),d=c.split("/");l.pop();for(const f of d)f!=="."&&(f===".."?l.pop():l.push(f));return`url(${u}${l.join("/")}${u})`})}const gh=/^[^ \t\n\r\u000c]+/,_h=/^[, \t\n\r\u000c]+/;function yh(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(_h),!(n>=t.length);){let i=r(gh);if(i.slice(-1)===",")i=St(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=St(e,i);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}function St(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function Sh(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Ds(){const e=document.createElement("a");return e.href="",e.href}function Na(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?St(e,r):n==="srcset"?yh(e,r):n==="style"?jn(r,Ds()):t==="object"&&n==="data"?St(e,r):typeof i=="function"?i(n,r,s):r)}function Da(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Eh(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function bh(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function st(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:st(e.parentNode,t,n,r+1)}function Et(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(bh(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Ot(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=st(o,Et(r,s)),c<0)return!0;a=st(o,Et(t,n),c>=0?c:1/0)}else{if(a=st(o,Et(t,n)),a<0)return!1;c=st(o,Et(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function vh(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=es(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{Oa(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return es(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Th(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=es(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Oa(i),r=!0,t()})}function Ih(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:g,maskInputFn:E,dataURLOptions:S={},inlineImages:v,recordCanvas:I,keepIframeSrcFn:T,newlyAddedElement:x=!1}=t,_=wh(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ee.Document,childNodes:[],compatMode:e.compatMode}:{type:ee.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ee.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return Rh(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:E,dataURLOptions:S,inlineImages:v,recordCanvas:I,keepIframeSrcFn:T,newlyAddedElement:x,rootId:_,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return kh(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:g,maskInputOptions:h,maskInputFn:E,rootId:_});case e.CDATA_SECTION_NODE:return{type:ee.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:ee.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function wh(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function kh(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||Zt([e,"access",S=>S.parentNode,"access",S=>S.sheet,"optionalAccess",S=>S.cssRules])&&(f=Wn(e.parentNode.sheet))}catch(S){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`,e)}f=jn(f,Ds())}h&&(f="SCRIPT_PLACEHOLDER");const E=Ot(e,r,i,s,o,n);if(!p&&!h&&!g&&f&&E&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),g&&f&&(c.textarea||E)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const S=sr({type:null,tagName:d,maskInputOptions:c});f=en({isMasked:Ot(e,r,i,s,o,S),element:e,value:f,maskInputFn:u})}return{type:ee.Text,textContent:f||"",isStyle:p,rootId:l}}function Rh(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:g,maskAllText:E,maskTextClass:S,unmaskTextClass:v,maskTextSelector:I,unmaskTextSelector:T}=t,x=Eh(e,r,s,i),_=lh(e);let y={};const k=e.attributes.length;for(let b=0;b<k;b++){const w=e.attributes[b];w.name&&!Da(_,w.name,w.value)&&(y[w.name]=Na(n,_,xt(w.name),w.value,e,c))}if(_==="link"&&o){const b=Array.from(n.styleSheets).find(A=>A.href===e.href);let w=null;b&&(w=Wn(b)),w&&(delete y.rel,delete y.href,y._cssText=jn(w,b.href))}if(_==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const b=Wn(e.sheet);b&&(y._cssText=jn(b,Ds()))}if(_==="input"||_==="textarea"||_==="select"||_==="option"){const b=e,w=Os(b),A=zn(b,Zr(_),w),Y=b.checked;if(w!=="submit"&&w!=="button"&&A){const V=Ot(b,S,I,v,T,sr({type:w,tagName:Zr(_),maskInputOptions:a}));y.value=en({isMasked:V,element:b,value:A,maskInputFn:u})}Y&&(y.checked=Y)}if(_==="option"&&(e.selected&&!a.select?y.selected=!0:delete y.selected),_==="canvas"&&f){if(e.__context==="2d")ah(e)||(y.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const b=e.toDataURL(l.type,l.quality),w=document.createElement("canvas");w.width=e.width,w.height=e.height;const A=w.toDataURL(l.type,l.quality);b!==A&&(y.rr_dataURL=b)}}if(_==="img"&&d){_t||(_t=n.createElement("canvas"),ji=_t.getContext("2d"));const b=e,w=b.crossOrigin;b.crossOrigin="anonymous";const A=()=>{b.removeEventListener("load",A);try{_t.width=b.naturalWidth,_t.height=b.naturalHeight,ji.drawImage(b,0,0),y.rr_dataURL=_t.toDataURL(l.type,l.quality)}catch(Y){console.warn(`Cannot inline img src=${b.currentSrc}! Error: ${Y}`)}w?y.crossOrigin=w:b.removeAttribute("crossorigin")};b.complete&&b.naturalWidth!==0?A():b.addEventListener("load",A)}if((_==="audio"||_==="video")&&(y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),x){const{width:b,height:w}=e.getBoundingClientRect();y={class:y.class,rr_width:`${b}px`,rr_height:`${w}px`}}_==="iframe"&&!p(y.src)&&(!x&&!e.contentDocument&&(y.rr_src=y.src),delete y.src);let P;try{customElements.get(_)&&(P=!0)}catch{}return{type:ee.Element,tagName:_,attributes:y,childNodes:[],isSVG:Sh(e)||void 0,needBlock:x,rootId:g,isCustom:P}}function q(e){return e==null?"":e.toLowerCase()}function Ch(e,t){if(t.comment&&e.type===ee.Comment)return!0;if(e.type===ee.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Aa(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||q(e.attributes.name)==="application-name"||q(e.attributes.rel)==="icon"||q(e.attributes.rel)==="apple-touch-icon"||q(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&q(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(q(e.attributes.property).match(/^(og|twitter|fb):/)||q(e.attributes.name).match(/^(og|twitter):/)||q(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(q(e.attributes.name)==="robots"||q(e.attributes.name)==="googlebot"||q(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(q(e.attributes.name)==="author"||q(e.attributes.name)==="generator"||q(e.attributes.name)==="framework"||q(e.attributes.name)==="publisher"||q(e.attributes.name)==="progid"||q(e.attributes.property).match(/^article:/)||q(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(q(e.attributes.name)==="google-site-verification"||q(e.attributes.name)==="yandex-verification"||q(e.attributes.name)==="csrf-token"||q(e.attributes.name)==="p:domain_verify"||q(e.attributes.name)==="verify-v1"||q(e.attributes.name)==="verification"||q(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function bt(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:E,maskInputFn:S,slimDOMOptions:v,dataURLOptions:I={},inlineImages:T=!1,recordCanvas:x=!1,onSerialize:_,onIframeLoad:y,iframeLoadTimeout:k=5e3,onStylesheetLoad:P,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:A=!1}=t;let{preserveWhiteSpace:Y=!0}=t;const V=Ih(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:E,maskInputFn:S,dataURLOptions:I,inlineImages:T,recordCanvas:x,keepIframeSrcFn:w,newlyAddedElement:A});if(!V)return console.warn(e,"not serialized"),null;let te;r.hasNode(e)?te=r.getId(e):Ch(V,v)||!Y&&V.type===ee.Text&&!V.isStyle&&!V.textContent.replace(/^\s+|\s+$/gm,"").length?te=tn:te=Ns();const O=Object.assign(V,{id:te});if(r.add(e,O),te===tn)return null;_&&_(e);let oe=!f;if(O.type===ee.Element){oe=oe&&!O.needBlock,delete O.needBlock;const z=e.shadowRoot;z&&Yt(z)&&(O.isShadowHost=!0)}if((O.type===ee.Document||O.type===ee.Element)&&oe){v.headWhitespace&&O.type===ee.Element&&O.tagName==="head"&&(Y=!1);const z={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:E,maskInputFn:S,slimDOMOptions:v,dataURLOptions:I,inlineImages:T,recordCanvas:x,preserveWhiteSpace:Y,onSerialize:_,onIframeLoad:y,iframeLoadTimeout:k,onStylesheetLoad:P,stylesheetLoadTimeout:b,keepIframeSrcFn:w};for(const pe of Array.from(e.childNodes)){const xe=bt(pe,z);xe&&O.childNodes.push(xe)}if(eh(e)&&e.shadowRoot)for(const pe of Array.from(e.shadowRoot.childNodes)){const xe=bt(pe,z);xe&&(Yt(e.shadowRoot)&&(xe.isShadow=!0),O.childNodes.push(xe))}}return e.parentNode&&Gt(e.parentNode)&&Yt(e.parentNode)&&(O.isShadow=!0),O.type===ee.Element&&O.tagName==="iframe"&&vh(e,()=>{const z=e.contentDocument;if(z&&y){const pe=bt(z,{doc:z,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:E,maskInputFn:S,slimDOMOptions:v,dataURLOptions:I,inlineImages:T,recordCanvas:x,preserveWhiteSpace:Y,onSerialize:_,onIframeLoad:y,iframeLoadTimeout:k,onStylesheetLoad:P,stylesheetLoadTimeout:b,keepIframeSrcFn:w});pe&&y(e,pe)}},k),O.type===ee.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Aa(O.attributes.href)==="css")&&Th(e,()=>{if(P){const z=bt(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:g,maskTextFn:E,maskInputFn:S,slimDOMOptions:v,dataURLOptions:I,inlineImages:T,recordCanvas:x,preserveWhiteSpace:Y,onSerialize:_,onIframeLoad:y,iframeLoadTimeout:k,onStylesheetLoad:P,stylesheetLoadTimeout:b,keepIframeSrcFn:w});z&&P(e,z)}},b),O}function Mh(e,t){const{mirror:n=new Ma,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:E,maskInputFn:S,slimDOM:v=!1,dataURLOptions:I,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:_,iframeLoadTimeout:y,onStylesheetLoad:k,stylesheetLoadTimeout:P,keepIframeSrcFn:b=()=>!1}=t||{};return bt(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:h===!0?{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}:h===!1?{}:h,maskAttributeFn:g,maskTextFn:E,maskInputFn:S,slimDOMOptions:v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:I,inlineImages:f,recordCanvas:p,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:_,iframeLoadTimeout:y,onStylesheetLoad:k,stylesheetLoadTimeout:P,keepIframeSrcFn:b,newlyAddedElement:!1})}function We(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function le(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const yt=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let qi={map:{},getId(){return console.error(yt),-1},getNode(){return console.error(yt),null},removeNodeFromMap(){console.error(yt)},has(){return console.error(yt),!1},reset(){console.error(yt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(qi=new Proxy(qi,{get(e,t,n){return t==="map"&&console.error(yt),Reflect.get(e,t,n)}}));function nn(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),c=this;a<=0||a>t?(r&&(Ph(r),r=null),s=o,e.apply(c,i)):!r&&n.trailing!==!1&&(r=ir(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function La(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){ir(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>La(e,t,i||{},!0)}function Ls(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let qn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(qn=()=>new Date().getTime());function Pa(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:We([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||We([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||We([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:We([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||We([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||We([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Fa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ba(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function $a(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Ie(e,t,n,r,s){if(!e)return!1;const i=$a(e);if(!i)return!1;const o=Et(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=st(i,o);let c=-1;return a<0?!1:(r&&(c=st(i,Et(null,r))),a>-1&&c<0?!0:a<c)}function Ah(e,t){return t.getId(e)!==-1}function wr(e,t){return t.getId(e)===tn}function Ua(e,t){if(Gt(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Ua(e.parentNode,t):!0:!0}function ts(e){return!!e.changedTouches}function xh(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=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Ha(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Wa(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ns(e){return!!We([e,"optionalAccess",t=>t.shadowRoot])}class Oh{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Nu(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function za(e){let t=null;return We([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Nh(e){let t=e,n;for(;n=za(t);)t=n;return t}function Dh(e){const t=e.ownerDocument;if(!t)return!1;const n=Nh(e);return t.contains(n)}function ja(e){const t=e.ownerDocument;return t?t.contains(e)||Dh(e):!1}const Gi={};function Ps(e){const t=Gi[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return Gi[e]=r.bind(window)}function Lh(...e){return Ps("requestAnimationFrame")(...e)}function ir(...e){return Ps("setTimeout")(...e)}function Ph(...e){return Ps("clearTimeout")(...e)}var N=(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))(N||{}),D=(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))(D||{}),ue=(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))(ue||{}),Oe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Oe||{});function Fh(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Yi(e){return"__ln"in e}class Bh{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=Fh([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Yi(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Yi(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Vi=(e,t)=>`${e}@${t}`;class $h{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=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new Bh,s=c=>{let u=c,l=tn;for(;l===tn;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},i=c=>{if(!c.parentNode||!ja(c))return;const u=Gt(c.parentNode)?this.mirror.getId(za(c)):this.mirror.getId(c.parentNode),l=s(c);if(u===-1||l===-1)return r.addNode(c);const d=bt(c,{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:f=>{Ha(f,this.mirror)&&this.iframeManager.addIframe(f),Wa(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ns(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});d&&(t.push({parentId:u,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Ki(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!Xi(this.droppedSet,c)&&!Ki(this.removes,c,this.mirror)||Xi(this.movedSet,c)?i(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){const u=this.mirror.getId(o.value.parentNode),l=s(o.value);u!==-1&&l!==-1&&(c=o)}if(!c){let u=r.tail;for(;u;){const l=u;if(u=u.previous,l){const d=this.mirror.getId(l.value.parentNode);if(s(l.value)===-1)continue;if(d!==-1){c=l;break}else{const p=l.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){c=l;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}o=c.previous,r.removeNode(c.value),i(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const l=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+d).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=t=>{if(!wr(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ie(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Ot(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,$a(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=Os(n),a=n.tagName;s=zn(n,a,o);const c=sr({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=Ot(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=en({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Ie(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Da(n.tagName,r)&&(i.attributes[r]=Na(this.doc,xt(n.tagName),xt(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(Ie(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=Gt(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ie(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||wr(n,this.mirror)||!Ah(n,this.mirror)||(this.addedSet.has(n)?(rs(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Ua(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Vi(r,s)]?rs(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Gt(t.target)&&Yt(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(wr(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Vi(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ie(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),ns(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["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(n=>{this[n]=t[n]})}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 rs(e,t){e.delete(t),t.childNodes.forEach(n=>rs(e,n))}function Ki(e,t,n){return e.length===0?!1:qa(e,t,n)}function qa(e,t,n){const{parentNode:r}=t;if(!r)return!1;const s=n.getId(r);return e.some(i=>i.id===s)?!0:qa(e,r,n)}function Xi(e,t){return e.size===0?!1:Ga(e,t)}function Ga(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Ga(e,n):!1}let Vt;function Uh(e){Vt=e}function Hh(){Vt=void 0}const B=e=>Vt?(...n)=>{try{return e(...n)}catch(r){if(Vt&&Vt(r)===!0)return()=>{};throw r}}:e;function Te(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const vt=[];function dn(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 Ya(e,t){const n=new $h;vt.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=Te([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(B(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Wh({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const c=nn(B(d=>{const f=Date.now()-a;e(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=B(nn(B(d=>{const f=dn(d),{clientX:p,clientY:h}=ts(d)?d.changedTouches[0]:d;a||(a=qn()),o.push({x:p,y:h,id:r.getId(f),timeOffset:qn()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?D.Drag:d instanceof MouseEvent?D.MouseMove:D.TouchMove)}),s,{trailing:!1})),l=[le("mousemove",u,n),le("touchmove",u,n),le("drag",u,n)];return B(()=>{l.forEach(d=>d())})}function zh({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[];let u=null;const l=d=>f=>{const p=dn(f);if(Ie(p,r,s,i,!0))return;let h=null,g=d;if("pointerType"in f){switch(f.pointerType){case"mouse":h=Oe.Mouse;break;case"touch":h=Oe.Touch;break;case"pen":h=Oe.Pen;break}h===Oe.Touch?ue[d]===ue.MouseDown?g="TouchStart":ue[d]===ue.MouseUp&&(g="TouchEnd"):Oe.Pen}else ts(f)&&(h=Oe.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===Oe.Touch||g.startsWith("Mouse")&&h===Oe.Mouse)&&(h=null)):ue[d]===ue.Click&&(h=u,u=null);const E=ts(f)?f.changedTouches[0]:f;if(!E)return;const S=n.getId(p),{clientX:v,clientY:I}=E;B(e)({type:ue[g],id:S,x:v,y:I,...h!==null&&{pointerType:h}})};return Object.keys(ue).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=xt(d);const p=l(d);if(window.PointerEvent)switch(ue[d]){case ue.MouseDown:case ue.MouseUp:f=f.replace("mouse","pointer");break;case ue.TouchStart:case ue.TouchEnd:return}c.push(le(f,p,t))}),B(()=>{c.forEach(d=>d())})}function Va({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=B(nn(B(c=>{const u=dn(c);if(!u||Ie(u,r,s,i,!0))return;const l=n.getId(u);if(u===t&&t.defaultView){const d=Pa(t.defaultView);e({id:l,x:d.left,y:d.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return le("scroll",a,t)}function jh({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=B(nn(B(()=>{const i=Fa(),o=Ba();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return le("resize",s,t)}const qh=["INPUT","TEXTAREA","SELECT"],Ji=new WeakMap;function Gh({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:g}){function E(y){let k=dn(y);const P=y.isTrusted,b=k&&Zr(k.tagName);if(b==="OPTION"&&(k=k.parentElement),!k||!b||qh.indexOf(b)<0||Ie(k,r,s,i,!0))return;const w=k;if(w.classList.contains(o)||a&&w.matches(a))return;const A=Os(k);let Y=zn(w,b,A),V=!1;const te=sr({maskInputOptions:c,tagName:b,type:A}),O=Ot(k,f,h,p,g,te);(A==="radio"||A==="checkbox")&&(V=k.checked),Y=en({isMasked:O,element:k,value:Y,maskInputFn:u}),S(k,d?{text:Y,isChecked:V,userTriggered:P}:{text:Y,isChecked:V});const oe=k.name;A==="radio"&&oe&&V&&t.querySelectorAll(`input[type="radio"][name="${oe}"]`).forEach(z=>{if(z!==k){const pe=en({isMasked:O,element:z,value:zn(z,b,A),maskInputFn:u});S(z,d?{text:pe,isChecked:!V,userTriggered:!1}:{text:pe,isChecked:!V})}})}function S(y,k){const P=Ji.get(y);if(!P||P.text!==k.text||P.isChecked!==k.isChecked){Ji.set(y,k);const b=n.getId(y);B(e)({...k,id:b})}}const I=(l.input==="last"?["change"]:["input","change"]).map(y=>le(y,B(E),t)),T=t.defaultView;if(!T)return()=>{I.forEach(y=>y())};const x=T.Object.getOwnPropertyDescriptor(T.HTMLInputElement.prototype,"value"),_=[[T.HTMLInputElement.prototype,"value"],[T.HTMLInputElement.prototype,"checked"],[T.HTMLSelectElement.prototype,"value"],[T.HTMLTextAreaElement.prototype,"value"],[T.HTMLSelectElement.prototype,"selectedIndex"],[T.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&I.push(..._.map(y=>La(y[0],y[1],{set(){B(E)({target:this,isTrusted:!1})}},!1,T))),B(()=>{I.forEach(y=>y())})}function Gn(e){const t=[];function n(r,s){if(wn("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||wn("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||wn("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||wn("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function ze(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Yh({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:B((l,d,f)=>{const[p,h]=f,{id:g,styleId:E}=ze(d,t,n.styleMirror);return(g&&g!==-1||E&&E!==-1)&&e({id:g,styleId:E,adds:[{rule:p,index:h}]}),l.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:B((l,d,f)=>{const[p]=f,{id:h,styleId:g}=ze(d,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,removes:[{index:p}]}),l.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:B((l,d,f)=>{const[p]=f,{id:h,styleId:g}=ze(d,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replace:p}),l.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:B((l,d,f)=>{const[p]=f,{id:h,styleId:g}=ze(d,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replaceSync:p}),l.apply(d,f)})}));const c={};kn("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(kn("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),kn("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),kn("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([l,d])=>{u[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[l].insertRule,{apply:B((f,p,h)=>{const[g,E]=h,{id:S,styleId:v}=ze(p.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||v&&v!==-1)&&e({id:S,styleId:v,adds:[{rule:g,index:[...Gn(p),E||0]}]}),f.apply(p,h)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:B((f,p,h)=>{const[g]=h,{id:E,styleId:S}=ze(p.parentStyleSheet,t,n.styleMirror);return(E&&E!==-1||S&&S!==-1)&&e({id:E,styleId:S,removes:[{index:[...Gn(p),g]}]}),f.apply(p,h)})})}),B(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([l,d])=>{d.prototype.insertRule=u[l].insertRule,d.prototype.deleteRule=u[l].deleteRule})})}function Ka({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?Te([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):Te([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=Te([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(Te([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Te([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=Te([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),B(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function Vh({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:B((a,c,u)=>{const[l,d,f]=u;if(n.has(l))return i.apply(c,[l,d,f]);const{id:p,styleId:h}=ze(Te([c,"access",g=>g.parentRule,"optionalAccess",g=>g.parentStyleSheet]),t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:l,value:d,priority:f},index:Gn(c.parentRule)}),a.apply(c,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:B((a,c,u)=>{const[l]=u;if(n.has(l))return o.apply(c,[l]);const{id:d,styleId:f}=ze(Te([c,"access",p=>p.parentRule,"optionalAccess",p=>p.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:l},index:Gn(c.parentRule)}),a.apply(c,u)})}),B(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Kh({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=B(u=>nn(B(l=>{const d=dn(l);if(!d||Ie(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:g}=d;e({type:u,id:s.getId(d),currentTime:f,volume:p,muted:h,playbackRate:g})}),i.media||500)),c=[le("play",a(0),o),le("pause",a(1),o),le("seeked",a(2),o),le("volumechange",a(3),o),le("ratechange",a(4),o)];return B(()=>{c.forEach(u=>u())})}function Xh({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,l){const d=new i(c,u,l);return s.set(d,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=Ls(t.fonts,"add",function(a){return function(c){return ir(B(()=>{const u=s.get(c);u&&(e(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(o),B(()=>{r.forEach(a=>a())})}function Jh(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const c=B(()=>{const u=t.getSelection();if(!u||a&&Te([u,"optionalAccess",f=>f.isCollapsed]))return;a=u.isCollapsed||!1;const l=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const p=u.getRangeAt(f),{startContainer:h,startOffset:g,endContainer:E,endOffset:S}=p;Ie(h,r,s,i,!0)||Ie(E,r,s,i,!0)||l.push({start:n.getId(h),startOffset:g,end:n.getId(E),endOffset:S})}o({ranges:l})});return c(),le("selectionchange",c)}function Qh({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ls(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function Zh(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Ya(e,e.doc));const s=Wh(e),i=zh(e),o=Va(e),a=jh(e,{win:n}),c=Gh(e),u=Kh(e);let l=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(l=Yh(e,{win:n}),d=Ka(e,e.doc),f=Vh(e,{win:n}),e.collectFonts&&(p=Xh(e)));const h=Jh(e),g=Qh(e),E=[];for(const S of e.plugins)E.push(S.observer(S.callback,n,S.options));return B(()=>{vt.forEach(S=>S.reset()),Te([r,"optionalAccess",S=>S.disconnect,"call",S=>S()]),s(),i(),o(),a(),c(),u(),l(),d(),f(),p(),h(),g(),E.forEach(S=>S())})}function wn(e){return typeof window[e]<"u"}function kn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ss{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}function Qi(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}class em{constructor(){this.crossOriginIframeMirror=new ss(Ns),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class tm{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ss(Ns),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ss(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Qi([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case N.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:N.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case N.Meta:case N.Load:case N.DomContentLoaded:return!1;case N.Plugin:return n;case N.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case N.IncrementalSnapshot:switch(n.data.source){case D.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case D.Drag:case D.TouchMove:case D.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(n.data,t,["id"]),n;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case D.Font:return n;case D.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case D.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),Qi([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==ee.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class nm{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class rm{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Yt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=Ya({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Va({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),ir(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Ka({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Ls(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&ja(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class Zi{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class sm{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Oh,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:Ca(a),index:c}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class im{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){Lh(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let Q,Yn;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Mn([e,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ve=oh();function Ye(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:E,slimDOMOptions:S,maskAttributeFn:v,maskInputFn:I,maskTextFn:T,maxCanvasSize:x=null,packFn:_,sampling:y={},dataURLOptions:k={},mousemoveWait:P,recordDOM:b=!0,recordCanvas:w=!1,recordCrossOriginIframes:A=!1,recordAfter:Y=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:te=!1,inlineImages:O=!1,plugins:oe,keepIframeSrcFn:z=()=>!1,ignoreCSSAttributes:pe=new Set([]),errorHandler:xe,onMutation:zs,getCanvasManager:vc}=e;Uh(xe);const lr=A?window.parent===window:!0;let pn=!1;if(!lr)try{window.parent.document&&(pn=!1)}catch{pn=!0}if(lr&&!t)throw new Error("emit function is required");P!==void 0&&y.mousemove===void 0&&(y.mousemove=P),ve.reset();const dr=g===!0?{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}:E!==void 0?E:{},fr=S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:S==="all",headMetaDescKeywords:S==="all"}:S||{};xh();let pr,hr=0;const js=H=>{for(const be of oe||[])be.eventProcessor&&(H=be.eventProcessor(H));return _&&!pn&&(H=_(H)),H};Q=(H,be)=>{const F=H;if(F.timestamp=qn(),Mn([vt,"access",X=>X[0],"optionalAccess",X=>X.isFrozen,"call",X=>X()])&&F.type!==N.FullSnapshot&&!(F.type===N.IncrementalSnapshot&&F.data.source===D.Mutation)&&vt.forEach(X=>X.unfreeze()),lr)Mn([t,"optionalCall",X=>X(js(F),be)]);else if(pn){const X={type:"rrweb",event:js(F),origin:window.location.origin,isCheckout:be};window.parent.postMessage(X,"*")}if(F.type===N.FullSnapshot)pr=F,hr=0;else if(F.type===N.IncrementalSnapshot){if(F.data.source===D.Mutation&&F.data.isAttachIframe)return;hr++;const X=r&&hr>=r,W=n&&pr&&F.timestamp-pr.timestamp>n;(X||W)&&_r(!0)}};const hn=H=>{Q({type:N.IncrementalSnapshot,data:{source:D.Mutation,...H}})},qs=H=>Q({type:N.IncrementalSnapshot,data:{source:D.Scroll,...H}}),Tc=H=>Q({type:N.IncrementalSnapshot,data:{source:D.CanvasMutation,...H}}),Ic=H=>Q({type:N.IncrementalSnapshot,data:{source:D.AdoptedStyleSheet,...H}}),et=new sm({mutationCb:hn,adoptedStyleSheetCb:Ic}),tt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new em:new tm({mirror:ve,mutationCb:hn,stylesheetManager:et,recordCrossOriginIframes:A,wrappedEmit:Q});for(const H of oe||[])H.getMirror&&H.getMirror({nodeMirror:ve,crossOriginIframeMirror:tt.crossOriginIframeMirror,crossOriginIframeStyleMirror:tt.crossOriginIframeStyleMirror});const mr=new im,gr=am(vc,{mirror:ve,win:window,mutationCb:H=>Q({type:N.IncrementalSnapshot,data:{source:D.CanvasMutation,...H}}),recordCanvas:w,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:x,sampling:y.canvas,dataURLOptions:k,errorHandler:xe}),mn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new nm:new rm({mutationCb:hn,scrollCb:qs,bypassOptions:{onMutation:zs,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:dr,dataURLOptions:k,maskAttributeFn:v,maskTextFn:T,maskInputFn:I,recordCanvas:w,inlineImages:O,sampling:y,slimDOMOptions:fr,iframeManager:tt,stylesheetManager:et,canvasManager:gr,keepIframeSrcFn:z,processedNodeManager:mr},mirror:ve}),_r=(H=!1)=>{if(!b)return;Q({type:N.Meta,data:{href:window.location.href,width:Ba(),height:Fa()}},H),et.reset(),mn.init(),vt.forEach(F=>F.lock());const be=Mh(document,{mirror:ve,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:dr,maskAttributeFn:v,maskInputFn:I,maskTextFn:T,slimDOM:fr,dataURLOptions:k,recordCanvas:w,inlineImages:O,onSerialize:F=>{Ha(F,ve)&&tt.addIframe(F),Wa(F,ve)&&et.trackLinkElement(F),ns(F)&&mn.addShadowRoot(F.shadowRoot,document)},onIframeLoad:(F,X)=>{tt.attachIframe(F,X),F.contentWindow&&gr.addWindow(F.contentWindow),mn.observeAttachShadow(F)},onStylesheetLoad:(F,X)=>{et.attachLinkElement(F,X)},keepIframeSrcFn:z});if(!be)return console.warn("Failed to snapshot the document");Q({type:N.FullSnapshot,data:{node:be,initialOffset:Pa(window)}}),vt.forEach(F=>F.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&et.adoptStyleSheets(document.adoptedStyleSheets,ve.getId(document))};Yn=_r;try{const H=[],be=X=>B(Zh)({onMutation:zs,mutationCb:hn,mousemoveCb:(W,nt)=>Q({type:N.IncrementalSnapshot,data:{source:nt,positions:W}}),mouseInteractionCb:W=>Q({type:N.IncrementalSnapshot,data:{source:D.MouseInteraction,...W}}),scrollCb:qs,viewportResizeCb:W=>Q({type:N.IncrementalSnapshot,data:{source:D.ViewportResize,...W}}),inputCb:W=>Q({type:N.IncrementalSnapshot,data:{source:D.Input,...W}}),mediaInteractionCb:W=>Q({type:N.IncrementalSnapshot,data:{source:D.MediaInteraction,...W}}),styleSheetRuleCb:W=>Q({type:N.IncrementalSnapshot,data:{source:D.StyleSheetRule,...W}}),styleDeclarationCb:W=>Q({type:N.IncrementalSnapshot,data:{source:D.StyleDeclaration,...W}}),canvasMutationCb:Tc,fontCb:W=>Q({type:N.IncrementalSnapshot,data:{source:D.Font,...W}}),selectionCb:W=>{Q({type:N.IncrementalSnapshot,data:{source:D.Selection,...W}})},customElementCb:W=>{Q({type:N.IncrementalSnapshot,data:{source:D.CustomElement,...W}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:dr,inlineStylesheet:h,sampling:y,recordDOM:b,recordCanvas:w,inlineImages:O,userTriggeredOnInput:V,collectFonts:te,doc:X,maskAttributeFn:v,maskInputFn:I,maskTextFn:T,keepIframeSrcFn:z,blockSelector:i,unblockSelector:o,slimDOMOptions:fr,dataURLOptions:k,mirror:ve,iframeManager:tt,stylesheetManager:et,shadowDomManager:mn,processedNodeManager:mr,canvasManager:gr,ignoreCSSAttributes:pe,plugins:Mn([oe,"optionalAccess",W=>W.filter,"call",W=>W(nt=>nt.observer),"optionalAccess",W=>W.map,"call",W=>W(nt=>({observer:nt.observer,options:nt.options,callback:wc=>Q({type:N.Plugin,data:{plugin:nt.name,payload:wc}})}))])||[]},{});tt.addLoadListener(X=>{try{H.push(be(X.contentDocument))}catch(W){console.warn(W)}});const F=()=>{_r(),H.push(be(document))};return document.readyState==="interactive"||document.readyState==="complete"?F():(H.push(le("DOMContentLoaded",()=>{Q({type:N.DomContentLoaded,data:{}}),Y==="DOMContentLoaded"&&F()})),H.push(le("load",()=>{Q({type:N.Load,data:{}}),Y==="load"&&F()},window))),()=>{H.forEach(X=>X()),mr.destroy(),Yn=void 0,Hh()}}catch(H){console.warn(H)}}function om(e){if(!Yn)throw new Error("please take full snapshot after start recording");Yn(e)}Ye.mirror=ve;Ye.takeFullSnapshot=om;function am(e,t){try{return e?e(t):new Zi}catch{return console.warn("Unable to initialize CanvasManager"),new Zi}}const cm=3,um=5;function Fs(e){return e>9999999999?e:e*1e3}function kr(e){return e>9999999999?e/1e3:e}function fn(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:N.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ce(t,10,1e3)}}),t.category==="console")))}const lm="button,a";function Xa(e){return e.closest(lm)||e}function Ja(e){const t=Qa(e);return!t||!(t instanceof Element)?t:Xa(t)}function Qa(e){return dm(e)?e.target:e}function dm(e){return typeof e=="object"&&!!e&&"target"in e}let je;function fm(e){return je||(je=[],pm()),je.push(e),()=>{const t=je?je.indexOf(e):-1;t>-1&&je.splice(t,1)}}function pm(){se(G,"open",function(e){return function(...t){if(je)try{je.forEach(n=>n())}catch{}return e.apply(G,t)}})}function hm(e,t,n){e.handleClick(t,n)}class mm{constructor(t,n,r=fn){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=fm(()=>{this._lastMutation=eo()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(_m(n,this._ignoreSelector)||!ym(t))return;const r={timestamp:kr(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=kr(t)}registerScroll(t=Date.now()){this._lastScroll=kr(t)}registerClick(t){const n=Xa(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=eo();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:G.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,l);return}if(o>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:G.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=ft(()=>this._checkClicks(),1e3)}}const gm=["A","BUTTON","INPUT"];function _m(e,t){return!!(!gm.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function ym(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function eo(){return Date.now()/1e3}function Sm(e,t){try{if(!Em(t))return;const{source:n}=t.data;if(n===D.Mutation&&e.registerMutation(t.timestamp),n===D.Scroll&&e.registerScroll(t.timestamp),bm(t)){const{type:r,id:s}=t.data,i=Ye.mirror.getNode(s);i instanceof HTMLElement&&r===ue.Click&&e.registerClick(i)}}catch{}}function Em(e){return e.type===cm}function bm(e){return e.data.source===D.MouseInteraction}function Ae(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Vn;(function(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"})(Vn||(Vn={}));const vm=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Tm(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(vm.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const Im=e=>t=>{if(!e.isEnabled())return;const n=wm(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&hm(e.clickDetector,n,Ja(t.event)),fn(e,n)};function Za(e,t){const n=Ye.mirror.getId(e),r=n&&Ye.mirror.getNode(n),s=r&&Ye.mirror.getMeta(r),i=s&&Rm(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===Vn.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Tm(i.attributes)}}:{}}}function wm(e){const{target:t,message:n}=km(e);return Ae({category:`ui.${e.name}`,...Za(t,n)})}function km(e){const t=e.name==="click";let n,r=null;try{r=t?Ja(e.event):Qa(e.event),n=Ke(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Rm(e){return e.type===Vn.Element}function Cm(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Mm(t);n&&fn(e,n)}function Mm(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||Am(o)||!i)return null;const a=t||r||s,c=i.length===1;if(!a&&c)return null;const u=Ke(o,{maxStringLength:200})||"<unknown>",l=Za(o,u);return Ae({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Am(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const xm={resource:Pm,paint:Dm,navigation:Lm};function Rn(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Om(e){return e.map(Nm).filter(Boolean)}function Nm(e){const t=xm[e.entryType];return t?t(e):null}function Nt(e){return((me||G.performance.timeOrigin)+e)/1e3}function Dm(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=Nt(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function Lm(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:h,type:g}=e;return s===0?null:{type:`${t}.${g}`,start:Nt(p),end:Nt(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:f}}}function Pm(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Nt(i),end:Nt(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function Fm(e){const t=e.entries[e.entries.length-1],n=t&&t.element?[t.element]:void 0;return or(e,"largest-contentful-paint",n)}function Bm(e){const t=e.entries[e.entries.length-1],n=[];if(t&&t.sources)for(const r of t.sources)r.node&&n.push(r.node);return or(e,"cumulative-layout-shift",n)}function $m(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return or(e,"first-input-delay",n)}function Um(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return or(e,"interaction-to-next-paint",n)}function or(e,t,n){const r=e.value,s=e.rating,i=Nt(r);return{type:"web-vital",name:t,start:i,end:i,data:{value:r,size:r,rating:s,nodeIds:n?n.map(a=>Ye.mirror.getId(a)):void 0}}}function Hm(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(Mt(s,n))}),r.push(_a(Rn(Fm,e)),ga(Rn(Bm,e)),ya(Rn($m,e)),Sa(Rn(Um,e))),()=>{r.forEach(s=>s())}}const j=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Wm='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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>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,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(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},A=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},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(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,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+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+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(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;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=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;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>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}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),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(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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 a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),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(a),32768),this.s.z=n.length-a+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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(J)return J.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=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<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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});';function zm(){const e=new Blob([Wm]);return URL.createObjectURL(e)}function he(e,t){j&&(m.info(e),t&&ec(e))}function ut(e,t){j&&(m.info(e),t&&ft(()=>{ec(e)},0))}function ec(e){Xe({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class Bs extends Error{constructor(){super(`Event buffer exceeded maximum size of ${xs}.`)}}class tc{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>xs)throw new Bs;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?Fs(t):null}}class jm{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){he("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){j&&m.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class qm{constructor(t){this._worker=new jm(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Fs(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>xs?Promise.reject(new Bs):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{j&&m.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Gm{constructor(t){this._fallback=new tc,this._compression=new qm(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{he("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){j&&m.warn("[Replay] Failed to add events when switching buffers.",s)}}}function Ym({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Vm(t);if(n)return n}return he("[Replay] Using simple buffer"),new tc}function Vm(e){try{const t=e||Km();if(!t)return;he(`[Replay] Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Gm(n)}catch{he("[Replay] Failed to create compression worker")}}function Km(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?zm():""}function $s(){try{return"sessionStorage"in G&&!!G.sessionStorage}catch{return!1}}function Xm(e){Jm(),e.session=void 0}function Jm(){if($s())try{G.sessionStorage.removeItem(Ms)}catch{}}function nc(e){return e===void 0?!1:Math.random()<e}function rc(e){const t=Date.now(),n=e.id||K(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function Us(e){if($s())try{G.sessionStorage.setItem(Ms,JSON.stringify(e))}catch{}}function Qm(e,t){return nc(e)?"session":t?"buffer":!1}function to({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Qm(e,t),i=rc({sampled:s,previousSessionId:r});return n&&Us(i),i}function Zm(e){if(!$s())return null;try{const t=G.sessionStorage.getItem(Ms);if(!t)return null;const n=JSON.parse(t);return ut("[Replay] Loading existing session",e),rc(n)}catch{return null}}function is(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function sc(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return is(e.started,t,r)||is(e.lastActivity,n,r)}function ic(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!sc(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Rr({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},s){const i=s.stickySession&&Zm(e);return i?ic(i,{sessionIdleExpire:t,maxReplayDuration:n})?(ut("[Replay] Session in sessionStorage is expired, creating new one..."),to(s,{previousSessionId:i.id})):i:(ut("[Replay] Creating new session",e),to(s,{previousSessionId:r}))}function eg(e){return e.type===N.Custom}function Hs(e,t,n){return ac(e,t)?(oc(e,t,n),!0):!1}function tg(e,t,n){return ac(e,t)?oc(e,t,n):Promise.resolve(null)}async function oc(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),s=ng(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof Bs?"addEventSizeExceeded":"addEvent";e.handleException(r),await e.stop({reason:s});const i=L();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function ac(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Fs(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(ut(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function ng(e,t){try{if(typeof t=="function"&&eg(e))return t(e)}catch(n){return j&&m.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function Ws(e){return!e.type}function os(e){return e.type==="transaction"}function rg(e){return e.type==="replay_event"}function no(e){return e.type==="feedback"}function sg(e){return(t,n)=>{if(!e.isEnabled()||!Ws(t)&&!os(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(os(t)){ig(e,t);return}og(e,t)}}}function ig(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function og(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||ft(()=>{e.sendBufferedReplayOrFlush()})}function ag(e){return t=>{!e.isEnabled()||!Ws(t)||cg(e,t)}}function cg(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if(typeof n=="string"&&(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))){const r=Ae({category:"replay.hydrate-error",data:{url:ho()}});fn(e,r)}}function ug(e){const t=L();t&&t.on("beforeAddBreadcrumb",n=>lg(e,n))}function lg(e,t){if(!e.isEnabled()||!cc(t))return;const n=dg(t);n&&fn(e,n)}function dg(e){return!cc(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?fg(e):Ae(e)}function fg(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Ae(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>In?(n=!0,`${s.slice(0,In)}…`):s;if(typeof s=="object")try{const i=Ce(s,7);return JSON.stringify(i).length>In?(n=!0,`${JSON.stringify(i,null,2).slice(0,In)}…`):i}catch{}return s});return Ae({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function cc(e){return!!e.category}function pg(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function hg(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:N.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function mg(e,t){return e.recordingMode!=="buffer"||t.message===As||!t.exception||t.type?!1:nc(e.getOptions().errorSampleRate)}function gg(e){return Object.assign((t,n)=>e.isEnabled()?rg(t)?(delete t.breadcrumbs,t):!Ws(t)&&!os(t)&&!no(t)||!e.checkAndHandleExpiredSession()?t:no(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),hg(e,t),t):pg(t,n)&&!e.getOptions()._experiments.captureExceptions?(j&&m.log("[Replay] Ignoring error from rrweb internals",t),null):((mg(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):t,{id:"Replay"})}function ar(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:N.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function _g(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function yg(e){return t=>{if(!e.isEnabled())return;const n=_g(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ar(e,[n]),!1)))}}function Sg(e,t){return j&&e.getOptions()._experiments.traceInternals?!1:Ql(t,L())}function uc(e,t){e.isEnabled()&&t!==null&&(Sg(e,t.name)||e.addUpdate(()=>(ar(e,[t]),!0)))}function cr(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=pc(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function lc(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function dc(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[pc(e)];if(!e)return[void 0]}catch{return j&&m.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&m.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Kn(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 fc(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:ie({method:i,statusCode:o,request:a,response:c})}}function rn(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ve(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=Eg(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function as(e,t){return Object.entries(e).reduce((n,[r,s])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=s),n},{})}function pc(e){return new URLSearchParams(e).toString()}function Eg(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Ui,n=bg(e);if(t){const r=e.slice(0,Ui);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function bg(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Xn(e,t){const n=vg(e);return Ge(n,t)}function vg(e,t=G.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(G.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Tg(e,t,n){try{const r=await wg(e,t,n),s=fc("resource.fetch",r);uc(n.replay,s)}catch(r){j&&m.error("[Replay] Failed to capture fetch breadcrumb",r)}}function Ig(e,t){const{input:n,response:r}=t,s=n?hc(n):void 0,i=cr(s),o=r?lc(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function wg(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=Xn(o,n.networkDetailAllowUrls)&&!Xn(o,n.networkDetailDenyUrls),f=d?kg(n,t.input,u):rn(u),p=await Rg(d,n,t.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:f,response:p}}function kg({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Ag(n,t):{};if(!e)return Ve(s,r,void 0);const i=hc(n),[o,a]=dc(i),c=Ve(s,r,o);return a?Kn(c,a):c}async function Rg(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return rn(s);const i=r?mc(r.headers,n):{};if(!r||!t&&s!==void 0)return Ve(i,s,void 0);const[o,a]=await Mg(r),c=Cg(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?Kn(c,a):c}function Cg(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e&&e.length&&n===void 0?cr(e):n;return r?t?Ve(s,i,e):Ve(s,i,void 0):rn(i)}catch(i){return j&&m.warn("[Replay] Failed to serialize response body",i),Ve(s,n,void 0)}}async function Mg(e){const t=xg(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Og(t)]}catch(n){return j&&m.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function hc(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function mc(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Ag(e,t){return e.length===1&&typeof e[0]!="string"?ro(e[0],t):e.length===2?ro(e[1],t):{}}function ro(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?mc(n,t):Array.isArray(n)?{}:as(n,t):{}}function xg(e){try{return e.clone()}catch(t){j&&m.warn("[Replay] Failed to clone response body",t)}}function Og(e){return new Promise((t,n)=>{const r=ft(()=>n(new Error("Timeout while trying to read response body")),500);Ng(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function Ng(e){return await e.text()}async function Dg(e,t,n){try{const r=Pg(e,t,n),s=fc("resource.xhr",r);uc(n.replay,s)}catch(r){j&&m.error("[Replay] Failed to capture xhr breadcrumb",r)}}function Lg(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=cr(r),i=n.getResponseHeader("content-length")?lc(n.getResponseHeader("content-length")):Ug(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function Pg(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!a||!Xn(c,n.networkDetailAllowUrls)||Xn(c,n.networkDetailDenyUrls)){const _=rn(d),y=rn(f);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:_,response:y}}const p=a[rt],h=p?as(p.request_headers,n.networkRequestHeaders):{},g=as(Fg(a),n.networkResponseHeaders),[E,S]=n.networkCaptureBodies?dc(o):[void 0],[v,I]=n.networkCaptureBodies?Bg(a):[void 0],T=Ve(h,d,E),x=Ve(g,f,v);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:S?Kn(T,S):T,response:I?Kn(x,I):x}}function Fg(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function Bg(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return $g(e.response,e.responseType)}catch(n){t.push(n)}return j&&m.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function $g(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return j&&m.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&m.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Ug(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return cr(n)}catch{return}}function Hg(e){const t=L();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(c,u)=>Wg(a,c,u))}catch{}}function Wg(e,t,n){if(t.data)try{zg(t)&&qg(n)&&(Lg(t,n),Dg(t,n,e)),jg(t)&&Gg(n)&&(Ig(t,n),Tg(t,n,e))}catch{j&&m.warn("Error when enriching network breadcrumb")}}function zg(e){return e.category==="xhr"}function jg(e){return e.category==="fetch"}function qg(e){return e&&e.xhr}function Gg(e){return e&&e.response}function Yg(e){const t=L();va(Im(e)),rr(yg(e)),ug(e),Hg(e);const n=gg(e);Pl(n),t&&(t.on("beforeSendEvent",ag(e)),t.on("afterSendEvent",sg(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",(r,s)=>{const i=e.getSessionId();s&&s.includeReplay&&e.isEnabled()&&i&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=i)}))}async function Vg(e){try{return Promise.all(ar(e,[Kg(G.performance.memory)]))}catch{return[]}}function Kg(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Xg(e,t,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function l(){return s&&clearTimeout(s),s=ft(a,t),o&&i===void 0&&(i=ft(a,o)),r}return l.cancel=c,l.flush=u,l}function Jg(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){j&&m.warn("[Replay] Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&Sm(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!Hs(e,n,s))return!0;if(!s)return!1;if(Zg(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){const i=e.eventBuffer.getEarliestTimestamp();i&&(he(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,e.getOptions()._experiments.traceInternals),e.session.started=i,e.getOptions().stickySession&&Us(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function Qg(e){const t=e.getOptions();return{type:N.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?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function Zg(e,t){!t||!e.session||e.session.segmentId!==0||Hs(e,Qg(e),!1)}function e_(e,t,n,r){return pt(No(e,ms(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function t_({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function n_({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit("preprocessEvent",r,i);const o=await Qo(e.getOptions(),r,i,t,e,Ee());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function r_({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=t_({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=L(),f=J(),p=d&&d.getTransport(),h=d&&d.getDsn();if(!d||!p||!h||!i.sampled)return $e({});const g={type:Wp,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},E=await n_({scope:f,client:d,replayId:t,event:g});if(!E)return d.recordDroppedEvent("event_processor","replay",g),he("An event processor returned `null`, will not send event."),$e({});delete E.sdkProcessingMetadata;const S=e_(E,o,h,d.getOptions().tunnel);let v;try{v=await p.send(S)}catch(T){const x=new Error(As);try{x.cause=T}catch{}throw x}if(typeof v.statusCode=="number"&&(v.statusCode<200||v.statusCode>=300))throw new gc(v.statusCode);const I=Lo({},v);if(Do(I,"replay"))throw new _c(I);return v}class gc extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class _c extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function yc(e,t={count:0,interval:Vp}){const{recordingData:n,options:r}=e;if(n.length)try{return await r_(e),!0}catch(s){if(s instanceof gc||s instanceof _c)throw s;if(Ll("Replays",{_retryCount:t.count}),j&&r._experiments&&r._experiments.captureExceptions&&Ts(s),t.count>=Kp){const i=new Error(`${As} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{ft(async()=>{try{await yc(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const Sc="__THROTTLED",s_="__SKIPPED";function i_(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0);let o=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),i()>=t){const l=o;return o=!0,l?s_:Sc}o=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class qe{constructor({options:t,recordingOptions:n}){qe.prototype.__init.call(this),qe.prototype.__init2.call(this),qe.prototype.__init3.call(this),qe.prototype.__init4.call(this),qe.prototype.__init5.call(this),qe.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:zp,sessionIdleExpire:jp},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=n,this._options=t,this._debouncedFlush=Xg(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=i_((o,a)=>tg(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(Xp,r),timeout:r,scrollTimeout:Jp,ignoreSelector:s?s.join(","):""}:void 0;i&&(this.clickDetector=new mm(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){j&&m.error("[Replay]",t),j&&this._options._experiments&&this._options._experiments.captureExceptions&&Ts(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){this.handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",ut(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){j&&m.info("[Replay] Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){j&&m.info("[Replay] Buffering is in progress, call `flush()` to save the replay");return}ut("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const t=Rr({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){j&&m.info("[Replay] Buffering is in progress, call `flush()` to save the replay");return}ut("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=Rr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Ye({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:Yp},emit:Jg(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{he(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Xm(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),he("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),he("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();he("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&is(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${G.location.pathname}${G.location.hash}${G.location.search}`,n=`${G.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===Sc){const s=Ae({category:"replay.throttled"});this.addUpdate(()=>!Hs(this,{type:um,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||fe(),n=t&&ce(t),s=(n&&U(n).data||{})[Le];if(!(!n||!s||!["route","custom"].includes(s)))return U(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Ym({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Rr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return ic(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{G.document.addEventListener("visibilitychange",this._handleVisibilityChange),G.addEventListener("blur",this._handleWindowBlur),G.addEventListener("focus",this._handleWindowFocus),G.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Yg(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Hm(this)}_removeListeners(){try{G.document.removeEventListener("visibilitychange",this._handleVisibilityChange),G.removeEventListener("blur",this._handleWindowBlur),G.removeEventListener("focus",this._handleWindowFocus),G.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{G.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Ae({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Ae({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{Cm(this,t)}}_doChangeToBackgroundTasks(t){!this.session||sc(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){he("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:N.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=Om(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(ar(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){j&&m.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await Vg(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await yc({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=L();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){j&&m.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){he(`[Replay] Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}const a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&he("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){j&&m.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Us(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=Ae({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function zt(e,t){return[...e,...t].join(",")}function o_({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=['base[href="/"]'],o=zt(e,[".sentry-mask","[data-sentry-mask]"]),a=zt(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:zt(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:zt(r,[]),ignoreSelector:zt(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function a_({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const so='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',c_=["content-length","content-type","accept"];let io=!1;const u_=e=>new ur(e);class ur{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=qp,flushMaxDelay:n=Gp,minReplayDuration:r=Qp,maxReplayDuration:s=Hi,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:l=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:E=[],networkDetailDenyUrls:S=[],networkCaptureBodies:v=!0,networkRequestHeaders:I=[],networkResponseHeaders:T=[],mask:x=[],maskAttributes:_=["title","placeholder"],unmask:y=[],block:k=[],unblock:P=[],ignore:b=[],maskFn:w,beforeAddRecordingEvent:A,beforeErrorSampling:Y}={}){this.name=ur.id;const V=o_({mask:x,unmask:y,block:k,unblock:P,ignore:b});if(this._recordingOptions={maskAllInputs:l,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:w,maskInputFn:w,maskAttributeFn:(te,O,oe)=>a_({maskAttributes:_,maskAllText:u,privacyOptions:V,key:te,value:O,el:oe}),...V,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:te=>{try{te.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Zp),maxReplayDuration:Math.min(s,Hi),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:l,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:g,networkDetailAllowUrls:E,networkDetailDenyUrls:S,networkCaptureBodies:v,networkRequestHeaders:oo(I),networkResponseHeaders:oo(T),beforeAddRecordingEvent:A,beforeErrorSampling:Y,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${so}`:so),this._isInitialized&&ri())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return io}set _isInitialized(t){io=t}afterAllSetup(t){!ri()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=l_(this._initialOptions,t);this._replay=new qe({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}ur.__initStatic();function l_(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...ie(e)},s=Bn(n.replaysSessionSampleRate),i=Bn(n.replaysOnErrorSampleRate);return s==null&&i==null&&Pt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function oo(e){return[...c_,...e.map(t=>t.toLowerCase())]}const ao=new WeakMap,Cr=new Map,cs={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function d_(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:o}={traceFetch:cs.traceFetch,traceXHR:cs.traceXHR,...t},a=typeof s=="function"?s:l=>!0,c=l=>m_(l,o),u={};n&&(e.addEventProcessor(l=>(l.type==="transaction"&&l.spans&&l.spans.forEach(d=>{if(d.op==="http.client"){const f=Cr.get(d.span_id);f&&(d.timestamp=f/1e3,Cr.delete(d.span_id))}}),l)),Qc(l=>{if(l.response){const d=ao.get(l.response);d&&l.endTimestamp&&Cr.set(d,l.endTimestamp)}}),To(l=>{const d=wd(l,a,c,u);if(l.response&&l.fetchData.__span&&ao.set(l.response,l.fetchData.__span),d){const f=Ec(l.fetchData.url),p=f?ot(f).host:void 0;d.setAttributes({"http.url":f,"server.address":p})}i&&d&&co(d)})),r&&Ia(l=>{const d=g_(l,a,c,u);i&&d&&co(d)})}function f_(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function co(e){const{url:t}=U(e).data||{};if(!t||typeof t!="string")return;const n=Mt("resource",({entries:r})=>{r.forEach(s=>{f_(s)&&s.name.endsWith(t)&&(h_(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function p_(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function ke(e=0){return((me||performance.timeOrigin)+e)/1e3}function h_(e){const{name:t,version:n}=p_(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),me?[...r,["http.request.redirect_start",ke(e.redirectStart)],["http.request.fetch_start",ke(e.fetchStart)],["http.request.domain_lookup_start",ke(e.domainLookupStart)],["http.request.domain_lookup_end",ke(e.domainLookupEnd)],["http.request.connect_start",ke(e.connectStart)],["http.request.secure_connection_start",ke(e.secureConnectionStart)],["http.request.connection_end",ke(e.connectEnd)],["http.request.request_start",ke(e.requestStart)],["http.request.response_start",ke(e.responseStart)],["http.request.response_end",ke(e.responseEnd)]]:r}function m_(e,t){const n=C.location&&C.location.href;if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return t?Ge(r.toString(),t)||i&&Ge(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?Ge(e,t):r}}function g_(e,t,n,r){const s=e.xhr,i=s&&s[rt];if(!s||s.__sentry_own_request__||!i)return;const o=Ue()&&t(i.url);if(e.endTimestamp&&o){const f=s.__sentry_xhr_span_id__;if(!f)return;const p=r[f];p&&i.status_code!==void 0&&($o(p,i.status_code),p.end(),delete r[f]);return}const a=Ec(i.url),c=a?ot(a).host:void 0,u=!!fe(),l=o&&u?Ze({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":a,url:i.url,"server.address":c,[ae]:"auto.http.browser",[Jt]:"http.client"}}):new Bt;s.__sentry_xhr_span_id__=l.spanContext().spanId,r[s.__sentry_xhr_span_id__]=l;const d=L();return s.setRequestHeader&&n(i.url)&&d&&__(s,d,Ue()&&u?l:void 0),l}function __(e,t,n){const r=J(),s=Ee(),{traceId:i,spanId:o,sampled:a,dsc:c}={...s.getPropagationContext(),...r.getPropagationContext()},u=n&&Ue()?Wo(n):hs(i,o,a),l=Oo(c||(n?mt(n):Zn(i,t)));y_(e,u,l)}function y_(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(Fr,n)}catch{}}function Ec(e){try{return new URL(e,C.location.origin).href}catch{return}}function S_(){C&&C.document?C.document.addEventListener("visibilitychange",()=>{const e=fe();if(!e)return;const t=ce(e);if(C.document.hidden&&t){const n="cancelled",{op:r,status:s}=U(t);we&&m.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:ne,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):we&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const E_="BrowserTracing",b_={...xn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!1,enableInp:!0,_experiments:{},...cs},bc=(e={})=>{tl();const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:s},beforeStartSpan:i,idleTimeout:o,finalTimeout:a,childSpanTimeout:c,markBackgroundSpan:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,instrumentPageLoad:h,instrumentNavigation:g}={...b_,...e},E=Ef();t&&jf(),r&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?vf():n&&bf(),s&&Tf();const S={name:void 0,source:void 0};function v(I,T){const x=T.op==="pageload",_=i?i(T):T,y=_.attributes||{};T.name!==_.name&&(y[Le]="custom",_.attributes=y),S.name=_.name,S.source=y[Le];const k=Jo(_,{idleTimeout:o,finalTimeout:a,childSpanTimeout:c,disableAutoFinish:x,beforeSpanEnd:b=>{E(),Cf(b)}});function P(){["interactive","complete"].includes(C.document.readyState)&&I.emit("idleSpanEnableAutoFinish",k)}return x&&C.document&&(C.document.addEventListener("readystatechange",()=>{P()}),P()),k}return{name:E_,afterAllSetup(I){let T,x=C.location&&C.location.href;I.on("startNavigationSpan",_=>{L()===I&&(T&&!U(T).timestamp&&(we&&m.log(`[Tracing] Finishing current root span with op: ${U(T).op}`),T.end()),T=v(I,{op:"navigation",..._}))}),I.on("startPageLoadSpan",(_,y={})=>{if(L()!==I)return;T&&!U(T).timestamp&&(we&&m.log(`[Tracing] Finishing current root span with op: ${U(T).op}`),T.end());const k=y.sentryTrace||uo("sentry-trace"),P=y.baggage||uo("baggage"),b=vu(k,P);J().setPropagationContext(b),T=v(I,{op:"pageload",..._})}),I.on("spanEnd",_=>{const y=U(_).op;if(_!==ce(_)||y!=="navigation"&&y!=="pageload")return;const k=J(),P=k.getPropagationContext();k.setPropagationContext({...P,sampled:P.sampled!==void 0?P.sampled:ht(_),dsc:P.dsc||mt(_)})}),C.location&&(h&&v_(I,{name:C.location.pathname,startTime:me?me/1e3:void 0,attributes:{[Le]:"url",[ae]:"auto.pageload.browser"}}),g&&rr(({to:_,from:y})=>{if(y===void 0&&x&&x.indexOf(_)!==-1){x=void 0;return}y!==_&&(x=void 0,T_(I,{name:C.location.pathname,attributes:{[Le]:"url",[ae]:"auto.navigation.browser"}}))})),u&&S_(),s&&I_(o,a,c,S),t&&Gf(),d_(I,{traceFetch:l,traceXHR:d,tracePropagationTargets:I.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:f,enableHTTPTimings:p})}}};function v_(e,t,n){e.emit("startPageLoadSpan",t,n),J().setTransactionName(t.name);const r=fe();return(r&&U(r).op)==="pageload"?r:void 0}function T_(e,t){Ee().setPropagationContext(Pn()),J().setPropagationContext(Pn()),e.emit("startNavigationSpan",t),J().setTransactionName(t.name);const n=fe();return(n&&U(n).op)==="navigation"?n:void 0}function uo(e){const t=Lc(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function I_(e,t,n,r){let s;const i=()=>{const o="ui.action.click",a=fe(),c=a&&ce(a);if(c){const u=U(c).op;if(["navigation","pageload"].includes(u)){we&&m.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Hr,"interactionInterrupted"),s.end(),s=void 0),!r.name){we&&m.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}s=Jo({name:r.name,op:o,attributes:{[Le]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};C.document&&addEventListener("click",i,{once:!1,capture:!0})}function w_(e){const t={defaultIntegrations:k_(e),...e};return ia(t,"astro",["astro","browser"]),Up(t)}function k_(e){if((typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__)&&Ue(e))return[...Ra(),bc()]}w_({dsn:"https://485040f334292dc42c1b62f4e61d1546@o227862.ingest.us.sentry.io/4507344347332608",debug:!1,environment:"live",release:"master#2488",tracesSampleRate:.1,sampleRate:.2,integrations:[bc(),u_()],replaysSessionSampleRate:.025,replaysOnErrorSampleRate:.1});
//# sourceMappingURL=page.DrPuRaBs.js.map
