andoncloud-sdk 1.5.2 → 1.5.3

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.
@@ -168,6 +168,6 @@ to {
168
168
  > * {
169
169
  pointer-events: auto;
170
170
  }
171
- `,ct=({reverseOrder:t,position:n="top-center",toastOptions:r,gutter:o,children:s,containerStyle:i,containerClassName:a})=>{let{toasts:c,handlers:l}=(t=>{let{toasts:n,pausedAt:r}=((t={})=>{let[n,r]=e.useState(Re);e.useEffect(()=>(Pe.push(r),()=>{let e=Pe.indexOf(r);e>-1&&Pe.splice(e,1)}),[n]);let o=n.toasts.map(e=>{var n,r,o;return{...t,...t[e.type],...e,removeDelay:e.removeDelay||(null==(n=t[e.type])?void 0:n.removeDelay)||(null==t?void 0:t.removeDelay),duration:e.duration||(null==(r=t[e.type])?void 0:r.duration)||(null==t?void 0:t.duration)||De[e.type],style:{...t.style,...null==(o=t[e.type])?void 0:o.style,...e.style}}});return{...n,toasts:o}})(t);e.useEffect(()=>{if(r)return;let e=Date.now(),t=n.map(t=>{if(t.duration===1/0)return;let n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(n<0))return setTimeout(()=>Ne.dismiss(t.id),n);t.visible&&Ne.dismiss(t.id)});return()=>{t.forEach(e=>e&&clearTimeout(e))}},[n,r]);let o=e.useCallback(()=>{r&&Ae({type:6,time:Date.now()})},[r]),s=e.useCallback((e,t)=>{let{reverseOrder:r=!1,gutter:o=8,defaultPosition:s}=t||{},i=n.filter(t=>(t.position||s)===(e.position||s)&&t.height),a=i.findIndex(t=>t.id===e.id),c=i.filter((e,t)=>t<a&&e.visible).length;return i.filter(e=>e.visible).slice(...r?[c+1]:[0,c]).reduce((e,t)=>e+(t.height||0)+o,0)},[n]);return e.useEffect(()=>{n.forEach(e=>{if(e.dismissed)((e,t=1e3)=>{if(je.has(e))return;let n=setTimeout(()=>{je.delete(e),Ae({type:4,toastId:e})},t);je.set(e,n)})(e.id,e.removeDelay);else{let t=je.get(e.id);t&&(clearTimeout(t),je.delete(e.id))}})},[n]),{toasts:n,handlers:{updateHeight:$e,startPause:Fe,endPause:o,calculateOffset:s}}})(r);return F.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...i},className:a,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(e=>{let r=e.position||n,i=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Me()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}})(r,l.calculateOffset(e,{reverseOrder:t,gutter:o,defaultPosition:n}));return F.createElement(it,{id:e.id,key:e.id,onHeightUpdate:l.updateHeight,className:e.visible?at:"",style:i},"custom"===e.type?Te(e.message,e):s?s(e):F.createElement(st,{toast:e,position:r}))}))},lt=Ne;const ut="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,dt="8.48.0",pt=globalThis;function ht(e,t,n){const r=n||pt,o=r.__SENTRY__=r.__SENTRY__||{},s=o[dt]=o[dt]||{};return s[e]||(s[e]=t())}const ft="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,mt=["debug","info","warn","error","log","assert","trace"],gt={};function yt(e){if(!("console"in pt))return e();const t=pt.console,n={},r=Object.keys(gt);r.forEach(e=>{const r=gt[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}const vt=ht("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return mt.forEach(ft?n=>{t[n]=(...t)=>{e&&yt(()=>{pt.console[n](`Sentry Logger [${n}]:`,...t)})}}:e=>{t[e]=()=>{}}),t}),bt="?",_t=/\(error: (.*)\)/,St=/captureMessage|captureException/;function wt(...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=_t.test(n)?n.replace(_t,"$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 function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(kt(t).function||"")&&t.pop(),t.reverse(),St.test(kt(t).function||"")&&(t.pop(),St.test(kt(t).function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||kt(t).filename,function:e.function||bt}))}(o.slice(r))}}function kt(e){return e[e.length-1]||{}}const Et="<anonymous>";function Ct(e){try{return e&&"function"==typeof e&&e.name||Et}catch(e){return Et}}function xt(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(e){return}}}const Tt={},It={};function Mt(e,t){Tt[e]=Tt[e]||[],Tt[e].push(t)}function Ot(e,t){if(!It[e]){It[e]=!0;try{t()}catch(t){ft&&vt.error(`Error while instrumenting ${e}`,t)}}}function Pt(e,t){const n=e&&Tt[e];if(n)for(const r of n)try{r(t)}catch(t){ft&&vt.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ct(r)}\nError:`,t)}}let Rt=null;function At(e){const t="error";Mt(t,e),Ot(t,Dt)}function Dt(){Rt=pt.onerror,pt.onerror=function(e,t,n,r,o){return Pt("error",{column:r,error:o,line:n,msg:e,url:t}),!!Rt&&Rt.apply(this,arguments)},pt.onerror.__SENTRY_INSTRUMENTED__=!0}let Lt=null;function Nt(e){const t="unhandledrejection";Mt(t,e),Ot(t,Ht)}function Ht(){Lt=pt.onunhandledrejection,pt.onunhandledrejection=function(e){return Pt("unhandledrejection",e),!Lt||Lt.apply(this,arguments)},pt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function $t(){return Ft(pt),pt}function Ft(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||dt,t[dt]=t[dt]||{}}const jt=Object.prototype.toString;function Ut(e){switch(jt.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Jt(e,Error)}}function Bt(e,t){return jt.call(e)===`[object ${t}]`}function Vt(e){return Bt(e,"ErrorEvent")}function zt(e){return Bt(e,"DOMError")}function Wt(e){return Bt(e,"String")}function qt(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Kt(e){return null===e||qt(e)||"object"!=typeof e&&"function"!=typeof e}function Zt(e){return Bt(e,"Object")}function Gt(e){return"undefined"!=typeof Event&&Jt(e,Event)}function Yt(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Jt(e,t){try{return e instanceof t}catch(e){return!1}}function Xt(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Qt=pt;function en(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 l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(l=tn(n,u),!("html"===l||s>1&&i+o.length*c+l.length>=d));)o.push(l),i+=l.length,n=n.parentNode;return o.reverse().join(a)}catch(e){return"<unknown>"}}function tn(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Qt.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&&Wt(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 nn(){try{return Qt.document.location.href}catch(e){return""}}function rn(e){if(!Qt.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 on(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function sn(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Xt(r)?n.push("[VueViewModel]"):n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function an(e,t=[],n=!1){return t.some(t=>function(e,t,n=!1){return!!Wt(e)&&(Bt(t,"RegExp")?t.test(e):!!Wt(t)&&(n?e===t:e.includes(t)))}(e,t,n))}function cn(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);"function"==typeof o&&un(o,r);try{e[t]=o}catch(n){ft&&vt.log(`Failed to replace method "${t}" in object`,e)}}function ln(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){ft&&vt.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function un(e,t){try{e.prototype=t.prototype=t.prototype||{},ln(e,"__sentry_original__",t)}catch(e){}}function dn(e){return e.__sentry_original__}function pn(e){if(Ut(e))return{message:e.message,name:e.name,stack:e.stack,...fn(e)};if(Gt(e)){const t={type:e.type,target:hn(e.target),currentTarget:hn(e.currentTarget),...fn(e)};return"undefined"!=typeof CustomEvent&&Jt(e,CustomEvent)&&(t.detail=e.detail),t}return e}function hn(e){try{return"undefined"!=typeof Element&&Jt(e,Element)?en(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function fn(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 mn(e){return gn(e,new Map)}function gn(e,t){if(function(e){if(!Zt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(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))void 0!==e[n]&&(r[n]=gn(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(gn(e,t))}),r}return e}function yn(){return Date.now()/1e3}const vn=function(){const{performance:e}=pt;if(!e||!e.now)return yn;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}(),bn=(()=>{const{performance:e}=pt;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 _n(){const e=pt.crypto||pt.msCrypto;let t=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(t=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&t())>>e/4).toString(16))}function Sn(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function wn(e){const{message:t,event_id:n}=e;if(t)return t;const r=Sn(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function kn(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=n||"Error")}function En(e,t){const n=Sn(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 Cn(e){if(function(e){try{return e.__sentry_captured__}catch(e){}}(e))return!0;try{ln(e,"__sentry_captured__",!0)}catch(e){}return!1}var xn;function Tn(e){return new Mn(t=>{t(e)})}function In(e){return new Mn((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(xn||(xn={}));class Mn{constructor(e){Mn.prototype.__init.call(this),Mn.prototype.__init2.call(this),Mn.prototype.__init3.call(this),Mn.prototype.__init4.call(this),this._state=xn.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Mn((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 Mn((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(xn.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(xn.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===xn.PENDING&&(Yt(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===xn.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===xn.RESOLVED&&e[1](this._value),this._state===xn.REJECTED&&e[2](this._value),e[0]=!0)})}}}function On(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||vn(),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:_n()),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 Pn(){return _n()}function Rn(){return _n().substring(16)}function An(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]=An(r[e],t[e],n-1));return r}const Dn="_sentrySpan";function Ln(e,t){t?ln(e,Dn,t):delete e[Dn]}function Nn(e){return e[Dn]}class Hn{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:Pn(),spanId:Rn()}}clone(){const e=new Hn;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,Ln(e,Nn(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&&On(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 $n?[t.getScopeData(),t.getRequestSession()]:Zt(t)?[e,e.requestSession]:[],{tags:o,extra:s,user:i,contexts:a,level:c,fingerprint:l=[],propagationContext:u}=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),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,Ln(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Pn()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:yn(),...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:Nn(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=An(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Rn(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:_n();if(!this._client)return vt.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:_n();if(!this._client)return vt.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:_n();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(vt.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 $n=Hn;class Fn{constructor(e,t){let n,r;n=e||new $n,r=t||new $n,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 Yt(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 jn(){const e=Ft($t());return e.stack=e.stack||new Fn(ht("defaultCurrentScope",()=>new $n),ht("defaultIsolationScope",()=>new $n))}function Un(e){return jn().withScope(e)}function Bn(e,t){const n=jn();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Vn(e){return jn().withScope(()=>e(jn().getIsolationScope()))}function zn(e){const t=Ft(e);return t.acs?t.acs:{withIsolationScope:Vn,withScope:Un,withSetScope:Bn,withSetIsolationScope:(e,t)=>Vn(t),getCurrentScope:()=>jn().getScope(),getIsolationScope:()=>jn().getIsolationScope()}}function Wn(){return zn($t()).getCurrentScope()}function qn(){return zn($t()).getIsolationScope()}function Kn(...e){const t=zn($t());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Zn(){return Wn().getClient()}function Gn(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:o}=t;return mn({trace_id:n,span_id:r,parent_span_id:o})}function Yn(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(mn(r));return n}const Jn="sentry.source",Xn="sentry.sample_rate",Qn="sentry.op",er="sentry.origin",tr="sentry.idle_span_finish_reason",nr="sentry.measurement_unit",rr="sentry.measurement_value",or="sentry.custom_span_name",sr="sentry.exclusive_time";function ir(e,t){e.setAttribute("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}const ar="sentry-",cr=/^sentry-/;function lr(e){const t=function(e){if(e&&(Wt(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{const n=ur(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):ur(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>(t.match(cr)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function ur(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const dr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function pr(e=Pn(),t=Rn(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}let hr=!1;function fr(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a}=vr(e);return mn({parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a})}function mr(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return mn({parent_span_id:r?t:vr(e).parent_span_id,span_id:r?Rn():t,trace_id:n})}function gr(e){return"number"==typeof e?yr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?yr(e.getTime()):vn()}function yr(e){return e>9999999999?e/1e3:e}function vr(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(function(e){return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(e)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:a,status:c}=e;return mn({span_id:t,trace_id:n,data:r,description:s,parent_span_id:a,start_timestamp:gr(o),timestamp:gr(i)||void 0,status:_r(c),op:r[Qn],origin:r[er],_metrics_summary:Yn(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function br(e){const{traceFlags:t}=e.spanContext();return 1===t}function _r(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const Sr="_sentryChildSpans",wr="_sentryRootSpan";function kr(e,t){ln(t,wr,e[wr]||e),e[Sr]?e[Sr].add(t):ln(e,Sr,new Set([t]))}function Er(e){const t=new Set;return function e(n){if(!t.has(n)&&br(n)){t.add(n);const r=n[Sr]?Array.from(n[Sr]):[];for(const t of r)e(t)}}(e),Array.from(t)}function Cr(e){return e[wr]||e}function xr(){const e=zn($t());return e.getActiveSpan?e.getActiveSpan():Nn(Wn())}function Tr(){hr||(yt(()=>{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.")}),hr=!0)}let Ir=!1;function Mr(){const e=xr(),t=e&&Cr(e);if(t){const e="internal_error";ut&&vt.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}Mr.tag="sentry_tracingErrorCallback";const Or="_sentryScope",Pr="_sentryIsolationScope";function Rr(e){return{scope:e[Or],isolationScope:e[Pr]}}function Ar(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=Zn(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Dr{constructor(e={}){this._traceId=e.traceId||Pn(),this._spanId=e.spanId||Rn()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}const Lr="production",Nr="_frozenDsc";function Hr(e,t){ln(e,Nr,t)}function $r(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=mn({environment:n.environment||Lr,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function Fr(e,t){const n=t.getPropagationContext();return n.dsc||$r(n.traceId,e)}function jr(e){const t=Zn();if(!t)return{};const n=Cr(e),r=n[Nr];if(r)return r;const o=n.spanContext().traceState,s=o&&o.get("sentry.dsc"),i=s&&lr(s);if(i)return i;const a=$r(e.spanContext().traceId,t),c=vr(n),l=c.data||{},u=l[Xn];null!=u&&(a.sample_rate=`${u}`);const d=c.description;return"url"!==l[Jn]&&d&&(a.transaction=d),Ar()&&(a.sampled=String(br(n))),t.emit("createDsc",a,n),a}function Ur(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;ut&&vt.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 Br=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Vr(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}/`:r}${i}`}function zr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Wr(e){const t="string"==typeof e?function(e){const t=Br.exec(e);if(!t)return void yt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,o="",s="",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 zr({host:s,pass:o,path:c,projectId:l,port:i,protocol:n,publicKey:r})}(e):zr(e);if(t&&function(e){if(!ft)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(vt.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(vt.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(vt.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(vt.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function qr(e,t=100,n=Infinity){try{return Zr("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Kr(e,t=3,n=102400){const r=qr(e,t);return o=JSON.stringify(r),~-encodeURI(o).split(/%..|./).length>n?Kr(e,t-1,n):r;var o}function Zr(e,t,n=Infinity,r=Infinity,o=function(){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}}]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(Xt(t))return"[VueViewModel]";if(Zt(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Ct(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(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 l=t;if(l&&"function"==typeof l.toJSON)try{return Zr("",l.toJSON(),c-1,r,o)}catch(e){}const u=Array.isArray(t)?[]:{};let d=0;const p=pn(t);for(const e in p)if(Object.prototype.hasOwnProperty.call(p,e)){if(d>=r){u[e]="[MaxProperties ~]";break}u[e]=Zr(e,p[e],c-1,r,o),d++}return i(t),u}function Gr(e,t=[]){return[e,t]}function Yr(e,t){const[n,r]=e;return[n,[...r,t]]}function Jr(e,t){const n=e[1];for(const e of n)if(t(e,e[0].type))return!0;return!1}function Xr(e){return pt.__SENTRY__&&pt.__SENTRY__.encodePolyfill?pt.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function Qr(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[Xr(r),e]:r.push("string"==typeof e?Xr(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(t){e=JSON.stringify(qr(n))}o(e)}}return"string"==typeof r?r:function(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}(r)}function eo(e){return[{type:"span"},e]}function to(e){const t="string"==typeof e.data?Xr(e.data):e.data;return[mn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const no={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 ro(e){return no[e]}function oo(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function so(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:Vr(r)},...o&&{trace:mn({...o})}}}function io(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[nr],o=n[rr];"string"==typeof r&&"number"==typeof o&&(t[e.name]={value:o,unit:r})}),t}class ao{constructor(e={}){this._traceId=e.traceId||Pn(),this._spanId=e.spanId||Rn(),this._startTime=e.startTimestamp||vn(),this._attributes={},this.setAttributes({[er]:"manual",[Qn]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=gr(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(Jn,"custom"),this}end(e){this._endTime||(this._endTime=gr(e),function(e){if(!ut)return;const{description:t="< unknown name >",op:n="< unknown op >"}=vr(e),{spanId:r}=e.spanContext(),o=Cr(e);vt.log(`[Tracing] Finishing "${n}" ${o===e?"root ":""}span "${t}" with ID ${r}`)}(this),this._onSpanEnded())}getSpanJSON(){return mn({data:this._attributes,description:this._name,op:this._attributes[Qn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:_r(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[er],_metrics_summary:Yn(this),profile_id:this._attributes["sentry.profile_id"],exclusive_time:this._attributes[sr],measurements:io(this._events),is_segment:this._isStandaloneSpan&&Cr(this)===this||void 0,segment_id:this._isStandaloneSpan?Cr(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){ut&&vt.log("[Tracing] Adding an event to span:",e);const r=co(t)?t:n||vn(),o=co(t)?{}:t||{},s={name:e,time:gr(r),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=Zn();if(e&&e.emit("spanEnd",this),!this._isStandaloneSpan&&this!==Cr(this))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=Zn();if(!t)return;const n=e[1];n&&0!==n.length?t.sendEnvelope(e):t.recordDroppedEvent("before_send","span")}(function(e,t){const n=jr(e[0]),r=t&&t.getDsn(),o=t&&t.getOptions().tunnel,s={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!o&&r&&{dsn:Vr(r)}},i=t&&t.getOptions().beforeSendSpan,a=i?e=>{const t=i(vr(e));return t||Tr(),t}:e=>vr(e),c=[];for(const t of e){const e=a(t);e&&c.push(eo(e))}return Gr(s,c)}([this],e)):(ut&&vt.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const t=this._convertSpanToTransaction();t&&(Rr(this).scope||Wn()).captureEvent(t)}_convertSpanToTransaction(){if(!lo(vr(this)))return;this._name||(ut&&vt.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:t}=Rr(this),n=(e||Wn()).getClient()||Zn();if(!0!==this._sampled)return ut&&vt.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(n&&n.recordDroppedEvent("sample_rate","transaction"));const r=Er(this).filter(e=>e!==this&&!function(e){return e instanceof ao&&e.isStandaloneSpan()}(e)).map(e=>vr(e)).filter(lo),o=this._attributes[Jn];delete this._attributes[or],r.forEach(e=>{e.data&&delete e.data[or]});const s={contexts:{trace:fr(this)},spans:r.length>1e3?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,...mn({dynamicSamplingContext:jr(this)})},_metrics_summary:Yn(this),...o&&{transaction_info:{source:o}}},i=io(this._events);return i&&Object.keys(i).length&&(ut&&vt.log("[Measurements] Adding measurements to transaction event",JSON.stringify(i,void 0,2)),s.measurements=i),s}}function co(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function lo(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const uo="__SENTRY_SUPPRESS_TRACING__";function po(e){const t=fo();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=function(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=gr(e.startTime),delete n.startTime,n}return t}(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?t=>Kn(e.scope,t):void 0!==o?e=>ho(o,e):e=>e())(()=>{const t=Wn(),o=function(e){const t=Nn(e);if(!t)return;const n=Zn();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?Cr(t):t}(t);return e.onlyIfParent&&!o?new Dr:function({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ar())return new Dr;const o=qn();let s;if(e&&!n)s=function(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=!t.getScopeData().sdkProcessingMetadata[uo]&&br(e),i=s?new ao({...n,parentSpanId:r,traceId:o,sampled:s}):new Dr({traceId:o});kr(e,i);const a=Zn();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}(e,r,t),kr(e,s);else if(e){const n=jr(e),{traceId:o,spanId:i}=e.spanContext(),a=br(e);s=mo({traceId:o,parentSpanId:i,...t},r,a),Hr(s,n)}else{const{traceId:e,dsc:n,parentSpanId:i,sampled:a}={...o.getPropagationContext(),...r.getPropagationContext()};s=mo({traceId:e,parentSpanId:i,...t},r,a),n&&Hr(s,n)}return function(e){if(!ut)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=vr(e),{spanId:o}=e.spanContext(),s=br(e),i=Cr(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&l.push(`parent ID: ${r}`),!a){const{op:e,description:t}=vr(i);l.push(`root ID: ${i.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}vt.log(`${c}\n ${l.join("\n ")}`)}(s),function(e,t,n){e&&(ln(e,Pr,n),ln(e,Or,t))}(s,r,o),s}({parentSpan:o,spanArguments:n,forceTransaction:r,scope:t})})}function ho(e,t){const n=fo();return n.withActiveSpan?n.withActiveSpan(e,t):Kn(n=>(Ln(n,e||void 0),t(n)))}function fo(){return zn($t())}function mo(e,t,n){const r=Zn(),o=r&&r.getOptions()||{},{name:s="",attributes:i}=e,[a,c]=t.getScopeData().sdkProcessingMetadata[uo]?[!1]:function(e,t){if(!Ar(e))return[!1];const n=qn().getScopeData().sdkProcessingMetadata.normalizedRequest,r={...t,normalizedRequest:t.normalizedRequest||n};let o;o="function"==typeof e.tracesSampler?e.tracesSampler(r):void 0!==r.parentSampled?r.parentSampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1;const s=Ur(o);return void 0===s?(ut&&vt.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):s?Math.random()<s?[!0,s]:(ut&&vt.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[!1,s]):(ut&&vt.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,s])}(o,{name:s,parentSampled:n,attributes:i,transactionContext:{name:s,parentSampled:n}}),l=new ao({...e,attributes:{[Jn]:"custom",...e.attributes},sampled:a});return void 0!==c&&l.setAttribute(Xn,c),r&&r.emit("spanStart",l),l}const go={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function yo(e,t={}){const n=new Map;let r,o=!1,s="externalFinish",i=!t.disableAutoFinish;const a=[],{idleTimeout:c=go.idleTimeout,finalTimeout:l=go.finalTimeout,childSpanTimeout:u=go.childSpanTimeout,beforeSpanEnd:d}=t,p=Zn();if(!p||!Ar())return new Dr;const h=Wn(),f=xr(),m=function(e){const t=po(e);return Ln(Wn(),t),ut&&vt.log("[Tracing] Started span is an idle span"),t}(e);function g(){r&&(clearTimeout(r),r=void 0)}function y(e){g(),r=setTimeout(()=>{!o&&0===n.size&&i&&(s="idleTimeout",m.end(e))},c)}function v(e){r=setTimeout(()=>{!o&&i&&(s="heartbeatFailed",m.end(e))},u)}function b(e){o=!0,n.clear(),a.forEach(e=>e()),Ln(h,f);const t=vr(m),{start_timestamp:r}=t;if(!r)return;(t.data||{})[tr]||m.setAttribute(tr,s),vt.log(`[Tracing] Idle span "${t.op}" finished`);const i=Er(m).filter(e=>e!==m);let u=0;i.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),ut&&vt.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=vr(t),{timestamp:r=0,start_timestamp:o=0}=n,s=o<=e,i=r-o<=(l+c)/1e3;if(ut){const e=JSON.stringify(t,void 0,2);s?i||vt.log("[Tracing] Discarding span since it finished after idle span final timeout",e):vt.log("[Tracing] Discarding span since it happened after idle span was finished",e)}i&&s||(function(e,t){e[Sr]&&e[Sr].delete(t)}(m,t),u++)}),u>0&&m.setAttribute("sentry.idle_span_discarded_spans",u)}return m.end=new Proxy(m.end,{apply(e,t,n){d&&d(m);const[r,...o]=n,s=gr(r||vn()),i=Er(m).filter(e=>e!==m);if(!i.length)return b(s),Reflect.apply(e,t,[s,...o]);const a=i.map(e=>vr(e).timestamp).filter(e=>!!e),c=a.length?Math.max(...a):void 0,u=vr(m).start_timestamp,p=Math.min(u?u+l/1e3:Infinity,Math.max(u||-Infinity,Math.min(s,c||Infinity)));return b(p),Reflect.apply(e,t,[p,...o])}}),a.push(p.on("spanStart",e=>{var t;o||e===m||vr(e).timestamp||Er(m).includes(e)&&(t=e.spanContext().spanId,g(),n.set(t,!0),v(vn()+u/1e3))})),a.push(p.on("spanEnd",e=>{var t;o||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&y(vn()+c/1e3))})),a.push(p.on("idleSpanEnableAutoFinish",e=>{e===m&&(i=!0,y(),n.size&&v())})),t.disableAutoFinish||y(),setTimeout(()=>{o||(m.setStatus({code:2,message:"deadline_exceeded"}),s="finalTimeout",m.end())},l),m}function vo(e,t,n,r=0){return new Mn((o,s)=>{const i=e[r];if(null===t||"function"!=typeof i)o(t);else{const a=i({...t},n);ut&&i.id&&null===a&&vt.log(`Event processor "${i.id}" dropped event`),Yt(a)?a.then(t=>vo(e,t,n,r+1).then(o)).then(null,s):vo(e,a,n,r+1).then(o).then(null,s)}})}let bo,_o,So;function wo(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:p,transactionName:h,span:f}=t;ko(e,"extra",n),ko(e,"tags",r),ko(e,"user",o),ko(e,"contexts",s),e.sdkProcessingMetadata=An(e.sdkProcessingMetadata,a,2),i&&(e.level=i),h&&(e.transactionName=h),f&&(e.span=f),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 ko(e,t,n){e[t]=An(e[t],n,1)}function Eo(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||_n(),timestamp:t.timestamp||yn()},l=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s=250}=t;e.environment=e.environment||n||Lr,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o),e.message&&(e.message=on(e.message,s));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=on(i.value,s));const a=e.request;a&&a.url&&(a.url=on(a.url,s))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=pt._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return So&&n.length===_o||(_o=n.length,So=n.reduce((n,r)=>{bo||(bo={});const o=bo[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,bo[r]=[i,a];break}}}return n},{})),So}(t);try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{n&&e.filename&&(e.debug_id=n[e.filename])})})}catch(e){}}(c,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new $n;return n.update(t),n}(r,n.captureContext);n.mechanism&&En(c,n.mechanism);const d=o?o.getEventProcessors():[],p=ht("globalScope",()=>new $n).getScopeData();s&&wo(p,s.getScopeData()),u&&wo(p,u.getScopeData());const h=[...n.attachments||[],...p.attachments];return h.length&&(n.attachments=h),function(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t,c=mn(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=mn(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=mn(o);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=mn(s);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),i&&(e.level=i),a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:mr(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:jr(t),...e.sdkProcessingMetadata};const n=vr(Cr(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,r),function(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}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}(c,p),vo([...d,...p.eventProcessors],c,n).then(e=>(e&&function(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(e){}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})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:qr(e.data,t,n)}}))},...e.user&&{user:qr(e.user,t,n)},...e.contexts&&{contexts:qr(e.contexts,t,n)},...e.extra&&{extra:qr(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=qr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:qr(e.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=qr(e.contexts.flags,3,n)),r}(e,i,a):e))}const Co=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function xo(e,t){return Wn().captureException(e,function(e){if(e)return function(e){return e instanceof $n||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>Co.includes(e))}(e)?{captureContext:e}:e}(t))}function To(e,t){return Wn().captureEvent(e,t)}function Io(e,t){qn().setContext(e,t)}function Mo(e){const t=Zn(),n=qn(),r=Wn(),{release:o,environment:s=Lr}=t&&t.getOptions()||{},{userAgent:i}=pt.navigator||{},a=function(e){const t=vn(),n={sid:_n(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return mn({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}})}(n)};return e&&On(n,e),n}({release:o,environment:s,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&"ok"===c.status&&On(c,{status:"exited"}),Oo(),n.setSession(a),r.setSession(a),a}function Oo(){const e=qn(),t=Wn(),n=t.getSession()||e.getSession();n&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),On(e,t)}(n),Po(),e.setSession(),t.setSession()}function Po(){const e=qn(),t=Wn(),n=Zn(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Ro(e=!1){e?Oo():Po()}function Ao(e){return`${e.protocol?`${e.protocol}:`:""}//${e.host}${e.port?`:${e.port}`:""}${e.path?`/${e.path}`:""}/api/`}const Do=[];function Lo(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=function(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)}(r),s=o.findIndex(e=>"Debug"===e.name);if(s>-1){const[e]=o.splice(s,1);o.push(e)}return o}function No(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Ho(e,t,n){if(n[t.name])ut&&vt.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Do.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Do.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)}ut&&vt.log(`Integration installed: ${t.name}`)}}class $o 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 Fo="Not capturing exception because it's already been captured.";class jo{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Wr(e.dsn):ut&&vt.warn("No DSN provided, client will not send events."),this._dsn){const r=(t=this._dsn,n=e._metadata?e._metadata.sdk:void 0,e.tunnel||`${function(e){return`${Ao(e)}${e.projectId}/envelope/`}(t)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(t,n)}`);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}var t,n;const r=["enableTracing","tracesSampleRate","tracesSampler"].find(t=>t in e&&null==e[t]);r&&yt(()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` 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=_n();if(Cn(e))return ut&&vt.log(Fo),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:_n(),...n},s=qt(e)?e:String(e),i=Kt(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=_n();if(t&&t.originalException&&Cn(t.originalException))return ut&&vt.log(Fo),r;const o={event_id:r,...t};return this._process(this._captureEvent(e,o,(e.sdkProcessingMetadata||{}).capturedSpanScope||n)),o.event_id}captureSession(e){"string"!=typeof e.release?ut&&vt.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),On(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))):Tn(!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];Ho(this,e,this._integrations),t||No(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const o=oo(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){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,n&&n.sdk);const i=so(e,o,r,t);return delete e.sdkProcessingMetadata,Gr(i,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Yr(n,to(e));const r=this.sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){const t=function(e,t,n,r){const o=oo(n);return Gr({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Vr(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(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}`;ut&&vt.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=>(ut&&vt.error("Error while sending envelope:",e),e)):(ut&&vt.error("Transport disabled"),Tn({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&Ho(e,t,n)}),n}(this,e),No(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)&&(On(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Mn(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=Wn(),r=qn()){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),Eo(o,e,t,n,this,r).then(e=>{if(null===e)return e;e.contexts={trace:Gn(n),...e.contexts};const t=Fr(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(ut){const t=e;"log"===t.logLevel?vt.log(t.message):vt.warn(t)}})}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r,s=Bo(e),i=Uo(e),a=e.type||"error",c=`before send for type \`${a}\``,l=void 0===o?void 0:Ur(o);if(i&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),In(new $o(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const u="replay_event"===a?"replay":a;return this._prepareEvent(e,t,n,(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new $o("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const o=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i}=t;if(Uo(n)&&o)return o(n,r);if(Bo(n)){if(n.spans&&i){const t=[];for(const r of n.spans){const n=i(r);n?t.push(n):(Tr(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(s)return n.spans&&(n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:n.spans.length}),s(n,r)}return n}(this,r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Yt(e))return e.then(e=>{if(!Zt(e)&&null!==e)throw new $o(n);return e},e=>{throw new $o(`${t} rejected with ${e}`)});if(!Zt(e)&&null!==e)throw new $o(n);return e}(o,c)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",u,e),s&&this.recordDroppedEvent("before_send","span",1+(e.spans||[]).length),new $o(`${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=>{if(e instanceof $o)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new $o(`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(){ut&&vt.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(ut&&vt.log("No outcomes to send"));if(!this._dsn)return void(ut&&vt.log("No dsn provided, will not send outcomes"));ut&&vt.log("Sending outcomes:",e);const t=(n=e,Gr((r=this._options.tunnel&&Vr(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:yn(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function Uo(e){return void 0===e.type}function Bo(e){return"transaction"===e.type}function Vo(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function zo(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);else o.all=r+a}else i?o.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(i,r):429===t&&(o.all=r+6e4);return o}function Wo(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function qo(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function Ko(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:dt})),version:dt}),e._metadata=o}function Zo(e={}){const t=Zn();if(!function(){const e=Zn();return!!e&&!1!==e.getOptions().enabled&&!!e.getTransport()}()||!t)return{};const n=zn($t());if(n.getTraceData)return n.getTraceData(e);const r=Wn(),o=e.span||xr(),s=o?function(e){const{traceId:t,spanId:n}=e.spanContext();return pr(t,n,br(e))}(o):function(e){const{traceId:t,sampled:n,spanId:r}=e.getPropagationContext();return pr(t,r,n)}(r),i=function(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],r)=>{const o=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,s=0===r?o:`${e},${o}`;return s.length>8192?(ft&&vt.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):s},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${ar}${t}`]=n),e),{}))}(o?jr(o):Fr(t,r));return dr.test(s)?{"sentry-trace":s,baggage:i}:(vt.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}const Go=100;function Yo(e,t){const n=Zn(),r=qn();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Go}=n.getOptions();if(s<=0)return;const i={timestamp:yn(),...e},a=o?yt(()=>o(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}let Jo;const Xo=new WeakMap,Qo=()=>({name:"FunctionToString",setupOnce(){Jo=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=dn(this),n=Xo.has(Zn())&&void 0!==t?t:this;return Jo.apply(n,e)}}catch(e){}},setup(e){Xo.set(e,!0)}}),es=[/^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+$/],ts=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const o=r.getOptions(),s=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:es],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,o);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e)?(ut&&vt.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${wn(e)}`),!0):function(e,t){return!(e.type||!t||!t.length)&&function(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch(e){}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}(e).some(e=>an(e,t))}(e,t.ignoreErrors)?(ut&&vt.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${wn(e)}`),!0):function(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))}(e)?(ut&&vt.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${wn(e)}`),!0):function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&an(n,t)}(e,t.ignoreTransactions)?(ut&&vt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${wn(e)}`),!0):function(e,t){if(!t||!t.length)return!1;const n=ns(e);return!!n&&an(n,t)}(e,t.denyUrls)?(ut&&vt.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${wn(e)}.\nUrl: ${ns(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;const n=ns(e);return!n||an(n,t)}(e,t.allowUrls)&&(ut&&vt.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${wn(e)}.\nUrl: ${ns(e)}`),!0)}(t,s)?null:t}});function ns(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(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}(t):null}catch(t){return ut&&vt.error(`Cannot extract url for event ${wn(e)}`),null}}function rs(e,t,n=250,r,o,s,i){if(!(s.exception&&s.exception.values&&i&&Jt(i.originalException,Error)))return;const a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;var c,l;a&&(s.exception.values=(c=os(e,t,o,i.originalException,r,s.exception.values,a,0),l=n,c.map(e=>(e.value&&(e.value=on(e.value,l)),e))))}function os(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Jt(r[o],Error)){ss(i,a);const s=e(t,r[o]),l=c.length;is(s,o,l,a),c=os(e,t,n,r[o],o,[s,...c],s,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,s)=>{if(Jt(r,Error)){ss(i,a);const l=e(t,r),u=c.length;is(l,`errors[${s}]`,u,a),c=os(e,t,n,r,o,[l,...c],l,u)}}),c}function ss(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 is(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 as(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 cs(e){return e.split(/\\?\//).filter(e=>e.length>0&&","!==e).length}function ls(){"console"in pt&&mt.forEach(function(e){e in pt.console&&cn(pt.console,e,function(t){return gt[e]=t,function(...t){Pt("console",{args:t,level:e});const n=gt[e];n&&n.apply(pt.console,t)}})})}function us(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ds=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!(!t||!function(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!hs(e,t)||!ps(e,t))}(e,t)&&!function(e,t){const n=fs(t),r=fs(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&hs(e,t)&&ps(e,t))}(e,t))}(t,e))return ut&&vt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function ps(e,t){let n=xt(e),r=xt(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(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 hs(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(e){return!1}}function fs(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ms(e){return e.split(",").filter(e=>!e.split("=")[0].startsWith(ar)).join(",")}function gs(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const ys=pt;function vs(){if(!("fetch"in ys))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function bs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function _s(e,t){const n="fetch";Mt(n,e),Ot(n,()=>Ss(void 0,t))}function Ss(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!vs())return!1;if(bs(ys.fetch))return!0;let e=!1;const t=ys.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=bs(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ft&&vt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||cn(pt,"fetch",function(t){return function(...n){const r=new Error,{method:o,url:s}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Es(t),method:ks(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Es(t),method:ks(t,"method")?String(t.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:o,url:s},startTimestamp:1e3*vn(),virtualError:r};return e||Pt("fetch",{...i}),t.apply(pt,n).then(async t=>(e?e(t):Pt("fetch",{...i,endTimestamp:1e3*vn(),response:t}),t),e=>{throw Pt("fetch",{...i,endTimestamp:1e3*vn(),error:e}),Ut(e)&&void 0===e.stack&&(e.stack=r.stack,ln(e,"framesToPop",1)),e})}})}function ws(e){let t;try{t=e.clone()}catch(e){return}!async function(t){if(t&&t.body){const n=t.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let t;try{t=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(t),o&&(Pt("fetch-body-resolved",{endTimestamp:1e3*vn(),response:e}),s=!1)}catch(e){s=!1}finally{clearTimeout(t)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}(t)}function ks(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Es(e){return"string"==typeof e?e:e?ks(e,"url")?e.url:e.toString?e.toString():"":""}function Cs(){return"undefined"!=typeof window&&(!(("undefined"==typeof __SENTRY_BROWSER_BUNDLE__||!__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0))||function(){const e=pt.process;return!!e&&"renderer"===e.type}())}const xs=pt;function Ts(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 Is=pt;let Ms=0;function Os(){return Ms>0}function Ps(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(dn(e))return e}catch(t){return e}const n=function(...n){try{const r=n.map(e=>Ps(e,t));return e.apply(this,r)}catch(e){throw Ms++,setTimeout(()=>{Ms--}),Kn(r=>{r.addEventProcessor(e=>(t.mechanism&&(kn(e,void 0,void 0),En(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),xo(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch(e){}un(n,e),ln(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch(e){}return n}const Rs="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function As(e,t){const n=Ls(e,t),r={type:$s(t),value:Fs(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ds(e,t){return{exception:{values:[As(e,t)]}}}function Ls(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&Ns.test(e.message)?1:0}(t),o=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(n,r,o)}catch(e){}return[]}const Ns=/Minified React error #\d+;/i;function Hs(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function $s(e){const t=e&&e.name;return!t&&Hs(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Fs(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:Hs(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function js(e,t,n,r,o){let s;if(Vt(t)&&t.error)return Ds(e,t.error);if(zt(t)||Bt(t,"DOMException")){const o=t;if("stack"in t)s=Ds(e,t);else{const t=o.name||(zt(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Us(e,i,n,r),kn(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return Ut(t)?Ds(e,t):Zt(t)||Gt(t)?(s=function(e,t,n,r){const o=Zn(),s=o&&o.getOptions().normalizeDepth,i=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}(t),a={__serialized__:Kr(t,s)};if(i)return{exception:{values:[As(e,i)]},extra:a};const c={exception:{values:[{type:Gt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Bs(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Ls(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,n,o),En(s,{synthetic:!0}),s):(s=Us(e,t,n,r),kn(s,`${t}`,void 0),En(s,{synthetic:!0}),s)}function Us(e,t,n,r){const o={};if(r&&n){const r=Ls(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),En(o,{synthetic:!0})}if(qt(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 Bs(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(pn(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return on(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:on(r,t)}return""}(e),r=t?"promise rejection":"exception";return Vt(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Gt(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class Vs extends jo{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};Ko(t,"browser",["browser"],Is.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&Is.document&&Is.document.addEventListener("visibilitychange",()=>{"hidden"===Is.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){const o=js(e,t,n&&n.syntheticException||void 0,r);return En(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Tn(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const s=Us(e,t,r&&r.syntheticException||void 0,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Tn(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Rs&&vt.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const o={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:Vr(r)}},s=function(e){return[{type:"user_report"},e]}(e);return Gr(o,[s])}(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 zs="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ws=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o||0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},qs=pt,Ks=(e=!0)=>{const t=qs.performance&&qs.performance.getEntriesByType&&qs.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Zs=()=>{const e=Ks();return e&&e.activationStart||0},Gs=(e,t)=>{const n=Ks();let r="navigate";return n&&(qs.document&&qs.document.prerendering||Zs()>0?r="prerender":qs.document&&qs.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Ys=(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(e){}},Js=e=>{const t=t=>{("pagehide"===t.type||qs.document&&"hidden"===qs.document.visibilityState)&&e(t)};qs.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Xs=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Qs=-1;const ei=e=>{"hidden"===qs.document.visibilityState&&Qs>-1&&(Qs="visibilitychange"===e.type?e.timeStamp:0,ti())},ti=()=>{removeEventListener("visibilitychange",ei,!0),removeEventListener("prerenderingchange",ei,!0)},ni=()=>(qs.document&&Qs<0&&(Qs="hidden"!==qs.document.visibilityState||qs.document.prerendering?Infinity:0,addEventListener("visibilitychange",ei,!0),addEventListener("prerenderingchange",ei,!0)),{get firstHiddenTime(){return Qs}}),ri=e=>{qs.document&&qs.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},oi=[1800,3e3],si=[.1,.25],ii=[100,300];let ai=0,ci=Infinity,li=0;const ui=e=>{e.forEach(e=>{e.interactionId&&(ci=Math.min(ci,e.interactionId),li=Math.max(li,e.interactionId),ai=li?(li-ci)/7+1:0)})};let di;const pi=()=>{"interactionCount"in performance||di||(di=Ys("event",ui,{type:"event",buffered:!0,durationThreshold:0}))},hi=[],fi=new Map,mi=()=>(di?ai:performance.interactionCount||0)-0,gi=[],yi=e=>{if(gi.forEach(t=>t(e)),!e.interactionId&&"first-input"!==e.entryType)return;const t=hi[hi.length-1],n=fi.get(e.interactionId);if(n||hi.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]};fi.set(t.id,t),hi.push(t)}hi.sort((e,t)=>t.latency-e.latency),hi.length>10&&hi.splice(10).forEach(e=>fi.delete(e.id))}},vi=e=>{const t=qs.requestIdleCallback||qs.setTimeout;let n=-1;return e=Xs(e),qs.document&&"hidden"===qs.document.visibilityState?e():(n=t(e),Js(e)),n},bi=[200,500],_i=[2500,4e3],Si={},wi=[800,1800],ki=e=>{qs.document&&qs.document.prerendering?ri(()=>ki(e)):qs.document&&"complete"!==qs.document.readyState?addEventListener("load",()=>ki(e),!0):setTimeout(e,0)},Ei={},Ci={};let xi,Ti,Ii,Mi,Oi;function Pi(e,t=!1){return Bi("cls",e,Hi,xi,t)}function Ri(e,t=!1){return Bi("lcp",e,Fi,Ii,t)}function Ai(e){return Bi("fid",e,$i,Ti)}function Di(e){return Bi("inp",e,Ui,Oi)}function Li(e,t){return Vi(e,t),Ci[e]||(function(e){const t={};"event"===e&&(t.durationThreshold=0),Ys(e,t=>{Ni(e,{entries:t})},t)}(e),Ci[e]=!0),zi(e,t)}function Ni(e,t){const n=Ei[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){zs&&vt.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ct(r)}\nError:`,t)}}function Hi(){return((e,t={})=>{((e,t={})=>{ri(()=>{const n=ni(),r=Gs("FCP");let o;const s=Ys("paint",e=>{e.forEach(e=>{"first-contentful-paint"===e.name&&(s.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Zs(),0),r.entries.push(e),o(!0)))})});s&&(o=Ws(e,r,oi,t.reportAllChanges))})})(Xs(()=>{const n=Gs("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=Ys("layout-shift",i);a&&(r=Ws(e,n,si,t.reportAllChanges),Js(()=>{i(a.takeRecords()),r(!0)}),setTimeout(r,0))}))})(e=>{Ni("cls",{metric:e}),xi=e},{reportAllChanges:!0})}function $i(){return((e,t={})=>{ri(()=>{const n=ni(),r=Gs("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=Ys("first-input",i);o=Ws(e,r,ii,t.reportAllChanges),a&&Js(Xs(()=>{i(a.takeRecords()),a.disconnect()}))})})(e=>{Ni("fid",{metric:e}),Ti=e})}function Fi(){return((e,t={})=>{ri(()=>{const n=ni(),r=Gs("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-Zs(),0),r.entries=[e],o())})},i=Ys("largest-contentful-paint",s);if(i){o=Ws(e,r,_i,t.reportAllChanges);const n=Xs(()=>{Si[r.id]||(s(i.takeRecords()),i.disconnect(),Si[r.id]=!0,o(!0))});["keydown","click"].forEach(e=>{qs.document&&addEventListener(e,()=>vi(n),{once:!0,capture:!0})}),Js(n)}})})(e=>{Ni("lcp",{metric:e}),Ii=e},{reportAllChanges:!0})}function ji(){return((e,t={})=>{const n=Gs("TTFB"),r=Ws(e,n,wi,t.reportAllChanges);ki(()=>{const e=Ks();e&&(n.value=Math.max(e.responseStart-Zs(),0),n.entries=[e],r(!0))})})(e=>{Ni("ttfb",{metric:e}),Mi=e})}function Ui(){return((e,t={})=>{"PerformanceEventTiming"in qs&&"interactionId"in PerformanceEventTiming.prototype&&ri(()=>{pi();const n=Gs("INP");let r;const o=e=>{vi(()=>{e.forEach(yi);const t=(()=>{const e=Math.min(hi.length-1,Math.floor(mi()/50));return hi[e]})();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())})},s=Ys("event",o,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=Ws(e,n,bi,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Js(()=>{o(s.takeRecords()),r(!0)}))})})(e=>{Ni("inp",{metric:e}),Oi=e})}function Bi(e,t,n,r,o=!1){let s;return Vi(e,t),Ci[e]||(s=n(),Ci[e]=!0),r&&t({metric:r}),zi(e,t,o?s:void 0)}function Vi(e,t){Ei[e]=Ei[e]||[],Ei[e].push(t)}function zi(e,t,n){return()=>{n&&n();const r=Ei[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}function Wi(e){return"number"==typeof e&&isFinite(e)}function qi(e,t,n,{...r}){const o=vr(e).start_timestamp;return o&&o>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),ho(e,()=>{const e=po({startTime:t,...r});return e&&e.end(n),e})}function Ki(e){const t=Zn();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a}=t.getOptions(),c=t.getIntegrationByName("Replay"),l=c&&c.getReplayId(),u=Wn(),d=u.getUser(),p=void 0!==d?d.email||d.id||d.ip_address:void 0;let h;try{h=u.getScopeData().contexts.profile.profile_id}catch(e){}return po({name:n,attributes:{release:i,environment:a,user:p||void 0,profile_id:h||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":qs.navigator&&qs.navigator.userAgent,...o},startTime:s,experimental:{standalone:!0}})}function Zi(){return qs&&qs.addEventListener&&qs.performance}function Gi(e){return e/1e3}let Yi,Ji,Xi,Qi,ea,ta,na=0,ra={};function oa(e,t,n,r,o=n){const s=function(e){return"secureConnection"===e?"connectEnd":"fetch"===e?"domainLookupStart":`${e}End`}(n),i=t[s],a=t[`${n}Start`];a&&i&&qi(e,r+Gi(a),r+Gi(i),{op:`browser.${o}`,name:t.name,attributes:{[er]:"auto.ui.browser.metrics"}})}function sa(e,t,n,r){const o=t[n];null!=o&&o<2147483647&&(e[r]=o)}function ia(e){Mt("dom",e),Ot("dom",aa)}function aa(){if(!qs.document)return;const e=Pt.bind(null,"dom"),t=ca(e,!0);qs.document.addEventListener("click",t,!1),qs.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=qs[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(cn(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=ca(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch(e){}return t.call(this,n,r,o)}}),cn(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(e){}return e.call(this,t,n,r)}}))})}function ca(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;ln(n,"_sentryCaptured",!0),r&&!r._sentryId&&ln(r,"_sentryId",_n());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==Qi)return!1;try{if(!e.target||e.target._sentryId!==ea)return!1}catch(e){}return!0})(n)||(e({event:n,name:o,global:t}),Qi=n.type,ea=r?r._sentryId:void 0),clearTimeout(Xi),Xi=qs.setTimeout(()=>{ea=void 0,Qi=void 0},1e3)}}function la(e){const t="history";Mt(t,e),Ot(t,ua)}function ua(){if(!function(){const e=xs.chrome;return!(e&&e.app&&e.app.runtime||!("history"in xs)||!xs.history.pushState||!xs.history.replaceState)}())return;const e=qs.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=ta,t=String(n);ta=t,Pt("history",{from:e,to:t})}return e.apply(this,t)}}qs.onpopstate=function(...t){const n=qs.location.href,r=ta;if(ta=n,Pt("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},cn(qs.history,"pushState",t),cn(qs.history,"replaceState",t)}const da={};function pa(e){const t=da[e];if(t)return t;let n=qs[e];if(bs(n))return da[e]=n.bind(qs);const r=qs.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){zs&&vt.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?da[e]=n.bind(qs):n}function ha(e){da[e]=void 0}function fa(...e){return pa("setTimeout")(...e)}const ma="__sentry_xhr_v3__";function ga(e){Mt("xhr",e),Ot("xhr",ya)}function ya(){if(!qs.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*vn(),s=Wt(n[0])?n[0].toUpperCase():void 0,i=function(e){if(Wt(e))return e;try{return e.toString()}catch(e){}}(n[1]);if(!s||!i)return e.apply(t,n);t[ma]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[ma];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}Pt("xhr",{endTimestamp:1e3*vn(),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[ma];return s&&Wt(r)&&Wt(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[ma];return r?(void 0!==n[0]&&(r.body=n[0]),Pt("xhr",{startTimestamp:1e3*vn(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}const va=[],ba=new Map,_a={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Sa(e,t=pa("fetch")){let n=0,r=0;return function(e,t,n=function(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 In(new $o("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 Mn((n,r)=>{let o=t.length;if(!o)return n(!0);const s=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Tn(e).then(()=>{--o||(clearTimeout(s),n(!0))},r)})})}}}(e.bufferSize||64)){let r={};return{send:function(o){const s=[];if(Jr(o,(t,n)=>{const o=ro(n);if(Vo(r,o)){const r=Wo(t,n);e.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(t)}),0===s.length)return Tn({});const i=Gr(o[0],s),a=t=>{Jr(i,(n,r)=>{const o=Wo(n,r);e.recordDroppedEvent(t,ro(r),o)})};return n.add(()=>t({body:Qr(i)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&ut&&vt.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=zo(r,e),e),e=>{throw a("network_error"),e})).then(e=>e,e=>{if(e instanceof $o)return ut&&vt.error("Skipped sending event because buffer is full."),a("queue_overflow"),Tn({});throw e})},flush:e=>n.drain(e)}}(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 ha("fetch"),In("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 ha("fetch"),n-=s,r--,In(e)}})}function wa(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?bt:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const ka=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ea=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ca=/\((\S*)(?::(\d+))(?::(\d+))\)/,xa=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ta=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ia=wt([30,e=>{const t=ka.exec(e);if(t){const[,e,n,r]=t;return wa(e,bt,+n,+r)}const n=Ea.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Ca.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Ma(n[1]||bt,n[2]);return wa(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=xa.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ta.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]||bt;return[n,e]=Ma(n,e),wa(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Ma=(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]:bt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Oa=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.console&&function(e){const t="console";Mt(t,e),Ot(t,ls)}(function(e){return function(t){if(Zn()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:us(t.level),message:sn(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${sn(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Yo(n,{input:t.args,level:t.level})}}(e)),t.dom&&ia(function(e,t){return function(n){if(Zn()!==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>1024&&(Rs&&vt.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=en(t,{keyAttrs:s,maxStringLength:i}),o=rn(t)}catch(e){r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),Yo(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&ga(function(e){return function(t){if(Zn()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ma];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};Yo({category:"xhr",data:{method:s,url:i,status_code:a},type:"http",level:gs(a)},l)}}(e)),t.fetch&&_s(function(e){return function(t){if(Zn()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error)Yo({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};Yo({category:"fetch",data:o,type:"http",level:gs(o.status_code)},s)}}}(e)),t.history&&la(function(e){return function(t){if(Zn()!==e)return;let n=t.from,r=t.to;const o=as(Is.location.href);let s=n?as(n):void 0;const i=as(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),Yo({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Zn()===e&&Yo({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:wn(t)},{event:t})}}(e))}}},Pa=["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"],Ra=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&cn(Is,"setTimeout",Aa),t.setInterval&&cn(Is,"setInterval",Aa),t.requestAnimationFrame&&cn(Is,"requestAnimationFrame",Da),t.XMLHttpRequest&&"XMLHttpRequest"in Is&&cn(XMLHttpRequest.prototype,"send",La);const e=t.eventTarget;e&&(Array.isArray(e)?e:Pa).forEach(Na)}}};function Aa(e){return function(...t){return t[0]=Ps(t[0],{mechanism:{data:{function:Ct(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Da(e){return function(t){return e.apply(this,[Ps(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ct(e)},handled:!1,type:"instrument"}})])}}function La(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&cn(n,e,function(t){const n={mechanism:{data:{function:e,handler:Ct(t)},handled:!1,type:"instrument"}},r=dn(t);return r&&(n.mechanism.data.handler=Ct(r)),Ps(t,n)})}),e.apply(this,t)}}function Na(e){const t=Is[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(cn(n,"addEventListener",function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=Ps(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ct(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,Ps(r,{mechanism:{data:{function:"addEventListener",handler:Ct(r),target:e},handled:!1,type:"instrument"}}),o])}}),cn(n,"removeEventListener",function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch(e){}return e.call(this,t,n,r)}}))}const Ha=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){At(t=>{const{stackParser:n,attachStacktrace:r}=Fa();if(Zn()!==e||Os())return;const{msg:o,url:s,line:i,column:a,error:c}=t,l=function(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||[],l=r,u=n,d=Wt(t)&&t.length>0?t:nn();return 0===c.length&&c.push({colno:l,filename:d,function:bt,in_app:!0,lineno:u}),e}(js(n,c||o,void 0,r,!1),s,i,a);l.level="error",To(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}(e),$a("onerror")),t.onunhandledrejection&&(function(e){Nt(t=>{const{stackParser:n,attachStacktrace:r}=Fa();if(Zn()!==e||Os())return;const o=function(e){if(Kt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(t),s=Kt(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:js(n,o,void 0,r,!0);s.level="error",To(s,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),$a("onunhandledrejection"))}}};function $a(e){Rs&&vt.log(`Global Handler attached: ${e}`)}function Fa(){const e=Zn();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const ja=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){const s=o.getOptions();rs(As,s.stackParser,s.maxValueLength,n,t,e,r)}}};function Ua(e){const t=[ts(),Qo(),Ra(),Oa(),Ha(),ja(),ds(),{name:"HttpContext",preprocessEvent(e){if(!Is.navigator&&!Is.location&&!Is.document)return;const t=e.request&&e.request.url||Is.location&&Is.location.href,{referrer:n}=Is.document||{},{userAgent:r}=Is.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}}];return!1!==e.autoSessionTracking&&t.push({name:"BrowserSession",setupOnce(){void 0!==Is.document?(Mo({ignoreDuration:!0}),Ro(),la(({from:e,to:t})=>{void 0!==e&&e!==t&&(Mo({ignoreDuration:!0}),Ro())})):Rs&&vt.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),t}function Ba(e={}){if(!Is.document)return void(Rs&&vt.error("Global document not defined in showReportDialog call"));const t=Wn(),n=t.getClient(),r=n&&n.getDsn();if(!r)return void(Rs&&vt.error("DSN not configured for showReportDialog call"));if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const t=qn().lastEventId();t&&(e.eventId=t)}const o=Is.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=function(e,t){const n=Wr(e);if(!n)return"";const r=`${Ao(n)}embed/error-page/`;let o=`dsn=${Vr(n)}`;for(const e in t)if("dsn"!==e&&"onClose"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(o+=`&name=${encodeURIComponent(e.name)}`),e.email&&(o+=`&email=${encodeURIComponent(e.email)}`)}else o+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${o}`}(r,e),e.onLoad&&(o.onload=e.onLoad);const{onClose:s}=e;if(s){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{s()}finally{Is.removeEventListener("message",e)}};Is.addEventListener("message",e)}const i=Is.document.head||Is.document.body;i?i.appendChild(o):Rs&&vt.error("Not injecting report dialog. No injection point found in HTML")}const Va=pt,za="sentryReplaySession",Wa="Unable to send Replay",qa=15e4,Ka=5e3,Za=2e7;function Ga(e,t){return null!=e?e:t()}function Ya(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 Ja;function Xa(e){const t=Ya([e,"optionalAccess",e=>e.host]);return Boolean(Ya([t,"optionalAccess",e=>e.shadowRoot])===e)}function Qa(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ec(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,tc).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function tc(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=ec(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;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} }`}(e)),n&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),n||r)return t}return t||e.cssText}!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"}(Ja||(Ja={}));class nc{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){return e?Ga(Ya([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),()=>-1):-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){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){this.idNodeMap.set(t.id,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 rc({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function oc({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function sc(e){return e.toLowerCase()}function ic(e){return e.toUpperCase()}const ac="__rrweb_original__";function cc(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?sc(t):null}function lc(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function uc(e,t){let n;try{n=new URL(e,Ga(t,()=>window.location.href))}catch(e){return null}return Ga(Ya([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),()=>null)}const dc={};function pc(e){const t=dc[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return dc[e]=r.bind(window)}function hc(...e){return pc("setTimeout")(...e)}function fc(...e){return pc("clearTimeout")(...e)}function mc(e){try{return e.contentDocument}catch(e){}}let gc=1;const yc=new RegExp("[^a-z0-9-_:]");function vc(){return gc++}let bc,_c;const Sc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,wc=/^(?:[a-z+]+:)?\/\//i,kc=/^www\..*/i,Ec=/^(data:)([^,]*),(.*)/i;function Cc(e,t){return(e||"").replace(Sc,(e,n,r,o,s,i)=>{const a=r||s||i,c=n||o||"";if(!a)return e;if(wc.test(a)||kc.test(a))return`url(${c}${a}${c})`;if(Ec.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`})}const xc=/^[^ \t\n\r\u000c]+/,Tc=/^[, \t\n\r\u000c]+/,Ic=new WeakMap;function Mc(e,t){return t&&""!==t.trim()?Oc(e,t):t}function Oc(e,t){let n=Ic.get(e);if(n||(n=e.createElement("a"),Ic.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Pc(e,t,n,r,o,s){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Mc(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(Tc),!(n>=t.length);){let s=r(xc);if(","===s.slice(-1))s=Mc(e,s.substring(0,s.length-1)),o.push(s);else{let r="";s=Mc(e,s);let i=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((s+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,o.push((s+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?Cc(r,Oc(e)):"object"===t&&"data"===n?Mc(e,r):"function"==typeof s?s(n,r,o):r:Mc(e,r):r}function Rc(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Ac(e,t,n=Infinity,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ac(e.parentNode,t,n,r+1):-1}function Dc(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch(e){return!1}}}function Lc(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=Ac(i,Dc(r,o)),c<0)return!0;a=Ac(i,Dc(t,n),c>=0?c:Infinity)}else{if(a=Ac(i,Dc(t,n)),a<0)return!1;c=Ac(i,Dc(r,o),a>=0?a:Infinity)}return a>=0?!(c>=0)||a<=c:!(c>=0||!s)}catch(e){}return!!s}function Nc(e){return null==e?"":e.toLowerCase()}function Hc(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:S=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:M=!0}=t;const O=function(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:f={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:S=!1}=t,w=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Ja.Document,childNodes:[],compatMode:e.compatMode}:{type:Ja.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ja.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m,maskTextClass:g,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:b}=t,_=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,s),S=function(e){if(e instanceof HTMLFormElement)return"form";const t=sc(e.tagName);return yc.test(t)?"div":t}(e);let w={};const k=e.attributes.length;for(let t=0;t<k;t++){const r=e.attributes[t];r.name&&!Rc(S,r.name)&&(w[r.name]=Pc(n,S,sc(r.name),r.value,e,c))}if("link"===S&&i){const t=Array.from(n.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=ec(t)),r&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=Cc(r,t.href))}if("style"===S&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=ec(e.sheet);t&&(w._cssText=Cc(t,Oc(n)))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const t=e,n=cc(t),r=lc(t,ic(S),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=Lc(t,g,v,y,b,rc({type:n,tagName:ic(S),maskInputOptions:a}));w.value=oc({isMasked:e,element:t,value:r,maskInputFn:l})}o&&(w.checked=o)}if("option"===S&&(e.selected&&!a.select?w.selected=!0:delete w.selected),"canvas"===S&&p)if("2d"===e.__context)(function(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;if(new Uint32Array((ac in o?o[ac]: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})(e)||(w.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)&&(w.rr_dataURL=t)}if("img"===S&&d){bc||(bc=n.createElement("canvas"),_c=bc.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",o=t.crossOrigin,s=()=>{t.removeEventListener("load",s);try{bc.width=t.naturalWidth,bc.height=t.naturalHeight,_c.drawImage(t,0,0),w.rr_dataURL=bc.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?w.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}if("audio"!==S&&"video"!==S||(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)),_){const{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}let E;"iframe"!==S||h(w.src)||(_||mc(e)||(w.rr_src=w.src),delete w.src);try{customElements.get(S)&&(E=!0)}catch(e){}return{type:Ja.Element,tagName:S,attributes:w,childNodes:[],isSVG:(C=e,Boolean("svg"===C.tagName||C.ownerSVGElement)||void 0),needBlock:_,rootId:m,isCustom:E};var C}(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:f,maskInputFn:g,dataURLOptions:y,inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:S,rootId:w,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let 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||Ya([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=ec(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=Cc(p,Oc(t.doc))}f&&(p="SCRIPT_PLACEHOLDER");const g=Lc(e,r,s,o,i,n);return h||f||m||!p||!g||(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),m&&p&&(c.textarea||g)&&(p=l?l(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p&&(p=oc({isMasked:Lc(e,r,s,o,i,rc({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:l})),{type:Ja.Text,textContent:p||"",isStyle:h,rootId:u}}(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:f,maskInputFn:g,rootId:w});case e.CDATA_SECTION_NODE:return{type:Ja.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:Ja.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:b,inlineImages:_,recordCanvas:S,keepIframeSrcFn:T,newlyAddedElement:I});if(!O)return console.warn(e,"not serialized"),null;let P;P=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===Ja.Comment)return!0;if(e.type===Ja.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"===uc(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Nc(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Nc(e.attributes.name)||"icon"===Nc(e.attributes.rel)||"apple-touch-icon"===Nc(e.attributes.rel)||"shortcut icon"===Nc(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Nc(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Nc(e.attributes.property).match(/^(og|twitter|fb):/)||Nc(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Nc(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Nc(e.attributes.name)||"googlebot"===Nc(e.attributes.name)||"bingbot"===Nc(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Nc(e.attributes.name)||"generator"===Nc(e.attributes.name)||"framework"===Nc(e.attributes.name)||"publisher"===Nc(e.attributes.name)||"progid"===Nc(e.attributes.name)||Nc(e.attributes.property).match(/^article:/)||Nc(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Nc(e.attributes.name)||"yandex-verification"===Nc(e.attributes.name)||"csrf-token"===Nc(e.attributes.name)||"p:domain_verify"===Nc(e.attributes.name)||"verify-v1"===Nc(e.attributes.name)||"verification"===Nc(e.attributes.name)||"shopify-checkout-api-token"===Nc(e.attributes.name)))return!0}}return!1}(O,v)&&(M||O.type!==Ja.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?vc():-2;const R=Object.assign(O,{id:P});if(r.add(e,R),-2===P)return null;w&&w(e);let A=!p;if(R.type===Ja.Element){A=A&&!R.needBlock,delete R.needBlock;const t=e.shadowRoot;t&&Qa(t)&&(R.isShadowHost=!0)}if((R.type===Ja.Document||R.type===Ja.Element)&&A){v.headWhitespace&&R.type===Ja.Element&&"head"===R.tagName&&(M=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:S,preserveWhiteSpace:M,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T};for(const n of Array.from(e.childNodes)){const e=Hc(n,t);e&&R.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Hc(n,t);r&&(Qa(e.shadowRoot)&&(r.isShadow=!0),R.childNodes.push(r))}}return e.parentNode&&Xa(e.parentNode)&&Qa(e.parentNode)&&(R.isShadow=!0),R.type===Ja.Element&&"iframe"===R.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let o,s=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=hc(()=>{s||(t(),s=!0)},n);return void e.addEventListener("load",()=>{fc(r),s=!0,t()})}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return hc(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=mc(e);if(t&&k){const n=Hc(t,{doc:t,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:S,preserveWhiteSpace:M,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T});n&&k(e,n)}},E),R.type===Ja.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===uc(R.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const s=hc(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{fc(s),o=!0,t()})}(e,()=>{if(C){const t=Hc(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:S,preserveWhiteSpace:M,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T});t&&C(e,t)}},x),R}function $c(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 Fc(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const jc="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 Uc={map:{},getId:()=>(console.error(jc),-1),getNode:()=>(console.error(jc),null),removeNodeFromMap(){console.error(jc)},has:()=>(console.error(jc),!1),reset(){console.error(jc)}};function Bc(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||!1!==n.leading||(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(function(...e){al("clearTimeout")(...e)}(r),r=null),o=i,e.apply(c,s)):r||!1===n.trailing||(r=cl(()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},a))}}function Vc(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){cl(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>Vc(e,t,s||{},!0)}function zc(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(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Uc=new Proxy(Uc,{get:(e,t,n)=>("map"===t&&console.error(jc),Reflect.get(e,t,n))}));let Wc=Date.now;function qc(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:$c([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||$c([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||$c([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:$c([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||$c([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||$c([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function Kc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Zc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Gc(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Yc(e,t,n,r,o){if(!e)return!1;const s=Gc(e);if(!s)return!1;const i=Dc(t,n);if(!o){const e=r&&s.matches(r);return i(s)&&!e}const a=Ac(s,i);let c=-1;return!(a<0)&&(r&&(c=Ac(s,Dc(null,r))),a>-1&&c<0||a<c)}function Jc(e,t){return-2===t.getId(e)}function Xc(e,t){if(Xa(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Xc(e.parentNode,t))}function Qc(e){return Boolean(e.changedTouches)}function el(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function tl(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function nl(e){return Boolean($c([e,"optionalAccess",e=>e.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Wc=()=>(new Date).getTime());class rl{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return null!=(t=this.styleIDMap.get(e))?t:-1;var t}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 ol(e){let t=null;return $c([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 sl(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=ol(n);)n=t;return n}(e);return t.contains(n)}(e))}const il={};function al(e){const t=il[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return il[e]=r.bind(window)}function cl(...e){return al("setTimeout")(...e)}var ll,ul,dl=/* @__PURE__ */(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))(dl||{}),pl=/* @__PURE__ */(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))(pl||{}),hl=/* @__PURE__ */(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))(hl||{}),fl=/* @__PURE__ */(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(fl||{});function ml(e){try{return e.contentDocument}catch(e){}}function gl(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 yl(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"}(ll||(ll={})),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"}(ul||(ul={}));class vl{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=gl([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&yl(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&&yl(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 bl=(e,t)=>`${e}@${t}`;class _l{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 vl,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||!sl(o))return;const s=Xa(o.parentNode)?this.mirror.getId(ol(o)):this.mirror.getId(o.parentNode),i=r(o);if(-1===s||-1===i)return n.addNode(o);const a=Hc(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=>{el(e,this.mirror)&&!Yc(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),tl(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),nl(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{Yc(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)wl(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)kl(this.droppedSet,e)||wl(this.removes,e,this.mirror)?kl(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let s=null;for(;n.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&-1!==this.mirror.getId(t.parentNode.host)){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(!Jc(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Yc(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:Lc(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Gc(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=cc(t),o=t.tagName;r=lc(t,o,n);const s=rc({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=oc({isMasked:Lc(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(Yc(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(ml(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"),!Rc(t.tagName,n)&&(o.attributes[n]=Pc(this.doc,sc(t.tagName),sc(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||s!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===s?r:[r,s]:o._unchangedStyles[e]=[r,s]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(Yc(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=Xa(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Yc(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Jc(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Sl(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Xc(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[bl(n,r)]?Sl(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Xa(e.target)||!Qa(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(Jc(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[bl(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Yc(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(e=>this.genAdds(e)),nl(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 Sl(e,t){e.delete(t),t.childNodes.forEach(t=>Sl(e,t))}function wl(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}(e,t,n)}function kl(e,t){return 0!==e.size&&El(e,t)}function El(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||El(e,n))}let Cl;function xl(e){Cl=e}function Tl(){Cl=void 0}const Il=e=>Cl?(...t)=>{try{return e(...t)}catch(e){if(Cl&&!0===Cl(e))return()=>{};throw e}}:e;function Ml(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 Ol=[];function Pl(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(e){}return e&&e.target}function Rl(e,t){const n=new _l;Ol.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=Ml([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);o&&window[o]&&(r=window[o]);const s=new r(Il(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 Al({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return Fc("scroll",Il(Bc(Il(i=>{const a=Pl(i);if(!a||Yc(a,r,o,s,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=qc(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}const Dl=["INPUT","TEXTAREA","SELECT"],Ll=new WeakMap;function Nl({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:m}){function g(e){let n=Pl(e);const u=e.isTrusted,g=n&&ic(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||Dl.indexOf(g)<0||Yc(n,r,o,s,!0))return;const v=n;if(v.classList.contains(i)||a&&v.matches(a))return;const b=cc(n);let _=lc(v,g,b),S=!1;const w=rc({maskInputOptions:c,tagName:g,type:b}),k=Lc(n,p,f,h,m,w);"radio"!==b&&"checkbox"!==b||(S=n.checked),_=oc({isMasked:k,element:n,value:_,maskInputFn:l}),y(n,d?{text:_,isChecked:S,userTriggered:u}:{text:_,isChecked:S});const E=n.name;"radio"===b&&E&&S&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach(e=>{if(e!==n){const t=oc({isMasked:k,element:e,value:lc(e,g,b),maskInputFn:l});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}})}function y(t,r){const o=Ll.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){Ll.set(t,r);const o=n.getId(t);Il(e)({...r,id:o})}}const v=("last"===u.input?["change"]:["input","change"]).map(e=>Fc(e,Il(g),t)),b=t.defaultView;if(!b)return()=>{v.forEach(e=>e())};const _=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value");return _&&_.set&&v.push(...[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]].map(e=>Vc(e[0],e[1],{set(){Il(g)({target:this,isTrusted:!1})}},!1,b))),Il(()=>{v.forEach(e=>e())})}function Hl(e){return function(e,t){if(Ul("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Ul("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Ul("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Ul("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 $l(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Fl({mirror:e,stylesheetManager:t},n){let r=null;r=e.getId("#document"===n.nodeName?n:n.host);const o=Ml("#document"===n.nodeName?[n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]:[n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),s=Ml([o,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(Ml([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 Ml([s,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=Ml([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(e){}return n}}),Il(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function jl(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Rl(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=Bc(Il(t=>{const n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),s),l=Il(Bc(Il(e=>{const t=Pl(e),{clientX:n,clientY:o}=Qc(e)?e.changedTouches[0]:e;i||(i=Wc()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Wc()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?pl.Drag:e instanceof MouseEvent?pl.MouseMove:pl.TouchMove)}),o,{trailing:!1})),u=[Fc("mousemove",l,n),Fc("touchmove",l,n),Fc("drag",l,n)];return Il(()=>{u.forEach(e=>e())})}(e),s=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(hl).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(i=>{let a=sc(i);const u=(t=>i=>{const a=Pl(i);if(Yc(a,r,o,s,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=fl.Mouse;break;case"touch":c=fl.Touch;break;case"pen":c=fl.Pen}c===fl.Touch&&(hl[t]===hl.MouseDown?u="TouchStart":hl[t]===hl.MouseUp&&(u="TouchEnd"))}else Qc(i)&&(c=fl.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===fl.Touch||u.startsWith("Mouse")&&c===fl.Mouse)&&(c=null)):hl[t]===hl.Click&&(c=l,l=null);const d=Qc(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:f}=d;Il(e)({type:hl[u],id:p,x:h,y:f,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(hl[i]){case hl.MouseDown:case hl.MouseUp:a=a.replace("mouse","pointer");break;case hl.TouchStart:case hl.TouchEnd:return}c.push(Fc(a,u,t))}),Il(()=>{c.forEach(e=>e())})}(e),i=Al(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=Il(Bc(Il(()=>{const t=Kc(),o=Zc();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)}),200));return Fc("resize",o,t)}(e,{win:n}),c=Nl(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=Il(i=>Bc(Il(s=>{const a=Pl(s);if(!a||Yc(a,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:o.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})}),s.media||500)),c=[Fc("play",a(0),i),Fc("pause",a(1),i),Fc("seeked",a(2),i),Fc("volumechange",a(3),i),Fc("ratechange",a(4),i)];return Il(()=>{c.forEach(e=>e())})}(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Il((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=$l(o,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),r.apply(o,s)})});const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Il((r,o,s)=>{const[i]=s,{id:a,styleId:c}=$l(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:Il((r,o,s)=>{const[i]=s,{id:a,styleId:c}=$l(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:Il((r,o,s)=>{const[i]=s,{id:a,styleId:c}=$l(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(o,s)})}));const c={};Bl("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Bl("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Bl("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Bl("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach(([r,o])=>{l[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Il((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=$l(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...Hl(o),a||0]}]}),r.apply(o,s)})}),o.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Il((r,o,s)=>{const[i]=s,{id:a,styleId:c}=$l(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...Hl(o),i]}]}),r.apply(o,s)})})}),Il(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}(e,{win:n}),d=Fl(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Il((o,i,a)=>{const[c,l,u]=a;if(n.has(c))return s.apply(i,[c,l,u]);const{id:d,styleId:p}=$l(Ml([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:Hl(i.parentRule)}),o.apply(i,a)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:Il((o,s,a)=>{const[c]=a;if(n.has(c))return i.apply(s,[c]);const{id:l,styleId:u}=$l(Ml([s,"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:Hl(s.parentRule)}),o.apply(s,a)})}),Il(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=zc(t.fonts,"add",function(t){return function(n){return cl(Il(()=>{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),Il(()=>{r.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=Il(()=>{const e=t.getSelection();if(!e||a&&Ml([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;Yc(a,r,o,s,!0)||Yc(u,r,o,s,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}i({ranges:c})});return c(),Fc("selectionchange",c)}(e),m=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?zc(n.customElements,"define",function(e){return function(n,r,o){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,r,o])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Il(()=>{Ol.forEach(e=>e.reset()),Ml([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),o(),s(),i(),a(),c(),l(),u(),d(),p(),h(),f(),m(),g.forEach(e=>e())})}function Ul(e){return void 0!==window[e]}function Bl(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Vl{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);return"number"!=typeof t?t: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 zl(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 Wl{constructor(){this.crossOriginIframeMirror=new Vl(vc),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class ql{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Vl(vc),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Vl(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}),zl([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=ml(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case dl.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:dl.IncrementalSnapshot,data:{source:pl.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case dl.Meta:case dl.Load:case dl.DomContentLoaded:return!1;case dl.Plugin:return t;case dl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case dl.IncrementalSnapshot:switch(t.data.source){case pl.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 pl.Drag:case pl.TouchMove:case pl.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case pl.ViewportResize:return!1;case pl.MediaInteraction:case pl.MouseInteraction:case pl.Scroll:case pl.CanvasMutation:case pl.Input:return this.replaceIds(t.data,e,["id"]),t;case pl.StyleSheetRule:case pl.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case pl.Font:return t;case pl.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case pl.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),zl([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])&&(t[o]=Array.isArray(t[o])?e.getIds(n,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===Ja.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Kl{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Zl{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(!Qa(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Rl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Al({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),cl(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Fl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=ml(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(zc(e.prototype,"attachShadow",function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&sl(this)&&n.addShadowRoot(this.shadowRoot,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class Gl{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Yl{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new rl,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:tc(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 Jl{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){al("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Xl,Ql;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Ts([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 eu=new nc;function tu(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,maxCanvasSize:S=null,packFn:w,sampling:k={},dataURLOptions:E={},mousemoveWait:C,recordDOM:x=!0,recordCanvas:T=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:P=!1,inlineImages:R=!1,plugins:A,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:L=new Set([]),errorHandler:N,onMutation:H,getCanvasManager:$}=e;xl(N);const F=!I||window.parent===window;let j=!1;if(!F)try{window.parent.document&&(j=!1)}catch(e){j=!0}if(F&&!t)throw new Error("emit function is required");if(!F&&!j)return()=>{};void 0!==C&&void 0===k.mousemove&&(k.mousemove=C),eu.reset();const U=!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!==g?g:{},B=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let V;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let z=0;const W=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!j&&(e=w(e)),e};Xl=(e,o)=>{const s=e;if(s.timestamp=Wc(),!Ts([Ol,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])||s.type===dl.FullSnapshot||s.type===dl.IncrementalSnapshot&&s.data.source===pl.Mutation||Ol.forEach(e=>e.unfreeze()),F)Ts([t,"optionalCall",e=>e(W(s),o)]);else if(j){const e={type:"rrweb",event:W(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===dl.FullSnapshot)V=s,z=0;else if(s.type===dl.IncrementalSnapshot){if(s.data.source===pl.Mutation&&s.data.isAttachIframe)return;z++,(r&&z>=r||n&&V&&s.timestamp-V.timestamp>n)&&ee(!0)}};const q=e=>{Xl({type:dl.IncrementalSnapshot,data:{source:pl.Mutation,...e}})},K=e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.Scroll,...e}}),Z=e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.CanvasMutation,...e}}),G=new Yl({mutationCb:q,adoptedStyleSheetCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Wl:new ql({mirror:eu,mutationCb:q,stylesheetManager:G,recordCrossOriginIframes:I,wrappedEmit:Xl});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:eu,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const J=new Jl,X=function(e,t){try{return e?e(t):new Gl}catch(e){return console.warn("Unable to initialize CanvasManager"),new Gl}}($,{mirror:eu,win:window,mutationCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.CanvasMutation,...e}}),recordCanvas:T,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:k.canvas,dataURLOptions:E,errorHandler:N}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Kl:new Zl({mutationCb:q,scrollCb:K,bypassOptions:{onMutation:H,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:U,dataURLOptions:E,maskAttributeFn:v,maskTextFn:_,maskInputFn:b,recordCanvas:T,inlineImages:R,sampling:k,slimDOMOptions:B,iframeManager:Y,stylesheetManager:G,canvasManager:X,keepIframeSrcFn:D,processedNodeManager:J},mirror:eu}),ee=(e=!1)=>{if(!x)return;Xl({type:dl.Meta,data:{href:window.location.href,width:Zc(),height:Kc()}},e),G.reset(),Q.init(),Ol.forEach(e=>e.lock());const t=function(e,t){const{mirror:n=new nc,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1}=t||{};return Hc(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:b,inlineImages:p,recordCanvas:h,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1})}(document,{mirror:eu,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskAllInputs:U,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,slimDOM:B,dataURLOptions:E,recordCanvas:T,inlineImages:R,onSerialize:e=>{el(e,eu)&&Y.addIframe(e),tl(e,eu)&&G.trackLinkElement(e),nl(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),e.contentWindow&&X.addWindow(e.contentWindow),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{G.attachLinkElement(e,t)},keepIframeSrcFn:D});if(!t)return console.warn("Failed to snapshot the document");Xl({type:dl.FullSnapshot,data:{node:t,initialOffset:qc(window)}}),Ol.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,eu.getId(document))};Ql=ee;try{const e=[],t=e=>Il(jl)({onMutation:H,mutationCb:q,mousemoveCb:(e,t)=>Xl({type:dl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.MouseInteraction,...e}}),scrollCb:K,viewportResizeCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.ViewportResize,...e}}),inputCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.Input,...e}}),mediaInteractionCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.MediaInteraction,...e}}),styleSheetRuleCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.StyleSheetRule,...e}}),styleDeclarationCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.StyleDeclaration,...e}}),canvasMutationCb:Z,fontCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.Font,...e}}),selectionCb:e=>{Xl({type:dl.IncrementalSnapshot,data:{source:pl.Selection,...e}})},customElementCb:e=>{Xl({type:dl.IncrementalSnapshot,data:{source:pl.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:U,inlineStylesheet:f,sampling:k,recordDOM:x,recordCanvas:T,inlineImages:R,userTriggeredOnInput:O,collectFonts:P,doc:e,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,keepIframeSrcFn:D,blockSelector:s,unblockSelector:i,slimDOMOptions:B,dataURLOptions:E,mirror:eu,iframeManager:Y,stylesheetManager:G,shadowDomManager:Q,processedNodeManager:J,canvasManager:X,ignoreCSSAttributes:L,plugins:Ts([A,"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=>Xl({type:dl.Plugin,data:{plugin:e.name,payload:t}})}))])||[]},{});Y.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Fc("DOMContentLoaded",()=>{Xl({type:dl.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&n()})),e.push(Fc("load",()=>{Xl({type:dl.Load,data:{}}),"load"===M&&n()},window))),()=>{e.forEach(e=>e()),J.destroy(),Ql=void 0,Tl()}}catch(e){console.warn(e)}}function nu(e){return e>9999999999?e:1e3*e}function ru(e){return e>9999999999?e/1e3:e}function ou(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:dl.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:qr(t,10,1e3)}}),"console"===t.category)))}function su(e){return e.closest("button,a")||e}function iu(e){const t=au(e);return t&&t instanceof Element?su(t):t}function au(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let cu;tu.mirror=eu,tu.takeFullSnapshot=function(e){if(!Ql)throw new Error("please take full snapshot after start recording");Ql(e)};const lu=new Set([pl.Mutation,pl.StyleSheetRule,pl.StyleDeclaration,pl.AdoptedStyleSheet,pl.CanvasMutation,pl.Selection,pl.MediaInteraction]);class uu{constructor(e,t,n=ou){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=(t=()=>{this._lastMutation=pu()},cu||(cu=[],cn(Va,"open",function(e){return function(...t){if(cu)try{cu.forEach(e=>e())}catch(e){}return e.apply(Va,t)}})),cu.push(t),()=>{const e=cu?cu.indexOf(t):-1;e>-1&&cu.splice(e,1)});var t;this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){return!du.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||!("A"!==e.tagName||!(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))||!(!t||!e.matches(t))}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:ru(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=ru(e)}registerScroll(e=Date.now()){this._lastScroll=ru(e)}registerClick(e){const t=su(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=pu();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||e.mutationAfter&&e.mutationAfter<=this._threshold),{clickCount:r,clickBreadcrumb:o}=e;if(n){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),s=n<1e3*this._timeout?"mutation":"timeout",i={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:Va.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:s,clickCount:r||1}};this._addBreadcrumbEvent(t,i)}else if(r>1){const e={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:Va.location.href,route:t.getCurrentRoute(),clickCount:r,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=fa(()=>this._checkClicks(),1e3)}}const du=["A","BUTTON","INPUT"];function pu(){return Date.now()/1e3}function hu(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var fu;!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"}(fu||(fu={}));const mu=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function gu(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(mu.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}function yu(e,t){const n=tu.mirror.getId(e),r=n&&tu.mirror.getNode(n),o=r&&tu.mirror.getMeta(r),s=o&&function(e){return e.type===fu.Element}(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>e.type===fu.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:gu(s.attributes)}}:{}}}const vu={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Su(s),end:Su(o),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Su(o);return{type:n,name:r,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=e;return 0===o?null:{type:`${t}.${m}`,start:Su(h),end:Su(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}}};function bu(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function _u(e){const t=vu[e.entryType];return t?t(e):null}function Su(e){return((bn||Va.performance.timeOrigin)+e)/1e3}function wu(e){const t=e.entries[e.entries.length-1];return Tu(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function ku(e){return void 0!==e.sources}function Eu(e){const t=[],n=[];for(const r of e.entries)if(ku(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=tu.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return Tu(e,"cumulative-layout-shift",n,t)}function Cu(e){const t=e.entries[e.entries.length-1];return Tu(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function xu(e){const t=e.entries[e.entries.length-1];return Tu(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function Tu(e,t,n,r){const o=e.value,s=e.rating,i=Su(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(e=>tu.mirror.getId(e)):void 0,attributions:r}}}const Iu="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Mu=["info","warn","error","log"],Ou="[Replay] ";function Pu(e,t="info"){Yo({category:"console",data:{logger:"replay"},level:t,message:`${Ou}${e}`},{level:t})}const Ru=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return Iu?(Mu.forEach(e=>{n[e]=(...n)=>{vt[e](Ou,...n),t&&Pu(n.join(""),us(e))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),vt.error(Ou,r),e?xo(r):t&&Pu(r,"error")},n.infoTick=(...e)=>{vt.info(Ou,...e),t&&setTimeout(()=>Pu(e[0]),0)}):Mu.forEach(e=>{n[e]=()=>{}}),n}();class Au extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class Du{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>Za)throw new Au;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?nu(e):null}}class Lu{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(){Iu&&Ru.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 Iu&&Ru.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 Nu{constructor(e){this._worker=new Lu(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=nu(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Za?Promise.reject(new Au):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{Iu&&Ru.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 Hu{constructor(e){this._fallback=new Du,this._compression=new Nu(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(Iu&&Ru.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){Iu&&Ru.exception(e,"Failed to add events when switching buffers.")}}}function $u(){try{return"sessionStorage"in Va&&!!Va.sessionStorage}catch(e){return!1}}function Fu(e){return void 0!==e&&Math.random()<e}function ju(e){const t=Date.now();return{id:e.id||_n(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function Uu(e){if($u())try{Va.sessionStorage.setItem(za,JSON.stringify(e))}catch(e){}}function Bu({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=function(e,t){return Fu(e)?"session":!!t&&"buffer"}(e,t),s=ju({sampled:o,previousSessionId:r});return n&&Uu(s),s}function Vu(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function zu(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Vu(e.started,t,r)||Vu(e.lastActivity,n,r)}function Wu(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!zu(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function qu({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&function(){if(!$u())return null;try{const e=Va.sessionStorage.getItem(za);if(!e)return null;const t=JSON.parse(e);return Iu&&Ru.infoTick("Loading existing session"),ju(t)}catch(e){return null}}();return o?Wu(o,{sessionIdleExpire:e,maxReplayDuration:t})?(Iu&&Ru.infoTick("Session in sessionStorage is expired, creating new one..."),Bu(r,{previousSessionId:o.id})):o:(Iu&&Ru.infoTick("Creating new session"),Bu(r,{previousSessionId:n}))}function Ku(e,t,n){return!!Gu(e,t)&&(Zu(e,t,n),!0)}async function Zu(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=function(e,t){try{if("function"==typeof t&&function(e){return e.type===dl.Custom}(e))return t(e)}catch(e){return Iu&&Ru.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!s)return;return await r.addEvent(s)}catch(t){const n=t&&t instanceof Au,s=n?"addEventSizeExceeded":"addEvent";if(n&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:s});const i=Zn();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function Gu(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=nu(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now()||n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration&&(Iu&&Ru.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),1))}function Yu(e){return!e.type}function Ju(e){return"transaction"===e.type}function Xu(e){return"feedback"===e.type}function Qu(e){return!!e.category}function ed(){const e=Wn().getPropagationContext().dsc;e&&delete e.replay_id;const t=xr();t&&delete jr(t).replay_id}function td(e,t){return t.map(({type:t,start:n,end:r,name:o,data:s})=>{const i=e.throttledAddEvent({type:dl.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 nd(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!Iu||!e.getOptions()._experiments.traceInternals)&&function(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,n)||function(e,t){return!!t&&qo(e)===qo(t)}(e,r)}(t,Zn())}(e,t.name)||e.addUpdate(()=>(td(e,[t]),!0)))}function rd(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=dd(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function od(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function sd(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[dd(e)];if(!e)return[void 0]}catch(t){return Iu&&Ru.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Iu&&Ru.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function id(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function ad(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:mn({method:s,statusCode:i,request:a,response:c})}}function cd(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function ld(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>qa,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,qa);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(e){}return{body:e}}(n);return r.body=o,s&&s.length>0&&(r._meta={warnings:s}),r}function ud(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 dd(e){return new URLSearchParams(e).toString()}function pd(e,t){const n=function(e,t=Va.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Va.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(e);return an(n,t)}function hd(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function fd(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function md(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?fd(n,t):Array.isArray(n)?{}:ud(n,t):{}}function gd(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 yd(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(Iu&&Ru.warn("Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&function(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(lu.has(n)&&e.registerMutation(t.timestamp),n===pl.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===pl.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=tu.mirror.getNode(r);o instanceof HTMLElement&&n===hl.Click&&e.registerClick(o)}}catch(e){}}(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Ku(e,n,o))return!0;if(!o)return!1;const t=e.session;if(function(e,t){t&&e.session&&0===e.session.segmentId&&Ku(e,function(e){const t=e.getOptions();return{type:dl.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(Iu&&Ru.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&Uu(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}}class vd extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class bd extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function _d(e,t={count:0,interval:5e3}){const{recordingData:n,onError:r}=e;if(n.length)try{return await async function({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=Zn(),p=Wn(),h=d&&d.getTransport(),f=d&&d.getDsn();if(!(d&&h&&f&&s.sampled))return Tn({});const m={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:o/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},g=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const s=await Eo(e.getOptions(),r,o,t,e,qn());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}({scope:p,client:d,replayId:t,event:m});if(!g)return d.recordDroppedEvent("event_processor","replay",m),Iu&&Ru.info("An event processor returned `null`, will not send event."),Tn({});delete g.sdkProcessingMetadata;const y=function(e,t,n,r){return Gr(so(e,oo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,i,f,d.getOptions().tunnel);let v;try{v=await h.send(y)}catch(e){const t=new Error(Wa);try{t.cause=e}catch(e){}throw t}if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new vd(v.statusCode);const b=zo({},v);if(Vo(b,"replay"))throw new bd(b);return v}(e),!0}catch(n){if(n instanceof vd||n instanceof bd)throw n;if(Io("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${Wa} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise((n,r)=>{fa(async()=>{try{await _d(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}const Sd="__THROTTLED";class wd{constructor({options:e,recordingOptions:t}){wd.prototype.__init.call(this),wd.prototype.__init2.call(this),wd.prototype.__init3.call(this),wd.prototype.__init4.call(this),wd.prototype.__init5.call(this),wd.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,o,s;const i=n&&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 l(){return o&&clearTimeout(o),o=fa(a,t),i&&void 0===s&&(s=fa(a,i)),r}return l.cancel=c,l.flush=function(){return void 0!==o||void 0!==s?a():r},l}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e){const t=new Map;let n=!1;return(...r)=>{const o=Math.floor(Date.now()/1e3);if((e=>{const n=e-5;t.forEach((e,r)=>{r<n&&t.delete(r)})})(o),[...t.values()].reduce((e,t)=>e+t,0)>=300){const e=n;return n=!0,e?"__SKIPPED":Sd}n=!1;const s=t.get(o)||0;return t.set(o,s+1),e(...r)}}((e,t)=>function(e,t,n){return Gu(e,t)?Zu(e,t,n):Promise.resolve(null)}(this,e,t));const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new uu(this,o)),Iu){const t=e._experiments;Ru.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){Iu&&Ru.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",Iu&&Ru.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):Iu&&Ru.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(Iu&&Ru.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(Iu&&Ru.info("Buffering is in progress, call `flush()` to save the replay"));Iu&&Ru.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=qu({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(Iu&&Ru.info("Buffering is in progress, call `flush()` to save the replay"));Iu&&Ru.infoTick("Starting replay in buffer mode");const e=qu({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=tu({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:yd(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{Iu&&Ru.info("Stopping Replay"+(t?` triggered by ${t}`:"")),ed(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if($u())try{Va.sessionStorage.removeItem(za)}catch(e){}}(),this.session=void 0}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Iu&&Ru.info("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Iu&&Ru.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();Iu&&Ru.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&&Vu(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Va.location.origin}${Va.location.pathname}${Va.location.hash}${Va.location.search}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=e,this._context.initialTimestamp=Date.now(),this._context.urls.push(e)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===Sd){const e=hu({category:"replay.throttled"});this.addUpdate(()=>!Ku(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||xr(),t=e&&Cr(e),n=(t&&vr(t).data||{})[Jn];if(t&&n&&["route","custom"].includes(n))return vr(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),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});']);return URL.createObjectURL(e)}());if(!t)return;Iu&&Ru.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Hu(n)}catch(e){Iu&&Ru.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return Iu&&Ru.info("Using simple buffer"),new Du}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=qu({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0});this.session=t}_checkSession(){if(!this.session)return!1;const e=this.session;return!Wu(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{Va.document.addEventListener("visibilitychange",this._handleVisibilityChange),Va.addEventListener("blur",this._handleWindowBlur),Va.addEventListener("focus",this._handleWindowFocus),Va.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){const t=Zn();ia((e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?iu(e.event):au(e.event),n=en(r,{maxStringLength:200})||"<unknown>"}catch(e){n="<unknown>"}return{target:r,message:n}}(e);return hu({category:`ui.${e.name}`,...yu(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;var s,i,a;!(r&&e.clickDetector&&o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(s=e.clickDetector,i=n,a=iu(t.event),s.handleClick(i,a)),ou(e,n)})(e)),la(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(td(e,[n]),!1)))}}(e)),function(e){const t=Zn();t&&t.on("beforeAddBreadcrumb",t=>function(e,t){if(!e.isEnabled()||!Qu(t))return;const n=function(e){return!Qu(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return hu(e);let n=!1;const r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>Ka?(n=!0,`${e.slice(0,Ka)}…`):e;if("object"==typeof e)try{const t=qr(e,7);return JSON.stringify(t).length>Ka?(n=!0,`${JSON.stringify(t,null,2).slice(0,Ka)}…`):t}catch(e){}return e});return hu({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):hu(e)}(t);n&&ou(e,n)}(e,t))}(e),function(e){const t=Zn();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(e,t)=>function(e,t,n){if(t.data)try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(function(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=rd(r),s=n.getResponseHeader("content-length")?od(n.getResponseHeader("content-length")):function(e,t){try{return rd("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch(e){return}}(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!pd(c,n.networkDetailAllowUrls)||pd(c,n.networkDetailDenyUrls))return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:cd(d),response:cd(p)};const h=a[ma],f=h?ud(h.request_headers,n.networkRequestHeaders):{},m=ud(function(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{}}(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?sd(i):[void 0],[v,b]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Iu&&Ru.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Iu&&Ru.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return Iu&&Ru.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],_=ld(f,d,g),S=ld(m,p,v);return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:y?id(_,y):_,response:b?id(S,b):S}}(e,t,n),o=ad("resource.xhr",r);nd(n.replay,o)}catch(e){Iu&&Ru.exception(e,"Failed to capture xhr breadcrumb")}}(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(function(e,t){const{input:n,response:r}=t,o=rd(n?hd(n):void 0),s=r?od(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=pd(i,n.networkDetailAllowUrls)&&!pd(i,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?(i=t,1===(s=n).length&&"string"!=typeof s[0]?md(s[0],i):2===s.length?md(s[1],i):{}):{};var s,i;if(!e)return ld(o,r,void 0);const a=hd(n),[c,l]=sd(a),u=ld(o,r,c);return l?id(u,l):u}(n,t.input,l):cd(l),h=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return cd(o);const s=r?fd(r.headers,n):{};if(!r||!t&&void 0!==o)return ld(s,o,void 0);const[i,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){Iu&&Ru.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const r=fa(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return await e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(Iu&&Ru.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Iu&&Ru.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(r),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e&&e.length&&void 0===n?rd(e):n;return r?ld(o,s,t?e:void 0):cd(s)}catch(e){return Iu&&Ru.exception(e,"Failed to serialize response body"),ld(o,n,void 0)}}(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?id(c,a):c}(d,n,t.response,u);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:h}}(e,t,n),o=ad("resource.fetch",r);nd(n.replay,o)}catch(e){Iu&&Ru.exception(e,"Failed to capture fetch breadcrumb")}}(t,n,e))}catch(e){Iu&&Ru.exception(e,"Error when enriching network breadcrumb")}}(a,e,t))}catch(e){}}(e);const n=function(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!Yu(t)&&!Ju(t)&&!Xu(t))return t;if(!e.checkAndHandleExpiredSession())return ed(),t;if(Xu(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:dl.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t),t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length||!t.originalException||!t.originalException.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return Iu&&Ru.log("Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==Wa&&!(!t.exception||t.type)&&Fu(e.getOptions().errorSampleRate)}(e,t);return(r||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t},{id:"Replay"})}(e);var r;r=n,qn().addEventProcessor(r),t&&(t.on("beforeSendEvent",function(e){return t=>{e.isEnabled()&&Yu(t)&&function(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;"string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&ou(e,hu({category:"replay.hydrate-error",data:{url:nn()}}))}(e,t)}}(e)),t.on("afterSendEvent",function(e){return(t,n)=>{if(!e.isEnabled()||!Yu(t)&&!Ju(t))return;const r=n&&n.statusCode;!r||r<200||r>=300||(Ju(t)?function(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)}(e,t):function(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&fa(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t))}}(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)}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(e=>{r.push(Li(e,n))}),r.push(Ri(bu(wu,e)),Pi(bu(Eu,e)),Ai(bu(Cu,e)),Di(bu(xu,e))),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{Va.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Va.removeEventListener("blur",this._handleWindowBlur),Va.removeEventListener("focus",this._handleWindowFocus),Va.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Va.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=hu({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=hu({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(i)||!s)return null;if(!(t||r||o)&&1===s.length)return null;const a=en(i,{maxStringLength:200})||"<unknown>";return hu({category:"ui.keyDown",message:a,data:{...yu(i,a).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}(t);n&&ou(e,n)}(this,e)}}_doChangeToBackgroundTasks(e){this.session&&(zu(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):Iu&&Ru.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:dl.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(_u).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(td(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&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 async function(e){try{return Promise.all(td(e,[gd(Va.performance.memory)]))}catch(e){return[]}}(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 _d({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=Zn();t&&t.recordDroppedEvent(e instanceof bd?"ratelimit_backoff":"send_error","replay")}}else Iu&&Ru.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(Iu&&Ru.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;if(r||n>this._options.maxReplayDuration+5e3)return Iu&&Ru.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&&Iu&&Ru.info("Flushing initial segment without checkout.");const s=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,s&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Uu(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=hu({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function kd(e,t){return[...e,...t].join(",")}const Ed='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Cd=["content-length","content-type","accept"];let xd=!1;class Td{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:s=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:_=[],maskAttributes:S=["title","placeholder"],unmask:w=[],block:k=[],unblock:E=[],ignore:C=[],maskFn:x,beforeAddRecordingEvent:T,beforeErrorSampling:I,onError:M}={}){this.name=Td.id;const O=function({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:kd(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:kd(t,[]),blockSelector:kd(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:kd(r,[]),ignoreSelector:kd(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:_,unmask:w,block:k,unblock:E,ignore:C});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s:s}({maskAttributes:S,maskAllText:c,privacyOptions:O,key:e,value:t,el:n}),...O,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,36e5),stickySession:o,useCompression:s,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:f,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:Id(v),networkResponseHeaders:Id(b),beforeAddRecordingEvent:T,beforeErrorSampling:I,onError:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ed}`:Ed),this._isInitialized&&Cs())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return xd}set _isInitialized(e){xd=e}afterAllSetup(e){Cs()&&!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=function(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...mn(e)},o=Ur(n.replaysSessionSampleRate),s=Ur(n.replaysOnErrorSampleRate);return null==o&&null==s&&yt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),null!=o&&(r.sessionSampleRate=o),null!=s&&(r.errorSampleRate=s),r}(this._initialOptions,e);this._replay=new wd({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(e){}}}function Id(e){return[...Cd,...e.map(e=>e.toLowerCase())]}Td.__initStatic();const Md=new WeakMap,Od=new Map,Pd={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Rd(e){const{url:t}=vr(e).data||{};if(!t||"string"!=typeof t)return;const n=Li("resource",({entries:r})=>{r.forEach(r=>{(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)})(r)&&r.name.endsWith(t)&&(function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),bn?[...r,["http.request.redirect_start",Ad(e.redirectStart)],["http.request.fetch_start",Ad(e.fetchStart)],["http.request.domain_lookup_start",Ad(e.domainLookupStart)],["http.request.domain_lookup_end",Ad(e.domainLookupEnd)],["http.request.connect_start",Ad(e.connectStart)],["http.request.secure_connection_start",Ad(e.secureConnectionStart)],["http.request.connection_end",Ad(e.connectEnd)],["http.request.request_start",Ad(e.requestStart)],["http.request.response_start",Ad(e.responseStart)],["http.request.response_end",Ad(e.responseEnd)]]:r}(r).forEach(t=>e.setAttribute(...t)),setTimeout(n))})})}function Ad(e=0){return((bn||performance.timeOrigin)+e)/1e3}function Dd(e){try{return new URL(e,Is.location.origin).href}catch(e){return}}const Ld={...go,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Pd};function Nd(e,t,n){e.emit("startPageLoadSpan",t,n),Wn().setTransactionName(t.name);const r=xr();return"pageload"===(r&&vr(r).op)?r:void 0}function Hd(e,t){qn().setPropagationContext({traceId:Pn()}),Wn().setPropagationContext({traceId:Pn()}),e.emit("startNavigationSpan",t),Wn().setTransactionName(t.name);const n=xr();return"navigation"===(n&&vr(n).op)?n:void 0}function $d(e){const t=Qt.document&&Qt.document.querySelector?Qt.document.querySelector(`meta[name=${e}]`):null;return t?t.getAttribute("content"):void 0}var Fd={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},jd={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ud={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Bd={};function Vd(e){return K.default.isMemo(e)?Ud:Bd[e.$$typeof]||Fd}Bd[K.default.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Bd[K.default.Memo]=Ud;var zd=Object.defineProperty,Wd=Object.getOwnPropertyNames,qd=Object.getOwnPropertySymbols,Kd=Object.getOwnPropertyDescriptor,Zd=Object.getPrototypeOf,Gd=Object.prototype,Yd=function e(t,n,r){if("string"!=typeof n){if(Gd){var o=Zd(n);o&&o!==Gd&&e(t,o,r)}var s=Wd(n);qd&&(s=s.concat(qd(n)));for(var i=Vd(t),a=Vd(n),c=0;c<s.length;++c){var l=s[c];if(!(jd[l]||r&&r[l]||a&&a[l]||i&&i[l])){var u=Kd(n,l);try{zd(t,l,u)}catch(e){}}}}return t};class Jd extends F.Component{static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(e){super(e);const{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=po({name:`<${t}>`,onlyIfParent:!0,op:"ui.react.mount",attributes:{[er]:"auto.ui.react.profiler","ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){const t=Object.keys(e).filter(t=>e[t]!==this.props.updateProps[t]);if(t.length>0){const e=vn();this._updateSpan=ho(this._mountSpan,()=>po({name:`<${this.props.name}>`,onlyIfParent:!0,op:"ui.react.update",startTime:e,attributes:{[er]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":t}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const e=vn(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){const n=vr(this._mountSpan).timestamp;ho(this._mountSpan,()=>{const r=po({onlyIfParent:!0,name:`<${t}>`,op:"ui.react.render",startTime:n,attributes:{[er]:"auto.ui.react.profiler","ui.component_name":t}});r&&r.end(e)})}}render(){return this.props.children}}Jd.__initStatic();const Xd="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Qd={componentStack:null,error:null,eventId:null};class ep extends F.Component{constructor(e){super(e),ep.prototype.__init.call(this),this.state=Qd,this._openFallbackReportDialog=!0;const t=Zn();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on("afterSendEvent",t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&Ba({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,o=null==r?void 0:r,{beforeCapture:s,onError:i,showDialog:a,dialogOptions:c}=this.props;Kn(l=>{s&&s(l,t,o);const u=function(t,{componentStack:n},r){if(function(){const t=e.version.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}()&&Ut(t)&&n){const e=new Error(t.message);e.name=`React ErrorBoundary ${t.name}`,e.stack=n,function(e,t){const n=new WeakSet;!function e(t,r){if(!n.has(t))return t.cause?(n.add(t),e(t.cause,r)):void(t.cause=r)}(e,t)}(t,e)}return xo(t,{...r,captureContext:{contexts:{react:{componentStack:n}}}})}(t,n,{mechanism:{handled:!!this.props.fallback}});i&&i(t,o,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&Ba({...c,eventId:u})),this.setState({error:t,componentStack:r,eventId:u})})}componentDidMount(){const{onMount:e}=this.props;e&&e()}componentWillUnmount(){const{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&r(e,t,n),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(Qd)}}render(){const{fallback:e,children:t}=this.props,n=this.state;if(n.error){let t;return t="function"==typeof e?F.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):e,F.isValidElement(t)?t:(e&&Xd&&vt.warn("fallback did not produce a valid ReactElement"),null)}return"function"==typeof t?t():t}}let tp,np,rp,op,sp,ip=!1;const ap=new WeakSet;function cp(e,t){if(!t||"/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?e:e.slice(n)||"/"}function lp(e,t,n){const r=e||ip?cp(t,n):t;return["/"===r[r.length-1]||"/*"===r.slice(-2)?r.slice(0,-1):r,"route"]}function up(e){return e.endsWith("*")}function dp(e,t){return up(e)&&t.route.children&&t.route.children.length>0||!1}function pp(e,t){const n=sp(t,e);if(n)for(const e of n)if(!(r=e.route).children&&r.element&&r.path&&r.path.endsWith("/*")&&mp(e))return!0;var r;return!1}function hp(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(e=>{hp(e,t).forEach(e=>t.add(e))})),t}function fp(e){return function(e){return"*"===e[e.length-1]?e.slice(0,-1):e}(e.route.path||"")}function mp(e){return e.params["*"]||""}function gp(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function yp(e){return"/"===e[0]?e:`/${e}`}function vp(e,t){const n=sp(e,t);if(!n||0===n.length)return"";for(const r of n)if(r.route.path&&"*"!==r.route.path){const n=fp(r),o=cp(t.pathname,yp(r.pathnameBase));return gp(gp(n||"")+yp(vp(e.filter(e=>e!==r.route),{pathname:o})))}return""}function bp(e,t,n,r=""){if(!e||0===e.length)return[ip?cp(t.pathname,r):t.pathname,"url"];let o="";if(n)for(const e of n){const n=e.route;if(n){if(n.index)return lp(o,e.pathname,r);const s=n.path;if(s&&!dp(s,e)){const n="/"===s[0]||"/"===o[o.length-1]?s:`/${s}`;if(o=gp(o)+yp(n),gp(t.pathname)===gp(r+e.pathname))return cs(o)===cs(e.pathname)||up(o)?(dp(o,e)&&(o=o.slice(0,-1)),[(ip?"":r)+o,"route"]):[(ip?"":r)+n,"route"]}}}return[ip?cp(t.pathname,r):t.pathname||"/","url"]}function _p(){return _p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_p.apply(null,arguments)}var Sp,wp=(Sp=/*#__PURE__*/Object.defineProperty({default:function(e){console.warn("[react-gtm]",e)}},"__esModule",{value:!0}))&&Sp.__esModule?Sp:{default:Sp},kp=function(e){return e&&e.__esModule?e:{default:e}}({tags:function(e){var t=e.id,n=e.events,r=e.dataLayer,o=e.dataLayerName,s="&gtm_auth="+e.auth,i="&gtm_preview="+e.preview;return t||(0,wp.default)("GTM Id is required"),{iframe:'\n <iframe src="https://www.googletagmanager.com/ns.html?id='+t+s+i+'&gtm_cookies_win=x"\n height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>',script:"\n (function(w,d,s,l,i){w[l]=w[l]||[];\n w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', "+JSON.stringify(n).slice(1,-1)+"});\n var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';\n j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'"+s+i+"&gtm_cookies_win=x';\n f.parentNode.insertBefore(j,f);\n })(window,document,'script','"+o+"','"+t+"');",dataLayerVar:this.dataLayer(r,o)}},dataLayer:function(e,t){return"\n window."+t+" = window."+t+" || [];\n window."+t+".push("+JSON.stringify(e)+")"}}),Ep=function(e){return e&&e.__esModule?e:{default:e}}({dataScript:function(e){var t=document.createElement("script");return t.innerHTML=e,t},gtm:function(e){var t=kp.default.tags(e);return{noScript:function(){var e=document.createElement("noscript");return e.innerHTML=t.iframe,e},script:function(){var e=document.createElement("script");return e.innerHTML=t.script,e},dataScript:this.dataScript(t.dataLayerVar)}},initialize:function(e){var t=e.events,n=e.dataLayer,r=e.dataLayerName,o=e.auth,s=e.preview,i=this.gtm({id:e.gtmId,events:void 0===t?{}:t,dataLayer:n||void 0,dataLayerName:void 0===r?"dataLayer":r,auth:void 0===o?"":o,preview:void 0===s?"":s});n&&document.head.appendChild(i.dataScript),document.head.insertBefore(i.script(),document.head.childNodes[0]),document.body.insertBefore(i.noScript(),document.body.childNodes[0])},dataLayer:function(e){var t=e.dataLayer,n=e.dataLayerName,r=void 0===n?"dataLayer":n;if(window[r])return window[r].push(t);var o=kp.default.dataLayer(t,r),s=this.dataScript(o);document.head.insertBefore(s,document.head.childNodes[0])}}),Cp=Ep.default;const{slice:xp,forEach:Tp}=[],Ip=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Mp={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Ip.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!Ip.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r}(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let e=0;e<n.length;e++){let r=n[e];for(;" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},remove(e){this.create(e,"",-1)}};var Op={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Mp.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:s}=t;n&&"undefined"!=typeof document&&Mp.create(n,e,r,o,s)}},Pp={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const r=e.substring(1).split("&");for(let e=0;e<r.length;e++){const o=r[e].indexOf("=");o>0&&r[e].substring(0,o)===n&&(t=r[e].substring(o+1))}}return t}};let Rp=null;const Ap=()=>{if(null!==Rp)return Rp;try{Rp="undefined"!==window&&null!==window.localStorage;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Rp=!1}return Rp};var Dp={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Ap())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Ap()&&window.localStorage.setItem(n,e)}};let Lp=null;const Np=()=>{if(null!==Lp)return Lp;try{Lp="undefined"!==window&&null!==window.sessionStorage;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Lp=!1}return Lp};var Hp={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Np())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Np()&&window.sessionStorage.setItem(n,e)}},$p={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Fp={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},jp={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const r="number"==typeof t?t:0;return n[r]?.replace("/","")}},Up={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,r="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Bp=!1;try{document,Bp=!0}catch(He){}const Vp=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Bp||Vp.splice(1,1);class zp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(e){return Tp.call(xp.call(arguments,1),t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])}),e}(e,this.options||{},{order:Vp,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=t,this.addDetector(Op),this.addDetector(Pp),this.addDetector(Dp),this.addDetector(Hp),this.addDetector($p),this.addDetector(Fp),this.addDetector(jp),this.addDetector(Up)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach(t=>{if(this.detectors[t]){let n=this.detectors[t].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(e=e.concat(n))}}),e=e.map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?e:e.length>0?e[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}function Wp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}zp.type="languageDetector",z.default.use(zp).use(t.initReactI18next).init({resources:{en:{translation:{release:"Release",forbiddenErrorMessage:"You are not authorized to perform this operation",somethingWentWrongMessage:"Oops... something went wrong",changeLanguageText:"Change language to Polish",headerLoginButton:"Sign in",headerLogoutButton:"Sign out",loginCardTitle:"Sign in",loginFormText:"Fill both fields in order to log in to the system",loginCardCancelButton:"Cancel",loginCardSubmitButton:"Sign in",loginCardUsernameHint:"Username",loginCardPasswordHint:"Password",networkErrorHeader:"Connection issue detected",networkErrorButtonText:"Reload the page",newVersionAvailable:"New version available, the application will refresh in few seconds..."}},pl:{translation:{release:"Wydanie",forbiddenErrorMessage:"Nie masz uprawnień do wykonania tej operacji",somethingWentWrongMessage:"Ups... coś poszło nie tak",changeLanguageText:"Zmiana języka na Angielski",headerLoginButton:"Zaloguj się",headerLogoutButton:"Wyloguj",loginCardTitle:"Logowanie",loginFormText:"Wypełnij oba pola w celu zalogowania do systemu",loginCardCancelButton:"Anuluj",loginCardSubmitButton:"Zaloguj",loginCardUsernameHint:"Użytkownik",loginCardPasswordHint:"Hasło",networkErrorHeader:"Błąd połączenia",networkErrorButtonText:"Odśwież stronę",newVersionAvailable:"Dostępna jest nowa wersja, za kilka sekund nastąpi odświeżenie aplikacji..."}}},interpolation:{escapeValue:!1},react:{bindI18nStore:"added"},returnNull:!1});var qp=function e(t,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=Wp({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var i in o)o[i]&&(s+="; "+i,!0!==o[i]&&(s+="="+o[i].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+s}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var s=n[o].split("="),i=s.slice(1).join("=");try{var a=decodeURIComponent(s[0]);if(r[a]=t.read(i,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",Wp({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Wp({},this.attributes,t))},withConverter:function(t){return e(Wp({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class Kp{static recognizeRootDomain(){if(!this.rootDomain){const e=window.location.hostname;if(0===window.location.port.length){let t,n;[t,...n]=e.split("."),this.subdomain=t,this.rootDomain=n.join(".")}else this.rootDomain=e}return this.rootDomain}static get(e){const t=this.recognizeRootDomain();return qp.get(e,{domain:t})}static set(e,t){const n=this.recognizeRootDomain();return qp.set(e,t,{domain:n})}static remove(e){const t=this.recognizeRootDomain();return qp.remove(e,{domain:t})}}const Zp=function(e,t){void 0===t&&(t={});try{function n(){const n=Xp.requestHeaders();return null!==n&&(t.headers=Object.assign({},n,t.headers)),Promise.resolve(fetch(e,t).catch(e=>{xo(e),Xp.setNetworkError({title:z.default.t("somethingWentWrongMessage"),details:e.message})})).then(function(e){const t=function(){if(e){const t=function(){if(401!==e.status)return Promise.resolve(e.clone().text()).then(function(t){switch(e.status){case 403:lt.error(z.default.t("forbiddenErrorMessage"));break;case 500:lt.error(/*#__PURE__*/j.default.createElement(j.default.Fragment,null,/*#__PURE__*/j.default.createElement(d.Typography,{mr:t?2:0},z.default.t("somethingWentWrongMessage}")),t&&/*#__PURE__*/j.default.createElement(d.Tooltip,{title:t,arrow:!0},/*#__PURE__*/j.default.createElement(W.default,null))))}});Xp.removeSession(),Xp.removeCurrentUser(),Xp.setNotAuthorizedLoginStatus()}();if(t&&t.then)return t.then(function(){})}}();return t&&t.then?t.then(function(){return e}):e})}const r=function(){if(Xp.isLoggedIn()&&!t.refresh){const{createdAt:e,expiresIn:t}=Xp.session,n=function(){if(e+t-5<Math.round(+new Date/1e3)){const e=Xp.refreshTokenPromise?Promise.resolve(Xp.refreshTokenPromise).then(function(){}):Promise.resolve(Xp.refresh()).then(function(){});if(e&&e.then)return e.then(function(){})}}();if(n&&n.then)return n.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(n):n())}catch(o){return Promise.reject(o)}};var Gp=new class{constructor(){this.currentUser=null,c.makeObservable(this,{setCurrentUser:c.action,removeCurrentUser:c.action,currentUser:c.observable.deep,getCurrentUserJS:c.computed})}setCurrentUser(e){this.currentUser=e}removeCurrentUser(){this.currentUser=null}get getCurrentUserJS(){return c.toJS(this.currentUser)}};class Yp{constructor(){this.user={},this.accessToken=null,this.refreshToken=null,this.tokenType=null,this.createdAt=null,this.expiresIn=null}}class Jp{setAuthConfig(e){let{baseUrl:t,clientId:n,redirectUri:r}=e;this.baseUrl=t,this.clientId=n,this.redirectUri=r}authorize(e){try{const t=this,n=new FormData,{scope:r,refresh:o,code:s,username:i,password:a}=e;let c;return n.append("client_id",t.clientId),r&&n.append("scope",r),o?(n.append("grant_type","refresh_token"),n.append("refresh_token",o),n.append("redirect_uri",t.redirectUri)):s?(n.append("grant_type","authorization_code"),n.append("code",s),n.append("redirect_uri",t.redirectUri)):(n.append("grant_type","password"),n.append("username",i),n.append("password",a)),Promise.resolve(Zp(t.baseUrl+"/v2/oauth2/token",{method:"POST",body:n,refresh:!!o}).then(function(e){try{let n,r;return Promise.resolve(function(){if(e){function s(e){if(n)return e;function s(){c.accessToken=r.access_token,c.refreshToken=r.refresh_token,c.tokenType=r.token_type,c.createdAt=r.created_at,c.expiresIn=r.expires_in}c=new Yp;const i=function(){if(!o)return Promise.resolve(t.getUserData(r)).then(function(e){c.user=e})}();return i&&i.then?i.then(s):s()}const i=function(t,o){try{var s=Promise.resolve(e.json()).then(function(t){r=t,e.ok&&200===e.status||(lt.error(r.error_description),n=1)})}catch(e){return o()}return s&&s.then?s.then(void 0,o):s}(0,function(){lt.error(z.default.t("somethingWentWrongMessage")),n=1});return i&&i.then?i.then(s):s(i)}}())}catch(e){return Promise.reject(e)}}).catch(e=>{lt.error(e.message)})).then(function(){return c})}catch(e){return Promise.reject(e)}}getUserData(e){try{const t=this,n={method:"GET"};if(e){const{token_type:t,access_token:r}=e;n.headers={Authorization:t+" "+r}}return Promise.resolve(Zp(t.baseUrl+"/v2/me",n)).then(function(e){let t;const n=function(){if(null!=e&&e.ok)return Promise.resolve(e.json()).then(function(e){let{user:n}=e;return t=1,{id:n.id,companyId:n.company_id,roleId:n.role_id,username:n.username,email:n.email,name:n.name}})}();return n&&n.then?n.then(function(e){return t?e:null}):t?n:null})}catch(e){return Promise.reject(e)}}signOut(e){try{const t=this,n=new FormData;return n.append("client_id",t.clientId),n.append("token",e),Promise.resolve(Zp(t.baseUrl+"/v2/oauth2/revoke",{method:"POST",body:n})).then(function(){})}catch(e){return Promise.reject(e)}}}const Xp=new class{constructor(){this.loading=!1,this.loginStatus={status:"unknown"},this.refreshTokenPromise=null,this.api=new Jp,this.networkError=null,c.makeObservable(this,{loading:c.observable,setLoading:c.action,loginStatus:c.observable.deep,setConnectedLoginStatus:c.action,setNotAuthorizedLoginStatus:c.action})}setLoading(e){this.loading=e}setConnectedLoginStatus(){this.loginStatus={status:"connected",authResponse:{user:this.session.user,accessToken:this.session.accessToken,refreshToken:this.session.refreshToken,tokenType:this.session.tokenType,createdAt:this.session.createdAt,expiresIn:this.session.expiresIn}}}setNotAuthorizedLoginStatus(){this.loginStatus={status:"not_authorized"}}setAuthConfig(e){this.api.setAuthConfig(e)}setNetworkError(e){this.networkError=e}isLoggedIn(){return Boolean(this.session)}requestHeaders(){const e={"Accept-Language":z.default.language};if(this.isLoggedIn()){const{accessToken:t,tokenType:n}=this.session;return _p({},e,{Authorization:n+" "+t})}return e}authorize(e,t){void 0===t&&(t=!0);try{const n=this;return n.setLoading(!0),Promise.resolve(n.api.authorize(e)).then(function(e){return n.setLoading(!1),e?(t&&(n.session=e,n.storeSession(),n.setCurrentUser(e.user),n.setConnectedLoginStatus()),e):null})}catch(e){return Promise.reject(e)}}refresh(){try{const e=this;return e.session&&(e.refreshTokenPromise=e.api.authorize({refresh:e.session.refreshToken}),e.refreshTokenPromise.then(t=>{t?(e.session=_p({},e.session,t,{user:e.session.user}),e.storeSession(),e.setConnectedLoginStatus(),e.refreshTokenPromise=null):(e.removeSession(),e.removeCurrentUser(),e.setNotAuthorizedLoginStatus(),e.refreshTokenPromise=null)})),Promise.resolve(e.refreshTokenPromise)}catch(e){return Promise.reject(e)}}recover(){try{const e=this;return e.session?Promise.resolve():Promise.resolve(e.restoreSession()).then(function(){const t=function(){if(e.session)return Promise.resolve(e.api.getUserData()).then(function(t){e.setCurrentUser(t),e.setConnectedLoginStatus()});e.setNotAuthorizedLoginStatus()}();if(t&&t.then)return t.then(function(){})})}catch(e){return Promise.reject(e)}}logout(){try{const e=this,t=function(){if(e.session)return Promise.resolve(e.api.signOut(e.session.accessToken)).then(function(){e.removeSession(),e.removeCurrentUser(),e.setNotAuthorizedLoginStatus()})}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}storeSession(){try{const e=this;let t={};t["access-token"]=e.session.accessToken,t["refresh-token"]=e.session.refreshToken,t["token-type"]=e.session.tokenType,t["created-at"]=e.session.createdAt,t["expires-in"]=e.session.expiresIn;const n=JSON.stringify(t);return Kp.set("authHeaders",n),Promise.resolve()}catch(e){return Promise.reject(e)}}restoreSession(){try{const e=this,t=Kp.get("authHeaders");if(!t||"null"===t)return Promise.resolve();const n=JSON.parse(t),r=new Yp;return r.accessToken=n["access-token"],r.refreshToken=n["refresh-token"],r.tokenType=n["token-type"],r.createdAt=n["created-at"],r.expiresIn=n["expires-in"],e.session=r,Promise.resolve(e.api.getUserData()).then(function(t){t&&(e.session.user=t)})}catch(e){return Promise.reject(e)}}removeSession(){Kp.remove("authHeaders"),this.session=null}setCurrentUser(e){Gp.setCurrentUser(e)}removeCurrentUser(){Gp.removeCurrentUser()}},Qp=()=>{const[t,n]=e.useState(Xp.loginStatus);return e.useEffect(()=>c.reaction(()=>c.toJS(Xp.loginStatus),()=>{n(Xp.loginStatus)}),[]),t},eh=j.default.createContext({showModal:null,hideModal:null,isOpenedModal:!1}),th=t=>{let{children:n}=t;const[r,o]=e.useState({}),s=e.useCallback((e,t)=>{o(t=>_p({},t,{[e]:_p({},t[e],{isOpen:!1})})),t&&t()},[o]),i=e.useCallback((e,t,n)=>{o(r=>_p({},r,{[e]:{isOpen:!0,component:t,data:n}}))},[o]),a=e.useMemo(()=>({showModal:i,hideModal:s,isOpenedModal:Object.values(r).some(e=>{let{isOpen:t}=e;return t})}),[s,i,r]);/*#__PURE__*/return j.default.createElement(eh.Provider,{value:a},n,Object.keys(r).map(e=>{const{component:t,isOpen:n,data:o}=r[e];return n&&/*#__PURE__*/j.default.createElement(t,_p({onClose:()=>s(e),key:e,isOpen:n},o))}))},nh=(()=>{let e=0;return()=>""+ ++e})();function rh(t,n,r){const o=e.useMemo(nh,[]),s=e.useContext(eh);return[e.useCallback(e=>s.showModal(o,t,e instanceof Event?n:_p({},n,e)),[n,s.showModal]),e.useCallback(()=>s.hideModal(o,r),[s.hideModal,r,o])]}rh.ModalContext=eh,rh.ModalProvider=th;var oh={root:{height:"calc(100vh - 22px)",paddingTop:"70px",mixBlendMode:"color",background:"#1E1E1E"},overlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,background:"repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 12px, transparent 12px, transparent 24px);"}};const sh=e=>{let{error:n}=e;const{t:r}=t.useTranslation();/*#__PURE__*/return j.default.createElement(d.Container,{maxWidth:!1,disableGutters:!0,sx:oh.root},/*#__PURE__*/j.default.createElement(d.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"650px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/j.default.createElement(d.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/j.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/j.default.createElement(d.Typography,{variant:"h4",sx:{display:"flex",alignItems:"center",marginBottom:"40px",color:"rgba(255, 255, 255, 0.6)"}},r("somethingWentWrongMessage"),/*#__PURE__*/j.default.createElement(d.Tooltip,{title:n.toString(),arrow:!0},/*#__PURE__*/j.default.createElement(W.default,{sx:{marginLeft:"1em",fontSize:"inherit"}}))),/*#__PURE__*/j.default.createElement(d.Button,{onClick:()=>window.location.reload()},r("networkErrorButtonText"))))),/*#__PURE__*/j.default.createElement(d.Box,{sx:oh.overlay}))};sh.propTypes={error:a.PropTypes.any,componentStack:a.PropTypes.any},sh.defaultProps={};const ih=e.createContext(),ah=e=>{let{children:t,config:n}=e;/*#__PURE__*/return j.default.createElement(ih.Provider,{value:n},t)},ch=()=>e.useContext(ih),lh=e.createContext(),uh=e=>{let{children:t,info:n}=e;/*#__PURE__*/return j.default.createElement(lh.Provider,{value:n},t)},dh={sessionStore:Xp},ph=e.createContext(dh),hh=i.observer(e=>{let{children:t}=e;/*#__PURE__*/return j.default.createElement(ph.Provider,{value:dh},t)});var fh=new class{constructor(){this.appReady=!1,this.gtmReady=!1,this.sentryReady=!1,c.makeAutoObservable(this)}setAppReady(){this.appReady=!0}setGtmReady(){this.gtmReady=!0}setSentryReady(){this.sentryReady=!0}};let mh=s.createTheme({components:{MuiCssBaseline:{styleOverrides:'\n body {\n font-family: "Inter", "system-ui";\n }\n @supports (font-variation-settings: normal) {\n body { font-family: "Inter var", "system-ui"; }\n }\n '}},palette:{background:"#1E1E1E",primary:{light:"#156bd1",main:"#155ed1",dark:"#1551d1",contrastText:"rgba(255,255,255,0.85)"},secondary:{light:"#656565",main:"#595959",dark:"#4d4d4d",contrastText:"rgba(255,255,255,0.85)"}},typography:{fontFamily:"'Inter', system-ui",fontWeightLight:"400",fontWeightRegular:"500",fontWeightMedium:"600",button:{textTransform:"none"}}});var gh=s.createTheme(mh,{components:{MuiBackdrop:{styleOverrides:{root:{marginTop:70}}},MuiButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiLoadingButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiCardHeader:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)",background:"linear-gradient(180deg, #4A4A4A 0%, #3F3F3F 100%)"},subheader:{marginTop:"0.5em",color:"rgba(255,255,255,0.5)"}}},MuiPaper:{styleOverrides:{rounded:{borderRadius:"20px"}}},MuiCard:{styleOverrides:{root:{borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)"}}},MuiCardContent:{styleOverrides:{root:{background:"rgba(45, 45, 45, 1)","&:last-child":{paddingBottom:16}}}},MuiDialogTitle:{styleOverrides:{root:{textAlign:"center",color:"white",background:"linear-gradient(#4a4a4a 0%, #3e3e3e 100%)"}}},MuiDialogContent:{styleOverrides:{root:{minWidth:550,padding:"16px 24px",background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)"}}},MuiDialogContentText:{styleOverrides:{root:{textAlign:"center",color:"white"}}},MuiMenu:{styleOverrides:{paper:{background:"#2d2d2d"}}},MuiMenuItem:{styleOverrides:{root:{color:"white"}}},MuiFormControl:{styleOverrides:{root:{alignItems:"center"}}},MuiOutlinedInput:{styleOverrides:{root:{color:"white","&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"rgba(255,255,255,0.35)"}},notchedOutline:{borderColor:"rgba(255,255,255,0.25)"},input:{padding:"13px 16px",background:"transparent",color:"white",borderColor:"white"}}}}});function yh(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var vh={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function bh(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var _h=/[A-Z]|^ms/g,Sh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wh=function(e){return 45===e.charCodeAt(1)},kh=function(e){return null!=e&&"boolean"!=typeof e},Eh=/* #__PURE__ */bh(function(e){return wh(e)?e:e.replace(_h,"-$&").toLowerCase()}),Ch=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Sh,function(e,t,n){return Th={name:t,styles:n,next:Th},t})}return 1===vh[e]||wh(e)||"number"!=typeof t||0===t?t:t+"px"};function xh(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Th={name:n.name,styles:n.styles,next:Th},n.name;var r=n;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)Th={name:o.name,styles:o.styles,next:Th},o=o.next;return r.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=xh(e,t,n[o])+";";else for(var s in n){var i=n[s];if("object"!=typeof i){var a=i;null!=t&&void 0!==t[a]?r+=s+"{"+t[a]+"}":kh(a)&&(r+=Eh(s)+":"+Ch(s,a)+";")}else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var c=xh(e,t,i);switch(s){case"animation":case"animationName":r+=Eh(s)+":"+c+";";break;default:r+=s+"{"+c+"}"}}else for(var l=0;l<i.length;l++)kh(i[l])&&(r+=Eh(s)+":"+Ch(s,i[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=Th,i=n(e);return Th=s,xh(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Th,Ih=/label:\s*([^\s;{]+)\s*(;|$)/g;function Mh(e,t){const n=q.default(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const r="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...t)}:n}const Oh=[];function Ph(e){return Oh[0]=e,function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Th=void 0;var s=e[0];null==s||void 0===s.raw?(r=!1,o+=xh(n,t,s)):o+=s[0];for(var i=1;i<e.length;i++)o+=xh(n,t,e[i]),r&&(o+=s[i]);Ih.lastIndex=0;for(var a,c="";null!==(a=Ih.exec(o));)c+="-"+a[1];var l=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:Th}}(Oh)}function Rh(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Ah(e){if(/*#__PURE__*/F.isValidElement(e)||!Rh(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Ah(e[n])}),t}function Dh(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Rh(e)&&Rh(t)&&Object.keys(t).forEach(o=>{r[o]=/*#__PURE__*/F.isValidElement(t[o])?t[o]:Rh(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Rh(e[o])?Dh(e[o],t[o],n):n.clone&&Rh(t[o])?Ah(t[o]):t[o]}),r}var Lh={borderRadius:4},Nh="production"!==process.env.NODE_ENV?V.default.oneOfType([V.default.number,V.default.string,V.default.object,V.default.array]):{};function Hh(e,t){return t?Dh(e,t,{clone:!1}):e}const $h={xs:0,sm:600,md:900,lg:1200,xl:1536},Fh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${$h[e]}px)`},jh={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:$h[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Uh(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||Fh;return t.reduce((r,o,s)=>(r[e.up(e.keys[s])]=n(t[s]),r),{})}if("object"==typeof t){const e=r.breakpoints||Fh;return Object.keys(t).reduce((o,s)=>{if(i=e.keys,"@"===(a=s)||a.startsWith("@")&&(i.some(e=>a.startsWith(`@${e}`))||a.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:yh(18,`(${t})`));return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(s)}(r.containerQueries?r:jh,s);e&&(o[e]=n(t[s],s))}else Object.keys(e.values||$h).includes(s)?o[e.up(s)]=n(t[s],s):o[s]=t[s];var i,a;return o},{})}return n(t)}function Bh(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":yh(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Vh(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function zh(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Vh(e,n)||r,t&&(o=t(o,r,e)),o}function Wh(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=e=>{if(null==e[t])return null;const s=e[t],i=Vh(e.theme,r)||{};return Uh(e,s,e=>{let r=zh(i,o,e);return e===r&&"string"==typeof e&&(r=zh(i,o,`${t}${"default"===e?"":Bh(e)}`,e)),!1===n?r:{[n]:r}})};return s.propTypes="production"!==process.env.NODE_ENV?{[t]:Nh}:{},s.filterProps=[t],s}const qh={m:"margin",p:"padding"},Kh={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Zh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Gh=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!Zh[e])return[e];e=Zh[e]}const[t,n]=e.split(""),r=qh[t],o=Kh[n]||"";return Array.isArray(o)?o.map(e=>r+e):[r+o]})(t)),e[t])}(),Yh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Jh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Xh=[...Yh,...Jh];function Qh(e,t,n,r){const o=Vh(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`),"string"==typeof o?`calc(${e} * ${o})`:o*e):Array.isArray(o)?e=>{if("string"==typeof e)return e;const n=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(n)?n>o.length-1&&console.error([`MUI: The value provided (${n}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${n} > ${o.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const r=o[n];return e>=0?r:"number"==typeof r?-r:`-${r}`}:"function"==typeof o?o:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function ef(e){return Qh(e,"spacing",8,"spacing")}function tf(e,t){return"string"==typeof t||null==t?t:e(t)}function nf(e,t){const n=ef(e.theme);return Object.keys(e).map(r=>function(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=tf(t,n),e),{})}(Gh(n),r);return Uh(e,e[n],o)}(e,t,r,n)).reduce(Hh,{})}function rf(e){return nf(e,Yh)}function of(e){return nf(e,Jh)}function sf(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?Hh(n,t[r](e)):n,{});return n.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function af(e){return"number"!=typeof e?e:`${e}px solid`}function cf(e,t){return Wh({prop:e,themeKey:"borders",transform:t})}rf.propTypes="production"!==process.env.NODE_ENV?Yh.reduce((e,t)=>(e[t]=Nh,e),{}):{},rf.filterProps=Yh,of.propTypes="production"!==process.env.NODE_ENV?Jh.reduce((e,t)=>(e[t]=Nh,e),{}):{},of.filterProps=Jh,"production"===process.env.NODE_ENV||Xh.reduce((e,t)=>(e[t]=Nh,e),{});const lf=cf("border",af),uf=cf("borderTop",af),df=cf("borderRight",af),pf=cf("borderBottom",af),hf=cf("borderLeft",af),ff=cf("borderColor"),mf=cf("borderTopColor"),gf=cf("borderRightColor"),yf=cf("borderBottomColor"),vf=cf("borderLeftColor"),bf=cf("outline",af),_f=cf("outlineColor"),Sf=e=>{if(null!=e.borderRadius){const t=Qh(e.theme,"shape.borderRadius",4,"borderRadius");return Uh(e,e.borderRadius,e=>({borderRadius:tf(t,e)}))}return null};Sf.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Nh}:{},Sf.filterProps=["borderRadius"],sf(lf,uf,df,pf,hf,ff,mf,gf,yf,vf,Sf,bf,_f);const wf=e=>{if(null!=e.gap){const t=Qh(e.theme,"spacing",8,"gap");return Uh(e,e.gap,e=>({gap:tf(t,e)}))}return null};wf.propTypes="production"!==process.env.NODE_ENV?{gap:Nh}:{},wf.filterProps=["gap"];const kf=e=>{if(null!=e.columnGap){const t=Qh(e.theme,"spacing",8,"columnGap");return Uh(e,e.columnGap,e=>({columnGap:tf(t,e)}))}return null};kf.propTypes="production"!==process.env.NODE_ENV?{columnGap:Nh}:{},kf.filterProps=["columnGap"];const Ef=e=>{if(null!=e.rowGap){const t=Qh(e.theme,"spacing",8,"rowGap");return Uh(e,e.rowGap,e=>({rowGap:tf(t,e)}))}return null};function Cf(e,t){return"grey"===t?t:e}function xf(e){return e<=1&&0!==e?100*e+"%":e}Ef.propTypes="production"!==process.env.NODE_ENV?{rowGap:Nh}:{},Ef.filterProps=["rowGap"],sf(wf,kf,Ef,Wh({prop:"gridColumn"}),Wh({prop:"gridRow"}),Wh({prop:"gridAutoFlow"}),Wh({prop:"gridAutoColumns"}),Wh({prop:"gridAutoRows"}),Wh({prop:"gridTemplateColumns"}),Wh({prop:"gridTemplateRows"}),Wh({prop:"gridTemplateAreas"}),Wh({prop:"gridArea"})),sf(Wh({prop:"color",themeKey:"palette",transform:Cf}),Wh({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Cf}),Wh({prop:"backgroundColor",themeKey:"palette",transform:Cf}));const Tf=Wh({prop:"width",transform:xf}),If=e=>null!=e.maxWidth?Uh(e,e.maxWidth,t=>{const n=e.theme?.breakpoints?.values?.[t]||$h[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:xf(t)}}):null;If.filterProps=["maxWidth"];const Mf=Wh({prop:"minWidth",transform:xf}),Of=Wh({prop:"height",transform:xf}),Pf=Wh({prop:"maxHeight",transform:xf}),Rf=Wh({prop:"minHeight",transform:xf});Wh({prop:"size",cssProperty:"width",transform:xf}),Wh({prop:"size",cssProperty:"height",transform:xf}),sf(Tf,If,Mf,Of,Pf,Rf,Wh({prop:"boxSizing"}));var Af={border:{themeKey:"borders",transform:af},borderTop:{themeKey:"borders",transform:af},borderRight:{themeKey:"borders",transform:af},borderBottom:{themeKey:"borders",transform:af},borderLeft:{themeKey:"borders",transform:af},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:af},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Sf},color:{themeKey:"palette",transform:Cf},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Cf},backgroundColor:{themeKey:"palette",transform:Cf},p:{style:of},pt:{style:of},pr:{style:of},pb:{style:of},pl:{style:of},px:{style:of},py:{style:of},padding:{style:of},paddingTop:{style:of},paddingRight:{style:of},paddingBottom:{style:of},paddingLeft:{style:of},paddingX:{style:of},paddingY:{style:of},paddingInline:{style:of},paddingInlineStart:{style:of},paddingInlineEnd:{style:of},paddingBlock:{style:of},paddingBlockStart:{style:of},paddingBlockEnd:{style:of},m:{style:rf},mt:{style:rf},mr:{style:rf},mb:{style:rf},ml:{style:rf},mx:{style:rf},my:{style:rf},margin:{style:rf},marginTop:{style:rf},marginRight:{style:rf},marginBottom:{style:rf},marginLeft:{style:rf},marginX:{style:rf},marginY:{style:rf},marginInline:{style:rf},marginInlineStart:{style:rf},marginInlineEnd:{style:rf},marginBlock:{style:rf},marginBlockStart:{style:rf},marginBlockEnd:{style:rf},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:wf},rowGap:{style:Ef},columnGap:{style:kf},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:xf},maxWidth:{style:If},minWidth:{transform:xf},height:{transform:xf},maxHeight:{transform:xf},minHeight:{transform:xf},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Df=function(){function e(e,t,n,r){const o={[e]:t,theme:n},s=r[e];if(!s)return{[e]:t};const{cssProperty:i=e,themeKey:a,transform:c,style:l}=s;if(null==t)return null;if("typography"===a&&"inherit"===t)return{[e]:t};const u=Vh(n,a)||{};return l?l(o):Uh(o,t,t=>{let n=zh(u,c,t);return t===n&&"string"==typeof t&&(n=zh(u,c,`${e}${"default"===t?"":Bh(t)}`,t)),!1===i?n:{[i]:n}})}return function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const s=o.unstable_sxConfig??Af;function i(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const i=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(o.breakpoints),a=Object.keys(i);let c=i;return Object.keys(r).forEach(n=>{const i="function"==typeof(a=r[n])?a(o):a;var a;if(null!=i)if("object"==typeof i)if(s[n])c=Hh(c,e(n,i,o,s));else{const e=Uh({theme:o},i,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,i)?c=Hh(c,e):c[n]=t({sx:i,theme:o})}else c=Hh(c,e(n,i,o,s))}),function(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}(o,function(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}(a,c))}return Array.isArray(r)?r.map(i):i(r)}}();Df.filterProps=["sx"];var Lf=Df;function Nf(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Hf(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...i}=e,a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,s=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),i=Object.keys(s);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function c(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function l(e,o){const s=i.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==s&&"number"==typeof t[i[s]]?t[i[s]]:o)-r/100}${n})`}return{keys:i,values:s,up:a,down:c,between:l,only:function(e){return i.indexOf(e)+1<i.length?l(e,i[i.indexOf(e)+1]):a(e)},not:function(e){const t=i.indexOf(e);return 0===t?a(i[1]):t===i.length-1?c(i[t]):l(e,i[i.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}(n),c=function(e=8,t=ef({spacing:e})){if(e.mui)return e;const n=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" "));return n.mui=!0,n}(o);let l=Dh({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...Lh,...s}},i);return l=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(l),l.applyStyles=Nf,l=t.reduce((e,t)=>Dh(e,t),l),l.unstable_sxConfig={...Af,...i?.unstable_sxConfig},l.unstable_sx=function(e){return Lf({sx:e,theme:this})},l}const $f=Hf(),Ff=e=>e;var jf=(()=>{let e=Ff;return{configure(t){e=t},generate:t=>e(t),reset(){e=Ff}}})();function Uf(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Uf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bf(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Uf(e))&&(r&&(r+=" "),r+=t);return r}const Vf={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"},zf=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,s=Mh("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Lf),i=/*#__PURE__*/F.forwardRef(function(e,i){const a=function(e=$f){return function(e=null){const t=F.useContext(h.ThemeContext);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t}(e)}(n),{className:c,component:l="div",...u}=function(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Af;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t})(n);let s;return s=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return Rh(n)?{...r,...n}:r}:{...r,...t},{...o,sx:s}}(e);/*#__PURE__*/
171
+ `,ct=({reverseOrder:t,position:n="top-center",toastOptions:r,gutter:o,children:s,containerStyle:i,containerClassName:a})=>{let{toasts:c,handlers:l}=(t=>{let{toasts:n,pausedAt:r}=((t={})=>{let[n,r]=e.useState(Re);e.useEffect(()=>(Pe.push(r),()=>{let e=Pe.indexOf(r);e>-1&&Pe.splice(e,1)}),[n]);let o=n.toasts.map(e=>{var n,r,o;return{...t,...t[e.type],...e,removeDelay:e.removeDelay||(null==(n=t[e.type])?void 0:n.removeDelay)||(null==t?void 0:t.removeDelay),duration:e.duration||(null==(r=t[e.type])?void 0:r.duration)||(null==t?void 0:t.duration)||De[e.type],style:{...t.style,...null==(o=t[e.type])?void 0:o.style,...e.style}}});return{...n,toasts:o}})(t);e.useEffect(()=>{if(r)return;let e=Date.now(),t=n.map(t=>{if(t.duration===1/0)return;let n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(n<0))return setTimeout(()=>Ne.dismiss(t.id),n);t.visible&&Ne.dismiss(t.id)});return()=>{t.forEach(e=>e&&clearTimeout(e))}},[n,r]);let o=e.useCallback(()=>{r&&Ae({type:6,time:Date.now()})},[r]),s=e.useCallback((e,t)=>{let{reverseOrder:r=!1,gutter:o=8,defaultPosition:s}=t||{},i=n.filter(t=>(t.position||s)===(e.position||s)&&t.height),a=i.findIndex(t=>t.id===e.id),c=i.filter((e,t)=>t<a&&e.visible).length;return i.filter(e=>e.visible).slice(...r?[c+1]:[0,c]).reduce((e,t)=>e+(t.height||0)+o,0)},[n]);return e.useEffect(()=>{n.forEach(e=>{if(e.dismissed)((e,t=1e3)=>{if(je.has(e))return;let n=setTimeout(()=>{je.delete(e),Ae({type:4,toastId:e})},t);je.set(e,n)})(e.id,e.removeDelay);else{let t=je.get(e.id);t&&(clearTimeout(t),je.delete(e.id))}})},[n]),{toasts:n,handlers:{updateHeight:$e,startPause:Fe,endPause:o,calculateOffset:s}}})(r);return F.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...i},className:a,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(e=>{let r=e.position||n,i=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Me()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}})(r,l.calculateOffset(e,{reverseOrder:t,gutter:o,defaultPosition:n}));return F.createElement(it,{id:e.id,key:e.id,onHeightUpdate:l.updateHeight,className:e.visible?at:"",style:i},"custom"===e.type?Te(e.message,e):s?s(e):F.createElement(st,{toast:e,position:r}))}))},lt=Ne;const ut="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,dt="8.48.0",pt=globalThis;function ht(e,t,n){const r=n||pt,o=r.__SENTRY__=r.__SENTRY__||{},s=o[dt]=o[dt]||{};return s[e]||(s[e]=t())}const ft="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,mt=["debug","info","warn","error","log","assert","trace"],gt={};function yt(e){if(!("console"in pt))return e();const t=pt.console,n={},r=Object.keys(gt);r.forEach(e=>{const r=gt[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}const vt=ht("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return mt.forEach(ft?n=>{t[n]=(...t)=>{e&&yt(()=>{pt.console[n](`Sentry Logger [${n}]:`,...t)})}}:e=>{t[e]=()=>{}}),t}),bt="?",_t=/\(error: (.*)\)/,St=/captureMessage|captureException/;function wt(...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=_t.test(n)?n.replace(_t,"$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 function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(kt(t).function||"")&&t.pop(),t.reverse(),St.test(kt(t).function||"")&&(t.pop(),St.test(kt(t).function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||kt(t).filename,function:e.function||bt}))}(o.slice(r))}}function kt(e){return e[e.length-1]||{}}const Et="<anonymous>";function Ct(e){try{return e&&"function"==typeof e&&e.name||Et}catch(e){return Et}}function xt(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(e){return}}}const Tt={},It={};function Mt(e,t){Tt[e]=Tt[e]||[],Tt[e].push(t)}function Ot(e,t){if(!It[e]){It[e]=!0;try{t()}catch(t){ft&&vt.error(`Error while instrumenting ${e}`,t)}}}function Pt(e,t){const n=e&&Tt[e];if(n)for(const r of n)try{r(t)}catch(t){ft&&vt.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ct(r)}\nError:`,t)}}let Rt=null;function At(e){const t="error";Mt(t,e),Ot(t,Dt)}function Dt(){Rt=pt.onerror,pt.onerror=function(e,t,n,r,o){return Pt("error",{column:r,error:o,line:n,msg:e,url:t}),!!Rt&&Rt.apply(this,arguments)},pt.onerror.__SENTRY_INSTRUMENTED__=!0}let Lt=null;function Nt(e){const t="unhandledrejection";Mt(t,e),Ot(t,Ht)}function Ht(){Lt=pt.onunhandledrejection,pt.onunhandledrejection=function(e){return Pt("unhandledrejection",e),!Lt||Lt.apply(this,arguments)},pt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function $t(){return Ft(pt),pt}function Ft(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||dt,t[dt]=t[dt]||{}}const jt=Object.prototype.toString;function Ut(e){switch(jt.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Jt(e,Error)}}function Bt(e,t){return jt.call(e)===`[object ${t}]`}function Vt(e){return Bt(e,"ErrorEvent")}function zt(e){return Bt(e,"DOMError")}function Wt(e){return Bt(e,"String")}function qt(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Kt(e){return null===e||qt(e)||"object"!=typeof e&&"function"!=typeof e}function Zt(e){return Bt(e,"Object")}function Gt(e){return"undefined"!=typeof Event&&Jt(e,Event)}function Yt(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Jt(e,t){try{return e instanceof t}catch(e){return!1}}function Xt(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Qt=pt;function en(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 l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(l=tn(n,u),!("html"===l||s>1&&i+o.length*c+l.length>=d));)o.push(l),i+=l.length,n=n.parentNode;return o.reverse().join(a)}catch(e){return"<unknown>"}}function tn(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Qt.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&&Wt(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 nn(){try{return Qt.document.location.href}catch(e){return""}}function rn(e){if(!Qt.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 on(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function sn(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Xt(r)?n.push("[VueViewModel]"):n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function an(e,t=[],n=!1){return t.some(t=>function(e,t,n=!1){return!!Wt(e)&&(Bt(t,"RegExp")?t.test(e):!!Wt(t)&&(n?e===t:e.includes(t)))}(e,t,n))}function cn(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);"function"==typeof o&&un(o,r);try{e[t]=o}catch(n){ft&&vt.log(`Failed to replace method "${t}" in object`,e)}}function ln(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){ft&&vt.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function un(e,t){try{e.prototype=t.prototype=t.prototype||{},ln(e,"__sentry_original__",t)}catch(e){}}function dn(e){return e.__sentry_original__}function pn(e){if(Ut(e))return{message:e.message,name:e.name,stack:e.stack,...fn(e)};if(Gt(e)){const t={type:e.type,target:hn(e.target),currentTarget:hn(e.currentTarget),...fn(e)};return"undefined"!=typeof CustomEvent&&Jt(e,CustomEvent)&&(t.detail=e.detail),t}return e}function hn(e){try{return"undefined"!=typeof Element&&Jt(e,Element)?en(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function fn(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 mn(e){return gn(e,new Map)}function gn(e,t){if(function(e){if(!Zt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(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))void 0!==e[n]&&(r[n]=gn(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(gn(e,t))}),r}return e}function yn(){return Date.now()/1e3}const vn=function(){const{performance:e}=pt;if(!e||!e.now)return yn;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}(),bn=(()=>{const{performance:e}=pt;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 _n(){const e=pt.crypto||pt.msCrypto;let t=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(t=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&t())>>e/4).toString(16))}function Sn(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function wn(e){const{message:t,event_id:n}=e;if(t)return t;const r=Sn(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function kn(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=n||"Error")}function En(e,t){const n=Sn(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 Cn(e){if(function(e){try{return e.__sentry_captured__}catch(e){}}(e))return!0;try{ln(e,"__sentry_captured__",!0)}catch(e){}return!1}var xn;function Tn(e){return new Mn(t=>{t(e)})}function In(e){return new Mn((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(xn||(xn={}));class Mn{constructor(e){Mn.prototype.__init.call(this),Mn.prototype.__init2.call(this),Mn.prototype.__init3.call(this),Mn.prototype.__init4.call(this),this._state=xn.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Mn((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 Mn((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(xn.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(xn.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===xn.PENDING&&(Yt(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===xn.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===xn.RESOLVED&&e[1](this._value),this._state===xn.REJECTED&&e[2](this._value),e[0]=!0)})}}}function On(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||vn(),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:_n()),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 Pn(){return _n()}function Rn(){return _n().substring(16)}function An(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]=An(r[e],t[e],n-1));return r}const Dn="_sentrySpan";function Ln(e,t){t?ln(e,Dn,t):delete e[Dn]}function Nn(e){return e[Dn]}class Hn{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:Pn(),spanId:Rn()}}clone(){const e=new Hn;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,Ln(e,Nn(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&&On(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 $n?[t.getScopeData(),t.getRequestSession()]:Zt(t)?[e,e.requestSession]:[],{tags:o,extra:s,user:i,contexts:a,level:c,fingerprint:l=[],propagationContext:u}=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),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,Ln(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Pn()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:yn(),...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:Nn(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=An(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Rn(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:_n();if(!this._client)return vt.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:_n();if(!this._client)return vt.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:_n();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(vt.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 $n=Hn;class Fn{constructor(e,t){let n,r;n=e||new $n,r=t||new $n,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 Yt(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 jn(){const e=Ft($t());return e.stack=e.stack||new Fn(ht("defaultCurrentScope",()=>new $n),ht("defaultIsolationScope",()=>new $n))}function Un(e){return jn().withScope(e)}function Bn(e,t){const n=jn();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Vn(e){return jn().withScope(()=>e(jn().getIsolationScope()))}function zn(e){const t=Ft(e);return t.acs?t.acs:{withIsolationScope:Vn,withScope:Un,withSetScope:Bn,withSetIsolationScope:(e,t)=>Vn(t),getCurrentScope:()=>jn().getScope(),getIsolationScope:()=>jn().getIsolationScope()}}function Wn(){return zn($t()).getCurrentScope()}function qn(){return zn($t()).getIsolationScope()}function Kn(...e){const t=zn($t());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Zn(){return Wn().getClient()}function Gn(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:o}=t;return mn({trace_id:n,span_id:r,parent_span_id:o})}function Yn(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(mn(r));return n}const Jn="sentry.source",Xn="sentry.sample_rate",Qn="sentry.op",er="sentry.origin",tr="sentry.idle_span_finish_reason",nr="sentry.measurement_unit",rr="sentry.measurement_value",or="sentry.custom_span_name",sr="sentry.exclusive_time";function ir(e,t){e.setAttribute("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}const ar="sentry-",cr=/^sentry-/;function lr(e){const t=function(e){if(e&&(Wt(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{const n=ur(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):ur(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>(t.match(cr)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function ur(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const dr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function pr(e=Pn(),t=Rn(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}let hr=!1;function fr(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a}=vr(e);return mn({parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a})}function mr(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return mn({parent_span_id:r?t:vr(e).parent_span_id,span_id:r?Rn():t,trace_id:n})}function gr(e){return"number"==typeof e?yr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?yr(e.getTime()):vn()}function yr(e){return e>9999999999?e/1e3:e}function vr(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(function(e){return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(e)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:a,status:c}=e;return mn({span_id:t,trace_id:n,data:r,description:s,parent_span_id:a,start_timestamp:gr(o),timestamp:gr(i)||void 0,status:_r(c),op:r[Qn],origin:r[er],_metrics_summary:Yn(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function br(e){const{traceFlags:t}=e.spanContext();return 1===t}function _r(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const Sr="_sentryChildSpans",wr="_sentryRootSpan";function kr(e,t){ln(t,wr,e[wr]||e),e[Sr]?e[Sr].add(t):ln(e,Sr,new Set([t]))}function Er(e){const t=new Set;return function e(n){if(!t.has(n)&&br(n)){t.add(n);const r=n[Sr]?Array.from(n[Sr]):[];for(const t of r)e(t)}}(e),Array.from(t)}function Cr(e){return e[wr]||e}function xr(){const e=zn($t());return e.getActiveSpan?e.getActiveSpan():Nn(Wn())}function Tr(){hr||(yt(()=>{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.")}),hr=!0)}let Ir=!1;function Mr(){const e=xr(),t=e&&Cr(e);if(t){const e="internal_error";ut&&vt.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}Mr.tag="sentry_tracingErrorCallback";const Or="_sentryScope",Pr="_sentryIsolationScope";function Rr(e){return{scope:e[Or],isolationScope:e[Pr]}}function Ar(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=Zn(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Dr{constructor(e={}){this._traceId=e.traceId||Pn(),this._spanId=e.spanId||Rn()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}const Lr="production",Nr="_frozenDsc";function Hr(e,t){ln(e,Nr,t)}function $r(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=mn({environment:n.environment||Lr,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function Fr(e,t){const n=t.getPropagationContext();return n.dsc||$r(n.traceId,e)}function jr(e){const t=Zn();if(!t)return{};const n=Cr(e),r=n[Nr];if(r)return r;const o=n.spanContext().traceState,s=o&&o.get("sentry.dsc"),i=s&&lr(s);if(i)return i;const a=$r(e.spanContext().traceId,t),c=vr(n),l=c.data||{},u=l[Xn];null!=u&&(a.sample_rate=`${u}`);const d=c.description;return"url"!==l[Jn]&&d&&(a.transaction=d),Ar()&&(a.sampled=String(br(n))),t.emit("createDsc",a,n),a}function Ur(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;ut&&vt.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 Br=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Vr(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}/`:r}${i}`}function zr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Wr(e){const t="string"==typeof e?function(e){const t=Br.exec(e);if(!t)return void yt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,o="",s="",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 zr({host:s,pass:o,path:c,projectId:l,port:i,protocol:n,publicKey:r})}(e):zr(e);if(t&&function(e){if(!ft)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(vt.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(vt.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(vt.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(vt.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function qr(e,t=100,n=Infinity){try{return Zr("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Kr(e,t=3,n=102400){const r=qr(e,t);return o=JSON.stringify(r),~-encodeURI(o).split(/%..|./).length>n?Kr(e,t-1,n):r;var o}function Zr(e,t,n=Infinity,r=Infinity,o=function(){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}}]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(Xt(t))return"[VueViewModel]";if(Zt(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Ct(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(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 l=t;if(l&&"function"==typeof l.toJSON)try{return Zr("",l.toJSON(),c-1,r,o)}catch(e){}const u=Array.isArray(t)?[]:{};let d=0;const p=pn(t);for(const e in p)if(Object.prototype.hasOwnProperty.call(p,e)){if(d>=r){u[e]="[MaxProperties ~]";break}u[e]=Zr(e,p[e],c-1,r,o),d++}return i(t),u}function Gr(e,t=[]){return[e,t]}function Yr(e,t){const[n,r]=e;return[n,[...r,t]]}function Jr(e,t){const n=e[1];for(const e of n)if(t(e,e[0].type))return!0;return!1}function Xr(e){return pt.__SENTRY__&&pt.__SENTRY__.encodePolyfill?pt.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function Qr(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[Xr(r),e]:r.push("string"==typeof e?Xr(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(t){e=JSON.stringify(qr(n))}o(e)}}return"string"==typeof r?r:function(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}(r)}function eo(e){return[{type:"span"},e]}function to(e){const t="string"==typeof e.data?Xr(e.data):e.data;return[mn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const no={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 ro(e){return no[e]}function oo(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function so(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:Vr(r)},...o&&{trace:mn({...o})}}}function io(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[nr],o=n[rr];"string"==typeof r&&"number"==typeof o&&(t[e.name]={value:o,unit:r})}),t}class ao{constructor(e={}){this._traceId=e.traceId||Pn(),this._spanId=e.spanId||Rn(),this._startTime=e.startTimestamp||vn(),this._attributes={},this.setAttributes({[er]:"manual",[Qn]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=gr(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(Jn,"custom"),this}end(e){this._endTime||(this._endTime=gr(e),function(e){if(!ut)return;const{description:t="< unknown name >",op:n="< unknown op >"}=vr(e),{spanId:r}=e.spanContext(),o=Cr(e);vt.log(`[Tracing] Finishing "${n}" ${o===e?"root ":""}span "${t}" with ID ${r}`)}(this),this._onSpanEnded())}getSpanJSON(){return mn({data:this._attributes,description:this._name,op:this._attributes[Qn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:_r(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[er],_metrics_summary:Yn(this),profile_id:this._attributes["sentry.profile_id"],exclusive_time:this._attributes[sr],measurements:io(this._events),is_segment:this._isStandaloneSpan&&Cr(this)===this||void 0,segment_id:this._isStandaloneSpan?Cr(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){ut&&vt.log("[Tracing] Adding an event to span:",e);const r=co(t)?t:n||vn(),o=co(t)?{}:t||{},s={name:e,time:gr(r),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=Zn();if(e&&e.emit("spanEnd",this),!this._isStandaloneSpan&&this!==Cr(this))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=Zn();if(!t)return;const n=e[1];n&&0!==n.length?t.sendEnvelope(e):t.recordDroppedEvent("before_send","span")}(function(e,t){const n=jr(e[0]),r=t&&t.getDsn(),o=t&&t.getOptions().tunnel,s={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!o&&r&&{dsn:Vr(r)}},i=t&&t.getOptions().beforeSendSpan,a=i?e=>{const t=i(vr(e));return t||Tr(),t}:e=>vr(e),c=[];for(const t of e){const e=a(t);e&&c.push(eo(e))}return Gr(s,c)}([this],e)):(ut&&vt.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const t=this._convertSpanToTransaction();t&&(Rr(this).scope||Wn()).captureEvent(t)}_convertSpanToTransaction(){if(!lo(vr(this)))return;this._name||(ut&&vt.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:t}=Rr(this),n=(e||Wn()).getClient()||Zn();if(!0!==this._sampled)return ut&&vt.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(n&&n.recordDroppedEvent("sample_rate","transaction"));const r=Er(this).filter(e=>e!==this&&!function(e){return e instanceof ao&&e.isStandaloneSpan()}(e)).map(e=>vr(e)).filter(lo),o=this._attributes[Jn];delete this._attributes[or],r.forEach(e=>{e.data&&delete e.data[or]});const s={contexts:{trace:fr(this)},spans:r.length>1e3?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,...mn({dynamicSamplingContext:jr(this)})},_metrics_summary:Yn(this),...o&&{transaction_info:{source:o}}},i=io(this._events);return i&&Object.keys(i).length&&(ut&&vt.log("[Measurements] Adding measurements to transaction event",JSON.stringify(i,void 0,2)),s.measurements=i),s}}function co(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function lo(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const uo="__SENTRY_SUPPRESS_TRACING__";function po(e){const t=fo();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=function(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=gr(e.startTime),delete n.startTime,n}return t}(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?t=>Kn(e.scope,t):void 0!==o?e=>ho(o,e):e=>e())(()=>{const t=Wn(),o=function(e){const t=Nn(e);if(!t)return;const n=Zn();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?Cr(t):t}(t);return e.onlyIfParent&&!o?new Dr:function({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ar())return new Dr;const o=qn();let s;if(e&&!n)s=function(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=!t.getScopeData().sdkProcessingMetadata[uo]&&br(e),i=s?new ao({...n,parentSpanId:r,traceId:o,sampled:s}):new Dr({traceId:o});kr(e,i);const a=Zn();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}(e,r,t),kr(e,s);else if(e){const n=jr(e),{traceId:o,spanId:i}=e.spanContext(),a=br(e);s=mo({traceId:o,parentSpanId:i,...t},r,a),Hr(s,n)}else{const{traceId:e,dsc:n,parentSpanId:i,sampled:a}={...o.getPropagationContext(),...r.getPropagationContext()};s=mo({traceId:e,parentSpanId:i,...t},r,a),n&&Hr(s,n)}return function(e){if(!ut)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=vr(e),{spanId:o}=e.spanContext(),s=br(e),i=Cr(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&l.push(`parent ID: ${r}`),!a){const{op:e,description:t}=vr(i);l.push(`root ID: ${i.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}vt.log(`${c}\n ${l.join("\n ")}`)}(s),function(e,t,n){e&&(ln(e,Pr,n),ln(e,Or,t))}(s,r,o),s}({parentSpan:o,spanArguments:n,forceTransaction:r,scope:t})})}function ho(e,t){const n=fo();return n.withActiveSpan?n.withActiveSpan(e,t):Kn(n=>(Ln(n,e||void 0),t(n)))}function fo(){return zn($t())}function mo(e,t,n){const r=Zn(),o=r&&r.getOptions()||{},{name:s="",attributes:i}=e,[a,c]=t.getScopeData().sdkProcessingMetadata[uo]?[!1]:function(e,t){if(!Ar(e))return[!1];const n=qn().getScopeData().sdkProcessingMetadata.normalizedRequest,r={...t,normalizedRequest:t.normalizedRequest||n};let o;o="function"==typeof e.tracesSampler?e.tracesSampler(r):void 0!==r.parentSampled?r.parentSampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1;const s=Ur(o);return void 0===s?(ut&&vt.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):s?Math.random()<s?[!0,s]:(ut&&vt.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[!1,s]):(ut&&vt.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,s])}(o,{name:s,parentSampled:n,attributes:i,transactionContext:{name:s,parentSampled:n}}),l=new ao({...e,attributes:{[Jn]:"custom",...e.attributes},sampled:a});return void 0!==c&&l.setAttribute(Xn,c),r&&r.emit("spanStart",l),l}const go={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function yo(e,t={}){const n=new Map;let r,o=!1,s="externalFinish",i=!t.disableAutoFinish;const a=[],{idleTimeout:c=go.idleTimeout,finalTimeout:l=go.finalTimeout,childSpanTimeout:u=go.childSpanTimeout,beforeSpanEnd:d}=t,p=Zn();if(!p||!Ar())return new Dr;const h=Wn(),f=xr(),m=function(e){const t=po(e);return Ln(Wn(),t),ut&&vt.log("[Tracing] Started span is an idle span"),t}(e);function g(){r&&(clearTimeout(r),r=void 0)}function y(e){g(),r=setTimeout(()=>{!o&&0===n.size&&i&&(s="idleTimeout",m.end(e))},c)}function v(e){r=setTimeout(()=>{!o&&i&&(s="heartbeatFailed",m.end(e))},u)}function b(e){o=!0,n.clear(),a.forEach(e=>e()),Ln(h,f);const t=vr(m),{start_timestamp:r}=t;if(!r)return;(t.data||{})[tr]||m.setAttribute(tr,s),vt.log(`[Tracing] Idle span "${t.op}" finished`);const i=Er(m).filter(e=>e!==m);let u=0;i.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),ut&&vt.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=vr(t),{timestamp:r=0,start_timestamp:o=0}=n,s=o<=e,i=r-o<=(l+c)/1e3;if(ut){const e=JSON.stringify(t,void 0,2);s?i||vt.log("[Tracing] Discarding span since it finished after idle span final timeout",e):vt.log("[Tracing] Discarding span since it happened after idle span was finished",e)}i&&s||(function(e,t){e[Sr]&&e[Sr].delete(t)}(m,t),u++)}),u>0&&m.setAttribute("sentry.idle_span_discarded_spans",u)}return m.end=new Proxy(m.end,{apply(e,t,n){d&&d(m);const[r,...o]=n,s=gr(r||vn()),i=Er(m).filter(e=>e!==m);if(!i.length)return b(s),Reflect.apply(e,t,[s,...o]);const a=i.map(e=>vr(e).timestamp).filter(e=>!!e),c=a.length?Math.max(...a):void 0,u=vr(m).start_timestamp,p=Math.min(u?u+l/1e3:Infinity,Math.max(u||-Infinity,Math.min(s,c||Infinity)));return b(p),Reflect.apply(e,t,[p,...o])}}),a.push(p.on("spanStart",e=>{var t;o||e===m||vr(e).timestamp||Er(m).includes(e)&&(t=e.spanContext().spanId,g(),n.set(t,!0),v(vn()+u/1e3))})),a.push(p.on("spanEnd",e=>{var t;o||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&y(vn()+c/1e3))})),a.push(p.on("idleSpanEnableAutoFinish",e=>{e===m&&(i=!0,y(),n.size&&v())})),t.disableAutoFinish||y(),setTimeout(()=>{o||(m.setStatus({code:2,message:"deadline_exceeded"}),s="finalTimeout",m.end())},l),m}function vo(e,t,n,r=0){return new Mn((o,s)=>{const i=e[r];if(null===t||"function"!=typeof i)o(t);else{const a=i({...t},n);ut&&i.id&&null===a&&vt.log(`Event processor "${i.id}" dropped event`),Yt(a)?a.then(t=>vo(e,t,n,r+1).then(o)).then(null,s):vo(e,a,n,r+1).then(o).then(null,s)}})}let bo,_o,So;function wo(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:p,transactionName:h,span:f}=t;ko(e,"extra",n),ko(e,"tags",r),ko(e,"user",o),ko(e,"contexts",s),e.sdkProcessingMetadata=An(e.sdkProcessingMetadata,a,2),i&&(e.level=i),h&&(e.transactionName=h),f&&(e.span=f),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 ko(e,t,n){e[t]=An(e[t],n,1)}function Eo(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||_n(),timestamp:t.timestamp||yn()},l=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s=250}=t;e.environment=e.environment||n||Lr,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o),e.message&&(e.message=on(e.message,s));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=on(i.value,s));const a=e.request;a&&a.url&&(a.url=on(a.url,s))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=pt._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return So&&n.length===_o||(_o=n.length,So=n.reduce((n,r)=>{bo||(bo={});const o=bo[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,bo[r]=[i,a];break}}}return n},{})),So}(t);try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{n&&e.filename&&(e.debug_id=n[e.filename])})})}catch(e){}}(c,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new $n;return n.update(t),n}(r,n.captureContext);n.mechanism&&En(c,n.mechanism);const d=o?o.getEventProcessors():[],p=ht("globalScope",()=>new $n).getScopeData();s&&wo(p,s.getScopeData()),u&&wo(p,u.getScopeData());const h=[...n.attachments||[],...p.attachments];return h.length&&(n.attachments=h),function(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t,c=mn(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=mn(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=mn(o);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=mn(s);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),i&&(e.level=i),a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:mr(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:jr(t),...e.sdkProcessingMetadata};const n=vr(Cr(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,r),function(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}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}(c,p),vo([...d,...p.eventProcessors],c,n).then(e=>(e&&function(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(e){}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})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:qr(e.data,t,n)}}))},...e.user&&{user:qr(e.user,t,n)},...e.contexts&&{contexts:qr(e.contexts,t,n)},...e.extra&&{extra:qr(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=qr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:qr(e.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=qr(e.contexts.flags,3,n)),r}(e,i,a):e))}const Co=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function xo(e,t){return Wn().captureException(e,function(e){if(e)return function(e){return e instanceof $n||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>Co.includes(e))}(e)?{captureContext:e}:e}(t))}function To(e,t){return Wn().captureEvent(e,t)}function Io(e,t){qn().setContext(e,t)}function Mo(e){const t=Zn(),n=qn(),r=Wn(),{release:o,environment:s=Lr}=t&&t.getOptions()||{},{userAgent:i}=pt.navigator||{},a=function(e){const t=vn(),n={sid:_n(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return mn({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}})}(n)};return e&&On(n,e),n}({release:o,environment:s,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&"ok"===c.status&&On(c,{status:"exited"}),Oo(),n.setSession(a),r.setSession(a),a}function Oo(){const e=qn(),t=Wn(),n=t.getSession()||e.getSession();n&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),On(e,t)}(n),Po(),e.setSession(),t.setSession()}function Po(){const e=qn(),t=Wn(),n=Zn(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Ro(e=!1){e?Oo():Po()}function Ao(e){return`${e.protocol?`${e.protocol}:`:""}//${e.host}${e.port?`:${e.port}`:""}${e.path?`/${e.path}`:""}/api/`}const Do=[];function Lo(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=function(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)}(r),s=o.findIndex(e=>"Debug"===e.name);if(s>-1){const[e]=o.splice(s,1);o.push(e)}return o}function No(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Ho(e,t,n){if(n[t.name])ut&&vt.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Do.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Do.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)}ut&&vt.log(`Integration installed: ${t.name}`)}}class $o 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 Fo="Not capturing exception because it's already been captured.";class jo{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Wr(e.dsn):ut&&vt.warn("No DSN provided, client will not send events."),this._dsn){const r=(t=this._dsn,n=e._metadata?e._metadata.sdk:void 0,e.tunnel||`${function(e){return`${Ao(e)}${e.projectId}/envelope/`}(t)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(t,n)}`);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}var t,n;const r=["enableTracing","tracesSampleRate","tracesSampler"].find(t=>t in e&&null==e[t]);r&&yt(()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` 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=_n();if(Cn(e))return ut&&vt.log(Fo),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:_n(),...n},s=qt(e)?e:String(e),i=Kt(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=_n();if(t&&t.originalException&&Cn(t.originalException))return ut&&vt.log(Fo),r;const o={event_id:r,...t};return this._process(this._captureEvent(e,o,(e.sdkProcessingMetadata||{}).capturedSpanScope||n)),o.event_id}captureSession(e){"string"!=typeof e.release?ut&&vt.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),On(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))):Tn(!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];Ho(this,e,this._integrations),t||No(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const o=oo(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){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,n&&n.sdk);const i=so(e,o,r,t);return delete e.sdkProcessingMetadata,Gr(i,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Yr(n,to(e));const r=this.sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){const t=function(e,t,n,r){const o=oo(n);return Gr({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Vr(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(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}`;ut&&vt.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=>(ut&&vt.error("Error while sending envelope:",e),e)):(ut&&vt.error("Transport disabled"),Tn({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&Ho(e,t,n)}),n}(this,e),No(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)&&(On(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Mn(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=Wn(),r=qn()){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),Eo(o,e,t,n,this,r).then(e=>{if(null===e)return e;e.contexts={trace:Gn(n),...e.contexts};const t=Fr(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(ut){const t=e;"log"===t.logLevel?vt.log(t.message):vt.warn(t)}})}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r,s=Bo(e),i=Uo(e),a=e.type||"error",c=`before send for type \`${a}\``,l=void 0===o?void 0:Ur(o);if(i&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),In(new $o(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const u="replay_event"===a?"replay":a;return this._prepareEvent(e,t,n,(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new $o("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const o=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i}=t;if(Uo(n)&&o)return o(n,r);if(Bo(n)){if(n.spans&&i){const t=[];for(const r of n.spans){const n=i(r);n?t.push(n):(Tr(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(s)return n.spans&&(n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:n.spans.length}),s(n,r)}return n}(this,r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Yt(e))return e.then(e=>{if(!Zt(e)&&null!==e)throw new $o(n);return e},e=>{throw new $o(`${t} rejected with ${e}`)});if(!Zt(e)&&null!==e)throw new $o(n);return e}(o,c)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",u,e),s&&this.recordDroppedEvent("before_send","span",1+(e.spans||[]).length),new $o(`${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=>{if(e instanceof $o)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new $o(`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(){ut&&vt.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(ut&&vt.log("No outcomes to send"));if(!this._dsn)return void(ut&&vt.log("No dsn provided, will not send outcomes"));ut&&vt.log("Sending outcomes:",e);const t=(n=e,Gr((r=this._options.tunnel&&Vr(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:yn(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function Uo(e){return void 0===e.type}function Bo(e){return"transaction"===e.type}function Vo(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function zo(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);else o.all=r+a}else i?o.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(i,r):429===t&&(o.all=r+6e4);return o}function Wo(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function qo(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function Ko(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:dt})),version:dt}),e._metadata=o}function Zo(e={}){const t=Zn();if(!function(){const e=Zn();return!!e&&!1!==e.getOptions().enabled&&!!e.getTransport()}()||!t)return{};const n=zn($t());if(n.getTraceData)return n.getTraceData(e);const r=Wn(),o=e.span||xr(),s=o?function(e){const{traceId:t,spanId:n}=e.spanContext();return pr(t,n,br(e))}(o):function(e){const{traceId:t,sampled:n,spanId:r}=e.getPropagationContext();return pr(t,r,n)}(r),i=function(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],r)=>{const o=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,s=0===r?o:`${e},${o}`;return s.length>8192?(ft&&vt.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):s},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${ar}${t}`]=n),e),{}))}(o?jr(o):Fr(t,r));return dr.test(s)?{"sentry-trace":s,baggage:i}:(vt.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}const Go=100;function Yo(e,t){const n=Zn(),r=qn();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Go}=n.getOptions();if(s<=0)return;const i={timestamp:yn(),...e},a=o?yt(()=>o(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}let Jo;const Xo=new WeakMap,Qo=()=>({name:"FunctionToString",setupOnce(){Jo=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=dn(this),n=Xo.has(Zn())&&void 0!==t?t:this;return Jo.apply(n,e)}}catch(e){}},setup(e){Xo.set(e,!0)}}),es=[/^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+$/],ts=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const o=r.getOptions(),s=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:es],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,o);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e)?(ut&&vt.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${wn(e)}`),!0):function(e,t){return!(e.type||!t||!t.length)&&function(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch(e){}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}(e).some(e=>an(e,t))}(e,t.ignoreErrors)?(ut&&vt.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${wn(e)}`),!0):function(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))}(e)?(ut&&vt.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${wn(e)}`),!0):function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&an(n,t)}(e,t.ignoreTransactions)?(ut&&vt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${wn(e)}`),!0):function(e,t){if(!t||!t.length)return!1;const n=ns(e);return!!n&&an(n,t)}(e,t.denyUrls)?(ut&&vt.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${wn(e)}.\nUrl: ${ns(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;const n=ns(e);return!n||an(n,t)}(e,t.allowUrls)&&(ut&&vt.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${wn(e)}.\nUrl: ${ns(e)}`),!0)}(t,s)?null:t}});function ns(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(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}(t):null}catch(t){return ut&&vt.error(`Cannot extract url for event ${wn(e)}`),null}}function rs(e,t,n=250,r,o,s,i){if(!(s.exception&&s.exception.values&&i&&Jt(i.originalException,Error)))return;const a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;var c,l;a&&(s.exception.values=(c=os(e,t,o,i.originalException,r,s.exception.values,a,0),l=n,c.map(e=>(e.value&&(e.value=on(e.value,l)),e))))}function os(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Jt(r[o],Error)){ss(i,a);const s=e(t,r[o]),l=c.length;is(s,o,l,a),c=os(e,t,n,r[o],o,[s,...c],s,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,s)=>{if(Jt(r,Error)){ss(i,a);const l=e(t,r),u=c.length;is(l,`errors[${s}]`,u,a),c=os(e,t,n,r,o,[l,...c],l,u)}}),c}function ss(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 is(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 as(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 cs(e){return e.split(/\\?\//).filter(e=>e.length>0&&","!==e).length}function ls(){"console"in pt&&mt.forEach(function(e){e in pt.console&&cn(pt.console,e,function(t){return gt[e]=t,function(...t){Pt("console",{args:t,level:e});const n=gt[e];n&&n.apply(pt.console,t)}})})}function us(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ds=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!(!t||!function(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!hs(e,t)||!ps(e,t))}(e,t)&&!function(e,t){const n=fs(t),r=fs(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&hs(e,t)&&ps(e,t))}(e,t))}(t,e))return ut&&vt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function ps(e,t){let n=xt(e),r=xt(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(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 hs(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(e){return!1}}function fs(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ms(e){return e.split(",").filter(e=>!e.split("=")[0].startsWith(ar)).join(",")}function gs(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const ys=pt;function vs(){if(!("fetch"in ys))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function bs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function _s(e,t){const n="fetch";Mt(n,e),Ot(n,()=>Ss(void 0,t))}function Ss(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!vs())return!1;if(bs(ys.fetch))return!0;let e=!1;const t=ys.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=bs(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ft&&vt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||cn(pt,"fetch",function(t){return function(...n){const r=new Error,{method:o,url:s}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Es(t),method:ks(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Es(t),method:ks(t,"method")?String(t.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:o,url:s},startTimestamp:1e3*vn(),virtualError:r};return e||Pt("fetch",{...i}),t.apply(pt,n).then(async t=>(e?e(t):Pt("fetch",{...i,endTimestamp:1e3*vn(),response:t}),t),e=>{throw Pt("fetch",{...i,endTimestamp:1e3*vn(),error:e}),Ut(e)&&void 0===e.stack&&(e.stack=r.stack,ln(e,"framesToPop",1)),e})}})}function ws(e){let t;try{t=e.clone()}catch(e){return}!async function(t){if(t&&t.body){const n=t.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let t;try{t=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(t),o&&(Pt("fetch-body-resolved",{endTimestamp:1e3*vn(),response:e}),s=!1)}catch(e){s=!1}finally{clearTimeout(t)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}(t)}function ks(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Es(e){return"string"==typeof e?e:e?ks(e,"url")?e.url:e.toString?e.toString():"":""}function Cs(){return"undefined"!=typeof window&&(!(("undefined"==typeof __SENTRY_BROWSER_BUNDLE__||!__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0))||function(){const e=pt.process;return!!e&&"renderer"===e.type}())}const xs=pt;function Ts(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 Is=pt;let Ms=0;function Os(){return Ms>0}function Ps(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(dn(e))return e}catch(t){return e}const n=function(...n){try{const r=n.map(e=>Ps(e,t));return e.apply(this,r)}catch(e){throw Ms++,setTimeout(()=>{Ms--}),Kn(r=>{r.addEventProcessor(e=>(t.mechanism&&(kn(e,void 0,void 0),En(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),xo(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch(e){}un(n,e),ln(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch(e){}return n}const Rs="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function As(e,t){const n=Ls(e,t),r={type:$s(t),value:Fs(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ds(e,t){return{exception:{values:[As(e,t)]}}}function Ls(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&Ns.test(e.message)?1:0}(t),o=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(n,r,o)}catch(e){}return[]}const Ns=/Minified React error #\d+;/i;function Hs(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function $s(e){const t=e&&e.name;return!t&&Hs(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Fs(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:Hs(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function js(e,t,n,r,o){let s;if(Vt(t)&&t.error)return Ds(e,t.error);if(zt(t)||Bt(t,"DOMException")){const o=t;if("stack"in t)s=Ds(e,t);else{const t=o.name||(zt(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Us(e,i,n,r),kn(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return Ut(t)?Ds(e,t):Zt(t)||Gt(t)?(s=function(e,t,n,r){const o=Zn(),s=o&&o.getOptions().normalizeDepth,i=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}(t),a={__serialized__:Kr(t,s)};if(i)return{exception:{values:[As(e,i)]},extra:a};const c={exception:{values:[{type:Gt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Bs(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Ls(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,n,o),En(s,{synthetic:!0}),s):(s=Us(e,t,n,r),kn(s,`${t}`,void 0),En(s,{synthetic:!0}),s)}function Us(e,t,n,r){const o={};if(r&&n){const r=Ls(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),En(o,{synthetic:!0})}if(qt(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 Bs(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(pn(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return on(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:on(r,t)}return""}(e),r=t?"promise rejection":"exception";return Vt(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Gt(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class Vs extends jo{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};Ko(t,"browser",["browser"],Is.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&Is.document&&Is.document.addEventListener("visibilitychange",()=>{"hidden"===Is.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){const o=js(e,t,n&&n.syntheticException||void 0,r);return En(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Tn(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const s=Us(e,t,r&&r.syntheticException||void 0,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Tn(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Rs&&vt.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const o={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:Vr(r)}},s=function(e){return[{type:"user_report"},e]}(e);return Gr(o,[s])}(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 zs="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ws=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o||0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},qs=pt,Ks=(e=!0)=>{const t=qs.performance&&qs.performance.getEntriesByType&&qs.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Zs=()=>{const e=Ks();return e&&e.activationStart||0},Gs=(e,t)=>{const n=Ks();let r="navigate";return n&&(qs.document&&qs.document.prerendering||Zs()>0?r="prerender":qs.document&&qs.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Ys=(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(e){}},Js=e=>{const t=t=>{("pagehide"===t.type||qs.document&&"hidden"===qs.document.visibilityState)&&e(t)};qs.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Xs=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Qs=-1;const ei=e=>{"hidden"===qs.document.visibilityState&&Qs>-1&&(Qs="visibilitychange"===e.type?e.timeStamp:0,ti())},ti=()=>{removeEventListener("visibilitychange",ei,!0),removeEventListener("prerenderingchange",ei,!0)},ni=()=>(qs.document&&Qs<0&&(Qs="hidden"!==qs.document.visibilityState||qs.document.prerendering?Infinity:0,addEventListener("visibilitychange",ei,!0),addEventListener("prerenderingchange",ei,!0)),{get firstHiddenTime(){return Qs}}),ri=e=>{qs.document&&qs.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},oi=[1800,3e3],si=[.1,.25],ii=[100,300];let ai=0,ci=Infinity,li=0;const ui=e=>{e.forEach(e=>{e.interactionId&&(ci=Math.min(ci,e.interactionId),li=Math.max(li,e.interactionId),ai=li?(li-ci)/7+1:0)})};let di;const pi=()=>{"interactionCount"in performance||di||(di=Ys("event",ui,{type:"event",buffered:!0,durationThreshold:0}))},hi=[],fi=new Map,mi=()=>(di?ai:performance.interactionCount||0)-0,gi=[],yi=e=>{if(gi.forEach(t=>t(e)),!e.interactionId&&"first-input"!==e.entryType)return;const t=hi[hi.length-1],n=fi.get(e.interactionId);if(n||hi.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]};fi.set(t.id,t),hi.push(t)}hi.sort((e,t)=>t.latency-e.latency),hi.length>10&&hi.splice(10).forEach(e=>fi.delete(e.id))}},vi=e=>{const t=qs.requestIdleCallback||qs.setTimeout;let n=-1;return e=Xs(e),qs.document&&"hidden"===qs.document.visibilityState?e():(n=t(e),Js(e)),n},bi=[200,500],_i=[2500,4e3],Si={},wi=[800,1800],ki=e=>{qs.document&&qs.document.prerendering?ri(()=>ki(e)):qs.document&&"complete"!==qs.document.readyState?addEventListener("load",()=>ki(e),!0):setTimeout(e,0)},Ei={},Ci={};let xi,Ti,Ii,Mi,Oi;function Pi(e,t=!1){return Bi("cls",e,Hi,xi,t)}function Ri(e,t=!1){return Bi("lcp",e,Fi,Ii,t)}function Ai(e){return Bi("fid",e,$i,Ti)}function Di(e){return Bi("inp",e,Ui,Oi)}function Li(e,t){return Vi(e,t),Ci[e]||(function(e){const t={};"event"===e&&(t.durationThreshold=0),Ys(e,t=>{Ni(e,{entries:t})},t)}(e),Ci[e]=!0),zi(e,t)}function Ni(e,t){const n=Ei[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){zs&&vt.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ct(r)}\nError:`,t)}}function Hi(){return((e,t={})=>{((e,t={})=>{ri(()=>{const n=ni(),r=Gs("FCP");let o;const s=Ys("paint",e=>{e.forEach(e=>{"first-contentful-paint"===e.name&&(s.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Zs(),0),r.entries.push(e),o(!0)))})});s&&(o=Ws(e,r,oi,t.reportAllChanges))})})(Xs(()=>{const n=Gs("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=Ys("layout-shift",i);a&&(r=Ws(e,n,si,t.reportAllChanges),Js(()=>{i(a.takeRecords()),r(!0)}),setTimeout(r,0))}))})(e=>{Ni("cls",{metric:e}),xi=e},{reportAllChanges:!0})}function $i(){return((e,t={})=>{ri(()=>{const n=ni(),r=Gs("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=Ys("first-input",i);o=Ws(e,r,ii,t.reportAllChanges),a&&Js(Xs(()=>{i(a.takeRecords()),a.disconnect()}))})})(e=>{Ni("fid",{metric:e}),Ti=e})}function Fi(){return((e,t={})=>{ri(()=>{const n=ni(),r=Gs("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-Zs(),0),r.entries=[e],o())})},i=Ys("largest-contentful-paint",s);if(i){o=Ws(e,r,_i,t.reportAllChanges);const n=Xs(()=>{Si[r.id]||(s(i.takeRecords()),i.disconnect(),Si[r.id]=!0,o(!0))});["keydown","click"].forEach(e=>{qs.document&&addEventListener(e,()=>vi(n),{once:!0,capture:!0})}),Js(n)}})})(e=>{Ni("lcp",{metric:e}),Ii=e},{reportAllChanges:!0})}function ji(){return((e,t={})=>{const n=Gs("TTFB"),r=Ws(e,n,wi,t.reportAllChanges);ki(()=>{const e=Ks();e&&(n.value=Math.max(e.responseStart-Zs(),0),n.entries=[e],r(!0))})})(e=>{Ni("ttfb",{metric:e}),Mi=e})}function Ui(){return((e,t={})=>{"PerformanceEventTiming"in qs&&"interactionId"in PerformanceEventTiming.prototype&&ri(()=>{pi();const n=Gs("INP");let r;const o=e=>{vi(()=>{e.forEach(yi);const t=(()=>{const e=Math.min(hi.length-1,Math.floor(mi()/50));return hi[e]})();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())})},s=Ys("event",o,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=Ws(e,n,bi,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Js(()=>{o(s.takeRecords()),r(!0)}))})})(e=>{Ni("inp",{metric:e}),Oi=e})}function Bi(e,t,n,r,o=!1){let s;return Vi(e,t),Ci[e]||(s=n(),Ci[e]=!0),r&&t({metric:r}),zi(e,t,o?s:void 0)}function Vi(e,t){Ei[e]=Ei[e]||[],Ei[e].push(t)}function zi(e,t,n){return()=>{n&&n();const r=Ei[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}function Wi(e){return"number"==typeof e&&isFinite(e)}function qi(e,t,n,{...r}){const o=vr(e).start_timestamp;return o&&o>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),ho(e,()=>{const e=po({startTime:t,...r});return e&&e.end(n),e})}function Ki(e){const t=Zn();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a}=t.getOptions(),c=t.getIntegrationByName("Replay"),l=c&&c.getReplayId(),u=Wn(),d=u.getUser(),p=void 0!==d?d.email||d.id||d.ip_address:void 0;let h;try{h=u.getScopeData().contexts.profile.profile_id}catch(e){}return po({name:n,attributes:{release:i,environment:a,user:p||void 0,profile_id:h||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":qs.navigator&&qs.navigator.userAgent,...o},startTime:s,experimental:{standalone:!0}})}function Zi(){return qs&&qs.addEventListener&&qs.performance}function Gi(e){return e/1e3}let Yi,Ji,Xi,Qi,ea,ta,na=0,ra={};function oa(e,t,n,r,o=n){const s=function(e){return"secureConnection"===e?"connectEnd":"fetch"===e?"domainLookupStart":`${e}End`}(n),i=t[s],a=t[`${n}Start`];a&&i&&qi(e,r+Gi(a),r+Gi(i),{op:`browser.${o}`,name:t.name,attributes:{[er]:"auto.ui.browser.metrics"}})}function sa(e,t,n,r){const o=t[n];null!=o&&o<2147483647&&(e[r]=o)}function ia(e){Mt("dom",e),Ot("dom",aa)}function aa(){if(!qs.document)return;const e=Pt.bind(null,"dom"),t=ca(e,!0);qs.document.addEventListener("click",t,!1),qs.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=qs[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(cn(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=ca(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch(e){}return t.call(this,n,r,o)}}),cn(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(e){}return e.call(this,t,n,r)}}))})}function ca(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;ln(n,"_sentryCaptured",!0),r&&!r._sentryId&&ln(r,"_sentryId",_n());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==Qi)return!1;try{if(!e.target||e.target._sentryId!==ea)return!1}catch(e){}return!0})(n)||(e({event:n,name:o,global:t}),Qi=n.type,ea=r?r._sentryId:void 0),clearTimeout(Xi),Xi=qs.setTimeout(()=>{ea=void 0,Qi=void 0},1e3)}}function la(e){const t="history";Mt(t,e),Ot(t,ua)}function ua(){if(!function(){const e=xs.chrome;return!(e&&e.app&&e.app.runtime||!("history"in xs)||!xs.history.pushState||!xs.history.replaceState)}())return;const e=qs.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=ta,t=String(n);ta=t,Pt("history",{from:e,to:t})}return e.apply(this,t)}}qs.onpopstate=function(...t){const n=qs.location.href,r=ta;if(ta=n,Pt("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},cn(qs.history,"pushState",t),cn(qs.history,"replaceState",t)}const da={};function pa(e){const t=da[e];if(t)return t;let n=qs[e];if(bs(n))return da[e]=n.bind(qs);const r=qs.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){zs&&vt.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?da[e]=n.bind(qs):n}function ha(e){da[e]=void 0}function fa(...e){return pa("setTimeout")(...e)}const ma="__sentry_xhr_v3__";function ga(e){Mt("xhr",e),Ot("xhr",ya)}function ya(){if(!qs.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*vn(),s=Wt(n[0])?n[0].toUpperCase():void 0,i=function(e){if(Wt(e))return e;try{return e.toString()}catch(e){}}(n[1]);if(!s||!i)return e.apply(t,n);t[ma]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[ma];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}Pt("xhr",{endTimestamp:1e3*vn(),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[ma];return s&&Wt(r)&&Wt(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[ma];return r?(void 0!==n[0]&&(r.body=n[0]),Pt("xhr",{startTimestamp:1e3*vn(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}const va=[],ba=new Map,_a={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Sa(e,t=pa("fetch")){let n=0,r=0;return function(e,t,n=function(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 In(new $o("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 Mn((n,r)=>{let o=t.length;if(!o)return n(!0);const s=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Tn(e).then(()=>{--o||(clearTimeout(s),n(!0))},r)})})}}}(e.bufferSize||64)){let r={};return{send:function(o){const s=[];if(Jr(o,(t,n)=>{const o=ro(n);if(Vo(r,o)){const r=Wo(t,n);e.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(t)}),0===s.length)return Tn({});const i=Gr(o[0],s),a=t=>{Jr(i,(n,r)=>{const o=Wo(n,r);e.recordDroppedEvent(t,ro(r),o)})};return n.add(()=>t({body:Qr(i)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&ut&&vt.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=zo(r,e),e),e=>{throw a("network_error"),e})).then(e=>e,e=>{if(e instanceof $o)return ut&&vt.error("Skipped sending event because buffer is full."),a("queue_overflow"),Tn({});throw e})},flush:e=>n.drain(e)}}(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 ha("fetch"),In("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 ha("fetch"),n-=s,r--,In(e)}})}function wa(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?bt:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const ka=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ea=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ca=/\((\S*)(?::(\d+))(?::(\d+))\)/,xa=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ta=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ia=wt([30,e=>{const t=ka.exec(e);if(t){const[,e,n,r]=t;return wa(e,bt,+n,+r)}const n=Ea.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Ca.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Ma(n[1]||bt,n[2]);return wa(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=xa.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ta.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]||bt;return[n,e]=Ma(n,e),wa(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Ma=(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]:bt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Oa=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.console&&function(e){const t="console";Mt(t,e),Ot(t,ls)}(function(e){return function(t){if(Zn()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:us(t.level),message:sn(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${sn(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Yo(n,{input:t.args,level:t.level})}}(e)),t.dom&&ia(function(e,t){return function(n){if(Zn()!==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>1024&&(Rs&&vt.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=en(t,{keyAttrs:s,maxStringLength:i}),o=rn(t)}catch(e){r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),Yo(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&ga(function(e){return function(t){if(Zn()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ma];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};Yo({category:"xhr",data:{method:s,url:i,status_code:a},type:"http",level:gs(a)},l)}}(e)),t.fetch&&_s(function(e){return function(t){if(Zn()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error)Yo({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};Yo({category:"fetch",data:o,type:"http",level:gs(o.status_code)},s)}}}(e)),t.history&&la(function(e){return function(t){if(Zn()!==e)return;let n=t.from,r=t.to;const o=as(Is.location.href);let s=n?as(n):void 0;const i=as(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),Yo({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Zn()===e&&Yo({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:wn(t)},{event:t})}}(e))}}},Pa=["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"],Ra=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&cn(Is,"setTimeout",Aa),t.setInterval&&cn(Is,"setInterval",Aa),t.requestAnimationFrame&&cn(Is,"requestAnimationFrame",Da),t.XMLHttpRequest&&"XMLHttpRequest"in Is&&cn(XMLHttpRequest.prototype,"send",La);const e=t.eventTarget;e&&(Array.isArray(e)?e:Pa).forEach(Na)}}};function Aa(e){return function(...t){return t[0]=Ps(t[0],{mechanism:{data:{function:Ct(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Da(e){return function(t){return e.apply(this,[Ps(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ct(e)},handled:!1,type:"instrument"}})])}}function La(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&cn(n,e,function(t){const n={mechanism:{data:{function:e,handler:Ct(t)},handled:!1,type:"instrument"}},r=dn(t);return r&&(n.mechanism.data.handler=Ct(r)),Ps(t,n)})}),e.apply(this,t)}}function Na(e){const t=Is[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(cn(n,"addEventListener",function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=Ps(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ct(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,Ps(r,{mechanism:{data:{function:"addEventListener",handler:Ct(r),target:e},handled:!1,type:"instrument"}}),o])}}),cn(n,"removeEventListener",function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch(e){}return e.call(this,t,n,r)}}))}const Ha=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){At(t=>{const{stackParser:n,attachStacktrace:r}=Fa();if(Zn()!==e||Os())return;const{msg:o,url:s,line:i,column:a,error:c}=t,l=function(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||[],l=r,u=n,d=Wt(t)&&t.length>0?t:nn();return 0===c.length&&c.push({colno:l,filename:d,function:bt,in_app:!0,lineno:u}),e}(js(n,c||o,void 0,r,!1),s,i,a);l.level="error",To(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}(e),$a("onerror")),t.onunhandledrejection&&(function(e){Nt(t=>{const{stackParser:n,attachStacktrace:r}=Fa();if(Zn()!==e||Os())return;const o=function(e){if(Kt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(t),s=Kt(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:js(n,o,void 0,r,!0);s.level="error",To(s,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),$a("onunhandledrejection"))}}};function $a(e){Rs&&vt.log(`Global Handler attached: ${e}`)}function Fa(){const e=Zn();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const ja=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){const s=o.getOptions();rs(As,s.stackParser,s.maxValueLength,n,t,e,r)}}};function Ua(e){const t=[ts(),Qo(),Ra(),Oa(),Ha(),ja(),ds(),{name:"HttpContext",preprocessEvent(e){if(!Is.navigator&&!Is.location&&!Is.document)return;const t=e.request&&e.request.url||Is.location&&Is.location.href,{referrer:n}=Is.document||{},{userAgent:r}=Is.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}}];return!1!==e.autoSessionTracking&&t.push({name:"BrowserSession",setupOnce(){void 0!==Is.document?(Mo({ignoreDuration:!0}),Ro(),la(({from:e,to:t})=>{void 0!==e&&e!==t&&(Mo({ignoreDuration:!0}),Ro())})):Rs&&vt.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),t}function Ba(e={}){if(!Is.document)return void(Rs&&vt.error("Global document not defined in showReportDialog call"));const t=Wn(),n=t.getClient(),r=n&&n.getDsn();if(!r)return void(Rs&&vt.error("DSN not configured for showReportDialog call"));if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const t=qn().lastEventId();t&&(e.eventId=t)}const o=Is.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=function(e,t){const n=Wr(e);if(!n)return"";const r=`${Ao(n)}embed/error-page/`;let o=`dsn=${Vr(n)}`;for(const e in t)if("dsn"!==e&&"onClose"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(o+=`&name=${encodeURIComponent(e.name)}`),e.email&&(o+=`&email=${encodeURIComponent(e.email)}`)}else o+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${o}`}(r,e),e.onLoad&&(o.onload=e.onLoad);const{onClose:s}=e;if(s){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{s()}finally{Is.removeEventListener("message",e)}};Is.addEventListener("message",e)}const i=Is.document.head||Is.document.body;i?i.appendChild(o):Rs&&vt.error("Not injecting report dialog. No injection point found in HTML")}const Va=pt,za="sentryReplaySession",Wa="Unable to send Replay",qa=15e4,Ka=5e3,Za=2e7;function Ga(e,t){return null!=e?e:t()}function Ya(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 Ja;function Xa(e){const t=Ya([e,"optionalAccess",e=>e.host]);return Boolean(Ya([t,"optionalAccess",e=>e.shadowRoot])===e)}function Qa(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ec(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,tc).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function tc(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=ec(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;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} }`}(e)),n&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),n||r)return t}return t||e.cssText}!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"}(Ja||(Ja={}));class nc{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){return e?Ga(Ya([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),()=>-1):-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){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){this.idNodeMap.set(t.id,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 rc({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function oc({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function sc(e){return e.toLowerCase()}function ic(e){return e.toUpperCase()}const ac="__rrweb_original__";function cc(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?sc(t):null}function lc(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function uc(e,t){let n;try{n=new URL(e,Ga(t,()=>window.location.href))}catch(e){return null}return Ga(Ya([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),()=>null)}const dc={};function pc(e){const t=dc[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return dc[e]=r.bind(window)}function hc(...e){return pc("setTimeout")(...e)}function fc(...e){return pc("clearTimeout")(...e)}function mc(e){try{return e.contentDocument}catch(e){}}let gc=1;const yc=new RegExp("[^a-z0-9-_:]");function vc(){return gc++}let bc,_c;const Sc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,wc=/^(?:[a-z+]+:)?\/\//i,kc=/^www\..*/i,Ec=/^(data:)([^,]*),(.*)/i;function Cc(e,t){return(e||"").replace(Sc,(e,n,r,o,s,i)=>{const a=r||s||i,c=n||o||"";if(!a)return e;if(wc.test(a)||kc.test(a))return`url(${c}${a}${c})`;if(Ec.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`})}const xc=/^[^ \t\n\r\u000c]+/,Tc=/^[, \t\n\r\u000c]+/,Ic=new WeakMap;function Mc(e,t){return t&&""!==t.trim()?Oc(e,t):t}function Oc(e,t){let n=Ic.get(e);if(n||(n=e.createElement("a"),Ic.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Pc(e,t,n,r,o,s){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Mc(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(Tc),!(n>=t.length);){let s=r(xc);if(","===s.slice(-1))s=Mc(e,s.substring(0,s.length-1)),o.push(s);else{let r="";s=Mc(e,s);let i=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((s+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,o.push((s+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?Cc(r,Oc(e)):"object"===t&&"data"===n?Mc(e,r):"function"==typeof s?s(n,r,o):r:Mc(e,r):r}function Rc(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Ac(e,t,n=Infinity,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ac(e.parentNode,t,n,r+1):-1}function Dc(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch(e){return!1}}}function Lc(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=Ac(i,Dc(r,o)),c<0)return!0;a=Ac(i,Dc(t,n),c>=0?c:Infinity)}else{if(a=Ac(i,Dc(t,n)),a<0)return!1;c=Ac(i,Dc(r,o),a>=0?a:Infinity)}return a>=0?!(c>=0)||a<=c:!(c>=0||!s)}catch(e){}return!!s}function Nc(e){return null==e?"":e.toLowerCase()}function Hc(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:S=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:M=!0}=t;const O=function(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:f={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:S=!1}=t,w=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Ja.Document,childNodes:[],compatMode:e.compatMode}:{type:Ja.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ja.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m,maskTextClass:g,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:b}=t,_=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,s),S=function(e){if(e instanceof HTMLFormElement)return"form";const t=sc(e.tagName);return yc.test(t)?"div":t}(e);let w={};const k=e.attributes.length;for(let t=0;t<k;t++){const r=e.attributes[t];r.name&&!Rc(S,r.name)&&(w[r.name]=Pc(n,S,sc(r.name),r.value,e,c))}if("link"===S&&i){const t=Array.from(n.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=ec(t)),r&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=Cc(r,t.href))}if("style"===S&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=ec(e.sheet);t&&(w._cssText=Cc(t,Oc(n)))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const t=e,n=cc(t),r=lc(t,ic(S),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=Lc(t,g,v,y,b,rc({type:n,tagName:ic(S),maskInputOptions:a}));w.value=oc({isMasked:e,element:t,value:r,maskInputFn:l})}o&&(w.checked=o)}if("option"===S&&(e.selected&&!a.select?w.selected=!0:delete w.selected),"canvas"===S&&p)if("2d"===e.__context)(function(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;if(new Uint32Array((ac in o?o[ac]: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})(e)||(w.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)&&(w.rr_dataURL=t)}if("img"===S&&d){bc||(bc=n.createElement("canvas"),_c=bc.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",o=t.crossOrigin,s=()=>{t.removeEventListener("load",s);try{bc.width=t.naturalWidth,bc.height=t.naturalHeight,_c.drawImage(t,0,0),w.rr_dataURL=bc.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?w.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}if("audio"!==S&&"video"!==S||(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)),_){const{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}let E;"iframe"!==S||h(w.src)||(_||mc(e)||(w.rr_src=w.src),delete w.src);try{customElements.get(S)&&(E=!0)}catch(e){}return{type:Ja.Element,tagName:S,attributes:w,childNodes:[],isSVG:(C=e,Boolean("svg"===C.tagName||C.ownerSVGElement)||void 0),needBlock:_,rootId:m,isCustom:E};var C}(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:f,maskInputFn:g,dataURLOptions:y,inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:S,rootId:w,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let 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||Ya([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=ec(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=Cc(p,Oc(t.doc))}f&&(p="SCRIPT_PLACEHOLDER");const g=Lc(e,r,s,o,i,n);return h||f||m||!p||!g||(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),m&&p&&(c.textarea||g)&&(p=l?l(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p&&(p=oc({isMasked:Lc(e,r,s,o,i,rc({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:l})),{type:Ja.Text,textContent:p||"",isStyle:h,rootId:u}}(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:f,maskInputFn:g,rootId:w});case e.CDATA_SECTION_NODE:return{type:Ja.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:Ja.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:b,inlineImages:_,recordCanvas:S,keepIframeSrcFn:T,newlyAddedElement:I});if(!O)return console.warn(e,"not serialized"),null;let P;P=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===Ja.Comment)return!0;if(e.type===Ja.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"===uc(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Nc(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Nc(e.attributes.name)||"icon"===Nc(e.attributes.rel)||"apple-touch-icon"===Nc(e.attributes.rel)||"shortcut icon"===Nc(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Nc(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Nc(e.attributes.property).match(/^(og|twitter|fb):/)||Nc(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Nc(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Nc(e.attributes.name)||"googlebot"===Nc(e.attributes.name)||"bingbot"===Nc(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Nc(e.attributes.name)||"generator"===Nc(e.attributes.name)||"framework"===Nc(e.attributes.name)||"publisher"===Nc(e.attributes.name)||"progid"===Nc(e.attributes.name)||Nc(e.attributes.property).match(/^article:/)||Nc(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Nc(e.attributes.name)||"yandex-verification"===Nc(e.attributes.name)||"csrf-token"===Nc(e.attributes.name)||"p:domain_verify"===Nc(e.attributes.name)||"verify-v1"===Nc(e.attributes.name)||"verification"===Nc(e.attributes.name)||"shopify-checkout-api-token"===Nc(e.attributes.name)))return!0}}return!1}(O,v)&&(M||O.type!==Ja.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?vc():-2;const R=Object.assign(O,{id:P});if(r.add(e,R),-2===P)return null;w&&w(e);let A=!p;if(R.type===Ja.Element){A=A&&!R.needBlock,delete R.needBlock;const t=e.shadowRoot;t&&Qa(t)&&(R.isShadowHost=!0)}if((R.type===Ja.Document||R.type===Ja.Element)&&A){v.headWhitespace&&R.type===Ja.Element&&"head"===R.tagName&&(M=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:S,preserveWhiteSpace:M,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T};for(const n of Array.from(e.childNodes)){const e=Hc(n,t);e&&R.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Hc(n,t);r&&(Qa(e.shadowRoot)&&(r.isShadow=!0),R.childNodes.push(r))}}return e.parentNode&&Xa(e.parentNode)&&Qa(e.parentNode)&&(R.isShadow=!0),R.type===Ja.Element&&"iframe"===R.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let o,s=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=hc(()=>{s||(t(),s=!0)},n);return void e.addEventListener("load",()=>{fc(r),s=!0,t()})}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return hc(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=mc(e);if(t&&k){const n=Hc(t,{doc:t,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:S,preserveWhiteSpace:M,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T});n&&k(e,n)}},E),R.type===Ja.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===uc(R.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const s=hc(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{fc(s),o=!0,t()})}(e,()=>{if(C){const t=Hc(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:S,preserveWhiteSpace:M,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T});t&&C(e,t)}},x),R}function $c(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 Fc(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const jc="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 Uc={map:{},getId:()=>(console.error(jc),-1),getNode:()=>(console.error(jc),null),removeNodeFromMap(){console.error(jc)},has:()=>(console.error(jc),!1),reset(){console.error(jc)}};function Bc(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||!1!==n.leading||(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(function(...e){al("clearTimeout")(...e)}(r),r=null),o=i,e.apply(c,s)):r||!1===n.trailing||(r=cl(()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},a))}}function Vc(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){cl(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>Vc(e,t,s||{},!0)}function zc(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(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Uc=new Proxy(Uc,{get:(e,t,n)=>("map"===t&&console.error(jc),Reflect.get(e,t,n))}));let Wc=Date.now;function qc(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:$c([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||$c([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||$c([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:$c([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||$c([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||$c([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function Kc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Zc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Gc(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Yc(e,t,n,r,o){if(!e)return!1;const s=Gc(e);if(!s)return!1;const i=Dc(t,n);if(!o){const e=r&&s.matches(r);return i(s)&&!e}const a=Ac(s,i);let c=-1;return!(a<0)&&(r&&(c=Ac(s,Dc(null,r))),a>-1&&c<0||a<c)}function Jc(e,t){return-2===t.getId(e)}function Xc(e,t){if(Xa(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Xc(e.parentNode,t))}function Qc(e){return Boolean(e.changedTouches)}function el(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function tl(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function nl(e){return Boolean($c([e,"optionalAccess",e=>e.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Wc=()=>(new Date).getTime());class rl{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return null!=(t=this.styleIDMap.get(e))?t:-1;var t}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 ol(e){let t=null;return $c([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 sl(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=ol(n);)n=t;return n}(e);return t.contains(n)}(e))}const il={};function al(e){const t=il[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return il[e]=r.bind(window)}function cl(...e){return al("setTimeout")(...e)}var ll,ul,dl=/* @__PURE__ */(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))(dl||{}),pl=/* @__PURE__ */(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))(pl||{}),hl=/* @__PURE__ */(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))(hl||{}),fl=/* @__PURE__ */(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(fl||{});function ml(e){try{return e.contentDocument}catch(e){}}function gl(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 yl(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"}(ll||(ll={})),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"}(ul||(ul={}));class vl{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=gl([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&yl(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&&yl(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 bl=(e,t)=>`${e}@${t}`;class _l{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 vl,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||!sl(o))return;const s=Xa(o.parentNode)?this.mirror.getId(ol(o)):this.mirror.getId(o.parentNode),i=r(o);if(-1===s||-1===i)return n.addNode(o);const a=Hc(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=>{el(e,this.mirror)&&!Yc(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),tl(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),nl(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{Yc(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)wl(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)kl(this.droppedSet,e)||wl(this.removes,e,this.mirror)?kl(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let s=null;for(;n.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&-1!==this.mirror.getId(t.parentNode.host)){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(!Jc(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Yc(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:Lc(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Gc(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=cc(t),o=t.tagName;r=lc(t,o,n);const s=rc({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=oc({isMasked:Lc(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(Yc(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(ml(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"),!Rc(t.tagName,n)&&(o.attributes[n]=Pc(this.doc,sc(t.tagName),sc(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||s!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===s?r:[r,s]:o._unchangedStyles[e]=[r,s]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(Yc(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=Xa(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Yc(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Jc(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Sl(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Xc(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[bl(n,r)]?Sl(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Xa(e.target)||!Qa(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(Jc(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[bl(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Yc(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(e=>this.genAdds(e)),nl(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 Sl(e,t){e.delete(t),t.childNodes.forEach(t=>Sl(e,t))}function wl(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}(e,t,n)}function kl(e,t){return 0!==e.size&&El(e,t)}function El(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||El(e,n))}let Cl;function xl(e){Cl=e}function Tl(){Cl=void 0}const Il=e=>Cl?(...t)=>{try{return e(...t)}catch(e){if(Cl&&!0===Cl(e))return()=>{};throw e}}:e;function Ml(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 Ol=[];function Pl(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(e){}return e&&e.target}function Rl(e,t){const n=new _l;Ol.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=Ml([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);o&&window[o]&&(r=window[o]);const s=new r(Il(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 Al({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return Fc("scroll",Il(Bc(Il(i=>{const a=Pl(i);if(!a||Yc(a,r,o,s,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=qc(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}const Dl=["INPUT","TEXTAREA","SELECT"],Ll=new WeakMap;function Nl({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:f,unmaskTextSelector:m}){function g(e){let n=Pl(e);const u=e.isTrusted,g=n&&ic(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||Dl.indexOf(g)<0||Yc(n,r,o,s,!0))return;const v=n;if(v.classList.contains(i)||a&&v.matches(a))return;const b=cc(n);let _=lc(v,g,b),S=!1;const w=rc({maskInputOptions:c,tagName:g,type:b}),k=Lc(n,p,f,h,m,w);"radio"!==b&&"checkbox"!==b||(S=n.checked),_=oc({isMasked:k,element:n,value:_,maskInputFn:l}),y(n,d?{text:_,isChecked:S,userTriggered:u}:{text:_,isChecked:S});const E=n.name;"radio"===b&&E&&S&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach(e=>{if(e!==n){const t=oc({isMasked:k,element:e,value:lc(e,g,b),maskInputFn:l});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}})}function y(t,r){const o=Ll.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){Ll.set(t,r);const o=n.getId(t);Il(e)({...r,id:o})}}const v=("last"===u.input?["change"]:["input","change"]).map(e=>Fc(e,Il(g),t)),b=t.defaultView;if(!b)return()=>{v.forEach(e=>e())};const _=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value");return _&&_.set&&v.push(...[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]].map(e=>Vc(e[0],e[1],{set(){Il(g)({target:this,isTrusted:!1})}},!1,b))),Il(()=>{v.forEach(e=>e())})}function Hl(e){return function(e,t){if(Ul("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Ul("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Ul("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Ul("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 $l(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Fl({mirror:e,stylesheetManager:t},n){let r=null;r=e.getId("#document"===n.nodeName?n:n.host);const o=Ml("#document"===n.nodeName?[n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]:[n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),s=Ml([o,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(Ml([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 Ml([s,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=Ml([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(e){}return n}}),Il(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function jl(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Rl(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=Bc(Il(t=>{const n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),s),l=Il(Bc(Il(e=>{const t=Pl(e),{clientX:n,clientY:o}=Qc(e)?e.changedTouches[0]:e;i||(i=Wc()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Wc()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?pl.Drag:e instanceof MouseEvent?pl.MouseMove:pl.TouchMove)}),o,{trailing:!1})),u=[Fc("mousemove",l,n),Fc("touchmove",l,n),Fc("drag",l,n)];return Il(()=>{u.forEach(e=>e())})}(e),s=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(hl).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(i=>{let a=sc(i);const u=(t=>i=>{const a=Pl(i);if(Yc(a,r,o,s,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=fl.Mouse;break;case"touch":c=fl.Touch;break;case"pen":c=fl.Pen}c===fl.Touch&&(hl[t]===hl.MouseDown?u="TouchStart":hl[t]===hl.MouseUp&&(u="TouchEnd"))}else Qc(i)&&(c=fl.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===fl.Touch||u.startsWith("Mouse")&&c===fl.Mouse)&&(c=null)):hl[t]===hl.Click&&(c=l,l=null);const d=Qc(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:f}=d;Il(e)({type:hl[u],id:p,x:h,y:f,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(hl[i]){case hl.MouseDown:case hl.MouseUp:a=a.replace("mouse","pointer");break;case hl.TouchStart:case hl.TouchEnd:return}c.push(Fc(a,u,t))}),Il(()=>{c.forEach(e=>e())})}(e),i=Al(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=Il(Bc(Il(()=>{const t=Kc(),o=Zc();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)}),200));return Fc("resize",o,t)}(e,{win:n}),c=Nl(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=Il(i=>Bc(Il(s=>{const a=Pl(s);if(!a||Yc(a,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:o.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})}),s.media||500)),c=[Fc("play",a(0),i),Fc("pause",a(1),i),Fc("seeked",a(2),i),Fc("volumechange",a(3),i),Fc("ratechange",a(4),i)];return Il(()=>{c.forEach(e=>e())})}(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Il((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=$l(o,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),r.apply(o,s)})});const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Il((r,o,s)=>{const[i]=s,{id:a,styleId:c}=$l(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:Il((r,o,s)=>{const[i]=s,{id:a,styleId:c}=$l(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:Il((r,o,s)=>{const[i]=s,{id:a,styleId:c}=$l(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(o,s)})}));const c={};Bl("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Bl("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Bl("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Bl("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach(([r,o])=>{l[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Il((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=$l(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...Hl(o),a||0]}]}),r.apply(o,s)})}),o.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Il((r,o,s)=>{const[i]=s,{id:a,styleId:c}=$l(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...Hl(o),i]}]}),r.apply(o,s)})})}),Il(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}(e,{win:n}),d=Fl(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Il((o,i,a)=>{const[c,l,u]=a;if(n.has(c))return s.apply(i,[c,l,u]);const{id:d,styleId:p}=$l(Ml([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:Hl(i.parentRule)}),o.apply(i,a)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:Il((o,s,a)=>{const[c]=a;if(n.has(c))return i.apply(s,[c]);const{id:l,styleId:u}=$l(Ml([s,"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:Hl(s.parentRule)}),o.apply(s,a)})}),Il(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=zc(t.fonts,"add",function(t){return function(n){return cl(Il(()=>{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),Il(()=>{r.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=Il(()=>{const e=t.getSelection();if(!e||a&&Ml([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;Yc(a,r,o,s,!0)||Yc(u,r,o,s,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}i({ranges:c})});return c(),Fc("selectionchange",c)}(e),m=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?zc(n.customElements,"define",function(e){return function(n,r,o){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,r,o])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Il(()=>{Ol.forEach(e=>e.reset()),Ml([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),o(),s(),i(),a(),c(),l(),u(),d(),p(),h(),f(),m(),g.forEach(e=>e())})}function Ul(e){return void 0!==window[e]}function Bl(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Vl{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);return"number"!=typeof t?t: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 zl(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 Wl{constructor(){this.crossOriginIframeMirror=new Vl(vc),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class ql{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Vl(vc),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Vl(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}),zl([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=ml(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case dl.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:dl.IncrementalSnapshot,data:{source:pl.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case dl.Meta:case dl.Load:case dl.DomContentLoaded:return!1;case dl.Plugin:return t;case dl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case dl.IncrementalSnapshot:switch(t.data.source){case pl.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 pl.Drag:case pl.TouchMove:case pl.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case pl.ViewportResize:return!1;case pl.MediaInteraction:case pl.MouseInteraction:case pl.Scroll:case pl.CanvasMutation:case pl.Input:return this.replaceIds(t.data,e,["id"]),t;case pl.StyleSheetRule:case pl.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case pl.Font:return t;case pl.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case pl.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),zl([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])&&(t[o]=Array.isArray(t[o])?e.getIds(n,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===Ja.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Kl{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Zl{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(!Qa(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Rl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Al({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),cl(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Fl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=ml(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(zc(e.prototype,"attachShadow",function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&sl(this)&&n.addShadowRoot(this.shadowRoot,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class Gl{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Yl{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new rl,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:tc(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 Jl{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){al("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Xl,Ql;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Ts([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 eu=new nc;function tu(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,maxCanvasSize:S=null,packFn:w,sampling:k={},dataURLOptions:E={},mousemoveWait:C,recordDOM:x=!0,recordCanvas:T=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:P=!1,inlineImages:R=!1,plugins:A,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:L=new Set([]),errorHandler:N,onMutation:H,getCanvasManager:$}=e;xl(N);const F=!I||window.parent===window;let j=!1;if(!F)try{window.parent.document&&(j=!1)}catch(e){j=!0}if(F&&!t)throw new Error("emit function is required");if(!F&&!j)return()=>{};void 0!==C&&void 0===k.mousemove&&(k.mousemove=C),eu.reset();const U=!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!==g?g:{},B=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let V;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let z=0;const W=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!j&&(e=w(e)),e};Xl=(e,o)=>{const s=e;if(s.timestamp=Wc(),!Ts([Ol,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])||s.type===dl.FullSnapshot||s.type===dl.IncrementalSnapshot&&s.data.source===pl.Mutation||Ol.forEach(e=>e.unfreeze()),F)Ts([t,"optionalCall",e=>e(W(s),o)]);else if(j){const e={type:"rrweb",event:W(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===dl.FullSnapshot)V=s,z=0;else if(s.type===dl.IncrementalSnapshot){if(s.data.source===pl.Mutation&&s.data.isAttachIframe)return;z++,(r&&z>=r||n&&V&&s.timestamp-V.timestamp>n)&&ee(!0)}};const q=e=>{Xl({type:dl.IncrementalSnapshot,data:{source:pl.Mutation,...e}})},K=e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.Scroll,...e}}),Z=e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.CanvasMutation,...e}}),G=new Yl({mutationCb:q,adoptedStyleSheetCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Wl:new ql({mirror:eu,mutationCb:q,stylesheetManager:G,recordCrossOriginIframes:I,wrappedEmit:Xl});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:eu,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const J=new Jl,X=function(e,t){try{return e?e(t):new Gl}catch(e){return console.warn("Unable to initialize CanvasManager"),new Gl}}($,{mirror:eu,win:window,mutationCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.CanvasMutation,...e}}),recordCanvas:T,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:k.canvas,dataURLOptions:E,errorHandler:N}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Kl:new Zl({mutationCb:q,scrollCb:K,bypassOptions:{onMutation:H,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskInputOptions:U,dataURLOptions:E,maskAttributeFn:v,maskTextFn:_,maskInputFn:b,recordCanvas:T,inlineImages:R,sampling:k,slimDOMOptions:B,iframeManager:Y,stylesheetManager:G,canvasManager:X,keepIframeSrcFn:D,processedNodeManager:J},mirror:eu}),ee=(e=!1)=>{if(!x)return;Xl({type:dl.Meta,data:{href:window.location.href,width:Zc(),height:Kc()}},e),G.reset(),Q.init(),Ol.forEach(e=>e.lock());const t=function(e,t){const{mirror:n=new nc,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1}=t||{};return Hc(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:b,inlineImages:p,recordCanvas:h,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1})}(document,{mirror:eu,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:f,maskAllInputs:U,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,slimDOM:B,dataURLOptions:E,recordCanvas:T,inlineImages:R,onSerialize:e=>{el(e,eu)&&Y.addIframe(e),tl(e,eu)&&G.trackLinkElement(e),nl(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),e.contentWindow&&X.addWindow(e.contentWindow),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{G.attachLinkElement(e,t)},keepIframeSrcFn:D});if(!t)return console.warn("Failed to snapshot the document");Xl({type:dl.FullSnapshot,data:{node:t,initialOffset:qc(window)}}),Ol.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,eu.getId(document))};Ql=ee;try{const e=[],t=e=>Il(jl)({onMutation:H,mutationCb:q,mousemoveCb:(e,t)=>Xl({type:dl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.MouseInteraction,...e}}),scrollCb:K,viewportResizeCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.ViewportResize,...e}}),inputCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.Input,...e}}),mediaInteractionCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.MediaInteraction,...e}}),styleSheetRuleCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.StyleSheetRule,...e}}),styleDeclarationCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.StyleDeclaration,...e}}),canvasMutationCb:Z,fontCb:e=>Xl({type:dl.IncrementalSnapshot,data:{source:pl.Font,...e}}),selectionCb:e=>{Xl({type:dl.IncrementalSnapshot,data:{source:pl.Selection,...e}})},customElementCb:e=>{Xl({type:dl.IncrementalSnapshot,data:{source:pl.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:U,inlineStylesheet:f,sampling:k,recordDOM:x,recordCanvas:T,inlineImages:R,userTriggeredOnInput:O,collectFonts:P,doc:e,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,keepIframeSrcFn:D,blockSelector:s,unblockSelector:i,slimDOMOptions:B,dataURLOptions:E,mirror:eu,iframeManager:Y,stylesheetManager:G,shadowDomManager:Q,processedNodeManager:J,canvasManager:X,ignoreCSSAttributes:L,plugins:Ts([A,"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=>Xl({type:dl.Plugin,data:{plugin:e.name,payload:t}})}))])||[]},{});Y.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Fc("DOMContentLoaded",()=>{Xl({type:dl.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&n()})),e.push(Fc("load",()=>{Xl({type:dl.Load,data:{}}),"load"===M&&n()},window))),()=>{e.forEach(e=>e()),J.destroy(),Ql=void 0,Tl()}}catch(e){console.warn(e)}}function nu(e){return e>9999999999?e:1e3*e}function ru(e){return e>9999999999?e/1e3:e}function ou(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:dl.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:qr(t,10,1e3)}}),"console"===t.category)))}function su(e){return e.closest("button,a")||e}function iu(e){const t=au(e);return t&&t instanceof Element?su(t):t}function au(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let cu;tu.mirror=eu,tu.takeFullSnapshot=function(e){if(!Ql)throw new Error("please take full snapshot after start recording");Ql(e)};const lu=new Set([pl.Mutation,pl.StyleSheetRule,pl.StyleDeclaration,pl.AdoptedStyleSheet,pl.CanvasMutation,pl.Selection,pl.MediaInteraction]);class uu{constructor(e,t,n=ou){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=(t=()=>{this._lastMutation=pu()},cu||(cu=[],cn(Va,"open",function(e){return function(...t){if(cu)try{cu.forEach(e=>e())}catch(e){}return e.apply(Va,t)}})),cu.push(t),()=>{const e=cu?cu.indexOf(t):-1;e>-1&&cu.splice(e,1)});var t;this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){return!du.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||!("A"!==e.tagName||!(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))||!(!t||!e.matches(t))}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:ru(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=ru(e)}registerScroll(e=Date.now()){this._lastScroll=ru(e)}registerClick(e){const t=su(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=pu();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||e.mutationAfter&&e.mutationAfter<=this._threshold),{clickCount:r,clickBreadcrumb:o}=e;if(n){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),s=n<1e3*this._timeout?"mutation":"timeout",i={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:Va.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:s,clickCount:r||1}};this._addBreadcrumbEvent(t,i)}else if(r>1){const e={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:Va.location.href,route:t.getCurrentRoute(),clickCount:r,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=fa(()=>this._checkClicks(),1e3)}}const du=["A","BUTTON","INPUT"];function pu(){return Date.now()/1e3}function hu(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var fu;!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"}(fu||(fu={}));const mu=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function gu(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(mu.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}function yu(e,t){const n=tu.mirror.getId(e),r=n&&tu.mirror.getNode(n),o=r&&tu.mirror.getMeta(r),s=o&&function(e){return e.type===fu.Element}(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>e.type===fu.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:gu(s.attributes)}}:{}}}const vu={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Su(s),end:Su(o),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Su(o);return{type:n,name:r,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:m}=e;return 0===o?null:{type:`${t}.${m}`,start:Su(h),end:Su(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}}};function bu(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function _u(e){const t=vu[e.entryType];return t?t(e):null}function Su(e){return((bn||Va.performance.timeOrigin)+e)/1e3}function wu(e){const t=e.entries[e.entries.length-1];return Tu(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function ku(e){return void 0!==e.sources}function Eu(e){const t=[],n=[];for(const r of e.entries)if(ku(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=tu.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return Tu(e,"cumulative-layout-shift",n,t)}function Cu(e){const t=e.entries[e.entries.length-1];return Tu(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function xu(e){const t=e.entries[e.entries.length-1];return Tu(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function Tu(e,t,n,r){const o=e.value,s=e.rating,i=Su(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(e=>tu.mirror.getId(e)):void 0,attributions:r}}}const Iu="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Mu=["info","warn","error","log"],Ou="[Replay] ";function Pu(e,t="info"){Yo({category:"console",data:{logger:"replay"},level:t,message:`${Ou}${e}`},{level:t})}const Ru=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return Iu?(Mu.forEach(e=>{n[e]=(...n)=>{vt[e](Ou,...n),t&&Pu(n.join(""),us(e))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),vt.error(Ou,r),e?xo(r):t&&Pu(r,"error")},n.infoTick=(...e)=>{vt.info(Ou,...e),t&&setTimeout(()=>Pu(e[0]),0)}):Mu.forEach(e=>{n[e]=()=>{}}),n}();class Au extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class Du{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>Za)throw new Au;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?nu(e):null}}class Lu{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(){Iu&&Ru.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 Iu&&Ru.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 Nu{constructor(e){this._worker=new Lu(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=nu(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Za?Promise.reject(new Au):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{Iu&&Ru.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 Hu{constructor(e){this._fallback=new Du,this._compression=new Nu(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(Iu&&Ru.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){Iu&&Ru.exception(e,"Failed to add events when switching buffers.")}}}function $u(){try{return"sessionStorage"in Va&&!!Va.sessionStorage}catch(e){return!1}}function Fu(e){return void 0!==e&&Math.random()<e}function ju(e){const t=Date.now();return{id:e.id||_n(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function Uu(e){if($u())try{Va.sessionStorage.setItem(za,JSON.stringify(e))}catch(e){}}function Bu({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=function(e,t){return Fu(e)?"session":!!t&&"buffer"}(e,t),s=ju({sampled:o,previousSessionId:r});return n&&Uu(s),s}function Vu(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function zu(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Vu(e.started,t,r)||Vu(e.lastActivity,n,r)}function Wu(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!zu(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function qu({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&function(){if(!$u())return null;try{const e=Va.sessionStorage.getItem(za);if(!e)return null;const t=JSON.parse(e);return Iu&&Ru.infoTick("Loading existing session"),ju(t)}catch(e){return null}}();return o?Wu(o,{sessionIdleExpire:e,maxReplayDuration:t})?(Iu&&Ru.infoTick("Session in sessionStorage is expired, creating new one..."),Bu(r,{previousSessionId:o.id})):o:(Iu&&Ru.infoTick("Creating new session"),Bu(r,{previousSessionId:n}))}function Ku(e,t,n){return!!Gu(e,t)&&(Zu(e,t,n),!0)}async function Zu(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=function(e,t){try{if("function"==typeof t&&function(e){return e.type===dl.Custom}(e))return t(e)}catch(e){return Iu&&Ru.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!s)return;return await r.addEvent(s)}catch(t){const n=t&&t instanceof Au,s=n?"addEventSizeExceeded":"addEvent";if(n&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:s});const i=Zn();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function Gu(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=nu(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now()||n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration&&(Iu&&Ru.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),1))}function Yu(e){return!e.type}function Ju(e){return"transaction"===e.type}function Xu(e){return"feedback"===e.type}function Qu(e){return!!e.category}function ed(){const e=Wn().getPropagationContext().dsc;e&&delete e.replay_id;const t=xr();t&&delete jr(t).replay_id}function td(e,t){return t.map(({type:t,start:n,end:r,name:o,data:s})=>{const i=e.throttledAddEvent({type:dl.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 nd(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!Iu||!e.getOptions()._experiments.traceInternals)&&function(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,n)||function(e,t){return!!t&&qo(e)===qo(t)}(e,r)}(t,Zn())}(e,t.name)||e.addUpdate(()=>(td(e,[t]),!0)))}function rd(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=dd(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function od(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function sd(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[dd(e)];if(!e)return[void 0]}catch(t){return Iu&&Ru.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Iu&&Ru.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function id(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function ad(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:mn({method:s,statusCode:i,request:a,response:c})}}function cd(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function ld(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>qa,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,qa);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(e){}return{body:e}}(n);return r.body=o,s&&s.length>0&&(r._meta={warnings:s}),r}function ud(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 dd(e){return new URLSearchParams(e).toString()}function pd(e,t){const n=function(e,t=Va.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Va.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(e);return an(n,t)}function hd(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function fd(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function md(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?fd(n,t):Array.isArray(n)?{}:ud(n,t):{}}function gd(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 yd(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(Iu&&Ru.warn("Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&function(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(lu.has(n)&&e.registerMutation(t.timestamp),n===pl.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===pl.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=tu.mirror.getNode(r);o instanceof HTMLElement&&n===hl.Click&&e.registerClick(o)}}catch(e){}}(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Ku(e,n,o))return!0;if(!o)return!1;const t=e.session;if(function(e,t){t&&e.session&&0===e.session.segmentId&&Ku(e,function(e){const t=e.getOptions();return{type:dl.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(Iu&&Ru.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&Uu(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}}class vd extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class bd extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function _d(e,t={count:0,interval:5e3}){const{recordingData:n,onError:r}=e;if(n.length)try{return await async function({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=Zn(),p=Wn(),h=d&&d.getTransport(),f=d&&d.getDsn();if(!(d&&h&&f&&s.sampled))return Tn({});const m={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:o/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},g=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const s=await Eo(e.getOptions(),r,o,t,e,qn());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}({scope:p,client:d,replayId:t,event:m});if(!g)return d.recordDroppedEvent("event_processor","replay",m),Iu&&Ru.info("An event processor returned `null`, will not send event."),Tn({});delete g.sdkProcessingMetadata;const y=function(e,t,n,r){return Gr(so(e,oo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,i,f,d.getOptions().tunnel);let v;try{v=await h.send(y)}catch(e){const t=new Error(Wa);try{t.cause=e}catch(e){}throw t}if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new vd(v.statusCode);const b=zo({},v);if(Vo(b,"replay"))throw new bd(b);return v}(e),!0}catch(n){if(n instanceof vd||n instanceof bd)throw n;if(Io("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${Wa} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise((n,r)=>{fa(async()=>{try{await _d(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}const Sd="__THROTTLED";class wd{constructor({options:e,recordingOptions:t}){wd.prototype.__init.call(this),wd.prototype.__init2.call(this),wd.prototype.__init3.call(this),wd.prototype.__init4.call(this),wd.prototype.__init5.call(this),wd.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,o,s;const i=n&&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 l(){return o&&clearTimeout(o),o=fa(a,t),i&&void 0===s&&(s=fa(a,i)),r}return l.cancel=c,l.flush=function(){return void 0!==o||void 0!==s?a():r},l}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e){const t=new Map;let n=!1;return(...r)=>{const o=Math.floor(Date.now()/1e3);if((e=>{const n=e-5;t.forEach((e,r)=>{r<n&&t.delete(r)})})(o),[...t.values()].reduce((e,t)=>e+t,0)>=300){const e=n;return n=!0,e?"__SKIPPED":Sd}n=!1;const s=t.get(o)||0;return t.set(o,s+1),e(...r)}}((e,t)=>function(e,t,n){return Gu(e,t)?Zu(e,t,n):Promise.resolve(null)}(this,e,t));const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new uu(this,o)),Iu){const t=e._experiments;Ru.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){Iu&&Ru.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",Iu&&Ru.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):Iu&&Ru.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(Iu&&Ru.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(Iu&&Ru.info("Buffering is in progress, call `flush()` to save the replay"));Iu&&Ru.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=qu({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(Iu&&Ru.info("Buffering is in progress, call `flush()` to save the replay"));Iu&&Ru.infoTick("Starting replay in buffer mode");const e=qu({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=tu({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:yd(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{Iu&&Ru.info("Stopping Replay"+(t?` triggered by ${t}`:"")),ed(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if($u())try{Va.sessionStorage.removeItem(za)}catch(e){}}(),this.session=void 0}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Iu&&Ru.info("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Iu&&Ru.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();Iu&&Ru.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&&Vu(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Va.location.origin}${Va.location.pathname}${Va.location.hash}${Va.location.search}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=e,this._context.initialTimestamp=Date.now(),this._context.urls.push(e)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===Sd){const e=hu({category:"replay.throttled"});this.addUpdate(()=>!Ku(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||xr(),t=e&&Cr(e),n=(t&&vr(t).data||{})[Jn];if(t&&n&&["route","custom"].includes(n))return vr(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),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});']);return URL.createObjectURL(e)}());if(!t)return;Iu&&Ru.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Hu(n)}catch(e){Iu&&Ru.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return Iu&&Ru.info("Using simple buffer"),new Du}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=qu({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0});this.session=t}_checkSession(){if(!this.session)return!1;const e=this.session;return!Wu(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{Va.document.addEventListener("visibilitychange",this._handleVisibilityChange),Va.addEventListener("blur",this._handleWindowBlur),Va.addEventListener("focus",this._handleWindowFocus),Va.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){const t=Zn();ia((e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?iu(e.event):au(e.event),n=en(r,{maxStringLength:200})||"<unknown>"}catch(e){n="<unknown>"}return{target:r,message:n}}(e);return hu({category:`ui.${e.name}`,...yu(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;var s,i,a;!(r&&e.clickDetector&&o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(s=e.clickDetector,i=n,a=iu(t.event),s.handleClick(i,a)),ou(e,n)})(e)),la(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(td(e,[n]),!1)))}}(e)),function(e){const t=Zn();t&&t.on("beforeAddBreadcrumb",t=>function(e,t){if(!e.isEnabled()||!Qu(t))return;const n=function(e){return!Qu(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return hu(e);let n=!1;const r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>Ka?(n=!0,`${e.slice(0,Ka)}…`):e;if("object"==typeof e)try{const t=qr(e,7);return JSON.stringify(t).length>Ka?(n=!0,`${JSON.stringify(t,null,2).slice(0,Ka)}…`):t}catch(e){}return e});return hu({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):hu(e)}(t);n&&ou(e,n)}(e,t))}(e),function(e){const t=Zn();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(e,t)=>function(e,t,n){if(t.data)try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(function(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=rd(r),s=n.getResponseHeader("content-length")?od(n.getResponseHeader("content-length")):function(e,t){try{return rd("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch(e){return}}(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!pd(c,n.networkDetailAllowUrls)||pd(c,n.networkDetailDenyUrls))return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:cd(d),response:cd(p)};const h=a[ma],f=h?ud(h.request_headers,n.networkRequestHeaders):{},m=ud(function(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{}}(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?sd(i):[void 0],[v,b]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Iu&&Ru.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Iu&&Ru.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return Iu&&Ru.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],_=ld(f,d,g),S=ld(m,p,v);return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:y?id(_,y):_,response:b?id(S,b):S}}(e,t,n),o=ad("resource.xhr",r);nd(n.replay,o)}catch(e){Iu&&Ru.exception(e,"Failed to capture xhr breadcrumb")}}(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(function(e,t){const{input:n,response:r}=t,o=rd(n?hd(n):void 0),s=r?od(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=pd(i,n.networkDetailAllowUrls)&&!pd(i,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?(i=t,1===(s=n).length&&"string"!=typeof s[0]?md(s[0],i):2===s.length?md(s[1],i):{}):{};var s,i;if(!e)return ld(o,r,void 0);const a=hd(n),[c,l]=sd(a),u=ld(o,r,c);return l?id(u,l):u}(n,t.input,l):cd(l),h=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return cd(o);const s=r?fd(r.headers,n):{};if(!r||!t&&void 0!==o)return ld(s,o,void 0);const[i,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){Iu&&Ru.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const r=fa(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return await e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(Iu&&Ru.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Iu&&Ru.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(r),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e&&e.length&&void 0===n?rd(e):n;return r?ld(o,s,t?e:void 0):cd(s)}catch(e){return Iu&&Ru.exception(e,"Failed to serialize response body"),ld(o,n,void 0)}}(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?id(c,a):c}(d,n,t.response,u);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:h}}(e,t,n),o=ad("resource.fetch",r);nd(n.replay,o)}catch(e){Iu&&Ru.exception(e,"Failed to capture fetch breadcrumb")}}(t,n,e))}catch(e){Iu&&Ru.exception(e,"Error when enriching network breadcrumb")}}(a,e,t))}catch(e){}}(e);const n=function(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!Yu(t)&&!Ju(t)&&!Xu(t))return t;if(!e.checkAndHandleExpiredSession())return ed(),t;if(Xu(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:dl.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t),t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length||!t.originalException||!t.originalException.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return Iu&&Ru.log("Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==Wa&&!(!t.exception||t.type)&&Fu(e.getOptions().errorSampleRate)}(e,t);return(r||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t},{id:"Replay"})}(e);var r;r=n,qn().addEventProcessor(r),t&&(t.on("beforeSendEvent",function(e){return t=>{e.isEnabled()&&Yu(t)&&function(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;"string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&ou(e,hu({category:"replay.hydrate-error",data:{url:nn()}}))}(e,t)}}(e)),t.on("afterSendEvent",function(e){return(t,n)=>{if(!e.isEnabled()||!Yu(t)&&!Ju(t))return;const r=n&&n.statusCode;!r||r<200||r>=300||(Ju(t)?function(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)}(e,t):function(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&fa(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t))}}(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)}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(e=>{r.push(Li(e,n))}),r.push(Ri(bu(wu,e)),Pi(bu(Eu,e)),Ai(bu(Cu,e)),Di(bu(xu,e))),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{Va.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Va.removeEventListener("blur",this._handleWindowBlur),Va.removeEventListener("focus",this._handleWindowFocus),Va.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Va.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=hu({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=hu({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(i)||!s)return null;if(!(t||r||o)&&1===s.length)return null;const a=en(i,{maxStringLength:200})||"<unknown>";return hu({category:"ui.keyDown",message:a,data:{...yu(i,a).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}(t);n&&ou(e,n)}(this,e)}}_doChangeToBackgroundTasks(e){this.session&&(zu(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):Iu&&Ru.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:dl.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(_u).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(td(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&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 async function(e){try{return Promise.all(td(e,[gd(Va.performance.memory)]))}catch(e){return[]}}(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 _d({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=Zn();t&&t.recordDroppedEvent(e instanceof bd?"ratelimit_backoff":"send_error","replay")}}else Iu&&Ru.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(Iu&&Ru.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;if(r||n>this._options.maxReplayDuration+5e3)return Iu&&Ru.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&&Iu&&Ru.info("Flushing initial segment without checkout.");const s=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,s&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Uu(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=hu({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function kd(e,t){return[...e,...t].join(",")}const Ed='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Cd=["content-length","content-type","accept"];let xd=!1;class Td{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:s=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:_=[],maskAttributes:S=["title","placeholder"],unmask:w=[],block:k=[],unblock:E=[],ignore:C=[],maskFn:x,beforeAddRecordingEvent:T,beforeErrorSampling:I,onError:M}={}){this.name=Td.id;const O=function({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:kd(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:kd(t,[]),blockSelector:kd(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:kd(r,[]),ignoreSelector:kd(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:_,unmask:w,block:k,unblock:E,ignore:C});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s:s}({maskAttributes:S,maskAllText:c,privacyOptions:O,key:e,value:t,el:n}),...O,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,36e5),stickySession:o,useCompression:s,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:f,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:Id(v),networkResponseHeaders:Id(b),beforeAddRecordingEvent:T,beforeErrorSampling:I,onError:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ed}`:Ed),this._isInitialized&&Cs())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return xd}set _isInitialized(e){xd=e}afterAllSetup(e){Cs()&&!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=function(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...mn(e)},o=Ur(n.replaysSessionSampleRate),s=Ur(n.replaysOnErrorSampleRate);return null==o&&null==s&&yt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),null!=o&&(r.sessionSampleRate=o),null!=s&&(r.errorSampleRate=s),r}(this._initialOptions,e);this._replay=new wd({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(e){}}}function Id(e){return[...Cd,...e.map(e=>e.toLowerCase())]}Td.__initStatic();const Md=new WeakMap,Od=new Map,Pd={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Rd(e){const{url:t}=vr(e).data||{};if(!t||"string"!=typeof t)return;const n=Li("resource",({entries:r})=>{r.forEach(r=>{(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)})(r)&&r.name.endsWith(t)&&(function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),bn?[...r,["http.request.redirect_start",Ad(e.redirectStart)],["http.request.fetch_start",Ad(e.fetchStart)],["http.request.domain_lookup_start",Ad(e.domainLookupStart)],["http.request.domain_lookup_end",Ad(e.domainLookupEnd)],["http.request.connect_start",Ad(e.connectStart)],["http.request.secure_connection_start",Ad(e.secureConnectionStart)],["http.request.connection_end",Ad(e.connectEnd)],["http.request.request_start",Ad(e.requestStart)],["http.request.response_start",Ad(e.responseStart)],["http.request.response_end",Ad(e.responseEnd)]]:r}(r).forEach(t=>e.setAttribute(...t)),setTimeout(n))})})}function Ad(e=0){return((bn||performance.timeOrigin)+e)/1e3}function Dd(e){try{return new URL(e,Is.location.origin).href}catch(e){return}}const Ld={...go,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Pd};function Nd(e,t,n){e.emit("startPageLoadSpan",t,n),Wn().setTransactionName(t.name);const r=xr();return"pageload"===(r&&vr(r).op)?r:void 0}function Hd(e,t){qn().setPropagationContext({traceId:Pn()}),Wn().setPropagationContext({traceId:Pn()}),e.emit("startNavigationSpan",t),Wn().setTransactionName(t.name);const n=xr();return"navigation"===(n&&vr(n).op)?n:void 0}function $d(e){const t=Qt.document&&Qt.document.querySelector?Qt.document.querySelector(`meta[name=${e}]`):null;return t?t.getAttribute("content"):void 0}var Fd={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},jd={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ud={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Bd={};function Vd(e){return K.default.isMemo(e)?Ud:Bd[e.$$typeof]||Fd}Bd[K.default.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Bd[K.default.Memo]=Ud;var zd=Object.defineProperty,Wd=Object.getOwnPropertyNames,qd=Object.getOwnPropertySymbols,Kd=Object.getOwnPropertyDescriptor,Zd=Object.getPrototypeOf,Gd=Object.prototype,Yd=function e(t,n,r){if("string"!=typeof n){if(Gd){var o=Zd(n);o&&o!==Gd&&e(t,o,r)}var s=Wd(n);qd&&(s=s.concat(qd(n)));for(var i=Vd(t),a=Vd(n),c=0;c<s.length;++c){var l=s[c];if(!(jd[l]||r&&r[l]||a&&a[l]||i&&i[l])){var u=Kd(n,l);try{zd(t,l,u)}catch(e){}}}}return t};class Jd extends F.Component{static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(e){super(e);const{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=po({name:`<${t}>`,onlyIfParent:!0,op:"ui.react.mount",attributes:{[er]:"auto.ui.react.profiler","ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){const t=Object.keys(e).filter(t=>e[t]!==this.props.updateProps[t]);if(t.length>0){const e=vn();this._updateSpan=ho(this._mountSpan,()=>po({name:`<${this.props.name}>`,onlyIfParent:!0,op:"ui.react.update",startTime:e,attributes:{[er]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":t}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const e=vn(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){const n=vr(this._mountSpan).timestamp;ho(this._mountSpan,()=>{const r=po({onlyIfParent:!0,name:`<${t}>`,op:"ui.react.render",startTime:n,attributes:{[er]:"auto.ui.react.profiler","ui.component_name":t}});r&&r.end(e)})}}render(){return this.props.children}}Jd.__initStatic();const Xd="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Qd={componentStack:null,error:null,eventId:null};class ep extends F.Component{constructor(e){super(e),ep.prototype.__init.call(this),this.state=Qd,this._openFallbackReportDialog=!0;const t=Zn();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on("afterSendEvent",t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&Ba({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,o=null==r?void 0:r,{beforeCapture:s,onError:i,showDialog:a,dialogOptions:c}=this.props;Kn(l=>{s&&s(l,t,o);const u=function(t,{componentStack:n},r){if(function(){const t=e.version.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}()&&Ut(t)&&n){const e=new Error(t.message);e.name=`React ErrorBoundary ${t.name}`,e.stack=n,function(e,t){const n=new WeakSet;!function e(t,r){if(!n.has(t))return t.cause?(n.add(t),e(t.cause,r)):void(t.cause=r)}(e,t)}(t,e)}return xo(t,{...r,captureContext:{contexts:{react:{componentStack:n}}}})}(t,n,{mechanism:{handled:!!this.props.fallback}});i&&i(t,o,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&Ba({...c,eventId:u})),this.setState({error:t,componentStack:r,eventId:u})})}componentDidMount(){const{onMount:e}=this.props;e&&e()}componentWillUnmount(){const{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&r(e,t,n),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(Qd)}}render(){const{fallback:e,children:t}=this.props,n=this.state;if(n.error){let t;return t="function"==typeof e?F.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):e,F.isValidElement(t)?t:(e&&Xd&&vt.warn("fallback did not produce a valid ReactElement"),null)}return"function"==typeof t?t():t}}let tp,np,rp,op,sp,ip=!1;const ap=new WeakSet;function cp(e,t){if(!t||"/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?e:e.slice(n)||"/"}function lp(e,t,n){const r=e||ip?cp(t,n):t;return["/"===r[r.length-1]||"/*"===r.slice(-2)?r.slice(0,-1):r,"route"]}function up(e){return e.endsWith("*")}function dp(e,t){return up(e)&&t.route.children&&t.route.children.length>0||!1}function pp(e,t){const n=sp(t,e);if(n)for(const e of n)if(!(r=e.route).children&&r.element&&r.path&&r.path.endsWith("/*")&&mp(e))return!0;var r;return!1}function hp(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(e=>{hp(e,t).forEach(e=>t.add(e))})),t}function fp(e){return function(e){return"*"===e[e.length-1]?e.slice(0,-1):e}(e.route.path||"")}function mp(e){return e.params["*"]||""}function gp(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function yp(e){return"/"===e[0]?e:`/${e}`}function vp(e,t){const n=sp(e,t);if(!n||0===n.length)return"";for(const r of n)if(r.route.path&&"*"!==r.route.path){const n=fp(r),o=cp(t.pathname,yp(r.pathnameBase));return gp(gp(n||"")+yp(vp(e.filter(e=>e!==r.route),{pathname:o})))}return""}function bp(e,t,n,r=""){if(!e||0===e.length)return[ip?cp(t.pathname,r):t.pathname,"url"];let o="";if(n)for(const e of n){const n=e.route;if(n){if(n.index)return lp(o,e.pathname,r);const s=n.path;if(s&&!dp(s,e)){const n="/"===s[0]||"/"===o[o.length-1]?s:`/${s}`;if(o=gp(o)+yp(n),gp(t.pathname)===gp(r+e.pathname))return cs(o)===cs(e.pathname)||up(o)?(dp(o,e)&&(o=o.slice(0,-1)),[(ip?"":r)+o,"route"]):[(ip?"":r)+n,"route"]}}}return[ip?cp(t.pathname,r):t.pathname||"/","url"]}function _p(){return _p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_p.apply(null,arguments)}var Sp,wp=(Sp=/*#__PURE__*/Object.defineProperty({default:function(e){console.warn("[react-gtm]",e)}},"__esModule",{value:!0}))&&Sp.__esModule?Sp:{default:Sp},kp=function(e){return e&&e.__esModule?e:{default:e}}({tags:function(e){var t=e.id,n=e.events,r=e.dataLayer,o=e.dataLayerName,s="&gtm_auth="+e.auth,i="&gtm_preview="+e.preview;return t||(0,wp.default)("GTM Id is required"),{iframe:'\n <iframe src="https://www.googletagmanager.com/ns.html?id='+t+s+i+'&gtm_cookies_win=x"\n height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>',script:"\n (function(w,d,s,l,i){w[l]=w[l]||[];\n w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', "+JSON.stringify(n).slice(1,-1)+"});\n var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';\n j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'"+s+i+"&gtm_cookies_win=x';\n f.parentNode.insertBefore(j,f);\n })(window,document,'script','"+o+"','"+t+"');",dataLayerVar:this.dataLayer(r,o)}},dataLayer:function(e,t){return"\n window."+t+" = window."+t+" || [];\n window."+t+".push("+JSON.stringify(e)+")"}}),Ep=function(e){return e&&e.__esModule?e:{default:e}}({dataScript:function(e){var t=document.createElement("script");return t.innerHTML=e,t},gtm:function(e){var t=kp.default.tags(e);return{noScript:function(){var e=document.createElement("noscript");return e.innerHTML=t.iframe,e},script:function(){var e=document.createElement("script");return e.innerHTML=t.script,e},dataScript:this.dataScript(t.dataLayerVar)}},initialize:function(e){var t=e.events,n=e.dataLayer,r=e.dataLayerName,o=e.auth,s=e.preview,i=this.gtm({id:e.gtmId,events:void 0===t?{}:t,dataLayer:n||void 0,dataLayerName:void 0===r?"dataLayer":r,auth:void 0===o?"":o,preview:void 0===s?"":s});n&&document.head.appendChild(i.dataScript),document.head.insertBefore(i.script(),document.head.childNodes[0]),document.body.insertBefore(i.noScript(),document.body.childNodes[0])},dataLayer:function(e){var t=e.dataLayer,n=e.dataLayerName,r=void 0===n?"dataLayer":n;if(window[r])return window[r].push(t);var o=kp.default.dataLayer(t,r),s=this.dataScript(o);document.head.insertBefore(s,document.head.childNodes[0])}}),Cp=Ep.default;const{slice:xp,forEach:Tp}=[],Ip=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Mp={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Ip.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!Ip.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r}(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let e=0;e<n.length;e++){let r=n[e];for(;" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},remove(e){this.create(e,"",-1)}};var Op={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Mp.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:s}=t;n&&"undefined"!=typeof document&&Mp.create(n,e,r,o,s)}},Pp={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const r=e.substring(1).split("&");for(let e=0;e<r.length;e++){const o=r[e].indexOf("=");o>0&&r[e].substring(0,o)===n&&(t=r[e].substring(o+1))}}return t}};let Rp=null;const Ap=()=>{if(null!==Rp)return Rp;try{Rp="undefined"!==window&&null!==window.localStorage;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Rp=!1}return Rp};var Dp={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Ap())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Ap()&&window.localStorage.setItem(n,e)}};let Lp=null;const Np=()=>{if(null!==Lp)return Lp;try{Lp="undefined"!==window&&null!==window.sessionStorage;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Lp=!1}return Lp};var Hp={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Np())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Np()&&window.sessionStorage.setItem(n,e)}},$p={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Fp={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},jp={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const r="number"==typeof t?t:0;return n[r]?.replace("/","")}},Up={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,r="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Bp=!1;try{document,Bp=!0}catch(He){}const Vp=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Bp||Vp.splice(1,1);class zp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(e){return Tp.call(xp.call(arguments,1),t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])}),e}(e,this.options||{},{order:Vp,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=t,this.addDetector(Op),this.addDetector(Pp),this.addDetector(Dp),this.addDetector(Hp),this.addDetector($p),this.addDetector(Fp),this.addDetector(jp),this.addDetector(Up)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach(t=>{if(this.detectors[t]){let n=this.detectors[t].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(e=e.concat(n))}}),e=e.map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?e:e.length>0?e[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}function Wp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}zp.type="languageDetector",z.default.use(zp).use(t.initReactI18next).init({resources:{en:{translation:{release:"Release",forbiddenErrorMessage:"You are not authorized to perform this operation",somethingWentWrongMessage:"Oops... something went wrong",changeLanguageText:"Change language to Polish",headerLoginButton:"Sign in",headerLogoutButton:"Sign out",loginCardTitle:"Sign in",loginFormText:"Fill both fields in order to log in to the system",loginCardCancelButton:"Cancel",loginCardSubmitButton:"Sign in",loginCardUsernameHint:"Username",loginCardPasswordHint:"Password",networkErrorHeader:"Connection issue detected",networkErrorButtonText:"Reload the page",newVersionAvailable:"New version available, the application will refresh in few seconds..."}},pl:{translation:{release:"Wydanie",forbiddenErrorMessage:"Nie masz uprawnień do wykonania tej operacji",somethingWentWrongMessage:"Ups... coś poszło nie tak",changeLanguageText:"Zmiana języka na Angielski",headerLoginButton:"Zaloguj się",headerLogoutButton:"Wyloguj",loginCardTitle:"Logowanie",loginFormText:"Wypełnij oba pola w celu zalogowania do systemu",loginCardCancelButton:"Anuluj",loginCardSubmitButton:"Zaloguj",loginCardUsernameHint:"Użytkownik",loginCardPasswordHint:"Hasło",networkErrorHeader:"Błąd połączenia",networkErrorButtonText:"Odśwież stronę",newVersionAvailable:"Dostępna jest nowa wersja, za kilka sekund nastąpi odświeżenie aplikacji..."}}},interpolation:{escapeValue:!1},react:{bindI18nStore:"added"},returnNull:!1});var qp=function e(t,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=Wp({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var i in o)o[i]&&(s+="; "+i,!0!==o[i]&&(s+="="+o[i].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+s}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var s=n[o].split("="),i=s.slice(1).join("=");try{var a=decodeURIComponent(s[0]);if(r[a]=t.read(i,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",Wp({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Wp({},this.attributes,t))},withConverter:function(t){return e(Wp({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class Kp{static recognizeRootDomain(){if(!this.rootDomain){const e=window.location.hostname;if(0===window.location.port.length){let t,n;[t,...n]=e.split("."),this.subdomain=t,this.rootDomain=n.join(".")}else this.rootDomain=e}return this.rootDomain}static get(e){const t=this.recognizeRootDomain();return qp.get(e,{domain:t})}static set(e,t){const n=this.recognizeRootDomain();return qp.set(e,t,{domain:n})}static remove(e){const t=this.recognizeRootDomain();return qp.remove(e,{domain:t})}}const Zp=function(e,t){void 0===t&&(t={});try{function n(){const n=Xp.requestHeaders();return null!==n&&(t.headers=Object.assign({},n,t.headers)),Promise.resolve(fetch(e,t).catch(e=>{xo(e),Xp.setNetworkError({title:z.default.t("somethingWentWrongMessage"),details:e.message})})).then(function(e){const t=function(){if(e){const t=function(){if(401!==e.status)return Promise.resolve(e.clone().text()).then(function(t){switch(e.status){case 403:lt.error(z.default.t("forbiddenErrorMessage"));break;case 500:lt.error(/*#__PURE__*/j.default.createElement(j.default.Fragment,null,/*#__PURE__*/j.default.createElement(d.Typography,{mr:t?2:0},z.default.t("somethingWentWrongMessage}")),t&&/*#__PURE__*/j.default.createElement(d.Tooltip,{title:t,arrow:!0},/*#__PURE__*/j.default.createElement(W.default,null))))}});Xp.removeSession(),Xp.removeCurrentUser(),Xp.setNotAuthorizedLoginStatus()}();if(t&&t.then)return t.then(function(){})}}();return t&&t.then?t.then(function(){return e}):e})}const r=function(){if(Xp.isLoggedIn()&&!t.refresh){const{createdAt:e,expiresIn:t}=Xp.session,n=function(){if(e+t-5<Math.round(+new Date/1e3)){const e=Xp.refreshTokenPromise?Promise.resolve(Xp.refreshTokenPromise).then(function(){}):Promise.resolve(Xp.refresh()).then(function(){});if(e&&e.then)return e.then(function(){})}}();if(n&&n.then)return n.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(n):n())}catch(o){return Promise.reject(o)}};var Gp=new class{constructor(){this.currentUser=null,c.makeObservable(this,{setCurrentUser:c.action,removeCurrentUser:c.action,currentUser:c.observable.deep,getCurrentUserJS:c.computed})}setCurrentUser(e){this.currentUser=e}removeCurrentUser(){this.currentUser=null}get getCurrentUserJS(){return c.toJS(this.currentUser)}};class Yp{constructor(){this.user={},this.accessToken=null,this.refreshToken=null,this.tokenType=null,this.createdAt=null,this.expiresIn=null}}class Jp{setAuthConfig(e){let{baseUrl:t,clientId:n,redirectUri:r}=e;this.baseUrl=t,this.clientId=n,this.redirectUri=r}authorize(e){try{const t=this,n=new FormData,{scope:r,refresh:o,code:s,username:i,password:a}=e;let c;return n.append("client_id",t.clientId),r&&n.append("scope",r),o?(n.append("grant_type","refresh_token"),n.append("refresh_token",o),n.append("redirect_uri",t.redirectUri)):s?(n.append("grant_type","authorization_code"),n.append("code",s),n.append("redirect_uri",t.redirectUri)):(n.append("grant_type","password"),n.append("username",i),n.append("password",a)),Promise.resolve(Zp(t.baseUrl+"/v2/oauth2/token",{method:"POST",body:n,refresh:!!o}).then(function(e){try{let n,r;return Promise.resolve(function(){if(e){function s(e){if(n)return e;function s(){c.accessToken=r.access_token,c.refreshToken=r.refresh_token,c.tokenType=r.token_type,c.createdAt=r.created_at,c.expiresIn=r.expires_in}c=new Yp;const i=function(){if(!o)return Promise.resolve(t.getUserData(r)).then(function(e){c.user=e})}();return i&&i.then?i.then(s):s()}const i=function(t,o){try{var s=Promise.resolve(e.json()).then(function(t){r=t,e.ok&&200===e.status||(lt.error(r.error_description),n=1)})}catch(e){return o()}return s&&s.then?s.then(void 0,o):s}(0,function(){lt.error(z.default.t("somethingWentWrongMessage")),n=1});return i&&i.then?i.then(s):s(i)}}())}catch(e){return Promise.reject(e)}}).catch(e=>{lt.error(e.message)})).then(function(){return c})}catch(e){return Promise.reject(e)}}getUserData(e){try{const t=this,n={method:"GET"};if(e){const{token_type:t,access_token:r}=e;n.headers={Authorization:t+" "+r}}return Promise.resolve(Zp(t.baseUrl+"/v2/me",n)).then(function(e){let t;const n=function(){if(null!=e&&e.ok)return Promise.resolve(e.json()).then(function(e){let{user:n}=e;return t=1,{id:n.id,companyId:n.company_id,roleId:n.role_id,username:n.username,email:n.email,name:n.name}})}();return n&&n.then?n.then(function(e){return t?e:null}):t?n:null})}catch(e){return Promise.reject(e)}}signOut(e){try{const t=this,n=new FormData;return n.append("client_id",t.clientId),n.append("token",e),Promise.resolve(Zp(t.baseUrl+"/v2/oauth2/revoke",{method:"POST",body:n})).then(function(){})}catch(e){return Promise.reject(e)}}}const Xp=new class{constructor(){this.loading=!1,this.loginStatus={status:"unknown"},this.refreshTokenPromise=null,this.api=new Jp,this.networkError=null,c.makeObservable(this,{loading:c.observable,setLoading:c.action,loginStatus:c.observable.deep,setConnectedLoginStatus:c.action,setNotAuthorizedLoginStatus:c.action})}setLoading(e){this.loading=e}setConnectedLoginStatus(){this.loginStatus={status:"connected",authResponse:{user:this.session.user,accessToken:this.session.accessToken,refreshToken:this.session.refreshToken,tokenType:this.session.tokenType,createdAt:this.session.createdAt,expiresIn:this.session.expiresIn}}}setNotAuthorizedLoginStatus(){this.loginStatus={status:"not_authorized"}}setAuthConfig(e){this.api.setAuthConfig(e)}setNetworkError(e){this.networkError=e}isLoggedIn(){return Boolean(this.session)}requestHeaders(){const e={"Accept-Language":z.default.language};if(this.isLoggedIn()){const{accessToken:t,tokenType:n}=this.session;return _p({},e,{Authorization:n+" "+t})}return e}authorize(e,t){void 0===t&&(t=!0);try{const n=this;return n.setLoading(!0),Promise.resolve(n.api.authorize(e)).then(function(e){return n.setLoading(!1),e?(t&&(n.session=e,n.storeSession(),n.setCurrentUser(e.user),n.setConnectedLoginStatus()),e):null})}catch(e){return Promise.reject(e)}}refresh(){try{const e=this;return e.session&&(e.refreshTokenPromise=e.api.authorize({refresh:e.session.refreshToken}),e.refreshTokenPromise.then(t=>{t?(e.session=_p({},e.session,t,{user:e.session.user}),e.storeSession(),e.setConnectedLoginStatus(),e.refreshTokenPromise=null):(e.removeSession(),e.removeCurrentUser(),e.setNotAuthorizedLoginStatus(),e.refreshTokenPromise=null)})),Promise.resolve(e.refreshTokenPromise)}catch(e){return Promise.reject(e)}}recover(){try{const e=this;return e.session?Promise.resolve():Promise.resolve(e.restoreSession()).then(function(){const t=function(){if(e.session)return Promise.resolve(e.api.getUserData()).then(function(t){e.setCurrentUser(t),e.setConnectedLoginStatus()});e.setNotAuthorizedLoginStatus()}();if(t&&t.then)return t.then(function(){})})}catch(e){return Promise.reject(e)}}logout(){try{const e=this,t=function(){if(e.session)return Promise.resolve(e.api.signOut(e.session.accessToken)).then(function(){e.removeSession(),e.removeCurrentUser(),e.setNotAuthorizedLoginStatus()})}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}storeSession(){try{const e=this;let t={};t["access-token"]=e.session.accessToken,t["refresh-token"]=e.session.refreshToken,t["token-type"]=e.session.tokenType,t["created-at"]=e.session.createdAt,t["expires-in"]=e.session.expiresIn;const n=JSON.stringify(t);return Kp.set("authHeaders",n),Promise.resolve()}catch(e){return Promise.reject(e)}}restoreSession(){try{const e=this,t=Kp.get("authHeaders");if(!t||"null"===t)return Promise.resolve();const n=JSON.parse(t),r=new Yp;return r.accessToken=n["access-token"],r.refreshToken=n["refresh-token"],r.tokenType=n["token-type"],r.createdAt=n["created-at"],r.expiresIn=n["expires-in"],e.session=r,Promise.resolve(e.api.getUserData()).then(function(t){t&&(e.session.user=t)})}catch(e){return Promise.reject(e)}}removeSession(){Kp.remove("authHeaders"),this.session=null}setCurrentUser(e){Gp.setCurrentUser(e)}removeCurrentUser(){Gp.removeCurrentUser()}},Qp=()=>{const[t,n]=e.useState(Xp.loginStatus);return e.useEffect(()=>c.reaction(()=>c.toJS(Xp.loginStatus),()=>{n(Xp.loginStatus)}),[]),t},eh=j.default.createContext({showModal:null,hideModal:null,isOpenedModal:!1}),th=t=>{let{children:n}=t;const[r,o]=e.useState({}),s=e.useCallback((e,t)=>{o(t=>_p({},t,{[e]:_p({},t[e],{isOpen:!1})})),t&&t()},[o]),i=e.useCallback((e,t,n)=>{o(r=>_p({},r,{[e]:{isOpen:!0,component:t,data:n}}))},[o]),a=e.useMemo(()=>({showModal:i,hideModal:s,isOpenedModal:Object.values(r).some(e=>{let{isOpen:t}=e;return t})}),[s,i,r]);/*#__PURE__*/return j.default.createElement(eh.Provider,{value:a},n,Object.keys(r).map(e=>{const{component:t,isOpen:n,data:o}=r[e];return n&&/*#__PURE__*/j.default.createElement(t,_p({onClose:()=>s(e),key:e,isOpen:n},o))}))},nh=(()=>{let e=0;return()=>""+ ++e})();function rh(t,n,r){const o=e.useMemo(nh,[]),s=e.useContext(eh);return[e.useCallback(e=>s.showModal(o,t,e instanceof Event?n:_p({},n,e)),[n,s.showModal]),e.useCallback(()=>s.hideModal(o,r),[s.hideModal,r,o])]}rh.ModalContext=eh,rh.ModalProvider=th;var oh={root:{height:"calc(100vh - 22px)",paddingTop:"70px",mixBlendMode:"color",background:"#1E1E1E"},overlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,background:"repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 12px, transparent 12px, transparent 24px);"}};const sh=e=>{let{error:n}=e;const{t:r}=t.useTranslation();/*#__PURE__*/return j.default.createElement(d.Container,{maxWidth:!1,disableGutters:!0,sx:oh.root},/*#__PURE__*/j.default.createElement(d.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"650px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/j.default.createElement(d.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/j.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/j.default.createElement(d.Typography,{variant:"h4",sx:{display:"flex",alignItems:"center",marginBottom:"40px",color:"rgba(255, 255, 255, 0.6)"}},r("somethingWentWrongMessage"),/*#__PURE__*/j.default.createElement(d.Tooltip,{title:n.toString(),arrow:!0},/*#__PURE__*/j.default.createElement(W.default,{sx:{marginLeft:"1em",fontSize:"inherit"}}))),/*#__PURE__*/j.default.createElement(d.Button,{onClick:()=>window.location.reload()},r("networkErrorButtonText"))))),/*#__PURE__*/j.default.createElement(d.Box,{sx:oh.overlay}))};sh.propTypes={error:a.PropTypes.any,componentStack:a.PropTypes.any},sh.defaultProps={};const ih=e.createContext(),ah=e=>{let{children:t,config:n}=e;/*#__PURE__*/return j.default.createElement(ih.Provider,{value:n},t)},ch=()=>e.useContext(ih),lh=e.createContext(),uh=e=>{let{children:t,info:n}=e;/*#__PURE__*/return j.default.createElement(lh.Provider,{value:n},t)},dh={sessionStore:Xp},ph=e.createContext(dh),hh=i.observer(e=>{let{children:t}=e;/*#__PURE__*/return j.default.createElement(ph.Provider,{value:dh},t)});var fh=new class{constructor(){this.appReady=!1,this.gtmReady=!1,this.sentryReady=!1,c.makeAutoObservable(this)}setAppReady(){this.appReady=!0}setGtmReady(){this.gtmReady=!0}setSentryReady(){this.sentryReady=!0}};let mh=s.createTheme({components:{MuiCssBaseline:{styleOverrides:'\n body {\n font-family: "Inter", "system-ui";\n }\n @supports (font-variation-settings: normal) {\n body { font-family: "Inter var", "system-ui"; }\n }\n '}},palette:{background:"#1E1E1E",primary:{light:"#156bd1",main:"#155ed1",dark:"#1551d1",contrastText:"rgba(255,255,255,0.85)"},secondary:{light:"#656565",main:"#595959",dark:"#4d4d4d",contrastText:"rgba(255,255,255,0.85)"}},typography:{fontFamily:"'Inter', system-ui",fontWeightLight:"400",fontWeightRegular:"500",fontWeightMedium:"600",button:{textTransform:"none"}}});var gh=s.createTheme(mh,{components:{MuiBackdrop:{styleOverrides:{root:{marginTop:70}}},MuiButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiLoadingButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiCardHeader:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)",background:"linear-gradient(180deg, #4A4A4A 0%, #3F3F3F 100%)"},subheader:{marginTop:"0.5em",color:"rgba(255,255,255,0.5)"}}},MuiPaper:{styleOverrides:{rounded:{borderRadius:"20px"}}},MuiCard:{styleOverrides:{root:{borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)"}}},MuiCardContent:{styleOverrides:{root:{background:"rgba(45, 45, 45, 1)","&:last-child":{paddingBottom:16}}}},MuiDialogTitle:{styleOverrides:{root:{textAlign:"center",color:"white",background:"linear-gradient(#4a4a4a 0%, #3e3e3e 100%)"}}},MuiDialogContent:{styleOverrides:{root:{minWidth:550,padding:"16px 24px",background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)"}}},MuiDialogContentText:{styleOverrides:{root:{textAlign:"center",color:"white"}}},MuiMenu:{styleOverrides:{paper:{background:"#2d2d2d"}}},MuiMenuItem:{styleOverrides:{root:{color:"white"}}},MuiFormControl:{styleOverrides:{root:{alignItems:"center"}}},MuiSelect:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)"}}},MuiInputLabel:{styleOverrides:{root:{color:mh.palette.primary.main}}},MuiOutlinedInput:{styleOverrides:{root:{color:"white","&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"rgba(255,255,255,0.35)"}},notchedOutline:{borderColor:"rgba(255,255,255,0.25)"},input:{padding:"13px 16px",background:"transparent",color:"white",borderColor:"white"}}}}});function yh(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var vh={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function bh(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var _h=/[A-Z]|^ms/g,Sh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wh=function(e){return 45===e.charCodeAt(1)},kh=function(e){return null!=e&&"boolean"!=typeof e},Eh=/* #__PURE__ */bh(function(e){return wh(e)?e:e.replace(_h,"-$&").toLowerCase()}),Ch=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Sh,function(e,t,n){return Th={name:t,styles:n,next:Th},t})}return 1===vh[e]||wh(e)||"number"!=typeof t||0===t?t:t+"px"};function xh(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Th={name:n.name,styles:n.styles,next:Th},n.name;var r=n;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)Th={name:o.name,styles:o.styles,next:Th},o=o.next;return r.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=xh(e,t,n[o])+";";else for(var s in n){var i=n[s];if("object"!=typeof i){var a=i;null!=t&&void 0!==t[a]?r+=s+"{"+t[a]+"}":kh(a)&&(r+=Eh(s)+":"+Ch(s,a)+";")}else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var c=xh(e,t,i);switch(s){case"animation":case"animationName":r+=Eh(s)+":"+c+";";break;default:r+=s+"{"+c+"}"}}else for(var l=0;l<i.length;l++)kh(i[l])&&(r+=Eh(s)+":"+Ch(s,i[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=Th,i=n(e);return Th=s,xh(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Th,Ih=/label:\s*([^\s;{]+)\s*(;|$)/g;function Mh(e,t){const n=q.default(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const r="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...t)}:n}const Oh=[];function Ph(e){return Oh[0]=e,function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Th=void 0;var s=e[0];null==s||void 0===s.raw?(r=!1,o+=xh(n,t,s)):o+=s[0];for(var i=1;i<e.length;i++)o+=xh(n,t,e[i]),r&&(o+=s[i]);Ih.lastIndex=0;for(var a,c="";null!==(a=Ih.exec(o));)c+="-"+a[1];var l=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:Th}}(Oh)}function Rh(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Ah(e){if(/*#__PURE__*/F.isValidElement(e)||!Rh(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Ah(e[n])}),t}function Dh(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Rh(e)&&Rh(t)&&Object.keys(t).forEach(o=>{r[o]=/*#__PURE__*/F.isValidElement(t[o])?t[o]:Rh(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Rh(e[o])?Dh(e[o],t[o],n):n.clone&&Rh(t[o])?Ah(t[o]):t[o]}),r}var Lh={borderRadius:4},Nh="production"!==process.env.NODE_ENV?V.default.oneOfType([V.default.number,V.default.string,V.default.object,V.default.array]):{};function Hh(e,t){return t?Dh(e,t,{clone:!1}):e}const $h={xs:0,sm:600,md:900,lg:1200,xl:1536},Fh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${$h[e]}px)`},jh={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:$h[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Uh(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||Fh;return t.reduce((r,o,s)=>(r[e.up(e.keys[s])]=n(t[s]),r),{})}if("object"==typeof t){const e=r.breakpoints||Fh;return Object.keys(t).reduce((o,s)=>{if(i=e.keys,"@"===(a=s)||a.startsWith("@")&&(i.some(e=>a.startsWith(`@${e}`))||a.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:yh(18,`(${t})`));return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(s)}(r.containerQueries?r:jh,s);e&&(o[e]=n(t[s],s))}else Object.keys(e.values||$h).includes(s)?o[e.up(s)]=n(t[s],s):o[s]=t[s];var i,a;return o},{})}return n(t)}function Bh(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":yh(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Vh(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function zh(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Vh(e,n)||r,t&&(o=t(o,r,e)),o}function Wh(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=e=>{if(null==e[t])return null;const s=e[t],i=Vh(e.theme,r)||{};return Uh(e,s,e=>{let r=zh(i,o,e);return e===r&&"string"==typeof e&&(r=zh(i,o,`${t}${"default"===e?"":Bh(e)}`,e)),!1===n?r:{[n]:r}})};return s.propTypes="production"!==process.env.NODE_ENV?{[t]:Nh}:{},s.filterProps=[t],s}const qh={m:"margin",p:"padding"},Kh={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Zh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Gh=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!Zh[e])return[e];e=Zh[e]}const[t,n]=e.split(""),r=qh[t],o=Kh[n]||"";return Array.isArray(o)?o.map(e=>r+e):[r+o]})(t)),e[t])}(),Yh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Jh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Xh=[...Yh,...Jh];function Qh(e,t,n,r){const o=Vh(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`),"string"==typeof o?`calc(${e} * ${o})`:o*e):Array.isArray(o)?e=>{if("string"==typeof e)return e;const n=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(n)?n>o.length-1&&console.error([`MUI: The value provided (${n}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${n} > ${o.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const r=o[n];return e>=0?r:"number"==typeof r?-r:`-${r}`}:"function"==typeof o?o:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function ef(e){return Qh(e,"spacing",8,"spacing")}function tf(e,t){return"string"==typeof t||null==t?t:e(t)}function nf(e,t){const n=ef(e.theme);return Object.keys(e).map(r=>function(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=tf(t,n),e),{})}(Gh(n),r);return Uh(e,e[n],o)}(e,t,r,n)).reduce(Hh,{})}function rf(e){return nf(e,Yh)}function of(e){return nf(e,Jh)}function sf(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?Hh(n,t[r](e)):n,{});return n.propTypes="production"!==process.env.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function af(e){return"number"!=typeof e?e:`${e}px solid`}function cf(e,t){return Wh({prop:e,themeKey:"borders",transform:t})}rf.propTypes="production"!==process.env.NODE_ENV?Yh.reduce((e,t)=>(e[t]=Nh,e),{}):{},rf.filterProps=Yh,of.propTypes="production"!==process.env.NODE_ENV?Jh.reduce((e,t)=>(e[t]=Nh,e),{}):{},of.filterProps=Jh,"production"===process.env.NODE_ENV||Xh.reduce((e,t)=>(e[t]=Nh,e),{});const lf=cf("border",af),uf=cf("borderTop",af),df=cf("borderRight",af),pf=cf("borderBottom",af),hf=cf("borderLeft",af),ff=cf("borderColor"),mf=cf("borderTopColor"),gf=cf("borderRightColor"),yf=cf("borderBottomColor"),vf=cf("borderLeftColor"),bf=cf("outline",af),_f=cf("outlineColor"),Sf=e=>{if(null!=e.borderRadius){const t=Qh(e.theme,"shape.borderRadius",4,"borderRadius");return Uh(e,e.borderRadius,e=>({borderRadius:tf(t,e)}))}return null};Sf.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Nh}:{},Sf.filterProps=["borderRadius"],sf(lf,uf,df,pf,hf,ff,mf,gf,yf,vf,Sf,bf,_f);const wf=e=>{if(null!=e.gap){const t=Qh(e.theme,"spacing",8,"gap");return Uh(e,e.gap,e=>({gap:tf(t,e)}))}return null};wf.propTypes="production"!==process.env.NODE_ENV?{gap:Nh}:{},wf.filterProps=["gap"];const kf=e=>{if(null!=e.columnGap){const t=Qh(e.theme,"spacing",8,"columnGap");return Uh(e,e.columnGap,e=>({columnGap:tf(t,e)}))}return null};kf.propTypes="production"!==process.env.NODE_ENV?{columnGap:Nh}:{},kf.filterProps=["columnGap"];const Ef=e=>{if(null!=e.rowGap){const t=Qh(e.theme,"spacing",8,"rowGap");return Uh(e,e.rowGap,e=>({rowGap:tf(t,e)}))}return null};function Cf(e,t){return"grey"===t?t:e}function xf(e){return e<=1&&0!==e?100*e+"%":e}Ef.propTypes="production"!==process.env.NODE_ENV?{rowGap:Nh}:{},Ef.filterProps=["rowGap"],sf(wf,kf,Ef,Wh({prop:"gridColumn"}),Wh({prop:"gridRow"}),Wh({prop:"gridAutoFlow"}),Wh({prop:"gridAutoColumns"}),Wh({prop:"gridAutoRows"}),Wh({prop:"gridTemplateColumns"}),Wh({prop:"gridTemplateRows"}),Wh({prop:"gridTemplateAreas"}),Wh({prop:"gridArea"})),sf(Wh({prop:"color",themeKey:"palette",transform:Cf}),Wh({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Cf}),Wh({prop:"backgroundColor",themeKey:"palette",transform:Cf}));const Tf=Wh({prop:"width",transform:xf}),If=e=>null!=e.maxWidth?Uh(e,e.maxWidth,t=>{const n=e.theme?.breakpoints?.values?.[t]||$h[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:xf(t)}}):null;If.filterProps=["maxWidth"];const Mf=Wh({prop:"minWidth",transform:xf}),Of=Wh({prop:"height",transform:xf}),Pf=Wh({prop:"maxHeight",transform:xf}),Rf=Wh({prop:"minHeight",transform:xf});Wh({prop:"size",cssProperty:"width",transform:xf}),Wh({prop:"size",cssProperty:"height",transform:xf}),sf(Tf,If,Mf,Of,Pf,Rf,Wh({prop:"boxSizing"}));var Af={border:{themeKey:"borders",transform:af},borderTop:{themeKey:"borders",transform:af},borderRight:{themeKey:"borders",transform:af},borderBottom:{themeKey:"borders",transform:af},borderLeft:{themeKey:"borders",transform:af},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:af},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Sf},color:{themeKey:"palette",transform:Cf},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Cf},backgroundColor:{themeKey:"palette",transform:Cf},p:{style:of},pt:{style:of},pr:{style:of},pb:{style:of},pl:{style:of},px:{style:of},py:{style:of},padding:{style:of},paddingTop:{style:of},paddingRight:{style:of},paddingBottom:{style:of},paddingLeft:{style:of},paddingX:{style:of},paddingY:{style:of},paddingInline:{style:of},paddingInlineStart:{style:of},paddingInlineEnd:{style:of},paddingBlock:{style:of},paddingBlockStart:{style:of},paddingBlockEnd:{style:of},m:{style:rf},mt:{style:rf},mr:{style:rf},mb:{style:rf},ml:{style:rf},mx:{style:rf},my:{style:rf},margin:{style:rf},marginTop:{style:rf},marginRight:{style:rf},marginBottom:{style:rf},marginLeft:{style:rf},marginX:{style:rf},marginY:{style:rf},marginInline:{style:rf},marginInlineStart:{style:rf},marginInlineEnd:{style:rf},marginBlock:{style:rf},marginBlockStart:{style:rf},marginBlockEnd:{style:rf},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:wf},rowGap:{style:Ef},columnGap:{style:kf},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:xf},maxWidth:{style:If},minWidth:{transform:xf},height:{transform:xf},maxHeight:{transform:xf},minHeight:{transform:xf},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Df=function(){function e(e,t,n,r){const o={[e]:t,theme:n},s=r[e];if(!s)return{[e]:t};const{cssProperty:i=e,themeKey:a,transform:c,style:l}=s;if(null==t)return null;if("typography"===a&&"inherit"===t)return{[e]:t};const u=Vh(n,a)||{};return l?l(o):Uh(o,t,t=>{let n=zh(u,c,t);return t===n&&"string"==typeof t&&(n=zh(u,c,`${e}${"default"===t?"":Bh(t)}`,t)),!1===i?n:{[i]:n}})}return function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const s=o.unstable_sxConfig??Af;function i(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const i=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(o.breakpoints),a=Object.keys(i);let c=i;return Object.keys(r).forEach(n=>{const i="function"==typeof(a=r[n])?a(o):a;var a;if(null!=i)if("object"==typeof i)if(s[n])c=Hh(c,e(n,i,o,s));else{const e=Uh({theme:o},i,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,i)?c=Hh(c,e):c[n]=t({sx:i,theme:o})}else c=Hh(c,e(n,i,o,s))}),function(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}(o,function(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}(a,c))}return Array.isArray(r)?r.map(i):i(r)}}();Df.filterProps=["sx"];var Lf=Df;function Nf(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Hf(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...i}=e,a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,s=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),i=Object.keys(s);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function c(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function l(e,o){const s=i.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==s&&"number"==typeof t[i[s]]?t[i[s]]:o)-r/100}${n})`}return{keys:i,values:s,up:a,down:c,between:l,only:function(e){return i.indexOf(e)+1<i.length?l(e,i[i.indexOf(e)+1]):a(e)},not:function(e){const t=i.indexOf(e);return 0===t?a(i[1]):t===i.length-1?c(i[t]):l(e,i[i.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}(n),c=function(e=8,t=ef({spacing:e})){if(e.mui)return e;const n=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" "));return n.mui=!0,n}(o);let l=Dh({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...Lh,...s}},i);return l=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(l),l.applyStyles=Nf,l=t.reduce((e,t)=>Dh(e,t),l),l.unstable_sxConfig={...Af,...i?.unstable_sxConfig},l.unstable_sx=function(e){return Lf({sx:e,theme:this})},l}const $f=Hf(),Ff=e=>e;var jf=(()=>{let e=Ff;return{configure(t){e=t},generate:t=>e(t),reset(){e=Ff}}})();function Uf(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Uf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bf(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Uf(e))&&(r&&(r+=" "),r+=t);return r}const Vf={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"},zf=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,s=Mh("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Lf),i=/*#__PURE__*/F.forwardRef(function(e,i){const a=function(e=$f){return function(e=null){const t=F.useContext(h.ThemeContext);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t}(e)}(n),{className:c,component:l="div",...u}=function(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Af;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t})(n);let s;return s=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return Rh(n)?{...r,...n}:r}:{...r,...t},{...o,sx:s}}(e);/*#__PURE__*/
172
172
  return m.jsx(s,{as:l,ref:i,className:Bf(c,o?o(r):r),theme:t&&a[t]||a,...u})});return i}({defaultClassName:function(e,t,n="Mui"){const r={};return["root"].forEach(t=>{r[t]=function(e,t,n="Mui"){const r=Vf[t];return r?`${n}-${r}`:`${jf.generate(e)}-${t}`}(e,t,n)}),r}("MuiBox").root,generateClassName:jf.generate});"production"!==process.env.NODE_ENV&&(zf.propTypes={children:V.default.node,component:V.default.elementType,sx:V.default.oneOfType([V.default.arrayOf(V.default.oneOfType([V.default.func,V.default.object,V.default.bool])),V.default.func,V.default.object])});var Wf=zf;function qf(e,t=""){return e.displayName||e.name||t}function Kf(e,t,n){const r=qf(t);return e.displayName||(""!==r?`${n}(${r})`:n)}const Zf=Hf();function Gf(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function Yf(e){return e?(t,n)=>n[e]:null}function Jf(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap(t=>Jf(e,t));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return Xf(e,n.variants,[t])}return n?.isProcessed?n.style:n}function Xf(e,t,n=[]){let r;e:for(let o=0;o<t.length;o+=1){const s=t[o];if("function"==typeof s.props){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(r))continue}else for(const t in s.props)if(e[t]!==s.props[t]&&e.ownerState?.[t]!==s.props[t])continue e;"function"==typeof s.style?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(s.style(r))):n.push(s.style)}return n}function Qf(e,t){let n;return"production"!==process.env.NODE_ENV&&e&&(n=`${e}-${em(t||"Root")}`),n}function em(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}const tm=function(e={}){const{themeId:t,defaultTheme:n=Zf,rootShouldForwardProp:r=Gf,slotShouldForwardProp:o=Gf}=e;function s(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=(e=>e.filter(e=>e!==Lf))(e.__emotion_styles))}(e);const{name:n,slot:i,skipVariantsResolver:a,skipSx:c,overridesResolver:l=Yf(em(i)),...u}=t,d=void 0!==a?a:i&&"Root"!==i&&"root"!==i||!1,p=c||!1;let h=Gf;"Root"===i||"root"===i?h=r:i?h=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(h=void 0);const m=Mh(e,{shouldForwardProp:h,label:Qf(n,i),...u}),g=e=>{if("function"==typeof e&&e.__emotion_real!==e)return function(t){return Jf(t,e)};if(Rh(e)){const t=function(e){const{variants:t,...n}=e,r={variants:t,style:Ph(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=Ph(e.style))}),r}(e);return t.variants?function(e){return Jf(e,t)}:t.style}return e},y=(...t)=>{const r=[],o=t.map(g),a=[];if(r.push(s),n&&l&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=Jf(e,r[t]);return l(e,o)}),n&&!d&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Xf(e,r):null}),p||a.push(Lf),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let s;s=[...t,...e,...n],s.raw=[...t,...e.raw,...n],r.unshift(s)}const c=[...r,...o,...a],u=m(...c);return e.muiName&&(u.muiName=e.muiName),"production"!==process.env.NODE_ENV&&(u.displayName=function(e,t,n){return e?`${e}${Bh(t||"")}`:`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return qf(e,"Component");if("object"==typeof e)switch(e.$$typeof){case f.ForwardRef:return Kf(e,e.render,"ForwardRef");case f.Memo:return Kf(e,e.type,"memo");default:return}}}(n)})`}(n,i,e)),u};return m.withConfig&&(y.withConfig=m.withConfig),y}}(),nm=tm(Wf)({position:"absolute",left:0,bottom:0,width:"100%",height:"22px",padding:"0.15em 0.5em",fontSize:"70%",fontWeight:600,color:"rgba(255, 255, 255, 0.75)",borderTop:"1px solid rgba(255, 255, 255, 0.2)","& > span":{marginLeft:"0.5em",color:"rgba(255, 255, 255, 0.4)"},background:"#151515"}),rm=e=>{let{appVersion:n,apiVersion:r}=e;const{t:o}=t.useTranslation();/*#__PURE__*/return j.default.createElement(nm,null,(()=>{if(n){const e=n.startsWith("v")?n:"v"+n;/*#__PURE__*/return j.default.createElement(j.default.Fragment,null,/*#__PURE__*/j.default.createElement("span",null,o("Version"))," ",e)}})(),(()=>{if(r){const e=r.startsWith("v")?r:"v"+r;/*#__PURE__*/return j.default.createElement(j.default.Fragment,null,/*#__PURE__*/j.default.createElement("span",null,"API")," ",e)}})())},om=e=>{let{width:t,"data-testid":n}=e;/*#__PURE__*/return j.default.createElement(d.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100vh"},/*#__PURE__*/j.default.createElement("img",{"data-testid":n,alt:"loader",width:t,src:Z.default}))},sm=e=>{let{error:n}=e;const{t:r}=t.useTranslation();/*#__PURE__*/return j.default.createElement(d.Container,{maxWidth:!1,disableGutters:!0,sx:oh.root},/*#__PURE__*/j.default.createElement(d.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"600px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/j.default.createElement(d.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/j.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/j.default.createElement("h1",{style:{textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},r("networkErrorHeader")),/*#__PURE__*/j.default.createElement("p",{style:{display:"inline-flex",textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},/*#__PURE__*/j.default.createElement(d.Typography,{mr:2},n.title),/*#__PURE__*/j.default.createElement(d.Tooltip,{title:n.details,arrow:!0},/*#__PURE__*/j.default.createElement(W.default,null))),/*#__PURE__*/j.default.createElement(d.Button,{onClick:()=>window.location.reload()},r("networkErrorButtonText"))))),/*#__PURE__*/j.default.createElement(d.Box,{sx:oh.overlay}))},im=()=>{const t=new URLSearchParams(n.useLocation().search),r=t.get("next");return e.useEffect(()=>{const e=t.get("code");e&&Xp.authorize({code:e})},[t]),Xp.isLoggedIn()?/*#__PURE__*/j.default.createElement(n.Navigate,{to:r}):null};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var am,cm,lm=(am=function(e,t){var n;e.exports=(n={attachTo:function(e,t){if(void 0!==e.scannerDetectionData)throw new Error("onScan.js is already initialized for DOM element "+e);return t=this._mergeOptions({onScan:function(e,t){},onScanError:function(e){},onKeyProcess:function(e,t){},onKeyDetect:function(e,t){},onPaste:function(e,t){},keyCodeMapper:function(e){return n.decodeKeyEvent(e)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1},t),e.scannerDetectionData={options:t,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},!0===t.reactToPaste&&e.addEventListener("paste",this._handlePaste,t.captureEvents),!1!==t.scanButtonKeyCode&&e.addEventListener("keyup",this._handleKeyUp,t.captureEvents),!0!==t.reactToKeydown&&!1===t.scanButtonKeyCode||e.addEventListener("keydown",this._handleKeyDown,t.captureEvents),this},detachFrom:function(e){e.scannerDetectionData.options.reactToPaste&&e.removeEventListener("paste",this._handlePaste),!1!==e.scannerDetectionData.options.scanButtonKeyCode&&e.removeEventListener("keyup",this._handleKeyUp),e.removeEventListener("keydown",this._handleKeyDown),e.scannerDetectionData=void 0},getOptions:function(e){return e.scannerDetectionData.options},setOptions:function(e,t){switch(e.scannerDetectionData.options.reactToPaste){case!0:!1===t.reactToPaste&&e.removeEventListener("paste",this._handlePaste);break;case!1:!0===t.reactToPaste&&e.addEventListener("paste",this._handlePaste)}return!1===e.scannerDetectionData.options.scanButtonKeyCode?!1!==t.scanButtonKeyCode&&e.addEventListener("keyup",this._handleKeyUp):!1===t.scanButtonKeyCode&&e.removeEventListener("keyup",this._handleKeyUp),e.scannerDetectionData.options=this._mergeOptions(e.scannerDetectionData.options,t),this._reinitialize(e),this},decodeKeyEvent:function(e){var t=this._getNormalizedKeyNum(e);switch(!0){case t>=48&&t<=90:case t>=106&&t<=111:if(void 0!==e.key&&""!==e.key)return e.key;var n=String.fromCharCode(t);switch(e.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase()}return n;case t>=96&&t<=105:return t-96+0}return""},simulate:function(e,t){return this._reinitialize(e),Array.isArray(t)?t.forEach(function(e){var t={};"object"!=typeof e&&"function"!=typeof e||null===e?t.keyCode=parseInt(e):t=e;var n=new KeyboardEvent("keydown",t);document.dispatchEvent(n)}):this._validateScanCode(e,t),this},_reinitialize:function(e){var t=e.scannerDetectionData.vars;t.firstCharTime=0,t.lastCharTime=0,t.accumulatedString=""},_isFocusOnIgnoredElement:function(e){var t=e.scannerDetectionData.options.ignoreIfFocusOn;if(!t)return!1;var n=document.activeElement;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(!0===n.matches(t[r]))return!0}else if(n.matches(t))return!0;return!1},_validateScanCode:function(e,t){var r,o=e.scannerDetectionData,s=o.options,i=o.options.singleScanQty,a=o.vars.firstCharTime,c=o.vars.lastCharTime,l={};switch(!0){case t.length<s.minLength:l={message:"Receieved code is shorter then minimal length"};break;case c-a>t.length*s.avgTimeByChar:l={message:"Receieved code was not entered in time"};break;default:return s.onScan.call(e,t,i),r=new CustomEvent("scan",{detail:{scanCode:t,qty:i}}),e.dispatchEvent(r),n._reinitialize(e),!0}return l.scanCode=t,l.scanDuration=c-a,l.avgTimeByChar=s.avgTimeByChar,l.minLength=s.minLength,s.onScanError.call(e,l),r=new CustomEvent("scanError",{detail:l}),e.dispatchEvent(r),n._reinitialize(e),!1},_mergeOptions:function(e,t){var n,r={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},_getNormalizedKeyNum:function(e){return e.which||e.keyCode},_handleKeyDown:function(e){var t=n._getNormalizedKeyNum(e),r=this.scannerDetectionData.options,o=this.scannerDetectionData.vars,s=!1;if(!1!==r.onKeyDetect.call(this,t,e)&&!n._isFocusOnIgnoredElement(this))if(!1===r.scanButtonKeyCode||t!=r.scanButtonKeyCode){switch(!0){case o.firstCharTime&&-1!==r.suffixKeyCodes.indexOf(t):e.preventDefault(),e.stopImmediatePropagation(),s=!0;break;case!o.firstCharTime&&-1!==r.prefixKeyCodes.indexOf(t):e.preventDefault(),e.stopImmediatePropagation(),s=!1;break;default:var i=r.keyCodeMapper.call(this,e);if(null===i)return;o.accumulatedString+=i,r.preventDefault&&e.preventDefault(),r.stopPropagation&&e.stopImmediatePropagation(),s=!1}o.firstCharTime||(o.firstCharTime=Date.now()),o.lastCharTime=Date.now(),o.testTimer&&clearTimeout(o.testTimer),s?(n._validateScanCode(this,o.accumulatedString),o.testTimer=!1):o.testTimer=setTimeout(n._validateScanCode,r.timeBeforeScanTest,this,o.accumulatedString),r.onKeyProcess.call(this,i,e)}else o.longPressed||(o.longPressTimer=setTimeout(r.onScanButtonLongPress,r.scanButtonLongPressTime,this),o.longPressed=!0)},_handlePaste:function(e){var t=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,o=(event.clipboardData||window.clipboardData).getData("text");n._isFocusOnIgnoredElement(this)||(e.preventDefault(),t.stopPropagation&&e.stopImmediatePropagation(),t.onPaste.call(this,o,event),r.firstCharTime=0,r.lastCharTime=0,n._validateScanCode(this,o))},_handleKeyUp:function(e){n._isFocusOnIgnoredElement(this)||n._getNormalizedKeyNum(e)==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)},isScanInProgressFor:function(e){return e.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(e){return void 0!==e.scannerDetectionData}},n)},am(cm={exports:{}}),cm.exports);const um=r=>{let{scope:o,redirectPath:s,onSuccess:i,onFailure:a,onCancel:c,storeSession:l,title:u,"data-testid":p}=r;const[h,f]=e.useState(""),[m,g]=e.useState(""),{releaseVersion:y,releasePageLink:v}=e.useContext(lh),_=n.useNavigate(),{t:S}=t.useTranslation(),w=function(e){try{return Promise.resolve(Xp.authorize(_p({scope:o},e),l)).then(function(e){e?(i&&"function"==typeof i&&i(e),g(""),_(s)):a&&"function"==typeof a&&a()})}catch(e){return Promise.reject(e)}};e.useEffect(()=>(lm.attachTo(document,{suffixKeyCodes:[13],onScan:function(e){f(""),g(""),w({username:"code",password:e})}}),()=>{lm.detachFrom(document)}),[]);const k=function(e){try{return e.preventDefault(),w({username:h,password:m}),Promise.resolve()}catch(e){return Promise.reject(e)}};/*#__PURE__*/return j.default.createElement("form",{onSubmit:k,"data-testid":p||"ac-sdk-login-form"},/*#__PURE__*/j.default.createElement(d.Box,{m:"0 80px"},/*#__PURE__*/j.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,m:"100px 0"},/*#__PURE__*/j.default.createElement(mm,null),y&&/*#__PURE__*/j.default.createElement(d.Link,{href:v,target:"_blank",fontSize:"14px",sx:{display:"flex",alignItems:"center",gap:.5,textDecoration:"none","&:hover":{cursor:"pointer",opacity:.8}}},/*#__PURE__*/j.default.createElement("img",{src:J.default,alt:"info",width:"14px",height:"14px"}),S("release")," ",y)),/*#__PURE__*/j.default.createElement(d.Box,{m:"0 0 30px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/j.default.createElement(d.Typography,{align:"center",color:"inherit"},u)),/*#__PURE__*/j.default.createElement(d.Box,{m:"0",display:"grid",sx:{gridGap:"18px"},gridTemplateColumns:"1fr"},/*#__PURE__*/j.default.createElement(d.FormControl,{fullWidth:!0},/*#__PURE__*/j.default.createElement(d.TextField,{autoFocus:!0,fullWidth:!0,variant:"outlined",placeholder:S("loginCardUsernameHint"),onChange:e=>{f(e.target.value)},value:h,id:"login-input",inputProps:{"data-testid":"ac-sdk-login-form-username-input"}})),/*#__PURE__*/j.default.createElement(d.FormControl,{fullWidth:!0},/*#__PURE__*/j.default.createElement(d.TextField,{fullWidth:!0,variant:"outlined",placeholder:S("loginCardPasswordHint"),onChange:e=>{g(e.target.value)},value:m,type:"password",id:"password-input",inputProps:{"data-testid":"ac-sdk-login-form-password-input"}})),/*#__PURE__*/j.default.createElement(b.LoadingButton,{id:"login-button",type:"submit",size:"large",color:"primary",onClick:k,loading:Xp.loading,"data-testid":"ac-sdk-login-form-submit-button"},S("loginCardSubmitButton")),/*#__PURE__*/j.default.createElement(d.Button,{id:"cancel-button",type:"button",size:"large",color:"secondary",onClick:e=>{c&&"function"==typeof c?c():_("/")},"data-testid":"ac-sdk-login-form-cancel-button"},S("loginCardCancelButton"))),/*#__PURE__*/j.default.createElement(d.Box,{m:"30px 0 40px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/j.default.createElement(d.Typography,{align:"center",color:"inherit"},"or scan")),/*#__PURE__*/j.default.createElement(d.Box,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",alignItems:"center",justifyItems:"center",marginBottom:"30px"},/*#__PURE__*/j.default.createElement(d.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/j.default.createElement(pm,null)),/*#__PURE__*/j.default.createElement(hm,null),/*#__PURE__*/j.default.createElement(d.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/j.default.createElement(fm,null)))))};um.propTypes={scope:a.PropTypes.string,redirectPath:a.PropTypes.string,onSuccess:a.PropTypes.func,onFailure:a.PropTypes.func,onCancel:a.PropTypes.func,storeSession:a.PropTypes.bool},um.defaultProps={redirectPath:"/",storeSession:!0};var dm=i.observer(um);const pm=()=>/*#__PURE__*/j.default.createElement("svg",{width:"51",height:"53",viewBox:"0 0 51 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/j.default.createElement("path",{d:"M8.66868 45.6365C8.66868 42.8453 6.99822 41.1535 4.7397 41.1535C2.47266 41.1535 0.806463 42.8453 0.806463 45.6365C0.806463 48.4234 2.47266 50.1194 4.7397 50.1194C5.3022 50.1194 5.82635 50.0172 6.2951 49.8169L7.04084 50.7842H8.38743L7.21129 49.2501C8.1147 48.4873 8.66868 47.243 8.66868 45.6365ZM4.29652 47.1706L5.53658 48.7984C5.28942 48.8794 5.02095 48.9177 4.7397 48.9177C3.23544 48.9177 2.1147 47.7629 2.1147 45.6365C2.1147 43.5101 3.23544 42.3552 4.7397 42.3552C6.2397 42.3552 7.3647 43.5101 7.3647 45.6365C7.3647 46.8297 7.01101 47.7203 6.43146 48.2657L5.59197 47.1706H4.29652ZM10.3104 50.0001H11.6271V46.6976H13.4169C13.4467 46.6976 13.4723 46.6976 13.5021 46.6976L15.2749 50.0001H16.7749L14.8402 46.4675C15.9098 46.0711 16.4425 45.1805 16.4425 44.0086C16.4425 42.4021 15.4453 41.2728 13.4212 41.2728H10.3104V50.0001ZM11.6271 45.564V42.4021H13.2805C14.5803 42.4021 15.1172 43.02 15.1172 44.0086C15.1172 44.993 14.5803 45.564 13.2976 45.564H11.6271ZM28.4691 44.1109C28.1708 42.2444 26.7092 41.1535 24.864 41.1535C22.6055 41.1535 20.9393 42.8453 20.9393 45.6365C20.9393 48.4277 22.5969 50.1194 24.864 50.1194C26.7816 50.1194 28.1836 48.9177 28.4691 47.1919L27.1396 47.1876C26.9137 48.3041 25.9762 48.9177 24.8725 48.9177C23.3768 48.9177 22.2475 47.7714 22.2475 45.6365C22.2475 43.5186 23.3725 42.3552 24.8768 42.3552C25.989 42.3552 26.9222 42.9817 27.1396 44.1109H28.4691ZM32.6996 50.1322C34.5447 50.1322 35.7507 48.7814 35.7507 46.7572C35.7507 44.7203 34.5447 43.3694 32.6996 43.3694C30.8544 43.3694 29.6484 44.7203 29.6484 46.7572C29.6484 48.7814 30.8544 50.1322 32.6996 50.1322ZM32.7038 49.0626C31.4979 49.0626 30.9354 48.0101 30.9354 46.753C30.9354 45.5001 31.4979 44.4348 32.7038 44.4348C33.9013 44.4348 34.4638 45.5001 34.4638 46.753C34.4638 48.0101 33.9013 49.0626 32.7038 49.0626ZM39.6232 50.128C40.8164 50.128 41.2852 49.3993 41.5153 48.9817H41.6218V50.0001H42.8661V41.2728H41.592V44.5157H41.5153C41.2852 44.1109 40.8505 43.3694 39.6317 43.3694C38.0508 43.3694 36.8874 44.618 36.8874 46.7402C36.8874 48.8581 38.0337 50.128 39.6232 50.128ZM39.9045 49.0413C38.7667 49.0413 38.1744 48.0399 38.1744 46.7274C38.1744 45.4277 38.7539 44.4518 39.9045 44.4518C41.0167 44.4518 41.6133 45.3595 41.6133 46.7274C41.6133 48.1038 41.0039 49.0413 39.9045 49.0413ZM47.5057 50.1322C48.9332 50.1322 49.9432 49.4291 50.233 48.3638L49.027 48.1464C48.7969 48.7643 48.2429 49.0797 47.5185 49.0797C46.4276 49.0797 45.6946 48.3723 45.6605 47.1109H50.3139V46.6592C50.3139 44.2942 48.8991 43.3694 47.4162 43.3694C45.5923 43.3694 44.3906 44.7586 44.3906 46.77C44.3906 48.8027 45.5753 50.1322 47.5057 50.1322ZM45.6648 46.1564C45.7159 45.2274 46.3892 44.422 47.4247 44.422C48.4134 44.422 49.0611 45.155 49.0653 46.1564H45.6648Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("g",{clipPath:"url(#clip0_2183_35009)"},/*#__PURE__*/j.default.createElement("path",{d:"M22.3002 3.27948H14.25V11.3318H22.3002V3.27948ZM20.6609 9.66275H15.9186V4.91923H20.6609V9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M19.1081 6.47128H17.4688V8.11102H19.1081V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M14.2773 24.7206H22.3275V16.7122H14.2773V24.7206ZM15.9166 18.3373H20.6589V23.0809H15.9166V18.3373Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M35.7147 17.5176H34.0754V23.081H32.4653V21.8366H30.826V23.0591H28.8281V24.6988H35.7147V17.5176Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M19.1081 19.8893H17.4688V21.529H19.1081V19.8893Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M35.7142 3.27948H27.6641V11.3318H35.7142V3.27948ZM34.0749 9.66275H29.318V4.91923H34.0603L34.0749 9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M32.5221 6.47128H30.8828V8.11102H32.5221V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M22.3014 13.184H17.5664V14.8237H22.3014V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M15.9167 13.184H14.2773V14.8237H15.9167V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M30.041 13.184H23.9375V14.8237H30.041V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M35.7121 15.8778V13.1766H31.6797V14.8237H34.0728V15.8778H35.7121Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M25.819 6.56622H24.1797V11.3024H25.819V6.56622Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M25.819 3.27948H24.1797V4.91922H25.819V3.27948Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M25.82 21.4338H27.0348V19.7941H25.82V16.7122H24.1953V24.7645H27.1958V23.0809H25.8346L25.82 21.4338Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M29.1874 19.5598H30.8267V18.3373H32.1587V16.7122H27.8555V18.352H29.1874V19.5598Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M33.2539 6.42268e-05V1.6398H37.3668V5.73182H39.0061V-0.00726318L33.2539 6.42268e-05Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M12.6408 1.63985H16.7391V0.00012207H11.0234V5.73188H12.6627L12.6408 1.63985Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M37.3678 26.3603H33.2695V28.0001H39.0071V22.261H37.3678V26.3603Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M12.6408 22.261H11.0234V28.0001H16.761V26.3603H12.6627L12.6408 22.261Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/j.default.createElement("defs",null,/*#__PURE__*/j.default.createElement("clipPath",{id:"clip0_2183_35009"},/*#__PURE__*/j.default.createElement("rect",{width:"28",height:"28",fill:"white",transform:"translate(11 0.00012207)"})))),hm=()=>/*#__PURE__*/j.default.createElement("svg",{width:"52",height:"49",viewBox:"0 0 52 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/j.default.createElement("path",{d:"M1.42951 46.0001H4.77468C6.80309 46.0001 7.71928 44.9902 7.71928 43.6521C7.71928 42.3013 6.77326 41.5385 5.9082 41.4916V41.4064C6.70934 41.2018 7.37837 40.6564 7.37837 39.5655C7.37837 38.2743 6.48349 37.2728 4.62553 37.2728H1.42951V46.0001ZM2.74627 44.8709V42.0754H4.69371C5.75053 42.0754 6.41104 42.7572 6.41104 43.5882C6.41104 44.3211 5.91246 44.8709 4.64684 44.8709H2.74627ZM2.74627 41.0484V38.3936H4.54457C5.5886 38.3936 6.08718 38.9433 6.08718 39.6677C6.08718 40.5115 5.39684 41.0484 4.51048 41.0484H2.74627ZM11.0836 46.145C12.166 46.145 12.7754 45.5953 13.0183 45.1052H13.0694V46.0001H14.3137V41.6535C14.3137 39.7487 12.8137 39.3694 11.774 39.3694C10.5893 39.3694 9.4984 39.8467 9.07227 41.0399L10.2697 41.3126C10.4572 40.8481 10.9345 40.4007 11.791 40.4007C12.6135 40.4007 13.0353 40.8311 13.0353 41.5726V41.6024C13.0353 42.0669 12.5581 42.0584 11.3819 42.1947C10.1419 42.3396 8.87198 42.6635 8.87198 44.1507C8.87198 45.4376 9.83931 46.145 11.0836 46.145ZM11.3606 45.1223C10.6404 45.1223 10.1206 44.7984 10.1206 44.1677C10.1206 43.4859 10.7257 43.243 11.4629 43.145C11.8762 43.0896 12.8564 42.9788 13.0396 42.7956V43.6393C13.0396 44.4149 12.4217 45.1223 11.3606 45.1223ZM16.0108 46.0001H17.285V42.003C17.285 41.1464 17.9455 40.5285 18.8489 40.5285C19.1131 40.5285 19.4114 40.5754 19.5137 40.6052V39.3865C19.3858 39.3694 19.1344 39.3567 18.9725 39.3567C18.2054 39.3567 17.5492 39.7913 17.3105 40.4944H17.2424V39.4547H16.0108V46.0001ZM26.5492 46.1322C28.0961 46.1322 29.0975 45.2032 29.2381 43.9291H27.998C27.8361 44.6365 27.2864 45.0541 26.5577 45.0541C25.4796 45.0541 24.785 44.155 24.785 42.7274C24.785 41.3254 25.4924 40.4433 26.5577 40.4433C27.3674 40.4433 27.8617 40.9547 27.998 41.5683H29.2381C29.1017 40.2473 28.0236 39.3694 26.5364 39.3694C24.6912 39.3694 23.498 40.7586 23.498 42.7572C23.498 44.7302 24.6486 46.1322 26.5492 46.1322ZM33.3578 46.1322C35.2029 46.1322 36.4089 44.7814 36.4089 42.7572C36.4089 40.7203 35.2029 39.3694 33.3578 39.3694C31.5126 39.3694 30.3066 40.7203 30.3066 42.7572C30.3066 44.7814 31.5126 46.1322 33.3578 46.1322ZM33.362 45.0626C32.1561 45.0626 31.5936 44.0101 31.5936 42.753C31.5936 41.5001 32.1561 40.4348 33.362 40.4348C34.5595 40.4348 35.122 41.5001 35.122 42.753C35.122 44.0101 34.5595 45.0626 33.362 45.0626ZM40.2814 46.128C41.4746 46.128 41.9434 45.3993 42.1735 44.9817H42.28V46.0001H43.5243V37.2728H42.2502V40.5157H42.1735C41.9434 40.1109 41.5087 39.3694 40.29 39.3694C38.709 39.3694 37.5456 40.618 37.5456 42.7402C37.5456 44.8581 38.6919 46.128 40.2814 46.128ZM40.5627 45.0413C39.4249 45.0413 38.8326 44.0399 38.8326 42.7274C38.8326 41.4277 39.4121 40.4518 40.5627 40.4518C41.6749 40.4518 42.2715 41.3595 42.2715 42.7274C42.2715 44.1038 41.6621 45.0413 40.5627 45.0413ZM48.1639 46.1322C49.5914 46.1322 50.6014 45.4291 50.8912 44.3638L49.6852 44.1464C49.4551 44.7643 48.9011 45.0797 48.1767 45.0797C47.0858 45.0797 46.3528 44.3723 46.3187 43.1109H50.9721V42.6592C50.9721 40.2942 49.5574 39.3694 48.0744 39.3694C46.2505 39.3694 45.0488 40.7586 45.0488 42.77C45.0488 44.8027 46.2335 46.1322 48.1639 46.1322ZM46.323 42.1564C46.3741 41.2274 47.0474 40.422 48.0829 40.422C49.0716 40.422 49.7193 41.155 49.7235 42.1564H46.323Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("g",{clipPath:"url(#clip0_2183_35008)"},/*#__PURE__*/j.default.createElement("path",{d:"M47 9.00012H7V10.0001H47V9.00012Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M43 0.00012207H42V7.00012H43V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M43 12.0001H42V19.0001H43V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M41 12.0001H39V19.0001H41V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M41 0.00012207H39V7.00012H41V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M38 0.00012207H35V7.00012H38V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M38 12.0001H35V19.0001H38V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M33 12.0001H31V19.0001H33V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M33 0.00012207H31V7.00012H33V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M30 0.00012207H28V7.00012H30V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M30 12.0001H28V19.0001H30V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M27 0.00012207H26V7.00012H27V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M27 12.0001H26V19.0001H27V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M25 0.00012207H24V7.00012H25V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M25 12.0001H24V19.0001H25V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M23 0.00012207H20V7.00012H23V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M23 12.0001H20V19.0001H23V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M18 0.00012207H16V7.00012H18V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M18 12.0001H16V19.0001H18V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M15 12.0001H14V19.0001H15V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M15 0.00012207H14V7.00012H15V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M13 0.00012207H10V7.00012H13V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("path",{d:"M13 12.0001H10V19.0001H13V12.0001Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/j.default.createElement("defs",null,/*#__PURE__*/j.default.createElement("clipPath",{id:"clip0_2183_35008"},/*#__PURE__*/j.default.createElement("rect",{width:"40",height:"20",fill:"white",transform:"translate(7 0.00012207)"})))),fm=()=>/*#__PURE__*/j.default.createElement("svg",{width:"58",height:"49",viewBox:"0 0 58 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/j.default.createElement("path",{d:"M1.27131 46.0001H2.58807V42.6976H4.37784C4.40767 42.6976 4.43324 42.6976 4.46307 42.6976L6.2358 46.0001H7.7358L5.80114 42.4675C6.87074 42.0711 7.40341 41.1805 7.40341 40.0086C7.40341 38.4021 6.40625 37.2728 4.3821 37.2728H1.27131V46.0001ZM2.58807 41.564V38.4021H4.24148C5.54119 38.4021 6.07812 39.02 6.07812 40.0086C6.07812 40.993 5.54119 41.564 4.25852 41.564H2.58807ZM10.3224 37.2728H9.00568V46.0001H10.3224V37.2728ZM12.2401 46.0001H13.5568V42.1947H17.2642V41.0655H13.5568V38.4064H17.652V37.2728H12.2401V46.0001ZM22.0966 46.0001C24.7557 46.0001 26.294 44.351 26.294 41.6237C26.294 38.9092 24.7557 37.2728 22.1861 37.2728H19.2713V46.0001H22.0966ZM20.5881 44.8496V38.4234H22.1051C24.0142 38.4234 24.9986 39.5655 24.9986 41.6237C24.9986 43.6905 24.0142 44.8496 22.0241 44.8496H20.5881ZM38.3558 40.1109C38.0575 38.2444 36.5959 37.1535 34.7507 37.1535C32.4922 37.1535 30.826 38.8453 30.826 41.6365C30.826 44.4277 32.4837 46.1194 34.7507 46.1194C36.6683 46.1194 38.0703 44.9177 38.3558 43.1919L37.0263 43.1876C36.8004 44.3041 35.8629 44.9177 34.7592 44.9177C33.2635 44.9177 32.1342 43.7714 32.1342 41.6365C32.1342 39.5186 33.2592 38.3552 34.7635 38.3552C35.8757 38.3552 36.8089 38.9817 37.0263 40.1109H38.3558ZM41.734 46.145C42.8164 46.145 43.4258 45.5953 43.6687 45.1052H43.7198V46.0001H44.9641V41.6535C44.9641 39.7487 43.4641 39.3694 42.4244 39.3694C41.2397 39.3694 40.1488 39.8467 39.7227 41.0399L40.9201 41.3126C41.1076 40.8481 41.5849 40.4007 42.4414 40.4007C43.2638 40.4007 43.6857 40.8311 43.6857 41.5726V41.6024C43.6857 42.0669 43.2085 42.0584 42.0323 42.1947C40.7923 42.3396 39.5224 42.6635 39.5224 44.1507C39.5224 45.4376 40.4897 46.145 41.734 46.145ZM42.011 45.1223C41.2908 45.1223 40.771 44.7984 40.771 44.1677C40.771 43.4859 41.3761 43.243 42.1133 43.145C42.5266 43.0896 43.5067 42.9788 43.69 42.7956V43.6393C43.69 44.4149 43.0721 45.1223 42.011 45.1223ZM46.6612 46.0001H47.9354V42.003C47.9354 41.1464 48.5959 40.5285 49.4993 40.5285C49.7635 40.5285 50.0618 40.5754 50.1641 40.6052V39.3865C50.0362 39.3694 49.7848 39.3567 49.6229 39.3567C48.8558 39.3567 48.1996 39.7913 47.9609 40.4944H47.8928V39.4547H46.6612V46.0001ZM53.4826 46.128C54.6758 46.128 55.1445 45.3993 55.3746 44.9817H55.4812V46.0001H56.7255V37.2728H55.4513V40.5157H55.3746C55.1445 40.1109 54.7099 39.3694 53.4911 39.3694C51.9102 39.3694 50.7468 40.618 50.7468 42.7402C50.7468 44.8581 51.8931 46.128 53.4826 46.128ZM53.7638 45.0413C52.6261 45.0413 52.0337 44.0399 52.0337 42.7274C52.0337 41.4277 52.6133 40.4518 53.7638 40.4518C54.8761 40.4518 55.4727 41.3595 55.4727 42.7274C55.4727 44.1038 54.8633 45.0413 53.7638 45.0413Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/j.default.createElement("g",{clipPath:"url(#clip0_2183_35036)"},/*#__PURE__*/j.default.createElement("path",{d:"M19.5998 19.9927H38.3927C40.7673 19.9927 41.9924 18.8037 41.9924 16.5215V3.47133C41.9924 1.1892 40.7673 0.00012207 38.3927 0.00012207H19.5998C17.2251 0.00012207 16 1.17443 16 3.47133V16.5215C16 18.8037 17.2251 19.9927 19.5998 19.9927ZM19.7283 17.8953C19.5129 17.9222 19.294 17.9003 19.0886 17.8313C18.8832 17.7623 18.6969 17.648 18.544 17.4973C18.3911 17.3466 18.2759 17.1635 18.2072 16.9623C18.1385 16.761 18.1181 16.547 18.1478 16.3369V3.64857C18.1197 3.43872 18.1411 3.22539 18.2104 3.02486C18.2796 2.82432 18.3949 2.6419 18.5474 2.49154C18.6999 2.34118 18.8856 2.22684 19.0903 2.15729C19.295 2.08774 19.5132 2.06481 19.7283 2.09024H38.2641C38.4792 2.06481 38.6975 2.08774 38.9022 2.15729C39.1068 2.22684 39.2925 2.34118 39.445 2.49154C39.5975 2.6419 39.7128 2.82432 39.7821 3.02486C39.8513 3.22539 39.8728 3.43872 39.8447 3.64857V16.3369C39.8728 16.5468 39.8513 16.7601 39.7821 16.9606C39.7128 17.1612 39.5975 17.3436 39.445 17.494C39.2925 17.6443 39.1068 17.7586 38.9022 17.8282C38.6975 17.8977 38.4792 17.9207 38.2641 17.8953H19.7283ZM24.5759 9.93366C24.9027 9.92527 25.2245 9.85291 25.5221 9.72085C25.8197 9.58879 26.0872 9.39974 26.3086 9.16488C26.5301 8.93003 26.701 8.65415 26.8112 8.3536C26.9215 8.05305 26.9689 7.73395 26.9505 7.41519C26.9123 6.96482 26.7407 6.53505 26.4565 6.1784C26.1723 5.82175 25.7879 5.55367 25.3502 5.40689C24.9125 5.26012 24.4405 5.24101 23.9919 5.3519C23.5433 5.46279 23.1375 5.69889 22.8241 6.03133C22.5106 6.36378 22.3031 6.77819 22.2269 7.22393C22.1506 7.66967 22.2089 8.12746 22.3947 8.54135C22.5805 8.95524 22.8858 9.3073 23.2731 9.55456C23.6605 9.80182 24.1132 9.93355 24.5759 9.93366ZM31.6091 6.54371H37.3112C37.4038 6.54577 37.4958 6.52936 37.5817 6.49548C37.6676 6.46159 37.7455 6.41095 37.8106 6.34665C37.8757 6.28235 37.9268 6.20575 37.9605 6.12153C37.9943 6.03731 38.0101 5.94725 38.007 5.85686C38.008 5.76802 37.9907 5.67989 37.9559 5.5978C37.9211 5.51571 37.8697 5.44134 37.8047 5.37922C37.7396 5.31709 37.6624 5.2685 37.5776 5.23634C37.4927 5.20419 37.4021 5.18914 37.3112 5.19214H31.6469C31.556 5.18914 31.4654 5.20419 31.3806 5.23634C31.2958 5.2685 31.2185 5.31709 31.1535 5.37922C31.0885 5.44134 31.037 5.51571 31.0022 5.5978C30.9674 5.67989 30.9501 5.76802 30.9511 5.85686C30.948 5.94725 30.9638 6.03731 30.9976 6.12153C31.0313 6.20575 31.0824 6.28235 31.1475 6.34665C31.2126 6.41095 31.2905 6.46159 31.3764 6.49548C31.4623 6.52936 31.5543 6.54577 31.6469 6.54371H31.6091ZM31.6091 10.6796H37.3112C37.4957 10.6796 37.6727 10.608 37.8032 10.4806C37.9337 10.3532 38.007 10.1803 38.007 10.0001C38.007 9.81992 37.9337 9.64709 37.8032 9.51967C37.6727 9.39224 37.4957 9.32065 37.3112 9.32065H31.6469C31.4624 9.32065 31.2854 9.39224 31.1549 9.51967C31.0245 9.64709 30.9511 9.81992 30.9511 10.0001C30.9511 10.1803 31.0245 10.3532 31.1549 10.4806C31.2854 10.608 31.4624 10.6796 31.6469 10.6796H31.6091ZM20.4392 14.8081H28.7126C28.796 14.8129 28.8794 14.7998 28.9571 14.7699C29.0347 14.74 29.1048 14.6939 29.1624 14.6349C29.22 14.5758 29.2637 14.5052 29.2905 14.428C29.3173 14.3508 29.3265 14.2688 29.3176 14.1877C29.3176 13.1907 27.8051 10.6501 24.5759 10.6501C21.3467 10.6501 19.8494 13.1907 19.8494 14.1877C19.8394 14.2678 19.8473 14.3489 19.8728 14.4256C19.8983 14.5023 19.9406 14.5726 19.9967 14.6317C20.0529 14.6908 20.1216 14.7372 20.198 14.7677C20.2745 14.7981 20.3567 14.8119 20.4392 14.8081ZM31.6091 14.8081H37.3112C37.4021 14.8111 37.4927 14.7961 37.5776 14.7639C37.6624 14.7318 37.7396 14.6832 37.8047 14.621C37.8697 14.5589 37.9211 14.4846 37.9559 14.4025C37.9907 14.3204 38.008 14.2322 38.007 14.1434C38.009 14.0529 37.9925 13.963 37.9584 13.8789C37.9243 13.7947 37.8734 13.718 37.8086 13.6534C37.7438 13.5887 37.6664 13.5373 37.581 13.5023C37.4956 13.4672 37.4039 13.4492 37.3112 13.4492H31.6469C31.5542 13.4492 31.4625 13.4672 31.3771 13.5023C31.2917 13.5373 31.2143 13.5887 31.1495 13.6534C31.0847 13.718 31.0338 13.7947 30.9997 13.8789C30.9656 13.963 30.9491 14.0529 30.9511 14.1434C30.9501 14.2322 30.9674 14.3204 31.0022 14.4025C31.037 14.4846 31.0885 14.5589 31.1535 14.621C31.2185 14.6832 31.2958 14.7318 31.3806 14.7639C31.4654 14.7961 31.556 14.8111 31.6469 14.8081H31.6091Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/j.default.createElement("defs",null,/*#__PURE__*/j.default.createElement("clipPath",{id:"clip0_2183_35036"},/*#__PURE__*/j.default.createElement("rect",{width:"26",height:"20",fill:"white",transform:"translate(16 0.00012207)"})))),mm=()=>/*#__PURE__*/j.default.createElement("svg",{width:"98",height:"50",viewBox:"0 0 98 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/j.default.createElement("g",{opacity:"0.25"},/*#__PURE__*/j.default.createElement("path",{d:"M66.8428 0.85791C66.2106 2.00303 65.7681 3.21177 65.3888 4.48413C64.883 4.54775 64.4405 4.61136 63.998 4.67498C63.5555 4.80222 63.0497 4.92945 62.6072 5.05669C61.8486 4.0388 61.0267 3.08453 60.0784 2.19388C59.4463 2.51197 58.8141 2.83006 58.1819 3.27539C58.3716 4.54774 58.6876 5.8201 59.1302 7.09246C58.7509 7.41055 58.4348 7.72864 58.1187 8.11034C57.8026 8.49205 57.4865 8.81014 57.2336 9.25547C56.0325 8.87376 54.7681 8.55567 53.5038 8.42843C53.1245 9.06461 52.8716 9.76441 52.6187 10.4006C53.5038 11.3549 54.5153 12.1819 55.59 12.8817C55.3371 13.8359 55.2107 14.7902 55.2739 15.7445C54.0727 16.1262 52.8716 16.6351 51.7969 17.2713C51.8601 17.9711 51.9865 18.7345 52.2394 19.4343C53.5038 19.6888 54.8313 19.7524 56.0957 19.6888C56.2854 20.1341 56.475 20.5794 56.7279 20.9611C56.9808 21.4065 57.2336 21.7882 57.4865 22.1699C56.7279 23.1878 56.0957 24.3329 55.5267 25.478C56.0325 25.987 56.5382 26.4959 57.1072 26.9412C58.2451 26.3687 59.383 25.6689 60.3945 24.8418C60.7738 25.0963 61.2164 25.3508 61.6589 25.5416C62.1014 25.7325 62.544 25.9233 62.9865 26.0506C62.9865 27.3229 63.1129 28.5953 63.3658 29.8676C64.0612 29.9949 64.8198 30.1221 65.5152 30.1221C66.1474 28.977 66.5899 27.7683 66.9692 26.4959C67.475 26.4323 67.9175 26.3687 68.36 26.305C68.8026 26.1778 69.3083 26.0506 69.7508 25.9233C70.5094 26.9412 71.3313 27.8955 72.2796 28.7861C72.9117 28.4681 73.5439 28.15 74.1761 27.7046C73.9864 26.4323 73.6704 25.1599 73.2278 23.8876C73.6071 23.5695 73.9232 23.2514 74.2393 22.8697C74.5554 22.488 74.8715 22.1699 75.1244 21.7246C76.3255 22.1063 77.5899 22.4244 78.8543 22.5516C79.2336 21.9154 79.4864 21.2156 79.7393 20.5794C78.8542 19.6252 77.8428 18.7981 76.7681 18.0983C77.0209 17.1441 77.1474 16.1898 77.0841 15.2355C78.2853 14.8538 79.4864 14.3449 80.5611 13.7087C80.4979 13.0089 80.3715 12.2455 80.1186 11.5457C78.8543 11.2912 77.5267 11.2276 76.2623 11.2912C76.0727 10.8459 75.883 10.4006 75.6301 10.0189C75.3773 9.57355 75.1244 9.19185 74.8715 8.81014C75.6301 7.79225 76.2623 6.64713 76.8313 5.50201C76.3255 4.99307 75.8198 4.48413 75.2508 4.0388C74.1129 4.61136 72.975 5.31116 71.9635 6.13819C71.5842 5.88372 71.1416 5.62925 70.6991 5.4384C70.2566 5.24754 69.8141 5.05669 69.3715 4.92945C69.3715 3.6571 69.2451 2.38474 68.9922 1.11238C68.2336 0.985147 67.5382 0.85791 66.8428 0.85791ZM68.929 9.25547C72.3428 10.8459 73.7968 14.8538 72.2796 18.2256C71.3945 20.1977 69.6244 21.5973 67.5382 22.0427C66.1474 22.2971 64.6934 22.1699 63.429 21.5973C60.0152 20.0069 58.5612 15.999 60.0784 12.6272C60.9635 10.6551 62.7336 9.25546 64.8198 8.81014C66.2106 8.49205 67.6646 8.6829 68.929 9.25547Z",fill:"white"}),/*#__PURE__*/j.default.createElement("path",{d:"M6.03298 22.8689L5.02149 29.2307H0.722656L5.4008 1.55695H11.0904L15.7054 29.2307H11.3433L10.395 22.8689H6.03298ZM8.1824 7.85511L6.66517 18.7974H9.76286L8.1824 7.85511Z",fill:"white"}),/*#__PURE__*/j.default.createElement("path",{d:"M23.861 1.49487L29.361 20.0713V1.49487H33.5334V29.1686H29.1081L23.4185 11.4193V29.1686H19.2461V1.49487H23.861Z",fill:"white"}),/*#__PURE__*/j.default.createElement("path",{d:"M50.2261 22.5524C50.2261 24.3337 49.5307 25.9878 48.3295 27.1965C47.1284 28.4688 45.4847 29.1686 43.7146 29.1686H37.2031V1.49487H43.7146C45.4847 1.49487 47.1284 2.19467 48.3295 3.46703C49.5939 4.67577 50.2261 6.39345 50.2261 8.11113V22.5524ZM41.3123 25.0971H43.7778C44.41 25.0971 45.0422 24.8426 45.4215 24.3973C45.864 23.952 46.1169 23.3158 46.1169 22.6796V8.17475C46.1169 7.53857 45.864 6.90239 45.4215 6.45707C44.979 6.01174 44.41 5.75727 43.7778 5.75727H41.3123V25.0971Z",fill:"white"}),/*#__PURE__*/j.default.createElement("path",{d:"M4.83183 49.0815C2.55598 49.0815 0.722656 47.2366 0.722656 45.01C0.722656 45.01 0.722656 45.01 0.722656 44.9464V35.5309C0.722656 33.2407 2.49276 31.3958 4.76862 31.3322C7.04447 31.2685 8.8778 33.1135 8.94101 35.4037C8.94101 35.4673 8.94101 35.4673 8.94101 35.5309V37.5031H6.28585V35.4673C6.28585 34.6403 5.59045 33.9405 4.76862 33.9405C4.38931 33.9405 4.01 34.0677 3.69391 34.3858C3.44104 34.6403 3.25138 35.022 3.25138 35.4673V44.9464C3.25138 45.7734 3.88356 46.4096 4.7054 46.4096C5.08471 46.4096 5.46402 46.2824 5.78011 45.9643C6.0962 45.7098 6.22263 45.3281 6.22263 44.8828V42.5289H8.94101V44.9464C8.94101 47.2366 7.10769 49.0815 4.83183 49.0815Z",fill:"white"}),/*#__PURE__*/j.default.createElement("path",{d:"M30.1227 48.8867H23.1055V31.6463H25.6974V46.342H30.1859L30.1227 48.8867Z",fill:"white"}),/*#__PURE__*/j.default.createElement("path",{d:"M48.0115 31.4559C50.2874 31.4559 52.1207 33.3009 52.1207 35.5911V45.0065C52.1207 47.2968 50.2874 49.1417 48.0115 49.1417C46.9368 49.1417 45.8621 48.6964 45.1035 47.933C44.3449 47.1696 43.9023 46.088 43.9023 45.0065V35.5911C43.9023 33.3009 45.7357 31.4559 48.0115 31.4559ZM49.4023 35.5275C49.4023 34.7004 48.7701 34.0643 47.9483 34.0643C47.569 34.0643 47.1897 34.1915 46.8736 34.5096C46.5575 34.7641 46.4311 35.1458 46.4311 35.5911V45.0065C46.4311 45.3883 46.5575 45.77 46.8736 46.0244C47.1265 46.2789 47.5058 46.4698 47.9483 46.4698C48.7701 46.4698 49.4023 45.8336 49.4023 45.0065V35.5275Z",fill:"white"}),/*#__PURE__*/j.default.createElement("path",{d:"M70.4451 49.0776C68.2325 49.0776 66.3992 47.2963 66.3359 45.0061V31.6463H68.8647V45.0061C68.8647 45.3878 68.9911 45.7695 69.3072 46.0876C69.5601 46.342 69.9394 46.5329 70.3819 46.5329C71.2037 46.5329 71.8359 45.8967 71.8359 45.0697V31.7099H74.5543V45.0697C74.5543 46.1512 74.1118 47.2327 73.3531 47.9961C72.5945 48.6959 71.583 49.1412 70.4451 49.0776Z",fill:"white"}),/*#__PURE__*/j.default.createElement("path",{d:"M97.0021 44.7516C97.0021 45.8331 96.5595 46.9146 95.8009 47.678C95.0423 48.4414 94.0308 48.8867 92.9561 48.8867H88.9102V31.6463H92.9561C94.0308 31.6463 95.1055 32.0916 95.8009 32.855C96.5595 33.6185 97.0021 34.7 97.0021 35.7815V44.7516ZM91.5021 46.342H93.0826C93.4619 46.342 93.8412 46.2148 94.094 45.8967C94.3469 45.6422 94.5366 45.2605 94.5366 44.8152V35.7815C94.5366 35.3998 94.4101 35.018 94.094 34.7C93.8412 34.4455 93.4619 34.2546 93.0826 34.2546H91.5021V46.342Z",fill:"white"}),/*#__PURE__*/j.default.createElement("path",{d:"M87.2555 1.49487L92.7555 20.0713V1.49487H96.9279V29.1686H92.5027L86.813 11.4193V29.1686H82.6406V1.49487H87.2555Z",fill:"white"}))),gm=e=>{let{open:n,subtitle:r,scope:o,redirectPath:s,onSuccess:i,onFailure:a,onCancel:c,storeSession:l,"data-testid":u}=e;const{t:d}=t.useTranslation();/*#__PURE__*/return j.default.createElement(G.default,{open:n,onClose:c,disableEscapeKeyDown:!0,"data-testid":u||"ac-sdk-login-modal"},/*#__PURE__*/j.default.createElement(Y.default,null,/*#__PURE__*/j.default.createElement(dm,{title:void 0!==r?r:d("loginFormText"),scope:o,redirectPath:s,onSuccess:i,onFailure:a,onCancel:c,storeSession:l})))};gm.propTypes={title:a.PropTypes.string,subtitle:a.PropTypes.string,scope:a.PropTypes.string,redirectPath:a.PropTypes.string,onSuccess:a.PropTypes.func,onFailure:a.PropTypes.func,onCancel:a.PropTypes.func,storeSession:a.PropTypes.bool},gm.defaultProps={redirectPath:"/",storeSession:!1};var ym=i.observer(gm);const vm=t=>{let{isOpen:n,title:r,subtitle:o,scope:s,redirectPath:i,onSuccess:a,onFailure:c,onCancel:l,storeSession:u=!0}=t;const[d,p]=e.useState(n);return e.useEffect(()=>{p(n)},[n]),/*#__PURE__*/j.default.createElement(ym,{open:d,title:r,subtitle:o,scope:s,redirectPath:i,onSuccess:e=>{a&&"function"==typeof a&&a(e),p(!1)},onFailure:c,onCancel:()=>{l&&"function"==typeof l&&l(),p(!1)},storeSession:u})},bm=function(e,t){void 0===t&&(t={});const{loginUrl:n,clientId:r,grantType:o,redirectUri:s,redirectPath:i}=ch(),[a]=rh(vm,_p({scope:e},t)),{redirectPath:c}=t,l=encodeURIComponent(s+"?next="+(c||i));return"password"===o?()=>{a({key:(new Date).getTime()})}:()=>{window.location.assign(n+"?response_type=code&client_id="+r+"&redirect_uri="+l+"&scope="+e)}};var _m=Object.getOwnPropertySymbols,Sm=Object.prototype.hasOwnProperty,wm=Object.prototype.propertyIsEnumerable,km=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var i in n=Object(arguments[s]))Sm.call(n,i)&&(o[i]=n[i]);if(_m){r=_m(n);for(var a=0;a<r.length;a++)wm.call(n,r[a])&&(o[r[a]]=n[r[a]])}}return o};const Em=({url:e,allowFullScreen:t,position:n,display:r,height:o,width:s,overflow:i,styles:a,onLoad:c,onMouseOver:l,onMouseOut:u,scrolling:d,id:p,frameBorder:h,ariaHidden:f,sandbox:m,allow:g,className:y,title:v,ariaLabel:b,ariaLabelledby:_,name:S,target:w,loading:k,importance:E,referrerpolicy:C,allowpaymentrequest:x,src:T,key:I})=>{const M=km({src:T||e,target:w||null,style:{position:n||null,display:r||"initial",overflow:i||null},scrolling:d||null,allowpaymentrequest:x||null,importance:E||null,sandbox:m&&[...m].join(" ")||null,loading:k||null,styles:a||null,name:S||null,className:y||null,allowFullScreen:"allowFullScreen",referrerpolicy:C||null,title:v||null,allow:g||null,id:p||null,"aria-labelledby":_||null,"aria-hidden":f||null,"aria-label":b||null,width:s||null,height:o||null,onLoad:c||null,onMouseOver:l||null,onMouseOut:u||null,key:I||"iframe"});let O=Object.create(null);for(let e of Object.keys(M))null!=M[e]&&(O[e]=M[e]);for(let e of Object.keys(O.style))null==O.style[e]&&delete O.style[e];if(O.styles)for(let e of Object.keys(O.styles))O.styles.hasOwnProperty(e)&&(O.style[e]=O.styles[e]),Object.keys(O.styles).pop()==e&&delete O.styles;if(t)if("allow"in O){const e=O.allow.replace("fullscreen","");O.allow=`fullscreen ${e.trim()}`.trim()}else O.allow="fullscreen";return h>=0&&(O.style.hasOwnProperty("border")||(O.style.border=h)),j.default.createElement("iframe",Object.assign({},O))},Cm=e=>{let{src:t}=e;/*#__PURE__*/return j.default.createElement(Em,{src:t,width:"100%",frameBorder:"0",styles:{display:"block",height:"calc(100vh - 70px)"}})},xm=r=>{let{position:o,scrolled:i,showAcLogo:a,leadingText:c,title:l,titleStyles:u,navProps:d,userProps:p,menuProps:h,sidebarEnabled:f,sidebarOpen:m,onSidebarToggle:g,styles:y,"data-testid":v}=r;const{baseUrl:b}=ch(),_=s.useTheme(),S=de.default(_.breakpoints.up("md")),{t:w}=t.useTranslation(),{items:k}=_p({items:[]},d),{show:E,showCompanyLogo:x}=_p({show:!0,showCompanyLogo:!1},p),{items:T,buttonColor:I,dropdownStyles:M,styles:O}=_p({items:[],buttonColor:"white",dropdownStyles:{},styles:{}},h),[P,R]=e.useState(new Date),[A,D]=e.useState(null),L=(e=>{let{styles:t,titleStyles:n,menuStyles:r,menuDropdownStyles:o}=e;return{root:_p({padding:"10px 0",color:"rgba(255,255,255,0.85)",background:"transparent",zIndex:1201},t),leadingText:{display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"2",maxHeight:"2em",marginRight:"8px",lineHeight:"1em",overflow:"hidden",textOverflow:"ellipsis"},title:_p({display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"2",maxHeight:"2em",marginRight:"8px",lineHeight:"1em",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},n),nav:{marginRight:"10px"},user:{},userInfo:{marginLeft:"0.5em",color:"rgba(255,255,255,0.5)"},button:{height:"50px",marginRight:"10px",fontSize:"16px",fontWeight:600,backgroundColor:"rgba(79, 79, 79, 1)",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.28)",borderRadius:"4px","&:hover":{backgroundColor:"rgba(79, 79, 79, 1)",filter:"brightness(1.1)"}},loginButton:{padding:"6px 18px"},logoutButton:{paddingRight:"18px"},menu:_p({marginTop:"70px",backgroundColor:"rgba(0,0,0,0.5)"},r,{"& .MuiPaper-root":_p({minWidth:"20%",backgroundColor:"#2d2d2d",color:"white"},o)})}})({styles:y,titleStyles:u,menuStyles:O,menuDropdownStyles:M}),N=n.useNavigate();e.useEffect(()=>{const e=setInterval(()=>{R(new Date)},1e3);return()=>clearInterval(e)});const H=()=>{D(null)},$=e=>{e.url?N(e.url):e.action&&"function"==typeof e.action&&e.action(),H()},F=function(){try{return Promise.resolve(Xp.logout()).then(function(){N("/")})}catch(e){return Promise.reject(e)}};/*#__PURE__*/return j.default.createElement(oe.default,{position:o,elevation:0,sx:_p({},L.root,"static"===o?{marginTop:"-70px"}:{},i||m?{background:"#1E1E1E"}:{}),"data-testid":v||"ac-sdk-header"},/*#__PURE__*/j.default.createElement(le.default,{variant:"dense"},f&&/*#__PURE__*/j.default.createElement(ie.default,{size:"large",sx:_p({color:"rgba(255,255,255,0.85)",borderRight:"1px solid rgba(255,255,255,0.5)"},m&&{color:"rgba(255,255,255,0.5)",borderTop:"1px solid rgba(255,255,255,0.5)",borderRightColor:"transparent"},{"> svg":{transform:"rotate(180deg)"}}),onClick:g},/*#__PURE__*/j.default.createElement(C.ViewSidebarRounded,null)),a&&/*#__PURE__*/j.default.createElement(n.Link,{to:"/"},/*#__PURE__*/j.default.createElement("img",{src:pe.default,alt:"AndonCloud",style:{display:"block",marginLeft:"-4px"}})),c&&/*#__PURE__*/j.default.createElement(ue.default,{variant:"subtitle1",sx:L.leadingText},c),/*#__PURE__*/j.default.createElement(ue.default,{variant:"subtitle1",align:"center",sx:L.title},l),k&&/*#__PURE__*/j.default.createElement(X.default,{display:"flex",sx:L.nav},k.map(e=>/*#__PURE__*/j.default.createElement(se.default,{key:e.label,onClick:()=>$(e),endIcon:e.icon,sx:L.button},e.label))),E&&S&&/*#__PURE__*/j.default.createElement(X.default,{display:"flex",sx:L.user},Gp.getCurrentUserJS?/*#__PURE__*/j.default.createElement(se.default,{id:"logout-button",onClick:F,sx:_p({},L.button,L.logoutButton),"data-testid":"ac-sdk-header-logout-button"},w("headerLogoutButton"),x&&(()=>{const e=(()=>{let e="";const t=Gp.getCurrentUserJS;if(null===t)return e;const{company:n}=t;return e=n.logo_url,b+"/"+e})();/*#__PURE__*/return j.default.createElement("img",{src:e,alt:""})})(),(()=>{let{currentUser:e}=Gp;/*#__PURE__*/return j.default.createElement(X.default,{display:"inline-block",sx:L.userInfo},e&&"("+e.name+")")})()):/*#__PURE__*/j.default.createElement(se.default,{id:"login-button",onClick:()=>N("/login"),sx:_p({},L.button,L.loginButton),"data-testid":"ac-sdk-header-login-button"},w("headerLoginButton"))),/*#__PURE__*/j.default.createElement(ne.default,null),/*#__PURE__*/j.default.createElement(ue.default,{variant:"body1",align:"center",style:{width:"5rem",padding:"0 5px"}},P.toLocaleTimeString()),T&&/*#__PURE__*/j.default.createElement(X.default,null,/*#__PURE__*/j.default.createElement(ie.default,{onClick:e=>{D(e.currentTarget)}},/*#__PURE__*/j.default.createElement(re.default,{style:I?{color:I}:{}})),/*#__PURE__*/j.default.createElement(ae.default,{id:"menu-appbar",marginThreshold:0,anchorEl:A,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(A),onClose:H,sx:L.menu},T.map(e=>/*#__PURE__*/j.default.createElement(ce.default,{key:e.label,onClick:()=>$(e)},e.label)),(()=>{if(!S)return Gp.getCurrentUserJS?/*#__PURE__*/j.default.createElement(ce.default,{onClick:F},w("headerLogoutButton")):/*#__PURE__*/j.default.createElement(ce.default,{onClick:()=>N("/login")},w("headerLoginButton"))})()))))};xm.propTypes={position:a.PropTypes.string,scrolled:a.PropTypes.bool,showAcLogo:a.PropTypes.bool,leadingText:a.PropTypes.string,title:a.PropTypes.string,titleStyles:a.PropTypes.any,navProps:a.PropTypes.shape({items:a.PropTypes.any}),userProps:a.PropTypes.shape({show:a.PropTypes.bool,showCompanyLogo:a.PropTypes.bool}),menuProps:a.PropTypes.shape({items:a.PropTypes.any,buttonColor:a.PropTypes.string,dropdownStyles:a.PropTypes.any,styles:a.PropTypes.any}),styles:a.PropTypes.any},xm.defaultProps={navProps:{},userProps:{},menuProps:{},styles:{}};var Tm=i.observer(xm);const Im=t=>{let{open:r,items:o,width:s,styles:i,listStyles:a,itemStyles:c,subitemStyles:l}=t;const[u,p]=e.useState([]),h=(e=>{let{styles:t,listStyles:n,itemStyles:r,subitemStyles:o}=e;return{root:_p({flexShrink:0,"& .MuiDrawer-paper":{width:t.width+"px",boxSizing:"border-box",marginTop:"70px",color:"rgba(255,255,255,0.85)",background:"rgba(0,0,0,0.25)"}},t),list:_p({height:"90%",overflowY:"scroll"},n),item:_p({},r),itemIcon:{color:"rgba(255,255,255,0.85)"},subitem:_p({},o),subitemText:{"& > span":{fontSize:"95%"}},subitemButton:{paddingLeft:4}}})({styles:_p({},i,{width:s}),listStyles:a,itemStyles:c,subitemStyles:l}),f=n.useNavigate(),m=(e,t,n,r)=>{e?e():t&&(t.startsWith("/")?f(t):f("?external="+t))};/*#__PURE__*/return j.default.createElement(d.Drawer,{sx:h.root,variant:"persistent",anchor:"left",open:r},/*#__PURE__*/j.default.createElement(d.List,{sx:h.list},o.map((e,t)=>{let{action:n,url:r,icon:o,label:s,items:i}=e;/*#__PURE__*/return j.default.createElement(j.default.Fragment,{key:s},/*#__PURE__*/j.default.createElement(d.ListItem,{sx:h.item,disablePadding:!0},/*#__PURE__*/j.default.createElement(d.ListItemButton,{onClick:()=>{null!=i&&i.length?p(e=>(e[t]=!e[t],_p({},e))):m(n,r)}},o&&/*#__PURE__*/j.default.createElement(d.ListItemIcon,{sx:h.itemIcon},o),/*#__PURE__*/j.default.createElement(d.ListItemText,{primary:s,sx:h.itemText}),i&&/*#__PURE__*/j.default.createElement(u[t]?C.ExpandLess:C.ExpandMore,null))),i&&/*#__PURE__*/j.default.createElement(d.Collapse,{in:u[t],timeout:"auto",unmountOnExit:!0},(e=>/*#__PURE__*/j.default.createElement(d.List,{component:"div",disablePadding:!0},e.map(e=>{let{action:t,url:n,icon:r,label:o}=e;/*#__PURE__*/return j.default.createElement(d.ListItem,{key:o,sx:h.subitem,disablePadding:!0},/*#__PURE__*/j.default.createElement(d.ListItemButton,{sx:h.subitemButton,onClick:()=>m(t,n)},r&&/*#__PURE__*/j.default.createElement(d.ListItemIcon,{sx:h.itemIcon},r),/*#__PURE__*/j.default.createElement(d.ListItemText,{primary:o,sx:h.subitemText})))})))(i)))})))};Im.propTypes={open:a.PropTypes.bool,items:a.PropTypes.any,width:a.PropTypes.number,styles:a.PropTypes.any,listStyles:a.PropTypes.any,itemStyles:a.PropTypes.any,subitemStyles:a.PropTypes.any},Im.defaultProps={styles:{},listStyles:{},itemStyles:{},subitemStyles:{}};const Mm=d.styled("main",{shouldForwardProp:e=>!["open","sidebarWidth"].includes(e)})(e=>{let{theme:t,open:n,sidebarWidth:r}=e;return _p({flexGrow:1,transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),marginLeft:0},n&&{transition:t.transitions.create("margin",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.enteringScreen}),marginLeft:r+"px"})}),Om=t=>{let{children:r,headerProps:o,sidebarMenuProps:s,styles:i,"data-testid":a}=t;const[c]=n.useSearchParams(),[l,u]=e.useState(),[p,h]=e.useState(null==s?void 0:s.open),f=d.useScrollTrigger({disableHysteresis:!0,target:l,threshold:0}),m=c.get("external"),g=(null==s?void 0:s.width)||240;/*#__PURE__*/return j.default.createElement(te.default,{ref:e=>{e&&u(e)},maxWidth:!1,disableGutters:!0,sx:_p({},oh.root,i),"data-testid":a||"ac-sdk-container"},/*#__PURE__*/j.default.createElement(Tm,_p({scrolled:f,showAcLogo:!0,sidebarEnabled:null==s?void 0:s.enabled,sidebarOpen:p,onSidebarToggle:()=>h(e=>!e)},o)),(null==s?void 0:s.enabled)&&/*#__PURE__*/j.default.createElement(Im,{open:p,items:s.items,width:g}),/*#__PURE__*/j.default.createElement(Mm,{open:p,sidebarWidth:g},m?/*#__PURE__*/j.default.createElement(Cm,{src:m}):r),/*#__PURE__*/j.default.createElement(d.Box,{sx:oh.overlay}))};Om.propTypes={children:a.PropTypes.any,headerProps:a.PropTypes.shape({position:a.PropTypes.string,showAcLogo:a.PropTypes.bool,leadingText:a.PropTypes.string.isRequired,title:a.PropTypes.string,navProps:a.PropTypes.shape({items:a.PropTypes.any}),userProps:a.PropTypes.shape({show:a.PropTypes.bool,showCompanyLogo:a.PropTypes.bool}),menuProps:a.PropTypes.shape({items:a.PropTypes.any,buttonColor:a.PropTypes.string,dropdownStyles:a.PropTypes.any,styles:a.PropTypes.any}),styles:a.PropTypes.any}),sidebarMenuProps:a.PropTypes.shape({enabled:a.PropTypes.bool,open:a.PropTypes.bool,items:a.PropTypes.any,width:a.PropTypes.number}),styles:a.PropTypes.any},Om.defaultProps={headerProps:{},sidebarMenuProps:{enabled:!1,open:!1,items:[],width:240}};const Pm=e=>{let{redirectPath:n}=e;const{i18n:r,t:o}=t.useTranslation();/*#__PURE__*/return j.default.createElement(Om,{headerProps:{position:"fixed",leadingText:"AndonCloud Software",userProps:{show:!1},menuProps:{items:[{label:o("changeLanguageText"),action:()=>{r.changeLanguage("pl"===r.language?"en":"pl")}}],buttonColor:"white"}},styles:{overflowY:"auto"}},/*#__PURE__*/j.default.createElement(X.default,{display:"flex",height:"100%",alignItems:"center",justifyContent:"center"},/*#__PURE__*/j.default.createElement(Q.default,{sx:{borderRadius:"20px"}},/*#__PURE__*/j.default.createElement(ee.default,null,/*#__PURE__*/j.default.createElement(dm,{title:o("loginFormText"),redirectPath:n})))))};Pm.propTypes={redirectPath:a.PropTypes.string},Pm.defaultProps={redirectPath:"/"};var Rm=i.observer(Pm);const Am=()=>{const{grantType:e,redirectPath:t}=ch(),r=bm("read write"),o=n.useNavigate();return"password"===e?/*#__PURE__*/j.default.createElement(Rm,{redirectPath:t}):(o("/"),r(),null)},Dm=function(e){if(!(tp&&np&&rp&&op&&sp))return Xd&&vt.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n useEffect: ${tp}. useLocation: ${np}. useNavigationType: ${rp}.\n createRoutesFromChildren: ${op}. matchRoutes: ${sp}.`),e;const t=new Set,n=n=>{const r=F.useRef(!0),o=np(),s=rp();return tp(()=>{const e=op(n.children);r.current?(e.forEach(e=>{hp(e).forEach(e=>{t.add(e)})}),function(e,t,n,r,o,s){const i=Array.isArray(r)?r:sp(n,t,o);if(i){let r,a="url";const c=pp(t,s||n);c&&(r=yp(vp(s||n,t)),a="route"),c&&r||([r,a]=bp(n,t,i,o)),Wn().setTransactionName(r),e&&(e.updateName(r),e.setAttribute(Jn,a))}}(function(){const e=xr(),t=e?Cr(e):void 0;if(!t)return;const n=vr(t).op;return"navigation"===n||"pageload"===n?t:void 0}(),o,e,void 0,void 0,Array.from(t)),r.current=!1):function(e){const{location:t,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:a}=e,c=Array.isArray(s)?s:sp(n,t,i),l=Zn();if(l&&ap.has(l)&&("PUSH"===r||"POP"===r)&&c){let e,r="url";const s=pp(t,a||n);s&&(e=yp(vp(a||n,t)),r="route"),s&&e||([e,r]=bp(n,t,c,i)),Hd(l,{name:e,attributes:{[Jn]:r,[Qn]:"navigation",[er]:`auto.navigation.react.reactrouter_v${o}`}})}}({location:o,routes:e,navigationType:s,version:"6",allRoutes:Array.from(t)})},[o,s]),F.createElement(e,{...n})};return Yd(n,e),n}(n.Routes),Lm=e=>{let{children:t}=e;/*#__PURE__*/return j.default.createElement(n.BrowserRouter,null,/*#__PURE__*/j.default.createElement(Dm,null,t,/*#__PURE__*/j.default.createElement(n.Route,{exact:!0,path:"/login",element:/*#__PURE__*/j.default.createElement(Am,null)}),/*#__PURE__*/j.default.createElement(n.Route,{path:"/oauth2/redirect",element:/*#__PURE__*/j.default.createElement(im,null)})))},Nm=i.observer(r=>{let{children:o,baseUrl:i,authProps:a,gtmProps:c,i18nProps:l,sentryProps:u,metaProps:d,muiTheme:p}=r;const{status:h}=Qp(),{enabled:f,clientId:m,redirectUri:g}=_p({enabled:!0,redirectPath:"/"},a);return Xp.setAuthConfig({baseUrl:i,clientId:m,redirectUri:g}),e.useEffect(()=>{!fh.gtmReady&&null!=c&&c.gtmId&&(Cp.initialize(c),fh.setGtmReady())},[c]),e.useEffect(()=>{var t;!fh.sentryReady&&u&&(function(t){const n={...t};Ko(n,"react"),Io("react",{version:e.version}),function(e={}){const t=function(e={}){const t={defaultIntegrations:Ua(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Is.SENTRY_RELEASE&&Is.SENTRY_RELEASE.id?Is.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}(e);if(!t.skipBrowserExtensionCheck&&function(){const e=void 0!==Is.window&&Is;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,r=Is.location&&Is.location.href||"",o=!!n&&Is===Is.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some(e=>r.startsWith(`${e}//`));return!(!n||o||void 0!==e.nw)}())return void yt(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});Rs&&(vs()||vt.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:(r=t.stackParser||Ia,Array.isArray(r)?wt(...r):r),integrations:Lo(t),transport:t.transport||Sa};var r;!function(e,t){!0===t.debug&&(ut?vt.enable():yt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Wn().update(t.initialScope);const n=new e(t);(function(e){Wn().setClient(e)})(n),n.init()}(Vs,n)}(n)}(_p({tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[(t={useEffect:e.useEffect,useLocation:n.useLocation,useNavigationType:n.useNavigationType,createRoutesFromChildren:n.createRoutesFromChildren,matchRoutes:n.matchRoutes},function(e){const t=((e={})=>{Ir||(Ir=!0,At(Mr),Nt(Mr));const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:o,enableStandaloneClsSpans:s},beforeStartSpan:i,idleTimeout:a,finalTimeout:c,childSpanTimeout:l,markBackgroundSpan:u,traceFetch:d,traceXHR:p,trackFetchStreamPerformance:h,shouldCreateSpanForRequest:f,enableHTTPTimings:m,instrumentPageLoad:g,instrumentNavigation:y}={...Ld,...e},v=function({recordClsStandaloneSpans:e}){const t=Zi();if(t&&bn){t.mark&&qs.performance.mark("sentry-tracing-init");const n=Ai(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Gi(bn),r=Gi(t.startTime);ra.fid={value:e.value,unit:"millisecond"},ra["mark.fid"]={value:n+r,unit:"second"}}),r=Ri(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ra.lcp={value:e.value,unit:"millisecond"},Yi=t)},!0),o=Bi("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(ra.ttfb={value:e.value,unit:"millisecond"})},ji,Mi),s=e?function(){let e,t,n=0;if(!function(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch(e){return!1}}())return;let r=!1;function o(){r||(r=!0,t&&function(e,t,n){zs&&vt.log(`Sending CLS span (${e})`);const r=Gi((bn||0)+(t&&t.startTime||0)),o=Wn().getScopeData().transactionName,s=Ki({name:t?en(t.sources[0]&&t.sources[0].node):"Layout shift",transaction:o,attributes:mn({[er]:"auto.http.browser.cls",[Qn]:"ui.webvital.cls",[sr]:t&&t.duration||0,"sentry.pageload.span_id":n}),startTime:r});s&&(s.addEvent("cls",{[nr]:"",[rr]:e}),s.end(r))}(n,e,t),s())}const s=Pi(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);Js(()=>{o()}),setTimeout(()=>{const e=Zn();if(!e)return;const n=e.on("startNavigationSpan",()=>{o(),n&&n()}),r=xr(),s=r&&Cr(r),i=s&&vr(s);i&&"pageload"===i.op&&(t=s.spanContext().spanId)},0)}():Pi(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ra.cls={value:e.value,unit:""},Ji=t)},!0);return()=>{n(),r(),o(),s&&s()}}return()=>{}}({recordClsStandaloneSpans:s||!1});t&&Zi()&&bn&&Di(({metric:e})=>{if(null==e.value)return;const t=e.entries.find(t=>t.duration===e.value&&_a[t.name]);if(!t)return;const{interactionId:n}=t,r=_a[t.name],o=Gi(bn+t.startTime),s=Gi(e.value),i=xr(),a=i?Cr(i):void 0,c=(null!=n?ba.get(n):void 0)||a,l=c?vr(c).description:Wn().getScopeData().transactionName,u=Ki({name:en(t.target),transaction:l,attributes:mn({[er]:"auto.http.browser.inp",[Qn]:`ui.interaction.${r}`,[sr]:t.duration}),startTime:o});u&&(u.addEvent("inp",{[nr]:"millisecond",[rr]:e.value}),u.end(o+s))}),r&&pt.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(e=>{const t=xr();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=Gi(bn+n.startTime),{start_timestamp:r,op:o}=vr(t);if("navigation"===o&&r&&e<r)continue;const s=Gi(n.duration),i={[er]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:c,invokerType:l,sourceURL:u,sourceFunctionName:d,sourceCharPosition:p}=a;i["browser.script.invoker"]=c,i["browser.script.invoker_type"]=l,u&&(i["code.filepath"]=u),d&&(i["code.function"]=d),-1!==p&&(i["browser.script.source_char_position"]=p),qi(t,e,e+s,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:i})}}).observe({type:"long-animation-frame",buffered:!0}):n&&Li("longtask",({entries:e})=>{const t=xr();if(!t)return;const{op:n,start_timestamp:r}=vr(t);for(const o of e){const e=Gi(bn+o.startTime),s=Gi(o.duration);"navigation"===n&&r&&e<r||qi(t,e,e+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[er]:"auto.ui.browser.metrics"}})}}),o&&Li("event",({entries:e})=>{const t=xr();if(t)for(const n of e)if("click"===n.name){const e=Gi(bn+n.startTime),r=Gi(n.duration),o={name:en(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[er]:"auto.ui.browser.metrics"}},s=rn(n.target);s&&(o.attributes["ui.component_name"]=s),qi(t,e,e+r,o)}});const b={name:void 0,source:void 0};function _(e,t){const n="pageload"===t.op,r=i?i(t):t,o=r.attributes||{};t.name!==r.name&&(o[Jn]="custom",r.attributes=o),b.name=r.name,b.source=o[Jn];const u=yo(r,{idleTimeout:a,finalTimeout:c,childSpanTimeout:l,disableAutoFinish:n,beforeSpanEnd:e=>{v(),function(e,t){const n=Zi();if(!n||!n.getEntries||!bn)return;const r=Gi(bn),o=n.getEntries(),{op:s,start_timestamp:i}=vr(e);if(o.slice(na).forEach(t=>{const n=Gi(t.startTime),o=Gi(Math.max(0,t.duration));if(!("navigation"===s&&i&&r+n<i))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{oa(e,t,r,n)}),oa(e,t,"secureConnection",n,"TLS/SSL"),oa(e,t,"fetch",n,"cache"),oa(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+Gi(t.requestStart),o=n+Gi(t.responseEnd),s=n+Gi(t.responseStart);t.responseEnd&&(qi(e,r,o,{op:"browser.request",name:t.name,attributes:{[er]:"auto.ui.browser.metrics"}}),qi(e,s,o,{op:"browser.response",name:t.name,attributes:{[er]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,t,r);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o){const s=Ks(!1),i=Gi(s?s.requestStart:0),a=o+Math.max(n,i),c=o+n,l=c+r,u={[er]:"auto.resource.browser.metrics"};a!==c&&(u["sentry.browser.measure_happened_before_request"]=!0,u["sentry.browser.measure_start_time"]=a),qi(e,a,l,{name:t.name,op:t.entryType,attributes:u})}(e,t,n,o,r);const s=ni(),i=t.startTime<s.firstHiddenTime;"first-paint"===t.name&&i&&(ra.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&i&&(ra.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":!function(e,t,n,r,o,s){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const i=as(n),a={[er]:"auto.resource.browser.metrics"};sa(a,t,"transferSize","http.response_transfer_size"),sa(a,t,"encodedBodySize","http.response_content_length"),sa(a,t,"decodedBodySize","http.decoded_response_content_length");const c=t.deliveryType;null!=c&&(a["http.response_delivery_type"]=c);const l=t.renderBlockingStatus;l&&(a["resource.render_blocking_status"]=l),i.protocol&&(a["url.scheme"]=i.protocol.split(":").pop()),i.host&&(a["server.address"]=i.host),a["url.same_origin"]=n.includes(qs.location.origin);const u=s+r;qi(e,u,u+o,{name:n.replace(qs.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}(e,t,t.name,n,o,r)}}),na=Math.max(o.length-1,0),function(e){const t=qs.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Wi(n.rtt)&&(ra["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Wi(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Wi(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===s){!function(e){const t=Ks(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(ra);const n=ra["mark.fid"];n&&ra.fid&&(qi(e,n.value,n.value+Gi(ra.fid.value),{name:"first input delay",op:"ui.action",attributes:{[er]:"auto.ui.browser.metrics"}}),delete ra["mark.fid"]),"fcp"in ra&&t.recordClsOnPageloadSpan||delete ra.cls,Object.entries(ra).forEach(([e,t])=>{!function(e,t,n,r=xr()){const o=r&&Cr(r);o&&(ut&&vt.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[rr]:t,[nr]:n}))}(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",r),e.setAttribute("performance.activationStart",Zs()),function(e){Yi&&(Yi.element&&e.setAttribute("lcp.element",en(Yi.element)),Yi.id&&e.setAttribute("lcp.id",Yi.id),Yi.url&&e.setAttribute("lcp.url",Yi.url.trim().slice(0,200)),null!=Yi.loadTime&&e.setAttribute("lcp.loadTime",Yi.loadTime),null!=Yi.renderTime&&e.setAttribute("lcp.renderTime",Yi.renderTime),e.setAttribute("lcp.size",Yi.size)),Ji&&Ji.sources&&Ji.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,en(t.node)))}(e)}Yi=void 0,Ji=void 0,ra={}}(e,{recordClsOnPageloadSpan:!s})}});function d(){["interactive","complete"].includes(Is.document.readyState)&&e.emit("idleSpanEnableAutoFinish",u)}return n&&Is.document&&(Is.document.addEventListener("readystatechange",()=>{d()}),d()),u}return{name:"BrowserTracing",afterAllSetup(e){let n,r=Is.location&&Is.location.href;function s(){n&&!vr(n).timestamp&&(Rs&&vt.log(`[Tracing] Finishing current active span with op: ${vr(n).op}`),n.end())}e.on("startNavigationSpan",t=>{Zn()===e&&(s(),n=_(e,{op:"navigation",...t}))}),e.on("startPageLoadSpan",(t,r={})=>{if(Zn()!==e)return;s();const o=function(e,t){const n=function(e){if(!e)return;const t=e.match(dr);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=lr(t);if(!n||!n.traceId)return{traceId:Pn(),spanId:Rn()};const{traceId:o,parentSpanId:s,parentSampled:i}=n;return{traceId:o,parentSpanId:s,spanId:Rn(),sampled:i,dsc:r||{}}}(r.sentryTrace||$d("sentry-trace"),r.baggage||$d("baggage"));Wn().setPropagationContext(o),n=_(e,{op:"pageload",...t})}),e.on("spanEnd",e=>{const t=vr(e).op;if(e!==Cr(e)||"navigation"!==t&&"pageload"!==t)return;const n=Wn(),r=n.getPropagationContext();n.setPropagationContext({...r,sampled:void 0!==r.sampled?r.sampled:br(e),dsc:r.dsc||jr(e)})}),Is.location&&(g&&Nd(e,{name:Is.location.pathname,startTime:bn?bn/1e3:void 0,attributes:{[Jn]:"url",[er]:"auto.pageload.browser"}}),y&&la(({to:t,from:n})=>{void 0===n&&r&&-1!==r.indexOf(t)?r=void 0:n!==t&&(r=void 0,Hd(e,{name:Is.location.pathname,attributes:{[Jn]:"url",[er]:"auto.navigation.browser"}}))})),u&&(Is&&Is.document?Is.document.addEventListener("visibilitychange",()=>{const e=xr();if(!e)return;const t=Cr(e);if(Is.document.hidden&&t){const e="cancelled",{op:n,status:r}=vr(t);Rs&&vt.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Rs&&vt.warn("[Tracing] Could not set up background tab detection due to lack of global document")),o&&function(e,t,n,r){let o;Is.document&&addEventListener("click",()=>{const s="ui.action.click",i=xr(),a=i&&Cr(i);if(a){const e=vr(a).op;if(["navigation","pageload"].includes(e))return void(Rs&&vt.warn(`[Tracing] Did not create ${s} span because a pageload or navigation span is in progress.`))}o&&(o.setAttribute(tr,"interactionInterrupted"),o.end(),o=void 0),r.name?o=yo({name:r.name,op:s,attributes:{[Jn]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n}):Rs&&vt.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`)},{once:!1,capture:!0})}(a,c,l,b),t&&function(){const e=({entries:e})=>{const t=xr(),n=t&&Cr(t);e.forEach(e=>{if(!function(e){return"duration"in e}(e)||!n)return;const t=e.interactionId;if(null!=t&&!ba.has(t)){if(va.length>10){const e=va.shift();ba.delete(e)}va.push(t),ba.set(t,n)}})};Li("event",e),Li("first-input",e)}(),function(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:a}={traceFetch:Pd.traceFetch,traceXHR:Pd.traceXHR,trackFetchStreamPerformance:Pd.trackFetchStreamPerformance,...t},c="function"==typeof s?s:e=>!0,l=e=>function(e,t){const n=Is.location&&Is.location.href;if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch(e){return!1}const s=r.origin===o;return t?an(r.toString(),t)||s&&an(r.pathname,t):s}{const n=!!e.match(/^\/(?!\/)/);return t?an(e,t):n}}(e,a),u={};n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){const t=Od.get(e.span_id);t&&(e.timestamp=t/1e3,Od.delete(e.span_id))}}),e)),o&&function(){const e="fetch-body-resolved";Mt(e,e=>{if(e.response){const t=Md.get(e.response);t&&e.endTimestamp&&Od.set(t,e.endTimestamp)}}),Ot(e,()=>Ss(ws))}(),_s(e=>{const t=function(e,t,n,r,o="auto.http.browser"){if(!e.fetchData)return;const s=Ar()&&t(e.fetchData.url);if(e.endTimestamp&&s){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(function(e,t){if(t.response){ir(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),delete r[t]))}const{method:i,url:a}=e.fetchData,c=function(e){try{return new URL(e).href}catch(e){return}}(a),l=c?as(c).host:void 0,u=!!xr(),d=s&&u?po({name:`${i} ${a}`,attributes:{url:a,type:"fetch","http.method":i,"http.url":c,"server.address":l,[er]:o,[Qn]:"http.client"}}):new Dr;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const t=e.args[1]||{},n=function(e,t,n){const r=Zo({span:n}),o=r["sentry-trace"],s=r.baggage;if(!o)return;const i=t.headers||(function(e){return"undefined"!=typeof Request&&Jt(e,Request)}(e)?e.headers:void 0);if(i){if(function(e){return"undefined"!=typeof Headers&&Jt(e,Headers)}(i)){const e=new Headers(i);if(e.set("sentry-trace",o),s){const t=e.get("baggage");if(t){const n=ms(t);e.set("baggage",n?`${n},${s}`:s)}else e.set("baggage",s)}return e}if(Array.isArray(i)){const e=[...i.filter(e=>!(Array.isArray(e)&&"sentry-trace"===e[0])).map(e=>{if(Array.isArray(e)&&"baggage"===e[0]&&"string"==typeof e[1]){const[t,n,...r]=e;return[t,ms(n),...r]}return e}),["sentry-trace",o]];return s&&e.push(["baggage",s]),e}{const e="baggage"in i?i.baggage:void 0;let t=[];return Array.isArray(e)?t=e.map(e=>"string"==typeof e?ms(e):e).filter(e=>""===e):e&&t.push(ms(e)),s&&t.push(s),{...i,"sentry-trace":o,baggage:t.length>0?t.join(","):void 0}}}return{...r}}(e.args[0],t,Ar()&&u?d:void 0);n&&(e.args[1]=t,t.headers=n)}return d}(e,c,l,u);if(e.response&&e.fetchData.__span&&Md.set(e.response,e.fetchData.__span),t){const n=Dd(e.fetchData.url),r=n?as(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}i&&t&&Rd(t)})),r&&ga(e=>{const t=function(e,t,n,r){const o=e.xhr,s=o&&o[ma];if(!o||o.__sentry_own_request__||!s)return;const i=Ar()&&t(s.url);if(e.endTimestamp&&i){const e=o.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==s.status_code&&(ir(t,s.status_code),t.end(),delete r[e]))}const a=Dd(s.url),c=a?as(a).host:void 0,l=!!xr(),u=i&&l?po({name:`${s.method} ${s.url}`,attributes:{type:"xhr","http.method":s.method,"http.url":a,url:s.url,"server.address":c,[er]:"auto.http.browser",[Qn]:"http.client"}}):new Dr;return o.__sentry_xhr_span_id__=u.spanContext().spanId,r[o.__sentry_xhr_span_id__]=u,n(s.url)&&function(e,t){const{"sentry-trace":n,baggage:r}=Zo({span:t});n&&function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch(e){}}(e,n,r)}(o,Ar()&&l?u:void 0),u}(e,c,l,u);i&&t&&Rd(t)})}(e,{traceFetch:d,traceXHR:p,trackFetchStreamPerformance:h,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:f,enableHTTPTimings:m})}}})({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:o,createRoutesFromChildren:s,matchRoutes:i,stripBasename:a,instrumentPageLoad:c=!0,instrumentNavigation:l=!0}=e;return{...t,setup(){tp=n,np=r,rp=o,sp=i,op=s,ip=a||!1},afterAllSetup(e){t.afterAllSetup(e);const n=Is&&Is.location&&Is.location.pathname;c&&n&&Nd(e,{name:n,attributes:{[Jn]:"url",[Qn]:"pageload",[er]:"auto.pageload.react.reactrouter_v6"}}),l&&ap.add(e)}}}(t)),new Td(void 0)]},u)),fh.setSentryReady())},[u]),e.useEffect(()=>{f?function(){try{const e=function(){if(f)return Promise.resolve(Xp.recover()).then(function(){})}();return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}():fh.setAppReady()},[f]),e.useEffect(()=>{const e=null==l?void 0:l.locales;if(e){const t="translation";for(const[n,r]of Object.entries(e))z.default.addResources(n,t,r[t])}},[null==l?void 0:l.locales]),e.useEffect(()=>{f&&"unknown"!==h&&fh.setAppReady()},[f,h]),/*#__PURE__*/j.default.createElement(s.ThemeProvider,{theme:s.createTheme(p)},/*#__PURE__*/j.default.createElement(U.default,null),/*#__PURE__*/j.default.createElement(B.default,{styles:{"::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{borderRadius:"3px",backgroundColor:"rgba(255, 255, 255, 0.25)"}}}),/*#__PURE__*/j.default.createElement(ep,{fallback:e=>/*#__PURE__*/j.default.createElement(sh,e)},/*#__PURE__*/j.default.createElement(ct,null),/*#__PURE__*/j.default.createElement(ah,{config:_p({baseUrl:i},a)},/*#__PURE__*/j.default.createElement(hh,null,/*#__PURE__*/j.default.createElement(t.I18nextProvider,{i18n:z.default},/*#__PURE__*/j.default.createElement(uh,{info:d},Xp.networkError?/*#__PURE__*/j.default.createElement(sm,{error:Xp.networkError}):fh.appReady?/*#__PURE__*/j.default.createElement(j.default.Fragment,null,/*#__PURE__*/j.default.createElement(Lm,null,/*#__PURE__*/j.default.createElement(n.Route,{path:"*",element:/*#__PURE__*/j.default.createElement(th,null,o)})),/*#__PURE__*/j.default.createElement(rm,{appVersion:d.appVersion,apiVersion:d.apiVersion})):/*#__PURE__*/j.default.createElement(om,{"data-testid":"ac-sdk-app-loading",width:"500px"})))))))});Nm.propTypes={children:a.PropTypes.any.isRequired,baseUrl:a.PropTypes.string.isRequired,authProps:a.PropTypes.shape({enabled:a.PropTypes.bool,loginUrl:a.PropTypes.string,redirectUri:a.PropTypes.string,redirectPath:a.PropTypes.string,clientId:a.PropTypes.string.isRequired,grantType:a.PropTypes.string}),gtmProps:a.PropTypes.any,i18nProps:a.PropTypes.shape({locales:a.PropTypes.any}),sentryProps:a.PropTypes.any,metaProps:a.PropTypes.shape({appVersion:a.PropTypes.string,apiVersion:a.PropTypes.string,releaseVersion:a.PropTypes.string,releasePageLink:a.PropTypes.string}),muiTheme:a.PropTypes.any},Nm.defaultProps={authProps:{},gtmProps:{},i18nProps:{},sentryProps:{},metaProps:{},muiTheme:gh};var Hm=function(e){const t=e.displayName||e.name||"unknown",n=n=>F.createElement(Jd,{name:t,updateProps:n},F.createElement(e,{...n}));return n.displayName=`profiler(${t})`,Yd(n,e),n}(Nm);const $m=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Fm(e,t,n,r){navigator.serviceWorker.register(e).then(e=>{let o=null;r&&setInterval(function(){fetch("/manifest.json").then(function(t){try{return Promise.resolve(t.json()).then(function(t){let{version:r}=t;n!==r&&(o=r,e.update())})}catch(e){return Promise.reject(e)}}).catch(()=>{})},3e4),e.onupdatefound=()=>{const n=e.installing;null!=n&&(n.onstatechange=()=>{"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&(r?t.onUpdate(e,o):t.onUpdate(e))):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}}).catch(e=>{console.error("Error during service worker registration:",e)})}exports.App=Hm,exports.Container=Om,exports.captureException=xo,exports.fetch=Zp,exports.getLocale=()=>z.default.language,exports.logout=()=>Xp.logout(),exports.notify=lt,exports.registerServiceWorker=e=>{const{version:t}=e,n=e=>{const t=e.waiting;t&&(t.addEventListener("statechange",e=>{"activated"===e.target.state&&window.location.reload()}),t.postMessage({type:"SKIP_WAITING"}))},r=()=>lt(z.default.t("newVersionAvailable"),{duration:5e3,position:"bottom-left",style:{color:"rgba(255,255,255,0.85)",background:"#3F3F3F",border:"1px solid #FFE72F"}});!function(e){const{publicUrl:t,mode:n,autoUpdate:r,version:o,registrationConfig:s}=e;if(globalThis.version=o,"production"===n&&"serviceWorker"in navigator){if(new URL(t,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const e=t+"/service-worker.js";$m?(function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then(e=>{e.unregister().then(()=>{window.location.reload()})}):Fm(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}(e,s),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):Fm(e,s,o,r)})}}(_p({},e,{registrationConfig:_p({},(null==e?void 0:e.registrationConfig)||{},{onUpdate:(o,s)=>{var i,a;null!=(i=e.registrationConfig)&&i.onUpdate&&(null==(a=e.registrationConfig)||a.onUpdate(o)),s&&t!==s?(r(),setTimeout(()=>{n(o)},5e3)):(r(),n(o))}})}))},exports.setLocale=e=>z.default.changeLanguage(e),exports.useLogin=bm,exports.useLoginStatus=Qp,exports.useStore=()=>e.useContext(ph);
173
173
  //# sourceMappingURL=andoncloud-sdk.js.map