"use strict";(globalThis.webpackChunkweb_sdk=globalThis.webpackChunkweb_sdk||[]).push([[262],{2608:(e,t,n)=>{n.d(t,{X:()=>r});const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},84624:(e,t,n)=>{n.d(t,{L2:()=>c,_6:()=>l,iK:()=>u});var r=n(79917),o=n(47245),s=n(2608),i=n(87538);const a={};function c(e){const t=a[e];if(t)return t;let n=i.m[e];if((0,r.QC)(n))return a[e]=n.bind(i.m);const c=i.m.document;if(c&&"function"==typeof c.createElement)try{const t=c.createElement("iframe");t.hidden=!0,c.head.appendChild(t);const r=t.contentWindow;r?.[e]&&(n=r[e]),c.head.removeChild(t)}catch(t){s.X&&o.kg.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?a[e]=n.bind(i.m):n}function l(e){a[e]=void 0}function u(...e){return c("setTimeout")(...e)}},65532:(e,t,n)=>{n.d(t,{O:()=>u});var r=n(42518),o=n(21305),s=n(85249),i=n(87538);let a,c,l;function u(e){(0,r.Hj)("dom",e),(0,r.D2)("dom",d)}function d(){if(!i.m.document)return;const e=r.rK.bind(null,"dom"),t=h(e,!0);i.m.document.addEventListener("click",t,!1),i.m.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=i.m[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&((0,o.hl)(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=h(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch(e){}return t.call(this,n,r,o)}})),(0,o.hl)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}function h(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;(0,o.xp)(n,"_sentryCaptured",!0),r&&!r._sentryId&&(0,o.xp)(r,"_sentryId",(0,s.DM)());const u="keypress"===n.type?"input":n.type;(function(e){if(e.type!==c)return!1;try{if(!e.target||e.target._sentryId!==l)return!1}catch(e){}return!0})(n)||(e({event:n,name:u,global:t}),c=n.type,l=r?r._sentryId:void 0),clearTimeout(a),a=i.m.setTimeout((()=>{l=void 0,c=void 0}),1e3)}}},30370:(e,t,n)=>{n.d(t,{a:()=>c});var r=n(42518),o=n(79917),s=n(21305),i=n(87538);let a;function c(e){const t="history";(0,r.Hj)(t,e),(0,r.D2)(t,l)}function l(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const o=a,s=function(e){try{return new URL(e,i.m.location.origin).toString()}catch{return e}}(String(n));if(a=s,o===s)return e.apply(this,t);const c={from:o,to:s};(0,r.rK)("history",c)}return e.apply(this,t)}}i.m.addEventListener("popstate",(()=>{const e=i.m.location.href,t=a;if(a=e,t===e)return;const n={from:t,to:e};(0,r.rK)("history",n)})),(0,o.Bf)()&&((0,s.hl)(i.m.history,"pushState",e),(0,s.hl)(i.m.history,"replaceState",e))}},18063:(e,t,n)=>{n.d(t,{UK:()=>c,xU:()=>a});var r=n(42518),o=n(17435),s=n(93308),i=n(87538);const a="__sentry_xhr_v3__";function c(e){(0,r.Hj)("xhr",e),(0,r.D2)("xhr",l)}function l(){if(!i.m.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const i=new Error,c=1e3*(0,o.ph)(),l=(0,s.HD)(n[0])?n[0].toUpperCase():void 0,u=function(e){if((0,s.HD)(e))return e;try{return e.toString()}catch{}}(n[1]);if(!l||!u)return e.apply(t,n);t[a]={method:l,url:u,request_headers:{}},"POST"===l&&u.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const d=()=>{const e=t[a];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}const n={endTimestamp:1e3*(0,o.ph)(),startTimestamp:c,xhr:t,virtualError:i};(0,r.rK)("xhr",n)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(d(),e.apply(t,n))}):t.addEventListener("readystatechange",d),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,i=t[a];return i&&(0,s.HD)(r)&&(0,s.HD)(o)&&(i.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const s=t[a];if(!s)return e.apply(t,n);void 0!==n[0]&&(s.body=n[0]);const i={startTimestamp:1e3*(0,o.ph)(),xhr:t};return(0,r.rK)("xhr",i),e.apply(t,n)}})}},40781:(e,t,n)=>{n.d(t,{f7:()=>I,sn:()=>T,Jk:()=>E,Fv:()=>x,PR:()=>C});var r=n(17435),o=n(65405),s=n(91699),i=n(37949),a=n(20988),c=n(67918),l=n(93308),u=n(87512),d=n(87538),h=n(47245),p=n(4329),m=n(2608),f=n(88811),g=n(16949);var y=n(97394),_=n(53313),v=n(26677);let b,S,k=0,w={};function C({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const o=(0,g.QV)();if(o&&(0,r.Z1)()){o.mark&&d.m.performance.mark("sentry-tracing-init");const a=(0,f.to)((({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=(0,g.XL)((0,r.Z1)()),o=(0,g.XL)(t.startTime);w.fid={value:e.value,unit:"millisecond"},w["mark.fid"]={value:n+o,unit:"second"}})),c=t?function(e){let t,n=0;if(!(0,g.ZN)("largest-contentful-paint"))return;const o=(0,f.$A)((({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)}),!0);(0,g.gf)(e,((e,a)=>{!function(e,t,n,o){m.X&&h.kg.log(`Sending LCP span (${e})`);const a=(0,g.XL)(((0,r.Z1)()||0)+(t?.startTime||0)),c=(0,p.nZ)().getScopeData().transactionName,l=t?(0,i.Rt)(t.element):"Largest contentful paint",u={[s.S3]:"auto.http.browser.lcp",[s.$J]:"ui.webvital.lcp",[s.JQ]:0,"sentry.pageload.span_id":n,"sentry.report_event":o};t&&(t.element&&(u["lcp.element"]=(0,i.Rt)(t.element)),t.id&&(u["lcp.id"]=t.id),t.url&&(u["lcp.url"]=t.url.trim().slice(0,200)),null!=t.loadTime&&(u["lcp.loadTime"]=t.loadTime),null!=t.renderTime&&(u["lcp.renderTime"]=t.renderTime),null!=t.size&&(u["lcp.size"]=t.size));const d=(0,g.fi)({name:l,transaction:c,attributes:u,startTime:a});d&&(d.addEvent("lcp",{[s.E1]:"millisecond",[s.Wb]:e}),d.end(a))}(n,t,a,e),o()}))}(n):(0,f.$A)((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(w.lcp={value:e.value,unit:"millisecond"},b=t)}),!0),l=(0,f._4)((({metric:e})=>{e.entries[e.entries.length-1]&&(w.ttfb={value:e.value,unit:"millisecond"})})),u=e?function(e){let t,n=0;if(!(0,g.ZN)("layout-shift"))return;const o=(0,f.PR)((({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)}),!0);(0,g.gf)(e,((e,a)=>{!function(e,t,n,o){m.X&&h.kg.log(`Sending CLS span (${e})`);const a=(0,g.XL)(((0,r.Z1)()||0)+(t?.startTime||0)),c=(0,p.nZ)().getScopeData().transactionName,l=t?(0,i.Rt)(t.sources[0]?.node):"Layout shift",u={[s.S3]:"auto.http.browser.cls",[s.$J]:"ui.webvital.cls",[s.JQ]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":o};t?.sources&&t.sources.forEach(((e,t)=>{u[`cls.source.${t+1}`]=(0,i.Rt)(e.node)}));const d=(0,g.fi)({name:l,transaction:c,attributes:u,startTime:a});d&&(d.addEvent("cls",{[s.E1]:"",[s.Wb]:e}),d.end(a))}(n,t,a,e),o()}))}(n):(0,f.PR)((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(w.cls={value:e.value,unit:""},S=t)}),!0);return()=>{a(),c?.(),l(),u?.()}}return()=>{}}function x(){(0,f._j)("longtask",(({entries:e})=>{const t=(0,o.HN)();if(!t)return;const{op:n,start_timestamp:i}=(0,o.XU)(t);for(const o of e){const e=(0,g.XL)((0,r.Z1)()+o.startTime),a=(0,g.XL)(o.duration);"navigation"===n&&i&&e{const t=(0,o.HN)();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=(0,g.XL)((0,r.Z1)()+n.startTime),{start_timestamp:i,op:a}=(0,o.XU)(t);if("navigation"===a&&i&&e{const t=(0,o.HN)();if(t)for(const n of e)if("click"===n.name){const e=(0,g.XL)((0,r.Z1)()+n.startTime),o=(0,g.XL)(n.duration),a={name:(0,i.Rt)(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[s.S3]:"auto.ui.browser.metrics"}},c=(0,i.iY)(n.target);c&&(a.attributes["ui.component_name"]=c),(0,g.Y)(t,e,e+o,a)}}))}function I(e,t){const n=(0,g.QV)(),h=(0,r.Z1)();if(!n?.getEntries||!h)return;const p=(0,g.XL)(h),m=n.getEntries(),{op:f,start_timestamp:C}=(0,o.XU)(e);if(m.slice(k).forEach((n=>{const r=(0,g.XL)(n.startTime),o=(0,g.XL)(Math.max(0,n.duration));if(!("navigation"===f&&C&&p+r{M(e,t,r,n)})),M(e,t,"secureConnection",n,"TLS/SSL"),M(e,t,"fetch",n,"cache"),M(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+(0,g.XL)(t.requestStart),o=n+(0,g.XL)(t.responseEnd),i=n+(0,g.XL)(t.responseStart);t.responseEnd&&((0,g.Y)(e,r,o,{op:"browser.request",name:t.name,attributes:{[s.S3]:"auto.ui.browser.metrics"}}),(0,g.Y)(e,i,o,{op:"browser.response",name:t.name,attributes:{[s.S3]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,n,p);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o,i){if(["mark","measure"].includes(t.entryType)&&(0,c.U0)(t.name,i))return;const a=(0,_.W)(!1),u=(0,g.XL)(a?a.requestStart:0),d=o+Math.max(n,u),h=o+n,p=h+r,m={[s.S3]:"auto.resource.browser.metrics"};d!==h&&(m["sentry.browser.measure_happened_before_request"]=!0,m["sentry.browser.measure_start_time"]=d),function(e,t){try{const n=t.detail;if(!n)return;if("object"==typeof n){for(const[t,r]of Object.entries(n))if(r&&(0,l.pt)(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if((0,l.pt)(n))return void(e["sentry.browser.measure.detail"]=n);try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}(m,t),d<=p&&(0,g.Y)(e,d,p,{name:t.name,op:t.entryType,attributes:m})}(e,n,r,o,p,t.ignorePerformanceApiSpans);const i=(0,v.Y)(),a=n.startTime{(0,a.o)(e,t.value,t.unit)})),e.setAttribute("performance.timeOrigin",p),e.setAttribute("performance.activationStart",(0,y.A)()),function(e,t){b&&t.recordLcpOnPageloadSpan&&(b.element&&e.setAttribute("lcp.element",(0,i.Rt)(b.element)),b.id&&e.setAttribute("lcp.id",b.id),b.url&&e.setAttribute("lcp.url",b.url.trim().slice(0,200)),null!=b.loadTime&&e.setAttribute("lcp.loadTime",b.loadTime),null!=b.renderTime&&e.setAttribute("lcp.renderTime",b.renderTime),e.setAttribute("lcp.size",b.size)),S?.sources&&t.recordClsOnPageloadSpan&&S.sources.forEach(((t,n)=>e.setAttribute(`cls.source.${n+1}`,(0,i.Rt)(t.node))))}(e,t)}b=void 0,S=void 0,w={}}function M(e,t,n,r,o=n){const i=function(e){return"secureConnection"===e?"connectEnd":"fetch"===e?"domainLookupStart":`${e}End`}(n),a=t[i],c=t[`${n}Start`];c&&a&&(0,g.Y)(e,r+(0,g.XL)(c),r+(0,g.XL)(a),{op:`browser.${o}`,name:t.name,attributes:{[s.S3]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}function R(e,t,n,r){const o=t[n];null!=o&&o<2147483647&&(e[r]=o)}},35430:(e,t,n)=>{n.d(t,{c:()=>u});var r=n(17435),o=n(65405),s=n(4329),i=n(91699),a=n(29347),c=n(88811),l=n(16949);function u(){return(0,l.QV)()&&(0,r.Z1)()?(0,c._j)("element",d):()=>{}}const d=({entries:e})=>{const t=(0,o.HN)(),n=t?(0,o.Gx)(t):void 0,c=n?(0,o.XU)(n).description:(0,s.nZ)().getScopeData().transactionName;e.forEach((e=>{const t=e;if(!t.identifier)return;const n=t.name,o=t.renderTime,s=t.loadTime,[u,d]=s?[(0,l.XL)(s),"load-time"]:o?[(0,l.XL)(o),"render-time"]:[(0,r.ph)(),"entry-emission"],h="image-paint"===n?(0,l.XL)(Math.max(0,(o??0)-(s??0))):0,p={[i.S3]:"auto.ui.browser.elementtiming",[i.$J]:"ui.elementtiming",[i.Zj]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":c,"element.id":t.id,"element.type":t.element?.tagName?.toLowerCase()||"unknown","element.size":t.naturalWidth&&t.naturalHeight?`${t.naturalWidth}x${t.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":s,"element.url":t.url||void 0,"element.identifier":t.identifier,"element.paint_type":n};(0,a.GK)({name:`element[${t.identifier}]`,attributes:p,startTime:u,onlyIfParent:!0},(e=>{e.end(u+h)}))}))}},73869:(e,t,n)=>{n.d(t,{D1:()=>f,NR:()=>h});var r=n(17435),o=n(65405),s=n(4329),i=n(37949),a=n(91699),c=n(88811),l=n(16949);const u=[],d=new Map;function h(){if((0,l.QV)()&&(0,r.Z1)()){const e=(0,c.YF)(m);return()=>{e()}}return()=>{}}const p={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"},m=({metric:e})=>{if(null==e.value)return;const t=(0,l.XL)(e.value);if(t>60)return;const n=e.entries.find((t=>t.duration===e.value&&p[t.name]));if(!n)return;const{interactionId:c}=n,u=p[n.name],h=(0,l.XL)((0,r.Z1)()+n.startTime),m=(0,o.HN)(),f=m?(0,o.Gx)(m):void 0,g=(null!=c?d.get(c):void 0)||f,y=g?(0,o.XU)(g).description:(0,s.nZ)().getScopeData().transactionName,_=(0,i.Rt)(n.target),v={[a.S3]:"auto.http.browser.inp",[a.$J]:`ui.interaction.${u}`,[a.JQ]:n.duration},b=(0,l.fi)({name:_,transaction:y,attributes:v,startTime:h});b&&(b.addEvent("inp",{[a.E1]:"millisecond",[a.Wb]:e.value}),b.end(h+t))};function f(){const e=({entries:e})=>{const t=(0,o.HN)(),n=t&&(0,o.Gx)(t);e.forEach((e=>{if(!(0,c.cN)(e)||!n)return;const t=e.interactionId;if(null!=t&&!d.has(t)){if(u.length>10){const e=u.shift();d.delete(e)}u.push(t),d.set(t,n)}}))};(0,c._j)("event",e),(0,c._j)("first-input",e)}},88811:(e,t,n)=>{n.d(t,{PR:()=>$,to:()=>V,YF:()=>G,$A:()=>q,_j:()=>K,_4:()=>X,cN:()=>se});var r=n(47245),o=n(74237),s=n(2608),i=n(87538);const a=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}};var c=n(97394),l=n(53313);const u=(e,t=-1)=>{const n=(0,l.W)();let r="navigate";return n&&(i.m.document?.prerendering||(0,c.A)()>0?r="prerender":i.m.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},d=new WeakMap;function h(e,t){return d.get(e)||d.set(e,new t),d.get(e)}class p{constructor(){p.prototype.__init.call(this),p.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const m=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe({type:e,buffered:!0,...n}),r}}catch{}},f=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var g=n(26677);const y=e=>{i.m.document?.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},_=[1800,3e3],v=[.1,.25];var b=n(32914);const S=[100,300];let k=0,w=1/0,C=0;const x=e=>{e.forEach((e=>{e.interactionId&&(w=Math.min(w,e.interactionId),C=Math.max(C,e.interactionId),k=C?(C-w)/7+1:0)}))};let E;const T=()=>E?k:performance.interactionCount||0,I=()=>{"interactionCount"in performance||E||(E=m("event",x,{type:"event",buffered:!0,durationThreshold:0}))};let M=0;class R{constructor(){R.prototype.__init.call(this),R.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){M=T(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((T()-M)/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<10||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort(((e,t)=>t._latency-e._latency)),this._longestInteractionList.length>10){const e=this._longestInteractionList.splice(10);for(const t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}}const L=e=>{const t=i.m.requestIdleCallback||i.m.setTimeout;"hidden"===i.m.document?.visibilityState?e():(t(e=f(e)),(0,b.u)(e))},A=[200,500];class D{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const O=[2500,4e3],N=[800,1800],F=e=>{i.m.document?.prerendering?y((()=>F(e))):"complete"!==i.m.document?.readyState?addEventListener("load",(()=>F(e)),!0):setTimeout(e)},P={},B={};let U,H,z,W,j;function $(e,t=!1){return ne("cls",e,Z,U,t)}function q(e,t=!1){return ne("lcp",e,Q,z,t)}function V(e){return ne("fid",e,J,H)}function X(e){return ne("ttfb",e,ee,W)}function G(e){return ne("inp",e,te,j)}function K(e,t){return re(e,t),B[e]||(function(e){const t={};"event"===e&&(t.durationThreshold=0),m(e,(t=>{Y(e,{entries:t})}),t)}(e),B[e]=!0),oe(e,t)}function Y(e,t){const n=P[e];if(n?.length)for(const i of n)try{i(t)}catch(t){s.X&&r.kg.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${(0,o.$P)(i)}\nError:`,t)}}function Z(){return((e,t={})=>{((e,t={})=>{y((()=>{const n=(0,g.Y)(),r=u("FCP");let o;const s=m("paint",(e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime{const n=u("CLS",0);let r;const o=h(t,p),s=e=>{for(const t of e)o._processEntry(t);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},c=m("layout-shift",s);c&&(r=a(e,n,v,t.reportAllChanges),i.m.document?.addEventListener("visibilitychange",(()=>{"hidden"===i.m.document?.visibilityState&&(s(c.takeRecords()),r(!0))})),i.m?.setTimeout?.(r))})))})((e=>{Y("cls",{metric:e}),U=e}),{reportAllChanges:!0})}function J(){return((e,t={})=>{y((()=>{const n=(0,g.Y)(),r=u("FID");let o;const s=e=>{e.startTime{e.forEach(s)},c=m("first-input",i);o=a(e,r,S,t.reportAllChanges),c&&(0,b.u)(f((()=>{i(c.takeRecords()),c.disconnect()})))}))})((e=>{Y("fid",{metric:e}),H=e}))}function Q(){return((e,t={})=>{y((()=>{const n=(0,g.Y)(),r=u("LCP");let o;const s=h(t,D),l=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)s._processEntry(t),t.startTime{l(d.takeRecords()),d.disconnect(),o(!0)}));for(const e of["keydown","click","visibilitychange"])i.m.document&&addEventListener(e,(()=>L(n)),{capture:!0,once:!0})}}))})((e=>{Y("lcp",{metric:e}),z=e}),{reportAllChanges:!0})}function ee(){return((e,t={})=>{const n=u("TTFB"),r=a(e,n,N,t.reportAllChanges);F((()=>{const e=(0,l.W)();e&&(n.value=Math.max(e.responseStart-(0,c.A)(),0),n.entries=[e],r(!0))}))})((e=>{Y("ttfb",{metric:e}),W=e}))}function te(){return((e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&y((()=>{I();const n=u("INP");let r;const o=h(t,R),s=e=>{L((()=>{for(const t of e)o._processEntry(t);const t=o._estimateP98LongestInteraction();t&&t._latency!==n.value&&(n.value=t._latency,n.entries=t.entries,r())}))},i=m("event",s,{durationThreshold:t.durationThreshold??40});r=a(e,n,A,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),(0,b.u)((()=>{s(i.takeRecords()),r(!0)})))}))})((e=>{Y("inp",{metric:e}),j=e}))}function ne(e,t,n,r,o=!1){let s;return re(e,t),B[e]||(s=n(),B[e]=!0),r&&t({metric:r}),oe(e,t,o?s:void 0)}function re(e,t){P[e]=P[e]||[],P[e].push(t)}function oe(e,t,n){return()=>{n&&n();const r=P[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}function se(e){return"duration"in e}},16949:(e,t,n)=>{n.d(t,{QV:()=>d,XL:()=>h,Y:()=>l,ZN:()=>m,b7:()=>p,fi:()=>u,gf:()=>f,nl:()=>c});var r=n(65405),o=n(29347),s=n(4329),i=n(87538),a=n(32914);function c(e){return"number"==typeof e&&isFinite(e)}function l(e,t,n,{...s}){const i=(0,r.XU)(e).start_timestamp;return i&&i>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),(0,o._d)(e,(()=>{const e=(0,o.qp)({startTime:t,...s});return e&&e.end(n),e}))}function u(e){const t=(0,s.s3)();if(!t)return;const{name:n,transaction:r,attributes:a,startTime:c}=e,{release:l,environment:u,sendDefaultPii:d}=t.getOptions(),h=t.getIntegrationByName("Replay")?.getReplayId(),p=(0,s.nZ)(),m=p.getUser(),f=void 0!==m?m.email||m.id||m.ip_address:void 0;let g;try{g=p.getScopeData().contexts.profile.profile_id}catch{}const y={release:l,environment:u,user:f||void 0,profile_id:g||void 0,replay_id:h||void 0,transaction:r,"user_agent.original":i.m.navigator?.userAgent,"client.address":d?"{{auto}}":void 0,...a};return(0,o.qp)({name:n,attributes:y,startTime:c,experimental:{standalone:!0}})}function d(){return i.m.addEventListener&&i.m.performance}function h(e){return e/1e3}function p(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function m(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function f(e,t){let n,r=!1;function o(e){!r&&n&&t(e,n),r=!0}(0,a.u)((()=>{o("pagehide")}));const s=e.on("beforeStartNavigationSpan",((e,t)=>{t?.isRedirect||(o("navigation"),s?.(),i?.())})),i=e.on("afterStartPageLoadSpan",(e=>{n=e.spanContext().spanId,i?.()}))}},97394:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(53313);const o=()=>(0,r.W)()?.activationStart??0},53313:(e,t,n)=>{n.d(t,{W:()=>o});var r=n(87538);const o=(e=!0)=>{const t=r.m.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart{n.d(t,{Y:()=>c});var r=n(87538),o=n(97394);let s=-1;const i=e=>{"hidden"===r.m.document.visibilityState&&s>-1&&(s="visibilitychange"===e.type?e.timeStamp:0,a())},a=()=>{removeEventListener("visibilitychange",i,!0),removeEventListener("prerenderingchange",i,!0)},c=()=>{if(r.m.document&&s<0){const e=(0,o.A)(),t=r.m.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter((t=>"hidden"===t.name&&t.startTime>e))[0]?.startTime;s=t??("hidden"!==r.m.document?.visibilityState||r.m.document?.prerendering?1/0:0),addEventListener("visibilitychange",i,!0),addEventListener("prerenderingchange",i,!0)}return{get firstHiddenTime(){return s}}}},32914:(e,t,n)=>{n.d(t,{u:()=>o});var r=n(87538);const o=e=>{const t=t=>{"pagehide"!==t.type&&"hidden"!==r.m.document?.visibilityState||e(t)};r.m.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))}},13845:(e,t,n)=>{n.d(t,{SI:()=>i,UL:()=>s,dn:()=>a});var r=n(47245),o=n(2608);function s(e){return new URLSearchParams(e).toString()}function i(e,t=r.fF){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[s(e)];if(!e)return[void 0]}catch(n){return o.X&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return o.X&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function a(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}},87538:(e,t,n)=>{n.d(t,{m:()=>r});const r=n(39311).n},13849:(e,t,n)=>{n.d(t,{U0:()=>Ve,fA:()=>m,gS:()=>He,qm:()=>w,rp:()=>k});var r=n(39311),o=n(4329),s=n(90211),i=n(37949),a=n(66893),c=n(47245),l=n(33338);const u=r.n,d=u.document,h=u.navigator,p="Report a Bug",m=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=(0,o.s3)();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&(0,o.nZ)().setTags(e.tags);const r=(0,s.N)({source:"api",url:(0,i.l4)(),...e},t);return new Promise(((e,t)=>{const o=setTimeout((()=>t("Unable to determine if Feedback was correctly sent.")),3e4),s=n.on("afterSendEvent",((n,i)=>{if(n.event_id===r)return clearTimeout(o),s(),i&&"number"==typeof i.statusCode&&i.statusCode>=200&&i.statusCode<300?e(r):i&&"number"==typeof i.statusCode&&0===i.statusCode?t("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):i&&"number"==typeof i.statusCode&&403===i.statusCode?t("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):t("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")}))}))},f="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function g(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function y(e,t){return Object.entries(t).forEach((([t,n])=>{e.setAttributeNS(null,t,n)})),e}const _="rgba(88, 74, 192, 1)",v={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:_,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},b={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:_,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function S(e){return`\n --foreground: ${e.foreground};\n --background: ${e.background};\n --accent-foreground: ${e.accentForeground};\n --accent-background: ${e.accentBackground};\n --success-color: ${e.successColor};\n --error-color: ${e.errorColor};\n --border: ${e.border};\n --box-shadow: ${e.boxShadow};\n --outline: ${e.outline};\n --interactive-filter: ${e.interactiveFilter};\n `}const k=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:r="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:i=!1,isNameRequired:_=!1,showEmail:k=!0,showName:w=!0,enableScreenshot:C=!0,useSentryUser:x={email:"email",name:"username"},tags:E,styleNonce:T,scriptNonce:I,colorScheme:M="system",themeLight:R={},themeDark:L={},addScreenshotButtonLabel:A="Add a screenshot",cancelButtonLabel:D="Cancel",confirmButtonLabel:O="Confirm",emailLabel:N="Email",emailPlaceholder:F="your.email@example.org",formTitle:P="Report a Bug",isRequiredLabel:B="(required)",messageLabel:U="Description",messagePlaceholder:H="What's the bug? What did you expect?",nameLabel:z="Name",namePlaceholder:W="Your Name",removeScreenshotButtonLabel:j="Remove screenshot",submitButtonLabel:$="Send Bug Report",successMessageText:q="Thank you for your report!",triggerLabel:V=p,triggerAriaLabel:X="",onFormOpen:G,onFormClose:K,onSubmitSuccess:Y,onSubmitError:Z,onFormSubmitted:J}={})=>{const Q={id:r,autoInject:o,showBranding:s,isEmailRequired:i,isNameRequired:_,showEmail:k,showName:w,enableScreenshot:C,useSentryUser:x,tags:E,styleNonce:T,scriptNonce:I,colorScheme:M,themeDark:L,themeLight:R,triggerLabel:V,triggerAriaLabel:X,cancelButtonLabel:D,submitButtonLabel:$,confirmButtonLabel:O,formTitle:P,emailLabel:N,emailPlaceholder:F,messageLabel:U,messagePlaceholder:H,nameLabel:z,namePlaceholder:W,successMessageText:q,isRequiredLabel:B,addScreenshotButtonLabel:A,removeScreenshotButtonLabel:j,onFormClose:K,onFormOpen:G,onSubmitError:Z,onSubmitSuccess:Y,onFormSubmitted:J};let ee=null,te=[];const ne=e=>{if(!ee){const t=d.createElement("div");t.id=String(e.id),d.body.appendChild(t),ee=t.attachShadow({mode:"open"}),ee.appendChild(function({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=d.createElement("style");return o.textContent=`\n:host {\n --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n --font-size: 14px;\n --z-index: 100000;\n\n --page-margin: 16px;\n --inset: auto 0 0 auto;\n --actor-inset: var(--inset);\n\n font-family: var(--font-family);\n font-size: var(--font-size);\n\n ${"system"!==e?"color-scheme: only light;":""}\n\n ${S("dark"===e?{...b,...t}:{...v,...n})}\n}\n\n${"system"===e?`\n@media (prefers-color-scheme: dark) {\n :host {\n ${S({...b,...t})}\n }\n}`:""}\n}\n`,r&&o.setAttribute("nonce",r),o}(e))}return ee},re=async r=>{const o=r.enableScreenshot&&!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(h.userAgent)||/Macintosh/i.test(h.userAgent)&&h.maxTouchPoints&&h.maxTouchPoints>1||!isSecureContext);let s,i;try{s=(t?t():await e("feedbackModalIntegration",I))(),(0,a.M5)(s)}catch{throw f&&c.kg.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const t=o?n?n():await e("feedbackScreenshotIntegration",I):void 0;t&&(i=t(),(0,a.M5)(i))}catch{f&&c.kg.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const l=s.createDialog({options:{...r,onFormClose:()=>{l?.close(),r.onFormClose?.()},onFormSubmitted:()=>{l?.close(),r.onFormSubmitted?.()}},screenshotIntegration:i,sendFeedback:m,shadow:ne(r)});return l},oe=(e,t={})=>{const n=g(Q,t),r="string"==typeof e?d.querySelector(e):"function"==typeof e.addEventListener?e:null;if(!r)throw f&&c.kg.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let o=null;const s=async()=>{o||(o=await re({...n,onFormSubmitted:()=>{o?.removeFromDom(),n.onFormSubmitted?.()}})),o.appendToDom(),o.open()};r.addEventListener("click",s);const i=()=>{te=te.filter((e=>e!==i)),o?.removeFromDom(),o=null,r.removeEventListener("click",s)};return te.push(i),i},se=(e={})=>{const t=g(Q,e),n=ne(t),r=function({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=d.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||p,o.appendChild(function(){const e=e=>u.document.createElementNS("http://www.w3.org/2000/svg",e),t=y(e("svg"),{width:"20",height:"20",viewBox:"0 0 20 20",fill:"var(--actor-color, var(--foreground))"}),n=y(e("g"),{clipPath:"url(#clip0_57_80)"}),r=y(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),s=y(e("clipPath"),{id:"clip0_57_80"}),i=y(e("rect"),{width:"20",height:"20",fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}()),e){const t=d.createElement("span");t.appendChild(d.createTextNode(e)),o.appendChild(t)}const s=function(e){const t=d.createElement("style");return t.textContent='\n.widget__actor {\n position: fixed;\n z-index: var(--z-index);\n margin: var(--page-margin);\n inset: var(--actor-inset);\n\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 16px;\n\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n line-height: 1.14em;\n text-decoration: none;\n\n background: var(--actor-background, var(--background));\n border-radius: var(--actor-border-radius, 1.7em/50%);\n border: var(--actor-border, var(--border));\n box-shadow: var(--actor-box-shadow, var(--box-shadow));\n color: var(--actor-color, var(--foreground));\n fill: var(--actor-color, var(--foreground));\n cursor: pointer;\n opacity: 1;\n transition: transform 0.2s ease-in-out;\n transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden="true"] {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n background: var(--actor-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n width: 1.14em;\n height: 1.14em;\n}\n\n@media (max-width: 600px) {\n .widget__actor span {\n display: none;\n }\n}\n',e&&t.setAttribute("nonce",e),t}(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:T});return oe(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:"Feedback",setupOnce(){(0,l.j)()&&Q.autoInject&&("loading"===d.readyState?d.addEventListener("DOMContentLoaded",(()=>se().appendToDom())):se().appendToDom())},attachTo:oe,createWidget(e={}){const t=se(g(Q,e));return t.appendToDom(),t},createForm:async(e={})=>re(g(Q,e)),remove(){ee&&(ee.parentElement?.remove(),ee=null),te.forEach((e=>e())),te=[]}}};function w(){return(0,o.s3)()?.getIntegrationByName("Feedback")}var C,x,E,T,I,M,R,L={},A=[],D=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,O=Array.isArray;function N(e,t){for(var n in t)e[n]=t[n];return e}function F(e){var t=e.parentNode;t&&t.removeChild(e)}function P(e,t,n){var r,o,s,i={};for(s in t)"key"==s?r=t[s]:"ref"==s?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?C.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===i[s]&&(i[s]=e.defaultProps[s]);return B(e,i,r,o,null)}function B(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++E:o,__i:-1,__u:0};return null==o&&null!=x.vnode&&x.vnode(s),s}function U(e){return e.children}function H(e,t){this.props=e,this.context=t}function z(e,t){if(null==t)return e.__?z(e.__,e.__i+1):null;for(var n;tn?(ee(r,t,o),o.length=r.length=0,t=void 0,T.sort(R)):t&&x.__c&&x.__c(t,A));t&&ee(r,t,o),q.__r=0}function V(e,t,n,r,o,s,i,a,c,l,u){var d,h,p,m,f,g=r&&r.__k||A,y=t.length;for(n.__d=c,function(e,t,n){var r,o,s,i,a,c=t.length,l=n.length,u=l,d=0;for(e.__k=[],r=0;r0?B(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,a=G(o,n,i=r+d,u),o.__i=a,s=null,-1!==a&&(u--,(s=n[a])&&(s.__u|=131072)),null==s||null===s.__v?(-1==a&&d--,"function"!=typeof o.type&&(o.__u|=65536)):a!==i&&(a===i+1?d++:a>i?u>c-i?d+=a-i:d--:d=a(null!=c&&0==(131072&c.__u)?1:0))for(;i>=0||a=0){if((c=t[i])&&0==(131072&c.__u)&&o==c.key&&s===c.type)return i;i--}if(a=n.__.length&&n.__.push({__V:de}),n.__[e]}function be(e){return le=1,Se(Le,e)}function Se(e,t,n){var r=ve(se++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Le(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=ie,!ie.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!s||s.call(this,e,t,n);var i=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&r.__c.props===e)&&(!s||s.call(this,e,t,n))};ie.u=!0;var s=ie.shouldComponentUpdate,i=ie.componentWillUpdate;ie.componentWillUpdate=function(e,t,n){if(this.__e){var r=s;s=void 0,o(e,t,n),s=r}i&&i.call(this,e,t,n)},ie.shouldComponentUpdate=o}return r.__N||r.__}function ke(e,t){var n=ve(se++,4);!he.__s&&Re(n.__H,t)&&(n.__=e,n.i=t,ie.__h.push(n))}function we(e,t){var n=ve(se++,7);return Re(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ce(e,t){return le=8,we((function(){return e}),t)}function xe(){for(var e;e=ue.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ie),e.__H.__h.forEach(Me),e.__H.__h=[]}catch(t){e.__H.__h=[],he.__e(t,e.__v)}}he.__b=function(e){ie=null,pe&&pe(e)},he.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_e&&_e(e,t)},he.__r=function(e){me&&me(e),se=0;var t=(ie=e.__c).__H;t&&(ae===ie?(t.__h=[],ie.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=de,e.__N=e.i=void 0}))):(t.__h.forEach(Ie),t.__h.forEach(Me),t.__h=[],se=0)),ae=ie},he.diffed=function(e){fe&&fe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ue.push(t)&&ce===he.requestAnimationFrame||((ce=he.requestAnimationFrame)||Te)(xe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==de&&(e.__=e.__V),e.i=void 0,e.__V=de}))),ae=ie=null},he.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ie),e.__h=e.__h.filter((function(e){return!e.__||Me(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],he.__e(n,e.__v)}})),ge&&ge(e,t)},he.unmount=function(e){ye&&ye(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Ie(e)}catch(e){t=e}})),n.__H=void 0,t&&he.__e(t,n.__v))};var Ee="function"==typeof requestAnimationFrame;function Te(e){var t,n=function(){clearTimeout(r),Ee&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Ee&&(t=requestAnimationFrame(n))}function Ie(e){var t=ie,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ie=t}function Me(e){var t=ie;e.__c=e.__(),ie=t}function Re(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Le(e,t){return"function"==typeof t?t(e):t}const Ae=Object.defineProperty({__proto__:null,useCallback:Ce,useContext:function(e){var t=ie.context[e.__c],n=ve(se++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(ie)),t.props.value):e.__},useDebugValue:function(e,t){he.useDebugValue&&he.useDebugValue(t?t(e):e)},useEffect:function(e,t){var n=ve(se++,3);!he.__s&&Re(n.__H,t)&&(n.__=e,n.i=t,ie.__H.__h.push(n))},useErrorBoundary:function(e){var t=ve(se++,10),n=be();return t.__=e,ie.componentDidCatch||(ie.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:function(){var e=ve(se++,11);if(!e.__){for(var t=ie.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__},useImperativeHandle:function(e,t,n){le=6,ke((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))},useLayoutEffect:ke,useMemo:we,useReducer:Se,useRef:function(e){return le=5,we((function(){return{current:e}}),[])},useState:be},Symbol.toStringTag,{value:"Module"});function De(){const e=e=>d.createElementNS("http://www.w3.org/2000/svg",e),t=y(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=y(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function Oe({options:e}){const t=we((()=>({__html:De().outerHTML})),[]);return P("h2",{class:"dialog__header"},P("span",{class:"dialog__title"},e.formTitle),e.showBranding?P("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function Ne(e,t){const n=e.get(t);return"string"==typeof n?n.trim():""}function Fe({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:a,showName:l,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:h,removeScreenshotButtonLabel:p,cancelButtonLabel:m,emailLabel:g,emailPlaceholder:y,isEmailRequired:_,isNameRequired:v,messageLabel:b,messagePlaceholder:S,nameLabel:k,namePlaceholder:w,submitButtonLabel:C,isRequiredLabel:x}=e,[E,T]=be(!1),[I,M]=be(null),[R,L]=be(!1),A=u?.input,[D,O]=be(null),N=Ce((e=>{O(e),L(!1)}),[]),F=Ce((e=>{const t=function(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}(e,{emailLabel:g,isEmailRequired:_,isNameRequired:v,messageLabel:b,nameLabel:k});return t.length>0?M(`Please enter in the following required fields: ${t.join(", ")}`):M(null),0===t.length}),[g,_,v,b,k]),B=Ce((async e=>{T(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;const t=new FormData(e.target),n=await(u&&R?u.value():void 0),r={name:Ne(t,"name"),email:Ne(t,"email"),message:Ne(t,"message"),attachments:n?[n]:void 0};if(!F(r))return;try{const e=await o({name:r.name,email:r.email,message:r.message,source:"widget",tags:d},{attachments:r.attachments});s(r,e)}catch(e){f&&c.kg.error(e),M(e),i(e)}}finally{T(!1)}}),[u&&R,s,i]);return P("form",{class:"form",onSubmit:B},A&&R?P(A,{onError:N}):null,P("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:E},P("div",{class:"form__top"},I?P("div",{class:"form__error-container"},I):null,l?P("label",{for:"name",class:"form__label"},P(Pe,{label:k,isRequiredLabel:x,isRequired:v}),P("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:w,required:v,type:"text"})):P("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?P("label",{for:"email",class:"form__label"},P(Pe,{label:g,isRequiredLabel:x,isRequired:_}),P("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:y,required:_,type:"email"})):P("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),P("label",{for:"message",class:"form__label"},P(Pe,{label:b,isRequiredLabel:x,isRequired:!0}),P("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:S,required:!0,rows:5})),A?P("label",{for:"screenshot",class:"form__label"},P("button",{class:"btn btn--default",disabled:E,type:"button",onClick:()=>{O(null),L((e=>!e))}},R?p:h),D?P("div",{class:"form__error-container"},D.message):null):null),P("div",{class:"btn-group"},P("button",{class:"btn btn--primary",disabled:E,type:"submit"},C),P("button",{class:"btn btn--default",disabled:E,type:"button",onClick:r},m))))}function Pe({label:e,isRequired:t,isRequiredLabel:n}){return P("span",{class:"form__label__text"},e,t&&P("span",{class:"form__label__text--required"},n))}function Be(){const e=e=>u.document.createElementNS("http://www.w3.org/2000/svg",e),t=y(e("svg"),{width:"16",height:"17",viewBox:"0 0 16 17",fill:"inherit"}),n=y(e("g"),{clipPath:"url(#clip0_57_156)"}),r=y(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=y(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=y(e("clipPath"),{id:"clip0_57_156"}),a=y(e("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function Ue({open:e,onFormSubmitted:t,...n}){const r=n.options,o=we((()=>({__html:Be().outerHTML})),[]),[s,i]=be(null),a=Ce((()=>{s&&(clearTimeout(s),i(null)),t()}),[s]),c=Ce(((e,r)=>{n.onSubmitSuccess(e,r),i(setTimeout((()=>{t(),i(null)}),5e3))}),[t]);return P(U,null,s?P("div",{class:"success__position",onClick:a},P("div",{class:"success__content"},r.successMessageText,P("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):P("dialog",{class:"dialog",onClick:r.onFormClose,open:e},P("div",{class:"dialog__position"},P("div",{class:"dialog__content",onClick:e=>{e.stopPropagation()}},P(Oe,{options:r}),P(Fe,{...n,onSubmitSuccess:c})))))}const He=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const s=r,i=e.useSentryUser,a=function(){const e=(0,o.nZ)().getUser(),t=(0,o.aF)().getUser(),n=(0,o.lW)().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}(),c=d.createElement("div"),l=function(e){const t=d.createElement("style");return t.textContent="\n:host {\n --dialog-inset: var(--inset);\n}\n\n\n.dialog {\n position: fixed;\n z-index: var(--z-index);\n margin: 0;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n height: 100vh;\n width: 100vw;\n\n color: var(--dialog-color, var(--foreground));\n fill: var(--dialog-color, var(--foreground));\n line-height: 1.75em;\n\n background-color: rgba(0, 0, 0, 0.05);\n border: none;\n inset: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n position: fixed;\n z-index: var(--z-index);\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n display: flex;\n max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n .dialog__position {\n inset: var(--page-margin);\n padding: 0;\n }\n}\n\n.dialog__position:has(.editor) {\n inset: var(--page-margin);\n padding: 0;\n}\n\n.dialog:not([open]) {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: var(--dialog-padding, 24px);\n max-width: 100%;\n width: 100%;\n max-height: 100%;\n overflow: auto;\n\n background: var(--dialog-background, var(--background));\n border-radius: var(--dialog-border-radius, 20px);\n border: var(--dialog-border, var(--border));\n box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n transform: translate(0, 0) scale(1);\n transition: transform 0.2s ease-in-out;\n}\n\n\n\n.dialog__header {\n display: flex;\n gap: 4px;\n justify-content: space-between;\n font-weight: var(--dialog-header-weight, 600);\n margin: 0;\n}\n.dialog__title {\n align-self: center;\n width: var(--form-width, 272px);\n}\n\n@media (max-width: 600px) {\n .dialog__title {\n width: auto;\n }\n}\n\n.dialog__position:has(.editor) .dialog__title {\n width: auto;\n}\n\n\n.brand-link {\n display: inline-flex;\n}\n.brand-link:focus-visible {\n outline: var(--outline);\n}\n\n\n.form {\n display: flex;\n overflow: auto;\n flex-direction: row;\n gap: 16px;\n flex: 1 0;\n}\n\n.form fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n.form__right {\n flex: 0 0 auto;\n display: flex;\n overflow: auto;\n flex-direction: column;\n justify-content: space-between;\n gap: 20px;\n width: var(--form-width, 100%);\n}\n\n.dialog__position:has(.editor) .form__right {\n width: var(--form-width, 272px);\n}\n\n.form__top {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form__error-container {\n color: var(--error-color);\n fill: var(--error-color);\n}\n\n.form__label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0px;\n}\n\n.form__label__text {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.form__label__text--required {\n font-size: 0.85em;\n}\n\n.form__input {\n font-family: inherit;\n line-height: inherit;\n background: transparent;\n box-sizing: border-box;\n border: var(--input-border, var(--border));\n border-radius: var(--input-border-radius, 6px);\n color: var(--input-color, inherit);\n fill: var(--input-color, inherit);\n font-size: var(--input-font-size, inherit);\n font-weight: var(--input-font-weight, 500);\n padding: 6px 12px;\n}\n\n.form__input::placeholder {\n opacity: 0.65;\n color: var(--input-placeholder-color, inherit);\n filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n font-family: inherit;\n resize: vertical;\n}\n\n.error {\n color: var(--error-color);\n fill: var(--error-color);\n}\n\n\n.btn-group {\n display: grid;\n gap: 8px;\n}\n\n.btn {\n line-height: inherit;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--button-font-size, inherit);\n font-weight: var(--button-font-weight, 600);\n padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.btn--primary {\n color: var(--button-primary-color, var(--accent-foreground));\n fill: var(--button-primary-color, var(--accent-foreground));\n background: var(--button-primary-background, var(--accent-background));\n border: var(--button-primary-border, var(--border));\n border-radius: var(--button-primary-border-radius, 6px);\n font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n color: var(--button-primary-hover-color, var(--accent-foreground));\n fill: var(--button-primary-hover-color, var(--accent-foreground));\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-background, var(--background));\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n outline: var(--button-focus-outline, var(--outline));\n}\n\n\n.success__position {\n position: fixed;\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n z-index: var(--z-index);\n}\n.success__content {\n background: var(--success-background, var(--background));\n border: var(--success-border, var(--border));\n border-radius: var(--success-border-radius, 1.7em/50%);\n box-shadow: var(--success-box-shadow, var(--box-shadow));\n font-weight: var(--success-font-weight, 600);\n color: var(--success-color);\n fill: var(--success-color);\n padding: 12px 24px;\n line-height: 1.75em;\n\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n gap: 6px;\n cursor: default;\n}\n\n.success__icon {\n display: flex;\n}\n\n",e&&t.setAttribute("nonce",e),t}(e.styleNonce);let u="";const h={get el(){return c},appendToDom(){s.contains(l)||s.contains(c)||(s.appendChild(l),s.appendChild(c))},removeFromDom(){c.remove(),l.remove(),d.body.style.overflow=u},open(){m(!0),e.onFormOpen?.(),(0,o.s3)()?.emit("openFeedbackWidget"),u=d.body.style.overflow,d.body.style.overflow="hidden"},close(){m(!1),d.body.style.overflow=u}},p=t?.createInput({h:P,hooks:Ae,dialog:h,options:e}),m=t=>{!function(e,t,n){var r,o,s;x.__&&x.__(e,t),r=t.__k,o=[],s=[],Q(t,e=t.__k=P(U,null,[e]),r||L,L,void 0!==t.ownerSVGElement,r?null:t.firstChild?C.call(t.childNodes):null,o,r?r.__e:t.firstChild,!1,s),e.__d=void 0,ee(o,e,s)}(P(Ue,{options:e,screenshotInput:p,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:i&&a&&a[i.name]||"",defaultEmail:i&&a&&a[i.email]||"",onFormClose:()=>{m(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(t,n)=>{m(!1),e.onSubmitSuccess?.(t,n)},onSubmitError:t=>{e.onSubmitError?.(t)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:t}),c)};return h}});function ze(e){const t=d.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`\n.editor {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n\n.editor__image-container {\n justify-items: center;\n padding: 15px;\n position: relative;\n height: 100%;\n border-radius: var(--menu-border-radius, 6px);\n\n background-color: ${n};\n background-image: repeating-linear-gradient(\n -145deg,\n transparent,\n transparent 8px,\n ${n} 8px,\n ${n} 11px\n ),\n repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 15px,\n ${r} 15px,\n ${r} 16px\n );\n}\n\n.editor__canvas-container {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.editor__canvas-container > * {\n object-fit: contain;\n position: absolute;\n}\n\n.editor__tool-container {\n padding-top: 8px;\n display: flex;\n justify-content: center;\n}\n\n.editor__tool-bar {\n display: flex;\n gap: 8px;\n}\n\n.editor__tool {\n display: flex;\n padding: 8px 12px;\n justify-content: center;\n align-items: center;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n background: var(--button-background, var(--background));\n color: var(--button-color, var(--foreground));\n}\n\n.editor__tool--active {\n background: var(--button-primary-background, var(--accent-background));\n color: var(--button-primary-color, var(--accent-foreground));\n}\n\n.editor__rect {\n position: absolute;\n z-index: 2;\n}\n\n.editor__rect button {\n opacity: 0;\n position: absolute;\n top: -12px;\n right: -12px;\n cursor: pointer;\n padding: 0;\n z-index: 3;\n border: none;\n background: none;\n}\n\n.editor__rect:hover button {\n opacity: 1;\n}\n`,e&&t.setAttribute("nonce",e),t}function We(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function je(e,t){We(e,{alpha:!0},((e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)}))}function $e(e,t,n){We(e,{alpha:!0},((e,r)=>{n.length&&(r.fillStyle="rgba(0, 0, 0, 0.25)",r.fillRect(0,0,e.width,e.height)),n.forEach((e=>{!function(e,t,n){switch(e.type){case"highlight":t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break;case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h)}}(e,r,t)}))}))}function qe({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=function({hooks:e}){return function({onBeforeScreenshot:t,onScreenshot:n,onAfterScreenshot:r,onError:o}){const s=function(){const[t,n]=e.useState(u.devicePixelRatio??1);return e.useEffect((()=>{const e=()=>{n(u.devicePixelRatio)},t=matchMedia(`(resolution: ${u.devicePixelRatio}dppx)`);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}),[]),t}();e.useEffect((()=>{(async()=>{t();const e=await h.mediaDevices.getDisplayMedia({video:{width:u.innerWidth*s,height:u.innerHeight*s},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),o=d.createElement("video");await new Promise(((t,r)=>{o.srcObject=e,o.onloadedmetadata=()=>{n(o,s),e.getTracks().forEach((e=>e.stop())),t()},o.play().catch(r)})),r()})().catch(o)}),[])}}({hooks:t}),i=function({h:e}){return function({action:t,setAction:n}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:"editor__tool "+("highlight"===t?"editor__tool--active":""),onClick:()=>{n("highlight"===t?"":"highlight")}},"Highlight"),e("button",{type:"button",class:"editor__tool "+("hide"===t?"editor__tool--active":""),onClick:()=>{n("hide"===t?"":"hide")}},"Hide")))}}({h:e}),a=function({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}({h:e}),c={__html:ze(o.styleNonce).innerText},l=r.el.style,p=({screenshot:r})=>{const[s,l]=t.useState("highlight"),[h,p]=t.useState([]),m=t.useRef(null),f=t.useRef(null),g=t.useRef(null),y=t.useRef(null),[_,v]=t.useState(1),b=t.useMemo((()=>{const e=d.getElementById(o.id);if(!e)return"white";const t=getComputedStyle(e);return t.getPropertyValue("--button-primary-background")||t.getPropertyValue("--accent-background")}),[o.id]);t.useLayoutEffect((()=>{const e=()=>{const t=m.current;t&&(We(r.canvas,{alpha:!1},(e=>{const n=Math.min(t.clientWidth/e.width,t.clientHeight/e.height);v(n)})),0!==t.clientHeight&&0!==t.clientWidth||setTimeout(e,0))};return e(),u.addEventListener("resize",e),()=>{u.removeEventListener("resize",e)}}),[r]);const S=t.useCallback(((e,t)=>{We(e,{alpha:!0},((e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height}))}),[r]);t.useEffect((()=>{S(f.current,r.dpi),je(f.current,r.canvas)}),[r]),t.useEffect((()=>{S(g.current,r.dpi),We(g.current,{alpha:!0},((e,t)=>{t.clearRect(0,0,e.width,e.height)})),$e(g.current,b,h)}),[h,b]),t.useEffect((()=>{S(n,r.dpi),je(n,r.canvas),We(d.createElement("canvas"),{alpha:!0},((e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,$e(e,b,h),je(n,e)}))}),[h,r,b]);const k=t.useCallback((e=>t=>{t.preventDefault(),t.stopPropagation(),p((t=>{const n=[...t];return n.splice(e,1),n}))}),[]),w={width:r.canvas.width*_+"px",height:r.canvas.height*_+"px"},C=e=>{e.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:m},e("canvas",{ref:f,id:"background",style:w}),e("canvas",{ref:g,id:"foreground",style:w}),e("div",{ref:y,onMouseDown:e=>{if(!s||!y.current)return;const t=y.current.getBoundingClientRect(),n={type:s,x:e.offsetX/_,y:e.offsetY/_},r=(e,n)=>{const r=(n.clientX-t.x)/_,o=(n.clientY-t.y)/_;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,o),w:Math.abs(r-e.x),h:Math.abs(o-e.y)}},o=e=>{We(g.current,{alpha:!0},((e,t)=>{t.clearRect(0,0,e.width,e.height)})),$e(g.current,b,[...h,r(n,e)])},i=e=>{const t=r(n,e);t.w*_>=1&&t.h*_>=1&&p((e=>[...e,t])),d.removeEventListener("mousemove",o),d.removeEventListener("mouseup",i)};d.addEventListener("mousemove",o),d.addEventListener("mouseup",i)},style:w},h.map(((t,n)=>e("div",{key:n,class:"editor__rect",style:{top:t.y*_+"px",left:t.x*_+"px",width:t.w*_+"px",height:t.h*_+"px"}},e("button",{"aria-label":"Remove",onClick:k(n),onMouseDown:C,onMouseUp:C,type:"button"},e(a,null)))))))),e(i,{action:s,setAction:l}))};return function({onError:r}){const[o,i]=t.useState();return s({onBeforeScreenshot:t.useCallback((()=>{l.display="none"}),[]),onScreenshot:t.useCallback(((e,t)=>{We(d.createElement("canvas"),{alpha:!1},((n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),i({canvas:n,dpi:t})})),n.width=e.videoWidth,n.height=e.videoHeight}),[]),onAfterScreenshot:t.useCallback((()=>{l.display="block"}),[]),onError:t.useCallback((e=>{l.display="block",r(e)}),[])}),o?e(p,{screenshot:o}):e("div",null)}}const Ve=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=d.createElement("canvas");return{input:qe({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const e=await new Promise((e=>{o.toBlob(e,"image/png")}));if(e)return{data:new Uint8Array(await e.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})},43778:(e,t,n)=>{n.d(t,{m:()=>N});var r=n(66893),o=Object.defineProperty,s=(e,t,n)=>((e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function i(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:i(e.parentNode,t,n,r+1):-1}function a(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}const c="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 l={map:{},getId:()=>(console.error(c),-1),getNode:()=>(console.error(c),null),removeNodeFromMap(){console.error(c)},has:()=>(console.error(c),!1),reset(){console.error(c)}};function u(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){g((()=>{n.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>u(e,t,s||{},!0)}function d(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function h(e,t,n,r,o){if(!e)return!1;const s=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}(e);if(!s)return!1;const c=a(t,n);if(!o){const e=r&&s.matches(r);return c(s)&&!e}const l=i(s,c);let u=-1;return!(l<0)&&(r&&(u=i(s,a(null,r))),l>-1&&u<0||l("map"===t&&console.error(c),Reflect.get(e,t,n))})),Date.now().toString();const p={};function m(e){const t=p[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return p[e]=r.bind(window)}function f(...e){return m("requestAnimationFrame")(...e)}function g(...e){return m("setTimeout")(...e)}var y=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(y||{});let _;const v=e=>_?(...t)=>{try{return e(...t)}catch(e){if(_&&!0===_(e))return()=>{};throw e}}:e;for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S="undefined"==typeof Uint8Array?[]:new Uint8Array(256),k=0;k{if(!e||!T(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=w.get(e);return n||(n=new Map,w.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function x(e,t,n){if(e instanceof Array)return e.map((e=>x(e,t,n)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t>2],o+=b[(3&n[t])<<4|n[t+1]>>4],o+=b[(15&n[t+1])<<2|n[t+2]>>6],o+=b[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[x(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}return e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[x(e.data,t,n),e.width,e.height]}:T(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:C(e,t,n)}:e}const E=(e,t,n)=>e.map((e=>x(e,t,n))),T=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function I(e,t,n,r,o){const s=[];try{const i=d(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(s,...i){if(!h(this,t,n,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(s);if("__context"in this||(this.__context=e),o&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[s,...i])}}));s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((e=>e()))}}function M(e,t,n,r,o,s,i,a){const c=[],l=Object.getOwnPropertyNames(e);for(const i of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if("function"!=typeof e[i])continue;const l=d(e,i,(function(e){return function(...c){const l=e.apply(this,c);if(C(l,a,this),"tagName"in this.canvas&&!h(this.canvas,r,o,s,!0)){const e=E(c,a,this),r={type:t,property:i,args:e};n(this.canvas,r)}return l}}));c.push(l)}catch{const r=u(e,i,{set(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});c.push(r)}return c}class R{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{sampling:t="all",win:n,blockClass:r,blockSelector:o,unblockSelector:s,maxCanvasSize:i,recordCanvas:a,dataURLOptions:c,errorHandler:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,l&&(_=l),(a&&"number"==typeof t||e.enableManualSnapshot)&&(this.worker=this.initFPSWorker()),this.addWindow(n),e.enableManualSnapshot||v((()=>{a&&"all"===t&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,o,s,i,{dataURLOptions:c})}))()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){const{sampling:t="all",blockClass:n,blockSelector:r,unblockSelector:o,recordCanvas:s,enableManualSnapshot:i}=this.options;if(!this.windowsSet.has(e)){if(i)return this.windowsSet.add(e),void this.windows.push(new WeakRef(e));v((()=>{if(s&&"all"===t&&this.initCanvasMutationObserver(e,n,r,o),s&&"number"==typeof t){const t=I(e,n,r,o,!0);this.restoreHandlers.push((()=>{t()}))}}))(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}initFPSWorker(){const e=new Worker(function(){const e=new Blob(['for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};']);return URL.createObjectURL(e)}());return e.onmessage=e=>{const t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!("base64"in t))return;const{base64:r,type:o,width:s,height:i}=t;this.mutationCb({id:n,type:y["2D"],commands:[{property:"clearRect",args:[0,0,s,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:o}]},0,0,s,i]}]})},e}initCanvasFPSObserver(e,t,n,r,o,s){const i=this.takeSnapshot(!1,e,t,n,r,o,s.dataURLOptions);this.restoreHandlers.push((()=>{cancelAnimationFrame(i)}))}initCanvasMutationObserver(e,t,n,r){const o=I(e,t,n,r,!1),s=function(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])continue;const i=d(t.CanvasRenderingContext2D.prototype,a,(function(s){return function(...i){return h(this.canvas,n,r,o,!0)||g((()=>{const n=E(i,t,this);e(this.canvas,{type:y["2D"],property:a,args:n})}),0),s.apply(this,i)}}));s.push(i)}catch{const n=u(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:y["2D"],property:a,args:[t],setter:!0})}});s.push(n)}return()=>{s.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n,r),i=function(e,t,n,r,o,s){const i=[];return i.push(...M(t.WebGLRenderingContext.prototype,y.WebGL,e,n,r,o,0,t)),void 0!==t.WebGL2RenderingContext&&i.push(...M(t.WebGL2RenderingContext.prototype,y.WebGL2,e,n,r,o,0,t)),()=>{i.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push((()=>{o(),s(),i()}))}snapshot(e){const{options:t}=this,n=this.takeSnapshot(!0,"all"===t.sampling?2:t.sampling||2,t.blockClass,t.blockSelector,t.unblockSelector,t.maxCanvasSize,t.dataURLOptions,e);this.restoreHandlers.push((()=>{cancelAnimationFrame(n)}))}takeSnapshot(e,t,n,r,o,s,i,a){const c=1e3/t;let l;const u=e=>{if(e)return[e];const t=[],s=e=>{e.querySelectorAll("canvas").forEach((e=>{h(e,n,r,o,!0)||t.push(e)}))};for(const e of this.windows){const t=e.deref();let n;try{n=t&&t.document}catch{}n&&s(n)}for(const e of this.shadowDoms){const t=e.deref();t&&s(t)}return t},d=t=>{this.windows.length&&(this.lastSnapshotTime&&t-this.lastSnapshotTime{if(!this.mirror.hasNode(t))return;const n=this.mirror.getId(t);if(!this.snapshotInProgressMap.get(n)&&t.width&&t.height){if(this.snapshotInProgressMap.set(n,!0),!e&&["webgl","webgl2"].includes(t.__context)){const e=t.getContext(t.__context);!1===e?.getContextAttributes()?.preserveDrawingBuffer&&e.clear(e.COLOR_BUFFER_BIT)}createImageBitmap(t).then((e=>{this.worker?.postMessage({id:n,bitmap:e,width:t.width,height:t.height,dataURLOptions:i,maxCanvasSize:s},[e])})).catch((e=>{v((()=>{throw e}))()}))}})),e||(l=f(d))))};return l=f(d),l}startPendingCanvasMutationFlusher(){f((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,f(e)};f(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),f((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map((e=>{const{type:t,...n}=e;return n})),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var L,A;new class{constructor(){s(this,"idNodeMap",new Map),s(this,"nodeMetaMap",new WeakMap)}getId(e){if(!e)return-1;const t=this.getMeta(e)?.id;return t??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}},(A=L||(L={}))[A.NotStarted=0]="NotStarted",A[A.Running=1]="Running",A[A.Stopped=2]="Stopped";const D={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},O=1280,N=(0,r._I)(((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,O):O,n?Math.min(n,O):O]};let o;const s=new Promise((e=>o=e));return{name:"ReplayCanvas",getOptions(){const{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{const r=new R({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{"object"==typeof e&&(e.__rrweb__=!0)}catch(e){}}});return o(r),r},...D[e]||D.medium}},async snapshot(e){(await s).snapshot(e)}}}))},41459:(e,t,n)=>{n.d(t,{G:()=>fr,T:()=>_r});var r=n(39311),o=n(61137),s=n(21305),i=n(37949),a=n(17435),c=n(3601),l=n(47245),u=n(2868),d=n(17807),h=n(85249),p=n(4329),m=n(65405),f=n(7406),g=n(58691),y=n(67918),_=n(8439),v=n(5947),b=n(10437),S=n(50911),k=n(78574),w=n(91699),C=n(33338),x=n(96292),E=n(84624),T=n(88811),I=n(13845),M=n(18063),R=n(65532),L=n(30370);const A=r.n,D="sentryReplaySession",O="Unable to send Replay",N=15e4,F=5e3,P=2e7;var B=Object.defineProperty,U=(e,t,n)=>((e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),H=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(H||{});function z(e){const t=e?.host;return Boolean(t?.shadowRoot===e)}function W(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function j(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,$).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function $(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=j(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;nthis.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function V({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function X({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function G(e){return e.toLowerCase()}function K(e){return e.toUpperCase()}const Y="__rrweb_original__";function Z(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?G(t):null}function J(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Q(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(e){return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}const ee={};function te(e){const t=ee[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return ee[e]=r.bind(window)}function ne(...e){return te("setTimeout")(...e)}function re(...e){return te("clearTimeout")(...e)}function oe(e){try{return e.contentDocument}catch(e){}}let se=1;const ie=new RegExp("[^a-z0-9-_:]");function ae(){return se++}let ce,le;const ue=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,de=/^(?:[a-z+]+:)?\/\//i,he=/^www\..*/i,pe=/^(data:)([^,]*),(.*)/i;function me(e,t){return(e||"").replace(ue,((e,n,r,o,s,i)=>{const a=r||s||i,c=n||o||"";if(!a)return e;if(de.test(a)||he.test(a))return`url(${c}${a}${c})`;if(pe.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`}))}const fe=/^[^ \t\n\r\u000c]+/,ge=/^[, \t\n\r\u000c]+/,ye=new WeakMap;function _e(e,t){return t&&""!==t.trim()?ve(e,t):t}function ve(e,t){let n=ye.get(e);if(n||(n=e.createElement("a"),ye.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function be(e,t,n,r,o,s){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?_e(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(ge),!(n>=t.length);){let s=r(fe);if(","===s.slice(-1))s=_e(e,s.substring(0,s.length-1)),o.push(s);else{let r="";s=_e(e,s);let i=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((s+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,o.push((s+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?me(r,ve(e)):"object"===t&&"data"===n?_e(e,r):"function"==typeof s?s(n,r,o):r:_e(e,r):r}function Se(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function ke(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}function we(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:we(e.parentNode,t,n,r+1):-1}function Ce(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function xe(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(s){if(c=we(i,Ce(r,o)),c<0)return!0;a=we(i,Ce(t,n),c>=0?c:1/0)}else{if(a=we(i,Ce(t,n)),a<0)return!1;c=we(i,Ce(r,o),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0||!s)}catch(e){}return!!s}function Ee(e){return null==e?"":e.toLowerCase()}function Te(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:h=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:C=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:T=(()=>!1),newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:M=!0}=t;const R=function(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:f,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1}=t,k=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:H.Document,childNodes:[],compatMode:e.compatMode}:{type:H.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:f,maskTextClass:g,unmaskTextClass:y,maskTextSelector:_,unmaskTextSelector:v}=t,b=ke(e,r,o,s),S=function(e){if(e instanceof HTMLFormElement)return"form";const t=G(e.tagName);return ie.test(t)?"div":t}(e);let k={};const w=e.attributes.length;for(let t=0;tt.href===e.href));let r=null;t&&(r=j(t)),r&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=me(r,t.href))}if("style"===S&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=j(e.sheet);t&&(k._cssText=me(t,ve(n)))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const t=e,n=Z(t),r=J(t,K(S),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=xe(t,g,_,y,v,V({type:n,tagName:K(S),maskInputOptions:a}));k.value=X({isMasked:e,element:t,value:r,maskInputFn:l})}o&&(k.checked=o)}if("option"===S&&(e.selected&&!a.select?k.selected=!0:delete k.selected),"canvas"===S&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n0!==e)))return!1}return!0})(e)||(k.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(k.rr_dataURL=t)}if("img"===S&&d){ce||(ce=n.createElement("canvas"),le=ce.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"",o=t.crossOrigin,s=()=>{t.removeEventListener("load",s);try{ce.width=t.naturalWidth,ce.height=t.naturalHeight,le.drawImage(t,0,0),k.rr_dataURL=ce.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?k.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}if("audio"!==S&&"video"!==S||(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),b){const{width:t,height:n}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${n}px`}}let C;"iframe"!==S||p(k.src)||(b||oe(e)||(k.rr_src=k.src),delete k.src);try{customElements.get(S)&&(C=!0)}catch(e){}return{type:H.Element,tagName:S,attributes:k,childNodes:[],isSVG:(x=e,Boolean("svg"===x.tagName||x.ownerSVGElement)||void 0),needBlock:b,rootId:f,isCustom:C};var x}(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:y,inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:k,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let h=e.textContent;const p="STYLE"===d||void 0,m="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(p&&h){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(h=j(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}h=me(h,ve(t.doc))}m&&(h="SCRIPT_PLACEHOLDER");const g=xe(e,r,s,o,i,n);return p||m||f||!h||!g||(h=a?a(h,e.parentElement):h.replace(/[\S]/g,"*")),f&&h&&(c.textarea||g)&&(h=l?l(h,e.parentNode):h.replace(/[\S]/g,"*")),"OPTION"===d&&h&&(h=X({isMasked:xe(e,r,s,o,i,V({type:null,tagName:d,maskInputOptions:c})),element:e,value:h,maskInputFn:l})),{type:H.Text,textContent:h||"",isStyle:p,rootId:u}}(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h,maskTextFn:f,maskInputOptions:m,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:H.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:T,newlyAddedElement:I});if(!R)return console.warn(e,"not serialized"),null;let L;L=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===H.Comment)return!0;if(e.type===H.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Q(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ee(e.attributes.name)||"icon"===Ee(e.attributes.rel)||"apple-touch-icon"===Ee(e.attributes.rel)||"shortcut icon"===Ee(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Ee(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ee(e.attributes.property).match(/^(og|twitter|fb):/)||Ee(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ee(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Ee(e.attributes.name)||"googlebot"===Ee(e.attributes.name)||"bingbot"===Ee(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Ee(e.attributes.name)||"generator"===Ee(e.attributes.name)||"framework"===Ee(e.attributes.name)||"publisher"===Ee(e.attributes.name)||"progid"===Ee(e.attributes.name)||Ee(e.attributes.property).match(/^article:/)||Ee(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Ee(e.attributes.name)||"yandex-verification"===Ee(e.attributes.name)||"csrf-token"===Ee(e.attributes.name)||"p:domain_verify"===Ee(e.attributes.name)||"verify-v1"===Ee(e.attributes.name)||"verification"===Ee(e.attributes.name)||"shopify-checkout-api-token"===Ee(e.attributes.name)))return!0}}return!1}(R,_)&&(M||R.type!==H.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?ae():-2;const A=Object.assign(R,{id:L});if(r.add(e,A),-2===L)return null;k&&k(e);let D=!h;if(A.type===H.Element){D=D&&!A.needBlock,delete A.needBlock;const t=e.shadowRoot;t&&W(t)&&(A.isShadowHost=!0)}if((A.type===H.Document||A.type===H.Element)&&D){_.headWhitespace&&A.type===H.Element&&"head"===A.tagName&&(M=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:h,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:C,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:T};for(const n of Array.from(e.childNodes)){const e=Te(n,t);e&&A.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Te(n,t);r&&(W(e.shadowRoot)&&(r.isShadow=!0),A.childNodes.push(r))}}return e.parentNode&&z(e.parentNode)&&W(e.parentNode)&&(A.isShadow=!0),A.type!==H.Element||"iframe"!==A.tagName||ke(e,o,s,i)||function(e,t,n){const r=e.contentWindow;if(!r)return;let o,s=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=ne((()=>{s||(t(),s=!0)}),n);return void e.addEventListener("load",(()=>{re(r),s=!0,t()}))}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return ne(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=oe(e);if(t&&w){const n=Te(t,{doc:t,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:C,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:T});n&&w(e,n)}}),C),A.type===H.Element&&"link"===A.tagName&&"string"==typeof A.attributes.rel&&("stylesheet"===A.attributes.rel||"preload"===A.attributes.rel&&"string"==typeof A.attributes.href&&"css"===Q(A.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const s=ne((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{re(s),o=!0,t()}))}(e,(()=>{if(x){const t=Te(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:C,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:T});t&&x(e,t)}}),E),A}function Ie(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Me="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 Re={map:{},getId:()=>(console.error(Me),-1),getNode:()=>(console.error(Me),null),removeNodeFromMap(){console.error(Me)},has:()=>(console.error(Me),!1),reset(){console.error(Me)}};function Le(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||!1!==n.leading||(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(function(...e){Ye("clearTimeout")(...e)}(r),r=null),o=i,e.apply(c,s)):r||!1===n.trailing||(r=Ze((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)}),a))}}function Ae(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){Ze((()=>{n.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>Ae(e,t,s||{},!0)}function De(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Re=new Proxy(Re,{get:(e,t,n)=>("map"===t&&console.error(Me),Reflect.get(e,t,n))}));let Oe=Date.now;function Ne(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Fe(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Pe(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Be(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}function Ue(e,t,n,r,o){if(!e)return!1;const s=Be(e);if(!s)return!1;const i=Ce(t,n);if(!o){const e=r&&s.matches(r);return i(s)&&!e}const a=we(s,i);let c=-1;return!(a<0)&&(r&&(c=we(s,Ce(null,r))),a>-1&&c<0||a(new Date).getTime());class Ve{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Xe(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Ge(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=Xe(n);)n=t;return n}(e);return t.contains(n)}(e))}const Ke={};function Ye(e){const t=Ke[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return Ke[e]=r.bind(window)}function Ze(...e){return Ye("setTimeout")(...e)}var Je=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Je||{}),Qe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Qe||{}),et=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(et||{}),tt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(tt||{}),nt=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(nt||{});function rt(e){try{return e.contentDocument}catch(e){}}function ot(e){return"__ln"in e}class st{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n`${e}@${t}`;class at{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new st,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!Ge(o))return;const s=z(o.parentNode)?this.mirror.getId(Xe(o)):this.mirror.getId(o.parentNode),i=r(o);if(-1===s||-1===i)return n.addNode(o);const a=Te(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{je(e,this.mirror)&&!Ue(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),$e(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),qe(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{Ue(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:s,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)lt(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)ut(this.droppedSet,e)||lt(this.removes,e,this.mirror)?ut(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let s=null;for(;n.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}s=e.previous,n.removeNode(e.value),o(e.value)}const i={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!He(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Ue(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:xe(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Be(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Z(t),o=t.tagName;r=J(t,o,n);const s=V({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=X({isMasked:xe(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(Ue(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(rt(t))return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Se(t.tagName,n)&&(o.attributes[n]=be(this.doc,G(t.tagName),G(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||s!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===s?r:[r,s]:o._unchangedStyles[e]=[r,s]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(Ue(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=z(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Ue(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||He(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(ct(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||ze(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[it(n,r)]?ct(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!z(e.target)||!W(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(He(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[it(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ue(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),qe(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ct(e,t){e.delete(t),t.childNodes.forEach((t=>ct(e,t)))}function lt(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}(e,t,n)}function ut(e,t){return 0!==e.size&&dt(e,t)}function dt(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||dt(e,n))}let ht;const pt=e=>ht?(...t)=>{try{return e(...t)}catch(e){if(ht&&!0===ht(e))return()=>{};throw e}}:e,mt=[];function ft(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function gt(e,t){const n=new at;mt.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(pt((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function yt({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return Ie("scroll",pt(Le(pt((i=>{const a=ft(i);if(!a||Ue(a,r,o,s,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=Ne(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})})),i.scroll||100)),t)}const _t=["INPUT","TEXTAREA","SELECT"],vt=new WeakMap;function bt({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:h,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:f}){function g(e){let n=ft(e);const u=e.isTrusted,g=n&&K(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||_t.indexOf(g)<0||Ue(n,r,o,s,!0))return;const _=n;if(_.classList.contains(i)||a&&_.matches(a))return;const v=Z(n);let b=J(_,g,v),S=!1;const k=V({maskInputOptions:c,tagName:g,type:v}),w=xe(n,h,m,p,f,k);"radio"!==v&&"checkbox"!==v||(S=n.checked),b=X({isMasked:w,element:n,value:b,maskInputFn:l}),y(n,d?{text:b,isChecked:S,userTriggered:u}:{text:b,isChecked:S});const C=n.name;"radio"===v&&C&&S&&t.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach((e=>{if(e!==n){const t=X({isMasked:w,element:e,value:J(e,g,v),maskInputFn:l});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}}))}function y(t,r){const o=vt.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){vt.set(t,r);const o=n.getId(t);pt(e)({...r,id:o})}}const _=("last"===u.input?["change"]:["input","change"]).map((e=>Ie(e,pt(g),t))),v=t.defaultView;if(!v)return()=>{_.forEach((e=>e()))};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&_.push(...S.map((e=>Ae(e[0],e[1],{set(){pt(g)({target:this,isTrusted:!1})}},!1,v)))),pt((()=>{_.forEach((e=>e()))}))}function St(e){return function(e,t){if(xt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||xt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||xt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||xt("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function kt(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function wt({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const o="#document"===n.nodeName?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(e){const n=s.set?.call(this,e);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),pt((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))):()=>{}}function Ct(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=gt(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=Le(pt((t=>{const n=Date.now()-i;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],i=null})),s),l=pt(Le(pt((e=>{const t=ft(e),{clientX:n,clientY:o}=We(e)?e.changedTouches[0]:e;i||(i=Oe()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Oe()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?Qe.Drag:e instanceof MouseEvent?Qe.MouseMove:Qe.TouchMove)})),o,{trailing:!1})),u=[Ie("mousemove",l,n),Ie("touchmove",l,n),Ie("drag",l,n)];return pt((()=>{u.forEach((e=>e()))}))}(e),s=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(et).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((i=>{let a=G(i);const u=(t=>i=>{const a=ft(i);if(Ue(a,r,o,s,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=tt.Mouse;break;case"touch":c=tt.Touch;break;case"pen":c=tt.Pen}c===tt.Touch?et[t]===et.MouseDown?u="TouchStart":et[t]===et.MouseUp&&(u="TouchEnd"):tt.Pen}else We(i)&&(c=tt.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===tt.Touch||u.startsWith("Mouse")&&c===tt.Mouse)&&(c=null)):et[t]===et.Click&&(c=l,l=null);const d=We(i)?i.changedTouches[0]:i;if(!d)return;const h=n.getId(a),{clientX:p,clientY:m}=d;pt(e)({type:et[u],id:h,x:p,y:m,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(et[i]){case et.MouseDown:case et.MouseUp:a=a.replace("mouse","pointer");break;case et.TouchStart:case et.TouchEnd:return}c.push(Ie(a,u,t))})),pt((()=>{c.forEach((e=>e()))}))}(e),i=yt(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Ie("resize",pt(Le(pt((()=>{const t=Fe(),o=Pe();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)})),200)),t)}(e,{win:n}),c=bt(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=pt((i=>Le(pt((s=>{const a=ft(s);if(!a||Ue(a,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:o.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})})),s.media||500))),c=[Ie("play",a(nt.Play),i),Ie("pause",a(nt.Pause),i),Ie("seeked",a(nt.Seeked),i),Ie("volumechange",a(nt.VolumeChange),i),Ie("ratechange",a(nt.RateChange),i)];return pt((()=>{c.forEach((e=>e()))}))}(e);let u=()=>{},d=()=>{},h=()=>{},p=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:pt(((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=kt(o,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),r.apply(o,s)}))});const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:pt(((r,o,s)=>{const[i]=s,{id:a,styleId:c}=kt(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(o,s)}))}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:pt(((r,o,s)=>{const[i]=s,{id:a,styleId:c}=kt(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(o,s)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:pt(((r,o,s)=>{const[i]=s,{id:a,styleId:c}=kt(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(o,s)}))}));const c={};Et("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Et("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Et("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Et("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach((([r,o])=>{l[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(l[r].insertRule,{apply:pt(((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=kt(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...St(o),a||0]}]}),r.apply(o,s)}))}),o.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:pt(((r,o,s)=>{const[i]=s,{id:a,styleId:c}=kt(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...St(o),i]}]}),r.apply(o,s)}))})})),pt((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}(e,{win:n}),d=wt(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:pt(((o,i,a)=>{const[c,l,u]=a;if(n.has(c))return s.apply(i,[c,l,u]);const{id:d,styleId:h}=kt(i.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&-1!==d||h&&-1!==h)&&e({id:d,styleId:h,set:{property:c,value:l,priority:u},index:St(i.parentRule)}),o.apply(i,a)}))});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:pt(((o,s,a)=>{const[c]=a;if(n.has(c))return i.apply(s,[c]);const{id:l,styleId:u}=kt(s.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:St(s.parentRule)}),o.apply(s,a)}))}),pt((()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i}))}(e,{win:n}),e.collectFonts&&(p=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=De(t.fonts,"add",(function(t){return function(n){return Ze(pt((()=>{const t=o.get(n);t&&(e(t),o.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=s})),r.push(i),pt((()=>{r.forEach((e=>e()))}))}(e)));const m=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=pt((()=>{const e=t.getSelection();if(!e||a&&e?.isCollapsed)return;a=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return pt((()=>{mt.forEach((e=>e.reset())),r?.disconnect(),o(),s(),i(),a(),c(),l(),u(),d(),h(),p(),m(),f(),g.forEach((e=>e()))}))}function xt(e){return void 0!==window[e]}function Et(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Tt{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),s.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class It{constructor(){this.crossOriginIframeMirror=new Tt(ae),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Mt{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Tt(ae),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Tt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&e.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const n=rt(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Je.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Je.IncrementalSnapshot,data:{source:Qe.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Je.Meta:case Je.Load:case Je.DomContentLoaded:return!1;case Je.Plugin:return t;case Je.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Je.IncrementalSnapshot:switch(t.data.source){case Qe.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Qe.Drag:case Qe.TouchMove:case Qe.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Qe.ViewportResize:return!1;case Qe.MediaInteraction:case Qe.MouseInteraction:case Qe.Scroll:case Qe.CanvasMutation:case Qe.Input:return this.replaceIds(t.data,e,["id"]),t;case Qe.StyleSheetRule:case Qe.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Qe.Font:return t;case Qe.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Qe.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===H.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class Rt{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Lt{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!W(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=gt({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(yt({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Ze((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(wt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=rt(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(De(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&Ge(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var At="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ot=0;Ot({rule:$(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Pt{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,function(...e){Ye("requestAnimationFrame")(...e)}((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Bt,Ut;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ht=new q;function zt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:h=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:k,sampling:w={},dataURLOptions:C={},mousemoveWait:x,recordDOM:E=!0,recordCanvas:T=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:R=!1,collectFonts:L=!1,inlineImages:A=!1,plugins:D,keepIframeSrcFn:O=(()=>!1),ignoreCSSAttributes:N=new Set([]),errorHandler:F,onMutation:P,getCanvasManager:B}=e;ht=F;const U=!I||window.parent===window;let H=!1;if(!U)try{window.parent.document&&(H=!1)}catch(e){H=!0}if(U&&!t)throw new Error("emit function is required");if(!U&&!H)return()=>{};void 0!==x&&void 0===w.mousemove&&(w.mousemove=x),Ht.reset();const z=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},W=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let j;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let $=0;const V=e=>{for(const t of D||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!H&&(e=k(e)),e};Bt=(e,o)=>{const s=e;if(s.timestamp=Oe(),!mt[0]?.isFrozen()||s.type===Je.FullSnapshot||s.type===Je.IncrementalSnapshot&&s.data.source===Qe.Mutation||mt.forEach((e=>e.unfreeze())),U)t?.(V(s),o);else if(H){const e={type:"rrweb",event:V(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===Je.FullSnapshot)j=s,$=0;else if(s.type===Je.IncrementalSnapshot){if(s.data.source===Qe.Mutation&&s.data.isAttachIframe)return;$++;const e=r&&$>=r,t=n&&j&&s.timestamp-j.timestamp>n;(e||t)&&te(!0)}};const X=e=>{Bt({type:Je.IncrementalSnapshot,data:{source:Qe.Mutation,...e}})},G=e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.Scroll,...e}}),K=e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.CanvasMutation,...e}}),Y=new Ft({mutationCb:X,adoptedStyleSheetCb:e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.AdoptedStyleSheet,...e}})}),Z="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new It:new Mt({mirror:Ht,mutationCb:X,stylesheetManager:Y,recordCrossOriginIframes:I,wrappedEmit:Bt});for(const e of D||[])e.getMirror&&e.getMirror({nodeMirror:Ht,crossOriginIframeMirror:Z.crossOriginIframeMirror,crossOriginIframeStyleMirror:Z.crossOriginIframeStyleMirror});const J=new Pt,Q=function(e,t){try{return e?e(t):new Nt}catch{return console.warn("Unable to initialize CanvasManager"),new Nt}}(B,{mirror:Ht,win:window,mutationCb:e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.CanvasMutation,...e}}),recordCanvas:T,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:w.canvas,dataURLOptions:C,errorHandler:F}),ee="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Rt:new Lt({mutationCb:X,scrollCb:G,bypassOptions:{onMutation:P,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:z,dataURLOptions:C,maskAttributeFn:_,maskTextFn:b,maskInputFn:v,recordCanvas:T,inlineImages:A,sampling:w,slimDOMOptions:W,iframeManager:Z,stylesheetManager:Y,canvasManager:Q,keepIframeSrcFn:O,processedNodeManager:J},mirror:Ht}),te=(e=!1)=>{if(!E)return;Bt({type:Je.Meta,data:{href:window.location.href,width:Pe(),height:Fe()}},e),Y.reset(),ee.init(),mt.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new q,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:h=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOM:_=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:E=(()=>!1)}=t||{};return Te(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!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}:!1===m?{}:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:v,inlineImages:h,recordCanvas:p,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:E,newlyAddedElement:!1})}(document,{mirror:Ht,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:z,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,slimDOM:W,dataURLOptions:C,recordCanvas:T,inlineImages:A,onSerialize:e=>{je(e,Ht)&&Z.addIframe(e),$e(e,Ht)&&Y.trackLinkElement(e),qe(e)&&ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Z.attachIframe(e,t),e.contentWindow&&Q.addWindow(e.contentWindow),ee.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:O});if(!t)return console.warn("Failed to snapshot the document");Bt({type:Je.FullSnapshot,data:{node:t,initialOffset:Ne(window)}}),mt.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Ht.getId(document))};Ut=te;try{const e=[],t=e=>pt(Ct)({onMutation:P,mutationCb:X,mousemoveCb:(e,t)=>Bt({type:Je.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.MouseInteraction,...e}}),scrollCb:G,viewportResizeCb:e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.ViewportResize,...e}}),inputCb:e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.Input,...e}}),mediaInteractionCb:e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.MediaInteraction,...e}}),styleSheetRuleCb:e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.StyleSheetRule,...e}}),styleDeclarationCb:e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.StyleDeclaration,...e}}),canvasMutationCb:K,fontCb:e=>Bt({type:Je.IncrementalSnapshot,data:{source:Qe.Font,...e}}),selectionCb:e=>{Bt({type:Je.IncrementalSnapshot,data:{source:Qe.Selection,...e}})},customElementCb:e=>{Bt({type:Je.IncrementalSnapshot,data:{source:Qe.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,maskInputOptions:z,inlineStylesheet:m,sampling:w,recordDOM:E,recordCanvas:T,inlineImages:A,userTriggeredOnInput:R,collectFonts:L,doc:e,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:O,blockSelector:s,unblockSelector:i,slimDOMOptions:W,dataURLOptions:C,mirror:Ht,iframeManager:Z,stylesheetManager:Y,shadowDomManager:ee,processedNodeManager:J,canvasManager:Q,ignoreCSSAttributes:N,plugins:D?.filter((e=>e.observer))?.map((e=>({observer:e.observer,options:e.options,callback:t=>Bt({type:Je.Plugin,data:{plugin:e.name,payload:t}})})))||[]},{});Z.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{te(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Ie("DOMContentLoaded",(()=>{Bt({type:Je.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&n()}))),e.push(Ie("load",(()=>{Bt({type:Je.Load,data:{}}),"load"===M&&n()}),window))),()=>{e.forEach((e=>e())),J.destroy(),Ut=void 0,ht=void 0}}catch(e){console.warn(e)}}var Wt,jt;function $t(e){return e>9999999999?e:1e3*e}function qt(e){return e>9999999999?e/1e3:e}function Vt(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:Je.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,o.Fv)(t,10,1e3)}}),"console"===t.category))))}function Xt(e){return e.closest("button,a")||e}function Gt(e){const t=Kt(e);return t&&t instanceof Element?Xt(t):t}function Kt(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let Yt;zt.mirror=Ht,zt.takeFullSnapshot=function(e){if(!Ut)throw new Error("please take full snapshot after start recording");Ut(e)},(jt=Wt||(Wt={}))[jt.NotStarted=0]="NotStarted",jt[jt.Running=1]="Running",jt[jt.Stopped=2]="Stopped";const Zt=new Set([Qe.Mutation,Qe.StyleSheetRule,Qe.StyleDeclaration,Qe.AdoptedStyleSheet,Qe.CanvasMutation,Qe.Selection,Qe.MediaInteraction]);class Jt{constructor(e,t,n=Vt){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=(t=()=>{this._lastMutation=en()},Yt||(Yt=[],(0,s.hl)(A,"open",(function(e){return function(...t){if(Yt)try{Yt.forEach((e=>e()))}catch(e){}return e.apply(A,t)}}))),Yt.push(t),()=>{const e=Yt?Yt.indexOf(t):-1;e>-1&&Yt.splice(e,1)});var t;this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){return!Qt.includes(e.tagName)||("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||(!("A"!==e.tagName||!(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))||!(!t||!e.matches(t))))}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:qt(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=qt(e)}registerScroll(e=Date.now()){this._lastScroll=qt(e)}registerClick(e){const t=Xt(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=en();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:s,clickBreadcrumb:i}=e;if(o){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:A.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:s||1}};this._addBreadcrumbEvent(t,o)}else if(s>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:A.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=(0,E.iK)((()=>this._checkClicks()),1e3)}}const Qt=["A","BUTTON","INPUT"];function en(){return Date.now()/1e3}function tn(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var nn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(nn||{});const rn=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function on(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(rn.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}function sn(e,t){const n=zt.mirror.getId(e),r=n&&zt.mirror.getNode(n),o=r&&zt.mirror.getMeta(r),s=o&&function(e){return e.type===nn.Element}(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map((e=>e.type===nn.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:on(s.attributes)}}:{}}}const an={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:un(s),end:un(o),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=un(o);return{type:n,name:r,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:h,startTime:p,transferSize:m,type:f}=e;return 0===o?null:{type:`${t}.${f}`,start:un(p),end:un(s),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:h}}}};function cn(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function ln(e){const t=an[e.entryType];return t?t(e):null}function un(e){return(((0,a.Z1)()||A.performance.timeOrigin)+e)/1e3}function dn(e){const t=e.entries[e.entries.length-1];return gn(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function hn(e){return void 0!==e.sources}function pn(e){const t=[],n=[];for(const r of e.entries)if(hn(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=zt.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return gn(e,"cumulative-layout-shift",n,t)}function mn(e){const t=e.entries[e.entries.length-1];return gn(e,"first-input-delay",t?.target?[t.target]:void 0)}function fn(e){const t=e.entries[e.entries.length-1];return gn(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function gn(e,t,n,r){const o=e.value,s=e.rating,i=un(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map((e=>zt.mirror.getId(e))):void 0,attributions:r}}}const yn="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,_n=["log","warn","error"],vn="[Replay] ";function bn(e,t="info"){(0,c.n)({category:"console",data:{logger:"replay"},level:t,message:`${vn}${e}`},{level:t})}const Sn=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return yn?(_n.forEach((e=>{n[e]=(...n)=>{l.fF[e](vn,...n),t&&bn(n.join(""),(0,u.V)(e))}})),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),l.fF.error(vn,r),e?(0,d.Tb)(r):t&&bn(r,"error")},n.infoTick=(...e)=>{l.fF.log(vn,...e),t&&setTimeout((()=>bn(e[0])),0)}):_n.forEach((e=>{n[e]=()=>{}})),n}();class kn extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class wn{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>P)throw new kn;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?$t(e):null}}class Cn{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){yn&&Sn.log("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const s=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",s),!i.success)return yn&&Sn.error("Error in compression worker: ",i.response),void o(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class xn{constructor(e){this._worker=new Cn(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=$t(e.timestamp);(!this._earliestTimestamp||tP?Promise.reject(new kn):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{yn&&Sn.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class En{constructor(e){this._fallback=new wn,this._compression=new xn(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(yn&&Sn.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){yn&&Sn.exception(e,"Failed to add events when switching buffers.")}}}function Tn(){try{return"sessionStorage"in A&&!!A.sessionStorage}catch{return!1}}function In(e){return void 0!==e&&Math.random()e.getContext().initialTimestamp+e.getOptions().maxReplayDuration&&(yn&&Sn.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),1))}function Un(e){return!e.type}function Hn(e){return"transaction"===e.type}function zn(e){return"feedback"===e.type}function Wn(e){return!!e.category}function jn(){const e=(0,p.nZ)().getPropagationContext().dsc;e&&delete e.replay_id;const t=(0,m.HN)();t&&delete(0,f.jC)(t).replay_id}function $n(e,t){return t.map((({type:t,start:n,end:r,name:o,data:s})=>{const i=e.throttledAddEvent({type:Je.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof i?Promise.resolve(null):i}))}function qn(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!yn||!e.getOptions()._experiments.traceInternals)&&(0,g.W)(t,(0,p.s3)())}(e,t.name)||e.addUpdate((()=>($n(e,[t]),!0))))}function Vn(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=(0,I.UL)(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Xn(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Gn(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Kn(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function Yn(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Zn(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>N,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,N);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Jn(e,t){return Object.entries(e).reduce(((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n}),{})}function Qn(e,t){const n=function(e,t=A.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(A.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(e);return(0,y.U0)(n,t)}function er(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function tr(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?er(n,t):Array.isArray(n)?{}:Jn(n,t):{}}function nr(e){const t=(0,p.s3)();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",((e,t)=>function(e,t,n){if(t.data)try{(function(e){return"xhr"===e.category})(t)&&function(e){return e?.xhr}(n)&&(function(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Vn(r),s=n.getResponseHeader("content-length")?Xn(n.getResponseHeader("content-length")):function(e,t){try{return Vn("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:h}=e.data;if(!c)return null;if(!a||!Qn(c,n.networkDetailAllowUrls)||Qn(c,n.networkDetailDenyUrls))return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:Yn(d),response:Yn(h)};const p=a[M.xU],m=p?Jn(p.request_headers,n.networkRequestHeaders):{},f=Jn(function(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{}):{}}(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?(0,I.SI)(i,Sn):[void 0],[_,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return yn&&Sn.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return yn&&Sn.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return yn&&Sn.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],b=Zn(m,d,g),S=Zn(f,h,_);return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:y?Gn(b,y):b,response:v?Gn(S,v):S}}(e,t,n),o=Kn("resource.xhr",r);qn(n.replay,o)}catch(e){yn&&Sn.exception(e,"Failed to capture xhr breadcrumb")}}(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e?.response}(n)&&(function(e,t){const{input:n,response:r}=t,o=Vn(n?(0,I.dn)(n):void 0),s=r?Xn(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=Qn(i,n.networkDetailAllowUrls)&&!Qn(i,n.networkDetailDenyUrls),h=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?(i=t,1===(s=n).length&&"string"!=typeof s[0]?tr(s[0],i):2===s.length?tr(s[1],i):{}):{};var s,i;if(!e)return Zn(o,r,void 0);const a=(0,I.dn)(n),[c,l]=(0,I.SI)(a,Sn),u=Zn(o,r,c);return l?Gn(u,l):u}(n,t.input,l):Yn(l),p=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return Yn(o);const s=r?er(r.headers,n):{};if(!r||!t&&void 0!==o)return Zn(s,o,void 0);const[i,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){yn&&Sn.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise(((t,n)=>{const r=(0,E.iK)((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(e){return await e.text()})(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(yn&&Sn.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(yn&&Sn.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(r),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&void 0===n?Vn(e):n;return r?Zn(o,s,t?e:void 0):Yn(s)}catch(e){return yn&&Sn.exception(e,"Failed to serialize response body"),Zn(o,n,void 0)}}(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?Gn(c,a):c}(d,n,t.response,u);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:h,response:p}}(e,t,n),o=Kn("resource.fetch",r);qn(n.replay,o)}catch(e){yn&&Sn.exception(e,"Failed to capture fetch breadcrumb")}}(t,n,e))}catch(e){yn&&Sn.exception(e,"Error when enriching network breadcrumb")}}(a,e,t)))}catch{}}function rr(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}const or=r.n.navigator;function sr(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(yn&&Sn.warn("Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&function(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(Zt.has(n)&&e.registerMutation(t.timestamp),n===Qe.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===Qe.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=zt.mirror.getNode(r);o instanceof HTMLElement&&n===et.Click&&e.registerClick(o)}}catch{}}(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Fn(e,n,o))return!0;if(!o)return!1;const t=e.session;if(function(e,t){t&&e.session&&0===e.session.segmentId&&Fn(e,function(e){const t=e.getOptions();return{type:Je.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(yn&&Sn.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&Mn(t))}return t?.previousSessionId||"session"===e.recordingMode&&e.flush(),!0}))}}class ir extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class ar extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function cr(e,t={count:0,interval:5e3}){const{recordingData:n,onError:r}=e;if(n.length)try{return await async function({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=(0,p.s3)(),h=(0,p.nZ)(),m=d?.getTransport(),f=d?.getDsn();if(!(d&&m&&f&&s.sampled))return(0,S.WD)({});const g={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:o/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},y=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const s=await(0,b.R)(e.getOptions(),r,o,t,e,(0,p.aF)());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c}=i?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},s}({scope:h,client:d,replayId:t,event:g});if(!y)return d.recordDroppedEvent("event_processor","replay"),yn&&Sn.log("An event processor returned `null`, will not send event."),(0,S.WD)({});delete y.sdkProcessingMetadata;const _=function(e,t,n,r){return(0,v.Jd)((0,v.Cd)(e,(0,v.HY)(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(y,i,f,d.getOptions().tunnel);let w;try{w=await m.send(_)}catch(e){const t=new Error(O);try{t.cause=e}catch{}throw t}if("number"==typeof w.statusCode&&(w.statusCode<200||w.statusCode>=300))throw new ir(w.statusCode);const C=(0,k.WG)({},w);if((0,k.Q)(C,"replay"))throw new ar(C);return w}(e),!0}catch(n){if(n instanceof ir||n instanceof ar)throw n;if((0,d.v)("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${O} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{(0,E.iK)((async()=>{try{await cr(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const lr="__THROTTLED";class ur{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){return(0,_.D)(e,t,{...n,setTimeoutImpl:E.iK})}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e,t,n){const r=new Map;let o=!1;return(...s)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{ne+t),0)>=t){const e=o;return o=!0,e?"__SKIPPED":lr}o=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...s)}}(((e,t)=>function(e,t,n){return Bn(e,t)?Pn(e,t,n):Promise.resolve(null)}(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new Jt(this,o)),yn){const t=e._experiments;Sn.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===A.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const e=tn({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{const e=tn({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:a}=e;if(!a||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(a)||!s)return null;const c=t||r||o,l=1===s.length;if(!c&&l)return null;const u=(0,i.Rt)(a,{maxStringLength:200})||"";return tn({category:"ui.keyDown",message:u,data:{...sn(a,u).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}(t);n&&Vt(e,n)}(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){yn&&Sn.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",yn&&Sn.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):yn&&Sn.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(yn&&Sn.log("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(yn&&Sn.log("Buffering is in progress, call `flush()` to save the replay"));yn&&Sn.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Nn({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(yn&&Sn.log("Buffering is in progress, call `flush()` to save the replay"));yn&&Sn.infoTick("Starting replay in buffer mode");const e=Nn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=zt({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:sr(this),.../iPhone|iPad|iPod/i.test(or?.userAgent??"")||/Macintosh/i.test(or?.userAgent??"")&&or?.maxTouchPoints&&or?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{yn&&Sn.log("Stopping Replay"+(t?` triggered by ${t}`:"")),jn(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,n=this,function(){if(Tn())try{A.sessionStorage.removeItem(D)}catch{}}(),n.session=void 0}catch(e){this.handleException(e)}}var n}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),yn&&Sn.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),yn&&Sn.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();yn&&Sn.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session?.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&An(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${A.location.pathname}${A.location.hash}${A.location.search}`,t=`${A.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===lr){const e=tn({category:"replay.throttled"});this.addUpdate((()=>!Fn(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||(0,m.HN)(),t=e&&(0,m.Gx)(e),n=(t&&(0,m.XU)(t).data||{})[w.Zj];if(t&&n&&["route","custom"].includes(n))return(0,m.XU)(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s>f]=l}else for(o=new n(i),s=0;s>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;sd&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<e))break;w+=m-(1<>=y;w>0;){var M=o[s].s;p[M]=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;oi.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}());if(!t)return;yn&&Sn.log("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new En(n)}catch(e){yn&&Sn.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return yn&&Sn.log("Using simple buffer"),new wn}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Nn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!On(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{A.document.addEventListener("visibilitychange",this._handleVisibilityChange),A.addEventListener("blur",this._handleWindowBlur),A.addEventListener("focus",this._handleWindowFocus),A.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e,{autoFlushOnFeedback:t}){const n=(0,p.s3)();(0,R.O)((e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?Gt(e.event):Kt(e.event),n=(0,i.Rt)(r,{maxStringLength:200})||""}catch(e){n=""}return{target:r,message:n}}(e);return tn({category:`ui.${e.name}`,...sn(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;var s,a,c;!(r&&e.clickDetector&&o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(s=e.clickDetector,a=n,c=Gt(t.event),s.handleClick(a,c)),Vt(e,n)})(e)),(0,L.a)(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>($n(e,[n]),!1))))}}(e)),function(e){const t=(0,p.s3)();t&&t.on("beforeAddBreadcrumb",(t=>function(e,t){if(!e.isEnabled()||!Wn(t))return;const n=function(e){return!Wn(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?function(e){const t=e.data?.arguments;if(!Array.isArray(t)||0===t.length)return tn(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>F?(n=!0,`${e.slice(0,F)}…`):e;if("object"==typeof e)try{const t=(0,o.Fv)(e,7);return JSON.stringify(t).length>F?(n=!0,`${JSON.stringify(t,null,2).slice(0,F)}…`):t}catch{}return e}));return tn({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):tn(e)}(t);n&&Vt(e,n)}(e,t)))}(e),nr(e);const r=function(e){return Object.assign(((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!Un(t)&&!Hn(t)&&!zn(t))return t;if(!e.checkAndHandleExpiredSession())return jn(),t;if(zn(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:Je.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}(e,t),t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length||!t.originalException?.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return yn&&Sn.log("Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==O&&!(!t.exception||t.type)&&In(e.getOptions().errorSampleRate)}(e,t);return(r||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t}),{id:"Replay"})}(e);(0,d.Qy)(r),n&&(n.on("beforeSendEvent",function(e){return t=>{e.isEnabled()&&Un(t)&&function(e,t){const n=t.exception?.values?.[0]?.value;"string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&Vt(e,tn({category:"replay.hydrate-error",data:{url:(0,i.l4)()}}))}(e,t)}}(e)),n.on("afterSendEvent",function(e){return(t,n)=>{if(!e.isEnabled()||!Un(t)&&!Hn(t))return;const r=n?.statusCode;!r||r<200||r>=300||(Hn(t)?function(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,t):function(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&(0,E.iK)((async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}}))}(e,t))}}(e)),n.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),n.on("spanStart",(t=>{e.lastActiveSpan=t})),n.on("spanEnd",(t=>{e.lastActiveSpan=t})),n.on("beforeSendFeedback",(async(n,r)=>{const o=e.getSessionId();r?.includeReplay&&e.isEnabled()&&o&&n.contexts?.feedback&&("api"===n.contexts.feedback.source&&t&&await e.flush(),n.contexts.feedback.replay_id=o)})),t&&n.on("openFeedbackWidget",(async()=>{await e.flush()})))}(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push((0,T._j)(e,n))})),r.push((0,T.$A)(cn(dn,e)),(0,T.PR)(cn(pn,e)),(0,T.to)(cn(mn,e)),(0,T.YF)(cn(fn,e))),()=>{r.forEach((e=>e()))}}(this)}_removeListeners(){try{A.document.removeEventListener("visibilitychange",this._handleVisibilityChange),A.removeEventListener("blur",this._handleWindowBlur),A.removeEventListener("focus",this._handleWindowFocus),A.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){this.session&&(Dn(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):yn&&Sn.log("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:Je.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(ln).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all($n(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&nthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await cr({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=(0,p.s3)();if(t){const n=e instanceof ar?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else yn&&Sn.error("No session or eventBuffer found to flush.")}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(yn&&Sn.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=nthis._options.maxReplayDuration+5e3;if(r||o)return yn&&Sn.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const s=this.eventBuffer;s&&0===this.session.segmentId&&!s.hasCheckout&&yn&&Sn.log("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Mn(this.session)}_onMutationHandler(e){const{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some((e=>{const n=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}(e.target),r=t.join(",");return n?.matches(r)})))return!1;const n=e.length,r=this._options.mutationLimit,o=r&&n>r;if(n>this._options.mutationBreadcrumbLimit||o){const e=tn({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(e)}return!o||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function dr(e,t){return[...e,...t].join(",")}const hr='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',pr=["content-length","content-type","accept"];let mr=!1;const fr=e=>new gr(e);class gr{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:s=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:h=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:_=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder","aria-label"],unmask:k=[],block:w=[],unblock:x=[],ignore:E=[],maskFn:T,beforeAddRecordingEvent:I,beforeErrorSampling:M,onError:R}={}){this.name="Replay";const L=function({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:dr(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:dr(t,[]),blockSelector:dr(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:dr(r,[]),ignoreSelector:dr(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:b,unmask:k,block:w,unblock:x,ignore:E});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s:s}({maskAttributes:S,maskAllText:c,privacyOptions:L,key:e,value:t,el:n}),...L,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,36e5),stickySession:o,useCompression:s,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:h,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:f,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:yr(_),networkResponseHeaders:yr(v),beforeAddRecordingEvent:I,beforeErrorSampling:M,onError:R,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${hr}`:hr),this._isInitialized&&(0,C.j)())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return mr}set _isInitialized(e){mr=e}afterAllSetup(e){(0,C.j)()&&!this._replay&&(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=function(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=(0,x.o)(n.replaysSessionSampleRate),s=(0,x.o)(n.replaysOnErrorSampleRate);return null==o&&null==s&&(0,l.Cf)((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),null!=o&&(r.sessionSampleRate=o),null!=s&&(r.errorSampleRate=s),r}(this._initialOptions,e);this._replay=new ur({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function yr(e){return[...pr,...e.map((e=>e.toLowerCase()))]}function _r(){return(0,p.s3)()?.getIntegrationByName("Replay")}}}]);