@wellesley/sentry 1.0.703 → 1.0.705
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +1 -19
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,19 +1 @@
|
|
|
1
|
-
function Yc(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const X=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,st="8.48.0",B=globalThis;function zn(e,t,n){const r=B,o=r.__SENTRY__=r.__SENTRY__||{},s=o[st]=o[st]||{};return s[e]||(s[e]=t())}const lt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Vc="Sentry Logger ",Nr=["debug","info","warn","error","log","assert","trace"],Rn={};function Qe(e){if(!("console"in B))return e();const t=B.console,n={},r=Object.keys(Rn);r.forEach((e=>{const r=Rn[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function Kc(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return lt?Nr.forEach((n=>{t[n]=(...t)=>{e&&Qe((()=>{B.console[n](`${Vc}[${n}]:`,...t)}))}})):Nr.forEach((e=>{t[e]=()=>{}})),t}const R=zn("logger",Kc),Ni=50,ot="?",to=/\(error: (.*)\)/,no=/captureMessage|captureException/;function Pi(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let e=n;e<s.length;e++){const n=s[e];if(n.length>1024)continue;const i=to.test(n)?n.replace(to,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){o.push(t);break}}if(o.length>=50+r)break}}return Jc(o.slice(r))}}function Xc(e){return Array.isArray(e)?Pi(...e):e}function Jc(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(cn(t).function||"")&&t.pop(),t.reverse(),no.test(cn(t).function||"")&&(t.pop(),no.test(cn(t).function||"")&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||cn(t).filename,function:e.function||ot})))}function cn(e){return e[e.length-1]||{}}const _r="<anonymous>";function Be(e){try{return e&&"function"==typeof e&&e.name||_r}catch{return _r}}function ro(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}const wn={},so={};function dt(e,t){wn[e]=wn[e]||[],wn[e].push(t)}function ft(e,t){if(!so[e]){so[e]=!0;try{t()}catch(t){lt&&R.error(`Error while instrumenting ${e}`,t)}}}function Me(e,t){const n=e&&wn[e];if(n)for(const r of n)try{r(t)}catch(t){lt&&R.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Be(r)}\nError:`,t)}}let yr=null;function Qc(e){const t="error";dt(t,e),ft(t,Zc)}function Zc(){yr=B.onerror,B.onerror=function(e,t,n,r,o){return Me("error",{column:r,error:o,line:n,msg:e,url:t}),!!yr&&yr.apply(this,arguments)},B.onerror.__SENTRY_INSTRUMENTED__=!0}let Sr=null;function eu(e){const t="unhandledrejection";dt(t,e),ft(t,tu)}function tu(){Sr=B.onunhandledrejection,B.onunhandledrejection=function(e){return Me("unhandledrejection",e),!Sr||Sr.apply(this,arguments)},B.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Kt(){return _s(B),B}function _s(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||st,t[st]=t[st]||{}}const Li=Object.prototype.toString;function ys(e){switch(Li.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return it(e,Error)}}function At(e,t){return Li.call(e)===`[object ${t}]`}function Fi(e){return At(e,"ErrorEvent")}function oo(e){return At(e,"DOMError")}function nu(e){return At(e,"DOMException")}function Fe(e){return At(e,"String")}function Ss(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Es(e){return null===e||Ss(e)||"object"!=typeof e&&"function"!=typeof e}function vt(e){return At(e,"Object")}function qn(e){return typeof Event<"u"&&it(e,Event)}function ru(e){return typeof Element<"u"&&it(e,Element)}function su(e){return At(e,"RegExp")}function Gn(e){return!(!e||!e.then||"function"!=typeof e.then)}function ou(e){return vt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function it(e,t){try{return e instanceof t}catch{return!1}}function Ui(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const bs=B,iu=80;function Yn(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(u=au(n,l),!("html"===u||s>1&&i+o.length*c+u.length>=d));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function au(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(bs.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 o=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(o&&o.length)o.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&Fe(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const s=["aria-label","type","name","title","alt"];for(const e of s){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function $i(){try{return bs.document.location.href}catch{return""}}function cu(e){if(!bs.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){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 bt(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function io(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Ui(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function uu(e,t,n=!1){return!!Fe(e)&&(su(t)?t.test(e):!!Fe(t)&&(n?e===t:e.includes(t)))}function Xt(e,t=[],n=!1){return t.some((t=>uu(e,t,n)))}function he(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);"function"==typeof o&&Bi(o,r);try{e[t]=o}catch{lt&&R.log(`Failed to replace method "${t}" in object`,e)}}function at(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{lt&&R.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Bi(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,at(e,"__sentry_original__",t)}catch{}}function vs(e){return e.__sentry_original__}function ji(e){if(ys(e))return{message:e.message,name:e.name,stack:e.stack,...co(e)};if(qn(e)){const t={type:e.type,target:ao(e.target),currentTarget:ao(e.currentTarget),...co(e)};return typeof CustomEvent<"u"&&it(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ao(e){try{return ru(e)?Yn(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function co(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function lu(e,t=40){const n=Object.keys(ji(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return bt(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:bt(r,t)}return""}function me(e){return Pr(e,new Map)}function Pr(e,t){if(du(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))typeof e[n]<"u"&&(r[n]=Pr(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(Pr(e,t))})),r}return e}function du(e){if(!vt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}const Hi=1e3;function Jt(){return Date.now()/Hi}function fu(){const{performance:e}=B;if(!e||!e.now)return Jt;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/Hi}const Ue=fu(),pu=(()=>{const{performance:e}=B;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=o<t,i=e.timing&&e.timing.navigationStart,a="number"==typeof i?Math.abs(i+n-r):t;return s||a<t?o<=a?e.timeOrigin:i:r})();function ye(){const e=B,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function Wi(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function We(e){const{message:t,event_id:n}=e;if(t)return t;const r=Wi(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Lr(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function wt(e,t){const n=Wi(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function uo(e){if(hu(e))return!0;try{at(e,"__sentry_captured__",!0)}catch{}return!1}function hu(e){try{return e.__sentry_captured__}catch{}}var Pe;function je(e){return new we((t=>{t(e)}))}function Mn(e){return new we(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Pe||(Pe={}));class we{constructor(e){we.prototype.__init.call(this),we.prototype.__init2.call(this),we.prototype.__init3.call(this),we.prototype.__init4.call(this),this._state=Pe.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new we(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new we(((t,n)=>{let r,o;return this.then((t=>{o=!1,r=t,e&&e()}),(t=>{o=!0,r=t,e&&e()})).then((()=>{o?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(Pe.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Pe.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Pe.PENDING){if(Gn(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Pe.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===Pe.RESOLVED&&e[1](this._value),this._state===Pe.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function mu(e){const t=Ue(),n={sid:ye(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>_u(n)};return 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=32===t.sid.length?t.sid:ye()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t: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),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function gu(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),kt(e,n)}function _u(e){return me({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${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 lo(){return ye()}function Fr(){return ye().substring(16)}function Vn(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Vn(r[e],t[e],n-1));return r}const Ur="_sentrySpan";function fo(e,t){t?at(e,Ur,t):delete e[Ur]}function $r(e){return e[Ur]}const yu=100;class ws{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:lo(),spanId:Fr()}}clone(){const e=new ws;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,fo(e,$r(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&kt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof ct?[t.getScopeData(),t.getRequestSession()]:vt(t)?[e,e.requestSession]:[],{tags:o,extra:s,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:l}=n||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),r&&(this._requestSession=r),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._requestSession=void 0,this._session=void 0,fo(this,void 0),this._attachments=[],this.setPropagationContext({traceId:lo()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:yu;if(n<=0)return this;const r={timestamp:Jt(),...e},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>n?o.slice(-n):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),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:$r(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Vn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Fr(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:ye();if(!this._client)return R.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:ye();if(!this._client)return R.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:ye();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(R.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const ct=ws;function Su(){return zn("defaultCurrentScope",(()=>new ct))}function Eu(){return zn("defaultIsolationScope",(()=>new ct))}class bu{constructor(e,t){let n,r;n=e||new ct,r=t||new ct,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return Gn(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function It(){const e=_s(Kt());return e.stack=e.stack||new bu(Su(),Eu())}function vu(e){return It().withScope(e)}function wu(e,t){const n=It();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function po(e){return It().withScope((()=>e(It().getIsolationScope())))}function ku(){return{withIsolationScope:po,withScope:vu,withSetScope:wu,withSetIsolationScope:(e,t)=>po(t),getCurrentScope:()=>It().getScope(),getIsolationScope:()=>It().getIsolationScope()}}function Kn(e){const t=_s(e);return t.acs?t.acs:ku()}function ve(){return Kn(Kt()).getCurrentScope()}function De(){return Kn(Kt()).getIsolationScope()}function Iu(){return zn("globalScope",(()=>new ct))}function Tu(...e){const t=Kn(Kt());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function ae(){return ve().getClient()}function Cu(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:o}=t;return me({trace_id:n,span_id:r,parent_span_id:o})}const Ru="_sentryMetrics";function Mu(e){const t=e[Ru];if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(me(r));return n}const zi="sentry.source",xu="sentry.sample_rate",Ou="sentry.op",Au="sentry.origin",Du=0,Nu=1,Pu="sentry-",Lu=/^sentry-/;function Fu(e){const t=Uu(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(Lu)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function Uu(e){if(e&&(Fe(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=ho(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):ho(e)}function ho(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const $u=1;let mo=!1;function Bu(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return me({parent_span_id:r?t:Bt(e).parent_span_id,span_id:r?Fr():t,trace_id:n})}function go(e){return"number"==typeof e?_o(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?_o(e.getTime()):Ue()}function _o(e){return e>9999999999?e/1e3:e}function Bt(e){if(Hu(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(ju(e)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:a,status:c}=e;return me({span_id:t,trace_id:n,data:r,description:s,parent_span_id:a,start_timestamp:go(o),timestamp:go(i)||void 0,status:zu(c),op:r[Ou],origin:r[Au],_metrics_summary:Mu(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function ju(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function Hu(e){return"function"==typeof e.getSpanJSON}function Wu(e){const{traceFlags:t}=e.spanContext();return 1===t}function zu(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const qu="_sentryRootSpan";function ks(e){return e[qu]||e}function qi(){const e=Kn(Kt());return e.getActiveSpan?e.getActiveSpan():$r(ve())}function Gu(){mo||(Qe((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),mo=!0)}function Yu(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=ae(),n=t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}const Is="production",Vu="_frozenDsc";function Gi(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=me({environment:n.environment||Is,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function Ku(e,t){const n=t.getPropagationContext();return n.dsc||Gi(n.traceId,e)}function Yi(e){const t=ae();if(!t)return{};const n=ks(e),r=n[Vu];if(r)return r;const o=n.spanContext().traceState,s=o&&o.get("sentry.dsc"),i=s&&Fu(s);if(i)return i;const a=Gi(e.spanContext().traceId,t),c=Bt(n),u=c.data||{},l=u[xu];null!=l&&(a.sample_rate=`${l}`);const d=u[zi],p=c.description;return"url"!==d&&p&&(a.transaction=p),Yu()&&(a.sampled=String(Wu(n))),t.emit("createDsc",a,n),a}function Br(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;X&&R.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}const Xu=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ju(e){return"http"===e||"https"===e}function Xn(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function Qu(e){const t=Xu.exec(e);if(!t)return void Qe((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return Vi({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Vi(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Zu(e){if(!lt)return!0;const{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(R.error(`Invalid Sentry Dsn: ${t} missing`),!0)))&&(n.match(/^\d+$/)?Ju(r)?!t||!isNaN(parseInt(t,10))||(R.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(R.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(R.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1))}function el(e){const t="string"==typeof e?Qu(e):Vi(e);if(t&&Zu(t))return t}function tl(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}function Te(e,t=100,n=1/0){try{return jr("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Ki(e,t=3,n=102400){const r=Te(e,t);return ol(r)>n?Ki(e,t-1,n):r}function jr(e,t,n=1/0,r=1/0,o=tl()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=nl(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(s(t))return"[Circular ~]";const u=t;if(u&&"function"==typeof u.toJSON)try{return jr("",u.toJSON(),c-1,r,o)}catch{}const l=Array.isArray(t)?[]:{};let d=0;const p=ji(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=r){l[e]="[MaxProperties ~]";break}const t=p[e];l[e]=jr(e,t,c-1,r,o),d++}return i(t),l}function nl(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)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(Ui(t))return"[VueViewModel]";if(ou(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Be(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=rl(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function rl(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function sl(e){return~-encodeURI(e).split(/%..|./).length}function ol(e){return sl(JSON.stringify(e))}function Dt(e,t=[]){return[e,t]}function il(e,t){const[n,r]=e;return[n,[...r,t]]}function yo(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function Hr(e){return B.__SENTRY__&&B.__SENTRY__.encodePolyfill?B.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function al(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[Hr(r),e]:r.push("string"==typeof e?Hr(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Te(n))}o(e)}}return"string"==typeof r?r:cl(r)}function cl(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}function ul(e){const t="string"==typeof e.data?Hr(e.data):e.data;return[me({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const ll={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function So(e){return ll[e]}function Ts(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Xi(e,t,n,r){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Xn(r)},...o&&{trace:me({...o})}}}function dl(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 fl(e,t,n,r){const o=Ts(n);return Dt({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Xn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}function pl(e,t,n,r){const o=Ts(n),s=e.type&&"replay_event"!==e.type?e.type:"event";dl(e,n&&n.sdk);const i=Xi(e,o,r,t);return delete e.sdkProcessingMetadata,Dt(i,[[{type:s},e]])}function Wr(e,t,n,r=0){return new we(((o,s)=>{const i=e[r];if(null===t||"function"!=typeof i)o(t);else{const a=i({...t},n);X&&i.id&&null===a&&R.log(`Event processor "${i.id}" dropped event`),Gn(a)?a.then((t=>Wr(e,t,n,r+1).then(o))).then(null,s):Wr(e,a,n,r+1).then(o).then(null,s)}}))}let un,Eo,ln;function hl(e){const t=B._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return ln&&n.length===Eo||(Eo=n.length,ln=n.reduce(((n,r)=>{un||(un={});const o=un[r];if(o)n[o[0]]=o[1];else{const o=e(r);for(let e=o.length-1;e>=0;e--){const s=o[e],i=s&&s.filename,a=t[r];if(i&&a){n[i]=a,un[r]=[i,a];break}}}return n}),{})),ln}function ml(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;gl(e,t),r&&Sl(e,r),El(e,n),_l(e,o),yl(e,s)}function bo(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:f}=t;dn(e,"extra",n),dn(e,"tags",r),dn(e,"user",o),dn(e,"contexts",s),e.sdkProcessingMetadata=Vn(e.sdkProcessingMetadata,a,2),i&&(e.level=i),h&&(e.transactionName=h),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function dn(e,t,n){e[t]=Vn(e[t],n,1)}function gl(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t,c=me(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=me(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const l=me(o);l&&Object.keys(l).length&&(e.user={...l,...e.user});const d=me(s);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),i&&(e.level=i),a&&"transaction"!==e.type&&(e.transaction=a)}function _l(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function yl(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Sl(e,t){e.contexts={trace:Bu(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Yi(t),...e.sdkProcessingMetadata};const n=Bt(ks(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}function El(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Ji(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ye(),timestamp:t.timestamp||Jt()},u=n.integrations||e.integrations.map((e=>e.name));bl(c,e),kl(c,u),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&vl(c,e.stackParser);const l=Tl(r,n.captureContext);n.mechanism&&wt(c,n.mechanism);const d=o?o.getEventProcessors():[],p=Iu().getScopeData();if(s){bo(p,s.getScopeData())}if(l){bo(p,l.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),ml(c,p);return Wr([...d,...p.eventProcessors],c,n).then((e=>(e&&wl(e),"number"==typeof i&&i>0?Il(e,i,a):e)))}function bl(e,t){const{environment:n,release:r,dist:o,maxValueLength:s=250}=t;e.environment=e.environment||n||Is,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o),e.message&&(e.message=bt(e.message,s));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=bt(i.value,s));const a=e.request;a&&a.url&&(a.url=bt(a.url,s))}function vl(e,t){const n=hl(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}function wl(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch{}if(0===Object.keys(t).length)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((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}function kl(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Il(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:Te(e.data,t,n)}})))},...e.user&&{user:Te(e.user,t,n)},...e.contexts&&{contexts:Te(e.contexts,t,n)},...e.extra&&{extra:Te(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Te(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:Te(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Te(e.contexts.flags,3,n)),r}function Tl(e,t){if(!t)return e;const n=e?e.clone():new ct;return n.update(t),n}function Cs(e,t){return ve().captureException(e,void 0)}function Cl(e,t){const n={captureContext:t};return ve().captureMessage(e,void 0,n)}function Qi(e,t){return ve().captureEvent(e,t)}function Zi(e,t){De().setContext(e,t)}function Rl(e,t){De().setExtra(e,t)}function Ml(e){De().setUser(e)}function xl(e){De().addEventProcessor(e)}function vo(e){const t=ae(),n=De(),r=ve(),{release:o,environment:s=Is}=t&&t.getOptions()||{},{userAgent:i}=B.navigator||{},a=mu({release:o,environment:s,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&"ok"===c.status&&kt(c,{status:"exited"}),ea(),n.setSession(a),r.setSession(a),a}function ea(){const e=De(),t=ve(),n=t.getSession()||e.getSession();n&&gu(n),ta(),e.setSession(),t.setSession()}function ta(){const e=De(),t=ve(),n=ae(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function wo(e=!1){e?ea():ta()}const Ol="7";function Al(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Dl(e){return`${Al(e)}${e.projectId}/envelope/`}function Nl(e,t){const n={sentry_version:Ol};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Pl(e,t,n){return t||`${Dl(e)}?${Nl(e,n)}`}const ko=[];function Ll(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}function Fl(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;const o=Ll(r),s=o.findIndex((e=>"Debug"===e.name));if(s>-1){const[e]=o.splice(s,1);o.push(e)}return o}function Ul(e,t){const n={};return t.forEach((t=>{t&&na(e,t,n)})),n}function Io(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function na(e,t,n){if(n[t.name])X&&R.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===ko.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),ko.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}X&&R.log(`Integration installed: ${t.name}`)}}function $l(e,t,n){return Dt(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:Jt(),discarded_events:e}]])}class xe extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}const To="Not capturing exception because it's already been captured.";class Bl{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=el(e.dsn):X&&R.warn("No DSN provided, client will not send events."),this._dsn){const t=Pl(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find((t=>t in e&&null==e[t]));t&&Qe((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,n){const r=ye();if(uo(e))return X&&R.log(To),r;const o={event_id:r,...t};return this._process(this.eventFromException(e,o).then((e=>this._captureEvent(e,o,n)))),o.event_id}captureMessage(e,t,n,r){const o={event_id:ye(),...n},s=Ss(e)?e:String(e),i=Es(e)?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(i.then((e=>this._captureEvent(e,o,r)))),o.event_id}captureEvent(e,t,n){const r=ye();if(t&&t.originalException&&uo(t.originalException))return X&&R.log(To),r;const o={event_id:r,...t},s=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,o,s||n)),o.event_id}captureSession(e){"string"!=typeof e.release?X&&R.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),kt(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):je(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];na(this,e,this._integrations),t||Io(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=pl(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=il(n,ul(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=fl(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,o=`${e}:${t}`;X&&R.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(X&&R.error("Error while sending envelope:",e),e))):(X&&R.error("Transport disabled"),je({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=Ul(this,e),Io(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1;const o=t.exception&&t.exception.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(kt(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new we((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n=ve(),r=De()){const o=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s.length>0&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Ji(o,e,t,n,this,r).then((e=>{if(null===e)return e;e.contexts={trace:Cu(n),...e.contexts};const t=Ku(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(X){const t=e;"log"===t.logLevel?R.log(t.message):R.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r,s=sa(e),i=ra(e),a=e.type||"error",c=`before send for type \`${a}\``,u=typeof o>"u"?void 0:Br(o);if(i&&"number"==typeof u&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",e),Mn(new xe(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const l="replay_event"===a?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new xe("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;return jl(Hl(this,r,n,t),c)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",l,e),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new xe(`${c} returned \`null\`, will not send event.`,"log")}const o=n&&n.getSession();if(!s&&o&&this._updateSessionFromEvent(o,r),s){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const i=r.transaction_info;if(s&&i&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...i,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{throw e instanceof xe?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new xe(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){X&&R.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(X&&R.log("No outcomes to send"));if(!this._dsn)return void(X&&R.log("No dsn provided, will not send outcomes"));X&&R.log("Sending outcomes:",e);const t=$l(e,this._options.tunnel&&Xn(this._dsn));this.sendEnvelope(t)}}function jl(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Gn(e))return e.then((e=>{if(!vt(e)&&null!==e)throw new xe(n);return e}),(e=>{throw new xe(`${t} rejected with ${e}`)}));if(!vt(e)&&null!==e)throw new xe(n);return e}function Hl(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i}=t;if(ra(n)&&o)return o(n,r);if(sa(n)){if(n.spans&&i){const t=[];for(const r of n.spans){const n=i(r);n?t.push(n):(Gu(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(s){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return s(n,r)}}return n}function ra(e){return void 0===e.type}function sa(e){return"transaction"===e.type}function Wl(e,t){!0===t.debug&&(X?R.enable():Qe((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))),ve().update(t.initialScope);const n=new e(t);return zl(n),n.init(),n}function zl(e){ve().setClient(e)}function ql(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return Mn(new xe("Not adding Promise because buffer limit was reached."));const o=r();return-1===t.indexOf(o)&&t.push(o),o.then((()=>n(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(e){return new we(((n,r)=>{let o=t.length;if(!o)return n(!0);const s=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{je(e).then((()=>{--o||(clearTimeout(s),n(!0))}),r)}))}))}}}const Gl=6e4;function Yl(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?Gl:r-t}function Vl(e,t){return e[t]||e.all||0}function oa(e,t,n=Date.now()){return Vl(e,t)>n}function ia(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},s=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n,,,s]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!s||s.split(";").includes("custom"))&&(o[e]=r+a):o[e]=r+a;else o.all=r+a}else i?o.all=r+Yl(i,r):429===t&&(o.all=r+6e4);return o}const Kl=64;function Xl(e,t,n=ql(e.bufferSize||64)){let r={};return{send:function(o){const s=[];if(yo(o,((t,n)=>{const o=So(n);if(oa(r,o)){const r=Co(t,n);e.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(t)})),0===s.length)return je({});const i=Dt(o[0],s),a=t=>{yo(i,((n,r)=>{const o=Co(n,r);e.recordDroppedEvent(t,So(r),o)}))};return n.add((()=>t({body:al(i)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&X&&R.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=ia(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof xe)return X&&R.error("Skipped sending event because buffer is full."),a("queue_overflow"),je({});throw e}))},flush:e=>n.drain(e)}}function Co(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Jl(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Zl(e,n)||Ql(e,r)}function Ql(e,t){return!!t&&Ro(e)===Ro(t)}function Zl(e,t){return!!t&&e.includes(t.host)}function Ro(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function aa(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:st}))),version:st}),e._metadata=o}const ed=100;function Ke(e,t){const n=ae(),r=De();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=ed}=n.getOptions();if(s<=0)return;const i={timestamp:Jt(),...e},a=o?Qe((()=>o(i,t))):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}let Mo;const td="FunctionToString",xo=new WeakMap,nd=()=>({name:td,setupOnce(){Mo=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=vs(this),n=xo.has(ae())&&void 0!==t?t:this;return Mo.apply(n,e)}}catch{}},setup(e){xo.set(e,!0)}}),rd=nd,sd=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],od="InboundFilters",id=(e={})=>({name:od,processEvent(t,n,r){const o=r.getOptions();return ud(t,cd(e,o))?null:t}}),ad=id;function cd(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:sd],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}function ud(e,t){return t.ignoreInternal&&md(e)?(X&&R.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${We(e)}`),!0):ld(e,t.ignoreErrors)?(X&&R.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${We(e)}`),!0):_d(e)?(X&&R.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${We(e)}`),!0):dd(e,t.ignoreTransactions)?(X&&R.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${We(e)}`),!0):fd(e,t.denyUrls)?(X&&R.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${We(e)}.\nUrl: ${xn(e)}`),!0):!pd(e,t.allowUrls)&&(X&&R.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${We(e)}.\nUrl: ${xn(e)}`),!0)}function ld(e,t){return!(e.type||!t||!t.length)&&hd(e).some((e=>Xt(e,t)))}function dd(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Xt(n,t)}function fd(e,t){if(!t||!t.length)return!1;const n=xn(e);return!!n&&Xt(n,t)}function pd(e,t){if(!t||!t.length)return!0;const n=xn(e);return!n||Xt(n,t)}function hd(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function md(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}function gd(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}function xn(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?gd(t):null}catch{return X&&R.error(`Cannot extract url for event ${We(e)}`),null}}function _d(e){return!(e.type||!e.exception||!e.exception.values||0===e.exception.values.length)&&(!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)))}function yd(e,t,n=250,r,o,s,i){if(!(s.exception&&s.exception.values&&i&&it(i.originalException,Error)))return;const a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=Sd(zr(e,t,o,i.originalException,r,s.exception.values,a,0),n))}function zr(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(it(r[o],Error)){Oo(i,a);const s=e(t,r[o]),u=c.length;Ao(s,o,u,a),c=zr(e,t,n,r[o],o,[s,...c],s,u)}return Array.isArray(r.errors)&&r.errors.forEach(((r,s)=>{if(it(r,Error)){Oo(i,a);const u=e(t,r),l=c.length;Ao(u,`errors[${s}]`,l,a),c=zr(e,t,n,r,o,[u,...c],u,l)}})),c}function Oo(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function Ao(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 Sd(e,t){return e.map((e=>(e.value&&(e.value=bt(e.value,t)),e)))}function Er(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 Ed(e){const t="console";dt(t,e),ft(t,bd)}function bd(){"console"in B&&Nr.forEach((function(e){e in B.console&&he(B.console,e,(function(t){return Rn[e]=t,function(...t){Me("console",{args:t,level:e});const n=Rn[e];n&&n.apply(B.console,t)}}))}))}function ca(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const vd="Dedupe",wd=()=>{let e;return{name:vd,processEvent(t){if(t.type)return t;try{if(kd(t,e))return X&&R.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},ua=wd;function kd(e,t){return!!t&&!(!Id(e,t)&&!Td(e,t))}function Id(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!da(e,t)||!la(e,t))}function Td(e,t){const n=Do(t),r=Do(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&da(e,t)&&la(e,t))}function la(e,t){let n=ro(e),r=ro(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],o=n[e];if(t.filename!==o.filename||t.lineno!==o.lineno||t.colno!==o.colno||t.function!==o.function)return!1}return!0}function da(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Do(e){return e.exception&&e.exception.values&&e.exception.values[0]}function fa(e){if(void 0!==e)return e>=400&&e<500?"warning":e>=500?"error":void 0}const qr=B;function pa(){if(!("fetch"in qr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Gr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Cd(){if("string"==typeof EdgeRuntime)return!0;if(!pa())return!1;if(Gr(qr.fetch))return!0;let e=!1;const t=qr.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Gr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){lt&&R.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}function Rd(e,t){const n="fetch";dt(n,e),ft(n,(()=>Md(void 0,t)))}function Md(e,t=!1){t&&!Cd()||he(B,"fetch",(function(e){return function(...t){const n=new Error,{method:r,url:o}=xd(t),s={args:t,fetchData:{method:r,url:o},startTimestamp:1e3*Ue(),virtualError:n};return Me("fetch",{...s}),e.apply(B,t).then((async e=>(Me("fetch",{...s,endTimestamp:1e3*Ue(),response:e}),e)),(e=>{throw Me("fetch",{...s,endTimestamp:1e3*Ue(),error:e}),ys(e)&&void 0===e.stack&&(e.stack=n.stack,at(e,"framesToPop",1)),e}))}}))}function Yr(e,t){return!!e&&"object"==typeof e&&!!e[t]}function No(e){return"string"==typeof e?e:e?Yr(e,"url")?e.url:e.toString?e.toString():"":""}function xd(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:No(t),method:Yr(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:No(t),method:Yr(t,"method")?String(t.method).toUpperCase():"GET"}}function Od(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Ad(){return"npm"}function Dd(){return!Od()&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function Po(){return typeof window<"u"&&(!Dd()||Nd())}function Nd(){const e=B.process;return!!e&&"renderer"===e.type}const fn=B;function Pd(){const e=fn.chrome,t=e&&e.app&&e.app.runtime,n="history"in fn&&!!fn.history.pushState&&!!fn.history.replaceState;return!t&&n}function Ld(e,t){return e??t()}function kn(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],s=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=s(n)):("call"===o||"optionalCall"===o)&&(n=s(((...e)=>n.call(t,...e))),t=void 0)}return n}const J=B;let Vr=0;function ha(){return Vr>0}function Fd(){Vr++,setTimeout((()=>{Vr--}))}function Tt(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(vs(e))return e}catch{return e}const n=function(...n){try{const r=n.map((e=>Tt(e,t)));return e.apply(this,r)}catch(e){throw Fd(),Tu((r=>{r.addEventProcessor((e=>(t.mechanism&&(Lr(e,void 0),wt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),Cs(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Bi(n,e),at(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const Qt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Rs(e,t){const n=Ms(e,t),r={type:Hd(t),value:Wd(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ud(e,t,n,r){const o=ae(),s=o&&o.getOptions().normalizeDepth,i=Vd(t),a={__serialized__:Ki(t,s)};if(i)return{exception:{values:[Rs(e,i)]},extra:a};const c={exception:{values:[{type:qn(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Gd(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Ms(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function br(e,t){return{exception:{values:[Rs(e,t)]}}}function Ms(e,t){const n=t.stacktrace||t.stack||"",r=Bd(t),o=jd(t);try{return e(n,r,o)}catch{}return[]}const $d=/Minified React error #\d+;/i;function Bd(e){return e&&$d.test(e.message)?1:0}function jd(e){return"number"==typeof e.framesToPop?e.framesToPop:0}function ma(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"&&e instanceof WebAssembly.Exception}function Hd(e){const t=e&&e.name;return!t&&ma(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Wd(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:ma(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function zd(e,t,n,r){const o=xs(e,t,n&&n.syntheticException||void 0,r);return wt(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),je(o)}function qd(e,t,n="info",r,o){const s=Kr(e,t,r&&r.syntheticException||void 0,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),je(s)}function xs(e,t,n,r,o){let s;if(Fi(t)&&t.error)return br(e,t.error);if(oo(t)||nu(t)){const o=t;if("stack"in t)s=br(e,t);else{const t=o.name||(oo(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Kr(e,i,n,r),Lr(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return ys(t)?br(e,t):vt(t)||qn(t)?(s=Ud(e,t,n,o),wt(s,{synthetic:!0}),s):(s=Kr(e,t,n,r),Lr(s,`${t}`),wt(s,{synthetic:!0}),s)}function Kr(e,t,n,r){const o={};if(r&&n){const r=Ms(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),wt(o,{synthetic:!0})}if(Ss(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Gd(e,{isUnhandledRejection:t}){const n=lu(e),r=t?"promise rejection":"exception";return Fi(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:qn(e)?`Event \`${Yd(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Yd(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Vd(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function Kd(e,{metadata:t,tunnel:n,dsn:r}){return Dt({event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Xn(r)}},[Xd(e)])}function Xd(e){return[{type:"user_report"},e]}class Jd extends Bl{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};aa(t,"browser",["browser"],J.SENTRY_SDK_SOURCE||Ad()),super(t),t.sendClientReports&&J.document&&J.document.addEventListener("visibilitychange",(()=>{"hidden"===J.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return zd(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return qd(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Qt&&R.warn("SDK not enabled, will not capture user feedback."));const t=Kd(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const ga=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qd=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Zt=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o||0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=Qd(t.value,n),e(t)))}},L=B,Zd=()=>`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,_a=(e=!0)=>{const t=L.performance&&L.performance.getEntriesByType&&L.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Os=()=>{const e=_a();return e&&e.activationStart||0},en=(e,t)=>{const n=_a();let r="navigate";return n&&(L.document&&L.document.prerendering||Os()>0?r="prerender":L.document&&L.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Zd(),navigationType:r}},pt=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},tn=e=>{const t=t=>{("pagehide"===t.type||L.document&&"hidden"===L.document.visibilityState)&&e(t)};L.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Jn=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Pt=-1;const ef=()=>"hidden"!==L.document.visibilityState||L.document.prerendering?1/0:0,On=e=>{"hidden"===L.document.visibilityState&&Pt>-1&&(Pt="visibilitychange"===e.type?e.timeStamp:0,nf())},tf=()=>{addEventListener("visibilitychange",On,!0),addEventListener("prerenderingchange",On,!0)},nf=()=>{removeEventListener("visibilitychange",On,!0),removeEventListener("prerenderingchange",On,!0)},As=()=>(L.document&&Pt<0&&(Pt=ef(),tf()),{get firstHiddenTime(){return Pt}}),Qn=e=>{L.document&&L.document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},rf=[1800,3e3],sf=(e,t={})=>{Qn((()=>{const n=As(),r=en("FCP");let o;const s=pt("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(s.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Os(),0),r.entries.push(e),o(!0)))}))}));s&&(o=Zt(e,r,rf,t.reportAllChanges))}))},of=[.1,.25],af=(e,t={})=>{sf(Jn((()=>{const n=en("CLS",0);let r,o=0,s=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=s[0],n=s[s.length-1];o&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,s.push(e)):(o=e.value,s=[e])}})),o>n.value&&(n.value=o,n.entries=s,r())},a=pt("layout-shift",i);a&&(r=Zt(e,n,of,t.reportAllChanges),tn((()=>{i(a.takeRecords()),r(!0)})),setTimeout(r,0))})))},cf=[100,300],uf=(e,t={})=>{Qn((()=>{const n=As(),r=en("FID");let o;const s=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),o(!0))},i=e=>{e.forEach(s)},a=pt("first-input",i);o=Zt(e,r,cf,t.reportAllChanges),a&&tn(Jn((()=>{i(a.takeRecords()),a.disconnect()})))}))};let ya=0,vr=1/0,pn=0;const lf=e=>{e.forEach((e=>{e.interactionId&&(vr=Math.min(vr,e.interactionId),pn=Math.max(pn,e.interactionId),ya=pn?(pn-vr)/7+1:0)}))};let Xr;const df=()=>Xr?ya:performance.interactionCount||0,ff=()=>{"interactionCount"in performance||Xr||(Xr=pt("event",lf,{type:"event",buffered:!0,durationThreshold:0}))},Le=[],wr=new Map,pf=40;let hf=0;const mf=()=>df()-hf,gf=()=>{const e=Math.min(Le.length-1,Math.floor(mf()/50));return Le[e]},kr=10,_f=[],yf=e=>{if(_f.forEach((t=>t(e))),!e.interactionId&&"first-input"!==e.entryType)return;const t=Le[Le.length-1],n=wr.get(e.interactionId);if(n||Le.length<10||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};wr.set(t.id,t),Le.push(t)}Le.sort(((e,t)=>t.latency-e.latency)),Le.length>10&&Le.splice(10).forEach((e=>wr.delete(e.id)))}},Sa=e=>{const t=L.requestIdleCallback||L.setTimeout;let n=-1;return e=Jn(e),L.document&&"hidden"===L.document.visibilityState?e():(n=t(e),tn(e)),n},Sf=[200,500],Ef=(e,t={})=>{"PerformanceEventTiming"in L&&"interactionId"in PerformanceEventTiming.prototype&&Qn((()=>{ff();const n=en("INP");let r;const o=e=>{Sa((()=>{e.forEach(yf);const t=gf();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())}))},s=pt("event",o,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=Zt(e,n,Sf,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),tn((()=>{o(s.takeRecords()),r(!0)})))}))},bf=[2500,4e3],Lo={},vf=(e,t={})=>{Qn((()=>{const n=As(),r=en("LCP");let o;const s=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach((e=>{e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Os(),0),r.entries=[e],o())}))},i=pt("largest-contentful-paint",s);if(i){o=Zt(e,r,bf,t.reportAllChanges);const n=Jn((()=>{Lo[r.id]||(s(i.takeRecords()),i.disconnect(),Lo[r.id]=!0,o(!0))}));["keydown","click"].forEach((e=>{L.document&&addEventListener(e,(()=>Sa(n)),{once:!0,capture:!0})})),tn(n)}}))},Lt={},An={};let Ea,ba,va,wa;function wf(e,t=!1){return Zn("cls",e,Rf,Ea,t)}function kf(e,t=!1){return Zn("lcp",e,xf,va,t)}function If(e){return Zn("fid",e,Mf,ba)}function Tf(e){return Zn("inp",e,Of,wa)}function Cf(e,t){return ka(e,t),An[e]||(Af(e),An[e]=!0),Ia(e,t)}function nn(e,t){const n=Lt[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){ga&&R.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Be(r)}\nError:`,t)}}function Rf(){return af((e=>{nn("cls",{metric:e}),Ea=e}),{reportAllChanges:!0})}function Mf(){return uf((e=>{nn("fid",{metric:e}),ba=e}))}function xf(){return vf((e=>{nn("lcp",{metric:e}),va=e}),{reportAllChanges:!0})}function Of(){return Ef((e=>{nn("inp",{metric:e}),wa=e}))}function Zn(e,t,n,r,o=!1){let s;return ka(e,t),An[e]||(s=n(),An[e]=!0),r&&t({metric:r}),Ia(e,t,o?s:void 0)}function Af(e){const t={};"event"===e&&(t.durationThreshold=0),pt(e,(t=>{nn(e,{entries:t})}),t)}function ka(e,t){Lt[e]=Lt[e]||[],Lt[e].push(t)}function Ia(e,t,n){return()=>{n&&n();const r=Lt[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}const Df=1e3;let Fo,Jr,Qr,hn;function Ta(e){dt("dom",e),ft("dom",Nf)}function Nf(){if(!L.document)return;const e=Me.bind(null,"dom"),t=Uo(e,!0);L.document.addEventListener("click",t,!1),L.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=L[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(he(r,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=Uo(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch{}return t.call(this,n,r,o)}})),he(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function Pf(e){if(e.type!==Jr)return!1;try{if(!e.target||e.target._sentryId!==Qr)return!1}catch{}return!0}function Lf(e,t){return"keypress"===e&&(!t||!t.tagName||!("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}function Uo(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Ff(n);if(Lf(n.type,r))return;at(n,"_sentryCaptured",!0),r&&!r._sentryId&&at(r,"_sentryId",ye());const o="keypress"===n.type?"input":n.type;Pf(n)||(e({event:n,name:o,global:t}),Jr=n.type,Qr=r?r._sentryId:void 0),clearTimeout(Fo),Fo=L.setTimeout((()=>{Qr=void 0,Jr=void 0}),Df)}}function Ff(e){try{return e.target}catch{return null}}function Ds(e){const t="history";dt(t,e),ft(t,Uf)}function Uf(){if(!Pd())return;const e=L.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=hn,t=String(n);hn=t,Me("history",{from:e,to:t})}return e.apply(this,t)}}L.onpopstate=function(...t){const n=L.location.href,r=hn;if(hn=n,Me("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},he(L.history,"pushState",t),he(L.history,"replaceState",t)}const In={};function Ca(e){const t=In[e];if(t)return t;let n=L[e];if(Gr(n))return In[e]=n.bind(L);const r=L.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){ga&&R.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(In[e]=n.bind(L))}function $o(e){In[e]=void 0}function Ct(...e){return Ca("setTimeout")(...e)}const gt="__sentry_xhr_v3__";function $f(e){dt("xhr",e),ft("xhr",Bf)}function Bf(){if(!L.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*Ue(),s=Fe(n[0])?n[0].toUpperCase():void 0,i=jf(n[1]);if(!s||!i)return e.apply(t,n);t[gt]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[gt];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}Me("xhr",{endTimestamp:1e3*Ue(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,s=t[gt];return s&&Fe(r)&&Fe(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[gt];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return Me("xhr",{startTimestamp:1e3*Ue(),xhr:t}),e.apply(t,n)}})}function jf(e){if(Fe(e))return e;try{return e.toString()}catch{}}function Hf(e,t=Ca("fetch")){let n=0,r=0;return Xl(e,(function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return $o("fetch"),Mn("No fetch implementation available");try{return t(e.url,i).then((e=>(n-=s,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return $o("fetch"),n-=s,r--,Mn(e)}}))}const Wf=30,zf=50;function Zr(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?ot:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const qf=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Gf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yf=/\((\S*)(?::(\d+))(?::(\d+))\)/,Vf=e=>{const t=qf.exec(e);if(t){const[,e,n,r]=t;return Zr(e,ot,+n,+r)}const n=Gf.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Yf.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Ra(n[1]||ot,n[2]);return Zr(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Kf=[30,Vf],Xf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Jf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Qf=e=>{const t=Xf.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Jf.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||ot;return[n,e]=Ra(n,e),Zr(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Zf=[50,Qf],ep=[Kf,Zf],tp=Pi(...ep),Ra=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:ot,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},mn=1024,np="Breadcrumbs",rp=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:np,setup(e){t.console&&Ed(ap(e)),t.dom&&Ta(ip(e,t.dom)),t.xhr&&$f(cp(e)),t.fetch&&Rd(up(e)),t.history&&Ds(lp(e)),t.sentry&&e.on("beforeSendEvent",op(e))}}},sp=rp;function op(e){return function(t){ae()===e&&Ke({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:We(t)},{event:t})}}function ip(e,t){return function(n){if(ae()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>mn&&(Qt&&R.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=mn),"string"==typeof s&&(s=[s]);try{const e=n.event,t=dp(e)?e.target:e;r=Yn(t,{keyAttrs:s,maxStringLength:i}),o=cu(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),Ke(a,{event:n.event,name:n.name,global:n.global})}}function ap(e){return function(t){if(ae()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:ca(t.level),message:io(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${io(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Ke(n,{input:t.args,level:t.level})}}function cp(e){return function(t){if(ae()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[gt];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,u={method:s,url:i,status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};Ke({category:"xhr",data:u,type:"http",level:fa(a)},l)}}function up(e){return function(t){if(ae()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Ke({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response,o={...t.fetchData,status_code:e&&e.status},s={input:t.args,response:e,startTimestamp:n,endTimestamp:r};Ke({category:"fetch",data:o,type:"http",level:fa(o.status_code)},s)}}}function lp(e){return function(t){if(ae()!==e)return;let n=t.from,r=t.to;const o=Er(J.location.href);let s=n?Er(n):void 0;const i=Er(r);(!s||!s.path)&&(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),Ke({category:"navigation",data:{from:n,to:r}})}}function dp(e){return!!e&&!!e.target}const fp=["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"],pp="BrowserApiErrors",hp=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:pp,setupOnce(){t.setTimeout&&he(J,"setTimeout",Bo),t.setInterval&&he(J,"setInterval",Bo),t.requestAnimationFrame&&he(J,"requestAnimationFrame",mp),t.XMLHttpRequest&&"XMLHttpRequest"in J&&he(XMLHttpRequest.prototype,"send",gp);const e=t.eventTarget;e&&(Array.isArray(e)?e:fp).forEach(_p)}}},Ma=hp;function Bo(e){return function(...t){const n=t[0];return t[0]=Tt(n,{mechanism:{data:{function:Be(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function mp(e){return function(t){return e.apply(this,[Tt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Be(e)},handled:!1,type:"instrument"}})])}}function gp(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&he(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Be(t)},handled:!1,type:"instrument"}},r=vs(t);return r&&(n.mechanism.data.handler=Be(r)),Tt(t,n)}))})),e.apply(this,t)}}function _p(e){const t=J[e],n=t&&t.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(he(n,"addEventListener",(function(t){return function(n,r,o){try{yp(r)&&(r.handleEvent=Tt(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Be(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,Tt(r,{mechanism:{data:{function:"addEventListener",handler:Be(r),target:e},handled:!1,type:"instrument"}}),o])}})),he(n,"removeEventListener",(function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,n,r)}})))}function yp(e){return"function"==typeof e.handleEvent}const Sp=()=>({name:"BrowserSession",setupOnce(){typeof J.document>"u"?Qt&&R.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(vo({ignoreDuration:!0}),wo(),Ds((({from:e,to:t})=>{void 0!==e&&e!==t&&(vo({ignoreDuration:!0}),wo())})))}}),Ep="GlobalHandlers",bp=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ep,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(wp(e),jo("onerror")),t.onunhandledrejection&&(kp(e),jo("onunhandledrejection"))}}},vp=bp;function wp(e){Qc((t=>{const{stackParser:n,attachStacktrace:r}=xa();if(ae()!==e||ha())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=Cp(xs(n,c||o,void 0,r,!1),s,i,a);u.level="error",Qi(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})}))}function kp(e){eu((t=>{const{stackParser:n,attachStacktrace:r}=xa();if(ae()!==e||ha())return;const o=Ip(t),s=Es(o)?Tp(o):xs(n,o,void 0,r,!0);s.level="error",Qi(s,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}function Ip(e){if(Es(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 Tp(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Cp(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,l=n,d=Fe(t)&&t.length>0?t:$i();return 0===c.length&&c.push({colno:u,filename:d,function:ot,in_app:!0,lineno:l}),e}function jo(e){Qt&&R.log(`Global Handler attached: ${e}`)}function xa(){const e=ae();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Rp=()=>({name:"HttpContext",preprocessEvent(e){if(!J.navigator&&!J.location&&!J.document)return;const t=e.request&&e.request.url||J.location&&J.location.href,{referrer:n}=J.document||{},{userAgent:r}=J.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...e.request,...t&&{url:t},headers:o};e.request=s}}),Mp="cause",xp=5,Op="LinkedErrors",Ap=(e={})=>{const t=e.limit||5,n=e.key||Mp;return{name:Op,preprocessEvent(e,r,o){const s=o.getOptions();yd(Rs,s.stackParser,s.maxValueLength,n,t,e,r)}}},Dp=Ap;function Np(e){const t=[ad(),rd(),Ma(),sp(),vp(),Dp(),ua(),Rp()];return!1!==e.autoSessionTracking&&t.push(Sp()),t}function Pp(e={}){const t={defaultIntegrations:Np(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:J.SENTRY_RELEASE&&J.SENTRY_RELEASE.id?J.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}function Lp(){const e=typeof J.window<"u"&&J;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,r=J.location&&J.location.href||"",o=!!n&&J===J.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>r.startsWith(`${e}//`))),s=typeof e.nw<"u";return!!n&&!o&&!s}function Fp(e={}){const t=Pp(e);if(!t.skipBrowserExtensionCheck&&Lp())return void Qe((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));Qt&&(pa()||R.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:Xc(t.stackParser||tp),integrations:Fl(t),transport:t.transport||Hf};return Wl(Jd,n)}const te=B,Ns="sentryReplaySession",Up="replay_event",Ps="Unable to send Replay",$p=3e5,Bp=9e5,jp=5e3,Hp=5500,Wp=6e4,zp=5e3,qp=3,Ho=15e4,gn=5e3,Gp=3e3,Yp=300,Ls=2e7,Vp=4999,Kp=15e3,Wo=36e5;function es(e,t){return e??t()}function jt(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],s=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=s(n)):("call"===o||"optionalCall"===o)&&(n=s(((...e)=>n.call(t,...e))),t=void 0)}return n}var ue;function Xp(e){return e.nodeType===e.ELEMENT_NODE}function Ft(e){const t=jt([e,"optionalAccess",e=>e.host]);return jt([t,"optionalAccess",e=>e.shadowRoot])===e}function Ut(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Jp(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 Qp(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 Dn(e){try{const t=e.rules||e.cssRules;return t?Jp(Array.from(t,Oa).join("")):null}catch{return null}}function Zp(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}function Oa(e){let t;if(th(e))try{t=Dn(e.styleSheet)||Qp(e)}catch{}else if(nh(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=Zp(e)),n&&(t=eh(t)),n||r)return t}return t||e.cssText}function eh(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function th(e){return"styleSheet"in e}function nh(e){return"selectorText"in e}!function(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"}(ue||(ue={}));class Aa{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return es(jt([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),(()=>-1))}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function rh(){return new Aa}function er({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function Ht({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function Rt(e){return e.toLowerCase()}function ts(e){return e.toUpperCase()}const zo="__rrweb_original__";function sh(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const o=t.getImageData,s=zo in o?o[zo]:o;if(new Uint32Array(s.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0}function Fs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Rt(t):null}function Nn(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Da(e,t){let n;try{n=new URL(e,es(t,(()=>window.location.href)))}catch{return null}return es(jt([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),(()=>null))}const qo={};function Na(e){const t=qo[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch{}return qo[e]=r.bind(window)}function ns(...e){return Na("setTimeout")(...e)}function Pa(...e){return Na("clearTimeout")(...e)}function La(e){try{return e.contentDocument}catch{}}let oh=1;const ih=new RegExp("[^a-z0-9-_:]"),Wt=-2;function Us(){return oh++}function ah(e){if(e instanceof HTMLFormElement)return"form";const t=Rt(e.tagName);return ih.test(t)?"div":t}function ch(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}let ht,Go;const uh=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,lh=/^(?:[a-z+]+:)?\/\//i,dh=/^www\..*/i,fh=/^(data:)([^,]*),(.*)/i;function Pn(e,t){return(e||"").replace(uh,((e,n,r,o,s,i)=>{const a=r||s||i,c=n||o||"";if(!a)return e;if(lh.test(a)||dh.test(a))return`url(${c}${a}${c})`;if(fh.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${ch(t)+a}${c})`;const u=t.split("/"),l=a.split("/");u.pop();for(const e of l)"."!==e&&(".."===e?u.pop():u.push(e));return`url(${c}${u.join("/")}${c})`}))}const ph=/^[^ \t\n\r\u000c]+/,hh=/^[, \t\n\r\u000c]+/;function mh(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(hh),!(n>=t.length);){let s=r(ph);if(","===s.slice(-1))s=_t(e,s.substring(0,s.length-1)),o.push(s);else{let r="";s=_t(e,s);let i=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((s+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,o.push((s+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return o.join(", ")}const Yo=new WeakMap;function _t(e,t){return t&&""!==t.trim()?tr(e,t):t}function gh(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function tr(e,t){let n=Yo.get(e);if(n||(n=e.createElement("a"),Yo.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Fa(e,t,n,r,o,s){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&("table"===t||"td"===t||"th"===t)?_t(e,r):"srcset"===n?mh(e,r):"style"===n?Pn(r,tr(e)):"object"===t&&"data"===n?_t(e,r):"function"==typeof s?s(n,r,o):r)}function Ua(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function _h(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function yh(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function rt(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:rt(e.parentNode,t,n,r+1)}function yt(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(yh(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function Mt(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(s){if(c=rt(i,yt(r,o)),c<0)return!0;a=rt(i,yt(t,n),c>=0?c:1/0)}else{if(a=rt(i,yt(t,n)),a<0)return!1;c=rt(i,yt(r,o),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!s}catch{}return!!s}function Sh(e,t,n){const r=e.contentWindow;if(!r)return;let o,s=!1;try{o=r.document.readyState}catch{return}if("complete"!==o){const r=ns((()=>{s||(t(),s=!0)}),n);return void e.addEventListener("load",(()=>{Pa(r),s=!0,t()}))}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return ns(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Eh(e,t,n){let r,o=!1;try{r=e.sheet}catch{return}if(r)return;const s=ns((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{Pa(s),o=!0,t()}))}function bh(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:f={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1}=t,k=vh(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:ue.Document,childNodes:[],compatMode:e.compatMode}:{type:ue.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ue.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return kh(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:f,maskInputFn:y,dataURLOptions:g,inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:k,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return wh(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:f,maskInputFn:y,rootId:k});case e.CDATA_SECTION_NODE:return{type:ue.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:ue.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function vh(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}function wh(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,f="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||jt([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=Dn(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=Pn(p,tr(t.doc))}f&&(p="SCRIPT_PLACEHOLDER");const y=Mt(e,r,s,o,i,n);if(!h&&!f&&!m&&p&&y&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),m&&p&&(c.textarea||y)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p){p=Ht({isMasked:Mt(e,r,s,o,i,er({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:u})}return{type:ue.Text,textContent:p||"",isStyle:h,rootId:l}}function kh(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m,maskAllText:y,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:b}=t,S=_h(e,r,o,s),k=ah(e);let w={};const E=e.attributes.length;for(let t=0;t<E;t++){const r=e.attributes[t];r.name&&!Ua(k,r.name,r.value)&&(w[r.name]=Fa(n,k,Rt(r.name),r.value,e,c))}if("link"===k&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=Dn(t)),r&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=Pn(r,t.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=Dn(e.sheet);t&&(w._cssText=Pn(t,tr(n)))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const t=e,n=Fs(t),r=Nn(t,ts(k),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=Mt(t,g,v,_,b,er({type:n,tagName:ts(k),maskInputOptions:a}));w.value=Ht({isMasked:e,element:t,value:r,maskInputFn:u})}o&&(w.checked=o)}if("option"===k&&(e.selected&&!a.select?w.selected=!0:delete w.selected),"canvas"===k&&p)if("2d"===e.__context)sh(e)||(w.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(w.rr_dataURL=t)}if("img"===k&&d){ht||(ht=n.createElement("canvas"),Go=ht.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",o=t.crossOrigin,s=()=>{t.removeEventListener("load",s);try{ht.width=t.naturalWidth,ht.height=t.naturalHeight,Go.drawImage(t,0,0),w.rr_dataURL=ht.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?w.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}if(("audio"===k||"video"===k)&&(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime),f||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),S){const{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}let x;"iframe"===k&&!h(w.src)&&(!S&&!La(e)&&(w.rr_src=w.src),delete w.src);try{customElements.get(k)&&(x=!0)}catch{}return{type:ue.Element,tagName:k,attributes:w,childNodes:[],isSVG:gh(e)||void 0,needBlock:S,rootId:m,isCustom:x}}function ee(e){return null==e?"":e.toLowerCase()}function Ih(e,t){if(t.comment&&e.type===ue.Comment)return!0;if(e.type===ue.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Da(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ee(e.attributes.name)||"icon"===ee(e.attributes.rel)||"apple-touch-icon"===ee(e.attributes.rel)||"shortcut icon"===ee(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ee(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ee(e.attributes.property).match(/^(og|twitter|fb):/)||ee(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ee(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ee(e.attributes.name)||"googlebot"===ee(e.attributes.name)||"bingbot"===ee(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ee(e.attributes.name)||"generator"===ee(e.attributes.name)||"framework"===ee(e.attributes.name)||"publisher"===ee(e.attributes.name)||"progid"===ee(e.attributes.name)||ee(e.attributes.property).match(/^article:/)||ee(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ee(e.attributes.name)||"yandex-verification"===ee(e.attributes.name)||"csrf-token"===ee(e.attributes.name)||"p:domain_verify"===ee(e.attributes.name)||"verify-v1"===ee(e.attributes.name)||"verification"===ee(e.attributes.name)||"shopify-checkout-api-token"===ee(e.attributes.name)))return!0}}return!1}function St(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:E=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:M=!0}=t;const O=bh(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:C,newlyAddedElement:I});if(!O)return console.warn(e,"not serialized"),null;let R;R=r.hasNode(e)?r.getId(e):Ih(O,_)||!M&&O.type===ue.Text&&!O.isStyle&&!O.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Us();const D=Object.assign(O,{id:R});if(r.add(e,D),-2===R)return null;k&&k(e);let A=!p;if(D.type===ue.Element){A=A&&!D.needBlock,delete D.needBlock;const t=e.shadowRoot;t&&Ut(t)&&(D.isShadowHost=!0)}if((D.type===ue.Document||D.type===ue.Element)&&A){_.headWhitespace&&D.type===ue.Element&&"head"===D.tagName&&(M=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:C};for(const n of Array.from(e.childNodes)){const e=St(n,t);e&&D.childNodes.push(e)}if(Xp(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=St(n,t);r&&(Ut(e.shadowRoot)&&(r.isShadow=!0),D.childNodes.push(r))}}return e.parentNode&&Ft(e.parentNode)&&Ut(e.parentNode)&&(D.isShadow=!0),D.type===ue.Element&&"iframe"===D.tagName&&Sh(e,(()=>{const t=La(e);if(t&&w){const n=St(t,{doc:t,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:C});n&&w(e,n)}}),E),D.type===ue.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===Da(D.attributes.href))&&Eh(e,(()=>{if(x){const t=St(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:C});t&&x(e,t)}}),T),D}function Th(e,t){const{mirror:n=new Aa,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:_=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:x,keepIframeSrcFn:T=()=>!1}=t;return St(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:x,keepIframeSrcFn:T,newlyAddedElement:!1})}function ze(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],s=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=s(n)):("call"===o||"optionalCall"===o)&&(n=s(((...e)=>n.call(t,...e))),t=void 0)}return n}function fe(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const mt="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Vo={map:{},getId:()=>(console.error(mt),-1),getNode:()=>(console.error(mt),null),removeNodeFromMap(){console.error(mt)},has:()=>(console.error(mt),!1),reset(){console.error(mt)}};function zt(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();!o&&!1===n.leading&&(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(Dh(r),r=null),o=i,e.apply(c,s)):!r&&!1!==n.trailing&&(r=nr((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)}),a))}}function $a(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){nr((()=>{n.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>$a(e,t,s||{},!0)}function $s(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(Vo=new Proxy(Vo,{get:(e,t,n)=>("map"===t&&console.error(mt),Reflect.get(e,t,n))}));let Ln=Date.now;function Ba(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:ze([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||ze([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||ze([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:ze([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||ze([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||ze([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function ja(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ha(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Wa(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function _e(e,t,n,r,o){if(!e)return!1;const s=Wa(e);if(!s)return!1;const i=yt(t,n);if(!o){const e=r&&s.matches(r);return i(s)&&!e}const a=rt(s,i);let c=-1;return!(a<0)&&(r&&(c=rt(s,yt(null,r))),a>-1&&c<0||a<c)}function Ch(e,t){return-1!==t.getId(e)}function Ir(e,t){return-2===t.getId(e)}function za(e,t){if(Ft(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||za(e.parentNode,t))}function rs(e){return!!e.changedTouches}function Rh(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}function qa(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function Ga(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function ss(e){return!!ze([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ln=()=>(new Date).getTime());class Mh{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return Ld(this.styleIDMap.get(e),(()=>-1))}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ya(e){let t=null;return ze([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function xh(e){let t,n=e;for(;t=Ya(n);)n=t;return n}function Oh(e){const t=e.ownerDocument;if(!t)return!1;const n=xh(e);return t.contains(n)}function Va(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||Oh(e))}const Ko={};function Bs(e){const t=Ko[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch{}return Ko[e]=r.bind(window)}function Ah(...e){return Bs("requestAnimationFrame")(...e)}function nr(...e){return Bs("setTimeout")(...e)}function Dh(...e){return Bs("clearTimeout")(...e)}var Xo,Jo,N=(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))(N||{}),D=(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))(D||{}),de=(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))(de||{}),Ne=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ne||{});function js(e){try{return e.contentDocument}catch{}}function Nh(e){try{return e.contentWindow}catch{}}function Ph(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],s=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=s(n)):("call"===o||"optionalCall"===o)&&(n=s(((...e)=>n.call(t,...e))),t=void 0)}return n}function Qo(e){return"__ln"in e}!function(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"}(Xo||(Xo={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(Jo||(Jo={}));class Lh{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=Ph([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Qo(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Qo(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Zo=(e,t)=>`${e}@${t}`;class Fh{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Lh,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!Va(o))return;const s=Ft(o.parentNode)?this.mirror.getId(Ya(o)):this.mirror.getId(o.parentNode),i=r(o);if(-1===s||-1===i)return n.addNode(o);const a=St(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{qa(e,this.mirror)&&!_e(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),Ga(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),ss(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{_e(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:s,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)ei(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)!ti(this.droppedSet,e)&&!ei(this.removes,e,this.mirror)||ti(this.movedSet,e)?o(e):this.droppedSet.add(e);let s=null;for(;n.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}s=e.previous,n.removeNode(e.value),o(e.value)}const i={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!Ir(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!_e(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Mt(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Wa(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Fs(t),o=t.tagName;r=Nn(t,o,n);const s=er({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=Ht({isMasked:Mt(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(_e(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(js(t))return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Ua(t.tagName,n)&&(o.attributes[n]=Fa(this.doc,Rt(t.tagName),Rt(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||s!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===s?r:[r,s]:o._unchangedStyles[e]=[r,s]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(_e(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=Ft(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);_e(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Ir(t,this.mirror)||!Ch(t,this.mirror)||(this.addedSet.has(t)?(os(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||za(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Zo(n,r)]?os(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Ft(e.target)||!Ut(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Ir(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Zo(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);_e(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),ss(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function os(e,t){e.delete(t),t.childNodes.forEach((t=>os(e,t)))}function ei(e,t,n){return 0!==e.length&&Uh(e,t,n)}function Uh(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}function ti(e,t){return 0!==e.size&&Ka(e,t)}function Ka(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Ka(e,n))}let $t;function $h(e){$t=e}function Bh(){$t=void 0}const $=e=>$t?(...t)=>{try{return e(...t)}catch(e){if($t&&!0===$t(e))return()=>{};throw e}}:e;function Ce(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],s=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=s(n)):("call"===o||"optionalCall"===o)&&(n=s(((...e)=>n.call(t,...e))),t=void 0)}return n}const Et=[];function rn(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 Xa(e,t){const n=new Fh;Et.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=Ce([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);o&&window[o]&&(r=window[o]);const s=new r($((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function jh({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=zt($((t=>{const n=Date.now()-i;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],i=null})),s),u=$(zt($((e=>{const t=rn(e),{clientX:n,clientY:o}=rs(e)?e.changedTouches[0]:e;i||(i=Ln()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Ln()-i}),c(typeof DragEvent<"u"&&e instanceof DragEvent?D.Drag:e instanceof MouseEvent?D.MouseMove:D.TouchMove)})),o,{trailing:!1})),l=[fe("mousemove",u,n),fe("touchmove",u,n),fe("drag",u,n)];return $((()=>{l.forEach((e=>e()))}))}function Hh({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let u=null;return Object.keys(de).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((i=>{let a=Rt(i);const l=(t=>i=>{const a=rn(i);if(_e(a,r,o,s,!0))return;let c=null,l=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=Ne.Mouse;break;case"touch":c=Ne.Touch;break;case"pen":c=Ne.Pen}c===Ne.Touch?de[t]===de.MouseDown?l="TouchStart":de[t]===de.MouseUp&&(l="TouchEnd"):Ne.Pen}else rs(i)&&(c=Ne.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===Ne.Touch||l.startsWith("Mouse")&&c===Ne.Mouse)&&(c=null)):de[t]===de.Click&&(c=u,u=null);const d=rs(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:f}=d;$(e)({type:de[l],id:p,x:h,y:f,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(de[i]){case de.MouseDown:case de.MouseUp:a=a.replace("mouse","pointer");break;case de.TouchStart:case de.TouchEnd:return}c.push(fe(a,l,t))})),$((()=>{c.forEach((e=>e()))}))}function Ja({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return fe("scroll",$(zt($((i=>{const a=rn(i);if(!a||_e(a,r,o,s,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=Ba(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})})),i.scroll||100)),t)}function Wh({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return fe("resize",$(zt($((()=>{const t=ja(),o=Ha();(n!==t||r!==o)&&(e({width:Number(o),height:Number(t)}),n=t,r=o)})),200)),t)}const zh=["INPUT","TEXTAREA","SELECT"],ni=new WeakMap;function qh({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:m}){function y(e){let n=rn(e);const l=e.isTrusted,y=n&&ts(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||zh.indexOf(y)<0||_e(n,r,o,s,!0))return;const _=n;if(_.classList.contains(i)||a&&_.matches(a))return;const v=Fs(n);let b=Nn(_,y,v),S=!1;const k=er({maskInputOptions:c,tagName:y,type:v}),w=Mt(n,p,f,h,m,k);("radio"===v||"checkbox"===v)&&(S=n.checked),b=Ht({isMasked:w,element:n,value:b,maskInputFn:u}),g(n,d?{text:b,isChecked:S,userTriggered:l}:{text:b,isChecked:S});const E=n.name;"radio"===v&&E&&S&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach((e=>{if(e!==n){const t=Ht({isMasked:w,element:e,value:Nn(e,y,v),maskInputFn:u});g(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}}))}function g(t,r){const o=ni.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){ni.set(t,r);const o=n.getId(t);$(e)({...r,id:o})}}const _=("last"===l.input?["change"]:["input","change"]).map((e=>fe(e,$(y),t))),v=t.defaultView;if(!v)return()=>{_.forEach((e=>e()))};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&_.push(...S.map((e=>$a(e[0],e[1],{set(){$(y)({target:this,isTrusted:!1})}},!1,v)))),$((()=>{_.forEach((e=>e()))}))}function Fn(e){return function(e,t){if(_n("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||_n("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||_n("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||_n("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function qe(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Gh({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:$(((r,o,s)=>{const[i,a]=s,{id:c,styleId:u}=qe(o,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:a}]}),r.apply(o,s)}))});const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:$(((r,o,s)=>{const[i]=s,{id:a,styleId:c}=qe(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(o,s)}))}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:$(((r,o,s)=>{const[i]=s,{id:a,styleId:c}=qe(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(o,s)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:$(((r,o,s)=>{const[i]=s,{id:a,styleId:c}=qe(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(o,s)}))}));const c={};yn("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(yn("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),yn("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),yn("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach((([r,o])=>{u[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(u[r].insertRule,{apply:$(((r,o,s)=>{const[i,a]=s,{id:c,styleId:u}=qe(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:i,index:[...Fn(o),a||0]}]}),r.apply(o,s)}))}),o.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:$(((r,o,s)=>{const[i]=s,{id:a,styleId:c}=qe(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...Fn(o),i]}]}),r.apply(o,s)}))})})),$((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach((([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule}))}))}function Qa({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const o="#document"===n.nodeName?Ce([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):Ce([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),s=Ce([o,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(Ce([o,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return Ce([s,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=Ce([s,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch{}return n}}),$((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))):()=>{}}function Yh({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:$(((o,i,a)=>{const[c,u,l]=a;if(n.has(c))return s.apply(i,[c,u,l]);const{id:d,styleId:p}=qe(Ce([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:l},index:Fn(i.parentRule)}),o.apply(i,a)}))});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:$(((o,s,a)=>{const[c]=a;if(n.has(c))return i.apply(s,[c]);const{id:u,styleId:l}=qe(Ce([s,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&e({id:u,styleId:l,remove:{property:c},index:Fn(s.parentRule)}),o.apply(s,a)}))}),$((()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i}))}function Vh({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=$((i=>zt($((s=>{const a=rn(s);if(!a||_e(a,t,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:d}=a;e({type:i,id:o.getId(a),currentTime:c,volume:u,muted:l,playbackRate:d})})),s.media||500))),c=[fe("play",a(0),i),fe("pause",a(1),i),fe("seeked",a(2),i),fe("volumechange",a(3),i),fe("ratechange",a(4),i)];return $((()=>{c.forEach((e=>e()))}))}function Kh({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=$s(t.fonts,"add",(function(t){return function(n){return nr($((()=>{const t=o.get(n);t&&(e(t),o.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=s})),r.push(i),$((()=>{r.forEach((e=>e()))}))}function Xh(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=$((()=>{const e=t.getSelection();if(!e||a&&Ce([e,"optionalAccess",e=>e.isCollapsed]))return;a=e.isCollapsed||!1;const c=[],u=e.rangeCount||0;for(let t=0;t<u;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:u,endContainer:l,endOffset:d}=i;_e(a,r,o,s,!0)||_e(l,r,o,s,!0)||c.push({start:n.getId(a),startOffset:u,end:n.getId(l),endOffset:d})}i({ranges:c})}));return c(),fe("selectionchange",c)}function Jh({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?$s(n.customElements,"define",(function(e){return function(n,r,o){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,o])}})):()=>{}}function Qh(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Xa(e,e.doc));const o=jh(e),s=Hh(e),i=Ja(e),a=Wh(e,{win:n}),c=qh(e),u=Vh(e);let l=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(l=Gh(e,{win:n}),d=Qa(e,e.doc),p=Yh(e,{win:n}),e.collectFonts&&(h=Kh(e)));const f=Xh(e),m=Jh(e),y=[];for(const t of e.plugins)y.push(t.observer(t.callback,n,t.options));return $((()=>{Et.forEach((e=>e.reset())),Ce([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),o(),s(),i(),a(),c(),u(),l(),d(),p(),h(),f(),m(),y.forEach((e=>e()))}))}function _n(e){return typeof window[e]<"u"}function yn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class is{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),s.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function ri(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],s=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=s(n)):("call"===o||"optionalCall"===o)&&(n=s(((...e)=>n.call(t,...e))),t=void 0)}return n}class Zh{constructor(){this.crossOriginIframeMirror=new is(Us),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class em{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new is(Us),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new is(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),ri([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=js(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case N.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:N.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case N.Meta:case N.Load:case N.DomContentLoaded:return!1;case N.Plugin:return t;case N.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case N.IncrementalSnapshot:switch(t.data.source){case D.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case D.Drag:case D.TouchMove:case D.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(t.data,e,["id"]),t;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case D.Font:return t;case D.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case D.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),ri([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const o of r)!Array.isArray(t[o])&&"number"!=typeof t[o]||(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type!==ue.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class tm{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class nm{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ut(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Xa({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Ja({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),nr((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Qa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=js(e),n=Nh(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push($s(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&Va(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class si{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class rm{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Mh,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:Oa(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class sm{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,Ah((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let ce,Un;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=kn([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ie=rh();function $e(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:k,sampling:w={},dataURLOptions:E={},mousemoveWait:x,recordDOM:T=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:R=!1,inlineImages:A=!1,plugins:L,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:j=new Set([]),errorHandler:U,onMutation:F,getCanvasManager:B}=e;$h(U);const z=!I||window.parent===window;let W=!1;if(!z)try{window.parent.document&&(W=!1)}catch{W=!0}if(z&&!t)throw new Error("emit function is required");if(!z&&!W)return()=>{};void 0!==x&&void 0===w.mousemove&&(w.mousemove=x),Ie.reset();const H=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==y?y:{},q=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};Rh();let J,V=0;const K=e=>{for(const t of L||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!W&&(e=k(e)),e};ce=(e,o)=>{const s=e;if(s.timestamp=Ln(),kn([Et,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&s.type!==N.FullSnapshot&&!(s.type===N.IncrementalSnapshot&&s.data.source===D.Mutation)&&Et.forEach((e=>e.unfreeze())),z)kn([t,"optionalCall",e=>e(K(s),o)]);else if(W){const e={type:"rrweb",event:K(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===N.FullSnapshot)J=s,V=0;else if(s.type===N.IncrementalSnapshot){if(s.data.source===D.Mutation&&s.data.isAttachIframe)return;V++;const e=r&&V>=r,t=n&&J&&s.timestamp-J.timestamp>n;(e||t)&&re(!0)}};const Y=e=>{ce({type:N.IncrementalSnapshot,data:{source:D.Mutation,...e}})},X=e=>ce({type:N.IncrementalSnapshot,data:{source:D.Scroll,...e}}),G=e=>ce({type:N.IncrementalSnapshot,data:{source:D.CanvasMutation,...e}}),Q=new rm({mutationCb:Y,adoptedStyleSheetCb:e=>ce({type:N.IncrementalSnapshot,data:{source:D.AdoptedStyleSheet,...e}})}),Z="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Zh:new em({mirror:Ie,mutationCb:Y,stylesheetManager:Q,recordCrossOriginIframes:I,wrappedEmit:ce});for(const e of L||[])e.getMirror&&e.getMirror({nodeMirror:Ie,crossOriginIframeMirror:Z.crossOriginIframeMirror,crossOriginIframeStyleMirror:Z.crossOriginIframeStyleMirror});const ee=new sm,te=im(B,{mirror:Ie,win:window,mutationCb:e=>ce({type:N.IncrementalSnapshot,data:{source:D.CanvasMutation,...e}}),recordCanvas:C,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:w.canvas,dataURLOptions:E,errorHandler:U}),ne="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new tm:new nm({mutationCb:Y,scrollCb:X,bypassOptions:{onMutation:F,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:H,dataURLOptions:E,maskAttributeFn:_,maskTextFn:b,maskInputFn:v,recordCanvas:C,inlineImages:A,sampling:w,slimDOMOptions:q,iframeManager:Z,stylesheetManager:Q,canvasManager:te,keepIframeSrcFn:P,processedNodeManager:ee},mirror:Ie}),re=(e=!1)=>{if(!T)return;ce({type:N.Meta,data:{href:window.location.href,width:Ha(),height:ja()}},e),Q.reset(),ne.init(),Et.forEach((e=>e.lock()));const t=Th(document,{mirror:Ie,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskAllInputs:H,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,slimDOM:q,dataURLOptions:E,recordCanvas:C,inlineImages:A,onSerialize:e=>{qa(e,Ie)&&Z.addIframe(e),Ga(e,Ie)&&Q.trackLinkElement(e),ss(e)&&ne.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Z.attachIframe(e,t),e.contentWindow&&te.addWindow(e.contentWindow),ne.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Q.attachLinkElement(e,t)},keepIframeSrcFn:P});if(!t)return console.warn("Failed to snapshot the document");ce({type:N.FullSnapshot,data:{node:t,initialOffset:Ba(window)}}),Et.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Q.adoptStyleSheets(document.adoptedStyleSheets,Ie.getId(document))};Un=re;try{const e=[],t=e=>$(Qh)({onMutation:F,mutationCb:Y,mousemoveCb:(e,t)=>ce({type:N.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>ce({type:N.IncrementalSnapshot,data:{source:D.MouseInteraction,...e}}),scrollCb:X,viewportResizeCb:e=>ce({type:N.IncrementalSnapshot,data:{source:D.ViewportResize,...e}}),inputCb:e=>ce({type:N.IncrementalSnapshot,data:{source:D.Input,...e}}),mediaInteractionCb:e=>ce({type:N.IncrementalSnapshot,data:{source:D.MediaInteraction,...e}}),styleSheetRuleCb:e=>ce({type:N.IncrementalSnapshot,data:{source:D.StyleSheetRule,...e}}),styleDeclarationCb:e=>ce({type:N.IncrementalSnapshot,data:{source:D.StyleDeclaration,...e}}),canvasMutationCb:G,fontCb:e=>ce({type:N.IncrementalSnapshot,data:{source:D.Font,...e}}),selectionCb:e=>{ce({type:N.IncrementalSnapshot,data:{source:D.Selection,...e}})},customElementCb:e=>{ce({type:N.IncrementalSnapshot,data:{source:D.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:H,inlineStylesheet:f,sampling:w,recordDOM:T,recordCanvas:C,inlineImages:A,userTriggeredOnInput:O,collectFonts:R,doc:e,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:P,blockSelector:s,unblockSelector:i,slimDOMOptions:q,dataURLOptions:E,mirror:Ie,iframeManager:Z,stylesheetManager:Q,shadowDomManager:ne,processedNodeManager:ee,canvasManager:te,ignoreCSSAttributes:j,plugins:kn([L,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>ce({type:N.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});Z.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{re(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(fe("DOMContentLoaded",(()=>{ce({type:N.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&n()}))),e.push(fe("load",(()=>{ce({type:N.Load,data:{}}),"load"===M&&n()}),window))),()=>{e.forEach((e=>e())),ee.destroy(),Un=void 0,Bh()}}catch(e){console.warn(e)}}function om(e){if(!Un)throw new Error("please take full snapshot after start recording");Un(e)}function im(e,t){try{return e?e(t):new si}catch{return console.warn("Unable to initialize CanvasManager"),new si}}$e.mirror=Ie,$e.takeFullSnapshot=om;const am=3,cm=5;function Hs(e){return e>9999999999?e:1e3*e}function Tr(e){return e>9999999999?e/1e3:e}function sn(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:N.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:Te(t,10,1e3)}}),"console"===t.category))))}const um="button,a";function Za(e){return e.closest(um)||e}function ec(e){const t=tc(e);return t&&t instanceof Element?Za(t):t}function tc(e){return lm(e)?e.target:e}function lm(e){return"object"==typeof e&&!!e&&"target"in e}let Ge;function dm(e){return Ge||(Ge=[],fm()),Ge.push(e),()=>{const t=Ge?Ge.indexOf(e):-1;t>-1&&Ge.splice(t,1)}}function fm(){he(te,"open",(function(e){return function(...t){if(Ge)try{Ge.forEach((e=>e()))}catch{}return e.apply(te,t)}}))}const pm=new Set([D.Mutation,D.StyleSheetRule,D.StyleDeclaration,D.AdoptedStyleSheet,D.CanvasMutation,D.Selection,D.MediaInteraction]);function hm(e,t,n){e.handleClick(t,n)}class mm{constructor(e,t,n=sn){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=dm((()=>{this._lastMutation=oi()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(_m(t,this._ignoreSelector)||!ym(e))return;const n={timestamp:Tr(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Tr(e)}registerScroll(e=Date.now()){this._lastScroll=Tr(e)}registerClick(e){const t=Za(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=oi();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:s,clickBreadcrumb:i}=e;if(o){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:te.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:s||1}};this._addBreadcrumbEvent(t,o)}else if(s>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:te.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Ct((()=>this._checkClicks()),1e3)}}const gm=["A","BUTTON","INPUT"];function _m(e,t){return!!(!gm.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||"A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target"))||t&&e.matches(t))}function ym(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}function oi(){return Date.now()/1e3}function Sm(e,t){try{if(!Em(t))return;const{source:n}=t.data;if(pm.has(n)&&e.registerMutation(t.timestamp),n===D.Scroll&&e.registerScroll(t.timestamp),bm(t)){const{type:n,id:r}=t.data,o=$e.mirror.getNode(r);o instanceof HTMLElement&&n===de.Click&&e.registerClick(o)}}catch{}}function Em(e){return 3===e.type}function bm(e){return e.data.source===D.MouseInteraction}function Oe(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var $n;!function(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"}($n||($n={}));const vm=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function wm(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(vm.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}const km=e=>t=>{if(!e.isEnabled())return;const n=Im(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;r&&e.clickDetector&&o&&o.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&hm(e.clickDetector,n,ec(t.event)),sn(e,n)};function nc(e,t){const n=$e.mirror.getId(e),r=n&&$e.mirror.getNode(n),o=r&&$e.mirror.getMeta(r),s=o&&Cm(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map((e=>e.type===$n.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:wm(s.attributes)}}:{}}}function Im(e){const{target:t,message:n}=Tm(e);return Oe({category:`ui.${e.name}`,...nc(t,n)})}function Tm(e){const t="click"===e.name;let n,r=null;try{r=t?ec(e.event):tc(e.event),n=Yn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Cm(e){return e.type===$n.Element}function Rm(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Mm(t);n&&sn(e,n)}function Mm(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||xm(i)||!s)return null;const a=t||r||o,c=1===s.length;if(!a&&c)return null;const u=Yn(i,{maxStringLength:200})||"<unknown>";return Oe({category:"ui.keyDown",message:u,data:{...nc(i,u).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function xm(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}const Om={resource:Lm,paint:Nm,navigation:Pm};function Sn(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function Am(e){return e.map(Dm).filter(Boolean)}function Dm(e){const t=Om[e.entryType];return t?t(e):null}function xt(e){return((pu||te.performance.timeOrigin)+e)/1e3}function Nm(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=xt(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function Pm(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=e;return 0===o?null:{type:`${t}.${m}`,start:xt(h),end:xt(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:s,redirectCount:p}}}function Lm(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:xt(s),end:xt(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function Fm(e){const t=e.entries[e.entries.length-1];return rr(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function Um(e){return void 0!==e.sources}function $m(e){const t=[],n=[];for(const r of e.entries)if(Um(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=$e.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return rr(e,"cumulative-layout-shift",n,t)}function Bm(e){const t=e.entries[e.entries.length-1];return rr(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function jm(e){const t=e.entries[e.entries.length-1];return rr(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function rr(e,t,n,r){const o=e.value,s=e.rating,i=xt(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map((e=>$e.mirror.getId(e))):void 0,attributions:r}}}function Hm(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(Cf(e,n))})),r.push(kf(Sn(Fm,e)),wf(Sn($m,e)),If(Sn(Bm,e)),Tf(Sn(jm,e))),()=>{r.forEach((e=>e()))}}const M=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Wm='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function zm(){const e=new Blob([Wm]);return URL.createObjectURL(e)}const ii=["info","warn","error","log"],Tn="[Replay] ";function Cr(e,t="info"){Ke({category:"console",data:{logger:"replay"},level:t,message:`${Tn}${e}`},{level:t})}function qm(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return M?(ii.forEach((e=>{n[e]=(...n)=>{R[e](Tn,...n),t&&Cr(n.join(""),ca(e))}})),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),R.error(Tn,r),e?Cs(r):t&&Cr(r,"error")},n.infoTick=(...e)=>{R.info(Tn,...e),t&&setTimeout((()=>Cr(e[0])),0)}):ii.forEach((e=>{n[e]=()=>{}})),n}const x=qm();class Ws extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Ls}.`)}}class rc{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Ls)throw new Ws;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?Hs(e):null}}class Gm{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){M&&x.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const s=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",s),!i.success)return M&&x.error("Error in compression worker: ",i.response),void o(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class Ym{constructor(e){this._worker=new Gm(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=Hs(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Ls?Promise.reject(new Ws):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{M&&x.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class Vm{constructor(e){this._fallback=new rc,this._compression=new Ym(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(M&&x.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){M&&x.exception(e,"Failed to add events when switching buffers.")}}}function Km({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=Xm(t);if(e)return e}return M&&x.info("Using simple buffer"),new rc}function Xm(e){try{const t=e||Jm();if(!t)return;M&&x.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Vm(n)}catch(e){M&&x.exception(e,"Failed to create compression worker")}}function Jm(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?zm():""}function zs(){try{return"sessionStorage"in te&&!!te.sessionStorage}catch{return!1}}function Qm(e){Zm(),e.session=void 0}function Zm(){if(zs())try{te.sessionStorage.removeItem(Ns)}catch{}}function sc(e){return void 0!==e&&Math.random()<e}function oc(e){const t=Date.now();return{id:e.id||ye(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function qs(e){if(zs())try{te.sessionStorage.setItem(Ns,JSON.stringify(e))}catch{}}function eg(e,t){return sc(e)?"session":!!t&&"buffer"}function ai({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=oc({sampled:eg(e,t),previousSessionId:r});return n&&qs(o),o}function tg(){if(!zs())return null;try{const e=te.sessionStorage.getItem(Ns);if(!e)return null;const t=JSON.parse(e);return M&&x.infoTick("Loading existing session"),oc(t)}catch{return null}}function as(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function ic(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return as(e.started,t,r)||as(e.lastActivity,n,r)}function ac(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!ic(e,{sessionIdleExpire:t,maxReplayDuration:n})||"buffer"===e.sampled&&0===e.segmentId)}function Rr({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&tg();return o?ac(o,{sessionIdleExpire:e,maxReplayDuration:t})?(M&&x.infoTick("Session in sessionStorage is expired, creating new one..."),ai(r,{previousSessionId:o.id})):o:(M&&x.infoTick("Creating new session"),ai(r,{previousSessionId:n}))}function ng(e){return e.type===N.Custom}function Gs(e,t,n){return!!uc(e,t)&&(cc(e,t,n),!0)}function rg(e,t,n){return uc(e,t)?cc(e,t,n):Promise.resolve(null)}async function cc(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o="buffer"===e.recordingMode;try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=sg(t,e.getOptions().beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(t){const n=t&&t instanceof Ws,s=n?"addEventSizeExceeded":"addEvent";if(n&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:s});const i=ae();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function uc(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Hs(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(M&&x.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function sg(e,t){try{if("function"==typeof t&&ng(e))return t(e)}catch(e){return M&&x.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Ys(e){return!e.type}function cs(e){return"transaction"===e.type}function og(e){return"replay_event"===e.type}function ci(e){return"feedback"===e.type}function ig(e){return(t,n)=>{if(!e.isEnabled()||!Ys(t)&&!cs(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(cs(t))return void ag(e,t);cg(e,t)}}}function ag(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function cg(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();"function"==typeof r&&!r(t)||Ct((async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}}))}function ug(e){return t=>{!e.isEnabled()||!Ys(t)||lg(e,t)}}function lg(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if("string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){sn(e,Oe({category:"replay.hydrate-error",data:{url:$i()}}))}}function dg(e){const t=ae();t&&t.on("beforeAddBreadcrumb",(t=>fg(e,t)))}function fg(e,t){if(!e.isEnabled()||!lc(t))return;const n=pg(t);n&&sn(e,n)}function pg(e){return!lc(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?hg(e):Oe(e)}function hg(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return Oe(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>gn?(n=!0,`${e.slice(0,gn)}…`):e;if("object"==typeof e)try{const t=Te(e,7);return JSON.stringify(t).length>gn?(n=!0,`${JSON.stringify(t,null,2).slice(0,gn)}…`):t}catch{}return e}));return Oe({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function lc(e){return!!e.category}function mg(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}function dc(){const e=ve().getPropagationContext().dsc;e&&delete e.replay_id;const t=qi();if(t){delete Yi(t).replay_id}}function gg(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:N.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}function _g(e,t){return!("buffer"!==e.recordingMode||t.message===Ps||!t.exception||t.type)&&sc(e.getOptions().errorSampleRate)}function yg(e){return Object.assign(((t,n)=>!e.isEnabled()||e.isPaused()?t:og(t)?(delete t.breadcrumbs,t):Ys(t)||cs(t)||ci(t)?e.checkAndHandleExpiredSession()?ci(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),gg(e,t),t):mg(t,n)&&!e.getOptions()._experiments.captureExceptions?(M&&x.log("Ignoring error from rrweb internals",t),null):((_g(e,t)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(dc(),t):t),{id:"Replay"})}function sr(e,t){return t.map((({type:t,start:n,end:r,name:o,data:s})=>{const i=e.throttledAddEvent({type:N.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof i?Promise.resolve(null):i}))}function Sg(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 Eg(e){return t=>{if(!e.isEnabled())return;const n=Sg(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(sr(e,[n]),!1))))}}function bg(e,t){return(!M||!e.getOptions()._experiments.traceInternals)&&Jl(t,ae())}function fc(e,t){e.isEnabled()&&null!==t&&(bg(e,t.name)||e.addUpdate((()=>(sr(e,[t]),!0))))}function or(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=gc(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function pc(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function hc(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[gc(e)];if(!e)return[void 0]}catch(t){return M&&x.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return M&&x.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Bn(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 mc(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:me({method:s,statusCode:i,request:a,response:c})}}function qt(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ve(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=vg(n);return r.body=o,s&&s.length>0&&(r._meta={warnings:s}),r}function us(e,t){return Object.entries(e).reduce(((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n}),{})}function gc(e){return new URLSearchParams(e).toString()}function vg(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>Ho,n=wg(e);if(t){const t=e.slice(0,Ho);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function wg(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}function jn(e,t){return Xt(kg(e),t)}function kg(e,t=te.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(te.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 Ig(e,t,n){try{const r=mc("resource.fetch",await Cg(e,t,n));fc(n.replay,r)}catch(e){M&&x.exception(e,"Failed to capture fetch breadcrumb")}}function Tg(e,t){const{input:n,response:r}=t,o=or(n?_c(n):void 0),s=r?pc(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}async function Cg(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=jn(i,n.networkDetailAllowUrls)&&!jn(i,n.networkDetailDenyUrls);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:d?Rg(n,t.input,u):qt(u),response:await Mg(d,n,t.response,l)}}function Rg({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?Ag(n,t):{};if(!e)return Ve(o,r,void 0);const s=_c(n),[i,a]=hc(s),c=Ve(o,r,i);return a?Bn(c,a):c}async function Mg(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return qt(o);const s=r?yc(r.headers,n):{};if(!r||!t&&void 0!==o)return Ve(s,o,void 0);const[i,a]=await Og(r),c=xg(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?Bn(c,a):c}function xg(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e&&e.length&&void 0===n?or(e):n;return r?Ve(o,s,t?e:void 0):qt(s)}catch(e){return M&&x.exception(e,"Failed to serialize response body"),Ve(o,n,void 0)}}async function Og(e){const t=Dg(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Ng(t)]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(M&&x.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(M&&x.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function _c(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function yc(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function Ag(e,t){return 1===e.length&&"string"!=typeof e[0]?ui(e[0],t):2===e.length?ui(e[1],t):{}}function ui(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?yc(n,t):Array.isArray(n)?{}:us(n,t):{}}function Dg(e){try{return e.clone()}catch(e){M&&x.exception(e,"Failed to clone response body")}}function Ng(e){return new Promise(((t,n)=>{const r=Ct((()=>n(new Error("Timeout while trying to read response body"))),500);Pg(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}async function Pg(e){return await e.text()}async function Lg(e,t,n){try{const r=mc("resource.xhr",Ug(e,t,n));fc(n.replay,r)}catch(e){M&&x.exception(e,"Failed to capture xhr breadcrumb")}}function Fg(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=or(r),s=n.getResponseHeader("content-length")?pc(n.getResponseHeader("content-length")):Hg(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}function Ug(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!jn(c,n.networkDetailAllowUrls)||jn(c,n.networkDetailDenyUrls)){return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:qt(d),response:qt(p)}}const h=a[gt],f=h?us(h.request_headers,n.networkRequestHeaders):{},m=us($g(a),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?hc(i):[void 0],[_,v]=n.networkCaptureBodies?Bg(a):[void 0],b=Ve(f,d,y),S=Ve(m,p,_);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:g?Bn(b,g):b,response:v?Bn(S,v):S}}function $g(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{}):{}}function Bg(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return jg(e.response,e.responseType)}catch(e){t.push(e)}return M&&x.warn("Failed to get xhr response body",...t),[void 0]}function jg(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return M&&x.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return M&&x.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Hg(e,t){try{return or("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}function Wg(e){const t=ae();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",((e,t)=>zg(a,e,t)))}catch{}}function zg(e,t,n){if(t.data)try{qg(t)&&Yg(n)&&(Fg(t,n),Lg(t,n,e)),Gg(t)&&Vg(n)&&(Tg(t,n),Ig(t,n,e))}catch(e){M&&x.exception(e,"Error when enriching network breadcrumb")}}function qg(e){return"xhr"===e.category}function Gg(e){return"fetch"===e.category}function Yg(e){return e&&e.xhr}function Vg(e){return e&&e.response}function Kg(e){const t=ae();Ta(km(e)),Ds(Eg(e)),dg(e),Wg(e);xl(yg(e)),t&&(t.on("beforeSendEvent",ug(e)),t.on("afterSendEvent",ig(e)),t.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),t.on("spanStart",(t=>{e.lastActiveSpan=t})),t.on("spanEnd",(t=>{e.lastActiveSpan=t})),t.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}async function Xg(e){try{return Promise.all(sr(e,[Jg(te.performance.memory)]))}catch{return[]}}function Jg(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Qg(e,t,n){let r,o,s;const i=n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){void 0!==o&&clearTimeout(o),void 0!==s&&clearTimeout(s),o=s=void 0}function u(){return o&&clearTimeout(o),o=Ct(a,t),i&&void 0===s&&(s=Ct(a,i)),r}return u.cancel=c,u.flush=function(){return void 0!==o||void 0!==s?a():r},u}function Zg(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(M&&x.warn("Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&Sm(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Gs(e,n,o))return!0;if(!o)return!1;const t=e.session;if(t_(e,o),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(M&&x.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&qs(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0}))}}function e_(e){const t=e.getOptions();return{type:N.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function t_(e,t){!t||!e.session||0!==e.session.segmentId||Gs(e,e_(e),!1)}function n_(e,t,n,r){return Dt(Xi(e,Ts(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}function r_({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function s_({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const s=await Ji(e.getOptions(),r,o,t,e,De());if(!s)return null;s.platform=s.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c}=i&&i.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},s}async function o_({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=r_({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=ae(),p=ve(),h=d&&d.getTransport(),f=d&&d.getDsn();if(!(d&&h&&f&&s.sampled))return je({});const m={type:Up,replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},y=await s_({scope:p,client:d,replayId:t,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay",m),M&&x.info("An event processor returned `null`, will not send event."),je({});delete y.sdkProcessingMetadata;const g=n_(y,i,f,d.getOptions().tunnel);let _;try{_=await h.send(g)}catch(e){const t=new Error(Ps);try{t.cause=e}catch{}throw t}if("number"==typeof _.statusCode&&(_.statusCode<200||_.statusCode>=300))throw new Sc(_.statusCode);const v=ia({},_);if(oa(v,"replay"))throw new Vs(v);return _}class Sc extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Vs extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function Ec(e,t={count:0,interval:zp}){const{recordingData:n,onError:r}=e;if(n.length)try{return await o_(e),!0}catch(n){if(n instanceof Sc||n instanceof Vs)throw n;if(Zi("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${Ps} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{Ct((async()=>{try{await Ec(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const bc="__THROTTLED",i_="__SKIPPED";function a_(e,t,n){const r=new Map;let o=!1;return(...s)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))})(i),[...r.values()].reduce(((e,t)=>e+t),0)>=t){const e=o;return o=!0,e?i_:bc}o=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...s)}}class Ye{constructor({options:e,recordingOptions:t}){Ye.prototype.__init.call(this),Ye.prototype.__init2.call(this),Ye.prototype.__init3.call(this),Ye.prototype.__init4.call(this),Ye.prototype.__init5.call(this),Ye.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:$p,sessionIdleExpire:Bp},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=Qg((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=a_(((e,t)=>rg(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(Gp,n),timeout:n,scrollTimeout:Yp,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new mm(this,o)),M){const t=e._experiments;x.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){M&&x.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session)return void(M&&x.exception(new Error("Unable to initialize and create session")));!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",M&&x.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(M&&x.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(M&&x.info("Buffering is in progress, call `flush()` to save the replay"));M&&x.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Rr({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(M&&x.info("Buffering is in progress, call `flush()` to save the replay"));M&&x.infoTick("Starting replay in buffer mode");const e=Rr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=$e({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:Wp}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Zg(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{M&&x.info("Stopping Replay"+(t?` triggered by ${t}`:"")),dc(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Qm(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),M&&x.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),M&&x.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();M&&x.info("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!e||!n||"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&as(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${te.location.pathname}${te.location.hash}${te.location.search}`,t=`${te.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===bc){const e=Oe({category:"replay.throttled"});this.addUpdate((()=>!Gs(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||qi(),t=e&&ks(e),n=(t&&Bt(t).data||{})[zi];if(t&&n&&["route","custom"].includes(n))return Bt(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Km({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Rr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!ac(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{te.document.addEventListener("visibilitychange",this._handleVisibilityChange),te.addEventListener("blur",this._handleWindowBlur),te.addEventListener("focus",this._handleWindowFocus),te.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Kg(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=Hm(this)}_removeListeners(){try{te.document.removeEventListener("visibilitychange",this._handleVisibilityChange),te.removeEventListener("blur",this._handleWindowBlur),te.removeEventListener("focus",this._handleWindowFocus),te.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===te.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=Oe({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=Oe({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Rm(this,e)}}_doChangeToBackgroundTasks(e){!this.session||ic(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):M&&x.info("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:N.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=Am(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all(sr(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await Xg(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await Ec({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=ae();if(t){const n=e instanceof Vs?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else M&&x.error("No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(M&&x.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,o=n>this._options.maxReplayDuration+5e3;if(r||o)return M&&x.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const s=this.eventBuffer;s&&0===this.session.segmentId&&!s.hasCheckout&&M&&x.info("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&qs(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=Oe({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function Nt(e,t){return[...e,...t].join(",")}function c_({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:Nt(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:Nt(t,[]),blockSelector:Nt(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:Nt(r,[]),ignoreSelector:Nt(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function u_({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return!r||o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const li='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',l_=["content-length","content-type","accept"];let di=!1;const d_=e=>new ir(e);class ir{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=jp,flushMaxDelay:t=Hp,minReplayDuration:n=Vp,maxReplayDuration:r=Wo,stickySession:o=!0,useCompression:s=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:y=[],networkCaptureBodies:g=!0,networkRequestHeaders:_=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder"],unmask:k=[],block:w=[],unblock:E=[],ignore:x=[],maskFn:T,beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M}={}){this.name=ir.id;const O=c_({mask:b,unmask:k,block:w,unblock:E,ignore:x});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>u_({maskAttributes:S,maskAllText:c,privacyOptions:O,key:e,value:t,el:n}),...O,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,Kp),maxReplayDuration:Math.min(r,Wo),stickySession:o,useCompression:s,workerUrl:i,blockAllMedia:l,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:f,networkDetailAllowUrls:m,networkDetailDenyUrls:y,networkCaptureBodies:g,networkRequestHeaders:fi(_),networkResponseHeaders:fi(v),beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${li}`:li),this._isInitialized&&Po())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return di}set _isInitialized(e){di=e}afterAllSetup(e){!Po()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=f_(this._initialOptions,e);this._replay=new Ye({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function f_(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...me(e)},o=Br(n.replaysSessionSampleRate),s=Br(n.replaysOnErrorSampleRate);return null==o&&null==s&&Qe((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),null!=o&&(r.sessionSampleRate=o),null!=s&&(r.errorSampleRate=s),r}function fi(e){return[...l_,...e.map((e=>e.toLowerCase()))]}function p_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}ir.__initStatic();var pi,hi,Mr={exports:{}},P={};
|
|
2
|
-
/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/function h_(){if(pi)return P;pi=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),d=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,f={};function m(e,t,n){this.props=e,this.context=t,this.refs=f,this.updater=n||p}function y(){}function g(e,t,n){this.props=e,this.context=t,this.refs=f,this.updater=n||p}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var _=g.prototype=new y;_.constructor=g,h(_,m.prototype),_.isPureReactComponent=!0;var v=Array.isArray,b=Object.prototype.hasOwnProperty,S={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function w(t,n,r){var o,s={},i=null,a=null;if(null!=n)for(o in void 0!==n.ref&&(a=n.ref),void 0!==n.key&&(i=""+n.key),n)b.call(n,o)&&!k.hasOwnProperty(o)&&(s[o]=n[o]);var c=arguments.length-2;if(1===c)s.children=r;else if(1<c){for(var u=Array(c),l=0;l<c;l++)u[l]=arguments[l+2];s.children=u}if(t&&t.defaultProps)for(o in c=t.defaultProps)void 0===s[o]&&(s[o]=c[o]);return{$$typeof:e,type:t,key:i,ref:a,props:s,_owner:S.current}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var x=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(n,r,o,s,i){var a=typeof n;("undefined"===a||"boolean"===a)&&(n=null);var c=!1;if(null===n)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(n.$$typeof){case e:case t:c=!0}}if(c)return i=i(c=n),n=""===s?"."+T(c,0):s,v(i)?(o="",null!=n&&(o=n.replace(x,"$&/")+"/"),C(i,r,o,"",(function(e){return e}))):null!=i&&(E(i)&&(i=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(i,o+(!i.key||c&&c.key===i.key?"":(""+i.key).replace(x,"$&/")+"/")+n)),r.push(i)),1;if(c=0,s=""===s?".":s+":",v(n))for(var u=0;u<n.length;u++){var l=s+T(a=n[u],u);c+=C(a,r,o,l,i)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(n),"function"==typeof l)for(n=l.call(n),u=0;!(a=n.next()).done;)c+=C(a=a.value,r,o,l=s+T(a,u++),i);else if("object"===a)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return c}function I(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function M(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)}),(function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},R={transition:null},D={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:R,ReactCurrentOwner:S};return P.Children={map:I,forEach:function(e,t,n){I(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},P.Component=m,P.Fragment=n,P.Profiler=o,P.PureComponent=g,P.StrictMode=r,P.Suspense=c,P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,P.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o=h({},t.props),s=t.key,i=t.ref,a=t._owner;if(null!=n){if(void 0!==n.ref&&(i=n.ref,a=S.current),void 0!==n.key&&(s=""+n.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(u in n)b.call(n,u)&&!k.hasOwnProperty(u)&&(o[u]=void 0===n[u]&&void 0!==c?c[u]:n[u])}var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){c=Array(u);for(var l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:e,type:t.type,key:s,ref:i,props:o,_owner:a}},P.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},P.createElement=w,P.createFactory=function(e){var t=w.bind(null,e);return t.type=e,t},P.createRef=function(){return{current:null}},P.forwardRef=function(e){return{$$typeof:a,render:e}},P.isValidElement=E,P.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:M}},P.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},P.startTransition=function(e){var t=R.transition;R.transition={};try{e()}finally{R.transition=t}},P.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},P.useCallback=function(e,t){return O.current.useCallback(e,t)},P.useContext=function(e){return O.current.useContext(e)},P.useDebugValue=function(){},P.useDeferredValue=function(e){return O.current.useDeferredValue(e)},P.useEffect=function(e,t){return O.current.useEffect(e,t)},P.useId=function(){return O.current.useId()},P.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},P.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},P.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},P.useMemo=function(e,t){return O.current.useMemo(e,t)},P.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},P.useRef=function(e){return O.current.useRef(e)},P.useState=function(e){return O.current.useState(e)},P.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},P.useTransition=function(){return O.current.useTransition()},P.version="18.2.0",P}function vc(){return hi||(hi=1,Mr.exports=h_()),Mr.exports}var ar=vc();const wc=p_(ar),mi=Yc({__proto__:null,default:wc},[ar]);function m_(e){const t={...e};return aa(t,"react"),Zi("react",{version:ar.version}),Fp(t)}const kc=()=>"object"!=typeof window;var g_={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"a8754bd4c5954902",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.703",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3760",APP_NAME:"@wellesley/sentry"};const __=()=>!!g_.JEST_WORKER_ID,y_=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return Rl("exceptionMessage",t),void Cs(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}Cl(t)},S_="wlsy",Ic=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},E_=()=>{const e=new Set,t=Ic();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const r=null==t?void 0:t.key(n);"string"==typeof r&&e.add(r)}return Array.from(e)},Tc=e=>{const t=`${S_}`,n=e=>`${t}:${e}`,r=()=>E_().filter((e=>e.startsWith(`${t}:`))),o=e=>e.slice(t.length+1),s=Ic(),i=e=>{try{return null==s?void 0:s.getItem(n(e))}catch{return null}},a=(e,t)=>{try{null==s||s.setItem(n(e),String(t))}catch{return}};return{getItem:i,setItem:a,removeItem:e=>{try{null==s||s.removeItem(n(e))}catch{return}},clear:()=>{try{r().forEach((e=>null==s?void 0:s.removeItem(e)))}catch{return}},keys:()=>r().map(o),has:e=>null!==i(e),getJSON:e=>{const t=i(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{a(e,JSON.stringify(t))}catch{return}}}},gi=["debug","info","warn","error"],b_=(e,t)=>{const n=gi.indexOf(e);return gi.indexOf(t)>=n},En=(e,t,n,...r)=>{b_(t,e)&&console.log(`[${e}] ${n}`,...r)},v_=()=>Tc().getItem("logger_lvl"),w_=(e=(kc()?"info":v_()||"warn"))=>{let t=e;return{debug:(e,...n)=>En("debug",t,e,...n),info:(e,...n)=>En("info",t,e,...n),warn:(e,...n)=>En("warn",t,e,...n),error:(e,...n)=>(y_(e,...n),En("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},cr=w_();var _i={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"a8754bd4c5954902",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.703",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3760",APP_NAME:"@wellesley/sentry"};const k_=e=>`${e||"wlsy"}-${_i.DOMAIN_ENV}#${_i.BUILD_NUMBER}`,ur="staticState",Cc=Tc(),Cn={path:"",baseUrl:"",search:""},I_=e=>{if(!e)return Cn;try{return JSON.parse(decodeURIComponent(e))||Cn}catch(e){return cr.error("Error parsing static state",e),Cn}},Rc=()=>new URLSearchParams(window.location.search).get(ur),T_=({path:e,baseUrl:t,search:n}={})=>{const{pathname:r,origin:o,search:s}=window.location;return`${ur}=${encodeURIComponent(JSON.stringify({path:e||r,baseUrl:t||o,search:n||s}))}`},C_=()=>{const e=Rc();return e&&Cc.setItem(ur,e),Mc()},Mc=()=>{try{const e=Cc.getItem(ur)||Rc();return I_(e)}catch(e){return cr.error("Error parsing static state",e),Cn}},R_={create:T_,init:C_,get:Mc},M_=()=>{try{const{baseUrl:e}=R_.get();return e&&new URL(e).hostname||window.location.hostname}catch(e){return cr.warn("getServerName: Error getting server name",e),""}};var xc={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"a8754bd4c5954902",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.703",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3760",APP_NAME:"@wellesley/sentry"};const x_=xc.DOMAIN_ENV;kc()||(window.build=xc.BUILD_NUMBER);const Ks=()=>!__()&&M_().endsWith("allroads.social"),O_=[d_(),Ma(),ua()],A_=({dsn:e,release:t,integrations:n=O_,...r})=>{if(Ks()&&e)try{m_({dsn:e,integrations:n,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,release:k_(t),environment:x_,maxValueLength:1024,...r})}catch(e){return void cr.error("Sentry init error: ",e)}},Oc=e=>{if(Ks()&&e){const{email:t,username:n,userId:r}=e;Ml({email:t,username:n,id:r})}},$y=Object.freeze(Object.defineProperty({__proto__:null,init:A_,isEnabled:Ks,setUser:Oc},Symbol.toStringTag,{value:"Module"}));var yi,Si,xr={exports:{}},Or={};
|
|
11
|
-
/**
|
|
12
|
-
* @license React
|
|
13
|
-
* use-sync-external-store-with-selector.production.min.js
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/function D_(){if(yi)return Or;yi=1;var e=vc();var t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,o=e.useEffect,s=e.useMemo,i=e.useDebugValue;return Or.useSyncExternalStoreWithSelector=function(e,a,c,u,l){var d=r(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s((function(){function e(e){if(!o){if(o=!0,n=e,e=u(e),void 0!==l&&p.hasValue){var s=p.value;if(l(s,e))return r=s}return r=e}if(s=r,t(n,e))return s;var i=u(e);return void 0!==l&&l(s,i)?s:(n=e,r=i)}var n,r,o=!1,s=void 0===c?null:c;return[function(){return e(a())},null===s?void 0:function(){return e(s())}]}),[a,c,u,l]);var h=n(e,d[0],d[1]);return o((function(){p.hasValue=!0,p.value=h}),[h]),i(h),h},Or}function N_(){return Si||(Si=1,xr.exports=D_()),xr.exports}var P_=N_(),Ae="default"in mi?wc:mi,Ei=Symbol.for("react-redux-context"),bi=typeof globalThis<"u"?globalThis:{};function L_(){if(!Ae.createContext)return{};const e=bi[Ei]??(bi[Ei]=new Map);let t=e.get(Ae.createContext);return t||(t=Ae.createContext(null),e.set(Ae.createContext,t)),t}var ls=L_(),F_=()=>{throw new Error("uSES not initialized!")};function Ac(e=ls){return function(){return Ae.useContext(e)}}var U_=Ac(),Dc=F_,$_=e=>{Dc=e},B_=(e,t)=>e===t;function j_(e=ls){const t=e===ls?U_:Ac(e),n=(e,n={})=>{const{equalityFn:r=B_,devModeChecks:o={}}="function"==typeof n?{equalityFn:n}:n,{store:s,subscription:i,getServerState:a,stabilityCheck:c,identityFunctionCheck:u}=t();Ae.useRef(!0);const l=Ae.useCallback({[e.name]:t=>e(t)}[e.name],[e,c,o.stabilityCheck]),d=Dc(i.addNestedSub,s.getState,a||s.getState,l,r);return Ae.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var vi=j_(),H_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function W_(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function z_(e){return W_(e)&&"type"in e&&"string"==typeof e.type}H_?Ae.useLayoutEffect:Ae.useEffect,$_(P_.useSyncExternalStoreWithSelector);var Nc=Symbol.for("immer-nothing"),wi=Symbol.for("immer-draftable"),Ee=Symbol.for("immer-state");function Re(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ot=Object.getPrototypeOf;function Xe(e){return!!e&&!!e[Ee]}function He(e){var t;return!!e&&(Pc(e)||Array.isArray(e)||!!e[wi]||!(null==(t=e.constructor)||!t[wi])||dr(e)||fr(e))}var q_=Object.prototype.constructor.toString();function Pc(e){if(!e||"object"!=typeof e)return!1;const t=Ot(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===q_}function Gt(e,t){0===lr(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function lr(e){const t=e[Ee];return t?t.type_:Array.isArray(e)?1:dr(e)?2:fr(e)?3:0}function ds(e,t){return 2===lr(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Lc(e,t,n){const r=lr(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function G_(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function dr(e){return e instanceof Map}function fr(e){return e instanceof Set}function nt(e){return e.copy_||e.base_}function fs(e,t){if(dr(e))return new Map(e);if(fr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Pc(e))return Ot(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Ee];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],s=n[o];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(Ot(e),n)}function Xs(e,t=!1){return pr(e)||Xe(e)||!He(e)||(lr(e)>1&&(e.set=e.add=e.clear=e.delete=Y_),Object.freeze(e),t&&Gt(e,((e,t)=>Xs(t,!0)))),e}function Y_(){Re(2)}function pr(e){return Object.isFrozen(e)}var Yt,V_={};function ut(e){const t=V_[e];return t||Re(0,e),t}function Fc(){return Yt}function K_(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ki(e,t){t&&(ut("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ps(e){hs(e),e.drafts_.forEach(X_),e.drafts_=null}function hs(e){e===Yt&&(Yt=e.parent_)}function Ii(e){return Yt=K_(Yt,e)}function X_(e){const t=e[Ee];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Ti(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Ee].modified_&&(ps(t),Re(4)),He(e)&&(e=Hn(t,e),t.parent_||Wn(t,e)),t.patches_&&ut("Patches").generateReplacementPatches_(n[Ee].base_,e,t.patches_,t.inversePatches_)):e=Hn(t,n,[]),ps(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nc?e:void 0}function Hn(e,t,n){if(pr(t))return t;const r=t[Ee];if(!r)return Gt(t,((o,s)=>Ci(e,r,t,o,s,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Wn(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,s=!1;3===r.type_&&(o=new Set(t),t.clear(),s=!0),Gt(o,((o,i)=>Ci(e,r,t,o,i,n,s))),Wn(e,t,!1),n&&e.patches_&&ut("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ci(e,t,n,r,o,s,i){if(Xe(o)){const i=Hn(e,o,s&&t&&3!==t.type_&&!ds(t.assigned_,r)?s.concat(r):void 0);if(Lc(n,r,i),!Xe(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(He(o)&&!pr(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Hn(e,o),(!t||!t.scope_.parent_)&&Wn(e,o)}}function Wn(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xs(t,n)}function J_(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Fc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=Js;n&&(o=[r],s=Vt);const{revoke:i,proxy:a}=Proxy.revocable(o,s);return r.draft_=a,r.revoke_=i,a}var Js={get(e,t){if(t===Ee)return e;const n=nt(e);if(!ds(n,t))return Q_(e,n,t);const r=n[t];return e.finalized_||!He(r)?r:r===Ar(e.base_,t)?(Dr(e),e.copy_[t]=gs(r,e)):r},has:(e,t)=>t in nt(e),ownKeys:e=>Reflect.ownKeys(nt(e)),set(e,t,n){const r=Uc(nt(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Ar(nt(e),t),o=null==r?void 0:r[Ee];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(G_(n,r)&&(void 0!==n||ds(e.base_,t)))return!0;Dr(e),ms(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Ar(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Dr(e),ms(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=nt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){Re(11)},getPrototypeOf:e=>Ot(e.base_),setPrototypeOf(){Re(12)}},Vt={};function Ar(e,t){const n=e[Ee];return(n?nt(n):e)[t]}function Q_(e,t,n){var r;const o=Uc(t,n);return o?"value"in o?o.value:null==(r=o.get)?void 0:r.call(e.draft_):void 0}function Uc(e,t){if(!(t in e))return;let n=Ot(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ot(n)}}function ms(e){e.modified_||(e.modified_=!0,e.parent_&&ms(e.parent_))}function Dr(e){e.copy_||(e.copy_=fs(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Gt(Js,((e,t)=>{Vt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Vt.deleteProperty=function(e,t){return Vt.set.call(this,e,t,void 0)},Vt.set=function(e,t,n){return Js.set.call(this,e[0],t,n,e[0])};var Z_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&Re(6),void 0!==n&&"function"!=typeof n&&Re(7),He(e)){const o=Ii(this),s=gs(e,void 0);let i=!0;try{r=t(s),i=!1}finally{i?ps(o):hs(o)}return ki(o,n),Ti(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Nc&&(r=void 0),this.autoFreeze_&&Xs(r,!0),n){const t=[],o=[];ut("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Re(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){He(e)||Re(8),Xe(e)&&(e=$c(e));const t=Ii(this),n=gs(e,void 0);return n[Ee].isManual_=!0,hs(t),n}finishDraft(e,t){const n=e&&e[Ee];(!n||!n.isManual_)&&Re(9);const{scope_:r}=n;return ki(r,t),Ti(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=ut("Patches").applyPatches_;return Xe(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function gs(e,t){const n=dr(e)?ut("MapSet").proxyMap_(e,t):fr(e)?ut("MapSet").proxySet_(e,t):J_(e,t);return(t?t.scope_:Fc()).drafts_.push(n),n}function $c(e){return Xe(e)||Re(10,e),Bc(e)}function Bc(e){if(!He(e)||pr(e))return e;const t=e[Ee];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=fs(e,t.scope_.immer_.useStrictShallowCopy_)}else n=fs(e,!0);return Gt(n,((e,t)=>{Lc(n,e,Bc(t))})),t&&(t.finalized_=!1),n}var be=new Z_,jc=be.produce;function ey(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function ty(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function ny(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}be.produceWithPatches.bind(be),be.setAutoFreeze.bind(be),be.setUseStrictShallowCopy.bind(be),be.applyPatches.bind(be),be.createDraft.bind(be),be.finishDraft.bind(be);var Ri=e=>Array.isArray(e)?e:[e];function ry(e){const t=Array.isArray(e[0])?e[0]:e;return ny(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function sy(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var oy=class{constructor(e){this.value=e}deref(){return this.value}},iy=typeof WeakRef<"u"?WeakRef:oy,ay=0,Mi=1;function bn(){return{s:ay,v:void 0,o:null,p:null}}function Qs(e,t={}){let n=bn();const{resultEqualityCheck:r}=t;let o,s=0;function i(){var t;let i=n;const{length:a}=arguments;for(let e=0,t=a;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=i.o;null===e&&(i.o=e=new WeakMap);const n=e.get(t);void 0===n?(i=bn(),e.set(t,i)):i=n}else{let e=i.p;null===e&&(i.p=e=new Map);const n=e.get(t);void 0===n?(i=bn(),e.set(t,i)):i=n}}const c=i;let u;if(i.s===Mi?u=i.v:(u=e.apply(null,arguments),s++),c.s=Mi,r){const e=(null==(t=null==o?void 0:o.deref)?void 0:t.call(o))??o;null!=e&&r(e,u)&&(u=e,0!==s&&s--),o="object"==typeof u&&null!==u||"function"==typeof u?new iy(u):u}return c.v=u,u}return i.clearCache=()=>{n=bn(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function Hc(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,s={},i=e.pop();"object"==typeof i&&(s=i,i=e.pop()),ey(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const a={...n,...s},{memoize:c,memoizeOptions:u=[],argsMemoize:l=Qs,argsMemoizeOptions:d=[],devModeChecks:p={}}=a,h=Ri(u),f=Ri(d),m=ry(e),y=c((function(){return r++,i.apply(null,arguments)}),...h),g=l((function(){o++;const e=sy(m,arguments);return t=y.apply(null,e),t}),...f);return Object.assign(g,{resultFunc:i,memoizedResultFunc:y,dependencies:m,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:c,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var cy=Hc(Qs),uy=Object.assign(((e,t=cy)=>{ty(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>uy}),ly=(...e)=>{const t=Hc(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(Xe(e)?$c(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};function Je(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Se(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>z_(t)&&t.type===e,n}function xi(e){return He(e)?jc(e,(()=>{})):e}function Oi(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error(Se(10));const r=n.insert(t,e);return e.set(t,r),r}function Wc(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Se(28));if(r in t)throw new Error(Se(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function dy(e){return"function"==typeof e}function fy(e,t){let n,[r,o,s]=Wc(t);if(dy(e))n=()=>xi(e());else{const t=xi(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[s]),i.reduce(((e,n)=>{if(n){if(Xe(e)){const r=n(e,t);return void 0===r?e:r}if(He(e))return jc(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(Se(9))}return r}}return e}),e)}return i.getInitialState=n,i}ly(Qs);var py="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",hy=(e=21)=>{let t="",n=e;for(;n--;)t+=py[64*Math.random()|0];return t},my=Symbol.for("rtk-slice-createasyncthunk");function gy(e,t){return`${e}/${t}`}function _y({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[my];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(Se(11));const o=("function"==typeof e.reducers?e.reducers(Ey()):e.reducers)||{},s=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Se(12));if(n in i.sliceCaseReducersByType)throw new Error(Se(13));return i.sliceCaseReducersByType[n]=t,a},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),a),exposeAction:(e,t)=>(i.actionCreators[e]=t,a),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,a)};function c(){const[t={},n=[],r]="function"==typeof e.extraReducers?Wc(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return fy(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}s.forEach((r=>{const s=o[r],i={reducerName:r,type:gy(t,r),createNotation:"function"==typeof e.reducers};vy(s)?ky(i,s,a,n):by(i,s,a)}));const u=e=>e,l=new Map;let d;function p(e,t){return d||(d=c()),d(e,t)}function h(){return d||(d=c()),d.getInitialState()}function f(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=h()),r}function o(t=u){const r=Oi(l,n,{insert:()=>new WeakMap});return Oi(r,t,{insert:()=>{const r={};for(const[o,s]of Object.entries(e.selectors??{}))r[o]=yy(s,t,h,n);return r}})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const m={name:t,reducer:p,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:h,...f(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:p},n),{...m,...f(o,!0)}}};return m}}function yy(e,t,n,r){function o(o,...s){let i=t(o);return typeof i>"u"&&r&&(i=n()),e(i,...s)}return o.unwrapped=e,o}var Sy=_y();function Ey(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function by({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!wy(r))throw new Error(Se(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?Je(e,i):Je(e))}function vy(e){return"asyncThunk"===e._reducerDefinitionType}function wy(e){return"reducerWithPrepare"===e._reducerDefinitionType}function ky({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Se(18));const{payloadCreator:s,fulfilled:i,pending:a,rejected:c,settled:u,options:l}=n,d=o(e,s,l);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),a&&r.addCase(d.pending,a),c&&r.addCase(d.rejected,c),u&&r.addMatcher(d.settled,u),r.exposeCaseReducer(t,{fulfilled:i||vn,pending:a||vn,rejected:c||vn,settled:u||vn})}function vn(){}var Iy=(e,t)=>{if("function"!=typeof e)throw new Error(Se(32))},Zs="listenerMiddleware",Ty=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:s}=e;if(t)o=Je(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Se(21));return Iy(s),{predicate:o,type:t,effect:s}},Cy=Object.assign((e=>{const{type:t,predicate:n,effect:r}=Ty(e);return{id:hy(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Se(22))}}}),{withTypes:()=>Cy}),Ry=Object.assign(Je(`${Zs}/add`),{withTypes:()=>Ry});Je(`${Zs}/removeAll`);var My=Object.assign(Je(`${Zs}/remove`),{withTypes:()=>My});function Se(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const xy=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},Oy=e=>xy(e)&&"type"in e&&"string"==typeof e.type,O=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>Oy(t)&&t.type===e,t};O("remoteReady"),O("askLogin"),O("reselectUser"),O("requestLogout"),O("setConfirmLeavePage"),O("requestChangePath"),O("wsSubscribe"),O("wsUnSubscribe"),O("hostStoreConnect"),O("remoteLogin"),O("remoteLogout"),O("wsOnMessage"),O("setRouterPath"),O("setDeviceType"),O("setDeviceWidth");const Ay=O("setUserError"),Dy=O("setUserIsError"),Ny=O("setUserPending"),Py=O("setUserSuccess"),Ly=O("setUserData"),Fy=O("updateAccountData"),Uy=O("updateUser");O("addNotification"),O("markNotification"),O("setNotificationsError"),O("setNotificationsList"),O("setNotificationsPending"),O("setNotificationsTotalCount"),O("setNotificationsUnreadCount"),O("acceptAllFollowRequests"),O("resetNotificationsState"),O("undoNotification"),O("setInstanceInfo"),O("setInstanceInfoPending"),O("setInstanceInfoError"),O("setPlatformSettings"),O("setProfileSettings"),O("setGroupData"),O("setGroupLoading"),O("requestLocalStorageGet"),O("requestLocalStorageSet"),O("requestLocalStorageRemove"),O("requestLocalStorageClear"),O("requestLocalStorageKeys"),O("requestLocalStorageHas"),O("sendLocalStorageResponse"),O("sendLocalStorageChanged"),Je("requestMicroFrontendFetch"),Je("sendMicroFrontendFetchResponse");const Ai={data:null,isError:!1,isPending:!1,isSuccess:!1},Di=Sy({name:"user",initialState:Ai,reducers:{reset:e=>{Object.assign(e,Ai)}},extraReducers:e=>{e.addCase(Ly,((e,{payload:t})=>{e.data=t})).addCase(Fy,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(Py,((e,{payload:t})=>{e.isSuccess=t})).addCase(Ny,((e,{payload:t})=>{e.isPending=t})).addCase(Dy,((e,{payload:t})=>{e.isError=t})).addCase(Ay,((e,{payload:t})=>{e.error=t})).addCase(Uy,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}}),By=()=>{const e=vi(Di.selectors.selectAccount),t=vi(Di.selectors.selectCurrentUser),{email:n}=e||{},{username:r,id:o}=t||{};ar.useEffect((()=>{n&&r&&o&&Oc({email:n,username:r,userId:o})}),[n,r,o])};export{y_ as logErrorToSentry,$y as sentryClient,By as useSentryUser};
|
|
1
|
+
import{version as Aa,useEffect as Da}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{useSelector as hs}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{createAction as xi,createSlice as Na}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";const B=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Be="8.48.0",N=globalThis;function yn(e,t,n){const r=N,s=r.__SENTRY__=r.__SENTRY__||{},o=s[Be]=s[Be]||{};return o[e]||(o[e]=t())}const ze=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,La="Sentry Logger ",nr=["debug","info","warn","error","log","assert","trace"],rn={};function Ne(e){if(!("console"in N))return e();const t=N.console,n={},r=Object.keys(rn);r.forEach((e=>{const r=rn[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function Pa(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ze?nr.forEach((n=>{t[n]=(...t)=>{e&&Ne((()=>{N.console[n](`${La}[${n}]:`,...t)}))}})):nr.forEach((e=>{t[e]=()=>{}})),t}const E=yn("logger",Pa),Oi=50,$e="?",ms=/\(error: (.*)\)/,gs=/captureMessage|captureException/;function Ai(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const s=[],o=e.split("\n");for(let e=n;e<o.length;e++){const n=o[e];if(n.length>1024)continue;const i=ms.test(n)?n.replace(ms,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){s.push(t);break}}if(s.length>=50+r)break}}return Ua(s.slice(r))}}function Fa(e){return Array.isArray(e)?Ai(...e):e}function Ua(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Bt(t).function||"")&&t.pop(),t.reverse(),gs.test(Bt(t).function||"")&&(t.pop(),gs.test(Bt(t).function||"")&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||Bt(t).filename,function:e.function||$e})))}function Bt(e){return e[e.length-1]||{}}const zn="<anonymous>";function ke(e){try{return e&&"function"==typeof e&&e.name||zn}catch{return zn}}function _s(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}const Qt={},ys={};function qe(e,t){Qt[e]=Qt[e]||[],Qt[e].push(t)}function Ge(e,t){if(!ys[e]){ys[e]=!0;try{t()}catch(t){ze&&E.error(`Error while instrumenting ${e}`,t)}}}function he(e,t){const n=e&&Qt[e];if(n)for(const r of n)try{r(t)}catch(t){ze&&E.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ke(r)}\nError:`,t)}}let qn=null;function Ba(e){const t="error";qe(t,e),Ge(t,$a)}function $a(){qn=N.onerror,N.onerror=function(e,t,n,r,s){return he("error",{column:r,error:s,line:n,msg:e,url:t}),!!qn&&qn.apply(this,arguments)},N.onerror.__SENTRY_INSTRUMENTED__=!0}let Gn=null;function Ha(e){const t="unhandledrejection";qe(t,e),Ge(t,ja)}function ja(){Gn=N.onunhandledrejection,N.onunhandledrejection=function(e){return he("unhandledrejection",e),!Gn||Gn.apply(this,arguments)},N.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Tt(){return Ar(N),N}function Ar(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Be,t[Be]=t[Be]||{}}const Di=Object.prototype.toString;function Dr(e){switch(Di.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return He(e,Error)}}function dt(e,t){return Di.call(e)===`[object ${t}]`}function Ni(e){return dt(e,"ErrorEvent")}function Ss(e){return dt(e,"DOMError")}function Wa(e){return dt(e,"DOMException")}function ve(e){return dt(e,"String")}function Nr(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Lr(e){return null===e||Nr(e)||"object"!=typeof e&&"function"!=typeof e}function nt(e){return dt(e,"Object")}function Sn(e){return typeof Event<"u"&&He(e,Event)}function za(e){return typeof Element<"u"&&He(e,Element)}function qa(e){return dt(e,"RegExp")}function En(e){return!(!e||!e.then||"function"!=typeof e.then)}function Ga(e){return nt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function He(e,t){try{return e instanceof t}catch{return!1}}function Li(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Pr=N,Ya=80;function bn(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=Ka(n,u),!("html"===l||o>1&&i+s.length*c+l.length>=d));)s.push(l),i+=l.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function Ka(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Pr.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&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(s&&s.length)s.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&ve(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function Pi(){try{return Pr.document.location.href}catch{return""}}function Va(e){if(!Pr.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){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 tt(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function Es(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Li(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Xa(e,t,n=!1){return!!ve(e)&&(qa(t)?t.test(e):!!ve(t)&&(n?e===t:e.includes(t)))}function Ct(e,t=[],n=!1){return t.some((t=>Xa(e,t,n)))}function te(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);"function"==typeof s&&Fi(s,r);try{e[t]=s}catch{ze&&E.log(`Failed to replace method "${t}" in object`,e)}}function je(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ze&&E.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Fi(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,je(e,"__sentry_original__",t)}catch{}}function Fr(e){return e.__sentry_original__}function Ui(e){if(Dr(e))return{message:e.message,name:e.name,stack:e.stack,...vs(e)};if(Sn(e)){const t={type:e.type,target:bs(e.target),currentTarget:bs(e.currentTarget),...vs(e)};return typeof CustomEvent<"u"&&He(e,CustomEvent)&&(t.detail=e.detail),t}return e}function bs(e){try{return za(e)?bn(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function vs(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Ja(e,t=40){const n=Object.keys(Ui(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return tt(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:tt(r,t)}return""}function ne(e){return rr(e,new Map)}function rr(e,t){if(Qa(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))typeof e[n]<"u"&&(r[n]=rr(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(rr(e,t))})),r}return e}function Qa(e){if(!nt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}const Bi=1e3;function Rt(){return Date.now()/Bi}function Za(){const{performance:e}=N;if(!e||!e.now)return Rt;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/Bi}const we=Za(),ec=(()=>{const{performance:e}=N;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing&&e.timing.navigationStart,a="number"==typeof i?Math.abs(i+n-r):t;return o||a<t?s<=a?e.timeOrigin:i:r})();function ie(){const e=N,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function $i(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ce(e){const{message:t,event_id:n}=e;if(t)return t;const r=$i(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function sr(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function rt(e,t){const n=$i(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function ws(e){if(tc(e))return!0;try{je(e,"__sentry_captured__",!0)}catch{}return!1}function tc(e){try{return e.__sentry_captured__}catch{}}var Ee;function Te(e){return new ce((t=>{t(e)}))}function sn(e){return new ce(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Ee||(Ee={}));class ce{constructor(e){ce.prototype.__init.call(this),ce.prototype.__init2.call(this),ce.prototype.__init3.call(this),ce.prototype.__init4.call(this),this._state=Ee.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new ce(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new ce(((t,n)=>{let r,s;return this.then((t=>{s=!1,r=t,e&&e()}),(t=>{s=!0,r=t,e&&e()})).then((()=>{s?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(Ee.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Ee.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Ee.PENDING){if(En(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ee.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===Ee.RESOLVED&&e[1](this._value),this._state===Ee.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function nc(e){const t=we(),n={sid:ie(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>sc(n)};return st(n,e),n}function st(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||we(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ie()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t: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),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function rc(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),st(e,n)}function sc(e){return ne({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${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 Is(){return ie()}function ir(){return ie().substring(16)}function vn(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=vn(r[e],t[e],n-1));return r}const or="_sentrySpan";function ks(e,t){t?je(e,or,t):delete e[or]}function ar(e){return e[or]}const ic=100;class Ur{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:Is(),spanId:ir()}}clone(){const e=new Ur;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,ks(e,ar(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&st(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof We?[t.getScopeData(),t.getRequestSession()]:nt(t)?[e,e.requestSession]:[],{tags:s,extra:o,user:i,contexts:a,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),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._requestSession=void 0,this._session=void 0,ks(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Is()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:ic;if(n<=0)return this;const r={timestamp:Rt(),...e},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>n?s.slice(-n):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),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:ar(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=vn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:ir(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:ie();if(!this._client)return E.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:ie();if(!this._client)return E.warn("No client configured on scope - will not capture message!"),r;const s=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:ie();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(E.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const We=Ur;function oc(){return yn("defaultCurrentScope",(()=>new We))}function ac(){return yn("defaultIsolationScope",(()=>new We))}class cc{constructor(e,t){let n,r;n=e||new We,r=t||new We,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return En(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function it(){const e=Ar(Tt());return e.stack=e.stack||new cc(oc(),ac())}function uc(e){return it().withScope(e)}function lc(e,t){const n=it();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Ts(e){return it().withScope((()=>e(it().getIsolationScope())))}function dc(){return{withIsolationScope:Ts,withScope:uc,withSetScope:lc,withSetIsolationScope:(e,t)=>Ts(t),getCurrentScope:()=>it().getScope(),getIsolationScope:()=>it().getIsolationScope()}}function wn(e){const t=Ar(e);return t.acs?t.acs:dc()}function oe(){return wn(Tt()).getCurrentScope()}function _e(){return wn(Tt()).getIsolationScope()}function fc(){return yn("globalScope",(()=>new We))}function pc(...e){const t=wn(Tt());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function K(){return oe().getClient()}function hc(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:s}=t;return ne({trace_id:n,span_id:r,parent_span_id:s})}const mc="_sentryMetrics";function gc(e){const t=e[mc];if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(ne(r));return n}const Hi="sentry.source",_c="sentry.sample_rate",yc="sentry.op",Sc="sentry.origin",Ec=0,bc=1,vc="sentry-",wc=/^sentry-/;function Ic(e){const t=kc(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(wc)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function kc(e){if(e&&(ve(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=Cs(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):Cs(e)}function Cs(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const Tc=1;let Rs=!1;function Cc(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return ne({parent_span_id:r?t:Et(e).parent_span_id,span_id:r?ir():t,trace_id:n})}function Ms(e){return"number"==typeof e?xs(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?xs(e.getTime()):we()}function xs(e){return e>9999999999?e/1e3:e}function Et(e){if(Mc(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(Rc(e)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:a,status:c}=e;return ne({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:Ms(s),timestamp:Ms(i)||void 0,status:Oc(c),op:r[yc],origin:r[Sc],_metrics_summary:gc(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Rc(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function Mc(e){return"function"==typeof e.getSpanJSON}function xc(e){const{traceFlags:t}=e.spanContext();return 1===t}function Oc(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const Ac="_sentryRootSpan";function Br(e){return e[Ac]||e}function ji(){const e=wn(Tt());return e.getActiveSpan?e.getActiveSpan():ar(oe())}function Dc(){Rs||(Ne((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),Rs=!0)}function Nc(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=K(),n=t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}const $r="production",Lc="_frozenDsc";function Wi(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=ne({environment:n.environment||$r,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function Pc(e,t){const n=t.getPropagationContext();return n.dsc||Wi(n.traceId,e)}function zi(e){const t=K();if(!t)return{};const n=Br(e),r=n[Lc];if(r)return r;const s=n.spanContext().traceState,o=s&&s.get("sentry.dsc"),i=o&&Ic(o);if(i)return i;const a=Wi(e.spanContext().traceId,t),c=Et(n),l=c.data||{},u=l[_c];null!=u&&(a.sample_rate=`${u}`);const d=l[Hi],p=c.description;return"url"!==d&&p&&(a.transaction=p),Nc()&&(a.sampled=String(xc(n))),t.emit("createDsc",a,n),a}function cr(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;B&&E.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}const Fc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Uc(e){return"http"===e||"https"===e}function In(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Bc(e){const t=Fc.exec(e);if(!t)return void Ne((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,s="",o="",i="",a=""]=t.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return qi({host:o,pass:s,path:c,projectId:l,port:i,protocol:n,publicKey:r})}function qi(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function $c(e){if(!ze)return!0;const{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(E.error(`Invalid Sentry Dsn: ${t} missing`),!0)))&&(n.match(/^\d+$/)?Uc(r)?!t||!isNaN(parseInt(t,10))||(E.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(E.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(E.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1))}function Hc(e){const t="string"==typeof e?Bc(e):qi(e);if(t&&$c(t))return t}function jc(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}function fe(e,t=100,n=1/0){try{return ur("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Gi(e,t=3,n=102400){const r=fe(e,t);return Gc(r)>n?Gi(e,t-1,n):r}function ur(e,t,n=1/0,r=1/0,s=jc()){const[o,i]=s;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=Wc(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return ur("",l.toJSON(),c-1,r,s)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const p=Ui(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=p[e];u[e]=ur(e,t,c-1,r,s),d++}return i(t),u}function Wc(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)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(Li(t))return"[VueViewModel]";if(Ga(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${ke(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=zc(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function zc(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function qc(e){return~-encodeURI(e).split(/%..|./).length}function Gc(e){return qc(JSON.stringify(e))}function ft(e,t=[]){return[e,t]}function Yc(e,t){const[n,r]=e;return[n,[...r,t]]}function Os(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function lr(e){return N.__SENTRY__&&N.__SENTRY__.encodePolyfill?N.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function Kc(e){const[t,n]=e;let r=JSON.stringify(t);function s(e){"string"==typeof r?r="string"==typeof e?r+e:[lr(r),e]:r.push("string"==typeof e?lr(e):e)}for(const e of n){const[t,n]=e;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(fe(n))}s(e)}}return"string"==typeof r?r:Vc(r)}function Vc(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}function Xc(e){const t="string"==typeof e.data?lr(e.data):e.data;return[ne({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Jc={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function As(e){return Jc[e]}function Hr(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Yi(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:In(r)},...s&&{trace:ne({...s})}}}function Qc(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 Zc(e,t,n,r){const s=Hr(n);return ft({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:In(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}function eu(e,t,n,r){const s=Hr(n),o=e.type&&"replay_event"!==e.type?e.type:"event";Qc(e,n&&n.sdk);const i=Yi(e,s,r,t);return delete e.sdkProcessingMetadata,ft(i,[[{type:o},e]])}function dr(e,t,n,r=0){return new ce(((s,o)=>{const i=e[r];if(null===t||"function"!=typeof i)s(t);else{const a=i({...t},n);B&&i.id&&null===a&&E.log(`Event processor "${i.id}" dropped event`),En(a)?a.then((t=>dr(e,t,n,r+1).then(s))).then(null,o):dr(e,a,n,r+1).then(s).then(null,o)}}))}let $t,Ds,Ht;function tu(e){const t=N._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Ht&&n.length===Ds||(Ds=n.length,Ht=n.reduce(((n,r)=>{$t||($t={});const s=$t[r];if(s)n[s[0]]=s[1];else{const s=e(r);for(let e=s.length-1;e>=0;e--){const o=s[e],i=o&&o.filename,a=t[r];if(i&&a){n[i]=a,$t[r]=[i,a];break}}}return n}),{})),Ht}function nu(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;ru(e,t),r&&ou(e,r),au(e,n),su(e,s),iu(e,o)}function Ns(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:p,transactionName:h,span:m}=t;jt(e,"extra",n),jt(e,"tags",r),jt(e,"user",s),jt(e,"contexts",o),e.sdkProcessingMetadata=vn(e.sdkProcessingMetadata,a,2),i&&(e.level=i),h&&(e.transactionName=h),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function jt(e,t,n){e[t]=vn(e[t],n,1)}function ru(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=ne(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=ne(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=ne(s);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=ne(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),i&&(e.level=i),a&&"transaction"!==e.type&&(e.transaction=a)}function su(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function iu(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function ou(e,t){e.contexts={trace:Cc(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:zi(t),...e.sdkProcessingMetadata};const n=Et(Br(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}function au(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Ki(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ie(),timestamp:t.timestamp||Rt()},l=n.integrations||e.integrations.map((e=>e.name));cu(c,e),du(c,l),s&&s.emit("applyFrameMetadata",t),void 0===t.type&&uu(c,e.stackParser);const u=pu(r,n.captureContext);n.mechanism&&rt(c,n.mechanism);const d=s?s.getEventProcessors():[],p=fc().getScopeData();if(o){Ns(p,o.getScopeData())}if(u){Ns(p,u.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),nu(c,p);return dr([...d,...p.eventProcessors],c,n).then((e=>(e&&lu(e),"number"==typeof i&&i>0?fu(e,i,a):e)))}function cu(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;e.environment=e.environment||n||$r,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s),e.message&&(e.message=tt(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=tt(i.value,o));const a=e.request;a&&a.url&&(a.url=tt(a.url,o))}function uu(e,t){const n=tu(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}function lu(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch{}if(0===Object.keys(t).length)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((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}function du(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function fu(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:fe(e.data,t,n)}})))},...e.user&&{user:fe(e.user,t,n)},...e.contexts&&{contexts:fe(e.contexts,t,n)},...e.extra&&{extra:fe(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=fe(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:fe(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=fe(e.contexts.flags,3,n)),r}function pu(e,t){if(!t)return e;const n=e?e.clone():new We;return n.update(t),n}function jr(e,t){return oe().captureException(e,void 0)}function hu(e,t){const n={captureContext:t};return oe().captureMessage(e,void 0,n)}function Vi(e,t){return oe().captureEvent(e,t)}function Xi(e,t){_e().setContext(e,t)}function mu(e,t){_e().setExtra(e,t)}function gu(e){_e().setUser(e)}function _u(e){_e().addEventProcessor(e)}function Ls(e){const t=K(),n=_e(),r=oe(),{release:s,environment:o=$r}=t&&t.getOptions()||{},{userAgent:i}=N.navigator||{},a=nc({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&"ok"===c.status&&st(c,{status:"exited"}),Ji(),n.setSession(a),r.setSession(a),a}function Ji(){const e=_e(),t=oe(),n=t.getSession()||e.getSession();n&&rc(n),Qi(),e.setSession(),t.setSession()}function Qi(){const e=_e(),t=oe(),n=K(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Ps(e=!1){e?Ji():Qi()}const yu="7";function Su(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Eu(e){return`${Su(e)}${e.projectId}/envelope/`}function bu(e,t){const n={sentry_version:yu};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function vu(e,t,n){return t||`${Eu(e)}?${bu(e,n)}`}const Fs=[];function wu(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}function Iu(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;const s=wu(r),o=s.findIndex((e=>"Debug"===e.name));if(o>-1){const[e]=s.splice(o,1);s.push(e)}return s}function ku(e,t){const n={};return t.forEach((t=>{t&&Zi(e,t,n)})),n}function Us(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Zi(e,t,n){if(n[t.name])B&&E.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Fs.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Fs.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}B&&E.log(`Integration installed: ${t.name}`)}}function Tu(e,t,n){return ft(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:Rt(),discarded_events:e}]])}class me extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}const Bs="Not capturing exception because it's already been captured.";class Cu{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Hc(e.dsn):B&&E.warn("No DSN provided, client will not send events."),this._dsn){const t=vu(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find((t=>t in e&&null==e[t]));t&&Ne((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,n){const r=ie();if(ws(e))return B&&E.log(Bs),r;const s={event_id:r,...t};return this._process(this.eventFromException(e,s).then((e=>this._captureEvent(e,s,n)))),s.event_id}captureMessage(e,t,n,r){const s={event_id:ie(),...n},o=Nr(e)?e:String(e),i=Lr(e)?this.eventFromMessage(o,t,s):this.eventFromException(e,s);return this._process(i.then((e=>this._captureEvent(e,s,r)))),s.event_id}captureEvent(e,t,n){const r=ie();if(t&&t.originalException&&ws(t.originalException))return B&&E.log(Bs),r;const s={event_id:r,...t},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,s,o||n)),s.event_id}captureSession(e){"string"!=typeof e.release?B&&E.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),st(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):Te(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];Zi(this,e,this._integrations),t||Us(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=eu(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Yc(n,Xc(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=Zc(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,s=`${e}:${t}`;B&&E.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(B&&E.error("Error while sending envelope:",e),e))):(B&&E.error("Transport disabled"),Te({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=ku(this,e),Us(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1;const s=t.exception&&t.exception.values;if(s){r=!0;for(const e of s){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(st(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ce((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n=oe(),r=_e()){const s=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Ki(s,e,t,n,this,r).then((e=>{if(null===e)return e;e.contexts={trace:hc(n),...e.contexts};const t=Pc(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(B){const t=e;"log"===t.logLevel?E.log(t.message):E.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:s}=r,o=to(e),i=eo(e),a=e.type||"error",c=`before send for type \`${a}\``,l=typeof s>"u"?void 0:cr(s);if(i&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),sn(new me(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const u="replay_event"===a?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new me("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;return Ru(Mu(this,r,n,t),c)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",u,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new me(`${c} returned \`null\`, will not send event.`,"log")}const s=n&&n.getSession();if(!o&&s&&this._updateSessionFromEvent(s,r),o){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const i=r.transaction_info;if(o&&i&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...i,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{throw e instanceof me?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){B&&E.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(B&&E.log("No outcomes to send"));if(!this._dsn)return void(B&&E.log("No dsn provided, will not send outcomes"));B&&E.log("Sending outcomes:",e);const t=Tu(e,this._options.tunnel&&In(this._dsn));this.sendEnvelope(t)}}function Ru(e,t){const n=`${t} must return \`null\` or a valid event.`;if(En(e))return e.then((e=>{if(!nt(e)&&null!==e)throw new me(n);return e}),(e=>{throw new me(`${t} rejected with ${e}`)}));if(!nt(e)&&null!==e)throw new me(n);return e}function Mu(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=t;if(eo(n)&&s)return s(n,r);if(to(n)){if(n.spans&&i){const t=[];for(const r of n.spans){const n=i(r);n?t.push(n):(Dc(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(o){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(n,r)}}return n}function eo(e){return void 0===e.type}function to(e){return"transaction"===e.type}function xu(e,t){!0===t.debug&&(B?E.enable():Ne((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))),oe().update(t.initialScope);const n=new e(t);return Ou(n),n.init(),n}function Ou(e){oe().setClient(e)}function Au(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return sn(new me("Not adding Promise because buffer limit was reached."));const s=r();return-1===t.indexOf(s)&&t.push(s),s.then((()=>n(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(e){return new ce(((n,r)=>{let s=t.length;if(!s)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Te(e).then((()=>{--s||(clearTimeout(o),n(!0))}),r)}))}))}}}const Du=6e4;function Nu(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?Du:r-t}function Lu(e,t){return e[t]||e.all||0}function no(e,t,n=Date.now()){return Lu(e,t)>n}function ro(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!o||o.split(";").includes("custom"))&&(s[e]=r+a):s[e]=r+a;else s.all=r+a}else i?s.all=r+Nu(i,r):429===t&&(s.all=r+6e4);return s}const Pu=64;function Fu(e,t,n=Au(e.bufferSize||64)){let r={};return{send:function(s){const o=[];if(Os(s,((t,n)=>{const s=As(n);if(no(r,s)){const r=$s(t,n);e.recordDroppedEvent("ratelimit_backoff",s,r)}else o.push(t)})),0===o.length)return Te({});const i=ft(s[0],o),a=t=>{Os(i,((n,r)=>{const s=$s(n,r);e.recordDroppedEvent(t,As(r),s)}))};return n.add((()=>t({body:Kc(i)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&B&&E.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=ro(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof me)return B&&E.error("Skipped sending event because buffer is full."),a("queue_overflow"),Te({});throw e}))},flush:e=>n.drain(e)}}function $s(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Uu(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return $u(e,n)||Bu(e,r)}function Bu(e,t){return!!t&&Hs(e)===Hs(t)}function $u(e,t){return!!t&&e.includes(t.host)}function Hs(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function so(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:Be}))),version:Be}),e._metadata=s}const Hu=100;function De(e,t){const n=K(),r=_e();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Hu}=n.getOptions();if(o<=0)return;const i={timestamp:Rt(),...e},a=s?Ne((()=>s(i,t))):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}let js;const ju="FunctionToString",Ws=new WeakMap,Wu=()=>({name:ju,setupOnce(){js=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Fr(this),n=Ws.has(K())&&void 0!==t?t:this;return js.apply(n,e)}}catch{}},setup(e){Ws.set(e,!0)}}),zu=Wu,qu=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],Gu="InboundFilters",Yu=(e={})=>({name:Gu,processEvent(t,n,r){const s=r.getOptions();return Xu(t,Vu(e,s))?null:t}}),Ku=Yu;function Vu(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:qu],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}function Xu(e,t){return t.ignoreInternal&&nl(e)?(B&&E.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Ce(e)}`),!0):Ju(e,t.ignoreErrors)?(B&&E.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Ce(e)}`),!0):sl(e)?(B&&E.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Ce(e)}`),!0):Qu(e,t.ignoreTransactions)?(B&&E.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Ce(e)}`),!0):Zu(e,t.denyUrls)?(B&&E.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Ce(e)}.\nUrl: ${on(e)}`),!0):!el(e,t.allowUrls)&&(B&&E.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Ce(e)}.\nUrl: ${on(e)}`),!0)}function Ju(e,t){return!(e.type||!t||!t.length)&&tl(e).some((e=>Ct(e,t)))}function Qu(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Ct(n,t)}function Zu(e,t){if(!t||!t.length)return!1;const n=on(e);return!!n&&Ct(n,t)}function el(e,t){if(!t||!t.length)return!0;const n=on(e);return!n||Ct(n,t)}function tl(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function nl(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}function rl(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}function on(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?rl(t):null}catch{return B&&E.error(`Cannot extract url for event ${Ce(e)}`),null}}function sl(e){return!(e.type||!e.exception||!e.exception.values||0===e.exception.values.length)&&(!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)))}function il(e,t,n=250,r,s,o,i){if(!(o.exception&&o.exception.values&&i&&He(i.originalException,Error)))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=ol(fr(e,t,s,i.originalException,r,o.exception.values,a,0),n))}function fr(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(He(r[s],Error)){zs(i,a);const o=e(t,r[s]),l=c.length;qs(o,s,l,a),c=fr(e,t,n,r[s],s,[o,...c],o,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(He(r,Error)){zs(i,a);const l=e(t,r),u=c.length;qs(l,`errors[${o}]`,u,a),c=fr(e,t,n,r,s,[l,...c],l,u)}})),c}function zs(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function qs(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 ol(e,t){return e.map((e=>(e.value&&(e.value=tt(e.value,t)),e)))}function Yn(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 al(e){const t="console";qe(t,e),Ge(t,cl)}function cl(){"console"in N&&nr.forEach((function(e){e in N.console&&te(N.console,e,(function(t){return rn[e]=t,function(...t){he("console",{args:t,level:e});const n=rn[e];n&&n.apply(N.console,t)}}))}))}function io(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ul="Dedupe",ll=()=>{let e;return{name:ul,processEvent(t){if(t.type)return t;try{if(dl(t,e))return B&&E.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},oo=ll;function dl(e,t){return!!t&&!(!fl(e,t)&&!pl(e,t))}function fl(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!co(e,t)||!ao(e,t))}function pl(e,t){const n=Gs(t),r=Gs(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&co(e,t)&&ao(e,t))}function ao(e,t){let n=_s(e),r=_s(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],s=n[e];if(t.filename!==s.filename||t.lineno!==s.lineno||t.colno!==s.colno||t.function!==s.function)return!1}return!0}function co(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Gs(e){return e.exception&&e.exception.values&&e.exception.values[0]}function uo(e){if(void 0!==e)return e>=400&&e<500?"warning":e>=500?"error":void 0}const pr=N;function lo(){if(!("fetch"in pr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function hr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function hl(){if("string"==typeof EdgeRuntime)return!0;if(!lo())return!1;if(hr(pr.fetch))return!0;let e=!1;const t=pr.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=hr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ze&&E.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}function ml(e,t){const n="fetch";qe(n,e),Ge(n,(()=>gl(void 0,t)))}function gl(e,t=!1){t&&!hl()||te(N,"fetch",(function(e){return function(...t){const n=new Error,{method:r,url:s}=_l(t),o={args:t,fetchData:{method:r,url:s},startTimestamp:1e3*we(),virtualError:n};return he("fetch",{...o}),e.apply(N,t).then((async e=>(he("fetch",{...o,endTimestamp:1e3*we(),response:e}),e)),(e=>{throw he("fetch",{...o,endTimestamp:1e3*we(),error:e}),Dr(e)&&void 0===e.stack&&(e.stack=n.stack,je(e,"framesToPop",1)),e}))}}))}function mr(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Ys(e){return"string"==typeof e?e:e?mr(e,"url")?e.url:e.toString?e.toString():"":""}function _l(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Ys(t),method:mr(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Ys(t),method:mr(t,"method")?String(t.method).toUpperCase():"GET"}}function yl(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Sl(){return"npm"}function El(){return!yl()&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function Ks(){return typeof window<"u"&&(!El()||bl())}function bl(){const e=N.process;return!!e&&"renderer"===e.type}const Wt=N;function vl(){const e=Wt.chrome,t=e&&e.app&&e.app.runtime,n="history"in Wt&&!!Wt.history.pushState&&!!Wt.history.replaceState;return!t&&n}function wl(e,t){return e??t()}function Zt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const $=N;let gr=0;function fo(){return gr>0}function Il(){gr++,setTimeout((()=>{gr--}))}function ot(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(Fr(e))return e}catch{return e}const n=function(...n){try{const r=n.map((e=>ot(e,t)));return e.apply(this,r)}catch(e){throw Il(),pc((r=>{r.addEventProcessor((e=>(t.mechanism&&(sr(e,void 0),rt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),jr(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Fi(n,e),je(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const Mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Wr(e,t){const n=zr(e,t),r={type:Ml(t),value:xl(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function kl(e,t,n,r){const s=K(),o=s&&s.getOptions().normalizeDepth,i=Ll(t),a={__serialized__:Gi(t,o)};if(i)return{exception:{values:[Wr(e,i)]},extra:a};const c={exception:{values:[{type:Sn(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Dl(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=zr(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Kn(e,t){return{exception:{values:[Wr(e,t)]}}}function zr(e,t){const n=t.stacktrace||t.stack||"",r=Cl(t),s=Rl(t);try{return e(n,r,s)}catch{}return[]}const Tl=/Minified React error #\d+;/i;function Cl(e){return e&&Tl.test(e.message)?1:0}function Rl(e){return"number"==typeof e.framesToPop?e.framesToPop:0}function po(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"&&e instanceof WebAssembly.Exception}function Ml(e){const t=e&&e.name;return!t&&po(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function xl(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:po(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function Ol(e,t,n,r){const s=qr(e,t,n&&n.syntheticException||void 0,r);return rt(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Te(s)}function Al(e,t,n="info",r,s){const o=_r(e,t,r&&r.syntheticException||void 0,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Te(o)}function qr(e,t,n,r,s){let o;if(Ni(t)&&t.error)return Kn(e,t.error);if(Ss(t)||Wa(t)){const s=t;if("stack"in t)o=Kn(e,t);else{const t=s.name||(Ss(s)?"DOMError":"DOMException"),i=s.message?`${t}: ${s.message}`:t;o=_r(e,i,n,r),sr(o,i)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return Dr(t)?Kn(e,t):nt(t)||Sn(t)?(o=kl(e,t,n,s),rt(o,{synthetic:!0}),o):(o=_r(e,t,n,r),sr(o,`${t}`),rt(o,{synthetic:!0}),o)}function _r(e,t,n,r){const s={};if(r&&n){const r=zr(e,n);r.length&&(s.exception={values:[{value:t,stacktrace:{frames:r}}]}),rt(s,{synthetic:!0})}if(Nr(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return s.logentry={message:e,params:n},s}return s.message=t,s}function Dl(e,{isUnhandledRejection:t}){const n=Ja(e),r=t?"promise rejection":"exception";return Ni(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Sn(e)?`Event \`${Nl(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Nl(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ll(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function Pl(e,{metadata:t,tunnel:n,dsn:r}){return ft({event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:In(r)}},[Fl(e)])}function Fl(e){return[{type:"user_report"},e]}class Ul extends Cu{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};so(t,"browser",["browser"],$.SENTRY_SDK_SOURCE||Sl()),super(t),t.sendClientReports&&$.document&&$.document.addEventListener("visibilitychange",(()=>{"hidden"===$.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return Ol(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return Al(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Mt&&E.warn("SDK not enabled, will not capture user feedback."));const t=Pl(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const ho=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Bl=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",xt=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s||0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=Bl(t.value,n),e(t)))}},M=N,$l=()=>`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,mo=(e=!0)=>{const t=M.performance&&M.performance.getEntriesByType&&M.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Gr=()=>{const e=mo();return e&&e.activationStart||0},Ot=(e,t)=>{const n=mo();let r="navigate";return n&&(M.document&&M.document.prerendering||Gr()>0?r="prerender":M.document&&M.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:$l(),navigationType:r}},Ye=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},At=e=>{const t=t=>{("pagehide"===t.type||M.document&&"hidden"===M.document.visibilityState)&&e(t)};M.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},kn=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let mt=-1;const Hl=()=>"hidden"!==M.document.visibilityState||M.document.prerendering?1/0:0,an=e=>{"hidden"===M.document.visibilityState&&mt>-1&&(mt="visibilitychange"===e.type?e.timeStamp:0,Wl())},jl=()=>{addEventListener("visibilitychange",an,!0),addEventListener("prerenderingchange",an,!0)},Wl=()=>{removeEventListener("visibilitychange",an,!0),removeEventListener("prerenderingchange",an,!0)},Yr=()=>(M.document&&mt<0&&(mt=Hl(),jl()),{get firstHiddenTime(){return mt}}),Tn=e=>{M.document&&M.document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},zl=[1800,3e3],ql=(e,t={})=>{Tn((()=>{const n=Yr(),r=Ot("FCP");let s;const o=Ye("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Gr(),0),r.entries.push(e),s(!0)))}))}));o&&(s=xt(e,r,zl,t.reportAllChanges))}))},Gl=[.1,.25],Yl=(e,t={})=>{ql(kn((()=>{const n=Ot("CLS",0);let r,s=0,o=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=o[0],n=o[o.length-1];s&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,o.push(e)):(s=e.value,o=[e])}})),s>n.value&&(n.value=s,n.entries=o,r())},a=Ye("layout-shift",i);a&&(r=xt(e,n,Gl,t.reportAllChanges),At((()=>{i(a.takeRecords()),r(!0)})),setTimeout(r,0))})))},Kl=[100,300],Vl=(e,t={})=>{Tn((()=>{const n=Yr(),r=Ot("FID");let s;const o=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),s(!0))},i=e=>{e.forEach(o)},a=Ye("first-input",i);s=xt(e,r,Kl,t.reportAllChanges),a&&At(kn((()=>{i(a.takeRecords()),a.disconnect()})))}))};let go=0,Vn=1/0,zt=0;const Xl=e=>{e.forEach((e=>{e.interactionId&&(Vn=Math.min(Vn,e.interactionId),zt=Math.max(zt,e.interactionId),go=zt?(zt-Vn)/7+1:0)}))};let yr;const Jl=()=>yr?go:performance.interactionCount||0,Ql=()=>{"interactionCount"in performance||yr||(yr=Ye("event",Xl,{type:"event",buffered:!0,durationThreshold:0}))},be=[],Xn=new Map,Zl=40;let ed=0;const td=()=>Jl()-ed,nd=()=>{const e=Math.min(be.length-1,Math.floor(td()/50));return be[e]},Jn=10,rd=[],sd=e=>{if(rd.forEach((t=>t(e))),!e.interactionId&&"first-input"!==e.entryType)return;const t=be[be.length-1],n=Xn.get(e.interactionId);if(n||be.length<10||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};Xn.set(t.id,t),be.push(t)}be.sort(((e,t)=>t.latency-e.latency)),be.length>10&&be.splice(10).forEach((e=>Xn.delete(e.id)))}},_o=e=>{const t=M.requestIdleCallback||M.setTimeout;let n=-1;return e=kn(e),M.document&&"hidden"===M.document.visibilityState?e():(n=t(e),At(e)),n},id=[200,500],od=(e,t={})=>{"PerformanceEventTiming"in M&&"interactionId"in PerformanceEventTiming.prototype&&Tn((()=>{Ql();const n=Ot("INP");let r;const s=e=>{_o((()=>{e.forEach(sd);const t=nd();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())}))},o=Ye("event",s,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=xt(e,n,id,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),At((()=>{s(o.takeRecords()),r(!0)})))}))},ad=[2500,4e3],Vs={},cd=(e,t={})=>{Tn((()=>{const n=Yr(),r=Ot("LCP");let s;const o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach((e=>{e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Gr(),0),r.entries=[e],s())}))},i=Ye("largest-contentful-paint",o);if(i){s=xt(e,r,ad,t.reportAllChanges);const n=kn((()=>{Vs[r.id]||(o(i.takeRecords()),i.disconnect(),Vs[r.id]=!0,s(!0))}));["keydown","click"].forEach((e=>{M.document&&addEventListener(e,(()=>_o(n)),{once:!0,capture:!0})})),At(n)}}))},gt={},cn={};let yo,So,Eo,bo;function ud(e,t=!1){return Cn("cls",e,hd,yo,t)}function ld(e,t=!1){return Cn("lcp",e,gd,Eo,t)}function dd(e){return Cn("fid",e,md,So)}function fd(e){return Cn("inp",e,_d,bo)}function pd(e,t){return vo(e,t),cn[e]||(yd(e),cn[e]=!0),wo(e,t)}function Dt(e,t){const n=gt[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){ho&&E.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ke(r)}\nError:`,t)}}function hd(){return Yl((e=>{Dt("cls",{metric:e}),yo=e}),{reportAllChanges:!0})}function md(){return Vl((e=>{Dt("fid",{metric:e}),So=e}))}function gd(){return cd((e=>{Dt("lcp",{metric:e}),Eo=e}),{reportAllChanges:!0})}function _d(){return od((e=>{Dt("inp",{metric:e}),bo=e}))}function Cn(e,t,n,r,s=!1){let o;return vo(e,t),cn[e]||(o=n(),cn[e]=!0),r&&t({metric:r}),wo(e,t,s?o:void 0)}function yd(e){const t={};"event"===e&&(t.durationThreshold=0),Ye(e,(t=>{Dt(e,{entries:t})}),t)}function vo(e,t){gt[e]=gt[e]||[],gt[e].push(t)}function wo(e,t,n){return()=>{n&&n();const r=gt[e];if(!r)return;const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}const Sd=1e3;let Xs,Sr,Er,qt;function Io(e){qe("dom",e),Ge("dom",Ed)}function Ed(){if(!M.document)return;const e=he.bind(null,"dom"),t=Js(e,!0);M.document.addEventListener("click",t,!1),M.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=M[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(te(r,"addEventListener",(function(t){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=Js(e);o.handler=r,t.call(this,n,r,s)}o.refCount++}catch{}return t.call(this,n,r,s)}})),te(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,r),s.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function bd(e){if(e.type!==Sr)return!1;try{if(!e.target||e.target._sentryId!==Er)return!1}catch{}return!0}function vd(e,t){return"keypress"===e&&(!t||!t.tagName||!("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}function Js(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=wd(n);if(vd(n.type,r))return;je(n,"_sentryCaptured",!0),r&&!r._sentryId&&je(r,"_sentryId",ie());const s="keypress"===n.type?"input":n.type;bd(n)||(e({event:n,name:s,global:t}),Sr=n.type,Er=r?r._sentryId:void 0),clearTimeout(Xs),Xs=M.setTimeout((()=>{Er=void 0,Sr=void 0}),Sd)}}function wd(e){try{return e.target}catch{return null}}function Kr(e){const t="history";qe(t,e),Ge(t,Id)}function Id(){if(!vl())return;const e=M.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=qt,t=String(n);qt=t,he("history",{from:e,to:t})}return e.apply(this,t)}}M.onpopstate=function(...t){const n=M.location.href,r=qt;if(qt=n,he("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},te(M.history,"pushState",t),te(M.history,"replaceState",t)}const en={};function ko(e){const t=en[e];if(t)return t;let n=M[e];if(hr(n))return en[e]=n.bind(M);const r=M.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(t)}catch(t){ho&&E.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(en[e]=n.bind(M))}function Qs(e){en[e]=void 0}function at(...e){return ko("setTimeout")(...e)}const Xe="__sentry_xhr_v3__";function kd(e){qe("xhr",e),Ge("xhr",Td)}function Td(){if(!M.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,s=1e3*we(),o=ve(n[0])?n[0].toUpperCase():void 0,i=Cd(n[1]);if(!o||!i)return e.apply(t,n);t[Xe]={method:o,url:i,request_headers:{}},"POST"===o&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[Xe];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}he("xhr",{endTimestamp:1e3*we(),startTimestamp:s,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,s]=n,o=t[Xe];return o&&ve(r)&&ve(s)&&(o.request_headers[r.toLowerCase()]=s),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Xe];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return he("xhr",{startTimestamp:1e3*we(),xhr:t}),e.apply(t,n)}})}function Cd(e){if(ve(e))return e;try{return e.toString()}catch{}}function Rd(e,t=ko("fetch")){let n=0,r=0;return Fu(e,(function(s){const o=s.body.length;n+=o,r++;const i={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Qs("fetch"),sn("No fetch implementation available");try{return t(e.url,i).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return Qs("fetch"),n-=o,r--,sn(e)}}))}const Md=30,xd=50;function br(e,t,n,r){const s={filename:e,function:"<anonymous>"===t?$e:t,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const Od=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ad=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Dd=/\((\S*)(?::(\d+))(?::(\d+))\)/,Nd=e=>{const t=Od.exec(e);if(t){const[,e,n,r]=t;return br(e,$e,+n,+r)}const n=Ad.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Dd.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=To(n[1]||$e,n[2]);return br(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Ld=[30,Nd],Pd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Fd=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ud=e=>{const t=Pd.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Fd.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||$e;return[n,e]=To(n,e),br(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Bd=[50,Ud],$d=[Ld,Bd],Hd=Ai(...$d),To=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:$e,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Gt=1024,jd="Breadcrumbs",Wd=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:jd,setup(e){t.console&&al(Yd(e)),t.dom&&Io(Gd(e,t.dom)),t.xhr&&kd(Kd(e)),t.fetch&&ml(Vd(e)),t.history&&Kr(Xd(e)),t.sentry&&e.on("beforeSendEvent",qd(e))}}},zd=Wd;function qd(e){return function(t){K()===e&&De({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Ce(t)},{event:t})}}function Gd(e,t){return function(n){if(K()!==e)return;let r,s,o="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>Gt&&(Mt&&E.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Gt),"string"==typeof o&&(o=[o]);try{const e=n.event,t=Jd(e)?e.target:e;r=bn(t,{keyAttrs:o,maxStringLength:i}),s=Va(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),De(a,{event:n.event,name:n.name,global:n.global})}}function Yd(e){return function(t){if(K()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:io(t.level),message:Es(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${Es(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}De(n,{input:t.args,level:t.level})}}function Kd(e){return function(t){if(K()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,s=t.xhr[Xe];if(!n||!r||!s)return;const{method:o,url:i,status_code:a,body:c}=s,l={method:o,url:i,status_code:a},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};De({category:"xhr",data:l,type:"http",level:uo(a)},u)}}function Vd(e){return function(t){if(K()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){De({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response,s={...t.fetchData,status_code:e&&e.status},o={input:t.args,response:e,startTimestamp:n,endTimestamp:r};De({category:"fetch",data:s,type:"http",level:uo(s.status_code)},o)}}}function Xd(e){return function(t){if(K()!==e)return;let n=t.from,r=t.to;const s=Yn($.location.href);let o=n?Yn(n):void 0;const i=Yn(r);(!o||!o.path)&&(o=s),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),De({category:"navigation",data:{from:n,to:r}})}}function Jd(e){return!!e&&!!e.target}const Qd=["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"],Zd="BrowserApiErrors",ef=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Zd,setupOnce(){t.setTimeout&&te($,"setTimeout",Zs),t.setInterval&&te($,"setInterval",Zs),t.requestAnimationFrame&&te($,"requestAnimationFrame",tf),t.XMLHttpRequest&&"XMLHttpRequest"in $&&te(XMLHttpRequest.prototype,"send",nf);const e=t.eventTarget;e&&(Array.isArray(e)?e:Qd).forEach(rf)}}},Co=ef;function Zs(e){return function(...t){const n=t[0];return t[0]=ot(n,{mechanism:{data:{function:ke(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function tf(e){return function(t){return e.apply(this,[ot(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ke(e)},handled:!1,type:"instrument"}})])}}function nf(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&te(n,e,(function(t){const n={mechanism:{data:{function:e,handler:ke(t)},handled:!1,type:"instrument"}},r=Fr(t);return r&&(n.mechanism.data.handler=ke(r)),ot(t,n)}))})),e.apply(this,t)}}function rf(e){const t=$[e],n=t&&t.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(te(n,"addEventListener",(function(t){return function(n,r,s){try{sf(r)&&(r.handleEvent=ot(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ke(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,ot(r,{mechanism:{data:{function:"addEventListener",handler:ke(r),target:e},handled:!1,type:"instrument"}}),s])}})),te(n,"removeEventListener",(function(e){return function(t,n,r){try{const s=n.__sentry_wrapped__;s&&e.call(this,t,s,r)}catch{}return e.call(this,t,n,r)}})))}function sf(e){return"function"==typeof e.handleEvent}const of=()=>({name:"BrowserSession",setupOnce(){typeof $.document>"u"?Mt&&E.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(Ls({ignoreDuration:!0}),Ps(),Kr((({from:e,to:t})=>{void 0!==e&&e!==t&&(Ls({ignoreDuration:!0}),Ps())})))}}),af="GlobalHandlers",cf=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:af,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(lf(e),ei("onerror")),t.onunhandledrejection&&(df(e),ei("onunhandledrejection"))}}},uf=cf;function lf(e){Ba((t=>{const{stackParser:n,attachStacktrace:r}=Ro();if(K()!==e||fo())return;const{msg:s,url:o,line:i,column:a,error:c}=t,l=hf(qr(n,c||s,void 0,r,!1),o,i,a);l.level="error",Vi(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})}))}function df(e){Ha((t=>{const{stackParser:n,attachStacktrace:r}=Ro();if(K()!==e||fo())return;const s=ff(t),o=Lr(s)?pf(s):qr(n,s,void 0,r,!0);o.level="error",Vi(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}function ff(e){if(Lr(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 pf(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function hf(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],l=r,u=n,d=ve(t)&&t.length>0?t:Pi();return 0===c.length&&c.push({colno:l,filename:d,function:$e,in_app:!0,lineno:u}),e}function ei(e){Mt&&E.log(`Global Handler attached: ${e}`)}function Ro(){const e=K();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const mf=()=>({name:"HttpContext",preprocessEvent(e){if(!$.navigator&&!$.location&&!$.document)return;const t=e.request&&e.request.url||$.location&&$.location.href,{referrer:n}=$.document||{},{userAgent:r}=$.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),gf="cause",_f=5,yf="LinkedErrors",Sf=(e={})=>{const t=e.limit||5,n=e.key||gf;return{name:yf,preprocessEvent(e,r,s){const o=s.getOptions();il(Wr,o.stackParser,o.maxValueLength,n,t,e,r)}}},Ef=Sf;function bf(e){const t=[Ku(),zu(),Co(),zd(),uf(),Ef(),oo(),mf()];return!1!==e.autoSessionTracking&&t.push(of()),t}function vf(e={}){const t={defaultIntegrations:bf(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:$.SENTRY_RELEASE&&$.SENTRY_RELEASE.id?$.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}function wf(){const e=typeof $.window<"u"&&$;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,r=$.location&&$.location.href||"",s=!!n&&$===$.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>r.startsWith(`${e}//`))),o=typeof e.nw<"u";return!!n&&!s&&!o}function If(e={}){const t=vf(e);if(!t.skipBrowserExtensionCheck&&wf())return void Ne((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));Mt&&(lo()||E.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:Fa(t.stackParser||Hd),integrations:Iu(t),transport:t.transport||Rd};return xu(Ul,n)}const j=N,Vr="sentryReplaySession",kf="replay_event",Xr="Unable to send Replay",Tf=3e5,Cf=9e5,Rf=5e3,Mf=5500,xf=6e4,Of=5e3,Af=3,ti=15e4,Yt=5e3,Df=3e3,Nf=300,Jr=2e7,Lf=4999,Pf=15e3,ni=36e5;function vr(e,t){return e??t()}function bt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}var Q;function Ff(e){return e.nodeType===e.ELEMENT_NODE}function _t(e){const t=bt([e,"optionalAccess",e=>e.host]);return bt([t,"optionalAccess",e=>e.shadowRoot])===e}function yt(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Uf(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 Bf(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 un(e){try{const t=e.rules||e.cssRules;return t?Uf(Array.from(t,Mo).join("")):null}catch{return null}}function $f(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],o=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function Mo(e){let t;if(jf(e))try{t=un(e.styleSheet)||Bf(e)}catch{}else if(Wf(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=$f(e)),n&&(t=Hf(t)),n||r)return t}return t||e.cssText}function Hf(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function jf(e){return"styleSheet"in e}function Wf(e){return"selectorText"in e}!function(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"}(Q||(Q={}));class xo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return vr(bt([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),(()=>-1))}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function zf(){return new xo}function Rn({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function vt({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function ct(e){return e.toLowerCase()}function wr(e){return e.toUpperCase()}const ri="__rrweb_original__";function qf(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const s=t.getImageData,o=ri in s?s[ri]:s;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0}function Qr(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ct(t):null}function ln(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Oo(e,t){let n;try{n=new URL(e,vr(t,(()=>window.location.href)))}catch{return null}return vr(bt([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),(()=>null))}const si={};function Ao(e){const t=si[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return si[e]=r.bind(window)}function Ir(...e){return Ao("setTimeout")(...e)}function Do(...e){return Ao("clearTimeout")(...e)}function No(e){try{return e.contentDocument}catch{}}let Gf=1;const Yf=new RegExp("[^a-z0-9-_:]"),wt=-2;function Zr(){return Gf++}function Kf(e){if(e instanceof HTMLFormElement)return"form";const t=ct(e.tagName);return Yf.test(t)?"div":t}function Vf(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}let Ke,ii;const Xf=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Jf=/^(?:[a-z+]+:)?\/\//i,Qf=/^www\..*/i,Zf=/^(data:)([^,]*),(.*)/i;function dn(e,t){return(e||"").replace(Xf,((e,n,r,s,o,i)=>{const a=r||o||i,c=n||s||"";if(!a)return e;if(Jf.test(a)||Qf.test(a))return`url(${c}${a}${c})`;if(Zf.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${Vf(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`}))}const ep=/^[^ \t\n\r\u000c]+/,tp=/^[, \t\n\r\u000c]+/;function np(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const s=e.exec(t.substring(n));return s?(r=s[0],n+=r.length,r):""}const s=[];for(;r(tp),!(n>=t.length);){let o=r(ep);if(","===o.slice(-1))o=Je(e,o.substring(0,o.length-1)),s.push(o);else{let r="";o=Je(e,o);let i=!1;for(;;){const e=t.charAt(n);if(""===e){s.push((o+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,s.push((o+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return s.join(", ")}const oi=new WeakMap;function Je(e,t){return t&&""!==t.trim()?Mn(e,t):t}function rp(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function Mn(e,t){let n=oi.get(e);if(n||(n=e.createElement("a"),oi.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Lo(e,t,n,r,s,o){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&("table"===t||"td"===t||"th"===t)?Je(e,r):"srcset"===n?np(e,r):"style"===n?dn(r,Mn(e)):"object"===t&&"data"===n?Je(e,r):"function"==typeof o?o(n,r,s):r)}function Po(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function sp(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function ip(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ue(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ue(e.parentNode,t,n,r+1)}function Qe(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(ip(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function ut(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(o){if(c=Ue(i,Qe(r,s)),c<0)return!0;a=Ue(i,Qe(t,n),c>=0?c:1/0)}else{if(a=Ue(i,Qe(t,n)),a<0)return!1;c=Ue(i,Qe(r,s),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!o}catch{}return!!o}function op(e,t,n){const r=e.contentWindow;if(!r)return;let s,o=!1;try{s=r.document.readyState}catch{return}if("complete"!==s){const r=Ir((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{Do(r),o=!0,t()}))}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return Ir(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function ap(e,t,n){let r,s=!1;try{r=e.sheet}catch{return}if(r)return;const o=Ir((()=>{s||(t(),s=!0)}),n);e.addEventListener("load",(()=>{Do(o),s=!0,t()}))}function cp(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:m={},maskTextFn:f,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1}=t,k=up(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Q.Document,childNodes:[],compatMode:e.compatMode}:{type:Q.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Q.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return dp(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:y,inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:k,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return lp(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:f,maskInputOptions:m,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:Q.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:Q.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function up(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}function lp(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,m="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||bt([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=un(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=dn(p,Mn(t.doc))}m&&(p="SCRIPT_PLACEHOLDER");const g=ut(e,r,o,s,i,n);if(!h&&!m&&!f&&p&&g&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),f&&p&&(c.textarea||g)&&(p=l?l(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p){p=vt({isMasked:ut(e,r,o,s,i,Rn({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:l})}return{type:Q.Text,textContent:p||"",isStyle:h,rootId:u}}function dp(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:f,maskAllText:g,maskTextClass:y,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:b}=t,S=sp(e,r,s,o),k=Kf(e);let E={};const w=e.attributes.length;for(let t=0;t<w;t++){const r=e.attributes[t];r.name&&!Po(k,r.name,r.value)&&(E[r.name]=Lo(n,k,ct(r.name),r.value,e,c))}if("link"===k&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=un(t)),r&&(E.rel=null,E.href=null,E.crossorigin=null,E._cssText=dn(r,t.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=un(e.sheet);t&&(E._cssText=dn(t,Mn(n)))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const t=e,n=Qr(t),r=ln(t,wr(k),n),s=t.checked;if("submit"!==n&&"button"!==n&&r){const e=ut(t,y,v,_,b,Rn({type:n,tagName:wr(k),maskInputOptions:a}));E.value=vt({isMasked:e,element:t,value:r,maskInputFn:l})}s&&(E.checked=s)}if("option"===k&&(e.selected&&!a.select?E.selected=!0:delete E.selected),"canvas"===k&&p)if("2d"===e.__context)qf(e)||(E.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(u.type,u.quality)&&(E.rr_dataURL=t)}if("img"===k&&d){Ke||(Ke=n.createElement("canvas"),ii=Ke.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",s=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{Ke.width=t.naturalWidth,Ke.height=t.naturalHeight,ii.drawImage(t,0,0),E.rr_dataURL=Ke.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(s?E.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if(("audio"===k||"video"===k)&&(E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(E.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(E.rr_scrollTop=e.scrollTop)),S){const{width:t,height:n}=e.getBoundingClientRect();E={class:E.class,rr_width:`${t}px`,rr_height:`${n}px`}}let I;"iframe"===k&&!h(E.src)&&(!S&&!No(e)&&(E.rr_src=E.src),delete E.src);try{customElements.get(k)&&(I=!0)}catch{}return{type:Q.Element,tagName:k,attributes:E,childNodes:[],isSVG:rp(e)||void 0,needBlock:S,rootId:f,isCustom:I}}function H(e){return null==e?"":e.toLowerCase()}function fp(e,t){if(t.comment&&e.type===Q.Comment)return!0;if(e.type===Q.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Oo(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===H(e.attributes.name)||"icon"===H(e.attributes.rel)||"apple-touch-icon"===H(e.attributes.rel)||"shortcut icon"===H(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===H(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===H(e.attributes.name)||"googlebot"===H(e.attributes.name)||"bingbot"===H(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===H(e.attributes.name)||"generator"===H(e.attributes.name)||"framework"===H(e.attributes.name)||"publisher"===H(e.attributes.name)||"progid"===H(e.attributes.name)||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===H(e.attributes.name)||"yandex-verification"===H(e.attributes.name)||"csrf-token"===H(e.attributes.name)||"p:domain_verify"===H(e.attributes.name)||"verify-v1"===H(e.attributes.name)||"verification"===H(e.attributes.name)||"shopify-checkout-api-token"===H(e.attributes.name)))return!0}}return!1}function Ze(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w=5e3,onStylesheetLoad:I,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:C=!1}=t;let{preserveWhiteSpace:M=!0}=t;const R=cp(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:T,newlyAddedElement:C});if(!R)return console.warn(e,"not serialized"),null;let A;A=r.hasNode(e)?r.getId(e):fp(R,_)||!M&&R.type===Q.Text&&!R.isStyle&&!R.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Zr();const O=Object.assign(R,{id:A});if(r.add(e,O),-2===A)return null;k&&k(e);let N=!p;if(O.type===Q.Element){N=N&&!O.needBlock,delete O.needBlock;const t=e.shadowRoot;t&&yt(t)&&(O.isShadowHost=!0)}if((O.type===Q.Document||O.type===Q.Element)&&N){_.headWhitespace&&O.type===Q.Element&&"head"===O.tagName&&(M=!1);const t={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:T};for(const n of Array.from(e.childNodes)){const e=Ze(n,t);e&&O.childNodes.push(e)}if(Ff(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Ze(n,t);r&&(yt(e.shadowRoot)&&(r.isShadow=!0),O.childNodes.push(r))}}return e.parentNode&&_t(e.parentNode)&&yt(e.parentNode)&&(O.isShadow=!0),O.type===Q.Element&&"iframe"===O.tagName&&op(e,(()=>{const t=No(e);if(t&&E){const n=Ze(t,{doc:t,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:T});n&&E(e,n)}}),w),O.type===Q.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===Oo(O.attributes.href))&&ap(e,(()=>{if(I){const t=Ze(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:T});t&&I(e,t)}}),x),O}function pp(e,t){const{mirror:n=new xo,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOM:_=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:w,stylesheetLoadTimeout:I,keepIframeSrcFn:x=()=>!1}=t;return Ze(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===m?{}:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:w,stylesheetLoadTimeout:I,keepIframeSrcFn:x,newlyAddedElement:!1})}function Re(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function ee(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ve="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let ai={map:{},getId:()=>(console.error(Ve),-1),getNode:()=>(console.error(Ve),null),removeNodeFromMap(){console.error(Ve)},has:()=>(console.error(Ve),!1),reset(){console.error(Ve)}};function It(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();!s&&!1===n.leading&&(s=i);const a=t-(i-s),c=this;a<=0||a>t?(r&&(Ep(r),r=null),s=i,e.apply(c,o)):!r&&!1!==n.trailing&&(r=xn((()=>{s=!1===n.leading?0:Date.now(),r=null,e.apply(c,o)}),a))}}function Fo(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(e){xn((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>Fo(e,t,o||{},!0)}function es(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(ai=new Proxy(ai,{get:(e,t,n)=>("map"===t&&console.error(Ve),Reflect.get(e,t,n))}));let fn=Date.now;function Uo(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:Re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:Re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function Bo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function $o(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ho(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function se(e,t,n,r,s){if(!e)return!1;const o=Ho(e);if(!o)return!1;const i=Qe(t,n);if(!s){const e=r&&o.matches(r);return i(o)&&!e}const a=Ue(o,i);let c=-1;return!(a<0)&&(r&&(c=Ue(o,Qe(null,r))),a>-1&&c<0||a<c)}function hp(e,t){return-1!==t.getId(e)}function Qn(e,t){return-2===t.getId(e)}function jo(e,t){if(_t(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||jo(e.parentNode,t))}function kr(e){return!!e.changedTouches}function mp(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}function Wo(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function zo(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function Tr(e){return!!Re([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(fn=()=>(new Date).getTime());class gp{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return wl(this.styleIDMap.get(e),(()=>-1))}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function qo(e){let t=null;return Re([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function _p(e){let t,n=e;for(;t=qo(n);)n=t;return n}function yp(e){const t=e.ownerDocument;if(!t)return!1;const n=_p(e);return t.contains(n)}function Go(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||yp(e))}const ci={};function ts(e){const t=ci[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return ci[e]=r.bind(window)}function Sp(...e){return ts("requestAnimationFrame")(...e)}function xn(...e){return ts("setTimeout")(...e)}function Ep(...e){return ts("clearTimeout")(...e)}var ui,li,R=(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))(R||{}),I=(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))(I||{}),Z=(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))(Z||{}),Se=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Se||{});function ns(e){try{return e.contentDocument}catch{}}function bp(e){try{return e.contentWindow}catch{}}function vp(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function di(e){return"__ln"in e}!function(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"}(ui||(ui={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(li||(li={}));class wp{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=vp([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&di(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&di(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const fi=(e,t)=>`${e}@${t}`;class Ip{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new wp,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},s=s=>{if(!s.parentNode||!Go(s))return;const o=_t(s.parentNode)?this.mirror.getId(qo(s)):this.mirror.getId(s.parentNode),i=r(s);if(-1===o||-1===i)return n.addNode(s);const a=Ze(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Wo(e,this.mirror)&&!se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),zo(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Tr(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:o,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)pi(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||s(e);for(const e of this.addedSet)!hi(this.droppedSet,e)&&!pi(this.removes,e,this.mirror)||hi(this.movedSet,e)?s(e):this.droppedSet.add(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),s(e.value)}const i={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!Qn(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ut(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Ho(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Qr(t),s=t.tagName;r=ln(t,s,n);const o=Rn({maskInputOptions:this.maskInputOptions,tagName:s,type:n});r=vt({isMasked:ut(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let s=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(ns(t))return;n="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Po(t.tagName,n)&&(s.attributes[n]=Lo(this.doc,ct(t.tagName),ct(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?s.styleDiff[e]=""===o?r:[r,o]:s._unchangedStyles[e]=[r,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}break}case"childList":if(se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=_t(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Qn(t,this.mirror)||!hp(t,this.mirror)||(this.addedSet.has(t)?(Cr(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||jo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[fi(n,r)]?Cr(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!_t(e.target)||!yt(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Qn(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[fi(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),Tr(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Cr(e,t){e.delete(t),t.childNodes.forEach((t=>Cr(e,t)))}function pi(e,t,n){return 0!==e.length&&kp(e,t,n)}function kp(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}function hi(e,t){return 0!==e.size&&Yo(e,t)}function Yo(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Yo(e,n))}let St;function Tp(e){St=e}function Cp(){St=void 0}const A=e=>St?(...t)=>{try{return e(...t)}catch(e){if(St&&!0===St(e))return()=>{};throw e}}:e;function pe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const et=[];function Nt(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 Ko(e,t){const n=new Ip;et.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=pe([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);s&&window[s]&&(r=window[s]);const o=new r(A((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Rp({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=It(A((t=>{const n=Date.now()-i;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],i=null})),o),l=A(It(A((e=>{const t=Nt(e),{clientX:n,clientY:s}=kr(e)?e.changedTouches[0]:e;i||(i=fn()),a.push({x:n,y:s,id:r.getId(t),timeOffset:fn()-i}),c(typeof DragEvent<"u"&&e instanceof DragEvent?I.Drag:e instanceof MouseEvent?I.MouseMove:I.TouchMove)})),s,{trailing:!1})),u=[ee("mousemove",l,n),ee("touchmove",l,n),ee("drag",l,n)];return A((()=>{u.forEach((e=>e()))}))}function Mp({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(Z).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((i=>{let a=ct(i);const u=(t=>i=>{const a=Nt(i);if(se(a,r,s,o,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=Se.Mouse;break;case"touch":c=Se.Touch;break;case"pen":c=Se.Pen}c===Se.Touch?Z[t]===Z.MouseDown?u="TouchStart":Z[t]===Z.MouseUp&&(u="TouchEnd"):Se.Pen}else kr(i)&&(c=Se.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===Se.Touch||u.startsWith("Mouse")&&c===Se.Mouse)&&(c=null)):Z[t]===Z.Click&&(c=l,l=null);const d=kr(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:m}=d;A(e)({type:Z[u],id:p,x:h,y:m,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(Z[i]){case Z.MouseDown:case Z.MouseUp:a=a.replace("mouse","pointer");break;case Z.TouchStart:case Z.TouchEnd:return}c.push(ee(a,u,t))})),A((()=>{c.forEach((e=>e()))}))}function Vo({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){return ee("scroll",A(It(A((i=>{const a=Nt(i);if(!a||se(a,r,s,o,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=Uo(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})})),i.scroll||100)),t)}function xp({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return ee("resize",A(It(A((()=>{const t=Bo(),s=$o();(n!==t||r!==s)&&(e({width:Number(s),height:Number(t)}),n=t,r=s)})),200)),t)}const Op=["INPUT","TEXTAREA","SELECT"],mi=new WeakMap;function Ap({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:m,unmaskTextSelector:f}){function g(e){let n=Nt(e);const u=e.isTrusted,g=n&&wr(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||Op.indexOf(g)<0||se(n,r,s,o,!0))return;const _=n;if(_.classList.contains(i)||a&&_.matches(a))return;const v=Qr(n);let b=ln(_,g,v),S=!1;const k=Rn({maskInputOptions:c,tagName:g,type:v}),E=ut(n,p,m,h,f,k);("radio"===v||"checkbox"===v)&&(S=n.checked),b=vt({isMasked:E,element:n,value:b,maskInputFn:l}),y(n,d?{text:b,isChecked:S,userTriggered:u}:{text:b,isChecked:S});const w=n.name;"radio"===v&&w&&S&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach((e=>{if(e!==n){const t=vt({isMasked:E,element:e,value:ln(e,g,v),maskInputFn:l});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}}))}function y(t,r){const s=mi.get(t);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){mi.set(t,r);const s=n.getId(t);A(e)({...r,id:s})}}const _=("last"===u.input?["change"]:["input","change"]).map((e=>ee(e,A(g),t))),v=t.defaultView;if(!v)return()=>{_.forEach((e=>e()))};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&_.push(...S.map((e=>Fo(e[0],e[1],{set(){A(g)({target:this,isTrusted:!1})}},!1,v)))),A((()=>{_.forEach((e=>e()))}))}function pn(e){return function(e,t){if(Kt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Kt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Kt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Kt("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Me(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Dp({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:A(((r,s,o)=>{const[i,a]=o,{id:c,styleId:l}=Me(s,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),r.apply(s,o)}))});const o=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(s,o)}))}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(s,o)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(s,o)}))}));const c={};Vt("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Vt("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Vt("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Vt("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach((([r,s])=>{l[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(l[r].insertRule,{apply:A(((r,s,o)=>{const[i,a]=o,{id:c,styleId:l}=Me(s.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...pn(s),a||0]}]}),r.apply(s,o)}))}),s.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...pn(s),i]}]}),r.apply(s,o)}))})})),A((()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}function Xo({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const s="#document"===n.nodeName?pe([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):pe([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=pe([s,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(pe([s,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return pe([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=pe([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch{}return n}}),A((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))):()=>{}}function Np({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:A(((s,i,a)=>{const[c,l,u]=a;if(n.has(c))return o.apply(i,[c,l,u]);const{id:d,styleId:p}=Me(pe([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:l,priority:u},index:pn(i.parentRule)}),s.apply(i,a)}))});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:A(((s,o,a)=>{const[c]=a;if(n.has(c))return i.apply(o,[c]);const{id:l,styleId:u}=Me(pe([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:pn(o.parentRule)}),s.apply(o,a)}))}),A((()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i}))}function Lp({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const a=A((i=>It(A((o=>{const a=Nt(o);if(!a||se(a,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:s.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})})),o.media||500))),c=[ee("play",a(0),i),ee("pause",a(1),i),ee("seeked",a(2),i),ee("volumechange",a(3),i),ee("ratechange",a(4),i)];return A((()=>{c.forEach((e=>e()))}))}function Pp({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return s.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=es(t.fonts,"add",(function(t){return function(n){return xn(A((()=>{const t=s.get(n);t&&(e(t),s.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(i),A((()=>{r.forEach((e=>e()))}))}function Fp(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let a=!0;const c=A((()=>{const e=t.getSelection();if(!e||a&&pe([e,"optionalAccess",e=>e.isCollapsed]))return;a=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:l,endContainer:u,endOffset:d}=i;se(a,r,s,o,!0)||se(u,r,s,o,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}i({ranges:c})}));return c(),ee("selectionchange",c)}function Up({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?es(n.customElements,"define",(function(e){return function(n,r,s){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,s])}})):()=>{}}function Bp(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Ko(e,e.doc));const s=Rp(e),o=Mp(e),i=Vo(e),a=xp(e,{win:n}),c=Ap(e),l=Lp(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=Dp(e,{win:n}),d=Xo(e,e.doc),p=Np(e,{win:n}),e.collectFonts&&(h=Pp(e)));const m=Fp(e),f=Up(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return A((()=>{et.forEach((e=>e.reset())),pe([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),s(),o(),i(),a(),c(),l(),u(),d(),p(),h(),m(),f(),g.forEach((e=>e()))}))}function Kt(e){return typeof window[e]<"u"}function Vt(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Rr{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const s=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let i=s.get(t);return i||(i=this.generateIdFn(),s.set(t,i),o.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function gi(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}class $p{constructor(){this.crossOriginIframeMirror=new Rr(Zr),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Hp{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Rr(Zr),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Rr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),gi([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=ns(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case I.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,["id"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case I.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),gi([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const s of r)!Array.isArray(t[s])&&"number"!=typeof t[s]||(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type!==Q.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class jp{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Wp{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!yt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Ko({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Vo({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),xn((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Xo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=ns(e),n=bp(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(es(e.prototype,"attachShadow",(function(e){return function(r){const s=e.call(this,r);return this.shadowRoot&&Go(this)&&n.addShadowRoot(this.shadowRoot,t),s}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class _i{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class zp{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new gp,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:Mo(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class qp{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,Sp((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let V,hn;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Zt([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const de=zf();function Ie(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:k,sampling:E={},dataURLOptions:w={},mousemoveWait:x,recordDOM:T=!0,recordCanvas:C=!1,recordCrossOriginIframes:M=!1,recordAfter:O=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:N=!1,collectFonts:D=!1,inlineImages:L=!1,plugins:P,keepIframeSrcFn:U=()=>!1,ignoreCSSAttributes:$=new Set([]),errorHandler:j,onMutation:F,getCanvasManager:B}=e;Tp(j);const H=!M||window.parent===window;let z=!1;if(!H)try{window.parent.document&&(z=!1)}catch{z=!0}if(H&&!t)throw new Error("emit function is required");if(!H&&!z)return()=>{};void 0!==x&&void 0===E.mousemove&&(E.mousemove=x),de.reset();const W=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},q=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};mp();let K,Y=0;const G=e=>{for(const t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!z&&(e=k(e)),e};V=(e,s)=>{const o=e;if(o.timestamp=fn(),Zt([et,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&o.type!==R.FullSnapshot&&!(o.type===R.IncrementalSnapshot&&o.data.source===I.Mutation)&&et.forEach((e=>e.unfreeze())),H)Zt([t,"optionalCall",e=>e(G(o),s)]);else if(z){const e={type:"rrweb",event:G(o),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(o.type===R.FullSnapshot)K=o,Y=0;else if(o.type===R.IncrementalSnapshot){if(o.data.source===I.Mutation&&o.data.isAttachIframe)return;Y++;const e=r&&Y>=r,t=n&&K&&o.timestamp-K.timestamp>n;(e||t)&&oe(!0)}};const J=e=>{V({type:R.IncrementalSnapshot,data:{source:I.Mutation,...e}})},Q=e=>V({type:R.IncrementalSnapshot,data:{source:I.Scroll,...e}}),X=e=>V({type:R.IncrementalSnapshot,data:{source:I.CanvasMutation,...e}}),Z=new zp({mutationCb:J,adoptedStyleSheetCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.AdoptedStyleSheet,...e}})}),te="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new $p:new Hp({mirror:de,mutationCb:J,stylesheetManager:Z,recordCrossOriginIframes:M,wrappedEmit:V});for(const e of P||[])e.getMirror&&e.getMirror({nodeMirror:de,crossOriginIframeMirror:te.crossOriginIframeMirror,crossOriginIframeStyleMirror:te.crossOriginIframeStyleMirror});const ne=new qp,re=Yp(B,{mirror:de,win:window,mutationCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.CanvasMutation,...e}}),recordCanvas:C,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:S,sampling:E.canvas,dataURLOptions:w,errorHandler:j}),se="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new jp:new Wp({mutationCb:J,scrollCb:Q,bypassOptions:{onMutation:F,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:W,dataURLOptions:w,maskAttributeFn:_,maskTextFn:b,maskInputFn:v,recordCanvas:C,inlineImages:L,sampling:E,slimDOMOptions:q,iframeManager:te,stylesheetManager:Z,canvasManager:re,keepIframeSrcFn:U,processedNodeManager:ne},mirror:de}),oe=(e=!1)=>{if(!T)return;V({type:R.Meta,data:{href:window.location.href,width:$o(),height:Bo()}},e),Z.reset(),se.init(),et.forEach((e=>e.lock()));const t=pp(document,{mirror:de,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:W,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,slimDOM:q,dataURLOptions:w,recordCanvas:C,inlineImages:L,onSerialize:e=>{Wo(e,de)&&te.addIframe(e),zo(e,de)&&Z.trackLinkElement(e),Tr(e)&&se.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{te.attachIframe(e,t),e.contentWindow&&re.addWindow(e.contentWindow),se.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Z.attachLinkElement(e,t)},keepIframeSrcFn:U});if(!t)return console.warn("Failed to snapshot the document");V({type:R.FullSnapshot,data:{node:t,initialOffset:Uo(window)}}),et.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))};hn=oe;try{const e=[],t=e=>A(Bp)({onMutation:F,mutationCb:J,mousemoveCb:(e,t)=>V({type:R.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.MouseInteraction,...e}}),scrollCb:Q,viewportResizeCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.ViewportResize,...e}}),inputCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.Input,...e}}),mediaInteractionCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.MediaInteraction,...e}}),styleSheetRuleCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.StyleSheetRule,...e}}),styleDeclarationCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.StyleDeclaration,...e}}),canvasMutationCb:X,fontCb:e=>V({type:R.IncrementalSnapshot,data:{source:I.Font,...e}}),selectionCb:e=>{V({type:R.IncrementalSnapshot,data:{source:I.Selection,...e}})},customElementCb:e=>{V({type:R.IncrementalSnapshot,data:{source:I.CustomElement,...e}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:W,inlineStylesheet:m,sampling:E,recordDOM:T,recordCanvas:C,inlineImages:L,userTriggeredOnInput:N,collectFonts:D,doc:e,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:U,blockSelector:o,unblockSelector:i,slimDOMOptions:q,dataURLOptions:w,mirror:de,iframeManager:te,stylesheetManager:Z,shadowDomManager:se,processedNodeManager:ne,canvasManager:re,ignoreCSSAttributes:$,plugins:Zt([P,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>V({type:R.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});te.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{oe(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(ee("DOMContentLoaded",(()=>{V({type:R.DomContentLoaded,data:{}}),"DOMContentLoaded"===O&&n()}))),e.push(ee("load",(()=>{V({type:R.Load,data:{}}),"load"===O&&n()}),window))),()=>{e.forEach((e=>e())),ne.destroy(),hn=void 0,Cp()}}catch(e){console.warn(e)}}function Gp(e){if(!hn)throw new Error("please take full snapshot after start recording");hn(e)}function Yp(e,t){try{return e?e(t):new _i}catch{return console.warn("Unable to initialize CanvasManager"),new _i}}Ie.mirror=de,Ie.takeFullSnapshot=Gp;const Kp=3,Vp=5;function rs(e){return e>9999999999?e:1e3*e}function Zn(e){return e>9999999999?e/1e3:e}function Lt(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:R.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:fe(t,10,1e3)}}),"console"===t.category))))}const Xp="button,a";function Jo(e){return e.closest(Xp)||e}function Qo(e){const t=Zo(e);return t&&t instanceof Element?Jo(t):t}function Zo(e){return Jp(e)?e.target:e}function Jp(e){return"object"==typeof e&&!!e&&"target"in e}let xe;function Qp(e){return xe||(xe=[],Zp()),xe.push(e),()=>{const t=xe?xe.indexOf(e):-1;t>-1&&xe.splice(t,1)}}function Zp(){te(j,"open",(function(e){return function(...t){if(xe)try{xe.forEach((e=>e()))}catch{}return e.apply(j,t)}}))}const eh=new Set([I.Mutation,I.StyleSheetRule,I.StyleDeclaration,I.AdoptedStyleSheet,I.CanvasMutation,I.Selection,I.MediaInteraction]);function th(e,t,n){e.handleClick(t,n)}class nh{constructor(e,t,n=Lt){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=Qp((()=>{this._lastMutation=yi()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(sh(t,this._ignoreSelector)||!ih(e))return;const n={timestamp:Zn(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Zn(e)}registerScroll(e=Date.now()){this._lastScroll=Zn(e)}registerClick(e){const t=Jo(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=yi();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!n&&!r,{clickCount:o,clickBreadcrumb:i}=e;if(s){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",s={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:j.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1}};this._addBreadcrumbEvent(t,s)}else if(o>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:j.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=at((()=>this._checkClicks()),1e3)}}const rh=["A","BUTTON","INPUT"];function sh(e,t){return!!(!rh.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||"A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target"))||t&&e.matches(t))}function ih(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}function yi(){return Date.now()/1e3}function oh(e,t){try{if(!ah(t))return;const{source:n}=t.data;if(eh.has(n)&&e.registerMutation(t.timestamp),n===I.Scroll&&e.registerScroll(t.timestamp),ch(t)){const{type:n,id:r}=t.data,s=Ie.mirror.getNode(r);s instanceof HTMLElement&&n===Z.Click&&e.registerClick(s)}}catch{}}function ah(e){return 3===e.type}function ch(e){return e.data.source===I.MouseInteraction}function ge(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var mn;!function(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"}(mn||(mn={}));const uh=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function lh(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(uh.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}const dh=e=>t=>{if(!e.isEnabled())return;const n=fh(t);if(!n)return;const r="click"===t.name,s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&th(e.clickDetector,n,Qo(t.event)),Lt(e,n)};function ea(e,t){const n=Ie.mirror.getId(e),r=n&&Ie.mirror.getNode(n),s=r&&Ie.mirror.getMeta(r),o=s&&hh(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map((e=>e.type===mn.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:lh(o.attributes)}}:{}}}function fh(e){const{target:t,message:n}=ph(e);return ge({category:`ui.${e.name}`,...ea(t,n)})}function ph(e){const t="click"===e.name;let n,r=null;try{r=t?Qo(e.event):Zo(e.event),n=bn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function hh(e){return e.type===mn.Element}function mh(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=gh(t);n&&Lt(e,n)}function gh(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||_h(i)||!o)return null;const a=t||r||s,c=1===o.length;if(!a&&c)return null;const l=bn(i,{maxStringLength:200})||"<unknown>";return ge({category:"ui.keyDown",message:l,data:{...ea(i,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function _h(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}const yh={resource:wh,paint:bh,navigation:vh};function Xt(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function Sh(e){return e.map(Eh).filter(Boolean)}function Eh(e){const t=yh[e.entryType];return t?t(e):null}function lt(e){return((ec||j.performance.timeOrigin)+e)/1e3}function bh(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=lt(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function vh(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:m,type:f}=e;return 0===s?null:{type:`${t}.${f}`,start:lt(h),end:lt(o),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:p}}}function wh(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:lt(o),end:lt(s),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function Ih(e){const t=e.entries[e.entries.length-1];return On(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function kh(e){return void 0!==e.sources}function Th(e){const t=[],n=[];for(const r of e.entries)if(kh(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=Ie.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return On(e,"cumulative-layout-shift",n,t)}function Ch(e){const t=e.entries[e.entries.length-1];return On(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function Rh(e){const t=e.entries[e.entries.length-1];return On(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function On(e,t,n,r){const s=e.value,o=e.rating,i=lt(s);return{type:"web-vital",name:t,start:i,end:i,data:{value:s,size:s,rating:o,nodeIds:n?n.map((e=>Ie.mirror.getId(e))):void 0,attributions:r}}}function Mh(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(pd(e,n))})),r.push(ld(Xt(Ih,e)),ud(Xt(Th,e)),dd(Xt(Ch,e)),fd(Xt(Rh,e))),()=>{r.forEach((e=>e()))}}const b=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xh='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Oh(){const e=new Blob([xh]);return URL.createObjectURL(e)}const Si=["info","warn","error","log"],tn="[Replay] ";function er(e,t="info"){De({category:"console",data:{logger:"replay"},level:t,message:`${tn}${e}`},{level:t})}function Ah(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return b?(Si.forEach((e=>{n[e]=(...n)=>{E[e](tn,...n),t&&er(n.join(""),io(e))}})),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),E.error(tn,r),e?jr(r):t&&er(r,"error")},n.infoTick=(...e)=>{E.info(tn,...e),t&&setTimeout((()=>er(e[0])),0)}):Si.forEach((e=>{n[e]=()=>{}})),n}const v=Ah();class ss extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Jr}.`)}}class ta{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Jr)throw new ss;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?rs(e):null}}class Dh{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){b&&v.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,s)=>{const o=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",o),!i.success)return b&&v.error("Error in compression worker: ",i.response),void s(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class Nh{constructor(e){this._worker=new Dh(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=rs(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Jr?Promise.reject(new ss):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{b&&v.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class Lh{constructor(e){this._fallback=new ta,this._compression=new Nh(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(b&&v.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){b&&v.exception(e,"Failed to add events when switching buffers.")}}}function Ph({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=Fh(t);if(e)return e}return b&&v.info("Using simple buffer"),new ta}function Fh(e){try{const t=e||Uh();if(!t)return;b&&v.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Lh(n)}catch(e){b&&v.exception(e,"Failed to create compression worker")}}function Uh(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Oh():""}function is(){try{return"sessionStorage"in j&&!!j.sessionStorage}catch{return!1}}function Bh(e){$h(),e.session=void 0}function $h(){if(is())try{j.sessionStorage.removeItem(Vr)}catch{}}function na(e){return void 0!==e&&Math.random()<e}function ra(e){const t=Date.now();return{id:e.id||ie(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function os(e){if(is())try{j.sessionStorage.setItem(Vr,JSON.stringify(e))}catch{}}function Hh(e,t){return na(e)?"session":!!t&&"buffer"}function Ei({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=ra({sampled:Hh(e,t),previousSessionId:r});return n&&os(s),s}function jh(){if(!is())return null;try{const e=j.sessionStorage.getItem(Vr);if(!e)return null;const t=JSON.parse(e);return b&&v.infoTick("Loading existing session"),ra(t)}catch{return null}}function Mr(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function sa(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Mr(e.started,t,r)||Mr(e.lastActivity,n,r)}function ia(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!sa(e,{sessionIdleExpire:t,maxReplayDuration:n})||"buffer"===e.sampled&&0===e.segmentId)}function tr({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&jh();return s?ia(s,{sessionIdleExpire:e,maxReplayDuration:t})?(b&&v.infoTick("Session in sessionStorage is expired, creating new one..."),Ei(r,{previousSessionId:s.id})):s:(b&&v.infoTick("Creating new session"),Ei(r,{previousSessionId:n}))}function Wh(e){return e.type===R.Custom}function as(e,t,n){return!!aa(e,t)&&(oa(e,t,n),!0)}function zh(e,t,n){return aa(e,t)?oa(e,t,n):Promise.resolve(null)}async function oa(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s="buffer"===e.recordingMode;try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=qh(t,e.getOptions().beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(t){const n=t&&t instanceof ss,o=n?"addEventSizeExceeded":"addEvent";if(n&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:o});const i=K();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function aa(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=rs(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(b&&v.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function qh(e,t){try{if("function"==typeof t&&Wh(e))return t(e)}catch(e){return b&&v.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function cs(e){return!e.type}function xr(e){return"transaction"===e.type}function Gh(e){return"replay_event"===e.type}function bi(e){return"feedback"===e.type}function Yh(e){return(t,n)=>{if(!e.isEnabled()||!cs(t)&&!xr(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(xr(t))return void Kh(e,t);Vh(e,t)}}}function Kh(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Vh(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();"function"==typeof r&&!r(t)||at((async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}}))}function Xh(e){return t=>{!e.isEnabled()||!cs(t)||Jh(e,t)}}function Jh(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if("string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){Lt(e,ge({category:"replay.hydrate-error",data:{url:Pi()}}))}}function Qh(e){const t=K();t&&t.on("beforeAddBreadcrumb",(t=>Zh(e,t)))}function Zh(e,t){if(!e.isEnabled()||!ca(t))return;const n=em(t);n&&Lt(e,n)}function em(e){return!ca(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?tm(e):ge(e)}function tm(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return ge(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Yt?(n=!0,`${e.slice(0,Yt)}…`):e;if("object"==typeof e)try{const t=fe(e,7);return JSON.stringify(t).length>Yt?(n=!0,`${JSON.stringify(t,null,2).slice(0,Yt)}…`):t}catch{}return e}));return ge({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function ca(e){return!!e.category}function nm(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}function ua(){const e=oe().getPropagationContext().dsc;e&&delete e.replay_id;const t=ji();if(t){delete zi(t).replay_id}}function rm(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:R.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}function sm(e,t){return!("buffer"!==e.recordingMode||t.message===Xr||!t.exception||t.type)&&na(e.getOptions().errorSampleRate)}function im(e){return Object.assign(((t,n)=>!e.isEnabled()||e.isPaused()?t:Gh(t)?(delete t.breadcrumbs,t):cs(t)||xr(t)||bi(t)?e.checkAndHandleExpiredSession()?bi(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),rm(e,t),t):nm(t,n)&&!e.getOptions()._experiments.captureExceptions?(b&&v.log("Ignoring error from rrweb internals",t),null):((sm(e,t)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(ua(),t):t),{id:"Replay"})}function An(e,t){return t.map((({type:t,start:n,end:r,name:s,data:o})=>{const i=e.throttledAddEvent({type:R.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:s,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof i?Promise.resolve(null):i}))}function om(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 am(e){return t=>{if(!e.isEnabled())return;const n=om(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(An(e,[n]),!1))))}}function cm(e,t){return(!b||!e.getOptions()._experiments.traceInternals)&&Uu(t,K())}function la(e,t){e.isEnabled()&&null!==t&&(cm(e,t.name)||e.addUpdate((()=>(An(e,[t]),!0))))}function Dn(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=ha(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function da(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function fa(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ha(e)];if(!e)return[void 0]}catch(t){return b&&v.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return b&&v.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function gn(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function pa(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:ne({method:o,statusCode:i,request:a,response:c})}}function kt(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ae(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=um(n);return r.body=s,o&&o.length>0&&(r._meta={warnings:o}),r}function Or(e,t){return Object.entries(e).reduce(((n,[r,s])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=s),n}),{})}function ha(e){return new URLSearchParams(e).toString()}function um(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>ti,n=lm(e);if(t){const t=e.slice(0,ti);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function lm(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}function _n(e,t){return Ct(dm(e),t)}function dm(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 fm(e,t,n){try{const r=pa("resource.fetch",await hm(e,t,n));la(n.replay,r)}catch(e){b&&v.exception(e,"Failed to capture fetch breadcrumb")}}function pm(e,t){const{input:n,response:r}=t,s=Dn(n?ma(n):void 0),o=r?da(r.headers.get("content-length")):void 0;void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}async function hm(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=_n(i,n.networkDetailAllowUrls)&&!_n(i,n.networkDetailDenyUrls);return{startTimestamp:s,endTimestamp:o,url:i,method:a,statusCode:c,request:d?mm(n,t.input,l):kt(l),response:await gm(d,n,t.response,u)}}function mm({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Sm(n,t):{};if(!e)return Ae(s,r,void 0);const o=ma(n),[i,a]=fa(o),c=Ae(s,r,i);return a?gn(c,a):c}async function gm(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&void 0!==s)return kt(s);const o=r?ga(r.headers,n):{};if(!r||!t&&void 0!==s)return Ae(o,s,void 0);const[i,a]=await ym(r),c=_m(i,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});return a?gn(c,a):c}function _m(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const o=e&&e.length&&void 0===n?Dn(e):n;return r?Ae(s,o,t?e:void 0):kt(o)}catch(e){return b&&v.exception(e,"Failed to serialize response body"),Ae(s,n,void 0)}}async function ym(e){const t=Em(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await bm(t)]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(b&&v.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(b&&v.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function ma(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function ga(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function Sm(e,t){return 1===e.length&&"string"!=typeof e[0]?vi(e[0],t):2===e.length?vi(e[1],t):{}}function vi(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?ga(n,t):Array.isArray(n)?{}:Or(n,t):{}}function Em(e){try{return e.clone()}catch(e){b&&v.exception(e,"Failed to clone response body")}}function bm(e){return new Promise(((t,n)=>{const r=at((()=>n(new Error("Timeout while trying to read response body"))),500);vm(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}async function vm(e){return await e.text()}async function wm(e,t,n){try{const r=pa("resource.xhr",km(e,t,n));la(n.replay,r)}catch(e){b&&v.exception(e,"Failed to capture xhr breadcrumb")}}function Im(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Dn(r),o=n.getResponseHeader("content-length")?da(n.getResponseHeader("content-length")):Mm(n.response,n.responseType);void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}function km(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!_n(c,n.networkDetailAllowUrls)||_n(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:kt(d),response:kt(p)}}const h=a[Xe],m=h?Or(h.request_headers,n.networkRequestHeaders):{},f=Or(Tm(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?fa(i):[void 0],[_,v]=n.networkCaptureBodies?Cm(a):[void 0],b=Ae(m,d,g),S=Ae(f,p,_);return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:y?gn(b,y):b,response:v?gn(S,v):S}}function Tm(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{}):{}}function Cm(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return Rm(e.response,e.responseType)}catch(e){t.push(e)}return b&&v.warn("Failed to get xhr response body",...t),[void 0]}function Rm(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return b&&v.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return b&&v.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Mm(e,t){try{return Dn("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}function xm(e){const t=K();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",((e,t)=>Om(a,e,t)))}catch{}}function Om(e,t,n){if(t.data)try{Am(t)&&Nm(n)&&(Im(t,n),wm(t,n,e)),Dm(t)&&Lm(n)&&(pm(t,n),fm(t,n,e))}catch(e){b&&v.exception(e,"Error when enriching network breadcrumb")}}function Am(e){return"xhr"===e.category}function Dm(e){return"fetch"===e.category}function Nm(e){return e&&e.xhr}function Lm(e){return e&&e.response}function Pm(e){const t=K();Io(dh(e)),Kr(am(e)),Qh(e),xm(e);_u(im(e)),t&&(t.on("beforeSendEvent",Xh(e)),t.on("afterSendEvent",Yh(e)),t.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),t.on("spanStart",(t=>{e.lastActiveSpan=t})),t.on("spanEnd",(t=>{e.lastActiveSpan=t})),t.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}async function Fm(e){try{return Promise.all(An(e,[Um(j.performance.memory)]))}catch{return[]}}function Um(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 Bm(e,t,n){let r,s,o;const i=n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){void 0!==s&&clearTimeout(s),void 0!==o&&clearTimeout(o),s=o=void 0}function l(){return s&&clearTimeout(s),s=at(a,t),i&&void 0===o&&(o=at(a,i)),r}return l.cancel=c,l.flush=function(){return void 0!==s||void 0!==o?a():r},l}function $m(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(b&&v.warn("Received replay event after session expired."));const s=r||!t;t=!0,e.clickDetector&&oh(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&s&&e.setInitialState(),!as(e,n,s))return!0;if(!s)return!1;const t=e.session;if(jm(e,s),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(b&&v.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&os(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0}))}}function Hm(e){const t=e.getOptions();return{type:R.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function jm(e,t){!t||!e.session||0!==e.session.segmentId||as(e,Hm(e),!1)}function Wm(e,t,n,r){return ft(Yi(e,Hr(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}function zm({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function qm({client:e,scope:t,replayId:n,event:r}){const s={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,s);const o=await Ki(e.getOptions(),r,s,t,e,_e());if(!o)return null;o.platform=o.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c}=i&&i.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},o}async function Gm({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=zm({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=K(),p=oe(),h=d&&d.getTransport(),m=d&&d.getDsn();if(!(d&&h&&m&&o.sampled))return Te({});const f={type:kf,replay_start_timestamp:u/1e3,timestamp:s/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},g=await qm({scope:p,client:d,replayId:t,event:f});if(!g)return d.recordDroppedEvent("event_processor","replay",f),b&&v.info("An event processor returned `null`, will not send event."),Te({});delete g.sdkProcessingMetadata;const y=Wm(g,i,m,d.getOptions().tunnel);let _;try{_=await h.send(y)}catch(e){const t=new Error(Xr);try{t.cause=e}catch{}throw t}if("number"==typeof _.statusCode&&(_.statusCode<200||_.statusCode>=300))throw new _a(_.statusCode);const S=ro({},_);if(no(S,"replay"))throw new us(S);return _}class _a extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class us extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function ya(e,t={count:0,interval:Of}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Gm(e),!0}catch(n){if(n instanceof _a||n instanceof us)throw n;if(Xi("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${Xr} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{at((async()=>{try{await ya(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const Sa="__THROTTLED",Ym="__SKIPPED";function Km(e,t,n){const r=new Map;let s=!1;return(...o)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))})(i),[...r.values()].reduce(((e,t)=>e+t),0)>=t){const e=s;return s=!0,e?Ym:Sa}s=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...o)}}class Oe{constructor({options:e,recordingOptions:t}){Oe.prototype.__init.call(this),Oe.prototype.__init2.call(this),Oe.prototype.__init3.call(this),Oe.prototype.__init4.call(this),Oe.prototype.__init5.call(this),Oe.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Tf,sessionIdleExpire:Cf},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=Bm((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Km(((e,t)=>zh(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),s=n?{threshold:Math.min(Df,n),timeout:n,scrollTimeout:Nf,ignoreSelector:r?r.join(","):""}:void 0;if(s&&(this.clickDetector=new nh(this,s)),b){const t=e._experiments;v.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){b&&v.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session)return void(b&&v.exception(new Error("Unable to initialize and create session")));!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",b&&v.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(b&&v.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(b&&v.info("Buffering is in progress, call `flush()` to save the replay"));b&&v.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=tr({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(b&&v.info("Buffering is in progress, call `flush()` to save the replay"));b&&v.infoTick("Starting replay in buffer mode");const e=tr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Ie({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:xf}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:$m(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{b&&v.info("Stopping Replay"+(t?` triggered by ${t}`:"")),ua(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Bh(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),b&&v.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),b&&v.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();b&&v.info("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!e||!n||"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Mr(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${j.location.pathname}${j.location.hash}${j.location.search}`,t=`${j.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===Sa){const e=ge({category:"replay.throttled"});this.addUpdate((()=>!as(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||ji(),t=e&&Br(e),n=(t&&Et(t).data||{})[Hi];if(t&&n&&["route","custom"].includes(n))return Et(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Ph({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=tr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!ia(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{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||(Pm(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=Mh(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(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===j.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=ge({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=ge({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{mh(this,e)}}_doChangeToBackgroundTasks(e){!this.session||sa(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):b&&v.info("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:R.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=Sh(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all(An(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await Fm(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await ya({replayId:e,recordingData:s,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=K();if(t){const n=e instanceof us?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else b&&v.error("No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(b&&v.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,s=n>this._options.maxReplayDuration+5e3;if(r||s)return b&&v.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&b&&v.info("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&os(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=ge({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function ht(e,t){return[...e,...t].join(",")}function Vm({mask:e,unmask:t,block:n,unblock:r,ignore:s}){return{maskTextSelector:ht(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:ht(t,[]),blockSelector:ht(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:ht(r,[]),ignoreSelector:ht(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Xm({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const wi='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Jm=["content-length","content-type","accept"];let Ii=!1;const Qm=e=>new Nn(e);class Nn{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=Rf,flushMaxDelay:t=Mf,minReplayDuration:n=Lf,maxReplayDuration:r=ni,stickySession:s=!0,useCompression:o=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:_=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder"],unmask:k=[],block:E=[],unblock:w=[],ignore:I=[],maskFn:x,beforeAddRecordingEvent:T,beforeErrorSampling:C,onError:M}={}){this.name=Nn.id;const R=Vm({mask:b,unmask:k,block:E,unblock:w,ignore:I});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(e,t,n)=>Xm({maskAttributes:S,maskAllText:c,privacyOptions:R,key:e,value:t,el:n}),...R,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,Pf),maxReplayDuration:Math.min(r,ni),stickySession:s,useCompression:o,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:f,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:ki(_),networkResponseHeaders:ki(v),beforeAddRecordingEvent:T,beforeErrorSampling:C,onError:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${wi}`:wi),this._isInitialized&&Ks())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Ii}set _isInitialized(e){Ii=e}afterAllSetup(e){!Ks()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=Zm(this._initialOptions,e);this._replay=new Oe({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function Zm(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...ne(e)},s=cr(n.replaysSessionSampleRate),o=cr(n.replaysOnErrorSampleRate);return null==s&&null==o&&Ne((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),null!=s&&(r.sessionSampleRate=s),null!=o&&(r.errorSampleRate=o),r}function ki(e){return[...Jm,...e.map((e=>e.toLowerCase()))]}function eg(e){const t={...e};return so(t,"react"),Xi("react",{version:Aa}),If(t)}Nn.__initStatic();const Ea=()=>"object"!=typeof window;var tg={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",USE_NPM_LIBS:"true",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"7d19a512dbebf4fc",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.705",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3762",APP_NAME:"@wellesley/sentry"};const ng=()=>!!tg.JEST_WORKER_ID,rg=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return mu("exceptionMessage",t),void jr(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}hu(t)},sg="wlsy",ba=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},ig=()=>{const e=new Set,t=ba();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const r=null==t?void 0:t.key(n);"string"==typeof r&&e.add(r)}return Array.from(e)},va=e=>{const t=`${sg}`,n=e=>`${t}:${e}`,r=()=>ig().filter((e=>e.startsWith(`${t}:`))),s=e=>e.slice(t.length+1),o=ba(),i=e=>{try{return null==o?void 0:o.getItem(n(e))}catch{return null}},a=(e,t)=>{try{null==o||o.setItem(n(e),String(t))}catch{return}};return{getItem:i,setItem:a,removeItem:e=>{try{null==o||o.removeItem(n(e))}catch{return}},clear:()=>{try{r().forEach((e=>null==o?void 0:o.removeItem(e)))}catch{return}},keys:()=>r().map(s),has:e=>null!==i(e),getJSON:e=>{const t=i(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{a(e,JSON.stringify(t))}catch{return}}}},Ti=["debug","info","warn","error"],og=(e,t)=>{const n=Ti.indexOf(e);return Ti.indexOf(t)>=n},Jt=(e,t,n,...r)=>{og(t,e)&&console.log(`[${e}] ${n}`,...r)},ag=()=>va().getItem("logger_lvl"),cg=(e=(Ea()?"info":ag()||"warn"))=>{let t=e;return{debug:(e,...n)=>Jt("debug",t,e,...n),info:(e,...n)=>Jt("info",t,e,...n),warn:(e,...n)=>Jt("warn",t,e,...n),error:(e,...n)=>(rg(e,...n),Jt("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},Ln=cg();var Ci={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",USE_NPM_LIBS:"true",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"7d19a512dbebf4fc",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.705",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3762",APP_NAME:"@wellesley/sentry"};const ug=e=>`${e||"wlsy"}-${Ci.DOMAIN_ENV}#${Ci.BUILD_NUMBER}`,Pn="staticState",wa=va(),nn={path:"",baseUrl:"",search:""},lg=e=>{if(!e)return nn;try{return JSON.parse(decodeURIComponent(e))||nn}catch(e){return Ln.error("Error parsing static state",e),nn}},Ia=()=>new URLSearchParams(window.location.search).get(Pn),dg=({path:e,baseUrl:t,search:n}={})=>{const{pathname:r,origin:s,search:o}=window.location;return`${Pn}=${encodeURIComponent(JSON.stringify({path:e||r,baseUrl:t||s,search:n||o}))}`},fg=()=>{const e=Ia();return e&&wa.setItem(Pn,e),ka()},ka=()=>{try{const e=wa.getItem(Pn)||Ia();return lg(e)}catch(e){return Ln.error("Error parsing static state",e),nn}},pg={create:dg,init:fg,get:ka},hg=()=>{try{const{baseUrl:e}=pg.get();return e&&new URL(e).hostname||window.location.hostname}catch(e){return Ln.warn("getServerName: Error getting server name",e),""}};var Ta={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",USE_NPM_LIBS:"true",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"7d19a512dbebf4fc",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.705",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3762",APP_NAME:"@wellesley/sentry"};const mg=Ta.DOMAIN_ENV;Ea()||(window.build=Ta.BUILD_NUMBER);const ls=()=>!ng()&&hg().endsWith("allroads.social"),gg=[Qm(),Co(),oo()],_g=({dsn:e,release:t,integrations:n=gg,...r})=>{if(ls()&&e)try{eg({dsn:e,integrations:n,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,release:ug(t),environment:mg,maxValueLength:1024,...r})}catch(e){return void Ln.error("Sentry init error: ",e)}},Ca=e=>{if(ls()&&e){const{email:t,username:n,userId:r}=e;gu({email:t,username:n,id:r})}},xg=Object.freeze(Object.defineProperty({__proto__:null,init:_g,isEnabled:ls,setUser:Ca},Symbol.toStringTag,{value:"Module"})),yg=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},Sg=e=>yg(e)&&"type"in e&&"string"==typeof e.type,w=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>Sg(t)&&t.type===e,t};w("remoteReady"),w("askLogin"),w("reselectUser"),w("requestLogout"),w("setConfirmLeavePage"),w("requestChangePath"),w("wsSubscribe"),w("wsUnSubscribe"),w("hostStoreConnect"),w("remoteLogin"),w("remoteLogout"),w("wsOnMessage"),w("setRouterPath"),w("setDeviceType"),w("setDeviceWidth");const Eg=w("setUserError"),bg=w("setUserIsError"),vg=w("setUserPending"),wg=w("setUserSuccess"),Ig=w("setUserData"),kg=w("updateAccountData"),Tg=w("updateUser");w("addNotification"),w("markNotification"),w("setNotificationsError"),w("setNotificationsList"),w("setNotificationsPending"),w("setNotificationsTotalCount"),w("setNotificationsUnreadCount"),w("acceptAllFollowRequests"),w("resetNotificationsState"),w("undoNotification"),w("setInstanceInfo"),w("setInstanceInfoPending"),w("setInstanceInfoError"),w("setPlatformSettings"),w("setProfileSettings"),w("setGroupData"),w("setGroupLoading"),w("requestLocalStorageGet"),w("requestLocalStorageSet"),w("requestLocalStorageRemove"),w("requestLocalStorageClear"),w("requestLocalStorageKeys"),w("requestLocalStorageHas"),w("sendLocalStorageResponse"),w("sendLocalStorageChanged"),xi("requestMicroFrontendFetch"),xi("sendMicroFrontendFetchResponse");const Ri={data:null,isError:!1,isPending:!1,isSuccess:!1},Mi=Na({name:"user",initialState:Ri,reducers:{reset:e=>{Object.assign(e,Ri)}},extraReducers:e=>{e.addCase(Ig,((e,{payload:t})=>{e.data=t})).addCase(kg,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(wg,((e,{payload:t})=>{e.isSuccess=t})).addCase(vg,((e,{payload:t})=>{e.isPending=t})).addCase(bg,((e,{payload:t})=>{e.isError=t})).addCase(Eg,((e,{payload:t})=>{e.error=t})).addCase(Tg,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}}),Og=()=>{const e=hs(Mi.selectors.selectAccount),t=hs(Mi.selectors.selectCurrentUser),{email:n}=e||{},{username:r,id:s}=t||{};Da((()=>{n&&r&&s&&Ca({email:n,username:r,userId:s})}),[n,r,s])};export{rg as logErrorToSentry,xg as sentryClient,Og as useSentryUser};
|