/*! @sentry/browser (Performance Monitoring and Replay) 8.33.1 (606cc3a) | https://github.com/getsentry/sentry-javascript */ var Sentry=function(t){t=window.Sentry||{};const e=Object.prototype.toString;function n(t){switch(e.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return h(t,Error)}}function r(t,n){return e.call(t)===`[object ${n}]`}function s(t){return r(t,"ErrorEvent")}function i(t){return r(t,"DOMError")}function o(t){return r(t,"String")}function c(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function a(t){return null===t||c(t)||"object"!=typeof t&&"function"!=typeof t}function u(t){return r(t,"Object")}function l(t){return"undefined"!=typeof Event&&h(t,Event)}function f(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function h(t,e){try{return t instanceof e}catch(t){return!1}}function d(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.t)}function p(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function m(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;ey(t,e,n)))}function v(t,e,n=250,r,s,i,o){if(!(i.exception&&i.exception.values&&o&&h(o.originalException,Error)))return;const c=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var a,u;c&&(i.exception.values=(a=b(t,e,s,o.originalException,r,i.exception.values,c,0),u=n,a.map((t=>(t.value&&(t.value=p(t.value,u)),t)))))}function b(t,e,n,r,s,i,o,c){if(i.length>=n+1)return i;let a=[...i];if(h(r[s],Error)){w(o,c);const i=t(e,r[s]),u=a.length;k(i,s,u,c),a=b(t,e,n,r[s],s,[i,...a],i,u)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(h(r,Error)){w(o,c);const u=t(e,r),l=a.length;k(u,`errors[${i}]`,l,c),a=b(t,e,n,r,s,[u,...a],u,l)}})),a}function w(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,..."AggregateError"===t.type&&{is_exception_group:!0},exception_id:e}}function k(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function S(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const _="8.33.1",T=globalThis;function I(t,e,n){const r=n||T,s=r.__SENTRY__=r.__SENTRY__||{},i=s[_]=s[_]||{};return i[t]||(i[t]=e())}const x=T,C=80;function E(t,e={}){if(!t)return"";try{let n=t;const r=5,s=[];let i=0,o=0;const c=" > ",a=c.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,f=!Array.isArray(e)&&e.maxStringLength||C;for(;n&&i++1&&o+s.length*a+u.length>=f));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(c)}catch(t){return""}}function A(t,e){const n=t,r=[];if(!n||!n.tagName)return"";if(x.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(s&&s.length)s.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const t=n.className;if(t&&o(t)){const e=t.split(/\s+/);for(const t of e)r.push(`.${t}`)}}const i=["aria-label","type","name","title","alt"];for(const t of i){const e=n.getAttribute(t);e&&r.push(`[${t}="${e}"]`)}return r.join("")}function R(){try{return x.document.location.href}catch(t){return""}}function M(t){if(!x.HTMLElement)return null;let e=t;for(let t=0;t<5;t++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}const O=["debug","info","warn","error","log","assert","trace"],$={};function D(t){if(!("console"in T))return t();const e=T.console,n={},r=Object.keys($);r.forEach((t=>{const r=$[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const L=I("logger",(function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return O.forEach((t=>{e[t]=()=>{}})),e})),F=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function j(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:c,publicKey:a}=t;return`${c}://${a}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${o}`}function N(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function P(t){const e="string"==typeof t?function(t){const e=F.exec(t);if(!e)return void D((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));const[n,r,s="",i="",o="",c=""]=e.slice(1);let a="",u=c;const l=u.split("/");if(l.length>1&&(a=l.slice(0,-1).join("/"),u=l.pop()),u){const t=u.match(/^\d+/);t&&(u=t[0])}return N({host:i,pass:s,path:a,projectId:u,port:o,protocol:n,publicKey:r})}(t):N(t);if(e)return e}class B extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}function U(t,e,n){if(!(e in t))return;const r=t[e],s=n(r);"function"==typeof s&&q(s,r),t[e]=s}function z(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(t){}}function q(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,z(t,"__sentry_original__",e)}catch(t){}}function H(t){return t.__sentry_original__}function W(t){if(n(t))return{message:t.message,name:t.name,stack:t.stack,...K(t)};if(l(t)){const e={type:t.type,target:J(t.target),currentTarget:J(t.currentTarget),...K(t)};return"undefined"!=typeof CustomEvent&&h(t,CustomEvent)&&(e.detail=t.detail),e}return t}function J(t){try{return e=t,"undefined"!=typeof Element&&h(e,Element)?E(t):Object.prototype.toString.call(t)}catch(t){return""}var e}function K(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function G(t){return X(t,new Map)}function X(t,e){if(function(t){if(!u(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.getOwnPropertyNames(t))void 0!==t[n]&&(r[n]=X(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(X(t,e))})),r}return t}const Y=50,V="?",Q=/\(error: (.*)\)/,Z=/captureMessage|captureException/;function tt(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0,r=0)=>{const s=[],i=t.split("\n");for(let t=n;t1024)continue;const o=Q.test(n)?n.replace(Q,"$1"):n;if(!o.match(/\S*Error: /)){for(const t of e){const e=t(o);if(e){s.push(e);break}}if(s.length>=Y+r)break}}return function(t){if(!t.length)return[];const e=Array.from(t);/sentryWrapped/.test(et(e).function||"")&&e.pop();e.reverse(),Z.test(et(e).function||"")&&(e.pop(),Z.test(et(e).function||"")&&e.pop());return e.slice(0,Y).map((t=>({...t,filename:t.filename||et(e).filename,function:t.function||V})))}(s.slice(r))}}function et(t){return t[t.length-1]||{}}const nt="";function rt(t){try{return t&&"function"==typeof t&&t.name||nt}catch(t){return nt}}function st(t){const e=t.exception;if(e){const t=[];try{return e.values.forEach((e=>{e.stacktrace.frames&&t.push(...e.stacktrace.frames)})),t}catch(t){return}}}const it={},ot={};function ct(t,e){it[t]=it[t]||[],it[t].push(e)}function at(t,e){ot[t]||(e(),ot[t]=!0)}function ut(t,e){const n=t&&it[t];if(n)for(const t of n)try{t(e)}catch(t){}}function lt(){"console"in T&&O.forEach((function(t){t in T.console&&U(T.console,t,(function(e){return $[t]=e,function(...e){ut("console",{args:e,level:t});const n=$[t];n&&n.apply(T.console,e)}}))}))}const ft=T;function ht(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function dt(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in ft))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}())return!1;if(ht(ft.fetch))return!0;let t=!1;const e=ft.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=ht(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){}return t}const pt=1e3;function mt(){return Date.now()/pt}const yt=function(){const{performance:t}=T;if(!t||!t.now)return mt;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/pt}(),gt=(()=>{const{performance:t}=T;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=sbt(void 0,e)))}function bt(t,e=!1){e&&!dt()||U(T,"fetch",(function(e){return function(...r){const{method:s,url:i}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:St(e),method:kt(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:St(e),method:kt(e,"method")?String(e.method).toUpperCase():"GET"}}(r),o={args:r,fetchData:{method:s,url:i},startTimestamp:1e3*yt()};t||ut("fetch",{...o});const c=(new Error).stack;return e.apply(T,r).then((async e=>(t?t(e):ut("fetch",{...o,endTimestamp:1e3*yt(),response:e}),e)),(t=>{throw ut("fetch",{...o,endTimestamp:1e3*yt(),error:t}),n(t)&&void 0===t.stack&&(t.stack=c,z(t,"framesToPop",1)),t}))}}))}function wt(t){let e;try{e=t.clone()}catch(t){return}!async function(t,e){if(t&&t.body){const n=t.body,r=n.getReader(),s=setTimeout((()=>{n.cancel().then(null,(()=>{}))}),9e4);let i=!0;for(;i;){let t;try{t=setTimeout((()=>{n.cancel().then(null,(()=>{}))}),5e3);const{done:s}=await r.read();clearTimeout(t),s&&(e(),i=!1)}catch(t){i=!1}finally{clearTimeout(t)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,(()=>{}))}}(e,(()=>{ut("fetch-body-resolved",{endTimestamp:1e3*yt(),response:t})}))}function kt(t,e){return!!t&&"object"==typeof t&&!!t[e]}function St(t){return"string"==typeof t?t:t?kt(t,"url")?t.url:t.toString?t.toString():"":""}let _t=null;function Tt(t){const e="error";ct(e,t),at(e,It)}function It(){_t=T.onerror,T.onerror=function(t,e,n,r,s){return ut("error",{column:r,error:s,line:n,msg:t,url:e}),!(!_t||_t.__SENTRY_LOADER__)&&_t.apply(this,arguments)},T.onerror.__SENTRY_INSTRUMENTED__=!0}let xt=null;function Ct(t){const e="unhandledrejection";ct(e,t),at(e,Et)}function Et(){xt=T.onunhandledrejection,T.onunhandledrejection=function(t){return ut("unhandledrejection",t),!(xt&&!xt.__SENTRY_LOADER__)||xt.apply(this,arguments)},T.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function At(){return"undefined"!=typeof window&&!0}function Rt(){const t=T,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function Mt(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ot(t){const{message:e,event_id:n}=t;if(e)return e;const r=Mt(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function $t(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function Dt(t,e){const n=Mt(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function Lt(t){if(t&&t.__sentry_captured__)return!0;try{z(t,"__sentry_captured__",!0)}catch(t){}return!1}function Ft(t){return Array.isArray(t)?t:[t]}function jt(t,e=100,n=1/0){try{return Pt("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Nt(t,e=3,n=102400){const r=jt(t,e);return s=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(s))>n?Nt(t,e-1,n):r;var s}function Pt(t,e,n=1/0,r=1/0,s=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t=r){f[t]="[MaxProperties ~]";break}const e=p[t];f[t]=Pt(t,e,a-1,r,s),h++}return o(e),f}var Bt;function Ut(t){return new qt((e=>{e(t)}))}function zt(t){return new qt(((e,n)=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Bt||(Bt={}));class qt{constructor(t){qt.prototype.__init.call(this),qt.prototype.__init2.call(this),qt.prototype.__init3.call(this),qt.prototype.__init4.call(this),this.o=Bt.PENDING,this.u=[];try{t(this.l,this.h)}catch(t){this.h(t)}}then(t,e){return new qt(((n,r)=>{this.u.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.p()}))}catch(t){return this.then((t=>t),t)}finally(t){return new qt(((e,n)=>{let r,s;return this.then((e=>{s=!1,r=e,t&&t()}),(e=>{s=!0,r=e,t&&t()})).then((()=>{s?n(r):e(r)}))}))}__init(){this.l=t=>{this.m(Bt.RESOLVED,t)}}__init2(){this.h=t=>{this.m(Bt.REJECTED,t)}}__init3(){this.m=(t,e)=>{this.o===Bt.PENDING&&(f(e)?e.then(this.l,this.h):(this.o=t,this.v=e,this.p()))}}__init4(){this.p=()=>{if(this.o===Bt.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.o===Bt.RESOLVED&&t[1](this.v),this.o===Bt.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function Ht(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:e,add:function(r){if(!(void 0===t||e.lengthn(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(t){return new qt(((n,r)=>{let s=e.length;if(!s)return n(!0);const i=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{Ut(t).then((()=>{--s||(clearTimeout(i),n(!0))}),r)}))}))}}}function Wt(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}const Jt=["fatal","error","warning","log","info","debug"];function Kt(t){return"warn"===t?"warning":Jt.includes(t)?t:"log"}const Gt="baggage",Xt="sentry-",Yt=/^sentry-/,Vt=8192;function Qt(t){const e=function(t){if(!t||!o(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,e)=>{const n=te(e);return Object.entries(n).forEach((([e,n])=>{t[e]=n})),t}),{});return te(t)}(t);if(!e)return;const n=Object.entries(e).reduce(((t,[e,n])=>{if(e.match(Yt)){t[e.slice(Xt.length)]=n}return t}),{});return Object.keys(n).length>0?n:void 0}function Zt(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce(((t,[e,n],r)=>{const s=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,i=0===r?s:`${t},${s}`;return i.length>Vt?t:i}),"")}(Object.entries(t).reduce(((t,[e,n])=>(n&&(t[`${Xt}${e}`]=n),t)),{}))}function te(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[e,n])=>(e&&n&&(t[e]=n),t)),{})}const ee=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ne(t,e){const n=function(t){if(!t)return;const e=t.match(ee);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),r=Qt(e),{traceId:s,parentSpanId:i,parentSampled:o}=n||{};return n?{traceId:s||Rt(),parentSpanId:i||Rt().substring(16),spanId:Rt().substring(16),sampled:o,dsc:r||{}}:{traceId:s||Rt(),spanId:Rt().substring(16)}}function re(t=Rt(),e=Rt().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function se(t,e=[]){return[t,e]}function ie(t,e){const[n,r]=t;return[n,[...r,e]]}function oe(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function ce(t){return T.__SENTRY__&&T.__SENTRY__.encodePolyfill?T.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function ae(t){const[e,n]=t;let r=JSON.stringify(e);function s(t){"string"==typeof r?r="string"==typeof t?r+t:[ce(r),t]:r.push("string"==typeof t?ce(t):t)}for(const t of n){const[e,n]=t;if(s(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(jt(n))}s(t)}}return"string"==typeof r?r:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(r)}function ue(t){return[{type:"span"},t]}function le(t){const e="string"==typeof t.data?ce(t.data):t.data;return[G({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const fe={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function he(t){return fe[t]}function de(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function pe(t,e,n,r){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:j(r)},...s&&{trace:G({...s})}}}const me=6e4;function ye(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}function ge(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const t of i.trim().split(",")){const[e,n,,,i]=t.split(":",5),o=parseInt(e,10),c=1e3*(isNaN(o)?60:o);if(n)for(const t of n.split(";"))"metric_bucket"===t&&i&&!i.split(";").includes("custom")||(s[t]=r+c);else s.all=r+c}else o?s.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?me:r-e}(o,r):429===e&&(s.all=r+6e4);return s}function ve(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}function be(){return{traceId:Rt(),spanId:Rt().substring(16)}}const we=T;function ke(){return Se(T),T}function Se(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||_,e[_]=e[_]||{}}function _e(t){const e=yt(),n={sid:Rt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return G({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&Te(n,t),n}function Te(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||yt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:Rt()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}const Ie="_sentrySpan";function xe(t,e){e?z(t,Ie,e):delete t[Ie]}function Ce(t){return t[Ie]}class Ee{constructor(){this.k=!1,this.S=[],this._=[],this.T=[],this.I=[],this.C={},this.A={},this.R={},this.M={},this.O={},this.D=be()}clone(){const t=new Ee;return t.T=[...this.T],t.A={...this.A},t.R={...this.R},t.M={...this.M},t.C=this.C,t.L=this.L,t.F=this.F,t.j=this.j,t.N=this.N,t._=[...this._],t.P=this.P,t.I=[...this.I],t.O={...this.O},t.D={...this.D},t.B=this.B,t.U=this.U,xe(t,Ce(this)),t}setClient(t){this.B=t}setLastEventId(t){this.U=t}getClient(){return this.B}lastEventId(){return this.U}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this._.push(t),this}setUser(t){return this.C=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.F&&Te(this.F,{user:t}),this.q(),this}getUser(){return this.C}getRequestSession(){return this.P}setRequestSession(t){return this.P=t,this}setTags(t){return this.A={...this.A,...t},this.q(),this}setTag(t,e){return this.A={...this.A,[t]:e},this.q(),this}setExtras(t){return this.R={...this.R,...t},this.q(),this}setExtra(t,e){return this.R={...this.R,[t]:e},this.q(),this}setFingerprint(t){return this.N=t,this.q(),this}setLevel(t){return this.L=t,this.q(),this}setTransactionName(t){return this.j=t,this.q(),this}setContext(t,e){return null===e?delete this.M[t]:this.M[t]=e,this.q(),this}setSession(t){return t?this.F=t:delete this.F,this.q(),this}getSession(){return this.F}update(t){if(!t)return this;const e="function"==typeof t?t(this):t,[n,r]=e instanceof Ae?[e.getScopeData(),e.getRequestSession()]:u(e)?[t,t.requestSession]:[],{tags:s,extra:i,user:o,contexts:c,level:a,fingerprint:l=[],propagationContext:f}=n||{};return this.A={...this.A,...s},this.R={...this.R,...i},this.M={...this.M,...c},o&&Object.keys(o).length&&(this.C=o),a&&(this.L=a),l.length&&(this.N=l),f&&(this.D=f),r&&(this.P=r),this}clear(){return this.T=[],this.A={},this.R={},this.C={},this.M={},this.L=void 0,this.j=void 0,this.N=void 0,this.P=void 0,this.F=void 0,xe(this,void 0),this.I=[],this.D=be(),this.q(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:mt(),...t},s=this.T;return s.push(r),this.T=s.length>n?s.slice(-n):s,this.q(),this}getLastBreadcrumb(){return this.T[this.T.length-1]}clearBreadcrumbs(){return this.T=[],this.q(),this}addAttachment(t){return this.I.push(t),this}clearAttachments(){return this.I=[],this}getScopeData(){return{breadcrumbs:this.T,attachments:this.I,contexts:this.M,tags:this.A,extra:this.R,user:this.C,level:this.L,fingerprint:this.N||[],eventProcessors:this._,propagationContext:this.D,sdkProcessingMetadata:this.O,transactionName:this.j,span:Ce(this)}}setSDKProcessingMetadata(t){return this.O={...this.O,...t},this}setPropagationContext(t){return this.D=t,this}getPropagationContext(){return this.D}captureException(t,e){const n=e&&e.event_id?e.event_id:Rt();if(!this.B)return L.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this.B.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:Rt();if(!this.B)return L.warn("No client configured on scope - will not capture message!"),r;const s=new Error(t);return this.B.captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:Rt();return this.B?(this.B.captureEvent(t,{...e,event_id:n},this),n):(L.warn("No client configured on scope - will not capture event!"),n)}q(){this.k||(this.k=!0,this.S.forEach((t=>{t(this)})),this.k=!1)}}const Ae=Ee;class Re{constructor(t,e){let n,r;n=t||new Ae,r=e||new Ae,this.H=[{scope:n}],this.W=r}withScope(t){const e=this.J();let n;try{n=t(e)}catch(t){throw this.K(),t}return f(n)?n.then((t=>(this.K(),t)),(t=>{throw this.K(),t})):(this.K(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.W}getStackTop(){return this.H[this.H.length-1]}J(){const t=this.getScope().clone();return this.H.push({client:this.getClient(),scope:t}),t}K(){return!(this.H.length<=1)&&!!this.H.pop()}}function Me(){const t=Se(ke());return t.stack=t.stack||new Re(I("defaultCurrentScope",(()=>new Ae)),I("defaultIsolationScope",(()=>new Ae)))}function Oe(t){return Me().withScope(t)}function $e(t,e){const n=Me();return n.withScope((()=>(n.getStackTop().scope=t,e(t))))}function De(t){return Me().withScope((()=>t(Me().getIsolationScope())))}function Le(t){const e=Se(t);return e.acs?e.acs:{withIsolationScope:De,withScope:Oe,withSetScope:$e,withSetIsolationScope:(t,e)=>De(e),getCurrentScope:()=>Me().getScope(),getIsolationScope:()=>Me().getIsolationScope()}}function Fe(){return Le(ke()).getCurrentScope()}function je(){return Le(ke()).getIsolationScope()}function Ne(){return I("globalScope",(()=>new Ae))}function Pe(...t){const e=Le(ke());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}function Be(){return Fe().getClient()}const Ue="_sentryMetrics";function ze(t){const e=t[Ue];if(!e)return;const n={};for(const[,[t,r]]of e){(n[t]||(n[t]=[])).push(G(r))}return n}const qe="sentry.source",He="sentry.sample_rate",We="sentry.op",Je="sentry.origin",Ke="sentry.idle_span_finish_reason",Ge="sentry.measurement_unit",Xe="sentry.measurement_value",Ye="sentry.exclusive_time",Ve=0,Qe=1,Ze=2;function tn(t,e){t.setAttribute("http.response.status_code",e);const n=function(t){if(t<400&&t>=100)return{code:Qe};if(t>=400&&t<500)switch(t){case 401:return{code:Ze,message:"unauthenticated"};case 403:return{code:Ze,message:"permission_denied"};case 404:return{code:Ze,message:"not_found"};case 409:return{code:Ze,message:"already_exists"};case 413:return{code:Ze,message:"failed_precondition"};case 429:return{code:Ze,message:"resource_exhausted"};case 499:return{code:Ze,message:"cancelled"};default:return{code:Ze,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:Ze,message:"unimplemented"};case 503:return{code:Ze,message:"unavailable"};case 504:return{code:Ze,message:"deadline_exceeded"};default:return{code:Ze,message:"internal_error"}}return{code:Ze,message:"unknown_error"}}(e);"unknown_error"!==n.message&&t.setStatus(n)}const en=1;function nn(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:c}=an(t);return G({parent_span_id:i,span_id:e,trace_id:n,data:r,op:s,status:o,origin:c})}function rn(t){const{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=an(t);return G({parent_span_id:r,span_id:e,trace_id:n})}function sn(t){const{traceId:e,spanId:n}=t.spanContext();return re(e,n,un(t))}function on(t){return"number"==typeof t?cn(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?cn(t.getTime()):yt()}function cn(t){return t>9999999999?t/1e3:t}function an(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:e,traceId:n}=t.spanContext();if(function(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(t)){const{attributes:r,startTime:s,name:i,endTime:o,parentSpanId:c,status:a}=t;return G({span_id:e,trace_id:n,data:r,description:i,parent_span_id:c,start_timestamp:on(s),timestamp:on(o)||void 0,status:ln(a),op:r[We],origin:r[Je],_metrics_summary:ze(t)})}return{span_id:e,trace_id:n}}catch(t){return{}}}function un(t){const{traceFlags:e}=t.spanContext();return e===en}function ln(t){if(t&&t.code!==Ve)return t.code===Qe?"ok":t.message||"unknown_error"}const fn="_sentryChildSpans",hn="_sentryRootSpan";function dn(t,e){const n=t[hn]||t;z(e,hn,n),t[fn]?t[fn].add(e):z(t,fn,new Set([e]))}function pn(t){const e=new Set;return function t(n){if(!e.has(n)&&un(n)){e.add(n);const r=n[fn]?Array.from(n[fn]):[];for(const e of r)t(e)}}(t),Array.from(e)}function mn(t){return t[hn]||t}function yn(){const t=Le(ke());return t.getActiveSpan?t.getActiveSpan():Ce(Fe())}function gn(t,e,n,r,s,i){const o=yn();o&&function(t,e,n,r,s,i,o){const c=t[Ue]||(t[Ue]=new Map),a=`${e}:${n}@${s}`,u=c.get(o);if(u){const[,t]=u;c.set(o,[a,{min:Math.min(t.min,r),max:Math.max(t.max,r),count:t.count+=1,sum:t.sum+=r,tags:t.tags}])}else c.set(o,[a,{min:r,max:r,count:1,sum:r,tags:i}])}(o,t,e,n,r,s,i)}let vn=!1;function bn(){vn||(vn=!0,Tt(wn),Ct(wn))}function wn(){const t=yn(),e=t&&mn(t);if(e){const t="internal_error";e.setStatus({code:Ze,message:t})}}wn.tag="sentry_tracingErrorCallback";const kn="_sentryScope",Sn="_sentryIsolationScope";function _n(t){return{scope:t[kn],isolationScope:t[Sn]}}function Tn(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=Be(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class In{constructor(t={}){this.G=t.traceId||Rt(),this.X=t.spanId||Rt().substring(16)}spanContext(){return{spanId:this.X,traceId:this.G,traceFlags:0}}end(t){}setAttribute(t,e){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}}function xn(t,e,n=(()=>{})){let r;try{r=t()}catch(t){throw e(t),n(),t}return function(t,e,n){if(f(t))return t.then((t=>(n(),t)),(t=>{throw e(t),n(),t}));return n(),t}(r,e,n)}const Cn="production",En="_frozenDsc";function An(t,e){z(t,En,e)}function Rn(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s=G({environment:n.environment||Cn,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",s),s}function Mn(t){const e=Be();if(!e)return{};const n=Rn(an(t).trace_id||"",e),r=mn(t),s=r[En];if(s)return s;const i=r.spanContext().traceState,o=i&&i.get("sentry.dsc"),c=o&&Qt(o);if(c)return c;const a=an(r),u=a.data||{},l=u[He];null!=l&&(n.sample_rate=`${l}`);const f=u[qe],h=a.description;return"url"!==f&&h&&(n.transaction=h),Tn()&&(n.sampled=String(un(r))),e.emit("createDsc",n,r),n}function On(t){if("boolean"==typeof t)return Number(t);const e="string"==typeof t?parseFloat(t):t;return"number"!=typeof e||isNaN(e)||e<0||e>1?void 0:e}function $n(t,e,n,r=yn()){const s=r&&mn(r);s&&s.addEvent(t,{[Xe]:e,[Ge]:n})}function Dn(t){if(!t||0===t.length)return;const e={};return t.forEach((t=>{const n=t.attributes||{},r=n[Ge],s=n[Xe];"string"==typeof r&&"number"==typeof s&&(e[t.name]={value:s,unit:r})})),e}class Ln{constructor(t={}){this.G=t.traceId||Rt(),this.X=t.spanId||Rt().substring(16),this.Y=t.startTimestamp||yt(),this.V={},this.setAttributes({[Je]:"manual",[We]:t.op,...t.attributes}),this.Z=t.name,t.parentSpanId&&(this.tt=t.parentSpanId),"sampled"in t&&(this.et=t.sampled),t.endTimestamp&&(this.nt=t.endTimestamp),this.i=[],this.rt=t.isStandalone,this.nt&&this.st()}addLink(t){return this}addLinks(t){return this}recordException(t,e){}spanContext(){const{X:t,G:e,et:n}=this;return{spanId:t,traceId:e,traceFlags:n?en:0}}setAttribute(t,e){return void 0===e?delete this.V[t]:this.V[t]=e,this}setAttributes(t){return Object.keys(t).forEach((e=>this.setAttribute(e,t[e]))),this}updateStartTime(t){this.Y=on(t)}setStatus(t){return this.it=t,this}updateName(t){return this.Z=t,this}end(t){this.nt||(this.nt=on(t),this.st())}getSpanJSON(){return G({data:this.V,description:this.Z,op:this.V[We],parent_span_id:this.tt,span_id:this.X,start_timestamp:this.Y,status:ln(this.it),timestamp:this.nt,trace_id:this.G,origin:this.V[Je],_metrics_summary:ze(this),profile_id:this.V["sentry.profile_id"],exclusive_time:this.V[Ye],measurements:Dn(this.i),is_segment:this.rt&&mn(this)===this||void 0,segment_id:this.rt?mn(this).spanContext().spanId:void 0})}isRecording(){return!this.nt&&!!this.et}addEvent(t,e,n){const r=Fn(e)?e:n||yt(),s=Fn(e)?{}:e||{},i={name:t,time:on(r),attributes:s};return this.i.push(i),this}isStandaloneSpan(){return!!this.rt}st(){const t=Be();t&&t.emit("spanEnd",this);if(!(this.rt||this===mn(this)))return;if(this.rt)return void(this.et?function(t){const e=Be();if(!e)return;const n=t[1];if(!n||0===n.length)return void e.recordDroppedEvent("before_send","span");const r=e.getTransport();r&&r.send(t).then(null,(t=>{}))}(function(t,e){const n=Mn(t[0]),r=e&&e.getDsn(),s=e&&e.getOptions().tunnel,i={sent_at:(new Date).toISOString(),...function(t){return!!t.trace_id&&!!t.public_key}(n)&&{trace:n},...!!s&&r&&{dsn:j(r)}},o=e&&e.getOptions().beforeSendSpan,c=o?t=>o(an(t)):t=>an(t),a=[];for(const e of t){const t=c(e);t&&a.push(ue(t))}return se(i,a)}([this],t)):t&&t.recordDroppedEvent("sample_rate","span"));const e=this.ot();if(e){(_n(this).scope||Fe()).captureEvent(e)}}ot(){if(!jn(an(this)))return;this.Z||(this.Z="");const{scope:t,isolationScope:e}=_n(this),n=(t||Fe()).getClient()||Be();if(!0!==this.et)return void(n&&n.recordDroppedEvent("sample_rate","transaction"));const r=pn(this).filter((t=>t!==this&&!function(t){return t instanceof Ln&&t.isStandaloneSpan()}(t))).map((t=>an(t))).filter(jn),s=this.V[qe],i={contexts:{trace:nn(this)},spans:r.length>1e3?r.sort(((t,e)=>t.start_timestamp-e.start_timestamp)).slice(0,1e3):r,start_timestamp:this.Y,timestamp:this.nt,transaction:this.Z,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:e,...G({dynamicSamplingContext:Mn(this)})},_metrics_summary:ze(this),...s&&{transaction_info:{source:s}}},o=Dn(this.i);return o&&Object.keys(o).length&&(i.measurements=o),i}}function Fn(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function jn(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}const Nn="__SENTRY_SUPPRESS_TRACING__";function Pn(t,e){const n=Hn();if(n.startSpanManual)return n.startSpanManual(t,e);const r=qn(t),{forceTransaction:s,parentSpan:i}=t;return Pe(t.scope,(()=>Kn(i)((()=>{const n=Fe(),i=Jn(n),o=t.onlyIfParent&&!i?new In:zn({parentSpan:i,spanArguments:r,forceTransaction:s,scope:n});function c(){o.end()}return xe(n,o),xn((()=>e(o,c)),(()=>{const{status:t}=an(o);!o.isRecording()||t&&"ok"!==t||o.setStatus({code:Ze,message:"internal_error"})}))}))))}function Bn(t){const e=Hn();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=qn(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?e=>Pe(t.scope,e):void 0!==s?t=>Un(s,t):t=>t())((()=>{const e=Fe(),s=Jn(e);return t.onlyIfParent&&!s?new In:zn({parentSpan:s,spanArguments:n,forceTransaction:r,scope:e})}))}function Un(t,e){const n=Hn();return n.withActiveSpan?n.withActiveSpan(t,e):Pe((n=>(xe(n,t||void 0),e(n))))}function zn({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Tn())return new In;const s=je();let i;if(t&&!n)i=function(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),i=!e.getScopeData().sdkProcessingMetadata[Nn]&&un(t),o=i?new Ln({...n,parentSpanId:r,traceId:s,sampled:i}):new In({traceId:s});dn(t,o);const c=Be();c&&(c.emit("spanStart",o),n.endTimestamp&&c.emit("spanEnd",o));return o}(t,r,e),dn(t,i);else if(t){const n=Mn(t),{traceId:s,spanId:o}=t.spanContext(),c=un(t);i=Wn({traceId:s,parentSpanId:o,...e},r,c),An(i,n)}else{const{traceId:t,dsc:n,parentSpanId:o,sampled:c}={...s.getPropagationContext(),...r.getPropagationContext()};i=Wn({traceId:t,parentSpanId:o,...e},r,c),n&&An(i,n)}return function(t,e,n){t&&(z(t,Sn,n),z(t,kn,e))}(i,r,s),i}function qn(t){const e={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const n={...e};return n.startTimestamp=on(t.startTime),delete n.startTime,n}return e}function Hn(){return Le(ke())}function Wn(t,e,n){const r=Be(),s=r&&r.getOptions()||{},{name:i="",attributes:o}=t,[c,a]=e.getScopeData().sdkProcessingMetadata[Nn]?[!1]:function(t,e){if(!Tn(t))return[!1];let n;n="function"==typeof t.tracesSampler?t.tracesSampler(e):void 0!==e.parentSampled?e.parentSampled:void 0!==t.tracesSampleRate?t.tracesSampleRate:1;const r=On(n);return void 0===r?[!1]:r&&Math.random()Un(t,e):t=>t()}const Gn={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Xn="heartbeatFailed",Yn="idleTimeout",Vn="finalTimeout",Qn="externalFinish";function Zn(t,e={}){const n=new Map;let r,s=!1,i=Qn,o=!e.disableAutoFinish;const c=[],{idleTimeout:a=Gn.idleTimeout,finalTimeout:u=Gn.finalTimeout,childSpanTimeout:l=Gn.childSpanTimeout,beforeSpanEnd:f}=e,h=Be();if(!h||!Tn())return new In;const d=Fe(),p=yn(),m=function(t){const e=Bn(t);return xe(Fe(),e),e}(t);function y(){r&&(clearTimeout(r),r=void 0)}function g(t){y(),r=setTimeout((()=>{!s&&0===n.size&&o&&(i=Yn,m.end(t))}),a)}function v(t){r=setTimeout((()=>{!s&&o&&(i=Xn,m.end(t))}),l)}function b(t){s=!0,n.clear(),c.forEach((t=>t())),xe(d,p);const e=an(m),{start_timestamp:r}=e;if(!r)return;(e.data||{})[Ke]||m.setAttribute(Ke,i),L.log(`[Tracing] Idle span "${e.op}" finished`);const o=pn(m).filter((t=>t!==m));let l=0;o.forEach((e=>{e.isRecording()&&(e.setStatus({code:Ze,message:"cancelled"}),e.end(t));const n=an(e),{timestamp:r=0,start_timestamp:s=0}=n;r-s<=(u+a)/1e3&&s<=t||(!function(t,e){t[fn]&&t[fn].delete(e)}(m,e),l++)})),l>0&&m.setAttribute("sentry.idle_span_discarded_spans",l)}return m.end=new Proxy(m.end,{apply(t,e,n){f&&f(m);const[r,...s]=n,i=on(r||yt()),o=pn(m).filter((t=>t!==m));if(!o.length)return b(i),Reflect.apply(t,e,[i,...s]);const c=o.map((t=>an(t).timestamp)).filter((t=>!!t)),a=c.length?Math.max(...c):void 0,l=an(m).start_timestamp,h=Math.min(l?l+u/1e3:1/0,Math.max(l||-1/0,Math.min(i,a||1/0)));return b(h),Reflect.apply(t,e,[h,...s])}}),c.push(h.on("spanStart",(t=>{if(s||t===m||an(t).timestamp)return;var e;pn(m).includes(t)&&(e=t.spanContext().spanId,y(),n.set(e,!0),v(yt()+l/1e3))}))),c.push(h.on("spanEnd",(t=>{var e;s||(e=t.spanContext().spanId,n.has(e)&&n.delete(e),0===n.size&&g(yt()+a/1e3))}))),c.push(h.on("idleSpanEnableAutoFinish",(t=>{t===m&&(o=!0,g(),n.size&&v())}))),e.disableAutoFinish||g(),setTimeout((()=>{s||(m.setStatus({code:Ze,message:"deadline_exceeded"}),i=Vn,m.end())}),u),m}function tr(t,e,n,r=0){return new qt(((s,i)=>{const o=t[r];if(null===e||"function"!=typeof o)s(e);else{const c=o({...e},n);f(c)?c.then((e=>tr(t,e,n,r+1).then(s))).then(null,i):tr(t,c,n,r+1).then(s).then(null,i)}}))}function er(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;!function(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:c}=e,a=G(n);a&&Object.keys(a).length&&(t.extra={...a,...t.extra});const u=G(r);u&&Object.keys(u).length&&(t.tags={...u,...t.tags});const l=G(s);l&&Object.keys(l).length&&(t.user={...l,...t.user});const f=G(i);f&&Object.keys(f).length&&(t.contexts={...f,...t.contexts});o&&(t.level=o);c&&"transaction"!==t.type&&(t.transaction=c)}(t,e),r&&function(t,e){t.contexts={trace:rn(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Mn(e),...t.sdkProcessingMetadata};const n=mn(e),r=an(n).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,e){t.fingerprint=t.fingerprint?Ft(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,s),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,i)}function nr(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:c,breadcrumbs:a,fingerprint:u,eventProcessors:l,attachments:f,propagationContext:h,transactionName:d,span:p}=e;rr(t,"extra",n),rr(t,"tags",r),rr(t,"user",s),rr(t,"contexts",i),rr(t,"sdkProcessingMetadata",c),o&&(t.level=o),d&&(t.transactionName=d),p&&(t.span=p),a.length&&(t.breadcrumbs=[...t.breadcrumbs,...a]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext={...t.propagationContext,...h}}function rr(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function sr(t,e,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=t,a={...e,event_id:e.event_id||n.event_id||Rt(),timestamp:e.timestamp||mt()},u=n.integrations||t.integrations.map((t=>t.name));!function(t,e){const{environment:n,release:r,dist:s,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?n:Cn);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==s&&(t.dist=s);t.message&&(t.message=p(t.message,i));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=p(o.value,i));const c=t.request;c&&c.url&&(c.url=p(c.url,i))}(a,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(a,u),s&&s.emit("applyFrameMetadata",e),void 0===e.type&&function(t,e){const n=T._sentryDebugIds;if(!n)return;let r;const s=ir.get(e);s?r=s:(r=new Map,ir.set(e,r));const i=Object.entries(n).reduce(((t,[n,s])=>{let i;const o=r.get(n);o?i=o:(i=e(n),r.set(n,i));for(let e=i.length-1;e>=0;e--){const n=i[e];if(n.filename){t[n.filename]=s;break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=i[t.filename])}))}))}catch(t){}}(a,t.stackParser);const l=function(t,e){if(!e)return t;const n=t?t.clone():new Ae;return n.update(e),n}(r,n.captureContext);n.mechanism&&Dt(a,n.mechanism);const f=s?s.getEventProcessors():[],h=Ne().getScopeData();if(i){nr(h,i.getScopeData())}if(l){nr(h,l.getScopeData())}const d=[...n.attachments||[],...h.attachments];d.length&&(n.attachments=d),er(a,h);return tr([...f,...h.eventProcessors],a,n).then((t=>(t&&function(t){const e={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)}))}))}catch(t){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach((([t,e])=>{n.push({type:"sourcemap",code_file:t,debug_id:e})}))}(t),"number"==typeof o&&o>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:jt(t.data,e,n)}})))},...t.user&&{user:jt(t.user,e,n)},...t.contexts&&{contexts:jt(t.contexts,e,n)},...t.extra&&{extra:jt(t.extra,e,n)}};t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=jt(t.contexts.trace.data,e,n)));t.spans&&(r.spans=t.spans.map((t=>({...t,...t.data&&{data:jt(t.data,e,n)}}))));return r}(t,o,c):t)))}const ir=new WeakMap;function or(t){if(t)return function(t){return t instanceof Ae||"function"==typeof t}(t)||function(t){return Object.keys(t).some((t=>cr.includes(t)))}(t)?{captureContext:t}:t}const cr=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function captureException(t,e){return Fe().captureException(t,or(e))}function ar(t,e){return Fe().captureEvent(t,e)}function ur(t,e){je().setContext(t,e)}function lr(t){je().setExtras(t)}function fr(t,e){je().setExtra(t,e)}function hr(t){je().setTags(t)}function dr(t,e){je().setTag(t,e)}function pr(t){je().setUser(t)}function mr(){return je().lastEventId()}function yr(t){je().addEventProcessor(t)}function gr(t){const e=Be(),n=je(),r=Fe(),{release:s,environment:i=Cn}=e&&e.getOptions()||{},{userAgent:o}=T.navigator||{},c=_e({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...t}),a=n.getSession();return a&&"ok"===a.status&&Te(a,{status:"exited"}),vr(),n.setSession(c),r.setSession(c),c}function vr(){const t=je(),e=Fe(),n=e.getSession()||t.getSession();n&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),Te(t,n)}(n),br(),t.setSession(),e.setSession()}function br(){const t=je(),e=Fe(),n=Be(),r=e.getSession()||t.getSession();r&&n&&n.captureSession(r)}function wr(t=!1){t?vr():br()}const kr="7";function Sr(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function _r(t,e){return n={sentry_key:t.publicKey,sentry_version:kr,...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}function Tr(t,e,n){return e||`${function(t){return`${Sr(t)}${t.projectId}/envelope/`}(t)}?${_r(t,n)}`}const Ir=[];function xr(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;e.forEach((t=>{t.isDefaultInstance=!0})),r=Array.isArray(n)?[...e,...n]:"function"==typeof n?Ft(n(e)):e;const s=function(t){const e={};return t.forEach((t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)})),Object.values(e)}(r),i=s.findIndex((t=>"Debug"===t.name));if(i>-1){const[t]=s.splice(i,1);s.push(t)}return s}function Cr(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Er(t,e,n){if(!n[e.name]){if(n[e.name]=e,-1===Ir.indexOf(e.name)&&"function"==typeof e.setupOnce&&(e.setupOnce(),Ir.push(e.name)),e.setup&&"function"==typeof e.setup&&e.setup(t),"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",((e,r)=>n(e,r,t)))}if("function"==typeof e.processEvent){const n=e.processEvent.bind(e),r=Object.assign(((e,r)=>n(e,r,t)),{id:e.name});t.addEventProcessor(r)}}}class Ar{constructor(t){if(this.ct=t,this._integrations={},this.ut=0,this.lt={},this.ft={},this._=[],t.dsn&&(this.ht=P(t.dsn)),this.ht){const e=Tr(this.ht,t.tunnel,t._metadata?t._metadata.sdk:void 0);this.dt=t.transport({tunnel:this.ct.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){const r=Rt();if(Lt(t))return r;const s={event_id:r,...e};return this.yt(this.eventFromException(t,s).then((t=>this.gt(t,s,n)))),s.event_id}captureMessage(t,e,n,r){const s={event_id:Rt(),...n},i=c(t)?t:String(t),o=a(t)?this.eventFromMessage(i,e,s):this.eventFromException(t,s);return this.yt(o.then((t=>this.gt(t,s,r)))),s.event_id}captureEvent(t,e,n){const r=Rt();if(e&&e.originalException&&Lt(e.originalException))return r;const s={event_id:r,...e},i=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this.yt(this.gt(t,s,i||n)),s.event_id}captureSession(t){"string"!=typeof t.release||(this.sendSession(t),Te(t,{init:!1}))}getDsn(){return this.ht}getOptions(){return this.ct}getSdkMetadata(){return this.ct._metadata}getTransport(){return this.dt}flush(t){const e=this.dt;return e?(this.emit("flush"),this.vt(t).then((n=>e.flush(t).then((t=>n&&t))))):Ut(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.emit("close"),t)))}getEventProcessors(){return this._}addEventProcessor(t){this._.push(t)}init(){(this.bt()||this.ct.integrations.some((({name:t})=>t.startsWith("Spotlight"))))&&this.wt()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const e=this._integrations[t.name];Er(this,t,this._integrations),e||Cr(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=function(t,e,n,r){const s=de(n),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const o=pe(t,s,r,e);return delete t.sdkProcessingMetadata,se(o,[[{type:i},t]])}(t,this.ht,this.ct._metadata,this.ct.tunnel);for(const t of e.attachments||[])n=ie(n,le(t));const r=this.sendEnvelope(n);r&&r.then((e=>this.emit("afterSendEvent",t,e)),null)}sendSession(t){const e=function(t,e,n,r){const s=de(n);return se({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:j(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.ht,this.ct._metadata,this.ct.tunnel);this.sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this.ct.sendClientReports){const r="number"==typeof n?n:1,s=`${t}:${e}`;this.lt[s]=(this.lt[s]||0)+r}}on(t,e){const n=this.ft[t]=this.ft[t]||[];return n.push(e),()=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)}}emit(t,...e){const n=this.ft[t];n&&n.forEach((t=>t(...e)))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this.bt()&&this.dt?this.dt.send(t).then(null,(t=>t)):Ut({})}wt(){const{integrations:t}=this.ct;this._integrations=function(t,e){const n={};return e.forEach((e=>{e&&Er(t,e,n)})),n}(this,t),Cr(this,t)}kt(t,e){let n=!1,r=!1;const s=e.exception&&e.exception.values;if(s){r=!0;for(const t of s){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const i="ok"===t.status;(i&&0===t.errors||i&&n)&&(Te(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}vt(t){return new qt((e=>{let n=0;const r=setInterval((()=>{0==this.ut?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}bt(){return!1!==this.getOptions().enabled&&void 0!==this.dt}St(t,e,n,r=je()){const s=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),this.emit("preprocessEvent",t,e),t.type||r.setLastEventId(t.event_id||e.event_id),sr(s,t,e,n,this,r).then((t=>{if(null===t)return t;const e={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(t.contexts&&t.contexts.trace)&&e){const{traceId:n,spanId:r,parentSpanId:s,dsc:i}=e;t.contexts={trace:G({trace_id:n,span_id:r,parent_span_id:s}),...t.contexts};const o=i||Rn(n,this);t.sdkProcessingMetadata={dynamicSamplingContext:o,...t.sdkProcessingMetadata}}return t}))}gt(t,e={},n){return this._t(t,e,n).then((t=>t.event_id),(t=>{}))}_t(t,e,n){const r=this.getOptions(),{sampleRate:s}=r,i=Mr(t),o=Rr(t),c=t.type||"error",a=`before send for type \`${c}\``,l=void 0===s?void 0:On(s);if(o&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",t),zt(new B(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const h="replay_event"===c?"replay":c,d=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this.St(t,e,n,d).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",h,t),new B("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const s=function(t,e,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=e;if(Rr(n)&&s)return s(n,r);if(Mr(n)){if(n.spans&&o){const e=[];for(const r of n.spans){const n=o(r);n?e.push(n):t.recordDroppedEvent("before_send","span")}n.spans=e}if(i){if(n.spans){const t=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return i(n,r)}}return n}(this,r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(f(t))return t.then((t=>{if(!u(t)&&null!==t)throw new B(n);return t}),(t=>{throw new B(`${e} rejected with ${t}`)}));if(!u(t)&&null!==t)throw new B(n);return t}(s,a)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",h,t),i){const e=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",e)}throw new B(`${a} returned \`null\`, will not send event.`,"log")}const s=n&&n.getSession();if(!i&&s&&this.kt(s,r),i){const t=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const o=r.transaction_info;if(i&&o&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...o,source:t}}return this.sendEvent(r,e),r})).then(null,(t=>{if(t instanceof B)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new B(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}yt(t){this.ut++,t.then((t=>(this.ut--,t)),(t=>(this.ut--,t)))}Tt(){const t=this.lt;return this.lt={},Object.entries(t).map((([t,e])=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e}}))}It(){const t=this.Tt();if(0===t.length)return;if(!this.ht)return;const e=(n=t,se((r=this.ct.tunnel&&j(this.ht))?{dsn:r}:{},[[{type:"client_report"},{timestamp:s||mt(),discarded_events:n}]]));var n,r,s;this.sendEnvelope(e)}}function Rr(t){return void 0===t.type}function Mr(t){return"transaction"===t.type}function Or(t){Fe().setClient(t)}const $r=64;function Dr(t,e,n=Ht(t.bufferSize||$r)){let r={};return{send:function(s){const i=[];if(oe(s,((e,n)=>{const s=he(n);if(ye(r,s)){const r=Lr(e,n);t.recordDroppedEvent("ratelimit_backoff",s,r)}else i.push(e)})),0===i.length)return Ut({});const o=se(s[0],i),c=e=>{oe(o,((n,r)=>{const s=Lr(n,r);t.recordDroppedEvent(e,he(r),s)}))};return n.add((()=>e({body:ae(o)}).then((t=>(r=ge(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof B)return c("queue_overflow"),Ut({});throw t}))},flush:t=>n.drain(t)}}function Lr(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}function Fr(t,e){const n=e&&e.getDsn(),r=e&&e.getOptions().tunnel;return function(t,e){return!!e&&t.includes(e.host)}(t,n)||function(t,e){if(!e)return!1;return jr(t)===jr(e)}(t,r)}function jr(t){return"/"===t[t.length-1]?t.slice(0,-1):t}const Nr=100;function Pr(t,e){const n=Be(),r=je();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=Nr}=n.getOptions();if(i<=0)return;const o={timestamp:mt(),...t},c=s?D((()=>s(o,e))):o;null!==c&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,i))}let Br;const Ur=new WeakMap,zr=()=>({name:"FunctionToString",setupOnce(){Br=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=H(this),n=Ur.has(Be())&&void 0!==e?e:this;return Br.apply(n,t)}}catch(t){}},setup(t){Ur.set(t,!0)}}),qr=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],Hr=(t={})=>({name:"InboundFilters",processEvent(e,n,r){const s=r.getOptions(),i=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:qr],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(t,s);return function(t,e){if(e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t))return!0;if(function(t,e){if(t.type||!e||!e.length)return!1;return function(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch(t){}n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`));return e}(t).some((t=>g(t,e)))}(t,e.ignoreErrors))return!0;if(function(t){if(t.type)return!1;if(!t.exception||!t.exception.values||0===t.exception.values.length)return!1;return!t.message&&!t.exception.values.some((t=>t.stacktrace||t.type&&"Error"!==t.type||t.value))}(t))return!0;if(function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&g(n,e)}(t,e.ignoreTransactions))return!0;if(function(t,e){if(!e||!e.length)return!1;const n=Wr(t);return!!n&&g(n,e)}(t,e.denyUrls))return!0;if(!function(t,e){if(!e||!e.length)return!0;const n=Wr(t);return!n||g(n,e)}(t,e.allowUrls))return!0;return!1}(e,i)?null:e}});function Wr(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(t){return null}}const Jr=()=>{let t;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Gr(t,e))return!1;if(!Kr(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=Xr(e),r=Xr(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Gr(t,e))return!1;if(!Kr(t,e))return!1;return!0}(t,e))return!0;return!1}(e,t))return null}catch(t){}return t=e}}};function Kr(t,e){let n=st(t),r=st(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;tnew WeakMap)),r=n.get(t);if(r)return r;const s=new e(t);return t.on("flush",(()=>s.flush())),t.on("close",(()=>s.close())),n.set(t,s),s}function Qr(t,e,n,r,s={}){const i=s.client||Be();if(!i)return;const o=yn(),c=o?mn(o):void 0,a=c&&an(c).description,{unit:u,tags:l,timestamp:f}=s,{release:h,environment:d}=i.getOptions(),p={};h&&(p.release=h),d&&(p.environment=d),a&&(p.transaction=a);Vr(i,t).add(e,n,r,u,{...p,...l},f)}function Zr(t,e,n,r){Qr(t,Yr,e,es(n),r)}const ts={increment:function(t,e,n=1,r){Qr(t,"c",e,es(n),r)},distribution:Zr,set:function(t,e,n,r){Qr(t,"s",e,n,r)},gauge:function(t,e,n,r){Qr(t,"g",e,es(n),r)},timing:function(t,e,n,r="second",s){if("function"==typeof n){const r=yt();return Pn({op:"metrics.timing",name:e,startTime:r,onlyIfParent:!0},(i=>xn((()=>n()),(()=>{}),(()=>{const n=yt();Zr(t,e,n-r,{...s,unit:"second"}),i.end(n)}))))}Zr(t,e,n,{...s,unit:r})},getMetricsAggregatorForClient:Vr};function es(t){return"string"==typeof t?parseInt(t):t}function ns(t){return t.replace(/[^\w\-./]+/gi,"")}const rs=[["\n","\\n"],["\r","\\r"],["\t","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function ss(t){return[...t].reduce(((t,e)=>t+function(t){for(const[e,n]of rs)if(t===e)return n;return t}(e)),"")}function is(t,e){L.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const n=function(t,e,n,r){const s={sent_at:(new Date).toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version});r&&e&&(s.dsn=j(e));const i=function(t){const e=function(t){let e="";for(const n of t){const t=Object.entries(n.tags),r=t.length>0?`|#${t.map((([t,e])=>`${t}:${e}`)).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return e}(t);return[{type:"statsd",length:e.length},e]}(t);return se(s,[i])}(e,t.getDsn(),t.getSdkMetadata(),t.getOptions().tunnel);t.sendEnvelope(n)}const os={c:class{constructor(t){this.v=t}get weight(){return 1}add(t){this.v+=t}toString(){return`${this.v}`}},g:class{constructor(t){this.xt=t,this.Ct=t,this.Et=t,this.At=t,this.Rt=1}get weight(){return 5}add(t){this.xt=t,tthis.Et&&(this.Et=t),this.At+=t,this.Rt++}toString(){return`${this.xt}:${this.Ct}:${this.Et}:${this.At}:${this.Rt}`}},[Yr]:class{constructor(t){this.v=[t]}get weight(){return this.v.length}add(t){this.v.push(t)}toString(){return this.v.join(":")}},s:class{constructor(t){this.first=t,this.v=new Set([t])}get weight(){return this.v.size}add(t){this.v.add(t)}toString(){return Array.from(this.v).map((t=>"string"==typeof t?function(t){let e=0;for(let n=0;n>>0}(t):t)).join(":")}}};class cs{constructor(t){this.B=t,this.Mt=new Map,this.Ot=setInterval((()=>this.flush()),5e3)}add(t,e,n,r="none",s={},i=yt()){const o=Math.floor(i),c=e.replace(/[^\w\-.]+/gi,"_");const a=function(t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[ns(n)]=ss(String(t[n])));return e}(s),u=function(t){return t.replace(/[^\w]+/gi,"_")}(r),l=function(t,e,n,r){return`${t}${e}${n}${Object.entries(G(r)).sort(((t,e)=>t[0].localeCompare(e[0])))}`}(t,c,u,a);let f=this.Mt.get(l);const h=f&&"s"===t?f.metric.weight:0;f?(f.metric.add(n),f.timestamp0&&t.setAttribute("http.response_content_length",e)}}else e.error&&t.setStatus({code:Ze,message:"internal_error"});t.end()}(n,t),delete r[e]))}const o=Fe(),c=Be(),{method:a,url:u}=t.fetchData,l=function(t){try{return new URL(t).href}catch(t){return}}(u),f=l?Wt(l).host:void 0,d=!!yn(),p=i&&d?Bn({name:`${a} ${u}`,attributes:{url:u,type:"fetch","http.method":a,"http.url":l,"server.address":f,[Je]:s,[We]:"http.client"}}):new In;if(t.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(t.fetchData.url)&&c){const e=t.args[0];t.args[1]=t.args[1]||{};const n=t.args[1];n.headers=function(t,e,n,r,s){const i=je(),{traceId:o,spanId:c,sampled:a,dsc:u}={...i.getPropagationContext(),...n.getPropagationContext()},l=s?sn(s):re(o,c,a),f=Zt(u||(s?Mn(s):Rn(o,e))),d=r.headers||("undefined"!=typeof Request&&h(t,Request)?t.headers:void 0);if(d){if("undefined"!=typeof Headers&&h(d,Headers)){const t=new Headers(d);return t.append("sentry-trace",l),f&&t.append(Gt,f),t}if(Array.isArray(d)){const t=[...d,["sentry-trace",l]];return f&&t.push([Gt,f]),t}{const t="baggage"in d?d.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),f&&e.push(f),{...d,"sentry-trace":l,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":l,baggage:f}}(e,c,o,n,Tn()&&d?p:void 0)}return p}const us=function(){return{bindClient(t){Fe().setClient(t)},withScope:Pe,getClient:()=>Be(),getScope:Fe,getIsolationScope:je,captureException:(t,e)=>Fe().captureException(t,e),captureMessage:(t,e,n)=>Fe().captureMessage(t,e,n),captureEvent:ar,addBreadcrumb:Pr,setUser:pr,setTags:hr,setTag:dr,setExtra:fr,setExtras:lr,setContext:ur,getIntegration(t){const e=Be();return e&&e.getIntegrationByName(t.id)||null},startSession:gr,endSession:vr,captureSession(t){if(t)return vr();!function(){const t=Fe(),e=Be(),n=t.getSession();e&&n&&e.captureSession(n)}()}}};const ls=T;let fs=0;function hs(){return fs>0}function ds(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return"function"==typeof e?e:t;if(H(t))return t}catch(e){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const s=r.map((t=>ds(t,e)));return t.apply(this,s)}catch(t){throw fs++,setTimeout((()=>{fs--})),Pe((n=>{n.addEventProcessor((t=>(e.mechanism&&($t(t,void 0,void 0),Dt(t,e.mechanism)),t.extra={...t.extra,arguments:r},t))),captureException(t)})),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch(t){}q(sentryWrapped,t),z(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function ps(t,e){const n=gs(t,e),r={type:e&&e.name,value:bs(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ms(t,e,n,r){const s=Be(),i=s&&s.getOptions().normalizeDepth,o=function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}return}(e),c={__serialized__:Nt(e,i)};if(o)return{exception:{values:[ps(t,o)]},extra:c};const a={exception:{values:[{type:l(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Ts(e,{isUnhandledRejection:r})}]},extra:c};if(n){const e=gs(t,n);e.length&&(a.exception.values[0].stacktrace={frames:e})}return a}function ys(t,e){return{exception:{values:[ps(t,e)]}}}function gs(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t&&vs.test(t.message))return 1;return 0}(e),s=function(t){if("number"==typeof t.framesToPop)return t.framesToPop;return 0}(e);try{return t(n,r,s)}catch(t){}return[]}const vs=/Minified React error #\d+;/i;function bs(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function ws(t,e,n,r){const s=Ss(t,e,n&&n.syntheticException||void 0,r);return Dt(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Ut(s)}function ks(t,e,n="info",r,s){const i=_s(t,e,r&&r.syntheticException||void 0,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),Ut(i)}function Ss(t,e,o,c,a){let f;if(s(e)&&e.error){return ys(t,e.error)}if(i(e)||r(e,"DOMException")){const n=e;if("stack"in e)f=ys(t,e);else{const e=n.name||(i(n)?"DOMError":"DOMException"),r=n.message?`${e}: ${n.message}`:e;f=_s(t,r,o,c),$t(f,r)}return"code"in n&&(f.tags={...f.tags,"DOMException.code":`${n.code}`}),f}if(n(e))return ys(t,e);if(u(e)||l(e)){return f=ms(t,e,o,a),Dt(f,{synthetic:!0}),f}return f=_s(t,e,o,c),$t(f,`${e}`,void 0),Dt(f,{synthetic:!0}),f}function _s(t,e,n,r){const s={};if(r&&n){const r=gs(t,n);r.length&&(s.exception={values:[{value:e,stacktrace:{frames:r}}]})}if(c(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;return s.logentry={message:t,params:n},s}return s.message=e,s}function Ts(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys(W(t));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return p(r,e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:p(r,e)}return""}(t),r=e?"promise rejection":"exception";if(s(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(l(t)){return`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}function Is(t,{metadata:e,tunnel:n,dsn:r}){const s={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:j(r)}},i=function(t){return[{type:"user_report"},t]}(t);return se(s,[i])}class xs extends Ar{constructor(t){const e={parentSpanIsAlwaysRootSpan:!0,...t};!function(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map((t=>({name:`${r}:@sentry/${t}`,version:_}))),version:_}),t._metadata=s}(e,"browser",["browser"],ls.SENTRY_SDK_SOURCE||"cdn"),super(e),e.sendClientReports&&ls.document&&ls.document.addEventListener("visibilitychange",(()=>{"hidden"===ls.document.visibilityState&&this.It()}))}eventFromException(t,e){return ws(this.ct.stackParser,t,e,this.ct.attachStacktrace)}eventFromMessage(t,e="info",n){return ks(this.ct.stackParser,t,e,n,this.ct.attachStacktrace)}captureUserFeedback(t){if(!this.bt())return;const e=Is(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(e)}St(t,e,n){return t.platform=t.platform||"javascript",super.St(t,e,n)}}const Cs=(t,e,n,r)=>{let s,i;return o=>{e.value>=0&&(o||r)&&(i=e.value-(s||0),(i||void 0===s)&&(s=e.value,e.delta=i,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},Es=T,As=()=>Es.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Rs=()=>{const t=As();return t&&t.activationStart||0},Ms=(t,e)=>{const n=As();let r="navigate";n&&(Es.document&&Es.document.prerendering||Rs()>0?r="prerender":Es.document&&Es.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-")));return{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Os=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{Promise.resolve().then((()=>{e(t.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},$s=t=>{const e=e=>{("pagehide"===e.type||Es.document&&"hidden"===Es.document.visibilityState)&&t(e)};Es.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},Ds=t=>{let e=!1;return n=>{e||(t(n),e=!0)}};let Ls=-1;const Fs=t=>{"hidden"===Es.document.visibilityState&&Ls>-1&&(Ls="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("visibilitychange",Fs,!0),removeEventListener("prerenderingchange",Fs,!0))},js=()=>(Es.document&&Ls<0&&(Ls="hidden"!==Es.document.visibilityState||Es.document.prerendering?1/0:0,addEventListener("visibilitychange",Fs,!0),addEventListener("prerenderingchange",Fs,!0)),{get firstHiddenTime(){return Ls}}),Ns=t=>{Es.document&&Es.document.prerendering?addEventListener("prerenderingchange",(()=>t()),!0):t()},Ps=[1800,3e3],Bs=[.1,.25],Us=(t,e={})=>{((t,e={})=>{Ns((()=>{const n=js(),r=Ms("FCP");let s;const i=Os("paint",(t=>{t.forEach((t=>{"first-contentful-paint"===t.name&&(i.disconnect(),t.startTime{const n=Ms("CLS",0);let r,s=0,i=[];const o=t=>{t.forEach((t=>{if(!t.hadRecentInput){const e=i[0],n=i[i.length-1];s&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(s+=t.value,i.push(t)):(s=t.value,i=[t])}})),s>n.value&&(n.value=s,n.entries=i,r())},c=Os("layout-shift",o);c&&(r=Cs(t,n,Bs,e.reportAllChanges),$s((()=>{o(c.takeRecords()),r(!0)})),setTimeout(r,0))})))},zs=[100,300],qs=(t,e={})=>{Ns((()=>{const n=js(),r=Ms("FID");let s;const i=t=>{t.startTime{t.forEach(i)},c=Os("first-input",o);s=Cs(t,r,zs,e.reportAllChanges),c&&$s(Ds((()=>{o(c.takeRecords()),c.disconnect()})))}))};let Hs=0,Ws=1/0,Js=0;const Ks=t=>{t.forEach((t=>{t.interactionId&&(Ws=Math.min(Ws,t.interactionId),Js=Math.max(Js,t.interactionId),Hs=Js?(Js-Ws)/7+1:0)}))};let Gs;const Xs=()=>{"interactionCount"in performance||Gs||(Gs=Os("event",Ks,{type:"event",buffered:!0,durationThreshold:0}))},Ys=[200,500],Vs=()=>(Gs?Hs:performance.interactionCount||0)-0,Qs=[],Zs={},ti=t=>{const e=Qs[Qs.length-1],n=Zs[t.interactionId];if(n||Qs.length<10||e&&t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{const e={id:t.interactionId,latency:t.duration,entries:[t]};Zs[e.id]=e,Qs.push(e)}Qs.sort(((t,e)=>e.latency-t.latency)),Qs.splice(10).forEach((t=>{delete Zs[t.id]}))}},ei=(t,e={})=>{Ns((()=>{Xs();const n=Ms("INP");let r;const s=t=>{t.forEach((t=>{if(t.interactionId&&ti(t),"first-input"===t.entryType){!Qs.some((e=>e.entries.some((e=>t.duration===e.duration&&t.startTime===e.startTime))))&&ti(t)}}));const e=(()=>{const t=Math.min(Qs.length-1,Math.floor(Vs()/50));return Qs[t]})();e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,r())},i=Os("event",s,{durationThreshold:null!=e.durationThreshold?e.durationThreshold:40});r=Cs(t,n,Ys,e.reportAllChanges),i&&("PerformanceEventTiming"in Es&&"interactionId"in PerformanceEventTiming.prototype&&i.observe({type:"first-input",buffered:!0}),$s((()=>{s(i.takeRecords()),n.value<0&&Vs()>0&&(n.value=0,n.entries=[]),r(!0)})))}))},ni=[2500,4e3],ri={},si=(t,e={})=>{Ns((()=>{const n=js(),r=Ms("LCP");let s;const i=t=>{const e=t[t.length-1];e&&e.startTime{ri[r.id]||(i(o.takeRecords()),o.disconnect(),ri[r.id]=!0,s(!0))}));["keydown","click"].forEach((t=>{Es.document&&addEventListener(t,(()=>setTimeout(n,0)),!0)})),$s(n)}}))},ii=[800,1800],oi=t=>{Es.document&&Es.document.prerendering?Ns((()=>oi(t))):Es.document&&"complete"!==Es.document.readyState?addEventListener("load",(()=>oi(t)),!0):setTimeout(t,0)},ci=(t,e={})=>{const n=Ms("TTFB"),r=Cs(t,n,ii,e.reportAllChanges);oi((()=>{const t=As();if(t){const e=t.responseStart;if(e<=0||e>performance.now())return;n.value=Math.max(e-Rs(),0),n.entries=[t],r(!0)}}))},ai={},ui={};let li,fi,hi,di,pi;function mi(t,e=!1){return xi("cls",t,ki,li,e)}function yi(t,e=!1){return xi("lcp",t,_i,hi,e)}function gi(t){return xi("fid",t,Si,fi)}function vi(t){return xi("inp",t,Ii,pi)}function bi(t,e){return Ci(t,e),ui[t]||(!function(t){const e={};"event"===t&&(e.durationThreshold=0);Os(t,(e=>{wi(t,{entries:e})}),e)}(t),ui[t]=!0),Ei(t,e)}function wi(t,e){const n=ai[t];if(n&&n.length)for(const t of n)try{t(e)}catch(t){}}function ki(){return Us((t=>{wi("cls",{metric:t}),li=t}),{reportAllChanges:!0})}function Si(){return qs((t=>{wi("fid",{metric:t}),fi=t}))}function _i(){return si((t=>{wi("lcp",{metric:t}),hi=t}),{reportAllChanges:!0})}function Ti(){return ci((t=>{wi("ttfb",{metric:t}),di=t}))}function Ii(){return ei((t=>{wi("inp",{metric:t}),pi=t}))}function xi(t,e,n,r,s=!1){let i;return Ci(t,e),ui[t]||(i=n(),ui[t]=!0),r&&e({metric:r}),Ei(t,e,s?i:void 0)}function Ci(t,e){ai[t]=ai[t]||[],ai[t].push(e)}function Ei(t,e,n){return()=>{n&&n();const r=ai[t];if(!r)return;const s=r.indexOf(e);-1!==s&&r.splice(s,1)}}function Ai(t){return"number"==typeof t&&isFinite(t)}function Ri(t,e,n,{...r}){const s=an(t).start_timestamp;return s&&s>e&&"function"==typeof t.updateStartTime&&t.updateStartTime(e),Un(t,(()=>{const t=Bn({startTime:e,...r});return t&&t.end(n),t}))}function Mi(t){const e=Be();if(!e)return;const{name:n,transaction:r,attributes:s,startTime:i}=t,{release:o,environment:c}=e.getOptions(),a=e.getIntegrationByName("Replay"),u=a&&a.getReplayId(),l=Fe(),f=l.getUser(),h=void 0!==f?f.email||f.id||f.ip_address:void 0;let d;try{d=l.getScopeData().contexts.profile.profile_id}catch(t){}return Bn({name:n,attributes:{release:o,environment:c,user:h||void 0,profile_id:d||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":Es.navigator&&Es.navigator.userAgent,...s},startTime:i,experimental:{standalone:!0}})}function Oi(){return Es&&Es.addEventListener&&Es.performance}function $i(t){return t/1e3}function Di(){let t,e,n=0;if(!function(){try{return ve([PerformanceObserver,"access",t=>t.supportedEntryTypes,"optionalAccess",t=>t.includes,"call",t=>t("layout-shift")])}catch(t){return!1}}())return;let r=!1;function s(){r||(r=!0,e&&function(t,e,n){const r=$i((gt||0)+(ve([e,"optionalAccess",t=>t.startTime])||0)),s=Fe().getScopeData().transactionName,i=e?E(ve([e,"access",t=>t.sources,"access",t=>t[0],"optionalAccess",t=>t.node])):"Layout shift",o=G({[Je]:"auto.http.browser.cls",[We]:"ui.webvital.cls",[Ye]:ve([e,"optionalAccess",t=>t.duration])||0,"sentry.pageload.span_id":n}),c=Mi({name:i,transaction:s,attributes:o,startTime:r});ve([c,"optionalAccess",t=>t.addEvent,"call",e=>e("cls",{[Ge]:"",[Xe]:t})]),ve([c,"optionalAccess",t=>t.end,"call",t=>t(r)])}(n,t,e),i())}const i=mi((({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)}),!0);$s((()=>{s()})),setTimeout((()=>{const t=ve([Be(),"optionalAccess",t=>t.on,"call",e=>e("startNavigationSpan",(()=>{s(),t&&t()}))]),n=yn(),r=n&&mn(n),i=r&&an(r);i&&"pageload"===i.op&&(e=r.spanContext().spanId)}),0)}const Li=2147483647;let Fi,ji,Ni=0,Pi={};function Bi({recordClsStandaloneSpans:t}){const e=Oi();if(e&>){e.mark&&Es.performance.mark("sentry-tracing-init");const n=gi((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=$i(gt),r=$i(e.startTime);Pi.fid={value:t.value,unit:"millisecond"},Pi["mark.fid"]={value:n+r,unit:"second"}})),r=yi((({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Pi.lcp={value:t.value,unit:"millisecond"},Fi=e)}),!0),s=xi("ttfb",(({metric:t})=>{t.entries[t.entries.length-1]&&(Pi.ttfb={value:t.value,unit:"millisecond"})}),Ti,di),i=t?Di():mi((({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Pi.cls={value:t.value,unit:""},ji=e)}),!0);return()=>{n(),r(),s(),i&&i()}}return()=>{}}function Ui(t,e){const n=Oi();if(!n||!Es.performance.getEntries||!gt)return;const r=$i(gt),s=n.getEntries(),{op:i,start_timestamp:o}=an(t);if(s.slice(Ni).forEach((e=>{const n=$i(e.startTime),s=$i(Math.max(0,e.duration));if(!("navigation"===i&&o&&r+n{zi(t,e,r,n)})),zi(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),zi(t,e,"fetch",n,"cache","domainLookupStart"),zi(t,e,"domainLookup",n,"DNS"),function(t,e,n){const r=n+$i(e.requestStart),s=n+$i(e.responseEnd),i=n+$i(e.responseStart);e.responseEnd&&(Ri(t,r,s,{op:"browser.request",name:e.name,attributes:{[Je]:"auto.ui.browser.metrics"}}),Ri(t,i,s,{op:"browser.response",name:e.name,attributes:{[Je]:"auto.ui.browser.metrics"}}))}(t,e,n)}(t,e,r);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,s){const i=As(),o=$i(i?i.requestStart:0),c=s+Math.max(n,o),a=s+n,u=a+r,l={[Je]:"auto.resource.browser.metrics"};c!==a&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c);Ri(t,c,u,{name:e.name,op:e.entryType,attributes:l})}(t,e,n,s,r);const i=js(),o=e.startTime{$n(t,e.value,e.unit)})),t.setAttribute("performance.timeOrigin",r),t.setAttribute("performance.activationStart",Rs()),function(t){Fi&&(Fi.element&&t.setAttribute("lcp.element",E(Fi.element)),Fi.id&&t.setAttribute("lcp.id",Fi.id),Fi.url&&t.setAttribute("lcp.url",Fi.url.trim().slice(0,200)),t.setAttribute("lcp.size",Fi.size));ji&&ji.sources&&ji.sources.forEach(((e,n)=>t.setAttribute(`cls.source.${n+1}`,E(e.node))))}(t)}Fi=void 0,ji=void 0,Pi={}}function zi(t,e,n,r,s,i){const o=i?e[i]:e[`${n}End`],c=e[`${n}Start`];c&&o&&Ri(t,r+$i(c),r+$i(o),{op:`browser.${s||n}`,name:e.name,attributes:{[Je]:"auto.ui.browser.metrics"}})}function qi(t,e,n,r){const s=e[n];null!=s&&s{const n=Es[e]&&Es[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(U(n,"addEventListener",(function(e){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=i[n]=i[n]||{refCount:0};if(!o.handler){const r=Vi(t);o.handler=r,e.call(this,n,r,s)}o.refCount++}catch(t){}return e.call(this,n,r,s)}})),U(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,s=n.__sentry_instrumentation_handlers__||{},i=s[e];i&&(i.refCount--,i.refCount<=0&&(t.call(this,e,i.handler,r),i.handler=void 0,delete s[e]),0===Object.keys(s).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}})))}))}function Vi(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(t){try{return t.target}catch(t){return null}}(n);if(function(t,e){return"keypress"===t&&(!e||!e.tagName||"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&!e.isContentEditable)}(n.type,r))return;z(n,"_sentryCaptured",!0),r&&!r._sentryId&&z(r,"_sentryId",Rt());const s="keypress"===n.type?"input":n.type;if(!function(t){if(t.type!==Ji)return!1;try{if(!t.target||t.target._sentryId!==Ki)return!1}catch(t){}return!0}(n)){t({event:n,name:s,global:e}),Ji=n.type,Ki=r?r._sentryId:void 0}clearTimeout(Wi),Wi=Es.setTimeout((()=>{Ki=void 0,Ji=void 0}),Hi)}}function Qi(t){const e="history";ct(e,t),at(e,Zi)}function Zi(){if(!function(){const t=we.chrome,e=t&&t.app&&t.app.runtime,n="history"in we&&!!we.history.pushState&&!!we.history.replaceState;return!e&&n}())return;const t=Es.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=Gi,e=String(n);Gi=e;ut("history",{from:t,to:e})}return t.apply(this,e)}}Es.onpopstate=function(...e){const n=Es.location.href,r=Gi;Gi=n;if(ut("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},U(Es.history,"pushState",e),U(Es.history,"replaceState",e)}const to={};function eo(t){const e=to[t];if(e)return e;let n=Es[t];if(ht(n))return to[t]=n.bind(Es);const r=Es.document;if(r&&"function"==typeof r.createElement)try{const e=r.createElement("iframe");e.hidden=!0,r.head.appendChild(e);const s=e.contentWindow;s&&s[t]&&(n=s[t]),r.head.removeChild(e)}catch(t){}return n?to[t]=n.bind(Es):n}function no(t){to[t]=void 0}function ro(...t){return eo("setTimeout")(...t)}const so="__sentry_xhr_v3__";function io(t){ct("xhr",t),at("xhr",oo)}function oo(){if(!Es.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,e,n){const r=1e3*yt(),s=o(n[0])?n[0].toUpperCase():void 0,i=function(t){if(o(t))return t;try{return t.toString()}catch(t){}return}(n[1]);if(!s||!i)return t.apply(e,n);e[so]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(e.__sentry_own_request__=!0);const c=()=>{const t=e[so];if(t&&4===e.readyState){try{t.status_code=e.status}catch(t){}ut("xhr",{endTimestamp:1e3*yt(),startTimestamp:r,xhr:e})}};return"onreadystatechange"in e&&"function"==typeof e.onreadystatechange?e.onreadystatechange=new Proxy(e.onreadystatechange,{apply:(t,e,n)=>(c(),t.apply(e,n))}):e.addEventListener("readystatechange",c),e.setRequestHeader=new Proxy(e.setRequestHeader,{apply(t,e,n){const[r,s]=n,i=e[so];return i&&o(r)&&o(s)&&(i.request_headers[r.toLowerCase()]=s),t.apply(e,n)}}),t.apply(e,n)}}),t.send=new Proxy(t.send,{apply(t,e,n){const r=e[so];if(!r)return t.apply(e,n);void 0!==n[0]&&(r.body=n[0]);return ut("xhr",{startTimestamp:1e3*yt(),xhr:e}),t.apply(e,n)}})}const co=[],ao=new Map;function uo(){if(Oi()&>){const t=vi((({metric:t})=>{if(null==t.value)return;const e=t.entries.find((e=>e.duration===t.value&&lo[e.name]));if(!e)return;const{interactionId:n}=e,r=lo[e.name],s=$i(gt+e.startTime),i=$i(t.value),o=yn(),c=o?mn(o):void 0,a=(null!=n?ao.get(n):void 0)||c,u=a?an(a).description:Fe().getScopeData().transactionName,l=Mi({name:E(e.target),transaction:u,attributes:G({[Je]:"auto.http.browser.inp",[We]:`ui.interaction.${r}`,[Ye]:e.duration}),startTime:s});ve([l,"optionalAccess",t=>t.addEvent,"call",e=>e("inp",{[Ge]:"millisecond",[Xe]:t.value})]),ve([l,"optionalAccess",t=>t.end,"call",t=>t(s+i)])}));return()=>{t()}}return()=>{}}const lo={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function fo(t,e=eo("fetch")){let n=0,r=0;return Dr(t,(function(s){const i=s.body.length;n+=i,r++;const o={body:s.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return no("fetch"),zt("No fetch implementation available");try{return e(t.url,o).then((t=>(n-=i,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(t){return no("fetch"),n-=i,r--,zt(t)}}))}function ho(t,e,n,r){const s={filename:t,function:""===e?V:e,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const po=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,mo=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,yo=/\((\S*)(?::(\d+))(?::(\d+))\)/,go=[30,t=>{const e=po.exec(t);if(e){const[,t,n,r]=e;return ho(t,V,+n,+r)}const n=mo.exec(t);if(n){if(n[2]&&0===n[2].indexOf("eval")){const t=yo.exec(n[2]);t&&(n[2]=t[1],n[3]=t[2],n[4]=t[3])}const[t,e]=Ao(n[1]||V,n[2]);return ho(e,t,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],vo=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,bo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,wo=[50,t=>{const e=vo.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=bo.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||V;return[n,t]=Ao(n,t),ho(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],ko=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,So=[40,t=>{const e=ko.exec(t);return e?ho(e[2],e[1]||V,+e[3],e[4]?+e[4]:void 0):void 0}],_o=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,To=[10,t=>{const e=_o.exec(t);return e?ho(e[2],e[3]||V,+e[1]):void 0}],Io=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,xo=[20,t=>{const e=Io.exec(t);return e?ho(e[5],e[3]||e[4]||V,+e[1],+e[2]):void 0}],Co=[go,wo],Eo=tt(...Co),Ao=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:V,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Ro=1024,Mo=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(t){e.console&&function(t){const e="console";ct(e,t),at(e,lt)}(function(t){return function(e){if(Be()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:Kt(e.level),message:m(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${m(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}Pr(n,{input:e.args,level:e.level})}}(t)),e.dom&&Xi(function(t,e){return function(n){if(Be()!==t)return;let r,s,i="object"==typeof e?e.serializeAttribute:void 0,o="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;o&&o>Ro&&(o=Ro),"string"==typeof i&&(i=[i]);try{const t=n.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;r=E(e,{keyAttrs:i,maxStringLength:o}),s=M(e)}catch(t){r=""}if(0===r.length)return;const c={category:`ui.${n.name}`,message:r};s&&(c.data={"ui.component_name":s}),Pr(c,{event:n.event,name:n.name,global:n.global})}}(t,e.dom)),e.xhr&&io(function(t){return function(e){if(Be()!==t)return;const{startTimestamp:n,endTimestamp:r}=e,s=e.xhr[so];if(!n||!r||!s)return;const{method:i,url:o,status_code:c,body:a}=s,u={method:i,url:o,status_code:c},l={xhr:e.xhr,input:a,startTimestamp:n,endTimestamp:r};Pr({category:"xhr",data:u,type:"http",level:S(c)},l)}}(t)),e.fetch&&vt(function(t){return function(e){if(Be()!==t)return;const{startTimestamp:n,endTimestamp:r}=e;if(r&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){Pr({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args,startTimestamp:n,endTimestamp:r})}else{const t=e.response,s={...e.fetchData,status_code:t&&t.status},i={input:e.args,response:t,startTimestamp:n,endTimestamp:r};Pr({category:"fetch",data:s,type:"http",level:S(s.status_code)},i)}}}(t)),e.history&&Qi(function(t){return function(e){if(Be()!==t)return;let n=e.from,r=e.to;const s=Wt(ls.location.href);let i=n?Wt(n):void 0;const o=Wt(r);i&&i.path||(i=s),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),s.protocol===i.protocol&&s.host===i.host&&(n=i.relative),Pr({category:"navigation",data:{from:n,to:r}})}}(t)),e.sentry&&t.on("beforeSendEvent",function(t){return function(e){Be()===t&&Pr({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Ot(e)},{event:e})}}(t))}}};const Oo=["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"],$o=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&U(ls,"setTimeout",Do),e.setInterval&&U(ls,"setInterval",Do),e.requestAnimationFrame&&U(ls,"requestAnimationFrame",Lo),e.XMLHttpRequest&&"XMLHttpRequest"in ls&&U(XMLHttpRequest.prototype,"send",Fo);const t=e.eventTarget;if(t){(Array.isArray(t)?t:Oo).forEach(jo)}}}};function Do(t){return function(...e){const n=e[0];return e[0]=ds(n,{mechanism:{data:{function:rt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Lo(t){return function(e){return t.apply(this,[ds(e,{mechanism:{data:{function:"requestAnimationFrame",handler:rt(t)},handled:!1,type:"instrument"}})])}}function Fo(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&U(n,t,(function(e){const n={mechanism:{data:{function:t,handler:rt(e)},handled:!1,type:"instrument"}},r=H(e);return r&&(n.mechanism.data.handler=rt(r)),ds(e,n)}))})),t.apply(this,e)}}function jo(t){const e=ls,n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(U(n,"addEventListener",(function(e){return function(n,r,s){try{"function"==typeof r.handleEvent&&(r.handleEvent=ds(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:rt(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return e.apply(this,[n,ds(r,{mechanism:{data:{function:"addEventListener",handler:rt(r),target:t},handled:!1,type:"instrument"}}),s])}})),U(n,"removeEventListener",(function(t){return function(e,n,r){const s=n;try{const n=s&&s.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,s,r)}})))}const No=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&function(t){Tt((e=>{const{stackParser:n,attachStacktrace:r}=Po();if(Be()!==t||hs())return;const{msg:s,url:i,line:c,column:a,error:u}=e,l=function(t,e,n,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],c=i[0]=i[0]||{},a=c.stacktrace=c.stacktrace||{},u=a.frames=a.frames||[],l=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(n,10))?void 0:n,h=o(e)&&e.length>0?e:R();0===u.length&&u.push({colno:l,filename:h,function:V,in_app:!0,lineno:f});return t}(Ss(n,u||s,void 0,r,!1),i,c,a);l.level="error",ar(l,{originalException:u,mechanism:{handled:!1,type:"onerror"}})}))}(t),e.onunhandledrejection&&function(t){Ct((e=>{const{stackParser:n,attachStacktrace:r}=Po();if(Be()!==t||hs())return;const s=function(t){if(a(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch(t){}return t}(e),i=a(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:Ss(n,s,void 0,r,!0);i.level="error",ar(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t)}}};function Po(){const t=Be();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Bo=()=>({name:"HttpContext",preprocessEvent(t){if(!ls.navigator&&!ls.location&&!ls.document)return;const e=t.request&&t.request.url||ls.location&&ls.location.href,{referrer:n}=ls.document||{},{userAgent:r}=ls.navigator||{},s={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:s};t.request=i}}),Uo=(t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,s){const i=s.getOptions();v(ps,i.stackParser,i.maxValueLength,n,e,t,r)}}};function zo(t){return[Hr(),zr(),$o(),Mo(),No(),Uo(),Jr(),Bo()]}const qo={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling"},Ho=ls;const Wo={increment:function(t,e=1,n){ts.increment(cs,t,e,n)},distribution:function(t,e,n){ts.distribution(cs,t,e,n)},set:function(t,e,n){ts.set(cs,t,e,n)},gauge:function(t,e,n){ts.gauge(cs,t,e,n)},timing:function(t,e,n="second",r){return ts.timing(cs,t,e,n,r)}};const Jo=new WeakMap,Ko=new Map,Go={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function Xo(t,e){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:o}={traceFetch:Go.traceFetch,traceXHR:Go.traceXHR,...e},c="function"==typeof s?s:t=>!0,a=t=>function(t,e){const n=ls.location&&ls.location.href;if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch(t){return!1}const i=r.origin===s;return e?g(r.toString(),e)||i&&g(r.pathname,e):i}{const n=!!t.match(/^\/(?!\/)/);return e?g(t,e):n}}(t,o),u={};n&&(t.addEventProcessor((t=>("transaction"===t.type&&t.spans&&t.spans.forEach((t=>{if("http.client"===t.op){const e=Ko.get(t.span_id);e&&(t.timestamp=e/1e3,Ko.delete(t.span_id))}})),t))),function(t){const e="fetch-body-resolved";ct(e,t),at(e,(()=>bt(wt)))}((t=>{if(t.response){const e=Jo.get(t.response);e&&t.endTimestamp&&Ko.set(e,t.endTimestamp)}})),vt((t=>{const e=as(t,c,a,u);if(t.response&&t.fetchData.__span&&Jo.set(t.response,t.fetchData.__span),e){const n=Qo(t.fetchData.url),r=n?Wt(n).host:void 0;e.setAttributes({"http.url":n,"server.address":r})}i&&e&&Yo(e)}))),r&&io((t=>{const e=function(t,e,n,r){const s=t.xhr,i=s&&s[so];if(!s||s.__sentry_own_request__||!i)return;const o=Tn()&&e(i.url);if(t.endTimestamp&&o){const t=s.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&void 0!==i.status_code&&(tn(e,i.status_code),e.end(),delete r[t]))}const c=Qo(i.url),a=c?Wt(c).host:void 0,u=!!yn(),l=o&&u?Bn({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":c,url:i.url,"server.address":a,[Je]:"auto.http.browser",[We]:"http.client"}}):new In;s.__sentry_xhr_span_id__=l.spanContext().spanId,r[s.__sentry_xhr_span_id__]=l;const f=Be();s.setRequestHeader&&n(i.url)&&f&&function(t,e,n){const r=Fe(),s=je(),{traceId:i,spanId:o,sampled:c,dsc:a}={...s.getPropagationContext(),...r.getPropagationContext()},u=n&&Tn()?sn(n):re(i,o,c),l=Zt(a||(n?Mn(n):Rn(i,e)));!function(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(Gt,n)}catch(t){}}(t,u,l)}(s,f,Tn()&&u?l:void 0);return l}(t,c,a,u);i&&e&&Yo(e)}))}function Yo(t){const{url:e}=an(t).data||{};if(!e||"string"!=typeof e)return;const n=bi("resource",(({entries:r})=>{r.forEach((r=>{if(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)}(r)&&r.name.endsWith(e)){(function(t){const{name:e,version:n}=function(t){let e="unknown",n="unknown",r="";for(const s of t){if("/"===s){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e="h"===r?"http":r,n=t.split(r)[1];break}r+=s}r===t&&(e=r);return{name:e,version:n}}(t.nextHopProtocol),r=[];if(r.push(["network.protocol.version",n],["network.protocol.name",e]),!gt)return r;return[...r,["http.request.redirect_start",Vo(t.redirectStart)],["http.request.fetch_start",Vo(t.fetchStart)],["http.request.domain_lookup_start",Vo(t.domainLookupStart)],["http.request.domain_lookup_end",Vo(t.domainLookupEnd)],["http.request.connect_start",Vo(t.connectStart)],["http.request.secure_connection_start",Vo(t.secureConnectionStart)],["http.request.connection_end",Vo(t.connectEnd)],["http.request.request_start",Vo(t.requestStart)],["http.request.response_start",Vo(t.responseStart)],["http.request.response_end",Vo(t.responseEnd)]]})(r).forEach((e=>t.setAttribute(...e))),setTimeout(n)}}))}))}function Vo(t=0){return((gt||performance.timeOrigin)+t)/1e3}function Qo(t){try{return new URL(t,ls.location.origin).href}catch(t){return}}const Zo={...Gn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Go};function tc(t,e,n){t.emit("startPageLoadSpan",e,n),Fe().setTransactionName(e.name);const r=yn();return"pageload"===(r&&an(r).op)?r:void 0}function ec(t,e){je().setPropagationContext(be()),Fe().setPropagationContext(be()),t.emit("startNavigationSpan",e),Fe().setTransactionName(e.name);const n=yn();return"navigation"===(n&&an(n).op)?n:void 0}function nc(t){const e=(n=`meta[name=${t}]`,x.document&&x.document.querySelector?x.document.querySelector(n):null);var n;return e?e.getAttribute("content"):void 0}const rc=()=>{},sc=["attachTo","createForm","createWidget","remove"],ic=Object.assign((t=>(D((()=>{console.warn("You are using feedbackIntegration() even though this bundle does not include feedback.")})),{name:"Feedback",...sc.reduce(((t,e)=>(t[e]=rc,t)),{})})),{_isShim:!0}),oc=T,cc="sentryReplaySession",ac="replay_event",uc="Unable to send Replay",lc=15e4,fc=5e3,hc=2e7,dc=36e5;function pc(t,e){return null!=t?t:e()}function mc(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}var yc;function gc(t){const e=mc([t,"optionalAccess",t=>t.host]);return Boolean(mc([e,"optionalAccess",t=>t.shadowRoot])===t)}function vc(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function bc(t){try{const n=t.rules||t.cssRules;return n?((e=Array.from(n,wc).join("")).includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e):null}catch(t){return null}var e}function wc(t){let e;if(function(t){return"styleSheet"in t}(t))try{e=bc(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}(t)}catch(t){}else if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":"))return function(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}(t.cssText);return e||t.cssText}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(yc||(yc={}));class kc{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;return pc(mc([this,"access",t=>t.getMeta,"call",e=>e(t),"optionalAccess",t=>t.id]),(()=>-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 e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Sc({maskInputOptions:t,tagName:e,type:n}){return"OPTION"===e&&(e="SELECT"),Boolean(t[e.toLowerCase()]||n&&t[n]||"password"===n||"INPUT"===e&&!n&&t.text)}function _c({isMasked:t,element:e,value:n,maskInputFn:r}){let s=n||"";return t?(r&&(s=r(s,e)),"*".repeat(s.length)):s}function Tc(t){return t.toLowerCase()}function Ic(t){return t.toUpperCase()}const xc="__rrweb_original__";function Cc(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Tc(e):null}function Ec(t,e,n){return"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}function Ac(t,e){let n;try{n=new URL(t,pc(e,(()=>window.location.href)))}catch(t){return null}return pc(mc([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",t=>t[1]]),(()=>null))}const Rc={};function Mc(t){const e=Rc[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const s=e.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(e)}catch(t){}return Rc[t]=r.bind(window)}function Oc(...t){return Mc("setTimeout")(...t)}function $c(...t){return Mc("clearTimeout")(...t)}let Dc=1;const Lc=new RegExp("[^a-z0-9-_:]"),Fc=-2;function jc(){return Dc++}let Nc,Pc;const Bc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Uc=/^(?:[a-z+]+:)?\/\//i,zc=/^www\..*/i,qc=/^(data:)([^,]*),(.*)/i;function Hc(t,e){return(t||"").replace(Bc,((t,n,r,s,i,o)=>{const c=r||i||o,a=n||s||"";if(!c)return t;if(Uc.test(c)||zc.test(c))return`url(${a}${c}${a})`;if(qc.test(c))return`url(${a}${c}${a})`;if("/"===c[0])return`url(${a}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+c}${a})`;const u=e.split("/"),l=c.split("/");u.pop();for(const t of l)"."!==t&&(".."===t?u.pop():u.push(t));return`url(${a}${u.join("/")}${a})`}))}const Wc=/^[^ \t\n\r\u000c]+/,Jc=/^[, \t\n\r\u000c]+/;function Kc(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function Gc(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function Xc(){const t=document.createElement("a");return t.href="",t.href}function Yc(t,e,n,r,s,i){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Kc(t,r):"background"!==n||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r;const s=t.exec(e.substring(n));return s?(r=s[0],n+=r.length,r):""}const s=[];for(;r(Jc),!(n>=e.length);){let i=r(Wc);if(","===i.slice(-1))i=Kc(t,i.substring(0,i.length-1)),s.push(i);else{let r="";i=Kc(t,i);let o=!1;for(;;){const t=e.charAt(n);if(""===t){s.push((i+r).trim());break}if(o)")"===t&&(o=!1);else{if(","===t){n+=1,s.push((i+r).trim());break}"("===t&&(o=!0)}r+=t,n+=1}}}return s.join(", ")}(t,r):"style"===n?Hc(r,Xc()):"object"===e&&"data"===n?Kc(t,r):"function"==typeof i?i(n,r,s):r:Kc(t,r):r}function Vc(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function Qc(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Qc(t.parentNode,e,n,r+1):-1}function Zc(t,e){return n=>{const r=n;if(null===r)return!1;try{if(t)if("string"==typeof t){if(r.matches(`.${t}`))return!0}else if(function(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}(r,t))return!0;return!(!e||!r.matches(e))}catch(t){return!1}}}function ta(t,e,n,r,s,i){try{const o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(null===o)return!1;if("INPUT"===o.tagName){const t=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(t))return!0}let c=-1,a=-1;if(i){if(a=Qc(o,Zc(r,s)),a<0)return!0;c=Qc(o,Zc(e,n),a>=0?a:1/0)}else{if(c=Qc(o,Zc(e,n)),c<0)return!1;a=Qc(o,Zc(r,s),c>=0?c:1/0)}return c>=0?!(a>=0)||c<=a:!(a>=0)&&!!i}catch(t){}return!!i}function ea(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:d,maskInputOptions:p={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:w,newlyAddedElement:k=!1}=e,S=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:yc.Document,childNodes:[],compatMode:t.compatMode}:{type:yc.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:yc.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:S};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:l={},inlineImages:f,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:m,maskAllText:y,maskTextClass:g,unmaskTextClass:v,maskTextSelector:b,unmaskTextSelector:w}=e,k=function(t,e,n,r){try{if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}if(n)return t.matches(n)}catch(t){}return!1}(t,r,s,i),S=function(t){if(t instanceof HTMLFormElement)return"form";const e=Tc(t.tagName);return Lc.test(e)?"div":e}(t);let _={};const T=t.attributes.length;for(let e=0;ee.href===t.href));let r=null;e&&(r=bc(e)),r&&(delete _.rel,delete _.href,_._cssText=Hc(r,e.href))}if("style"===S&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=bc(t.sheet);e&&(_._cssText=Hc(e,Xc()))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const e=t,n=Cc(e),r=Ec(e,Ic(S),n),s=e.checked;if("submit"!==n&&"button"!==n&&r){const t=ta(e,g,b,v,w,Sc({type:n,tagName:Ic(S),maskInputOptions:c}));_.value=_c({isMasked:t,element:e,value:r,maskInputFn:u})}s&&(_.checked=s)}"option"===S&&(t.selected&&!c.select?_.selected=!0:delete _.selected);if("canvas"===S&&h)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n0!==t)))return!1}return!0})(t)||(_.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){const e=t.toDataURL(l.type,l.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height;e!==n.toDataURL(l.type,l.quality)&&(_.rr_dataURL=e)}if("img"===S&&f){Nc||(Nc=n.createElement("canvas"),Pc=Nc.getContext("2d"));const e=t,r=e.crossOrigin;e.crossOrigin="anonymous";const s=()=>{e.removeEventListener("load",s);try{Nc.width=e.naturalWidth,Nc.height=e.naturalHeight,Pc.drawImage(e,0,0),_.rr_dataURL=Nc.toDataURL(l.type,l.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}r?_.crossOrigin=r:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?s():e.addEventListener("load",s)}"audio"!==S&&"video"!==S||(_.rr_mediaState=t.paused?"paused":"played",_.rr_mediaCurrentTime=t.currentTime);p||(t.scrollLeft&&(_.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(_.rr_scrollTop=t.scrollTop));if(k){const{width:e,height:n}=t.getBoundingClientRect();_={class:_.class,rr_width:`${e}px`,rr_height:`${n}px`}}"iframe"!==S||d(_.src)||(k||t.contentDocument||(_.rr_src=_.src),delete _.src);let I;try{customElements.get(S)&&(I=!0)}catch(t){}return{type:yc.Element,tagName:S,attributes:_,childNodes:[],isSVG:Gc(t)||void 0,needBlock:k,rootId:m,isCustom:I}}(t,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:d,maskAttributeFn:a,maskInputOptions:p,maskInputFn:y,dataURLOptions:g,inlineImages:v,recordCanvas:b,keepIframeSrcFn:w,newlyAddedElement:k,rootId:S,maskAllText:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h});case t.TEXT_NODE:return function(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:a,maskInputFn:u,rootId:l}=e,f=t.parentNode&&t.parentNode.tagName;let h=t.textContent;const d="STYLE"===f||void 0,p="SCRIPT"===f||void 0,m="TEXTAREA"===f||void 0;if(d&&h){try{t.nextSibling||t.previousSibling||mc([t,"access",t=>t.parentNode,"access",t=>t.sheet,"optionalAccess",t=>t.cssRules])&&(h=bc(t.parentNode.sheet))}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}h=Hc(h,Xc())}p&&(h="SCRIPT_PLACEHOLDER");const y=ta(t,r,i,s,o,n);d||p||m||!h||!y||(h=c?c(h,t.parentElement):h.replace(/[\S]/g,"*"));m&&h&&(a.textarea||y)&&(h=u?u(h,t.parentNode):h.replace(/[\S]/g,"*"));if("OPTION"===f&&h){h=_c({isMasked:ta(t,r,i,s,o,Sc({type:null,tagName:f,maskInputOptions:a})),element:t,value:h,maskInputFn:u})}return{type:yc.Text,textContent:h||"",isStyle:d,rootId:l}}(t,{maskAllText:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,maskTextFn:m,maskInputOptions:p,maskInputFn:y,rootId:S});case t.CDATA_SECTION_NODE:return{type:yc.CDATA,textContent:"",rootId:S};case t.COMMENT_NODE:return{type:yc.Comment,textContent:t.textContent||"",rootId:S};default:return!1}}function na(t){return null==t?"":t.toLowerCase()}function ra(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:h=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b={},inlineImages:w=!1,recordCanvas:k=!1,onSerialize:S,onIframeLoad:_,iframeLoadTimeout:T=5e3,onStylesheetLoad:I,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:C=(()=>!1),newlyAddedElement:E=!1}=e;let{preserveWhiteSpace:A=!0}=e;const R=ea(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:b,inlineImages:w,recordCanvas:k,keepIframeSrcFn:C,newlyAddedElement:E});if(!R)return console.warn(t,"not serialized"),null;let M;M=r.hasNode(t)?r.getId(t):!function(t,e){if(e.comment&&t.type===yc.Comment)return!0;if(t.type===yc.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Ac(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(na(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===na(t.attributes.name)||"icon"===na(t.attributes.rel)||"apple-touch-icon"===na(t.attributes.rel)||"shortcut icon"===na(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&na(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(na(t.attributes.property).match(/^(og|twitter|fb):/)||na(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===na(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===na(t.attributes.name)||"googlebot"===na(t.attributes.name)||"bingbot"===na(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===na(t.attributes.name)||"generator"===na(t.attributes.name)||"framework"===na(t.attributes.name)||"publisher"===na(t.attributes.name)||"progid"===na(t.attributes.name)||na(t.attributes.property).match(/^article:/)||na(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===na(t.attributes.name)||"yandex-verification"===na(t.attributes.name)||"csrf-token"===na(t.attributes.name)||"p:domain_verify"===na(t.attributes.name)||"verify-v1"===na(t.attributes.name)||"verification"===na(t.attributes.name)||"shopify-checkout-api-token"===na(t.attributes.name)))return!0}}return!1}(R,v)&&(A||R.type!==yc.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?jc():Fc;const O=Object.assign(R,{id:M});if(r.add(t,O),M===Fc)return null;S&&S(t);let $=!h;if(O.type===yc.Element){$=$&&!O.needBlock,delete O.needBlock;const e=t.shadowRoot;e&&vc(e)&&(O.isShadowHost=!0)}if((O.type===yc.Document||O.type===yc.Element)&&$){v.headWhitespace&&O.type===yc.Element&&"head"===O.tagName&&(A=!1);const e={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:h,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:w,recordCanvas:k,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:C};for(const n of Array.from(t.childNodes)){const t=ra(n,e);t&&O.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const r=ra(n,e);r&&(vc(t.shadowRoot)&&(r.isShadow=!0),O.childNodes.push(r))}}return t.parentNode&&gc(t.parentNode)&&vc(t.parentNode)&&(O.isShadow=!0),O.type===yc.Element&&"iframe"===O.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let s,i=!1;try{s=r.document.readyState}catch(t){return}if("complete"!==s){const r=Oc((()=>{i||(e(),i=!0)}),n);return void t.addEventListener("load",(()=>{$c(r),i=!0,e()}))}const o="about:blank";if(r.location.href!==o||t.src===o||""===t.src)return Oc(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,(()=>{const e=t.contentDocument;if(e&&_){const n=ra(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:w,recordCanvas:k,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:C});n&&_(t,n)}}),T),O.type===yc.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===Ac(O.attributes.href))&&function(t,e,n){let r,s=!1;try{r=t.sheet}catch(t){return}if(r)return;const i=Oc((()=>{s||(e(),s=!0)}),n);t.addEventListener("load",(()=>{$c(i),s=!0,e()}))}(t,(()=>{if(I){const e=ra(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:w,recordCanvas:k,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:C});e&&I(t,e)}}),x),O}function sa(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}function ia(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const oa="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let ca={map:{},getId:()=>(console.error(oa),-1),getNode:()=>(console.error(oa),null),removeNodeFromMap(){console.error(oa)},has:()=>(console.error(oa),!1),reset(){console.error(oa)}};function aa(t,e,n={}){let r=null,s=0;return function(...i){const o=Date.now();s||!1!==n.leading||(s=o);const c=e-(o-s),a=this;c<=0||c>e?(r&&(!function(...t){Ea("clearTimeout")(...t)}(r),r=null),s=o,t.apply(a,i)):r||!1===n.trailing||(r=Aa((()=>{s=!1===n.leading?0:Date.now(),r=null,t.apply(a,i)}),c))}}function ua(t,e,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(t){Aa((()=>{n.set.call(this,t)}),0),i&&i.set&&i.set.call(this,t)}}),()=>ua(t,e,i||{},!0)}function la(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch(t){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ca=new Proxy(ca,{get:(t,e,n)=>("map"===e&&console.error(oa),Reflect.get(t,e,n))}));let fa=Date.now;function ha(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:sa([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollLeft])||sa([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollLeft])||sa([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:sa([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollTop])||sa([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollTop])||sa([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollTop])||0}}function da(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function pa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ma(t){if(!t)return null;return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}function ya(t,e,n,r,s){if(!t)return!1;const i=ma(t);if(!i)return!1;const o=Zc(e,n);if(!s){const t=r&&i.matches(r);return o(i)&&!t}const c=Qc(i,o);let a=-1;return!(c<0)&&(r&&(a=Qc(i,Zc(null,r))),c>-1&&a<0||ct.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(fa=()=>(new Date).getTime());class _a{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return e=this.styleIDMap.get(t),n=()=>-1,null!=e?e:n();var e,n}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}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 Ta(t){let e=null;return sa([t,"access",t=>t.getRootNode,"optionalCall",t=>t(),"optionalAccess",t=>t.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function Ia(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=Ta(n);)n=e;return n}(t);return e.contains(n)}function xa(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||Ia(t))}const Ca={};function Ea(t){const e=Ca[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const s=e.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(e)}catch(t){}return Ca[t]=r.bind(window)}function Aa(...t){return Ea("setTimeout")(...t)}var Ra=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Ra||{}),Ma=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Ma||{}),Oa=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Oa||{}),$a=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))($a||{});function Da(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}function La(t){return"__ln"in t}class Fa{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 e=this.head;for(let n=0;nt.next])||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&La(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&La(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const ja=(t,e)=>`${t}@${e}`;class Na{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,n=new Fa,r=t=>{let e=t,n=Fc;for(;n===Fc;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},s=s=>{if(!s.parentNode||!xa(s))return;const i=gc(s.parentNode)?this.mirror.getId(Ta(s)):this.mirror.getId(s.parentNode),o=r(s);if(-1===i||-1===o)return n.addNode(s);const c=ra(s,{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:t=>{wa(t,this.mirror)&&!ya(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(t),ka(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Sa(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(t,e)=>{ya(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(t,e),t.contentWindow&&this.canvasManager.addWindow(t.contentWindow),this.shadowDomManager.observeAttachShadow(t))},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});c&&(t.push({parentId:i,nextId:o,node:c}),e.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)Ba(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||s(t);for(const t of this.addedSet)za(this.droppedSet,t)||Ba(this.removes,t,this.mirror)?za(this.movedSet,t)?s(t):this.droppedSet.add(t):s(t);let i=null;for(;n.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==e&&-1!==n&&(t=i)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==e){t=n;break}{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;if(-1!==this.mirror.getId(r)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}i=t.previous,n.removeNode(t.value),s(t.value)}const o={texts:this.texts.map((t=>({id:this.mirror.getId(t.node),value:t.value}))).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{const{attributes:e}=t;if("string"==typeof e.style){const n=JSON.stringify(t.styleDiff),r=JSON.stringify(t.$t);n.length!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=t=>{if(!ga(t.target,this.mirror))switch(t.type){case"characterData":{const e=t.target.textContent;ya(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||e===t.oldValue||this.texts.push({value:ta(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e,ma(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=t.attributeName,r=t.target.getAttribute(n);if("value"===n){const n=Cc(e),s=e.tagName;r=Ec(e,s,n);const i=Sc({maskInputOptions:this.maskInputOptions,tagName:s,type:n});r=_c({isMasked:ta(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:e,value:r,maskInputFn:this.maskInputFn})}if(ya(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===t.oldValue)return;let s=this.attributeMap.get(t.target);if("IFRAME"===e.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(e.contentDocument)return;n="rr_src"}if(s||(s={node:t.target,attributes:{},styleDiff:{},$t:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),"type"===n&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),!Vc(e.tagName,n)&&(s.attributes[n]=Yc(this.doc,Tc(e.tagName),Tc(n),r,e,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue);for(const t of Array.from(e.style)){const r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);r!==n.style.getPropertyValue(t)||i!==n.style.getPropertyPriority(t)?s.styleDiff[t]=""===i?r:[r,i]:s.$t[t]=[r,i]}for(const t of Array.from(n.style))""===e.style.getPropertyValue(t)&&(s.styleDiff[t]=!1)}break}case"childList":if(ya(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{const n=this.mirror.getId(e),r=gc(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ya(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||ga(e,this.mirror)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Pa(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||va(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[ja(n,r)]?Pa(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!(!gc(t.target)||!vc(t.target))||void 0})),this.mapRemoves.push(e))}))}},this.genAdds=(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(ga(t,this.mirror))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[ja(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ya(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach((t=>this.genAdds(t))),Sa(t)&&t.shadowRoot.childNodes.forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,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((e=>{this[e]=t[e]}))}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 Pa(t,e){t.delete(e),e.childNodes.forEach((e=>Pa(t,e)))}function Ba(t,e,n){return 0!==t.length&&Ua(t,e,n)}function Ua(t,e,n){const{parentNode:r}=e;if(!r)return!1;const s=n.getId(r);return!!t.some((t=>t.id===s))||Ua(t,r,n)}function za(t,e){return 0!==t.size&&qa(t,e)}function qa(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||qa(t,n))}let Ha;function Wa(t){Ha=t}function Ja(){Ha=void 0}const Ka=t=>{if(!Ha)return t;return(...e)=>{try{return t(...e)}catch(t){if(Ha&&!0===Ha(t))return()=>{};throw t}}};function Ga(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const Xa=[];function Ya(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function Va(t,e){const n=new Na;Xa.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const s=Ga([window,"optionalAccess",t=>t.Zone,"optionalAccess",t=>t.__symbol__,"optionalCall",t=>t("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(Ka((e=>{t.onMutation&&!1===t.onMutation(e)||n.processMutations.bind(n)(e)})));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Qa({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const c=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let u=null;return Object.keys(Oa).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==c[t])).forEach((o=>{let c=Tc(o);const l=(e=>o=>{const c=Ya(o);if(ya(c,r,s,i,!0))return;let a=null,l=e;if("pointerType"in o){switch(o.pointerType){case"mouse":a=$a.Mouse;break;case"touch":a=$a.Touch;break;case"pen":a=$a.Pen}a===$a.Touch&&(Oa[e]===Oa.MouseDown?l="TouchStart":Oa[e]===Oa.MouseUp&&(l="TouchEnd"))}else ba(o)&&(a=$a.Touch);null!==a?(u=a,(l.startsWith("Touch")&&a===$a.Touch||l.startsWith("Mouse")&&a===$a.Mouse)&&(a=null)):Oa[e]===Oa.Click&&(a=u,u=null);const f=ba(o)?o.changedTouches[0]:o;if(!f)return;const h=n.getId(c),{clientX:d,clientY:p}=f;Ka(t)({type:Oa[l],id:h,x:d,y:p,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(Oa[o]){case Oa.MouseDown:case Oa.MouseUp:c=c.replace("mouse","pointer");break;case Oa.TouchStart:case Oa.TouchEnd:return}a.push(ia(c,l,e))})),Ka((()=>{a.forEach((t=>t()))}))}function Za({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){return ia("scroll",Ka(aa(Ka((o=>{const c=Ya(o);if(!c||ya(c,r,s,i,!0))return;const a=n.getId(c);if(c===e&&e.defaultView){const n=ha(e.defaultView);t({id:a,x:n.left,y:n.top})}else t({id:a,x:c.scrollLeft,y:c.scrollTop})})),o.scroll||100)),e)}const tu=["INPUT","TEXTAREA","SELECT"],eu=new WeakMap;function nu({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:l,userTriggeredOnInput:f,maskTextClass:h,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m}){function y(t){let n=Ya(t);const l=t.isTrusted,y=n&&Ic(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||tu.indexOf(y)<0||ya(n,r,s,i,!0))return;const v=n;if(v.classList.contains(o)||c&&v.matches(c))return;const b=Cc(n);let w=Ec(v,y,b),k=!1;const S=Sc({maskInputOptions:a,tagName:y,type:b}),_=ta(n,h,p,d,m,S);"radio"!==b&&"checkbox"!==b||(k=n.checked),w=_c({isMasked:_,element:n,value:w,maskInputFn:u}),g(n,f?{text:w,isChecked:k,userTriggered:l}:{text:w,isChecked:k});const T=n.name;"radio"===b&&T&&k&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach((t=>{if(t!==n){const e=_c({isMasked:_,element:t,value:Ec(t,y,b),maskInputFn:u});g(t,f?{text:e,isChecked:!k,userTriggered:!1}:{text:e,isChecked:!k})}}))}function g(e,r){const s=eu.get(e);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){eu.set(e,r);const s=n.getId(e);Ka(t)({...r,id:s})}}const v=("last"===l.input?["change"]:["input","change"]).map((t=>ia(t,Ka(y),e))),b=e.defaultView;if(!b)return()=>{v.forEach((t=>t()))};const w=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),k=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&v.push(...k.map((t=>ua(t[0],t[1],{set(){Ka(y)({target:this,isTrusted:!1})}},!1,b)))),Ka((()=>{v.forEach((t=>t()))}))}function ru(t){return function(t,e){if(cu("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||cu("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||cu("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||cu("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function su(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function iu({mirror:t,stylesheetManager:e},n){let r=null;r="#document"===n.nodeName?t.getId(n):t.getId(n.host);const s="#document"===n.nodeName?Ga([n,"access",t=>t.defaultView,"optionalAccess",t=>t.Document]):Ga([n,"access",t=>t.ownerDocument,"optionalAccess",t=>t.defaultView,"optionalAccess",t=>t.ShadowRoot]),i=Ga([s,"optionalAccess",t=>t.prototype])?Object.getOwnPropertyDescriptor(Ga([s,"optionalAccess",t=>t.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&i?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Ga([i,"access",t=>t.get,"optionalAccess",t=>t.call,"call",t=>t(this)])},set(t){const n=Ga([i,"access",t=>t.set,"optionalAccess",t=>t.call,"call",e=>e(this,t)]);if(null!==r&&-1!==r)try{e.adoptStyleSheets(t,r)}catch(t){}return n}}),Ka((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))):()=>{}}function ou(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let r;t.recordDOM&&(r=Va(t,t.doc));const s=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const s="number"==typeof e.mousemove?e.mousemove:50,i="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let o,c=[];const a=aa(Ka((e=>{const n=Date.now()-o;t(c.map((t=>(t.timeOffset-=n,t))),e),c=[],o=null})),i),u=Ka(aa(Ka((t=>{const e=Ya(t),{clientX:n,clientY:s}=ba(t)?t.changedTouches[0]:t;o||(o=fa()),c.push({x:n,y:s,id:r.getId(e),timeOffset:fa()-o}),a("undefined"!=typeof DragEvent&&t instanceof DragEvent?Ma.Drag:t instanceof MouseEvent?Ma.MouseMove:Ma.TouchMove)})),s,{trailing:!1})),l=[ia("mousemove",u,n),ia("touchmove",u,n),ia("drag",u,n)];return Ka((()=>{l.forEach((t=>t()))}))}(t),i=Qa(t),o=Za(t),c=function({viewportResizeCb:t},{win:e}){let n=-1,r=-1;return ia("resize",Ka(aa(Ka((()=>{const e=da(),s=pa();n===e&&r===s||(t({width:Number(s),height:Number(e)}),n=e,r=s)})),200)),e)}(t,{win:n}),a=nu(t),u=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const c=Ka((o=>aa(Ka((i=>{const c=Ya(i);if(!c||ya(c,e,n,r,!0))return;const{currentTime:a,volume:u,muted:l,playbackRate:f}=c;t({type:o,id:s.getId(c),currentTime:a,volume:u,muted:l,playbackRate:f})})),i.media||500))),a=[ia("play",c(0),o),ia("pause",c(1),o),ia("seeked",c(2),o),ia("volumechange",c(3),o),ia("ratechange",c(4),o)];return Ka((()=>{a.forEach((t=>t()))}))}(t);let l=()=>{},f=()=>{},h=()=>{},d=()=>{};t.recordDOM&&(l=function({styleSheetRuleCb:t,mirror:e,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:Ka(((r,s,i)=>{const[o,c]=i,{id:a,styleId:u}=su(s,e,n.styleMirror);return(a&&-1!==a||u&&-1!==u)&&t({id:a,styleId:u,adds:[{rule:o,index:c}]}),r.apply(s,i)}))});const i=r.CSSStyleSheet.prototype.deleteRule;let o,c;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Ka(((r,s,i)=>{const[o]=i,{id:c,styleId:a}=su(s,e,n.styleMirror);return(c&&-1!==c||a&&-1!==a)&&t({id:c,styleId:a,removes:[{index:o}]}),r.apply(s,i)}))}),r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Ka(((r,s,i)=>{const[o]=i,{id:c,styleId:a}=su(s,e,n.styleMirror);return(c&&-1!==c||a&&-1!==a)&&t({id:c,styleId:a,replace:o}),r.apply(s,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:Ka(((r,s,i)=>{const[o]=i,{id:c,styleId:a}=su(s,e,n.styleMirror);return(c&&-1!==c||a&&-1!==a)&&t({id:c,styleId:a,replaceSync:o}),r.apply(s,i)}))}));const a={};au("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(au("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),au("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),au("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach((([r,s])=>{u[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(u[r].insertRule,{apply:Ka(((r,s,i)=>{const[o,c]=i,{id:a,styleId:u}=su(s.parentStyleSheet,e,n.styleMirror);return(a&&-1!==a||u&&-1!==u)&&t({id:a,styleId:u,adds:[{rule:o,index:[...ru(s),c||0]}]}),r.apply(s,i)}))}),s.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:Ka(((r,s,i)=>{const[o]=i,{id:c,styleId:a}=su(s.parentStyleSheet,e,n.styleMirror);return(c&&-1!==c||a&&-1!==a)&&t({id:c,styleId:a,removes:[{index:[...ru(s),o]}]}),r.apply(s,i)}))})})),Ka((()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(a).forEach((([t,e])=>{e.prototype.insertRule=u[t].insertRule,e.prototype.deleteRule=u[t].deleteRule}))}))}(t,{win:n}),f=iu(t,t.doc),h=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Ka(((s,o,c)=>{const[a,u,l]=c;if(n.has(a))return i.apply(o,[a,u,l]);const{id:f,styleId:h}=su(Ga([o,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);return(f&&-1!==f||h&&-1!==h)&&t({id:f,styleId:h,set:{property:a,value:u,priority:l},index:ru(o.parentRule)}),s.apply(o,c)}))});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Ka(((s,i,c)=>{const[a]=c;if(n.has(a))return o.apply(i,[a]);const{id:u,styleId:l}=su(Ga([i,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&t({id:u,styleId:l,remove:{property:a},index:ru(i.parentRule)}),s.apply(i,c)}))}),Ka((()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o}))}(t,{win:n}),t.collectFonts&&(d=function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(t,e,n){const r=new i(t,e,n);return s.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const o=la(e.fonts,"add",(function(e){return function(n){return Aa(Ka((()=>{const e=s.get(n);e&&(t(e),s.delete(n))})),0),e.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(o),Ka((()=>{r.forEach((t=>t()))}))}(t)));const p=function(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=t;let c=!0;const a=Ka((()=>{const t=e.getSelection();if(!t||c&&Ga([t,"optionalAccess",t=>t.isCollapsed]))return;c=t.isCollapsed||!1;const a=[],u=t.rangeCount||0;for(let e=0;e{}}(t),y=[];for(const e of t.plugins)y.push(e.observer(e.callback,n,e.options));return Ka((()=>{Xa.forEach((t=>t.reset())),Ga([r,"optionalAccess",t=>t.disconnect,"call",t=>t()]),s(),i(),o(),c(),a(),u(),l(),f(),h(),d(),p(),m(),y.forEach((t=>t()))}))}function cu(t){return void 0!==window[t]}function au(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class uu{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,e,n,r){const s=n||this.getIdToRemoteIdMap(t),i=r||this.getRemoteIdToIdMap(t);let o=s.get(e);return o||(o=this.generateIdFn(),s.set(e,o),i.set(o,e)),o}getIds(t,e){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,n,r)))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;const s=r.get(e);return s||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,n)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}function lu(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class fu{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new uu(jc),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new uu(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,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),lu([this,"access",t=>t.loadListener,"optionalCall",e=>e(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 e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const r=this.transformCrossOriginEvent(n,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case Ra.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:Ra.IncrementalSnapshot,data:{source:Ma.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ra.Meta:case Ra.Load:case Ra.DomContentLoaded:return!1;case Ra.Plugin:return e;case Ra.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Ra.IncrementalSnapshot:switch(e.data.source){case Ma.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Ma.Drag:case Ma.TouchMove:case Ma.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Ma.ViewportResize:return!1;case Ma.MediaInteraction:case Ma.MouseInteraction:case Ma.Scroll:case Ma.CanvasMutation:case Ma.Input:return this.replaceIds(e.data,t,["id"]),e;case Ma.StyleSheetRule:case Ma.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Ma.Font:return e;case Ma.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case Ma.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),lu([e,"access",t=>t.data,"access",t=>t.styles,"optionalAccess",t=>t.forEach,"call",e=>e((e=>{this.replaceStyleIds(e,t,["styleId"])}))]),e}}return!1}replace(t,e,n,r){for(const s of r)(Array.isArray(e[s])||"number"==typeof e[s])&&(Array.isArray(e[s])?e[s]=t.getIds(n,e[s]):e[s]=t.getId(n,e[s]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===yc.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}}class hu{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,e){if(!vc(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const n=Va({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Za({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Aa((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(iu({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(la(t.prototype,"attachShadow",(function(t){return function(r){const s=t.call(this,r);return this.shadowRoot&&xa(this)&&n.addShadowRoot(this.shadowRoot,e),s}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class du{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class pu{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new _a,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const n={id:e,styleIds:[]},r=[];for(const e of t){let t;this.styleMirror.has(e)?t=this.styleMirror.getId(e):(t=this.styleMirror.add(e),r.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,e)=>({rule:wc(t),index:e})))})),n.styleIds.push(t)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class mu{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...t){Ea("requestAnimationFrame")(...t)}((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some((t=>t!==e))}add(t,e){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let yu,gu;try{if(2!==Array.from([1],(t=>2*t))[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=ve([t,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const vu=new kc;function bu(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:f=null,maskTextSelector:h=null,unmaskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:v,maskInputFn:b,maskTextFn:w,maxCanvasSize:k=null,packFn:S,sampling:_={},dataURLOptions:T={},mousemoveWait:I,recordDOM:x=!0,recordCanvas:C=!1,recordCrossOriginIframes:E=!1,recordAfter:A=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:R=!1,collectFonts:M=!1,inlineImages:O=!1,plugins:$,keepIframeSrcFn:D=(()=>!1),ignoreCSSAttributes:L=new Set([]),errorHandler:F,onMutation:j,getCanvasManager:N}=t;Wa(F);const P=!E||window.parent===window;let B=!1;if(!P)try{window.parent.document&&(B=!1)}catch(t){B=!0}if(P&&!e)throw new Error("emit function is required");void 0!==I&&void 0===_.mousemove&&(_.mousemove=I),vu.reset();const U=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==y?y:{},z=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};let q;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let H=0;const W=t=>{for(const e of $||[])e.eventProcessor&&(t=e.eventProcessor(t));return S&&!B&&(t=S(t)),t};yu=(t,s)=>{const i=t;if(i.timestamp=fa(),!ve([Xa,"access",t=>t[0],"optionalAccess",t=>t.isFrozen,"call",t=>t()])||i.type===Ra.FullSnapshot||i.type===Ra.IncrementalSnapshot&&i.data.source===Ma.Mutation||Xa.forEach((t=>t.unfreeze())),P)ve([e,"optionalCall",t=>t(W(i),s)]);else if(B){const t={type:"rrweb",event:W(i),origin:window.location.origin,isCheckout:s};window.parent.postMessage(t,"*")}if(i.type===Ra.FullSnapshot)q=i,H=0;else if(i.type===Ra.IncrementalSnapshot){if(i.data.source===Ma.Mutation&&i.data.isAttachIframe)return;H++;const t=r&&H>=r,e=n&&q&&i.timestamp-q.timestamp>n;(t||e)&&tt(!0)}};const J=t=>{yu({type:Ra.IncrementalSnapshot,data:{source:Ma.Mutation,...t}})},K=t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.Scroll,...t}}),G=t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.CanvasMutation,...t}}),X=new pu({mutationCb:J,adoptedStyleSheetCb:t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.AdoptedStyleSheet,...t}})}),Y=new fu({mirror:vu,mutationCb:J,stylesheetManager:X,recordCrossOriginIframes:E,wrappedEmit:yu});for(const t of $||[])t.getMirror&&t.getMirror({nodeMirror:vu,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const V=new mu,Q=function(t,e){try{return t?t(e):new du}catch(t){return console.warn("Unable to initialize CanvasManager"),new du}}(N,{mirror:vu,win:window,mutationCb:t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.CanvasMutation,...t}}),recordCanvas:C,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:k,sampling:_.canvas,dataURLOptions:T,errorHandler:F}),Z=new hu({mutationCb:J,scrollCb:K,bypassOptions:{onMutation:j,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:U,dataURLOptions:T,maskAttributeFn:v,maskTextFn:w,maskInputFn:b,recordCanvas:C,inlineImages:O,sampling:_,slimDOMOptions:z,iframeManager:Y,stylesheetManager:X,canvasManager:Q,keepIframeSrcFn:D,processedNodeManager:V},mirror:vu}),tt=(t=!1)=>{if(!x)return;yu({type:Ra.Meta,data:{href:window.location.href,width:pa(),height:da()}},t),X.reset(),Z.init(),Xa.forEach((t=>t.lock()));const e=function(t,e){const{mirror:n=new kc,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:f=!0,inlineImages:h=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:w,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:I,keepIframeSrcFn:x=(()=>!1)}=e||{};return ra(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:c,unmaskTextClass:a,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===p?{}:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:b,inlineImages:h,recordCanvas:d,preserveWhiteSpace:w,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:_,onStylesheetLoad:T,stylesheetLoadTimeout:I,keepIframeSrcFn:x,newlyAddedElement:!1})}(document,{mirror:vu,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:p,maskAllInputs:U,maskAttributeFn:v,maskInputFn:b,maskTextFn:w,slimDOM:z,dataURLOptions:T,recordCanvas:C,inlineImages:O,onSerialize:t=>{wa(t,vu)&&Y.addIframe(t),ka(t,vu)&&X.trackLinkElement(t),Sa(t)&&Z.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{Y.attachIframe(t,e),t.contentWindow&&Q.addWindow(t.contentWindow),Z.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{X.attachLinkElement(t,e)},keepIframeSrcFn:D});if(!e)return console.warn("Failed to snapshot the document");yu({type:Ra.FullSnapshot,data:{node:e,initialOffset:ha(window)}}),Xa.forEach((t=>t.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,vu.getId(document))};gu=tt;try{const t=[],e=t=>Ka(ou)({onMutation:j,mutationCb:J,mousemoveCb:(t,e)=>yu({type:Ra.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.MouseInteraction,...t}}),scrollCb:K,viewportResizeCb:t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.ViewportResize,...t}}),inputCb:t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.Input,...t}}),mediaInteractionCb:t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.MediaInteraction,...t}}),styleSheetRuleCb:t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.StyleSheetRule,...t}}),styleDeclarationCb:t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.StyleDeclaration,...t}}),canvasMutationCb:G,fontCb:t=>yu({type:Ra.IncrementalSnapshot,data:{source:Ma.Font,...t}}),selectionCb:t=>{yu({type:Ra.IncrementalSnapshot,data:{source:Ma.Selection,...t}})},customElementCb:t=>{yu({type:Ra.IncrementalSnapshot,data:{source:Ma.CustomElement,...t}})},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:d,maskInputOptions:U,inlineStylesheet:p,sampling:_,recordDOM:x,recordCanvas:C,inlineImages:O,userTriggeredOnInput:R,collectFonts:M,doc:t,maskAttributeFn:v,maskInputFn:b,maskTextFn:w,keepIframeSrcFn:D,blockSelector:i,unblockSelector:o,slimDOMOptions:z,dataURLOptions:T,mirror:vu,iframeManager:Y,stylesheetManager:X,shadowDomManager:Z,processedNodeManager:V,canvasManager:Q,ignoreCSSAttributes:L,plugins:ve([$,"optionalAccess",t=>t.filter,"call",t=>t((t=>t.observer)),"optionalAccess",t=>t.map,"call",t=>t((t=>({observer:t.observer,options:t.options,callback:e=>yu({type:Ra.Plugin,data:{plugin:t.name,payload:e}})})))])||[]},{});Y.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}}));const n=()=>{tt(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(ia("DOMContentLoaded",(()=>{yu({type:Ra.DomContentLoaded,data:{}}),"DOMContentLoaded"===A&&n()}))),t.push(ia("load",(()=>{yu({type:Ra.Load,data:{}}),"load"===A&&n()}),window))),()=>{t.forEach((t=>t())),V.destroy(),gu=void 0,Ja()}}catch(t){console.warn(t)}}bu.mirror=vu,bu.takeFullSnapshot=function(t){if(!gu)throw new Error("please take full snapshot after start recording");gu(t)};const wu=3;function ku(t){return t>9999999999?t:1e3*t}function Su(t){return t>9999999999?t/1e3:t}function _u(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate((()=>(t.throttledAddEvent({type:Ra.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:jt(e,10,1e3)}}),"console"===e.category))))}const Tu="button,a";function Iu(t){return t.closest(Tu)||t}function xu(t){const e=Cu(t);return e&&e instanceof Element?Iu(e):e}function Cu(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let Eu;function Au(t){return Eu||(Eu=[],U(oc,"open",(function(t){return function(...e){if(Eu)try{Eu.forEach((t=>t()))}catch(t){}return t.apply(oc,e)}}))),Eu.push(t),()=>{const e=Eu?Eu.indexOf(t):-1;e>-1&&Eu.splice(e,1)}}const Ru=new Set([Ma.Mutation,Ma.StyleSheetRule,Ma.StyleDeclaration,Ma.AdoptedStyleSheet,Ma.CanvasMutation,Ma.Selection,Ma.MediaInteraction]);class Mu{constructor(t,e,n=_u){this.Dt=0,this.Lt=0,this.Ft=[],this.jt=e.timeout/1e3,this.Nt=e.threshold/1e3,this.Pt=e.scrollTimeout/1e3,this._replay=t,this.Bt=e.ignoreSelector,this.Ut=n}addListeners(){const t=Au((()=>{this.Dt=$u()}));this.zt=()=>{t(),this.Ft=[],this.Dt=0,this.Lt=0}}removeListeners(){this.zt&&this.zt(),this.qt&&clearTimeout(this.qt)}handleClick(t,e){if(function(t,e){if(!Ou.includes(t.tagName))return!0;if("INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||""))return!0;if("A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))return!0;if(e&&t.matches(e))return!0;return!1}(e,this.Bt)||!function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t))return;const n={timestamp:Su(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};this.Ft.some((t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1))||(this.Ft.push(n),1===this.Ft.length&&this.Ht())}registerMutation(t=Date.now()){this.Dt=Su(t)}registerScroll(t=Date.now()){this.Lt=Su(t)}registerClick(t){const e=Iu(t);this.Wt(e)}Wt(t){this.Jt(t).forEach((t=>{t.clickCount++}))}Jt(t){return this.Ft.filter((e=>e.node===t))}Kt(){const t=[],e=$u();this.Ft.forEach((n=>{!n.mutationAfter&&this.Dt&&(n.mutationAfter=n.timestamp<=this.Dt?this.Dt-n.timestamp:void 0),!n.scrollAfter&&this.Lt&&(n.scrollAfter=n.timestamp<=this.Lt?this.Lt-n.timestamp:void 0),n.timestamp+this.jt<=e&&t.push(n)}));for(const e of t){const t=this.Ft.indexOf(e);t>-1&&(this.Gt(e),this.Ft.splice(t,1))}this.Ft.length&&this.Ht()}Gt(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this.Pt,r=t.mutationAfter&&t.mutationAfter<=this.Nt,s=!n&&!r,{clickCount:i,clickBreadcrumb:o}=t;if(s){const n=1e3*Math.min(t.mutationAfter||this.jt,this.jt),r=n<1e3*this.jt?"mutation":"timeout",s={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:oc.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this.Ut(e,s)}else if(i>1){const t={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:oc.location.href,route:e.getCurrentRoute(),clickCount:i,metric:!0}};this.Ut(e,t)}}Ht(){this.qt&&clearTimeout(this.qt),this.qt=ro((()=>this.Kt()),1e3)}}const Ou=["A","BUTTON","INPUT"];function $u(){return Date.now()/1e3}function Du(t,e){try{if(!function(t){return t.type===wu}(e))return;const{source:n}=e.data;if(Ru.has(n)&&t.registerMutation(e.timestamp),n===Ma.Scroll&&t.registerScroll(e.timestamp),function(t){return t.data.source===Ma.MouseInteraction}(e)){const{type:n,id:r}=e.data,s=bu.mirror.getNode(r);s instanceof HTMLElement&&n===Oa.Click&&t.registerClick(s)}}catch(t){}}function Lu(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var Fu;!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(Fu||(Fu={}));const ju=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Nu(t){const e={};!t["data-sentry-component"]&&t["data-sentry-element"]&&(t["data-sentry-component"]=t["data-sentry-element"]);for(const n in t)if(ju.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}const Pu=t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?xu(t.event):Cu(t.event),n=E(r,{maxStringLength:200})||""}catch(t){n=""}return{target:r,message:n}}(t);return Lu({category:`ui.${t.name}`,...Bu(e,n)})}(e);if(!n)return;const r="click"===e.name,s=r?e.event:void 0;var i,o,c;!(r&&t.clickDetector&&s&&s.target)||s.altKey||s.metaKey||s.ctrlKey||s.shiftKey||(i=t.clickDetector,o=n,c=xu(e.event),i.handleClick(o,c)),_u(t,n)};function Bu(t,e){const n=bu.mirror.getId(t),r=n&&bu.mirror.getNode(n),s=r&&bu.mirror.getMeta(r),i=s&&function(t){return t.type===Fu.Element}(s)?s:null;return{message:e,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map((t=>t.type===Fu.Text&&t.textContent)).filter(Boolean).map((t=>t.trim())).join(""),attributes:Nu(i.attributes)}}:{}}}function Uu(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=t;if(!o||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(o)||!i)return null;const c=e||r||s,a=1===i.length;if(!c&&a)return null;const u=E(o,{maxStringLength:200})||"",l=Bu(o,u);return Lu({category:"ui.keyDown",message:u,data:{...l.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}(e);n&&_u(t,n)}const zu={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:c,responseStatus:a,transferSize:u}=t;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${e}.${n}`,start:Wu(i),end:Wu(s),name:r,data:{size:u,statusCode:a,decodedBodySize:o,encodedBodySize:c}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:s}=t,i=Wu(s);return{type:n,name:r,start:i,end:i+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:l,loadEventEnd:f,redirectCount:h,startTime:d,transferSize:p,type:m}=t;if(0===s)return null;return{type:`${e}.${m}`,start:Wu(d),end:Wu(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:l,loadEventEnd:f,domComplete:i,redirectCount:h}}}};function qu(t,e){return({metric:n})=>{e.replayPerformanceEntries.push(t(n))}}function Hu(t){const e=zu[t.entryType];return e?e(t):null}function Wu(t){return((gt||oc.performance.timeOrigin)+t)/1e3}function Ju(t){const e=t.entries[t.entries.length-1];return Vu(t,"largest-contentful-paint",e&&e.element?[e.element]:void 0)}function Ku(t){return void 0!==t.sources}function Gu(t){const e=[],n=[];for(const r of t.entries)if(Ku(r)){const t=[];for(const e of r.sources)if(e.node){n.push(e.node);const r=bu.mirror.getId(e.node);r&&t.push(r)}e.push({value:r.value,nodeIds:t.length?t:void 0})}return Vu(t,"cumulative-layout-shift",n,e)}function Xu(t){const e=t.entries[t.entries.length-1];return Vu(t,"first-input-delay",e&&e.target?[e.target]:void 0)}function Yu(t){const e=t.entries[t.entries.length-1];return Vu(t,"interaction-to-next-paint",e&&e.target?[e.target]:void 0)}function Vu(t,e,n,r){const s=t.value,i=t.rating,o=Wu(s);return{type:"web-vital",name:e,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map((t=>bu.mirror.getId(t))):void 0,attributions:r}}}const Qu='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<>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>h]=l}else for(o=new n(i),a=0;a>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;ad&&(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<e))break;p+=m-(1<>=y;p>0;){var M=o[a].s;g[M]=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>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a4&&!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+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<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;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=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&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(r){for(var e=new t(n.length),i=0;i>1)),o=0,f=function(t){s[o++]=t};for(i=0;is.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';class Zu extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class tl{constructor(){this.events=[],this.Xt=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this.Xt+=e,this.Xt>hc)throw new Zu;this.events.push(t)}finish(){return new Promise((t=>{const e=this.events;this.clear(),t(JSON.stringify(e))}))}clear(){this.events=[],this.Xt=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map((t=>t.timestamp)).sort()[0];return t?ku(t):null}}class el{constructor(t){this.Yt=t,this.Vt=0}ensureReady(){return this.Qt||(this.Qt=new Promise(((t,e)=>{this.Yt.addEventListener("message",(({data:n})=>{n.success?t():e()}),{once:!0}),this.Yt.addEventListener("error",(t=>{e(t)}),{once:!0})}))),this.Qt}destroy(){this.Yt.terminate()}postMessage(t,e){const n=this.Zt();return new Promise(((r,s)=>{const i=({data:e})=>{const o=e;o.method===t&&o.id===n&&(this.Yt.removeEventListener("message",i),o.success?r(o.response):s(new Error("Error in compression worker")))};this.Yt.addEventListener("message",i),this.Yt.postMessage({id:n,method:t,arg:e})}))}Zt(){return this.Vt++}}class nl{constructor(t){this.Yt=new el(t),this.te=null,this.Xt=0,this.hasCheckout=!1}get hasEvents(){return!!this.te}get type(){return"worker"}ensureReady(){return this.Yt.ensureReady()}destroy(){this.Yt.destroy()}addEvent(t){const e=ku(t.timestamp);(!this.te||ehc?Promise.reject(new Zu):this.ee(n)}finish(){return this.ne()}clear(){this.te=null,this.Xt=0,this.hasCheckout=!1,this.Yt.postMessage("clear").then(null,(t=>{}))}getEarliestTimestamp(){return this.te}ee(t){return this.Yt.postMessage("addEvent",t)}async ne(){const t=await this.Yt.postMessage("finish");return this.te=null,this.Xt=0,t}}class rl{constructor(t){this.re=new tl,this.se=new nl(t),this.ie=this.re,this.oe=this.ce()}get type(){return this.ie.type}get hasEvents(){return this.ie.hasEvents}get hasCheckout(){return this.ie.hasCheckout}set hasCheckout(t){this.ie.hasCheckout=t}destroy(){this.re.destroy(),this.se.destroy()}clear(){return this.ie.clear()}getEarliestTimestamp(){return this.ie.getEarliestTimestamp()}addEvent(t){return this.ie.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this.ie.finish()}ensureWorkerIsLoaded(){return this.oe}async ce(){try{await this.se.ensureReady()}catch(t){return}await this.ae()}async ae(){const{events:t,hasCheckout:e}=this.re,n=[];for(const e of t)n.push(this.se.addEvent(e));this.se.hasCheckout=e,this.ie=this.se;try{await Promise.all(n)}catch(t){}}}function sl({useCompression:t,workerUrl:e}){if(t&&window.Worker){const t=function(t){try{const e=t||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const t=new Blob([Qu]);return URL.createObjectURL(t)}();return""}();if(!e)return;const n=new Worker(e);return new rl(n)}catch(t){}}(e);if(t)return t}return new tl}function il(){try{return"sessionStorage"in oc&&!!oc.sessionStorage}catch(t){return!1}}function ol(t){!function(){if(!il())return;try{oc.sessionStorage.removeItem(cc)}catch(t){}}(),t.session=void 0}function cl(t){return void 0!==t&&Math.random()t.getContext().initialTimestamp+t.getOptions().maxReplayDuration)}function vl(t){return!t.type}function bl(t){return"transaction"===t.type}function wl(t){return"feedback"===t.type}function kl(t){return(e,n)=>{if(!t.isEnabled()||!vl(e)&&!bl(e))return;const r=n&&n.statusCode;!r||r<200||r>=300||(bl(e)?function(t,e){const n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}(t,e):function(t,e){const n=t.getContext();e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id);if("buffer"!==t.recordingMode||!e.tags||!e.tags.replayId)return;const{beforeErrorSampling:r}=t.getOptions();if("function"==typeof r&&!r(e))return;ro((()=>{t.sendBufferedReplayOrFlush()}))}(t,e))}}function Sl(t){return e=>{t.isEnabled()&&vl(e)&&function(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0]&&e.exception.values[0].value;if("string"!=typeof n)return;if(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){_u(t,Lu({category:"replay.hydrate-error",data:{url:R()}}))}}(t,e)}}function _l(t){const e=Be();e&&e.on("beforeAddBreadcrumb",(e=>function(t,e){if(!t.isEnabled()||!Tl(e))return;const n=function(t){if(!Tl(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return Lu(t);let n=!1;const r=e.map((t=>{if(!t)return t;if("string"==typeof t)return t.length>fc?(n=!0,`${t.slice(0,fc)}…`):t;if("object"==typeof t)try{const e=jt(t,7);return JSON.stringify(e).length>fc?(n=!0,`${JSON.stringify(e,null,2).slice(0,fc)}…`):e}catch(t){}return t}));return Lu({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t);return Lu(t)}(e);n&&_u(t,n)}(t,e)))}function Tl(t){return!!t.category}function Il(t){return Object.assign(((e,n)=>{if(!t.isEnabled()||t.isPaused())return e;if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!vl(e)&&!bl(e)&&!wl(e))return e;if(!t.checkAndHandleExpiredSession())return e;if(wl(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),function(t,e){t.triggerUserActivity(),t.addUpdate((()=>!e.timestamp||(t.throttledAddEvent({type:Ra.Custom,timestamp:1e3*e.timestamp,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1)))}(t,e),e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length||!e.originalException||!e.originalException.__rrweb__)}(e,n)&&!t.getOptions()._experiments.captureExceptions)return null;const r=function(t,e){return"buffer"===t.recordingMode&&e.message!==uc&&!(!e.exception||e.type)&&cl(t.getOptions().errorSampleRate)}(t,e);return(r||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),e}),{id:"Replay"})}function xl(t,e){return e.map((({type:e,start:n,end:r,name:s,data:i})=>{const o=t.throttledAddEvent({type:Ra.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:s,startTimestamp:n,endTimestamp:r,data:i}}});return"string"==typeof o?Promise.resolve(null):o}))}function Cl(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate((()=>(xl(t,[n]),!1))))}}function El(t,e){t.isEnabled()&&(null!==e&&(Fr(e.name,Be())||t.addUpdate((()=>(xl(t,[e]),!0)))))}function Al(t){if(!t)return;const e=new TextEncoder;try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=jl(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(t){}}function Rl(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Ml(t){try{if("string"==typeof t)return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[jl(t)];if(!t)return[void 0]}catch(t){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}function Ol(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function $l(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:c,response:a}=e;return{type:t,start:n/1e3,end:r/1e3,name:s,data:G({method:i,statusCode:o,request:c,response:a})}}function Dl(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Ll(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:s,warnings:i}=function(t){if(!t||"string"!=typeof t)return{body:t};const e=t.length>lc,n=function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t);if(e){const e=t.slice(0,lc);return n?{body:e,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${e}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch(t){}return{body:t}}(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function Fl(t,e){return Object.entries(t).reduce(((n,[r,s])=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=s),n}),{})}function jl(t){return new URLSearchParams(t).toString()}function Nl(t,e){const n=function(t,e=oc.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(oc.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;if(!t.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(t);return g(n,e)}async function Pl(t,e,n){try{const r=await async function(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=e,{url:o,method:c,status_code:a=0,request_body_size:u,response_body_size:l}=t.data,f=Nl(o,n.networkDetailAllowUrls)&&!Nl(o,n.networkDetailDenyUrls),h=f?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const s=n?function(t,e){if(1===t.length&&"string"!=typeof t[0])return zl(t[0],e);if(2===t.length)return zl(t[1],e);return{}}(n,e):{};if(!t)return Ll(s,r,void 0);const i=Bl(n),[o,c]=Ml(i),a=Ll(s,r,o);if(c)return Ol(a,c);return a}(n,e.input,u):Dl(u),d=await async function(t,{networkCaptureBodies:e,networkResponseHeaders:n},r,s){if(!t&&void 0!==s)return Dl(s);const i=r?Ul(r.headers,n):{};if(!r||!e&&void 0!==s)return Ll(i,s,void 0);const[o,c]=await async function(t){const e=function(t){try{return t.clone()}catch(t){}}(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{const t=await function(t){return new Promise(((e,n)=>{const r=ro((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(t){return await t.text()})(t).then((t=>e(t)),(t=>n(t))).finally((()=>clearTimeout(r)))}))}(e);return[t]}catch(t){return[void 0,"BODY_PARSE_ERROR"]}}(r),a=function(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:s}){try{const i=t&&t.length&&void 0===n?Al(t):n;return r?Ll(s,i,e?t:void 0):Dl(i)}catch(t){return Ll(s,n,void 0)}}(o,{networkCaptureBodies:e,responseBodySize:s,captureDetails:t,headers:i});if(c)return Ol(a,c);return a}(f,n,e.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:c,statusCode:a,request:h,response:d}}(t,e,n),s=$l("resource.fetch",r);El(n.replay,s)}catch(t){}}function Bl(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function Ul(t,e){const n={};return e.forEach((e=>{t.get(e)&&(n[e]=t.get(e))})),n}function zl(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?Ul(n,e):Array.isArray(n)?{}:Fl(n,e):{}}async function ql(t,e,n){try{const r=function(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:c}=e,{url:a,method:u,status_code:l=0,request_body_size:f,response_body_size:h}=t.data;if(!a)return null;if(!c||!Nl(a,n.networkDetailAllowUrls)||Nl(a,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:l,request:Dl(f),response:Dl(h)}}const d=c[so],p=d?Fl(d.request_headers,n.networkRequestHeaders):{},m=Fl(function(t){const e=t.getAllResponseHeaders();if(!e)return{};return e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");return r&&(t[n.toLowerCase()]=r),t}),{})}(c),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?Ml(o):[void 0],[v,b]=n.networkCaptureBodies?function(t){try{return[t.responseText]}catch(t){}try{return function(t,e){try{if("string"==typeof t)return[t];if(t instanceof Document)return[t.body.outerHTML];if("json"===e&&t&&"object"==typeof t)return[JSON.stringify(t)];if(!t)return[void 0]}catch(t){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}(t.response,t.responseType)}catch(t){}return[void 0]}(c):[void 0],w=Ll(p,f,y),k=Ll(m,h,v);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:l,request:g?Ol(w,g):w,response:b?Ol(k,b):k}}(t,e,n),s=$l("resource.xhr",r);El(n.replay,s)}catch(t){}}function Hl(t,e){const{xhr:n,input:r}=e;if(!n)return;const s=Al(r),i=n.getResponseHeader("content-length")?Rl(n.getResponseHeader("content-length")):function(t,e){try{return Al("json"===e&&t&&"object"==typeof t?JSON.stringify(t):t)}catch(t){return}}(n.response,n.responseType);void 0!==s&&(t.data.request_body_size=s),void 0!==i&&(t.data.response_body_size=i)}function Wl(t){const e=Be();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=t.getOptions(),c={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};e&&e.on("beforeAddBreadcrumb",((t,e)=>function(t,e,n){if(!e.data)return;try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(Hl(e,n),ql(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(!function(t,e){const{input:n,response:r}=e,s=Al(n?Bl(n):void 0),i=r?Rl(r.headers.get("content-length")):void 0;void 0!==s&&(t.data.request_body_size=s),void 0!==i&&(t.data.response_body_size=i)}(e,n),Pl(e,n,t))}catch(t){}}(c,t,e)))}catch(t){}}function Jl(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Kl(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return;const s=r||!e;e=!0,t.clickDetector&&Du(t.clickDetector,n),t.addUpdate((()=>{if("buffer"===t.recordingMode&&s&&t.setInitialState(),!ml(t,n,s))return!0;if(!s)return!1;const e=t.session;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return;ml(t,function(t){const e=t.getOptions();return{type:Ra.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,s),e&&e.previousSessionId)return!0;if("buffer"===t.recordingMode&&e&&t.eventBuffer){const n=t.eventBuffer.getEarliestTimestamp();n&&(e.started=n,t.getOptions().stickySession&&ul(e))}return"session"===t.recordingMode&&t.flush(),!0}))}}async function Gl({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:u,initialTimestamp:l}=r,f=Be(),h=Fe(),d=f&&f.getTransport(),p=f&&f.getDsn();if(!(f&&d&&p&&i.sampled))return Ut({});const m={type:ac,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:a,trace_ids:u,urls:c,replay_id:e,segment_id:n,replay_type:i.sampled},y=await async function({client:t,scope:e,replayId:n,event:r}){const s={event_id:n,integrations:"object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations)};t.emit("preprocessEvent",r,s);const i=await sr(t.getOptions(),r,s,e,t,je());if(!i)return null;i.platform=i.platform||"javascript";const o=t.getSdkMetadata(),{name:c,version:a}=o&&o.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:a||"0.0.0"},i}({scope:h,client:f,replayId:e,event:m});if(!y)return f.recordDroppedEvent("event_processor","replay",m),Ut({});delete y.sdkProcessingMetadata;const g=function(t,e,n,r){return se(pe(t,de(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(y,o,p,f.getOptions().tunnel);let v;try{v=await d.send(g)}catch(t){const e=new Error(uc);try{e.cause=t}catch(t){}throw e}if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new Xl(v.statusCode);const b=ge({},v);if(ye(b,"replay"))throw new Yl(b);return v}class Xl extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Yl extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Vl(t,e={count:0,interval:5e3}){const{recordingData:n,onError:r}=t;if(n.length)try{return await Gl(t),!0}catch(n){if(n instanceof Xl||n instanceof Yl)throw n;if(ur("Replays",{ue:e.count}),r&&r(n),e.count>=3){const t=new Error(`${uc} - max retries exceeded`);try{t.cause=n}catch(t){}throw t}return e.interval*=++e.count,new Promise(((n,r)=>{ro((async()=>{try{await Vl(t,e),n(!0)}catch(t){r(t)}}),e.interval)}))}}const Ql="__THROTTLED";function Zl(t,e,n){const r=new Map;let s=!1;return(...i)=>{const o=Math.floor(Date.now()/1e3);if((t=>{const e=t-n;r.forEach(((t,n)=>{nt+e),0)>=e){const t=s;return s=!0,t?"__SKIPPED":Ql}s=!1;const c=r.get(o)||0;return r.set(o,c+1),t(...i)}}class tf{constructor({options:t,recordingOptions:e}){tf.prototype.__init.call(this),tf.prototype.__init2.call(this),tf.prototype.__init3.call(this),tf.prototype.__init4.call(this),tf.prototype.__init5.call(this),tf.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this.le=Date.now(),this.bt=!1,this.fe=!1,this.he=!1,this.de=!1,this.pe={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this.me=e,this.ct=t,this.ye=function(t,e,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,e):0;function c(){return a(),r=t(),r}function a(){void 0!==s&&clearTimeout(s),void 0!==i&&clearTimeout(i),s=i=void 0}function u(){return s&&clearTimeout(s),s=ro(c,e),o&&void 0===i&&(i=ro(c,o)),r}return u.cancel=a,u.flush=function(){return void 0!==s||void 0!==i?c():r},u}((()=>this.ge()),this.ct.flushMinDelay,{maxWait:this.ct.flushMaxDelay}),this.ve=Zl(((t,e)=>function(t,e,n){return gl(t,e)?yl(t,e,n):Promise.resolve(null)}(this,t,e)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),s=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;s&&(this.clickDetector=new Mu(this,s))}getContext(){return this.pe}isEnabled(){return this.bt}isPaused(){return this.fe}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this.ct}handleException(t){this.ct.onError&&this.ct.onError(t)}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this.ct,r=e<=0&&n<=0;this.he=r,r||(this.be(t),this.session&&!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",this.we()))}start(){if(this.bt&&"session"===this.recordingMode)return;if(this.bt&&"buffer"===this.recordingMode)return;this.ke();const t=pl({maxReplayDuration:this.ct.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this.ct.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.we()}startBuffering(){if(this.bt)return;const t=pl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.ct.maxReplayDuration},{stickySession:this.ct.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this.we()}startRecording(){try{const t=this._canvas;this.Se=bu({...this.me,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this.ct._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this.ct._experiments.continuousCheckout)},emit:Kl(this),onMutation:this._e,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this.Se&&(this.Se(),this.Se=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:e}={}){if(this.bt){this.bt=!1;try{this.Te(),this.stopRecording(),this.ye.cancel(),t&&await this.ge({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,ol(this)}catch(t){this.handleException(t)}}}pause(){this.fe||(this.fe=!0,this.stopRecording())}resume(){this.fe&&this.Ie()&&(this.fe=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();await this.flushImmediate();const n=this.stopRecording();t&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.ke(e),this.xe(e),this.Ce()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&this.ye()}triggerUserActivity(){if(this.ke(),this.Se)this.checkAndHandleExpiredSession(),this.xe();else{if(!this.Ie())return;this.resume()}}updateUserActivity(){this.ke(),this.xe()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this.ye()}flushImmediate(){return this.ye(),this.ye.flush()}cancelFlush(){this.ye.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this.le&&fl(this.le,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this.Ie();this.pause()}setInitialState(){const t=`${oc.location.pathname}${oc.location.hash}${oc.location.search}`,e=`${oc.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this.Ee(),this.pe.initialUrl=e,this.pe.initialTimestamp=Date.now(),this.pe.urls.push(e)}throttledAddEvent(t,e){const n=this.ve(t,e);if(n===Ql){const t=Lu({category:"replay.throttled"});this.addUpdate((()=>!ml(this,{type:5,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})))}return n}getCurrentRoute(){const t=this.lastActiveSpan||yn(),e=t&&mn(t),n=(e&&an(e).data||{})[qe];if(e&&n&&["route","custom"].includes(n))return an(e).description}we(){this.setInitialState(),this.xe(),this.eventBuffer=sl({useCompression:this.ct.useCompression,workerUrl:this.ct.workerUrl}),this.Te(),this.Ae(),this.bt=!0,this.fe=!1,this.startRecording()}be(t){const e=this.ct.errorSampleRate>0,n=pl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.ct.maxReplayDuration,previousSessionId:t},{stickySession:this.ct.stickySession,sessionSampleRate:this.ct.sessionSampleRate,allowBuffering:e});this.session=n}Ie(){if(!this.session)return!1;const t=this.session;return!dl(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.ct.maxReplayDuration})||(this.Re(t),!1)}async Re(t){this.bt&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}Ae(){try{oc.document.addEventListener("visibilitychange",this.Me),oc.addEventListener("blur",this.Oe),oc.addEventListener("focus",this.$e),oc.addEventListener("keydown",this.De),this.clickDetector&&this.clickDetector.addListeners(),this.de||(!function(t){const e=Be();Xi(Pu(t)),Qi(Cl(t)),_l(t),Wl(t),yr(Il(t)),e&&(e.on("beforeSendEvent",Sl(t)),e.on("afterSendEvent",kl(t)),e.on("createDsc",(e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&t.checkAndHandleExpiredSession()&&(e.replay_id=n)})),e.on("spanStart",(e=>{t.lastActiveSpan=e})),e.on("spanEnd",(e=>{t.lastActiveSpan=e})),e.on("beforeSendFeedback",((e,n)=>{const r=t.getSessionId();n&&n.includeReplay&&t.isEnabled()&&r&&e.contexts&&e.contexts.feedback&&(e.contexts.feedback.replay_id=r)})))}(this),this.de=!0)}catch(t){this.handleException(t)}this.Le=function(t){function e(e){t.performanceEntries.includes(e)||t.performanceEntries.push(e)}function n({entries:t}){t.forEach(e)}const r=[];return["navigation","paint","resource"].forEach((t=>{r.push(bi(t,n))})),r.push(yi(qu(Ju,t)),mi(qu(Gu,t)),gi(qu(Xu,t)),vi(qu(Yu,t))),()=>{r.forEach((t=>t()))}}(this)}Te(){try{oc.document.removeEventListener("visibilitychange",this.Me),oc.removeEventListener("blur",this.Oe),oc.removeEventListener("focus",this.$e),oc.removeEventListener("keydown",this.De),this.clickDetector&&this.clickDetector.removeListeners(),this.Le&&this.Le()}catch(t){this.handleException(t)}}__init(){this.Me=()=>{"visible"===oc.document.visibilityState?this.Fe():this.je()}}__init2(){this.Oe=()=>{const t=Lu({category:"ui.blur"});this.je(t)}}__init3(){this.$e=()=>{const t=Lu({category:"ui.focus"});this.Fe(t)}}__init4(){this.De=t=>{Uu(this,t)}}je(t){if(!this.session)return;hl(this.session,{maxReplayDuration:this.ct.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this.Ne(t),this.conditionalFlush())}Fe(t){if(!this.session)return;this.checkAndHandleExpiredSession()&&t&&this.Ne(t)}ke(t=Date.now()){this.le=t}xe(t=Date.now()){this.session&&(this.session.lastActivity=t,this.Ce())}Ne(t){this.addUpdate((()=>{this.throttledAddEvent({type:Ra.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})}))}Pe(){const t=(e=this.performanceEntries,e.map(Hu).filter(Boolean)).concat(this.replayPerformanceEntries);var e;return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(xl(this,t))}Ee(){this.pe.errorIds.clear(),this.pe.traceIds.clear(),this.pe.urls=[]}Be(){const{session:t,eventBuffer:e}=this;if(!t||!e||this.he)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&nthis.ct.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this.Ue(),r=this.session.segmentId++;this.Ce();const s=await this.eventBuffer.finish();await Vl({replayId:t,recordingData:s,segmentId:r,eventContext:n,session:this.session,timestamp:e,onError:t=>this.handleException(t)})}catch(t){this.handleException(t),this.stop({reason:"sendReplay"});const e=Be();if(e){const n=t instanceof Yl?"ratelimit_backoff":"send_error";e.recordDroppedEvent(n,"replay")}}}__init5(){this.ge=async({force:t=!1}={})=>{if(!this.bt&&!t)return;if(!this.checkAndHandleExpiredSession())return;if(!this.session)return;const e=this.session.started,n=Date.now()-e;this.ye.cancel();const r=nthis.ct.maxReplayDuration+5e3;if(r||s)return void(r&&this.ye());const i=!!this.qe;this.qe||(this.qe=this.ze());try{await this.qe}catch(t){this.handleException(t)}finally{this.qe=void 0,i&&this.ye()}}}Ce(){this.session&&this.ct.stickySession&&ul(this.session)}__init6(){this._e=t=>{const e=t.length,n=this.ct.mutationLimit,r=n&&e>n;if(e>this.ct.mutationBreadcrumbLimit||r){const t=Lu({category:"replay.mutations",data:{count:e,limit:r}});this.Ne(t)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function ef(t,e){return[...t,...e].join(",")}const nf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',rf=["content-length","content-type","accept"];let sf=!1;class of{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:s=!0,useCompression:i=!0,workerUrl:o,_experiments:c={},maskAllText:a=!0,maskAllInputs:u=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:d=7e3,slowClickIgnoreSelectors:p=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:y=[],networkCaptureBodies:g=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:w=[],maskAttributes:k=["title","placeholder"],unmask:S=[],block:_=[],unblock:T=[],ignore:I=[],maskFn:x,beforeAddRecordingEvent:C,beforeErrorSampling:E}={}){this.name=of.id;const A=function({mask:t,unmask:e,block:n,unblock:r,ignore:s}){return{maskTextSelector:ef(t,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:ef(e,[]),blockSelector:ef(n,[".sentry-block","[data-sentry-block]",'base[href="/"]']),unblockSelector:ef(r,[]),ignoreSelector:ef(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:w,unmask:S,block:_,unblock:T,ignore:I});if(this.me={maskAllInputs:u,maskAllText:a,maskInputOptions:{password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(t,e,n)=>function({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return r?s.unmaskTextSelector&&t.matches(s.unmaskTextSelector)?i:n.includes(e)||"value"===e&&"INPUT"===t.tagName&&["submit","button"].includes(t.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i:i}({maskAttributes:k,maskAllText:a,privacyOptions:A,key:t,value:e,el:n}),...A,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:t=>{try{t.__rrweb__=!0}catch(t){}}},this.He={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,dc),stickySession:s,useCompression:i,workerUrl:o,blockAllMedia:l,maskAllInputs:u,maskAllText:a,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:d,slowClickIgnoreSelectors:p,networkDetailAllowUrls:m,networkDetailDenyUrls:y,networkCaptureBodies:g,networkRequestHeaders:cf(v),networkResponseHeaders:cf(b),beforeAddRecordingEvent:C,beforeErrorSampling:E,_experiments:c},this.He.blockAllMedia&&(this.me.blockSelector=this.me.blockSelector?`${this.me.blockSelector},${nf}`:nf),this.We&&At())throw new Error("Multiple Sentry Session Replay instances are not supported");this.We=!0}get We(){return sf}set We(t){sf=t}afterAllSetup(t){At()&&!this._replay&&(this.Je(t),this.Ke(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}Ke(t){this._replay&&(this.Ge(t),this._replay.initializeSampling())}Je(t){const e=function(t,e){const n=e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...G(t)},s=On(n.replaysSessionSampleRate),i=On(n.replaysOnErrorSampleRate);null==s&&null==i&&D((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}));null!=s&&(r.sessionSampleRate=s);null!=i&&(r.errorSampleRate=i);return r}(this.He,t);this._replay=new tf({options:e,recordingOptions:this.me})}Ge(t){try{const e=t.getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch(t){}}}function cf(t){return[...rf,...t.map((t=>t.toLowerCase()))]}return of.__initStatic(),bn(),t.BrowserClient=xs,t.SDK_VERSION=_,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=We,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=Je,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=He,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=qe,t.Scope=Ae,t.WINDOW=ls,t.addBreadcrumb=Pr,t.addEventProcessor=yr,t.addIntegration=function(t){const e=Be();e&&e.addIntegration(t)},t.breadcrumbsIntegration=Mo,t.browserApiErrorsIntegration=$o,t.browserTracingIntegration=(t={})=>{bn();const{enableInp:e,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:s,enableStandaloneClsSpans:i},beforeStartSpan:o,idleTimeout:c,finalTimeout:a,childSpanTimeout:u,markBackgroundSpan:l,traceFetch:f,traceXHR:h,shouldCreateSpanForRequest:d,enableHTTPTimings:p,instrumentPageLoad:m,instrumentNavigation:y}={...Zo,...t},g=Bi({recordClsStandaloneSpans:i||!1});e&&uo(),r&&T.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver((t=>{if(yn())for(const e of t.getEntries()){if(!e.scripts[0])continue;const t=$i(gt+e.startTime),n=$i(e.duration),r={[Je]:"auto.ui.browser.metrics"},s=e.scripts[0],{invoker:i,invokerType:o,sourceURL:c,sourceFunctionName:a,sourceCharPosition:u}=s;r["browser.script.invoker"]=i,r["browser.script.invoker_type"]=o,c&&(r["code.filepath"]=c),a&&(r["code.function"]=a),-1!==u&&(r["browser.script.source_char_position"]=u);const l=Bn({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:t,attributes:r});l&&l.end(t+n)}})).observe({type:"long-animation-frame",buffered:!0}):n&&bi("longtask",(({entries:t})=>{if(yn())for(const e of t){const t=$i(gt+e.startTime),n=$i(e.duration),r=Bn({name:"Main UI thread blocked",op:"ui.long-task",startTime:t,attributes:{[Je]:"auto.ui.browser.metrics"}});r&&r.end(t+n)}})),s&&bi("event",(({entries:t})=>{if(yn())for(const e of t)if("click"===e.name){const t=$i(gt+e.startTime),n=$i(e.duration),r={name:E(e.target),op:`ui.interaction.${e.name}`,startTime:t,attributes:{[Je]:"auto.ui.browser.metrics"}},s=M(e.target);s&&(r.attributes["ui.component_name"]=s);const i=Bn(r);i&&i.end(t+n)}}));const v={name:void 0,source:void 0};function b(t,e){const n="pageload"===e.op,r=o?o(e):e,s=r.attributes||{};e.name!==r.name&&(s[qe]="custom",r.attributes=s),v.name=r.name,v.source=s[qe];const l=Zn(r,{idleTimeout:c,finalTimeout:a,childSpanTimeout:u,disableAutoFinish:n,beforeSpanEnd:t=>{g(),Ui(t,{recordClsOnPageloadSpan:!i})}});function f(){["interactive","complete"].includes(ls.document.readyState)&&t.emit("idleSpanEnableAutoFinish",l)}return n&&ls.document&&(ls.document.addEventListener("readystatechange",(()=>{f()})),f()),l}return{name:"BrowserTracing",afterAllSetup(t){let n,r=ls.location&&ls.location.href;t.on("startNavigationSpan",(e=>{Be()===t&&(n&&!an(n).timestamp&&n.end(),n=b(t,{op:"navigation",...e}))})),t.on("startPageLoadSpan",((e,r={})=>{if(Be()!==t)return;n&&!an(n).timestamp&&n.end();const s=ne(r.sentryTrace||nc("sentry-trace"),r.baggage||nc("baggage"));Fe().setPropagationContext(s),n=b(t,{op:"pageload",...e})})),t.on("spanEnd",(t=>{const e=an(t).op;if(t!==mn(t)||"navigation"!==e&&"pageload"!==e)return;const n=Fe(),r=n.getPropagationContext();n.setPropagationContext({...r,sampled:void 0!==r.sampled?r.sampled:un(t),dsc:r.dsc||Mn(t)})})),ls.location&&(m&&tc(t,{name:ls.location.pathname,startTime:gt?gt/1e3:void 0,attributes:{[qe]:"url",[Je]:"auto.pageload.browser"}}),y&&Qi((({to:e,from:n})=>{void 0===n&&r&&-1!==r.indexOf(e)?r=void 0:n!==e&&(r=void 0,ec(t,{name:ls.location.pathname,attributes:{[qe]:"url",[Je]:"auto.navigation.browser"}}))}))),l&&ls&&ls.document&&ls.document.addEventListener("visibilitychange",(()=>{const t=yn();if(!t)return;const e=mn(t);if(ls.document.hidden&&e){const t="cancelled",{op:n,status:r}=an(e);r||e.setStatus({code:Ze,message:t}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}})),s&&function(t,e,n,r){let s;const i=()=>{const i="ui.action.click",o=yn(),c=o&&mn(o);if(c){const t=an(c).op;if(["navigation","pageload"].includes(t))return}s&&(s.setAttribute(Ke,"interactionInterrupted"),s.end(),s=void 0),r.name&&(s=Zn({name:r.name,op:i,attributes:{[qe]:r.source||"url"}},{idleTimeout:t,finalTimeout:e,childSpanTimeout:n}))};ls.document&&addEventListener("click",i,{once:!1,capture:!0})}(c,a,u,v),e&&function(t){const e=({entries:t})=>{const e=yn(),n=e&&mn(e);t.forEach((t=>{if(!function(t){return"duration"in t}(t)||!n)return;const e=t.interactionId;if(null!=e&&!ao.has(e)){if(co.length>10){const t=co.shift();ao.delete(t)}co.push(e),ao.set(e,n)}}))};bi("event",e),bi("first-input",e)}(),Xo(t,{traceFetch:f,traceXHR:h,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:d,enableHTTPTimings:p})}}},t.captureEvent=ar,t.captureException=captureException,t.captureMessage=function(t,e){const n="string"==typeof e?e:void 0,r="string"!=typeof e?{captureContext:e}:void 0;return Fe().captureMessage(t,n,r)},t.captureSession=wr,t.captureUserFeedback=function(t){const e=Be();e&&e.captureUserFeedback(t)},t.chromeStackLineParser=go,t.close=async function(t){const e=Be();return e?e.close(t):Promise.resolve(!1)},t.continueTrace=({sentryTrace:t,baggage:e},n)=>Pe((r=>{const s=ne(t,e);return r.setPropagationContext(s),n()})),t.createTransport=Dr,t.createUserFeedbackEnvelope=Is,t.dedupeIntegration=Jr,t.defaultStackLineParsers=Co,t.defaultStackParser=Eo,t.endSession=vr,t.eventFromException=ws,t.eventFromMessage=ks,t.exceptionFromError=ps,t.feedbackAsyncIntegration=ic,t.feedbackIntegration=ic,t.flush=async function(t){const e=Be();return e?e.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=zr,t.geckoStackLineParser=wo,t.getActiveSpan=yn,t.getClient=Be,t.getCurrentHub=us,t.getCurrentScope=Fe,t.getDefaultIntegrations=zo,t.getGlobalScope=Ne,t.getIsolationScope=je,t.getRootSpan=mn,t.getSpanDescendants=pn,t.globalHandlersIntegration=No,t.httpContextIntegration=Bo,t.inboundFiltersIntegration=Hr,t.init=function(t={}){const e=function(t={}){const e={defaultIntegrations:zo(),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:ls.SENTRY_RELEASE&&ls.SENTRY_RELEASE.id?ls.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==t.defaultIntegrations&&delete t.defaultIntegrations,{...e,...t}}(t);if(function(){const t=void 0!==ls.window&&ls;if(!t)return!1;const e=t[t.chrome?"chrome":"browser"],n=e&&e.runtime&&e.runtime.id,r=ls.location&&ls.location.href||"",s=!!n&&ls===ls.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((t=>r.startsWith(`${t}//`))),i=void 0!==t.nw;return!!n&&!s&&!i}())return void D((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));const n={...e,stackParser:(r=e.stackParser||Eo,Array.isArray(r)?tt(...r):r),integrations:xr(e),transport:e.transport||fo};var r;const s=function(t,e){!0===e.debug&&D((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Fe().update(e.initialScope);const n=new t(e);return Or(n),n.init(),n}(xs,n);return e.autoSessionTracking&&function(){if(void 0===ls.document)return;gr({ignoreDuration:!0}),wr(),Qi((({from:t,to:e})=>{void 0!==t&&t!==e&&(gr({ignoreDuration:!0}),wr())}))}(),s},t.isInitialized=function(){return!!Be()},t.lastEventId=mr,t.lazyLoadIntegration=async function(t,e){const n=qo[t],r=Ho.Sentry=Ho.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${t}`);const s=r[t];if("function"==typeof s&&!("_isShim"in s))return s;const i=function(t){const e=Be(),n=e&&e.getOptions(),r=n&&n.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${_}/${t}.min.js`,r).toString()}(n),o=ls.document.createElement("script");o.src=i,o.crossOrigin="anonymous",o.referrerPolicy="origin",e&&o.setAttribute("nonce",e);const c=new Promise(((t,e)=>{o.addEventListener("load",(()=>t())),o.addEventListener("error",e)})),a=ls.document.currentScript,u=ls.document.body||ls.document.head||a&&a.parentElement;if(!u)throw new Error(`Could not find parent element to insert lazy-loaded ${t} script`);u.appendChild(o);try{await c}catch(e){throw new Error(`Error when loading integration: ${t}`)}const l=r[t];if("function"!=typeof l)throw new Error(`Could not load integration: ${t}`);return l},t.linkedErrorsIntegration=Uo,t.makeFetchTransport=fo,t.metrics=Wo,t.onLoad=function(t){t()},t.opera10StackLineParser=To,t.opera11StackLineParser=xo,t.parameterize=function(t,...e){const n=new String(String.raw(t,...e));return n.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=e,n},t.replayIntegration=t=>new of(t),t.setContext=ur,t.setCurrentClient=Or,t.setExtra=fr,t.setExtras=lr,t.setMeasurement=$n,t.setTag=dr,t.setTags=hr,t.setUser=pr,t.showReportDialog=function(t={}){if(!ls.document)return;const e=Fe(),n=e.getClient(),r=n&&n.getDsn();if(!r)return;if(e&&(t.user={...e.getUser(),...t.user}),!t.eventId){const e=mr();e&&(t.eventId=e)}const s=ls.document.createElement("script");s.async=!0,s.crossOrigin="anonymous",s.src=function(t,e){const n=P(t);if(!n)return"";const r=`${Sr(n)}embed/error-page/`;let s=`dsn=${j(n)}`;for(const t in e)if("dsn"!==t&&"onClose"!==t)if("user"===t){const t=e.user;if(!t)continue;t.name&&(s+=`&name=${encodeURIComponent(t.name)}`),t.email&&(s+=`&email=${encodeURIComponent(t.email)}`)}else s+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${s}`}(r,t),t.onLoad&&(s.onload=t.onLoad);const{onClose:i}=t;if(i){const t=e=>{if("__sentry_reportdialog_closed__"===e.data)try{i()}finally{ls.removeEventListener("message",t)}};ls.addEventListener("message",t)}const o=ls.document.head||ls.document.body;o&&o.appendChild(s)},t.spanToBaggageHeader=function(t){return Zt(Mn(t))},t.spanToJSON=an,t.spanToTraceHeader=sn,t.startBrowserTracingNavigationSpan=ec,t.startBrowserTracingPageLoadSpan=tc,t.startInactiveSpan=Bn,t.startNewTrace=function(t){return Pe((e=>(e.setPropagationContext(be()),Un(null,t))))},t.startSession=gr,t.startSpan=function(t,e){const n=Hn();if(n.startSpan)return n.startSpan(t,e);const r=qn(t),{forceTransaction:s,parentSpan:i}=t;return Pe(t.scope,(()=>Kn(i)((()=>{const n=Fe(),i=Jn(n),o=t.onlyIfParent&&!i?new In:zn({parentSpan:i,spanArguments:r,forceTransaction:s,scope:n});return xe(n,o),xn((()=>e(o)),(()=>{const{status:t}=an(o);!o.isRecording()||t&&"ok"!==t||o.setStatus({code:Ze,message:"internal_error"})}),(()=>o.end()))}))))},t.startSpanManual=Pn,t.winjsStackLineParser=So,t.withActiveSpan=Un,t.withIsolationScope=function(...t){const e=Le(ke());if(2===t.length){const[n,r]=t;return n?e.withSetIsolationScope(n,r):e.withIsolationScope(r)}return e.withIsolationScope(t[0])},t.withScope=Pe,t}({}); //# sourceMappingURL=bundle.tracing.replay.min.js.map