/*! @sentry/browser & @sentry/tracing & @sentry/replay 7.120.3 (5a833b4) | 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 d(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 a(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function c(t){return null===t||a(t)||"object"!=typeof t&&"function"!=typeof t}function u(t){return r(t,"Object")}function l(t){return"undefined"!=typeof Event&&d(t,Event)}function h(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function f(t){return"number"==typeof t&&t!=t}function d(t,e){try{return t instanceof e}catch(t){return!1}}function p(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.t)}function m(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function y(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;eg(t,e,n)))}function b(t,e,n=250,r,s,i,o){if(!(i.exception&&i.exception.values&&o&&d(o.originalException,Error)))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var c,u;a&&(i.exception.values=(c=k(t,e,s,o.originalException,r,i.exception.values,a,0),u=n,c.map((t=>(t.value&&(t.value=m(t.value,u)),t)))))}function k(t,e,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(d(r[s],Error)){w(o,a);const i=t(e,r[s]),u=c.length;S(i,s,u,a),c=k(t,e,n,r[s],s,[i,...c],i,u)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(d(r,Error)){w(o,a);const u=t(e,r),l=c.length;S(u,`errors[${i}]`,l,a),c=k(t,e,n,r,s,[u,...c],u,l)}})),c}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 S(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 T(t){return t&&t.Math==Math?t:void 0}const _="object"==typeof globalThis&&T(globalThis)||"object"==typeof window&&T(window)||"object"==typeof self&&T(self)||"object"==typeof global&&T(global)||function(){return this}()||{};function x(){return _}function I(t,e,n){const r=n||_,s=r.__SENTRY__=r.__SENTRY__||{};return s[t]||(s[t]=e())}const C=x();function E(t,e={}){if(!t)return"";try{let n=t;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||80;for(;n&&i++1&&o+s.length*c+u.length>=h));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch(t){return""}}function O(t,e){const n=t,r=[];let s,i,a,c,u;if(!n||!n.tagName)return"";if(C.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const l=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(l&&l.length)l.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&o(s))for(i=s.split(/\s+/),u=0;u{const r=M[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const D=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return A.forEach((t=>{e[t]=()=>{}})),e}(),L=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function j(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${o}`}function F(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function N(t){const e="string"==typeof t?function(t){const e=L.exec(t);if(!e)return void $((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));const[n,r,s="",i,o="",a]=e.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const t=u.match(/^\d+/);t&&(u=t[0])}return F({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}(t):F(t);if(e)return e}class P 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 B(t,e,n){if(!(e in t))return;const r=t[e],s=n(r);"function"==typeof s&&z(s,r),t[e]=s}function U(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(t){}}function z(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,U(t,"__sentry_original__",e)}catch(t){}}function H(t){return t.__sentry_original__}function q(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:W(t.target),currentTarget:W(t.currentTarget),...K(t)};return"undefined"!=typeof CustomEvent&&d(t,CustomEvent)&&(e.detail=t.detail),e}return t}function W(t){try{return e=t,"undefined"!=typeof Element&&d(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 J(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.keys(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 G=/\(error: (.*)\)/,Y=/captureMessage|captureException/;function V(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0)=>{const r=[],s=t.split("\n");for(let t=n;t1024)continue;const i=G.test(n)?n.replace(G,"$1"):n;if(!i.match(/\S*Error: /)){for(const t of e){const e=t(i);if(e){r.push(e);break}}if(r.length>=50)break}}return function(t){if(!t.length)return[];const e=Array.from(t);/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop();e.reverse(),Y.test(e[e.length-1].function||"")&&(e.pop(),Y.test(e[e.length-1].function||"")&&e.pop());return e.slice(0,50).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"})))}(r)}}const Q="";function Z(t){try{return t&&"function"==typeof t&&t.name||Q}catch(t){return Q}}const tt={},et={};function nt(t,e){tt[t]=tt[t]||[],tt[t].push(e)}function rt(t,e){et[t]||(e(),et[t]=!0)}function st(t,e){const n=t&&tt[t];if(n)for(const t of n)try{t(e)}catch(t){}}function it(){"console"in _&&A.forEach((function(t){t in _.console&&B(_.console,t,(function(e){return M[t]=e,function(...e){st("console",{args:e,level:t});const n=M[t];n&&n.apply(_.console,e)}}))}))}function ot(){const 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 at(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function ct(t){const{message:e,event_id:n}=t;if(e)return e;const r=at(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function ut(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 lt(t,e){const n=at(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 ht(t){if(t&&t.__sentry_captured__)return!0;try{U(t,"__sentry_captured__",!0)}catch(t){}return!1}function ft(t){return Array.isArray(t)?t:[t]}const dt=_;let pt,mt,yt;function gt(t){nt("dom",t),rt("dom",vt)}function vt(){if(!dt.document)return;const t=st.bind(null,"dom"),e=bt(t,!0);dt.document.addEventListener("click",e,!1),dt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=dt[e]&&dt[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(B(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=bt(t);o.handler=r,e.call(this,n,r,s)}o.refCount++}catch(t){}return e.call(this,n,r,s)}})),B(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 bt(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;U(n,"_sentryCaptured",!0),r&&!r._sentryId&&U(r,"_sentryId",ot());const s="keypress"===n.type?"input":n.type;if(!function(t){if(t.type!==mt)return!1;try{if(!t.target||t.target._sentryId!==yt)return!1}catch(t){}return!0}(n)){t({event:n,name:s,global:e}),mt=n.type,yt=r?r._sentryId:void 0}clearTimeout(pt),pt=dt.setTimeout((()=>{yt=void 0,mt=void 0}),1e3)}}const kt=x();function wt(){if(!("fetch"in kt))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function St(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Tt(t){const e="fetch";nt(e,t),rt(e,_t)}function _t(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!wt())return!1;if(St(kt.fetch))return!0;let t=!1;const e=kt.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=St(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){}return t})()&&B(_,"fetch",(function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:It(e),method:xt(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:It(e),method:xt(e,"method")?String(e.method).toUpperCase():"GET"}}(e),s={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return st("fetch",{...s}),t.apply(_,e).then((t=>(st("fetch",{...s,endTimestamp:Date.now(),response:t}),t)),(t=>{throw st("fetch",{...s,endTimestamp:Date.now(),error:t}),t}))}}))}function xt(t,e){return!!t&&"object"==typeof t&&!!t[e]}function It(t){return"string"==typeof t?t:t?xt(t,"url")?t.url:t.toString?t.toString():"":""}let Ct=null;function Et(t){const e="error";nt(e,t),rt(e,Ot)}function Ot(){Ct=_.onerror,_.onerror=function(t,e,n,r,s){const i={column:r,error:s,line:n,msg:t,url:e};return st("error",i),!(!Ct||Ct.__SENTRY_LOADER__)&&Ct.apply(this,arguments)},_.onerror.__SENTRY_INSTRUMENTED__=!0}let Rt=null;function At(t){const e="unhandledrejection";nt(e,t),rt(e,Mt)}function Mt(){Rt=_.onunhandledrejection,_.onunhandledrejection=function(t){const e=t;return st("unhandledrejection",e),!(Rt&&!Rt.__SENTRY_LOADER__)||Rt.apply(this,arguments)},_.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const $t=x();const Dt=_;let Lt;function jt(t){const e="history";nt(e,t),rt(e,Ft)}function Ft(){if(!function(){const t=$t.chrome,e=t&&t.app&&t.app.runtime,n="history"in $t&&!!$t.history.pushState&&!!$t.history.replaceState;return!e&&n}())return;const t=Dt.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=Lt,e=String(n);Lt=e;st("history",{from:t,to:e})}return t.apply(this,e)}}Dt.onpopstate=function(...e){const n=Dt.location.href,r=Lt;Lt=n;if(st("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},B(Dt.history,"pushState",e),B(Dt.history,"replaceState",e)}const Nt=_;function Pt(t){nt("xhr",t),rt("xhr",Bt)}function Bt(){if(!Nt.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;B(t,"open",(function(t){return function(...e){const n=Date.now(),r=o(e[0])?e[0].toUpperCase():void 0,s=function(t){if(o(t))return t;try{return t.toString()}catch(t){}return}(e[1]);if(!r||!s)return t.apply(this,e);this.__sentry_xhr_v3__={method:r,url:s,request_headers:{}},"POST"===r&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const t=this.__sentry_xhr_v3__;if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}st("xhr",{args:[r,s],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?B(this,"onreadystatechange",(function(t){return function(...e){return i(),t.apply(this,e)}})):this.addEventListener("readystatechange",i),B(this,"setRequestHeader",(function(t){return function(...e){const[n,r]=e,s=this.__sentry_xhr_v3__;return s&&o(n)&&o(r)&&(s.request_headers[n.toLowerCase()]=r),t.apply(this,e)}})),t.apply(this,e)}})),B(t,"send",(function(t){return function(...e){const n=this.__sentry_xhr_v3__;if(!n)return t.apply(this,e);void 0!==e[0]&&(n.body=e[0]);return st("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}function Ut(){return"undefined"!=typeof window&&!0}function zt(t,e=100,n=1/0){try{return qt("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Ht(t,e=3,n=102400){const r=zt(t,e);return s=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(s))>n?Ht(t,e-1,n):r;var s}function qt(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){h[t]="[MaxProperties ~]";break}const e=m[t];h[t]=qt(t,e,c-1,r,s),d++}return o(e),h}var Wt;function Kt(t){return new Xt((e=>{e(t)}))}function Jt(t){return new Xt(((e,n)=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Wt||(Wt={}));class Xt{constructor(t){Xt.prototype.__init.call(this),Xt.prototype.__init2.call(this),Xt.prototype.__init3.call(this),Xt.prototype.__init4.call(this),this.o=Wt.PENDING,this.u=[];try{t(this.l,this.h)}catch(t){this.h(t)}}then(t,e){return new Xt(((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 Xt(((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(Wt.RESOLVED,t)}}__init2(){this.h=t=>{this.m(Wt.REJECTED,t)}}__init3(){this.m=(t,e)=>{this.o===Wt.PENDING&&(h(e)?e.then(this.l,this.h):(this.o=t,this.v=e,this.p()))}}__init4(){this.p=()=>{if(this.o===Wt.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.o===Wt.RESOLVED&&t[1](this.v),this.o===Wt.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function Gt(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[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 Xt(((n,r)=>{let s=e.length;if(!s)return n(!0);const i=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{Kt(t).then((()=>{--s||(clearTimeout(i),n(!0))}),r)}))}))}}}function Yt(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 Vt=["fatal","error","warning","log","info","debug"];function Qt(t){return"warn"===t?"warning":Vt.includes(t)?t:"log"}function Zt(){return Date.now()/1e3}const te=function(){const{performance:t}=_;if(!t||!t.now)return Zt;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/1e3}(),ee=(()=>{const{performance: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=s{const n=ae(e);for(const e of Object.keys(n))t[e]=n[e];return t}),{});else{if(!t)return;e=ae(t)}const n=Object.entries(e).reduce(((t,[e,n])=>{if(e.match(se)){t[e.slice(re.length)]=n}return t}),{});return Object.keys(n).length>0?n:void 0}function oe(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>8192?t:i}),"")}(Object.entries(t).reduce(((t,[e,n])=>(n&&(t[`sentry-${e}`]=n),t)),{}))}function ae(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[e,n])=>(t[e]=n,t)),{})}const ce=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ue(t){if(!t)return;const e=t.match(ce);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function le(t=ot(),e=ot().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function he(t,e=[]){return[t,e]}function fe(t,e){const[n,r]=t;return[n,[...r,e]]}function de(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function pe(t,e){return(e||new TextEncoder).encode(t)}function me(t,e){const[n,r]=t;let s=JSON.stringify(n);function i(t){"string"==typeof s?s="string"==typeof t?s+t:[pe(s,e),t]:s.push("string"==typeof t?pe(t,e):t)}for(const t of r){const[e,n]=t;if(i(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)i(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(zt(n))}i(t)}}return"string"==typeof s?s: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}(s)}function ye(t,e){const n="string"==typeof t.data?pe(t.data,e):t.data;return[J({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const ge={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function ve(t){return ge[t]}function be(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function ke(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:J({...s})}}}function we(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}function Se(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),a=1e3*(isNaN(o)?60:o);if(n)for(const t of n.split(";"))"metric_bucket"===t&&i&&!i.split(";").includes("custom")||(s[t]=r+a);else s.all=r+a}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)?6e4:r-e}(o,r):429===e&&(s.all=r+6e4);return s}function Te(t,e){const n={type:e.name||e.constructor.name,value:e.message},r=function(t,e){return t(e.stack||"",1)}(t,e);return r.length&&(n.stacktrace={frames:r}),n}function _e(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class xe{static __initStatic(){this.id="Feedback"}constructor(t){this.name=xe.id,$((()=>{console.warn("You are using new Feedback() even though this bundle does not include Feedback.")}))}setupOnce(){}openDialog(){}closeDialog(){}attachTo(){}createWidget(){}removeWidget(){}getWidget(){}remove(){}}xe.__initStatic();const Ie="production";function Ce(){return I("globalEventProcessors",(()=>[]))}function Ee(t){Ce().push(t)}function Oe(t,e,n,r=0){return new Xt(((s,i)=>{const o=t[r];if(null===e||"function"!=typeof o)s(e);else{const a=o({...e},n);h(a)?a.then((e=>Oe(t,e,n,r+1).then(s))).then(null,i):Oe(t,a,n,r+1).then(s).then(null,i)}}))}function Re(t){const e=te(),n={sid:ot(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return J({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&&Ae(n,t),n}function Ae(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||te(),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:ot()),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)}function Me(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),Ae(t,n)}function $e(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:c}=Fe(t);return J({data:r,op:s,parent_span_id:i,span_id:e,status:o,tags:a,trace_id:n,origin:c})}function De(t){const{traceId:e,spanId:n}=t.spanContext();return le(e,n,Ne(t))}function Le(t){return"number"==typeof t?je(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?je(t.getTime()):te()}function je(t){return t>9999999999?t/1e3:t}function Fe(t){return function(t){return"function"==typeof t.getSpanJSON}(t)?t.getSpanJSON():"function"==typeof t.toJSON?t.toJSON():{}}function Ne(t){const{traceFlags:e}=t.spanContext();return Boolean(1&e)}function Pe(t,e,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||ot(),timestamp:e.timestamp||Zt()},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:Ie);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==s&&(t.dist=s);t.message&&(t.message=m(t.message,i));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=m(o.value,i));const a=t.request;a&&a.url&&(a.url=m(a.url,i))}(c,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(c,u),void 0===e.type&&function(t,e){const n=_._sentryDebugIds;if(!n)return;let r;const s=Be.get(e);s?r=s:(r=new Map,Be.set(e,r));const i=Object.keys(n).reduce(((t,s)=>{let i;const o=r.get(s);o?i=o:(i=e(s),r.set(s,i));for(let e=i.length-1;e>=0;e--){const r=i[e];if(r.filename){t[r.filename]=n[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){}}(c,t.stackParser);const l=function(t,e){if(!e)return t;const n=t?t.clone():new an;return n.update(e),n}(r,n.captureContext);n.mechanism&<(c,n.mechanism);const h=s&&s.getEventProcessors?s.getEventProcessors():[],f=function(){on||(on=new an);return on}().getScopeData();if(i){rn(f,i.getScopeData())}if(l){rn(f,l.getScopeData())}const d=[...n.attachments||[],...f.attachments];d.length&&(n.attachments=d),nn(c,f);return Oe([...h,...Ce(),...f.eventProcessors],c,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.keys(e).forEach((t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})}))}(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:zt(t.data,e,n)}})))},...t.user&&{user:zt(t.user,e,n)},...t.contexts&&{contexts:zt(t.contexts,e,n)},...t.extra&&{extra:zt(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=zt(t.contexts.trace.data,e,n)));t.spans&&(r.spans=t.spans.map((t=>{const r=Fe(t).data;return r&&(t.data=zt(r,e,n)),t})));return r}(t,o,a):t)))}const Be=new WeakMap;function Ue(t){if(t)return function(t){return t instanceof an||"function"==typeof t}(t)||function(t){return Object.keys(t).some((t=>ze.includes(t)))}(t)?{captureContext:t}:t}const ze=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function captureException(t,e){return mn().captureException(t,Ue(e))}function He(t,e){return mn().captureEvent(t,e)}function qe(t,e){mn().addBreadcrumb(t,e)}function We(t,e){mn().setContext(t,e)}function Ke(...t){const e=mn();if(2===t.length){const[n,r]=t;return n?e.withScope((()=>(e.getStackTop().scope=n,r(n)))):e.withScope(r)}return e.withScope(t[0])}function Je(){return mn().getClient()}function Xe(){return mn().getScope()}function Ge(t){const e=Je(),n=yn(),r=Xe(),{release:s,environment:i=Ie}=e&&e.getOptions()||{},{userAgent:o}=_.navigator||{},a=Re({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...t}),c=n.getSession();return c&&"ok"===c.status&&Ae(c,{status:"exited"}),Ye(),n.setSession(a),r.setSession(a),a}function Ye(){const t=yn(),e=Xe(),n=e.getSession()||t.getSession();n&&Me(n),Ve(),t.setSession(),e.setSession()}function Ve(){const t=yn(),e=Xe(),n=Je(),r=e.getSession()||t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Qe(t=!1){t?Ye():Ve()}function Ze(t){return t.transaction}function tn(t,e,n){const r=e.getOptions(),{publicKey:s}=e.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=J({environment:r.environment||Ie,release:r.release,user_segment:i,public_key:s,trace_id:t});return e.emit&&e.emit("createDsc",o),o}function en(t){const e=Je();if(!e)return{};const n=tn(Fe(t).trace_id||"",e,Xe()),r=Ze(t);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:i,source:o}=r.metadata;null!=i&&(n.sample_rate=`${i}`);const a=Fe(r);return o&&"url"!==o&&(n.transaction=a.description),n.sampled=String(Ne(r)),e.emit&&e.emit("createDsc",n),n}function nn(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:a}=e,c=J(n);c&&Object.keys(c).length&&(t.extra={...c,...t.extra});const u=J(r);u&&Object.keys(u).length&&(t.tags={...u,...t.tags});const l=J(s);l&&Object.keys(l).length&&(t.user={...l,...t.user});const h=J(i);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts});o&&(t.level=o);a&&(t.transaction=a)}(t,e),r&&function(t,e){t.contexts={trace:$e(e),...t.contexts};const n=Ze(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:en(e),...t.sdkProcessingMetadata};const r=Fe(n).description;r&&(t.tags={transaction:r,...t.tags})}}(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 rn(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:h,propagationContext:f,transactionName:d,span:p}=e;sn(t,"extra",n),sn(t,"tags",r),sn(t,"user",s),sn(t,"contexts",i),sn(t,"sdkProcessingMetadata",a),o&&(t.level=o),d&&(t.transactionName=d),p&&(t.span=p),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),h.length&&(t.attachments=[...t.attachments,...h]),t.propagationContext={...t.propagationContext,...f}}function sn(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])}}let on;class an{constructor(){this.k=!1,this.S=[],this.T=[],this._=[],this.I=[],this.C={},this.O={},this.R={},this.A={},this.M={},this.D=cn()}static clone(t){return t?t.clone():new an}clone(){const t=new an;return t._=[...this._],t.O={...this.O},t.R={...this.R},t.A={...this.A},t.C=this.C,t.L=this.L,t.j=this.j,t.F=this.F,t.N=this.N,t.P=this.P,t.T=[...this.T],t.B=this.B,t.I=[...this.I],t.M={...this.M},t.D={...this.D},t.U=this.U,t}setClient(t){this.U=t}getClient(){return this.U}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.T.push(t),this}setUser(t){return this.C=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this.F&&Ae(this.F,{user:t}),this.H(),this}getUser(){return this.C}getRequestSession(){return this.B}setRequestSession(t){return this.B=t,this}setTags(t){return this.O={...this.O,...t},this.H(),this}setTag(t,e){return this.O={...this.O,[t]:e},this.H(),this}setExtras(t){return this.R={...this.R,...t},this.H(),this}setExtra(t,e){return this.R={...this.R,[t]:e},this.H(),this}setFingerprint(t){return this.P=t,this.H(),this}setLevel(t){return this.L=t,this.H(),this}setTransactionName(t){return this.N=t,this.H(),this}setContext(t,e){return null===e?delete this.A[t]:this.A[t]=e,this.H(),this}setSpan(t){return this.j=t,this.H(),this}getSpan(){return this.j}getTransaction(){const t=this.j;return t&&t.transaction}setSession(t){return t?this.F=t:delete this.F,this.H(),this}getSession(){return this.F}update(t){if(!t)return this;const e="function"==typeof t?t(this):t;if(e instanceof an){const t=e.getScopeData();this.O={...this.O,...t.tags},this.R={...this.R,...t.extra},this.A={...this.A,...t.contexts},t.user&&Object.keys(t.user).length&&(this.C=t.user),t.level&&(this.L=t.level),t.fingerprint.length&&(this.P=t.fingerprint),e.getRequestSession()&&(this.B=e.getRequestSession()),t.propagationContext&&(this.D=t.propagationContext)}else if(u(e)){const e=t;this.O={...this.O,...e.tags},this.R={...this.R,...e.extra},this.A={...this.A,...e.contexts},e.user&&(this.C=e.user),e.level&&(this.L=e.level),e.fingerprint&&(this.P=e.fingerprint),e.requestSession&&(this.B=e.requestSession),e.propagationContext&&(this.D=e.propagationContext)}return this}clear(){return this._=[],this.O={},this.R={},this.C={},this.A={},this.L=void 0,this.N=void 0,this.P=void 0,this.B=void 0,this.j=void 0,this.F=void 0,this.H(),this.I=[],this.D=cn(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:Zt(),...t},s=this._;return s.push(r),this._=s.length>n?s.slice(-n):s,this.H(),this}getLastBreadcrumb(){return this._[this._.length-1]}clearBreadcrumbs(){return this._=[],this.H(),this}addAttachment(t){return this.I.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this.I=[],this}getScopeData(){const{_:t,I:e,A:n,O:r,R:s,C:i,L:o,P:a,T:c,D:u,M:l,N:h,j:f}=this;return{breadcrumbs:t,attachments:e,contexts:n,tags:r,extra:s,user:i,level:o,fingerprint:a||[],eventProcessors:c,propagationContext:u,sdkProcessingMetadata:l,transactionName:h,span:f}}applyToEvent(t,e={},n=[]){nn(t,this.getScopeData());return Oe([...n,...Ce(),...this.T],t,e)}setSDKProcessingMetadata(t){return this.M={...this.M,...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:ot();if(!this.U)return D.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this.U.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:ot();if(!this.U)return D.warn("No client configured on scope - will not capture message!"),r;const s=new Error(t);return this.U.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:ot();return this.U?(this.U.captureEvent(t,{...e,event_id:n},this),n):(D.warn("No client configured on scope - will not capture event!"),n)}H(){this.k||(this.k=!0,this.S.forEach((t=>{t(this)})),this.k=!1)}}function cn(){return{traceId:ot(),spanId:ot().substring(16)}}const un="7.120.3",ln=parseFloat(un),hn=100;class fn{constructor(t,e,n,r=ln){let s,i;this.q=r,e?s=e:(s=new an,s.setClient(t)),n?i=n:(i=new an,i.setClient(t)),this.W=[{scope:s}],t&&this.bindClient(t),this.K=i}isOlderThan(t){return this.q(this.popScope(),t)),(t=>{throw this.popScope(),t})):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.K}getStack(){return this.W}getStackTop(){return this.W[this.W.length-1]}captureException(t,e){const n=this.J=e&&e.event_id?e.event_id:ot(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...e,event_id:n}),n}captureMessage(t,e,n){const r=this.J=n&&n.event_id?n.event_id:ot(),s=new Error(t);return this.getScope().captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:ot();return t.type||(this.J=n),this.getScope().captureEvent(t,{...e,event_id:n}),n}lastEventId(){return this.J}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=hn}=r.getOptions&&r.getOptions()||{};if(i<=0)return;const o={timestamp:Zt(),...t},a=s?$((()=>s(o,e))):o;null!==a&&(r.emit&&r.emit("beforeAddBreadcrumb",a,e),n.addBreadcrumb(a,i))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e),this.getIsolationScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e),this.getIsolationScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e),this.getIsolationScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=pn(this);try{t(this)}finally{pn(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(t){return null}}startTransaction(t,e){const n=this.X("startTransaction",t,e);return n}traceHeaders(){return this.X("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this.G()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&Me(e),this.G(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:s=Ie}=n&&n.getOptions()||{},{userAgent:i}=_.navigator||{},o=Re({release:r,environment:s,user:e.getUser(),...i&&{userAgent:i},...t}),a=e.getSession&&e.getSession();return a&&"ok"===a.status&&Ae(a,{status:"exited"}),this.endSession(),e.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}G(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}X(t,...e){const n=dn().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e)}}function dn(){return _.__SENTRY__=_.__SENTRY__||{extensions:{},hub:void 0},_}function pn(t){const e=dn(),n=vn(e);return bn(e,t),n}function mn(){const t=dn();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=dn()){e=t,e&&e.__SENTRY__&&e.__SENTRY__.hub&&!vn(t).isOlderThan(ln)||bn(t,new fn);var e;return vn(t)}(t)}function yn(){return mn().getIsolationScope()}function gn(t,e={}){const n=dn();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(t,e):t()}function vn(t){return I("hub",(()=>new fn),t)}function bn(t,e){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0}function kn(t){return(t||mn()).getScope().getTransaction()}let wn=!1;function Sn(){const t=kn();if(t){const e="internal_error";t.setStatus(e)}}var Tn;function _n(t,e){t.setTag("http.status_code",String(e)),t.setData("http.response.status_code",e);const n=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);"unknown_error"!==n&&t.setStatus(n)}function xn(t,e,n=(()=>{})){let r;try{r=t()}catch(t){throw e(t),n(),t}return function(t,e,n){if(h(t))return t.then((t=>(n(),t)),(t=>{throw e(t),n(),t}));return n(),t}(r,e,n)}function In(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=Je(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Cn(t){if(!In())return;const e=Rn(t),n=mn(),r=t.scope?t.scope.getSpan():En();if(t.onlyIfParent&&!r)return;const s=(t.scope||Xe()).clone();return On(n,{parentSpan:r,spanContext:e,forceTransaction:t.forceTransaction,scope:s})}function En(){return Xe().getSpan()}Sn.tag="sentry_tracingErrorCallback",function(t){t.Ok="ok";t.DeadlineExceeded="deadline_exceeded";t.Unauthenticated="unauthenticated";t.PermissionDenied="permission_denied";t.NotFound="not_found";t.ResourceExhausted="resource_exhausted";t.InvalidArgument="invalid_argument";t.Unimplemented="unimplemented";t.Unavailable="unavailable";t.InternalError="internal_error";t.UnknownError="unknown_error";t.Cancelled="cancelled";t.AlreadyExists="already_exists";t.FailedPrecondition="failed_precondition";t.Aborted="aborted";t.OutOfRange="out_of_range";t.DataLoss="data_loss"}(Tn||(Tn={}));function On(t,{parentSpan:e,spanContext:n,forceTransaction:r,scope:s}){if(!In())return;const i=yn();let o;if(e&&!r)o=e.startChild(n);else if(e){const r=en(e),{traceId:s,spanId:i}=e.spanContext(),a=Ne(e);o=t.startTransaction({traceId:s,parentSpanId:i,parentSampled:a,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}else{const{traceId:e,dsc:r,parentSpanId:a,sampled:c}={...i.getPropagationContext(),...s.getPropagationContext()};o=t.startTransaction({traceId:e,parentSpanId:a,parentSampled:c,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}return s.setSpan(o),function(t,e,n){t&&(U(t,Mn,n),U(t,An,e))}(o,s,i),o}function Rn(t){if(t.startTime){const e={...t};return e.startTimestamp=Le(t.startTime),delete e.startTime,e}return t}const An="_sentryScope",Mn="_sentryIsolationScope";let $n;function Dn(t){return $n?$n.get(t):void 0}function Ln(t){const e=Dn(t);if(!e)return;const n={};for(const[,[t,r]]of e)n[t]||(n[t]=[]),n[t].push(J(r));return n}const jn="sentry.source",Fn="sentry.sample_rate",Nn="sentry.op",Pn="sentry.origin";class Bn{constructor(t=1e3){this.Y=t,this.spans=[]}add(t){this.spans.length>this.Y?t.spanRecorder=void 0:this.spans.push(t)}}class Un{constructor(t={}){this.V=t.traceId||ot(),this.Z=t.spanId||ot().substring(16),this.tt=t.startTimestamp||te(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this.et={},this.setAttributes({[Pn]:t.origin||"manual",[Nn]:t.op,...t.attributes}),this.nt=t.name||t.description,t.parentSpanId&&(this.rt=t.parentSpanId),"sampled"in t&&(this.st=t.sampled),t.status&&(this.it=t.status),t.endTimestamp&&(this.ot=t.endTimestamp),void 0!==t.exclusiveTime&&(this.ct=t.exclusiveTime),this.ut=t.measurements?{...t.measurements}:{}}get name(){return this.nt||""}set name(t){this.updateName(t)}get description(){return this.nt}set description(t){this.nt=t}get traceId(){return this.V}set traceId(t){this.V=t}get spanId(){return this.Z}set spanId(t){this.Z=t}set parentSpanId(t){this.rt=t}get parentSpanId(){return this.rt}get sampled(){return this.st}set sampled(t){this.st=t}get attributes(){return this.et}set attributes(t){this.et=t}get startTimestamp(){return this.tt}set startTimestamp(t){this.tt=t}get endTimestamp(){return this.ot}set endTimestamp(t){this.ot=t}get status(){return this.it}set status(t){this.it=t}get op(){return this.et["sentry.op"]}set op(t){this.setAttribute(Nn,t)}get origin(){return this.et["sentry.origin"]}set origin(t){this.setAttribute(Pn,t)}spanContext(){const{Z:t,V:e,st:n}=this;return{spanId:t,traceId:e,traceFlags:n?1:0}}startChild(t){const e=new Un({...t,parentSpanId:this.Z,sampled:this.st,traceId:this.V});e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e);const n=Ze(this);return e.transaction=n,e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setAttribute(t,e){void 0===e?delete this.et[t]:this.et[t]=e}setAttributes(t){Object.keys(t).forEach((e=>this.setAttribute(e,t[e])))}setStatus(t){return this.it=t,this}setHttpStatus(t){return _n(this,t),this}setName(t){this.updateName(t)}updateName(t){return this.nt=t,this}isSuccess(){return"ok"===this.it}finish(t){return this.end(t)}end(t){if(this.ot)return;Ze(this);this.ot=Le(t)}toTraceparent(){return De(this)}toContext(){return J({data:this.lt(),description:this.nt,endTimestamp:this.ot,op:this.op,parentSpanId:this.rt,sampled:this.st,spanId:this.Z,startTimestamp:this.tt,status:this.it,tags:this.tags,traceId:this.V})}updateWithContext(t){return this.data=t.data||{},this.nt=t.name||t.description,this.ot=t.endTimestamp,this.op=t.op,this.rt=t.parentSpanId,this.st=t.sampled,this.Z=t.spanId||this.Z,this.tt=t.startTimestamp||this.tt,this.it=t.status,this.tags=t.tags||{},this.V=t.traceId||this.V,this}getTraceContext(){return $e(this)}getSpanJSON(){return J({data:this.lt(),description:this.nt,op:this.et["sentry.op"],parent_span_id:this.rt,span_id:this.Z,start_timestamp:this.tt,status:this.it,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.ot,trace_id:this.V,origin:this.et["sentry.origin"],ht:Ln(this),profile_id:this.et.profile_id,exclusive_time:this.ct,measurements:Object.keys(this.ut).length>0?this.ut:void 0})}isRecording(){return!this.ot&&!!this.st}toJSON(){return this.getSpanJSON()}lt(){const{data:t,et:e}=this,n=Object.keys(t).length>0,r=Object.keys(e).length>0;if(n||r)return n&&r?{...t,...e}:n?t:e}}class zn extends Un{constructor(t,e){super(t),this.A={},this.ft=e||mn(),this.nt=t.name||"",this.dt={...t.metadata},this.yt=t.trimEnd,this.transaction=this;const n=this.dt.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this.nt}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this.dt,...this.et["sentry.source"]&&{source:this.et["sentry.source"]},...this.et["sentry.sample_rate"]&&{sampleRate:this.et["sentry.sample_rate"]}}}set metadata(t){this.dt=t}setName(t,e="custom"){this.nt=t,this.setAttribute(jn,e)}updateName(t){return this.nt=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Bn(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this.A[t]:this.A[t]=e}setMeasurement(t,e,n=""){this.ut[t]={value:e,unit:n}}setMetadata(t){this.dt={...this.dt,...t}}end(t){const e=Le(t),n=this.gt(e);if(n)return this.ft.captureEvent(n)}toContext(){return J({...super.toContext(),name:this.nt,trimEnd:this.yt})}updateWithContext(t){return super.updateWithContext(t),this.nt=t.name||"",this.yt=t.trimEnd,this}getDynamicSamplingContext(){return en(this)}setHub(t){this.ft=t}getProfileId(){if(void 0!==this.A&&void 0!==this.A.profile)return this.A.profile.profile_id}gt(t){if(void 0!==this.ot)return;this.nt||(this.nt=""),super.end(t);const e=this.ft.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this.st)return void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((t=>t!==this&&Fe(t).timestamp)):[];if(this.yt&&n.length>0){const t=n.map((t=>Fe(t).timestamp)).filter(Boolean);this.ot=t.reduce(((t,e)=>t>e?t:e))}const{scope:r,isolationScope:s}={scope:(i=this).vt,isolationScope:i.bt};var i;const{metadata:o}=this,{source:a}=o,c={contexts:{...this.A,trace:$e(this)},spans:n,start_timestamp:this.tt,tags:this.tags,timestamp:this.ot,transaction:this.nt,type:"transaction",sdkProcessingMetadata:{...o,capturedSpanScope:r,capturedSpanIsolationScope:s,...J({dynamicSamplingContext:en(this)})},ht:Ln(this),...a&&{transaction_info:{source:a}}};return Object.keys(this.ut).length>0&&(c.measurements=this.ut),c}}const Hn={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},qn=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Wn extends Bn{constructor(t,e,n,r){super(r),this.kt=t,this.wt=e,this.transactionSpanId=n}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const e=t.end;t.end=(...n)=>(this.wt(t.spanContext().spanId),e.apply(t,n)),void 0===Fe(t).timestamp&&this.kt(t.spanContext().spanId)}super.add(t)}}class Kn extends zn{constructor(t,e,n=Hn.idleTimeout,r=Hn.finalTimeout,s=Hn.heartbeatInterval,i=!1,o=!1){super(t,e),this.St=e,this.Tt=n,this._t=r,this.xt=s,this.It=i,this.activities={},this.Ct=0,this.Et=!1,this.Ot=!1,this.Rt=[],this.At=qn[4],this.Mt=!o,i&&e.getScope().setSpan(this),o||this.$t(),setTimeout((()=>{this.Et||(this.setStatus("deadline_exceeded"),this.At=qn[3],this.end())}),this._t)}end(t){const e=Le(t);if(this.Et=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this.At),this.spanRecorder){for(const t of this.Rt)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter((t=>{if(t.spanContext().spanId===this.spanContext().spanId)return!0;Fe(t).timestamp||(t.setStatus("cancelled"),t.end(e));const{start_timestamp:n,timestamp:r}=Fe(t),s=n&&n{this.Et||this.kt(t)},n=t=>{this.Et||this.wt(t)};this.spanRecorder=new Wn(e,n,this.spanContext().spanId,t),this.Dt()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this.Ot=!1===e,this.Lt&&(clearTimeout(this.Lt),this.Lt=void 0,0===Object.keys(this.activities).length&&this.Ot&&(this.At=qn[5],this.end(t)))}setFinishReason(t){this.At=t}sendAutoFinishSignal(){this.Mt||(this.$t(),this.Mt=!0)}$t(t){this.cancelIdleTimeout(),this.Lt=setTimeout((()=>{this.Et||0!==Object.keys(this.activities).length||(this.At=qn[1],this.end(t))}),this.Tt)}kt(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this.Ot}),this.activities[t]=!0}wt(t){if(this.activities[t]&&delete this.activities[t],0===Object.keys(this.activities).length){const t=te();this.Ot?this.Mt&&(this.At=qn[5],this.end(t)):this.$t(t+this.Tt/1e3)}}jt(){if(this.Et)return;const t=Object.keys(this.activities).join("");t===this.Ft?this.Ct++:this.Ct=1,this.Ft=t,this.Ct>=3?this.Mt&&(this.setStatus("deadline_exceeded"),this.At=qn[0],this.end()):this.Dt()}Dt(){setTimeout((()=>{this.jt()}),this.xt)}}function Jn(t,e,n){if(!In(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setAttribute(Fn,Number(t.sampled)),t;let r;return"function"==typeof e.tracesSampler?(r=e.tracesSampler(n),t.setAttribute(Fn,Number(r))):void 0!==n.parentSampled?r=n.parentSampled:void 0!==e.tracesSampleRate?(r=e.tracesSampleRate,t.setAttribute(Fn,Number(r))):(r=1,t.setAttribute(Fn,r)),Xn(r)&&r?(t.sampled=Math.random()1)}function Gn(){const t=this.getScope().getSpan();return t?{"sentry-trace":De(t)}:{}}function Yn(t,e){const n=this.getClient(),r=n&&n.getOptions()||{};(r.instrumenter||"sentry")!==(t.instrumenter||"sentry")&&(t.sampled=!1);let s=new zn(t,this);return s=Jn(s,r,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...e}),s.isRecording()&&s.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",s),s}function Vn(t,e,n,r,s,i,o,a=!1){const c=t.getClient(),u=c&&c.getOptions()||{};let l=new Kn(e,t,n,r,o,s,a);return l=Jn(l,u,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...i}),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function Qn(){const t=dn();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=Yn),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=Gn),wn||(wn=!0,Et(Sn),At(Sn)))}function Zn(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function tr(t,e){return n={sentry_key:t.publicKey,sentry_version:"7",...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}function er(t,e={}){const n="string"==typeof e?e:e.tunnel,r="string"!=typeof e&&e.dt?e.dt.sdk:void 0;return n||`${function(t){return`${Zn(t)}${t.projectId}/envelope/`}(t)}?${tr(t,r)}`}const nr=[];function rr(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.keys(e).map((t=>e[t]))}(r),i=function(t,e){for(let n=0;n"Debug"===t.name));if(-1!==i){const[t]=s.splice(i,1);s.push(t)}return s}function sr(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function ir(t,e,n){if(!n[e.name]){if(n[e.name]=e,-1===nr.indexOf(e.name)&&(e.setupOnce(Ee,mn),nr.push(e.name)),e.setup&&"function"==typeof e.setup&&e.setup(t),t.on&&"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",((e,r)=>n(e,r,t)))}if(t.addEventProcessor&&"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)}}}function or(t,e){return Object.assign((function(...t){return e(...t)}),{id:t})}function ar(t){return t.replace(/[^\w\-./]+/gi,"")}const cr=[["\n","\\n"],["\r","\\r"],["\t","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function ur(t){return[...t].reduce(((t,e)=>t+function(t){for(const[e,n]of cr)if(t===e)return n;return t}(e)),"")}function lr(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 he(s,[i])}function hr(t){return void 0===t.type}function fr(t){return"transaction"===t.type}function dr(t){const e=Je();e&&e.addEventProcessor&&e.addEventProcessor(t)}const pr={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.Nt=t,this.Pt=t,this.Bt=t,this.Ut=t,this.zt=1}get weight(){return 5}add(t){this.Nt=t,tthis.Bt&&(this.Bt=t),this.Ut+=t,this.zt++}toString(){return`${this.Nt}:${this.Pt}:${this.Bt}:${this.Ut}:${this.zt}`}},d: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(":")}}};function mr(t){const e=mn().getStackTop();e.client=t,e.scope.setClient(t)}function yr(t,e,n=Gt(t.bufferSize||30)){let r={};function s(s){const i=[];if(de(s,((e,n)=>{const s=ve(n);if(we(r,s)){const r=gr(e,n);t.recordDroppedEvent("ratelimit_backoff",s,r)}else i.push(e)})),0===i.length)return Kt();const o=he(s[0],i),a=e=>{de(o,((n,r)=>{const s=gr(n,r);t.recordDroppedEvent(e,ve(r),s)}))};return n.add((()=>e({body:me(o,t.textEncoder)}).then((t=>(r=Se(r,t),t)),(t=>{throw a("network_error"),t})))).then((t=>t),(t=>{if(t instanceof P)return a("queue_overflow"),Kt();throw t}))}return s.__sentry__baseTransport__=!0,{send:s,flush:t=>n.drain(t)}}function gr(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}function vr(t){return[{type:"span"},t]}function br(t,e){const n=e&&function(t){return void 0!==t.getClient}(e)?e.getClient():e,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return function(t,e){return!!e&&t.includes(e.host)}(t,r)||function(t,e){if(!e)return!1;return kr(t)===kr(e)}(t,s)}function kr(t){return"/"===t[t.length-1]?t.slice(0,-1):t}const wr=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],Sr=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Tr="InboundFilters",_r=(t={})=>({name:Tr,setupOnce(){},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?[]:wr],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:Sr],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=>v(t,e)))}(t,e.ignoreErrors))return!0;if(function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&v(n,e)}(t,e.ignoreTransactions))return!0;if(function(t,e){if(!e||!e.length)return!1;const n=Ir(t);return!!n&&v(n,e)}(t,e.denyUrls))return!0;if(!function(t,e){if(!e||!e.length)return!0;const n=Ir(t);return!n||v(n,e)}(t,e.allowUrls))return!0;return!1}(e,i)?null:e}}),xr=or(Tr,_r);function Ir(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}}let Cr;const Er="FunctionToString",Or=new WeakMap,Rr=()=>({name:Er,setupOnce(){Cr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=H(this),n=Or.has(Je())&&void 0!==e?e:this;return Cr.apply(n,t)}}catch(t){}},setup(t){Or.set(t,!0)}}),Ar=or(Er,Rr),Mr="LinkedErrors",$r=or(Mr,((t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:Mr,setupOnce(){},preprocessEvent(t,r,s){const i=s.getOptions();b(Te,i.stackParser,i.maxValueLength,n,e,t,r)}}}));var Dr=Object.freeze({__proto__:null,FunctionToString:Ar,InboundFilters:xr,LinkedErrors:$r});class Lr{constructor(t){this.U=t,this.Ht=new Map,this.qt=setInterval((()=>this.flush()),5e3)}add(t,e,n,r="none",s={},i=te()){const o=Math.floor(i),a=e.replace(/[^\w\-.]+/gi,"_");const c=function(t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[ar(n)]=ur(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(J(r)).sort(((t,e)=>t[0].localeCompare(e[0])))}`}(t,a,u,c);let h=this.Ht.get(l);const f=h&&"s"===t?h.metric.weight:0;h?(h.metric.add(n),h.timestampt));this.U.captureAggregateMetrics(t)}this.Ht.clear()}}close(){clearInterval(this.qt),this.flush()}}const jr="MetricsAggregator",Fr=()=>({name:jr,setupOnce(){},setup(t){t.metricsAggregator=new Lr(t)}});function Nr(t,e,n,r={}){const s=Je(),i=Xe();if(s){if(!s.metricsAggregator)return;const{unit:o,tags:a,timestamp:c}=r,{release:u,environment:l}=s.getOptions(),h=i.getTransaction(),f={};u&&(f.release=u),l&&(f.environment=l),h&&(f.transaction=Fe(h).description||""),s.metricsAggregator.add(t,e,n,o,{...f,...a},c)}}const Pr={increment:function(t,e=1,n){Nr("c",t,e,n)},distribution:function(t,e,n){Nr("d",t,e,n)},set:function(t,e,n){Nr("s",t,e,n)},gauge:function(t,e,n){Nr("g",t,e,n)},MetricsAggregator:or(jr,Fr),metricsAggregatorIntegration:Fr},Br=Dr,Ur=_;const zr=(t,e,n)=>{let r,s;return i=>{e.value>=0&&(i||n)&&(s=e.value-(r||0),(s||void 0===r)&&(r=e.value,e.delta=s,t(e)))}},Hr=()=>Ur.__WEB_VITALS_POLYFILL__?Ur.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Ur.performance.timing,e=Ur.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n})()):Ur.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],qr=()=>{const t=Hr();return t&&t.activationStart||0},Wr=(t,e)=>{const n=Hr();let r="navigate";return n&&(r=Ur.document&&Ur.document.prerendering||qr()>0?"prerender":n.type.replace(/_/g,"-")),{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}},Kr=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{e(t.getEntries())}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},Jr=(t,e)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==Ur.document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};Ur.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))};let Xr=-1;const Gr=()=>(Xr<0&&(Ur.document&&Ur.document.visibilityState&&(Xr="hidden"!==Ur.document.visibilityState||Ur.document.prerendering?1/0:0),Jr((({timeStamp:t})=>{Xr=t}),!0)),{get firstHiddenTime(){return Xr}});let Yr=0,Vr=1/0,Qr=0;const Zr=t=>{t.forEach((t=>{t.interactionId&&(Vr=Math.min(Vr,t.interactionId),Qr=Math.max(Qr,t.interactionId),Yr=Qr?(Qr-Vr)/7+1:0)}))};let ts;const es=()=>{"interactionCount"in performance||ts||(ts=Kr("event",Zr,{type:"event",buffered:!0,durationThreshold:0}))},ns=()=>ts?Yr:performance.interactionCount||0,rs=[],ss={},is=t=>{const e=rs[rs.length-1],n=ss[t.interactionId];if(n||rs.length<10||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]};ss[e.id]=e,rs.push(e)}rs.sort(((t,e)=>e.latency-t.latency)),rs.splice(10).forEach((t=>{delete ss[t.id]}))}},os=(t,e)=>{e=e||{},es();const n=Wr("INP");let r;const s=t=>{t.forEach((t=>{if(t.interactionId&&is(t),"first-input"===t.entryType){!rs.some((e=>e.entries.some((e=>t.duration===e.duration&&t.startTime===e.startTime))))&&is(t)}}));const e=(()=>{const t=Math.min(rs.length-1,Math.floor(ns()/50));return rs[t]})();e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,r())},i=Kr("event",s,{durationThreshold:e.durationThreshold||40});r=zr(t,n,e.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Jr((()=>{s(i.takeRecords()),n.value<0&&ns()>0&&(n.value=0,n.entries=[]),r(!0)})))},as={},cs=t=>{Ur.document&&(Ur.document.prerendering?addEventListener("prerenderingchange",(()=>cs(t)),!0):"complete"!==Ur.document.readyState?addEventListener("load",(()=>cs(t)),!0):setTimeout(t,0))},us={},ls={};let hs,fs,ds,ps,ms;function ys(t,e=!1){return _s("lcp",t,ws,ds,e)}function gs(t,e){return xs(t,e),ls[t]||(!function(t){const e={};"event"===t&&(e.durationThreshold=0);Kr(t,(e=>{vs(t,{entries:e})}),e)}(t),ls[t]=!0),Is(t,e)}function vs(t,e){const n=us[t];if(n&&n.length)for(const t of n)try{t(e)}catch(t){}}function bs(){return((t,e={})=>{const n=Wr("CLS",0);let r,s=0,i=[];const o=t=>{t.forEach((t=>{if(!t.hadRecentInput){const e=i[0],o=i[i.length-1];s&&0!==i.length&&t.startTime-o.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&&r())}}))},a=Kr("layout-shift",o);if(a){r=zr(t,n,e.reportAllChanges);const s=()=>{o(a.takeRecords()),r(!0)};return Jr(s),s}})((t=>{vs("cls",{metric:t}),hs=t}),{reportAllChanges:!0})}function ks(){return(t=>{const e=Gr(),n=Wr("FID");let r;const s=t=>{t.startTime{t.forEach(s)},o=Kr("first-input",i);r=zr(t,n),o&&Jr((()=>{i(o.takeRecords()),o.disconnect()}),!0)})((t=>{vs("fid",{metric:t}),fs=t}))}function ws(){return(t=>{const e=Gr(),n=Wr("LCP");let r;const s=t=>{const s=t[t.length-1];if(s){const t=Math.max(s.startTime-qr(),0);t{as[n.id]||(s(i.takeRecords()),i.disconnect(),as[n.id]=!0,r(!0))};return["keydown","click"].forEach((t=>{Ur.document&&addEventListener(t,e,{once:!0,capture:!0})})),Jr(e,!0),e}})((t=>{vs("lcp",{metric:t}),ds=t}))}function Ss(){return((t,e)=>{e=e||{};const n=Wr("TTFB"),r=zr(t,n,e.reportAllChanges);cs((()=>{const t=Hr();if(t){if(n.value=Math.max(t.responseStart-qr(),0),n.value<0||n.value>performance.now())return;n.entries=[t],r(!0)}}))})((t=>{vs("ttfb",{metric:t}),ps=t}))}function Ts(){return os((t=>{vs("inp",{metric:t}),ms=t}))}function _s(t,e,n,r,s=!1){let i;return xs(t,e),ls[t]||(i=n(),ls[t]=!0),r&&e({metric:r}),Is(t,e,s?i:void 0)}function xs(t,e){us[t]=us[t]||[],us[t].push(e)}function Is(t,e,n){return()=>{n&&n();const r=us[t];if(!r)return;const s=r.indexOf(e);-1!==s&&r.splice(s,1)}}function Cs(t){return"number"==typeof t&&isFinite(t)}function Es(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function Os(t){return t/1e3}function Rs(){return Ur&&Ur.addEventListener&&Ur.performance}let As,Ms,$s=0,Ds={};function Ls(){const t=Rs();if(t&&ee){t.mark&&Ur.performance.mark("sentry-tracing-init");const e=_s("fid",(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=Os(ee),r=Os(e.startTime);Ds.fid={value:t.value,unit:"millisecond"},Ds["mark.fid"]={value:n+r,unit:"second"}}),ks,fs),n=function(t,e=!1){return _s("cls",t,bs,hs,e)}((({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Ds.cls={value:t.value,unit:""},Ms=e)}),!0),r=ys((({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Ds.lcp={value:t.value,unit:"millisecond"},As=e)}),!0),s=function(t){return _s("ttfb",t,Ss,ps)}((({metric:t})=>{t.entries[t.entries.length-1]&&(Ds.ttfb={value:t.value,unit:"millisecond"})}));return()=>{e(),n(),r(),s()}}return()=>{}}function js(t,e){if(Rs()&&ee){const n=function(t,e){return n=({metric:n})=>{if(void 0===n.value)return;const r=n.entries.find((t=>t.duration===n.value&&void 0!==Fs[t.name])),s=Je();if(!r||!s)return;const i=Fs[r.name],o=s.getOptions(),a=Os(ee+r.startTime),c=Os(n.value),u=void 0!==r.interactionId?t[r.interactionId]:void 0;if(void 0===u)return;const{routeName:l,parentContext:h,activeTransaction:f,user:d,replayId:p}=u,m=void 0!==d?d.email||d.id||d.ip_address:void 0,y=void 0!==f?f.getProfileId():void 0,g=new Un({startTimestamp:a,endTimestamp:a+c,op:`ui.interaction.${i}`,name:E(r.target),attributes:{release:o.release,environment:o.environment,transaction:l,...void 0!==m&&""!==m?{user:m}:{},...void 0!==y?{profile_id:y}:{},...void 0!==p?{replay_id:p}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),v=function(t,e,n){if(!In(e))return!1;let r;return r=void 0!==t&&"function"==typeof e.tracesSampler?e.tracesSampler({transactionContext:t,name:t.name,parentSampled:t.parentSampled,attributes:{...t.data,...t.attributes},location:Ur.location}):void 0!==t&&void 0!==t.sampled?t.sampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1,!!Xn(r)&&(!0===r?n:!1===r?0:r*n)}(h,o,e);if(v&&Math.random(){}))}},_s("inp",n,Ts,ms);var n}(t,e);return()=>{n()}}return()=>{}}const Fs={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 Ns(t){const e=Rs();if(!e||!Ur.performance.getEntries||!ee)return;const n=Os(ee),r=e.getEntries(),{op:s,start_timestamp:i}=Fe(t);if(r.slice($s).forEach((e=>{const r=Os(e.startTime),s=Os(e.duration);if(!("navigation"===t.op&&i&&n+r{Ps(t,e,r,n)})),Ps(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),Ps(t,e,"fetch",n,"cache","domainLookupStart"),Ps(t,e,"domainLookup",n,"DNS"),function(t,e,n){e.responseEnd&&(Es(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+Os(e.requestStart),endTimestamp:n+Os(e.responseEnd)}),Es(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+Os(e.responseStart),endTimestamp:n+Os(e.responseEnd)}))}(t,e,n)}(t,e,n);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,s){const i=s+n,o=i+r;Es(t,{description:e.name,endTimestamp:o,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i})}(t,e,r,s,n);const i=Gr(),o=e.startTime{if(!Ds[t]||!i||n>=i)return;const e=Ds[t].value,r=n+Os(e),s=Math.abs(1e3*(r-i));Ds[t].value=s}));const e=Ds["mark.fid"];e&&Ds.fid&&(Es(t,{description:"first input delay",endTimestamp:e.value+Os(Ds.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:e.value}),delete Ds["mark.fid"]),"fcp"in Ds||delete Ds.cls,Object.keys(Ds).forEach((t=>{!function(t,e,n){const r=kn();r&&r.setMeasurement(t,e,n)}(t,Ds[t].value,Ds[t].unit)})),function(t){As&&(As.element&&t.setTag("lcp.element",E(As.element)),As.id&&t.setTag("lcp.id",As.id),As.url&&t.setTag("lcp.url",As.url.trim().slice(0,200)),t.setTag("lcp.size",As.size));Ms&&Ms.sources&&Ms.sources.forEach(((e,n)=>t.setTag(`cls.source.${n+1}`,E(e.node))))}(t)}As=void 0,Ms=void 0,Ds={}}function Ps(t,e,n,r,s,i){const o=i?e[i]:e[`${n}End`],a=e[`${n}Start`];a&&o&&Es(t,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+Os(a),endTimestamp:r+Os(o)})}function Bs(t,e,n,r){const s=e[n];null!=s&&s<2147483647&&(t[r]=s)}function Us(t,e,n,r,s="auto.http.browser"){if(!In()||!t.fetchData)return;const i=e(t.fetchData.url);if(t.endTimestamp&&i){const e=t.fetchData.__span;if(!e)return;const n=r[e];return void(n&&(!function(t,e){if(e.response){_n(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const e=parseInt(n);e>0&&t.setAttribute("http.response_content_length",e)}}else e.error&&t.setStatus("internal_error");t.end()}(n,t),delete r[e]))}const o=Xe(),a=Je(),{method:c,url:u}=t.fetchData,l=function(t){try{return new URL(t).href}catch(t){return}}(u),h=l?Yt(l).host:void 0,f=i?Cn({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,"http.url":l,"server.address":h,[Pn]:s},op:"http.client"}):void 0;if(f&&(t.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(t.fetchData.url)&&a){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=s||n.getSpan(),o=yn(),{traceId:a,spanId:c,sampled:u,dsc:l}={...o.getPropagationContext(),...n.getPropagationContext()},h=i?De(i):le(a,c,u),f=oe(l||(i?en(i):tn(a,e,n))),p=r.headers||("undefined"!=typeof Request&&d(t,Request)?t.headers:void 0);if(p){if("undefined"!=typeof Headers&&d(p,Headers)){const t=new Headers(p);return t.append("sentry-trace",h),f&&t.append(ne,f),t}if(Array.isArray(p)){const t=[...p,["sentry-trace",h]];return f&&t.push([ne,f]),t}{const t="baggage"in p?p.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),f&&e.push(f),{...p,"sentry-trace":h,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":h,baggage:f}}(e,a,o,n,f)}return f}const zs=["localhost",/^\/(?!\/)/],Hs={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:zs,tracePropagationTargets:zs};function qs(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}={traceFetch:Hs.traceFetch,traceXHR:Hs.traceXHR,...t},a="function"==typeof i?i:t=>!0,c=t=>function(t,e){return v(t,e||zs)}(t,r||s),u={};e&&Tt((t=>{const e=Us(t,a,c,u);if(e){const n=Js(t.fetchData.url),r=n?Yt(n).host:void 0;e.setAttributes({"http.url":n,"server.address":r})}o&&e&&Ws(e)})),n&&Pt((t=>{const e=function(t,e,n,r){const s=t.xhr,i=s&&s.__sentry_xhr_v3__;if(!In()||!s||s.__sentry_own_request__||!i)return;const o=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&&(_n(e,i.status_code),e.end(),delete r[t]))}const a=Xe(),c=yn(),u=Js(i.url),l=u?Yt(u).host:void 0,h=o?Cn({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":u,url:i.url,"server.address":l,[Pn]:"auto.http.browser"},op:"http.client"}):void 0;h&&(s.__sentry_xhr_span_id__=h.spanContext().spanId,r[s.__sentry_xhr_span_id__]=h);const f=Je();if(s.setRequestHeader&&n(i.url)&&f){const{traceId:t,spanId:e,sampled:n,dsc:r}={...c.getPropagationContext(),...a.getPropagationContext()};!function(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(ne,n)}catch(t){}}(s,h?De(h):le(t,e,n),oe(r||(h?en(h):tn(t,f,a))))}return h}(t,a,c,u);o&&e&&Ws(e)}))}function Ws(t){const{url:e}=Fe(t).data||{};if(!e||"string"!=typeof e)return;const n=gs("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]),!ee)return r;return[...r,["http.request.redirect_start",Ks(t.redirectStart)],["http.request.fetch_start",Ks(t.fetchStart)],["http.request.domain_lookup_start",Ks(t.domainLookupStart)],["http.request.domain_lookup_end",Ks(t.domainLookupEnd)],["http.request.connect_start",Ks(t.connectStart)],["http.request.secure_connection_start",Ks(t.secureConnectionStart)],["http.request.connection_end",Ks(t.connectEnd)],["http.request.request_start",Ks(t.requestStart)],["http.request.response_start",Ks(t.responseStart)],["http.request.response_end",Ks(t.responseEnd)]]})(r).forEach((e=>t.setAttribute(...e))),setTimeout(n)}}))}))}function Ks(t=0){return((ee||performance.timeOrigin)+t)/1e3}function Js(t){try{return new URL(t,Ur.location.origin).href}catch(t){return}}const Xs={...Hn,markBackgroundTransactions:!0,routingInstrumentation:function(t,e=!0,n=!0){if(!Ur||!Ur.location)return;let r,s=Ur.location.href;e&&(r=t({name:Ur.location.pathname,startTimestamp:ee?ee/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&jt((({to:e,from:n})=>{void 0===n&&s&&-1!==s.indexOf(e)?s=void 0:n!==e&&(s=void 0,r&&r.end(),r=t({name:Ur.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Hs};class Gs{constructor(t){this.name="BrowserTracing",this.Wt=!1,Qn(),this.options={...Xs,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this.Kt=Ls(),this.Jt={},this.options.enableInp&&js(this.Jt,this.options.interactionsSampleRate),this.options.enableLongTask&&gs("longtask",(({entries:t})=>{for(const e of t){const t=kn();if(!t)return;const n=Os(ee+e.startTime),r=Os(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}})),this.options._experiments.enableInteractions&&gs("event",(({entries:t})=>{for(const e of t){const t=kn();if(!t)return;if("click"===e.name){const n=Os(ee+e.startTime),r=Os(e.duration),s={description:E(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r},i=R(e.target);i&&(s.attributes={"ui.component_name":i}),t.startChild(s)}}})),this.Xt={name:void 0,context:void 0}}setupOnce(t,e){this.Gt=e;const n=e().getClient(),r=n&&n.getOptions(),{routingInstrumentation:s,startTransactionOnLocationChange:i,startTransactionOnPageLoad:o,markBackgroundTransactions:a,traceFetch:c,traceXHR:u,shouldCreateSpanForRequest:l,enableHTTPTimings:h,_experiments:f}=this.options,d=r&&r.tracePropagationTargets,p=d||this.options.tracePropagationTargets;s((t=>{const n=this.Yt(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,t,e),n}),o,i),a&&Ur.document&&Ur.document.addEventListener("visibilitychange",(()=>{const t=kn();if(Ur.document.hidden&&t){const e="cancelled",{op:n,status:r}=Fe(t);r||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.end()}})),f.enableInteractions&&this.Vt(),this.options.enableInp&&this.Qt(),qs({traceFetch:c,traceXHR:u,tracePropagationTargets:p,shouldCreateSpanForRequest:l,enableHTTPTimings:h})}Yt(t){if(!this.Gt)return;const e=this.Gt(),{beforeNavigate:n,idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,o="pageload"===t.op;let a;if(o){const e=o?Ys("sentry-trace"):"",n=o?Ys("baggage"):void 0,{traceId:r,dsc:s,parentSpanId:i,sampled:c}=function(t,e){const n=ue(t),r=ie(e),{traceId:s,parentSpanId:i,parentSampled:o}=n||{};return n?{traceId:s||ot(),parentSpanId:i||ot().substring(16),spanId:ot().substring(16),sampled:o,dsc:r||{}}:{traceId:s||ot(),spanId:ot().substring(16)}}(e,n);a={traceId:r,parentSpanId:i,parentSampled:c,...t,metadata:{...t.metadata,dynamicSamplingContext:s},trimEnd:!0}}else a={trimEnd:!0,...t};const c="function"==typeof n?n(a):a,u=void 0===c?{...a,sampled:!1}:c;u.metadata=u.name!==a.name?{...u.metadata,source:"custom"}:u.metadata,this.Xt.name=u.name,this.Xt.context=u,u.sampled;const{location:l}=Ur,h=Vn(e,u,r,s,!0,{location:l},i,o);return o&&Ur.document&&(Ur.document.addEventListener("readystatechange",(()=>{["interactive","complete"].includes(Ur.document.readyState)&&h.sendAutoFinishSignal()})),["interactive","complete"].includes(Ur.document.readyState)&&h.sendAutoFinishSignal()),h.registerBeforeFinishCallback((t=>{this.Kt(),Ns(t)})),h}Vt(){let t;const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:r}=this.options,s=kn();if(s&&s.op&&["navigation","pageload"].includes(s.op))return;if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this.Gt)return;if(!this.Xt.name)return;const i=this.Gt(),{location:o}=Ur,a={name:this.Xt.name,op:"ui.action.click",trimEnd:!0,data:{[jn]:this.Xt.context?Vs(this.Xt.context):"url"}};t=Vn(i,a,e,n,!0,{location:o},r)};["click"].forEach((t=>{Ur.document&&addEventListener(t,e,{once:!1,capture:!0})}))}Qt(){const t=({entries:t})=>{const e=Je(),n=void 0!==e&&void 0!==e.getIntegrationByName?e.getIntegrationByName("Replay"):void 0,r=void 0!==n?n.getReplayId():void 0,s=kn(),i=Xe(),o=void 0!==i?i.getUser():void 0;t.forEach((t=>{if(function(t){return"duration"in t}(t)){const e=t.interactionId;if(void 0===e)return;const n=this.Jt[e],i=t.duration,a=t.startTime,c=Object.keys(this.Jt),u=c.length>0?c.reduce(((t,e)=>this.Jt[t].durationthis.Jt[t])).some((t=>t.duration===i&&t.startTime===a)))return}if(!e)return;if(n)n.duration=Math.max(n.duration,i);else if(c.length<10||void 0===u||i>this.Jt[u].duration){const t=this.Xt.name,n=this.Xt.context;t&&n&&(u&&Object.keys(this.Jt).length>=10&&delete this.Jt[u],this.Jt[e]={routeName:t,duration:i,parentContext:n,user:o,activeTransaction:s,replayId:r,startTime:a})}}}))};gs("event",t),gs("first-input",t)}}function Ys(t){const e=(n=`meta[name=${t}]`,C.document&&C.document.querySelector?C.document.querySelector(n):null);var n;return e?e.getAttribute("content"):void 0}function Vs(t){const e=t.attributes&&t.attributes["sentry.source"],n=t.data&&t.data["sentry.source"],r=t.metadata&&t.metadata.source;return e||n||r}function Qs(){Qn()}const Zs=_,ti="sentryReplaySession",ei="Unable to send Replay",ni=15e4,ri=5e3,si=2e7,ii=36e5;function oi(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}var ai;function ci(t){const e=oi([t,"optionalAccess",t=>t.host]);return Boolean(oi([e,"optionalAccess",t=>t.shadowRoot])===t)}function ui(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function li(t){try{const n=t.rules||t.cssRules;return n?((e=Array.from(n,hi).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 hi(t){let e;if(function(t){return"styleSheet"in t}(t))try{e=li(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"}(ai||(ai={}));class fi{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const e=oi([this,"access",t=>t.getMeta,"call",e=>e(t),"optionalAccess",t=>t.id]);return r=()=>-1,null!=(n=e)?n:r();var n,r}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 di({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 pi({isMasked:t,element:e,value:n,maskInputFn:r}){let s=n||"";return t?(r&&(s=r(s,e)),"*".repeat(s.length)):s}function mi(t){return t.toLowerCase()}function yi(t){return t.toUpperCase()}const gi="__rrweb_original__";function vi(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?mi(e):null}function bi(t,e,n){return"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let ki=1;const wi=new RegExp("[^a-z0-9-_:]");function Si(){return ki++}let Ti,_i;const xi=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ii=/^(?:[a-z+]+:)?\/\//i,Ci=/^www\..*/i,Ei=/^(data:)([^,]*),(.*)/i;function Oi(t,e){return(t||"").replace(xi,((t,n,r,s,i,o)=>{const a=r||i||o,c=n||s||"";if(!a)return t;if(Ii.test(a)||Ci.test(a))return`url(${c}${a}${c})`;if(Ei.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+a}${c})`;const u=e.split("/"),l=a.split("/");u.pop();for(const t of l)"."!==t&&(".."===t?u.pop():u.push(t));return`url(${c}${u.join("/")}${c})`}))}const Ri=/^[^ \t\n\r\u000c]+/,Ai=/^[, \t\n\r\u000c]+/;function Mi(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function $i(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function Di(){const t=document.createElement("a");return t.href="",t.href}function Li(t,e,n,r,s,i){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Mi(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(Ai),!(n>=e.length);){let i=r(Ri);if(","===i.slice(-1))i=Mi(t,i.substring(0,i.length-1)),s.push(i);else{let r="";i=Mi(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?Oi(r,Di()):"object"===e&&"data"===n?Mi(t,r):"function"==typeof i?i(n,r,s):r:Mi(t,r):r}function ji(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function Fi(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Fi(t.parentNode,e,n,r+1):-1}function Ni(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 Pi(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 a=-1,c=-1;if(i){if(c=Fi(o,Ni(r,s)),c<0)return!0;a=Fi(o,Ni(e,n),c>=0?c:1/0)}else{if(a=Fi(o,Ni(e,n)),a<0)return!1;c=Fi(o,Ni(r,s),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!i}catch(t){}return!!i}function Bi(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:h,unmaskTextSelector:f,inlineStylesheet:d,maskInputOptions:p={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:k,newlyAddedElement:w=!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:ai.Document,childNodes:[],compatMode:t.compatMode}:{type:ai.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:ai.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:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:m,maskAllText:y,maskTextClass:g,unmaskTextClass:v,maskTextSelector:b,unmaskTextSelector:k}=e,w=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=mi(t.tagName);return wi.test(e)?"div":e}(t);let T={};const _=t.attributes.length;for(let e=0;e<_;e++){const r=t.attributes[e];r.name&&!ji(S,r.name)&&(T[r.name]=Li(n,S,mi(r.name),r.value,t,c))}if("link"===S&&o){const e=Array.from(n.styleSheets).find((e=>e.href===t.href));let r=null;e&&(r=li(e)),r&&(delete T.rel,delete T.href,T._cssText=Oi(r,e.href))}if("style"===S&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=li(t.sheet);e&&(T._cssText=Oi(e,Di()))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const e=t,n=vi(e),r=bi(e,yi(S),n),s=e.checked;if("submit"!==n&&"button"!==n&&r){const t=Pi(e,g,b,v,k,di({type:n,tagName:yi(S),maskInputOptions:a}));T.value=pi({isMasked:t,element:e,value:r,maskInputFn:u})}s&&(T.checked=s)}"option"===S&&(t.selected&&!a.select?T.selected=!0:delete T.selected);if("canvas"===S&&f)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)||(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)&&(T.rr_dataURL=e)}if("img"===S&&h){Ti||(Ti=n.createElement("canvas"),_i=Ti.getContext("2d"));const e=t,r=e.crossOrigin;e.crossOrigin="anonymous";const s=()=>{e.removeEventListener("load",s);try{Ti.width=e.naturalWidth,Ti.height=e.naturalHeight,_i.drawImage(e,0,0),T.rr_dataURL=Ti.toDataURL(l.type,l.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}r?T.crossOrigin=r:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?s():e.addEventListener("load",s)}"audio"!==S&&"video"!==S||(T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime);p||(t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop));if(w){const{width:e,height:n}=t.getBoundingClientRect();T={class:T.class,rr_width:`${e}px`,rr_height:`${n}px`}}"iframe"!==S||d(T.src)||(t.contentDocument||(T.rr_src=T.src),delete T.src);let x;try{customElements.get(S)&&(x=!0)}catch(t){}return{type:ai.Element,tagName:S,attributes:T,childNodes:[],isSVG:$i(t)||void 0,needBlock:w,rootId:m,isCustom:x}}(t,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:d,maskAttributeFn:c,maskInputOptions:p,maskInputFn:y,dataURLOptions:g,inlineImages:v,recordCanvas:b,keepIframeSrcFn:k,newlyAddedElement:w,rootId:S,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:h,unmaskTextSelector:f});case t.TEXT_NODE:return function(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=e,h=t.parentNode&&t.parentNode.tagName;let f=t.textContent;const d="STYLE"===h||void 0,p="SCRIPT"===h||void 0,m="TEXTAREA"===h||void 0;if(d&&f){try{t.nextSibling||t.previousSibling||oi([t,"access",t=>t.parentNode,"access",t=>t.sheet,"optionalAccess",t=>t.cssRules])&&(f=li(t.parentNode.sheet))}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}f=Oi(f,Di())}p&&(f="SCRIPT_PLACEHOLDER");const y=Pi(t,r,i,s,o,n);d||p||m||!f||!y||(f=a?a(f,t.parentElement):f.replace(/[\S]/g,"*"));m&&f&&(c.textarea||y)&&(f=u?u(f,t.parentNode):f.replace(/[\S]/g,"*"));if("OPTION"===h&&f){f=pi({isMasked:Pi(t,r,i,s,o,di({type:null,tagName:h,maskInputOptions:c})),element:t,value:f,maskInputFn:u})}return{type:ai.Text,textContent:f||"",isStyle:d,rootId:l}}(t,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:h,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:p,maskInputFn:y,rootId:S});case t.CDATA_SECTION_NODE:return{type:ai.CDATA,textContent:"",rootId:S};case t.COMMENT_NODE:return{type:ai.Comment,textContent:t.textContent||"",rootId:S};default:return!1}}function Ui(t){return null==t?"":t.toLowerCase()}function zi(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:h,skipChild:f=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b={},inlineImages:k=!1,recordCanvas:w=!1,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:_=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:C=(()=>!1),newlyAddedElement:E=!1}=e;let{preserveWhiteSpace:O=!0}=e;const R=Bi(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:h,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:b,inlineImages:k,recordCanvas:w,keepIframeSrcFn:C,newlyAddedElement:E});if(!R)return console.warn(t,"not serialized"),null;let A;A=r.hasNode(t)?r.getId(t):!function(t,e){if(e.comment&&t.type===ai.Comment)return!0;if(t.type===ai.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&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Ui(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ui(t.attributes.name)||"icon"===Ui(t.attributes.rel)||"apple-touch-icon"===Ui(t.attributes.rel)||"shortcut icon"===Ui(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Ui(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Ui(t.attributes.property).match(/^(og|twitter|fb):/)||Ui(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ui(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===Ui(t.attributes.name)||"googlebot"===Ui(t.attributes.name)||"bingbot"===Ui(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===Ui(t.attributes.name)||"generator"===Ui(t.attributes.name)||"framework"===Ui(t.attributes.name)||"publisher"===Ui(t.attributes.name)||"progid"===Ui(t.attributes.name)||Ui(t.attributes.property).match(/^article:/)||Ui(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===Ui(t.attributes.name)||"yandex-verification"===Ui(t.attributes.name)||"csrf-token"===Ui(t.attributes.name)||"p:domain_verify"===Ui(t.attributes.name)||"verify-v1"===Ui(t.attributes.name)||"verification"===Ui(t.attributes.name)||"shopify-checkout-api-token"===Ui(t.attributes.name)))return!0}}return!1}(R,v)&&(O||R.type!==ai.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?Si():-2;const M=Object.assign(R,{id:A});if(r.add(t,M),-2===A)return null;S&&S(t);let $=!f;if(M.type===ai.Element){$=$&&!M.needBlock,delete M.needBlock;const e=t.shadowRoot;e&&ui(e)&&(M.isShadowHost=!0)}if((M.type===ai.Document||M.type===ai.Element)&&$){v.headWhitespace&&M.type===ai.Element&&"head"===M.tagName&&(O=!1);const e={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:h,skipChild:f,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:k,recordCanvas:w,preserveWhiteSpace:O,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:_,onStylesheetLoad:x,stylesheetLoadTimeout:I,keepIframeSrcFn:C};for(const n of Array.from(t.childNodes)){const t=zi(n,e);t&&M.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=zi(n,e);r&&(ui(t.shadowRoot)&&(r.isShadow=!0),M.childNodes.push(r))}}return t.parentNode&&ci(t.parentNode)&&ui(t.parentNode)&&(M.isShadow=!0),M.type===ai.Element&&"iframe"===M.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=setTimeout((()=>{i||(e(),i=!0)}),n);return void t.addEventListener("load",(()=>{clearTimeout(r),i=!0,e()}))}const o="about:blank";if(r.location.href!==o||t.src===o||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,(()=>{const e=t.contentDocument;if(e&&T){const n=zi(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:h,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:k,recordCanvas:w,preserveWhiteSpace:O,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:_,onStylesheetLoad:x,stylesheetLoadTimeout:I,keepIframeSrcFn:C});n&&T(t,n)}}),_),M.type===ai.Element&&"link"===M.tagName&&"stylesheet"===M.attributes.rel&&function(t,e,n){let r,s=!1;try{r=t.sheet}catch(t){return}if(r)return;const i=setTimeout((()=>{s||(e(),s=!0)}),n);t.addEventListener("load",(()=>{clearTimeout(i),s=!0,e()}))}(t,(()=>{if(x){const e=zi(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:h,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:k,recordCanvas:w,preserveWhiteSpace:O,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:_,onStylesheetLoad:x,stylesheetLoadTimeout:I,keepIframeSrcFn:C});e&&x(t,e)}}),I),M}function Hi(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}function qi(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const Wi="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 Ki={map:{},getId:()=>(console.error(Wi),-1),getNode:()=>(console.error(Wi),null),removeNodeFromMap(){console.error(Wi)},has:()=>(console.error(Wi),!1),reset(){console.error(Wi)}};function Ji(t,e,n={}){let r=null,s=0;return function(...i){const o=Date.now();s||!1!==n.leading||(s=o);const a=e-(o-s),c=this;a<=0||a>e?(r&&(!function(...t){po("clearTimeout")(...t)}(r),r=null),s=o,t.apply(c,i)):r||!1===n.trailing||(r=mo((()=>{s=!1===n.leading?0:Date.now(),r=null,t.apply(c,i)}),a))}}function Xi(t,e,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(t){mo((()=>{n.set.call(this,t)}),0),i&&i.set&&i.set.call(this,t)}}),()=>Xi(t,e,i||{},!0)}function Gi(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&&(Ki=new Proxy(Ki,{get:(t,e,n)=>("map"===e&&console.error(Wi),Reflect.get(t,e,n))}));let Yi=Date.now;function Vi(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:Hi([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollLeft])||Hi([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollLeft])||Hi([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:Hi([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollTop])||Hi([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollTop])||Hi([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollTop])||0}}function Qi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Zi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function to(t){if(!t)return null;return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}function eo(t,e,n,r,s){if(!t)return!1;const i=to(t);if(!i)return!1;const o=Ni(e,n);if(!s){const t=r&&i.matches(r);return o(i)&&!t}const a=Fi(i,o);let c=-1;return!(a<0)&&(r&&(c=Fi(i,Ni(null,r))),a>-1&&c<0||at.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Yi=()=>(new Date).getTime());class co{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 uo(t){let e=null;return Hi([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 lo(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=uo(n);)n=e;return n}(t);return e.contains(n)}function ho(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||lo(t))}const fo={};function po(t){const e=fo[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 fo[t]=r.bind(window)}function mo(...t){return po("setTimeout")(...t)}var yo=(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))(yo||{}),go=(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))(go||{}),vo=(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))(vo||{}),bo=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(bo||{});function ko(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}function wo(t){return"__ln"in t}class So{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&&wo(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&&wo(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 To=(t,e)=>`${t}@${e}`;class _o{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 So,r=t=>{let e=t,n=-2;for(;-2===n;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},s=s=>{if(!s.parentNode||!ho(s))return;const i=ci(s.parentNode)?this.mirror.getId(uo(s)):this.mirror.getId(s.parentNode),o=r(s);if(-1===i||-1===o)return n.addNode(s);const a=zi(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=>{io(t,this.mirror)&&this.iframeManager.addIframe(t),oo(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),ao(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});a&&(t.push({parentId:i,nextId:o,node:a}),e.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)Io(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||s(t);for(const t of this.addedSet)Eo(this.droppedSet,t)||Io(this.removes,t,this.mirror)?Eo(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.Zt);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(!no(t.target,this.mirror))switch(t.type){case"characterData":{const e=t.target.textContent;eo(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||e===t.oldValue||this.texts.push({value:Pi(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e,to(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=vi(e),s=e.tagName;r=bi(e,s,n);const i=di({maskInputOptions:this.maskInputOptions,tagName:s,type:n});r=pi({isMasked:Pi(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:e,value:r,maskInputFn:this.maskInputFn})}if(eo(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:{},Zt:{}},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"),!ji(e.tagName,n)&&(s.attributes[n]=Li(this.doc,mi(e.tagName),mi(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.Zt[t]=[r,i]}for(const t of Array.from(n.style))""===e.style.getPropertyValue(t)&&(s.styleDiff[t]=!1)}break}case"childList":if(eo(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=ci(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);eo(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||no(e,this.mirror)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(xo(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||ro(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[To(n,r)]?xo(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!(!ci(t.target)||!ui(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(no(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[To(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);eo(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach((t=>this.genAdds(t))),ao(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 xo(t,e){t.delete(e),e.childNodes.forEach((e=>xo(t,e)))}function Io(t,e,n){return 0!==t.length&&Co(t,e,n)}function Co(t,e,n){const{parentNode:r}=e;if(!r)return!1;const s=n.getId(r);return!!t.some((t=>t.id===s))||Co(t,r,n)}function Eo(t,e){return 0!==t.size&&Oo(t,e)}function Oo(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||Oo(t,n))}let Ro;function Ao(t){Ro=t}function Mo(){Ro=void 0}const $o=t=>{if(!Ro)return t;return(...e)=>{try{return t(...e)}catch(t){if(Ro&&!0===Ro(t))return()=>{};throw t}}};function Do(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const Lo=[];function jo(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 Fo(t,e){const n=new _o;Lo.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const s=Do([window,"optionalAccess",t=>t.Zone,"optionalAccess",t=>t.__symbol__,"optionalCall",t=>t("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r($o((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 No({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,c=[];let u=null;return Object.keys(vo).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==a[t])).forEach((o=>{let a=mi(o);const l=(e=>o=>{const a=jo(o);if(eo(a,r,s,i,!0))return;let c=null,l=e;if("pointerType"in o){switch(o.pointerType){case"mouse":c=bo.Mouse;break;case"touch":c=bo.Touch;break;case"pen":c=bo.Pen}c===bo.Touch&&(vo[e]===vo.MouseDown?l="TouchStart":vo[e]===vo.MouseUp&&(l="TouchEnd"))}else so(o)&&(c=bo.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===bo.Touch||l.startsWith("Mouse")&&c===bo.Mouse)&&(c=null)):vo[e]===vo.Click&&(c=u,u=null);const h=so(o)?o.changedTouches[0]:o;if(!h)return;const f=n.getId(a),{clientX:d,clientY:p}=h;$o(t)({type:vo[l],id:f,x:d,y:p,...null!==c&&{pointerType:c}})})(o);if(window.PointerEvent)switch(vo[o]){case vo.MouseDown:case vo.MouseUp:a=a.replace("mouse","pointer");break;case vo.TouchStart:case vo.TouchEnd:return}c.push(qi(a,l,e))})),$o((()=>{c.forEach((t=>t()))}))}function Po({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){return qi("scroll",$o(Ji($o((o=>{const a=jo(o);if(!a||eo(a,r,s,i,!0))return;const c=n.getId(a);if(a===e&&e.defaultView){const n=Vi(e.defaultView);t({id:c,x:n.left,y:n.top})}else t({id:c,x:a.scrollLeft,y:a.scrollTop})})),o.scroll||100)),e)}const Bo=["INPUT","TEXTAREA","SELECT"],Uo=new WeakMap;function zo({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:h,maskTextClass:f,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m}){function y(t){let n=jo(t);const l=t.isTrusted,y=n&&yi(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||Bo.indexOf(y)<0||eo(n,r,s,i,!0))return;const v=n;if(v.classList.contains(o)||a&&v.matches(a))return;const b=vi(n);let k=bi(v,y,b),w=!1;const S=di({maskInputOptions:c,tagName:y,type:b}),T=Pi(n,f,p,d,m,S);"radio"!==b&&"checkbox"!==b||(w=n.checked),k=pi({isMasked:T,element:n,value:k,maskInputFn:u}),g(n,h?{text:k,isChecked:w,userTriggered:l}:{text:k,isChecked:w});const _=n.name;"radio"===b&&_&&w&&e.querySelectorAll(`input[type="radio"][name="${_}"]`).forEach((t=>{if(t!==n){const e=pi({isMasked:T,element:t,value:bi(t,y,b),maskInputFn:u});g(t,h?{text:e,isChecked:!w,userTriggered:!1}:{text:e,isChecked:!w})}}))}function g(e,r){const s=Uo.get(e);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){Uo.set(e,r);const s=n.getId(e);$o(t)({...r,id:s})}}const v=("last"===l.input?["change"]:["input","change"]).map((t=>qi(t,$o(y),e))),b=e.defaultView;if(!b)return()=>{v.forEach((t=>t()))};const k=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[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 k&&k.set&&v.push(...w.map((t=>Xi(t[0],t[1],{set(){$o(y)({target:this,isTrusted:!1})}},!1,b)))),$o((()=>{v.forEach((t=>t()))}))}function Ho(t){return function(t,e){if(Jo("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Jo("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Jo("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Jo("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 qo(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function Wo({mirror:t,stylesheetManager:e},n){let r=null;r="#document"===n.nodeName?t.getId(n):t.getId(n.host);const s="#document"===n.nodeName?Do([n,"access",t=>t.defaultView,"optionalAccess",t=>t.Document]):Do([n,"access",t=>t.ownerDocument,"optionalAccess",t=>t.defaultView,"optionalAccess",t=>t.ShadowRoot]),i=Do([s,"optionalAccess",t=>t.prototype])?Object.getOwnPropertyDescriptor(Do([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 Do([i,"access",t=>t.get,"optionalAccess",t=>t.call,"call",t=>t(this)])},set(t){const n=Do([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}}),$o((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))):()=>{}}function Ko(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};const r=Fo(t,t.doc),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,a=[];const c=Ji($o((e=>{const n=Date.now()-o;t(a.map((t=>(t.timeOffset-=n,t))),e),a=[],o=null})),i),u=$o(Ji($o((t=>{const e=jo(t),{clientX:n,clientY:s}=so(t)?t.changedTouches[0]:t;o||(o=Yi()),a.push({x:n,y:s,id:r.getId(e),timeOffset:Yi()-o}),c("undefined"!=typeof DragEvent&&t instanceof DragEvent?go.Drag:t instanceof MouseEvent?go.MouseMove:go.TouchMove)})),s,{trailing:!1})),l=[qi("mousemove",u,n),qi("touchmove",u,n),qi("drag",u,n)];return $o((()=>{l.forEach((t=>t()))}))}(t),i=No(t),o=Po(t),a=function({viewportResizeCb:t},{win:e}){let n=-1,r=-1;return qi("resize",$o(Ji($o((()=>{const e=Qi(),s=Zi();n===e&&r===s||(t({width:Number(s),height:Number(e)}),n=e,r=s)})),200)),e)}(t,{win:n}),c=zo(t),u=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=$o((o=>Ji($o((i=>{const a=jo(i);if(!a||eo(a,e,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:h}=a;t({type:o,id:s.getId(a),currentTime:c,volume:u,muted:l,playbackRate:h})})),i.media||500))),c=[qi("play",a(0),o),qi("pause",a(1),o),qi("seeked",a(2),o),qi("volumechange",a(3),o),qi("ratechange",a(4),o)];return $o((()=>{c.forEach((t=>t()))}))}(t),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:$o(((r,s,i)=>{const[o,a]=i,{id:c,styleId:u}=qo(s,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:o,index:a}]}),r.apply(s,i)}))});const i=r.CSSStyleSheet.prototype.deleteRule;let o,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:$o(((r,s,i)=>{const[o]=i,{id:a,styleId:c}=qo(s,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:o}]}),r.apply(s,i)}))}),r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:$o(((r,s,i)=>{const[o]=i,{id:a,styleId:c}=qo(s,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replace:o}),r.apply(s,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:$o(((r,s,i)=>{const[o]=i,{id:a,styleId:c}=qo(s,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replaceSync:o}),r.apply(s,i)}))}));const c={};Xo("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Xo("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Xo("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Xo("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach((([r,s])=>{u[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(u[r].insertRule,{apply:$o(((r,s,i)=>{const[o,a]=i,{id:c,styleId:u}=qo(s.parentStyleSheet,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:o,index:[...Ho(s),a||0]}]}),r.apply(s,i)}))}),s.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:$o(((r,s,i)=>{const[o]=i,{id:a,styleId:c}=qo(s.parentStyleSheet,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:[...Ho(s),o]}]}),r.apply(s,i)}))})})),$o((()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach((([t,e])=>{e.prototype.insertRule=u[t].insertRule,e.prototype.deleteRule=u[t].deleteRule}))}))}(t,{win:n}),h=Wo(t,t.doc),f=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:$o(((s,o,a)=>{const[c,u,l]=a;if(n.has(c))return i.apply(o,[c,u,l]);const{id:h,styleId:f}=qo(Do([o,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);return(h&&-1!==h||f&&-1!==f)&&t({id:h,styleId:f,set:{property:c,value:u,priority:l},index:Ho(o.parentRule)}),s.apply(o,a)}))});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:$o(((s,i,a)=>{const[c]=a;if(n.has(c))return o.apply(i,[c]);const{id:u,styleId:l}=qo(Do([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:c},index:Ho(i.parentRule)}),s.apply(i,a)}))}),$o((()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o}))}(t,{win:n}),d=t.collectFonts?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=Gi(e.fonts,"add",(function(e){return function(n){return mo($o((()=>{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),$o((()=>{r.forEach((t=>t()))}))}(t):()=>{},p=function(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=t;let a=!0;const c=$o((()=>{const t=e.getSelection();if(!t||a&&Do([t,"optionalAccess",t=>t.isCollapsed]))return;a=t.isCollapsed||!1;const c=[],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 $o((()=>{Lo.forEach((t=>t.reset())),r.disconnect(),s(),i(),o(),a(),c(),u(),l(),h(),f(),d(),p(),m(),y.forEach((t=>t()))}))}function Jo(t){return void 0!==window[t]}function Xo(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Go{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 Yo(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class Vo{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Go(Si),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Go(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}),Yo([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 yo.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:yo.IncrementalSnapshot,data:{source:go.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case yo.Meta:case yo.Load:case yo.DomContentLoaded:return!1;case yo.Plugin:return e;case yo.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case yo.IncrementalSnapshot:switch(e.data.source){case go.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 go.Drag:case go.TouchMove:case go.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case go.ViewportResize:return!1;case go.MediaInteraction:case go.MouseInteraction:case go.Scroll:case go.CanvasMutation:case go.Input:return this.replaceIds(e.data,t,["id"]),e;case go.StyleSheetRule:case go.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case go.Font:return e;case go.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case go.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),Yo([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===ai.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}}class Qo{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(!ui(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=Fo({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Po({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),mo((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Wo({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(Gi(t.prototype,"attachShadow",(function(t){return function(r){const s=t.call(this,r);return this.shadowRoot&&ho(this)&&n.addShadowRoot(this.shadowRoot,e),s}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Zo{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class ta{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new co,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:hi(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 ea{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...t){po("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 na,ra;const sa=new fi;function ia(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:h=null,maskTextSelector:f=null,unmaskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:v,maskInputFn:b,maskTextFn:k,maxCanvasSize:w=null,packFn:S,sampling:T={},dataURLOptions:_={},mousemoveWait:x,recordCanvas:I=!1,recordCrossOriginIframes:C=!1,recordAfter:E=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:R=!1,inlineImages:A=!1,plugins:M,keepIframeSrcFn:$=(()=>!1),ignoreCSSAttributes:D=new Set([]),errorHandler:L,onMutation:j,getCanvasManager:F}=t;Ao(L);const N=!C||window.parent===window;let P=!1;if(!N)try{window.parent.document&&(P=!1)}catch(t){P=!0}if(N&&!e)throw new Error("emit function is required");void 0!==x&&void 0===T.mousemove&&(T.mousemove=x),sa.reset();const B=!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:{},U=!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 z;!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 q=t=>{for(const e of M||[])e.eventProcessor&&(t=e.eventProcessor(t));return S&&!P&&(t=S(t)),t};na=(t,s)=>{const i=t;if(i.timestamp=Yi(),!_e([Lo,"access",t=>t[0],"optionalAccess",t=>t.isFrozen,"call",t=>t()])||i.type===yo.FullSnapshot||i.type===yo.IncrementalSnapshot&&i.data.source===go.Mutation||Lo.forEach((t=>t.unfreeze())),N)_e([e,"optionalCall",t=>t(q(i),s)]);else if(P){const t={type:"rrweb",event:q(i),origin:window.location.origin,isCheckout:s};window.parent.postMessage(t,"*")}if(i.type===yo.FullSnapshot)z=i,H=0;else if(i.type===yo.IncrementalSnapshot){if(i.data.source===go.Mutation&&i.data.isAttachIframe)return;H++;const t=r&&H>=r,e=n&&z&&i.timestamp-z.timestamp>n;(t||e)&&Z(!0)}};const W=t=>{na({type:yo.IncrementalSnapshot,data:{source:go.Mutation,...t}})},K=t=>na({type:yo.IncrementalSnapshot,data:{source:go.Scroll,...t}}),J=t=>na({type:yo.IncrementalSnapshot,data:{source:go.CanvasMutation,...t}}),X=new ta({mutationCb:W,adoptedStyleSheetCb:t=>na({type:yo.IncrementalSnapshot,data:{source:go.AdoptedStyleSheet,...t}})}),G=new Vo({mirror:sa,mutationCb:W,stylesheetManager:X,recordCrossOriginIframes:C,wrappedEmit:na});for(const t of M||[])t.getMirror&&t.getMirror({nodeMirror:sa,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});const Y=new ea,V=function(t,e){try{return t?t(e):new Zo}catch(t){return console.warn("Unable to initialize CanvasManager"),new Zo}}(F,{mirror:sa,win:window,mutationCb:t=>na({type:yo.IncrementalSnapshot,data:{source:go.CanvasMutation,...t}}),recordCanvas:I,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:w,sampling:T.canvas,dataURLOptions:_,errorHandler:L}),Q=new Qo({mutationCb:W,scrollCb:K,bypassOptions:{onMutation:j,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:B,dataURLOptions:_,maskAttributeFn:v,maskTextFn:k,maskInputFn:b,recordCanvas:I,inlineImages:A,sampling:T,slimDOMOptions:U,iframeManager:G,stylesheetManager:X,canvasManager:V,keepIframeSrcFn:$,processedNodeManager:Y},mirror:sa}),Z=(t=!1)=>{na({type:yo.Meta,data:{href:window.location.href,width:Zi(),height:Qi()}},t),X.reset(),Q.init(),Lo.forEach((t=>t.lock()));const e=function(t,e){const{mirror:n=new fi,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:h=!0,inlineImages:f=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:k,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:T,onStylesheetLoad:_,stylesheetLoadTimeout:x,keepIframeSrcFn:I=(()=>!1)}=e||{};return zi(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:h,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:f,recordCanvas:d,preserveWhiteSpace:k,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:T,onStylesheetLoad:_,stylesheetLoadTimeout:x,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:sa,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:d,inlineStylesheet:p,maskAllInputs:B,maskAttributeFn:v,maskInputFn:b,maskTextFn:k,slimDOM:U,dataURLOptions:_,recordCanvas:I,inlineImages:A,onSerialize:t=>{io(t,sa)&&G.addIframe(t),oo(t,sa)&&X.trackLinkElement(t),ao(t)&&Q.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{G.attachIframe(t,e),Q.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{X.attachLinkElement(t,e)},keepIframeSrcFn:$});if(!e)return console.warn("Failed to snapshot the document");na({type:yo.FullSnapshot,data:{node:e,initialOffset:Vi(window)}}),Lo.forEach((t=>t.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,sa.getId(document))};ra=Z;try{const t=[],e=t=>$o(Ko)({onMutation:j,mutationCb:W,mousemoveCb:(t,e)=>na({type:yo.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>na({type:yo.IncrementalSnapshot,data:{source:go.MouseInteraction,...t}}),scrollCb:K,viewportResizeCb:t=>na({type:yo.IncrementalSnapshot,data:{source:go.ViewportResize,...t}}),inputCb:t=>na({type:yo.IncrementalSnapshot,data:{source:go.Input,...t}}),mediaInteractionCb:t=>na({type:yo.IncrementalSnapshot,data:{source:go.MediaInteraction,...t}}),styleSheetRuleCb:t=>na({type:yo.IncrementalSnapshot,data:{source:go.StyleSheetRule,...t}}),styleDeclarationCb:t=>na({type:yo.IncrementalSnapshot,data:{source:go.StyleDeclaration,...t}}),canvasMutationCb:J,fontCb:t=>na({type:yo.IncrementalSnapshot,data:{source:go.Font,...t}}),selectionCb:t=>{na({type:yo.IncrementalSnapshot,data:{source:go.Selection,...t}})},customElementCb:t=>{na({type:yo.IncrementalSnapshot,data:{source:go.CustomElement,...t}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:d,maskInputOptions:B,inlineStylesheet:p,sampling:T,recordCanvas:I,inlineImages:A,userTriggeredOnInput:O,collectFonts:R,doc:t,maskAttributeFn:v,maskInputFn:b,maskTextFn:k,keepIframeSrcFn:$,blockSelector:i,unblockSelector:o,slimDOMOptions:U,dataURLOptions:_,mirror:sa,iframeManager:G,stylesheetManager:X,shadowDomManager:Q,processedNodeManager:Y,canvasManager:V,ignoreCSSAttributes:D,plugins:_e([M,"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=>na({type:yo.Plugin,data:{plugin:t.name,payload:e}})})))])||[]},{});G.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}}));const n=()=>{Z(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(qi("DOMContentLoaded",(()=>{na({type:yo.DomContentLoaded,data:{}}),"DOMContentLoaded"===E&&n()}))),t.push(qi("load",(()=>{na({type:yo.Load,data:{}}),"load"===E&&n()}),window))),()=>{t.forEach((t=>t())),Y.destroy(),ra=void 0,Mo()}}catch(t){console.warn(t)}}ia.mirror=sa,ia.takeFullSnapshot=function(t){if(!ra)throw new Error("please take full snapshot after start recording");ra(t)};function oa(t){return t>9999999999?t:1e3*t}function aa(t){return t>9999999999?t/1e3:t}function ca(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate((()=>(t.throttledAddEvent({type:yo.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:zt(e,10,1e3)}}),"console"===e.category))))}function ua(t){return t.closest("button,a")||t}function la(t){const e=ha(t);return e&&e instanceof Element?ua(e):e}function ha(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let fa;function da(t){return fa||(fa=[],B(Zs,"open",(function(t){return function(...e){if(fa)try{fa.forEach((t=>t()))}catch(t){}return t.apply(Zs,e)}}))),fa.push(t),()=>{const e=fa?fa.indexOf(t):-1;e>-1&&fa.splice(e,1)}}class pa{constructor(t,e,n=ca){this.te=0,this.ee=0,this.ne=[],this.re=e.timeout/1e3,this.se=e.threshold/1e3,this.ie=e.scrollTimeout/1e3,this._replay=t,this.oe=e.ignoreSelector,this.ae=n}addListeners(){const t=da((()=>{this.te=ya()}));this.ce=()=>{t(),this.ne=[],this.te=0,this.ee=0}}removeListeners(){this.ce&&this.ce(),this.ue&&clearTimeout(this.ue)}handleClick(t,e){if(function(t,e){if(!ma.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.oe)||!function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t))return;const n={timestamp:aa(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};this.ne.some((t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1))||(this.ne.push(n),1===this.ne.length&&this.le())}registerMutation(t=Date.now()){this.te=aa(t)}registerScroll(t=Date.now()){this.ee=aa(t)}registerClick(t){const e=ua(t);this.he(e)}he(t){this.fe(t).forEach((t=>{t.clickCount++}))}fe(t){return this.ne.filter((e=>e.node===t))}de(){const t=[],e=ya();this.ne.forEach((n=>{!n.mutationAfter&&this.te&&(n.mutationAfter=n.timestamp<=this.te?this.te-n.timestamp:void 0),!n.scrollAfter&&this.ee&&(n.scrollAfter=n.timestamp<=this.ee?this.ee-n.timestamp:void 0),n.timestamp+this.re<=e&&t.push(n)}));for(const e of t){const t=this.ne.indexOf(e);t>-1&&(this.pe(e),this.ne.splice(t,1))}this.ne.length&&this.le()}pe(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this.ie,r=t.mutationAfter&&t.mutationAfter<=this.se,s=!n&&!r,{clickCount:i,clickBreadcrumb:o}=t;if(s){const n=1e3*Math.min(t.mutationAfter||this.re,this.re),r=n<1e3*this.re?"mutation":"timeout",s={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:Zs.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this.ae(e,s)}else if(i>1){const t={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:Zs.location.href,route:e.getCurrentRoute(),clickCount:i,metric:!0}};this.ae(e,t)}}le(){this.ue&&clearTimeout(this.ue),this.ue=setTimeout((()=>this.de()),1e3)}}const ma=["A","BUTTON","INPUT"];function ya(){return Date.now()/1e3}function ga(t,e){try{if(!function(t){return 3===t.type}(e))return;const{source:n}=e.data;if(n===go.Mutation&&t.registerMutation(e.timestamp),n===go.Scroll&&t.registerScroll(e.timestamp),function(t){return t.data.source===go.MouseInteraction}(e)){const{type:n,id:r}=e.data,s=ia.mirror.getNode(r);s instanceof HTMLElement&&n===vo.Click&&t.registerClick(s)}}catch(t){}}function va(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var ba;!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"}(ba||(ba={}));const ka=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function wa(t){const e={};for(const n in t)if(ka.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}const Sa=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?la(t.event):ha(t.event),n=E(r,{maxStringLength:200})||""}catch(t){n=""}return{target:r,message:n}}(t);return va({category:`ui.${t.name}`,...Ta(e,n)})}(e);if(!n)return;const r="click"===e.name,s=r?e.event:void 0;var i,o,a;!(r&&t.clickDetector&&s&&s.target)||s.altKey||s.metaKey||s.ctrlKey||s.shiftKey||(i=t.clickDetector,o=n,a=la(e.event),i.handleClick(o,a)),ca(t,n)};function Ta(t,e){const n=ia.mirror.getId(t),r=n&&ia.mirror.getNode(n),s=r&&ia.mirror.getMeta(r),i=s&&function(t){return t.type===ba.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===ba.Text&&t.textContent)).filter(Boolean).map((t=>t.trim())).join(""),attributes:wa(i.attributes)}}:{}}}function _a(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 a=e||r||s,c=1===i.length;if(!a&&c)return null;const u=E(o,{maxStringLength:200})||"",l=Ta(o,u);return va({category:"ui.keyDown",message:u,data:{...l.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}(e);n&&ca(t,n)}const xa={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=t;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${e}.${n}`,start:Ca(i),end:Ca(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:s}=t,i=Ca(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:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:h,redirectCount:f,startTime:d,transferSize:p,type:m}=t;if(0===s)return null;return{type:`${e}.${m}`,start:Ca(d),end:Ca(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:h,domComplete:i,redirectCount:f}}}};function Ia(t){return xa[t.entryType]?xa[t.entryType](t):null}function Ca(t){return((ee||Zs.performance.timeOrigin)+t)/1e3}function Ea(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(gs(t,n))})),r.push(ys((({metric:e})=>{t.replayPerformanceEntries.push(function(t){const e=t.entries,n=e[e.length-1],r=n?n.element:void 0,s=t.value,i=Ca(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:r?ia.mirror.getId(r):void 0}}}(e))}))),()=>{r.forEach((t=>t()))}}class Oa extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class Ra{constructor(){this.events=[],this.me=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.me+=e,this.me>si)throw new Oa;this.events.push(t)}finish(){return new Promise((t=>{const e=this.events;this.clear(),t(JSON.stringify(e))}))}clear(){this.events=[],this.me=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map((t=>t.timestamp)).sort()[0];return t?oa(t):null}}class Aa{constructor(t){this.ye=t,this.ge=0}ensureReady(){return this.ve||(this.ve=new Promise(((t,e)=>{this.ye.addEventListener("message",(({data:n})=>{n.success?t():e()}),{once:!0}),this.ye.addEventListener("error",(t=>{e(t)}),{once:!0})}))),this.ve}destroy(){this.ye.terminate()}postMessage(t,e){const n=this.be();return new Promise(((r,s)=>{const i=({data:e})=>{const o=e;o.method===t&&o.id===n&&(this.ye.removeEventListener("message",i),o.success?r(o.response):s(new Error("Error in compression worker")))};this.ye.addEventListener("message",i),this.ye.postMessage({id:n,method:t,arg:e})}))}be(){return this.ge++}}class Ma{constructor(t){this.ye=new Aa(t),this.ke=null,this.me=0,this.hasCheckout=!1}get hasEvents(){return!!this.ke}get type(){return"worker"}ensureReady(){return this.ye.ensureReady()}destroy(){this.ye.destroy()}addEvent(t){const e=oa(t.timestamp);(!this.ke||esi?Promise.reject(new Oa):this.we(n)}finish(){return this.Se()}clear(){this.ke=null,this.me=0,this.hasCheckout=!1,this.ye.postMessage("clear").then(null,(t=>{}))}getEarliestTimestamp(){return this.ke}we(t){return this.ye.postMessage("addEvent",t)}async Se(){const t=await this.ye.postMessage("finish");return this.ke=null,this.me=0,t}}class $a{constructor(t){this.Te=new Ra,this._e=new Ma(t),this.xe=this.Te,this.Ie=this.Ce()}get type(){return this.xe.type}get hasEvents(){return this.xe.hasEvents}get hasCheckout(){return this.xe.hasCheckout}set hasCheckout(t){this.xe.hasCheckout=t}destroy(){this.Te.destroy(),this._e.destroy()}clear(){return this.xe.clear()}getEarliestTimestamp(){return this.xe.getEarliestTimestamp()}addEvent(t){return this.xe.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this.xe.finish()}ensureWorkerIsLoaded(){return this.Ie}async Ce(){try{await this._e.ensureReady()}catch(t){return}await this.Ee()}async Ee(){const{events:t,hasCheckout:e}=this.Te,n=[];for(const e of t)n.push(this._e.addEvent(e));this._e.hasCheckout=e,this.xe=this._e;try{await Promise.all(n)}catch(t){}}}function Da({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(['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,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}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<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)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i>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)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(t)}();return""}();if(!e)return;const n=new Worker(e);return new $a(n)}catch(t){}}(e);if(t)return t}return new Ra}function La(){try{return"sessionStorage"in Zs&&!!Zs.sessionStorage}catch(t){return!1}}function ja(t){!function(){if(!La())return;try{Zs.sessionStorage.removeItem(ti)}catch(t){}}(),t.session=void 0}function Fa(t){return void 0!==t&&Math.random()t.getContext().initialTimestamp+t.getOptions().maxReplayDuration)||(t.getOptions()._experiments.traceInternals,!1))}function Xa(t){return!t.type}function Ga(t){return"transaction"===t.type}function Ya(t){return"feedback"===t.type}function Va(t){const e=function(){const t=Je();if(!t)return!1;const e=t.getTransport();if(!e)return!1;return e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!t.isEnabled()||!Xa(n)&&!Ga(n))return;const s=r&&r.statusCode;e&&(!s||s<200||s>=300)||(Ga(n)?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,n):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;setTimeout((()=>{t.sendBufferedReplayOrFlush()}))}(t,n))}}function Qa(t){return e=>{t.isEnabled()&&Xa(e)&&function(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0].value;if("string"!=typeof n)return;if(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){ca(t,va({category:"replay.hydrate-error"}))}}(t,e)}}function Za(t,e=!1){const n=e?Va(t):void 0;return Object.assign(((e,r)=>{if(!t.isEnabled())return e;if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!Xa(e)&&!Ga(e)&&!Ya(e))return e;if(!t.checkAndHandleExpiredSession())return e;if(Ya(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),function(t,e){t.triggerUserActivity(),t.addUpdate((()=>!e.timestamp||(t.throttledAddEvent({type:yo.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,r)&&!t.getOptions()._experiments.captureExceptions)return null;const s=function(t,e){return"buffer"===t.recordingMode&&e.message!==ei&&!(!e.exception||e.type)&&Fa(t.getOptions().errorSampleRate)}(t,e);return(s||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),n&&n(e,{statusCode:200}),e}),{id:"Replay"})}function tc(t,e){return e.map((({type:e,start:n,end:r,name:s,data:i})=>{const o=t.throttledAddEvent({type:yo.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 ec(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((()=>(tc(t,[n]),!1))))}}function nc(t,e){t.isEnabled()&&(null!==e&&(br(e.name,Je())||t.addUpdate((()=>(tc(t,[e]),!0)))))}function rc(t,e){if(t)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=hc(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(t){}}function sc(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function ic(t){try{if("string"==typeof t)return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[hc(t)];if(!t)return[void 0]}catch(t){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}function oc(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 ac(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:s,data:J({method:i,statusCode:o,request:a,response:c})}}function cc(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function uc(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>ni,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,ni);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 lc(t,e){return Object.keys(t).reduce(((n,r)=>{const s=r.toLowerCase();return e.includes(s)&&t[r]&&(n[s]=t[r]),n}),{})}function hc(t){return new URLSearchParams(t).toString()}function fc(t,e){const n=function(t,e=Zs.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(Zs.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 v(n,e)}async function dc(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:a,status_code:c=0,request_body_size:u,response_body_size:l}=t.data,h=fc(o,n.networkDetailAllowUrls)&&!fc(o,n.networkDetailDenyUrls),f=h?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const s=n?function(t,e){if(1===t.length&&"string"!=typeof t[0])return yc(t[0],e);if(2===t.length)return yc(t[1],e);return{}}(n,e):{};if(!t)return uc(s,r,void 0);const i=pc(n),[o,a]=ic(i),c=uc(s,r,o);if(a)return oc(c,a);return c}(n,e.input,u):cc(u),d=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},s,i){if(!t&&void 0!==i)return cc(i);const o=s?mc(s.headers,r):{};if(!s||!e&&void 0!==i)return uc(o,i,void 0);const[a,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=setTimeout((()=>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"]}}(s),u=function(t,{networkCaptureBodies:e,textEncoder:n,responseBodySize:r,captureDetails:s,headers:i}){try{const o=t&&t.length&&void 0===r?rc(t,n):r;return s?uc(i,o,e?t:void 0):cc(o)}catch(t){return uc(i,r,void 0)}}(a,{networkCaptureBodies:e,textEncoder:n,responseBodySize:i,captureDetails:t,headers:o});if(c)return oc(u,c);return u}(h,n,e.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:f,response:d}}(t,e,n),s=ac("resource.fetch",r);nc(n.replay,s)}catch(t){}}function pc(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function mc(t,e){const n={};return e.forEach((e=>{t.get(e)&&(n[e]=t.get(e))})),n}function yc(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?mc(n,e):Array.isArray(n)?{}:lc(n,e):{}}async function gc(t,e,n){try{const r=function(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=e,{url:c,method:u,status_code:l=0,request_body_size:h,response_body_size:f}=t.data;if(!c)return null;if(!a||!fc(c,n.networkDetailAllowUrls)||fc(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:cc(h),response:cc(f)}}const d=a.__sentry_xhr_v3__,p=d?lc(d.request_headers,n.networkRequestHeaders):{},m=lc(function(t){const e=t.getAllResponseHeaders();if(!e)return{};return e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");return t[n.toLowerCase()]=r,t}),{})}(a),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?ic(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]}(a):[void 0],k=uc(p,h,y),w=uc(m,f,v);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:g?oc(k,g):k,response:b?oc(w,b):w}}(t,e,n),s=ac("resource.xhr",r);nc(n.replay,s)}catch(t){}}function vc(t,e,n){const{xhr:r,input:s}=e;if(!r)return;const i=rc(s,n.textEncoder),o=r.getResponseHeader("content-length")?sc(r.getResponseHeader("content-length")):function(t,e,n){try{return rc("json"===e&&t&&"object"==typeof t?JSON.stringify(t):t,n)}catch(t){return}}(r.response,r.responseType,n.textEncoder);void 0!==i&&(t.data.request_body_size=i),void 0!==o&&(t.data.response_body_size=o)}function bc(t){const e=Je();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=t.getOptions(),c={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};e&&e.on?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)&&(vc(e,n,t),gc(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(!function(t,e,n){const{input:r,response:s}=e,i=rc(r?pc(r):void 0,n.textEncoder),o=s?sc(s.headers.get("content-length")):void 0;void 0!==i&&(t.data.request_body_size=i),void 0!==o&&(t.data.response_body_size=o)}(e,n,t),dc(e,n,t))}catch(t){}}(c,t,e))):(Tt(function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:s}=t;if(!n)return null;const{method:i,url:o}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s?s.status:void 0}}}(e);nc(t,n)}}(t)),Pt(function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,s=r.__sentry_xhr_v3__;if(!e||!n||!s)return null;const{method:i,url:o,status_code:a}=s;return void 0===o?null:{type:"resource.xhr",name:o,start:e/1e3,end:n/1e3,data:{method:i,statusCode:a}}}(e);nc(t,n)}}(t)))}catch(t){}}let kc=null;const wc=t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();if(kc===e||!e)return null;if(kc=e,!function(t){return!!t.category}(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return va(t);let n=!1;const r=e.map((t=>{if(!t)return t;if("string"==typeof t)return t.length>ri?(n=!0,`${t.slice(0,ri)}…`):t;if("object"==typeof t)try{const e=zt(t,7);return JSON.stringify(e).length>ri?(n=!0,`${JSON.stringify(e,null,2).slice(0,ri)}…`):e}catch(t){}return t}));return va({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return va(e)}(e);n&&ca(t,n)};function Sc(t){return!(!t||!t.on)}function Tc(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 _c(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return;const s=r||!e;e=!0,t.clickDetector&&ga(t.clickDetector,n),t.addUpdate((()=>{if("buffer"===t.recordingMode&&s&&t.setInitialState(),!Wa(t,n,s))return!0;if(!s)return!1;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return;Wa(t,function(t){const e=t.getOptions();return{type:yo.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),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(new Date(e),t.getOptions()._experiments.traceInternals,t.session.started=e,t.getOptions().stickySession&&Pa(t.session))}return"session"===t.recordingMode&&t.flush(),!0}))}}async function xc({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:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,h=Je(),f=Xe(),d=h&&h.getTransport(),p=h&&h.getDsn();if(!(h&&d&&p&&i.sampled))return;const m={type:"replay_event",replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,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&&t.emit("preprocessEvent",r,s);const i=await Pe(t.getOptions(),r,s,e,t,yn());if(!i)return null;i.platform=i.platform||"javascript";const o=t.getSdkMetadata&&t.getSdkMetadata(),{name:a,version:c}=o&&o.sdk||{};return i.sdk={...i.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},i}({scope:f,client:h,replayId:e,event:m});if(!y)return void h.recordDroppedEvent("event_processor","replay",m);delete y.sdkProcessingMetadata;const g=function(t,e,n,r){return he(ke(t,be(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,h.getOptions().tunnel);let v;try{v=await d.send(g)}catch(t){const e=new Error(ei);try{e.cause=t}catch(t){}throw e}if(!v)return v;if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new Ic(v.statusCode);const b=Se({},v);if(we(b,"replay"))throw new Cc(b);return v}class Ic extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Cc extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Ec(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;if(n.length)try{return await xc(t),!0}catch(n){if(n instanceof Ic||n instanceof Cc)throw n;if(We("Replays",{Oe:e.count}),e.count>=3){const t=new Error("Unable to send Replay - max retries exceeded");try{t.cause=n}catch(t){}throw t}return e.interval*=++e.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await Ec(t,e),n(!0)}catch(t){r(t)}}),e.interval)}))}}const Oc="__THROTTLED";function Rc(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":Oc}s=!1;const a=r.get(o)||0;return r.set(o,a+1),t(...i)}}class Ac{constructor({options:t,recordingOptions:e}){Ac.prototype.__init.call(this),Ac.prototype.__init2.call(this),Ac.prototype.__init3.call(this),Ac.prototype.__init4.call(this),Ac.prototype.__init5.call(this),Ac.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this.Re=Date.now(),this.Ae=!1,this.Me=!1,this.$e=!1,this.De={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this.Le=e,this.je=t,this.Fe=function(t,e,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,e):0;function a(){return c(),r=t(),r}function c(){void 0!==s&&clearTimeout(s),void 0!==i&&clearTimeout(i),s=i=void 0}function u(){return s&&clearTimeout(s),s=setTimeout(a,e),o&&void 0===i&&(i=setTimeout(a,o)),r}return u.cancel=c,u.flush=function(){return void 0!==s||void 0!==i?a():r},u}((()=>this.Ne()),this.je.flushMinDelay,{maxWait:this.je.flushMaxDelay}),this.Pe=Rc(((t,e)=>function(t,e,n){return Ja(t,e)?Ka(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 pa(this,s))}getContext(){return this.De}isEnabled(){return this.Ae}isPaused(){return this.Me}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this.je}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this.je;e<=0&&n<=0||(this.Be(t),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",this.Ue()):this.ze(new Error("Unable to initialize and create session")))}start(){if(this.Ae&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this.Ae&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");this.He();const t=qa({maxReplayDuration:this.je.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this.je._experiments.traceInternals},{stickySession:this.je.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.Ue()}startBuffering(){if(this.Ae)throw new Error("Replay recording is already in progress");const t=qa({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.je.maxReplayDuration,traceInternals:this.je._experiments.traceInternals},{stickySession:this.je.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this.Ue()}startRecording(){try{const t=this._canvas;this.qe=ia({...this.Le,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:_c(this),onMutation:this.We,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.ze(t)}}stopRecording(){try{return this.qe&&(this.qe(),this.qe=void 0),!0}catch(t){return this.ze(t),!1}}async stop({forceFlush:t=!1,reason:e}={}){if(this.Ae){this.Ae=!1;try{this.Ke(),this.stopRecording(),this.Fe.cancel(),t&&await this.Ne({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,ja(this)}catch(t){this.ze(t)}}}pause(){this.Me||(this.Me=!0,this.stopRecording())}resume(){this.Me&&this.Je()&&(this.Me=!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.He(e),this.Xe(e),this.Ge()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&this.Fe()}triggerUserActivity(){if(this.He(),this.qe)this.checkAndHandleExpiredSession(),this.Xe();else{if(!this.Je())return;this.resume()}}updateUserActivity(){this.He(),this.Xe()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this.Fe()}flushImmediate(){return this.Fe(),this.Fe.flush()}cancelFlush(){this.Fe.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this.Re&&Ua(this.Re,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this.Je();this.pause()}setInitialState(){const t=`${Zs.location.pathname}${Zs.location.hash}${Zs.location.search}`,e=`${Zs.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this.Ye(),this.De.initialUrl=e,this.De.initialTimestamp=Date.now(),this.De.urls.push(e)}throttledAddEvent(t,e){const n=this.Pe(t,e);if(n===Oc){const t=va({category:"replay.throttled"});this.addUpdate((()=>!Wa(this,{type:5,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})))}return n}getCurrentRoute(){const t=this.lastTransaction||Xe().getTransaction(),e=(t&&Fe(t).data||{})["sentry.source"];if(t&&e&&["route","custom"].includes(e))return Fe(t).description}Ue(){this.setInitialState(),this.Xe(),this.eventBuffer=Da({useCompression:this.je.useCompression,workerUrl:this.je.workerUrl}),this.Ke(),this.Ve(),this.Ae=!0,this.Me=!1,this.startRecording()}ze(t){}Be(t){const e=this.je.errorSampleRate>0,n=qa({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.je.maxReplayDuration,traceInternals:this.je._experiments.traceInternals,previousSessionId:t},{stickySession:this.je.stickySession,sessionSampleRate:this.je.sessionSampleRate,allowBuffering:e});this.session=n}Je(){if(!this.session)return!1;const t=this.session;return!Ha(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.je.maxReplayDuration})||(this.Qe(t),!1)}async Qe(t){this.Ae&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}Ve(){try{Zs.document.addEventListener("visibilitychange",this.Ze),Zs.addEventListener("blur",this.tn),Zs.addEventListener("focus",this.en),Zs.addEventListener("keydown",this.nn),this.clickDetector&&this.clickDetector.addListeners(),this.$e||(!function(t){const e=Xe(),n=Je();e.addScopeListener(wc(t)),gt(Sa(t)),jt(ec(t)),bc(t);const r=Za(t,!Sc(n));n&&n.addEventProcessor?n.addEventProcessor(r):dr(r),Sc(n)&&(n.on("beforeSendEvent",Qa(t)),n.on("afterSendEvent",Va(t)),n.on("createDsc",(e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&t.checkAndHandleExpiredSession()&&(e.replay_id=n)})),n.on("startTransaction",(e=>{t.lastTransaction=e})),n.on("finishTransaction",(e=>{t.lastTransaction=e})),n.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.$e=!0)}catch(t){this.ze(t)}this.rn=Ea(this)}Ke(){try{Zs.document.removeEventListener("visibilitychange",this.Ze),Zs.removeEventListener("blur",this.tn),Zs.removeEventListener("focus",this.en),Zs.removeEventListener("keydown",this.nn),this.clickDetector&&this.clickDetector.removeListeners(),this.rn&&this.rn()}catch(t){this.ze(t)}}__init(){this.Ze=()=>{"visible"===Zs.document.visibilityState?this.sn():this.an()}}__init2(){this.tn=()=>{const t=va({category:"ui.blur"});this.an(t)}}__init3(){this.en=()=>{const t=va({category:"ui.focus"});this.sn(t)}}__init4(){this.nn=t=>{_a(this,t)}}an(t){if(!this.session)return;za(this.session,{maxReplayDuration:this.je.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this.cn(t),this.conditionalFlush())}sn(t){if(!this.session)return;this.checkAndHandleExpiredSession()&&t&&this.cn(t)}He(t=Date.now()){this.Re=t}Xe(t=Date.now()){this.session&&(this.session.lastActivity=t,this.Ge())}cn(t){this.addUpdate((()=>{this.throttledAddEvent({type:yo.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})}))}un(){const t=(e=this.performanceEntries,e.map(Ia).filter(Boolean)).concat(this.replayPerformanceEntries);var e;return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(tc(this,t))}Ye(){this.De.errorIds.clear(),this.De.traceIds.clear(),this.De.urls=[]}ln(){const{session:t,eventBuffer:e}=this;if(!t||!e)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&nthis.je.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this.hn(),r=this.session.segmentId++;this.Ge();const s=await this.eventBuffer.finish();await Ec({replayId:t,recordingData:s,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:e})}catch(t){this.ze(t),this.stop({reason:"sendReplay"});const e=Je();e&&e.recordDroppedEvent("send_error","replay")}}__init5(){this.Ne=async({force:t=!1}={})=>{if(!this.Ae&&!t)return;if(!this.checkAndHandleExpiredSession())return;if(!this.session)return;const e=this.session.started,n=Date.now()-e;this.Fe.cancel();const r=nthis.je.maxReplayDuration+5e3;if(r||s)r&&this.Fe();else{if(!this.dn)return this.dn=this.fn(),await this.dn,void(this.dn=void 0);try{await this.dn}catch(t){}finally{this.Fe()}}}}Ge(){this.session&&this.je.stickySession&&Pa(this.session)}__init6(){this.We=t=>{const e=t.length,n=this.je.mutationLimit,r=n&&e>n;if(e>this.je.mutationBreadcrumbLimit||r){const t=va({category:"replay.mutations",data:{count:e,limit:r}});this.cn(t)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function Mc(t,e,n,r){const s=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&s.push(`.${n}`),$((()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")}))),s.join(",")}const $c='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Dc=["content-length","content-type","accept"];let Lc=!1;class jc{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:a={},sessionSampleRate:c,errorSampleRate:u,maskAllText:l=!0,maskAllInputs:h=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:y=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:v=[],networkCaptureBodies:b=!0,networkRequestHeaders:k=[],networkResponseHeaders:w=[],mask:S=[],maskAttributes:T=["title","placeholder"],unmask:_=[],block:x=[],unblock:I=[],ignore:C=[],maskFn:E,beforeAddRecordingEvent:O,beforeErrorSampling:R,blockClass:A,blockSelector:M,maskInputOptions:$,maskTextClass:D,maskTextSelector:L,ignoreClass:j}={}){this.name=jc.id;const F=function({mask:t,unmask:e,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){const l={maskTextSelector:Mc(t,[".sentry-mask","[data-sentry-mask]"],a,c),unmaskTextSelector:Mc(e,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:Mc(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],i,o),unblockSelector:Mc(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Mc(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(l.blockClass=i),a instanceof RegExp&&(l.maskTextClass=a),l}({mask:S,unmask:_,block:x,unblock:I,ignore:C,blockClass:A,blockSelector:M,maskTextClass:D,maskTextSelector:L,ignoreClass:j});if(this.Le={maskAllInputs:h,maskAllText:l,maskInputOptions:{...$||{},password:!0},maskTextFn:E,maskInputFn:E,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:T,maskAllText:l,privacyOptions:F,key:t,value:e,el:n}),...F,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:t=>{try{t.__rrweb__=!0}catch(t){}}},this.pn={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,ii),stickySession:s,sessionSampleRate:c,errorSampleRate:u,useCompression:i,workerUrl:o,blockAllMedia:f,maskAllInputs:h,maskAllText:l,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:m,slowClickIgnoreSelectors:y,networkDetailAllowUrls:g,networkDetailDenyUrls:v,networkCaptureBodies:b,networkRequestHeaders:Fc(k),networkResponseHeaders:Fc(w),beforeAddRecordingEvent:O,beforeErrorSampling:R,_experiments:a},"number"==typeof c&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${c} })`),this.pn.sessionSampleRate=c),"number"==typeof u&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${u} })`),this.pn.errorSampleRate=u),this.pn.blockAllMedia&&(this.Le.blockSelector=this.Le.blockSelector?`${this.Le.blockSelector},${$c}`:$c),this.mn&&Ut())throw new Error("Multiple Sentry Session Replay instances are not supported");this.mn=!0}get mn(){return Lc}set mn(t){Lc=t}setupOnce(){Ut()&&(this.yn(),setTimeout((()=>this.gn())))}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):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}gn(){this._replay&&(this.vn(),this._replay.initializeSampling())}yn(){const t=function(t){const e=Je(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...J(t)};if(!n)return $((()=>{console.warn("SDK client is not available.")})),r;null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&$((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}));"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate);return r}(this.pn);this._replay=new Ac({options:t,recordingOptions:this.Le})}vn(){try{const t=Je().getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(t){}}}function Fc(t){return[...Dc,...t.map((t=>t.toLowerCase()))]}jc.__initStatic();const Nc=_;let Pc=0;function Bc(){return Pc>0}function Uc(){Pc++,setTimeout((()=>{Pc--}))}function zc(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=>zc(t,e)));return t.apply(this,s)}catch(t){throw Uc(),Ke((n=>{n.addEventProcessor((t=>(e.mechanism&&(ut(t,void 0,void 0),lt(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){}z(sentryWrapped,t),U(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function Hc(t,e){const n=Wc(t,e),r={type:e&&e.name,value:Jc(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function qc(t,e){return{exception:{values:[Hc(t,e)]}}}function Wc(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(Kc.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(t){}return[]}const Kc=/Minified React error #\d+;/i;function Jc(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Xc(t,e,n,r){const s=Yc(t,e,n&&n.syntheticException||void 0,r);return lt(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Kt(s)}function Gc(t,e,n="info",r,s){const i=Vc(t,e,r&&r.syntheticException||void 0,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),Kt(i)}function Yc(t,e,o,a,c){let h;if(s(e)&&e.error){return qc(t,e.error)}if(i(e)||r(e,"DOMException")){const n=e;if("stack"in e)h=qc(t,e);else{const e=n.name||(i(n)?"DOMError":"DOMException"),r=n.message?`${e}: ${n.message}`:e;h=Vc(t,r,o,a),ut(h,r)}return"code"in n&&(h.tags={...h.tags,"DOMException.code":`${n.code}`}),h}if(n(e))return qc(t,e);if(u(e)||l(e)){return h=function(t,e,n,r){const s=Je(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:l(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Qc(e,{isUnhandledRejection:r})}]},extra:{__serialized__:Ht(e,i)}};if(n){const e=Wc(t,n);e.length&&(o.exception.values[0].stacktrace={frames:e})}return o}(t,e,o,c),lt(h,{synthetic:!0}),h}return h=Vc(t,e,o,a),ut(h,`${e}`,void 0),lt(h,{synthetic:!0}),h}function Vc(t,e,n,r){const s={};if(r&&n){const r=Wc(t,n);r.length&&(s.exception={values:[{value:e,stacktrace:{frames:r}}]})}if(a(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 Qc(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys(q(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return m(n[0],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:m(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 Zc(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 he(s,[i])}class tu extends class{constructor(t){if(this.je=t,this._integrations={},this.bn=!1,this.kn=0,this.wn={},this.Sn={},this.T=[],t.dsn&&(this.Tn=N(t.dsn)),this.Tn){const e=er(this.Tn,t);this._n=t.transport({tunnel:this.je.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){if(ht(t))return;let r=e&&e.event_id;return this.xn(this.eventFromException(t,e).then((t=>this.In(t,e,n))).then((t=>{r=t}))),r}captureMessage(t,e,n,r){let s=n&&n.event_id;const i=a(t)?t:String(t),o=c(t)?this.eventFromMessage(i,e,n):this.eventFromException(t,n);return this.xn(o.then((t=>this.In(t,n,r))).then((t=>{s=t}))),s}captureEvent(t,e,n){if(e&&e.originalException&&ht(e.originalException))return;let r=e&&e.event_id;const s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this.xn(this.In(t,e,s||n).then((t=>{r=t}))),r}captureSession(t){"string"!=typeof t.release||(this.sendSession(t),Ae(t,{init:!1}))}getDsn(){return this.Tn}getOptions(){return this.je}getSdkMetadata(){return this.je.dt}getTransport(){return this._n}flush(t){const e=this._n;return e?(this.metricsAggregator&&this.metricsAggregator.flush(),this.Cn(t).then((n=>e.flush(t).then((t=>n&&t))))):Kt(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),t)))}getEventProcessors(){return this.T}addEventProcessor(t){this.T.push(t)}setupIntegrations(t){(t&&!this.bn||this.Ae()&&!this.bn)&&this.En()}init(){this.Ae()&&this.En()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(t){return null}}addIntegration(t){const e=this._integrations[t.name];ir(this,t,this._integrations),e||sr(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=function(t,e,n,r){const s=be(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=ke(t,s,r,e);return delete t.sdkProcessingMetadata,he(o,[[{type:i},t]])}(t,this.Tn,this.je.dt,this.je.tunnel);for(const t of e.attachments||[])n=fe(n,ye(t,this.je.transportOptions&&this.je.transportOptions.textEncoder));const r=this.On(n);r&&r.then((e=>this.emit("afterSendEvent",t,e)),null)}sendSession(t){const e=function(t,e,n,r){const s=be(n);return he({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.Tn,this.je.dt,this.je.tunnel);this.On(e)}recordDroppedEvent(t,e,n){if(this.je.sendClientReports){const r="number"==typeof n?n:1,s=`${t}:${e}`;this.wn[s]=(this.wn[s]||0)+r}}captureAggregateMetrics(t){const e=lr(t,this.Tn,this.je.dt,this.je.tunnel);this.On(e)}on(t,e){this.Sn[t]||(this.Sn[t]=[]),this.Sn[t].push(e)}emit(t,...e){this.Sn[t]&&this.Sn[t].forEach((t=>t(...e)))}En(){const{integrations:t}=this.je;this._integrations=function(t,e){const n={};return e.forEach((e=>{e&&ir(t,e,n)})),n}(this,t),sr(this,t),this.bn=!0}Rn(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)&&(Ae(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}Cn(t){return new Xt((e=>{let n=0;const r=setInterval((()=>{0==this.kn?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}Ae(){return!1!==this.getOptions().enabled&&void 0!==this._n}An(t,e,n,r=yn()){const s=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),this.emit("preprocessEvent",t,e),Pe(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:r,spanId:s,parentSpanId:i,dsc:o}=e;t.contexts={trace:{trace_id:r,span_id:s,parent_span_id:i},...t.contexts};const a=o||tn(r,this,n);t.sdkProcessingMetadata={dynamicSamplingContext:a,...t.sdkProcessingMetadata}}return t}))}In(t,e={},n){return this.Mn(t,e,n).then((t=>t.event_id),(t=>{}))}Mn(t,e,n){const r=this.getOptions(),{sampleRate:s}=r,i=fr(t),o=hr(t),a=t.type||"error",c=`before send for type \`${a}\``;if(o&&"number"==typeof s&&Math.random()>s)return this.recordDroppedEvent("sample_rate","error",t),Jt(new P(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const l="replay_event"===a?"replay":a,f=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this.An(t,e,n,f).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,t),new P("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){const{beforeSend:r,beforeSendTransaction:s}=t;if(hr(e)&&r)return r(e,n);if(fr(e)&&s){if(e.spans){const t=e.spans.length;e.sdkProcessingMetadata={...e.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return s(e,n)}return e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(h(t))return t.then((t=>{if(!u(t)&&null!==t)throw new P(n);return t}),(t=>{throw new P(`${e} rejected with ${t}`)}));if(!u(t)&&null!==t)throw new P(n);return t}(s,c)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",l,t),i){const e=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",e)}throw new P(`${c} returned \`null\`, will not send event.`,"log")}const s=n&&n.getSession();if(!i&&s&&this.Rn(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 P)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new P(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}xn(t){this.kn++,t.then((t=>(this.kn--,t)),(t=>(this.kn--,t)))}On(t){if(this.emit("beforeEnvelope",t),this.Ae()&&this._n)return this._n.send(t).then(null,(t=>{}))}$n(){const t=this.wn;return this.wn={},Object.keys(t).map((e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}}))}}{constructor(t){!function(t,e,n=[e],r="npm"){const s=t.dt||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map((t=>({name:`${r}:@sentry/${t}`,version:un}))),version:un}),t.dt=s}(t,"browser",["browser"],Nc.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&Nc.document&&Nc.document.addEventListener("visibilitychange",(()=>{"hidden"===Nc.document.visibilityState&&this.Dn()}))}eventFromException(t,e){return Xc(this.je.stackParser,t,e,this.je.attachStacktrace)}eventFromMessage(t,e="info",n){return Gc(this.je.stackParser,t,e,n,this.je.attachStacktrace)}captureUserFeedback(t){if(!this.Ae())return;const e=Zc(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.On(e)}An(t,e,n){return t.platform=t.platform||"javascript",super.An(t,e,n)}Dn(){const t=this.$n();if(0===t.length)return;if(!this.Tn)return;const e=(n=t,he((r=this.je.tunnel&&j(this.Tn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:s||Zt(),discarded_events:n}]]));var n,r,s;this.On(e)}}let eu;function nu(t,e=function(){if(eu)return eu;if(St(Nc.fetch))return eu=Nc.fetch.bind(Nc);const t=Nc.document;let e=Nc.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){}return eu=e.bind(Nc)}()){let n=0,r=0;return yr(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};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 eu=void 0,n-=i,r--,Jt(t)}}))}function ru(t){return yr(t,(function(e){return new Xt(((n,r)=>{const s=new XMLHttpRequest;s.onerror=r,s.onreadystatechange=()=>{4===s.readyState&&n({statusCode:s.status,headers:{"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")}})},s.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&s.setRequestHeader(e,t.headers[e]);s.send(e.body)}))}))}const su="?";function iu(t,e,n,r){const s={filename:t,function:e,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const ou=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,au=/\((\S*)(?::(\d+))(?::(\d+))\)/,cu=[30,t=>{const e=ou.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=au.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=ku(e[1]||su,e[2]);return iu(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],uu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,lu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hu=[50,t=>{const e=uu.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=lu.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]||su;return[n,t]=ku(n,t),iu(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],fu=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,du=[40,t=>{const e=fu.exec(t);return e?iu(e[2],e[1]||su,+e[3],e[4]?+e[4]:void 0):void 0}],pu=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,mu=[10,t=>{const e=pu.exec(t);return e?iu(e[2],e[3]||su,+e[1]):void 0}],yu=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,gu=[20,t=>{const e=yu.exec(t);return e?iu(e[5],e[3]||e[4]||su,+e[1],+e[2]):void 0}],vu=[cu,hu,du],bu=V(...vu),ku=(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]:su,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},wu=1024,Su="Breadcrumbs",Tu=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:Su,setupOnce(){},setup(t){e.console&&function(t){const e="console";nt(e,t),rt(e,it)}(function(t){return function(e){if(Je()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:Qt(e.level),message:y(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${y(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}qe(n,{input:e.args,level:e.level})}}(t)),e.dom&>(function(t,e){return function(n){if(Je()!==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>wu&&(o=wu),"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=R(e)}catch(t){r=""}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),qe(a,{event:n.event,name:n.name,global:n.global})}}(t,e.dom)),e.xhr&&Pt(function(t){return function(e){if(Je()!==t)return;const{startTimestamp:n,endTimestamp:r}=e,s=e.xhr.__sentry_xhr_v3__;if(!n||!r||!s)return;const{method:i,url:o,status_code:a,body:c}=s;qe({category:"xhr",data:{method:i,url:o,status_code:a},type:"http"},{xhr:e.xhr,input:c,startTimestamp:n,endTimestamp:r})}}(t)),e.fetch&&Tt(function(t){return function(e){if(Je()!==t)return;const{startTimestamp:n,endTimestamp:r}=e;if(r&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){qe({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args,startTimestamp:n,endTimestamp:r})}else{const t=e.response;qe({category:"fetch",data:{...e.fetchData,status_code:t&&t.status},type:"http"},{input:e.args,response:t,startTimestamp:n,endTimestamp:r})}}}(t)),e.history&&jt(function(t){return function(e){if(Je()!==t)return;let n=e.from,r=e.to;const s=Yt(Nc.location.href);let i=n?Yt(n):void 0;const o=Yt(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),qe({category:"navigation",data:{from:n,to:r}})}}(t)),e.sentry&&t.on&&t.on("beforeSendEvent",function(t){return function(e){Je()===t&&qe({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:ct(e)},{event:e})}}(t))}}},_u=or(Su,Tu);const xu="Dedupe",Iu=()=>{let t;return{name:xu,setupOnce(){},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(!Ou(t,e))return!1;if(!Eu(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=Ru(e),r=Ru(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Ou(t,e))return!1;if(!Eu(t,e))return!1;return!0}(t,e))return!0;return!1}(e,t))return null}catch(t){}return t=e}}},Cu=or(xu,Iu);function Eu(t,e){let n=Au(t),r=Au(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,r=r,r.length!==n.length)return!1;for(let t=0;t{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:Mu,setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&function(t){Et((e=>{const{stackParser:n,attachStacktrace:r}=ju();if(Je()!==t||Bc())return;const{msg:i,url:a,line:c,column:u,error:l}=e,h=void 0===l&&o(i)?function(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=s(t)?t.message:t,a="Error";const c=o.match(i);c&&(a=c[1],o=c[2]);return Lu({exception:{values:[{type:a,value:o}]}},e,n,r)}(i,a,c,u):Lu(Yc(n,l||i,void 0,r,!1),a,c,u);h.level="error",He(h,{originalException:l,mechanism:{handled:!1,type:"onerror"}})}))}(t),e.onunhandledrejection&&function(t){At((e=>{const{stackParser:n,attachStacktrace:r}=ju();if(Je()!==t||Bc())return;const s=function(t){if(c(t))return t;const e=t;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(t){}return t}(e),i=c(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:Yc(n,s,void 0,r,!0);i.level="error",He(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t)}}},Du=or(Mu,$u);function Lu(t,e,n,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],a=i[0]=i[0]||{},c=a.stacktrace=a.stacktrace||{},u=c.frames=c.frames||[],l=isNaN(parseInt(r,10))?void 0:r,h=isNaN(parseInt(n,10))?void 0:n,f=o(e)&&e.length>0?e:function(){try{return C.document.location.href}catch(t){return""}}();return 0===u.length&&u.push({colno:l,filename:f,function:"?",in_app:!0,lineno:h}),t}function ju(){const t=Je();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Fu="HttpContext",Nu=()=>({name:Fu,setupOnce(){},preprocessEvent(t){if(!Nc.navigator&&!Nc.location&&!Nc.document)return;const e=t.request&&t.request.url||Nc.location&&Nc.location.href,{referrer:n}=Nc.document||{},{userAgent:r}=Nc.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}}),Pu=or(Fu,Nu),Bu="LinkedErrors",Uu=(t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:Bu,setupOnce(){},preprocessEvent(t,r,s){const i=s.getOptions();b(Hc,i.stackParser,i.maxValueLength,n,e,t,r)}}},zu=or(Bu,Uu),Hu=["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"],qu="TryCatch",Wu=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:qu,setupOnce(){e.setTimeout&&B(Nc,"setTimeout",Ju),e.setInterval&&B(Nc,"setInterval",Ju),e.requestAnimationFrame&&B(Nc,"requestAnimationFrame",Xu),e.XMLHttpRequest&&"XMLHttpRequest"in Nc&&B(XMLHttpRequest.prototype,"send",Gu);const t=e.eventTarget;if(t){(Array.isArray(t)?t:Hu).forEach(Yu)}}}},Ku=or(qu,Wu);function Ju(t){return function(...e){const n=e[0];return e[0]=zc(n,{mechanism:{data:{function:Z(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Xu(t){return function(e){return t.apply(this,[zc(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Z(t)},handled:!1,type:"instrument"}})])}}function Gu(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&B(n,t,(function(e){const n={mechanism:{data:{function:t,handler:Z(e)},handled:!1,type:"instrument"}},r=H(e);return r&&(n.mechanism.data.handler=Z(r)),zc(e,n)}))})),t.apply(this,e)}}function Yu(t){const e=Nc,n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(B(n,"addEventListener",(function(e){return function(n,r,s){try{"function"==typeof r.handleEvent&&(r.handleEvent=zc(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Z(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return e.apply(this,[n,zc(r,{mechanism:{data:{function:"addEventListener",handler:Z(r),target:t},handled:!1,type:"instrument"}}),s])}})),B(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 Vu=[_r(),Rr(),Wu(),Tu(),$u(),Uu(),Iu(),Nu()];function Qu(t){return[...Vu]}var Zu=Object.freeze({__proto__:null,GlobalHandlers:Du,TryCatch:Ku,Breadcrumbs:_u,LinkedErrors:zu,HttpContext:Pu,Dedupe:Cu});let tl={};Nc.Sentry&&Nc.Sentry.Integrations&&(tl=Nc.Sentry.Integrations);const el={...tl,...Br,...Zu};return el.Replay=jc,el.BrowserTracing=Gs,Qs(),t.Breadcrumbs=_u,t.BrowserClient=tu,t.BrowserTracing=Gs,t.Dedupe=Cu,t.Feedback=xe,t.FunctionToString=Ar,t.GlobalHandlers=Du,t.HttpContext=Pu,t.Hub=fn,t.InboundFilters=xr,t.Integrations=el,t.LinkedErrors=zu,t.Replay=jc,t.SDK_VERSION=un,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=Nn,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=Pn,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=Fn,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=jn,t.Scope=an,t.Span=Un,t.TryCatch=Ku,t.WINDOW=Nc,t.addBreadcrumb=qe,t.addEventProcessor=dr,t.addExtensionMethods=Qs,t.addGlobalEventProcessor=Ee,t.addIntegration=function(t){const e=Je();e&&e.addIntegration&&e.addIntegration(t)},t.breadcrumbsIntegration=Tu,t.browserApiErrorsIntegration=Wu,t.browserTracingIntegration=function(t={}){const e=t;return"boolean"==typeof t.markBackgroundSpan&&(e.markBackgroundTransactions=t.markBackgroundSpan),"boolean"==typeof t.instrumentPageLoad&&(e.startTransactionOnPageLoad=t.instrumentPageLoad),"boolean"==typeof t.instrumentNavigation&&(e.startTransactionOnLocationChange=t.instrumentNavigation),new Gs(e)},t.captureEvent=He,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 mn().captureMessage(t,n,r)},t.captureSession=Qe,t.captureUserFeedback=function(t){const e=Je();e&&e.captureUserFeedback(t)},t.chromeStackLineParser=cu,t.close=async function(t){const e=Je();return e?e.close(t):Promise.resolve(!1)},t.configureScope=function(t){mn().configureScope(t)},t.continueTrace=({sentryTrace:t,baggage:e},n)=>{const r=Xe(),{traceparentData:s,dynamicSamplingContext:i,propagationContext:o}=function(t,e){const n=ue(t),r=ie(e),{traceId:s,parentSpanId:i,parentSampled:o}=n||{};return n?{traceparentData:n,dynamicSamplingContext:r||{},propagationContext:{traceId:s||ot(),parentSpanId:i||ot().substring(16),spanId:ot().substring(16),sampled:o,dsc:r||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:s||ot(),spanId:ot().substring(16)}}}(t,e);r.setPropagationContext(o);const a={...s,metadata:J({dynamicSamplingContext:i})};return n?gn((()=>n(a))):a},t.createTransport=yr,t.createUserFeedbackEnvelope=Zc,t.dedupeIntegration=Iu,t.defaultIntegrations=Vu,t.defaultStackLineParsers=vu,t.defaultStackParser=bu,t.endSession=Ye,t.eventFromException=Xc,t.eventFromMessage=Gc,t.exceptionFromError=Hc,t.feedbackIntegration=function(t){return new xe({})},t.flush=async function(t){const e=Je();return e?e.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=Rr,t.geckoStackLineParser=hu,t.getActiveSpan=En,t.getClient=Je,t.getCurrentHub=mn,t.getCurrentScope=Xe,t.getDefaultIntegrations=Qu,t.getHubFromCarrier=vn,t.globalHandlersIntegration=$u,t.httpContextIntegration=Nu,t.inboundFiltersIntegration=_r,t.init=function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=Qu()),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),Nc.SENTRY_RELEASE&&Nc.SENTRY_RELEASE.id&&(t.release=Nc.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e={...t,stackParser:(n=t.stackParser||bu,Array.isArray(n)?V(...n):n),integrations:rr(t),transport:t.transport||(wt()?nu:ru)};var n;!function(t,e){!0===e.debug&&$((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Xe().update(e.initialScope);const n=new t(e);mr(n),function(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}(n)}(tu,e),t.autoSessionTracking&&function(){if(void 0===Nc.document)return;Ge({ignoreDuration:!0}),Qe(),jt((({from:t,to:e})=>{void 0!==t&&t!==e&&(Ge({ignoreDuration:!0}),Qe())}))}()},t.isInitialized=function(){return!!Je()},t.lastEventId=function(){return mn().lastEventId()},t.linkedErrorsIntegration=Uu,t.makeFetchTransport=nu,t.makeMain=pn,t.makeXHRTransport=ru,t.metrics=Pr,t.onLoad=function(t){t()},t.opera10StackLineParser=mu,t.opera11StackLineParser=gu,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 jc(t),t.setContext=We,t.setCurrentClient=mr,t.setExtra=function(t,e){mn().setExtra(t,e)},t.setExtras=function(t){mn().setExtras(t)},t.setTag=function(t,e){mn().setTag(t,e)},t.setTags=function(t){mn().setTags(t)},t.setUser=function(t){mn().setUser(t)},t.showReportDialog=(t={},e=mn())=>{if(!Nc.document)return;const{client:n,scope:r}=e.getStackTop(),s=t.dsn||n&&n.getDsn();if(!s)return;r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const i=Nc.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=function(t,e){const n=N(t);if(!n)return"";const r=`${Zn(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}`}(s,t),t.onLoad&&(i.onload=t.onLoad);const{onClose:o}=t;if(o){const t=e=>{if("__sentry_reportdialog_closed__"===e.data)try{o()}finally{Nc.removeEventListener("message",t)}};Nc.addEventListener("message",t)}const a=Nc.document.head||Nc.document.body;a&&a.appendChild(i)},t.startInactiveSpan=Cn,t.startSession=Ge,t.startSpan=function(t,e){const n=Rn(t);return gn((()=>Ke(t.scope,(r=>{const s=mn(),i=r.getSpan(),o=t.onlyIfParent&&!i?void 0:On(s,{parentSpan:i,spanContext:n,forceTransaction:t.forceTransaction,scope:r});return xn((()=>e(o)),(()=>{if(o){const{status:t}=Fe(o);t&&"ok"!==t||o.setStatus("internal_error")}}),(()=>o&&o.end()))}))))},t.startSpanManual=function(t,e){const n=Rn(t);return gn((()=>Ke(t.scope,(r=>{const s=mn(),i=r.getSpan(),o=t.onlyIfParent&&!i?void 0:On(s,{parentSpan:i,spanContext:n,forceTransaction:t.forceTransaction,scope:r});function a(){o&&o.end()}return xn((()=>e(o,a)),(()=>{if(o&&o.isRecording()){const{status:t}=Fe(o);t&&"ok"!==t||o.setStatus("internal_error")}}))}))))},t.startTransaction=function(t,e){return mn().startTransaction({...t},e)},t.winjsStackLineParser=du,t.withActiveSpan=function(t,e){return Ke((n=>(n.setSpan(t),e(n))))},t.withIsolationScope=function(t){return gn((()=>t(yn())))},t.withScope=Ke,t.wrap=function(t){return zc(t)()},t}({}); //# sourceMappingURL=bundle.tracing.replay.min.js.map