genius-emagst.akamaized.net Open in urlscan Pro
2a02:26f0:3500:11::215:14dd  Public Scan

URL: https://genius-emagst.akamaized.net/dist/assets/genius-sentry.C0joceFt.js
Submission: On March 27 via api from RO — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

import"../embed.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]="f6f5d446-cf1a-4878-a2f2-b134532c15ff",e._sentryDebugIdIdentifier="sentry-dbid-f6f5d446-cf1a-4878-a2f2-b134532c15ff")}catch{}})();const la=Object.prototype.toString;function da(e){switch(la.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return $e(e,Error)}}function Ut(e,t){return la.call(e)===`[object ${t}]`}function Fs(e){return Ut(e,"ErrorEvent")}function Pi(e){return Ut(e,"DOMError")}function Fl(e){return Ut(e,"DOMException")}function Me(e){return Ut(e,"String")}function $s(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Bs(e){return e===null||$s(e)||typeof e!="object"&&typeof e!="function"}function Ot(e){return Ut(e,"Object")}function _r(e){return typeof Event<"u"&&$e(e,Event)}function $l(e){return typeof Element<"u"&&$e(e,Element)}function Bl(e){return Ut(e,"RegExp")}function _n(e){return!!(e&&e.then&&typeof e.then=="function")}function Hl(e){return Ot(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function fa(e){return typeof e=="number"&&e!==e}function $e(e,t){try{return e instanceof t}catch{return!1}}function pa(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function xt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Fi(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{pa(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Ul(e,t,n=!1){return Me(e)?Bl(t)?t.test(e):Me(t)?n?e===t:e.includes(t):!1:!1}function Wt(e,t=[],n=!1){return t.some(r=>Ul(e,r,n))}function ha(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!$e(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=Wl(ss(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function ss(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if($e(r[s],Error)){$i(o,a);const u=e(t,r[s]),l=c.length;Bi(u,s,l,a),c=ss(e,t,n,r[s],s,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if($e(u,Error)){$i(o,a);const d=e(t,u),f=c.length;Bi(d,`errors[${l}]`,f,a),c=ss(e,t,n,u,s,[d,...c],d,f)}}),c}function $i(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 Bi(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 Wl(e,t){return e.map(n=>(n.value&&(n.value=xt(n.value,t)),n))}function On(e){return e&&e.Math==Math?e:void 0}const N=typeof globalThis=="object"&&On(globalThis)||typeof window=="object"&&On(window)||typeof self=="object"&&On(self)||typeof global=="object"&&On(global)||function(){return this}()||{};function Hs(){return N}function ma(e,t,n){const r=n||N,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}const At=Hs(),jl=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||jl;for(;n&&i++<r&&(u=zl(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 zl(e,t){const n=e,r=[];let s,i,o,a,c;if(!n||!n.tagName)return"";if(At.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(u&&u.length)u.forEach(d=>{r.push(`[${d[0]}="${d[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&Me(s))for(i=s.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);const l=["aria-label","type","name","title","alt"];for(c=0;c<l.length;c++)o=l[c],a=n.getAttribute(o),a&&r.push(`[${o}="${a}"]`);return r.join("")}function ga(){try{return At.document.location.href}catch{return""}}function _a(e){return At.document&&At.document.querySelector?At.document.querySelector(e):null}function ya(e){if(!At.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const jt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Gl="Sentry Logger ",is=["debug","info","warn","error","log","assert","trace"],Qn={};function ct(e){if(!("console"in N))return e();const t=N.console,n={},r=Object.keys(Qn);r.forEach(s=>{const i=Qn[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function ql(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return jt?is.forEach(n=>{t[n]=(...r)=>{e&&ct(()=>{N.console[n](`${Gl}[${n}]:`,...r)})}}):is.forEach(n=>{t[n]=()=>{}}),t}const h=ql(),Yl=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Vl(e){return e==="http"||e==="https"}function ft(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 Sa(e){const t=Yl.exec(e);if(!t){ct(()=>{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 ba({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function ba(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Kl(e){if(!jt)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(h.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?Vl(r)?t&&isNaN(parseInt(t,10))?(h.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(h.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(h.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ea(e){const t=typeof e=="string"?Sa(e):ba(e);if(!(!t||!Kl(t)))return t}class xe 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 oe(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&va(s,r),e[t]=s}function ut(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{jt&&h.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function va(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ut(e,"__sentry_original__",t)}catch{}}function Us(e){return e.__sentry_original__}function Xl(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Ta(e){if(da(e))return{message:e.message,name:e.name,stack:e.stack,...Ui(e)};if(_r(e)){const t={type:e.type,target:Hi(e.target),currentTarget:Hi(e.currentTarget),...Ui(e)};return typeof CustomEvent<"u"&&$e(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Hi(e){try{return $l(e)?Ke(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ui(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 Jl(e,t=40){const n=Object.keys(Ta(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return xt(n[0],t);for(let r=n.length;r>0;r--){const s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length?s:xt(s,t)}return""}function ae(e){return os(e,new Map)}function os(e,t){if(Zl(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]=os(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(os(s,t))}),r}return e}function Zl(e){if(!Ot(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Ia=50,Wi=/\(error: (.*)\)/,ji=/captureMessage|captureException/;function wa(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const s=[],i=n.split(`
`);for(let o=r;o<i.length;o++){const a=i[o];if(a.length>1024)continue;const c=Wi.test(a)?a.replace(Wi,"$1"):a;if(!c.match(/\S*Error: /)){for(const u of t){const l=u(c);if(l){s.push(l);break}}if(s.length>=Ia)break}}return ed(s)}}function Ql(e){return Array.isArray(e)?wa(...e):e}function ed(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),ji.test(t[t.length-1].function||"")&&(t.pop(),ji.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Ia).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const Wr="<anonymous>";function Be(e){try{return!e||typeof e!="function"?Wr:e.name||Wr}catch{return Wr}}const qn={},zi={};function pt(e,t){qn[e]=qn[e]||[],qn[e].push(t)}function ht(e,t){zi[e]||(t(),zi[e]=!0)}function ve(e,t){const n=e&&qn[e];if(n)for(const r of n)try{r(t)}catch(s){jt&&h.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${Be(r)}
Error:`,s)}}function td(e){const t="console";pt(t,e),ht(t,nd)}function nd(){"console"in N&&is.forEach(function(e){e in N.console&&oe(N.console,e,function(t){return Qn[e]=t,function(...n){ve("console",{args:n,level:e});const s=Qn[e];s&&s.apply(N.console,n)}})})}function U(){const e=N,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 ka(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ge(e){const{message:t,event_id:n}=e;if(t)return t;const r=ka(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function as(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=n||"Error")}function ln(e,t){const n=ka(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 Gi(e){if(e&&e.__sentry_captured__)return!0;try{ut(e,"__sentry_captured__",!0)}catch{}return!1}function Ca(e){return Array.isArray(e)?e:[e]}const Et=N,rd=1e3;let qi,cs,us;function Ra(e){const t="dom";pt(t,e),ht(t,sd)}function sd(){if(!Et.document)return;const e=ve.bind(null,"dom"),t=Yi(e,!0);Et.document.addEventListener("click",t,!1),Et.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=Et[n]&&Et[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(oe(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=Yi(e);l.handler=d,s.call(this,i,d,a)}l.refCount++}catch{}return s.call(this,i,o,a)}}),oe(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 id(e){if(e.type!==cs)return!1;try{if(!e.target||e.target._sentryId!==us)return!1}catch{}return!0}function od(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Yi(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=ad(n);if(od(n.type,r))return;ut(n,"_sentryCaptured",!0),r&&!r._sentryId&&ut(r,"_sentryId",U());const s=n.type==="keypress"?"input":n.type;id(n)||(e({event:n,name:s,global:t}),cs=n.type,us=r?r._sentryId:void 0),clearTimeout(qi),qi=Et.setTimeout(()=>{us=void 0,cs=void 0},rd)}}function ad(e){try{return e.target}catch{return null}}const ls=Hs();function xa(){if(!("fetch"in ls))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ds(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function cd(){if(typeof EdgeRuntime=="string")return!0;if(!xa())return!1;if(ds(ls.fetch))return!0;let e=!1;const t=ls.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=ds(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){jt&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Ws(e){const t="fetch";pt(t,e),ht(t,ud)}function ud(){cd()&&oe(N,"fetch",function(e){return function(...t){const{method:n,url:r}=ld(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return ve("fetch",{...s}),e.apply(N,t).then(i=>{const o={...s,endTimestamp:Date.now(),response:i};return ve("fetch",o),i},i=>{const o={...s,endTimestamp:Date.now(),error:i};throw ve("fetch",o),i})}})}function fs(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Vi(e){return typeof e=="string"?e:e?fs(e,"url")?e.url:e.toString?e.toString():"":""}function ld(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Vi(n),method:fs(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Vi(t),method:fs(t,"method")?String(t.method).toUpperCase():"GET"}}let Nn=null;function Aa(e){const t="error";pt(t,e),ht(t,dd)}function dd(){Nn=N.onerror,N.onerror=function(e,t,n,r,s){return ve("error",{column:r,error:s,line:n,msg:e,url:t}),Nn&&!Nn.__SENTRY_LOADER__?Nn.apply(this,arguments):!1},N.onerror.__SENTRY_INSTRUMENTED__=!0}let Dn=null;function Ma(e){const t="unhandledrejection";pt(t,e),ht(t,fd)}function fd(){Dn=N.onunhandledrejection,N.onunhandledrejection=function(e){return ve("unhandledrejection",e),Dn&&!Dn.__SENTRY_LOADER__?Dn.apply(this,arguments):!0},N.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ln=Hs();function pd(){const e=Ln.chrome,t=e&&e.app&&e.app.runtime,n="history"in Ln&&!!Ln.history.pushState&&!!Ln.history.replaceState;return!t&&n}const Jt=N;let Pn;function yn(e){const t="history";pt(t,e),ht(t,hd)}function hd(){if(!pd())return;const e=Jt.onpopstate;Jt.onpopstate=function(...n){const r=Jt.location.href,s=Pn;if(Pn=r,ve("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=Pn,o=String(s);Pn=o,ve("history",{from:i,to:o})}return n.apply(this,r)}}oe(Jt.history,"pushState",t),oe(Jt.history,"replaceState",t)}const md=N,qe="__sentry_xhr_v3__";function js(e){const t="xhr";pt(t,e),ht(t,gd)}function gd(){if(!md.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;oe(e,"open",function(t){return function(...n){const r=Date.now(),s=Me(n[0])?n[0].toUpperCase():void 0,i=_d(n[1]);if(!s||!i)return t.apply(this,n);this[qe]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const a=this[qe];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};ve("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?oe(this,"onreadystatechange",function(a){return function(...c){return o(),a.apply(this,c)}}):this.addEventListener("readystatechange",o),oe(this,"setRequestHeader",function(a){return function(...c){const[u,l]=c,d=this[qe];return d&&Me(u)&&Me(l)&&(d.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),t.apply(this,n)}}),oe(e,"send",function(t){return function(...n){const r=this[qe];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return ve("xhr",s),t.apply(this,n)}})}function _d(e){if(Me(e))return e;try{return e.toString()}catch{}}function yd(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Sd(){return"npm"}function bd(){return!yd()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ps(){return typeof window<"u"&&(!bd()||Ed())}function Ed(){return N.process!==void 0&&N.process.type==="renderer"}function vd(){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 Ce(e,t=100,n=1/0){try{return hs("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Oa(e,t=3,n=100*1024){const r=Ce(e,t);return kd(r)>n?Oa(e,t-1,n):r}function hs(e,t,n=1/0,r=1/0,s=vd()){const[i,o]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!fa(t))return t;const a=Td(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 hs("",p,c-1,r,s)}catch{}const l=Array.isArray(t)?[]:{};let d=0;const f=Ta(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){l[p]="[MaxProperties ~]";break}const m=f[p];l[p]=hs(p,m,c-1,r,s),d++}return o(t),l}function Td(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(pa(t))return"[VueViewModel]";if(Hl(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=Id(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Id(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function wd(e){return~-encodeURI(e).split(/%..|./).length}function kd(e){return wd(JSON.stringify(e))}var Pe;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Pe||(Pe={}));function Nt(e){return new he(t=>{t(e)})}function zs(e){return new he((t,n)=>{n(e)})}class he{constructor(t){he.prototype.__init.call(this),he.prototype.__init2.call(this),he.prototype.__init3.call(this),he.prototype.__init4.call(this),this._state=Pe.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new he((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 he((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(Pe.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Pe.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Pe.PENDING){if(_n(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Pe.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Pe.RESOLVED&&n[1](this._value),this._state===Pe.REJECTED&&n[2](this._value),n[0]=!0)})}}}function Cd(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]}function s(o){if(!n())return zs(new xe("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 he((a,c)=>{let u=t.length;if(!u)return a(!0);const l=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{Nt(d).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:t,add:s,drain:i}}function Yn(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 Rd=["fatal","error","warning","log","info","debug"];function xd(e){return e==="warn"?"warning":Rd.includes(e)?e:"log"}const Na=1e3;function Sn(){return Date.now()/Na}function Ad(){const{performance:e}=N;if(!e||!e.now)return Sn;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Na}const mt=Ad(),ce=(()=>{const{performance:e}=N;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})(),ms="baggage",Da="sentry-",Md=/^sentry-/,Od=8192;function La(e){if(!Me(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((r,s)=>{const i=Ki(s);for(const o of Object.keys(i))r[o]=i[o];return r},{});else{if(!e)return;t=Ki(e)}const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(Md)){const o=s.slice(Da.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Pa(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Da}${r}`]=s),n),{});return Nd(t)}function Ki(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function Nd(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>Od?(jt&&h.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const Dd=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Gs(e){if(!e)return;const t=e.match(Dd);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 Ld(e,t){const n=Gs(e),r=La(t),{traceId:s,parentSpanId:i,parentSampled:o}=n||{};return n?{traceparentData:n,dynamicSamplingContext:r||{},propagationContext:{traceId:s||U(),parentSpanId:i||U().substring(16),spanId:U().substring(16),sampled:o,dsc:r||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:s||U(),spanId:U().substring(16)}}}function Fa(e,t){const n=Gs(e),r=La(t),{traceId:s,parentSpanId:i,parentSampled:o}=n||{};return n?{traceId:s||U(),parentSpanId:i||U().substring(16),spanId:U().substring(16),sampled:o,dsc:r||{}}:{traceId:s||U(),spanId:U().substring(16)}}function qs(e=U(),t=U().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Xe(e,t=[]){return[e,t]}function Pd(e,t){const[n,r]=e;return[n,[...r,t]]}function Dt(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 Fd(e,t){return Dt(e,(n,r)=>t.includes(r))}function gs(e,t){return(t||new TextEncoder).encode(e)}function $a(e,t){const[n,r]=e;let s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[gs(s,t),o]:s.push(typeof o=="string"?gs(o,t):o)}for(const o of r){const[a,c]=o;if(i(`
${JSON.stringify(a)}
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(Ce(c))}i(u)}}return typeof s=="string"?s:$d(s)}function $d(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 Bd(e,t,n){let r=typeof e=="string"?t.encode(e):e;function s(c){const u=r.subarray(0,c);return r=r.subarray(c+1),u}function i(){let c=r.indexOf(10);return c<0&&(c=r.length),JSON.parse(n.decode(s(c)))}const o=i(),a=[];for(;r.length;){const c=i(),u=typeof c.length=="number"?c.length:void 0;a.push([c,u?s(u):i()])}return[o,a]}function Hd(e,t){const n=typeof e.data=="string"?gs(e.data,t):e.data;return[ae({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Ud={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"unknown"};function Xi(e){return Ud[e]}function Ys(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ba(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:ft(r)},...s&&{trace:ae({...s})}}}function Wd(e,t,n){const r=[{type:"client_report"},{timestamp:n||Sn(),discarded_events:e}];return Xe(t?{dsn:t}:{},[r])}const jd=60*1e3;function Ha(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?jd:r-t}function zd(e,t){return e[t]||e.all||0}function Ua(e,t,n=Date.now()){return zd(e,t)>n}function Wa(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]=a.split(":",2),l=parseInt(c,10),d=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+d;else for(const f of u.split(";"))s[f]=r+d}else o?s.all=r+Ha(o,r):t===429&&(s.all=r+60*1e3);return s}function Gd(e,t){return e(t.stack||"",1)}function qd(e,t){const n={type:t.name||t.constructor.name,value:t.message},r=Gd(e,t);return r.length&&(n.stacktrace={frames:r}),n}function Yd(e,t){return e??t()}function Vn(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 T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,bn="production";function Vs(){return ma("globalEventProcessors",()=>[])}function ja(e){Vs().push(e)}function er(e,t,n,r=0){return new he((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o({...t},n);T&&o.id&&a===null&&h.log(`Event processor "${o.id}" dropped event`),_n(a)?a.then(c=>er(e,c,n,r+1).then(s)).then(null,i):er(e,a,n,r+1).then(s).then(null,i)}})}function za(e){const t=mt(),n={sid:U(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Vd(n)};return e&&lt(n,e),n}function lt(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||mt(),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:U()),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 Ga(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),lt(e,n)}function Vd(e){return ae({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 Kd=0,qa=1;function Ks(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:c}=j(e);return ae({data:r,op:s,parent_span_id:i,span_id:t,status:o,tags:a,trace_id:n,origin:c})}function yr(e){const{traceId:t,spanId:n}=e.spanContext(),r=Xs(e);return qs(t,n,r)}function Sr(e){return typeof e=="number"?Ji(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Ji(e.getTime()):mt()}function Ji(e){return e>9999999999?e/1e3:e}function j(e){return Xd(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Xd(e){return typeof e.getSpanJSON=="function"}function Xs(e){const{traceFlags:t}=e.spanContext();return!!(t&qa)}function Js(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||U(),timestamp:t.timestamp||Sn()},u=n.integrations||e.integrations.map(y=>y.name);Jd(c,e),ef(c,u),t.type===void 0&&Zd(c,e.stackParser);const l=nf(r,n.captureContext);n.mechanism&&ln(c,n.mechanism);const d=s&&s.getEventProcessors?s.getEventProcessors():[],f=Rf().getScopeData();if(i){const y=i.getScopeData();Qi(f,y)}if(l){const y=l.getScopeData();Qi(f,y)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Ka(c,f);const m=[...d,...Vs(),...f.eventProcessors];return er(m,c,n).then(y=>(y&&Qd(y),typeof o=="number"&&o>0?tf(y,o,a):y))}function Jd(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:bn),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=xt(e.message,i));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=xt(o.value,i));const a=e.request;a&&a.url&&(a.url=xt(a.url,i))}const Zi=new WeakMap;function Zd(e,t){const n=N._sentryDebugIds;if(!n)return;let r;const s=Zi.get(t);s?r=s:(r=new Map,Zi.set(t,r));const i=Object.keys(n).reduce((o,a)=>{let c;const u=r.get(a);u?c=u:(c=t(a),r.set(a,c));for(let l=c.length-1;l>=0;l--){const d=c[l];if(d.filename){o[d.filename]=n[a];break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Qd(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.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function ef(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function tf(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=>{const i=j(s).data;return i&&(s.data=Ce(i,t,n)),s})),r}function nf(e,t){if(!t)return e;const n=e?e.clone():new Oe;return n.update(t),n}function rf(e){if(e)return sf(e)?{captureContext:e}:af(e)?{captureContext:e}:e}function sf(e){return e instanceof Oe||typeof e=="function"}const of=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function af(e){return Object.keys(e).some(t=>of.includes(t))}function br(e,t){return W().captureException(e,rf(t))}function cf(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return W().captureMessage(e,n,r)}function Zs(e,t){return W().captureEvent(e,t)}function uf(e){W().configureScope(e)}function He(e,t){W().addBreadcrumb(e,t)}function Ya(e,t){W().setContext(e,t)}function lf(e){W().setExtras(e)}function df(e,t){W().setExtra(e,t)}function ff(e){W().setTags(e)}function pf(e,t){W().setTag(e,t)}function hf(e){W().setUser(e)}function zt(...e){const t=W();if(e.length===2){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function mf(e){return vr(()=>e(De()))}function gf(e,t){return zt(n=>(n.setSpan(e),t(n)))}function _f(e,t){return W().startTransaction({...e},t)}async function yf(e){const t=x();return t?t.flush(e):(T&&h.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Sf(e){const t=x();return t?t.close(e):(T&&h.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function bf(){return W().lastEventId()}function x(){return W().getClient()}function Ef(){return!!x()}function se(){return W().getScope()}function _s(e){const t=x(),n=De(),r=se(),{release:s,environment:i=bn}=t&&t.getOptions()||{},{userAgent:o}=N.navigator||{},a=za({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status==="ok"&&lt(c,{status:"exited"}),Qs(),n.setSession(a),r.setSession(a),a}function Qs(){const e=De(),t=se(),n=t.getSession()||e.getSession();n&&Ga(n),Va(),e.setSession(),t.setSession()}function Va(){const e=De(),t=se(),n=x(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function ys(e=!1){if(e){Qs();return}Va()}function tr(e){return e.transaction}function Er(e,t,n){const r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=ae({environment:r.environment||bn,release:r.release,user_segment:i,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",o),o}function Lt(e){const t=x();if(!t)return{};const n=Er(j(e).trace_id||"",t,se()),r=tr(e);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:i,source:o}=r.metadata;i!=null&&(n.sample_rate=`${i}`);const a=j(r);return o&&o!=="url"&&(n.transaction=a.description),n.sampled=String(Xs(r)),t.emit&&t.emit("createDsc",n),n}function Ka(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;vf(e,t),r&&wf(e,r),kf(e,n),Tf(e,s),If(e,i)}function Qi(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:m}=t;Zt(e,"extra",n),Zt(e,"tags",r),Zt(e,"user",s),Zt(e,"contexts",i),Zt(e,"sdkProcessingMetadata",a),o&&(e.level=o),p&&(e.transactionName=p),m&&(e.span=m),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 Zt(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 vf(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t,c=ae(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=ae(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const l=ae(s);l&&Object.keys(l).length&&(e.user={...l,...e.user});const d=ae(i);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),a&&(e.transaction=a)}function Tf(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function If(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function wf(e,t){e.contexts={trace:Ks(t),...e.contexts};const n=tr(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Lt(t),...e.sdkProcessingMetadata};const r=j(n).description;r&&(e.tags={transaction:r,...e.tags})}}function kf(e,t){e.fingerprint=e.fingerprint?Ca(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const Cf=100;let jr;class Oe{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=eo()}static clone(t){return t?t.clone():new Oe}clone(){const t=new Oe;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._span=this._span,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}setClient(t){this._client=t}getClient(){return this._client}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,segment:void 0,username:void 0},this._session&&lt(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}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}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;if(n instanceof Oe){const r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(Ot(n)){const r=t;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return 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._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=eo(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Cf;if(r<=0)return this;const s={timestamp:Sn(),...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}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:s,_extra:i,_user:o,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:f,_span:p}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:s,extra:i,user:o,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:l,sdkProcessingMetadata:d,transactionName:f,span:p}}applyToEvent(t,n={},r=[]){Ka(t,this.getScopeData());const s=[...r,...Vs(),...this._eventProcessors];return er(s,t,n)}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:U();if(!this._client)return h.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:U();if(!this._client)return h.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:U();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(h.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)}}function Rf(){return jr||(jr=new Oe),jr}function eo(){return{traceId:U(),spanId:U().substring(16)}}const nr="7.107.0",Xa=parseFloat(nr),xf=100;class ei{constructor(t,n,r,s=Xa){this._version=s;let i;n?i=n:(i=new Oe,i.setClient(t));let o;r?o=r:(o=new Oe,o.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=o}isOlderThan(t){return this._version<t}bindClient(t){const n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const n=this.pushScope();let r;try{r=t(n)}catch(s){throw this.popScope(),s}return _n(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}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:U(),s=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureMessage(t,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:U(),i=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s}),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:U();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=xf}=s.getOptions&&s.getOptions()||{};if(o<=0)return;const c={timestamp:Sn(),...t},u=i?ct(()=>i(c,n)):c;u!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,o))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=Ss(this);try{t(this)}finally{Ss(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return T&&h.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){const r=this._callExtensionMethod("startTransaction",t,n);return T&&!r&&(this.getClient()?h.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):h.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&Ga(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=bn}=r&&r.getOptions()||{},{userAgent:o}=N.navigator||{},a=za({release:s,environment:i,user:n.getUser(),...o&&{userAgent:o},...t}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&lt(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){const s=Gt().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n);T&&h.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Gt(){return N.__SENTRY__=N.__SENTRY__||{extensions:{},hub:void 0},N}function Ss(e){const t=Gt(),n=rr(t);return Ja(t,e),n}function W(){const e=Gt();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Af(e)}function De(){return W().getIsolationScope()}function Af(e=Gt()){return(!Mf(e)||rr(e).isOlderThan(Xa))&&Ja(e,new ei),rr(e)}function vr(e,t={}){const n=Gt();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(e,t):e()}function Mf(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function rr(e){return ma("hub",()=>new ei,e)}function Ja(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function Ne(e){return(e||W()).getScope().getTransaction()}const Of=Gs;let to=!1;function Nf(){to||(to=!0,Aa(bs),Ma(bs))}function bs(){const e=Ne();if(e){const t="internal_error";T&&h.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}bs.tag="sentry_tracingErrorCallback";var no;(function(e){const t="ok";e.Ok=t;const n="deadline_exceeded";e.DeadlineExceeded=n;const r="unauthenticated";e.Unauthenticated=r;const s="permission_denied";e.PermissionDenied=s;const i="not_found";e.NotFound=i;const o="resource_exhausted";e.ResourceExhausted=o;const a="invalid_argument";e.InvalidArgument=a;const c="unimplemented";e.Unimplemented=c;const u="unavailable";e.Unavailable=u;const l="internal_error";e.InternalError=l;const d="unknown_error";e.UnknownError=d;const f="cancelled";e.Cancelled=f;const p="already_exists";e.AlreadyExists=p;const m="failed_precondition";e.FailedPrecondition=m;const _="aborted";e.Aborted=_;const y="out_of_range";e.OutOfRange=y;const g="data_loss";e.DataLoss=g})(no||(no={}));function ti(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}const Df=ti;function Tr(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=ti(t);n!=="unknown_error"&&e.setStatus(n)}function ni(e,t,n=()=>{}){let r;try{r=e()}catch(s){throw t(s),n(),s}return Lf(r,t,n)}function Lf(e,t,n){return _n(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function qt(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=x(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Pf(e,t,n=()=>{},r=()=>{}){const s=W(),i=se(),o=i.getSpan(),a=wr(e),c=Ir(s,{parentSpan:o,spanContext:a,forceTransaction:!1,scope:i});return i.setSpan(c),ni(()=>t(c),u=>{c&&c.setStatus("internal_error"),n(u,c)},()=>{c&&c.end(),i.setSpan(o),r()})}function Ff(e,t){const n=wr(e);return vr(()=>zt(e.scope,r=>{const s=W(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Ir(s,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return ni(()=>t(a),()=>{if(a){const{status:c}=j(a);(!c||c==="ok")&&a.setStatus("internal_error")}},()=>a&&a.end())}))}function $f(e,t){const n=wr(e);return vr(()=>zt(e.scope,r=>{const s=W(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Ir(s,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});function c(){a&&a.end()}return ni(()=>t(a,c),()=>{if(a&&a.isRecording()){const{status:u}=j(a);(!u||u==="ok")&&a.setStatus("internal_error")}})}))}function ri(e){if(!qt())return;const t=wr(e),n=W(),r=e.scope?e.scope.getSpan():En();if(e.onlyIfParent&&!r)return;const o=(e.scope||se()).clone();return Ir(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:o})}function En(){return se().getSpan()}const Bf=({sentryTrace:e,baggage:t},n)=>{const r=se(),{traceparentData:s,dynamicSamplingContext:i,propagationContext:o}=Ld(e,t);r.setPropagationContext(o),T&&s&&h.log(`[Tracing] Continuing trace ${s.traceId}.`);const a={...s,metadata:ae({dynamicSamplingContext:i})};return n?vr(()=>n(a)):a};function Ir(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:s}){if(!qt())return;const i=De();let o;if(t&&!r)o=t.startChild(n);else if(t){const a=Lt(t),{traceId:c,spanId:u}=t.spanContext(),l=Xs(t);o=e.startTransaction({traceId:c,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:a,...n.metadata}})}else{const{traceId:a,dsc:c,parentSpanId:u,sampled:l}={...i.getPropagationContext(),...s.getPropagationContext()};o=e.startTransaction({traceId:a,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return s.setSpan(o),Hf(o,s,i),o}function wr(e){if(e.startTime){const t={...e};return t.startTimestamp=Sr(e.startTime),delete t.startTime,t}return e}const Za="_sentryScope",Qa="_sentryIsolationScope";function Hf(e,t,n){e&&(ut(e,Qa,n),ut(e,Za,t))}function Uf(e){return{scope:e[Za],isolationScope:e[Qa]}}let nn;function ec(e){return nn?nn.get(e):void 0}function tc(e){const t=ec(e);if(!t)return;const n={};for(const[,[r,s]]of t)n[r]||(n[r]=[]),n[r].push(ae(s));return n}function Wf(e,t,n,r,s,i){const o=En();if(o){const a=ec(o)||new Map,c=`${e}:${t}@${r}`,u=a.get(i);if(u){const[,l]=u;a.set(i,[c,{min:Math.min(l.min,n),max:Math.max(l.max,n),count:l.count+=1,sum:l.sum+=n,tags:l.tags}])}else a.set(i,[c,{min:n,max:n,count:1,sum:n,tags:s}]);nn||(nn=new WeakMap),nn.set(o,a)}}const ge="sentry.source",st="sentry.sample_rate",en="sentry.op",it="sentry.origin",jf="profile_id";class nc{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class kr{constructor(t={}){this._traceId=t.traceId||U(),this._spanId=t.spanId||U().substring(16),this._startTime=t.startTimestamp||mt(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[it]:t.origin||"manual",[en]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[en]}set op(t){this.setAttribute(en,t)}get origin(){return this._attributes[it]}set origin(t){this.setAttribute(it,t)}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?qa:Kd}}startChild(t){const n=new kr({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=tr(this);if(n.transaction=r,T&&r){const s=t&&t.op||"< unknown op >",i=j(n).description||"< unknown name >",o=r.spanContext().spanId,a=`[Tracing] Starting '${s}' span on transaction '${i}' (${o}).`;h.log(a),this._logMessage=a}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return Tr(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const n=tr(this);if(T&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&h.log(r.replace("Starting","Finishing"))}this._endTime=Sr(t)}toTraceparent(){return yr(this)}toContext(){return ae({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return Ks(this)}getSpanJSON(){return ae({data:this._getData(),description:this._name,op:this._attributes[en],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[it],_metrics_summary:tc(this),profile_id:this._attributes[jf],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:n}=this,r=Object.keys(t).length>0,s=Object.keys(n).length>0;if(!(!r&&!s))return r&&s?{...t,...n}:r?t:n}}class rc extends kr{constructor(t,n){super(t),this._contexts={},this._hub=n||W(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[ge]&&{source:this._attributes[ge]},...this._attributes[st]&&{sampleRate:this._attributes[st]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(ge,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new nc(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const n=Sr(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const t=super.toContext();return ae({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Lt(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(T&&h.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){T&&h.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&j(l).timestamp):[];if(this._trimEnd&&r.length>0){const l=r.map(d=>j(d).timestamp).filter(Boolean);this._endTime=l.reduce((d,f)=>d>f?d:f)}const{scope:s,isolationScope:i}=Uf(this),{metadata:o}=this,{source:a}=o,c={contexts:{...this._contexts,trace:Ks(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...o,capturedSpanScope:s,capturedSpanIsolationScope:i,...ae({dynamicSamplingContext:Lt(this)})},_metrics_summary:tc(this),...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(T&&h.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),T&&h.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const rn={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},zf="finishReason",yt=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Gf extends nc{constructor(t,n,r,s){super(s),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),j(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class qf extends rc{constructor(t,n,r=rn.idleTimeout,s=rn.finalTimeout,i=rn.heartbeatInterval,o=!1,a=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=yt[4],this._autoFinishAllowed=!a,o&&(T&&h.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=yt[3],this.end())},this._finalTimeout)}end(t){const n=Sr(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(zf,this._finishReason),this.spanRecorder){T&&h.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;j(r).timestamp||(r.setStatus("cancelled"),r.end(n),T&&h.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:s,timestamp:i}=j(r),o=s&&s<n,a=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&s&&i-s<a;if(T){const u=JSON.stringify(r,void 0,2);o?c||h.log("[Tracing] discarding Span since it finished after Transaction final timeout",u):h.log("[Tracing] discarding Span since it happened after Transaction was finished",u)}return o&&c}),T&&h.log("[Tracing] flushing IdleTransaction")}else T&&h.log("[Tracing] No active IdleTransaction");if(this._onScope){const r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const n=s=>{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new Gf(n,r,this.spanContext().spanId,t),T&&h.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=yt[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(T&&h.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=yt[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),T&&h.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,T&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(T&&h.log(`[Tracing] popActivity ${t}`),delete this.activities[t],T&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=mt();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=yt[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(T&&h.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=yt[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){T&&h.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function sc(e,t,n){if(!qt(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(st,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(st,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(st,Number(r))):(r=1,e.setAttribute(st,r)),ic(r)?r?(e.sampled=Math.random()<r,e.sampled?(T&&h.log(`[Tracing] starting ${e.op} transaction - ${j(e).description}`),e):(T&&h.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(T&&h.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(T&&h.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function ic(e){return fa(e)||!(typeof e=="number"||typeof e=="boolean")?(T&&h.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)}.`),!1):e<0||e>1?(T&&h.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function Yf(){const t=this.getScope().getSpan();return t?{"sentry-trace":yr(t)}:{}}function Vf(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=e.instrumenter||"sentry";s!==i&&(T&&h.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.
The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),e.sampled=!1);let o=new rc(e,this);return o=sc(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function sr(e,t,n,r,s,i,o,a=!1){const c=e.getClient(),u=c&&c.getOptions()||{};let l=new qf(t,e,n,r,o,s,a);return l=sc(l,u,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...i}),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function si(){const e=Gt();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=Vf),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Yf),Nf())}function oc(e,t,n){const r=Ne();r&&r.setMeasurement(e,t,n)}function Kf(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 Xf(e,t,n,r){const s=Ys(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:ft(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Xe(i,[o])}function ac(e,t,n,r){const s=Ys(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Kf(e,n&&n.sdk);const o=Ba(e,s,r,t);return delete e.sdkProcessingMetadata,Xe(o,[[{type:i},e]])}const Jf="7";function cc(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Zf(e){return`${cc(e)}${e.projectId}/envelope/`}function Qf(e,t){return Xl({sentry_key:e.publicKey,sentry_version:Jf,...t&&{sentry_client:`${t.name}/${t.version}`}})}function uc(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${Zf(e)}?${Qf(e,r)}`}function ep(e,t){const n=Ea(e);if(!n)return"";const r=`${cc(n)}embed/error-page/`;let s=`dsn=${ft(n)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const o=t.user;if(!o)continue;o.name&&(s+=`&name=${encodeURIComponent(o.name)}`),o.email&&(s+=`&email=${encodeURIComponent(o.email)}`)}else s+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${s}`}const ro=[];function tp(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function np(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=Ca(n(t)):r=t;const s=tp(r),i=ip(s,o=>o.name==="Debug");if(i!==-1){const[o]=s.splice(i,1);s.push(o)}return s}function rp(e,t){const n={};return t.forEach(r=>{r&&lc(e,r,n)}),n}function so(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function lc(e,t,n){if(n[t.name]){T&&h.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,ro.indexOf(t.name)===-1&&(t.setupOnce(ja,W),ro.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(e.addEventProcessor&&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)}T&&h.log(`Integration installed: ${t.name}`)}function sp(e){const t=x();if(!t||!t.addIntegration){T&&h.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function ip(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function _e(e,t){return Object.assign(function(...r){return t(...r)},{id:e})}const dc="c",fc="g",ii="s",pc="d",hc=/[^a-zA-Z0-9_/.-]+/g,op=/[^\w\d\s_:/@.{}[\]$-]+/g,ap=5e3;function cp(e,t,n,r){const s=Object.entries(ae(r)).sort((i,o)=>i[0].localeCompare(o[0]));return`${e}${t}${n}${s}`}function up(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t>>>0}function lp(e){let t="";for(const n of e){const r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([i,o])=>`${i}:${o}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp}
`}return t}function dp(e){const t={};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=n.replace(hc,"_");t[r]=String(e[n]).replace(op,"")}return t}function fp(e,t,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=ft(t));const i=pp(e);return Xe(s,[i])}function pp(e){const t=lp(e);return[{type:"statsd",length:t.length},t]}const io="Not capturing exception because it's already been captured.";class hp{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Ea(t.dsn):T&&h.warn("No DSN provided, client will not send events."),this._dsn){const n=uc(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(Gi(t)){T&&h.log(io);return}let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i})),s}captureMessage(t,n,r,s){let i=r&&r.event_id;const o=$s(t)?t:String(t),a=Bs(t)?this.eventFromMessage(o,n,r):this.eventFromException(t,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{i=c})),i}captureEvent(t,n,r){if(n&&n.originalException&&Gi(n.originalException)){T&&h.log(io);return}let s=n&&n.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,o||r).then(a=>{s=a})),s}captureSession(t){typeof t.release!="string"?T&&h.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),lt(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.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Nt(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return T&&h.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const n=this._integrations[t.name];lc(this,t,this._integrations),n||so(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=ac(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Pd(r,Hd(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=Xf(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=`${t}:${n}`;T&&h.log(`Adding outcome: "${s}"`),this._outcomes[s]=this._outcomes[s]+1||1}}captureAggregateMetrics(t){T&&h.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=fp(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=rp(this,t),so(this,t),this._integrationsInitialized=!0}_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)&&(lt(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new he(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=De()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),Js(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:{trace_id:l,span_id:d,parent_span_id:f},...a.contexts};const m=p||Er(l,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:m,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(T){const i=s;i.logLevel==="log"?h.log(i.message):h.warn(i)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=gc(t),a=mc(t),c=t.type||"error",u=`before send for type \`${c}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),zs(new xe(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l=c==="replay_event"?"replay":c,f=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,f).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",l,t),new xe("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const _=gp(s,p,n);return mp(_,u)}).then(p=>{if(p===null)throw this.recordDroppedEvent("before_send",l,t),new xe(`${u} returned \`null\`, will not send event.`,"log");const m=r&&r.getSession();!o&&m&&this._updateSessionFromEvent(m,p);const _=p.transaction_info;if(o&&_&&p.transaction!==t.transaction){const y="custom";p.transaction_info={..._,source:y}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof xe?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new xe(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{T&&h.error("Error while sending event:",n)});T&&h.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}}function mp(e,t){const n=`${t} must return \`null\` or a valid event.`;if(_n(e))return e.then(r=>{if(!Ot(r)&&r!==null)throw new xe(n);return r},r=>{throw new xe(`${t} rejected with ${r}`)});if(!Ot(e)&&e!==null)throw new xe(n);return e}function gp(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;return mc(t)&&r?r(t,n):gc(t)&&s?s(t,n):t}function mc(e){return e.type===void 0}function gc(e){return e.type==="transaction"}function _c(e){const t=x();!t||!t.addEventProcessor||t.addEventProcessor(e)}class _p{constructor(t){this._value=t}get weight(){return 1}add(t){this._value+=t}toString(){return`${this._value}`}}class yp{constructor(t){this._last=t,this._min=t,this._max=t,this._sum=t,this._count=1}get weight(){return 5}add(t){this._last=t,t<this._min&&(this._min=t),t>this._max&&(this._max=t),this._sum+=t,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class Sp{constructor(t){this._value=[t]}get weight(){return this._value.length}add(t){this._value.push(t)}toString(){return this._value.join(":")}}class bp{constructor(t){this.first=t,this._value=new Set([t])}get weight(){return this._value.size}add(t){this._value.add(t)}toString(){return Array.from(this._value).map(t=>typeof t=="string"?up(t):t).join(":")}}const Ep={[dc]:_p,[fc]:yp,[pc]:Sp,[ii]:bp};function vp(e,t){t.debug===!0&&(T?h.enable():ct(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),se().update(t.initialScope);const r=new e(t);yc(r),Tp(r)}function yc(e){const n=W().getStackTop();n.client=e,n.scope.setClient(e)}function Tp(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const Ip=30;function oi(e,t,n=Cd(e.bufferSize||Ip)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(Dt(o,(d,f)=>{const p=Xi(f);if(Ua(r,p)){const m=oo(d,f);e.recordDroppedEvent("ratelimit_backoff",p,m)}else a.push(d)}),a.length===0)return Nt();const c=Xe(o[0],a),u=d=>{Dt(c,(f,p)=>{const m=oo(f,p);e.recordDroppedEvent(d,Xi(p),m)})},l=()=>t({body:$a(c,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&T&&h.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Wa(r,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof xe)return T&&h.error("Skipped sending event because buffer is full."),u("queue_overflow"),Nt();throw d})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function oo(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}const wp=100,ao=5e3,kp=36e5;function zr(e,t){T&&h.info(`[Offline]: ${e}`,t)}function Cp(e){return t=>{const n=e(t),r=t.createStore?t.createStore(t):void 0;let s=ao,i;function o(l,d,f){return Fd(l,["replay_event","replay_recording","client_report"])?!1:t.shouldStore?t.shouldStore(l,d,f):!0}function a(l){r&&(i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const d=await r.pop();d&&(zr("Attempting to send previously queued event"),u(d).catch(f=>{zr("Failed to retry sending",f)}))},l),typeof i!="number"&&i.unref&&i.unref())}function c(){i||(a(s),s=Math.min(s*2,kp))}async function u(l){try{const d=await n.send(l);let f=wp;if(d){if(d.headers&&d.headers["retry-after"])f=Ha(d.headers["retry-after"]);else if((d.statusCode||0)>=400)return d}return a(f),s=ao,d}catch(d){if(r&&await o(l,d,s))return await r.insert(l),c(),zr("Error sending. Event queued",d),{};throw d}}return t.flushAtStartup&&c(),{send:u,flush:l=>n.flush(l)}}}function Sc(e,t){let n;return Dt(e,(r,s)=>(t.includes(s)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Rp(e,t){return n=>{const r=e(n);return{send:async s=>{const i=Sc(s,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(s)},flush:s=>r.flush(s)}}}function xp(e,t){return n=>{const r=e(n),s={};function i(c,u){const l=u?`${c}:${u}`:c;if(!s[l]){const d=Sa(c);if(!d)return;const f=uc(d);s[l]=u?Rp(e,u)({...n,url:f}):e({...n,url:f})}return s[l]}async function o(c){function u(f){const p=f&&f.length?f:["event"];return Sc(c,p)}const l=t({envelope:c,getEvent:u}).map(f=>typeof f=="string"?i(f,void 0):i(f.dsn,f.release)).filter(f=>!!f);return l.length===0&&l.push(r),(await Promise.all(l.map(f=>f.send(c))))[0]}async function a(c){const u=[...Object.keys(s).map(d=>s[d]),r];return(await Promise.all(u.map(d=>d.flush(c)))).every(d=>d)}return{send:o,flush:a}}}function Ap(e,t){const n={sent_at:new Date().toISOString()};t&&(n.dsn=ft(t));const r=e.map(Mp);return Xe(n,r)}function Mp(e){return[{type:"span"},e]}function Op(e,t){const n=t&&Lp(t)?t.getClient():t,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return Dp(e,r)||Np(e,s)}function Np(e,t){return t?co(e)===co(t):!1}function Dp(e,t){return t?e.includes(t.host):!1}function co(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Lp(e){return e.getClient!==void 0}function Pp(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}function Fp(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:nr})),version:nr}),e._metadata=s}const bc=new Map,uo=new Set;function $p(e){if(N._sentryModuleMetadata)for(const t of Object.keys(N._sentryModuleMetadata)){const n=N._sentryModuleMetadata[t];if(uo.has(t))continue;uo.add(t);const r=e(t);for(const s of r.reverse())if(s.filename){bc.set(s.filename,n);break}}}function Bp(e,t){return $p(e),bc.get(t)}function Hp(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename)continue;const s=Bp(e,r.filename);s&&(r.module_metadata=s)}})}catch{}}function Up(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}const Ec="ModuleMetadata",Wp=()=>({name:Ec,setupOnce(){},setup(e){typeof e.on=="function"&&e.on("beforeEnvelope",t=>{Dt(t,(n,r)=>{if(r==="event"){const s=Array.isArray(n)?n[1]:void 0;s&&(Up(s),n[1]=s)}})})},processEvent(e,t,n){const r=n.getOptions().stackParser;return Hp(r,e),e}}),vc=Wp,jp=_e(Ec,vc),zp=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Gp=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Tc="InboundFilters",qp=(e={})=>({name:Tc,setupOnce(){},processEvent(t,n,r){const s=r.getOptions(),i=Yp(e,s);return Vp(t,i)?null:t}}),ai=qp,Ic=_e(Tc,ai);function Yp(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:zp],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:Gp],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Vp(e,t){return t.ignoreInternal&&eh(e)?(T&&h.warn(`Event dropped due to being internal Sentry Error.
Event: ${Ge(e)}`),!0):Kp(e,t.ignoreErrors)?(T&&h.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${Ge(e)}`),!0):Xp(e,t.ignoreTransactions)?(T&&h.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${Ge(e)}`),!0):Jp(e,t.denyUrls)?(T&&h.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${Ge(e)}.
Url: ${ir(e)}`),!0):Zp(e,t.allowUrls)?!1:(T&&h.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${Ge(e)}.
Url: ${ir(e)}`),!0)}function Kp(e,t){return e.type||!t||!t.length?!1:Qp(e).some(n=>Wt(n,t))}function Xp(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Wt(n,t):!1}function Jp(e,t){if(!t||!t.length)return!1;const n=ir(e);return n?Wt(n,t):!1}function Zp(e,t){if(!t||!t.length)return!0;const n=ir(e);return n?Wt(n,t):!0}function Qp(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&&t.length===0&&h.error(`Could not extract message for event ${Ge(e)}`),t}function eh(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function th(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 ir(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?th(t):null}catch{return T&&h.error(`Cannot extract url for event ${Ge(e)}`),null}}let lo;const wc="FunctionToString",fo=new WeakMap,nh=()=>({name:wc,setupOnce(){lo=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Us(this),n=fo.has(x())&&t!==void 0?t:this;return lo.apply(n,e)}}catch{}},setup(e){fo.set(e,!0)}}),ci=nh,kc=_e(wc,ci),rh="cause",sh=5,Cc="LinkedErrors",ih=(e={})=>{const t=e.limit||sh,n=e.key||rh;return{name:Cc,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();ha(qd,o.stackParser,o.maxValueLength,n,t,r,s)}}},oh=ih,ah=_e(Cc,oh),ch=Object.freeze(Object.defineProperty({__proto__:null,FunctionToString:kc,InboundFilters:Ic,LinkedErrors:ah},Symbol.toStringTag,{value:"Module"}));class uh{constructor(t){this._client=t,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),ap)}add(t,n,r,s="none",i={},o=mt()){const a=Math.floor(o),c=n.replace(hc,"_"),u=dp(i),l=cp(t,c,s,u);let d=this._buckets.get(l);const f=d&&t===ii?d.metric.weight:0;d?(d.metric.add(r),d.timestamp<a&&(d.timestamp=a)):(d={metric:new Ep[t](r),timestamp:a,metricType:t,name:c,unit:s,tags:u},this._buckets.set(l,d));const p=typeof r=="string"?d.metric.weight-f:r;Wf(t,c,p,s,i,l)}flush(){if(this._buckets.size!==0){if(this._client.captureAggregateMetrics){const t=Array.from(this._buckets).map(([,n])=>n);this._client.captureAggregateMetrics(t)}this._buckets.clear()}}close(){clearInterval(this._interval),this.flush()}}const Rc="MetricsAggregator",lh=()=>({name:Rc,setupOnce(){},setup(e){e.metricsAggregator=new uh(e)}}),xc=lh,dh=_e(Rc,xc);function Cr(e,t,n,r={}){const s=x(),i=se();if(s){if(!s.metricsAggregator){T&&h.warn("No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs");return}const{unit:o,tags:a,timestamp:c}=r,{release:u,environment:l}=s.getOptions(),d=i.getTransaction(),f={};u&&(f.release=u),l&&(f.environment=l),d&&(f.transaction=j(d).description||""),T&&h.log(`Adding value of ${n} to ${e} metric ${t}`),s.metricsAggregator.add(e,t,n,o,{...f,...a},c)}}function fh(e,t=1,n){Cr(dc,e,t,n)}function ph(e,t,n){Cr(pc,e,t,n)}function hh(e,t,n){Cr(ii,e,t,n)}function mh(e,t,n){Cr(fc,e,t,n)}const gh={increment:fh,distribution:ph,set:hh,gauge:mh,MetricsAggregator:dh,metricsAggregatorIntegration:xc},_h=ch,B=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,R=N;function Ac(){R&&R.document?R.document.addEventListener("visibilitychange",()=>{const e=Ne();if(R.document.hidden&&e){const t="cancelled",{op:n,status:r}=j(e);B&&h.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):B&&h.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Rr=(e,t,n)=>{let r,s;return i=>{t.value>=0&&(i||n)&&(s=t.value-(r||0),(s||r===void 0)&&(r=t.value,t.delta=s,e(t)))}},yh=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Sh=()=>{const e=R.performance.timing,t=R.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},Mc=()=>R.__WEB_VITALS_POLYFILL__?R.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Sh()):R.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Oc=()=>{const e=Mc();return e&&e.activationStart||0},xr=(e,t)=>{const n=Mc();let r="navigate";return n&&(R.document.prerendering||Oc()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:yh(),navigationType:r}},Yt=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{t(s.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},vn=(e,t)=>{const n=r=>{(r.type==="pagehide"||R.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},bh=e=>{const t=xr("CLS",0);let n,r=0,s=[];const i=a=>{a.forEach(c=>{if(!c.hadRecentInput){const u=s[0],l=s[s.length-1];r&&s.length!==0&&c.startTime-l.startTime<1e3&&c.startTime-u.startTime<5e3?(r+=c.value,s.push(c)):(r=c.value,s=[c]),r>t.value&&(t.value=r,t.entries=s,n&&n())}})},o=Yt("layout-shift",i);if(o){n=Rr(e,t);const a=()=>{i(o.takeRecords()),n(!0)};return vn(a),a}};let Kn=-1;const Eh=()=>R.document.visibilityState==="hidden"&&!R.document.prerendering?0:1/0,vh=()=>{vn(({timeStamp:e})=>{Kn=e},!0)},ui=()=>(Kn<0&&(Kn=Eh(),vh()),{get firstHiddenTime(){return Kn}}),Th=e=>{const t=ui(),n=xr("FID");let r;const s=a=>{a.startTime<t.firstHiddenTime&&(n.value=a.processingStart-a.startTime,n.entries.push(a),r(!0))},i=a=>{a.forEach(s)},o=Yt("first-input",i);r=Rr(e,n),o&&vn(()=>{i(o.takeRecords()),o.disconnect()},!0)};let Nc=0,Gr=1/0,Fn=0;const Ih=e=>{e.forEach(t=>{t.interactionId&&(Gr=Math.min(Gr,t.interactionId),Fn=Math.max(Fn,t.interactionId),Nc=Fn?(Fn-Gr)/7+1:0)})};let Es;const wh=()=>Es?Nc:performance.interactionCount||0,kh=()=>{"interactionCount"in performance||Es||(Es=Yt("event",Ih,{type:"event",buffered:!0,durationThreshold:0}))},Dc=()=>wh(),po=10,Fe=[],qr={},ho=e=>{const t=Fe[Fe.length-1],n=qr[e.interactionId];if(n||Fe.length<po||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]};qr[r.id]=r,Fe.push(r)}Fe.sort((r,s)=>s.latency-r.latency),Fe.splice(po).forEach(r=>{delete qr[r.id]})}},Ch=()=>{const e=Math.min(Fe.length-1,Math.floor(Dc()/50));return Fe[e]},Rh=(e,t)=>{t=t||{},kh();const n=xr("INP");let r;const s=o=>{o.forEach(c=>{c.interactionId&&ho(c),c.entryType==="first-input"&&!Fe.some(l=>l.entries.some(d=>c.duration===d.duration&&c.startTime===d.startTime))&&ho(c)});const a=Ch();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=Yt("event",s,{durationThreshold:t.durationThreshold||40});r=Rr(e,n,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),vn(()=>{s(i.takeRecords()),n.value<0&&Dc()>0&&(n.value=0,n.entries=[]),r(!0)}))},mo={},xh=e=>{const t=ui(),n=xr("LCP");let r;const s=o=>{const a=o[o.length-1];if(a){const c=Math.max(a.startTime-Oc(),0);c<t.firstHiddenTime&&(n.value=c,n.entries=[a],r())}},i=Yt("largest-contentful-paint",s);if(i){r=Rr(e,n);const o=()=>{mo[n.id]||(s(i.takeRecords()),i.disconnect(),mo[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{addEventListener(a,o,{once:!0,capture:!0})}),vn(o,!0),o}},sn={},or={};let Lc,Pc,Fc,$c;function Ah(e,t=!1){return Ar("cls",e,Nh,Lc,t)}function Bc(e,t=!1){return Ar("lcp",e,Lh,Fc,t)}function Mh(e){return Ar("fid",e,Dh,Pc)}function Oh(e){return Ar("inp",e,Ph,$c)}function Vt(e,t){return Hc(e,t),or[e]||(Fh(e),or[e]=!0),Uc(e,t)}function Tn(e,t){const n=sn[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){B&&h.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${Be(r)}
Error:`,s)}}function Nh(){return bh(e=>{Tn("cls",{metric:e}),Lc=e})}function Dh(){return Th(e=>{Tn("fid",{metric:e}),Pc=e})}function Lh(){return xh(e=>{Tn("lcp",{metric:e}),Fc=e})}function Ph(){return Rh(e=>{Tn("inp",{metric:e}),$c=e})}function Ar(e,t,n,r,s=!1){Hc(e,t);let i;return or[e]||(i=n(),or[e]=!0),r&&t({metric:r}),Uc(e,t,s?i:void 0)}function Fh(e){const t={};e==="event"&&(t.durationThreshold=0),Yt(e,n=>{Tn(e,{entries:n})},t)}function Hc(e,t){sn[e]=sn[e]||[],sn[e].push(t)}function Uc(e,t,n){return()=>{n&&n();const r=sn[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Yr(e){return typeof e=="number"&&isFinite(e)}function Pt(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}const $h=2147483647;function te(e){return e/1e3}function li(){return R&&R.addEventListener&&R.performance}let go=0,ee={},ke,on;function Wc(){const e=li();if(e&&ce){e.mark&&R.performance.mark("sentry-tracing-init");const t=Uh(),n=Bh(),r=Hh();return()=>{t(),n(),r()}}return()=>{}}function jc(){Vt("longtask",({entries:e})=>{for(const t of e){const n=Ne();if(!n)return;const r=te(ce+t.startTime),s=te(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function zc(){Vt("event",({entries:e})=>{for(const t of e){const n=Ne();if(!n)return;if(t.name==="click"){const r=te(ce+t.startTime),s=te(t.duration),i={description:Ke(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s},o=ya(t.target);o&&(i.attributes={"ui.component_name":o}),n.startChild(i)}}})}function Gc(e){if(li()&&ce){const n=Wh(e);return()=>{n()}}return()=>{}}function Bh(){return Ah(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(B&&h.log("[Measurements] Adding CLS"),ee.cls={value:e.value,unit:""},on=t)},!0)}function Hh(){return Bc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(B&&h.log("[Measurements] Adding LCP"),ee.lcp={value:e.value,unit:"millisecond"},ke=t)},!0)}function Uh(){return Mh(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=te(ce),r=te(t.startTime);B&&h.log("[Measurements] Adding FID"),ee.fid={value:e.value,unit:"millisecond"},ee["mark.fid"]={value:n+r,unit:"second"}})}function Wh(e){return Oh(({metric:t})=>{const n=t.entries.find(y=>y.name==="click"||y.name==="pointerdown"),r=x();if(!n||!r)return;const s=r.getOptions(),i=te(ce+n.startTime),o=te(t.value),{routeName:a,parentContext:c,activeTransaction:u,user:l,replayId:d}=n.interactionId!==void 0?e[n.interactionId]:{routeName:void 0,parentContext:void 0,activeTransaction:void 0,user:void 0,replayId:void 0},f=l!==void 0?l.email||l.id||l.ip_address:void 0,p=u!==void 0?u.getProfileId():void 0,m=new kr({startTimestamp:i,endTimestamp:i+o,op:"ui.interaction.click",name:Ke(n.target),attributes:{release:s.release,environment:s.environment,transaction:a,...f!==void 0&&f!==""?{user:f}:{},...p!==void 0?{profile_id:p}:{},...d!==void 0?{replay_id:d}:{}},exclusiveTime:t.value,measurements:{inp:{value:t.value,unit:"millisecond"}}}),_=Xh(c,s);if(_&&Math.random()<_){const y=m?Ap([m],r.getDsn()):void 0,g=r&&r.getTransport();g&&y&&g.send(y).then(null,S=>{B&&h.error("Error while sending interaction:",S)});return}})}function qc(e){const t=li();if(!t||!R.performance.getEntries||!ce)return;B&&h.log("[Tracing] Adding & adjusting spans using Performance API");const n=te(ce),r=t.getEntries();let s,i;const{op:o,start_timestamp:a}=j(e);if(r.slice(go).forEach(c=>{const u=te(c.startTime),l=te(c.duration);if(!(e.op==="navigation"&&a&&n+u<a))switch(c.entryType){case"navigation":{zh(e,c,n),s=n+te(c.responseStart),i=n+te(c.requestStart);break}case"mark":case"paint":case"measure":{jh(e,c,u,l,n);const d=ui(),f=c.startTime<d.firstHiddenTime;c.name==="first-paint"&&f&&(B&&h.log("[Measurements] Adding FP"),ee.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&f&&(B&&h.log("[Measurements] Adding FCP"),ee.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{qh(e,c,c.name,u,l,n);break}}}),go=Math.max(r.length-1,0),Yh(e),o==="pageload"){Kh(ee,s,i,a),["fcp","fp","lcp"].forEach(u=>{if(!ee[u]||!a||n>=a)return;const l=ee[u].value,d=n+te(l),f=Math.abs((d-a)*1e3),p=f-l;B&&h.log(`[Measurements] Normalized ${u} from ${l} to ${f} (${p})`),ee[u].value=f});const c=ee["mark.fid"];c&&ee.fid&&(Pt(e,{description:"first input delay",endTimestamp:c.value+te(ee.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:c.value}),delete ee["mark.fid"]),"fcp"in ee||delete ee.cls,Object.keys(ee).forEach(u=>{oc(u,ee[u].value,ee[u].unit)}),Vh(e)}ke=void 0,on=void 0,ee={}}function jh(e,t,n,r,s){const i=s+n,o=i+r;return Pt(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function zh(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{$n(e,t,r,n)}),$n(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),$n(e,t,"fetch",n,"cache","domainLookupStart"),$n(e,t,"domainLookup",n,"DNS"),Gh(e,t,n)}function $n(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||Pt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+te(a),endTimestamp:r+te(o)})}function Gh(e,t,n){t.responseEnd&&(Pt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+te(t.requestStart),endTimestamp:n+te(t.responseEnd)}),Pt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+te(t.responseStart),endTimestamp:n+te(t.responseEnd)}))}function qh(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Yn(n),a={};Vr(a,t,"transferSize","http.response_transfer_size"),Vr(a,t,"encodedBodySize","http.response_content_length"),Vr(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;Pt(e,{description:n.replace(R.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}function Yh(e){const t=R.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Yr(n.rtt)&&(ee["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Yr(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Yr(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function Vh(e){ke&&(B&&h.log("[Measurements] Adding LCP Data"),ke.element&&e.setTag("lcp.element",Ke(ke.element)),ke.id&&e.setTag("lcp.id",ke.id),ke.url&&e.setTag("lcp.url",ke.url.trim().slice(0,200)),e.setTag("lcp.size",ke.size)),on&&on.sources&&(B&&h.log("[Measurements] Adding CLS Data"),on.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,Ke(t.node))))}function Vr(e,t,n,r){const s=t[n];s!=null&&s<$h&&(e[r]=s)}function Kh(e,t,n,r){typeof t=="number"&&r&&(B&&h.log("[Measurements] Adding TTFB"),e.ttfb={value:Math.max(t-r,0)*1e3,unit:"millisecond"},typeof n=="number"&&n<=t&&(e["ttfb.requestTime"]={value:(t-n)*1e3,unit:"millisecond"}))}function Xh(e,t){if(!qt(t))return!1;let n;return e!==void 0&&typeof t.tracesSampler=="function"?n=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:R.location}):e!==void 0&&e.sampled!==void 0?n=e.sampled:typeof t.tracesSampleRate<"u"?n=t.tracesSampleRate:n=1,ic(n)?n:(B&&h.warn("[Tracing] Discarding transaction because of invalid sample rate."),!1)}function Jh(e,t,n,r,s="auto.http.browser"){if(!qt()||!e.fetchData)return;const i=t(e.fetchData.url);if(e.endTimestamp&&i){const d=e.fetchData.__span;if(!d)return;const f=r[d];if(f){if(e.response){Tr(f,e.response.status);const p=e.response&&e.response.headers&&e.response.headers.get("content-length");if(p){const m=parseInt(p);m>0&&f.setAttribute("http.response_content_length",m)}}else e.error&&f.setStatus("internal_error");f.end(),delete r[d]}return}const o=se(),a=x(),{method:c,url:u}=e.fetchData,l=i?ri({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,[it]:s},op:"http.client"}):void 0;if(l&&(e.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l),n(e.fetchData.url)&&a){const d=e.args[0];e.args[1]=e.args[1]||{};const f=e.args[1];f.headers=Zh(d,a,o,f,l)}return l}function Zh(e,t,n,r,s){const i=s||n.getSpan(),o=De(),{traceId:a,spanId:c,sampled:u,dsc:l}={...o.getPropagationContext(),...n.getPropagationContext()},d=i?yr(i):qs(a,c,u),f=Pa(l||(i?Lt(i):Er(a,t,n))),p=r.headers||(typeof Request<"u"&&$e(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&$e(p,Headers)){const m=new Headers(p);return m.append("sentry-trace",d),f&&m.append(ms,f),m}else if(Array.isArray(p)){const m=[...p,["sentry-trace",d]];return f&&m.push([ms,f]),m}else{const m="baggage"in p?p.baggage:void 0,_=[];return Array.isArray(m)?_.push(...m):m&&_.push(m),f&&_.push(f),{...p,"sentry-trace":d,baggage:_.length>0?_.join(","):void 0}}else return{"sentry-trace":d,baggage:f}}const vs=["localhost",/^\/(?!\/)/],dn={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:vs,tracePropagationTargets:vs};function di(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}={traceFetch:dn.traceFetch,traceXHR:dn.traceXHR,...e},a=typeof i=="function"?i:l=>!0,c=l=>nm(l,r||s),u={};t&&Ws(l=>{const d=Jh(l,a,c,u);o&&d&&_o(d)}),n&&js(l=>{const d=rm(l,a,c,u);o&&d&&_o(d)})}function Qh(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function _o(e){const{url:t}=j(e).data||{};if(!t||typeof t!="string")return;const n=Vt("resource",({entries:r})=>{r.forEach(s=>{Qh(s)&&s.name.endsWith(t)&&(tm(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function em(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 we(e=0){return((ce||performance.timeOrigin)+e)/1e3}function tm(e){const{name:t,version:n}=em(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),ce?[...r,["http.request.redirect_start",we(e.redirectStart)],["http.request.fetch_start",we(e.fetchStart)],["http.request.domain_lookup_start",we(e.domainLookupStart)],["http.request.domain_lookup_end",we(e.domainLookupEnd)],["http.request.connect_start",we(e.connectStart)],["http.request.secure_connection_start",we(e.secureConnectionStart)],["http.request.connection_end",we(e.connectEnd)],["http.request.request_start",we(e.requestStart)],["http.request.response_start",we(e.responseStart)],["http.request.response_end",we(e.responseEnd)]]:r}function nm(e,t){return Wt(e,t||vs)}function rm(e,t,n,r){const s=e.xhr,i=s&&s[qe];if(!qt()||!s||s.__sentry_own_request__||!i)return;const o=t(i.url);if(e.endTimestamp&&o){const d=s.__sentry_xhr_span_id__;if(!d)return;const f=r[d];f&&i.status_code!==void 0&&(Tr(f,i.status_code),f.end(),delete r[d]);return}const a=se(),c=De(),u=o?ri({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,url:i.url,[it]:"auto.http.browser"},op:"http.client"}):void 0;u&&(s.__sentry_xhr_span_id__=u.spanContext().spanId,r[s.__sentry_xhr_span_id__]=u);const l=x();if(s.setRequestHeader&&n(i.url)&&l){const{traceId:d,spanId:f,sampled:p,dsc:m}={...c.getPropagationContext(),...a.getPropagationContext()},_=u?yr(u):qs(d,f,p),y=Pa(m||(u?Lt(u):Er(d,l,a)));sm(s,_,y)}return u}function sm(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(ms,n)}catch{}}function im(e,t=!0,n=!0){if(!R||!R.location){B&&h.warn("Could not initialize routing instrumentation due to invalid location");return}let r=R.location.href,s;t&&(s=e({name:R.location.pathname,startTimestamp:ce?ce/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&yn(({to:i,from:o})=>{if(o===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}o!==i&&(r=void 0,s&&(B&&h.log(`[Tracing] Finishing current transaction with op: ${s.op}`),s.end()),s=e({name:R.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const om="BrowserTracing",am={...rn,markBackgroundTransactions:!0,routingInstrumentation:im,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,_experiments:{},...dn},cm=10;class um{constructor(t){this.name=om,this._hasSetTracePropagationTargets=!1,si(),B&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...am,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=Wc(),this._interactionIdtoRouteNameMapping={},this.options.enableInp&&Gc(this._interactionIdtoRouteNameMapping),this.options.enableLongTask&&jc(),this.options._experiments.enableInteractions&&zc(),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:a,startTransactionOnPageLoad:c,markBackgroundTransactions:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:m}=this.options,_=i&&i.tracePropagationTargets,y=_||this.options.tracePropagationTargets;B&&this._hasSetTracePropagationTargets&&_&&h.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),o(g=>{const S=this._createRouteTransaction(g);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(S,g,n),S},c,a),u&&Ac(),m.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),di({traceFetch:l,traceXHR:d,tracePropagationTargets:y,shouldCreateSpanForRequest:f,enableHTTPTimings:p})}_createRouteTransaction(t){if(!this._getCurrentHub){B&&h.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=this.options,a=t.op==="pageload";let c;if(a){const p=a?yo("sentry-trace"):"",m=a?yo("baggage"):void 0,{traceId:_,dsc:y,parentSpanId:g,sampled:S}=Fa(p,m);c={traceId:_,parentSpanId:g,parentSampled:S,...t,metadata:{...t.metadata,dynamicSamplingContext:y},trimEnd:!0}}else c={trimEnd:!0,...t};const u=typeof r=="function"?r(c):c,l=u===void 0?{...c,sampled:!1}:u;l.metadata=l.name!==c.name?{...l.metadata,source:"custom"}:l.metadata,this._latestRoute.name=l.name,this._latestRoute.context=l,l.sampled===!1&&B&&h.log(`[Tracing] Will not send ${l.op} transaction because of beforeNavigate.`),B&&h.log(`[Tracing] Starting ${l.op} transaction on scope`);const{location:d}=R,f=sr(n,l,s,i,!0,{location:d},o,a);return a&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&f.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback(p=>{this._collectWebVitals(),qc(p)}),f}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,o="ui.action.click",a=Ne();if(a&&a.op&&["navigation","pageload"].includes(a.op)){B&&h.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){B&&h.warn(`[Tracing] Did not create ${o} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){B&&h.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}const c=this._getCurrentHub(),{location:u}=R,l={name:this._latestRoute.name,op:o,trimEnd:!0,data:{[ge]:this._latestRoute.context?lm(this._latestRoute.context):"url"}};t=sr(c,l,r,s,!0,{location:u},i)};["click"].forEach(r=>{addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){Vt("event",({entries:t})=>{const n=x(),r=n!==void 0&&n.getIntegrationByName!==void 0?n.getIntegrationByName("Replay"):void 0,s=r!==void 0?r.getReplayId():void 0,i=Ne(),o=se(),a=o!==void 0?o.getUser():void 0;for(const c of t)if(dm(c)){const u=c.duration,l=Object.keys(this._interactionIdtoRouteNameMapping),d=l.length>0?l.reduce((f,p)=>this._interactionIdtoRouteNameMapping[f].duration<this._interactionIdtoRouteNameMapping[p].duration?f:p):void 0;if(d===void 0||u>this._interactionIdtoRouteNameMapping[d].duration){const f=c.interactionId,p=this._latestRoute.name,m=this._latestRoute.context;f&&p&&m&&(d&&Object.keys(this._interactionIdtoRouteNameMapping).length>=cm&&delete this._interactionIdtoRouteNameMapping[d],this._interactionIdtoRouteNameMapping[f]={routeName:p,duration:u,parentContext:m,user:a,activeTransaction:i,replayId:s})}}})}}function yo(e){const t=_a(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function lm(e){const t=e.attributes&&e.attributes[ge],n=e.data&&e.data[ge],r=e.metadata&&e.metadata.source;return t||n||r}function dm(e){return"duration"in e}const fm="BrowserTracing",pm={...rn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,_experiments:{},...dn},hm=(e={})=>{const t=B?!!(e.tracePropagationTargets||e.tracingOrigins):!1;si(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);const n={...pm,...e},r=Wc(),s={};n.enableInp&&Gc(s),n.enableLongTask&&jc(),n._experiments.enableInteractions&&zc();const i={name:void 0,context:void 0};function o(a){const c=W(),{beforeStartSpan:u,idleTimeout:l,finalTimeout:d,heartbeatInterval:f}=n,p=a.op==="pageload";let m;if(p){const S=p?So("sentry-trace"):"",E=p?So("baggage"):void 0,{traceId:w,dsc:D,parentSpanId:I,sampled:v}=Fa(S,E);m={traceId:w,parentSpanId:I,parentSampled:v,...a,metadata:{...a.metadata,dynamicSamplingContext:D},trimEnd:!0}}else m={trimEnd:!0,...a};const _=u?u(m):m;_.metadata=_.name!==m.name?{..._.metadata,source:"custom"}:_.metadata,i.name=_.name,i.context=_,_.sampled===!1&&B&&h.log(`[Tracing] Will not send ${_.op} transaction because of beforeNavigate.`),B&&h.log(`[Tracing] Starting ${_.op} transaction on scope`);const{location:y}=R,g=sr(c,_,l,d,!0,{location:y},f,p);return p&&R.document&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&g.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&g.sendAutoFinishSignal()),g.registerBeforeFinishCallback(S=>{r(),qc(S)}),g}return{name:fm,setupOnce:()=>{},afterAllSetup(a){const c=a.getOptions(),{markBackgroundSpan:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:p,_experiments:m}=n,_=c&&c.tracePropagationTargets,y=_||n.tracePropagationTargets;B&&t&&_&&h.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let g,S=R.location&&R.location.href;if(a.on&&(a.on("startNavigationSpan",E=>{g&&(B&&h.log(`[Tracing] Finishing current transaction with op: ${j(g).op}`),g.end()),g=o({op:"navigation",...E})}),a.on("startPageLoadSpan",E=>{g&&(B&&h.log(`[Tracing] Finishing current transaction with op: ${j(g).op}`),g.end()),g=o({op:"pageload",...E})})),n.instrumentPageLoad&&a.emit&&R.location){const E={name:R.location.pathname,startTimestamp:ce?ce/1e3:void 0,origin:"auto.pageload.browser",attributes:{[ge]:"url"}};Yc(a,E)}n.instrumentNavigation&&a.emit&&R.location&&yn(({to:E,from:w})=>{if(w===void 0&&S&&S.indexOf(E)!==-1){S=void 0;return}if(w!==E){S=void 0;const D={name:R.location.pathname,origin:"auto.navigation.browser",attributes:{[ge]:"url"}};Vc(a,D)}}),u&&Ac(),m.enableInteractions&&mm(n,i),n.enableInp&&ym(s,i),di({traceFetch:l,traceXHR:d,tracePropagationTargets:y,shouldCreateSpanForRequest:f,enableHTTPTimings:p})},options:n}};function Yc(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);const n=En();return(n&&j(n).op)==="pageload"?n:void 0}function Vc(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);const n=En();return(n&&j(n).op)==="navigation"?n:void 0}function So(e){const t=_a(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function mm(e,t){let n;const r=()=>{const{idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=e,a="ui.action.click",c=Ne();if(c&&c.op&&["navigation","pageload"].includes(c.op)){B&&h.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name){B&&h.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}const{location:u}=R,l={name:t.name,op:a,trimEnd:!0,data:{[ge]:t.context?Sm(t.context):"url"}};n=sr(W(),l,s,i,!0,{location:u},o)};["click"].forEach(s=>{addEventListener(s,r,{once:!1,capture:!0})})}function gm(e){return"duration"in e}const _m=10;function ym(e,t){Vt("event",({entries:n})=>{const r=x(),s=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,i=s!==void 0?s.getReplayId():void 0,o=Ne(),a=se(),c=a!==void 0?a.getUser():void 0;for(const u of n)if(gm(u)){const l=u.duration,d=Object.keys(e),f=d.length>0?d.reduce((p,m)=>e[p].duration<e[m].duration?p:m):void 0;if(f===void 0||l>e[f].duration){const p=u.interactionId,m=t.name,_=t.context;p&&m&&_&&(f&&Object.keys(e).length>=_m&&delete e[f],e[p]={routeName:m,duration:l,parentContext:_,user:c,activeTransaction:o,replayId:i})}}})}function Sm(e){const t=e.attributes&&e.attributes[ge],n=e.data&&e.data[ge],r=e.metadata&&e.metadata.source;return t||n||r}const k=N;let Ts=0;function Kc(){return Ts>0}function bm(){Ts++,setTimeout(()=>{Ts--})}function dt(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return s;if(Us(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const i=s.map(o=>dt(o,t));return e.apply(this,i)}catch(i){throw bm(),zt(o=>{o.addEventProcessor(a=>(t.mechanism&&(as(a,void 0,void 0),ln(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),br(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}va(r,e),ut(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function fi(e,t){const n=pi(e,t),r={type:t&&t.name,value:Im(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Em(e,t,n,r){const s=x(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:_r(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:wm(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Oa(t,i)}};if(n){const a=pi(e,n);a.length&&(o.exception.values[0].stacktrace={frames:a})}return o}function Kr(e,t){return{exception:{values:[fi(e,t)]}}}function pi(e,t){const n=t.stacktrace||t.stack||"",r=Tm(t);try{return e(n,r)}catch{}return[]}const vm=/Minified React error #\d+;/i;function Tm(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(vm.test(e.message))return 1}return 0}function Im(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Xc(e,t,n,r){const s=n&&n.syntheticException||void 0,i=hi(e,t,s,r);return ln(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Nt(i)}function Jc(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=Is(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Nt(o)}function hi(e,t,n,r,s){let i;if(Fs(t)&&t.error)return Kr(e,t.error);if(Pi(t)||Fl(t)){const o=t;if("stack"in t)i=Kr(e,t);else{const a=o.name||(Pi(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=Is(e,c,n,r),as(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return da(t)?Kr(e,t):Ot(t)||_r(t)?(i=Em(e,t,n,s),ln(i,{synthetic:!0}),i):(i=Is(e,t,n,r),as(i,`${t}`,void 0),ln(i,{synthetic:!0}),i)}function Is(e,t,n,r){const s={};if(r&&n){const i=pi(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if($s(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 wm(e,{isUnhandledRejection:t}){const n=Jl(e),r=t?"promise rejection":"exception";return Fs(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:_r(e)?`Event \`${km(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function km(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Zc(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:ft(r)}},i=Cm(e);return Xe(s,[i])}function Cm(e){return[{type:"user_report"},e]}class Qc extends hp{constructor(t){const n=k.SENTRY_SDK_SOURCE||Sd();Fp(t,"browser",["browser"],n),super(t),t.sendClientReports&&k.document&&k.document.addEventListener("visibilitychange",()=>{k.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Xc(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Jc(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){F&&h.warn("SDK not enabled, will not capture user feedback.");return}const n=Zc(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)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){F&&h.log("No outcomes to send");return}if(!this._dsn){F&&h.log("No dsn provided, will not send outcomes");return}F&&h.log("Sending outcomes:",t);const n=Wd(t,this._options.tunnel&&ft(this._dsn));this._sendEnvelope(n)}}let tn;function Rm(){if(tn)return tn;if(ds(k.fetch))return tn=k.fetch.bind(k);const e=k.document;let t=k.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){F&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return tn=t.bind(k)}function xm(){tn=void 0}function eu(e,t=Rm()){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};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 xm(),n-=o,r--,zs(c)}}return oi(e,s)}const Am=4;function tu(e){function t(n){return new he((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===Am&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const o in e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(n.body)})}return oi(e,t)}const Kt="?",Mm=10,Om=20,Nm=30,Dm=40,Lm=50;function In(e,t,n,r){const s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Pm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fm=/\((\S*)(?::(\d+))(?::(\d+))\)/,$m=e=>{const t=Pm.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const i=Fm.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}const[r,s]=au(t[1]||Kt,t[2]);return In(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},nu=[Nm,$m],Bm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Hm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Um=e=>{const t=Bm.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Hm.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]||Kt;return[s,r]=au(s,r),In(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},ru=[Lm,Um],Wm=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,jm=e=>{const t=Wm.exec(e);return t?In(t[2],t[1]||Kt,+t[3],t[4]?+t[4]:void 0):void 0},su=[Dm,jm],zm=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Gm=e=>{const t=zm.exec(e);return t?In(t[2],t[3]||Kt,+t[1]):void 0},qm=[Mm,Gm],Ym=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Vm=e=>{const t=Ym.exec(e);return t?In(t[5],t[3]||t[4]||Kt,+t[1],+t[2]):void 0},Km=[Om,Vm],iu=[nu,ru,su],ou=wa(...iu),au=(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]:Kt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Bn=1024,cu="Breadcrumbs",Xm=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:cu,setupOnce(){},setup(n){t.console&&td(Qm(n)),t.dom&&Ra(Zm(n,t.dom)),t.xhr&&js(eg(n)),t.fetch&&Ws(tg(n)),t.history&&yn(ng(n)),t.sentry&&n.on&&n.on("beforeSendEvent",Jm(n))}}},mi=Xm,uu=_e(cu,mi);function Jm(e){return function(n){x()===e&&He({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ge(n)},{event:n})}}function Zm(e,t){return function(r){if(x()!==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>Bn&&(F&&h.warn(`\`dom.maxStringLength\` cannot exceed ${Bn}, but a value of ${a} was configured. Sentry will use ${Bn} instead.`),a=Bn),typeof o=="string"&&(o=[o]);try{const u=r.event,l=rg(u)?u.target:u;s=Ke(l,{keyAttrs:o,maxStringLength:a}),i=ya(l)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),He(c,{event:r.event,name:r.name,global:r.global})}}function Qm(e){return function(n){if(x()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:xd(n.level),message:Fi(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Fi(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;He(r,{input:n.args,level:n.level})}}function eg(e){return function(n){if(x()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[qe];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};He({category:"xhr",data:l,type:"http"},d)}}function tg(e){return function(n){if(x()!==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};He({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};He({category:"fetch",data:o,type:"http"},a)}}}function ng(e){return function(n){if(x()!==e)return;let r=n.from,s=n.to;const i=Yn(k.location.href);let o=r?Yn(r):void 0;const a=Yn(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),He({category:"navigation",data:{from:r,to:s}})}}function rg(e){return!!e&&!!e.target}const lu="Dedupe",sg=()=>{let e;return{name:lu,setupOnce(){},processEvent(t){if(t.type)return t;try{if(ig(t,e))return F&&h.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Mr=sg,du=_e(lu,Mr);function ig(e,t){return t?!!(og(e,t)||ag(e,t)):!1}function og(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!pu(e,t)||!fu(e,t))}function ag(e,t){const n=bo(t),r=bo(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!pu(e,t)||!fu(e,t))}function fu(e,t){let n=Eo(e),r=Eo(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 pu(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 bo(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Eo(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const hu="GlobalHandlers",cg=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:hu,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(ug(n),vo("onerror")),t.onunhandledrejection&&(lg(n),vo("onunhandledrejection"))}}},gi=cg,mu=_e(hu,gi);function ug(e){Aa(t=>{const{stackParser:n,attachStacktrace:r}=_u();if(x()!==e||Kc())return;const{msg:s,url:i,line:o,column:a,error:c}=t,u=c===void 0&&Me(s)?pg(s,i,o,a):gu(hi(n,c||s,void 0,r,!1),i,o,a);u.level="error",Zs(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function lg(e){Ma(t=>{const{stackParser:n,attachStacktrace:r}=_u();if(x()!==e||Kc())return;const s=dg(t),i=Bs(s)?fg(s):hi(n,s,void 0,r,!0);i.level="error",Zs(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function dg(e){if(Bs(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function fg(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function pg(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=Fs(e)?e.message:e,o="Error";const a=i.match(s);return a&&(o=a[1],i=a[2]),gu({exception:{values:[{type:o,value:i}]}},t,n,r)}function gu(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=Me(t)&&t.length>0?t:ga();return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),e}function vo(e){F&&h.log(`Global Handler attached: ${e}`)}function _u(){const e=x();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const yu="HttpContext",hg=()=>({name:yu,setupOnce(){},preprocessEvent(e){if(!k.navigator&&!k.location&&!k.document)return;const t=e.request&&e.request.url||k.location&&k.location.href,{referrer:n}=k.document||{},{userAgent:r}=k.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}}),Or=hg,Su=_e(yu,Or),mg="cause",gg=5,bu="LinkedErrors",_g=(e={})=>{const t=e.limit||gg,n=e.key||mg;return{name:bu,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();ha(fi,o.stackParser,o.maxValueLength,n,t,r,s)}}},Nr=_g,Eu=_e(bu,Nr),yg=["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"],vu="TryCatch",Sg=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:vu,setupOnce(){t.setTimeout&&oe(k,"setTimeout",To),t.setInterval&&oe(k,"setInterval",To),t.requestAnimationFrame&&oe(k,"requestAnimationFrame",bg),t.XMLHttpRequest&&"XMLHttpRequest"in k&&oe(XMLHttpRequest.prototype,"send",Eg);const n=t.eventTarget;n&&(Array.isArray(n)?n:yg).forEach(vg)}}},_i=Sg,Tu=_e(vu,_i);function To(e){return function(...t){const n=t[0];return t[0]=dt(n,{mechanism:{data:{function:Be(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function bg(e){return function(t){return e.apply(this,[dt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Be(e)},handled:!1,type:"instrument"}})])}}function Eg(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&oe(n,s,function(i){const o={mechanism:{data:{function:s,handler:Be(i)},handled:!1,type:"instrument"}},a=Us(i);return a&&(o.mechanism.data.handler=Be(a)),dt(i,o)})}),e.apply(this,t)}}function vg(e){const t=k,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(oe(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=dt(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Be(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,dt(i,{mechanism:{data:{function:"addEventListener",handler:Be(i),target:e},handled:!1,type:"instrument"}}),o])}}),oe(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 Iu=[ai(),ci(),_i(),mi(),gi(),Nr(),Mr(),Or()];function wu(e){return[...Iu]}function ku(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=wu()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),k.SENTRY_RELEASE&&k.SENTRY_RELEASE.id&&(e.release=k.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:Ql(e.stackParser||ou),integrations:np(e),transport:e.transport||(xa()?eu:tu)};vp(Qc,t),e.autoSessionTracking&&Cg()}const Tg=(e={},t=W())=>{if(!k.document){F&&h.error("Global document not defined in showReportDialog call");return}const{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s){F&&h.error("DSN not configured for showReportDialog call");return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const i=k.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=ep(s,e),e.onLoad&&(i.onload=e.onLoad);const{onClose:o}=e;if(o){const c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{o()}finally{k.removeEventListener("message",c)}};k.addEventListener("message",c)}const a=k.document.head||k.document.body;a?a.appendChild(i):F&&h.error("Not injecting report dialog. No injection point found in HTML")};function Ig(){}function wg(e){e()}function kg(e){return dt(e)()}function Cg(){if(typeof k.document>"u"){F&&h.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}_s({ignoreDuration:!0}),ys(),yn(({from:e,to:t})=>{e!==void 0&&e!==t&&(_s({ignoreDuration:!0}),ys())})}function Rg(e){const t=x();t&&t.captureUserFeedback(e)}const xg=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumbs:uu,Dedupe:du,GlobalHandlers:mu,HttpContext:Su,LinkedErrors:Eu,TryCatch:Tu},Symbol.toStringTag,{value:"Module"})),K=N,yi="sentryReplaySession",Ag="replay_event",Si="Unable to send Replay",Mg=3e5,Og=9e5,Ng=5e3,Dg=5500,Lg=6e4,Pg=5e3,Fg=3,Io=15e4,Hn=5e3,$g=3e3,Bg=300,bi=2e7,Hg=4999,Ug=15e3,wo=36e5;function Wg(e,t){return e??t()}function ar(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 ie;(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"})(ie||(ie={}));function jg(e){return e.nodeType===e.ELEMENT_NODE}function an(e){const t=ar([e,"optionalAccess",n=>n.host]);return ar([t,"optionalAccess",n=>n.shadowRoot])===e}function cn(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function zg(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 Gg(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 cr(e){try{const t=e.rules||e.cssRules;return t?zg(Array.from(t,Cu).join("")):null}catch{return null}}function Cu(e){let t;if(Yg(e))try{t=cr(e.styleSheet)||Gg(e)}catch{}else if(Vg(e)&&e.selectorText.includes(":"))return qg(e.cssText);return t||e.cssText}function qg(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Yg(e){return"styleSheet"in e}function Vg(e){return"selectorText"in e}class Ru{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=ar([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return Wg(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 Kg(){return new Ru}function Dr({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 fn({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Ft(e){return e.toLowerCase()}function ws(e){return e.toUpperCase()}const ko="__rrweb_original__";function Xg(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=ko in i?i[ko]: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 Ei(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ft(t):null}function ur(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}let Jg=1;const Zg=new RegExp("[^a-z0-9-_:]"),pn=-2;function vi(){return Jg++}function Qg(e){if(e instanceof HTMLFormElement)return"form";const t=Ft(e.tagName);return Zg.test(t)?"div":t}function e_(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let St,Co;const t_=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,n_=/^(?:[a-z+]+:)?\/\//i,r_=/^www\..*/i,s_=/^(data:)([^,]*),(.*)/i;function lr(e,t){return(e||"").replace(t_,(n,r,s,i,o,a)=>{const c=s||o||a,u=r||i||"";if(!c)return n;if(n_.test(c)||r_.test(c))return`url(${u}${c}${u})`;if(s_.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${e_(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 i_=/^[^ \t\n\r\u000c]+/,o_=/^[, \t\n\r\u000c]+/;function a_(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(o_),!(n>=t.length);){let i=r(i_);if(i.slice(-1)===",")i=It(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=It(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 It(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function c_(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Ti(){const e=document.createElement("a");return e.href="",e.href}function xu(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")?It(e,r):n==="srcset"?a_(e,r):n==="style"?lr(r,Ti()):t==="object"&&n==="data"?It(e,r):typeof i=="function"?i(n,r,s):r)}function Au(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function u_(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 l_(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function ot(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ot(e.parentNode,t,n,r+1)}function wt(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(l_(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function $t(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=ot(o,wt(r,s)),c<0)return!0;a=ot(o,wt(t,n),c>=0?c:1/0)}else{if(a=ot(o,wt(t,n)),a<0)return!1;c=ot(o,wt(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function d_(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=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function f_(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),r=!0,t()})}function p_(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:m={},maskTextFn:_,maskInputFn:y,dataURLOptions:g={},inlineImages:S,recordCanvas:E,keepIframeSrcFn:w,newlyAddedElement:D=!1}=t,I=h_(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ie.Document,childNodes:[],compatMode:e.compatMode}:{type:ie.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ie.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return g_(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:y,dataURLOptions:g,inlineImages:S,recordCanvas:E,keepIframeSrcFn:w,newlyAddedElement:D,rootId:I,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return m_(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:_,maskInputOptions:m,maskInputFn:y,rootId:I});case e.CDATA_SECTION_NODE:return{type:ie.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:ie.Comment,textContent:e.textContent||"",rootId:I};default:return!1}}function h_(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function m_(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,m=d==="SCRIPT"?!0:void 0,_=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||ar([e,"access",g=>g.parentNode,"access",g=>g.sheet,"optionalAccess",g=>g.cssRules])&&(f=cr(e.parentNode.sheet))}catch(g){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${g}`,e)}f=lr(f,Ti())}m&&(f="SCRIPT_PLACEHOLDER");const y=$t(e,r,i,s,o,n);if(!p&&!m&&!_&&f&&y&&(f=a?a(f):f.replace(/[\S]/g,"*")),_&&f&&(c.textarea||y)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const g=Dr({type:null,tagName:d,maskInputOptions:c});f=fn({isMasked:$t(e,r,i,s,o,g),element:e,value:f,maskInputFn:u})}return{type:ie.Text,textContent:f||"",isStyle:p,rootId:l}}function g_(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:m=!1,rootId:_,maskAllText:y,maskTextClass:g,unmaskTextClass:S,maskTextSelector:E,unmaskTextSelector:w}=t,D=u_(e,r,s,i),I=Qg(e);let v={};const L=e.attributes.length;for(let b=0;b<L;b++){const C=e.attributes[b];C.name&&!Au(I,C.name,C.value)&&(v[C.name]=xu(n,I,Ft(C.name),C.value,e,c))}if(I==="link"&&o){const b=Array.from(n.styleSheets).find(Y=>Y.href===e.href);let C=null;b&&(C=cr(b)),C&&(delete v.rel,delete v.href,v._cssText=lr(C,b.href))}if(I==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const b=cr(e.sheet);b&&(v._cssText=lr(b,Ti()))}if(I==="input"||I==="textarea"||I==="select"||I==="option"){const b=e,C=Ei(b),Y=ur(b,ws(I),C),ne=b.checked;if(C!=="submit"&&C!=="button"&&Y){const Z=$t(b,g,E,S,w,Dr({type:C,tagName:ws(I),maskInputOptions:a}));v.value=fn({isMasked:Z,element:b,value:Y,maskInputFn:u})}ne&&(v.checked=ne)}if(I==="option"&&(e.selected&&!a.select?v.selected=!0:delete v.selected),I==="canvas"&&f){if(e.__context==="2d")Xg(e)||(v.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const b=e.toDataURL(l.type,l.quality),C=document.createElement("canvas");C.width=e.width,C.height=e.height;const Y=C.toDataURL(l.type,l.quality);b!==Y&&(v.rr_dataURL=b)}}if(I==="img"&&d){St||(St=n.createElement("canvas"),Co=St.getContext("2d"));const b=e,C=b.crossOrigin;b.crossOrigin="anonymous";const Y=()=>{b.removeEventListener("load",Y);try{St.width=b.naturalWidth,St.height=b.naturalHeight,Co.drawImage(b,0,0),v.rr_dataURL=St.toDataURL(l.type,l.quality)}catch(ne){console.warn(`Cannot inline img src=${b.currentSrc}! Error: ${ne}`)}C?v.crossOrigin=C:b.removeAttribute("crossorigin")};b.complete&&b.naturalWidth!==0?Y():b.addEventListener("load",Y)}if((I==="audio"||I==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),D){const{width:b,height:C}=e.getBoundingClientRect();v={class:v.class,rr_width:`${b}px`,rr_height:`${C}px`}}I==="iframe"&&!p(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src);let z;try{customElements.get(I)&&(z=!0)}catch{}return{type:ie.Element,tagName:I,attributes:v,childNodes:[],isSVG:c_(e)||void 0,needBlock:D,rootId:_,isCustom:z}}function V(e){return e==null?"":e.toLowerCase()}function __(e,t){if(t.comment&&e.type===ie.Comment)return!0;if(e.type===ie.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"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(V(e.attributes.name).match(/^msapplication-tile(image|color)$/)||V(e.attributes.name)==="application-name"||V(e.attributes.rel)==="icon"||V(e.attributes.rel)==="apple-touch-icon"||V(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&V(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(V(e.attributes.property).match(/^(og|twitter|fb):/)||V(e.attributes.name).match(/^(og|twitter):/)||V(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(V(e.attributes.name)==="robots"||V(e.attributes.name)==="googlebot"||V(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(V(e.attributes.name)==="author"||V(e.attributes.name)==="generator"||V(e.attributes.name)==="framework"||V(e.attributes.name)==="publisher"||V(e.attributes.name)==="progid"||V(e.attributes.property).match(/^article:/)||V(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(V(e.attributes.name)==="google-site-verification"||V(e.attributes.name)==="yandex-verification"||V(e.attributes.name)==="csrf-token"||V(e.attributes.name)==="p:domain_verify"||V(e.attributes.name)==="verify-v1"||V(e.attributes.name)==="verification"||V(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function kt(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:m={},maskAttributeFn:_,maskTextFn:y,maskInputFn:g,slimDOMOptions:S,dataURLOptions:E={},inlineImages:w=!1,recordCanvas:D=!1,onSerialize:I,onIframeLoad:v,iframeLoadTimeout:L=5e3,onStylesheetLoad:z,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:Y=!1}=t;let{preserveWhiteSpace:ne=!0}=t;const Z=p_(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:y,maskInputFn:g,dataURLOptions:E,inlineImages:w,recordCanvas:D,keepIframeSrcFn:C,newlyAddedElement:Y});if(!Z)return console.warn(e,"not serialized"),null;let pe;r.hasNode(e)?pe=r.getId(e):__(Z,S)||!ne&&Z.type===ie.Text&&!Z.isStyle&&!Z.textContent.replace(/^\s+|\s+$/gm,"").length?pe=pn:pe=vi();const G=Object.assign(Z,{id:pe});if(r.add(e,G),pe===pn)return null;I&&I(e);let Te=!f;if(G.type===ie.Element){Te=Te&&!G.needBlock,delete G.needBlock;const J=e.shadowRoot;J&&cn(J)&&(G.isShadowHost=!0)}if((G.type===ie.Document||G.type===ie.Element)&&Te){S.headWhitespace&&G.type===ie.Element&&G.tagName==="head"&&(ne=!1);const J={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:m,maskAttributeFn:_,maskTextFn:y,maskInputFn:g,slimDOMOptions:S,dataURLOptions:E,inlineImages:w,recordCanvas:D,preserveWhiteSpace:ne,onSerialize:I,onIframeLoad:v,iframeLoadTimeout:L,onStylesheetLoad:z,stylesheetLoadTimeout:b,keepIframeSrcFn:C};for(const fe of Array.from(e.childNodes)){const Ie=kt(fe,J);Ie&&G.childNodes.push(Ie)}if(jg(e)&&e.shadowRoot)for(const fe of Array.from(e.shadowRoot.childNodes)){const Ie=kt(fe,J);Ie&&(cn(e.shadowRoot)&&(Ie.isShadow=!0),G.childNodes.push(Ie))}}return e.parentNode&&an(e.parentNode)&&cn(e.parentNode)&&(G.isShadow=!0),G.type===ie.Element&&G.tagName==="iframe"&&d_(e,()=>{const J=e.contentDocument;if(J&&v){const fe=kt(J,{doc:J,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:_,maskTextFn:y,maskInputFn:g,slimDOMOptions:S,dataURLOptions:E,inlineImages:w,recordCanvas:D,preserveWhiteSpace:ne,onSerialize:I,onIframeLoad:v,iframeLoadTimeout:L,onStylesheetLoad:z,stylesheetLoadTimeout:b,keepIframeSrcFn:C});fe&&v(e,fe)}},L),G.type===ie.Element&&G.tagName==="link"&&G.attributes.rel==="stylesheet"&&f_(e,()=>{if(z){const J=kt(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:m,maskAttributeFn:_,maskTextFn:y,maskInputFn:g,slimDOMOptions:S,dataURLOptions:E,inlineImages:w,recordCanvas:D,preserveWhiteSpace:ne,onSerialize:I,onIframeLoad:v,iframeLoadTimeout:L,onStylesheetLoad:z,stylesheetLoadTimeout:b,keepIframeSrcFn:C});J&&z(e,J)}},b),G}function y_(e,t){const{mirror:n=new Ru,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:m=!1,maskAttributeFn:_,maskTextFn:y,maskInputFn:g,slimDOM:S=!1,dataURLOptions:E,preserveWhiteSpace:w,onSerialize:D,onIframeLoad:I,iframeLoadTimeout:v,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:b=()=>!1}=t||{};return kt(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:m===!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}:m===!1?{}:m,maskAttributeFn:_,maskTextFn:y,maskInputFn:g,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:E,inlineImages:f,recordCanvas:p,preserveWhiteSpace:w,onSerialize:D,onIframeLoad:I,iframeLoadTimeout:v,onStylesheetLoad:L,stylesheetLoadTimeout:z,keepIframeSrcFn:b,newlyAddedElement:!1})}function Ue(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 de(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const vt=`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 Ro={map:{},getId(){return console.error(vt),-1},getNode(){return console.error(vt),null},removeNodeFromMap(){console.error(vt)},has(){return console.error(vt),!1},reset(){console.error(vt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ro=new Proxy(Ro,{get(e,t,n){return t==="map"&&console.error(vt),Reflect.get(e,t,n)}}));function hn(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&&(clearTimeout(r),r=null),s=o,e.apply(c,i)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function Mu(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){setTimeout(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Mu(e,t,i||{},!0)}function Ii(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 dr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(dr=()=>new Date().getTime());function Ou(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:Ue([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Ue([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Ue([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:Ue([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Ue([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Ue([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Nu(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Du(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ee(e,t,n,r,s){if(!e)return!1;const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;const o=wt(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=ot(i,o);let c=-1;return a<0?!1:(r&&(c=ot(i,wt(null,r))),a>-1&&c<0?!0:a<c)}function S_(e,t){return t.getId(e)!==-1}function Xr(e,t){return t.getId(e)===pn}function Lu(e,t){if(an(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Lu(e.parentNode,t):!0:!0}function ks(e){return!!e.changedTouches}function b_(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 Pu(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Fu(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Cs(e){return!!Ue([e,"optionalAccess",t=>t.shadowRoot])}class E_{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Yd(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 $u(e){let t=null;return Ue([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 v_(e){let t=e,n;for(;n=$u(t);)t=n;return t}function T_(e){const t=e.ownerDocument;if(!t)return!1;const n=v_(e);return t.contains(n)}function Bu(e){const t=e.ownerDocument;return t?t.contains(e)||T_(e):!1}let Jr;function I_(){if(Jr)return Jr;const e=window.document;let t=window.requestAnimationFrame;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.requestAnimationFrame&&(t=r.requestAnimationFrame),e.head.removeChild(n)}catch{}return Jr=t.bind(window)}function w_(...e){return I_()(...e)}var M=(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))(M||{}),O=(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))(O||{}),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||{}),Le=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Le||{});function k_(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 xo(e){return"__ln"in e}class C_{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=k_([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&xo(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&&xo(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 Ao=(e,t)=>`${e}@${t}`;class R_{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],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 C_,s=c=>{let u=c,l=pn;for(;l===pn;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},i=c=>{if(!c.parentNode||!Bu(c))return;const u=an(c.parentNode)?this.mirror.getId($u(c)):this.mirror.getId(c.parentNode),l=s(c);if(u===-1||l===-1)return r.addNode(c);const d=kt(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=>{Pu(f,this.mirror)&&this.iframeManager.addIframe(f),Fu(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Cs(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{this.iframeManager.attachIframe(f,p),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)Mo(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!Oo(this.droppedSet,c)&&!Mo(this.removes,c,this.mirror)||Oo(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 m=p.parentNode.host;if(this.mirror.getId(m)!==-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.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(Xr(t.target,this.mirror))return;let n;try{n=document.implementation.createHTMLDocument()}catch{n=this.doc}switch(t.type){case"characterData":{const r=t.target.textContent;!Ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:$t(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const a=Ei(r),c=r.tagName;i=ur(r,c,a);const u=Dr({maskInputOptions:this.maskInputOptions,tagName:c,type:a}),l=$t(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,u);i=fn({isMasked:l,element:r,value:i,maskInputFn:this.maskInputFn})}if(Ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributes.find(a=>a.node===t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Au(r.tagName,s)&&(o.attributes[s]=xu(this.doc,Ft(r.tagName),Ft(s),i,r,this.maskAttributeFn),s==="style")){const a=n.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const c of Array.from(r.style)){const u=r.style.getPropertyValue(c),l=r.style.getPropertyPriority(c);u!==a.style.getPropertyValue(c)||l!==a.style.getPropertyPriority(c)?l===""?o.styleDiff[c]=u:o.styleDiff[c]=[u,l]:o._unchangedStyles[c]=[u,l]}for(const c of Array.from(a.style))r.style.getPropertyValue(c)===""&&(o.styleDiff[c]=!1)}break}case"childList":{if(Ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=an(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Xr(r,this.mirror)||!S_(r,this.mirror)||(this.addedSet.has(r)?(Rs(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Lu(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ao(s,i)]?Rs(this.movedSet,r):this.removes.push({parentId:i,id:s,isShadow:an(t.target)&&cn(t.target)?!0:void 0})),this.mapRemoves.push(r))});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(Xr(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[Ao(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ee(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),Cs(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 Mo(e,t,n){return e.length===0?!1:Hu(e,t,n)}function Hu(e,t,n){const{parentNode:r}=t;if(!r)return!1;const s=n.getId(r);return e.some(i=>i.id===s)?!0:Hu(e,r,n)}function Oo(e,t){return e.size===0?!1:Uu(e,t)}function Uu(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Uu(e,n):!1}let un;function x_(e){un=e}function A_(){un=void 0}const P=e=>un?(...n)=>{try{return e(...n)}catch(r){if(un&&un(r)===!0)return()=>{};throw r}}:e;function Re(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 Ct=[];function wn(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 Wu(e,t){const n=new R_;Ct.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=Re([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(P(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 M_({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=hn(P(d=>{const f=Date.now()-a;e(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=P(hn(P(d=>{const f=wn(d),{clientX:p,clientY:m}=ks(d)?d.changedTouches[0]:d;a||(a=dr()),o.push({x:p,y:m,id:r.getId(f),timeOffset:dr()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?O.Drag:d instanceof MouseEvent?O.MouseMove:O.TouchMove)}),s,{trailing:!1})),l=[de("mousemove",u,n),de("touchmove",u,n),de("drag",u,n)];return P(()=>{l.forEach(d=>d())})}function O_({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=wn(f);if(Ee(p,r,s,i,!0))return;let m=null,_=d;if("pointerType"in f){switch(f.pointerType){case"mouse":m=Le.Mouse;break;case"touch":m=Le.Touch;break;case"pen":m=Le.Pen;break}m===Le.Touch?ue[d]===ue.MouseDown?_="TouchStart":ue[d]===ue.MouseUp&&(_="TouchEnd"):Le.Pen}else ks(f)&&(m=Le.Touch);m!==null?(u=m,(_.startsWith("Touch")&&m===Le.Touch||_.startsWith("Mouse")&&m===Le.Mouse)&&(m=null)):ue[d]===ue.Click&&(m=u,u=null);const y=ks(f)?f.changedTouches[0]:f;if(!y)return;const g=n.getId(p),{clientX:S,clientY:E}=y;P(e)({type:ue[_],id:g,x:S,y:E,...m!==null&&{pointerType:m}})};return Object.keys(ue).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=Ft(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(de(f,p,t))}),P(()=>{c.forEach(d=>d())})}function ju({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=P(hn(P(c=>{const u=wn(c);if(!u||Ee(u,r,s,i,!0))return;const l=n.getId(u);if(u===t&&t.defaultView){const d=Ou(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 de("scroll",a,t)}function N_({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=P(hn(P(()=>{const i=Nu(),o=Du();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return de("resize",s,t)}const D_=["INPUT","TEXTAREA","SELECT"],No=new WeakMap;function L_({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:m,unmaskTextSelector:_}){function y(v){let L=wn(v);const z=v.isTrusted,b=L&&ws(L.tagName);if(b==="OPTION"&&(L=L.parentElement),!L||!b||D_.indexOf(b)<0||Ee(L,r,s,i,!0))return;const C=L;if(C.classList.contains(o)||a&&C.matches(a))return;const Y=Ei(L);let ne=ur(C,b,Y),Z=!1;const pe=Dr({maskInputOptions:c,tagName:b,type:Y}),G=$t(L,f,m,p,_,pe);(Y==="radio"||Y==="checkbox")&&(Z=L.checked),ne=fn({isMasked:G,element:L,value:ne,maskInputFn:u}),g(L,d?{text:ne,isChecked:Z,userTriggered:z}:{text:ne,isChecked:Z});const Te=L.name;Y==="radio"&&Te&&Z&&t.querySelectorAll(`input[type="radio"][name="${Te}"]`).forEach(J=>{if(J!==L){const fe=fn({isMasked:G,element:J,value:ur(J,b,Y),maskInputFn:u});g(J,d?{text:fe,isChecked:!Z,userTriggered:!1}:{text:fe,isChecked:!Z})}})}function g(v,L){const z=No.get(v);if(!z||z.text!==L.text||z.isChecked!==L.isChecked){No.set(v,L);const b=n.getId(v);P(e)({...L,id:b})}}const E=(l.input==="last"?["change"]:["input","change"]).map(v=>de(v,P(y),t)),w=t.defaultView;if(!w)return()=>{E.forEach(v=>v())};const D=w.Object.getOwnPropertyDescriptor(w.HTMLInputElement.prototype,"value"),I=[[w.HTMLInputElement.prototype,"value"],[w.HTMLInputElement.prototype,"checked"],[w.HTMLSelectElement.prototype,"value"],[w.HTMLTextAreaElement.prototype,"value"],[w.HTMLSelectElement.prototype,"selectedIndex"],[w.HTMLOptionElement.prototype,"selected"]];return D&&D.set&&E.push(...I.map(v=>Mu(v[0],v[1],{set(){P(y)({target:this,isTrusted:!1})}},!1,w))),P(()=>{E.forEach(v=>v())})}function fr(e){const t=[];function n(r,s){if(Un("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Un("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Un("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Un("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 We(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function P_({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:P((l,d,f)=>{const[p,m]=f,{id:_,styleId:y}=We(d,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,adds:[{rule:p,index:m}]}),l.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:P((l,d,f)=>{const[p]=f,{id:m,styleId:_}=We(d,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,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:P((l,d,f)=>{const[p]=f,{id:m,styleId:_}=We(d,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,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:P((l,d,f)=>{const[p]=f,{id:m,styleId:_}=We(d,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,replaceSync:p}),l.apply(d,f)})}));const c={};Wn("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Wn("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Wn("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Wn("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:P((f,p,m)=>{const[_,y]=m,{id:g,styleId:S}=We(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,adds:[{rule:_,index:[...fr(p),y||0]}]}),f.apply(p,m)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:P((f,p,m)=>{const[_]=m,{id:y,styleId:g}=We(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||g&&g!==-1)&&e({id:y,styleId:g,removes:[{index:[...fr(p),_]}]}),f.apply(p,m)})})}),P(()=>{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 zu({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"?Re([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):Re([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=Re([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(Re([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 Re([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=Re([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}}),P(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function F_({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:P((a,c,u)=>{const[l,d,f]=u;if(n.has(l))return i.apply(c,[l,d,f]);const{id:p,styleId:m}=We(Re([c,"access",_=>_.parentRule,"optionalAccess",_=>_.parentStyleSheet]),t,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,set:{property:l,value:d,priority:f},index:fr(c.parentRule)}),a.apply(c,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:P((a,c,u)=>{const[l]=u;if(n.has(l))return o.apply(c,[l]);const{id:d,styleId:f}=We(Re([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:fr(c.parentRule)}),a.apply(c,u)})}),P(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function $_({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=P(u=>hn(P(l=>{const d=wn(l);if(!d||Ee(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:m,playbackRate:_}=d;e({type:u,id:s.getId(d),currentTime:f,volume:p,muted:m,playbackRate:_})}),i.media||500)),c=[de("play",a(0),o),de("pause",a(1),o),de("seeked",a(2),o),de("volumechange",a(3),o),de("ratechange",a(4),o)];return P(()=>{c.forEach(u=>u())})}function B_({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=Ii(t.fonts,"add",function(a){return function(c){return setTimeout(P(()=>{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),P(()=>{r.forEach(a=>a())})}function H_(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const c=P(()=>{const u=t.getSelection();if(!u||a&&Re([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:m,startOffset:_,endContainer:y,endOffset:g}=p;Ee(m,r,s,i,!0)||Ee(y,r,s,i,!0)||l.push({start:n.getId(m),startOffset:_,end:n.getId(y),endOffset:g})}o({ranges:l})});return c(),de("selectionchange",c)}function U_({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ii(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function W_(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=Wu(e,e.doc),s=M_(e),i=O_(e),o=ju(e),a=N_(e,{win:n}),c=L_(e),u=$_(e),l=P_(e,{win:n}),d=zu(e,e.doc),f=F_(e,{win:n}),p=e.collectFonts?B_(e):()=>{},m=H_(e),_=U_(e),y=[];for(const g of e.plugins)y.push(g.observer(g.callback,n,g.options));return P(()=>{Ct.forEach(g=>g.reset()),r.disconnect(),s(),i(),o(),a(),c(),u(),l(),d(),f(),p(),m(),_(),y.forEach(g=>g())})}function Un(e){return typeof window[e]<"u"}function Wn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class xs{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 Do(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 j_{constructor(){this.crossOriginIframeMirror=new xs(vi),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class z_{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new xs(vi),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xs(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}),Do([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 M.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:M.IncrementalSnapshot,data:{source:O.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case M.Meta:case M.Load:case M.DomContentLoaded:return!1;case M.Plugin:return n;case M.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case M.IncrementalSnapshot:switch(n.data.source){case O.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 O.Drag:case O.TouchMove:case O.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case O.ViewportResize:return!1;case O.MediaInteraction:case O.MouseInteraction:case O.Scroll:case O.CanvasMutation:case O.Input:return this.replaceIds(n.data,t,["id"]),n;case O.StyleSheetRule:case O.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case O.Font:return n;case O.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case O.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),Do([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!==ie.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class G_{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class q_{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(!cn(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=Wu({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ju({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(zu({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(Ii(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Bu(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Lo{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class Y_{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new E_,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:Cu(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 V_{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){w_(()=>{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}}function re(e){const t=e;return t.timestamp=dr(),t}let pr;const be=Kg();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:m=!0,maskAllInputs:_,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:S,maskInputFn:E,maskTextFn:w,packFn:D,sampling:I={},dataURLOptions:v={},mousemoveWait:L,recordCanvas:z=!1,recordCrossOriginIframes:b=!1,recordAfter:C=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:Y=!1,collectFonts:ne=!1,inlineImages:Z=!1,plugins:pe,keepIframeSrcFn:G=()=>!1,ignoreCSSAttributes:Te=new Set([]),errorHandler:J,onMutation:fe,getCanvasManager:Ie}=e;x_(J);const Xt=b?window.parent===window:!0;let Je=!1;if(!Xt)try{window.parent.document&&(Je=!1)}catch{Je=!0}if(Xt&&!t)throw new Error("emit function is required");L!==void 0&&I.mousemove===void 0&&(I.mousemove=L),be.reset();const Ze=_===!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}:y!==void 0?y:{},_t=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all"}:g||{};b_();let xn,Br=0;const Ni=A=>{for(const ye of pe||[])ye.eventProcessor&&(A=ye.eventProcessor(A));return D&&!Je&&(A=D(A)),A},Q=(A,ye)=>{if(Vn([Ct,"access",$=>$[0],"optionalAccess",$=>$.isFrozen,"call",$=>$()])&&A.type!==M.FullSnapshot&&!(A.type===M.IncrementalSnapshot&&A.data.source===O.Mutation)&&Ct.forEach($=>$.unfreeze()),Xt)Vn([t,"optionalCall",$=>$(Ni(A),ye)]);else if(Je){const $={type:"rrweb",event:Ni(A),origin:window.location.origin,isCheckout:ye};window.parent.postMessage($,"*")}if(A.type===M.FullSnapshot)xn=A,Br=0;else if(A.type===M.IncrementalSnapshot){if(A.data.source===O.Mutation&&A.data.isAttachIframe)return;Br++;const $=r&&Br>=r,Se=n&&A.timestamp-xn.timestamp>n;($||Se)&&Ur(!0)}},An=A=>{Q(re({type:M.IncrementalSnapshot,data:{source:O.Mutation,...A}}))},Di=A=>Q(re({type:M.IncrementalSnapshot,data:{source:O.Scroll,...A}})),Dl=A=>Q(re({type:M.IncrementalSnapshot,data:{source:O.CanvasMutation,...A}})),Ll=A=>Q(re({type:M.IncrementalSnapshot,data:{source:O.AdoptedStyleSheet,...A}})),Qe=new Y_({mutationCb:An,adoptedStyleSheetCb:Ll}),et=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new j_:new z_({mirror:be,mutationCb:An,stylesheetManager:Qe,recordCrossOriginIframes:b,wrappedEmit:Q});for(const A of pe||[])A.getMirror&&A.getMirror({nodeMirror:be,crossOriginIframeMirror:et.crossOriginIframeMirror,crossOriginIframeStyleMirror:et.crossOriginIframeStyleMirror});const Hr=new V_,Li=X_(Ie,{mirror:be,win:window,mutationCb:A=>Q(re({type:M.IncrementalSnapshot,data:{source:O.CanvasMutation,...A}})),recordCanvas:z,blockClass:s,blockSelector:i,unblockSelector:o,sampling:I.canvas,dataURLOptions:v,errorHandler:J}),Mn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new G_:new q_({mutationCb:An,scrollCb:Di,bypassOptions:{onMutation:fe,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:Ze,dataURLOptions:v,maskAttributeFn:S,maskTextFn:w,maskInputFn:E,recordCanvas:z,inlineImages:Z,sampling:I,slimDOMOptions:_t,iframeManager:et,stylesheetManager:Qe,canvasManager:Li,keepIframeSrcFn:G,processedNodeManager:Hr},mirror:be}),Ur=(A=!1)=>{Q(re({type:M.Meta,data:{href:window.location.href,width:Du(),height:Nu()}}),A),Qe.reset(),Mn.init(),Ct.forEach($=>$.lock());const ye=y_(document,{mirror:be,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:Ze,maskAttributeFn:S,maskInputFn:E,maskTextFn:w,slimDOM:_t,dataURLOptions:v,recordCanvas:z,inlineImages:Z,onSerialize:$=>{Pu($,be)&&et.addIframe($),Fu($,be)&&Qe.trackLinkElement($),Cs($)&&Mn.addShadowRoot($.shadowRoot,document)},onIframeLoad:($,Se)=>{et.attachIframe($,Se),Mn.observeAttachShadow($)},onStylesheetLoad:($,Se)=>{Qe.attachLinkElement($,Se)},keepIframeSrcFn:G});if(!ye)return console.warn("Failed to snapshot the document");Q(re({type:M.FullSnapshot,data:{node:ye,initialOffset:Ou(window)}})),Ct.forEach($=>$.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Qe.adoptStyleSheets(document.adoptedStyleSheets,be.getId(document))};pr=Ur;try{const A=[],ye=Se=>P(W_)({onMutation:fe,mutationCb:An,mousemoveCb:(H,tt)=>Q(re({type:M.IncrementalSnapshot,data:{source:tt,positions:H}})),mouseInteractionCb:H=>Q(re({type:M.IncrementalSnapshot,data:{source:O.MouseInteraction,...H}})),scrollCb:Di,viewportResizeCb:H=>Q(re({type:M.IncrementalSnapshot,data:{source:O.ViewportResize,...H}})),inputCb:H=>Q(re({type:M.IncrementalSnapshot,data:{source:O.Input,...H}})),mediaInteractionCb:H=>Q(re({type:M.IncrementalSnapshot,data:{source:O.MediaInteraction,...H}})),styleSheetRuleCb:H=>Q(re({type:M.IncrementalSnapshot,data:{source:O.StyleSheetRule,...H}})),styleDeclarationCb:H=>Q(re({type:M.IncrementalSnapshot,data:{source:O.StyleDeclaration,...H}})),canvasMutationCb:Dl,fontCb:H=>Q(re({type:M.IncrementalSnapshot,data:{source:O.Font,...H}})),selectionCb:H=>{Q(re({type:M.IncrementalSnapshot,data:{source:O.Selection,...H}}))},customElementCb:H=>{Q(re({type:M.IncrementalSnapshot,data:{source:O.CustomElement,...H}}))},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:Ze,inlineStylesheet:m,sampling:I,recordCanvas:z,inlineImages:Z,userTriggeredOnInput:Y,collectFonts:ne,doc:Se,maskAttributeFn:S,maskInputFn:E,maskTextFn:w,keepIframeSrcFn:G,blockSelector:i,unblockSelector:o,slimDOMOptions:_t,dataURLOptions:v,mirror:be,iframeManager:et,stylesheetManager:Qe,shadowDomManager:Mn,processedNodeManager:Hr,canvasManager:Li,ignoreCSSAttributes:Te,plugins:Vn([pe,"optionalAccess",H=>H.filter,"call",H=>H(tt=>tt.observer),"optionalAccess",H=>H.map,"call",H=>H(tt=>({observer:tt.observer,options:tt.options,callback:Pl=>Q(re({type:M.Plugin,data:{plugin:tt.name,payload:Pl}}))}))])||[]},{});et.addLoadListener(Se=>{try{A.push(ye(Se.contentDocument))}catch(H){console.warn(H)}});const $=()=>{Ur(),A.push(ye(document))};return document.readyState==="interactive"||document.readyState==="complete"?$():(A.push(de("DOMContentLoaded",()=>{Q(re({type:M.DomContentLoaded,data:{}})),C==="DOMContentLoaded"&&$()})),A.push(de("load",()=>{Q(re({type:M.Load,data:{}})),C==="load"&&$()},window))),()=>{A.forEach(Se=>Se()),Hr.destroy(),pr=void 0,A_()}}catch(A){console.warn(A)}}function K_(e){if(!pr)throw new Error("please take full snapshot after start recording");pr(e)}Ye.mirror=be;Ye.takeFullSnapshot=K_;function X_(e,t){try{return e?e(t):new Lo}catch{return console.warn("Unable to initialize CanvasManager"),new Lo}}const J_=3,Z_=5;function wi(e){return e>9999999999?e:e*1e3}function Zr(e){return e>9999999999?e/1e3:e}function kn(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:M.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ce(t,10,1e3)}}),t.category==="console")))}const Q_="button,a";function Gu(e){return e.closest(Q_)||e}function qu(e){const t=Yu(e);return!t||!(t instanceof Element)?t:Gu(t)}function Yu(e){return ey(e)?e.target:e}function ey(e){return typeof e=="object"&&!!e&&"target"in e}let je;function ty(e){return je||(je=[],ny()),je.push(e),()=>{const t=je?je.indexOf(e):-1;t>-1&&je.splice(t,1)}}function ny(){oe(K,"open",function(e){return function(...t){if(je)try{je.forEach(n=>n())}catch{}return e.apply(K,t)}})}function ry(e,t,n){e.handleClick(t,n)}class sy{constructor(t,n,r=kn){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=ty(()=>{this._lastMutation=Po()});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(oy(n,this._ignoreSelector)||!ay(t))return;const r={timestamp:Zr(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=Zr(t)}registerScroll(t=Date.now()){this._lastScroll=Zr(t)}registerClick(t){const n=Gu(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=Po();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:K.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:K.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const iy=["A","BUTTON","INPUT"];function oy(e,t){return!!(!iy.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 ay(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Po(){return Date.now()/1e3}function cy(e,t){try{if(!uy(t))return;const{source:n}=t.data;if(n===O.Mutation&&e.registerMutation(t.timestamp),n===O.Scroll&&e.registerScroll(t.timestamp),ly(t)){const{type:r,id:s}=t.data,i=Ye.mirror.getNode(s);i instanceof HTMLElement&&r===ue.Click&&e.registerClick(i)}}catch{}}function uy(e){return e.type===J_}function ly(e){return e.data.source===O.MouseInteraction}function Ae(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var hr;(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"})(hr||(hr={}));const dy=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function fy(e){const t={};for(const n in e)if(dy.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const py=e=>t=>{if(!e.isEnabled())return;const n=hy(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&&ry(e.clickDetector,n,qu(t.event)),kn(e,n)};function Vu(e,t){const n=Ye.mirror.getId(e),r=n&&Ye.mirror.getNode(n),s=r&&Ye.mirror.getMeta(r),i=s&&gy(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===hr.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:fy(i.attributes)}}:{}}}function hy(e){const{target:t,message:n}=my(e);return Ae({category:`ui.${e.name}`,...Vu(t,n)})}function my(e){const t=e.name==="click";let n,r=null;try{r=t?qu(e.event):Yu(e.event),n=Ke(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function gy(e){return e.type===hr.Element}function _y(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=yy(t);n&&kn(e,n)}function yy(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||Sy(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=Vu(o,u);return Ae({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Sy(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Fo={resource:Iy,paint:vy,navigation:Ty};function by(e){return e.map(Ey).filter(Boolean)}function Ey(e){return Fo[e.entryType]?Fo[e.entryType](e):null}function Bt(e){return((ce||K.performance.timeOrigin)+e)/1e3}function vy(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=Bt(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function Ty(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:m,type:_}=e;return s===0?null:{type:`${t}.${_}`,start:Bt(p),end:Bt(i),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:f}}}function Iy(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:Bt(i),end:Bt(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function wy(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,s=e.value,i=Bt(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:r?Ye.mirror.getId(r):void 0}}}function ky(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(Vt(s,n))}),r.push(Bc(({metric:s})=>{e.replayPerformanceEntries.push(wy(s))})),()=>{r.forEach(s=>s())}}const q=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Cy='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,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}}},L=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)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var 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}();function q(t,n){n||(n={});var r=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}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.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)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[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 B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Ry(){const e=new Blob([Cy]);return URL.createObjectURL(e)}function le(e,t){q&&(h.info(e),t&&Ku(e))}function Mt(e,t){q&&(h.info(e),t&&setTimeout(()=>{Ku(e)},0))}function Ku(e){He({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class ki extends Error{constructor(){super(`Event buffer exceeded maximum size of ${bi}.`)}}class Xu{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>bi)throw new ki;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?wi(t):null}}class xy{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(){le("[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){q&&h.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 Ay{constructor(t){this._worker=new xy(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=wi(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>bi?Promise.reject(new ki):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{q&&h.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 My{constructor(t){this._fallback=new Xu,this._compression=new Ay(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{le("[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){q&&h.warn("[Replay] Failed to add events when switching buffers.",s)}}}function Oy({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Ny(t);if(n)return n}return le("[Replay] Using simple buffer"),new Xu}function Ny(e){try{const t=e||Dy();if(!t)return;le(`[Replay] Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new My(n)}catch{le("[Replay] Failed to create compression worker")}}function Dy(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Ry():""}function Ci(){try{return"sessionStorage"in K&&!!K.sessionStorage}catch{return!1}}function Ly(e){Py(),e.session=void 0}function Py(){if(Ci())try{K.sessionStorage.removeItem(yi)}catch{}}function Ju(e){return e===void 0?!1:Math.random()<e}function Zu(e){const t=Date.now(),n=e.id||U(),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 Ri(e){if(Ci())try{K.sessionStorage.setItem(yi,JSON.stringify(e))}catch{}}function Fy(e,t){return Ju(e)?"session":t?"buffer":!1}function $o({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Fy(e,t),i=Zu({sampled:s,previousSessionId:r});return n&&Ri(i),i}function $y(e){if(!Ci())return null;try{const t=K.sessionStorage.getItem(yi);if(!t)return null;const n=JSON.parse(t);return Mt("[Replay] Loading existing session",e),Zu(n)}catch{return null}}function As(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Qu(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return As(e.started,t,r)||As(e.lastActivity,n,r)}function el(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Qu(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Qr({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},s){const i=s.stickySession&&$y(e);return i?el(i,{sessionIdleExpire:t,maxReplayDuration:n})?(Mt("[Replay] Session in sessionStorage is expired, creating new one..."),$o(s,{previousSessionId:i.id})):i:(Mt("[Replay] Creating new session",e),$o(s,{previousSessionId:r}))}function By(e){return e.type===M.Custom}function xi(e,t,n){return nl(e,t)?(tl(e,t,n),!0):!1}function Hy(e,t,n){return nl(e,t)?tl(e,t,n):Promise.resolve(null)}async function tl(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=Uy(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof ki?"addEventSizeExceeded":"addEvent";q&&h.error(r),await e.stop({reason:s});const i=x();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function nl(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=wi(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(le(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function Uy(e,t){try{if(typeof t=="function"&&By(e))return t(e)}catch(n){return q&&h.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function Ai(e){return!e.type}function Ms(e){return e.type==="transaction"}function Wy(e){return e.type==="replay_event"}function Bo(e){return e.type==="feedback"}function rl(e){const t=Gy();return(n,r)=>{if(!e.isEnabled()||!Ai(n)&&!Ms(n))return;const s=r&&r.statusCode;if(!(t&&(!s||s<200||s>=300))){if(Ms(n)){jy(e,n);return}zy(e,n)}}}function jy(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 zy(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)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function Gy(){const e=x();if(!e)return!1;const t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function qy(e){return t=>{!e.isEnabled()||!Ai(t)||Yy(e,t)}}function Yy(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=Ae({category:"replay.hydrate-error"});kn(e,r)}}function Vy(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function Ky(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:M.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 Xy(e,t){return e.recordingMode!=="buffer"||t.message===Si||!t.exception||t.type?!1:Ju(e.getOptions().errorSampleRate)}function Jy(e,t=!1){const n=t?rl(e):void 0;return Object.assign((r,s)=>e.isEnabled()?Wy(r)?(delete r.breadcrumbs,r):!Ai(r)&&!Ms(r)&&!Bo(r)||!e.checkAndHandleExpiredSession()?r:Bo(r)?(e.flush(),r.contexts.feedback.replay_id=e.getSessionId(),Ky(e,r),r):Vy(r,s)&&!e.getOptions()._experiments.captureExceptions?(q&&h.log("[Replay] Ignoring error from rrweb internals",r),null):((Xy(e,r)||e.recordingMode==="session")&&(r.tags={...r.tags,replayId:e.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function Lr(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:M.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 Zy(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 Qy(e){return t=>{if(!e.isEnabled())return;const n=Zy(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Lr(e,[n]),!1)))}}function eS(e,t){return q&&e.getOptions()._experiments.traceInternals?!1:Op(t,x())}function Pr(e,t){e.isEnabled()&&t!==null&&(eS(e,t.name)||e.addUpdate(()=>(Lr(e,[t]),!0)))}function tS(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:s}=e;if(!n)return null;const{method:i,url:o}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s?s.status:void 0}}}function nS(e){return t=>{if(!e.isEnabled())return;const n=tS(t);Pr(e,n)}}function rS(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,s=r[qe];if(!t||!n||!s)return null;const{method:i,url:o,status_code:a}=s;return o===void 0?null:{type:"resource.xhr",name:o,start:t/1e3,end:n/1e3,data:{method:i,statusCode:a}}}function sS(e){return t=>{if(!e.isEnabled())return;const n=rS(t);Pr(e,n)}}function Fr(e,t){if(e)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=al(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function sl(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function il(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[al(e)];if(!e)return[void 0]}catch{return q&&h.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return q&&h.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function mr(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 ol(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:ae({method:i,statusCode:o,request:a,response:c})}}function mn(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}=iS(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function Os(e,t){return Object.keys(e).reduce((n,r)=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=e[r]),n},{})}function al(e){return new URLSearchParams(e).toString()}function iS(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Io,n=oS(e);if(t){const r=e.slice(0,Io);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 oS(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function gr(e,t){const n=aS(e);return Wt(n,t)}function aS(e,t=K.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(K.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 cS(e,t,n){try{const r=await lS(e,t,n),s=ol("resource.fetch",r);Pr(n.replay,s)}catch(r){q&&h.error("[Replay] Failed to capture fetch breadcrumb",r)}}function uS(e,t,n){const{input:r,response:s}=t,i=r?cl(r):void 0,o=Fr(i,n.textEncoder),a=s?sl(s.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),a!==void 0&&(e.data.response_body_size=a)}async function lS(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=gr(o,n.networkDetailAllowUrls)&&!gr(o,n.networkDetailDenyUrls),f=d?dS(n,t.input,u):mn(u),p=await fS(d,n,t.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:f,response:p}}function dS({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?mS(n,t):{};if(!e)return Ve(s,r,void 0);const i=cl(n),[o,a]=il(i),c=Ve(s,r,o);return a?mr(c,a):c}async function fS(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},s,i){if(!e&&i!==void 0)return mn(i);const o=s?ul(s.headers,r):{};if(!s||!t&&i!==void 0)return Ve(o,i,void 0);const[a,c]=await hS(s),u=pS(a,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:e,headers:o});return c?mr(u,c):u}function pS(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:s,headers:i}){try{const o=e&&e.length&&r===void 0?Fr(e,n):r;return s?t?Ve(i,o,e):Ve(i,o,void 0):mn(o)}catch(o){return q&&h.warn("[Replay] Failed to serialize response body",o),Ve(i,r,void 0)}}async function hS(e){const t=gS(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await _S(t)]}catch(n){return q&&h.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function cl(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function ul(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function mS(e,t){return e.length===1&&typeof e[0]!="string"?Ho(e[0],t):e.length===2?Ho(e[1],t):{}}function Ho(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?ul(n,t):Array.isArray(n)?{}:Os(n,t):{}}function gS(e){try{return e.clone()}catch(t){q&&h.warn("[Replay] Failed to clone response body",t)}}function _S(e){return new Promise((t,n)=>{const r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);yS(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function yS(e){return await e.text()}async function SS(e,t,n){try{const r=ES(e,t,n),s=ol("resource.xhr",r);Pr(n.replay,s)}catch(r){q&&h.error("[Replay] Failed to capture xhr breadcrumb",r)}}function bS(e,t,n){const{xhr:r,input:s}=t;if(!r)return;const i=Fr(s,n.textEncoder),o=r.getResponseHeader("content-length")?sl(r.getResponseHeader("content-length")):wS(r.response,r.responseType,n.textEncoder);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function ES(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||!gr(c,n.networkDetailAllowUrls)||gr(c,n.networkDetailDenyUrls)){const I=mn(d),v=mn(f);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:I,response:v}}const p=a[qe],m=p?Os(p.request_headers,n.networkRequestHeaders):{},_=Os(vS(a),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?il(o):[void 0],[S,E]=n.networkCaptureBodies?TS(a):[void 0],w=Ve(m,d,y),D=Ve(_,f,S);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:g?mr(w,g):w,response:E?mr(D,E):D}}function vS(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((n,r)=>{const[s,i]=r.split(": ");return n[s.toLowerCase()]=i,n},{}):{}}function TS(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return IS(e.response,e.responseType)}catch(n){t.push(n)}return q&&h.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function IS(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 q&&h.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return q&&h.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function wS(e,t,n){try{const r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Fr(r,n)}catch{return}}function kS(e){const t=x();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(u,l)=>CS(c,u,l)):(Ws(nS(e)),js(sS(e)))}catch{}}function CS(e,t,n){if(t.data)try{RS(t)&&AS(n)&&(bS(t,n,e),SS(t,n,e)),xS(t)&&MS(n)&&(uS(t,n,e),cS(t,n,e))}catch{q&&h.warn("Error when enriching network breadcrumb")}}function RS(e){return e.category==="xhr"}function xS(e){return e.category==="fetch"}function AS(e){return e&&e.xhr}function MS(e){return e&&e.response}let Uo=null;function OS(e){return!!e.category}const NS=e=>t=>{if(!e.isEnabled())return;const n=DS(t);n&&kn(e,n)};function DS(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return Uo===t||!t||(Uo=t,!OS(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?LS(t):Ae(t)}function LS(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>Hn?(n=!0,`${s.slice(0,Hn)}…`):s;if(typeof s=="object")try{const i=Ce(s,7);return JSON.stringify(i).length>Hn?(n=!0,`${JSON.stringify(i,null,2).slice(0,Hn)}…`):i}catch{}return s});return Ae({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function PS(e){const t=se(),n=x();t.addScopeListener(NS(e)),Ra(py(e)),yn(Qy(e)),kS(e);const r=Jy(e,!Wo(n));n&&n.addEventProcessor?n.addEventProcessor(r):_c(r),Wo(n)&&(n.on("beforeSendEvent",qy(e)),n.on("afterSendEvent",rl(e)),n.on("createDsc",s=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=i)}),n.on("startTransaction",s=>{e.lastTransaction=s}),n.on("finishTransaction",s=>{e.lastTransaction=s}),n.on("beforeSendFeedback",(s,i)=>{const o=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&o&&s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=o)}))}function Wo(e){return!!(e&&e.on)}async function FS(e){try{return Promise.all(Lr(e,[$S(K.performance.memory)]))}catch{return[]}}function $S(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 BS(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=setTimeout(a,t),o&&i===void 0&&(i=setTimeout(a,o)),r}return l.cancel=c,l.flush=u,l}function HS(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){q&&h.warn("[Replay] Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&cy(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!xi(e,n,s))return!0;if(!s)return!1;if(WS(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){const i=e.eventBuffer.getEarliestTimestamp();i&&(le(`[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&&Ri(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function US(e){const t=e.getOptions();return{type:M.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 WS(e,t){!t||!e.session||e.session.segmentId!==0||xi(e,US(e),!1)}function jS(e,t,n,r){return Xe(Ba(e,Ys(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function zS({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 GS({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&&e.emit("preprocessEvent",r,i);const o=await Js(e.getOptions(),r,i,t,e,De());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata&&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 qS({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=zS({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=x(),f=se(),p=d&&d.getTransport(),m=d&&d.getDsn();if(!d||!p||!m||!i.sampled)return;const _={type:Ag,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},y=await GS({scope:f,client:d,replayId:t,event:_});if(!y){d.recordDroppedEvent("event_processor","replay",_),le("An event processor returned `null`, will not send event.");return}delete y.sdkProcessingMetadata;const g=jS(y,o,m,d.getOptions().tunnel);let S;try{S=await p.send(g)}catch(w){const D=new Error(Si);try{D.cause=w}catch{}throw D}if(!S)return S;if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new ll(S.statusCode);const E=Wa({},S);if(Ua(E,"replay"))throw new dl(E);return S}class ll extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class dl extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function fl(e,t={count:0,interval:Pg}){const{recordingData:n,options:r}=e;if(n.length)try{return await qS(e),!0}catch(s){if(s instanceof ll||s instanceof dl)throw s;if(Ya("Replays",{_retryCount:t.count}),q&&r._experiments&&r._experiments.captureExceptions&&br(s),t.count>=Fg){const i=new Error(`${Si} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{setTimeout(async()=>{try{await fl(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const pl="__THROTTLED",YS="__SKIPPED";function VS(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?YS:pl}o=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class ze{constructor({options:t,recordingOptions:n}){ze.prototype.__init.call(this),ze.prototype.__init2.call(this),ze.prototype.__init3.call(this),ze.prototype.__init4.call(this),ze.prototype.__init5.call(this),ze.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Mg,sessionIdleExpire:Og},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!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=BS(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=VS((o,a)=>Hy(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min($g,r),timeout:r,scrollTimeout:Bg,ignoreSelector:s?s.join(","):""}:void 0;i&&(this.clickDetector=new sy(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){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",Mt(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Mt("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const t=Qr({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)throw new Error("Replay recording is already in progress");Mt("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=Qr({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:Lg},emit:HS(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{le(`[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,Ly(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),le("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),le("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();le("[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&&As(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${K.location.pathname}${K.location.hash}${K.location.search}`,n=`${K.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===pl){const s=Ae({category:"replay.throttled"});this.addUpdate(()=>!xi(this,{type:Z_,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastTransaction||se().getTransaction(),r=(t&&j(t).data||{})[ge];if(!(!t||!r||!["route","custom"].includes(r)))return j(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Oy({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){q&&h.error("[Replay]",t),q&&this._options._experiments&&this._options._experiments.captureExceptions&&br(t)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Qr({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 el(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{K.document.addEventListener("visibilitychange",this._handleVisibilityChange),K.addEventListener("blur",this._handleWindowBlur),K.addEventListener("focus",this._handleWindowFocus),K.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(PS(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=ky(this)}_removeListeners(){try{K.document.removeEventListener("visibilitychange",this._handleVisibilityChange),K.removeEventListener("blur",this._handleWindowBlur),K.removeEventListener("focus",this._handleWindowFocus),K.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{K.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=>{_y(this,t)}}_doChangeToBackgroundTasks(t){!this.session||Qu(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()){le("[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:M.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=by(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Lr(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||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){q&&h.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await FS(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 fl({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=x();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){q&&h.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){le(`[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&&le("[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){q&&h.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ri(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 Qt(e,t,n,r){const s=typeof r=="string"?r.split(","):[],i=[...e,...s,...t];return typeof n<"u"&&(typeof n=="string"&&i.push(`.${n}`),ct(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function KS({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){const l=['base[href="/"]'],d=Qt(e,[".sentry-mask","[data-sentry-mask]"],a,c),f=Qt(t,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:d,unmaskTextSelector:f,blockSelector:Qt(n,[".sentry-block","[data-sentry-block]",...l],i,o),unblockSelector:Qt(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Qt(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(p.blockClass=i),a instanceof RegExp&&(p.maskTextClass=a),p}function XS({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 jo='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',JS=["content-length","content-type","accept"];let zo=!1;const ZS=e=>new Cn(e);class Cn{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=Ng,flushMaxDelay:n=Dg,minReplayDuration:r=Hg,maxReplayDuration:s=wo,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},sessionSampleRate:u,errorSampleRate:l,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:m=750,mutationLimit:_=1e4,slowClickTimeout:y=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:E=[],networkCaptureBodies:w=!0,networkRequestHeaders:D=[],networkResponseHeaders:I=[],mask:v=[],maskAttributes:L=["title","placeholder"],unmask:z=[],block:b=[],unblock:C=[],ignore:Y=[],maskFn:ne,beforeAddRecordingEvent:Z,beforeErrorSampling:pe,blockClass:G,blockSelector:Te,maskInputOptions:J,maskTextClass:fe,maskTextSelector:Ie,ignoreClass:Xt}={}){this.name=Cn.id;const Je=KS({mask:v,unmask:z,block:b,unblock:C,ignore:Y,blockClass:G,blockSelector:Te,maskTextClass:fe,maskTextSelector:Ie,ignoreClass:Xt});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...J||{},password:!0},maskTextFn:ne,maskInputFn:ne,maskAttributeFn:(Ze,_t,xn)=>XS({maskAttributes:L,maskAllText:d,privacyOptions:Je,key:Ze,value:_t,el:xn}),...Je,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:Ze=>{try{Ze.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Ug),maxReplayDuration:Math.min(s,wo),stickySession:i,sessionSampleRate:u,errorSampleRate:l,useCompression:o,workerUrl:a,blockAllMedia:p,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:m,mutationLimit:_,slowClickTimeout:y,slowClickIgnoreSelectors:g,networkDetailAllowUrls:S,networkDetailDenyUrls:E,networkCaptureBodies:w,networkRequestHeaders:Go(D),networkResponseHeaders:Go(I),beforeAddRecordingEvent:Z,beforeErrorSampling:pe,_experiments:c},typeof u=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysSessionSampleRate: ${u} })`),this._initialOptions.sessionSampleRate=u),typeof l=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysOnErrorSampleRate: ${l} })`),this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${jo}`:jo),this._isInitialized&&ps())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return zo}set _isInitialized(t){zo=t}setupOnce(){ps()&&(this._setup(),setTimeout(()=>this._initialize()))}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()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=QS(this._initialOptions);this._replay=new ze({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const n=x().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}Cn.__initStatic();function QS(e){const t=x(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...ae(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&ct(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(ct(()=>{console.warn("SDK client is not available.")}),r)}function Go(e){return[...JS,...e.map(t=>t.toLowerCase())]}function eb(){const e=x();return e&&e.getIntegrationByName&&e.getIntegrationByName("Replay")}var qo;(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"})(qo||(qo={}));function tb(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ns(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ns(e.parentNode,t,n,r+1)}function Yo(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(tb(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Tt=`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 Vo={map:{},getId(){return console.error(Tt),-1},getNode(){return console.error(Tt),null},removeNodeFromMap(){console.error(Tt)},has(){return console.error(Tt),!1},reset(){console.error(Tt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Vo=new Proxy(Vo,{get(e,t,n){return t==="map"&&console.error(Tt),Reflect.get(e,t,n)}}));function Mi(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){setTimeout(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Mi(e,t,i||{},!0)}function Oi(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()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString());function $r(e,t,n,r,s){if(!e)return!1;const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;const o=Yo(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=Ns(i,o);let c=-1;return a<0?!1:(r&&(c=Ns(i,Yo(null,r))),a>-1&&c<0?!0:a<c)}let es;function nb(){if(es)return es;const e=window.document;let t=window.requestAnimationFrame;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.requestAnimationFrame&&(t=r.requestAnimationFrame),e.head.removeChild(n)}catch{}return es=t.bind(window)}function nt(...e){return nb()(...e)}var Ht=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ht||{});let Xn;function rb(e){Xn=e}const Ko=e=>Xn?(...n)=>{try{return e(...n)}catch(r){if(Xn&&Xn(r)===!0)return()=>{};throw r}}:e;var Rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sb=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var jn=0;jn<Rt.length;jn++)sb[Rt.charCodeAt(jn)]=jn;var ib=function(e){var t=new Uint8Array(e),n,r=t.length,s="";for(n=0;n<r;n+=3)s+=Rt[t[n]>>2],s+=Rt[(t[n]&3)<<4|t[n+1]>>4],s+=Rt[(t[n+1]&15)<<2|t[n+2]>>6],s+=Rt[t[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const Xo=new Map;function ob(e,t){let n=Xo.get(e);return n||(n=new Map,Xo.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const hl=(e,t,n)=>{if(!e||!(gl(e,t)||typeof e=="object"))return;const r=e.constructor.name,s=ob(n,r);let i=s.indexOf(e);return i===-1&&(i=s.length,s.push(e)),i};function Jn(e,t,n){if(e instanceof Array)return e.map(r=>Jn(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,s=ib(e);return{rr_type:r,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Jn(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:s}=e;return{rr_type:r,src:s}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",s=e.toDataURL();return{rr_type:r,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Jn(e.data,t,n),e.width,e.height]};if(gl(e,t)||typeof e=="object"){const r=e.constructor.name,s=hl(e,t,n);return{rr_type:r,index:s}}}}return e}const ml=(e,t,n)=>e.map(r=>Jn(r,t,n)),gl=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function ab(e,t,n,r,s){const i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Oi(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...l){return $r(this.canvas,n,r,s,!0)||setTimeout(()=>{const d=ml(l,t,this);e(this.canvas,{type:Ht["2D"],property:a,args:d})},0),u.apply(this,l)}});i.push(c)}catch{const u=Mi(t.CanvasRenderingContext2D.prototype,a,{set(l){e(this.canvas,{type:Ht["2D"],property:a,args:[l],setter:!0})}});i.push(u)}return()=>{i.forEach(a=>a())}}function cb(e){return e==="experimental-webgl"?"webgl":e}function Jo(e,t,n,r,s){const i=[];try{const o=Oi(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!$r(this,t,n,r,!0)){const l=cb(c);if("__context"in this||(this.__context=l),s&&["webgl","webgl2"].includes(l))if(u[0]&&typeof u[0]=="object"){const d=u[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Zo(e,t,n,r,s,i,o,a){const c=[],u=Object.getOwnPropertyNames(e);for(const l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const d=Oi(e,l,function(f){return function(...p){const m=f.apply(this,p);if(hl(m,a,this),"tagName"in this.canvas&&!$r(this.canvas,r,s,i,!0)){const _=ml(p,a,this),y={type:t,property:l,args:_};n(this.canvas,y)}return m}});c.push(d)}catch{const f=Mi(e,l,{set(p){n(this.canvas,{type:t,property:l,args:[p],setter:!0})}});c.push(f)}return c}function ub(e,t,n,r,s,i){const o=[];return o.push(...Zo(t.WebGLRenderingContext.prototype,Ht.WebGL,e,n,r,s,i,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Zo(t.WebGL2RenderingContext.prototype,Ht.WebGL2,e,n,r,s,i,t)),()=>{o.forEach(a=>a())}}var lb='for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e="undefined"==typeof Uint8Array?[]:new Uint8Array(256),n=0;n<64;n++)e[t.charCodeAt(n)]=n;var a=function(e){var n,a=new Uint8Array(e),s=a.length,r="";for(n=0;n<s;n+=3)r+=t[a[n]>>2],r+=t[(3&a[n])<<4|a[n+1]>>4],r+=t[(15&a[n+1])<<2|a[n+2]>>6],r+=t[63&a[n+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r};const s=new Map,r=new Map;const i=self;i.onmessage=async function(t){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:t.data.id});{const{id:e,bitmap:n,width:o,height:f,dataURLOptions:c}=t.data,g=async function(t,e,n){const s=t+"-"+e;if("OffscreenCanvas"in globalThis){if(r.has(s))return r.get(s);const i=new OffscreenCanvas(t,e);i.getContext("2d");const o=await i.convertToBlob(n),f=await o.arrayBuffer(),c=a(f);return r.set(s,c),c}return""}(o,f,c),d=new OffscreenCanvas(o,f);d.getContext("2d").drawImage(n,0,0),n.close();const u=await d.convertToBlob(c),h=u.type,w=await u.arrayBuffer(),l=a(w);if(!s.has(e)&&await g===l)return s.set(e,l),i.postMessage({id:e});if(s.get(e)===l)return i.postMessage({id:e});i.postMessage({id:e,type:h,base64:l,width:o,height:f}),s.set(e,l)}};';function db(){const e=new Blob([lb]);return URL.createObjectURL(e)}class fb{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,d)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(d)};const{sampling:n="all",win:r,blockClass:s,blockSelector:i,unblockSelector:o,recordCanvas:a,dataURLOptions:c,errorHandler:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,u&&rb(u),!t.enableManualSnapshot&&Ko(()=>{a&&n==="all"&&this.initCanvasMutationObserver(r,s,i,o),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,i,o,{dataURLOptions:c})})()}initCanvasFPSObserver(t,n,r,s,i,o){const a=Jo(n,r,s,i,!0),c=this.takeSnapshot(!1,t,n,r,s,i,o.dataURLOptions);this.resetObservers=()=>{a(),cancelAnimationFrame(c)}}initCanvasMutationObserver(t,n,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Jo(t,n,r,s,!1),o=ab(this.processMutation.bind(this),t,n,r,s),a=ub(this.processMutation.bind(this),t,n,r,s,this.mirror);this.resetObservers=()=>{i(),o(),a()}}snapshot(t){const{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.win,n.blockClass,n.blockSelector,n.unblockSelector,n.dataURLOptions,t);this.resetObservers=()=>{cancelAnimationFrame(r)}}takeSnapshot(t,n,r,s,i,o,a,c){const u=new Map,l=new Worker(db());l.onmessage=y=>{const g=y.data,{id:S}=g;if(u.set(S,!1),!("base64"in g))return;const{base64:E,type:w,width:D,height:I}=g;this.mutationCb({id:S,type:Ht["2D"],commands:[{property:"clearRect",args:[0,0,D,I]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:E}],type:w}]},0,0]}]})};const d=1e3/n;let f=0,p;const m=y=>{if(y)return[y];const g=[];return r.document.querySelectorAll("canvas").forEach(S=>{$r(S,s,i,o,!0)||g.push(S)}),g},_=y=>{if(f&&y-f<d){p=nt(_);return}f=y,m(c).forEach(g=>{const S=this.mirror.getId(g);if(!u.get(S)){if(u.set(S,!0),!t&&["webgl","webgl2"].includes(g.__context)){const E=g.getContext(g.__context);Vn([E,"optionalAccess",w=>w.getContextAttributes,"call",w=>w(),"optionalAccess",w=>w.preserveDrawingBuffer])===!1&&E.clear(E.COLOR_BUFFER_BIT)}createImageBitmap(g).then(E=>{l.postMessage({id:S,bitmap:E,width:g.width,height:g.height,dataURLOptions:a},[E])}).catch(E=>{Ko(()=>{throw E})()})}}),p=nt(_)};return p=nt(_),p}startPendingCanvasMutationFlusher(){nt(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,nt(t)};nt(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),nt(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const s=r.map(o=>{const{type:a,...c}=o;return c}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:s}),this.pendingCanvasMutations.delete(t)}}const Qo={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},_l="ReplayCanvas",pb=(e={})=>{const t={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot};let n;const r=new Promise(s=>n=s);return{name:_l,setupOnce(){},getOptions(){const{quality:s,enableManualSnapshot:i}=t;return{enableManualSnapshot:i,recordCanvas:!0,getCanvasManager:o=>{const a=new fb({...o,enableManualSnapshot:i,errorHandler:c=>{try{typeof c=="object"&&(c.__rrweb__=!0)}catch{}}});return n(a),a},...Qo[s||"medium"]||Qo.medium}},async snapshot(s){(await r).snapshot(s)}}},yl=pb,hb=_e(_l,yl),gt=N,ts="#ffffff",ea="inherit",ns="rgba(108, 95, 199, 1)",ta={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:ts,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"12px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:ns,submitBorder:ns,submitOutlineFocus:"#29232f",submitForeground:ts,submitForegroundHover:ts,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:ea,inputForeground:ea,inputBorder:"var(--border)",inputOutlineFocus:ns,formBorderRadius:"20px",formContentBorderRadius:"6px"},na={light:ta,dark:{...ta,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"}},mb="Report a Bug",gb="Cancel",_b="Send Bug Report",yb="Report a Bug",Sb="your.email@example.org",bb="Email",Eb="What's the bug? What did you expect?",vb="Description",Tb="Your Name",Ib="Name",wb="Thank you for your report!",Sl="widget",bl="api";async function kb({client:e,scope:t,event:n}){const r={};e.emit&&e.emit("preprocessEvent",n,r);const s=await Js(e.getOptions(),n,r,t,e,De());return s===null?(e.recordDroppedEvent("event_processor","feedback",n),null):(s.platform=s.platform||"javascript",s)}async function Cb({feedback:{message:e,email:t,name:n,source:r,url:s}},{includeReplay:i=!0}={}){const o=x(),a=o&&o.getTransport(),c=o&&o.getDsn();if(!o||!a||!c)return;const u={contexts:{feedback:{contact_email:t,name:n,message:e,url:s,source:r}},type:"feedback"};return zt(async l=>{l.clearBreadcrumbs(),[bl,Sl].includes(String(r))&&l.setLevel("info");const d=await kb({scope:l,client:o,event:u});if(!d)return;o.emit&&o.emit("beforeSendFeedback",d,{includeReplay:!!i});const f=ac(d,c,o.getOptions()._metadata,o.getOptions().tunnel);let p;try{p=await a.send(f)}catch(m){const _=new Error("Unable to send Feedback");try{_.cause=m}catch{}throw _}if(p){if(typeof p.statusCode=="number"&&(p.statusCode<200||p.statusCode>=300))throw new Error("Unable to send Feedback");return p}})}function El({name:e,email:t,message:n,source:r=bl,url:s=ga()},i={}){if(!n)throw new Error("Unable to submit feedback with empty message");return Cb({feedback:{name:e,email:t,message:n,url:s,source:r}},i)}const rt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ra(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Rb(e){const t=e.createElement("style");return t.textContent=`
.widget__actor {
  line-height: 25px;

  display: flex;
  align-items: center;
  gap: 8px;

  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  text-decoration: none;
  z-index: 9000;

  color: var(--foreground);
  background-color: var(--background);
  border: var(--border);
  box-shadow: var(--box-shadow);
  opacity: 1;
  transition: opacity 0.1s ease-in-out;
}

.widget__actor:hover {
  background-color: var(--background-hover);
}

.widget__actor svg {
  width: 16px;
  height: 16px;
}

.widget__actor--hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.widget__actor__text {
}

.feedback-icon path {
  fill: var(--foreground);
}
`,t}function xb(e){const t=e.createElement("style");return t.textContent=`
.dialog {
  line-height: 25px;
  background-color: rgba(0, 0, 0, 0.05);
  border: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.dialog:not([open]) {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.dialog:not([open]) .dialog__content {
  transform: translate(0, -16px) scale(0.98);
}

.dialog__content {
  position: fixed;
  left: var(--left);
  right: var(--right);
  bottom: var(--bottom);
  top: var(--top);

  border: var(--border);
  border-radius: var(--form-border-radius);
  background-color: var(--background);
  color: var(--foreground);

  width: 320px;
  max-width: 100%;
  max-height: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  box-shadow: var(--box-shadow);
  transition: transform 0.2s ease-in-out;
  transform: translate(0, 0) scale(1);
}

.dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 600;
  padding: 24px 24px 0 24px;
  margin: 0;
  margin-bottom: 16px;
}

.brand-link {
  display: inline-flex;
}

.error {
  color: var(--error);
  margin-bottom: 16px;
}

.form {
  display: grid;
  overflow: auto;
  flex-direction: column;
  gap: 16px;
  padding: 0 24px 24px;
}

.form__error-container {
  color: var(--error);
}

.form__error-container--hidden {
  display: none;
}

.form__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0px;
}

.form__label__text {
  display: grid;
  gap: 4px;
  align-items: center;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
}

.form__label__text--required {
  font-size: 0.85em;
}

.form__input {
  font-family: inherit;
  line-height: inherit;
  background-color: var(--input-background);
  box-sizing: border-box;
  border: var(--input-border);
  border-radius: var(--form-content-border-radius);
  color: var(--input-foreground);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
}

.form__input:focus-visible {
  outline: 1px auto var(--input-outline-focus);
}

.form__input--textarea {
  font-family: inherit;
  resize: vertical;
}

.btn-group {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.btn {
  line-height: inherit;
  border: var(--cancel-border);
  border-radius: var(--form-content-border-radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 16px;
}
.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.btn--primary {
  background-color: var(--submit-background);
  border-color: var(--submit-border);
  color: var(--submit-foreground);
}
.btn--primary:hover {
  background-color: var(--submit-background-hover);
  color: var(--submit-foreground-hover);
}
.btn--primary:focus-visible {
  outline: 1px auto var(--submit-outline-focus);
}

.btn--default {
  background-color: var(--cancel-background);
  color: var(--cancel-foreground);
  font-weight: 500;
}
.btn--default:hover {
  background-color: var(--cancel-background-hover);
  color: var(--cancel-foreground-hover);
}
.btn--default:focus-visible {
  outline: 1px auto var(--cancel-outline-focus);
}

.success-message {
  background-color: var(--background);
  border: var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  font-weight: 600;
  color: var(--success);
  padding: 12px 24px;
  line-height: 25px;
  display: grid;
  align-items: center;
  grid-auto-flow: column;
  gap: 6px;
  cursor: default;
}

.success-icon path {
  fill: var(--success);
}
`,t}function sa(e){return`
  --background: ${e.background};
  --background-hover: ${e.backgroundHover};
  --foreground: ${e.foreground};
  --error: ${e.error};
  --success: ${e.success};
  --border: ${e.border};
  --border-radius: ${e.borderRadius};
  --box-shadow: ${e.boxShadow};

  --submit-background: ${e.submitBackground};
  --submit-background-hover: ${e.submitBackgroundHover};
  --submit-border: ${e.submitBorder};
  --submit-outline-focus: ${e.submitOutlineFocus};
  --submit-foreground: ${e.submitForeground};
  --submit-foreground-hover: ${e.submitForegroundHover};

  --cancel-background: ${e.cancelBackground};
  --cancel-background-hover: ${e.cancelBackgroundHover};
  --cancel-border: ${e.cancelBorder};
  --cancel-outline-focus: ${e.cancelOutlineFocus};
  --cancel-foreground: ${e.cancelForeground};
  --cancel-foreground-hover: ${e.cancelForegroundHover};

  --input-background: ${e.inputBackground};
  --input-foreground: ${e.inputForeground};
  --input-border: ${e.inputBorder};
  --input-outline-focus: ${e.inputOutlineFocus};

  --form-border-radius: ${e.formBorderRadius};
  --form-content-border-radius: ${e.formContentBorderRadius};
  `}function Ab(e,t,n){const r=e.createElement("style");return r.textContent=`
:host {
  --bottom: 1rem;
  --right: 1rem;
  --top: auto;
  --left: auto;
  --z-index: 100000;
  --font-family: ${n.light.fontFamily};
  --font-size: ${n.light.fontSize};

  position: fixed;
  left: var(--left);
  right: var(--right);
  bottom: var(--bottom);
  top: var(--top);
  z-index: var(--z-index);

  font-family: var(--font-family);
  font-size: var(--font-size);

  ${sa(t==="dark"?n.dark:n.light)}
}

${t==="system"?`
@media (prefers-color-scheme: dark) {
  :host {
    ${sa(n.dark)}
  }
}`:""}
}`,r}function Mb({id:e,colorScheme:t,themeDark:n,themeLight:r}){try{const s=gt.document,i=s.createElement("div");i.id=e;const o=i.attachShadow({mode:"open"});return o.appendChild(Ab(s,t,{dark:n,light:r})),o.appendChild(xb(s)),{shadow:o,host:i}}catch{throw h.warn("[Feedback] Browser does not support shadow DOM API"),new Error("Browser does not support shadow DOM API.")}}async function Ob(e,t,n){if(!e)return;const r=()=>{e&&e.showError("There was a problem submitting feedback, please wait and try again.")};e.hideError();try{return await El({...t,source:Sl},n)}catch(s){rt&&h.error(s),r()}}function me(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const bt=20,Nb="http://www.w3.org/2000/svg";function Db(){const e=a=>gt.document.createElementNS(Nb,a),t=me(e("svg"),{class:"feedback-icon",width:`${bt}`,height:`${bt}`,viewBox:`0 0 ${bt} ${bt}`,fill:"none"}),n=me(e("g"),{clipPath:"url(#clip0_57_80)"}),r=me(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const s=e("defs"),i=me(e("clipPath"),{id:"clip0_57_80"}),o=me(e("rect"),{width:`${bt}`,height:`${bt}`,fill:"white"});return i.appendChild(o),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(o),{get el(){return t}}}function X(e,t,...n){const s=gt.document.createElement(e);t&&Object.entries(t).forEach(([i,o])=>{i==="className"&&typeof o=="string"?s.setAttribute("class",o):typeof o=="boolean"&&o?s.setAttribute(i,""):typeof o=="string"?s.setAttribute(i,o):i.startsWith("on")&&typeof o=="function"&&s.addEventListener(i.substring(2).toLowerCase(),o)});for(const i of n)vl(s,i);return s}function vl(e,t){const n=gt.document;if(!(typeof t>"u"||t===null))if(Array.isArray(t))for(const r of t)vl(e,r);else t===!1||(typeof t=="string"?e.appendChild(n.createTextNode(t)):t instanceof Node?e.appendChild(t):e.appendChild(n.createTextNode(String(t))))}function Lb({buttonLabel:e,onClick:t}){function n(s){t&&t(s)}const r=X("button",{type:"button",className:"widget__actor","aria-label":e,"aria-hidden":"false"},Db().el,e?X("span",{className:"widget__actor__text"},e):null);return r.addEventListener("click",n),{get el(){return r},show:()=>{r.classList.remove("widget__actor--hidden"),r.setAttribute("aria-hidden","false")},hide:()=>{r.classList.add("widget__actor--hidden"),r.setAttribute("aria-hidden","true")}}}function Pb({label:e}){return{el:X("button",{type:"submit",className:"btn btn--primary","aria-label":e},e)}}function rs(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function Fb({nameLabel:e,namePlaceholder:t,emailLabel:n,emailPlaceholder:r,messageLabel:s,messagePlaceholder:i,cancelButtonLabel:o,submitButtonLabel:a,showName:c,showEmail:u,isNameRequired:l,isEmailRequired:d,defaultName:f,defaultEmail:p,onCancel:m,onSubmit:_}){const{el:y}=Pb({label:a});function g(b){if(b.preventDefault(),b.target instanceof HTMLFormElement)try{if(_){const C=new FormData(b.target),Y={name:rs(C,"name"),email:rs(C,"email"),message:rs(C,"message")};_(Y)}}catch{}}const S=X("div",{className:"form__error-container form__error-container--hidden","aria-hidden":"true"});function E(b){S.textContent=b,S.classList.remove("form__error-container--hidden"),S.setAttribute("aria-hidden","false")}function w(){S.textContent="",S.classList.add("form__error-container--hidden"),S.setAttribute("aria-hidden","true")}const D=X("input",{id:"name",type:c?"text":"hidden","aria-hidden":c?"false":"true",name:"name",required:l,className:"form__input",placeholder:t,value:f}),I=X("input",{id:"email",type:u?"text":"hidden","aria-hidden":u?"false":"true",name:"email",required:d,className:"form__input",placeholder:r,value:p}),v=X("textarea",{id:"message",autoFocus:"true",rows:"5",name:"message",required:!0,className:"form__input form__input--textarea",placeholder:i}),L=X("button",{type:"button",className:"btn btn--default","aria-label":o,onClick:b=>{m&&m(b)}},o),z=X("form",{className:"form",onSubmit:g},[S,c&&X("label",{htmlFor:"name",className:"form__label"},[X("span",{className:"form__label__text"},e,l&&X("span",{className:"form__label__text--required"}," (required)")),D]),!c&&D,u&&X("label",{htmlFor:"email",className:"form__label"},[X("span",{className:"form__label__text"},n,d&&X("span",{className:"form__label__text--required"}," (required)")),I]),!u&&I,X("label",{htmlFor:"message",className:"form__label"},[X("span",{className:"form__label__text"},s,X("span",{className:"form__label__text--required"}," (required)")),v]),X("div",{className:"btn-group"},[y,L])]);return{get el(){return z},showError:E,hideError:w}}const $b="http://www.w3.org/2000/svg";function Bb({colorScheme:e}){const t=o=>gt.document.createElementNS($b,o),n=me(t("svg"),{class:"sentry-logo",width:"32",height:"30",viewBox:"0 0 72 66",fill:"none"}),r=me(t("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});n.append(r);const s=t("defs"),i=t("style");return i.textContent=`
    path {
      fill: ${e==="dark"?"#fff":"#362d59"};
    }`,e==="system"&&(i.textContent+=`
    @media (prefers-color-scheme: dark) {
      path: {
        fill: '#fff';
      }
    }
    `),s.append(i),n.append(s),{get el(){return n}}}function Hb({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:s,isEmailRequired:i,colorScheme:o,defaultName:a,defaultEmail:c,onClosed:u,onCancel:l,onSubmit:d,...f}){let p=null;function m(){_(),u&&u()}function _(){p&&(p.open=!1)}function y(){p&&(p.open=!0)}function g(){return p&&p.open===!0||!1}const{el:S,showError:E,hideError:w}=Fb({showEmail:r,showName:n,isEmailRequired:i,isNameRequired:s,defaultName:a,defaultEmail:c,onSubmit:d,onCancel:l,...f});return p=X("dialog",{className:"dialog",open:!0,onClick:m},X("div",{className:"dialog__content",onClick:D=>{D.stopPropagation()}},X("h2",{className:"dialog__header"},e,t&&X("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},Bb({colorScheme:o}).el)),S)),{get el(){return p},showError:E,hideError:w,open:y,close:_,checkIsOpen:g}}const zn=16,ia=17,Ub="http://www.w3.org/2000/svg";function Wb(){const e=c=>gt.document.createElementNS(Ub,c),t=me(e("svg"),{class:"success-icon",width:`${zn}`,height:`${ia}`,viewBox:`0 0 ${zn} ${ia}`,fill:"none"}),n=me(e("g"),{clipPath:"url(#clip0_57_156)"}),r=me(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),s=me(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(s,r);const i=e("defs"),o=me(e("clipPath"),{id:"clip0_57_156"}),a=me(e("rect"),{width:`${zn}`,height:`${zn}`,fill:"white",transform:"translate(0 0.5)"});return o.appendChild(a),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(a),{get el(){return t}}}function jb({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}const r=X("div",{className:"success-message",onClick:n},Wb().el,e);return{el:r,remove:n}}function oa({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let s,i,o=!1;function a(){if(e)try{const g=jb({message:n.successMessageText,onRemove:()=>{S&&clearTimeout(S),l()}});if(!g.el)throw new Error("Unable to show success message");e.appendChild(g.el);const S=setTimeout(()=>{g&&g.remove()},5e3)}catch(g){h.error(g)}}async function c(g){if(!i)return;const S=[];if(n.isNameRequired&&!g.name&&S.push(n.nameLabel),n.isEmailRequired&&!g.email&&S.push(n.emailLabel),g.message||S.push(n.messageLabel),S.length>0){i.showError(`Please enter in the following required fields: ${S.join(", ")}`);return}if(!await Ob(i,g)){n.onSubmitError&&n.onSubmitError();return}_(),a(),n.onSubmitSuccess&&n.onSubmitSuccess()}function u(){const g=x(),S=g&&g.getIntegrationByName&&g.getIntegrationByName("Replay");S&&S.flush().catch(E=>{rt&&h.error(E)})}function l(){s&&s.show()}function d(){s&&s.hide()}function f(){s&&s.el&&s.el.remove()}function p(){try{if(i){i.open(),o=!0,n.onFormOpen&&n.onFormOpen(),u();return}const g=n.useSentryUser,S=se(),E=S&&S.getUser();if(i=Hb({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,defaultName:g&&E&&E[g.name]||"",defaultEmail:g&&E&&E[g.email]||"",onClosed:()=>{l(),o=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{m(),l()},onSubmit:c}),!i.el)throw new Error("Unable to open Feedback dialog");e.appendChild(i.el),d(),n.onFormOpen&&n.onFormOpen(),u()}catch(g){h.error(g)}}function m(){i&&(i.close(),o=!1,n.onFormClose&&n.onFormClose())}function _(){if(i){m();const g=i.el;g&&g.remove(),i=void 0}}function y(){o||p(),d()}return r?r.addEventListener("click",y):t&&(s=Lb({buttonLabel:n.buttonLabel,onClick:y}),s.el&&e.appendChild(s.el)),{get actor(){return s},get dialog(){return i},showActor:l,hideActor:d,removeActor:f,openDialog:p,closeDialog:m,removeDialog:_}}const Gn=gt.document,zb=e=>new Rn(e);class Rn{static __initStatic(){this.id="Feedback"}constructor({autoInject:t=!0,id:n="sentry-feedback",isEmailRequired:r=!1,isNameRequired:s=!1,showBranding:i=!0,showEmail:o=!0,showName:a=!0,useSentryUser:c={email:"email",name:"username"},themeDark:u,themeLight:l,colorScheme:d="system",buttonLabel:f=mb,cancelButtonLabel:p=gb,submitButtonLabel:m=_b,formTitle:_=yb,emailPlaceholder:y=Sb,emailLabel:g=bb,messagePlaceholder:S=Eb,messageLabel:E=vb,namePlaceholder:w=Tb,nameLabel:D=Ib,successMessageText:I=wb,onFormClose:v,onFormOpen:L,onSubmitError:z,onSubmitSuccess:b}={}){this.name=Rn.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:t,showBranding:i,id:n,isEmailRequired:r,isNameRequired:s,showEmail:o,showName:a,useSentryUser:c,colorScheme:d,themeDark:{...na.dark,...u},themeLight:{...na.light,...l},buttonLabel:f,cancelButtonLabel:p,submitButtonLabel:m,formTitle:_,emailLabel:g,emailPlaceholder:y,messageLabel:E,messagePlaceholder:S,nameLabel:D,namePlaceholder:w,successMessageText:I,onFormClose:v,onFormOpen:L,onSubmitError:z,onSubmitSuccess:b}}setupOnce(){if(ps())try{this._cleanupWidgetIfExists();const{autoInject:t}=this.options;if(!t)return;this._createWidget(this.options)}catch(t){rt&&h.error(t)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(t,n){try{const r=ra(this.options,n||{});return this._ensureShadowHost(r,({shadow:s})=>{const i=typeof t=="string"?Gn.querySelector(t):typeof t.addEventListener=="function"?t:null;if(!i)return rt&&h.error("[Feedback] Unable to attach to target element"),null;const o=oa({shadow:s,options:r,attachTo:i});return this._widgets.add(o),this._widget||(this._widget=o),o})}catch(r){return rt&&h.error(r),null}}createWidget(t){try{return this._createWidget(ra(this.options,t||{}))}catch(n){return rt&&h.error(n),null}}removeWidget(t){if(!t)return!1;try{if(this._widgets.has(t))return t.removeActor(),t.removeDialog(),this._widgets.delete(t),this._widget===t&&(this._widget=null),!0}catch(n){rt&&h.error(n)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();const t=Gn.querySelector(`#${this.options.id}`);t&&t.remove()}_createWidget(t){return this._ensureShadowHost(t,({shadow:n})=>{const r=oa({shadow:n,options:t});return!this._hasInsertedActorStyles&&r.actor&&(n.appendChild(Rb(Gn)),this._hasInsertedActorStyles=!0),this._widgets.add(r),this._widget||(this._widget=r),r})}_ensureShadowHost(t,n){let r=!1;if(!this._shadow||!this._host){const{id:i,colorScheme:o,themeLight:a,themeDark:c}=t,{shadow:u,host:l}=Mb({id:i,colorScheme:o,themeLight:a,themeDark:c});this._shadow=u,this._host=l,r=!0}this._host.dataset.sentryFeedbackColorscheme=t.colorScheme;const s=n({shadow:this._shadow,host:this._host});return r&&Gn.body.appendChild(this._host),s}}Rn.__initStatic();function gn(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Gb(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=gn(n);return s=>r.then(i=>s(i.transaction(t,"readwrite").objectStore(t)))}function Tl(e){return gn(e.getAllKeys())}function qb(e,t,n){return e(r=>Tl(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.max(...s,0)+1),gn(r.transaction)}))}function Yb(e){return e(t=>Tl(t).then(n=>{if(n.length!==0)return gn(t.get(n[0])).then(r=>(t.delete(n[0]),gn(t.transaction).then(()=>r)))}))}function Vb(e){let t;function n(){return t==null&&(t=Gb(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async r=>{try{const s=await $a(r,e.textEncoder);await qb(n(),s,e.maxQueueSize||30)}catch{}},pop:async()=>{try{const r=await Yb(n());if(r)return Bd(r,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch{}}}}function Kb(e){return t=>e({...t,createStore:Vb})}function Xb(e){return Kb(Cp(e))}const aa=1e6,Zn=String(0),Jb="main";let Il="",wl="",kl="",Ds=k.navigator&&k.navigator.userAgent||"",Cl="";const Zb=k.navigator&&k.navigator.language||k.navigator&&k.navigator.languages&&k.navigator.languages[0]||"";function Qb(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const ca=k.navigator&&k.navigator.userAgentData;Qb(ca)&&ca.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Il=e.platform||"",kl=e.architecture||"",Cl=e.model||"",wl=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){const t=e.fullVersionList[e.fullVersionList.length-1];Ds=`${t.brand} ${t.version}`}}).catch(e=>{});function eE(e){return!("thread_metadata"in e)}function tE(e){return eE(e)?sE(e):e}function nE(e){const t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t=="string"&&t.length!==32&&F&&h.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function rE(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const s=nE(r),i=tE(n),o=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Date.now()),a=typeof r.timestamp=="number"?r.timestamp*1e3:Date.now();return{event_id:e,timestamp:new Date(o).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||bn,runtime:{name:"javascript",version:k.navigator.userAgent},os:{name:Il,version:wl,build_number:Ds},device:{locale:Zb,model:Cl,manufacturer:Ds,architecture:kl,is_emulator:!1},debug_meta:{images:aE(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||U(),trace_id:s,active_thread_id:Zn,relative_start_ns:"0",relative_end_ns:((a-o)*1e6).toFixed(0)}]}}function Rl(e){return e.op==="pageload"}function sE(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Zn]:{name:Jb}}};if(!e.samples.length)return r;const s=e.samples[0].timestamp,i=typeof performance.timeOrigin=="number"?performance.timeOrigin:ce||0,o=i-(ce||i);for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((c.timestamp+o-s)*aa).toFixed(0),stack_id:t,thread_id:Zn};continue}let u=e.stacks[c.stackId];const l=[];for(;u;){l.push(u.frameId);const f=e.frames[u.frameId];r.frames[u.frameId]===void 0&&(r.frames[u.frameId]={function:f.name,abs_path:typeof f.resourceId=="number"?e.resources[f.resourceId]:void 0,lineno:f.line,colno:f.column}),u=u.parentId===void 0?void 0:e.stacks[u.parentId]}const d={elapsed_since_start_ns:((c.timestamp+o-s)*aa).toFixed(0),stack_id:n,thread_id:Zn};r.stacks[n]=l,r.samples[a]=d,n++}return r}function iE(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function oE(e){const t=[];return Dt(e,(n,r)=>{if(r==="transaction")for(let s=1;s<n.length;s++){const i=n[s];i&&i.contexts&&i.contexts.profile&&i.contexts.profile.profile_id&&t.push(n[s])}}),t}const ua=new WeakMap;function aE(e){const t=N._sentryDebugIds;if(!t)return[];const n=x(),r=n&&n.getOptions(),s=r&&r.stackParser;if(!s)return[];let i;const o=ua.get(s);o?i=o:(i=new Map,ua.set(s,i));const a=Object.keys(t).reduce((u,l)=>{let d;const f=i.get(l);f?d=f:(d=s(l),i.set(l,d));for(let p=d.length-1;p>=0;p--){const m=d[p],_=m&&m.filename;if(m&&_){u[_]=t[l];break}}return u},{}),c=[];for(const u of e)u&&a[u]&&c.push({type:"sourcemap",code_file:u,debug_id:a[u]});return c}function cE(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function uE(e){return e.samples.length<2?(F&&h.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(F&&h.log("[Profiling] Discarding profile because it contains no frames"),!1)}let xl=!1;const Al=3e4;function lE(e){return typeof e=="function"}function dE(){const e=k.Profiler;if(!lE(e)){F&&h.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(Al/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{F&&(h.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),h.log("[Profiling] Disabling profiling for current user session.")),xl=!0}}function Ls(e){if(xl)return F&&h.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return F&&h.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=x(),n=t&&t.getOptions();if(!n)return F&&h.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return cE(r)?r?(r===!0?!0:Math.random()<r)?!0:(F&&h.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(F&&h.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(F&&h.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function fE(e,t,n,r){return uE(n)?rE(e,t,n,r):null}const at=new Map;function pE(){return at.size}function hE(e){const t=at.get(e);return t&&at.delete(e),t}function mE(e,t){if(at.set(e,t),at.size>30){const n=at.keys().next().value;at.delete(n)}}function gE(e){return e?Ls(e)?Ps(e):e:(F&&h.log("[Profiling] Transaction is undefined, skipping profiling"),e)}function Ps(e){let t;Rl(e)&&(t=mt()*1e3);const n=dE();if(!n)return e;F&&h.log(`[Profiling] started profiling transaction: ${j(e).description}`);const r=U();async function s(){return!e||!n?null:n.stop().then(c=>(i&&(k.clearTimeout(i),i=void 0),F&&h.log(`[Profiling] stopped profiling of transaction: ${j(e).description}`),c?(mE(r,c),null):(F&&h.log(`[Profiling] profiler returned null profile for: ${j(e).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(c=>(F&&h.log("[Profiling] error while stopping profiler:",c),null))}let i=k.setTimeout(()=>{F&&h.log("[Profiling] max profile duration elapsed, stopping profiling for:",j(e).description),s()},Al);const o=e.end.bind(e);function a(){return e?(s().then(()=>{e.setContext("profile",{profile_id:r,start_timestamp:t}),o()},()=>{o()}),e):o()}return e.end=a,e}const Ml="BrowserProfiling",_E=()=>({name:Ml,setupOnce(){},setup(e){const n=se().getTransaction();if(n&&Rl(n)&&Ls(n)&&Ps(n),typeof e.on!="function"){h.warn("[Profiling] Client does not support hooks, profiling will be disabled");return}e.on("startTransaction",r=>{Ls(r)&&Ps(r)}),e.on("beforeEnvelope",r=>{if(!pE())return;const s=oE(r);if(!s.length)return;const i=[];for(const o of s){const a=o&&o.contexts,c=a&&a.profile&&a.profile.profile_id,u=a&&a.profile&&a.profile.start_timestamp;if(typeof c!="string"){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!c){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}a&&a.profile&&delete a.profile;const l=hE(c);if(!l){F&&h.log(`[Profiling] Could not retrieve profile for transaction: ${c}`);continue}const d=fE(c,u,l,o);d&&i.push(d)}iE(r,i)})}}),Ol=_E,yE=_e(Ml,Ol);let Nl={};k.Sentry&&k.Sentry.Integrations&&(Nl=k.Sentry.Integrations);const SE={...Nl,..._h,...xg},TE=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumbs:uu,BrowserClient:Qc,BrowserProfilingIntegration:yE,BrowserTracing:um,Dedupe:du,Feedback:Rn,FunctionToString:kc,GlobalHandlers:mu,HttpContext:Su,Hub:ei,InboundFilters:Ic,Integrations:SE,LinkedErrors:Eu,ModuleMetadata:jp,Replay:Cn,ReplayCanvas:hb,SDK_VERSION:nr,SEMANTIC_ATTRIBUTE_SENTRY_OP:en,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:it,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:st,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:ge,Scope:Oe,TryCatch:Tu,WINDOW:k,addBreadcrumb:He,addEventProcessor:_c,addGlobalEventProcessor:ja,addIntegration:sp,addTracingExtensions:si,breadcrumbsIntegration:mi,browserApiErrorsIntegration:_i,browserProfilingIntegration:Ol,browserTracingIntegration:hm,captureEvent:Zs,captureException:br,captureMessage:cf,captureSession:ys,captureUserFeedback:Rg,chromeStackLineParser:nu,close:Sf,configureScope:uf,continueTrace:Bf,createTransport:oi,createUserFeedbackEnvelope:Zc,dedupeIntegration:Mr,defaultIntegrations:Iu,defaultRequestInstrumentationOptions:dn,defaultStackLineParsers:iu,defaultStackParser:ou,endSession:Qs,eventFromException:Xc,eventFromMessage:Jc,exceptionFromError:fi,extractTraceparentData:Of,feedbackIntegration:zb,flush:yf,forceLoad:Ig,functionToStringIntegration:ci,geckoStackLineParser:ru,getActiveSpan:En,getActiveTransaction:Ne,getClient:x,getCurrentHub:W,getCurrentScope:se,getDefaultIntegrations:wu,getHubFromCarrier:rr,getReplay:eb,getSpanStatusFromHttpCode:ti,globalHandlersIntegration:gi,httpContextIntegration:Or,inboundFiltersIntegration:ai,init:ku,instrumentOutgoingRequests:di,isInitialized:Ef,lastEventId:bf,linkedErrorsIntegration:Nr,makeBrowserOfflineTransport:Xb,makeFetchTransport:eu,makeMain:Ss,makeMultiplexedTransport:xp,makeXHRTransport:tu,metrics:gh,moduleMetadataIntegration:vc,onLoad:wg,onProfilingStartRouteTransaction:gE,opera10StackLineParser:qm,opera11StackLineParser:Km,parameterize:Pp,replayCanvasIntegration:yl,replayIntegration:ZS,sendFeedback:El,setContext:Ya,setCurrentClient:yc,setExtra:df,setExtras:lf,setHttpStatus:Tr,setMeasurement:oc,setTag:pf,setTags:ff,setUser:hf,showReportDialog:Tg,spanStatusfromHttpCode:Df,startBrowserTracingNavigationSpan:Vc,startBrowserTracingPageLoadSpan:Yc,startInactiveSpan:ri,startSession:_s,startSpan:Ff,startSpanManual:$f,startTransaction:_f,trace:Pf,winjsStackLineParser:su,withActiveSpan:gf,withIsolationScope:mf,withScope:zt,wrap:kg},Symbol.toStringTag,{value:"Module"})),bE=[Or(),Mr(),Nr()],EE={dsn:"https://00ac97c9c43a4be0a3aa80cf71bb641b@o4505442019966976.ingest.sentry.io/4505442034974720",release:"genius@18.03.2024, 12:59",defaultIntegrations:!1,integrations:bE,tracesSampleRate:1};ku(EE);export{TE as default};