Build 589089stable
Module 363630
256,298 characters · in 24159.16f64d32f019fb82.jsDependencies
Required by (0)none
Lazily required by (0)none
Requires (73)
214533508656833691717229075109760058322092332128377157444195588196010215570231577272469286788291686296438297458326447366781370932397805405589411361416626435819453614469052501661504585550601555625567475582102588130607423608768630449657829688331689456690094693037697043719736743154754433756813774099778334779949791132804524823783826476833708834932835869838596847745871186875565883950922248933138968072972130973913978862984083991854
Lazily requires (0)none
Source Raw
function(e,t,n){let r,i,o,a,s,l,c,u,d,p,h,f,m,g,_,y,v,b;n.r(t),n.d(t,{feedbackAsyncIntegration:()=>sD,addTracingExtensions:()=>N,addIntegration:()=>x.Q8,launchDarklyIntegration:()=>lL,getFeedback:()=>al,setCurrentClient:()=>eQ.B,startBrowserTracingPageLoadSpan:()=>ll,statsigIntegration:()=>lH,addBreadcrumb:()=>E.Z,unleashIntegration:()=>l$,withActiveSpan:()=>e_,replayCanvasIntegration:()=>oq,startSession:()=>k.J0,winjsStackLineParser:()=>e8.$2,defaultRequestInstrumentationOptions:()=>s2,featureFlagsIntegration:()=>lA.S,lastEventId:()=>k.Q,Scope:()=>S.H,sendFeedback:()=>o9,close:()=>k.VN,geckoStackLineParser:()=>e8.dY,instrumentOutgoingRequests:()=>s3,startSpan:()=>eh,eventFromException:()=>e7.u,replayIntegration:()=>om,updateSpanName:()=>O.zQ,makeBrowserOfflineTransport:()=>lf,getGlobalScope:()=>L.m6,setTags:()=>k.Wt,opera11StackLineParser:()=>e8.Vv,setExtra:()=>k.l7,startBrowserTracingNavigationSpan:()=>lc,httpContextIntegration:()=>tr.M,getCurrentScope:()=>L.o5,spotlightBrowserIntegration:()=>lR,lazyLoadIntegration:()=>tl,setUser:()=>k.gV,captureException:()=>k.Cp,getSpanDescendants:()=>O.xO,getClient:()=>L.KU,moduleMetadataIntegration:()=>eW,WINDOW:()=>e5.jf,getRootSpan:()=>O.zU,init:()=>te.Ts,captureConsoleIntegration:()=>H,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:()=>w.JD,onLoad:()=>te.kF,BrowserClient:()=>e6.y,getActiveSpan:()=>O.Bk,addEventProcessor:()=>k.SA,rewriteFramesIntegration:()=>eV,getSpanStatusFromHttpCode:()=>eA,captureUserFeedback:()=>te.lo,setContext:()=>k.o,browserSessionIntegration:()=>lD.p,feedbackIntegration:()=>sA,browserApiErrorsIntegration:()=>to.G,defaultStackParser:()=>e8.lG,functionToStringIntegration:()=>eR.Z,browserTracingIntegration:()=>ls,makeMultiplexedTransport:()=>eU,metrics:()=>sq,makeFetchTransport:()=>e4._,forceLoad:()=>te.w7,setTag:()=>k.NA,SEMANTIC_ATTRIBUTE_SENTRY_OP:()=>w.uT,startInactiveSpan:()=>em,createTransport:()=>eT.o,globalHandlersIntegration:()=>tn.L,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:()=>w.sy,spanToTraceHeader:()=>O.Qh,suppressTracing:()=>ey,defaultStackLineParsers:()=>e8.c9,contextLinesIntegration:()=>tT,openFeatureIntegration:()=>lP,withIsolationScope:()=>L.rB,linkedErrorsIntegration:()=>ti.p,withScope:()=>L.v4,flush:()=>k.bX,setHttpStatus:()=>eN,breadcrumbsIntegration:()=>tt.F,dedupeIntegration:()=>eI.s,getIsolationScope:()=>L.rm,debugIntegration:()=>eC,thirdPartyErrorFilterIntegration:()=>e0,captureEvent:()=>k.r,httpClientIntegration:()=>ty,feedbackSyncIntegration:()=>sA,zodErrorsIntegration:()=>e3,chromeStackLineParser:()=>e8.Yj,captureSession:()=>k.J5,exceptionFromError:()=>e7.K8,setExtras:()=>k.cx,startSpanManual:()=>ef,startNewTrace:()=>ev,continueTrace:()=>eg,eventFromMessage:()=>e7.qv,setMeasurement:()=>ei,isInitialized:()=>k.Dp,createUserFeedbackEnvelope:()=>e9.L,showReportDialog:()=>te.mn,captureFeedback:()=>z,spanToJSON:()=>O.et,OpenFeatureIntegrationHook:()=>lj,browserProfilingIntegration:()=>lO,opera10StackLineParser:()=>e8.Q_,buildLaunchDarklyFlagUsedHandler:()=>lF,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:()=>w.i_,SDK_VERSION:()=>"8.55.0",getReplay:()=>oy,extraErrorDataIntegration:()=>eO,captureMessage:()=>k.wd,sessionTimingIntegration:()=>eY,getCurrentHub:()=>eD,registerSpanErrorInstrumentation:()=>D,spanToBaggageHeader:()=>Q.HW,reportingObserverIntegration:()=>tp,inboundFiltersIntegration:()=>eL.D,parameterize:()=>eK,endSession:()=>k.ky,getDefaultIntegrations:()=>te.nI});var w=n(92332),S=n(128377),E=n(984083),k=n(871186),x=n(688331),T=n(326447),C=n(469052),I=n(291686),M=n(272469),O=n(582102);let R=!1;function D(){R||(R=!0,(0,C.L)(A),(0,I.r)(A))}function A(){let e=(0,O.Bk)(),t=e&&(0,O.zU)(e);if(t){let e="internal_error";T.T&&M.vF.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}function N(){D()}A.tag="sentry_tracingErrorCallback";var L=n(630449),F=n(933138),P=n(231577),j=n(196010),$=n(826476),U=n(978862);let H=(0,x._C)((e={})=>{let t=e.levels||M.Ow,n=!!e.handled;return{name:"CaptureConsole",setup(e){"console"in U.O&&(0,F.P)(({args:r,level:i})=>{var o,a,s;let l;(0,L.KU)()===e&&t.includes(i)&&(o=r,a=i,s=n,l={level:(0,j.t)(a),extra:{arguments:o}},(0,L.v4)(e=>{if(e.addEventProcessor(e=>(e.logger="console",(0,P.M6)(e,{handled:s,type:"console"}),e)),"assert"===a){if(!o[0]){let t=`Assertion failed: ${(0,$.gt)(o.slice(1)," ")||"console.assert"}`;e.setExtra("arguments",o.slice(1)),(0,k.wd)(t,l)}return}let t=o.find(e=>e instanceof Error);if(t)return void(0,k.Cp)(t,l);let n=(0,$.gt)(o," ");(0,k.wd)(n,l)}))})}}});var B=n(690094);function z(e,t={},n=(0,L.o5)()){let{message:r,name:i,email:o,url:a,source:s,associatedEventId:l,tags:c}=e,u={contexts:{feedback:(0,B.Ce)({contact_email:o,name:i,message:r,url:a,source:s,associated_event_id:l})},type:"feedback",level:"info",tags:c},d=n&&n.getClient()||(0,L.KU)();return d&&d.emit("beforeSendFeedback",u,t),n.captureEvent(u,t)}var q=n(75109),W=n(657829),K=n(834932),G=n(697043),X=n(875565);function J(e,t,n=()=>{}){var r,i,o;let a;try{a=e()}catch(e){throw t(e),n(),e}return r=a,i=t,o=n,(0,X.Qg)(r)?r.then(e=>(o(),e),e=>{throw i(e),o(),e}):(o(),r)}var V=n(370932),Y=n(286788),Q=n(411361),Z=n(838596);class ee{constructor(e={}){this._traceId=e.traceId||(0,K.el)(),this._spanId=e.spanId||(0,K.ZF)()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:O.CC}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}var et=n(397805),en=n(991854),er=n(83220);function ei(e,t,n,r=(0,O.Bk)()){let i=r&&(0,O.zU)(r);i&&(T.T&&M.vF.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[w.xc]:t,[w.Sn]:n}))}function eo(e){if(!e||0===e.length)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[w.Sn],i=n[w.xc];"string"==typeof r&&"number"==typeof i&&(t[e.name]={value:i,unit:r})}),t}let ea="_sentryScope",es="_sentryIsolationScope";function el(e){return{scope:e[ea],isolationScope:e[es]}}class ec{constructor(e={}){this._traceId=e.traceId||(0,K.el)(),this._spanId=e.spanId||(0,K.ZF)(),this._startTime=e.startTimestamp||(0,er.zf)(),this._attributes={},this.setAttributes({[w.JD]:"manual",[w.uT]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?O.aO:O.CC}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=(0,O.cI)(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(w.i_,"custom"),this}end(e){this._endTime||(this._endTime=(0,O.cI)(e),function(e){if(!T.T)return;let{description:t="< unknown name >",op:n="< unknown op >"}=(0,O.et)(e),{spanId:r}=e.spanContext(),i=(0,O.zU)(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;M.vF.log(o)}(this),this._onSpanEnded())}getSpanJSON(){return(0,B.Ce)({data:this._attributes,description:this._name,op:this._attributes[w.uT],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:(0,O.yW)(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[w.JD],_metrics_summary:(0,en.g)(this),profile_id:this._attributes[w.E1],exclusive_time:this._attributes[w.jG],measurements:eo(this._events),is_segment:this._isStandaloneSpan&&(0,O.zU)(this)===this||void 0,segment_id:this._isStandaloneSpan?(0,O.zU)(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){T.T&&M.vF.log("[Tracing] Adding an event to span:",e);let r=eu(t)?t:n||(0,er.zf)(),i=eu(t)?{}:t||{},o={name:e,time:(0,O.cI)(r),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=(0,L.KU)();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===(0,O.zU)(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){let t=(0,L.KU)();if(!t)return;let n=e[1];n&&0!==n.length?t.sendEnvelope(e):t.recordDroppedEvent("before_send","span")}((0,et.lu)([this],e)):(T.T&&M.vF.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));let t=this._convertSpanToTransaction();t&&(el(this).scope||(0,L.o5)()).captureEvent(t)}_convertSpanToTransaction(){if(!ed((0,O.et)(this)))return;this._name||(T.T&&M.vF.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:e,isolationScope:t}=el(this),n=(e||(0,L.o5)()).getClient()||(0,L.KU)();if(!0!==this._sampled){T.T&&M.vF.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}let r=(0,O.xO)(this).filter(e=>{var t;return e!==this&&!((t=e)instanceof ec&&t.isStandaloneSpan())}).map(e=>(0,O.et)(e)).filter(ed),i=this._attributes[w.i_];delete this._attributes[w.Le],r.forEach(e=>{e.data&&delete e.data[w.Le]});let o={contexts:{trace:(0,O.Ck)(this)},spans:r.length>1e3?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,...(0,B.Ce)({dynamicSamplingContext:(0,Q.k1)(this)})},_metrics_summary:(0,en.g)(this),...i&&{transaction_info:{source:i}}},a=eo(this._events);return a&&Object.keys(a).length&&(T.T&&M.vF.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),o.measurements=a),o}}function eu(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function ed(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}let ep="__SENTRY_SUPPRESS_TRACING__";function eh(e,t){let n=eS();if(n.startSpan)return n.startSpan(e,t);let r=ew(e),{forceTransaction:i,parentSpan:o}=e;return(0,L.v4)(e.scope,()=>ex(o)(()=>{let n=(0,L.o5)(),o=ek(n),a=e.onlyIfParent&&!o?new ee:eb({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return(0,Y.r)(n,a),J(()=>t(a),()=>{let{status:e}=(0,O.et)(a);a.isRecording()&&(!e||"ok"===e)&&a.setStatus({code:2,message:"internal_error"})},()=>a.end())}))}function ef(e,t){let n=eS();if(n.startSpanManual)return n.startSpanManual(e,t);let r=ew(e),{forceTransaction:i,parentSpan:o}=e;return(0,L.v4)(e.scope,()=>ex(o)(()=>{let n=(0,L.o5)(),o=ek(n),a=e.onlyIfParent&&!o?new ee:eb({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});function s(){a.end()}return(0,Y.r)(n,a),J(()=>t(a,s),()=>{let{status:e}=(0,O.et)(a);a.isRecording()&&(!e||"ok"===e)&&a.setStatus({code:2,message:"internal_error"})})}))}function em(e){let t=eS();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=ew(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>(0,L.v4)(e.scope,t):void 0!==i?e=>e_(i,e):e=>e())(()=>{let t=(0,L.o5)(),i=ek(t);return e.onlyIfParent&&!i?new ee:eb({parentSpan:i,spanArguments:n,forceTransaction:r,scope:t})})}let eg=(e,t)=>{let n=(0,q.E)(),r=(0,W.h)(n);if(r.continueTrace)return r.continueTrace(e,t);let{sentryTrace:i,baggage:o}=e;return(0,L.v4)(e=>{let n=(0,G.kM)(i,o);return e.setPropagationContext(n),t()})};function e_(e,t){let n=eS();return n.withActiveSpan?n.withActiveSpan(e,t):(0,L.v4)(n=>((0,Y.r)(n,e||void 0),t(n)))}function ey(e){let t=eS();return t.suppressTracing?t.suppressTracing(e):(0,L.v4)(t=>(t.setSDKProcessingMetadata({[ep]:!0}),e()))}function ev(e){return(0,L.v4)(t=>(t.setPropagationContext({traceId:(0,K.el)()}),T.T&&M.vF.info(`Starting a new trace with id ${t.getPropagationContext().traceId}`),e_(null,e)))}function eb({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){var i;let o;if(!(0,V.w)())return new ee;let a=(0,L.rm)();if(e&&!n)o=function(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),o=!t.getScopeData().sdkProcessingMetadata[ep]&&(0,O.pK)(e),a=o?new ec({...n,parentSpanId:r,traceId:i,sampled:o}):new ee({traceId:i});(0,O.Hu)(e,a);let s=(0,L.KU)();return s&&(s.emit("spanStart",a),n.endTimestamp&&s.emit("spanEnd",a)),a}(e,r,t),(0,O.Hu)(e,o);else if(e){let n=(0,Q.k1)(e),{traceId:i,spanId:a}=e.spanContext(),s=(0,O.pK)(e);o=eE({traceId:i,parentSpanId:a,...t},r,s),(0,Q.LZ)(o,n)}else{let{traceId:e,dsc:n,parentSpanId:i,sampled:s}={...a.getPropagationContext(),...r.getPropagationContext()};o=eE({traceId:e,parentSpanId:i,...t},r,s),n&&(0,Q.LZ)(o,n)}return!function(e){if(!T.T)return;let{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=(0,O.et)(e),{spanId:i}=e.spanContext(),o=(0,O.pK)(e),a=(0,O.zU)(e),s=a===e,l=`[Tracing] Starting ${o?"sampled":"unsampled"} ${s?"root ":""}span`,c=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&c.push(`parent ID: ${r}`),!s){let{op:e,description:t}=(0,O.et)(a);c.push(`root ID: ${a.spanContext().spanId}`),e&&c.push(`root op: ${e}`),t&&c.push(`root description: ${t}`)}M.vF.log(`${l}
${c.join("\n ")}`)}(o),(i=o)&&((0,B.my)(i,es,a),(0,B.my)(i,ea,r)),o}function ew(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=(0,O.cI)(e.startTime),delete n.startTime,n}return t}function eS(){let e=(0,q.E)();return(0,W.h)(e)}function eE(e,t,n){let r=(0,L.KU)(),i=r&&r.getOptions()||{},{name:o="",attributes:a}=e,[s,l]=t.getScopeData().sdkProcessingMetadata[ep]?[!1]:function(e,t){let n;if(!(0,V.w)(e))return[!1];let r=(0,L.rm)().getScopeData().sdkProcessingMetadata.normalizedRequest,i={...t,normalizedRequest:t.normalizedRequest||r};n="function"==typeof e.tracesSampler?e.tracesSampler(i):void 0!==i.parentSampled?i.parentSampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1;let o=(0,Z.i)(n);return void 0===o?(T.T&&M.vF.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):o?Math.random()<o?[!0,o]:(T.T&&M.vF.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,o]):(T.T&&M.vF.log(`[Tracing] Discarding transaction because ${"function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o])}(i,{name:o,parentSampled:n,attributes:a,transactionContext:{name:o,parentSampled:n}}),c=new ec({...e,attributes:{[w.i_]:"custom",...e.attributes},sampled:s});return void 0!==l&&c.setAttribute(w.sy,l),r&&r.emit("spanStart",c),c}function ek(e){let t=(0,Y.f)(e);if(!t)return;let n=(0,L.KU)();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?(0,O.zU)(t):t}function ex(e){return void 0!==e?t=>e_(e,t):e=>e()}var eT=n(504585);let eC=(0,x._C)((e={})=>{let t={debugger:!1,stringify:!1,...e};return{name:"Debug",setup(e){e.on("beforeSendEvent",(e,n)=>{t.debugger,(0,M.pq)(()=>{t.stringify?(console.log(JSON.stringify(e,null,2)),n&&Object.keys(n).length&&console.log(JSON.stringify(n,null,2))):(console.log(e),n&&Object.keys(n).length&&console.log(n))})})}}});var eI=n(453614),eM=n(778334);let eO=(0,x._C)((e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:"ExtraErrorData",processEvent(e,r,i){let{maxValueLength:o=250}=i.getOptions();return function(e,t={},n,r,i){if(!t.originalException||!(0,X.bJ)(t.originalException))return e;let o=t.originalException.name||t.originalException.constructor.name,a=function(e,t,n){try{let r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],i={};for(let t of Object.keys(e)){if(-1!==r.indexOf(t))continue;let o=e[t];i[t]=(0,X.bJ)(o)||"string"==typeof o?(0,$.xv)(`${o}`,n):o}if(t&&void 0!==e.cause&&(i.cause=(0,X.bJ)(e.cause)?e.cause.toString():e.cause),"function"==typeof e.toJSON){let t=e.toJSON();for(let e of Object.keys(t)){let n=t[e];i[e]=(0,X.bJ)(n)?n.toString():n}}return i}catch(e){T.T&&M.vF.error("Unable to extract extra data from the Error object:",e)}return null}(t.originalException,r,i);if(a){let t={...e.contexts},r=(0,eM.S8)(a,n);return(0,X.Qd)(r)&&((0,B.my)(r,"__sentry_skip_normalization__",!0),t[o]=r),{...e,contexts:t}}return e}(e,r,t,n,o)}}});var eR=n(76005);let eD=function(){return{bindClient(e){(0,L.o5)().setClient(e)},withScope:L.v4,getClient:()=>(0,L.KU)(),getScope:L.o5,getIsolationScope:L.rm,captureException:(e,t)=>(0,L.o5)().captureException(e,t),captureMessage:(e,t,n)=>(0,L.o5)().captureMessage(e,t,n),captureEvent:k.r,addBreadcrumb:E.Z,setUser:k.gV,setTags:k.Wt,setTag:k.NA,setExtra:k.l7,setExtras:k.cx,setContext:k.o,getIntegration(e){let t=(0,L.KU)();return t&&t.getIntegrationByName(e.id)||null},startSession:k.J0,endSession:k.ky,captureSession(e){let t,n,r;if(e)return(0,k.ky)();t=(0,L.o5)(),n=(0,L.KU)(),r=t.getSession(),n&&r&&n.captureSession(r)}}};function eA(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}function eN(e,t){e.setAttribute("http.response.status_code",t);let n=eA(t);"unknown_error"!==n.message&&e.setStatus(n)}var eL=n(550601),eF=n(555625),eP=n(608768),ej=n(847745);function e$(e,t){let n;return(0,ej.yH)(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function eU(e,t){return n=>{let r=e(n),i=new Map;function o(t,r){let o=r?`${t}:${r}`:t,a=i.get(o);if(!a){let s=(0,eP.hH)(t);if(!s)return;let l=(0,eF.Z)(s,n.tunnel);a=r?(t=>{let n=e(t);return{...n,send:async e=>{let t=e$(e,["event","transaction","profile","replay_event"]);return t&&(t.release=r),n.send(e)}}})({...n,url:l}):e({...n,url:l}),i.set(o,a)}return[t,a]}return{send:async function(e){let n=t({envelope:e,getEvent:function(t){return e$(e,t&&t.length?t:["event"])}}).map(e=>"string"==typeof e?o(e,void 0):o(e.dsn,e.release)).filter(e=>!!e),i=n.length?n:[["",r]];return(await Promise.all(i.map(([t,n])=>n.send((0,ej.h4)(t?{...e[0],dsn:t}:e[0],e[1])))))[0]},flush:async function(e){let t=[...i.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}}}}let eH=new Map,eB=new Set;function ez(e,t){try{t.exception.values.forEach(t=>{if(t.stacktrace)for(let n of t.stacktrace.frames||[]){if(!n.filename||n.module_metadata)continue;let t=function(e,t){if(U.O._sentryModuleMetadata)for(let t of Object.keys(U.O._sentryModuleMetadata)){let n=U.O._sentryModuleMetadata[t];if(!eB.has(t)){for(let r of(eB.add(t),e(t).reverse()))if(r.filename){eH.set(r.filename,n);break}}}return eH.get(t)}(e,n.filename);t&&(n.module_metadata=t)}})}catch(e){}}function eq(e){try{e.exception.values.forEach(e=>{if(e.stacktrace)for(let t of e.stacktrace.frames||[])delete t.module_metadata})}catch(e){}}let eW=(0,x._C)(()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",e=>{(0,ej.yH)(e,(e,t)=>{if("event"===t){let t=Array.isArray(e)?e[1]:void 0;t&&(eq(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{t.type||ez(e.getOptions().stackParser,t)})}}));function eK(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}let eG=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function eX(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n="/"===i.charAt(0))}return t=(function(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift("..");return e})(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."}function eJ(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}let eV=(0,x._C)((e={})=>{let t=e.root,n=e.prefix||"app:///",r="window"in U.O&&void 0!==U.O.window,i=e.iteratee||function({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){let e=r.filename;0===e.indexOf(t)&&(r.filename=e.replace(t,n))}}else if(i||o){let e,o,a=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,s=t?function(e,t){e=eX(e).slice(1),t=eX(t).slice(1);let n=eJ(e.split("/")),r=eJ(t.split("/")),i=Math.min(n.length,r.length),o=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){o=e;break}let a=[];for(let e=o;e<n.length;e++)a.push("..");return(a=a.concat(r.slice(o))).join("/")}(t,a):(e=a.length>1024?`<truncated>${a.slice(-1024)}`:a,(o=eG.exec(e))?o.slice(1):[])[2]||"";r.filename=`${n}${s}`}return r}}({isBrowser:r,root:t,prefix:n});return{name:"RewriteFrames",processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=function(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>{var t;return{...e,...e.stacktrace&&{stacktrace:{...t=e.stacktrace,frames:t&&t.frames&&t.frames.map(e=>i(e))}}}})}}}catch(t){return e}}(t)),t}}}),eY=(0,x._C)(()=>{let e=1e3*(0,er.zf)();return{name:"SessionTiming",processEvent(t){let n=1e3*(0,er.zf)();return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}});var eQ=n(779949),eZ=n(968072);let e0=(0,x._C)(e=>({name:"ThirdPartyErrorsFilter",setup(e){e.on("beforeEnvelope",e=>{(0,ej.yH)(e,(e,t)=>{if("event"===t){let t=Array.isArray(e)?e[1]:void 0;t&&(eq(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{t.type||ez(e.getOptions().stackParser,t)})},processEvent(t){let n=function(e){let t=(0,eZ.RV)(e);if(t)return t.filter(e=>!!e.filename).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(e1)).map(e=>e.slice(e1.length)):[])}(t);if(n&&n["drop-error-if-contains-third-party-frames"===e.behaviour||"apply-tag-if-contains-third-party-frames"===e.behaviour?"some":"every"](t=>!t.some(t=>e.filterKeys.includes(t)))){if("drop-error-if-contains-third-party-frames"===e.behaviour||"drop-error-if-exclusively-contains-third-party-frames"===e.behaviour)return null;t.tags={...t.tags,third_party_code:!0}}return t}})),e1="_sentryBundlerPluginAppKey:";function e2(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}let e3=(0,x._C)((e={})=>{let t=void 0===e.limit?10:e.limit;return{name:"ZodErrors",processEvent:(n,r)=>(function(e,t=!1,n,r){var i;if(!n.exception||!n.exception.values||!r||!r.originalException||(i=r.originalException,!((0,X.bJ)(i)&&"ZodError"===i.name&&Array.isArray(i.issues)))||0===r.originalException.issues.length)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(e2);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:function(e){let t=new Set;for(let n of e.issues){let e=n.path.map(e=>"number"==typeof e?"<array>":e).join(".");e.length>0&&t.add(e)}let n=Array.from(t);if(0===n.length){let t="variable";if(e.issues.length>0){let n=e.issues[0];void 0!==n&&"expected"in n&&"string"==typeof n.expected&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${(0,$.xv)(n.join(", "),100)}`}(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:e instanceof Error?`${e.name}: ${e.message}
${e.stack}`:"unknown"}}}}})(t,e.saveZodIssuesAsAttachment,n,r)}});var e5=n(804524),e6=n(567475),e4=n(195588),e8=n(719736),e7=n(297458),e9=n(405589),te=n(501661),tt=n(56833),tn=n(774099),tr=n(416626),ti=n(833708),to=n(972130);let ta={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},ts=e5.jf;async function tl(e,t){var n;let r,i,o=ta[e],a=ts.Sentry=ts.Sentry||{};if(!o)throw Error(`Cannot lazy load integration: ${e}`);let s=a[e];if("function"==typeof s&&!("_isShim"in s))return s;let l=(n=o,new URL(`/8.55.0/${n}.min.js`,(i=(r=(0,L.KU)())&&r.getOptions())&&i.cdnBaseUrl||"https://browser.sentry-cdn.com").toString()),c=e5.jf.document.createElement("script");c.src=l,c.crossOrigin="anonymous",c.referrerPolicy="origin",t&&c.setAttribute("nonce",t);let u=new Promise((e,t)=>{c.addEventListener("load",()=>e()),c.addEventListener("error",t)}),d=e5.jf.document.currentScript,p=e5.jf.document.body||e5.jf.document.head||d&&d.parentElement;if(p)p.appendChild(c);else throw Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await u}catch(t){throw Error(`Error when loading integration: ${e}`)}let h=a[e];if("function"!=typeof h)throw Error(`Could not load integration: ${e}`);return h}var tc=n(366781);let tu=U.O,td=new WeakMap,tp=(0,x._C)((e={})=>{let t=e.types||["crash","deprecation","intervention"];function n(e){if(td.has((0,L.KU)()))for(let t of e)(0,L.v4)(e=>{e.setExtra("url",t.url);let n=`ReportingObserver [${t.type}]`,r="No details available";if(t.body){let n={};for(let e in t.body)n[e]=t.body[e];if(e.setExtra("body",n),"crash"===t.type){let e=t.body;r=[e.crashId||"",e.reason||""].join(" ").trim()||r}else r=t.body.message||r}(0,k.wd)(`${n}: ${r}`)})}return{name:"ReportingObserver",setupOnce(){(0,tc.vQ)()&&new tu.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){td.set(e,!0)}}});var th=n(69171),tf=n(823783);function tm(e,t){var n,r,i,o;let a=t&&t.getDsn(),s=t&&t.getOptions().tunnel;return n=e,!!(r=a)&&n.includes(r.host)||(i=e,!!(o=s)&&tg(i)===tg(o))}function tg(e){return"/"===e[e.length-1]?e.slice(0,-1):e}var t_=n(607423);let ty=(0,x._C)((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:"HttpClient",setup(e){var n,r,i,o;n=e,r=t,(0,tc.m7)()&&(0,tf.ur)(e=>{if((0,L.KU)()!==n)return;let{response:t,args:i,error:o,virtualError:a}=e,[s,l]=i;t&&function(e,t,n,r,i){if(tw(e,n.status,n.url)){var o,a;let e,s,l,c,u=(o=t,!(a=r)&&o instanceof Request||o instanceof Request&&o.bodyUsed?o:new Request(o,a));tE()&&([e,l]=tv("Cookie",u),[s,c]=tv("Set-Cookie",n));let d=tS({url:u.url,method:u.method,status:n.status,requestHeaders:e,responseHeaders:s,requestCookies:l,responseCookies:c,error:i});(0,k.r)(d)}}(r,s,t,l,o||a)},!1),i=e,o=t,"XMLHttpRequest"in U.O&&(0,th.Mn)(e=>{if((0,L.KU)()!==i)return;let{error:t,virtualError:n}=e,r=e.xhr,a=r[th.Er];if(!a)return;let{method:s,request_headers:l}=a;try{!function(e,t,n,r,i){if(tw(e,t.status,t.responseURL)){let e,o,a;if(tE()){try{let e=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;e&&(o=tb(e))}catch(e){}try{let e;a=(e=t.getAllResponseHeaders())?e.split("\r\n").reduce((e,t)=>{let[n,r]=t.split(": ");return n&&r&&(e[n]=r),e},{}):{}}catch(e){}e=r}let s=tS({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:a,responseCookies:o,error:i});(0,k.r)(s)}}(o,r,s,l,t||n)}catch(e){t_.T&&M.vF.warn("Error while extracting response event form XHR response",e)}})}}});function tv(e,t){var n;let r,i,o=(n=t.headers,r={},n.forEach((e,t)=>{r[t]=e}),r);try{let t=o[e]||o[e.toLowerCase()]||void 0;t&&(i=tb(t))}catch(e){}return[o,i]}function tb(e){return e.split("; ").reduce((e,t)=>{let[n,r]=t.split("=");return n&&r&&(e[n]=r),e},{})}function tw(e,t,n){var r,i;return r=e.failedRequestStatusCodes,r.some(e=>"number"==typeof e?e===t:t>=e[0]&&t<=e[1])&&(i=e.failedRequestTargets,i.some(e=>"string"==typeof e?n.includes(e):e.test(n)))&&!tm(n,(0,L.KU)())}function tS(e){let t=(0,L.KU)(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,o={message:i,exception:{values:[{type:"Error",value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:function(e){if(e){let t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}(e.responseHeaders)}}};return(0,P.M6)(o,{type:"http.client",handled:!1}),o}function tE(){let e=(0,L.KU)();return!!e&&!!e.getOptions().sendDefaultPii}var tk=n(791132);let tx=U.O,tT=(0,x._C)((e={})=>{let t=null!=e.frameContextLines?e.frameContextLines:7;return{name:"ContextLines",processEvent:e=>(function(e,t){let n=tx.document,r=tx.location&&(0,tk.f)(tx.location.href);if(!n||!r)return e;let i=e.exception&&e.exception.values;if(!i||!i.length)return e;let o=n.documentElement.innerHTML;if(!o)return e;let a=["<!DOCTYPE html>","<html>",...o.split("\n"),"</html>"];return i.forEach(e=>{let n=e.stacktrace;n&&n.frames&&(n.frames=n.frames.map(e=>{var n,i,o,s;return n=e,i=a,o=r,s=t,n.filename===o&&n.lineno&&i.length&&(0,P.db)(i,n,s),n}))}),e})(e,t)}});function tC(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):("call"===i||"optionalCall"===i)&&(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}var tI=n(693037),tM=n(689456),tO=n(835869),tR=n(157444),tD=n(588130),tA=n(72290);function tN(){let e;return"u">typeof window&&(!(!(0,tD.Z)()&&"[object process]"===Object.prototype.toString.call(void 0!==tA?tA:0))||!!(e=U.O.process)&&"renderer"===e.type)}var tL=n(743154),tF=n(21453);let tP=(e,t,n,r)=>{let i,o;return a=>{if(t.value>=0&&(a||r)&&((o=t.value-(i||0))||void 0===i)){var s;i=t.value,t.delta=o,s=t.value,t.rating=s>n[1]?"poor":s>n[0]?"needs-improvement":"good",e(t)}}};var tj=n(296438);let t$=(e=!0)=>{let t=tj.j.performance&&tj.j.performance.getEntriesByType&&tj.j.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},tU=()=>{let e=t$();return e&&e.activationStart||0},tH=(e,t)=>{let n=t$(),r="navigate";return n&&(tj.j.document&&tj.j.document.prerendering||tU()>0?r="prerender":tj.j.document&&tj.j.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,navigationType:r}},tB=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},tz=e=>{let t=t=>{("pagehide"===t.type||tj.j.document&&"hidden"===tj.j.document.visibilityState)&&e(t)};tj.j.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},tq=e=>{let t=!1;return()=>{t||(e(),t=!0)}},tW=-1,tK=e=>{"hidden"===tj.j.document.visibilityState&&tW>-1&&(tW="visibilitychange"===e.type?e.timeStamp:0,tG())},tG=()=>{removeEventListener("visibilitychange",tK,!0),removeEventListener("prerenderingchange",tK,!0)},tX=()=>(tj.j.document&&tW<0&&(tW="hidden"!==tj.j.document.visibilityState||tj.j.document.prerendering?1/0:0,addEventListener("visibilitychange",tK,!0),addEventListener("prerenderingchange",tK,!0)),{get firstHiddenTime(){return tW}}),tJ=e=>{tj.j.document&&tj.j.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},tV=[1800,3e3],tY=[.1,.25],tQ=[100,300],tZ=0,t0=1/0,t1=0,t2=e=>{e.forEach(e=>{e.interactionId&&(t0=Math.min(t0,e.interactionId),tZ=(t1=Math.max(t1,e.interactionId))?(t1-t0)/7+1:0)})},t3=[],t5=new Map,t6=[],t4=e=>{if(t6.forEach(t=>t(e)),!(e.interactionId||"first-input"===e.entryType))return;let t=t3[t3.length-1],n=t5.get(e.interactionId);if(n||t3.length<10||t&&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]&&n.entries[0].startTime)&&n.entries.push(e);else{let t={id:e.interactionId,latency:e.duration,entries:[e]};t5.set(t.id,t),t3.push(t)}t3.sort((e,t)=>t.latency-e.latency),t3.length>10&&t3.splice(10).forEach(e=>t5.delete(e.id))}},t8=e=>{let t=tj.j.requestIdleCallback||tj.j.setTimeout,n=-1;return e=tq(e),tj.j.document&&"hidden"===tj.j.document.visibilityState?e():(n=t(e),tz(e)),n},t7=[200,500],t9=[2500,4e3],ne={},nt=[800,1800],nn=e=>{tj.j.document&&tj.j.document.prerendering?tJ(()=>nn(e)):tj.j.document&&"complete"!==tj.j.document.readyState?addEventListener("load",()=>nn(e),!0):setTimeout(e,0)},nr={},ni={};function no(e,t=!1){return ng("cls",e,nd,i,t)}function na(e,t=!1){return ng("lcp",e,nh,a,t)}function ns(e){return ng("fid",e,np,o)}function nl(e){return ng("inp",e,nm,l)}function nc(e,t){var n;let r;return n_(e,t),ni[e]||(r={},"event"===(n=e)&&(r.durationThreshold=0),tB(n,e=>{nu(n,{entries:e})},r),ni[e]=!0),ny(e,t)}function nu(e,t){let n=nr[e];if(n&&n.length)for(let r of n)try{r(t)}catch(t){tF.T&&M.vF.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${(0,eZ.qQ)(r)}
Error:`,t)}}function nd(){return((e,t={})=>{((e,t={})=>{tJ(()=>{let n,r=tX(),i=tH("FCP"),o=tB("paint",e=>{e.forEach(e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-tU(),0),i.entries.push(e),n(!0)))})});o&&(n=tP(e,i,tV,t.reportAllChanges))})})(tq(()=>{let n,r=tH("CLS",0),i=0,o=[],a=e=>{e.forEach(e=>{if(!e.hadRecentInput){let t=o[0],n=o[o.length-1];i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}}),i>r.value&&(r.value=i,r.entries=o,n())},s=tB("layout-shift",a);s&&(n=tP(e,r,tY,t.reportAllChanges),tz(()=>{a(s.takeRecords()),n(!0)}),setTimeout(n,0))}))})(e=>{nu("cls",{metric:e}),i=e},{reportAllChanges:!0})}function np(){return((e,t={})=>{tJ(()=>{let n,r=tX(),i=tH("FID"),o=e=>{e.startTime<r.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),n(!0))},a=e=>{e.forEach(o)},s=tB("first-input",a);n=tP(e,i,tQ,t.reportAllChanges),s&&tz(tq(()=>{a(s.takeRecords()),s.disconnect()}))})})(e=>{nu("fid",{metric:e}),o=e})}function nh(){return((e,t={})=>{tJ(()=>{let n,r=tX(),i=tH("LCP"),o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach(e=>{e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-tU(),0),i.entries=[e],n())})},a=tB("largest-contentful-paint",o);if(a){n=tP(e,i,t9,t.reportAllChanges);let r=tq(()=>{ne[i.id]||(o(a.takeRecords()),a.disconnect(),ne[i.id]=!0,n(!0))});["keydown","click"].forEach(e=>{tj.j.document&&addEventListener(e,()=>t8(r),{once:!0,capture:!0})}),tz(r)}})})(e=>{nu("lcp",{metric:e}),a=e},{reportAllChanges:!0})}function nf(){return((e,t={})=>{let n=tH("TTFB"),r=tP(e,n,nt,t.reportAllChanges);nn(()=>{let e=t$();e&&(n.value=Math.max(e.responseStart-tU(),0),n.entries=[e],r(!0))})})(e=>{nu("ttfb",{metric:e}),s=e})}function nm(){return((e,t={})=>{"PerformanceEventTiming"in tj.j&&"interactionId"in PerformanceEventTiming.prototype&&tJ(()=>{let n;"interactionCount"in performance||r||(r=tB("event",t2,{type:"event",buffered:!0,durationThreshold:0}));let i=tH("INP"),o=e=>{t8(()=>{let t;e.forEach(t4);let o=(t=Math.min(t3.length-1,Math.floor(((r?tZ:performance.interactionCount||0)-0)/50)),t3[t]);o&&o.latency!==i.value&&(i.value=o.latency,i.entries=o.entries,n())})},a=tB("event",o,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});n=tP(e,i,t7,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),tz(()=>{o(a.takeRecords()),n(!0)}))})})(e=>{nu("inp",{metric:e}),l=e})}function ng(e,t,n,r,i=!1){let o;return n_(e,t),ni[e]||(o=n(),ni[e]=!0),r&&t({metric:r}),ny(e,t,i?o:void 0)}function n_(e,t){nr[e]=nr[e]||[],nr[e].push(t)}function ny(e,t,n){return()=>{n&&n();let r=nr[e];if(!r)return;let i=r.indexOf(t);-1!==i&&r.splice(i,1)}}var nv=n(756813),nb=n(35086);let nw=U.O,nS="sentryReplaySession",nE="Unable to send Replay";function nk(e,t){return null!=e?e:t()}function nx(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):("call"===i||"optionalCall"===i)&&(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}function nT(e){let t=nx([e,"optionalAccess",e=>e.host]);return nx([t,"optionalAccess",e=>e.shadowRoot])===e}function nC(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function nI(e){try{var t;let n=e.rules||e.cssRules;return n?((t=Array.from(n,nM).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}}function nM(e){let t;if("styleSheet"in e)try{t=nI(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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("selectorText"in e){let t=e.cssText,n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),n&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),n||r)return t}return t||e.cssText}(ac=av||(av={}))[ac.Document=0]="Document",ac[ac.DocumentType=1]="DocumentType",ac[ac.Element=2]="Element",ac[ac.Text=3]="Text",ac[ac.CDATA=4]="CDATA",ac[ac.Comment=5]="Comment";class nO{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){return e?nk(nx([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),()=>-1):-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){let 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){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let 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 nR({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function nD({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function nA(e){return e.toLowerCase()}function nN(e){return e.toUpperCase()}let nL="__rrweb_original__";function nF(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?nA(t):null}function nP(e,t,n){return"INPUT"===t&&("radio"===n||"checkbox"===n)?e.getAttribute("value")||"":e.value}function nj(e,t){let n;try{n=new URL(e,nk(t,()=>window.location.href))}catch(e){return null}return nk(nx([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),()=>null)}let n$={};function nU(e){let t=n$[e];if(t)return t;let n=window.document,r=window[e];if(n&&"function"==typeof n.createElement)try{let t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch(e){}return n$[e]=r.bind(window)}function nH(...e){return nU("setTimeout")(...e)}function nB(...e){return nU("clearTimeout")(...e)}function nz(e){try{return e.contentDocument}catch(e){}}let nq=1,nW=RegExp("[^a-z0-9-_:]");function nK(){return nq++}let nG=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,nX=/^(?:[a-z+]+:)?\/\//i,nJ=/^www\..*/i,nV=/^(data:)([^,]*),(.*)/i;function nY(e,t){return(e||"").replace(nG,(e,n,r,i,o,a)=>{let s=r||o||a,l=n||i||"";if(!s)return e;if(nX.test(s)||nJ.test(s)||nV.test(s))return`url(${l}${s}${l})`;if("/"===s[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+s}${l})`;let c=t.split("/"),u=s.split("/");for(let e of(c.pop(),u))if("."===e)continue;else".."===e?c.pop():c.push(e);return`url(${l}${c.join("/")}${l})`})}let nQ=/^[^ \t\n\r\u000c]+/,nZ=/^[, \t\n\r\u000c]+/,n0=new WeakMap;function n1(e,t){return t&&""!==t.trim()?n2(e,t):t}function n2(e,t){let n=n0.get(e);if(n||(n=e.createElement("a"),n0.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function n3(e,t,n,r,i,o){if(!r)return r;if("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0])return n1(e,r);if("background"===n&&("table"===t||"td"===t||"th"===t))return n1(e,r);if("srcset"===n)return function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}let i=[];for(;r(nZ),!(n>=t.length);){let o=r(nQ);if(","===o.slice(-1))o=n1(e,o.substring(0,o.length-1)),i.push(o);else{let r="";o=n1(e,o);let a=!1;for(;;){let e=t.charAt(n);if(""===e){i.push((o+r).trim());break}if(a)")"===e&&(a=!1);else if(","===e){n+=1,i.push((o+r).trim());break}else"("===e&&(a=!0);r+=e,n+=1}}}return i.join(", ")}(e,r);if("style"===n)return nY(r,n2(e));else if("object"===t&&"data"===n)return n1(e,r);return"function"==typeof o?o(n,r,i):r}function n5(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function n6(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:n6(e.parentNode,t,n,r+1)}function n4(e,t){return n=>{if(null===n)return!1;try{if(e){if("string"==typeof e){if(n.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}(n,e))return!0}if(t&&n.matches(t))return!0;return!1}catch(e){return!1}}}function n8(e,t,n,r,i,o){try{let a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===a)return!1;if("INPUT"===a.tagName){let e=a.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let s=-1,l=-1;if(o){if((l=n6(a,n4(r,i)))<0)return!0;s=n6(a,n4(t,n),l>=0?l:1/0)}else{if((s=n6(a,n4(t,n)))<0)return!1;l=n6(a,n4(r,i),s>=0?s:1/0)}return s>=0?!(l>=0)||s<=l:!(l>=0)&&!!o}catch(e){}return!!o}function n7(e){return null==e?"":e.toLowerCase()}function n9(e,t){let n,{doc:r,mirror:i,blockClass:o,blockSelector:a,unblockSelector:s,maskAllText:l,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:f,skipChild:m=!1,inlineStylesheet:g=!0,maskInputOptions:_={},maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:k=!1,onSerialize:x,onIframeLoad:T,iframeLoadTimeout:C=5e3,onStylesheetLoad:I,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:R=!1}=t,{preserveWhiteSpace:D=!0}=t,A=function(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:a,maskAllText:s,maskAttributeFn:l,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:f,inlineStylesheet:m,maskInputOptions:g={},maskTextFn:_,maskInputFn:y,dataURLOptions:v={},inlineImages:b,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:E=!1}=t,k=function(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:av.Document,childNodes:[],compatMode:e.compatMode};return{type:av.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:av.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){let n,{doc:r,blockClass:i,blockSelector:o,unblockSelector:a,inlineStylesheet:s,maskInputOptions:l={},maskAttributeFn:d,maskInputFn:p,dataURLOptions:h={},inlineImages:f,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:_=!1,rootId:y,maskAllText:v,maskTextClass:b,unmaskTextClass:w,maskTextSelector:S,unmaskTextSelector:E}=t,k=function(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--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,i,o,a),x=function(e){if(e instanceof HTMLFormElement)return"form";let t=nA(e.tagName);return nW.test(t)?"div":t}(e),T={},C=e.attributes.length;for(let t=0;t<C;t++){let n=e.attributes[t];n.name&&!n5(x,n.name,n.value)&&(T[n.name]=n3(r,x,nA(n.name),n.value,e,d))}if("link"===x&&s){let t=Array.from(r.styleSheets).find(t=>t.href===e.href),n=null;t&&(n=nI(t)),n&&(T.rel=null,T.href=null,T.crossorigin=null,T._cssText=nY(n,t.href))}if("style"===x&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=nI(e.sheet);t&&(T._cssText=nY(t,n2(r)))}if("input"===x||"textarea"===x||"select"===x||"option"===x){let t=nF(e),n=nP(e,nN(x),t),r=e.checked;if("submit"!==t&&"button"!==t&&n){let r=n8(e,b,S,w,E,nR({type:t,tagName:nN(x),maskInputOptions:l}));T.value=nD({isMasked:r,element:e,value:n,maskInputFn:p})}r&&(T.checked=r)}if("option"===x&&(e.selected&&!l.select?T.selected=!0:delete T.selected),"canvas"===x&&m){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData;if(new Uint32Array((nL in i?i[nL]:i).call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(T.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){let t=e.toDataURL(h.type,h.quality),n=r.createElement("canvas");n.width=e.width,n.height=e.height,t!==n.toDataURL(h.type,h.quality)&&(T.rr_dataURL=t)}}if("img"===x&&f){c||(u=(c=r.createElement("canvas")).getContext("2d"));let t=e.currentSrc||e.getAttribute("src")||"<unknown-src>",n=e.crossOrigin,i=()=>{e.removeEventListener("load",i);try{c.width=e.naturalWidth,c.height=e.naturalHeight,u.drawImage(e,0,0),T.rr_dataURL=c.toDataURL(h.type,h.quality)}catch(n){if("anonymous"!==e.crossOrigin){e.crossOrigin="anonymous",e.complete&&0!==e.naturalWidth?i():e.addEventListener("load",i);return}console.warn(`Cannot inline img src=${t}! Error: ${n}`)}"anonymous"===e.crossOrigin&&(n?T.crossOrigin=n:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?i():e.addEventListener("load",i)}if(("audio"===x||"video"===x)&&(T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime),!_&&(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop)),k){let{width:t,height:n}=e.getBoundingClientRect();T={class:T.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==x||g(T.src)||(k||nz(e)||(T.rr_src=T.src),delete T.src);try{customElements.get(x)&&(n=!0)}catch(e){}return{type:av.Element,tagName:x,attributes:T,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:k,rootId:y,isCustom:n}}(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:a,inlineStylesheet:m,maskAttributeFn:l,maskInputOptions:g,maskInputFn:y,dataURLOptions:v,inlineImages:b,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:E,rootId:k,maskAllText:s,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:f});case e.TEXT_NODE:return function(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:a,maskTextFn:s,maskInputOptions:l,maskInputFn:c,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,p=e.textContent,h="STYLE"===d||void 0,f="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||nx([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=nI(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=nY(p,n2(t.doc))}f&&(p="SCRIPT_PLACEHOLDER");let g=n8(e,r,o,i,a,n);return h||f||m||!p||!g||(p=s?s(p,e.parentElement):p.replace(/[\S]/g,"*")),m&&p&&(l.textarea||g)&&(p=c?c(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p&&(p=nD({isMasked:n8(e,r,o,i,a,nR({type:null,tagName:d,maskInputOptions:l})),element:e,value:p,maskInputFn:c})),{type:av.Text,textContent:p||"",isStyle:h,rootId:u}}(e,{doc:n,maskAllText:s,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:f,maskTextFn:_,maskInputOptions:g,maskInputFn:y,rootId:k});case e.CDATA_SECTION_NODE:return{type:av.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:av.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}(e,{doc:r,mirror:i,blockClass:o,blockSelector:a,maskAllText:l,unblockSelector:s,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:f,inlineStylesheet:g,maskInputOptions:_,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,dataURLOptions:S,inlineImages:E,recordCanvas:k,keepIframeSrcFn:O,newlyAddedElement:R});if(!A)return console.warn(e,"not serialized"),null;n=i.hasNode(e)?i.getId(e):!function(e,t){if(t.comment&&e.type===av.Comment)return!0;if(e.type===av.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"===nj(e.attributes.href)))return!0;else if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(n7(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===n7(e.attributes.name)||"icon"===n7(e.attributes.rel)||"apple-touch-icon"===n7(e.attributes.rel)||"shortcut icon"===n7(e.attributes.rel))))return!0;else if("meta"===e.tagName){if(t.headMetaDescKeywords&&n7(e.attributes.name).match(/^description|keywords$/))return!0;else if(t.headMetaSocial&&(n7(e.attributes.property).match(/^(og|twitter|fb):/)||n7(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===n7(e.attributes.name)))return!0;else if(t.headMetaRobots&&("robots"===n7(e.attributes.name)||"googlebot"===n7(e.attributes.name)||"bingbot"===n7(e.attributes.name)))return!0;else if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===n7(e.attributes.name)||"generator"===n7(e.attributes.name)||"framework"===n7(e.attributes.name)||"publisher"===n7(e.attributes.name)||"progid"===n7(e.attributes.name)||n7(e.attributes.property).match(/^article:/)||n7(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===n7(e.attributes.name)||"yandex-verification"===n7(e.attributes.name)||"csrf-token"===n7(e.attributes.name)||"p:domain_verify"===n7(e.attributes.name)||"verify-v1"===n7(e.attributes.name)||"verification"===n7(e.attributes.name)||"shopify-checkout-api-token"===n7(e.attributes.name)))return!0}}return!1}(A,w)&&(D||A.type!==av.Text||A.isStyle||A.textContent.replace(/^\s+|\s+$/gm,"").length)?nK():-2;let N=Object.assign(A,{id:n});if(i.add(e,N),-2===n)return null;x&&x(e);let L=!m;if(N.type===av.Element){L=L&&!N.needBlock,delete N.needBlock;let t=e.shadowRoot;t&&nC(t)&&(N.isShadowHost=!0)}if((N.type===av.Document||N.type===av.Element)&&L){w.headWhitespace&&N.type===av.Element&&"head"===N.tagName&&(D=!1);let t={doc:r,mirror:i,blockClass:o,blockSelector:a,maskAllText:l,unblockSelector:s,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:f,skipChild:m,inlineStylesheet:g,maskInputOptions:_,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:E,recordCanvas:k,preserveWhiteSpace:D,onSerialize:x,onIframeLoad:T,iframeLoadTimeout:C,onStylesheetLoad:I,stylesheetLoadTimeout:M,keepIframeSrcFn:O};for(let n of Array.from(e.childNodes)){let e=n9(n,t);e&&N.childNodes.push(e)}if(e.nodeType===e.ELEMENT_NODE&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=n9(n,t);r&&(nC(e.shadowRoot)&&(r.isShadow=!0),N.childNodes.push(r))}}return e.parentNode&&nT(e.parentNode)&&nC(e.parentNode)&&(N.isShadow=!0),N.type===av.Element&&"iframe"===N.tagName&&function(e,t,n){let r,i=e.contentWindow;if(!i)return;let o=!1;try{r=i.document.readyState}catch(e){return}if("complete"!==r){let r=nH(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{nB(r),o=!0,t()});return}let a="about:blank";if(i.location.href!==a||e.src===a||""===e.src)return nH(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=nz(e);if(t&&T){let n=n9(t,{doc:t,mirror:i,blockClass:o,blockSelector:a,unblockSelector:s,maskAllText:l,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:g,maskInputOptions:_,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:E,recordCanvas:k,preserveWhiteSpace:D,onSerialize:x,onIframeLoad:T,iframeLoadTimeout:C,onStylesheetLoad:I,stylesheetLoadTimeout:M,keepIframeSrcFn:O});n&&T(e,n)}},C),N.type===av.Element&&"link"===N.tagName&&"string"==typeof N.attributes.rel&&("stylesheet"===N.attributes.rel||"preload"===N.attributes.rel&&"string"==typeof N.attributes.href&&"css"===nj(N.attributes.href))&&function(e,t,n){let r,i=!1;try{r=e.sheet}catch(e){return}if(r)return;let o=nH(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{nB(o),i=!0,t()})}(e,()=>{if(I){let t=n9(e,{doc:r,mirror:i,blockClass:o,blockSelector:a,unblockSelector:s,maskAllText:l,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:g,maskInputOptions:_,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:E,recordCanvas:k,preserveWhiteSpace:D,onSerialize:x,onIframeLoad:T,iframeLoadTimeout:C,onStylesheetLoad:I,stylesheetLoadTimeout:M,keepIframeSrcFn:O});t&&I(e,t)}},M),N}function re(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):("call"===i||"optionalCall"===i)&&(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}function rt(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}let rn="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.",rr={map:{},getId:()=>(console.error(rn),-1),getNode:()=>(console.error(rn),null),removeNodeFromMap(){console.error(rn)},has:()=>(console.error(rn),!1),reset(){console.error(rn)}};function ri(e,t,n={}){let r=null,i=0;return function(...o){let a=Date.now();i||!1!==n.leading||(i=a);let s=t-(a-i),l=this;s<=0||s>t?(r&&(function(...e){rw("clearTimeout")(...e)}(r),r=null),i=a,e.apply(l,o)):r||!1===n.trailing||(r=rS(()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(l,o)},s))}}function ro(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}"u">typeof window&&window.Proxy&&window.Reflect&&(rr=new Proxy(rr,{get:(e,t,n)=>("map"===t&&console.error(rn),Reflect.get(e,t,n))}));let ra=Date.now;function rs(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function rl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function rc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ru(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function rd(e,t,n,r,i){if(!e)return!1;let o=ru(e);if(!o)return!1;let a=n4(t,n);if(!i){let e=r&&o.matches(r);return a(o)&&!e}let s=n6(o,a),l=-1;return!(s<0)&&(r&&(l=n6(o,n4(null,r))),s>-1&&l<0||s<l)}function rp(e,t){return -2===t.getId(e)}function rh(e){return!!e.changedTouches}function rf(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function rm(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function rg(e){return!!re([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(ra=()=>new Date().getTime());class r_{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t,n;return t=this.styleIDMap.get(e),n=()=>-1,null!=t?t:n()}has(e){return this.styleIDMap.has(e)}add(e,t){let n;return this.has(e)?this.getId(e):(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 ry(e){let t=null;return re([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function rv(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){let t=e.ownerDocument;if(!t)return!1;let n=function(e){let t,n=e;for(;t=ry(n);)n=t;return n}(e);return t.contains(n)}(e))}let rb={};function rw(e){let t=rb[e];if(t)return t;let n=window.document,r=window[e];if(n&&"function"==typeof n.createElement)try{let t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch(e){}return rb[e]=r.bind(window)}function rS(...e){return rw("setTimeout")(...e)}var rE=((au=rE||{})[au.DomContentLoaded=0]="DomContentLoaded",au[au.Load=1]="Load",au[au.FullSnapshot=2]="FullSnapshot",au[au.IncrementalSnapshot=3]="IncrementalSnapshot",au[au.Meta=4]="Meta",au[au.Custom=5]="Custom",au[au.Plugin=6]="Plugin",au),rk=((ad=rk||{})[ad.Mutation=0]="Mutation",ad[ad.MouseMove=1]="MouseMove",ad[ad.MouseInteraction=2]="MouseInteraction",ad[ad.Scroll=3]="Scroll",ad[ad.ViewportResize=4]="ViewportResize",ad[ad.Input=5]="Input",ad[ad.TouchMove=6]="TouchMove",ad[ad.MediaInteraction=7]="MediaInteraction",ad[ad.StyleSheetRule=8]="StyleSheetRule",ad[ad.CanvasMutation=9]="CanvasMutation",ad[ad.Font=10]="Font",ad[ad.Log=11]="Log",ad[ad.Drag=12]="Drag",ad[ad.StyleDeclaration=13]="StyleDeclaration",ad[ad.Selection=14]="Selection",ad[ad.AdoptedStyleSheet=15]="AdoptedStyleSheet",ad[ad.CustomElement=16]="CustomElement",ad),rx=((ap=rx||{})[ap.MouseUp=0]="MouseUp",ap[ap.MouseDown=1]="MouseDown",ap[ap.Click=2]="Click",ap[ap.ContextMenu=3]="ContextMenu",ap[ap.DblClick=4]="DblClick",ap[ap.Focus=5]="Focus",ap[ap.Blur=6]="Blur",ap[ap.TouchStart=7]="TouchStart",ap[ap.TouchMove_Departed=8]="TouchMove_Departed",ap[ap.TouchEnd=9]="TouchEnd",ap[ap.TouchCancel=10]="TouchCancel",ap),rT=((ah=rT||{})[ah.Mouse=0]="Mouse",ah[ah.Pen=1]="Pen",ah[ah.Touch=2]="Touch",ah);function rC(e){try{return e.contentDocument}catch(e){}}(af=ab||(ab={}))[af.Document=0]="Document",af[af.DocumentType=1]="DocumentType",af[af.Element=2]="Element",af[af.Text=3]="Text",af[af.CDATA=4]="CDATA",af[af.Comment=5]="Comment",(am=aw||(aw={}))[am.PLACEHOLDER=0]="PLACEHOLDER",am[am.ELEMENT_NODE=1]="ELEMENT_NODE",am[am.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",am[am.TEXT_NODE=3]="TEXT_NODE",am[am.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",am[am.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",am[am.ENTITY_NODE=6]="ENTITY_NODE",am[am.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",am[am.COMMENT_NODE=8]="COMMENT_NODE",am[am.DOCUMENT_NODE=9]="DOCUMENT_NODE",am[am.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",am[am.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";class rI{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=function(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):("call"===i||"optionalCall"===i)&&(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let rM=(e,t)=>`${e}@${t}`;class rO{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;let e=[],t=new Set,n=new rI,r=e=>{let t=e,n=-2;for(;-2===n;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!rv(i))return;let o=nT(i.parentNode)?this.mirror.getId(ry(i)):this.mirror.getId(i.parentNode),a=r(i);if(-1===o||-1===a)return n.addNode(i);let s=n9(i,{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=>{rf(e,this.mirror)&&!rd(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),rm(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),rg(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{rd(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)}});s&&(e.push({parentId:o,nextId:a,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!rD(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&i(e);for(let e of this.addedSet)rA(this.droppedSet,e)||rD(this.removes,e,this.mirror)?rA(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let o=null;for(;n.length;){let e=null;if(o){let t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),i(e.value)}let a={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=>{let{attributes:t}=e;if("string"==typeof t.style){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(a.texts.length||a.attributes.length||a.removes.length||a.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=e=>{if(!rp(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;rd(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:n8(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,ru(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){let n=nF(t),i=t.tagName;r=nP(t,i,n);let o=nR({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=nD({isMasked:n8(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(rd(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(rC(t))return;n="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!n5(t.tagName,n)&&(i.attributes[n]=n3(this.doc,nA(t.tagName),nA(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement("span");for(let r of(e.oldValue&&n.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(r),o=t.style.getPropertyPriority(r);e!==n.style.getPropertyValue(r)||o!==n.style.getPropertyPriority(r)?""===o?i.styleDiff[r]=e:i.styleDiff[r]=[e,o]:i._unchangedStyles[r]=[e,o]}for(let e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(rd(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=nT(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);rd(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||rp(t,this.mirror)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(rR(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||function e(t,n){if(nT(t))return!1;let r=n.getId(t);return!n.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[rM(n,r)]?rR(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!!(nT(e.target)&&nC(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(rp(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[rM(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!rd(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&(e.childNodes.forEach(e=>this.genAdds(e)),rg(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 rR(e,t){e.delete(t),t.childNodes.forEach(t=>rR(e,t))}function rD(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}(e,t,n)}function rA(e,t){return 0!==e.size&&function e(t,n){let{parentNode:r}=n;return!!r&&(!!t.has(r)||e(t,r))}(e,t)}let rN=e=>d?(...t)=>{try{return e(...t)}catch(e){if(d&&!0===d(e))return()=>{};throw e}}:e;function rL(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):("call"===i||"optionalCall"===i)&&(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}let rF=[];function rP(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function rj(e,t){let n=new rO;rF.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=rL([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);i&&window[i]&&(r=window[i]);let o=new r(rN(t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function r$({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:a}){return rt("scroll",rN(ri(rN(a=>{let s=rP(a);if(!s||rd(s,r,i,o,!0))return;let l=n.getId(s);if(s===t&&t.defaultView){let n=rs(t.defaultView);e({id:l,x:n.left,y:n.top})}else e({id:l,x:s.scrollLeft,y:s.scrollTop})}),a.scroll||100)),t)}let rU=["INPUT","TEXTAREA","SELECT"],rH=new WeakMap;function rB(e){var t=[];if(rK("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||rK("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||rK("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||rK("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}function rz(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function rq({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);let i="#document"===n.nodeName?rL([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):rL([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=rL([i,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(rL([i,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&i&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return rL([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){let n=rL([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),rN(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})})):()=>{}}function rW(e,t={}){let n,r=e.doc.defaultView;if(!r)return()=>{};e.recordDOM&&(n=rj(e,e.doc));let i=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){let i;if(!1===t.mousemove)return()=>{};let o="number"==typeof t.mousemove?t.mousemove:50,a="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],l=ri(rN(t=>{let n=Date.now()-i;e(s.map(e=>(e.timeOffset-=n,e)),t),s=[],i=null}),a),c=rN(ri(rN(e=>{let t=rP(e),{clientX:n,clientY:o}=rh(e)?e.changedTouches[0]:e;i||(i=ra()),s.push({x:n,y:o,id:r.getId(t),timeOffset:ra()-i}),l("u">typeof DragEvent&&e instanceof DragEvent?rk.Drag:e instanceof MouseEvent?rk.MouseMove:rk.TouchMove)}),o,{trailing:!1})),u=[rt("mousemove",c,n),rt("touchmove",c,n),rt("drag",c,n)];return rN(()=>{u.forEach(e=>e())})}(e),o=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:a}){if(!1===a.mouseInteraction)return()=>{};let s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,l=[],c=null;return Object.keys(rx).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]).forEach(a=>{let s=nA(a),u=t=>{let s=rP(t);if(rd(s,r,i,o,!0))return;let l=null,u=a;if("pointerType"in t){switch(t.pointerType){case"mouse":l=rT.Mouse;break;case"touch":l=rT.Touch;break;case"pen":l=rT.Pen}l===rT.Touch?rx[a]===rx.MouseDown?u="TouchStart":rx[a]===rx.MouseUp&&(u="TouchEnd"):rT.Pen}else rh(t)&&(l=rT.Touch);null!==l?(c=l,(u.startsWith("Touch")&&l===rT.Touch||u.startsWith("Mouse")&&l===rT.Mouse)&&(l=null)):rx[a]===rx.Click&&(l=c,c=null);let d=rh(t)?t.changedTouches[0]:t;if(!d)return;let p=n.getId(s),{clientX:h,clientY:f}=d;rN(e)({type:rx[u],id:p,x:h,y:f,...null!==l&&{pointerType:l}})};if(window.PointerEvent)switch(rx[a]){case rx.MouseDown:case rx.MouseUp:s=s.replace("mouse","pointer");break;case rx.TouchStart:case rx.TouchEnd:return}l.push(rt(s,u,t))}),rN(()=>{l.forEach(e=>e())})}(e),a=r$(e),s=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return rt("resize",rN(ri(rN(()=>{let t=rl(),i=rc();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:a,ignoreSelector:s,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:m}){function g(e){let n=rP(e),u=e.isTrusted,g=n&&nN(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||0>rU.indexOf(g)||rd(n,r,i,o,!0))return;let y=n;if(y.classList.contains(a)||s&&y.matches(s))return;let v=nF(n),b=nP(y,g,v),w=!1,S=nR({maskInputOptions:l,tagName:g,type:v}),E=n8(n,p,f,h,m,S);("radio"===v||"checkbox"===v)&&(w=n.checked),b=nD({isMasked:E,element:n,value:b,maskInputFn:c}),_(n,d?{text:b,isChecked:w,userTriggered:u}:{text:b,isChecked:w});let k=n.name;"radio"===v&&k&&w&&t.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach(e=>{if(e!==n){let t=nD({isMasked:E,element:e,value:nP(e,g,v),maskInputFn:c});_(e,d?{text:t,isChecked:!w,userTriggered:!1}:{text:t,isChecked:!w})}})}function _(t,r){let i=rH.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){rH.set(t,r);let i=n.getId(t);rN(e)({...r,id:i})}}let y=("last"===u.input?["change"]:["input","change"]).map(e=>rt(e,rN(g),t)),v=t.defaultView;if(!v)return()=>{y.forEach(e=>e())};let b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),w=[[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&&y.push(...w.map(e=>(function e(t,n,r,i,o=window){let a=o.Object.getOwnPropertyDescriptor(t,n);return o.Object.defineProperty(t,n,i?r:{set(e){rS(()=>{r.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>e(t,n,a||{},!0)})(e[0],e[1],{set(){rN(g)({target:this,isTrusted:!1})}},!1,v))),rN(()=>{y.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:a}){let s=rN(a=>ri(rN(o=>{let s=rP(o);if(!s||rd(s,t,n,r,!0))return;let{currentTime:l,volume:c,muted:u,playbackRate:d}=s;e({type:a,id:i.getId(s),currentTime:l,volume:c,muted:u,playbackRate:d})}),o.media||500)),l=[rt("play",s(0),a),rt("pause",s(1),a),rt("seeked",s(2),a),rt("volumechange",s(3),a),rt("ratechange",s(4),a)];return rN(()=>{l.forEach(e=>e())})}(e),u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){let i,o;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let a=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:rN((r,i,o)=>{let[a,s]=o,{id:l,styleId:c}=rz(i,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:a,index:s}]}),r.apply(i,o)})});let s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:rN((r,i,o)=>{let[a]=o,{id:s,styleId:l}=rz(i,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,removes:[{index:a}]}),r.apply(i,o)})}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:rN((r,i,o)=>{let[a]=o,{id:s,styleId:l}=rz(i,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,replace:a}),r.apply(i,o)})})),r.CSSStyleSheet.prototype.replaceSync&&(o=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:rN((r,i,o)=>{let[a]=o,{id:s,styleId:l}=rz(i,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,replaceSync:a}),r.apply(i,o)})}));let l={};rG("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(rG("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),rG("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),rG("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));let c={};return Object.entries(l).forEach(([r,i])=>{c[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(c[r].insertRule,{apply:rN((r,i,o)=>{let[a,s]=o,{id:l,styleId:c}=rz(i.parentStyleSheet,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:a,index:[...rB(i),s||0]}]}),r.apply(i,o)})}),i.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:rN((r,i,o)=>{let[a]=o,{id:s,styleId:l}=rz(i.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,removes:[{index:[...rB(i),a]}]}),r.apply(i,o)})})}),rN(()=>{r.CSSStyleSheet.prototype.insertRule=a,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:r}),d=rq(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:rN((i,a,s)=>{let[l,c,u]=s;if(n.has(l))return o.apply(a,[l,c,u]);let{id:d,styleId:p}=rz(rL([a,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:l,value:c,priority:u},index:rB(a.parentRule)}),i.apply(a,s)})});let a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:rN((i,o,s)=>{let[l]=s;if(n.has(l))return a.apply(o,[l]);let{id:c,styleId:u}=rz(rL([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,remove:{property:l},index:rB(o.parentRule)}),i.apply(o,s)})}),rN(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a})}(e,{win:r}),e.collectFonts&&(h=function({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){let r=new o(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let a=ro(t.fonts,"add",function(t){return function(n){return rS(rN(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=o}),r.push(a),rN(()=>{r.forEach(e=>e())})}(e)));let f=function(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:a}=e,s=!0,l=rN(()=>{let e=t.getSelection();if(!e||s&&rL([e,"optionalAccess",e=>e.isCollapsed]))return;s=e.isCollapsed||!1;let l=[],c=e.rangeCount||0;for(let t=0;t<c;t++){let{startContainer:a,startOffset:s,endContainer:c,endOffset:u}=e.getRangeAt(t);rd(a,r,i,o,!0)||rd(c,r,i,o,!0)||l.push({start:n.getId(a),startOffset:s,end:n.getId(c),endOffset:u})}a({ranges:l})});return l(),rt("selectionchange",l)}(e),m=function({doc:e,customElementCb:t}){let n=e.defaultView;return n&&n.customElements?ro(n.customElements,"define",function(e){return function(n,r,i){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,r,i])}}):()=>{}}(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,r,t.options));return rN(()=>{rF.forEach(e=>e.reset()),rL([n,"optionalAccess",e=>e.disconnect,"call",e=>e()]),i(),o(),a(),s(),l(),c(),u(),d(),p(),h(),f(),m(),g.forEach(e=>e())})}function rK(e){return void 0!==window[e]}function rG(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class rX{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;let i=r.get(t);return i||-1}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}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}}function rJ(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):("call"===i||"optionalCall"===i)&&(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}class rV{constructor(){this.crossOriginIframeMirror=new rX(nK),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class rY{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new rX(nK),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new rX(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}),rJ([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);let n=rC(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case rE.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:rE.IncrementalSnapshot,data:{source:rk.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rE.Meta:case rE.Load:case rE.DomContentLoaded:break;case rE.Plugin:return t;case rE.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case rE.IncrementalSnapshot:switch(t.data.source){case rk.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let 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 rk.Drag:case rk.TouchMove:case rk.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case rk.ViewportResize:return!1;case rk.MediaInteraction:case rk.MouseInteraction:case rk.Scroll:case rk.CanvasMutation:case rk.Input:return this.replaceIds(t.data,e,["id"]),t;case rk.StyleSheetRule:case rk.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case rk.Font:return t;case rk.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case rk.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),rJ([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t(t=>{this.replaceStyleIds(t,e,["styleId"])})]),t}}return!1}replace(e,t,n,r){for(let i of r)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));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===av.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class rQ{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class rZ{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(!nC(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let n=rj({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(r$({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),rS(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(rq({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let t=rC(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(ro(e.prototype,"attachShadow",function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&rv(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class r0{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class r1{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new r_,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:nM(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 r2{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){rw("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=tC([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}let r3=new nO;function r5(e={}){let t,{emit:n,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:o="rr-block",blockSelector:a=null,unblockSelector:s=null,ignoreClass:l="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:f="rr-mask",unmaskTextClass:m=null,maskTextSelector:g=null,unmaskTextSelector:_=null,inlineStylesheet:y=!0,maskAllInputs:v,maskInputOptions:b,slimDOMOptions:w,maskAttributeFn:S,maskInputFn:E,maskTextFn:k,maxCanvasSize:x=null,packFn:T,sampling:C={},dataURLOptions:I={},mousemoveWait:M,recordDOM:O=!0,recordCanvas:R=!1,recordCrossOriginIframes:D=!1,recordAfter:A="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:N=!1,collectFonts:L=!1,inlineImages:F=!1,plugins:P,keepIframeSrcFn:j=()=>!1,ignoreCSSAttributes:$=new Set([]),errorHandler:U,onMutation:H,getCanvasManager:B}=e;d=U;let z=!D||window.parent===window,q=!1;if(!z)try{window.parent.document&&(q=!1)}catch(e){q=!0}if(z&&!n)throw Error("emit function is required");if(!z&&!q)return()=>{};void 0!==M&&void 0===C.mousemove&&(C.mousemove=M),r3.reset();let W=!0===v?{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!==b?b:{},K=!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===w,headMetaDescKeywords:"all"===w}:w||{};!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 TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}();let G=0,X=e=>{for(let t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return T&&!q&&(e=T(e)),e};p=(e,o)=>{if(e.timestamp=ra(),tC([rF,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&e.type!==rE.FullSnapshot&&(e.type!==rE.IncrementalSnapshot||e.data.source!==rk.Mutation)&&rF.forEach(e=>e.unfreeze()),z)tC([n,"optionalCall",t=>t(X(e),o)]);else if(q){let t={type:"rrweb",event:X(e),origin:window.location.origin,isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===rE.FullSnapshot)t=e,G=0;else if(e.type===rE.IncrementalSnapshot){if(e.data.source===rk.Mutation&&e.data.isAttachIframe)return;G++;let n=i&&G>=i,o=r&&t&&e.timestamp-t.timestamp>r;(n||o)&&er(!0)}};let J=e=>{p({type:rE.IncrementalSnapshot,data:{source:rk.Mutation,...e}})},V=e=>p({type:rE.IncrementalSnapshot,data:{source:rk.Scroll,...e}}),Y=e=>p({type:rE.IncrementalSnapshot,data:{source:rk.CanvasMutation,...e}}),Q=new r1({mutationCb:J,adoptedStyleSheetCb:e=>p({type:rE.IncrementalSnapshot,data:{source:rk.AdoptedStyleSheet,...e}})}),Z="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new rV:new rY({mirror:r3,mutationCb:J,stylesheetManager:Q,recordCrossOriginIframes:D,wrappedEmit:p});for(let e of P||[])e.getMirror&&e.getMirror({nodeMirror:r3,crossOriginIframeMirror:Z.crossOriginIframeMirror,crossOriginIframeStyleMirror:Z.crossOriginIframeStyleMirror});let ee=new r2,et=function(e,t){try{return e?e(t):new r0}catch(e){return console.warn("Unable to initialize CanvasManager"),new r0}}(B,{mirror:r3,win:window,mutationCb:e=>p({type:rE.IncrementalSnapshot,data:{source:rk.CanvasMutation,...e}}),recordCanvas:R,blockClass:o,blockSelector:a,unblockSelector:s,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:I,errorHandler:U}),en="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new rQ:new rZ({mutationCb:J,scrollCb:V,bypassOptions:{onMutation:H,blockClass:o,blockSelector:a,unblockSelector:s,maskAllText:u,maskTextClass:f,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:_,inlineStylesheet:y,maskInputOptions:W,dataURLOptions:I,maskAttributeFn:S,maskTextFn:k,maskInputFn:E,recordCanvas:R,inlineImages:F,sampling:C,slimDOMOptions:K,iframeManager:Z,stylesheetManager:Q,canvasManager:et,keepIframeSrcFn:j,processedNodeManager:ee},mirror:r3}),er=(e=!1)=>{if(!O)return;p({type:rE.Meta,data:{href:window.location.href,width:rc(),height:rl()}},e),Q.reset(),en.init(),rF.forEach(e=>e.lock());let t=function(e,t){let{mirror:n=new nO,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:a=!1,maskTextClass:s="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOM:y=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:k,stylesheetLoadTimeout:x,keepIframeSrcFn:T=()=>!1}=t||{};return n9(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:s,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!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}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:_,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:b,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:k,stylesheetLoadTimeout:x,keepIframeSrcFn:T,newlyAddedElement:!1})}(document,{mirror:r3,blockClass:o,blockSelector:a,unblockSelector:s,maskAllText:u,maskTextClass:f,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:_,inlineStylesheet:y,maskAllInputs:W,maskAttributeFn:S,maskInputFn:E,maskTextFn:k,slimDOM:K,dataURLOptions:I,recordCanvas:R,inlineImages:F,onSerialize:e=>{rf(e,r3)&&Z.addIframe(e),rm(e,r3)&&Q.trackLinkElement(e),rg(e)&&en.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Z.attachIframe(e,t),e.contentWindow&&et.addWindow(e.contentWindow),en.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Q.attachLinkElement(e,t)},keepIframeSrcFn:j});if(!t)return console.warn("Failed to snapshot the document");p({type:rE.FullSnapshot,data:{node:t,initialOffset:rs(window)}}),rF.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Q.adoptStyleSheets(document.adoptedStyleSheets,r3.getId(document))};h=er;try{let e=[],t=e=>rN(rW)({onMutation:H,mutationCb:J,mousemoveCb:(e,t)=>p({type:rE.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>p({type:rE.IncrementalSnapshot,data:{source:rk.MouseInteraction,...e}}),scrollCb:V,viewportResizeCb:e=>p({type:rE.IncrementalSnapshot,data:{source:rk.ViewportResize,...e}}),inputCb:e=>p({type:rE.IncrementalSnapshot,data:{source:rk.Input,...e}}),mediaInteractionCb:e=>p({type:rE.IncrementalSnapshot,data:{source:rk.MediaInteraction,...e}}),styleSheetRuleCb:e=>p({type:rE.IncrementalSnapshot,data:{source:rk.StyleSheetRule,...e}}),styleDeclarationCb:e=>p({type:rE.IncrementalSnapshot,data:{source:rk.StyleDeclaration,...e}}),canvasMutationCb:Y,fontCb:e=>p({type:rE.IncrementalSnapshot,data:{source:rk.Font,...e}}),selectionCb:e=>{p({type:rE.IncrementalSnapshot,data:{source:rk.Selection,...e}})},customElementCb:e=>{p({type:rE.IncrementalSnapshot,data:{source:rk.CustomElement,...e}})},blockClass:o,ignoreClass:l,ignoreSelector:c,maskAllText:u,maskTextClass:f,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:_,maskInputOptions:W,inlineStylesheet:y,sampling:C,recordDOM:O,recordCanvas:R,inlineImages:F,userTriggeredOnInput:N,collectFonts:L,doc:e,maskAttributeFn:S,maskInputFn:E,maskTextFn:k,keepIframeSrcFn:j,blockSelector:a,unblockSelector:s,slimDOMOptions:K,dataURLOptions:I,mirror:r3,iframeManager:Z,stylesheetManager:Q,shadowDomManager:en,processedNodeManager:ee,canvasManager:et,ignoreCSSAttributes:$,plugins:tC([P,"optionalAccess",e=>e.filter,"call",e=>e(e=>e.observer),"optionalAccess",e=>e.map,"call",e=>e(e=>({observer:e.observer,options:e.options,callback:t=>p({type:rE.Plugin,data:{plugin:e.name,payload:t}})}))])||[]},{});Z.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{er(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(rt("DOMContentLoaded",()=>{p({type:rE.DomContentLoaded,data:{}}),"DOMContentLoaded"===A&&n()})),e.push(rt("load",()=>{p({type:rE.Load,data:{}}),"load"===A&&n()},window))),()=>{e.forEach(e=>e()),ee.destroy(),h=void 0,d=void 0}}catch(e){console.warn(e)}}function r6(e){return e>0x2540be3ff?e:1e3*e}function r4(e){return e>0x2540be3ff?e/1e3:e}function r8(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:rE.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,eM.S8)(t,10,1e3)}}),"console"===t.category)))}function r7(e){return e.closest("button,a")||e}function r9(e){let t=ie(e);return t&&t instanceof Element?r7(t):t}function ie(e){var t;return"object"==typeof(t=e)&&t&&"target"in t?e.target:e}r5.mirror=r3,r5.takeFullSnapshot=function(e){if(!h)throw Error("please take full snapshot after start recording");h(e)};let it=new Set([rk.Mutation,rk.StyleSheetRule,rk.StyleDeclaration,rk.AdoptedStyleSheet,rk.CanvasMutation,rk.Selection,rk.MediaInteraction]);class ir{constructor(e,t,n=r8){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(){var e;let t=(e=()=>{this._lastMutation=io()},f||(f=[],(0,B.GS)(nw,"open",function(e){return function(...t){if(f)try{f.forEach(e=>e())}catch(e){}return e.apply(nw,t)}})),f.push(e),()=>{let t=f?f.indexOf(e):-1;t>-1&&f.splice(t,1)});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){var n,r,i;if(n=t,r=this._ignoreSelector,!ii.includes(n.tagName)||"INPUT"===n.tagName&&!["submit","button"].includes(n.getAttribute("type")||"")||"A"===n.tagName&&(n.hasAttribute("download")||n.hasAttribute("target")&&"_self"!==n.getAttribute("target"))||r&&n.matches(r)||!((i=e).data&&"number"==typeof i.data.nodeId&&i.timestamp))return;let o={timestamp:r4(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===o.node&&1>Math.abs(e.timestamp-o.timestamp))||(this._clicks.push(o),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=r4(e)}registerScroll(e=Date.now()){this._lastScroll=r4(e)}registerClick(e){let t=r7(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=io();for(let n of(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)}),e)){let e=this._clicks.indexOf(n);e>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,{clickCount:i,clickBreadcrumb:o}=e;if(!n&&!r){let n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",a={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:nw.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(t,a);return}if(i>1){let e={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:nw.location.href,route:t.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=(0,tL.wg)(()=>this._checkClicks(),1e3)}}let ii=["A","BUTTON","INPUT"];function io(){return Date.now()/1e3}function ia(e){return{timestamp:Date.now()/1e3,type:"default",...e}}(ag=aS||(aS={}))[ag.Document=0]="Document",ag[ag.DocumentType=1]="DocumentType",ag[ag.Element=2]="Element",ag[ag.Text=3]="Text",ag[ag.CDATA=4]="CDATA",ag[ag.Comment=5]="Comment";let is=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function il(e,t){let n=r5.mirror.getId(e),r=n&&r5.mirror.getNode(n),i=r&&r5.mirror.getMeta(r),o=i&&i.type===aS.Element?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(e=>e.type===aS.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:function(e){let t={};for(let n in!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]),e)if(is.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}(o.attributes)}}:{}}}let ic={resource:function(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:a,encodedBodySize:s,responseStatus:l,transferSize:c}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:ip(o),end:ip(i),name:r,data:{size:c,statusCode:l,decodedBodySize:a,encodedBodySize:s}}},paint:function(e){let{duration:t,entryType:n,name:r,startTime:i}=e,o=ip(i);return{type:n,name:r,start:o,end:o+t,data:void 0}},navigation:function(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:a,domContentLoadedEventStart:s,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=e;return 0===i?null:{type:`${t}.${m}`,start:ip(h),end:ip(o),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:a,duration:i,domInteractive:c,domContentLoadedEventStart:s,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:p}}}};function iu(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function id(e){let t=ic[e.entryType];return t?t(e):null}function ip(e){return((er.k3||nw.performance.timeOrigin)+e)/1e3}function ih(e){let t=e.entries[e.entries.length-1];return iy(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function im(e){let t=[],n=[];for(let r of e.entries)if(void 0!==r.sources){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=r5.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return iy(e,"cumulative-layout-shift",n,t)}function ig(e){let t=e.entries[e.entries.length-1];return iy(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function i_(e){let t=e.entries[e.entries.length-1];return iy(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function iy(e,t,n,r){let i=e.value,o=e.rating,a=ip(i);return{type:"web-vital",name:t,start:a,end:a,data:{value:i,size:i,rating:o,nodeIds:n?n.map(e=>r5.mirror.getId(e)):void 0,attributions:r}}}let iv="u"<typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ib=["info","warn","error","log"],iw="[Replay] ";function iS(e,t="info"){(0,E.Z)({category:"console",data:{logger:"replay"},level:t,message:`${iw}${e}`},{level:t})}let iE=(y=!1,v=!1,b={exception:()=>void 0,infoTick:()=>void 0,setConfig:e=>{y=e.captureExceptions,v=e.traceInternals}},iv?(ib.forEach(e=>{b[e]=(...t)=>{M.vF[e](iw,...t),v&&iS(t.join(""),(0,j.t)(e))}}),b.exception=(e,...t)=>{t.length&&b.error&&b.error(...t),M.vF.error(iw,e),y?(0,k.Cp)(e):v&&iS(e,"error")},b.infoTick=(...e)=>{M.vF.info(iw,...e),v&&setTimeout(()=>iS(e[0]),0)}):ib.forEach(e=>{b[e]=()=>void 0}),b);class ik extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class ix{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){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>2e7)throw new ik;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=this.events.map(e=>e.timestamp).sort()[0];return e?r6(e):null}}class iT{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(){iv&&iE.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{let o=({data:t})=>{if(t.method===e&&t.id===n){if(this._worker.removeEventListener("message",o),!t.success){iv&&iE.error("Error in compression worker: ",t.response),i(Error("Error in compression worker"));return}r(t.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class iC{constructor(e){this._worker=new iT(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){let t=r6(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return(this._totalSize+=n.length,this._totalSize>2e7)?Promise.reject(new ik):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{iv&&iE.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){let e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class iI{constructor(e){this._fallback=new ix,this._compression=new iC(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){iv&&iE.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let 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){iv&&iE.exception(e,"Failed to add events when switching buffers.")}}}function iM(){try{return"sessionStorage"in nw&&!!nw.sessionStorage}catch(e){return!1}}function iO(e){return void 0!==e&&Math.random()<e}function iR(e){let t=Date.now(),n=e.id||(0,P.eJ)(),r=e.started||t,i=e.lastActivity||t,o=e.segmentId||0;return{id:n,started:r,lastActivity:i,segmentId:o,sampled:e.sampled,previousSessionId:e.previousSessionId}}function iD(e){if(iM())try{nw.sessionStorage.setItem(nS,JSON.stringify(e))}catch(e){}}function iA({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=iR({sampled:iO(e)?"session":!!t&&"buffer",previousSessionId:r});return n&&iD(i),i}function iN(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function iL(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return iN(e.started,t,r)||iN(e.lastActivity,n,r)}function iF(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!iL(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function iP({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&function(){if(!iM())return null;try{let e=nw.sessionStorage.getItem(nS);if(!e)return null;let t=JSON.parse(e);return iv&&iE.infoTick("Loading existing session"),iR(t)}catch(e){return null}}();return i?iF(i,{sessionIdleExpire:e,maxReplayDuration:t})?(iv&&iE.infoTick("Session in sessionStorage is expired, creating new one..."),iA(r,{previousSessionId:i.id})):i:(iv&&iE.infoTick("Creating new session"),iA(r,{previousSessionId:n}))}function ij(e,t,n){return!!iU(e,t)&&(i$(e,t,n),!0)}async function i$(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i="buffer"===e.recordingMode;try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let o=e.getOptions(),a=function(e,t){try{if("function"==typeof t&&e.type===rE.Custom)return t(e)}catch(e){return iv&&iE.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,o.beforeAddRecordingEvent);if(!a)return;return await r.addEvent(a)}catch(o){let t=o&&o instanceof ik;if(t&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:t?"addEventSizeExceeded":"addEvent"});let n=(0,L.KU)();n&&n.recordDroppedEvent("internal_sdk_error","replay")}}function iU(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=r6(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(iv&&iE.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function iH(e){return"transaction"===e.type}function iB(e){return"feedback"===e.type}function iz(e){return!!e.category}function iq(){let e=(0,L.o5)().getPropagationContext().dsc;e&&delete e.replay_id;let t=(0,O.Bk)();if(t){let e=(0,Q.k1)(t);delete e.replay_id}}function iW(e,t){return t.map(({type:t,start:n,end:r,name:i,data:o})=>{let a=e.throttledAddEvent({type:rE.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof a?Promise.resolve(null):a})}function iK(e,t){var n;e.isEnabled()&&null!==t&&(n=t.name,(!iv||!e.getOptions()._experiments.traceInternals)&&tm(n,(0,L.KU)())||e.addUpdate(()=>(iW(e,[t]),!0)))}function iG(e){if(!e)return;let 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){let n=i1(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function iX(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function iJ(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[i1(e)];if(!e)return[void 0]}catch(t){return iv&&iE.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return iv&&iE.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function iV(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function iY(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:a,request:s,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:(0,B.Ce)({method:o,statusCode:a,request:s,response:l})}}function iQ(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function iZ(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:o}=function(e){var t;let n,r;if(!e||"string"!=typeof e)return{body:e};let i=e.length>15e4,o=(n=(t=e)[0],r=t[t.length-1],"["===n&&"]"===r||"{"===n&&"}"===r);if(i){let t=e.slice(0,15e4);return o?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}\u{2026}`,warnings:["TEXT_TRUNCATED"]}}if(o)try{return{body:JSON.parse(e)}}catch(e){}return{body:e}}(n);return r.body=i,o&&o.length>0&&(r._meta={warnings:o}),r}function i0(e,t){return Object.entries(e).reduce((n,[r,i])=>{let o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function i1(e){return new URLSearchParams(e).toString()}function i2(e,t){let n=function(e,t=nw.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(nw.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(e);return(0,$.Xr)(n,t)}async function i3(e,t,n){try{let r=await i5(e,t,n),i=iY("resource.fetch",r);iK(n.replay,i)}catch(e){iv&&iE.exception(e,"Failed to capture fetch breadcrumb")}}async function i5(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:a,method:s,status_code:l=0,request_body_size:c,response_body_size:u}=e.data,d=i2(a,n.networkDetailAllowUrls)&&!i2(a,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:o,url:a,method:s,statusCode:l,request:d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){var i,o;let a=n?(i=n,o=t,1===i.length&&"string"!=typeof i[0]?i9(i[0],o):2===i.length?i9(i[1],o):{}):{};if(!e)return iZ(a,r,void 0);let[s,l]=iJ(i8(n)),c=iZ(a,r,s);return l?iV(c,l):c}(n,t.input,c):iQ(c),response:await i6(d,n,t.response,u)}}async function i6(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&void 0!==i)return iQ(i);let o=r?i7(r.headers,n):{};if(!r||!t&&void 0!==i)return iZ(o,i,void 0);let[a,s]=await i4(r),l=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let o=e&&e.length&&void 0===n?iG(e):n;if(!r)return iQ(o);if(t)return iZ(i,o,e);return iZ(i,o,void 0)}catch(e){return iv&&iE.exception(e,"Failed to serialize response body"),iZ(i,n,void 0)}}(a,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return s?iV(l,s):l}async function i4(e){let t=function(e){try{return e.clone()}catch(e){iv&&iE.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{var n;return[await (n=t,new Promise((e,t)=>{let r=(0,tL.wg)(()=>t(Error("Timeout while trying to read response body")),500);oe(n).then(t=>e(t),e=>t(e)).finally(()=>clearTimeout(r))}))]}catch(e){if(e instanceof Error&&e.message.indexOf("Timeout")>-1)return iv&&iE.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"];return iv&&iE.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"]}}function i8(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function i7(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function i9(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?i7(n,t):Array.isArray(n)?{}:i0(n,t):{}}async function oe(e){return await e.text()}async function ot(e,t,n){try{let r=function(e,t,n){let r,i=Date.now(),{startTimestamp:o=i,endTimestamp:a=i,input:s,xhr:l}=t,{url:c,method:u,status_code:d=0,request_body_size:p,response_body_size:h}=e.data;if(!c)return null;if(!l||!i2(c,n.networkDetailAllowUrls)||i2(c,n.networkDetailDenyUrls)){let e=iQ(p);return{startTimestamp:o,endTimestamp:a,url:c,method:u,statusCode:d,request:e,response:iQ(h)}}let f=l[th.Er],m=f?i0(f.request_headers,n.networkRequestHeaders):{},g=i0((r=l.getAllResponseHeaders())?r.split("\r\n").reduce((e,t)=>{let[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{},n.networkResponseHeaders),[_,y]=n.networkCaptureBodies?iJ(s):[void 0],[v,b]=n.networkCaptureBodies?function(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{var n=e.response,r=e.responseType;try{if("string"==typeof n)return[n];if(n instanceof Document)return[n.body.outerHTML];if("json"===r&&n&&"object"==typeof n)return[JSON.stringify(n)];if(!n)return[void 0]}catch(e){return iv&&iE.exception(e,"Failed to serialize body",n),[void 0,"BODY_PARSE_ERROR"]}return iv&&iE.info("Skipping network body because of body type",n),[void 0,"UNPARSEABLE_BODY_TYPE"]}catch(e){t.push(e)}return iv&&iE.warn("Failed to get xhr response body",...t),[void 0]}(l):[void 0],w=iZ(m,p,_),S=iZ(g,h,v);return{startTimestamp:o,endTimestamp:a,url:c,method:u,statusCode:d,request:y?iV(w,y):w,response:b?iV(S,b):S}}(e,t,n),i=iY("resource.xhr",r);iK(n.replay,i)}catch(e){iv&&iE.exception(e,"Failed to capture xhr breadcrumb")}}async function on(e){try{return Promise.all(iW(e,[function(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}(nw.performance.memory)]))}catch(e){return[]}}let or=U.O.navigator;async function oi({client:e,scope:t,replayId:n,event:r}){let i={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,i);let o=await (0,tM.mG)(e.getOptions(),r,i,t,e,(0,L.rm)());if(!o)return null;o.platform=o.platform||"javascript";let a=e.getSdkMetadata(),{name:s,version:l}=a&&a.sdk||{};return o.sdk={...o.sdk,name:s||"sentry.javascript.unknown",version:l||"0.0.0"},o}async function oo({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){var a;let s,l=function({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
`;if("string"==typeof e)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);(n=new Uint8Array(t.length+e.length)).set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:u,traceIds:d,initialTimestamp:p}=r,h=(0,L.KU)(),f=(0,L.o5)(),m=h&&h.getTransport(),g=h&&h.getDsn();if(!h||!m||!g||!o.sampled)return(0,tO.XW)({});let _={type:"replay_event",replay_start_timestamp:p/1e3,timestamp:i/1e3,error_ids:u,trace_ids:d,urls:c,replay_id:t,segment_id:n,replay_type:o.sampled},y=await oi({scope:f,client:h,replayId:t,event:_});if(!y)return h.recordDroppedEvent("event_processor","replay",_),iv&&iE.info("An event processor returned `null`, will not send event."),(0,tO.XW)({});delete y.sdkProcessingMetadata;let v=(a=h.getOptions().tunnel,(0,ej.h4)((0,ej.n2)(y,(0,ej.Cj)(y),a,g),[[{type:"replay_event"},y],[{type:"replay_recording",length:"string"==typeof l?new TextEncoder().encode(l).length:l.length},l]]));try{s=await m.send(v)}catch(t){let e=Error(nE);try{e.cause=t}catch(e){}throw e}if("number"==typeof s.statusCode&&(s.statusCode<200||s.statusCode>=300))throw new oa(s.statusCode);let b=(0,tR.wq)({},s);if((0,tR.Jz)(b,"replay"))throw new os(b);return s}class oa extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class os extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function ol(e,t={count:0,interval:5e3}){let{recordingData:n,onError:r}=e;if(n.length)try{return await oo(e),!0}catch(n){if(n instanceof oa||n instanceof os)throw n;if((0,k.o)("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){let e=Error(`${nE} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise((n,r)=>{(0,tL.wg)(async()=>{try{await ol(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}let oc="__THROTTLED";class ou{constructor({options:e,recordingOptions:t}){ou.prototype.__init.call(this),ou.prototype.__init2.call(this),ou.prototype.__init3.call(this),ou.prototype.__init4.call(this),ou.prototype.__init5.call(this),ou.prototype.__init6.call(this),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){let r,i,o,a=n&&n.maxWait?Math.max(n.maxWait,t):0;function s(){return l(),r=e()}function l(){void 0!==i&&clearTimeout(i),void 0!==o&&clearTimeout(o),i=o=void 0}function c(){return i&&clearTimeout(i),i=(0,tL.wg)(s,t),a&&void 0===o&&(o=(0,tL.wg)(s,a)),r}return c.cancel=l,c.flush=function(){return void 0!==i||void 0!==o?s():r},c}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e){let t=new Map,n=!1;return(...r)=>{let i,o=Math.floor(Date.now()/1e3);if(i=o-5,t.forEach((e,n)=>{n<i&&t.delete(n)}),[...t.values()].reduce((e,t)=>e+t,0)>=300){let e=n;return n=!0,e?"__SKIPPED":oc}n=!1;let a=t.get(o)||0;return t.set(o,a+1),e(...r)}}((e,t)=>iU(this,e)?i$(this,e,t):Promise.resolve(null));const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(i&&(this.clickDetector=new ir(this,i)),iv){const t=e._experiments;iE.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){iv&&iE.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){iv&&iE.exception(Error("Unable to initialize and create session"));return}!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",iv&&iE.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode){iv&&iE.info("Recording is already in progress");return}if(this._isEnabled&&"buffer"===this.recordingMode){iv&&iE.info("Buffering is in progress, call `flush()` to save the replay");return}iv&&iE.infoTick("Starting replay in session mode"),this._updateUserActivity();let e=iP({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){iv&&iE.info("Buffering is in progress, call `flush()` to save the replay");return}iv&&iE.infoTick("Starting replay in buffer mode");let e=iP({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{var e;let t,n=this._canvas;this._stopRecording=r5({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:(e=this,t=!1,(n,r)=>{if(!e.checkAndHandleExpiredSession()){iv&&iE.warn("Received replay event after session expired.");return}let i=r||!t;t=!0,e.clickDetector&&function(e,t){try{var n;if(n=t,3!==n.type)return;let{source:r}=t.data;if(it.has(r)&&e.registerMutation(t.timestamp),r===rk.Scroll&&e.registerScroll(t.timestamp),t.data.source===rk.MouseInteraction){let{type:n,id:r}=t.data,i=r5.mirror.getNode(r);i instanceof HTMLElement&&n===rx.Click&&e.registerClick(i)}}catch(e){}}(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&i&&e.setInitialState(),!ij(e,n,i))return!0;if(!i)return!1;let t=e.session;if(function(e,t){if(t&&e.session&&0===e.session.segmentId){let t;ij(e,(t=e.getOptions(),{type:rE.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}}}),!1)}}(e,i),"buffer"===e.recordingMode&&t&&e.eventBuffer){let n=e.eventBuffer.getEarliestTimestamp();n&&(iv&&iE.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&iD(t))}return!!t&&!!t.previousSessionId||("session"===e.recordingMode&&e.flush(),!0)})}),.../iPhone|iPad|iPod/i.test(or&&or.userAgent||"")||/Macintosh/i.test(or&&or.userAgent||"")&&or&&or.maxTouchPoints&&or.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler,...n?{recordCanvas:n.recordCanvas,getCanvasManager:n.getCanvasManager,sampling:n.sampling,dataURLOptions:n.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{iv&&iE.info(`Stopping Replay${t?` triggered by ${t}`:""}`),iq(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if(iM())try{nw.sessionStorage.removeItem(nS)}catch(e){}}(),this.session=void 0}catch(e){this.handleException(e)}}}pause(){!this._isPaused&&(this._isPaused=!0,this.stopRecording(),iv&&iE.info("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),iv&&iE.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();let t=Date.now();iv&&iE.info("Converting buffer to session"),await this.flushImmediate();let 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){let t=e();"buffer"===this.recordingMode||!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"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&&this.session.id}checkAndHandleExpiredSession(){return this._lastActivity&&iN(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled?void this.pause():!!this._checkSession()}setInitialState(){let e=`${nw.location.pathname}${nw.location.hash}${nw.location.search}`,t=`${nw.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){let n=this._throttledAddEvent(e,t);if(n===oc){let e=ia({category:"replay.throttled"});this.addUpdate(()=>!ij(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||(0,O.Bk)(),t=e&&(0,O.zU)(e),n=(t&&(0,O.et)(t).data||{})[w.i_];if(t&&n&&["route","custom"].includes(n))return(0,O.et)(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=function(e){try{let t=e||function(){if("u"<typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__){let e;return 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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==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=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},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,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,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+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(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;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']),URL.createObjectURL(e)}return""}();if(!t)return;iv&&iE.info(`Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new iI(n)}catch(e){iv&&iE.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return iv&&iE.info("Using simple buffer"),new ix}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=iP({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;let e=this.session;return!iF(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{nw.document.addEventListener("visibilitychange",this._handleVisibilityChange),nw.addEventListener("blur",this._handleWindowBlur),nw.addEventListener("focus",this._handleWindowFocus),nw.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(e){let t,n=(0,L.KU)();(0,nv.i)(t=>{var n,r;if(!e.isEnabled())return;let i=function(e){let{target:t,message:n}=function(e){let t,n="click"===e.name,r=null;try{r=n?r9(e.event):ie(e.event),t=(0,tI.Hd)(r,{maxStringLength:200})||"<unknown>"}catch(e){t="<unknown>"}return{target:r,message:t}}(e);return ia({category:`ui.${e.name}`,...il(t,n)})}(t);if(!i)return;let o="click"===t.name,a=o?t.event:void 0;o&&e.clickDetector&&a&&a.target&&!a.altKey&&!a.metaKey&&!a.ctrlKey&&!a.shiftKey&&(n=e.clickDetector,r=r9(t.event),n.handleClick(i,r)),r8(e,i)}),(0,nb._)(t=>{if(!e.isEnabled())return;let n=function(e){let{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(()=>(iW(e,[n]),!1)))}),(t=(0,L.KU)())&&t.on("beforeAddBreadcrumb",t=>(function(e,t){var n;if(!e.isEnabled()||!iz(t))return;let r=(n=t,!iz(n)||["fetch","xhr","sentry.event","sentry.transaction"].includes(n.category)||n.category.startsWith("ui.")?null:"console"===n.category?function(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return ia(e);let n=!1,r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>5e3?(n=!0,`${e.slice(0,5e3)}\u{2026}`):e;if("object"==typeof e)try{let t=(0,eM.S8)(e,7);if(JSON.stringify(t).length>5e3)return n=!0,`${JSON.stringify(t,null,2).slice(0,5e3)}\u{2026}`;return t}catch(e){}return e});return ia({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(n):ia(n));r&&r8(e,r)})(e,t));let r=(0,L.KU)();try{let{networkDetailAllowUrls:t,networkDetailDenyUrls:n,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=e.getOptions(),s={replay:e,networkDetailAllowUrls:t,networkDetailDenyUrls:n,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};r&&r.on("beforeAddBreadcrumb",(e,t)=>(function(e,t,n){if(t.data)try{var r,i,o,a;r=t,"xhr"===r.category&&(i=n)&&i.xhr&&(!function(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=iG(r),o=n.getResponseHeader("content-length")?iX(n.getResponseHeader("content-length")):function(e,t){try{let n="json"===t&&e&&"object"==typeof e?JSON.stringify(e):e;return iG(n)}catch(e){return}}(n.response,n.responseType);void 0!==i&&(e.data.request_body_size=i),void 0!==o&&(e.data.response_body_size=o)}(t,n),ot(t,n,e)),o=t,"fetch"===o.category&&(a=n)&&a.response&&(!function(e,t){let{input:n,response:r}=t,i=iG(n?i8(n):void 0),o=r?iX(r.headers.get("content-length")):void 0;void 0!==i&&(e.data.request_body_size=i),void 0!==o&&(e.data.response_body_size=o)}(t,n),i3(t,n,e))}catch(e){iv&&iE.exception(e,"Error when enriching network breadcrumb")}})(s,e,t))}catch(e){}let i=Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:"replay_event"===t.type?(delete t.breadcrumbs,t):!t.type||iH(t)||iB(t)?e.checkAndHandleExpiredSession()?iB(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:rE.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)),t):!t.type&&t.exception&&t.exception.values&&t.exception.values.length&&n.originalException&&n.originalException.__rrweb__&&!e.getOptions()._experiments.captureExceptions?(iv&&iE.log("Ignoring error from rrweb internals",t),null):(("buffer"===e.recordingMode&&t.message!==nE&&t.exception&&!t.type&&iO(e.getOptions().errorSampleRate)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(iq(),t):t,{id:"Replay"});(0,k.SA)(i),n&&(n.on("beforeSendEvent",t=>{var n,r;let i;e.isEnabled()&&!t.type&&(n=e,i=(r=t).exception&&r.exception.values&&r.exception.values[0]&&r.exception.values[0].value,"string"==typeof i&&(i.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||i.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&r8(n,ia({category:"replay.hydrate-error",data:{url:(0,tI.$N)()}})))}),n.on("afterSendEvent",(t,n)=>{if(!e.isEnabled()||t.type&&!iH(t))return;let r=n&&n.statusCode;if(r&&!(r<200)&&!(r>=300)){if(iH(t)){var i,o;let n;return void(i=e,o=t,n=i.getContext(),o.contexts&&o.contexts.trace&&o.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(o.contexts.trace.trace_id))}!function(e,t){let 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;let{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&(0,tL.wg)(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t)}}),n.on("createDsc",t=>{let 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",(t,n)=>{let r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)}))}(this),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)}let r=[];return["navigation","paint","resource"].forEach(e=>{r.push(nc(e,n))}),r.push(na(iu(ih,e)),no(iu(im,e)),ns(iu(ig,e)),nl(iu(i_,e))),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{nw.document.removeEventListener("visibilitychange",this._handleVisibilityChange),nw.removeEventListener("blur",this._handleWindowBlur),nw.removeEventListener("focus",this._handleWindowFocus),nw.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===nw.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let e=ia({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{let e=ia({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=function(e){var t;let{metaKey:n,shiftKey:r,ctrlKey:i,altKey:o,key:a,target:s}=e;if(!s||"INPUT"===(t=s).tagName||"TEXTAREA"===t.tagName||t.isContentEditable||!a)return null;let l=n||i||o,c=1===a.length;if(!l&&c)return null;let u=(0,tI.Hd)(s,{maxStringLength:200})||"<unknown>",d=il(s,u);return ia({category:"ui.keyDown",message:u,data:{...d.data,metaKey:n,shiftKey:r,ctrlKey:i,altKey:o,key:a}})}(t);n&&r8(e,n)}(this,e)}}_doChangeToBackgroundTasks(e){!this.session||iL(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){iv&&iE.info("Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}}_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:rE.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=this.performanceEntries.map(id).filter(Boolean).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(iW(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){iv&&iE.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents){if((await on(this),this.eventBuffer)&&e===this.getSessionId())try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw Error("Session is too long, not sending replay");let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await ol({replayId:e,recordingData:i,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(t){this.handleException(t),this.stop({reason:"sendReplay"});let e=(0,L.KU)();e&&e.recordDroppedEvent(t instanceof os?"ratelimit_backoff":"send_error","replay")}}}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){iv&&iE.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){iv&&iE.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),r&&this._debouncedFlush();return}let o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&iv&&iE.info("Flushing initial segment without checkout.");let a=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,a&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&iD(this.session)}__init6(){this._onMutationHandler=e=>{let t=e.length,n=this._options.mutationLimit,r=this._options.mutationBreadcrumbLimit,i=n&&t>n;if(t>r||i){let e=ia({category:"replay.mutations",data:{count:t,limit:i}});this._createCustomBreadcrumb(e)}return!i||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function od(e,t){return[...e,...t].join(",")}let op='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',oh=["content-length","content-type","accept"],of=!1,om=e=>new og(e);class og{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:s={},maskAllText:l=!0,maskAllInputs:c=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:y=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:w=["title","placeholder"],unmask:S=[],block:E=[],unblock:k=[],ignore:x=[],maskFn:T,beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M}={}){this.name=og.id;const O=function({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:od(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:od(t,[]),blockSelector:od(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:od(r,[]),ignoreSelector:od(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:b,unmask:S,block:E,unblock:k,ignore:x});if(this._recordingOptions={maskAllInputs:c,maskAllText:l,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>(function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o})({maskAttributes:w,maskAllText:l,privacyOptions:O,key:e,value:t,el:n}),...O,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,36e5),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:u,maskAllInputs:c,maskAllText:l,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:f,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:o_(y),networkResponseHeaders:o_(v),beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${op}`:op),this._isInitialized&&tN())throw Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return of}set _isInitialized(e){of=e}afterAllSetup(e){tN()&&!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&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){var t;let n,r,i,o,a=(t=this._initialOptions,n=e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...(0,B.Ce)(t)},i=(0,Z.i)(n.replaysSessionSampleRate),o=(0,Z.i)(n.replaysOnErrorSampleRate),null==i&&null==o&&(0,M.pq)(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),null!=i&&(r.sessionSampleRate=i),null!=o&&(r.errorSampleRate=o),r);this._replay=new ou({options:a,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(e){}}}function o_(e){return[...oh,...e.map(e=>e.toLowerCase())]}function oy(){let e=(0,L.KU)();return e&&e.getIntegrationByName("Replay")}function ov(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ov(e.parentNode,t,n,r+1)}function ob(e,t){return n=>{if(null===n)return!1;try{if(e){if("string"==typeof e){if(n.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}(n,e))return!0}if(t&&n.matches(t))return!0;return!1}catch(e){return!1}}}og.__initStatic(),(a_=aE||(aE={}))[a_.Document=0]="Document",a_[a_.DocumentType=1]="DocumentType",a_[a_.Element=2]="Element",a_[a_.Text=3]="Text",a_[a_.CDATA=4]="CDATA",a_[a_.Comment=5]="Comment";let ow="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.",oS={map:{},getId:()=>(console.error(ow),-1),getNode:()=>(console.error(ow),null),removeNodeFromMap(){console.error(ow)},has:()=>(console.error(ow),!1),reset(){console.error(ow)}};function oE(e,t,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){oM(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>oE(e,t,o||{},!0)}function ok(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}function ox(e,t,n,r,i){if(!e)return!1;let o=e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null;if(!o)return!1;let a=ov(o,ob(t,n)),s=-1;return!(a<0)&&(r&&(s=ov(o,ob(null,r))),a>-1&&s<0||a<s)}"u">typeof window&&window.Proxy&&window.Reflect&&(oS=new Proxy(oS,{get:(e,t,n)=>("map"===t&&console.error(ow),Reflect.get(e,t,n))})),/[1-9][0-9]{12}/.test(Date.now().toString());let oT={};function oC(e){let t=oT[e];if(t)return t;let n=window.document,r=window[e];if(n&&"function"==typeof n.createElement)try{let t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch(e){}return oT[e]=r.bind(window)}function oI(...e){return oC("requestAnimationFrame")(...e)}function oM(...e){return oC("setTimeout")(...e)}var oO=((ay=oO||{})[ay["2D"]=0]="2D",ay[ay.WebGL=1]="WebGL",ay[ay.WebGL2=2]="WebGL2",ay);let oR=e=>m?(...t)=>{try{return e(...t)}catch(e){if(m&&!0===m(e))return()=>{};throw e}}:e;for(var oD="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oA="u"<typeof Uint8Array?[]:new Uint8Array(256),oN=0;oN<oD.length;oN++)oA[oD.charCodeAt(oN)]=oN;var oL=function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=oD[n[t]>>2],i+=oD[(3&n[t])<<4|n[t+1]>>4],i+=oD[(15&n[t+1])<<2|n[t+2]>>6],i+=oD[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i};let oF=new Map,oP=(e,t,n)=>{let r;if(!e||!(o$(e,t)||"object"==typeof e))return;let i=e.constructor.name,o=((r=oF.get(n))||(r=new Map,oF.set(n,r)),r.has(i)||r.set(i,[]),r.get(i)),a=o.indexOf(e);return -1===a&&(a=o.length,o.push(e)),a},oj=(e,t,n)=>e.map(e=>(function e(t,n,r){if(t instanceof Array)return t.map(t=>e(t,n,r));if(null===t);else if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};else if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:oL(t)};else if(t instanceof DataView)return{rr_type:t.constructor.name,args:[e(t.buffer,n,r),t.byteOffset,t.byteLength]};else if(t instanceof HTMLImageElement){let e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}else if(t instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:t.toDataURL()};else if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[e(t.data,n,r),t.width,t.height]};else if(o$(t,n)||"object"==typeof t)return{rr_type:t.constructor.name,index:oP(t,n,r)};return t})(e,t,n)),o$=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(n=>e instanceof t[n]);function oU(e,t,n,r,i){let o=[];try{let a=ok(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(o,...a){if(!ox(this,t,n,r,!0)){let e="experimental-webgl"===o?"webgl":o;if("__context"in this||(this.__context=e),i&&["webgl","webgl2"].includes(e))if(a[0]&&"object"==typeof a[0]){let e=a[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...a])}});o.push(a)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(e=>e())}}function oH(e,t,n,r,i,o,a,s){let l=[];for(let a of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if("function"!=typeof e[a])continue;let c=ok(e,a,function(e){return function(...l){let c=e.apply(this,l);if(oP(c,s,this),"tagName"in this.canvas&&!ox(this.canvas,r,i,o,!0)){let e=oj(l,s,this),r={type:t,property:a,args:e};n(this.canvas,r)}return c}});l.push(c)}catch(i){let r=oE(e,a,{set(e){n(this.canvas,{type:t,property:a,args:[e],setter:!0})}});l.push(r)}return l}class oB{reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,tC([this,"access",e=>e.worker,"optionalAccess",e=>e.terminate,"call",e=>e()]),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}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.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:i,unblockSelector:o,maxCanvasSize:a,recordCanvas:s,dataURLOptions:l,errorHandler:c}=e;if(this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,c&&function(e){m=e}(c),(s&&"number"==typeof t||e.enableManualSnapshot)&&(this.worker=this.initFPSWorker()),this.addWindow(n),e.enableManualSnapshot)return;oR(()=>{s&&"all"===t&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,i,o,a,{dataURLOptions:l})})()}addWindow(e){let{sampling:t="all",blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:o,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(e)){if(a){this.windowsSet.add(e),this.windows.push(new WeakRef(e));return}oR(()=>{if(o&&"all"===t&&this.initCanvasMutationObserver(e,n,r,i),o&&"number"==typeof t){let t=oU(e,n,r,i,!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(){let e,t=new Worker((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<r;a+=3)s+=e[n[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)}};']),URL.createObjectURL(e)));return t.onmessage=e=>{let t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!("base64"in t))return;let{base64:r,type:i,width:o,height:a}=t;this.mutationCb({id:n,type:oO["2D"],commands:[{property:"clearRect",args:[0,0,o,a]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0,o,a]}]})},t}initCanvasFPSObserver(e,t,n,r,i,o){let a=this.takeSnapshot(!1,e,t,n,r,i,o.dataURLOptions);this.restoreHandlers.push(()=>{cancelAnimationFrame(a)})}initCanvasMutationObserver(e,t,n,r){var i,o;let a,s=oU(e,t,n,r,!1),l=function(e,t,n,r,i){let o=[];for(let a of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype))try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])continue;let s=ok(t.CanvasRenderingContext2D.prototype,a,function(o){return function(...s){return ox(this.canvas,n,r,i,!0)||oM(()=>{let n=oj(s,t,this);e(this.canvas,{type:oO["2D"],property:a,args:n})},0),o.apply(this,s)}});o.push(s)}catch(r){let n=oE(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:oO["2D"],property:a,args:[t],setter:!0})}});o.push(n)}return()=>{o.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r),c=(i=this.processMutation.bind(this),o=this.mirror,(a=[]).push(...oH(e.WebGLRenderingContext.prototype,oO.WebGL,i,t,n,r,o,e)),void 0!==e.WebGL2RenderingContext&&a.push(...oH(e.WebGL2RenderingContext.prototype,oO.WebGL2,i,t,n,r,o,e)),()=>{a.forEach(e=>e())});this.restoreHandlers.push(()=>{s(),l(),c()})}snapshot(e){let{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,i,o,a,s){let l=1e3/t,c=0,u=e=>{if(e)return[e];let t=[],o=e=>{e.querySelectorAll("canvas").forEach(e=>{ox(e,n,r,i)||t.push(e)})};for(let e of this.windows){let t=e.deref();t&&o(t.document)}for(let e of this.shadowDoms){let t=e.deref();t&&o(t)}return t},d=t=>{if(this.windows.length){if(c&&t-c<l)return void oI(d);c=t,u(s).forEach(t=>{if(!this.mirror.hasNode(t))return;let 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)){let e=t.getContext(t.__context);!1===tC([e,"optionalAccess",e=>e.getContextAttributes,"call",e=>e(),"optionalAccess",e=>e.preserveDrawingBuffer])&&e.clear(e.COLOR_BUFFER_BIT)}createImageBitmap(t).then(e=>{tC([this,"access",e=>e.worker,"optionalAccess",e=>e.postMessage,"call",r=>r({id:n,bitmap:e,width:t.width,height:t.height,dataURLOptions:a,maxCanvasSize:o},[e])])}).catch(e=>{oR(()=>{throw e})()})}}),e||oI(d)}};return oI(d)}startPendingCanvasMutationFlusher(){oI(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,oI(e)};oI(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),oI(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}let oz={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}}},oq=(0,x._C)((e={})=>{let t,[n,r]=e.maxCanvasSize||[],i={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[n?Math.min(n,1280):1280,r?Math.min(r,1280):1280]},o=new Promise(e=>t=e);return{name:"ReplayCanvas",getOptions(){let{quality:e,enableManualSnapshot:n,maxCanvasSize:r}=i;return{enableManualSnapshot:n,recordCanvas:!0,getCanvasManager:e=>{let i=new oB({...e,enableManualSnapshot:n,maxCanvasSize:r,errorHandler:e=>{try{"object"==typeof e&&(e.__rrweb__=!0)}catch(e){}}});return t(i),i},...oz[e||"medium"]||oz.medium}},async snapshot(e){(await o).snapshot(e)}}}),oW=U.O,oK=oW.document,oG=oW.navigator,oX="Report a Bug",oJ="Cancel",oV="Send Bug Report",oY="Confirm",oQ="Report a Bug",oZ="your.email@example.org",o0="Email",o1="What's the bug? What did you expect?",o2="Description",o3="Your Name",o5="Name",o6="Thank you for your report!",o4="(required)",o8="Add a screenshot",o7="Remove screenshot",o9=(e,t={includeReplay:!0})=>{if(!e.message)throw Error("Unable to submit feedback with empty message");let n=(0,L.KU)();if(!n)throw Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&(0,L.o5)().setTags(e.tags);let r=z({source:"api",url:(0,tI.$N)(),...e},t);return new Promise((e,t)=>{let i=setTimeout(()=>t("Unable to determine if Feedback was correctly sent."),5e3),o=n.on("afterSendEvent",(n,a)=>{if(n.event_id===r)return(clearTimeout(i),o(),a&&"number"==typeof a.statusCode&&a.statusCode>=200&&a.statusCode<300)?e(r):a&&"number"==typeof a.statusCode&&0===a.statusCode?t("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):a&&"number"==typeof a.statusCode&&403===a.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")})})},ae="u"<typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function at(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen&&t.onFormOpen(),e.onFormOpen&&e.onFormOpen()},onFormClose:()=>{t.onFormClose&&t.onFormClose(),e.onFormClose&&e.onFormClose()},onSubmitSuccess:n=>{t.onSubmitSuccess&&t.onSubmitSuccess(n),e.onSubmitSuccess&&e.onSubmitSuccess(n)},onSubmitError:n=>{t.onSubmitError&&t.onSubmitError(n),e.onSubmitError&&e.onSubmitError(n)},onFormSubmitted:()=>{t.onFormSubmitted&&t.onFormSubmitted(),e.onFormSubmitted&&e.onFormSubmitted()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function an(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}let ar="rgba(88, 74, 192, 1)",ai={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:ar,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%)"},ao={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:ar,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 aa(e){return`
--foreground: ${e.foreground};
--background: ${e.background};
--accent-foreground: ${e.accentForeground};
--accent-background: ${e.accentBackground};
--success-color: ${e.successColor};
--error-color: ${e.errorColor};
--border: ${e.border};
--box-shadow: ${e.boxShadow};
--outline: ${e.outline};
--interactive-filter: ${e.interactiveFilter};
`}let as=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:r="sentry-feedback",autoInject:i=!0,showBranding:o=!0,isEmailRequired:a=!1,isNameRequired:s=!1,showEmail:l=!0,showName:c=!0,enableScreenshot:u=!0,useSentryUser:d={email:"email",name:"username"},tags:p,styleNonce:h,scriptNonce:f,colorScheme:m="system",themeLight:g={},themeDark:_={},addScreenshotButtonLabel:y=o8,cancelButtonLabel:v=oJ,confirmButtonLabel:b=oY,emailLabel:w=o0,emailPlaceholder:S=oZ,formTitle:E=oQ,isRequiredLabel:k=o4,messageLabel:T=o2,messagePlaceholder:C=o1,nameLabel:I=o5,namePlaceholder:O=o3,removeScreenshotButtonLabel:R=o7,submitButtonLabel:D=oV,successMessageText:A=o6,triggerLabel:N=oX,triggerAriaLabel:L="",onFormOpen:F,onFormClose:P,onSubmitSuccess:j,onSubmitError:$,onFormSubmitted:U}={})=>{let H={id:r,autoInject:i,showBranding:o,isEmailRequired:a,isNameRequired:s,showEmail:l,showName:c,enableScreenshot:u,useSentryUser:d,tags:p,styleNonce:h,scriptNonce:f,colorScheme:m,themeDark:_,themeLight:g,triggerLabel:N,triggerAriaLabel:L,cancelButtonLabel:v,submitButtonLabel:D,confirmButtonLabel:b,formTitle:E,emailLabel:w,emailPlaceholder:S,messageLabel:T,messagePlaceholder:C,nameLabel:I,namePlaceholder:O,successMessageText:A,isRequiredLabel:k,addScreenshotButtonLabel:y,removeScreenshotButtonLabel:R,onFormClose:P,onFormOpen:F,onSubmitError:$,onSubmitSuccess:j,onFormSubmitted:U},B=null,z=[],q=e=>{if(!B){let t=oK.createElement("div");t.id=String(e.id),oK.body.appendChild(t),(B=t.attachShadow({mode:"open"})).appendChild(function({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){let i=oK.createElement("style");return i.textContent=`
:host {
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
--font-size: 14px;
--z-index: 100000;
--page-margin: 16px;
--inset: auto 0 0 auto;
--actor-inset: var(--inset);
font-family: var(--font-family);
font-size: var(--font-size);
${"system"!==e?"color-scheme: only light;":""}
${aa("dark"===e?{...ao,...t}:{...ai,...n})}
}
${"system"===e?`
@media (prefers-color-scheme: dark) {
:host {
${aa({...ao,...t})}
}
}`:""}
}
`,r&&i.setAttribute("nonce",r),i}(e))}return B},W=async r=>{let i,o,a=r.enableScreenshot&&!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(oG.userAgent)||/Macintosh/i.test(oG.userAgent)&&oG.maxTouchPoints&&oG.maxTouchPoints>1)&&!!isSecureContext;try{i=(t?t():await e("feedbackModalIntegration",f))(),(0,x.Q8)(i)}catch(e){throw ae&&M.vF.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),Error("[Feedback] Missing feedback modal integration!")}try{let t=a?n?n():await e("feedbackScreenshotIntegration",f):void 0;t&&(o=t(),(0,x.Q8)(o))}catch(e){ae&&M.vF.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}let s=i.createDialog({options:{...r,onFormClose:()=>{s&&s.close(),r.onFormClose&&r.onFormClose()},onFormSubmitted:()=>{s&&s.close(),r.onFormSubmitted&&r.onFormSubmitted()}},screenshotIntegration:o,sendFeedback:o9,shadow:q(r)});return s},K=(e,t={})=>{let n=at(H,t),r="string"==typeof e?oK.querySelector(e):"function"==typeof e.addEventListener?e:null;if(!r)throw ae&&M.vF.error("[Feedback] Unable to attach to target element"),Error("Unable to attach to target element");let i=null,o=async()=>{i||(i=await W({...n,onFormSubmitted:()=>{i&&i.removeFromDom(),n.onFormSubmitted&&n.onFormSubmitted()}})),i.appendToDom(),i.open()};r.addEventListener("click",o);let a=()=>{z=z.filter(e=>e!==a),i&&i.removeFromDom(),i=null,r.removeEventListener("click",o)};return z.push(a),a},G=(e={})=>{let t=at(H,e),n=q(t),r=function({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){let i,o,a,s,l,c,u,d,p=oK.createElement("button");if(p.type="button",p.className="widget__actor",p.ariaHidden="false",p.ariaLabel=t||e||oX,p.appendChild((o=an((i=e=>oW.document.createElementNS("http://www.w3.org/2000/svg",e))("svg"),{width:"20",height:"20",viewBox:"0 0 20 20",fill:"var(--actor-color, var(--foreground))"}),a=an(i("g"),{clipPath:"url(#clip0_57_80)"}),s=an(i("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"}),o.appendChild(a).appendChild(s),l=i("defs"),c=an(i("clipPath"),{id:"clip0_57_80"}),u=an(i("rect"),{width:"20",height:"20",fill:"white"}),c.appendChild(u),l.appendChild(c),o.appendChild(l).appendChild(c).appendChild(u),o)),e){let t=oK.createElement("span");t.appendChild(oK.createTextNode(e)),p.appendChild(t)}let h=((d=oK.createElement("style")).textContent=`
.widget__actor {
position: fixed;
z-index: var(--z-index);
margin: var(--page-margin);
inset: var(--actor-inset);
display: flex;
align-items: center;
gap: 8px;
padding: 16px;
font-family: inherit;
font-size: var(--font-size);
font-weight: 600;
line-height: 1.14em;
text-decoration: none;
background: var(--actor-background, var(--background));
border-radius: var(--actor-border-radius, 1.7em/50%);
border: var(--actor-border, var(--border));
box-shadow: var(--actor-box-shadow, var(--box-shadow));
color: var(--actor-color, var(--foreground));
fill: var(--actor-color, var(--foreground));
cursor: pointer;
opacity: 1;
transition: transform 0.2s ease-in-out;
transform: translate(0, 0) scale(1);
}
.widget__actor[aria-hidden="true"] {
opacity: 0;
pointer-events: none;
visibility: hidden;
transform: translate(0, 16px) scale(0.98);
}
.widget__actor:hover {
background: var(--actor-hover-background, var(--background));
filter: var(--interactive-filter);
}
.widget__actor svg {
width: 1.14em;
height: 1.14em;
}
@media (max-width: 600px) {
.widget__actor span {
display: none;
}
}
`,r&&d.setAttribute("nonce",r),d);return{el:p,appendToDom(){n.appendChild(h),n.appendChild(p)},removeFromDom(){n.removeChild(p),n.removeChild(h)},show(){p.ariaHidden="false"},hide(){p.ariaHidden="true"}}}({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:h});return K(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:"Feedback",setupOnce(){tN()&&H.autoInject&&("loading"===oK.readyState?oK.addEventListener("DOMContentLoaded",()=>G().appendToDom()):G().appendToDom())},attachTo:K,createWidget(e={}){let t=G(at(H,e));return t.appendToDom(),t},createForm:async(e={})=>W(at(H,e)),remove(){B&&(B.parentElement&&B.parentElement.remove(),B=null),z.forEach(e=>e()),z=[]}}};function al(){let e=(0,L.KU)();return e&&e.getIntegrationByName("Feedback")}var ac,au,ad,ap,ah,af,am,ag,a_,ay,av,ab,aw,aS,aE,ak,ax,aT,aC,aI,aM,aO,aR={},aD=[],aA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,aN=Array.isArray;function aL(e,t){for(var n in t)e[n]=t[n];return e}function aF(e){var t=e.parentNode;t&&t.removeChild(e)}function aP(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?ak.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return aj(e,a,r,i,null)}function aj(e,t,n,r,i){var o={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==i?++aT:i,__i:-1,__u:0};return null==i&&null!=ax.vnode&&ax.vnode(o),o}function a$(e){return e.children}function aU(e,t){this.props=e,this.context=t}function aH(e,t){if(null==t)return e.__?aH(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?aH(e):null}function aB(e){(!e.__d&&(e.__d=!0)&&aC.push(e)&&!az.__r++||aI!==ax.debounceRendering)&&((aI=ax.debounceRendering)||aM)(az)}function az(){var e,t,n,r=[],i=[];for(aC.sort(aO);e=aC.shift();)e.__d&&(n=aC.length,t=function(e,t,n){var r,i=e.__v,o=i.__e,a=e.__P;if(a)return(r=aL({},i)).__v=i.__v+1,ax.vnode&&ax.vnode(r),aJ(a,r,i,e.__n,void 0!==a.ownerSVGElement,32&i.__u?[o]:null,t,null==o?aH(i):o,!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&function e(t){var n,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(r=t.__k[n])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return e(t)}}(r),r}(e,r,i)||t,0===n||aC.length>n?(aV(r,t,i),i.length=r.length=0,t=void 0,aC.sort(aO)):t&&ax.__c&&ax.__c(t,aD));t&&aV(r,t,i),az.__r=0}function aq(e,t,n,r,i,o,a,s,l,c,u){var d,p,h,f,m,g=r&&r.__k||aD,_=t.length;for(n.__d=l,function(e,t,n){var r,i,o,a,s,l=t.length,c=n.length,u=c,d=0;for(e.__k=[],r=0;r<l;r++)null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?aj(null,i,null,null,i):aN(i)?aj(a$,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?aj(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,s=function(e,t,n,r){var i=e.key,o=e.type,a=n-1,s=n+1,l=t[n];if(null===l||l&&i==l.key&&o===l.type)return n;if(r>+(null!=l&&0==(131072&l.__u)))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&0==(131072&l.__u)&&i==l.key&&o===l.type)return a;a--}if(s<t.length){if((l=t[s])&&0==(131072&l.__u)&&i==l.key&&o===l.type)return s;s++}}return -1}(i,n,a=r+d,u),i.__i=s,o=null,-1!==s&&(u--,(o=n[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&d--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?d++:s>a?u>l-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==r+d&&(i.__u|=65536))):(o=n[r])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=aH(o)),aQ(o,o,!1),n[r]=null,u--);if(u)for(r=0;r<c;r++)null!=(o=n[r])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=aH(o)),aQ(o,o))}(n,t,g),l=n.__d,d=0;d<_;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(p=-1===h.__i?aR:g[h.__i]||aR,h.__i=d,aJ(e,h,p,i,o,a,s,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&aY(p.ref,null,h),u.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),65536&h.__u||p.__k===h.__k?l=function e(t,n,r){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,n=e(i[o],n,r));return n}t.__e!=n&&(r.insertBefore(t.__e,n||null),n=t.__e);do n=n&&n.nextSibling;while(null!=n&&8===n.nodeType);return n}(h,l,e):"function"==typeof h.type&&void 0!==h.__d?l=h.__d:f&&(l=f.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=m}function aW(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||aA.test(t)?n:n+"px"}function aK(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||aW(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||aW(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?aX:aG,o)):e.removeEventListener(t,o?aX:aG,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function aG(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(ax.event?ax.event(e):e)}}function aX(e){if(this.l)return this.l[e.type+!0](ax.event?ax.event(e):e)}function aJ(e,t,n,r,i,o,a,s,l,c){var u,d,p,h,f,m,g,_,y,v,b,w,S,E,k,x=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[s=t.__e=n.__e]),(u=ax.__b)&&u(t);e:if("function"==typeof x)try{if(_=t.props,y=(u=x.contextType)&&r[u.__c],v=u?y?y.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in x&&x.prototype.render?t.__c=d=new x(_,v):(t.__c=d=new aU(_,v),d.constructor=x,d.render=aZ),y&&y.sub(d),d.props=_,d.state||(d.state={}),d.context=v,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=x.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=aL({},d.__s)),aL(d.__s,x.getDerivedStateFromProps(_,d.__s))),h=d.props,f=d.state,d.__v=t,p)null==x.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==x.getDerivedStateFromProps&&_!==h&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(_,v),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(_,d.__s,v)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(_,d.__s,v),null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(h,f,m)})}if(d.context=v,d.props=_,d.__P=e,d.__e=!1,w=ax.__r,S=0,"prototype"in x&&x.prototype.render){for(d.state=d.__s,d.__d=!1,w&&w(t),u=d.render(d.props,d.state,d.context),E=0;E<d._sb.length;E++)d.__h.push(d._sb[E]);d._sb=[]}else do d.__d=!1,w&&w(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(r=aL(aL({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),aq(e,aN(k=null!=u&&u.type===a$&&null==u.key?u.props.children:u)?k:[k],t,n,r,i,o,a,s,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,l||null!=o?(t.__e=s,t.__u|=l?160:32,o[o.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),ax.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,a,s,l){var c,u,d,p,h,f,m,g=n.props,_=t.props,y=t.type;if("svg"===y&&(i=!0),null!=o){for(c=0;c<o.length;c++)if((h=o[c])&&"setAttribute"in h==!!y&&(y?h.localName===y:3===h.nodeType)){e=h,o[c]=null;break}}if(null==e){if(null===y)return document.createTextNode(_);e=i?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,_.is&&_),o=null,s=!1}if(null===y)g===_||s&&e.data===_||(e.data=_);else{if(o=o&&ak.call(e.childNodes),g=n.props||aR,!s&&null!=o)for(g={},c=0;c<e.attributes.length;c++)g[(h=e.attributes[c]).name]=h.value;for(c in g)h=g[c],"children"==c||("dangerouslySetInnerHTML"==c?d=h:"key"===c||c in _||aK(e,c,null,h,i));for(c in _)h=_[c],"children"==c?p=h:"dangerouslySetInnerHTML"==c?u=h:"value"==c?f=h:"checked"==c?m=h:"key"===c||s&&"function"!=typeof h||g[c]===h||aK(e,c,h,g[c],i);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),aq(e,aN(p)?p:[p],t,n,r,i&&"foreignObject"!==y,o,a,o?o[0]:n.__k&&aH(n,0),s,l),null!=o)for(c=o.length;c--;)null!=o[c]&&aF(o[c]);s||(c="value",void 0===f||f===e[c]&&("progress"!==y||f)&&("option"!==y||f===g[c])||aK(e,c,f,g[c],!1),c="checked",void 0!==m&&m!==e[c]&&aK(e,c,m,g[c],!1))}return e}(n.__e,t,n,r,i,o,a,l,c);(u=ax.diffed)&&u(t)}function aV(e,t,n){for(var r=0;r<n.length;r++)aY(n[r],n[++r],n[++r]);ax.__c&&ax.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){ax.__e(e,t.__v)}})}function aY(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){ax.__e(e,n)}}function aQ(e,t,n){var r,i;if(ax.unmount&&ax.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||aY(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){ax.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&aQ(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||aF(e.__e),e.__=e.__e=e.__d=void 0}function aZ(e,t,n){return this.constructor(e,n)}ak=aD.slice,ax={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},aT=0,aU.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=aL({},this.state),"function"==typeof e&&(e=e(aL({},n),this.props)),e&&aL(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),aB(this))},aU.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),aB(this))},aU.prototype.render=a$,aC=[],aM="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,aO=function(e,t){return e.__v.__b-t.__v.__b},az.__r=0;var a0,a1,a2,a3,a5=0,a6=[],a4=[],a8=ax,a7=a8.__b,a9=a8.__r,se=a8.diffed,st=a8.__c,sn=a8.unmount,sr=a8.__;function si(e,t){a8.__h&&a8.__h(a1,e,a5||t),a5=0;var n=a1.__H||(a1.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:a4}),n.__[e]}function so(e){return a5=1,sa(sm,e)}function sa(e,t,n){var r=si(a0++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):sm(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=a1,!a1.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!o||o.call(this,e,t,n);var a=!1;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),!(!a&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};a1.u=!0;var o=a1.shouldComponentUpdate,a=a1.componentWillUpdate;a1.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}a&&a.call(this,e,t,n)},a1.shouldComponentUpdate=i}return r.__N||r.__}function ss(e,t){var n=si(a0++,4);!a8.__s&&sf(n.__H,t)&&(n.__=e,n.i=t,a1.__h.push(n))}function sl(e,t){var n=si(a0++,7);return sf(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function sc(e,t){return a5=8,sl(function(){return e},t)}function su(){for(var e;e=a6.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(sp),e.__H.__h.forEach(sh),e.__H.__h=[]}catch(t){e.__H.__h=[],a8.__e(t,e.__v)}}a8.__b=function(e){a1=null,a7&&a7(e)},a8.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),sr&&sr(e,t)},a8.__r=function(e){a9&&a9(e),a0=0;var t=(a1=e.__c).__H;t&&(a2===a1?(t.__h=[],a1.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=a4,e.__N=e.i=void 0})):(t.__h.forEach(sp),t.__h.forEach(sh),t.__h=[],a0=0)),a2=a1},a8.diffed=function(e){se&&se(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==a6.push(t)&&a3===a8.requestAnimationFrame||((a3=a8.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),sd&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);sd&&(t=requestAnimationFrame(n))})(su)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==a4&&(e.__=e.__V),e.i=void 0,e.__V=a4})),a2=a1=null},a8.__c=function(e,t){t.some(function(e){try{e.__h.forEach(sp),e.__h=e.__h.filter(function(e){return!e.__||sh(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],a8.__e(n,e.__v)}}),st&&st(e,t)},a8.unmount=function(e){sn&&sn(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{sp(e)}catch(e){t=e}}),n.__H=void 0,t&&a8.__e(t,n.__v))};var sd="function"==typeof requestAnimationFrame;function sp(e){var t=a1,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),a1=t}function sh(e){var t=a1;e.__c=e.__(),a1=t}function sf(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function sm(e,t){return"function"==typeof t?t(e):t}let sg={__proto__:null,useCallback:sc,useContext:function(e){var t=a1.context[e.__c],n=si(a0++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(a1)),t.props.value):e.__},useDebugValue:function(e,t){a8.useDebugValue&&a8.useDebugValue(t?t(e):e)},useEffect:function(e,t){var n=si(a0++,3);!a8.__s&&sf(n.__H,t)&&(n.__=e,n.i=t,a1.__H.__h.push(n))},useErrorBoundary:function(e){var t=si(a0++,10),n=so();return t.__=e,a1.componentDidCatch||(a1.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:function(){var e=si(a0++,11);if(!e.__){for(var t=a1.__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){a5=6,ss(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:ss,useMemo:sl,useReducer:sa,useRef:function(e){return a5=5,sl(function(){return{current:e}},[])},useState:so};function s_({options:e}){let t=sl(()=>{let e,t;return{__html:(e=an(oK.createElementNS("http://www.w3.org/2000/svg","svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),t=an(oK.createElementNS("http://www.w3.org/2000/svg","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"}),e.appendChild(t),e).outerHTML}},[]);return aP("h2",{class:"dialog__header"},aP("span",{class:"dialog__title"},e.formTitle),e.showBranding?aP("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function sy(e,t){let n=e.get(t);return"string"==typeof n?n.trim():""}function sv({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:o,onSubmitError:a,showEmail:s,showName:l,screenshotInput:c}){let{tags:u,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:p,cancelButtonLabel:h,emailLabel:f,emailPlaceholder:m,isEmailRequired:g,isNameRequired:_,messageLabel:y,messagePlaceholder:v,nameLabel:b,namePlaceholder:w,submitButtonLabel:S,isRequiredLabel:E}=e,[k,x]=so(null),[T,C]=so(!1),I=c&&c.input,[O,R]=so(null),D=sc(e=>{R(e),C(!1)},[]),A=sc(e=>{var t;let n,r=(n=[],(t={emailLabel:f,isEmailRequired:g,isNameRequired:_,messageLabel:y,nameLabel:b}).isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n);return r.length>0?x(`Please enter in the following required fields: ${r.join(", ")}`):x(null),0===r.length},[f,g,_,y,b]);return aP("form",{class:"form",onSubmit:sc(async e=>{try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;let t=new FormData(e.target),n=await (c&&T?c.value():void 0),r={name:sy(t,"name"),email:sy(t,"email"),message:sy(t,"message"),attachments:n?[n]:void 0};if(!A(r))return;try{await i({name:r.name,email:r.email,message:r.message,source:"widget",tags:u},{attachments:r.attachments}),o(r)}catch(e){ae&&M.vF.error(e),x(e),a(e)}}catch(e){}},[c&&T,o,a])},I&&T?aP(I,{onError:D}):null,aP("div",{class:"form__right","data-sentry-feedback":!0},aP("div",{class:"form__top"},k?aP("div",{class:"form__error-container"},k):null,l?aP("label",{for:"name",class:"form__label"},aP(sb,{label:b,isRequiredLabel:E,isRequired:_}),aP("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:w,required:_,type:"text"})):aP("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),s?aP("label",{for:"email",class:"form__label"},aP(sb,{label:f,isRequiredLabel:E,isRequired:g}),aP("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:g,type:"email"})):aP("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),aP("label",{for:"message",class:"form__label"},aP(sb,{label:y,isRequiredLabel:E,isRequired:!0}),aP("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:v,required:!0,rows:5})),I?aP("label",{for:"screenshot",class:"form__label"},aP("button",{class:"btn btn--default",type:"button",onClick:()=>{R(null),C(e=>!e)}},T?p:d),O?aP("div",{class:"form__error-container"},O.message):null):null),aP("div",{class:"btn-group"},aP("button",{class:"btn btn--primary",type:"submit"},S),aP("button",{class:"btn btn--default",type:"button",onClick:r},h))))}function sb({label:e,isRequired:t,isRequiredLabel:n}){return aP("span",{class:"form__label__text"},e,t&&aP("span",{class:"form__label__text--required"},n))}function sw({open:e,onFormSubmitted:t,...n}){let r=n.options,i=sl(()=>{let e,t,n,r,i,o,a,s;return{__html:(t=an((e=e=>oW.document.createElementNS("http://www.w3.org/2000/svg",e))("svg"),{width:"16",height:"17",viewBox:"0 0 16 17",fill:"inherit"}),n=an(e("g"),{clipPath:"url(#clip0_57_156)"}),r=an(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"}),i=an(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(i,r),o=e("defs"),a=an(e("clipPath"),{id:"clip0_57_156"}),s=an(e("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"}),a.appendChild(s),o.appendChild(a),t.appendChild(o).appendChild(a).appendChild(s),t).outerHTML}},[]),[o,a]=so(null),s=sc(()=>{o&&(clearTimeout(o),a(null)),t()},[o]),l=sc(e=>{n.onSubmitSuccess(e),a(setTimeout(()=>{t(),a(null)},5e3))},[t]);return aP(a$,null,o?aP("div",{class:"success__position",onClick:s},aP("div",{class:"success__content"},r.successMessageText,aP("span",{class:"success__icon",dangerouslySetInnerHTML:i}))):aP("dialog",{class:"dialog",onClick:r.onFormClose,open:e},aP("div",{class:"dialog__position"},aP("div",{class:"dialog__content",onClick:e=>{e.stopPropagation()}},aP(s_,{options:r}),aP(sv,{...n,onSubmitSuccess:l})))))}let sS=`
.dialog {
position: fixed;
z-index: var(--z-index);
margin: 0;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
height: 100vh;
width: 100vw;
color: var(--dialog-color, var(--foreground));
fill: var(--dialog-color, var(--foreground));
line-height: 1.75em;
background-color: rgba(0, 0, 0, 0.05);
border: none;
inset: 0;
opacity: 1;
transition: opacity 0.2s ease-in-out;
}
.dialog__position {
position: fixed;
z-index: var(--z-index);
inset: var(--dialog-inset);
padding: var(--page-margin);
display: flex;
max-height: calc(100vh - (2 * var(--page-margin)));
}
@media (max-width: 600px) {
.dialog__position {
inset: var(--page-margin);
padding: 0;
}
}
.dialog__position:has(.editor) {
inset: var(--page-margin);
padding: 0;
}
.dialog:not([open]) {
opacity: 0;
pointer-events: none;
visibility: hidden;
}
.dialog:not([open]) .dialog__content {
transform: translate(0, -16px) scale(0.98);
}
.dialog__content {
display: flex;
flex-direction: column;
gap: 16px;
padding: var(--dialog-padding, 24px);
max-width: 100%;
width: 100%;
max-height: 100%;
overflow: auto;
background: var(--dialog-background, var(--background));
border-radius: var(--dialog-border-radius, 20px);
border: var(--dialog-border, var(--border));
box-shadow: var(--dialog-box-shadow, var(--box-shadow));
transform: translate(0, 0) scale(1);
transition: transform 0.2s ease-in-out;
}
`,sE=`
.dialog__header {
display: flex;
gap: 4px;
justify-content: space-between;
font-weight: var(--dialog-header-weight, 600);
margin: 0;
}
.dialog__title {
align-self: center;
width: var(--form-width, 272px);
}
@media (max-width: 600px) {
.dialog__title {
width: auto;
}
}
.dialog__position:has(.editor) .dialog__title {
width: auto;
}
.brand-link {
display: inline-flex;
}
.brand-link:focus-visible {
outline: var(--outline);
}
`,sk=`
.form {
display: flex;
overflow: auto;
flex-direction: row;
gap: 16px;
flex: 1 0;
}
.form__right {
flex: 0 0 auto;
display: flex;
overflow: auto;
flex-direction: column;
justify-content: space-between;
gap: 20px;
width: var(--form-width, 100%);
}
.dialog__position:has(.editor) .form__right {
width: var(--form-width, 272px);
}
.form__top {
display: flex;
flex-direction: column;
gap: 8px;
}
.form__error-container {
color: var(--error-color);
fill: var(--error-color);
}
.form__label {
display: flex;
flex-direction: column;
gap: 4px;
margin: 0px;
}
.form__label__text {
display: flex;
gap: 4px;
align-items: center;
}
.form__label__text--required {
font-size: 0.85em;
}
.form__input {
font-family: inherit;
line-height: inherit;
background: transparent;
box-sizing: border-box;
border: var(--input-border, var(--border));
border-radius: var(--input-border-radius, 6px);
color: var(--input-color, inherit);
fill: var(--input-color, inherit);
font-size: var(--input-font-size, inherit);
font-weight: var(--input-font-weight, 500);
padding: 6px 12px;
}
.form__input::placeholder {
opacity: 0.65;
color: var(--input-placeholder-color, inherit);
filter: var(--interactive-filter);
}
.form__input:focus-visible {
outline: var(--input-focus-outline, var(--outline));
}
.form__input--textarea {
font-family: inherit;
resize: vertical;
}
.error {
color: var(--error-color);
fill: var(--error-color);
}
`,sx=`
.btn-group {
display: grid;
gap: 8px;
}
.btn {
line-height: inherit;
border: var(--button-border, var(--border));
border-radius: var(--button-border-radius, 6px);
cursor: pointer;
font-family: inherit;
font-size: var(--button-font-size, inherit);
font-weight: var(--button-font-weight, 600);
padding: var(--button-padding, 6px 16px);
}
.btn[disabled] {
opacity: 0.6;
pointer-events: none;
}
.btn--primary {
color: var(--button-primary-color, var(--accent-foreground));
fill: var(--button-primary-color, var(--accent-foreground));
background: var(--button-primary-background, var(--accent-background));
border: var(--button-primary-border, var(--border));
border-radius: var(--button-primary-border-radius, 6px);
font-weight: var(--button-primary-font-weight, 500);
}
.btn--primary:hover {
color: var(--button-primary-hover-color, var(--accent-foreground));
fill: var(--button-primary-hover-color, var(--accent-foreground));
background: var(--button-primary-hover-background, var(--accent-background));
filter: var(--interactive-filter);
}
.btn--primary:focus-visible {
background: var(--button-primary-hover-background, var(--accent-background));
filter: var(--interactive-filter);
outline: var(--button-primary-focus-outline, var(--outline));
}
.btn--default {
color: var(--button-color, var(--foreground));
fill: var(--button-color, var(--foreground));
background: var(--button-background, var(--background));
border: var(--button-border, var(--border));
border-radius: var(--button-border-radius, 6px);
font-weight: var(--button-font-weight, 500);
}
.btn--default:hover {
color: var(--button-color, var(--foreground));
fill: var(--button-color, var(--foreground));
background: var(--button-hover-background, var(--background));
filter: var(--interactive-filter);
}
.btn--default:focus-visible {
background: var(--button-hover-background, var(--background));
filter: var(--interactive-filter);
outline: var(--button-focus-outline, var(--outline));
}
`,sT=`
.success__position {
position: fixed;
inset: var(--dialog-inset);
padding: var(--page-margin);
z-index: var(--z-index);
}
.success__content {
background: var(--success-background, var(--background));
border: var(--success-border, var(--border));
border-radius: var(--success-border-radius, 1.7em/50%);
box-shadow: var(--success-box-shadow, var(--box-shadow));
font-weight: var(--success-font-weight, 600);
color: var(--success-color);
fill: var(--success-color);
padding: 12px 24px;
line-height: 1.75em;
display: grid;
align-items: center;
grid-auto-flow: column;
gap: 6px;
cursor: default;
}
.success__icon {
display: flex;
}
`,sC=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{var i;let o,a,s,l,c=e.useSentryUser,u=(o=(0,L.o5)().getUser(),a=(0,L.rm)().getUser(),s=(0,L.m6)().getUser(),o&&Object.keys(o).length?o:a&&Object.keys(a).length?a:s),d=oK.createElement("div"),p=(i=e.styleNonce,(l=oK.createElement("style")).textContent=`
:host {
--dialog-inset: var(--inset);
}
${sS}
${sE}
${sk}
${sx}
${sT}
`,i&&l.setAttribute("nonce",i),l),h="",f={get el(){return d},appendToDom(){r.contains(p)||r.contains(d)||(r.appendChild(p),r.appendChild(d))},removeFromDom(){r.removeChild(d),r.removeChild(p),oK.body.style.overflow=h},open(){g(!0),e.onFormOpen&&e.onFormOpen(),h=oK.body.style.overflow,oK.body.style.overflow="hidden"},close(){g(!1),oK.body.style.overflow=h}},m=t&&t.createInput({h:aP,hooks:sg,dialog:f,options:e}),g=t=>{var r,i,o,a;r=aP(sw,{options:e,screenshotInput:m,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:c&&u&&u[c.name]||"",defaultEmail:c&&u&&u[c.email]||"",onFormClose:()=>{g(!1),e.onFormClose&&e.onFormClose()},onSubmit:n,onSubmitSuccess:t=>{g(!1),e.onSubmitSuccess&&e.onSubmitSuccess(t)},onSubmitError:t=>{e.onSubmitError&&e.onSubmitError(t)},onFormSubmitted:()=>{e.onFormSubmitted&&e.onFormSubmitted()},open:t}),ax.__&&ax.__(r,d),i=d.__k,o=[],a=[],aJ(d,r=d.__k=aP(a$,null,[r]),i||aR,aR,void 0!==d.ownerSVGElement,i?null:d.firstChild?ak.call(d.childNodes):null,o,i?i.__e:d.firstChild,!1,a),r.__d=void 0,aV(o,r,a)};return f}}),sI=oW.devicePixelRatio,sM=e=>({x:Math.min(e.startX,e.endX),y:Math.min(e.startY,e.endY),width:Math.abs(e.startX-e.endX),height:Math.abs(e.startY-e.endY)}),sO=e=>{let t=e.clientHeight,n=e.clientWidth,r=e.width/e.height,i=t*r,o=t;i>n&&(i=n,o=n/r);let a=(n-i)/2,s=(t-o)/2;return{startX:a,startY:s,endX:i+a,endY:o+s}},sR=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let i=oK.createElement("canvas");return{input:function({h:e,hooks:t,imageBuffer:n,dialog:r,options:i}){let o=function({hooks:e}){return function({onBeforeScreenshot:t,onScreenshot:n,onAfterScreenshot:r,onError:i}){e.useEffect(()=>{(async()=>{t();let e=await oG.mediaDevices.getDisplayMedia({video:{width:oW.innerWidth*oW.devicePixelRatio,height:oW.innerHeight*oW.devicePixelRatio},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),i=oK.createElement("video");await new Promise((t,r)=>{i.srcObject=e,i.onloadedmetadata=()=>{n(i),e.getTracks().forEach(e=>e.stop()),t()},i.play().catch(r)}),r()})().catch(i)},[])}}({hooks:t});return function({onError:a}){let s=t.useMemo(()=>{var e;let t,n,r;return{__html:(e=i.styleNonce,t=oK.createElement("style"),n="#1A141F",r="#302735",t.textContent=`
.editor {
padding: 10px;
padding-top: 65px;
padding-bottom: 65px;
flex-grow: 1;
background-color: ${n};
background-image: repeating-linear-gradient(
-145deg,
transparent,
transparent 8px,
${n} 8px,
${n} 11px
),
repeating-linear-gradient(
-45deg,
transparent,
transparent 15px,
${r} 15px,
${r} 16px
);
}
.editor__canvas-container {
width: 100%;
height: 100%;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.editor__canvas-container canvas {
object-fit: contain;
position: relative;
}
.editor__crop-btn-group {
padding: 8px;
gap: 8px;
border-radius: var(--menu-border-radius, 6px);
background: var(--button-primary-background, var(--background));
width: 175px;
position: absolute;
}
.editor__crop-corner {
width: 30px;
height: 30px;
position: absolute;
background: none;
border: 3px solid #ffffff;
}
.editor__crop-corner--top-left {
cursor: nwse-resize;
border-right: none;
border-bottom: none;
}
.editor__crop-corner--top-right {
cursor: nesw-resize;
border-left: none;
border-bottom: none;
}
.editor__crop-corner--bottom-left {
cursor: nesw-resize;
border-right: none;
border-top: none;
}
.editor__crop-corner--bottom-right {
cursor: nwse-resize;
border-left: none;
border-top: none;
}
`,e&&t.setAttribute("nonce",e),t).innerText}},[]),l=function({h:e}){return function({top:t,left:n,corner:r,onGrabButton:i}){return e("button",{class:`editor__crop-corner editor__crop-corner--${r} `,style:{top:t,left:n},onMouseDown:e=>{e.preventDefault(),i(e,r)},onClick:e=>{e.preventDefault()}})}}({h:e}),c=t.useRef(null),u=t.useRef(null),d=t.useRef(null),[p,h]=t.useState({startX:0,startY:0,endX:0,endY:0}),[f,m]=t.useState(!1),[g,_]=t.useState(!1);function y(){let e=d.current,t=sM(sO(n));if(e){e.width=t.width*sI,e.height=t.height*sI,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`;let n=e.getContext("2d");n&&n.scale(sI,sI)}let r=u.current;r&&(r.style.width=`${t.width}px`,r.style.height=`${t.height}px`),h({startX:0,startY:0,endX:t.width,endY:t.height})}function v(e,t){m(!1),_(!0);let n=b(t),r=()=>{oK.removeEventListener("mousemove",n),oK.removeEventListener("mouseup",r),m(!0),_(!1)};oK.addEventListener("mouseup",r),oK.addEventListener("mousemove",n)}t.useEffect(()=>{oW.addEventListener("resize",y,!1)},[]),t.useEffect(()=>{let e=d.current;if(!e)return;let t=e.getContext("2d");if(!t)return;let r=sM(sO(n)),i=sM(p);t.clearRect(0,0,r.width,r.height),t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,0,r.width,r.height),t.clearRect(i.x,i.y,i.width,i.height),t.strokeStyle="#ffffff",t.lineWidth=3,t.strokeRect(i.x+1,i.y+1,i.width-2,i.height-2),t.strokeStyle="#000000",t.lineWidth=1,t.strokeRect(i.x+3,i.y+3,i.width-6,i.height-6)},[p]);let b=t.useCallback(e=>function(t){if(!d.current)return;let n=d.current,r=n.getBoundingClientRect(),i=t.clientX-r.x,o=t.clientY-r.y;switch(e){case"top-left":h(e=>({...e,startX:Math.min(Math.max(0,i),e.endX-33),startY:Math.min(Math.max(0,o),e.endY-33)}));break;case"top-right":h(e=>({...e,endX:Math.max(Math.min(i,n.width/sI),e.startX+33),startY:Math.min(Math.max(0,o),e.endY-33)}));break;case"bottom-left":h(e=>({...e,startX:Math.min(Math.max(0,i),e.endX-33),endY:Math.max(Math.min(o,n.height/sI),e.startY+33)}));break;case"bottom-right":h(e=>({...e,endX:Math.max(Math.min(i,n.width/sI),e.startX+33),endY:Math.max(Math.min(o,n.height/sI),e.startY+33)}))}},[]),w=t.useRef({initialX:0,initialY:0});return o({onBeforeScreenshot:t.useCallback(()=>{r.el.style.display="none"},[]),onScreenshot:t.useCallback(e=>{let t=n.getContext("2d");if(!t)throw Error("Could not get canvas context");n.width=e.videoWidth,n.height=e.videoHeight,n.style.width="100%",n.style.height="100%",t.drawImage(e,0,0)},[n]),onAfterScreenshot:t.useCallback(()=>{r.el.style.display="block";let e=c.current;e&&e.appendChild(n),y()},[]),onError:t.useCallback(e=>{r.el.style.display="block",a(e)},[])}),e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:s}),e("div",{class:"editor__canvas-container",ref:c},e("div",{class:"editor__crop-container",style:{position:"absolute",zIndex:1},ref:u},e("canvas",{onMouseDown:function(e){if(g)return;w.current={initialX:e.clientX,initialY:e.clientY};let t=e=>{let t=d.current;if(!t)return;let n=e.clientX-w.current.initialX,r=e.clientY-w.current.initialY;h(i=>{let o=Math.max(0,Math.min(i.startX+n,t.width/sI-(i.endX-i.startX))),a=Math.max(0,Math.min(i.startY+r,t.height/sI-(i.endY-i.startY))),s=o+(i.endX-i.startX),l=a+(i.endY-i.startY);return w.current.initialX=e.clientX,w.current.initialY=e.clientY,{startX:o,startY:a,endX:s,endY:l}})},n=()=>{oK.removeEventListener("mousemove",t),oK.removeEventListener("mouseup",n)};oK.addEventListener("mousemove",t),oK.addEventListener("mouseup",n)},style:{position:"absolute",cursor:f?"move":"auto"},ref:d}),e(l,{left:p.startX-3,top:p.startY-3,onGrabButton:v,corner:"top-left"}),e(l,{left:p.endX-30+3,top:p.startY-3,onGrabButton:v,corner:"top-right"}),e(l,{left:p.startX-3,top:p.endY-30+3,onGrabButton:v,corner:"bottom-left"}),e(l,{left:p.endX-30+3,top:p.endY-30+3,onGrabButton:v,corner:"bottom-right"}),e("div",{style:{left:Math.max(0,p.endX-191),top:Math.max(0,p.endY+8),display:f?"flex":"none"},class:"editor__crop-btn-group"},e("button",{onClick:e=>{e.preventDefault(),d.current&&h({startX:0,startY:0,endX:d.current.width/sI,endY:d.current.height/sI}),m(!1)},class:"btn btn--default"},i.cancelButtonLabel),e("button",{onClick:e=>{let t,r,i,o,a;e.preventDefault(),t=oK.createElement("canvas"),r=sM(sO(n)),t.width=(i=sM(p)).width*sI,t.height=i.height*sI,(o=t.getContext("2d"))&&n&&o.drawImage(n,i.x/r.width*n.width,i.y/r.height*n.height,i.width/r.width*n.width,i.height/r.height*n.height,0,0,t.width,t.height),(a=n.getContext("2d"))&&(a.clearRect(0,0,n.width,n.height),n.width=t.width,n.height=t.height,n.style.width=`${i.width}px`,n.style.height=`${i.height}px`,a.drawImage(t,0,0),y()),m(!1)},class:"btn btn--primary"},i.confirmButtonLabel)))))}}({h:e,hooks:t,imageBuffer:i,dialog:n,options:r}),value:async()=>{let e=await new Promise(e=>{i.toBlob(e,"image/png")});if(e)return{data:new Uint8Array(await e.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),sD=as({lazyLoadIntegration:tl}),sA=as({getModalIntegration:()=>sC,getScreenshotIntegration:()=>sR});function sN(e,t,n,r,i={}){let o=i.client||(0,L.KU)();if(!o)return;let a=(0,O.Bk)(),s=a?(0,O.zU)(a):void 0,l=s&&(0,O.et)(s).description,{unit:c,tags:u,timestamp:d}=i,{release:p,environment:h}=o.getOptions(),f={};p&&(f.release=p),h&&(f.environment=h),l&&(f.transaction=l),T.T&&M.vF.log(`Adding value of ${r} to ${t} metric ${n}`),(function(e,t){let n=(0,U.B)("globalMetricsAggregators",()=>new WeakMap),r=n.get(e);if(r)return r;let i=new t(e);return e.on("flush",()=>i.flush()),e.on("close",()=>i.close()),n.set(e,i),i})(o,e).add(t,n,r,c,{...f,...u},d)}function sL(e,t,n,r){sN(e,"d",t,sU(n),r)}let sF=function(e,t,n=1,r){sN(e,"c",t,sU(n),r)},sP=function(e,t,n,r){sN(e,"s",t,n,r)},sj=function(e,t,n,r){sN(e,"g",t,sU(n),r)},s$=function(e,t,n,r="second",i){if("function"==typeof n){let r=(0,er.zf)();return ef({op:"metrics.timing",name:t,startTime:r,onlyIfParent:!0},o=>J(()=>n(),()=>{},()=>{let n=(0,er.zf)();sL(e,t,n-r,{...i,unit:"second"}),o.end(n)}))}sL(e,t,n,{...i,unit:r})};function sU(e){return"string"==typeof e?parseInt(e):e}let sH=[["\n","\\n"],["\r","\\r"],[" ","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]],sB={c:class{constructor(e){this._value=e}get weight(){return 1}add(e){this._value+=e}toString(){return`${this._value}`}},g:class{constructor(e){this._last=e,this._min=e,this._max=e,this._sum=e,this._count=1}get weight(){return 5}add(e){this._last=e,e<this._min&&(this._min=e),e>this._max&&(this._max=e),this._sum+=e,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}},d:class{constructor(e){this._value=[e]}get weight(){return this._value.length}add(e){this._value.push(e)}toString(){return this._value.join(":")}},s:class{constructor(e){this.first=e,this._value=new Set([e])}get weight(){return this._value.size}add(e){this._value.add(e)}toString(){return Array.from(this._value).map(e=>"string"==typeof e?function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t>>>0}(e):e).join(":")}}};class sz{constructor(e){this._client=e,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),5e3)}add(e,t,n,r="none",i={},o=(0,er.zf)()){let a,s=Math.floor(o),l=t.replace(/[^\w\-.]+/gi,"_"),c=function(e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n.replace(/[^\w\-./]+/gi,"")]=[...String(e[n])].reduce((e,t)=>e+function(e){for(let[t,n]of sH)if(e===t)return n;return e}(t),""));return t}(i),u=r.replace(/[^\w]+/gi,"_"),d=(a=Object.entries((0,B.Ce)(c)).sort((e,t)=>e[0].localeCompare(t[0])),`${e}${l}${u}${a}`),p=this._buckets.get(d),h=p&&"s"===e?p.metric.weight:0;p?(p.metric.add(n),p.timestamp<s&&(p.timestamp=s)):(p={metric:new sB[e](n),timestamp:s,metricType:e,name:l,unit:u,tags:c},this._buckets.set(d,p));let f="string"==typeof n?p.metric.weight-h:n;(0,O.r2)(e,l,f,u,i,d)}flush(){var e,t,n,r,i;let o,a,s,l,c,u;if(0===this._buckets.size)return;let d=Array.from(this._buckets.values());e=this._client,M.vF.log(`Flushing aggregated metrics, number of metrics: ${d.length}`),o=e.getDsn(),a=e.getSdkMetadata(),t=d,n=o,r=a,i=e.getOptions().tunnel,l={sent_at:new Date().toISOString()},r&&r.sdk&&(l.sdk={name:r.sdk.name,version:r.sdk.version}),i&&n&&(l.dsn=(0,eP.SB)(n)),u=[{type:"statsd",length:(c=function(e){let t="";for(let n of e){let e=Object.entries(n.tags),r=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}
`}return t}(t)).length},c],s=(0,ej.h4)(l,[u]),e.sendEnvelope(s),this._buckets.clear()}close(){clearInterval(this._interval),this.flush()}}let sq={increment:function(e,t=1,n){sF(sz,e,t,n)},distribution:function(e,t,n){sL(sz,e,t,n)},set:function(e,t,n){sP(sz,e,t,n)},gauge:function(e,t,n){sj(sz,e,t,n)},timing:function(e,t,n="second",r){return s$(sz,e,t,n,r)}};function sW(e){return"number"==typeof e&&isFinite(e)}function sK(e,t,n,{...r}){let i=(0,O.et)(e).start_timestamp;return i&&i>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),e_(e,()=>{let e=em({startTime:t,...r});return e&&e.end(n),e})}function sG(e){let t,n=(0,L.KU)();if(!n)return;let{name:r,transaction:i,attributes:o,startTime:a}=e,{release:s,environment:l}=n.getOptions(),c=n.getIntegrationByName("Replay"),u=c&&c.getReplayId(),d=(0,L.o5)(),p=d.getUser(),h=void 0!==p?p.email||p.id||p.ip_address:void 0;try{t=d.getScopeData().contexts.profile.profile_id}catch(e){}return em({name:r,attributes:{release:s,environment:l,user:h||void 0,profile_id:t||void 0,replay_id:u||void 0,transaction:i,"user_agent.original":tj.j.navigator&&tj.j.navigator.userAgent,...o},startTime:a,experimental:{standalone:!0}})}function sX(){return tj.j&&tj.j.addEventListener&&tj.j.performance}function sJ(e){return e/1e3}function sV(e){let t="unknown",n="unknown",r="";for(let i of e){if("/"===i){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}var sY=n(435819);function sQ(e={}){let t=(0,L.KU)();if(!(0,k.Ol)()||!t)return{};let n=(0,q.E)(),r=(0,W.h)(n);if(r.getTraceData)return r.getTraceData(e);let i=(0,L.o5)(),o=e.span||(0,O.Bk)(),a=o?(0,O.Qh)(o):function(e){let{traceId:t,sampled:n,spanId:r}=e.getPropagationContext();return(0,G.TC)(t,r,n)}(i),s=o?(0,Q.k1)(o):(0,Q.ao)(t,i),l=(0,sY.De)(s);return G.MI.test(a)?{"sentry-trace":a,baggage:l}:(M.vF.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function sZ(e){return e.split(",").filter(e=>!e.split("=")[0].startsWith(sY.sv)).join(",")}let s0=new WeakMap,s1=new Map,s2={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function s3(e,t){let{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:a,tracePropagationTargets:s}={traceFetch:s2.traceFetch,traceXHR:s2.traceXHR,trackFetchStreamPerformance:s2.trackFetchStreamPerformance,...t},l="function"==typeof o?o:e=>!0,c=e=>(function(e,t){let n=e5.jf.location&&e5.jf.location.href;if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch(e){return!1}let o=r.origin===i;return t?(0,$.Xr)(r.toString(),t)||o&&(0,$.Xr)(r.pathname,t):o}{let n=!!e.match(/^\/(?!\/)/);return t?(0,$.Xr)(e,t):n}})(e,s),u={};n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){let t=s1.get(e.span_id);t&&(e.timestamp=t/1e3,s1.delete(e.span_id))}}),e)),i&&(0,tf.B$)(e=>{if(e.response){let t=s0.get(e.response);t&&e.endTimestamp&&s1.set(t,e.endTimestamp)}}),(0,tf.ur)(e=>{let t=function(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;let o=(0,V.w)()&&t(e.fetchData.url);if(e.endTimestamp&&o){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(function(e,t){if(t.response){eN(e,t.response.status);let n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){let t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),delete r[t]);return}let{method:a,url:s}=e.fetchData,l=function(e){try{return new URL(e).href}catch(e){return}}(s),c=l?(0,tk.Dl)(l).host:void 0,u=!!(0,O.Bk)(),d=o&&u?em({name:`${a} ${s}`,attributes:{url:s,type:"fetch","http.method":a,"http.url":l,"server.address":c,[w.JD]:i,[w.uT]:"http.client"}}):new ee;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){let t=e.args[0],n=e.args[1]||{},r=function(e,t,n){var r,i;let o=sQ({span:n}),a=o["sentry-trace"],s=o.baggage;if(!a)return;let l=t.headers||((r=e,"u">typeof Request&&(0,X.tH)(r,Request))?e.headers:void 0);if(!l)return{...o};if(i=l,"u">typeof Headers&&(0,X.tH)(i,Headers)){let e=new Headers(l);if(e.set("sentry-trace",a),s){let t=e.get("baggage");if(t){let n=sZ(t);e.set("baggage",n?`${n},${s}`:s)}else e.set("baggage",s)}return e}if(Array.isArray(l)){let e=[...l.filter(e=>!(Array.isArray(e)&&"sentry-trace"===e[0])).map(e=>{if(!Array.isArray(e)||"baggage"!==e[0]||"string"!=typeof e[1])return e;{let[t,n,...r]=e;return[t,sZ(n),...r]}}),["sentry-trace",a]];return s&&e.push(["baggage",s]),e}{let e="baggage"in l?l.baggage:void 0,t=[];return Array.isArray(e)?t=e.map(e=>"string"==typeof e?sZ(e):e).filter(e=>""===e):e&&t.push(sZ(e)),s&&t.push(s),{...l,"sentry-trace":a,baggage:t.length>0?t.join(","):void 0}}}(t,n,(0,V.w)()&&u?d:void 0);r&&(e.args[1]=n,n.headers=r)}return d}(e,l,c,u);if(e.response&&e.fetchData.__span&&s0.set(e.response,e.fetchData.__span),t){let n=s4(e.fetchData.url),r=n?(0,tk.Dl)(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}a&&t&&s5(t)})),r&&(0,th.Mn)(e=>{let t=function(e,t,n,r){let i=e.xhr,o=i&&i[th.Er];if(!i||i.__sentry_own_request__||!o)return;let a=(0,V.w)()&&t(o.url);if(e.endTimestamp&&a){let e=i.__sentry_xhr_span_id__;if(!e)return;let t=r[e];t&&void 0!==o.status_code&&(eN(t,o.status_code),t.end(),delete r[e]);return}let s=s4(o.url),l=s?(0,tk.Dl)(s).host:void 0,c=!!(0,O.Bk)(),u=a&&c?em({name:`${o.method} ${o.url}`,attributes:{type:"xhr","http.method":o.method,"http.url":s,url:o.url,"server.address":l,[w.JD]:"auto.http.browser",[w.uT]:"http.client"}}):new ee;return i.__sentry_xhr_span_id__=u.spanContext().spanId,r[i.__sentry_xhr_span_id__]=u,n(o.url)&&function(e,t){let{"sentry-trace":n,baggage:r}=sQ({span:t});n&&function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch(e){}}(e,n,r)}(i,(0,V.w)()&&c?u:void 0),u}(e,l,c,u);a&&t&&s5(t)})}function s5(e){let{url:t}=(0,O.et)(e).data||{};if(!t||"string"!=typeof t)return;let n=nc("resource",({entries:r})=>{r.forEach(r=>{"resource"===r.entryType&&"initiatorType"in r&&"string"==typeof r.nextHopProtocol&&("fetch"===r.initiatorType||"xmlhttprequest"===r.initiatorType)&&r.name.endsWith(t)&&((function(e){let{name:t,version:n}=sV(e.nextHopProtocol),r=[];return(r.push(["network.protocol.version",n],["network.protocol.name",t]),er.k3)?[...r,["http.request.redirect_start",s6(e.redirectStart)],["http.request.fetch_start",s6(e.fetchStart)],["http.request.domain_lookup_start",s6(e.domainLookupStart)],["http.request.domain_lookup_end",s6(e.domainLookupEnd)],["http.request.connect_start",s6(e.connectStart)],["http.request.secure_connection_start",s6(e.secureConnectionStart)],["http.request.connection_end",s6(e.connectEnd)],["http.request.request_start",s6(e.requestStart)],["http.request.response_start",s6(e.responseStart)],["http.request.response_end",s6(e.responseEnd)]]:r})(r).forEach(t=>e.setAttribute(...t)),setTimeout(n))})})}function s6(e=0){return((er.k3||performance.timeOrigin)+e)/1e3}function s4(e){try{return new URL(e,e5.jf.location.origin).href}catch(e){return}}let s8=0,s7={};function s9(e,t,n,r,i=n){var o;let a=t["secureConnection"===(o=n)?"connectEnd":"fetch"===o?"domainLookupStart":`${o}End`],s=t[`${n}Start`];s&&a&&sK(e,r+sJ(s),r+sJ(a),{op:`browser.${i}`,name:t.name,attributes:{[w.JD]:"auto.ui.browser.metrics"}})}function le(e,t,n,r){let i=t[n];null!=i&&i<0x7fffffff&&(e[r]=i)}let lt=[],ln=new Map,lr={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"},li={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function lo(e,t={}){let n,r,i=new Map,o=!1,a="externalFinish",s=!t.disableAutoFinish,l=[],{idleTimeout:c=li.idleTimeout,finalTimeout:u=li.finalTimeout,childSpanTimeout:d=li.childSpanTimeout,beforeSpanEnd:p}=t,h=(0,L.KU)();if(!h||!(0,V.w)())return new ee;let f=(0,L.o5)(),m=(0,O.Bk)(),g=(n=em(e),(0,Y.r)((0,L.o5)(),n),T.T&&M.vF.log("[Tracing] Started span is an idle span"),n);function _(){r&&(clearTimeout(r),r=void 0)}function y(e){_(),r=setTimeout(()=>{!o&&0===i.size&&s&&(a="idleTimeout",g.end(e))},c)}function v(e){r=setTimeout(()=>{!o&&s&&(a="heartbeatFailed",g.end(e))},d)}function b(e){o=!0,i.clear(),l.forEach(e=>e()),(0,Y.r)(f,m);let t=(0,O.et)(g),{start_timestamp:n}=t;if(!n)return;(t.data||{})[w.fs]||g.setAttribute(w.fs,a),M.vF.log(`[Tracing] Idle span "${t.op}" finished`);let r=(0,O.xO)(g).filter(e=>e!==g),s=0;r.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),T.T&&M.vF.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:r=0}=(0,O.et)(t),i=r<=e,o=n-r<=(u+c)/1e3;if(T.T){let e=JSON.stringify(t,void 0,2);i?o||M.vF.log("[Tracing] Discarding span since it finished after idle span final timeout",e):M.vF.log("[Tracing] Discarding span since it happened after idle span was finished",e)}(!o||!i)&&((0,O.VS)(g,t),s++)}),s>0&&g.setAttribute("sentry.idle_span_discarded_spans",s)}return g.end=new Proxy(g.end,{apply(e,t,n){p&&p(g);let[r,...i]=n,o=r||(0,er.zf)(),a=(0,O.cI)(o),s=(0,O.xO)(g).filter(e=>e!==g);if(!s.length)return b(a),Reflect.apply(e,t,[a,...i]);let l=s.map(e=>(0,O.et)(e).timestamp).filter(e=>!!e),c=l.length?Math.max(...l):void 0,d=(0,O.et)(g).start_timestamp,h=Math.min(d?d+u/1e3:1/0,Math.max(d||-1/0,Math.min(a,c||1/0)));return b(h),Reflect.apply(e,t,[h,...i])}}),l.push(h.on("spanStart",e=>{var t;o||e===g||(0,O.et)(e).timestamp||(0,O.xO)(g).includes(e)&&(t=e.spanContext().spanId,_(),i.set(t,!0),v((0,er.zf)()+d/1e3))})),l.push(h.on("spanEnd",e=>{if(!o){var t;t=e.spanContext().spanId,i.has(t)&&i.delete(t),0===i.size&&y((0,er.zf)()+c/1e3)}})),l.push(h.on("idleSpanEnableAutoFinish",e=>{e===g&&(s=!0,y(),i.size&&v())})),t.disableAutoFinish||y(),setTimeout(()=>{o||(g.setStatus({code:2,message:"deadline_exceeded"}),a="finalTimeout",g.end())},u),g}let la={...li,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...s2},ls=(e={})=>{D();let{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:i,enableStandaloneClsSpans:o},beforeStartSpan:a,idleTimeout:l,finalTimeout:c,childSpanTimeout:u,markBackgroundSpan:d,traceFetch:p,traceXHR:h,trackFetchStreamPerformance:f,shouldCreateSpanForRequest:m,enableHTTPTimings:y,instrumentPageLoad:v,instrumentNavigation:b}={...la,...e},S=function({recordClsStandaloneSpans:e}){let t=sX();if(t&&er.k3){t.mark&&tj.j.performance.mark("sentry-tracing-init");let n=ns(({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=sJ(er.k3),r=sJ(t.startTime);s7.fid={value:e.value,unit:"millisecond"},s7["mark.fid"]={value:n+r,unit:"second"}}),r=na(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(s7.lcp={value:e.value,unit:"millisecond"},g=t)},!0),i=ng("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(s7.ttfb={value:e.value,unit:"millisecond"})},nf,s),o=e?function(){let e,t,n=0;if(!function(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch(e){return!1}}())return;let r=!1;function i(){var i,a,s;let l,c,u;r||(r=!0,t&&(i=n,a=e,s=t,tF.T&&M.vF.log(`Sending CLS span (${i})`),l=sJ((er.k3||0)+(a&&a.startTime||0)),c=(0,L.o5)().getScopeData().transactionName,(u=sG({name:a?(0,tI.Hd)(a.sources[0]&&a.sources[0].node):"Layout shift",transaction:c,attributes:(0,B.Ce)({[w.JD]:"auto.http.browser.cls",[w.uT]:"ui.webvital.cls",[w.jG]:a&&a.duration||0,"sentry.pageload.span_id":s}),startTime:l}))&&(u.addEvent("cls",{[w.Sn]:"",[w.xc]:i}),u.end(l))),o())}let o=no(({metric:t})=>{let r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);tz(()=>{i()}),setTimeout(()=>{let e=(0,L.KU)();if(!e)return;let n=e.on("startNavigationSpan",()=>{i(),n&&n()}),r=(0,O.Bk)(),o=r&&(0,O.zU)(r),a=o&&(0,O.et)(o);a&&"pageload"===a.op&&(t=o.spanContext().spanId)},0)}():no(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(s7.cls={value:e.value,unit:""},_=t)},!0);return()=>{n(),r(),i(),o&&o()}}return()=>void 0}({recordClsStandaloneSpans:o||!1});t&&function(){if(sX()&&er.k3){let e=nl(({metric:e})=>{if(void 0==e.value)return;let t=e.entries.find(t=>t.duration===e.value&&lr[t.name]);if(!t)return;let{interactionId:n}=t,r=lr[t.name],i=sJ(er.k3+t.startTime),o=sJ(e.value),a=(0,O.Bk)(),s=a?(0,O.zU)(a):void 0,l=(null!=n?ln.get(n):void 0)||s,c=l?(0,O.et)(l).description:(0,L.o5)().getScopeData().transactionName,u=sG({name:(0,tI.Hd)(t.target),transaction:c,attributes:(0,B.Ce)({[w.JD]:"auto.http.browser.inp",[w.uT]:`ui.interaction.${r}`,[w.jG]:t.duration}),startTime:i});u&&(u.addEvent("inp",{[w.Sn]:"millisecond",[w.xc]:e.value}),u.end(i+o))});()=>{e()}}}(),r&&U.O.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(e=>{let t=(0,O.Bk)();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=sJ(er.k3+n.startTime),{start_timestamp:r,op:i}=(0,O.et)(t);if("navigation"===i&&r&&e<r)continue;let o=sJ(n.duration),a={[w.JD]:"auto.ui.browser.metrics"},{invoker:s,invokerType:l,sourceURL:c,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];a["browser.script.invoker"]=s,a["browser.script.invoker_type"]=l,c&&(a["code.filepath"]=c),u&&(a["code.function"]=u),-1!==d&&(a["browser.script.source_char_position"]=d),sK(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0}):n&&nc("longtask",({entries:e})=>{let t=(0,O.Bk)();if(!t)return;let{op:n,start_timestamp:r}=(0,O.et)(t);for(let i of e){let e=sJ(er.k3+i.startTime),o=sJ(i.duration);"navigation"===n&&r&&e<r||sK(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[w.JD]:"auto.ui.browser.metrics"}})}}),i&&nc("event",({entries:e})=>{let t=(0,O.Bk)();if(t){for(let n of e)if("click"===n.name){let e=sJ(er.k3+n.startTime),r=sJ(n.duration),i={name:(0,tI.Hd)(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[w.JD]:"auto.ui.browser.metrics"}},o=(0,tI.xE)(n.target);o&&(i.attributes["ui.component_name"]=o),sK(t,e,e+r,i)}}});let E={name:void 0,source:void 0};function k(e,t){let n="pageload"===t.op,r=a?a(t):t,i=r.attributes||{};t.name!==r.name&&(i[w.i_]="custom",r.attributes=i),E.name=r.name,E.source=i[w.i_];let s=lo(r,{idleTimeout:l,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:n,beforeSpanEnd:e=>{S(),function(e,t){let n=sX();if(!n||!n.getEntries||!er.k3)return;let r=sJ(er.k3),i=n.getEntries(),{op:o,start_timestamp:a}=(0,O.et)(e);if(i.slice(s8).forEach(t=>{var n,i,s,l,c,u,d,p,h,f,m;let g=sJ(t.startTime),_=sJ(Math.max(0,t.duration));if("navigation"!==o||!a||!(r+g<a))switch(t.entryType){case"navigation":let y,v,b;n=e,i=t,s=r,["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(e=>{s9(n,i,e,s)}),s9(n,i,"secureConnection",s,"TLS/SSL"),s9(n,i,"fetch",s,"cache"),s9(n,i,"domainLookup",s,"DNS"),l=n,c=i,y=(u=s)+sJ(c.requestStart),v=u+sJ(c.responseEnd),b=u+sJ(c.responseStart),c.responseEnd&&(sK(l,y,v,{op:"browser.request",name:c.name,attributes:{[w.JD]:"auto.ui.browser.metrics"}}),sK(l,b,v,{op:"browser.response",name:c.name,attributes:{[w.JD]:"auto.ui.browser.metrics"}}));break;case"mark":case"paint":case"measure":{let n,i,o,a;d=e,p=t,h=g,f=_,i=(m=r)+Math.max(h,sJ((n=t$(!1))?n.requestStart:0)),o=m+h,a={[w.JD]:"auto.resource.browser.metrics"},i!==o&&(a["sentry.browser.measure_happened_before_request"]=!0,a["sentry.browser.measure_start_time"]=i),sK(d,i,o+f,{name:p.name,op:p.entryType,attributes:a});let s=tX(),l=t.startTime<s.firstHiddenTime;"first-paint"===t.name&&l&&(s7.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&l&&(s7.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":!function(e,t,n,r,i,o){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;let a=(0,tk.Dl)(n),s={[w.JD]:"auto.resource.browser.metrics"};le(s,t,"transferSize","http.response_transfer_size"),le(s,t,"encodedBodySize","http.response_content_length"),le(s,t,"decodedBodySize","http.decoded_response_content_length");let l=t.deliveryType;null!=l&&(s["http.response_delivery_type"]=l);let c=t.renderBlockingStatus;c&&(s["resource.render_blocking_status"]=c),a.protocol&&(s["url.scheme"]=a.protocol.split(":").pop()),a.host&&(s["server.address"]=a.host),s["url.same_origin"]=n.includes(tj.j.location.origin);let{name:u,version:d}=sV(t.nextHopProtocol);s["network.protocol.name"]=u,s["network.protocol.version"]=d;let p=o+r;sK(e,p,p+i,{name:n.replace(tj.j.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:s})}(e,t,t.name,g,_,r)}}),s8=Math.max(i.length-1,0),function(e){let t=tj.j.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),sW(n.rtt)&&(s7["connection.rtt"]={value:n.rtt,unit:"millisecond"})),sW(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),sW(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===o){var s;!function(e){let t=t$(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(s7);let n=s7["mark.fid"];n&&s7.fid&&(sK(e,n.value,n.value+sJ(s7.fid.value),{name:"first input delay",op:"ui.action",attributes:{[w.JD]:"auto.ui.browser.metrics"}}),delete s7["mark.fid"]),"fcp"in s7&&t.recordClsOnPageloadSpan||delete s7.cls,Object.entries(s7).forEach(([e,t])=>{ei(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",r),e.setAttribute("performance.activationStart",tU()),s=e,g&&(g.element&&s.setAttribute("lcp.element",(0,tI.Hd)(g.element)),g.id&&s.setAttribute("lcp.id",g.id),g.url&&s.setAttribute("lcp.url",g.url.trim().slice(0,200)),null!=g.loadTime&&s.setAttribute("lcp.loadTime",g.loadTime),null!=g.renderTime&&s.setAttribute("lcp.renderTime",g.renderTime),s.setAttribute("lcp.size",g.size)),_&&_.sources&&_.sources.forEach((e,t)=>s.setAttribute(`cls.source.${t+1}`,(0,tI.Hd)(e.node)))}g=void 0,_=void 0,s7={}}(e,{recordClsOnPageloadSpan:!o})}});function d(){["interactive","complete"].includes(e5.jf.document.readyState)&&e.emit("idleSpanEnableAutoFinish",s)}return n&&e5.jf.document&&(e5.jf.document.addEventListener("readystatechange",()=>{d()}),d()),s}return{name:"BrowserTracing",afterAllSetup(e){var n,r,o,a;let s,g,_,S=e5.jf.location&&e5.jf.location.href;function x(){_&&!(0,O.et)(_).timestamp&&(t_.T&&M.vF.log(`[Tracing] Finishing current active span with op: ${(0,O.et)(_).op}`),_.end())}e.on("startNavigationSpan",t=>{(0,L.KU)()===e&&(x(),_=k(e,{op:"navigation",...t}))}),e.on("startPageLoadSpan",(t,n={})=>{if((0,L.KU)()!==e)return;x();let r=n.sentryTrace||lu("sentry-trace"),i=n.baggage||lu("baggage"),o=(0,G.kM)(r,i);(0,L.o5)().setPropagationContext(o),_=k(e,{op:"pageload",...t})}),e.on("spanEnd",e=>{let t=(0,O.et)(e).op;if(e!==(0,O.zU)(e)||"navigation"!==t&&"pageload"!==t)return;let n=(0,L.o5)(),r=n.getPropagationContext();n.setPropagationContext({...r,sampled:void 0!==r.sampled?r.sampled:(0,O.pK)(e),dsc:r.dsc||(0,Q.k1)(e)})}),e5.jf.location&&(v&&ll(e,{name:e5.jf.location.pathname,startTime:er.k3?er.k3/1e3:void 0,attributes:{[w.i_]:"url",[w.JD]:"auto.pageload.browser"}}),b&&(0,nb._)(({to:t,from:n})=>{if(void 0===n&&S&&-1!==S.indexOf(t)){S=void 0;return}n!==t&&(S=void 0,lc(e,{name:e5.jf.location.pathname,attributes:{[w.i_]:"url",[w.JD]:"auto.navigation.browser"}}))})),d&&(e5.jf&&e5.jf.document?e5.jf.document.addEventListener("visibilitychange",()=>{let e=(0,O.Bk)();if(!e)return;let t=(0,O.zU)(e);if(e5.jf.document.hidden&&t){let e="cancelled",{op:n,status:r}=(0,O.et)(t);t_.T&&M.vF.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):t_.T&&M.vF.warn("[Tracing] Could not set up background tab detection due to lack of global document")),i&&(n=l,r=c,o=u,a=E,e5.jf.document&&addEventListener("click",()=>{let e="ui.action.click",t=(0,O.Bk)(),i=t&&(0,O.zU)(t);if(i&&["navigation","pageload"].includes((0,O.et)(i).op)){t_.T&&M.vF.warn(`[Tracing] Did not create ${e} span because a pageload or navigation span is in progress.`);return}if(s&&(s.setAttribute(w.fs,"interactionInterrupted"),s.end(),s=void 0),!a.name){t_.T&&M.vF.warn(`[Tracing] Did not create ${e} transaction because _latestRouteName is missing.`);return}s=lo({name:a.name,op:e,attributes:{[w.i_]:a.source||"url"}},{idleTimeout:n,finalTimeout:r,childSpanTimeout:o})},{once:!1,capture:!0})),t&&(nc("event",g=({entries:e})=>{let t=(0,O.Bk)(),n=t&&(0,O.zU)(t);e.forEach(e=>{if(!("duration"in e)||!n)return;let t=e.interactionId;if(null!=t&&!ln.has(t)){if(lt.length>10){let e=lt.shift();ln.delete(e)}lt.push(t),ln.set(t,n)}})}),nc("first-input",g)),s3(e,{traceFetch:p,traceXHR:h,trackFetchStreamPerformance:f,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:y})}}};function ll(e,t,n){e.emit("startPageLoadSpan",t,n),(0,L.o5)().setTransactionName(t.name);let r=(0,O.Bk)();return"pageload"===(r&&(0,O.et)(r).op)?r:void 0}function lc(e,t){(0,L.rm)().setPropagationContext({traceId:(0,K.el)()}),(0,L.o5)().setPropagationContext({traceId:(0,K.el)()}),e.emit("startNavigationSpan",t),(0,L.o5)().setTransactionName(t.name);let n=(0,O.Bk)();return"navigation"===(n&&(0,O.et)(n).op)?n:void 0}function lu(e){let t=(0,tI.NX)(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function ld(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function lp(e){return ld(e.getAllKeys())}function lh(e){let t;function n(){var n,r;let i,o;return void 0==t&&(n=e.dbName||"sentry-offline",r=e.storeName||"queue",(i=indexedDB.open(n)).onupgradeneeded=()=>i.result.createObjectStore(r),o=ld(i),t=e=>o.then(t=>e(t.transaction(r,"readwrite").objectStore(r)))),t}return{push:async t=>{try{var r,i;let o=await (0,ej.bN)(t);await (r=n(),i=e.maxQueueSize||30,r(e=>lp(e).then(t=>{if(!(t.length>=i))return e.put(o,Math.max(...t,0)+1),ld(e.transaction)})))}catch(e){}},unshift:async t=>{try{var r,i;let o=await (0,ej.bN)(t);await (r=n(),i=e.maxQueueSize||30,r(e=>lp(e).then(t=>{if(!(t.length>=i))return e.put(o,Math.min(...t,0)-1),ld(e.transaction)})))}catch(e){}},shift:async()=>{try{let e=await n()(e=>lp(e).then(t=>{let n=t[0];if(null!=n)return ld(e.get(n)).then(t=>(e.delete(n),ld(e.transaction).then(()=>t)))}));if(e)return(0,ej.mE)(e)}catch(e){}}}}function lf(e=e4._){var t;return t=function(e){function t(...e){T.T&&M.vF.info("[Offline]:",...e)}return n=>{let r,i=e(n);if(!n.createStore)throw Error("No `createStore` function was provided");let o=n.createStore(n),a=5e3;function s(e){r&&clearTimeout(r),"number"!=typeof(r=setTimeout(async()=>{r=void 0;let e=await o.shift();e&&(t("Attempting to send previously queued event"),e[0].sent_at=new Date().toISOString(),c(e,!0).catch(e=>{t("Failed to retry sending",e)}))},e))&&r.unref&&r.unref()}function l(){r||(s(a),a=Math.min(2*a,36e5))}async function c(e,r=!1){if(!r&&(0,ej.hP)(e,["replay_event","replay_recording"]))return await o.push(e),s(100),{};try{let t=await i.send(e),n=100;if(t){if(t.headers&&t.headers["retry-after"])n=(0,tR.FA)(t.headers["retry-after"]);else if(t.headers&&t.headers["x-sentry-rate-limits"])n=6e4;else if((t.statusCode||0)>=400)return t}return s(n),a=5e3,t}catch(i){var u;if(await (u=a,!(0,ej.hP)(e,["client_report"])&&(!n.shouldStore||n.shouldStore(e,i,u))))return r?await o.unshift(e):await o.push(e),l(),t("Error sending. Event queued.",i),{};throw i}}return n.flushAtStartup&&l(),{send:c,flush:e=>(void 0===e&&(a=5e3,s(100)),i.flush(e))}}}(e),e=>{let n=t({...e,createStore:lh});return e5.jf.addEventListener("online",async e=>{await n.flush()}),n}}var lm=n(922248),lg=n(754433);let l_=String(0),ly="",lv="",lb="",lw=e5.jf.navigator&&e5.jf.navigator.userAgent||"",lS="",lE=e5.jf.navigator&&e5.jf.navigator.language||e5.jf.navigator&&e5.jf.navigator.languages&&e5.jf.navigator.languages["0"]||"",lk=e5.jf.navigator&&e5.jf.navigator.userAgentData;function lx(e){return"pageload"===(0,O.et)(e).op}"object"==typeof lk&&null!==lk&&"getHighEntropyValues"in lk&&lk.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(ly=e.platform||"",lb=e.architecture||"",lS=e.model||"",lv=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){let t=e.fullVersionList[e.fullVersionList.length-1];lw=`${t.brand} ${t.version}`}}).catch(e=>void 0);let lT=!1;function lC(e){if(lT)return t_.T&&M.vF.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return t_.T&&M.vF.log("[Profiling] Discarding profile because transaction was not sampled."),!1;let t=(0,L.KU)(),n=t&&t.getOptions();if(!n)return t_.T&&M.vF.log("[Profiling] Profiling disabled, no options found."),!1;let r=n.profilesSampleRate;return("number"!=typeof r&&"boolean"!=typeof r||"number"==typeof r&&isNaN(r)?(t_.T&&M.vF.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(r)} of type ${JSON.stringify(typeof r)}.`),1):!0!==r&&!1!==r&&(r<0||r>1)&&(t_.T&&M.vF.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${r}.`),1))?(t_.T&&M.vF.warn("[Profiling] Discarding profile because of invalid sample rate."),!1):r?!!(!0===r||Math.random()<r)||(t_.T&&M.vF.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(t_.T&&M.vF.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1)}let lI=new Map;function lM(e){let t;lx(e)&&(t=1e3*(0,er.zf)());let n=function(){let e=e5.jf.Profiler;if("function"!=typeof e){t_.T&&M.vF.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}let t=Math.floor(3e3);try{return new e({sampleInterval:10,maxBufferSize:t})}catch(e){t_.T&&(M.vF.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),M.vF.log("[Profiling] Disabling profiling for current user session.")),lT=!0}}();if(!n)return;t_.T&&M.vF.log(`[Profiling] started profiling span: ${(0,O.et)(e).description}`);let r=(0,P.eJ)();async function i(){if(e&&n)return n.stop().then(t=>{if(o&&(e5.jf.clearTimeout(o),o=void 0),t_.T&&M.vF.log(`[Profiling] stopped profiling of span: ${(0,O.et)(e).description}`),!t){t_.T&&M.vF.log(`[Profiling] profiler returned null profile for: ${(0,O.et)(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}if(lI.set(r,t),lI.size>30){let e=lI.keys().next().value;lI.delete(e)}}).catch(e=>{t_.T&&M.vF.log("[Profiling] error while stopping profiler:",e)})}(0,L.o5)().setContext("profile",{profile_id:r,start_timestamp:t});let o=e5.jf.setTimeout(()=>{t_.T&&M.vF.log("[Profiling] max profile duration elapsed, stopping profiling for:",(0,O.et)(e).description),i()},3e4),a=e.end.bind(e);e.end=function(){return e?(i().then(()=>{a()},()=>{a()}),e):a()}}let lO=(0,x._C)(()=>({name:"BrowserProfiling",setup(e){let t=(0,O.Bk)(),n=t&&(0,O.zU)(t);n&&lx(n)&&lC(n)&&lM(n),e.on("spanStart",e=>{e===(0,O.zU)(e)&&lC(e)&&lM(e)}),e.on("beforeEnvelope",e=>{let t;if(!lI.size)return;let n=(t=[],(0,ej.yH)(e,(e,n)=>{if("transaction"===n)for(let n=1;n<e.length;n++){let r=e[n];r&&r.contexts&&r.contexts.profile&&r.contexts.profile.profile_id&&t.push(e[n])}}),t);if(!n.length)return;let r=[];for(let e of n){let t=e&&e.contexts,n=t&&t.profile&&t.profile.profile_id,i=t&&t.profile&&t.profile.start_timestamp;if("string"!=typeof n||!n){t_.T&&M.vF.log("[Profiling] cannot find profile for a span without a profile context");continue}t&&t.profile&&delete t.profile;let o=function(e){let t=lI.get(e);return t&&lI.delete(e),t}(n);if(!o){t_.T&&M.vF.log(`[Profiling] Could not retrieve profile for span: ${n}`);continue}let a=function(e,t,n,r){return(n.samples.length<2?(t_.T&&M.vF.log("[Profiling] Discarding profile because it contains less than 2 samples"),1):!n.frames.length&&(t_.T&&M.vF.log("[Profiling] Discarding profile because it contains no frames"),1))?null:function(e,t,n,r){var i;let o;if("transaction"!==r.type)throw TypeError("Profiling events may only be attached to transactions, this should never occur.");if(null==n)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let a=("string"==typeof(o=r&&r.contexts&&r.contexts.trace&&r.contexts.trace.trace_id)&&32!==o.length&&t_.T&&M.vF.log(`[Profiling] Invalid traceId: ${o} on profiled event`),"string"!=typeof o)?"":o,s="thread_metadata"in(i=n)?i:function(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[l_]:{name:"main"}}},i=e.samples[0];if(!i)return r;let o=i.timestamp,a="number"==typeof performance.timeOrigin?performance.timeOrigin:er.k3||0,s=a-(er.k3||a);return e.samples.forEach((i,a)=>{if(void 0===i.stackId){void 0===t&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((i.timestamp+s-o)*1e6).toFixed(0),stack_id:t,thread_id:l_};return}let l=e.stacks[i.stackId],c=[];for(;l;){c.push(l.frameId);let t=e.frames[l.frameId];t&&void 0===r.frames[l.frameId]&&(r.frames[l.frameId]={function:t.name,abs_path:"number"==typeof t.resourceId?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),l=void 0===l.parentId?void 0:e.stacks[l.parentId]}let u={elapsed_since_start_ns:((i.timestamp+s-o)*1e6).toFixed(0),stack_id:n,thread_id:l_};r.stacks[n]=c,r.samples[a]=u,n++}),r}(i),l=t||("number"==typeof r.start_timestamp?1e3*r.start_timestamp:1e3*(0,er.zf)()),c="number"==typeof r.timestamp?1e3*r.timestamp:1e3*(0,er.zf)();return{event_id:e,timestamp:new Date(l).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||lm.U,runtime:{name:"javascript",version:e5.jf.navigator.userAgent},os:{name:ly,version:lv,build_number:lw},device:{locale:lE,model:lS,manufacturer:lw,architecture:lb,is_emulator:!1},debug_meta:{images:function(e){let t=(0,L.KU)(),n=t&&t.getOptions(),r=n&&n.stackParser;return r?(0,lg.i)(r,e):[]}(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||(0,P.eJ)(),trace_id:a,active_thread_id:l_,relative_start_ns:"0",relative_end_ns:((c-l)*1e6).toFixed(0)}]}}(e,t,n,r)}(n,i,o,e);a&&r.push(a)}!function(e,t){if(t.length)for(let n of t)e[1].push([{type:"profile"},n])}(e,r)})}})),lR=(0,x._C)((e={})=>{let t=e.sidecarUrl||"http://localhost:8969/stream";return{name:"SpotlightBrowser",setup:()=>{t_.T&&M.vF.log("Using Sidecar URL",t)},processEvent:e=>{var t;return"transaction"===(t=e).type&&t.spans&&t.contexts&&t.contexts.trace&&"ui.action.click"===t.contexts.trace.op&&t.spans.some(({description:e})=>e&&e.includes("#sentry-spotlight"))?null:e},afterAllSetup:e=>{var n,r;let i,o;n=e,r=t,i=(0,tL.qd)("fetch"),o=0,n.on("beforeEnvelope",e=>{o>3?M.vF.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",o):i(r,{method:"POST",body:(0,ej.bN)(e),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(e=>{e.status>=200&&e.status<400&&(o=0)},e=>{o++,M.vF.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",e)})})}}});var lD=n(973913),lA=n(883950),lN=n(215570);let lL=(0,x._C)(()=>({name:"LaunchDarkly",processEvent:(e,t,n)=>(0,lN.OW)(e)}));function lF(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{(0,lN.bj)(e,t.value)}}}let lP=(0,x._C)(()=>({name:"OpenFeature",processEvent:(e,t,n)=>(0,lN.OW)(e)}));class lj{after(e,t){(0,lN.bj)(t.flagKey,t.value)}error(e,t,n){(0,lN.bj)(e.flagKey,e.defaultValue)}}let l$=(0,x._C)(({unleashClientClass:e})=>({name:"Unleash",processEvent:(e,t,n)=>(0,lN.OW)(e),setupOnce(){let t=e.prototype;(0,B.GS)(t,"isEnabled",lU)}}));function lU(e){return function(...t){let n=t[0],r=e.apply(this,t);return"string"==typeof n&&"boolean"==typeof r?(0,lN.bj)(n,r):t_.T&&M.vF.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}let lH=(0,x._C)(({featureFlagClient:e})=>({name:"Statsig",processEvent:(e,t,n)=>(0,lN.OW)(e),setup(){e.on("gate_evaluation",e=>{(0,lN.bj)(e.gate.name,e.gate.value)})}}))}