1(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a30b0696-08ed-4465-8d54-ec110e86637b",e._sentryDebugIdIdentifier="sentry-dbid-a30b0696-08ed-4465-8d54-ec110e86637b")}catch{}})();const v=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,G=globalThis,it="9.47.1";function ft(){return dr(G),G}function dr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||it,t[it]=t[it]||{}}function an(e,t,n=G){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[it]=r[it]||{};return s[e]||(s[e]=t())}const pu=["debug","info","warn","error","log","assert","trace"],hu="Sentry Logger ",jn={};function pt(e){if(!("console"in G))return e();const t=G.console,n={},r=Object.keys(jn);r.forEach(s=>{const i=jn[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function mu(){ks().enabled=!0}function gu(){ks().enabled=!1}function $o(){return ks().enabled}function _u(...e){ws("log",...e)}function yu(...e){ws("warn",...e)}function Su(...e){ws("error",...e)}function ws(e,...t){v&&$o()&&pt(()=>{G.console[e](`${hu}[${e}]:`,...t)})}function ks(){return v?an("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const g={enable:mu,disable:gu,isEnabled:$o,log:_u,warn:yu,error:Su},Uo=50,ut="?",li=/\(error: (.*)\)/,fi=/captureMessage|captureException/;function Ho(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(` 2`);for(let c=r;c<o.length;c++){const a=o[c];if(a.length>1024)continue;const u=li.test(a)?a.replace(li,"$1"):a;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){i.push(l);break}}if(i.length>=Uo+s)break}}return bu(i.slice(s))}}function Eu(e){return Array.isArray(e)?Ho(...e):e}function bu(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(bn(t).function||"")&&t.pop(),t.reverse(),fi.test(bn(t).function||"")&&(t.pop(),fi.test(bn(t).function||"")&&t.pop()),t.slice(0,Uo).map(n=>({...n,filename:n.filename||bn(t).filename,function:n.function||ut}))}function bn(e){return e[e.length-1]||{}}const Ar="<anonymous>";function Pe(e){try{return!e||typeof e!="function"?Ar:e.name||Ar}catch{return Ar}}function pi(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Pn={},hi={};function Qe(e,t){Pn[e]=Pn[e]||[],Pn[e].push(t)}function Ze(e,t){if(!hi[e]){hi[e]=!0;try{t()}catch(n){v&&g.error(`Error while instrumenting ${e}`,n)}}}function ve(e,t){const n=e&&Pn[e];if(n)for(const r of n)try{r(t)}catch(s){v&&g.error(`Error while triggering instrumentation handler. 3Type: ${e} 4Name: ${Pe(r)} 5Error:`,s)}}let Nr=null;function Wo(e){const t="error";Qe(t,e),Ze(t,vu)}function vu(){Nr=G.onerror,G.onerror=function(e,t,n,r,s){return ve("error",{column:r,error:s,line:n,msg:e,url:t}),Nr?Nr.apply(this,arguments):!1},G.onerror.__SENTRY_INSTRUMENTED__=!0}let Or=null;function zo(e){const t="unhandledrejection";Qe(t,e),Ze(t,Tu)}function Tu(){Or=G.onunhandledrejection,G.onunhandledrejection=function(e){return ve("unhandledrejection",e),Or?Or.apply(this,arguments):!0},G.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const jo=Object.prototype.toString;function Rs(e){switch(jo.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Fe(e,Error)}}function Dt(e,t){return jo.call(e)===`[object ${t}]`}function qo(e){return Dt(e,"ErrorEvent")}function mi(e){return Dt(e,"DOMError")}function Iu(e){return Dt(e,"DOMException")}function Oe(e){return Dt(e,"String")}function Cs(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Qt(e){return e===null||Cs(e)||typeof e!="object"&&typeof e!="function"}function Zt(e){return Dt(e,"Object")}function lr(e){return typeof Event<"u"&&Fe(e,Event)}function wu(e){return typeof Element<"u"&&Fe(e,Element)}function ku(e){return Dt(e,"RegExp")}function cn(e){return!!(e?.then&&typeof e.then=="function")}function Ru(e){return Zt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Fe(e,t){try{return e instanceof t}catch{return!1}}function Go(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Vo(e){return typeof Request<"u"&&Fe(e,Request)}const xs=G,Cu=80;function Te(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const c=" > ",a=c.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||Cu;for(;n&&i++<r&&(u=xu(n,d),!(u==="html"||i>1&&o+s.length*a+u.length>=l));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(c)}catch{return"<unknown>"}}function xu(e,t){const n=e,r=[];if(!n?.tagName)return"";if(xs.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t?.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s?.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Oe(o)){const c=o.split(/\s+/);for(const a of c)r.push(`.${a}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const c=n.getAttribute(o);c&&r.push(`[${o}="${c}"]`)}return r.join("")}function Lt(){try{return xs.document.location.href}catch{return""}}function Yo(e){if(!xs.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function qn(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function gi(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{Go(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Mu(e,t,n=!1){return Oe(e)?ku(t)?t.test(e):Oe(t)?n?e===t:e.includes(t):!1:!1}function De(e,t=[],n=!1){return t.some(r=>Mu(e,r,n))}function _e(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&Xo(s,r);try{e[t]=s}catch{v&&g.log(`Failed to replace method "${t}" in object`,e)}}function Ee(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{v&&g.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Xo(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Ee(e,"__sentry_original__",t)}catch{}}function Ms(e){return e.__sentry_original__}function Ko(e){if(Rs(e))return{message:e.message,name:e.name,stack:e.stack,...yi(e)};if(lr(e)){const t={type:e.type,target:_i(e.target),currentTarget:_i(e.currentTarget),...yi(e)};return typeof CustomEvent<"u"&&Fe(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function _i(e){try{return wu(e)?Te(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function yi(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Au(e,t=40){const n=Object.keys(Ko(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return qn(r,t);for(let s=n.length;s>0;s--){const i=n.slice(0,s).join(", ");
5if(!(i.length>t))return s===n.length?i:qn(i,t)}return""}function Nu(){const e=G;return e.crypto||e.msCrypto}function Se(e=Nu()){let t=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function Jo(e){return e.exception?.values?.[0]}function nt(e){const{message:t,event_id:n}=e;if(t)return t;const r=Jo(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Kr(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function wt(e,t){const n=Jo(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s?.data,...t.data};n.mechanism.data=i}}function Si(e){if(Ou(e))return!0;try{Ee(e,"__sentry_captured__",!0)}catch{}return!1}function Ou(e){try{return e.__sentry_captured__}catch{}}const Qo=1e3;function ht(){return Date.now()/Qo}function Du(){const{performance:e}=G;if(!e?.now||!e.timeOrigin)return ht;const t=e.timeOrigin;return()=>(t+e.now())/Qo}let Ei;function ue(){return(Ei??(Ei=Du()))()}let Dr;function Lu(){const{performance:e}=G;if(!e?.now)return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=e.timing?.navigationStart,a=typeof o=="number"?Math.abs(o+n-r):t,u=a<t;return i||u?s<=a?[e.timeOrigin,"timeOrigin"]:[o,"navigationStart"]:[r,"dateNow"]}function pe(){return Dr||(Dr=Lu()),Dr[0]}function Pu(e){const t=ue(),n={sid:Se(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Bu(n)};return e&&kt(n,e),n}function kt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ue(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Se()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Fu(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),kt(e,n)}function Bu(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function un(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=un(r[s],t[s],n-1));return r}function Ve(){return Se()}function dn(){return Se().substring(16)}const Jr="_sentrySpan";function Rt(e,t){t?Ee(e,Jr,t):delete e[Jr]}function Gn(e){return e[Jr]}const $u=100;class Be{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ve(),sampleRand:Math.random()}}clone(){const t=new Be;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Rt(t,Gn(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&kt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof Be?n.getScopeData():Zt(n)?t:void 0,{tags:s,extra:i,user:o,contexts:c,level:a,fingerprint:u=[],propagationContext:d}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},o&&Object.keys(o).length&&(this._user=o),a&&(this._level=a),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Rt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ve(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:$u;if(r<=0)return this;const s={timestamp:ht(),...t,message:t.message?qn(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Gn(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=un(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Se();if(!this._client)return v&&g.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r?.event_id||Se();if(!this._client)return v&&g.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=n?.event_id||Se();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(v&&g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
5h(t=>{t(this)}),this._notifyingListeners=!1)}}function Uu(){return an("defaultCurrentScope",()=>new Be)}function Hu(){return an("defaultIsolationScope",()=>new Be)}class Wu{constructor(t,n){let r;t?r=t:r=new Be;let s;n?s=n:s=new Be,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return cn(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Ct(){const e=ft(),t=dr(e);return t.stack=t.stack||new Wu(Uu(),Hu())}function zu(e){return Ct().withScope(e)}function ju(e,t){const n=Ct();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function bi(e){return Ct().withScope(()=>e(Ct().getIsolationScope()))}function qu(){return{withIsolationScope:bi,withScope:zu,withSetScope:ju,withSetIsolationScope:(e,t)=>bi(t),getCurrentScope:()=>Ct().getScope(),getIsolationScope:()=>Ct().getIsolationScope()}}function Pt(e){const t=dr(e);return t.acs?t.acs:qu()}function X(){const e=ft();return Pt(e).getCurrentScope()}function Ae(){const e=ft();return Pt(e).getIsolationScope()}function Gu(){return an("globalScope",()=>new Be)}function fr(...e){const t=ft(),n=Pt(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function U(){return X().getClient()}function Vu(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||dn()};return r&&(i.parent_span_id=r),i}const be="sentry.source",As="sentry.sample_rate",Zo="sentry.previous_trace_sample_rate",$e="sentry.op",ne="sentry.origin",Vn="sentry.idle_span_finish_reason",ln="sentry.measurement_unit",fn="sentry.measurement_value",vi="sentry.custom_span_name",Ns="sentry.profile_id",Ft="sentry.exclusive_time",Yu="sentry.link.type",Xu=0,ea=1,oe=2;function Ku(e){if(e<400&&e>=100)return{code:ea};if(e>=400&&e<500)switch(e){case 401:return{code:oe,message:"unauthenticated"};case 403:return{code:oe,message:"permission_denied"};case 404:return{code:oe,message:"not_found"};case 409:return{code:oe,message:"already_exists"};case 413:return{code:oe,message:"failed_precondition"};case 429:return{code:oe,message:"resource_exhausted"};case 499:return{code:oe,message:"cancelled"};default:return{code:oe,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:oe,message:"unimplemented"};case 503:return{code:oe,message:"unavailable"};case 504:return{code:oe,message:"deadline_exceeded"};default:return{code:oe,message:"internal_error"}}return{code:oe,message:"unknown_error"}}function ta(e,t){e.setAttribute("http.response.status_code",t);const n=Ku(t);n.message!=="unknown_error"&&e.setStatus(n)}const na="_sentryScope",ra="_sentryIsolationScope";function Ju(e,t,n){e&&(Ee(e,ra,n),Ee(e,na,t))}function Yn(e){return{scope:e[na],isolationScope:e[ra]}}const Os="sentry-",Qu=/^sentry-/,Zu=8192;function sa(e){const t=td(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(Qu)){const o=s.slice(Os.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function ed(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Os}${r}`]=s),n),{});return nd(t)}function td(e){if(!(!e||!Oe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Ti(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):Ti(e)}function Ti(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function nd(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>Zu?(v&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}function dt(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const ia=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function rd(e){if(!e)return;const t=e.match(ia);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function sd(e,t){const n=rd(e),r=sa(t);if(!n?.traceId)return{traceId:Ve(),sampleRand:Math.random()};const s=id(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:o,parentSampled:c}=n;return{traceId:i,parentSpanId:o,sampled:c,dsc:r||{},sampleRand:s}}function oa(e=Ve(),t=dn(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function id(e,t){const n=dt(t?.sample_rand);if(n!==void 0)return n;const r=dt(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const aa=0,Ds=1;let Ii=!1;function od(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:c,links:a}=q(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:c,links:a}}function ad(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:q(e).parent_span_id,i=Yn(e).scope,o=r?i?.getPropagationContext().propagationSpanId||dn():t;return{parent_span_id:s,span_id:o,trace_id:n}}function cd(e){const{traceId:t,spanId:n}=e.spanContext(),r=mt(e);return oa(t,n,r)}function ca(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:i})=>({span_id:t,trace_id:n,sampled:r===Ds,attributes:i,...s}))}function ot(e){return typeof e=="number"?wi(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?wi(e.getTime()):ue()}function wi(e){return e>9999999999?e/1e3:e}function q(e){if(dd(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(ud(e)){const{attributes:r,startTime:s,name:i,endTime:o,status:c,links:a}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:u,start_timestamp:ot
5(s),timestamp:ot(o)||void 0,status:ua(c),op:r[$e],origin:r[ne],links:ca(a)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function ud(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function dd(e){return typeof e.getSpanJSON=="function"}function mt(e){const{traceFlags:t}=e.spanContext();return t===Ds}function ua(e){if(!(!e||e.code===Xu))return e.code===ea?"ok":e.message||"unknown_error"}const at="_sentryChildSpans",Qr="_sentryRootSpan";function da(e,t){const n=e[Qr]||e;Ee(t,Qr,n),e[at]?e[at].add(t):Ee(e,at,new Set([t]))}function ld(e,t){e[at]&&e[at].delete(t)}function Fn(e){const t=new Set;function n(r){if(!t.has(r)&&mt(r)){t.add(r);const s=r[at]?Array.from(r[at]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function de(e){return e[Qr]||e}function he(){const e=ft(),t=Pt(e);return t.getActiveSpan?t.getActiveSpan():Gn(X())}function Zr(){Ii||(pt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Ii=!0)}let ki=!1;function fd(){if(ki)return;function e(){const t=he(),n=t&&de(t);if(n){const r="internal_error";v&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:oe,message:r})}}e.tag="sentry_tracingErrorCallback",ki=!0,Wo(e),zo(e)}function Ye(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||U()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const Ls="production",pd=/^o(\d+)\./,hd=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function md(e){return e==="http"||e==="https"}function pn(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:c,publicKey:a}=e;return`${c}://${a}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function gd(e){const t=hd.exec(e);if(!t){pt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",c=""]=t.slice(1);let a="",u=c;const d=u.split("/");if(d.length>1&&(a=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return la({host:i,pass:s,path:a,projectId:u,port:o,protocol:n,publicKey:r})}function la(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function _d(e){if(!v)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(g.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?md(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function yd(e){return e.match(pd)?.[1]}function Sd(e){const t=typeof e=="string"?gd(e):la(e);if(!(!t||!_d(t)))return t}const fa="_frozenDsc";function Bn(e,t){Ee(e,fa,t)}function pa(e,t){const n=t.getOptions(),{publicKey:r,host:s}=t.getDsn()||{};let i;n.orgId?i=String(n.orgId):s&&(i=yd(s));const o={environment:n.environment||Ls,release:n.release,public_key:r,trace_id:e,org_id:i};return t.emit("createDsc",o),o}function ha(e,t){const n=t.getPropagationContext();return n.dsc||pa(n.traceId,e)}function Ue(e){const t=U();if(!t)return{};const n=de(e),r=q(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s[As]??s[Zo];function c(h){return(typeof o=="number"||typeof o=="string")&&(h.sample_rate=`${o}`),h}const a=n[fa];if(a)return c(a);const u=i?.get("sentry.dsc"),d=u&&sa(u);if(d)return c(d);const l=pa(e.spanContext().traceId,t),f=s[be],p=r.description;return f!=="url"&&p&&(l.transaction=p),Ye()&&(l.sampled=String(mt(n)),l.sample_rand=i?.get("sentry.sample_rand")??Yn(n).scope?.getPropagationContext().sampleRand.toString()),c(l),t.emit("createDsc",l,n),l}class Xe{constructor(t={}){this._traceId=t.traceId||Ve(),this._spanId=t.spanId||dn()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:aa}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}
5addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Re(e,t=100,n=1/0){try{return es("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ma(e,t=3,n=100*1024){const r=Re(e,t);return Td(r)>n?ma(e,t-1,n):r}function es(e,t,n=1/0,r=1/0,s=Id()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const c=Ed(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;const a=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(a===0)return c.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return es("",p,a-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let l=0;const f=Ko(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(l>=r){d[p]="[MaxProperties ~]";break}const h=f[p];d[p]=es(p,h,a-1,r,s),l++}return o(t),d}function Ed(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Go(t))return"[VueViewModel]";if(Ru(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Pe(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=bd(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function bd(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function vd(e){return~-encodeURI(e).split(/%..|./).length}function Td(e){return vd(JSON.stringify(e))}function Id(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function gt(e,t=[]){return[e,t]}function wd(e,t){const[n,r]=e;return[n,[...r,t]]}function Ri(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function ts(e){const t=dr(G);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function kd(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[ts(r),i]:r.push(typeof i=="string"?ts(i):i)}for(const i of n){const[o,c]=i;if(s(` 6${JSON.stringify(o)} 7`),typeof c=="string"||c instanceof Uint8Array)s(c);else{let a;try{a=JSON.stringify(c)}catch{a=JSON.stringify(Re(c))}s(a)}}return typeof r=="string"?r:Rd(r)}function Rd(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Cd(e){return[{type:"span"},e]}function xd(e){const t=typeof e.data=="string"?ts(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Md={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function Ci(e){return Md[e]}function Ps(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function ga(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:pn(r)},...s&&{trace:s}}}function Ad(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Nd(e,t,n,r){const s=Ps(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:pn(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return gt(i,[o])}function Od(e,t,n,r){const s=Ps(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Ad(e,n?.sdk);const o=ga(e,s,r,t);return delete e.sdkProcessingMetadata,gt(o,[[{type:i},e]])}function Dd(e,t){function n(d){return!!d.trace_id&&!!d.public_key}const r=Ue(e[0]),s=t?.getDsn(),i=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:pn(s)}},c=t?.getOptions().beforeSendSpan,a=c?d=>{const l=q(d),f=c(l);return f||(Zr(),l)}:q,u=[];for(const d of e){const l=a(d);l&&u.push(Cd(l))}return gt(o,u)}function Ld(e){if(!v)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=q(e),{spanId:s}=e.spanContext(),i=mt(e),o=de(e),c=o===e,a=`[Tracing] Starting ${i?"sampled":"unsampled"} ${c?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!c){const{op:d,description:l}=q(o);u.push(`root ID: ${o.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}g.log(`${a} 8 ${u.join(` 9 `)}`)}function Pd(e){if(!v)return;const{description:t="< unknown name >",op:n="< unknown op >"}=q(e),{spanId:r}=e.spanContext(),i=de(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;g.log(o)}function Fd(e,t,n,r=he()){const s=r&&de(r);s&&(v&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[fn]:t,[ln]:n}))}function xi(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[ln],i=r[fn];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const Mi=1e3;class pr{constructor(t={}){this._traceId=t.traceId||Ve(),this._spanId=t.spanId||dn(),this._startTime=t.startTimestamp||ue(),this._links=t.links,this._attributes={},this.setAttributes({[ne]:"manual",[$e]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}
9addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Ds:aa}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=ot(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(be,"custom"),this}end(t){this._endTime||(this._endTime=ot(t),Pd(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[$e],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ua(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ne],profile_id:this._attributes[Ns],exclusive_time:this._attributes[Ft],measurements:xi(this._events),is_segment:this._isStandaloneSpan&&de(this)===this||void 0,segment_id:this._isStandaloneSpan?de(this).spanContext().spanId:void 0,links:ca(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){v&&g.log("[Tracing] Adding an event to span:",t);const s=Ai(n)?n:r||ue(),i=Ai(n)?{}:n||{},o={name:t,time:ot(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=U();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===de(this)))return;if(this._isStandaloneSpan){this._sampled?$d(Dd([this],t)):(v&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Yn(this).scope||X()).captureEvent(r)}_convertSpanToTransaction(){if(!Ni(q(this)))return;this._name||(v&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Yn(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const i=Fn(this).filter(d=>d!==this&&!Bd(d)).map(d=>q(d)).filter(Ni),o=this._attributes[be];delete this._attributes[vi],i.forEach(d=>{delete d.data[vi]});const c={contexts:{trace:od(this)},spans:i.length>Mi?i.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,Mi):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Ue(this)},request:r,...o&&{transaction_info:{source:o}}},a=xi(this._events);return a&&Object.keys(a).length&&(v&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),c.measurements=a),c}}function Ai(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Ni(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Bd(e){return e instanceof pr&&e.isStandaloneSpan()}function $d(e){const t=U();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Ud(e,t,n=()=>{}){let r;try{r=e()}catch(s){throw t(s),n(),s}return Hd(r,t,n)}function Hd(e,t,n){return cn(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function Wd(e,t,n){if(!Ye(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:c=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):c}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const i=dt(s);if(i===void 0)return v&&g.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return v&&g.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];const o=n<i;return o||v&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const _a="__SENTRY_SUPPRESS_TRACING__";function zd(e,t){const n=Bs();if(n.startSpan)return n.startSpan(e,t);const r=Sa(e),{forceTransaction:s,parentSpan:i,scope:o}=e,c=o?.clone();return fr(c,()=>qd(i)(()=>{const u=X(),d=Ea(u,i),f=e.onlyIfParent&&!d?new Xe:ya({parentSpan:d,spanArguments:r,forceTransaction:s,scope:u});return Rt(u,f),Ud(()=>t(f),()=>{const{status:p}=q(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:oe,message:"internal_error"})},()=>{f.end()})}))}function Bt(e){const t=Bs();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Sa(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>fr(e.scope,o):s!==void 0?o=>Fs(s,o):o=>o())(()=>{const o=X(),c=Ea(o,s);return e.onlyIfParent&&!c?new Xe:ya({parentSpan:c,spanArguments:n,forceTransaction:r,scope:o})})}function Fs(e,t){const n=Bs();return n.withActiveSpan?n.withActiveSpan(e,t):fr(r=>(Rt(r,e||void 0),t(r)))}function ya({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ye()){const o=new Xe;if(n||!e){const c={sampled:"false",sample_rate:"0",transaction:t.name,...Ue(o)};Bn(o,c)}return o}const s=Ae();let i;if(e&&!n)i=jd(e,r,t),da(e,i);else if(e){const o=Ue(e),{traceId:c,spanId:a}=e.spanContext(),u=mt(e);i=Oi({traceId:c,parentSpanId:a,...t},r,u),Bn(i,o)}else{const{traceId:o,dsc:c,parentSpanId:a,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=Oi({traceId:o,parentSpanId:a,...t},r,u),c&&Bn(i,c)}return Ld(i),Ju(i,r,s),i}function Sa(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};
9return r.startTimestamp=ot(e.startTime),delete r.startTime,r}return n}function Bs(){const e=ft();return Pt(e)}function Oi(e,t,n){const r=U(),s=r?.getOptions()||{},{name:i=""}=e,o={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r?.emit("beforeSampling",o,{decision:!1});const c=o.parentSampled??n,a=o.spanAttributes,u=t.getPropagationContext(),[d,l,f]=t.getScopeData().sdkProcessingMetadata[_a]?[!1]:Wd(s,{name:i,parentSampled:c,attributes:a,parentSampleRate:dt(u.dsc?.sample_rate)},u.sampleRand),p=new pr({...e,attributes:{[be]:"custom",[As]:l!==void 0&&f?l:void 0,...a},sampled:d});return!d&&r&&(v&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function jd(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[_a]?!1:mt(e),o=i?new pr({...n,parentSpanId:r,traceId:s,sampled:i}):new Xe({traceId:s});da(e,o);const c=U();return c&&(c.emit("spanStart",o),n.endTimestamp&&c.emit("spanEnd",o)),o}function Ea(e,t){if(t)return t;if(t===null)return;const n=Gn(e);if(!n)return;const r=U();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?de(n):n}function qd(e){return e!==void 0?t=>Fs(e,t):t=>t()}const $n={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Gd="heartbeatFailed",Vd="idleTimeout",Yd="finalTimeout",Xd="externalFinish";function ba(e,t={}){const n=new Map;let r=!1,s,i=Xd,o=!t.disableAutoFinish;const c=[],{idleTimeout:a=$n.idleTimeout,finalTimeout:u=$n.finalTimeout,childSpanTimeout:d=$n.childSpanTimeout,beforeSpanEnd:l}=t,f=U();if(!f||!Ye()){const _=new Xe,T={sample_rate:"0",sampled:"false",...Ue(_)};return Bn(_,T),_}const p=X(),h=he(),m=Kd(e);m.end=new Proxy(m.end,{apply(_,T,A){if(l&&l(m),T instanceof Xe)return;const[E,...I]=A,F=E||ue(),x=ot(F),ee=Fn(m).filter(z=>z!==m);if(!ee.length)return C(x),Reflect.apply(_,T,[x,...I]);const Q=ee.map(z=>q(z).timestamp).filter(z=>!!z),D=Q.length?Math.max(...Q):void 0,B=q(m).start_timestamp,S=Math.min(B?B+u/1e3:1/0,Math.max(B||-1/0,Math.min(x,D||1/0)));return C(S),Reflect.apply(_,T,[S,...I])}});function y(){s&&(clearTimeout(s),s=void 0)}function b(_){y(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=Vd,m.end(_))},a)}function w(_){s=setTimeout(()=>{!r&&o&&(i=Gd,m.end(_))},d)}function j(_){y(),n.set(_,!0);const T=ue();w(T+d/1e3)}function P(_){if(n.has(_)&&n.delete(_),n.size===0){const T=ue();b(T+a/1e3)}}function C(_){r=!0,n.clear(),c.forEach(x=>x()),Rt(p,h);const T=q(m),{start_timestamp:A}=T;if(!A)return;T.data[Vn]||m.setAttribute(Vn,i),g.log(`[Tracing] Idle span "${T.op}" finished`);const I=Fn(m).filter(x=>x!==m);let F=0;I.forEach(x=>{x.isRecording()&&(x.setStatus({code:oe,message:"cancelled"}),x.end(_),v&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(x,void 0,2)));const ee=q(x),{timestamp:Q=0,start_timestamp:D=0}=ee,B=D<=_,S=(u+a)/1e3,z=Q-D<=S;if(v){const N=JSON.stringify(x,void 0,2);B?z||g.log("[Tracing] Discarding span since it finished after idle span final timeout",N):g.log("[Tracing] Discarding span since it happened after idle span was finished",N)}(!z||!B)&&(ld(m,x),F++)}),F>0&&m.setAttribute("sentry.idle_span_discarded_spans",F)}return c.push(f.on("spanStart",_=>{if(r||_===m||q(_).timestamp||_ instanceof pr&&_.isStandaloneSpan())return;Fn(m).includes(_)&&j(_.spanContext().spanId)})),c.push(f.on("spanEnd",_=>{r||P(_.spanContext().spanId)})),c.push(f.on("idleSpanEnableAutoFinish",_=>{_===m&&(o=!0,b(),n.size&&w())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(m.setStatus({code:oe,message:"deadline_exceeded"}),i=Yd,m.end())},u),m}function Kd(e){const t=Bt(e);return Rt(X(),t),v&&g.log("[Tracing] Started span is an idle span"),t}const Lr=0,Di=1,Li=2;function He(e){return new Ke(t=>{t(e)})}function Xn(e){return new Ke((t,n)=>{n(e)})}class Ke{constructor(t){this._state=Lr,this._handlers=[],this._runExecutor(t)}then(t,n){return new Ke((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Ke((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>
9{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Lr)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Di&&n[1](this._value),this._state===Li&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===Lr){if(cn(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(Di,i)},s=i=>{n(Li,i)};try{t(r,s)}catch(i){s(i)}}}function ns(e,t,n,r=0){return new Ke((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const c=o({...t},n);v&&o.id&&c===null&&g.log(`Event processor "${o.id}" dropped event`),cn(c)?c.then(a=>ns(e,a,n,r+1).then(s)).then(null,i):ns(e,c,n,r+1).then(s).then(null,i)}})}function Jd(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;Qd(e,t),r&&tl(e,r),nl(e,n),Zd(e,s),el(e,i)}function Pi(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:c,breadcrumbs:a,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:f,transactionName:p,span:h}=t;vn(e,"extra",n),vn(e,"tags",r),vn(e,"user",s),vn(e,"contexts",i),e.sdkProcessingMetadata=un(e.sdkProcessingMetadata,c,2),o&&(e.level=o),p&&(e.transactionName=p),h&&(e.span=h),a.length&&(e.breadcrumbs=[...e.breadcrumbs,...a]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...f}}
9function vn(e,t,n){e[t]=un(e[t],n,1)}function Qd(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:c}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),o&&(e.level=o),c&&e.type!=="transaction"&&(e.transaction=c)}function Zd(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function el(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function tl(e,t){e.contexts={trace:ad(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Ue(t),...e.sdkProcessingMetadata};const n=de(t),r=q(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function nl(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let Tn,Fi,In;function rl(e){const t=G._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return In&&n.length===Fi||(Fi=n.length,In=n.reduce((r,s)=>{Tn||(Tn={});const i=Tn[s];if(i)r[i[0]]=i[1];else{const o=e(s);for(let c=o.length-1;c>=0;c--){const u=o[c]?.filename,d=t[s];if(u&&d){r[u]=d,Tn[s]=[u,d];break}}}return r},{})),In}function va(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=e,a={...t,event_id:t.event_id||n.event_id||Se(),timestamp:t.timestamp||ht()},u=n.integrations||e.integrations.map(y=>y.name);sl(a,e),al(a,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&il(a,e.stackParser);const d=ul(r,n.captureContext);n.mechanism&&wt(a,n.mechanism);const l=s?s.getEventProcessors():[],f=Gu().getScopeData();if(i){const y=i.getScopeData();Pi(f,y)}if(d){const y=d.getScopeData();Pi(f,y)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Jd(a,f);const h=[...l,...f.eventProcessors];return ns(h,a,n).then(y=>(y&&ol(y),typeof o=="number"&&o>0?cl(y,o,c):y))}function sl(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;e.environment=e.environment||n||Ls,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const o=e.request;o?.url&&(o.url=qn(o.url,i))}function il(e,t){const n=rl(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function ol(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function al(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function cl(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:Re(s.data,t,n)}}))},...e.user&&{user:Re(e.user,t,n)},...e.contexts&&{contexts:Re(e.contexts,t,n)},...e.extra&&{extra:Re(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Re(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:Re(s.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Re(e.contexts.flags,3,n)),r}function ul(e,t){if(!t)return e;const n=e?e.clone():new Be;return n.update(t),n}function Ta(e,t){return X().captureException(e,void 0)}function Ia(e,t){return X().captureEvent(e,t)}function dl(e,t){Ae().setContext(e,t)}function ll(){const e=U();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function fl(e){Ae().addEventProcessor(e)}function Bi(e){const t=Ae(),n=X(),{userAgent:r}=G.navigator||{},s=Pu({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return i?.status==="ok"&&kt(i,{status:"exited"}),wa(),t.setSession(s),s}function wa(){const e=Ae(),n=X().getSession()||e.getSession();n&&Fu(n),ka(),e.setSession()}function ka(){const e=Ae(),t=U(),n=e.getSession();n&&t&&t.captureSession(n)}function $i(e=!1){if(e){wa();return}ka()}const pl="7";function hl(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function ml(e){return`${hl(e)}${e.projectId}/envelope/`}function gl(e,t){const n={sentry_version:pl};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function _l(e,t,n){return t||`${ml(e)}?${gl(e,n)}`}const Ui=[];function yl(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Sl(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return yl(r)}function El(e,t){const n={};return t.forEach(r=>{r&&Ra(e,r,n)}),n}function Hi(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}
9function Ra(e,t,n){if(n[t.name]){v&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Ui.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Ui.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}v&&g.log(`Integration installed: ${t.name}`)}function bl(e,t,n){const r=[{type:"client_report"},{timestamp:ht(),discarded_events:e}];return gt(t?{dsn:t}:{},[r])}function Ca(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function vl(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:c}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:o?.[Ns],exclusive_time:o?.[Ft],measurements:e.measurements,is_segment:!0}}function Tl(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Ns]:e.profile_id},...e.exclusive_time&&{[Ft]:e.exclusive_time}}}},measurements:e.measurements}}const Wi="Not capturing exception because it's already been captured.",zi="Discarded session because of missing or non-string release",xa=Symbol.for("SentryInternalError"),Ma=Symbol.for("SentryDoNotSendEventError");function Un(e){return{message:e,[xa]:!0}}function Pr(e){return{message:e,[Ma]:!0}}function ji(e){return!!e&&typeof e=="object"&&xa in e}function qi(e){return!!e&&typeof e=="object"&&Ma in e}class Il{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Sd(t.dsn):v&&g.warn("No DSN provided, client will not send events."),this._dsn){const n=_l(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const s=Se();if(Si(t))return v&&g.log(Wi),s;const i={event_id:s,...n};return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,s){const i={event_id:Se(),...r},o=Cs(t)?t:String(t),c=Qt(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(c.then(a=>this._captureEvent(a,i,s))),i.event_id}captureEvent(t,n,r){const s=Se();if(n?.originalException&&Si(n.originalException))return v&&g.log(Wi),s;const i={event_id:s,...n},o=t.sdkProcessingMetadata||{},c=o.capturedSpanScope,a=o.capturedSpanIsolationScope;return this._process(this._captureEvent(t,i,c||r,a)),i.event_id}captureSession(t){this.sendSession(t),kt(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;
9return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):He(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];Ra(this,t,this._integrations),n||Hi(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Od(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=wd(r,xd(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const{release:n,environment:r=Ls}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){v&&g.warn(zi);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){v&&g.warn(zi);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=Nd(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;v&&g.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(v&&g.error("Error while sending envelope:",n),n)):(v&&g.error("Transport disabled"),He({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=El(this,t),Hi(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const i=n.exception?.values;if(i){s=!0;for(const a of i)if(a.mechanism?.handled===!1){r=!0;break}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(kt(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ke(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o?.length&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),va(i,t,n,r,this,s).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts={trace:Vu(r),...c.contexts};const a=ha(this,r);return c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata},c})}_captureEvent(t,n={},r=X(),s=Ae()){return v&&rs(t)&&g.log(`Captured error event \`${Ca(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{v&&(qi(i)?g.log(i.message):ji(i)?g.warn(i.message):g.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,c=Aa(t),a=rs(t),u=t.type||"error",d=`before send for type \`${u}\``,l=typeof o>"u"?void 0:dt(o);if(a&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),Xn(Pr(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Pr("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const m=kl(this,i,p,n);return wl(m,d)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),c){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw Pr(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||s.getSession();if(a&&h&&this._updateSessionFromEvent(h,p),c){const y=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,b=p.spans?p.spans.length:0,w=y-b;w>0&&this.recordDroppedEvent("before_send","span",w)}const m=p.transaction_info;if(c&&m&&p.transaction!==t.transaction){const y="custom";p.transaction_info={...m,source:y}}return this.sendEvent(p,n),p}).then(null,p=>
9{throw qi(p)||ji(p)?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),Un(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 10Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){v&&g.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){v&&g.log("No outcomes to send");return}if(!this._dsn){v&&g.log("No dsn provided, will not send outcomes");return}v&&g.log("Sending outcomes:",t);const n=bl(t,this._options.tunnel&&pn(this._dsn));this.sendEnvelope(n)}}function wl(e,t){const n=`${t} must return \`null\` or a valid event.`;if(cn(e))return e.then(r=>{if(!Zt(r)&&r!==null)throw Un(n);return r},r=>{throw Un(`${t} rejected with ${r}`)});if(!Zt(e)&&e!==null)throw Un(n);return e}function kl(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=t;let c=n;if(rs(c)&&s)return s(c,r);if(Aa(c)){if(o){const a=o(vl(c));if(a?c=un(n,Tl(a)):Zr(),c.spans){const u=[];for(const d of c.spans){const l=o(d);l?u.push(l):(Zr(),u.push(d))}c.spans=u}}if(i){if(c.spans){const a=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(c,r)}}return c}function rs(e){return e.type===void 0}function Aa(e){return e.type==="transaction"}function Rl(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function Cl(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=pn(r)),gt(s,[Rl(e)])}function Fr(e,t){const n=xl(e)??[];if(n.length===0)return;const r=e.getOptions(),s=Cl(n,r._metadata,r.tunnel,e.getDsn());Na().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function xl(e){return Na().get(e)}function Na(){return an("clientToLogBufferMap",()=>new WeakMap)}function Ml(e,t){t.debug===!0&&(v?g.enable():pt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),X().update(t.initialScope);const r=new e(t);return Al(r),r.init(),r}function Al(e){X().setClient(e)}const Oa=Symbol.for("SentryBufferFullError");function Nl(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function s(o){if(!n())return Xn(Oa);const c=o();return t.indexOf(c)===-1&&t.push(c),c.then(()=>r(c)).then(null,()=>r(c).then(null,()=>{})),c}function i(o){return new Ke((c,a)=>{let u=t.length;if(!u)return c(!0);const d=setTimeout(()=>{o&&o>0&&c(!1)},o);t.forEach(l=>{He(l).then(()=>{--u||(clearTimeout(d),c(!0))},a)})})}return{$:t,add:s,drain:i}}const Ol=60*1e3;function Dl(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Ol:r-t}function Ll(e,t){return e[t]||e.all||0}function Da(e,t,n=Date.now()){return Ll(e,t)>n}function La(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(i)for(const c of i.trim().split(",")){const[a,u,,,d]=c.split(":",5),l=parseInt(a,10),f=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+Dl(o,r):t===429&&(s.all=r+60*1e3);return s}const Pl=64;function Fl(e,t,n=Nl(e.bufferSize||Pl)){let r={};const s=o=>n.drain(o);function i(o){const c=[];if(Ri(o,(l,f)=>{const p=Ci(f);Da(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):c.push(l)}),c.length===0)return He({});const a=gt(o[0],c),u=l=>{Ri(a,(f,p)=>{e.recordDroppedEvent(l,Ci(p))})},d=()=>t({body:kd(a)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&v&&g.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=La(r,l),l),l=>{throw u("network_error"),v&&g.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===Oa)return v&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),He({});throw l})}return{send:i,flush:s}}function Bl(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return Ul(e,n)||$l(e,r)}function $l(e,t){return t?Gi(e)===Gi(t):!1}function Ul(e,t){return t?e.includes(t.host):!1}function Gi(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Hl(e){e.user?.ip_address===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function Wl(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Pa(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:it})),version:it}),e._metadata=s}function Fa(e={}){const t=e.client||U();if(!ll()||!t)return{};const n=ft(),r=Pt(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||X(),i=e.span||he(),o=i?cd(i):zl(s),c=i?Ue(i):ha(t,s),a=ed(c);return ia.test(o)?{"sentry-trace":o,baggage:a}:(g.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function zl(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return oa(t,r,n)}function jl(e,t,n){let r,s,i;const o=n?.maxWait?Math.max(n.maxWait,t):0,c=n?.setTimeoutImpl||setTimeout;function a(){return u(),r=e(),r}function u(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function d(){return s!==void 0||i!==void 0?a():r}function l(){return s&&clearTimeout(s),s=c(a,t),o&&i===void 0&&(i=c(a,o)),r}return l.cancel=u,l.flush=d,l}const ql=100;function Je(e,t){const n=U(),r=Ae();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=ql}=n.getOptions();if(i<=0)return;const c={timestamp:ht(),...e},a=s?pt(()=>s(c,t)):c;a!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,i)
10)}let Vi;const Gl="FunctionToString",Yi=new WeakMap,Vl=(()=>({name:Gl,setupOnce(){Vi=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ms(this),n=Yi.has(U())&&t!==void 0?t:this;return Vi.apply(n,e)}}catch{}},setup(e){Yi.set(e,!0)}})),Yl=Vl,Xl=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Kl="EventFilters",Jl=(e={})=>{let t;return{name:Kl,setup(n){const r=n.getOptions();t=Xi(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=Xi(e,i)}return Zl(n,t)?null:n}}},Ql=((e={})=>({...Jl(e),name:"InboundFilters"}));function Xi(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Xl],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Zl(e,t){if(e.type){if(e.type==="transaction"&&tf(e,t.ignoreTransactions))return v&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 11Event: ${nt(e)}`),!0}else{if(ef(e,t.ignoreErrors))return v&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${nt(e)}`),!0;if(of(e))return v&&g.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${nt(e)}`),!0;if(nf(e,t.denyUrls))return v&&g.warn(`Event dropped due to being matched by \`denyUrls\` option. 14Event: ${nt(e)}. 15Url: ${Kn(e)}`),!0;if(!rf(e,t.allowUrls))return v&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option. 16Event: ${nt(e)}. 17Url: ${Kn(e)}`),!0}return!1}function ef(e,t){return t?.length?Ca(e).some(n=>De(n,t)):!1}function tf(e,t){if(!t?.length)return!1;const n=e.transaction;return n?De(n,t):!1}function nf(e,t){if(!t?.length)return!1;const n=Kn(e);return n?De(n,t):!1}function rf(e,t){if(!t?.length)return!0;const n=Kn(e);return n?De(n,t):!0}function sf(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Kn(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?sf(n):null}catch{return v&&g.error(`Cannot extract url for event ${nt(e)}`),null}}function of(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function af(e,t,n,r,s,i){if(!s.exception?.values||!i||!Fe(i.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=ss(e,t,r,i.originalException,n,s.exception.values,o,0))}function ss(e,t,n,r,s,i,o,c){if(i.length>=n+1)return i;let a=[...i];if(Fe(r[s],Error)){Ki(o,c);const u=e(t,r[s]),d=a.length;Ji(u,s,d,c),a=ss(e,t,n,r[s],s,[u,...a],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(Fe(u,Error)){Ki(o,c);const l=e(t,u),f=a.length;Ji(l,`errors[${d}]`,f,c),a=ss(e,t,n,u,s,[l,...a],l,f)}}),a}function Ki(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Ji(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function cf(e){const t="console";Qe(t,e),Ze(t,uf)}function uf(){"console"in G&&pu.forEach(function(e){e in G.console&&_e(G.console,e,function(t){return jn[e]=t,function(...n){ve("console",{args:n,level:e}),jn[e]?.apply(G.console,n)}})})}function Ba(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const df="Dedupe",lf=(()=>{let e;return{name:df,processEvent(t){if(t.type)return t;try{if(pf(t,e))return v&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),ff=lf;function pf(e,t){return t?!!(hf(e,t)||mf(e,t)):!1}function hf(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ua(e,t)||!$a(e,t))}function mf(e,t){const n=Qi(t),r=Qi(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ua(e,t)||!$a(e,t))}function $a(e,t){let n=pi(e),r=pi(t);if(!n&&!r)return!0;
17if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Ua(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Qi(e){return e.exception?.values?.[0]}const gf="thismessage:/";function Ha(e){return"isRelative"in e}function Wa(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?gf:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function _f(e){if(Ha(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function ct(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function yf(e){return e.split(/[?#]/,1)[0]}function Sf(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const{method:i,url:o}=e.fetchData,c=Ye()&&t(o);if(e.endTimestamp&&c){const l=e.fetchData.__span;if(!l)return;const f=r[l];f&&(bf(f,e),delete r[l]);return}const a=!!he(),u=c&&a?Bt(Tf(o,i,s)):new Xe;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const l=e.args[0],f=e.args[1]||{},p=Ef(l,f,Ye()&&a?u:void 0);p&&(e.args[1]=f,f.headers=p)}const d=U();if(d){const l={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",u,l)}return u}function Ef(e,t,n){const r=Fa({span:n}),s=r["sentry-trace"],i=r.baggage;if(!s)return;const o=t.headers||(Vo(e)?e.headers:void 0);if(o)if(vf(o)){const c=new Headers(o);if(c.get("sentry-trace")||c.set("sentry-trace",s),i){const a=c.get("baggage");a?wn(a)||c.set("baggage",`${a},${i}`):c.set("baggage",i)}return c}else if(Array.isArray(o)){const c=[...o];o.find(u=>u[0]==="sentry-trace")||c.push(["sentry-trace",s]);const a=o.find(u=>u[0]==="baggage"&&wn(u[1]));return i&&!a&&c.push(["baggage",i]),c}else{const c="sentry-trace"in o?o["sentry-trace"]:void 0,a="baggage"in o?o.baggage:void 0,u=a?Array.isArray(a)?[...a]:[a]:[],d=a&&(Array.isArray(a)?a.find(l=>wn(l)):wn(a));return i&&!d&&u.push(i),{...o,"sentry-trace":c??s,baggage:u.length>0?u.join(","):void 0}}else return{...r}}function bf(e,t){if(t.response){ta(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:oe,message:"internal_error"});e.end()}function wn(e){return e.split(",").some(t=>t.trim().startsWith(Os))}function vf(e){return typeof Headers<"u"&&Fe(e,Headers)}function Tf(e,t,n){const r=Wa(e);return{name:r?`${t} ${_f(r)}`:t,attributes:If(e,r,t,n)}}function If(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[ne]:r,[$e]:"http.client"};return t&&(Ha(t)||(s["http.url"]=t.href,s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function za(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const en=G;function wf(){return"history"in en&&!!en.history}function kf(){if(!("fetch"in en))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function is(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Rf(){if(typeof EdgeRuntime=="string")return!0;if(!kf())return!1;if(is(en.fetch))return!0;let e=!1;const t=en.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=is(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){v&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n
17)}return e}function ja(e,t){const n="fetch";Qe(n,e),Ze(n,()=>qa(void 0,t))}function Cf(e){const t="fetch-body-resolved";Qe(t,e),Ze(t,()=>qa(Mf))}function qa(e,t=!1){t&&!Rf()||_e(G,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=Af(r),c={args:r,fetchData:{method:i,url:o},startTimestamp:ue()*1e3,virtualError:s,headers:Nf(r)};return e||ve("fetch",{...c}),n.apply(G,r).then(async a=>(e?e(a):ve("fetch",{...c,endTimestamp:ue()*1e3,response:a}),a),a=>{if(ve("fetch",{...c,endTimestamp:ue()*1e3,error:a}),Rs(a)&&a.stack===void 0&&(a.stack=s.stack,Ee(a,"framesToPop",1)),a instanceof TypeError&&(a.message==="Failed to fetch"||a.message==="Load failed"||a.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(c.fetchData.url);a.message=`${a.message} (${u.host})`}catch{}throw a})}})}async function xf(e,t){if(e?.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:c}=await r.read();clearTimeout(o),c&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Mf(e){let t;try{t=e.clone()}catch{return}xf(t,()=>{ve("fetch-body-resolved",{endTimestamp:ue()*1e3,response:e})})}function os(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Zi(e){return typeof e=="string"?e:e?os(e,"url")?e.url:e.toString?e.toString():"":""}function Af(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Zi(n),method:os(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Zi(t),method:os(t,"method")?String(t.method).toUpperCase():"GET"}}function Nf(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Vo(t))return new Headers(t.headers)}catch{}}function Of(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Df(){return"npm"}function Lf(){return!Of()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function eo(){return typeof window<"u"&&(!Lf()||Pf())}function Pf(){return G.process?.type==="renderer"}const W=G;let as=0;function Ga(){return as>0}function Ff(){as++,setTimeout(()=>{as--})}function xt(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Ms(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>xt(o,t));return e.apply(this,i)}catch(i){throw Ff(),fr(o=>{o.addEventProcessor(c=>(t.mechanism&&(Kr(c,void 0),wt(c,t.mechanism)),c.extra={...c.extra,arguments:s},c)),Ta(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Xo(r,e),Ee(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function $s(){const e=Lt(),{referrer:t}=W.document||{},{userAgent:n}=W.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function Us(e,t){const n=Hs(e,t),r={type:Wf(t),value:zf(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Bf(e,t,n,r){const i=U()?.getOptions().normalizeDepth,o=Yf(t),c={__serialized__:ma(t,i)};if(o)return{exception:{values:[Us(e,o)]},extra:c};const a={exception:{values:[{type:lr(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Gf(t,{isUnhandledRejection:r})}]},extra:c};if(n){const u=Hs(e,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}function Br(e,t){return{exception:{values:[Us(e,t)]}}}function Hs(e,t){const n=t.stacktrace||t.stack||"",r=Uf(t),s=Hf(t);try{return e(n,r,s)}catch{}return[]}const $f=/Minified React error #\d+;/i;function Uf(e){return e&&$f.test(e.message)?1:0}function Hf(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Va(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Wf(e){const t=e?.name;return!t&&Va(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function zf(e){const t=e?.message;return Va(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function jf(e,t,n,r){const s=n?.syntheticException||void 0,i=Ws(e,t,s,r);return wt(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),He(i)}function qf(e,t,n="info",r,s){const i=r?.syntheticException||void 0,o=cs(e,t,i,s);return o.level=n,r?.event_id&&(o.event_id=r.event_id),He(o)}
17function Ws(e,t,n,r,s){let i;if(qo(t)&&t.error)return Br(e,t.error);if(mi(t)||Iu(t)){const o=t;if("stack"in t)i=Br(e,t);else{const c=o.name||(mi(o)?"DOMError":"DOMException"),a=o.message?`${c}: ${o.message}`:c;i=cs(e,a,n,r),Kr(i,a)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Rs(t)?Br(e,t):Zt(t)||lr(t)?(i=Bf(e,t,n,s),wt(i,{synthetic:!0}),i):(i=cs(e,t,n,r),Kr(i,`${t}`),wt(i,{synthetic:!0}),i)}function cs(e,t,n,r){const s={};if(r&&n){const i=Hs(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),wt(s,{synthetic:!0})}if(Cs(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Gf(e,{isUnhandledRejection:t}){const n=Au(e),r=t?"promise rejection":"exception";return qo(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:lr(e)?`Event \`${Vf(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Vf(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Yf(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const Xf=5e3;class Kf extends Il{constructor(t){const n=Jf(t),r=W.SENTRY_SDK_SOURCE||Df();Pa(n,"browser",["browser"],r),super(n);const{sendDefaultPii:s,sendClientReports:i,enableLogs:o,_experiments:c}=this._options,a=o??c?.enableLogs;W.document&&(i||a)&&W.document.addEventListener("visibilitychange",()=>{W.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),a&&Fr(this))}),a&&(this.on("flush",()=>{Fr(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Fr(this)},Xf)})),s&&(this.on("postprocessEvent",Hl),this.on("beforeSendSession",Wl))}eventFromException(t,n){return jf(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return qf(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function Jf(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:W.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,O=G,Qf=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",$t=(e,t,n,r)=>{let s,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(s??0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=Qf(t.value,n),e(t)))}},Zf=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,hn=(e=!0)=>{const t=O.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ut=()=>hn()?.activationStart??0,Ht=(e,t=-1)=>{const n=hn();let r="navigate";return n&&(O.document?.prerendering||Ut()>0?r="prerender":O.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:Zf(),navigationType:r}},$r=new WeakMap;function zs(e,t){return $r.get(e)||$r.set(e,new t),$r.get(e)}class Jn{constructor(){Jn.prototype.__init.call(this),Jn.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const _t=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},hr=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Vt=-1;const ep=()=>O.document?.visibilityState==="hidden"&&!O.document?.prerendering?0:1/0,Qn=e=>{O.document.visibilityState==="hidden"&&Vt>-1&&(Vt=e.type==="visibilitychange"?e.timeStamp:0,np())},tp=()=>{addEventListener("visibilitychange",Qn,!0),addEventListener("prerenderingchange",Qn,!0)},np=()=>{removeEventListener("visibilitychange",Qn,!0),removeEventListener("prerenderingchange",Qn,!0)},mr=()=>{if(O.document&&Vt<0){const e=Ut();Vt=(O.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??ep(),tp()}return{get firstHiddenTime(){return Vt}}},mn=e=>{O.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},rp=[1800,3e3],sp=(e,t={})=>{mn(()=>{const n=mr(),r=Ht("FCP");let s;const o=_t("paint",c=>{for(const a of c)a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<n.firstHiddenTime&&(r.value=Math.max(a.startTime-Ut(),0),r.entries.push(a),s(!0)))});o&&(s=$t(e,r,rp,t.reportAllChanges))})},ip=[.1,.25],op=(e,t={})=>{sp(hr(()=>{const n=Ht("CLS",0);let r;const s=zs(t,Jn),i=c=>{for(const a of c)s._processEntry(a);s._sessionValue>
17n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},o=_t("layout-shift",i);o&&(r=$t(e,n,ip,t.reportAllChanges),O.document?.addEventListener("visibilitychange",()=>{O.document?.visibilityState==="hidden"&&(i(o.takeRecords()),r(!0))}),O?.setTimeout?.(r))}))},gr=e=>{const t=n=>{(n.type==="pagehide"||O.document?.visibilityState==="hidden")&&e(n)};O.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},ap=[100,300],cp=(e,t={})=>{mn(()=>{const n=mr(),r=Ht("FID");let s;const i=a=>{a.startTime<n.firstHiddenTime&&(r.value=a.processingStart-a.startTime,r.entries.push(a),s(!0))},o=a=>{a.forEach(i)},c=_t("first-input",o);s=$t(e,r,ap,t.reportAllChanges),c&&gr(hr(()=>{o(c.takeRecords()),c.disconnect()}))})};let Ya=0,Ur=1/0,kn=0;const up=e=>{e.forEach(t=>{t.interactionId&&(Ur=Math.min(Ur,t.interactionId),kn=Math.max(kn,t.interactionId),Ya=kn?(kn-Ur)/7+1:0)})};let us;const Xa=()=>us?Ya:performance.interactionCount||0,dp=()=>{"interactionCount"in performance||us||(us=_t("event",up,{type:"event",buffered:!0,durationThreshold:0}))},Hr=10;let Ka=0;const lp=()=>Xa()-Ka;class Zn{constructor(){Zn.prototype.__init.call(this),Zn.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){Ka=Xa(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(lp()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Hr||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((s,i)=>i._latency-s._latency),this._longestInteractionList.length>Hr){const s=this._longestInteractionList.splice(Hr);for(const i of s)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}}const Ja=e=>{const t=O.requestIdleCallback||O.setTimeout;O.document?.visibilityState==="hidden"?e():(e=hr(e),t(e),gr(e))},fp=[200,500],pp=40,hp=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&mn(()=>{dp();const n=Ht("INP");let r;const s=zs(t,Zn),i=c=>{Ja(()=>{for(const u of c)s._processEntry(u);const a=s._estimateP98LongestInteraction();a&&a._latency!==n.value&&(n.value=a._latency,n.entries=a.entries,r())})},o=_t("event",i,{durationThreshold:t.durationThreshold??pp});r=$t(e,n,fp,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),gr(()=>{i(o.takeRecords()),r(!0)}))})};class mp{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const gp=[2500,4e3],_p=(e,t={})=>{mn(()=>{const n=mr(),r=Ht("LCP");let s;const i=zs(t,mp),o=a=>{t.reportAllChanges||(a=a.slice(-1));for(const u of a)i._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Ut(),0),r.entries=[u],s())},c=_t("largest-contentful-paint",o);if(c){s=$t(e,r,gp,t.reportAllChanges);const a=hr(()=>{o(c.takeRecords()),c.disconnect(),s(!0)});for(const u of["keydown","click","visibilitychange"])O.document&&addEventListener(u,()=>Ja(a),{capture:!0,once:!0})}})},yp=[800,1800],ds=e=>{O.document?.prerendering?mn(()=>ds(e)):O.document?.readyState!=="complete"?addEventListener("load",()=>ds(e),!0):setTimeout(e)},Sp=(e,t={})=>{const n=Ht("TTFB"),r=$t(e,n,yp,t.reportAllChanges);ds(()=>{const s=hn();s&&(n.value=Math.max(s.responseStart-Ut(),0),n.entries=[s],r(!0))})},Yt={},er={};let Qa,Za,ec,tc,nc;function js(e,t=!1){return gn("cls",e,bp,Qa,t)}function qs(e,t=!1){return gn("lcp",e,Tp,ec,t)}function rc(e){return gn("fid",e,vp,Za)}function Ep(e){return gn("ttfb",e,Ip,tc)}function sc(e){return gn("inp",e,wp,nc)}function lt(e,t){return ic(e,t),er[e]||(kp(e),er[e]=!0),oc(e,t)}function Wt(e,t){const n=Yt[e];
17if(n?.length)for(const r of n)try{r(t)}catch(s){Mt&&g.error(`Error while triggering instrumentation handler. 18Type: ${e} 19Name: ${Pe(r)} 20Error:`,s)}}function bp(){return op(e=>{Wt("cls",{metric:e}),Qa=e},{reportAllChanges:!0})}function vp(){return cp(e=>{Wt("fid",{metric:e}),Za=e})}function Tp(){return _p(e=>{Wt("lcp",{metric:e}),ec=e},{reportAllChanges:!0})}function Ip(){return Sp(e=>{Wt("ttfb",{metric:e}),tc=e})}function wp(){return hp(e=>{Wt("inp",{metric:e}),nc=e})}function gn(e,t,n,r,s=!1){ic(e,t);let i;return er[e]||(i=n(),er[e]=!0),r&&t({metric:r}),oc(e,t,s?i:void 0)}function kp(e){const t={};e==="event"&&(t.durationThreshold=0),_t(e,n=>{Wt(e,{entries:n})},t)}function ic(e,t){Yt[e]=Yt[e]||[],Yt[e].push(t)}function oc(e,t,n){return()=>{n&&n();const r=Yt[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Rp(e){return"duration"in e}function Wr(e){return typeof e=="number"&&isFinite(e)}function We(e,t,n,{...r}){const s=q(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Fs(e,()=>{const i=Bt({startTime:t,...r});return i&&i.end(n),i})}function Gs(e){const t=U();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:c,sendDefaultPii:a}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=X(),f=l.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:c,user:p||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":O.navigator?.userAgent,"client.address":a?"{{auto}}":void 0,...s};return Bt({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function _r(){return O.addEventListener&&O.performance}function Z(e){return e/1e3}function ac(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function cc(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function uc(e,t){let n,r=!1;function s(c){!r&&n&&t(c,n),r=!0}gr(()=>{s("pagehide")});const i=e.on("beforeStartNavigationSpan",(c,a)=>{a?.isRedirect||(s("navigation"),i?.(),o?.())}),o=e.on("afterStartPageLoadSpan",c=>{n=c.spanContext().spanId,o?.()})}function Cp(e){let t=0,n;if(!cc("layout-shift"))return;const r=js(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);uc(e,(s,i)=>{xp(t,n,i,s),r()})}function xp(e,t,n,r){Mt&&g.log(`Sending CLS span (${e})`);const s=Z((pe()||0)+(t?.startTime||0)),i=X().getScopeData().transactionName,o=t?Te(t.sources[0]?.node):"Layout shift",c={[ne]:"auto.http.browser.cls",[$e]:"ui.webvital.cls",[Ft]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{c[`cls.source.${d+1}`]=Te(u.node)});const a=Gs({name:o,transaction:i,attributes:c,startTime:s});a&&(a.addEvent("cls",{[ln]:"",[fn]:e}),a.end(s))}function Mp(e){let t=0,n;if(!cc("largest-contentful-paint"))return;const r=qs(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);uc(e,(s,i)=>{Ap(t,n,i,s),r()})}function Ap(e,t,n,r){Mt&&g.log(`Sending LCP span (${e})`);const s=Z((pe()||0)+(t?.startTime||0)),i=X().getScopeData().transactionName,o=t?Te(t.element):"Largest contentful paint",c={[ne]:"auto.http.browser.lcp",[$e]:"ui.webvital.lcp",[Ft]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(c["lcp.element"]=Te(t.element)),t.id&&(c["lcp.id"]=t.id),t.url&&(c["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(c["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(c["lcp.renderTime"]=t.renderTime),t.size!=null&&(c["lcp.size"]=t.size));const a=Gs({name:o,transaction:i,attributes:c,startTime:s});a&&(a.addEvent("lcp",{[ln]:"millisecond",[fn]:e}),a.end(s))}const Np=2147483647;let to=0,ce={},ge,tr;function Op({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=_r();if(r&&pe()){r.mark&&O.performance.mark("sentry-tracing-init");const s=$p(),i=t?Mp(n):Bp(),o=Up(),c=e?Cp(n):Fp();return()=>{s(),i?.(),o(),c?.()}}return()=>{}}function Dp(){lt("longtask",({entries:e})=>{const t=he();if(!t)return;const{op:n,start_timestamp:r}=q(t);for(const s of e){const i=Z(pe()+s.startTime),o=Z(s.duration);n==="navigation"&&r&&i<r||We(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[ne]:"auto.ui.browser.metrics"}})}})}function Lp(){new PerformanceObserver(t=>{const n=he();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=Z(pe()+r.startTime),{start_timestamp:i,op:o}=q(n);if(o==="navigation"&&i&&s<i)continue;const c=Z(r.duration),a={[ne]:"auto.ui.browser.metrics"}
20,u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:f,sourceFunctionName:p,sourceCharPosition:h}=u;a["browser.script.invoker"]=d,a["browser.script.invoker_type"]=l,f&&(a["code.filepath"]=f),p&&(a["code.function"]=p),h!==-1&&(a["browser.script.source_char_position"]=h),We(n,s,s+c,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0})}function Pp(){lt("event",({entries:e})=>{const t=he();if(t){for(const n of e)if(n.name==="click"){const r=Z(pe()+n.startTime),s=Z(n.duration),i={name:Te(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[ne]:"auto.ui.browser.metrics"}},o=Yo(n.target);o&&(i.attributes["ui.component_name"]=o),We(t,r,r+s,i)}}})}function Fp(){return js(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ce.cls={value:e.value,unit:""},tr=t)},!0)}function Bp(){return qs(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ce.lcp={value:e.value,unit:"millisecond"},ge=t)},!0)}function $p(){return rc(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Z(pe()),r=Z(t.startTime);ce.fid={value:e.value,unit:"millisecond"},ce["mark.fid"]={value:n+r,unit:"second"}})}function Up(){return Ep(({metric:e})=>{e.entries[e.entries.length-1]&&(ce.ttfb={value:e.value,unit:"millisecond"})})}function Hp(e,t){const n=_r(),r=pe();if(!n?.getEntries||!r)return;const s=Z(r),i=n.getEntries(),{op:o,start_timestamp:c}=q(e);if(i.slice(to).forEach(a=>{const u=Z(a.startTime),d=Z(Math.max(0,a.duration));if(!(o==="navigation"&&c&&s+u<c))switch(a.entryType){case"navigation":{jp(e,a,s);break}case"mark":case"paint":case"measure":{Wp(e,a,u,d,s,t.ignorePerformanceApiSpans);const l=mr(),f=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&f&&(ce.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&f&&(ce.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{Vp(e,a,a.name,u,d,s,t.ignoreResourceSpans);break}}}),to=Math.max(i.length-1,0),Yp(e),o==="pageload"){Kp(ce);const a=ce["mark.fid"];a&&ce.fid&&(We(e,a.value,a.value+Z(ce.fid.value),{name:"first input delay",op:"ui.action",attributes:{[ne]:"auto.ui.browser.metrics"}}),delete ce["mark.fid"]),t.recordClsOnPageloadSpan||delete ce.cls,t.recordLcpOnPageloadSpan||delete ce.lcp,Object.entries(ce).forEach(([u,d])=>{Fd(u,d.value,d.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",Ut()),Xp(e,t)}ge=void 0,tr=void 0,ce={}}function Wp(e,t,n,r,s,i){if(["mark","measure"].includes(t.entryType)&&De(t.name,i))return;const o=hn(!1),c=Z(o?o.requestStart:0),a=s+Math.max(n,c),u=s+n,d=u+r,l={[ne]:"auto.resource.browser.metrics"};a!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=a),zp(l,t),a<=d&&We(e,a,d,{name:t.name,op:t.entryType,attributes:l})}function zp(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&Qt(s))e[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(Qt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}
20function jp(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Rn(e,t,r,n)}),Rn(e,t,"secureConnection",n,"TLS/SSL"),Rn(e,t,"fetch",n,"cache"),Rn(e,t,"domainLookup",n,"DNS"),Gp(e,t,n)}function Rn(e,t,n,r,s=n){const i=qp(n),o=t[i],c=t[`${n}Start`];!c||!o||We(e,r+Z(c),r+Z(o),{op:`browser.${s}`,name:t.name,attributes:{[ne]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function qp(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function Gp(e,t,n){const r=n+Z(t.requestStart),s=n+Z(t.responseEnd),i=n+Z(t.responseStart);t.responseEnd&&(We(e,r,s,{op:"browser.request",name:t.name,attributes:{[ne]:"auto.ui.browser.metrics"}}),We(e,i,s,{op:"browser.response",name:t.name,attributes:{[ne]:"auto.ui.browser.metrics"}}))}function Vp(e,t,n,r,s,i,o){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const c=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(o?.includes(c))return;const a=ct(n),u={[ne]:"auto.resource.browser.metrics"};zr(u,t,"transferSize","http.response_transfer_size"),zr(u,t,"encodedBodySize","http.response_content_length"),zr(u,t,"decodedBodySize","http.decoded_response_content_length");const d=t.deliveryType;d!=null&&(u["http.response_delivery_type"]=d);const l=t.renderBlockingStatus;if(l&&(u["resource.render_blocking_status"]=l),a.protocol&&(u["url.scheme"]=a.protocol.split(":").pop()),a.host&&(u["server.address"]=a.host),u["url.same_origin"]=n.includes(O.location.origin),t.nextHopProtocol!=null){const{name:h,version:m}=ac(t.nextHopProtocol);u["network.protocol.name"]=h,u["network.protocol.version"]=m}const f=i+r,p=f+s;We(e,f,p,{name:n.replace(O.location.origin,""),op:c,attributes:u})}function Yp(e){const t=O.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Wr(n.rtt)&&(ce["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Wr(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Wr(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Xp(e,t){ge&&t.recordLcpOnPageloadSpan&&(ge.element&&e.setAttribute("lcp.element",Te(ge.element)),ge.id&&e.setAttribute("lcp.id",ge.id),ge.url&&e.setAttribute("lcp.url",ge.url.trim().slice(0,200)),ge.loadTime!=null&&e.setAttribute("lcp.loadTime",ge.loadTime),ge.renderTime!=null&&e.setAttribute("lcp.renderTime",ge.renderTime),e.setAttribute("lcp.size",ge.size)),tr?.sources&&t.recordClsOnPageloadSpan&&tr.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Te(n.node)))}function zr(e,t,n,r){const s=t[n];s!=null&&s<Np&&(e[r]=s)}function Kp(e){const t=hn(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function Jp(){return _r()&&pe()?lt("element",Qp):()=>{}}const Qp=({entries:e})=>{const t=he(),n=t?de(t):void 0,r=n?q(n).description:X().getScopeData().transactionName;e.forEach(s=>{const i=s;
20if(!i.identifier)return;const o=i.name,c=i.renderTime,a=i.loadTime,[u,d]=a?[Z(a),"load-time"]:c?[Z(c),"render-time"]:[ue(),"entry-emission"],l=o==="image-paint"?Z(Math.max(0,(c??0)-(a??0))):0,f={[ne]:"auto.ui.browser.elementtiming",[$e]:"ui.elementtiming",[be]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":i.id,"element.type":i.element?.tagName?.toLowerCase()||"unknown","element.size":i.naturalWidth&&i.naturalHeight?`${i.naturalWidth}x${i.naturalHeight}`:void 0,"element.render_time":c,"element.load_time":a,"element.url":i.url||void 0,"element.identifier":i.identifier,"element.paint_type":o};zd({name:`element[${i.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},p=>{p.end(u+l)})})},Zp=1e3;let no,ls,fs;function dc(e){Qe("dom",e),Ze("dom",eh)}function eh(){if(!O.document)return;const e=ve.bind(null,"dom"),t=ro(e,!0);O.document.addEventListener("click",t,!1),O.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=O[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(_e(s,"addEventListener",function(i){return function(o,c,a){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){const l=ro(e);d.handler=l,i.call(this,o,l,a)}d.refCount++}catch{}return i.call(this,o,c,a)}}),_e(s,"removeEventListener",function(i){return function(o,c,a){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(i.call(this,o,d.handler,a),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,c,a)}}))})}function th(e){if(e.type!==ls)return!1;try{if(!e.target||e.target._sentryId!==fs)return!1}catch{}return!0}function nh(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function ro(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=rh(n);if(nh(n.type,r))return;Ee(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ee(r,"_sentryId",Se());
20const s=n.type==="keypress"?"input":n.type;th(n)||(e({event:n,name:s,global:t}),ls=n.type,fs=r?r._sentryId:void 0),clearTimeout(no),no=O.setTimeout(()=>{fs=void 0,ls=void 0},Zp)}}function rh(e){try{return e.target}catch{return null}}let Cn;function yr(e){const t="history";Qe(t,e),Ze(t,sh)}function sh(){if(O.addEventListener("popstate",()=>{const t=O.location.href,n=Cn;if(Cn=t,n===t)return;ve("history",{from:n,to:t})}),!wf())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Cn,i=ih(String(r));if(Cn=i,s===i)return t.apply(this,n);ve("history",{from:s,to:i})}return t.apply(this,n)}}_e(O.history,"pushState",e),_e(O.history,"replaceState",e)}function ih(e){try{return new URL(e,O.location.origin).toString()}catch{return e}}const Hn={};function lc(e){const t=Hn[e];if(t)return t;let n=O[e];if(is(n))return Hn[e]=n.bind(O);const r=O.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){Mt&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(Hn[e]=n.bind(O))}function so(e){Hn[e]=void 0}function _n(...e){return lc("setTimeout")(...e)}const rt="__sentry_xhr_v3__";function fc(e){Qe("xhr",e),Ze("xhr",oh)}function oh(){if(!O.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,i=ue()*1e3,o=Oe(r[0])?r[0].toUpperCase():void 0,c=ah(r[1]);if(!o||!c)return t.apply(n,r);n[rt]={method:o,url:c,request_headers:{}},o==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const u=n[rt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:ue()*1e3,startTimestamp:i,xhr:n,virtualError:s};ve("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return a(),u.apply(d,l)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[f,p]=l,h=d[rt];return h&&Oe(f)&&Oe(p)&&(h.request_headers[f.toLowerCase()]=p),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[rt];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:ue()*1e3,xhr:n};return ve("xhr",i),t.apply(n,r)}})}function ah(e){if(Oe(e))return e;try{return e.toString()}catch{}}function pc(e){return new URLSearchParams(e).toString()}function hc(e,t=g){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[pc(e)];if(!e)return[void 0]}catch(n){return Mt&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Mt&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function mc(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const jr=[],Wn=new Map,ch=60;function uh(){if(_r()&&pe()){const t=dh();return()=>{t()}}return()=>{}}const io={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function dh(){return sc(lh)}const lh=({metric:e})=>{if(e.value==null)return;const t=Z(e.value);if(t>ch)return;const n=e.entries.find(h=>h.duration===e.value&&io[h.name]);if(!n)return;const{interactionId:r}=n,s=io[n.name],i=Z(pe()+n.startTime),o=he(),c=o?de(o):void 0,u=(r!=null?Wn.get(r):void 0)||c,d=u?q(u).description:X().getScopeData().transactionName,l=Te(n.target),f={[ne]:"auto.http.browser.inp",[$e]:`ui.interaction.${s}`,[Ft]:n.duration},p=Gs({name:l,transaction:d,attributes:f,startTime:i});p&&(p.addEvent("inp",{[ln]:"millisecond",[fn]:e.value}),p.end(i+t))};function fh(){const e=({entries:t})=>{const n=he(),r=n&&de(n);t.forEach(s=>{if(!Rp(s)||!r)return;const i=s.interactionId;if(i!=null&&!Wn.has(i)){if(jr.length>10){const o=jr.shift();Wn.delete(o)}jr.push(i),Wn.set(i,r)}})};lt("event",e),lt("first-input",e)}function ph(e,t=lc("fetch")){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;
20const c={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return so("fetch"),Xn("No fetch implementation available");try{return t(e.url,c).then(a=>(n-=o,r--,{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}))}catch(a){return so("fetch"),n-=o,r--,Xn(a)}}return Fl(e,s)}const hh=30,mh=50;function ps(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?ut:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const gh=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,_h=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,yh=/\((\S*)(?::(\d+))(?::(\d+))\)/,Sh=e=>{const t=gh.exec(e);if(t){const[,r,s,i]=t;return ps(r,ut,+s,+i)}const n=_h.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=yh.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=gc(n[1]||ut,n[2]);return ps(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Eh=[hh,Sh],bh=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vh=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Th=e=>{const t=bh.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=vh.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||ut;return[s,r]=gc(s,r),ps(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Ih=[mh,Th],wh=[Eh,Ih],kh=Ho(...wh),gc=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ut,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ie=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xn=1024,Rh="Breadcrumbs",Ch=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Rh,setup(n){t.console&&cf(Nh(n)),t.dom&&dc(Ah(n,t.dom)),t.xhr&&fc(Oh(n)),t.fetch&&ja(Dh(n)),t.history&&yr(Lh(n)),t.sentry&&n.on("beforeSendEvent",Mh(n))}}}),xh=Ch;function Mh(e){return function(n){U()===e&&Je({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:nt(n)},{event:n})}}function Ah(e,t){return function(r){if(U()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>xn&&(Ie&&g.warn(`\`dom.maxStringLength\` cannot exceed ${xn}, but a value of ${c} was configured. Sentry will use ${xn} instead.`),c=xn),typeof o=="string"&&(o=[o]);try{const u=r.event,d=Ph(u)?u.target:u;s=Te(d,{keyAttrs:o,maxStringLength:c}),i=Yo(d)}catch{s="<unknown>"}if(s.length===0)return;const a={category:`ui.${r.name}`,message:s};i&&(a.data={"ui.component_name":i}),Je(a,{event:r.event,name:r.name,global:r.global})}}function Nh(e){return function(n){if(U()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Ba(n.level),message:gi(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${gi(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Je(r,{input:n.args,level:n.level})}}function Oh(e){return function(n){if(U()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[rt];if(!r||!s||!i)return;const{method:o,url:c,status_code:a,body:u}=i,d={method:o,url:c,status_code:a},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f={category:"xhr",data:d,type:"http",level:za(a)};e.emit("beforeOutgoingRequestBreadcrumb",f,l),Je(f,l)}}function Dh(e){return function(n){if(U()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",c,o),Je(c,o)}else{const i=n.response,o={...n.fetchData,status_code:i?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,i?.status;const c={input:n.args,response:i,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:o,type:"http",level:za(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,c),Je(a,c)}}}function Lh(e){return function(n){if(U()!==e)return;let r=n.from,s=n.to;const i=ct(W.location.href);let o=r?ct(r):void 0;const c=ct(s);o?.path||(o=i),i.protocol===c.protocol&&i.host===c.host&&(s=c.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),Je({category:"navigation",data:{from:r,to:s}})}}function Ph(e){return!!e&&!!e.target}const Fh=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Bh="BrowserApiErrors",$h=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Bh,setupOnce(){t.setTimeout&&_e(W,"setTimeout",oo),t.setInterval&&_e(W,"setInterval",oo),t.requestAnimationFrame&&_e(W,"requestAnimationFrame",Hh),t.XMLHttpRequest&&"XMLHttpRequest"in W&&_e(XMLHttpRequest.prototype,"send",Wh);const n=t.eventTarget;
20n&&(Array.isArray(n)?n:Fh).forEach(s=>zh(s,t))}}}),Uh=$h;function oo(e){return function(...t){const n=t[0];return t[0]=xt(n,{mechanism:{data:{function:Pe(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Hh(e){return function(t){return e.apply(this,[xt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Pe(e)},handled:!1,type:"instrument"}})])}}function Wh(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&_e(n,s,function(i){const o={mechanism:{data:{function:s,handler:Pe(i)},handled:!1,type:"instrument"}},c=Ms(i);return c&&(o.mechanism.data.handler=Pe(c)),xt(i,o)})}),e.apply(this,t)}}function zh(e,t){const r=W[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(_e(r,"addEventListener",function(s){return function(i,o,c){try{jh(o)&&(o.handleEvent=xt(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Pe(o),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&qh(this,i,o),s.apply(this,[i,xt(o,{mechanism:{data:{function:"addEventListener",handler:Pe(o),target:e},handled:!1,type:"instrument"}}),c])}}),_e(r,"removeEventListener",function(s){return function(i,o,c){try{const a=o.__sentry_wrapped__;a&&s.call(this,i,a,c)}catch{}return s.call(this,i,o,c)}}))}function jh(e){return typeof e.handleEvent=="function"}function qh(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const Gh=()=>({name:"BrowserSession",setupOnce(){if(typeof W.document>"u"){Ie&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Bi({ignoreDuration:!0}),$i(),yr(({from:e,to:t})=>{e!==void 0&&e!==t&&(Bi({ignoreDuration:!0}),$i())})}}),Vh="GlobalHandlers",Yh=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Vh,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Kh(n),ao("onerror")),t.onunhandledrejection&&(Jh(n),ao("onunhandledrejection"))}}}),Xh=Yh;function Kh(e){Wo(t=>{const{stackParser:n,attachStacktrace:r}=_c();if(U()!==e||Ga())return;const{msg:s,url:i,line:o,column:c,error:a}=t,u=em(Ws(n,a||s,void 0,r,!1),i,o,c);u.level="error",Ia(u,{originalException:a,mechanism:{handled:!1,type:"onerror"}})})}function Jh(e){zo(t=>{const{stackParser:n,attachStacktrace:r}=_c();if(U()!==e||Ga())return;const s=Qh(t),i=Qt(s)?Zh(s):Ws(n,s,void 0,r,!0);i.level="error",Ia(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Qh(e){if(Qt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Zh(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function em(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},c=o.stacktrace=o.stacktrace||{},a=c.frames=c.frames||[],u=r,d=n,l=Oe(t)&&t.length>0?t:Lt();return a.length===0&&a.push({colno:u,filename:l,function:ut,in_app:!0,lineno:d}),e}function ao(e){Ie&&g.log(`Global Handler attached: ${e}`)}function _c(){return U()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const tm=()=>({name:"HttpContext",preprocessEvent(e){if(!W.navigator&&!W.location&&!W.document)return;const t=$s(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),nm="cause",rm=5,sm="LinkedErrors",im=((e={})=>{const t=e.limit||rm,n=e.key||nm;return{name:sm,preprocessEvent(r,s,i){const o=i.getOptions();af(Us,o.stackParser,n,t,r,s)}}}),om=im;function am(){return cm()?(Ie&&pt(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function cm(){if(typeof W.window>"u")return!1;const e=W;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Lt(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(W===W.top&&r.some(i=>n.startsWith(`${i}://`)))}function hs(e){return[Ql(),Yl(),Uh(),xh(),Xh(),om(),ff(),tm(),Gh()]}function um(e={}){const t=!e.skipBrowserExtensionCheck&&am(),n={...e,enabled:t?!1:e.enabled,stackParser:Eu(e.stackParser||kh),integrations:Sl({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?hs():e.defaultIntegrations}
20),transport:e.transport||ph};return Ml(Kf,n)}const J=G,Vs="sentryReplaySession",dm="replay_event",Ys="Unable to send Replay",lm=3e5,fm=9e5,pm=5e3,hm=5500,mm=6e4,gm=5e3,_m=3,co=15e4,Mn=5e3,ym=3e3,Sm=300,Xs=2e7,Em=4999,bm=15e3,uo=36e5;var vm=Object.defineProperty,Tm=(e,t,n)=>t in e?vm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lo=(e,t,n)=>Tm(e,typeof t!="symbol"?t+"":t,n),se=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(se||{});function Im(e){return e.nodeType===e.ELEMENT_NODE}function Xt(e){return e?.host?.shadowRoot===e}function Kt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function wm(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function km(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function nr(e){try{const t=e.rules||e.cssRules;return t?wm(Array.from(t,yc).join("")):null}catch{return null}}function Rm(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],i=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function yc(e){let t;if(xm(e))try{t=nr(e.styleSheet)||km(e)}catch{}else if(Mm(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=Rm(e)),r&&(n=Cm(n)),r||s)return n}return t||e.cssText}function Cm(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function xm(e){return"styleSheet"in e}function Mm(e){return"selectorText"in e}class Sc{constructor(){lo(this,"idNodeMap",new Map),lo(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Am(){return new Sc}function Sr({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function tn({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function At(e){return e.toLowerCase()}function ms(e){return e.toUpperCase()}const fo="__rrweb_original__";function Nm(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=fo in i?i[fo]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function Ks(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?At(t):null}function rr(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Ec(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const po={};function bc(e){const t=po[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return po[e]=r.bind(window)}function gs(...e){return bc("setTimeout")(...e)}
20function vc(...e){return bc("clearTimeout")(...e)}function Tc(e){try{return e.contentDocument}catch{}}let Om=1;const Dm=new RegExp("[^a-z0-9-_:]"),nn=-2;function Js(){return Om++}function Lm(e){if(e instanceof HTMLFormElement)return"form";const t=At(e.tagName);return Dm.test(t)?"div":t}function Pm(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let yt,ho;const Fm=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Bm=/^(?:[a-z+]+:)?\/\//i,$m=/^www\..*/i,Um=/^(data:)([^,]*),(.*)/i;function sr(e,t){return(e||"").replace(Fm,(n,r,s,i,o,c)=>{const a=s||o||c,u=r||i||"";if(!a)return n;if(Bm.test(a)||$m.test(a))return`url(${u}${a}${u})`;if(Um.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Pm(t)+a}${u})`;const d=t.split("/"),l=a.split("/");d.pop();for(const f of l)f!=="."&&(f===".."?d.pop():d.push(f));return`url(${u}${d.join("/")}${u})`})}const Hm=/^[^ \t\n\r\u000c]+/,Wm=/^[, \t\n\r\u000c]+/;function zm(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const c=i.exec(t.substring(n));return c?(o=c[0],n+=o.length,o):""}const s=[];for(;r(Wm),!(n>=t.length);){let i=r(Hm);if(i.slice(-1)===",")i=bt(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=bt(e,i);let c=!1;for(;;){const a=t.charAt(n);if(a===""){s.push((i+o).trim());break}else if(c)a===")"&&(c=!1);else if(a===","){n+=1,s.push((i+o).trim());break}else a==="("&&(c=!0);o+=a,n+=1}}}return s.join(", ")}const mo=new WeakMap;function bt(e,t){return!t||t.trim()===""?t:Er(e,t)}function jm(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Er(e,t){let n=mo.get(e);if(n||(n=e.createElement("a"),mo.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Ic(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?bt(e,r):n==="srcset"?zm(e,r):n==="style"?sr(r,Er(e)):t==="object"&&n==="data"?bt(e,r):typeof i=="function"?i(n,r,s):r)}function wc(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function qm(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function Gm(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function st(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:st(e.parentNode,t,n,r+1)}function vt(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Gm(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Nt(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let c=-1,a=-1;if(i){if(a=st(o,vt(r,s)),a<0)return!0;c=st(o,vt(t,n),a>=0?a:1/0)}else{if(c=st(o,vt(t,n)),c<0)return!1;a=st(o,vt(r,s),c>=0?c:1/0)}return c>=0?a>=0?c<=a:!0:a>=0?!1:!!i}catch{}return!!i}function Vm(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const c=gs(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{vc(c),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return gs(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Ym(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=gs(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{vc(i),r=!0,t()})}function Xm(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:y,dataURLOptions:b={},inlineImages:w,recordCanvas:j,keepIframeSrcFn:P,newlyAddedElement:C=!1}
20=t,_=Km(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:se.Document,childNodes:[],compatMode:e.compatMode}:{type:se.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:se.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return Qm(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:a,maskInputOptions:h,maskInputFn:y,dataURLOptions:b,inlineImages:w,recordCanvas:j,keepIframeSrcFn:P,newlyAddedElement:C,rootId:_,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f});case e.TEXT_NODE:return Jm(e,{doc:n,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:h,maskInputFn:y,rootId:_});case e.CDATA_SECTION_NODE:return{type:se.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:se.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function Km(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Jm(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:a,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=nr(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}f=sr(f,Er(t.doc))}h&&(f="SCRIPT_PLACEHOLDER");const y=Nt(e,r,i,s,o,n);if(!p&&!h&&!m&&f&&y&&(f=c?c(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(a.textarea||y)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),l==="OPTION"&&f){const b=Sr({type:null,tagName:l,maskInputOptions:a});f=tn({isMasked:Nt(e,r,i,s,o,b),element:e,value:f,maskInputFn:u})}return{type:se.Text,textContent:f||"",isStyle:p,rootId:d}}function Qm(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:y,unmaskTextClass:b,maskTextSelector:w,unmaskTextSelector:j}=t,P=qm(e,r,s,i),C=Lm(e);let _={};const T=e.attributes.length;for(let E=0;E<T;E++){const I=e.attributes[E];I.name&&!wc(C,I.name,I.value)&&(_[I.name]=Ic(n,C,At(I.name),I.value,e,a))}if(C==="link"&&o){const E=Array.from(n.styleSheets).find(F=>F.href===e.href);let I=null;E&&(I=nr(E)),I&&(_.rel=null,_.href=null,_.crossorigin=null,_._cssText=sr(I,E.href))}if(C==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=nr(e.sheet);E&&(_._cssText=sr(E,Er(n)))}if(C==="input"||C==="textarea"||C==="select"||C==="option"){const E=e,I=Ks(E),F=rr(E,ms(C),I),x=E.checked;if(I!=="submit"&&I!=="button"&&F){const ee=Nt(E,y,w,b,j,Sr({type:I,tagName:ms(C),maskInputOptions:c}));_.value=tn({isMasked:ee,element:E,value:F,maskInputFn:u})}x&&(_.checked=x)}if(C==="option"&&(e.selected&&!c.select?_.selected=!0:delete _.selected),C==="canvas"&&f){if(e.__context==="2d")Nm(e)||(_.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const E=e.toDataURL(d.type,d.quality),I=n.createElement("canvas");I.width=e.width,I.height=e.height;const F=I.toDataURL(d.type,d.quality);E!==F&&(_.rr_dataURL=E)}}if(C==="img"&&l){yt||(yt=n.createElement("canvas"),ho=yt.getContext("2d"));const E=e,I=E.currentSrc||E.getAttribute("src")||"<unknown-src>",F=E.crossOrigin,x=()=>{E.removeEventListener("load",x);try{yt.width=E.naturalWidth,yt.height=E.naturalHeight,ho.drawImage(E,0,0),_.rr_dataURL=yt.toDataURL(d.type,d.quality)}catch(ee){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?x():E.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${I}! Error: ${ee}`)}E.crossOrigin==="anonymous"&&(F?_.crossOrigin=F:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?x():E.addEventListener("load",x)}if((C==="audio"||C==="video")&&(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),P){const{width:E,height:I}=e.getBoundingClientRect();_={class:_.class,rr_width:`${E}px`,rr_height:`${I}px`}}C==="iframe"&&!p(_.src)&&(!P&&!Tc(e)&&(_.rr_src=_.src),delete _.src);let A;
20try{customElements.get(C)&&(A=!0)}catch{}return{type:se.Element,tagName:C,attributes:_,childNodes:[],isSVG:jm(e)||void 0,needBlock:P,rootId:m,isCustom:A}}function K(e){return e==null?"":e.toLowerCase()}function Zm(e,t){if(t.comment&&e.type===se.Comment)return!0;if(e.type===se.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Ec(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(K(e.attributes.name).match(/^msapplication-tile(image|color)$/)||K(e.attributes.name)==="application-name"||K(e.attributes.rel)==="icon"||K(e.attributes.rel)==="apple-touch-icon"||K(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&K(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(K(e.attributes.property).match(/^(og|twitter|fb):/)||K(e.attributes.name).match(/^(og|twitter):/)||K(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(K(e.attributes.name)==="robots"||K(e.attributes.name)==="googlebot"||K(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(K(e.attributes.name)==="author"||K(e.attributes.name)==="generator"||K(e.attributes.name)==="framework"||K(e.attributes.name)==="publisher"||K(e.attributes.name)==="progid"||K(e.attributes.property).match(/^article:/)||K(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(K(e.attributes.name)==="google-site-verification"||K(e.attributes.name)==="yandex-verification"||K(e.attributes.name)==="csrf-token"||K(e.attributes.name)==="p:domain_verify"||K(e.attributes.name)==="verify-v1"||K(e.attributes.name)==="verification"||K(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Tt(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:j={},inlineImages:P=!1,recordCanvas:C=!1,onSerialize:_,onIframeLoad:T,iframeLoadTimeout:A=5e3,onBlockedImageLoad:E,onStylesheetLoad:I,stylesheetLoadTimeout:F=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:ee=!1}=t;let{preserveWhiteSpace:Q=!0}=t;const D=Xm(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,dataURLOptions:j,inlineImages:P,recordCanvas:C,keepIframeSrcFn:x,newlyAddedElement:ee});if(!D)return console.warn(e,"not serialized"),null;let B;r.hasNode(e)?B=r.getId(e):Zm(D,w)||!Q&&D.type===se.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?B=nn:B=Js();const S=Object.assign(D,{id:B});if(r.add(e,S),B===nn)return null;_&&_(e);let z=!f;if(S.type===se.Element){z=z&&!S.needBlock;const N=e.shadowRoot;N&&Kt(N)&&(S.isShadowHost=!0)}if((S.type===se.Document||S.type===se.Element)&&z){w.headWhitespace&&S.type===se.Element&&S.tagName==="head"&&(Q=!1);const N={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:j,inlineImages:P,recordCanvas:C,preserveWhiteSpace:Q,onSerialize:_,onIframeLoad:T,iframeLoadTimeout:A,onBlockedImageLoad:E,onStylesheetLoad:I,stylesheetLoadTimeout:F,keepIframeSrcFn:x},ie=e.childNodes?Array.from(e.childNodes):[];for(const re of ie){const me=Tt(re,N);me&&S.childNodes.push(me)}if(Im(e)&&e.shadowRoot)for(const re of Array.from(e.shadowRoot.childNodes)){const me=Tt(re,N);me&&(Kt(e.shadowRoot)&&(me.isShadow=!0),S.childNodes.push(me))}}if(e.parentNode&&Xt(e.parentNode)&&Kt(e.parentNode)&&(S.isShadow=!0),S.type===se.Element&&S.tagName==="iframe"&&!S.needBlock&&Vm(e,()=>{const N=Tc(e);if(N&&T){const ie=Tt(N,{doc:N,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:j,inlineImages:P,recordCanvas:C,preserveWhiteSpace:Q,onSerialize:_,onIframeLoad:T,iframeLoadTimeout:A,onStylesheetLoad:I,stylesheetLoadTimeout:F,keepIframeSrcFn:x});ie&&T(e,ie)}},A),S.type===se.Element&&S.tagName==="img"&&!e.complete&&S.needBlock){const N=e,ie=()=>{if(N.isConnected&&!N.complete&&E)try{const re=N.getBoundingClientRect();re.width>0&&re.height>0&&E(N,S,re)}catch{}N.removeEventListener("load",ie)};N.isConnected&&N.addEventListener("load",ie)}return S.type===se.Element&&S.tagName==="link"&&typeof S.attributes.rel=="string"&&(S.attributes.rel==="stylesheet"||S.attributes.rel==="preload"&&typeof S.attributes.href=="string"&&Ec(S.attributes.href)==="css")&&Ym(e,()=>{if(I){const N=Tt(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:j,inlineImages:P,recordCanvas:C,preserveWhiteSpace:Q,onSerialize:_,onIframeLoad:T,iframeLoadTimeout:A,onStylesheetLoad:I,stylesheetLoadTimeout:F,keepIframeSrcFn:x});N&&I(e,N)}},F),S.type===se.Element&&delete S.needBlock,S}function eg(e,t){const{mirror:n=new Sc,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOM:w=!1,dataURLOptions:j,preserveWhiteSpace:P,onSerialize:C,onIframeLoad:_,iframeLoadTimeout:T,onBlockedImageLoad:A,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:F=()=>!1}=t||{};return Tt(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:c,unmaskTextClass:a,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}
20:w===!1?{}:w,dataURLOptions:j,inlineImages:f,recordCanvas:p,preserveWhiteSpace:P,onSerialize:C,onIframeLoad:_,iframeLoadTimeout:T,onBlockedImageLoad:A,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:F,newlyAddedElement:!1})}function fe(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const St=`Please stop import mirror directly. Instead of that,\r 21now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 22or you can use record.mirror to access the mirror instance during recording.`;let go={map:{},getId(){return console.error(St),-1},getNode(){return console.error(St),null},removeNodeFromMap(){console.error(St)},has(){return console.error(St),!1},reset(){console.error(St)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(go=new Proxy(go,{get(e,t,n){return t==="map"&&console.error(St),Reflect.get(e,t,n)}}));function rn(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const c=t-(o-s),a=this;c<=0||c>t?(r&&(ag(r),r=null),s=o,e.apply(a,i)):!r&&n.trailing!==!1&&(r=br(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(a,i)},c))}}function kc(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){br(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>kc(e,t,i||{},!0)}function Qs(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let ir=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ir=()=>new Date().getTime());function Rc(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Cc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Mc(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function ye(e,t,n,r,s){if(!e)return!1;const i=Mc(e);if(!i)return!1;const o=vt(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const c=st(i,o);let a=-1;return c<0?!1:(r&&(a=st(i,vt(null,r))),c>-1&&a<0?!0:c<a)}function tg(e,t){return t.getId(e)!==-1}function qr(e,t){return t.getId(e)===nn}function Ac(e,t){if(Xt(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Ac(e.parentNode,t):!0:!0}function _s(e){return!!e.changedTouches}function ng(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Nc(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Oc(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ys(e){return!!e?.shadowRoot}class rg{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Dc(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function sg(e){let t=e,n;for(;n=Dc(t);)t=n;return t}function ig(e){const t=e.ownerDocument;if(!t)return!1;const n=sg(e);return t.contains(n)}function Lc(e){const t=e.ownerDocument;return t?t.contains(e)||ig(e):!1}const _o={};function Zs(e){const t=_o[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return _o[e]=r.bind(window)}function og(...e){return Zs("requestAnimationFrame")(...e)}
22function br(...e){return Zs("setTimeout")(...e)}function ag(...e){return Zs("clearTimeout")(...e)}var L=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(L||{}),M=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(M||{}),le=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(le||{}),Ne=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ne||{}),Et=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Et||{});function ei(e){try{return e.contentDocument}catch{}}function cg(e){try{return e.contentWindow}catch{}}function yo(e){return"__ln"in e}class ug{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&yo(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&yo(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const So=(e,t)=>`${e}@${t}`;class dg{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new ug,s=a=>{let u=a,d=nn;for(;d===nn;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=a=>{if(!a.parentNode||!Lc(a))return;const u=Xt(a.parentNode)?this.mirror.getId(Dc(a)):this.mirror.getId(a.parentNode),d=s(a);if(u===-1||d===-1)return r.addNode(a);const l=Tt(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Nc(f,this.mirror)&&!ye(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),Oc(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ys(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{ye(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},onBlockedImageLoad:(f,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})}});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Eo(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of this.addedSet)!bo(this.droppedSet,a)&&!Eo(this.removes,a,this.mirror)||bo(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(o.value.parentNode),d=s(o.value);u!==-1&&d!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);
22if(s(d.value)===-1)continue;if(l!==-1){a=d;break}else{const p=d.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){a=d;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),i(a.value)}const c={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const d=JSON.stringify(a.styleDiff),l=JSON.stringify(a._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))},this.processMutation=t=>{if(!qr(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ye(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Nt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Mc(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=Ks(n),c=n.tagName;s=rr(n,c,o);const a=Sr({maskInputOptions:this.maskInputOptions,tagName:c,type:o}),u=Nt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a);s=tn({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(ye(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!ei(n))r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!wc(n.tagName,r)&&(i.attributes[r]=Ic(this.doc,At(n.tagName),At(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const c of Array.from(n.style)){const a=n.style.getPropertyValue(c),u=n.style.getPropertyPriority(c);a!==o.style.getPropertyValue(c)||u!==o.style.getPropertyPriority(c)?u===""?i.styleDiff[c]=a:i.styleDiff[c]=[a,u]:i._unchangedStyles[c]=[a,u]}for(const c of Array.from(o.style))n.style.getPropertyValue(c)===""&&(i.styleDiff[c]=!1)}break}case"childList":{if(ye(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=Xt(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ye(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||qr(n,this.mirror)||!tg(n,this.mirror)||(this.addedSet.has(n)?(Ss(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Ac(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[So(r,s)]?Ss(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Xt(t.target)&&Kt(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(qr(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[So(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ye(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEac
22h(r=>this.genAdds(r)),ys(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ss(e,t){e.delete(t),t.childNodes?.forEach(n=>Ss(e,n))}function Eo(e,t,n){return e.length===0?!1:lg(e,t,n)}function lg(e,t,n){let r=t.parentNode;for(;r;){const s=n.getId(r);if(e.some(i=>i.id===s))return!0;r=r.parentNode}return!1}function bo(e,t){return e.size===0?!1:Pc(e,t)}function Pc(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Pc(e,n):!1}let Jt;function fg(e){Jt=e}function pg(){Jt=void 0}const H=e=>Jt?(...n)=>{try{return e(...n)}catch(r){if(Jt&&Jt(r)===!0)return()=>{};throw r}}:e,It=[];function yn(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Fc(e,t){const n=new dg;It.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=window?.Zone?.__symbol__?.("MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(H(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function hg({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],c;const a=rn(H(l=>{const f=Date.now()-c;e(o.map(p=>(p.timeOffset-=f,p)),l),o=[],c=null}),i),u=H(rn(H(l=>{const f=yn(l),{clientX:p,clientY:h}=_s(l)?l.changedTouches[0]:l;c||(c=ir()),o.push({x:p,y:h,id:r.getId(f),timeOffset:ir()-c}),a(typeof DragEvent<"u"&&l instanceof DragEvent?M.Drag:l instanceof MouseEvent?M.MouseMove:M.TouchMove)}),s,{trailing:!1})),d=[fe("mousemove",u,n),fe("touchmove",u,n),fe("drag",u,n)];return H(()=>{d.forEach(l=>l())})}function mg({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const c=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let u=null;const d=l=>f=>{const p=yn(f);if(ye(p,r,s,i,!0))return;let h=null,m=l;if("pointerType"in f){switch(f.pointerType){case"mouse":h=Ne.Mouse;break;case"touch":h=Ne.Touch;break;case"pen":h=Ne.Pen;break}h===Ne.Touch?le[l]===le.MouseDown?m="TouchStart":le[l]===le.MouseUp&&(m="TouchEnd"):Ne.Pen}else _s(f)&&(h=Ne.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===Ne.Touch||m.startsWith("Mouse")&&h===Ne.Mouse)&&(h=null)):le[l]===le.Click&&(h=u,u=null);const y=_s(f)?f.changedTouches[0]:f;if(!y)return;const b=n.getId(p),{clientX:w,clientY:j}=y;H(e)({type:le[m],id:b,x:w,y:j,...h!==null&&{pointerType:h}})};return Object.keys(le).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&c[l]!==!1).forEach(l=>{let f=At(l);const p=d(l);if(window.PointerEvent)switch(le[l]){case le.MouseDown:case le.MouseUp:f=f.replace("mouse","pointer");break;case le.TouchStart:case le.TouchEnd:return}a.push(fe(f,p,t))}),H(()=>{a.forEach(l=>l())})}function Bc({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const c=H(rn(H(a=>{const u=yn(a);if(!u||ye(u,r,s,i,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=Rc(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return fe("scroll",c,t)}function gg({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=H(rn(H(()=>{const i=Cc(),o=xc();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return fe("resize",s,t)}const _g=["INPUT","TEXTAREA","SELECT"],vo=new WeakMap;function yg({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:d,userTr
22iggeredOnInput:l,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function y(T){let A=yn(T);const E=T.isTrusted,I=A&&ms(A.tagName);if(I==="OPTION"&&(A=A.parentElement),!A||!I||_g.indexOf(I)<0||ye(A,r,s,i,!0))return;const F=A;if(F.classList.contains(o)||c&&F.matches(c))return;const x=Ks(A);let ee=rr(F,I,x),Q=!1;const D=Sr({maskInputOptions:a,tagName:I,type:x}),B=Nt(A,f,h,p,m,D);(x==="radio"||x==="checkbox")&&(Q=A.checked),ee=tn({isMasked:B,element:A,value:ee,maskInputFn:u}),b(A,l?{text:ee,isChecked:Q,userTriggered:E}:{text:ee,isChecked:Q});const S=A.name;x==="radio"&&S&&Q&&t.querySelectorAll(`input[type="radio"][name="${S}"]`).forEach(z=>{if(z!==A){const N=tn({isMasked:B,element:z,value:rr(z,I,x),maskInputFn:u});b(z,l?{text:N,isChecked:!Q,userTriggered:!1}:{text:N,isChecked:!Q})}})}function b(T,A){const E=vo.get(T);if(!E||E.text!==A.text||E.isChecked!==A.isChecked){vo.set(T,A);const I=n.getId(T);H(e)({...A,id:I})}}const j=(d.input==="last"?["change"]:["input","change"]).map(T=>fe(T,H(y),t)),P=t.defaultView;if(!P)return()=>{j.forEach(T=>T())};const C=P.Object.getOwnPropertyDescriptor(P.HTMLInputElement.prototype,"value"),_=[[P.HTMLInputElement.prototype,"value"],[P.HTMLInputElement.prototype,"checked"],[P.HTMLSelectElement.prototype,"value"],[P.HTMLTextAreaElement.prototype,"value"],[P.HTMLSelectElement.prototype,"selectedIndex"],[P.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&j.push(..._.map(T=>kc(T[0],T[1],{set(){H(y)({target:this,isTrusted:!1})}},!1,P))),H(()=>{j.forEach(T=>T())})}function or(e){const t=[];function n(r,s){if(An("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||An("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||An("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||An("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function je(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Sg({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:H((d,l,f)=>{const[p,h]=f,{id:m,styleId:y}=je(l,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:p,index:h}]}),d.apply(l,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:H((d,l,f)=>{const[p]=f,{id:h,styleId:m}=je(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:p}]}),d.apply(l,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:H((d,l,f)=>{const[p]=f,{id:h,styleId:m}=je(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:p}),d.apply(l,f)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:H((d,l,f)=>{const[p]=f,{id:h,styleId:m}=je(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),d.apply(l,f)})}));const a={};Nn("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Nn("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Nn("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Nn("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:H((f,p,h)=>{const[m,y]=h,{id:b,styleId:w}=je(p.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||w&&w!==-1)&&e({id:b,styleId:w,adds:[{rule:m,index:[...or(p),y||0]}]}),f.apply(p,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:H((f,p,h)=>{const[m]=h,{id:y,styleId:b}=je(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||b&&b!==-1)&&e({id:y,styleId:b,removes:[{index:[...or(p),m]}]}),f.apply(p,h)})})}),H(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(a).forEac
22h(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function $c({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=s?.prototype?Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(o){const c=i.set?.call(this,o);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return c}}),H(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function Eg({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:H((c,a,u)=>{const[d,l,f]=u;if(n.has(d))return i.apply(a,[d,l,f]);const{id:p,styleId:h}=je(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:d,value:l,priority:f},index:or(a.parentRule)}),c.apply(a,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:H((c,a,u)=>{const[d]=u;if(n.has(d))return o.apply(a,[d]);const{id:l,styleId:f}=je(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||f&&f!==-1)&&e({id:l,styleId:f,remove:{property:d},index:or(a.parentRule)}),c.apply(a,u)})}),H(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function bg({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const c=H(u=>rn(H(d=>{const l=yn(d);if(!l||ye(l,t,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:m}=l;e({type:u,id:s.getId(l),currentTime:f,volume:p,muted:h,playbackRate:m})}),i.media||500)),a=[fe("play",c(Et.Play),o),fe("pause",c(Et.Pause),o),fe("seeked",c(Et.Seeked),o),fe("volumechange",c(Et.VolumeChange),o),fe("ratechange",c(Et.RateChange),o)];return H(()=>{a.forEach(u=>u())})}function vg({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(a,u,d){const l=new i(a,u,d);return s.set(l,{family:a,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const o=Qs(t.fonts,"add",function(c){return function(a){return br(H(()=>{const u=s.get(a);u&&(e(u),s.delete(a))}),0),c.apply(this,[a])}});return r.push(()=>{n.FontFace=i}),r.push(o),H(()=>{r.forEach(c=>c())})}function Tg(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let c=!0;const a=H(()=>{const u=t.getSelection();if(!u||c&&u?.isCollapsed)return;c=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let f=0;f<l;f++){const p=u.getRangeAt(f),{startContainer:h,startOffset:m,endContainer:y,endOffset:b}=p;ye(h,r,s,i,!0)||ye(y,r,s,i,!0)||d.push({start:n.getId(h),startOffset:m,end:n.getId(y),endOffset:b})}o({ranges:d})});return a(),fe("selectionchange",a)}function Ig({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Qs(n.customElements,"define",function(s){return function(i,o,c){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,c])}})}function wg(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Fc(e,e.doc));const s=hg(e),i=mg(e),o=Bc(e),c=gg(e,{win:n}),a=yg(e),u=bg(e);let d=()=>{},l=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(d=Sg(e,{win:n}),l=$c(e,e.doc),f=Eg(e,{win:n}),e.collectFonts&&(p=vg(e)));const h=Tg(e),m=Ig(e),y=[];for(const b of e.plugins)y.push(b.observer(b.callback,n,b.options));return H(()=>{It.forEach(b=>b.reset()),r?.disconnect(),s(),i(),o(),c(),a(),u(),d(),l(),f(),p(),h(),m(),y.forEach(b=>b())})}function An(e){return typeof window[e]<"u"}function Nn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Es{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let c=i.get(n);return c||(c=this.generateIdFn(),i.set(n,c),o.set(c,n)),c}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}
22class kg{constructor(){this.crossOriginIframeMirror=new Es(Js),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Rg{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Es(Js),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Es(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=ei(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:L.IncrementalSnapshot,data:{source:M.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return n;case L.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case L.IncrementalSnapshot:switch(n.data.source){case M.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case M.Drag:case M.TouchMove:case M.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case M.ViewportResize:return!1;case M.MediaInteraction:case M.MouseInteraction:case M.Scroll:case M.CanvasMutation:case M.Input:return this.replaceIds(n.data,t,["id"]),n;case M.StyleSheetRule:case M.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case M.Font:return n;case M.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case M.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==se.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Cg{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class xg{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Kt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=Fc({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Bc({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),br(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push($c({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=ei(t),r=cg(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Qs(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Lc(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}
22reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var To="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mg=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var On=0;On<To.length;On++)Mg[To.charCodeAt(On)]=On;class Io{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Ag{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new rg,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(c,a)=>({rule:yc(c),index:a}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Ng{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.active||(this.active=!0,og(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let te,ar;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ke=Am();function Le(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:b,maskAttributeFn:w,maskInputFn:j,maskTextFn:P,maxCanvasSize:C=null,packFn:_,sampling:T={},dataURLOptions:A={},mousemoveWait:E,recordDOM:I=!0,recordCanvas:F=!1,recordCrossOriginIframes:x=!1,recordAfter:ee=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:Q=!1,collectFonts:D=!1,inlineImages:B=!1,plugins:S,keepIframeSrcFn:z=()=>!1,ignoreCSSAttributes:N=new Set([]),errorHandler:ie,onMutation:re,getCanvasManager:me}=e;fg(ie);const Ce=x?window.parent===window:!0;let ze=!1;if(!Ce)try{window.parent.document&&(ze=!1)}catch{ze=!0}if(Ce&&!t)throw new Error("emit function is required");if(!Ce&&!ze)return()=>{};E!==void 0&&T.mousemove===void 0&&(T.mousemove=E),ke.reset();const zt=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:y!==void 0?y:{},wr=b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b==="all",headMetaDescKeywords:b==="all"}:b||{};ng();let kr,Rr=0;const ui=V=>{for(const we of S||[])we.eventProcessor&&(V=we.eventProcessor(V));return _&&!ze&&(V=_(V)),V};te=(V,we)=>{const $=V;if($.timestamp=ir(),It[0]?.isFrozen()&&$.type!==L.FullSnapshot&&!($.type===L.IncrementalSnapshot&&$.data.source===M.Mutation)&&It.forEach(ae=>ae.unfreeze()),Ce)t?.(ui($),we);else if(ze){const ae={type:"rrweb",event:ui($),origin:window.location.origin,isCheckout:we};window.parent.postMessage(ae,"*")}if($.type===L.FullSnapshot)kr=$,Rr=0;else if($.type===L.IncrementalSnapshot){if($.data.source===M.Mutation&&$.data.isAttachIframe)return;Rr++;const ae=r&&Rr>=r,Y=n&&kr&&$.timestamp-kr.timestamp>n;(ae||Y)&&Mr(!0)}};const jt=V=>{te({type:L.IncrementalSnapshot,data:{source:M.Mutation,...V}})},di=V=>te({type:L.IncrementalSnapshot,data:{source:M.Scroll,...V}}),lu=V=>te({type:L.IncrementalSnapshot,data:{source:M.CanvasMutation,...V}}),fu=V=>te({type:L.IncrementalSnapshot,data:{source:M.AdoptedStyleSheet,...V}}),et=new Ag({mutationCb:jt,adoptedStyleSheetCb:fu}),tt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new kg:new Rg({mirror:ke,mutationCb:jt,stylesheetManager:et,recordCrossOriginIframes:x,wrappedEmit:te});for(const V of S||[])V.getMirror&&V.getMirror({nodeMirror:ke,crossOriginIframeMirror:tt.crossOriginIframeMirror,crossOriginIframeStyleMirror:tt.crossOriginIframeStyleMirror});const Cr=new Ng,xr=Dg(me,{mirror:ke,win:window,mutationCb:V=>te({type:L.IncrementalSnapshot,data:{source:M.CanvasMutation,...V}}),recordCanvas:F,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:C,sampling:T.canvas,dataURLOptions:A,errorHandler:ie}),En=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Cg:new xg({mutationCb:jt,scrollCb:di,bypassOptions:{onMutation:re,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:zt,dataURLOptions:A,maskAttributeFn:w,maskTextFn:P,maskInputFn:j,recordCanvas:F,inlineImages:B,sampling:T,slimDOMOptions:wr,iframeManager:tt,stylesheetManager:et,canvasManager:xr,keepIframeSrcFn:z,processedNodeManager:Cr},mirror:ke}),Mr=(V=!1)=>
22{if(!I)return;te({type:L.Meta,data:{href:window.location.href,width:xc(),height:Cc()}},V),et.reset(),En.init(),It.forEach($=>$.lock());const we=eg(document,{mirror:ke,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:zt,maskAttributeFn:w,maskInputFn:j,maskTextFn:P,slimDOM:wr,dataURLOptions:A,recordCanvas:F,inlineImages:B,onSerialize:$=>{Nc($,ke)&&tt.addIframe($),Oc($,ke)&&et.trackLinkElement($),ys($)&&En.addShadowRoot($.shadowRoot,document)},onIframeLoad:($,ae)=>{tt.attachIframe($,ae),$.contentWindow&&xr.addWindow($.contentWindow),En.observeAttachShadow($)},onStylesheetLoad:($,ae)=>{et.attachLinkElement($,ae)},onBlockedImageLoad:($,ae,{width:Y,height:qt})=>{jt({adds:[],removes:[],texts:[],attributes:[{id:ae.id,attributes:{style:{width:`${Y}px`,height:`${qt}px`}}}]})},keepIframeSrcFn:z});if(!we)return console.warn("Failed to snapshot the document");te({type:L.FullSnapshot,data:{node:we,initialOffset:Rc(window)}}),It.forEach($=>$.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&et.adoptStyleSheets(document.adoptedStyleSheets,ke.getId(document))};ar=Mr;try{const V=[],we=ae=>H(wg)({onMutation:re,mutationCb:jt,mousemoveCb:(Y,qt)=>te({type:L.IncrementalSnapshot,data:{source:qt,positions:Y}}),mouseInteractionCb:Y=>te({type:L.IncrementalSnapshot,data:{source:M.MouseInteraction,...Y}}),scrollCb:di,viewportResizeCb:Y=>te({type:L.IncrementalSnapshot,data:{source:M.ViewportResize,...Y}}),inputCb:Y=>te({type:L.IncrementalSnapshot,data:{source:M.Input,...Y}}),mediaInteractionCb:Y=>te({type:L.IncrementalSnapshot,data:{source:M.MediaInteraction,...Y}}),styleSheetRuleCb:Y=>te({type:L.IncrementalSnapshot,data:{source:M.StyleSheetRule,...Y}}),styleDeclarationCb:Y=>te({type:L.IncrementalSnapshot,data:{source:M.StyleDeclaration,...Y}}),canvasMutationCb:lu,fontCb:Y=>te({type:L.IncrementalSnapshot,data:{source:M.Font,...Y}}),selectionCb:Y=>{te({type:L.IncrementalSnapshot,data:{source:M.Selection,...Y}})},customElementCb:Y=>{te({type:L.IncrementalSnapshot,data:{source:M.CustomElement,...Y}})},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:zt,inlineStylesheet:h,sampling:T,recordDOM:I,recordCanvas:F,inlineImages:B,userTriggeredOnInput:Q,collectFonts:D,doc:ae,maskAttributeFn:w,maskInputFn:j,maskTextFn:P,keepIframeSrcFn:z,blockSelector:i,unblockSelector:o,slimDOMOptions:wr,dataURLOptions:A,mirror:ke,iframeManager:tt,stylesheetManager:et,shadowDomManager:En,processedNodeManager:Cr,canvasManager:xr,ignoreCSSAttributes:N,plugins:S?.filter(Y=>Y.observer)?.map(Y=>({observer:Y.observer,options:Y.options,callback:qt=>te({type:L.Plugin,data:{plugin:Y.name,payload:qt}})}))||[]},{});tt.addLoadListener(ae=>{try{V.push(we(ae.contentDocument))}catch(Y){console.warn(Y)}});const $=()=>{Mr(),V.push(we(document))};return document.readyState==="interactive"||document.readyState==="complete"?$():(V.push(fe("DOMContentLoaded",()=>{te({type:L.DomContentLoaded,data:{}}),ee==="DOMContentLoaded"&&$()})),V.push(fe("load",()=>{te({type:L.Load,data:{}}),ee==="load"&&$()},window))),()=>
22{V.forEach(ae=>ae()),Cr.destroy(),ar=void 0,pg()}}catch(V){console.warn(V)}}function Og(e){if(!ar)throw new Error("please take full snapshot after start recording");ar(e)}Le.mirror=ke;Le.takeFullSnapshot=Og;function Dg(e,t){try{return e?e(t):new Io}catch{return console.warn("Unable to initialize CanvasManager"),new Io}}var wo;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(wo||(wo={}));const Lg=3,Pg=5;function ti(e){return e>9999999999?e:e*1e3}function Gr(e){return e>9999999999?e/1e3:e}function Sn(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:L.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Re(t,10,1e3)}}),t.category==="console")))}const Fg="button,a";function Uc(e){return e.closest(Fg)||e}function Hc(e){const t=Wc(e);return!t||!(t instanceof Element)?t:Uc(t)}function Wc(e){return Bg(e)?e.target:e}function Bg(e){return typeof e=="object"&&!!e&&"target"in e}let qe;function $g(e){return qe||(qe=[],Ug()),qe.push(e),()=>{const t=qe?qe.indexOf(e):-1;t>-1&&qe.splice(t,1)}}function Ug(){_e(J,"open",function(e){return function(...t){if(qe)try{qe.forEach(n=>n())}catch{}return e.apply(J,t)}})}const Hg=new Set([M.Mutation,M.StyleSheetRule,M.StyleDeclaration,M.AdoptedStyleSheet,M.CanvasMutation,M.Selection,M.MediaInteraction]);function Wg(e,t,n){e.handleClick(t,n)}class zg{constructor(t,n,r=Sn){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=$g(()=>{this._lastMutation=ko()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(qg(n,this._ignoreSelector)||!Gg(t))return;const r={timestamp:Gr(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Gr(t)}registerScroll(t=Date.now()){this._lastScroll=Gr(t)}registerClick(t){const n=Uc(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=ko();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:c}=t;if(i){const a=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=a<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:J.location.href,route:n.getCurrentRoute(),timeAfterClickMs:a,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,d);return}if(o>1){const a={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:J.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=_n(()=>this._checkClicks(),1e3)}}const jg=["A","BUTTON","INPUT"];function qg(e,t){return!!(!jg.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function Gg(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function ko(){return Date.now()/1e3}function Vg(e,t){try{if(!Yg(t))return;const{source:n}=t.data;if(Hg.has(n)&&e.registerMutation(t.timestamp),n===M.Scroll&&e.registerScroll(t.timestamp),Xg(t)){const{type:r,id:s}=t.data,i=Le.mirror.getNode(s);i instanceof HTMLElement&&r===le.Click&&e.registerClick(i)}}catch{}}function Yg(e){return e.type===Lg}function Xg(e){return e.data.source===M.MouseInteraction}function Me(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ni=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ni||{});const Kg=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Jg(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(Kg.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const Qg=e=>t=>{if(!e.isEnabled())return;const n=Zg(t);if(!n)return;
22const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s?.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Wg(e.clickDetector,n,Hc(t.event)),Sn(e,n)};function zc(e,t){const n=Le.mirror.getId(e),r=n&&Le.mirror.getNode(n),s=r&&Le.mirror.getMeta(r),i=s&&t_(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===ni.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Jg(i.attributes)}}:{}}}function Zg(e){const{target:t,message:n}=e_(e);return Me({category:`ui.${e.name}`,...zc(t,n)})}function e_(e){const t=e.name==="click";let n,r=null;try{r=t?Hc(e.event):Wc(e.event),n=Te(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function t_(e){return e.type===ni.Element}function n_(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=r_(t);n&&Sn(e,n)}function r_(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||s_(o)||!i)return null;const c=t||r||s,a=i.length===1;if(!c&&a)return null;const u=Te(o,{maxStringLength:200})||"<unknown>",d=zc(o,u);return Me({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function s_(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const i_={resource:d_,paint:c_,navigation:u_};function Dn(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function o_(e){return e.map(a_).filter(Boolean)}function a_(e){const t=i_[e.entryType];return t?t(e):null}function Ot(e){return((pe()||J.performance.timeOrigin)+e)/1e3}function c_(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=Ot(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function u_(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:f,startTime:p,transferSize:h,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:Ot(p),end:Ot(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:d,loadEventEnd:l,domComplete:i,redirectCount:f}}}function d_(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:c,responseStatus:a,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ot(i),end:Ot(s),name:r,data:{size:u,statusCode:a,decodedBodySize:o,encodedBodySize:c}}}function l_(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return vr(e,"largest-contentful-paint",n)}function f_(e){return e.sources!==void 0}function p_(e){const t=[],n=[];for(const r of e.entries)if(f_(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Le.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return vr(e,"cumulative-layout-shift",n,t)}function h_(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return vr(e,"first-input-delay",n)}function m_(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return vr(e,"interaction-to-next-paint",n)}function vr(e,t,n,r){const s=e.value,i=e.rating,o=Ot(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(c=>Le.mirror.getId(c)):void 0,attributions:r}}}function g_(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(lt(s,n))}),r.push(qs(Dn(l_,e)),js(Dn(p_,e)),rc(Dn(h_,e)),sc(Dn(m_,e))),()=>{r.forEach(s=>s())}}const k=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,__='
vendor: 10,329 bytes, line 22
22var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(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,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=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:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<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 s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,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[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(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[s[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=w,P=p,Q=y,R=g;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,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<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(s[t]^s[t+1]<<A^s[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||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[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|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});
22';function y_(){const e=new Blob([__]);return URL.createObjectURL(e)}const Ro=["log","warn","error"],zn="[Replay] ";function Vr(e,t="info"){Je({category:"console",data:{logger:"replay"},level:t,message:`${zn}${e}`},{level:t})}function S_(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return k?(Ro.forEach(r=>{n[r]=(...s)=>{g[r](zn,...s),t&&Vr(s.join(""),Ba(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),g.error(zn,r),e?Ta(r):t&&Vr(r,"error")},n.infoTick=(...r)=>{g.log(zn,...r),t&&setTimeout(()=>Vr(r[0]),0)}):Ro.forEach(r=>{n[r]=()=>{}}),n}const R=S_();class ri extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Xs}.`)}}class jc{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(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Xs)throw new ri;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?ti(t):null}}class E_{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){k&&R.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:c})=>{const a=c;if(a.method===t&&a.id===r){if(this._worker.removeEventListener("message",o),!a.success){k&&R.error("Error in compression worker: ",a.response),i(new Error("Error in compression worker"));return}s(a.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class b_{constructor(t){this._worker=new E_(t),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(t){const n=ti(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Xs?Promise.reject(new ri):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{k&&R.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class v_{constructor(t){this._fallback=new jc,this._compression=new b_(t),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(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){k&&R.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const i of t)s.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(i){k&&R.exception(i,"Failed to add events when switching buffers.")}}}function T_({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=I_(t);if(n)return n}return k&&R.log("Using simple buffer"),new jc}function I_(e){try{const t=e||w_();if(!t)return;k&&R.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new v_(n)}catch(t){k&&R.exception(t,"Failed to create compression worker")}}function w_(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?y_():""}function si(){try{return"sessionStorage"in J&&!!J.sessionStorage}catch{return!1}}function k_(e){R_(),e.session=void 0}function R_(){if(si())try{J.sessionStorage.removeItem(Vs)}catch{}}function qc(e){return e===void 0?!1:Math.random()<e}function ii(e){if(si())try{J.sessionStorage.setItem(Vs,JSON.stringify(e))}catch{}}function Gc(e){const t=Date.now(),n=e.id||Se(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,c=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:c}}function C_(e,t){return qc(e)?"session":t?"buffer":!1}function Co({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=C_(e,t),i=Gc({sampled:s,previousSessionId:r});return n&&ii(i),i}function x_(){if(!si())return null;try{const e=J.sessionStorage.getItem(Vs);if(!e)return null;const t=JSON.parse(e);return k&&R.infoTick("Loading existing session"),Gc(t)}catch{return null}}function bs(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Vc(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return bs(e.started,t,r)||bs(e.lastActivity,n,r)}function Yc(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Vc(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Yr({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&x_();return s?Yc(s,{sessionIdleExpire:e,maxReplayDuration:t})?(k&&R.infoTick("Session in sessionStorage is expired, creating new one..."),Co(r,{previousSessionId:s.id})):s:(k&&R.infoTick("Creating new session"),Co(r,{previousSessionId:n}))}function M_(e){return e.type===L.Custom}function oi(e,t,n){return Kc(e,t)?(Xc(e,t,n),!0):!1}function A_(e,t,n){return Kc(e,t)?Xc(e,t,n):Promise.resolve(null)}async function Xc(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";
22try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=e.getOptions(),o=N_(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof ri,c=o?"addEventSizeExceeded":"addEvent";if(o&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:c});const a=U();a&&a.recordDroppedEvent("internal_sdk_error","replay")}}function Kc(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=ti(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(k&&R.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function N_(e,t){try{if(typeof t=="function"&&M_(e))return t(e)}catch(n){return k&&R.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function ai(e){return!e.type}function vs(e){return e.type==="transaction"}function O_(e){return e.type==="replay_event"}function xo(e){return e.type==="feedback"}function D_(e){return(t,n)=>{if(!e.isEnabled()||!ai(t)&&!vs(t))return;const r=n?.statusCode;if(!(!r||r<200||r>=300)){if(vs(t)){L_(e,t);return}P_(e,t)}}}function L_(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function P_(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||_n(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function F_(e){return t=>{!e.isEnabled()||!ai(t)||B_(e,t)}}function B_(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=Me({category:"replay.hydrate-error",data:{url:Lt()}});Sn(e,r)}}function $_(e){const t=U();t&&t.on("beforeAddBreadcrumb",n=>U_(e,n))}function U_(e,t){if(!e.isEnabled()||!Jc(t))return;const n=H_(t);n&&Sn(e,n)}function H_(e){return!Jc(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?W_(e):Me(e)}function W_(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Me(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Mn?(n=!0,`${s.slice(0,Mn)}â¦`):s;if(typeof s=="object")try{const i=Re(s,7);return JSON.stringify(i).length>Mn?(n=!0,`${JSON.stringify(i,null,2).slice(0,Mn)}â¦`):i}catch{}return s});return Me({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Jc(e){return!!e.category}function z_(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Qc(){const e=X().getPropagationContext().dsc;e&&delete e.replay_id;const t=he();if(t){const n=Ue(t);delete n.replay_id}}function j_(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:L.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function q_(e,t){return e.recordingMode!=="buffer"||t.message===Ys||!t.exception||t.type?!1:qc(e.getOptions().errorSampleRate)}function G_(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:O_(t)?(delete t.breadcrumbs,t):!ai(t)&&!vs(t)&&!xo(t)?t:e.checkAndHandleExpiredSession()?xo(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),j_(e,t),t):z_(t,n)&&!e.getOptions()._experiments.captureExceptions?(k&&R.log("Ignoring error from rrweb internals",t),null):((q_(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(Qc(),t),{id:"Replay"})}function Tr(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const c=e.throttledAddEvent({type:L.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof c=="string"?Promise.resolve(null):c})}function V_(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Y_(e){return t=>{if(!e.isEnabled())return;const n=V_(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Tr(e,[n]),!1)))}}function X_(e,t){return k&&e.getOptions()._experiments.traceInternals?!1:Bl(t,U())}function Zc(e,t){e.isEnabled()&&t!==null&&(X_(e,t.name)||e.addUpdate(()=>(Tr(e,[t]),!0)))}function Ir(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=pc(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function eu(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function cr(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function tu(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:c,response:a}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:i,statusCode:o,request:c,response:a}}}function sn(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ge(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=K_(n);return r.body=s,i?.length&&(r._meta={warnings:i}),r}function Ts(e,t){return Object.entries(e).reduce((n,[r,s])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=s),n},{})}function K_(e){if(!e||typeof e!="string")return{body:e};const t=e.length>co,n=J_(e);
22if(t){const r=e.slice(0,co);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}â¦`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function J_(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function ur(e,t){const n=Q_(e);return De(n,t)}function Q_(e,t=J.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(J.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Z_(e,t,n){try{const r=await ty(e,t,n),s=tu("resource.fetch",r);Zc(n.replay,s)}catch(r){k&&R.exception(r,"Failed to capture fetch breadcrumb")}}function ey(e,t){const{input:n,response:r}=t,s=n?mc(n):void 0,i=Ir(s),o=r?eu(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function ty(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:c,status_code:a=0,request_body_size:u,response_body_size:d}=e.data,l=ur(o,n.networkDetailAllowUrls)&&!ur(o,n.networkDetailDenyUrls),f=l?ny(n,t.input,u):sn(u),p=await ry(l,n,t.response,d);return{startTimestamp:s,endTimestamp:i,url:o,method:c,statusCode:a,request:f,response:p}}function ny({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?oy(n,t):{};if(!e)return Ge(s,r,void 0);const i=mc(n),[o,c]=hc(i,R),a=Ge(s,r,o);return c?cr(a,c):a}async function ry(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return sn(s);const i=r?nu(r.headers,n):{};if(!r||!t&&s!==void 0)return Ge(i,s,void 0);const[o,c]=await iy(r),a=sy(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return c?cr(a,c):a}function sy(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e?.length&&n===void 0?Ir(e):n;return r?t?Ge(s,i,e):Ge(s,i,void 0):sn(i)}catch(i){return k&&R.exception(i,"Failed to serialize response body"),Ge(s,n,void 0)}}async function iy(e){const t=ay(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await cy(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(k&&R.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(k&&R.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function nu(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function oy(e,t){return e.length===1&&typeof e[0]!="string"?Mo(e[0],t):e.length===2?Mo(e[1],t):{}}function Mo(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?nu(n,t):Array.isArray(n)?{}:Ts(n,t):{}}function ay(e){try{return e.clone()}catch(t){k&&R.exception(t,"Failed to clone response body")}}function cy(e){return new Promise((t,n)=>{const r=_n(()=>n(new Error("Timeout while trying to read response body")),500);uy(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function uy(e){return await e.text()}async function dy(e,t,n){try{const r=fy(e,t,n),s=tu("resource.xhr",r);Zc(n.replay,s)}catch(r){k&&R.exception(r,"Failed to capture xhr breadcrumb")}}function ly(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Ir(r),i=n.getResponseHeader("content-length")?eu(n.getResponseHeader("content-length")):gy(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function fy(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:c}=t,{url:a,method:u,status_code:d=0,request_body_size:l,response_body_size:f}=e.data;if(!a)return null;if(!c||!ur(a,n.networkDetailAllowUrls)||ur(a,n.networkDetailDenyUrls)){const _=sn(l),T=sn(f);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:_,response:T}}const p=c[rt],h=p?Ts(p.request_headers,n.networkRequestHeaders):{},m=Ts(py(c),n.networkResponseHeaders),[y,b]=n.networkCaptureBodies?hc(o,R):[void 0],[w,j]=n.networkCaptureBodies?hy(c):[void 0],P=Ge(h,l,y),C=Ge(m,f,w);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:b?cr(P,b):P,response:j?cr(C,j):C}}function py(e){const t=e.getAllResponseHeaders();return t?t.split(`\r 23`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function hy(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return my(e.response,e.responseType)}catch(n){t.push(n)}return k&&R.warn("Failed to get xhr response body",...t),[void 0]}function my(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return k&&R.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return k&&R.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function gy(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Ir(n)}catch{return}}function _y(e){const t=U();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),c={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(a,u)=>yy(c,a,u))}catch{}}function yy(e,t,n){if(t.data)try{Sy(t)&&by(n)&&(ly(t,n),dy(t,n,e)),Ey(t)&&vy(n)&&(ey(t,n),Z_(t,n,e))}catch(r){k&&R.exception(r,"Error when enriching network breadcrumb")}}function Sy(e){return e.category==="xhr"}function Ey(e){return e.category==="fetch"}function by(e){return e?.xhr}function vy(e){return e?.response}function Ty(e){const t=U();dc(Qg(e)),yr(Y_(e)),$_(e),_y(e);const n=G_(e);fl(n),t&&(t.on("beforeSendEvent",F_(e)),t.on("afterSendEvent",D_(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,s)=>{const i=e.getSessionId();s?.includeReplay&&e.isEnabled()&&i&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function Iy(e){try{return Promise.all(Tr(e,[wy(J.performance.memory)]))}catch{return[]}}function wy(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function ky(e,t,n){return jl(e,t,{...n,setTimeoutImpl:_n})}const Ln=G.navigator;function Ry(){return/iPhone|iPad|iPod/i.test(Ln?.userAgent??"")||/Macintosh/i.test(Ln?.userAgent??"")&&Ln?.maxTouchPoints&&Ln?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Cy(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){k&&R.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&Vg(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!oi(e,n,s))return!0;
23if(!s)return!1;const i=e.session;if(My(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(k&&R.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&ii(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function xy(e){const t=e.getOptions();return{type:L.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function My(e,t){!t||!e.session||e.session.segmentId!==0||oi(e,xy(e),!1)}function Ay(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ny(e,t,n,r){return gt(ga(e,Ps(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Oy({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)} 24`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function Dy({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit("preprocessEvent",r,i);const o=await va(e.getOptions(),r,i,t,e,Ae());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const c=e.getSdkMetadata(),{name:a,version:u}=c?.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function Ly({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=Oy({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:u,initialTimestamp:d}=r,l=U(),f=X(),p=l?.getTransport(),h=l?.getDsn();if(!l||!p||!h||!i.sampled)return He({});const m={type:dm,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:a,trace_ids:u,urls:c,replay_id:t,segment_id:n,replay_type:i.sampled},y=await Dy({scope:f,client:l,replayId:t,event:m});if(!y)return l.recordDroppedEvent("event_processor","replay"),k&&R.log("An event processor returned `null`, will not send event."),He({});delete y.sdkProcessingMetadata;const b=Ny(y,o,h,l.getOptions().tunnel);let w;try{w=await p.send(b)}catch(P){const C=new Error(Ys);try{C.cause=P}catch{}throw C}if(typeof w.statusCode=="number"&&(w.statusCode<200||w.statusCode>=300))throw new ru(w.statusCode);const j=La({},w);if(Da(j,"replay"))throw new ci(j);return w}class ru extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class ci extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function su(e,t={count:0,interval:gm}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Ly(e),!0}catch(s){if(s instanceof ru||s instanceof ci)throw s;if(dl("Replays",{_retryCount:t.count}),r&&r(s),t.count>=_m){const i=new Error(`${Ys} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{_n(async()=>{try{await su(e,t),i(!0)}catch(c){o(c)}},t.interval)})}}const iu="__THROTTLED",Py="__SKIPPED";function Fy(e,t,n){const r=new Map,s=c=>{const a=c-n;r.forEach((u,d)=>{d<a&&r.delete(d)})},i=()=>[...r.values()].reduce((c,a)=>c+a,0);let o=!1;return(...c)=>{const a=Math.floor(Date.now()/1e3);if(s(a),i()>=t){const d=o;return o=!0,d?Py:iu}o=!1;const u=r.get(a)||0;return r.set(a,u+1),e(...c)}}class By{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:lm,sessionIdleExpire:fm},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=n,this._options=t,this._debouncedFlush=ky(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}
24),this._throttledAddEvent=Fy((o,c)=>A_(this,o,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(ym,r),timeout:r,scrollTimeout:Sm,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new zg(this,i)),k){const o=t._experiments;R.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{J.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=Me({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=Me({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{n_(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){k&&R.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){k&&R.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",k&&R.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){k&&R.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){k&&R.log("Buffering is in progress, call `flush()` to save the replay");return}k&&R.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Yr({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){k&&R.log("Buffering is in progress, call `flush()` to save the replay");return}k&&R.infoTick("Starting replay in buffer mode");const t=Yr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Le({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:mm}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Cy(this),...Ry(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{k&&R.log(`Stopping Replay${n?` triggered by ${n}`:""}`),Qc(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,k_(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),k&&R.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),k&&R.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();k&&R.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session?.id}
24checkAndHandleExpiredSession(){if(this._lastActivity&&bs(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${J.location.pathname}${J.location.hash}${J.location.search}`,n=`${J.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===iu){const s=Me({category:"replay.throttled"});this.addUpdate(()=>!oi(this,{type:Pg,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||he(),n=t&&de(t),s=(n&&q(n).data||{})[be];if(!(!n||!s||!["route","custom"].includes(s)))return q(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=T_({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Yr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Yc(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{J.document.addEventListener("visibilitychange",this._handleVisibilityChange),J.addEventListener("blur",this._handleWindowBlur),J.addEventListener("focus",this._handleWindowFocus),J.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Ty(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=g_(this)}_removeListeners(){try{J.document.removeEventListener("visibilitychange",this._handleVisibilityChange),J.removeEventListener("blur",this._handleWindowBlur),J.removeEventListener("focus",this._handleWindowFocus),J.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||Vc(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){k&&R.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:L.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=o_(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Tr(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}
24_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){k&&R.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await Iy(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await su({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=U();if(r){const s=n instanceof ci?"ratelimit_backoff":"send_error";r.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){k&&R.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){k&&R.log(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const c=this.eventBuffer;c&&this.session.segmentId===0&&!c.hasCheckout&&k&&R.log("Flushing initial segment without checkout.");const a=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,a&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&ii(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(c=>{const a=Ay(c.target),u=n.join(",");return a?.matches(u)}))return!1;const r=t.length,s=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,o=s&&r>s;if(r>i||o){const c=Me({category:"replay.mutations",data:{count:r,limit:o}});this._createCustomBreadcrumb(c)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Gt(e,t){return[...e,...t].join(",")}function $y({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=Gt(e,[".sentry-mask","[data-sentry-mask]"]),c=Gt(t,[]);return{maskTextSelector:o,unmaskTextSelector:c,blockSelector:Gt(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Gt(r,[]),ignoreSelector:Gt(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Uy({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const Ao='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Hy=["content-length","content-type","accept"];let No=!1;const Wy=(e=>new zy(e));class zy{constructor({flushMinDelay:t=pm,flushMaxDelay:n=hm,minReplayDuration:r=Em,maxReplayDuration:s=uo,stickySession:i=!0,useCompression:o=!0,workerUrl:c,_experiments:a={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:b=[],networkCaptureBodies:w=!0,networkRequestHeaders:j=[],networkResponseHeaders:P=[],mask:C=[],maskAttributes:_=["title","placeholder","aria-label"],unmask:T=[],block:A=[],unblock:E=[],ignore:I=[],maskFn:F,beforeAddRecordingEvent:x,beforeErrorSampling:ee,onError:Q}={}){this.name="Replay";const D=$y({mask:C,unmask:T,block:A,unblock:E,ignore:I});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:F,maskInputFn:F,maskAttributeFn:(B,S,z)=>Uy({maskAttributes:_,maskAllText:u,privacyOptions:D,key:B,value:S,el:z}),...D,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:B=>{try{B.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,bm),maxReplayDuration:Math.min(s,uo),stickySession:i,useCompression:o,workerUrl:c,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:b,networkCaptureBodies:w,networkRequestHeaders:Oo(j),networkResponseHeaders:Oo(P),beforeAddRecordingEvent:x,beforeErrorSampling:ee,onError:Q,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ao}`:Ao),this._isInitialized&&eo())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return No}set _isInitialized(t){No=t}afterAllSetup(t){!eo()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
24startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=jy(this._initialOptions,t);this._replay=new By({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function jy(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=dt(n.replaysSessionSampleRate),i=dt(n.replaysOnErrorSampleRate);return s==null&&i==null&&pt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function Oo(e){return[...Hy,...e.map(t=>t.toLowerCase())]}function xe(e=0){return((pe()||performance.timeOrigin)+e)/1e3}function qy(e){const t=[];if(e.nextHopProtocol!=null){const{name:n,version:r}=ac(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return pe()?[...t,["http.request.redirect_start",xe(e.redirectStart)],["http.request.fetch_start",xe(e.fetchStart)],["http.request.domain_lookup_start",xe(e.domainLookupStart)],["http.request.domain_lookup_end",xe(e.domainLookupEnd)],["http.request.connect_start",xe(e.connectStart)],["http.request.secure_connection_start",xe(e.secureConnectionStart)],["http.request.connection_end",xe(e.connectEnd)],["http.request.request_start",xe(e.requestStart)],["http.request.response_start",xe(e.responseStart)],["http.request.response_end",xe(e.responseEnd)]]:t}const Do=new WeakMap,Xr=new Map,ou={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Gy(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:c,onRequestSpanStart:a}={...ou,...t},u=typeof i=="function"?i:f=>!0,d=f=>Yy(f,c),l={};n&&(e.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(p=>{if(p.op==="http.client"){const h=Xr.get(p.span_id);h&&(p.timestamp=h/1e3,Xr.delete(p.span_id))}}),f)),s&&Cf(f=>{if(f.response){const p=Do.get(f.response);p&&f.endTimestamp&&Xr.set(p,f.endTimestamp)}}),ja(f=>{const p=Sf(f,u,d,l);if(f.response&&f.fetchData.__span&&Do.set(f.response,f.fetchData.__span),p){const h=au(f.fetchData.url),m=h?ct(h).host:void 0;p.setAttributes({"http.url":h,"server.address":m}),o&&Lo(p),a?.(p,{headers:f.headers})}})),r&&fc(f=>{const p=Xy(f,u,d,l);if(p){o&&Lo(p);let h;try{h=new Headers(f.xhr.__sentry_xhr_v3__?.request_headers)}catch{}a?.(p,{headers:h})}})}function Vy(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Lo(e){const{url:t}=q(e).data;if(!t||typeof t!="string")return;const n=lt("resource",({entries:r})=>{r.forEach(s=>{Vy(s)&&s.name.endsWith(t)&&(qy(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function Yy(e,t){const n=Lt();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return t?De(r.toString(),t)||i&&De(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?De(e,t):r}}function Xy(e,t,n,r){const s=e.xhr,i=s?.[rt];if(!s||s.__sentry_own_request__||!i)return;const{url:o,method:c}=i,a=Ye()&&t(o);if(e.endTimestamp&&a){const m=s.__sentry_xhr_span_id__;if(!m)return;const y=r[m];y&&i.status_code!==void 0&&(ta(y,i.status_code),y.end(),delete r[m]);return}const u=au(o),d=ct(u||o),l=yf(o),f=!!he(),p=a&&f?Bt({name:`${c} ${l}`,attributes:{url:o,type:"xhr","http.method":c,"http.url":u,"server.address":d?.host,[ne]:"auto.http.browser",[$e]:"http.client",...d?.search&&{"http.query":d?.search},...d?.hash&&{"http.fragment":d?.hash}}}):new Xe;s.__sentry_xhr_span_id__=p.spanContext().spanId,r[s.__sentry_xhr_span_id__]=p,n(o)&&Ky(s,Ye()&&f?p:void 0);const h=U();return h&&h.emit("beforeOutgoingRequestSpan",p,e),p}function Ky(e,t){const{"sentry-trace":n,baggage:r}=Fa({span:t});n&&Jy(e,n,r)}
24function Jy(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){const s=r?.baggage;(!s||!Qy(s))&&e.setRequestHeader("baggage",n)}}catch{}}function Qy(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function au(e){try{return new URL(e,W.location.origin).href}catch{return}}function Zy(){W.document?W.document.addEventListener("visibilitychange",()=>{const e=he();if(!e)return;const t=de(e);if(W.document.hidden&&t){const n="cancelled",{op:r,status:s}=q(t);Ie&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:oe,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Ie&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const eS=3600,cu="sentry_previous_trace",tS="sentry.previous_trace";function nS(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?iS():void 0;e.on("spanStart",o=>{if(de(o)!==o)return;const c=X().getPropagationContext();s=rS(s,o,c),r&&sS(s)});let i=!0;n&&e.on("beforeSampling",o=>{if(!s)return;const c=X(),a=c.getPropagationContext();if(i&&a.parentSpanId){i=!1;return}c.setPropagationContext({...a,dsc:{...a.dsc,sample_rate:String(s.sampleRate),sampled:String(Is(s.spanContext))},sampleRand:s.sampleRand}),o.parentSampled=Is(s.spanContext),o.parentSampleRate=s.sampleRate,o.spanAttributes={...o.spanAttributes,[Zo]:s.sampleRate}})}function rS(e,t,n){const r=q(t);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[As])}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return i;const o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=eS&&(Ie&&g.log(`Adding previous_trace ${o} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:o,attributes:{[Yu]:"previous_trace"}}),t.setAttribute(tS,`${o.traceId}-${o.spanId}-${Is(o)?1:0}`)),i)}function sS(e){try{W.sessionStorage.setItem(cu,JSON.stringify(e))}catch(t){Ie&&g.warn("Could not store previous trace in sessionStorage",t)}}function iS(){try{const e=W.sessionStorage?.getItem(cu);return JSON.parse(e)}catch{return}}function Is(e){return e.traceFlags===1}const oS="BrowserTracing",aS={...$n,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...ou},cS=((e={})=>{const t={name:void 0,source:void 0},n=W.document,{enableInp:r,enableElementTiming:s,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:c,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:f,childSpanTimeout:p,markBackgroundSpan:h,traceFetch:m,traceXHR:y,trackFetchStreamPerformance:b,shouldCreateSpanForRequest:w,enableHTTPTimings:j,ignoreResourceSpans:P,ignorePerformanceApiSpans:C,instrumentPageLoad:_,instrumentNavigation:T,detectRedirects:A,linkPreviousTrace:E,consistentTraceSampling:I,onRequestSpanStart:F}={...aS,...e};let x,ee;function Q(D,B,S=!0){const z=B.op==="pageload",N=d?d(B):B,ie=N.attributes||{};if(B.name!==N.name&&(ie[be]="custom",N.attributes=ie),!S){const Ce=ht();Bt({...N,startTime:Ce}).end(Ce);return}t.name=N.name,t.source=ie[be];const re=ba(N,{idleTimeout:l,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:z,beforeSpanEnd:Ce=>{x?.(),Hp(Ce,{recordClsOnPageloadSpan:!a,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:P,ignorePerformanceApiSpans:C}),Fo(D,void 0);const ze=X(),zt=ze.getPropagationContext();ze.setPropagationContext({...zt,traceId:re.spanContext().traceId,sampled:mt(re),dsc:Ue(Ce)})}});Fo(D,re);function me(){n&&["interactive","complete"].includes(n.readyState)&&D.emit("idleSpanEnableAutoFinish",re)}z&&n&&(n.addEventListener("readystatechange",()=>{me()}),me())}return{name:oS,setup(D){if(fd(),x=Op({recordClsStandaloneSpans:a||!1,recordLcpStandaloneSpans:u||!1,client:D}),r&&uh(),s&&Jp(),o&&G.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Lp():i&&Dp(),c&&Pp(),A&&n){const S=()=>{ee=ue()};addEventListener("click",S,{capture:!0}),addEventListener("keydown",S,{capture:!0,passive:!0})}function B(){const S=on(D);S&&!q(S).timestamp&&(Ie&&g.log(`[Tracing] Finishing current active span with op: ${q(S).op}`),S.setAttribute(Vn,"cancelled"),S.end())}D.on("startNavigationSpan",(S,z)=>{if(U()!==D)return;if(z?.isRedirect){Ie&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),Q(D,{op:"navigation.redirect",...S},!1);return}B(),Ae().setPropagationContext({traceId:Ve(),sampleRand:Math.random()});const N=X();N.setPropagationContext({traceId:Ve(),sampleRand:Math.random()}),N.setSDKProcessingMetadata({normalizedRequest:void 0}),Q(D,{op:"navigation",...S})}),D.on("startPageLoadSpan",(S,z={})=>
24{if(U()!==D)return;B();const N=z.sentryTrace||Po("sentry-trace"),ie=z.baggage||Po("baggage"),re=sd(N,ie),me=X();me.setPropagationContext(re),me.setSDKProcessingMetadata({normalizedRequest:$s()}),Q(D,{op:"pageload",...S})})},afterAllSetup(D){let B=Lt();if(E!=="off"&&nS(D,{linkPreviousTrace:E,consistentTraceSampling:I}),W.location){if(_){const S=pe();uS(D,{name:W.location.pathname,startTime:S?S/1e3:void 0,attributes:{[be]:"url",[ne]:"auto.pageload.browser"}})}T&&yr(({to:S,from:z})=>{if(z===void 0&&B?.indexOf(S)!==-1){B=void 0;return}B=void 0;const N=Wa(S),ie=on(D),re=ie&&A&&fS(ie,ee);dS(D,{name:N?.pathname||W.location.pathname,attributes:{[be]:"url",[ne]:"auto.navigation.browser"}},{url:S,isRedirect:re})})}h&&Zy(),c&&lS(D,l,f,p,t),r&&fh(),Gy(D,{traceFetch:m,traceXHR:y,trackFetchStreamPerformance:b,tracePropagationTargets:D.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:w,enableHTTPTimings:j,onRequestSpanStart:F})}}});function uS(e,t,n){e.emit("startPageLoadSpan",t,n),X().setTransactionName(t.name);const r=on(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function dS(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const i=X();return i.setTransactionName(t.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...$s(),url:r}}),on(e)}function Po(e){return W.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function lS(e,t,n,r,s){const i=W.document;let o;const c=()=>{const a="ui.action.click",u=on(e);if(u){const d=q(u).op;if(["navigation","pageload"].includes(d)){Ie&&g.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(Vn,"interactionInterrupted"),o.end(),o=void 0),!s.name){Ie&&g.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=ba({name:s.name,op:a,attributes:{[be]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",c,{capture:!0})}const uu="_sentry_idleSpan";function on(e){return e[uu]}function Fo(e,t){Ee(e,uu,t)}const Bo=.3;function fS(e,t){const n=q(e),r=ht(),s=n.start_timestamp;return!(r-s>Bo||t&&r-t<=Bo)}const pS=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function hS(e){return W.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function du(e={}){const t=cS(e);return{...t,setup(n){t.setup?.(n),n.on("afterStartPageLoadSpan",r=>{const s=hS("sentry-route-name");if(s){let i;try{i=decodeURIComponent(s)}catch{return}pS&&g.log(`[Tracing] Using route name from Sentry HTML meta-tag: ${i}`),r.updateName(i),r.setAttributes({[be]:"route",[ne]:"auto.pageload.astro"})}})}}}function mS(e){const t={defaultIntegrations:gS(),...e};return Pa(t,"astro",["astro","browser"]),um(t)}function gS(e){return typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__?[...hs(),du()]:hs()}mS({dsn:void 0,debug:!1,environment:void 0,release:void 0,tracesSampleRate:1,integrations:[du(),Wy()],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.