1/*!@sentry/browser (Performance Monitoring and Replay) 10.62.0 (1fc539e) | https://github.com/getsentry/sentry-javascript*/var Sentry=function(t){t=window.Sentry||{};const e=globalThis,n="10.62.0";function r(){return s(e),e}function s(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||n,e[n]=e[n]||{}}function i(t,r,s=e){const i=s.__SENTRY__=s.__SENTRY__||{},o=i[n]=i[n]||{};return o[t]||(o[t]=r())}const o=["debug","info","warn","error","log","assert","trace"],a={};function c(t){if(!("console"in e))return t();const n=e.console,r={},s=Object.keys(a);s.forEach(t=>{const e=a[t];r[t]=n[t],n[t]=e});try{return t()}finally{s.forEach(t=>{n[t]=r[t]})}}function u(){return{enabled:!1}}const f={enable:function(){u().enabled=!0},disable:function(){u().enabled=!1},isEnabled:function(){return u().enabled},log:function(...t){},warn:function(...t){},error:function(...t){}},l="?",h=/\(error: (.*)\)/,d=/captureMessage|captureException/;function p(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0,r=0)=>{const s=[],i=t.split("\n");for(let t=n;t<i.length;t++){let n=i[t];n.length>1024&&(n=n.slice(0,1024));const o=h.test(n)?n.replace(h,"$1"):n;if(!o.includes("Error: ")){for(const t of e){const e=t(o);if(e){s.push(e);break}}if(s.length>=50+r)break}}return function(t){if(!t.length)return[];const e=Array.from(t);/sentryWrapped/.test(m(e).function||"")&&e.pop();e.reverse(),d.test(m(e).function||"")&&(e.pop(),d.test(m(e).function||"")&&e.pop());return e.slice(0,50).map(t=>({...t,filename:t.filename||m(e).filename,function:t.function||l}))}(s.slice(r))}}function m(t){return t[t.length-1]||{}}const y="<anonymous>";function g(t){try{return t&&"function"==typeof t&&t.name||y}catch{return y}}function v(t){const e=t.exception;if(e){const t=[];try{return e.values.forEach(e=>{e.stacktrace.frames&&t.push(...e.stacktrace.frames)}),t}catch{return}}}const b={},S={};function w(t,e){return b[t]=b[t]||[],b[t].push(e),()=>{const n=b[t];if(n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}}function k(t,e){if(!S[t]){S[t]=!0;try{e()}catch(t){}}}function _(t,e){const n=t&&b[t];if(n)for(const t of n)try{t(e)}catch(t){}}let T=null;function I(t){const e="error";w(e,t),k(e,x)}function x(){T=e.onerror,e.onerror=function(t,e,n,r,s){return _("error",{column:r,error:s,line:n,msg:t,url:e}),!!T&&T.apply(this,arguments)},e.onerror.__SENTRY_INSTRUMENTED__=!0}let E=null;function C(t){const e="unhandledrejection";w(e,t),k(e,R)}function R(){E=e.onunhandledrejection,e.onunhandledrejection=function(t){return _("unhandledrejection",t),!E||E.apply(this,arguments)},e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const O=Object.prototype.toString;function A(t){switch(O.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return U(t,Error)}}function M(t,e){return O.call(t)===`[object ${e}]`}function $(t){return M(t,"ErrorEvent")}function L(t){return M(t,"DOMError")}function D(t){return M(t,"String")}function P(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function j(t){return null===t||P(t)||"object"!=typeof t&&"function"!=typeof t}function F(t){return M(t,"Object")}function N(t){return"undefined"!=typeof Event&&U(t,Event)}function B(t){return Boolean(t?.then&&"function"==typeof t.then)}function U(t,e){try{return t instanceof e}catch{return!1}}function q(t){return"undefined"!=typeof Request&&U(t,Request)}function z(t,e,n){if(!(e in t))return;const r=t[e];if("function"!=typeof r)return;const s=n(r);"function"==typeof s&&W(s,r);try{t[e]=s}catch{}}function H(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{}}function W(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,H(t,"__sentry_original__",e)}catch{}}function J(t){return t.__sentry_original__}function K(t){if(A(t))return{message:t.message,name:t.name,stack:t.stack,...G(t)};if(N(t)){const{type:e,target:n,currentTarget:r,detail:s}=t;return{type:e,target:n,currentTarget:r,...s?{detail:s}:{},...G(t)}}return t}function G(t){return"object"==typeof t&&null!==t?Object.fromEntries(Object.entries(t)):{}}
1function Y(t){try{const n=e.WeakRef;if("function"==typeof n)return new n(t)}catch{}return t}function X(t){if(t){if("object"==typeof t&&"deref"in t&&"function"==typeof t.deref)try{return t.deref()}catch{return}return t}}const V="_sentrySpan";function Q(t,e){e?H(t,V,Y(e)):delete t[V]}function Z(t){return X(t[V])}let tt;function et(t){if(void 0!==tt)return tt?tt(t):t();const n=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=e;return n in r&&"function"==typeof r[n]?(tt=r[n],tt(t)):(tt=null,t())}function nt(){return et(()=>Math.random())}function rt(){return et(()=>Date.now())}const st=Symbol.for("sentry.skipNormalization"),it=Symbol.for("sentry.overrideNormalizationDepth");let ot,at;function ct(t,e=100,n=1/0){try{return ft("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function ut(t,e=3,n=102400){const r=ct(t,e);return s=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(s))>n?ut(t,e-1,n):r;var s}function ft(t,e,n=1/0,r=1/0,s=function(){const t=new WeakSet;function e(e){return!!t.has(e)||(t.add(e),!1)}function n(e){t.delete(e)}return[e,n]}()){const[i,o]=s;if(null==e||["boolean","string"].includes(typeof e)||"number"==typeof e&&Number.isFinite(e))return e;const a=lt(t,e);if(!a.startsWith("[object "))return a;if(function(t){return Boolean(t[st])}(e))return e;const c=function(t){const e=t[it];return"number"==typeof e?e:void 0}(e),u=void 0!==c?c:n;
1if(0===u)return a.replace("object ","");if(i(e))return"[Circular ~]";const f=e;if(f&&"function"==typeof f.toJSON)try{return ft("",f.toJSON(),u-1,r,s)}catch{}const l=Array.isArray(e)?[]:{};let h=0;const d=K(e);for(const t in d){if(!Object.prototype.hasOwnProperty.call(d,t))continue;if(h>=r){l[t]="[MaxProperties ~]";break}const e=d[t];l[t]=ft(t,e,u-1,r,s),h++}return o(e),l}function lt(t,e){try{if(ot){const t=ot(e);if(t)return t}if("undefined"!=typeof global&&e===global)return"[Global]";if("number"==typeof e&&!Number.isFinite(e))return`[${e}]`;if("function"==typeof e)return`[Function: ${g(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const t=function(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}(e);return`[object ${t}]`}catch(t){return`**non-serializable** (${t})`}}function ht(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function dt(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];j(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(lt(0,r))}return n.join(e)}function pt(t,e,n=!1){return!!D(t)&&(M(e,"RegExp")?e.test(t):D(e)?n?t===e:t.includes(e):"function"==typeof e&&e(t))}function mt(t,e=[],n=!1){for(const r of e)if(pt(t,r,n))return!0;return!1}function yt(t=function(){const t=e;return t.crypto||t.msCrypto}()){try{if(t?.randomUUID)return et(()=>t.randomUUID()).replace(/-/g,"")}catch{}return at||(at="10000000100040008000100000000000"),at.replace(/[018]/g,t=>(t^(16*nt()&15)>>t/4).toString(16))}function gt(t){return t.exception?.values?.[0]}function vt(t){const{message:e,event_id:n}=t;if(e)return e;const r=gt(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function bt(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=e||""),i.type||(i.type="Error")}function St(t,e){const n=gt(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r?.data,...e.data};n.mechanism.data=t}}function wt(t){if(function(t){try{return t.__sentry_captured__}catch{}}(t))return!0;try{H(t,"__sentry_captured__",!0)}catch{}return!1}function kt(){return rt()/1e3}let _t;function Tt(){return(_t??(_t=function(){const{performance:t}=e;if(!t?.now||!t.timeOrigin)return kt;const n=t.timeOrigin;return()=>(n+et(()=>t.now()))/1e3}()))()}let It=null;function xt(){return null===It&&(It=function(){const{performance:t}=e;if(!t?.now)return;const n=3e5,r=et(()=>t.now()),s=rt(),i=t.timeOrigin;if("number"==typeof i&&Math.abs(i+r-s)<n)return i;const o=t.timing?.navigationStart;if("number"==typeof o&&Math.abs(o+r-s)<n)return o;return s-r}()),It}function Et(t){const e=Tt(),n={sid:yt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return{sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}(n)};return t&&Ct(n,t),n}function Ct(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Tt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:yt()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Rt(t,e,n=2){if(!e||"object"!=typeof e||n<=0)return e;if(t&&0===Object.keys(e).length)return t;const r={...t};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=Rt(r[t],e[t],n-1));return r}function Ot(){return yt()}function At(){return yt().substring(16)}class Mt{constructor(){this.t=!1,this.i=[],this.o=[],this.u=[],this.l=[],this.h={},this.p={},this.m={},this.v={},this.S={},this.k={}
vendor: 4,334 bytes, line 1
1,this._={traceId:Ot(),sampleRand:nt()}}clone(){const t=new Mt;return t.u=[...this.u],t.p={...this.p},t.m={...this.m},t.v={...this.v},t.S={...this.S},this.S.flags&&(t.S.flags={values:[...this.S.flags.values]}),t.h=this.h,t.T=this.T,t.I=this.I,t.C=this.C,t.R=this.R,t.o=[...this.o],t.l=[...this.l],t.k={...this.k},t._={...this._},t.O=this.O,t.A=this.A,t.M=this.M,Q(t,Z(this)),t}setClient(t){this.O=t}setLastEventId(t){this.A=t}getClient(){return this.O}lastEventId(){return this.A}addScopeListener(t){this.i.push(t)}addEventProcessor(t){return this.o.push(t),this}setUser(t){return this.h=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.I&&Ct(this.I,{user:t}),this.L(),this}getUser(){return this.h}setConversationId(t){return this.M=t||void 0,this.L(),this}setTags(t){return this.p={...this.p,...t},this.L(),this}setTag(t,e){return this.setTags({[t]:e})}setAttributes(t){return this.m={...this.m,...t},this.L(),this}setAttribute(t,e){return this.setAttributes({[t]:e})}removeAttribute(t){return t in this.m&&(delete this.m[t],this.L()),this}setExtras(t){return this.v={...this.v,...t},this.L(),this}setExtra(t,e){return this.v={...this.v,[t]:e},this.L(),this}setFingerprint(t){return this.R=t,this.L(),this}setLevel(t){return this.T=t,this.L(),this}setTransactionName(t){return this.C=t,this.L(),this}setContext(t,e){return null===e?delete this.S[t]:this.S[t]=e,this.L(),this}setSession(t){return t?this.I=t:delete this.I,this.L(),this}getSession(){return this.I}update(t){if(!t)return this;const e="function"==typeof t?t(this):t,n=e instanceof Mt?e.getScopeData():F(e)?t:void 0,{tags:r,attributes:s,extra:i,user:o,contexts:a,level:c,fingerprint:u=[],propagationContext:f,conversationId:l}=n||{};return this.p={...this.p,...r},this.m={...this.m,...s},this.v={...this.v,...i},this.S={...this.S,...a},o&&Object.keys(o).length&&(this.h=o),c&&(this.T=c),u.length&&(this.R=u),f&&(this._=f),l&&(this.M=l),this}clear(){return this.u=[],this.p={},this.m={},this.v={},this.h={},this.S={},this.T=void 0,this.C=void 0,this.R=void 0,this.I=void 0,this.M=void 0,Q(this,void 0),this.l=[],this.setPropagationContext({traceId:Ot(),sampleRand:nt()}),this.L(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:kt(),...t,message:t.message?ht(t.message,2048):t.message};return this.u.push(r),this.u.length>n&&(this.u=this.u.slice(-n),this.O?.recordDroppedEvent("buffer_overflow","log_item")),this.L(),this}getLastBreadcrumb(){return this.u[this.u.length-1]}clearBreadcrumbs(){return this.u=[],this.L(),this}addAttachment(t){return this.l.push(t),this}clearAttachments(){return this.l=[],this}getScopeData(){return{breadcrumbs:this.u,attachments:this.l,contexts:this.S,tags:this.p,attributes:this.m,extra:this.v,user:this.h,level:this.T,fingerprint:this.R||[],eventProcessors:this.o,propagationContext:this._,sdkProcessingMetadata:this.k,transactionName:this.C,span:Z(this),conversationId:this.M}}setSDKProcessingMetadata(t){return this.k=Rt(this.k,t,2),this}setPropagationContext(t){return this._=t,this}getPropagationContext(){return this._}captureException(t,e){const n=e?.event_id||yt();if(!this.O)return n;const r=new Error("Sentry syntheticException");return this.O.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n?.event_id||yt();if(!this.O)return r;const s=n?.syntheticException??new Error(t);return this.O.captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureEvent(t,e){const n=t.event_id||e?.event_id||yt();return this.O?(this.O.captureEvent(t,{...e,event_id:n},this),n):n}L(){this.t||(this.t=!0,this.i.forEach(t=>{t(this)}),this.t=!1)}}const $t=t=>t instanceof Promise&&!t[Lt],Lt=Symbol("chained PromiseLike"),Dt=(t,e,n)=>{const r=t.then(t=>(e(t),t),t=>{throw n(t),t});return $t(r)&&$t(t)?r:Pt(t,r)},Pt=(t,e)=>{if(!e)return t;let n=!1;for(const r in t){if(r in e)continue;n=!0;const s=t[r];"function"==typeof s?Object.defineProperty(e,r,{value:(...e)=>s.apply(t,e),enumerable:!0,configurable:!0,writable:!0}):e[r]=s}return n&&Object.assign(e,{[Lt]:!0}),e};class jt{constructor(t,e){let n,r;n=t||new Mt,r=e||new Mt,this.D=[{scope:n}],this.P=r}withScope(t){const e=this.j();let n;try{n=t(e)}catch(t){throw this.F(),t}return B(n)?Dt(n,()=>this.F(),()=>this.F()):(this.F(),n)}
1getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.P}getStackTop(){return this.D[this.D.length-1]}j(){const t=this.getScope().clone();return this.D.push({client:this.getClient(),scope:t}),t}F(){return!(this.D.length<=1)&&!!this.D.pop()}}function Ft(){const t=s(r());return t.stack=t.stack||new jt(i("defaultCurrentScope",()=>new Mt),i("defaultIsolationScope",()=>new Mt))}function Nt(t){return Ft().withScope(t)}function Bt(t,e){const n=Ft();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Ut(t){return Ft().withScope(()=>t(Ft().getIsolationScope()))}function qt(t){const e=s(t);return e.acs?e.acs:{withIsolationScope:Ut,withScope:Nt,withSetScope:Bt,withSetIsolationScope:(t,e)=>Ut(e),getCurrentScope:()=>Ft().getScope(),getIsolationScope:()=>Ft().getIsolationScope()}}function zt(t,e){const{value:n,unit:r}="object"==typeof(s=t)&&null!=s&&!Array.isArray(s)&&Object.keys(s).includes("value")?t:{value:t,unit:void 0};var s;const i=function(t){if(Array.isArray(t))return{value:t,type:"array"};const e="string"==typeof t?"string":"boolean"==typeof t?"boolean":"number"!=typeof t||Number.isNaN(t)?null:Number.isInteger(t)?"integer":"double";if(e)return{value:t,type:e}}(n),o=r&&"string"==typeof r?{unit:r}:{};if(i)return{...i,...o};if(!e||"skip-undefined"===e&&void 0===n)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...o}}function Ht(t,e=!1){const n={};for(const[r,s]of Object.entries(t??{})){const t=zt(s,e);t&&(n[r]=t)}return n}function Wt(t){if(!t)return 0;let e=0;for(const[n,r]of Object.entries(t)){e+=2*n.length,e+=2*r.type.length,e+=2*(r.unit?.length??0);const t=r.value;Array.isArray(t)?e+=Jt(t[0])*t.length:j(t)?e+=Jt(t):e+=100}return e}function Jt(t){return"string"==typeof t?2*t.length:"boolean"==typeof t?4:"number"==typeof t?8:0}function Kt(){return qt(r()).getCurrentScope()}function Gt(){return qt(r()).getIsolationScope()}function Yt(){return i("globalScope",()=>new Mt)}function Xt(...t){const e=qt(r());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}function Vt(){return Kt().getClient()}function Qt(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e,i={trace_id:n,span_id:s||At()};return r&&(i.parent_span_id=r),i}const Zt="sentry.source",te="sentry.sample_rate",ee="sentry.previous_trace_sample_rate",ne="sentry.op",re="sentry.origin",se="sentry.idle_span_finish_reason",ie="sentry.measurement_unit",oe="sentry.measurement_value",ae="sentry.release",ce="sentry.environment",ue="sentry.segment.name",fe="sentry.segment.id",le="sentry.sdk.name",he="sentry.sdk.version",de="sentry.sdk.integrations",pe="user.id",me="user.email",ye="user.ip_address",ge="user.name",ve="sentry.custom_span_name",be="sentry.profile_id",Se="sentry.exclusive_time",we="sentry.link.type";function ke(t,e){t.setAttribute("http.response.status_code",e);const n=function(t){if(t<400&&t>=100)return{code:1};if(t>=400&&t<500)switch(t){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(t>=500&&t<600)switch(t){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:"internal_error"}}(e);"unknown_error"!==n.message&&t.setStatus(n)}const _e="_sentryScope",Te="_sentryIsolationScope",Ie=Symbol.for("sentry.otelSourceInference");function xe(t,e,n){t&&(H(t,Te,Y(n)),H(t,_e,e))}function Ee(t){const e=t;return{scope:e[_e],isolationScope:X(e[Te])}}const Ce="sentry-";function Re(t){const e=function(t){if(!t||!D(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce((t,e)=>{const n=Ae(e);
1return Object.entries(n).forEach(([e,n])=>{t[e]=n}),t},{});return Ae(t)}(t);if(!e)return;const n=Object.entries(e).reduce((t,[e,n])=>{if(e.startsWith(Ce)){t[e.slice(7)]=n}return t},{});return Object.keys(n).length>0?n:void 0}function Oe(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce((t,[e,n],r)=>{const s=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,i=0===r?s:`${t},${s}`;return i.length>8192?t:i},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`${Ce}${e}`]=n),t),{}))}function Ae(t){return t.split(",").map(t=>{const e=t.indexOf("=");if(-1===e)return[];return[t.slice(0,e),t.slice(e+1)].map(t=>{try{return decodeURIComponent(t.trim())}catch{return}})}).reduce((t,[e,n])=>(e&&n&&(t[e]=n),t),{})}const Me=/^o(\d+)\./,$e=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Le(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${o}`}function De(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Pe(t){const e=t.getOptions(),{host:n}=t.getDsn()||{};let r;return e.orgId?r=String(e.orgId):n&&(r=function(t){const e=t.match(Me);return e?.[1]}(n)),r}function je(t){const e="string"==typeof t?function(t){const e=$e.exec(t);if(!e)return void c(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});const[n,r,s="",i="",o="",a=""]=e.slice(1);let u="",f=a;const l=f.split("/");if(l.length>1&&(u=l.slice(0,-1).join("/"),f=l.pop()),f){const t=f.match(/^\d+/);t&&(f=t[0])}return De({host:i,pass:s,path:u,projectId:f,port:o,protocol:n,publicKey:r})}(t):De(t);if(e)return e}function Fe(t){if("boolean"==typeof t)return Number(t);const e="string"==typeof t?parseFloat(t):t;return"number"!=typeof e||isNaN(e)||e<0||e>1?void 0:e}const Ne=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Be(t,e){const n=function(t){if(!t)return;const e=t.match(Ne);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),r=Re(e);if(!n?.traceId)return{traceId:Ot(),sampleRand:nt()};const s=function(t,e){const n=Fe(e?.sample_rand);if(void 0!==n)return n;const r=Fe(e?.sample_rate);return r&&void 0!==t?.parentSampled?t.parentSampled?nt()*r:r+nt()*(1-r):nt()}(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:o,parentSampled:a}=n;return{traceId:i,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:s}}function Ue(t=Ot(),e=At(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function qe(t=Ot(),e=At(),n){return`00-${t}-${e}-${n?"01":"00"}`}let ze=!1;function He(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:c}=Ve(t);return{parent_span_id:i,span_id:e,trace_id:n,data:r,op:s,status:o,origin:a,links:c}}function We(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:Ve(t).parent_span_id,i=Ee(t).scope;return{parent_span_id:s,span_id:r?i?.getPropagationContext().propagationSpanId||At():e,trace_id:n}}function Je(t){const{traceId:e,spanId:n}=t.spanContext();return Ue(e,n,rn(t))}function Ke(t){return t&&t.length>0?t.map(({context:{spanId:t,traceId:e,traceFlags:n,...r},attributes:s})=>({span_id:t,trace_id:e,sampled:1===n,attributes:s,...r})):void 0}function Ge(t){return t?.length?t.map(({context:{spanId:t,traceId:e,traceFlags:n},attributes:r})=>({span_id:t,trace_id:e,sampled:1===n,attributes:r})):void 0}function Ye(t){return"number"==typeof t?Xe(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Xe(t.getTime()):Tt()}function Xe(t){return t>9999999999?t/1e3:t}function Ve(t){if(nn(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(en(t)){const{attributes:r,startTime:s,name:i,endTime:o,status:a,links:c}=t;return{span_id:e,trace_id:n,data:r,description:i,parent_span_id:Ze(t),start_timestamp:Ye(s),timestamp:Ye(o)||void 0,status:sn(a),op:r[ne],origin:r[re],links:Ke(c)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function Qe(t){if(nn(t))return t.getStreamedSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(en(t)){const{attributes:r,startTime:s,name:i,endTime:o,status:a,links:c}=t;return{name:i,span_id:e,trace_id:n,parent_span_id:Ze(t),start_timestamp:Ye(s),end_timestamp:Ye(o),is_segment:t===hn(t),status:on(a),attributes:r,links:Ge(c)}}return{span_id:e,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:t===hn(t)}}function Ze(t){return"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0}function tn(t){return{...t,attributes:Ht(t.attributes),links:t.links?.map(t=>({...t,attributes:Ht(t.attributes)}))}}function en(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}function nn(t){return"function"==typeof t.getSpanJSON}function rn(t){const{traceFlags:e}=t.spanContext();return 1===e}function sn(t){if(t&&0!==t.code)return 1===t.code?"ok":t.message||"internal_error"}function on(t){return t&&1!==t.code&&0!==t.code&&"cancelled"!==t.message?"error":"ok"}const an="_sentryChildSpans",cn="_sentryRootSpan";function un(t,e){const n=t[cn]||t;H(e,cn,n),t[an]?t[an].add(e):H(t,an,new Set([e]))}function fn(t){const e=new Set;return function t(n){if(!e.has(n)&&rn(n)){e.add(n);const r=n[an]?Array.from(n[an]):[];for(const e of r)t(e)}}(t),Array.from(e)}const ln=hn;function hn(t){return t[cn]||t}function dn(){const t=qt(r());return t.getActiveSpan?t.getActiveSpan():Z(Kt())}function pn(){ze||(c(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),ze=!0)}let mn=!1;function yn(){function t(){const t=dn(),e=t&&ln(t);if(e){const t="internal_error";e.setStatus({code:2,message:t})}}mn||(mn=!0,I(t),C(t))}function gn(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=t||Vt()?.getOptions();return!(!e||null==e.tracesSampleRate&&!e.tracesSampler)}function vn(t,e){if(!e?.length)return!1;
1for(const n of e){if(wn(n)){if(t.description&&pt(t.description,n))return!0;continue}const e=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!e)continue;const r=!n.name||t.description&&pt(t.description,n.name),s=!n.op||t.op&&pt(t.op,n.op),i=!n.attributes||Object.entries(n.attributes).every(([e,n])=>bn(t.attributes?.[e],n));if(r&&s&&i)return!0}return!1}function bn(t,e){return"string"==typeof t&&("string"==typeof e||e instanceof RegExp)?pt(t,e):Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((t,n)=>t===e[n]):t===e}function Sn(t,e){const n=e.parent_span_id,r=e.span_id;if(n)for(const e of t)e.parent_span_id===r&&(e.parent_span_id=n)}function wn(t){return"string"==typeof t||t instanceof RegExp}const kn=Symbol.for("sentry.nonRecordingSpan");class _n{constructor(t={}){this.N=t.traceId||Ot(),this.B=t.spanId||At(),this.dropReason=t.dropReason,H(this,kn,!0)}spanContext(){return{spanId:this.B,traceId:this.N,traceFlags:0}}end(t){}setAttribute(t,e){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}}function Tn(t){return!!t&&!0===t[kn]}const In="production",xn="_frozenDsc";function En(t,e){H(t,xn,e)}function Cn(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s={environment:n.environment||In,release:n.release,public_key:r,trace_id:t,org_id:Pe(e)};return e.emit("createDsc",s),s}function Rn(t,e){const n=e.getPropagationContext();return n.dsc||Cn(n.traceId,t)}function On(t){const e=Vt();if(!e)return{};const n=ln(t),r=Ve(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s[te]??s[ee];function a(t){return"number"!=typeof o&&"string"!=typeof o||(t.sample_rate=`${o}`),t}const c=n[xn];if(c)return a(c);if(Tn(n)&&!gn(e.getOptions())){const t=Ee(n).scope;if(t)return a({...Rn(e,t)})}const u=i?.get("sentry.dsc"),f=u&&Re(u);if(f)return a(f);const l=Cn(t.spanContext().traceId,e),h=s[Zt]??s["sentry.span.source"],d=r.description;return"url"!==h&&d&&(l.transaction=d),gn()&&(l.sampled=String(rn(n)),l.sample_rand=i?.get("sentry.sample_rand")??Ee(n).scope?.getPropagationContext().sampleRand.toString()),a(l),e.emit("createDsc",l,n),l}function An(t){return!!t&&"function"==typeof t&&"_streamed"in t&&!!t._streamed}function Mn(t,e=[]){return[t,e]}function $n(t,e){const[n,r]=t;return[n,[...r,e]]}function Ln(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function Dn(t){const n=s(e);return n.encodePolyfill?n.encodePolyfill(t):(new TextEncoder).encode(t)}function Pn(t){const[e,n]=t;let r=JSON.stringify(e);function s(t){"string"==typeof r?r="string"==typeof t?r+t:[Dn(r),t]:r.push("string"==typeof t?Dn(t):t)}for(const t of n){const[e,n]=t;if(s(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let t;try{t=JSON.stringify(n)}catch{t=JSON.stringify(ct(n))}s(t)}}return"string"==typeof r?r:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(r)}function jn(t){return[{type:"span"},t]}function Fn(t){const e="string"==typeof t.data?Dn(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const Nn={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function Bn(t){return function(t){return t in Nn}(t)?Nn[t]:t}function Un(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function qn(t,e,n,r){const s=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date(rt()).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:Le(r)},...s&&{trace:s}}}function zn(t,e,n,r=dn()){const s=r&&ln(r);s&&s.addEvent(t,{[oe]:e,[ie]:n})}function Hn(t){if(!t||0===t.length)return;const e={};return t.forEach(t=>{const n=t.attributes||{},r=n[ie],s=n[oe];"string"==typeof r&&"number"==typeof s&&(e[t.name]={value:s,unit:r})}),e}function Wn(t){return"stream"===t.getOptions().traceLifecycle}class Jn{constructor(t={}){this.N=t.traceId||Ot(),this.B=t.spanId||At(),this.U=t.startTimestamp||Tt(),this.q=t.links,this.m={},this.setAttributes({[re]:"manual",[ne]:t.op,...t.attributes}),this.H=t.name,t.parentSpanId&&(this.W=t.parentSpanId),"sampled"in t&&(this.J=t.sampled),t.endTimestamp&&(this.K=t.endTimestamp),this.G=[],this.Y=t.isStandalone,this.K&&this.X()}addLink(t){return this.q?this.q.push(t):this.q=[t],this}addLinks(t){return this.q?this.q.push(...t):this.q=t,this}recordException(t,e){}spanContext(){const{B:t,N:e,J:n}=this;return{spanId:t,traceId:e,traceFlags:n?1:0}}setAttribute(t,e){return void 0===e?delete this.m[t]:this.m[t]=e,this}
1setAttributes(t){return Object.keys(t).forEach(e=>this.setAttribute(e,t[e])),this}updateStartTime(t){this.U=Ye(t)}setStatus(t){return this.V=t,this}updateName(t){return this.H=t,!0!==this[Ie]&&this.setAttribute(Zt,"custom"),this}end(t){this.K||(this.K=Ye(t),this.X())}getSpanJSON(){return{data:this.m,description:this.H,op:this.m[ne],parent_span_id:this.W,span_id:this.B,start_timestamp:this.U,status:sn(this.V),timestamp:this.K,trace_id:this.N,origin:this.m[re],profile_id:this.m[be],exclusive_time:this.m[Se],measurements:Hn(this.G),is_segment:this.Y&&ln(this)===this||void 0,segment_id:this.Y?ln(this).spanContext().spanId:void 0,links:Ke(this.q)}}getStreamedSpanJSON(){return{name:this.H??"",span_id:this.B,trace_id:this.N,parent_span_id:this.W,start_timestamp:this.U,end_timestamp:this.K??this.U,is_segment:this.Y||this===ln(this),status:on(this.V),attributes:this.m,links:Ge(this.q)}}isRecording(){return!this.K&&!!this.J}addEvent(t,e,n){const r=Kn(e)?e:n||Tt(),s=Kn(e)?{}:e||{},i={name:t,time:Ye(r),attributes:s};return this.G.push(i),this}isStandaloneSpan(){return!!this.Y}X(){const t=Vt();t&&(t.emit("spanEnd",this),this.Y||t.emit("afterSpanEnd",this));if(!(this.Y||this===ln(this)))return;if(this.Y)return void(this.J?function(t){const e=Vt();if(!e)return;const n=t[1];if(!n||0===n.length)return void e.recordDroppedEvent("before_send","span");e.sendEnvelope(t)}(function(t,e){const n=On(t[0]),r=e?.getDsn(),s=e?.getOptions().tunnel,i={sent_at:new Date(rt()).toISOString(),...(o=n,!!o.trace_id&&!!o.public_key&&{trace:n}),...!!s&&r&&{dsn:Le(r)}};var o;const{beforeSendSpan:a,ignoreSpans:c}=e?.getOptions()||{},u=c?.length?t.filter(t=>{const e=Ve(t);return!vn({description:e.description,op:e.op,attributes:e.data},c)}):t,f=t.length-u.length;f&&e?.recordDroppedEvent("before_send","span",f);const l=a?t=>{const e=Ve(t);return(An(a)?e:a(e))||(pn(),e)}:Ve,h=[];for(const t of u){const e=l(t);e&&h.push(jn(e))}return Mn(i,h)}([this],t)):t&&t.recordDroppedEvent("sample_rate","span"));if(t&&Wn(t))return void t.emit("afterSegmentSpanEnd",this);const e=this.Z();if(e){(Ee(this).scope||Kt()).captureEvent(e)}}Z(){if(!Gn(Ve(this)))return;this.H||(this.H="<unlabeled transaction>");const{scope:t,isolationScope:e}=Ee(this),n=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this.J)return;const r=fn(this).filter(t=>t!==this&&!function(t){return t instanceof Jn&&t.isStandaloneSpan()}(t)).map(t=>Ve(t)).filter(Gn),s=this.m[Zt];delete this.m[ve];let i=!1;r.forEach(t=>{delete t.data[ve],t.op?.startsWith("gen_ai.")&&(i=!0)});const o={contexts:{trace:He(this)},spans:r.length>1e3?r.sort((t,e)=>t.start_timestamp-e.start_timestamp).slice(0,1e3):r,start_timestamp:this.U,timestamp:this.K,transaction:this.H,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:e,dynamicSamplingContext:On(this),hasGenAiSpans:i},request:n,...s&&{transaction_info:{source:s}}},a=Hn(this.G);return a&&Object.keys(a).length&&(o.measurements=a),o}}function Kn(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function Gn(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}function Yn(t,e,n=()=>{},r=()=>{}){let s;try{s=t()}catch(t){throw e(t),n(),t}return function(t,e,n,r){if(B(t))return Dt(t,t=>{n(),r(t)},t=>{e(t),n()});return n(),r(t),t}(s,e,n,r)}const Xn="__SENTRY_SUPPRESS_TRACING__";function Vn(t){const e=rr();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=nr(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?e=>Xt(t.scope,e):void 0!==s?t=>Qn(s,t):t=>t())(()=>{const e=Kt(),i=ir(e,s),o=Vt();return t.onlyIfParent&&!i?tr(e,o):er({parentSpan:i,spanArguments:n,forceTransaction:r,scope:e})})}function Qn(t,e){const n=rr();return n.withActiveSpan?n.withActiveSpan(t,e):Xt(n=>(Q(n,t||void 0),e(n)))}function Zn(t){const e=rr();return e.startNewTrace?e.startNewTrace(t):Xt(e=>(e.setPropagationContext({traceId:Ot(),sampleRand:nt()}),Qn(null,t)))}function tr(t,e){e?.recordDroppedEvent("no_parent_span","span");const n=new _n({traceId:t.getPropagationContext().traceId});return xe(n,t,Gt()),n}function er({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){const s=Gt();if(!gn()){const e={...s.getPropagationContext(),...r.getPropagationContext()},i=t?t.spanContext().traceId:e.traceId,o=new _n({traceId:i});
1return t&&!n&&un(t,o),xe(o,r,s),o}const i=Vt();if(function(t,e){const n=t?.getOptions().ignoreSpans;if(!t||!Wn(t)||!n?.length)return!1;return vn({description:e.name||"",op:e.attributes?.[ne]||e.op,attributes:e.attributes},n)}(i,e)){cr(r)||i?.recordDroppedEvent("ignored","span");const e=new _n({dropReason:"ignored",traceId:t?.spanContext().traceId??r.getPropagationContext().traceId});return xe(e,r,s),e}let o;if(t&&!n)o=function(t,e,n,r){const{spanId:s,traceId:i}=t.spanContext(),o=cr(e),a=!o&&rn(t),c=a?new Jn({...n,parentSpanId:s,traceId:i,sampled:a}):new _n({traceId:i});un(t,c),xe(c,e,r);const u=Vt();if(!u)return c;Wn(u)&&Tn(c)&&(Tn(t)&&t.dropReason?(c.dropReason=t.dropReason,u.recordDroppedEvent(t.dropReason,"span")):o||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span")));u.emit("spanStart",c),n.endTimestamp&&(u.emit("spanEnd",c),u.emit("afterSpanEnd",c));return c}(t,r,e,s),un(t,o);else if(t){const n=On(t),{traceId:i,spanId:a}=t.spanContext(),c=rn(t);o=sr({traceId:i,parentSpanId:a,...e},r,s,c),En(o,n)}else{const{traceId:t,dsc:n,parentSpanId:i,sampled:a}={...s.getPropagationContext(),...r.getPropagationContext()};o=sr({traceId:t,parentSpanId:i,...e},r,s,a),n&&En(o,n)}return o}function nr(t){const e={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const n={...e};return n.startTimestamp=Ye(t.startTime),delete n.startTime,n}return e}function rr(){return qt(r())}function sr(t,e,n,r){const s=Vt(),i=s?.getOptions()||{},{name:o=""}=t,a={spanAttributes:{...t.attributes},spanName:o,parentSampled:r};s?.emit("beforeSampling",a,{decision:!1});const c=a.parentSampled??r,u=a.spanAttributes,f=e.getPropagationContext(),l=cr(e),[h,d,p]=l?[!1]:function(t,e,n){if(!gn(t))return[!1];let r,s;"function"==typeof t.tracesSampler?(s=t.tracesSampler({...e,inheritOrSampleWith:t=>"number"==typeof e.parentSampleRate?e.parentSampleRate:"boolean"==typeof e.parentSampled?Number(e.parentSampled):t}),r=!0):void 0!==e.parentSampled?s=e.parentSampled:void 0!==t.tracesSampleRate&&(s=t.tracesSampleRate,r=!0);const i=Fe(s);return void 0===i?[!1]:i?[n<i,i,r]:[!1,i,r]}(i,{name:o,parentSampled:c,attributes:u,parentSampleRate:Fe(f.dsc?.sample_rate)},f.sampleRand),m=new Jn({...t,attributes:{[Zt]:"custom",[te]:void 0!==d&&p?d:void 0,...u},sampled:h});return h||!s||l||s.recordDroppedEvent("sample_rate",Wn(s)?"span":"transaction"),xe(m,e,n),s&&s.emit("spanStart",m),m}function ir(t,e){if(e)return e;if(null===e)return;const n=Z(t);if(!n)return;const r=Vt();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?ln(n):n}function or(t){return void 0!==t?e=>Qn(t,e):t=>t()}function ar(t){return Tn(t)&&"ignored"===t.dropReason}function cr(t){return!0===t.getScopeData().sdkProcessingMetadata[Xn]}const ur={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function fr(t,e={}){const n=new Map;let r,s=!1,i="externalFinish",o=!e.disableAutoFinish;const a=[],{idleTimeout:c=ur.idleTimeout,finalTimeout:u=ur.finalTimeout,childSpanTimeout:l=ur.childSpanTimeout,beforeSpanEnd:h,trimIdleSpanEndTimestamp:d=!0}=e,p=Vt(),m=Kt();if(!p||!gn()){const t=new _n({traceId:m.getPropagationContext().traceId});return xe(t,m,Gt()),t}const y=dn(),g=function(t){const e=Vn(t);return Q(Kt(),e),e}(t);function v(){r&&(clearTimeout(r),r=void 0)}function b(t){v(),r=setTimeout(()=>{!s&&0===n.size&&o&&(i="idleTimeout",g.end(t))},c)}function S(t){r=setTimeout(()=>{!s&&o&&(i="heartbeatFailed",g.end(t))},l)}function w(t){s=!0,n.clear(),a.forEach(t=>t()),Q(m,y);const e=Ve(g),{start_timestamp:r}=e;if(!r)return;e.data[se]||g.setAttribute(se,i);const o=e.status;o&&"unknown"!==o||g.setStatus({code:1}),f.log(`[Tracing] Idle span "${e.op}" finished`);const l=fn(g).filter(t=>t!==g);let h=0;l.forEach(e=>{e.isRecording()&&(e.setStatus({code:2,message:"cancelled"}),e.end(t));const n=Ve(e),{timestamp:r=0,start_timestamp:s=0}=n;r-s<=(u+c)/1e3&&s<=t||(!function(t,e){t[an]&&t[an].delete(e)}(g,e),h++)}),h>0&&g.setAttribute("sentry.idle_span_discarded_spans",h)}return g.end=new Proxy(g.end,{apply(t,e,n){if(h&&h(g),Tn(e))return;const[r,...s]=n,i=Ye(r||Tt()),o=fn(g).filter(t=>t!==g),a=Ve(g);if(!o.length||!d)return w(i),Reflect.apply(t,e,[i,...s]);const c=p.getOptions().ignoreSpans,f=o?.reduce((t,e)=>{const n=Ve(e);return n.timestamp?c&&vn({description:n.description,op:n.op,attributes:n.data},c)?t:t?Math.max(t,n.timestamp):n.timestamp:t},void 0),l=a.start_timestamp,m=Math.min(l?l+u/1e3:1/0,Math.max(l||-1/0,Math.min(i,f||1/0)));return w(m),Reflect.apply(t,e,[m,...s])}}),a.push(p.on("spanStart",t=>{if(s||t===g||Ve(t).timestamp||t instanceof Jn&&t.isStandaloneSpan())return;var e;fn(g).includes(t)&&(e=t.spanContext().spanId,v(),n.set(e,!0),S(Tt()+l/1e3))})),a.push(p.on("spanEnd",t=>{var e;s||(e=t.spanContext().spanId,n.has(e)&&n.delete(e),0===n.size&&b(Tt()+c/1e3))})),a.push(p.on("idleSpanEnableAutoFinish",t=>{t===g&&(o=!0,b(),n.size&&S())})),e.disableAutoFinish||b(),setTimeout(()=>{s||(g.setStatus({code:2,message:"deadline_exceeded"}),i="finalTimeout",g.end())},u),g}function lr(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;!function(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=e;Object.keys(n).length&&(t.extra={...n,...t.extra});Object.keys(r).length&&(t.tags={...r,...t.tags});Object.keys(s).length&&(t.user={...s,...t.user});Object.keys(i).length&&(t.contexts={...i,...t.contexts});o&&(t.level=o);a&&"transaction"!==t.type&&(t.transaction=a)}(t,e),r&&function(t,e){t.contexts={trace:We(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:On(e),...t.sdkProcessingMetadata};const n=ln(e),r=Ve(n).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint.length||delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,s),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,i)}function hr(t,e){const{extra:n,tags:r,attributes:s,user:i,contexts:o,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:f,eventProcessors:l,attachments:h,propagationContext:d,transactionName:p,span:m}=e;dr(t,"extra",n),dr(t,"tags",r),dr(t,"attributes",s),dr(t,"user",i),dr(t,"contexts",o),t.sdkProcessingMetadata=Rt(t.sdkProcessingMetadata,c,2),a&&(t.level=a),p&&(t.transactionName=p),m&&(t.span=m),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),f.length&&(t.fingerprint=[...t.fingerprint,...f]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),h.length&&(t.attachments=[...t.attachments,...h]
1),t.propagationContext={...t.propagationContext,...d}}function dr(t,e,n){t[e]=Rt(t[e],n,1)}function pr(t,e){const n=Yt().getScopeData();return t&&hr(n,t.getScopeData()),e&&hr(n,e.getScopeData()),n}function mr(t,e){const n=Qe(t),r=hn(t),s=Qe(r),{isolationScope:i,scope:o}=Ee(t),a=pr(i,o);!function(t,e,n,r){const s=n.getSdkMetadata(),{release:i,environment:o}=n.getOptions();yr(t,{[ae]:i,[ce]:o||In,[ue]:e.name,[fe]:e.span_id,[le]:s?.sdk?.name,[he]:s?.sdk?.version,[pe]:r.user?.id,[me]:r.user?.email,[ye]:r.user?.ip_address,[ge]:r.user?.username,...r.attributes})}(n,s,e,a);const c=t.kind;e.emit("preprocessSpan",n,{spanKind:c}),n.is_segment&&(!function(t,e){const n=function(t){const e={},{response:n,profile:r,cloud_resource:s,culture:i,state:o}=t;if(n&&(null!=n.status_code&&(e["http.response.status_code"]=n.status_code),null!=n.body_size&&(e["http.response.body.size"]=n.body_size)),r&&(r.profile_id&&(e["sentry.profile_id"]=r.profile_id),r.profiler_id&&(e["sentry.profiler_id"]=r.profiler_id)),s)for(const[t,n]of Object.entries(s))null!=n&&(e[t]=n);i&&(i.locale&&(e["culture.locale"]=i.locale),i.timezone&&(e["culture.timezone"]=i.timezone)),o?.state&&"string"==typeof o.state.type&&(e["state.type"]=o.state.type);const a=t.angular;if(a){const t=a.version;"string"!=typeof t&&"number"!=typeof t||(e["angular.version"]=t)}const c=t.react;if(c){const t=c.version;"string"!=typeof t&&"number"!=typeof t||(e["react.version"]=t)}return e}(e.contexts);yr(t,n)}(n,a),function(t,e){const n=e.getIntegrationNames();if(!n.length)return;yr(t,{[de]:n})}(n,e),e.emit("processSegmentSpan",n)),e.emit("processSpan",n);const{beforeSendSpan:u}=e.getOptions(),f=u&&An(u)?function(t,e){const n=e(t);if(!n)return pn(),t;return n}(n,u):n,l=f.attributes?.[Zt];return l&&yr(f,{"sentry.span.source":l}),{...tn(f),tt:r}}function yr(t,e){const n=t.attributes??(t.attributes={});Object.entries(e).forEach(([t,e])=>{null==e||t in n||(n[t]=e)})}function gr(t){return new br(e=>{e(t)})}function vr(t){return new br((e,n)=>{n(t)})}class br{constructor(t){this.et=0,this.nt=[],this.rt(t)}then(t,e){return new br((n,r)=>{this.nt.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.st()})}catch(t){return this.then(t=>t,t)}finally(t){return new br((e,n)=>{let r,s;return this.then(e=>{s=!1,r=e,t&&t()},e=>{s=!0,r=e,t&&t()}).then(()=>{s?n(r):e(r)})})}st(){if(0===this.et)return;const t=this.nt.slice();this.nt=[],t.forEach(t=>{t[0]||(1===this.et&&t[1](this.it),2===this.et&&t[2](this.it),t[0]=!0)})}rt(t){const e=(t,e)=>{0===this.et&&(B(e)?e.then(n,r):(this.et=t,this.it=e,this.st()))},n=t=>{e(1,t)},r=t=>{e(2,t)};try{t(n,r)}catch(t){r(t)}}}
1function Sr(t,e,n,r=0){try{const s=wr(e,n,t,r);return B(s)?s:gr(s)}catch(t){return vr(t)}}function wr(t,e,n,r){const s=n[r];if(!t||!s)return t;const i=s({...t},e);return B(i)?i.then(t=>wr(t,e,n,r+1)):wr(i,e,n,r+1)}let kr,_r,Tr,Ir;function xr(t,n,r,s,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:c=1e3}=t,u={...n,event_id:n.event_id||r.event_id||yt(),timestamp:n.timestamp||kt()},f=r.integrations||t.integrations.map(t=>t.name);!function(t,e){const{environment:n,release:r,dist:s,maxValueLength:i}=e;t.environment=t.environment||n||In,!t.release&&r&&(t.release=r);!t.dist&&s&&(t.dist=s);const o=t.request;o?.url&&i&&(o.url=ht(o.url,i));i&&t.exception?.values?.forEach(t=>{t.value&&(t.value=ht(t.value,i))})}(u,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(u,f),i&&i.emit("applyFrameMetadata",n),void 0===n.type&&function(t,n){const r=function(t){const n=e._sentryDebugIds,r=e.ot;if(!n&&!r)return{};const s=n?Object.keys(n):[],i=r?Object.keys(r):[];if(Ir&&s.length===_r&&i.length===Tr)return Ir;_r=s.length,Tr=i.length,Ir={},kr||(kr={});const o=(e,n)=>{for(const r of e){const e=n[r],s=kr?.[r];if(s&&Ir&&e)Ir[s[0]]=e,kr&&(kr[r]=[s[0],e]);else if(e){const n=t(r);for(let t=n.length-1;t>=0;t--){const s=n[t],i=s?.filename;if(i&&Ir&&kr){Ir[i]=e,kr[r]=[i,e];break}}}}};return n&&o(s,n),r&&o(i,r),Ir}(n);t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.filename&&(t.debug_id=r[t.filename])})})}(u,t.stackParser);const l=function(t,e){if(!e)return t;const n=t?t.clone():new Mt;return n.update(e),n}(s,r.captureContext);r.mechanism&&St(u,r.mechanism);const h=i?i.getEventProcessors():[],d=pr(o,l),p=[...r.attachments||[],...d.attachments];p.length&&(r.attachments=p),lr(u,d);const m=[...h,...d.eventProcessors];return(r.data&&!0===r.data.__sentry__?gr(u):Sr(m,u,r)).then(t=>(t&&function(t){const e={};if(t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)})}),0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([t,e])=>{n.push({type:"sourcemap",code_file:t,debug_id:e})})}(t),"number"==typeof a&&a>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:ct(t.data,e,n)}}))},...t.user&&{user:ct(t.user,e,n)},...t.contexts&&{contexts:ct(t.contexts,e,n)},...t.extra&&{extra:ct(t.extra,e,n)}};t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=ct(t.contexts.trace.data,e,n)));t.spans&&(r.spans=t.spans.map(t=>({...t,...t.data&&{data:ct(t.data,e,n)}})));t.contexts?.flags&&r.contexts&&(r.contexts.flags=ct(t.contexts.flags,3,n));return r}(t,a,c):t))}function Er(t){if(t)return function(t){return t instanceof Mt||"function"==typeof t}(t)||function(t){return Object.keys(t).some(t=>Cr.includes(t))}(t)?{captureContext:t}:t}const Cr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function captureException(t,e){return Kt().captureException(t,Er(e))}function Rr(t,e){return Kt().captureEvent(t,e)}function Or(t,e){Gt().setContext(t,e)}function Ar(){return Gt().lastEventId()}function Mr(){const t=Vt();return!1!==t?.getOptions().enabled&&!!t?.getTransport()}function $r(t){Gt().addEventProcessor(t)}function Lr(t){const n=Gt(),{user:r}=pr(n,Kt()),{userAgent:s}=e.navigator||{},i=Et({user:r,...s&&{userAgent:s},...t}),o=n.getSession();return"ok"===o?.status&&Ct(o,{status:"exited"}),Dr(),n.setSession(i),i}function Dr(){const t=Gt(),e=Kt().getSession()||t.getSession();e&&function(t){let e={};"ok"===t.status&&(e={status:"exited"}),Ct(t,e)}(e),Pr(),t.setSession()}function Pr(){const t=Gt(),e=Vt(),n=t.getSession();n&&e&&e.captureSession(n)}function jr(t=!1){t?Dr():Pr()}function Fr(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Nr(t,e,n){return e||`${function(t){return`${Fr(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){const n={sentry_version:"7"};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}(t,n)}`}const Br=[];function Ur(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;if(e.forEach(t=>{t.isDefaultInstance=!0}),Array.isArray(n))r=[...e,...n];else if("function"==typeof n){const t=n(e);r=Array.isArray(t)?t:[t]}else r=e;return function(t){const e={};return t.forEach(t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.values(e)}(r)}function qr(t,e){for(const n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function zr(t,e,n){if(!n[e.name]){if(n[e.name]=e,Br.includes(e.name)||"function"!=typeof e.setupOnce||(e.setupOnce(),Br.push(e.name)),e.setup&&"function"==typeof e.setup&&e.setup(t),"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",(e,r)=>n(e,r,t))}if("function"==typeof e.processEvent){const n=e.processEvent.bind(e),r=Object.assign((e,r)=>n(e,r,t),{id:e.name});t.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach(n=>{const r=e[n];"function"==typeof r&&t.on(n,n=>r.call(e,n,t))})}}let Hr,Wr=0;function Jr(){return"undefined"!=typeof window&&!0}function Kr(t,e){const n=e?"auto":"never";return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Jr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:t}]}function Gr(t,e){const n=e??function(t){return Yr().get(t)}(t)??[];
1if(0===n.length)return;const r=t.getOptions(),s=function(t,e,n,r,s){const i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=Le(r)),Mn(i,[Kr(t,s)])}(n,r._metadata,r.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);Yr().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(s)}function Yr(){return i("clientToLogBufferMap",()=>new WeakMap)}function Xr(t,e){const n=e?"auto":"never";return[{type:"trace_metric",item_count:t.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Jr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:t}]}function Vr(t,e,n,r=!0){!n||!r&&e in t||(t[e]=n)}function Qr(t,e){const n=rs(),r=ns(t);void 0===r?n.set(t,[e]):r.length>=1e3?(es(t,r),n.set(t,[e])):n.set(t,[...r,e])}function Zr(t,e,n,r){const[,s]=function(t,e){return e?Xt(e,()=>{const n=dn(),r=n?We(n):Qt(e);return[n?On(n):Rn(t,e),r]}):[void 0,void 0]}(e,n),i=Z(n),o=i?i.spanContext().traceId:s?.trace_id,a=i?i.spanContext().spanId:void 0,c=Tt(),u=function(t){const e=Math.floor(1e3*t);void 0!==Hr&&e!==Hr&&(Wr=0);const n=Wr;return Wr++,Hr=e,{key:"sentry.timestamp.sequence",value:{value:n,type:"integer"}}}(c);return{timestamp:c,trace_id:o??"",span_id:a,name:t.name,type:t.type,unit:t.unit,value:t.value,attributes:{...Ht(r),...Ht(t.attributes,"skip-undefined"),[u.key]:u.value}}}function ts(t,e){const n=e?.scope??Kt(),r=e?.captureSerializedMetric??Qr,s=n?.getClient()??Vt();if(!s)return;const{_experiments:i,enableMetrics:o,beforeSendMetric:a}=s.getOptions();if(!(o??i?.enableMetrics??!0))return;const{user:c,attributes:u}=pr(Gt(),n),f=function(t,e,n){const{release:r,environment:s}=e.getOptions(),i={...t.attributes};Vr(i,"user.id",n.id,!1),Vr(i,"user.email",n.email,!1),Vr(i,"user.name",n.username,!1),Vr(i,"sentry.release",r),Vr(i,"sentry.environment",s);const{name:o,version:a}=e.getSdkMetadata()?.sdk??{};Vr(i,"sentry.sdk.name",o),Vr(i,"sentry.sdk.version",a);const c=e.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return Vr(i,"sentry.replay_id",u),u&&"buffer"===c?.getRecordingMode()&&Vr(i,"sentry._internal.replay_is_buffering",!0),{...t,attributes:i}}(t,s,c);s.emit("processMetric",f);const l=a||i?.beforeSendMetric,h=l?l(f):f;if(!h)return;r(s,Zr(h,s,n,u)),s.emit("afterCaptureMetric",h)}function es(t,e){const n=e??ns(t)??[];
1if(0===n.length)return;const r=t.getOptions(),s=function(t,e,n,r,s){const i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=Le(r)),Mn(i,[Xr(t,s)])}(n,r._metadata,r.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);rs().set(t,[]),t.emit("flushMetrics"),t.sendEnvelope(s)}function ns(t){return rs().get(t)}function rs(){return i("clientToMetricBufferMap",()=>new WeakMap)}function ss(t){return tn({trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,name:t.description||"",start_timestamp:t.start_timestamp,end_timestamp:t.timestamp||t.start_timestamp,status:t.status&&"ok"!==t.status&&"cancelled"!==t.status?"error":"ok",is_segment:!1,attributes:{...t.data},links:t.links})}function is(t){return"object"==typeof t&&"function"==typeof t.unref&&t.unref(),t}const os=Symbol.for("SentryBufferFullError");function as(t=100){const e=new Set;function n(t){e.delete(t)}return{get $(){return Array.from(e)},add:function(r){if(!(e.size<t))return vr(os);const s=r();return e.add(s),s.then(()=>n(s),()=>n(s)),s},drain:function(t){if(!e.size)return gr(!0);const n=Promise.allSettled(Array.from(e)).then(()=>!0);if(!t)return n;const r=[n,new Promise(e=>is(setTimeout(()=>e(!1),t)))];return Promise.race(r)}}}function cs(t,e,n=rt()){return function(t,e){return t[e]||t.all||0}(t,e)>n}function us(t,{statusCode:e,headers:n},r=rt()){const s={...t},i=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(i)for(const t of i.trim().split(",")){const[e,n,,,i]=t.split(":",5),o=parseInt(e,10),a=1e3*(isNaN(o)?60:o);if(n)for(const t of n.split(";"))"metric_bucket"===t&&i&&!i.split(";").includes("custom")||(s[t]=r+a);else s.all=r+a}else o?s.all=r+function(t,e=rt()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}(o,r):429===e&&(s.all=r+6e4);return s}function fs(t,e,n=as(t.bufferSize||64)){let r={};return{send:function(s){const i=[];if(Ln(s,(e,n)=>{const s=Bn(n);cs(r,s)?t.recordDroppedEvent("ratelimit_backoff",s):i.push(e)}),0===i.length)return Promise.resolve({});const o=Mn(s[0],i),a=e=>{(function(t,e){return Ln(t,(t,n)=>e.includes(n))})(o,["client_report"])||Ln(o,(n,r)=>{t.recordDroppedEvent(e,Bn(r))})};return n.add(()=>e({body:Pn(o)}).then(t=>413===t.statusCode?(a("send_error"),t):(r=us(r,t),t),t=>{throw a("network_error"),t})).then(t=>t,t=>{if(t===os)return a("queue_overflow"),Promise.resolve({});throw t})},flush:t=>n.drain(t)}}const ls=["forwarded","-ip","remote-","via","-user"];const hs={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function ds(t){const e=null!=t.dataCollection?hs:!0===t.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:ls},httpHeaders:{request:{deny:ls},response:{deny:ls}},httpBodies:[],queryParams:{deny:ls},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:7};const n=t.dataCollection??{};return{userInfo:n.userInfo??e.userInfo,cookies:n.cookies??e.cookies,httpHeaders:{request:n.httpHeaders?.request??e.httpHeaders.request,response:n.httpHeaders?.response??e.httpHeaders.response},httpBodies:n.httpBodies??e.httpBodies,queryParams:n.queryParams??e.queryParams,genAI:{inputs:n.genAI?.inputs??e.genAI.inputs,outputs:n.genAI?.outputs??e.genAI.outputs}
1,stackFrameVariables:n.stackFrameVariables??e.stackFrameVariables,frameContextLines:n.frameContextLines??e.frameContextLines}}const ps=Symbol.for("SentryInternalError"),ms=Symbol.for("SentryDoNotSendEventError");function ys(t){return{message:t,[ps]:!0}}function gs(t){return{message:t,[ms]:!0}}function vs(t,e,n,r,s){let i,o=0,a=!1;t.on(n,()=>{o=0,clearTimeout(i),a=!1}),t.on(e,e=>{if(o+=r(e),o>=8e5)s(t);else if(!a){const e=t.getOptions().ct??5e3;e>0&&(a=!0,i=is(setTimeout(()=>{s(t)},e)))}}),t.on("flush",()=>{s(t)})}class bs{constructor(t){if(this.ut=t,this._integrations={},this.ft=0,this.lt={},this.ht={},this.o=[],this.dt=as(t.transportOptions?.bufferSize??64),this.yt=ds(t),t.dsn&&(this.gt=je(t.dsn)),this.gt){const e=Nr(this.gt,t.tunnel,t._metadata?t._metadata.sdk:void 0);this.vt=t.transport({tunnel:this.ut.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}this.ut.enableLogs=this.ut.enableLogs??this.ut._experiments?.enableLogs,this.ut.enableLogs&&vs(this,"afterCaptureLog","flushLogs",Ts,Gr);(this.ut.enableMetrics??this.ut._experiments?.enableMetrics??!0)&&vs(this,"afterCaptureMetric","flushMetrics",_s,es)}captureException(t,e,n){const r=yt();if(wt(t))return r;const s={event_id:r,...e};return this.bt(()=>this.eventFromException(t,s).then(t=>this.St(t,s,n)).then(t=>t),"error"),s.event_id}captureMessage(t,e,n,r){const s={event_id:yt(),...n},i=P(t)?t:String(t),o=j(t),a=o?this.eventFromMessage(i,e,s):this.eventFromException(t,s);return this.bt(()=>a.then(t=>this.St(t,s,r)),o?"unknown":"error"),s.event_id}captureEvent(t,e,n){const r=yt();if(e?.originalException&&wt(e.originalException))return r;const s={event_id:r,...e},i=t.sdkProcessingMetadata||{},o=i.capturedSpanScope,a=i.capturedSpanIsolationScope,c=Ss(t.type);return this.bt(()=>this.St(t,s,o||n,a),c),s.event_id}captureSession(t){this.sendSession(t),Ct(t,{init:!1})}getDsn(){return this.gt}getOptions(){return this.ut}getDataCollectionOptions(){return this.yt}getSdkMetadata(){return this.ut._metadata}getTransport(){return this.vt}async flush(t){const e=this.vt;if(this.emit("flush"),!e)return!0;const n=await this.wt(t),r=await e.flush(t);return n&&r}async close(t){Gr(this);const e=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),e}getEventProcessors(){return this.o}addEventProcessor(t){this.o.push(t)}init(){(this.kt()||this.ut.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._t()}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const e=this._integrations[t.name];!e&&t.beforeSetup&&t.beforeSetup(this),zr(this,t,this._integrations),e||qr(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);const n=function(t,e){if("transaction"!==t.type||!t.spans?.length||!t.sdkProcessingMetadata?.hasGenAiSpans||!1===e.getOptions().streamGenAiSpans||Wn(e))return;const n=[],r=[];for(const e of t.spans)e.op?.startsWith("gen_ai.")?n.push(ss(e)):r.push(e);if(0===n.length)return;t.spans=r;const s=e.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Jr()&&{ingest_settings:{infer_ip:s,infer_user_agent:s}},items:n}]}(t,this);let r=function(t,e,n,r){const s=Un(n),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){if(!e)return t;const n=t.sdk||{};t.sdk={...n,name:n.name||e.name,version:n.version||e.version,integrations:[...t.sdk?.integrations||[],...e.integrations||[]],packages:[...t.sdk?.packages||[],...e.packages||[]],settings:t.sdk?.settings||e.settings?{...t.sdk?.settings,...e.settings}:void 0}}(t,n?.sdk);const o=qn(t,s,r,e);return delete t.sdkProcessingMetadata,Mn(o,[[{type:i},t]])}(t,this.gt,this.ut._metadata,this.ut.tunnel);for(const t of e.attachments||[])r=$n(r,Fn(t));n&&(r=$n(r,n)),this.sendEnvelope(r).then(e=>this.emit("afterSendEvent",t,e))}sendSession(t){const{release:e,environment:n=In}=this.ut;if("aggregates"in t){const r=t.attrs||{};if(!r.release&&!e)return;r.release=r.release||e,r.environment=r.environment||n,t.attrs=r}else{if(!t.release&&!e)return;t.release=t.release||e,t.environment=t.environment||n}
1this.emit("beforeSendSession",t);const r=function(t,e,n,r){const s=Un(n);return Mn({sent_at:new Date(rt()).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:Le(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.gt,this.ut._metadata,this.ut.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,e,n=1){if(this.ut.sendClientReports){const r=`${t}:${e}`;this.lt[r]=(this.lt[r]||0)+n}}on(t,e){const n=this.ht[t]=this.ht[t]||new Set,r=(...t)=>e(...t);return n.add(r),()=>{n.delete(r)}}emit(t,...e){const n=this.ht[t];n&&n.forEach(t=>t(...e))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this.kt()&&this.vt)try{return await this.vt.send(t)}catch(t){return{}}return{}}registerCleanup(t){}dispose(){}_t(){const{integrations:t}=this.ut;this._integrations=function(t,e){const n={};return e.forEach(e=>{e?.beforeSetup&&e.beforeSetup(t)}),e.forEach(e=>{e&&zr(t,e,n)}),n}(this,t),qr(this,t)}Tt(t,e){let n="fatal"===e.level,r=!1;const s=e.exception?.values;if(s){r=!0,n=!1;for(const t of s)if(!1===t.mechanism?.handled){n=!0;break}}const i="ok"===t.status;(i&&0===t.errors||i&&n)&&(Ct(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}async wt(t){let e=0;for(;!t||e<t;){if(await new Promise(t=>setTimeout(t,1)),!this.ft)return!0;e++}return!1}kt(){return!1!==this.getOptions().enabled&&void 0!==this.vt}It(t,e,n,r){const s=this.getOptions(),i=this.getIntegrationNames();return!e.integrations&&i.length&&(e.integrations=i),this.emit("preprocessEvent",t,e),t.type||r.setLastEventId(t.event_id||e.event_id),xr(s,t,e,n,this,r).then(t=>{if(null===t)return t;this.emit("postprocessEvent",t,e),t.contexts={trace:{...t.contexts?.trace,...Qt(n)},...t.contexts};const r=Rn(this,n);return t.sdkProcessingMetadata={dynamicSamplingContext:r,...t.sdkProcessingMetadata},t})}St(t,e={},n=Kt(),r=Gt()){return this.xt(t,e,n,r).then(t=>t.event_id,t=>{})}xt(t,e,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=ks(t),a=ws(t),c=`before send for type \`${t.type||"error"}\``,u=void 0===i?void 0:Fe(i);if(a&&"number"==typeof u&&nt()>u)return this.recordDroppedEvent("sample_rate","error"),vr(gs(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const f=Ss(t.type);return this.It(t,e,n,r).then(t=>{if(null===t)throw this.recordDroppedEvent("event_processor",f),gs("An event processor returned `null`, will not send event.");if(!0===e.data?.__sentry__)return t;const n=function(t,e,n,r){const{beforeSend:s,beforeSendTransaction:i,ignoreSpans:o}=e,a=!An(e.beforeSendSpan)&&e.beforeSendSpan;let c=n;if(ws(c)&&s)return s(c,r);if(ks(c)){if(a||o){const e=function(t){const{trace_id:e,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:a}=t.contexts?.trace??{};return{data:o??{},description:t.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:s,timestamp:t.timestamp,trace_id:e??"",origin:i,profile_id:o?.[be],exclusive_time:o?.[Se],measurements:t.measurements,is_segment:!0}}(c);if(o?.length&&vn({description:e.description,op:e.op,attributes:e.data},o))return null;if(a){const t=a(e);t?c=Rt(n,{type:"transaction",timestamp:(u=t).timestamp,start_timestamp:u.start_timestamp,transaction:u.description,contexts:{trace:{trace_id:u.trace_id,span_id:u.span_id,parent_span_id:u.parent_span_id,op:u.op,status:u.status,origin:u.origin,data:{...u.data,...u.profile_id&&{[be]:u.profile_id},...u.exclusive_time&&{[Se]:u.exclusive_time}}}},measurements:u.measurements}):pn()}if(c.spans){const e=[],n=c.spans;for(const t of n)if(o?.length&&vn({description:t.description,op:t.op,attributes:t.data},o))Sn(n,t);else if(a){const n=a(t);n?e.push(n):(pn(),e.push(t))}else e.push(t);const r=c.spans.length-e.length;r&&t.recordDroppedEvent("before_send","span",r),c.spans=e}}if(i){if(c.spans){const t=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return i(c,r)}}var u;return c}(this,s,t,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(B(t))return t.then(t=>{if(!F(t)&&null!==t)throw ys(n);return t},t=>{throw ys(`${e} rejected with ${t}`)});if(!F(t)&&null!==t)throw ys(n);return t}(n,c)}).then(s=>{if(null===s){if(this.recordDroppedEvent("before_send",f),o){const e=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",e)}throw gs(`${c} returned \`null\`, will not send event.`)}const i=n.getSession()||r.getSession();if(a&&i&&this.Tt(i,s),o){const t=(s.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(s.spans?s.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const u=s.transaction_info;if(o&&u&&s.transaction!==t.transaction){const t="custom";s.transaction_info={...u,source:t}}return this.sendEvent(s,e),s}).then(null,t=>{if(function(t){return!!t&&"object"==typeof t&&ms in t}(t)||function(t){return!!t&&"object"==typeof t&&ps in t}(t))throw t;throw this.captureException(t,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:t}),ys(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}bt(t,e){this.ft++,this.dt.add(t).then(t=>(this.ft--,t),t=>(this.ft--,t===os&&this.recordDroppedEvent("queue_overflow",e),t))}Et(){const t=this.lt;return this.lt={},Object.entries(t).map(([t,e])=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e}})}Ct(){const t=this.Et();if(0===t.length)return;if(!this.gt)return;const e=(n=t,Mn((r=this.ut.tunnel&&Le(this.gt))?{dsn:r}:{},[[{type:"client_report"},{timestamp:kt(),discarded_events:n}]]));var n,r;this.sendEnvelope(e)}}function Ss(t){return"replay_event"===t?"replay":t||"error"}function ws(t){return void 0===t.type}function ks(t){return"transaction"===t.type}function _s(t){let e=0;return t.name&&(e+=2*t.name.length),e+=8,e+Is(t.attributes)}function Ts(t){let e=0;return t.message&&(e+=2*t.message.length),e+Is(t.attributes)}function Is(t){if(!t)return 0;let e=0;return Object.values(t).forEach(t=>{Array.isArray(t)?e+=t.length*xs(t[0]):j(t)?e+=xs(t):e+=100}),e}function xs(t){return"string"==typeof t?2*t.length:"number"==typeof t?8:"boolean"==typeof t?4:0}
1function Es(t){Kt().setClient(t)}function Cs(t){return"isRelative"in t}function Rs(t,e){const n=t.indexOf("://")<=0&&0!==t.indexOf("//"),r=n?"thismessage:/":void 0;try{if("canParse"in URL&&!URL.canParse(t,r))return;const e=new URL(t,r);return n?{isRelative:n,pathname:e.pathname,search:e.search,hash:e.hash}:e}catch{}}function Os(t){if(Cs(t))return t.pathname;const e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}function As(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Ms(t,e=!0){if(t.startsWith("data:")){const n=t.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",s=t.includes(";base64,"),i=t.indexOf(",");let o="";if(e&&-1!==i){const e=t.slice(i+1);o=e.length>10?`${e.slice(0,10)}... [truncated]`:e}return`data:${r}${s?",base64":""}${o?`,${o}`:""}`}return t}function $s(t,e){const n=e?.getDsn(),r=e?.getOptions().tunnel;return function(t,e){const n=Rs(t);if(!n||Cs(n))return!1;if(!e)return!1;return r=n.hostname,s=e.host,(r===s||s.length>0&&r.endsWith(`.${s}`))&&/(^|&|\?)sentry_key=/.test(n.search);var r,s}(t,n)||function(t,e){if(!e)return!1;return Ls(t)===Ls(e)}(t,r)}function Ls(t){return"/"===t[t.length-1]?t.slice(0,-1):t}function Ds(t){"aggregates"in t?void 0===t.attrs?.ip_address&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):void 0===t.ipAddress&&(t.ipAddress="{{auto}}")}function Ps(t={}){const e=t.client||Vt();if(!Mr()||!e)return{};const n=qt(r());if(n.getTraceData)return n.getTraceData(t);const s=t.scope||Kt(),i=t.span||dn(),o=Tn(i)&&!gn(e.getOptions()),a=i&&!o?Je(i):function(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return Ue(e,r,n)}(s),c=Oe(i?On(i):Rn(e,s));if(!Ne.test(a))return f.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const u={"sentry-trace":a,baggage:c};return t.propagateTraceparent&&(u.traceparent=i&&!o?function(t){const{traceId:e,spanId:n}=t.spanContext();return qe(e,n,rn(t))}(i):function(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return qe(e,r,n)}(s)),u}const js=100;function Fs(t,e){const n=Vt(),r=Gt();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=js}=n.getOptions();if(i<=0)return;const o={timestamp:kt(),...t},a=s?c(()=>s(o,e)):o;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,e),r.addBreadcrumb(a,i))}let Ns;const Bs=new WeakMap,Us=()=>({name:"FunctionToString",setupOnce(){Ns=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=J(this),n=Bs.has(Vt())&&void 0!==e?e:this;return Ns.apply(n,t)}}catch{}},setup(t){Bs.set(t,!0)}}),qs=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],zs=(t={})=>{let e;return{name:"EventFilters",setup(n){const r=n.getOptions();e=Ws(t,r)},processEvent(n,r,s){if(!e){const n=s.getOptions();e=Ws(t,n)}return function(t,e){if(t.type){if("transaction"===t.type&&function(t,e){if(!e?.length)return!1;const n=t.transaction;return!!n&&mt(n,e)}(t,e.ignoreTransactions))return!0}else{if(function(t,e){if(!e?.length)return!1;return function(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}(t).some(t=>mt(t,e))}(t,e.ignoreErrors))return!0;if(function(t){if(!t.exception?.values?.length)return!1;return!t.message&&!t.exception.values.some(t=>t.stacktrace||t.type&&"Error"!==t.type||t.value)}(t))return!0;
1if(function(t,e){if(!e?.length)return!1;const n=Js(t);return!!n&&mt(n,e)}(t,e.denyUrls))return!0;if(!function(t,e){if(!e?.length)return!0;const n=Js(t);return!n||mt(n,e)}(t,e.allowUrls))return!0}return!1}(n,e)?null:n}}},Hs=(t={})=>({...zs(t),name:"InboundFilters"});function Ws(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:qs],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function Js(t){try{const e=[...t.exception?.values??[]].reverse().find(t=>void 0===t.mechanism?.parent_id&&t.stacktrace?.frames?.length),n=e?.stacktrace?.frames;return n?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return null}}function Ks(t,e,n,r,s,i){if(!s.exception?.values||!i||!U(i.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=Gs(t,e,r,i.originalException,n,s.exception.values,o,0))}function Gs(t,e,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(U(r[s],Error)){Xs(o,a,r);const i=t(e,r[s]),u=c.length;Vs(i,s,u,a),c=Gs(t,e,n,r[s],s,[i,...c],i,u)}return Ys(r)&&r.errors.forEach((i,u)=>{if(U(i,Error)){Xs(o,a,r);const f=t(e,i),l=c.length;Vs(f,`errors[${u}]`,l,a),c=Gs(t,e,n,i,s,[f,...c],f,l)}}),c}function Ys(t){return Array.isArray(t.errors)}function Xs(t,e,n){t.mechanism={handled:!0,type:"auto.core.linked_errors",...Ys(n)&&{is_exception_group:!0},...t.mechanism,exception_id:e}}function Vs(t,e,n,r){t.mechanism={handled:!0,...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function Qs(t){return function(t){return A(t)&&"__sentry_fetch_url_host__"in t&&"string"==typeof t.__sentry_fetch_url_host__}(t)?`${t.message} (${t.__sentry_fetch_url_host__})`:t.message}const Zs=new Set([]);function ti(){"console"in e&&o.forEach(function(t){t in e.console&&z(e.console,t,function(n){return a[t]=n,function(...n){const r=n[0],s=a[t],i=Zs.size&&"string"==typeof r&&mt(r,Zs);i||_("console",{args:n,level:t}),i||s?.apply(e.console,n)}})})}function ei(t){return"warn"===t?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const ni=()=>{let t;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!si(t,e))return!1;if(!ri(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=ii(e),r=ii(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!si(t,e))return!1;if(!ri(t,e))return!1;return!0}(t,e))return!0;return!1}(e,t))return null}catch{}return t=e}}};function ri(t,e){let n=v(t),r=v(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],s=n[t];if(e.filename!==s.filename||e.lineno!==s.lineno||e.colno!==s.colno||e.function!==s.function)return!1}return!0}function si(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function ii(t){return t.exception?.values?.[0]}const oi=()=>({name:"ConversationId",setup(t){t.on("spanStart",t=>{const e=Kt().getScopeData(),n=Gt().getScopeData(),r=e.conversationId||n.conversationId;if(r){const{op:e,data:n,description:s}=Ve(t);if(!e?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!s?.startsWith("ai."))return;t.setAttribute("gen_ai.conversation.id",r)}})}});function ai(t,e,n,r,s){if(!t.fetchData)return;const{method:i,url:o}=t.fetchData,a=gn()&&e(o);if(t.endTimestamp){const e=t.fetchData.__span;if(!e)return;const n=r[e];return void(n&&(a&&(function(t,e){if(e.response){ke(t,e.response.status);const n=e.response?.headers?.get("content-length");if(n){const e=parseInt(n);e>0&&t.setAttribute("http.response_content_length",e)}}else e.error&&t.setStatus({code:2,message:"internal_error"});t.end()}(n,t),function(t,e,n){const r="object"==typeof n&&null!==n?n.onRequestSpanEnd:void 0;r?.(t,{headers:e.response?.headers,error:e.error})}(n,t,s)),delete r[e]))}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}="object"==typeof s?s:{spanOrigin:s},f=Vt(),l=!!dn()||!!f&&Wn(f),h=a&&l?Vn(function(t,e,n){if(t.startsWith("data:")){return{name:`${e} ${Ms(t)}`,attributes:ui(t,void 0,e,n)}}const r=Rs(t),s=r?Os(r):t;return{name:`${e} ${s}`,attributes:ui(t,r,e,n)}}(o,i,c)):new _n;if(a&&!l&&f?.recordDroppedEvent("no_parent_span","span"),t.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(t.fetchData.url)){const e=t.args[0],n={...t.args[1]||{}},r=function(t,e,n,r){const s=Ps({span:n,propagateTraceparent:r}),i=s["sentry-trace"],o=s.baggage,a=s.traceparent;if(!i)return;const c=e.headers||(q(t)?t.headers:void 0);if(c){if(function(t){return"undefined"!=typeof Headers&&U(t,Headers)}(c)){const t=new Headers(c);if(t.get("sentry-trace")||t.set("sentry-trace",i),r&&a&&!t.get("traceparent")&&t.set("traceparent",a),o){const e=t.get("baggage");e?ci(e)||t.set("baggage",`${e},${o}`):t.set("baggage",o)}return t}if(function(t){if(!Array.isArray(t))return!1;return t.every(t=>Array.isArray(t)&&2===t.length&&"string"==typeof t[0])}(c)){const t=[...c];t.find(t=>
1"sentry-trace"===t[0])||t.push(["sentry-trace",i]),r&&a&&!t.find(t=>"traceparent"===t[0])&&t.push(["traceparent",a]);const e=c.find(t=>"baggage"===t[0]&&"string"==typeof t[1]&&ci(t[1]));return o&&!e&&t.push(["baggage",o]),t}{const t="sentry-trace"in c?c["sentry-trace"]:void 0,e="traceparent"in c?c.traceparent:void 0,n="baggage"in c?c.baggage:void 0,s=n?Array.isArray(n)?[...n]:[n]:[],u=n&&(Array.isArray(n)?n.find(t=>ci(t)):ci(n));o&&!u&&s.push(o);const f=Object.assign({},c,{"sentry-trace":t??i,baggage:s.length>0?s.join(","):void 0});return r&&a&&!e&&(f.traceparent=a),f}}return{...s}}(e,n,gn()&&l?h:void 0,u);r&&(t.args[1]=n,n.headers=r)}if(f){const e={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};f.emit("beforeOutgoingRequestSpan",h,e)}return h}function ci(t){return"string"==typeof t&&t.split(",").some(t=>t.trim().startsWith(Ce))}function ui(t,e,n,r){const s={url:Ms(t),type:"fetch","http.method":n,[re]:r,[ne]:"http.client"};return e&&(Cs(e)||(s["http.url"]=Ms(e.href),s["server.address"]=e.host),e.search&&(s["http.query"]=e.search),e.hash&&(s["http.fragment"]=e.hash)),s}function fi(t,e,n,r){ts({type:t,name:e,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}var li=Object.freeze({__proto__:null,count:function(t,e=1,n){fi("counter",t,e,n)},distribution:function(t,e,n){fi("distribution",t,e,n)},gauge:function(t,e,n){fi("gauge",t,e,n)}});function hi(t){return!!t.trace_id&&!!t.public_key}class di{constructor(t,e){this.Rt=new Map,this.O=t;const{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:s}=e??{};this.Ot=n&&n>0&&n<=1e3?n:1e3,this.ct=r&&r>0?r:5e3,this.At=s&&s>0?s:5e6,this.O.on("flush",()=>{this.drain()}),this.O.on("close",()=>{this.Rt.forEach(t=>{clearTimeout(t.timeout)}),this.Rt.clear()})}add(t){const e=t.trace_id;let n=this.Rt.get(e);n||(n={spans:new Set,size:0,timeout:is(setTimeout(()=>{this.flush(e)},this.ct))},this.Rt.set(e,n)),n.spans.add(t),n.size+=function(t){let e=156;if(e+=2*t.name.length,e+=Wt(t.attributes),t.links&&t.links.length>0){const n=t.links[0],r=n?.attributes;e+=(100+(r?Wt(r):0))*t.links.length}return e}(t),(n.spans.size>=this.Ot||n.size>=this.At)&&this.flush(e)}drain(){this.Rt.size&&this.Rt.forEach((t,e)=>{this.flush(e)})}flush(t){const e=this.Rt.get(t);if(!e)return;if(!e.spans.size)return void this.Mt(t);const n=Array.from(e.spans),r=n[0]?.tt;if(!r)return void this.Mt(t);const s=On(r),i=function(t,e,n){const r=n.getOptions(),s=n.getDsn(),i=r.tunnel,o=Un(r._metadata),a={sent_at:new Date(rt()).toISOString(),...hi(e)&&{trace:e},...o&&{sdk:o},...!!i&&s&&{dsn:Le(s)}},c=n.getDataCollectionOptions().userInfo?"auto":"never";return Mn(a,[[{type:"span",item_count:t.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Jr()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:t}]])}(n.map(t=>{const{tt:e,...n}=t;return n}),s,this.O);this.O.sendEnvelope(i).then(null,t=>{}),this.Mt(t)}Mt(t){const e=this.Rt.get(t);e&&clearTimeout(e.timeout),this.Rt.delete(t)}}function pi(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const mi=e;function yi(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function gi(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in mi))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(yi(mi.fetch))return!0;let t=!1;const e=mi.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=yi(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){}return t}function vi(t,e){const n="fetch",r=w(n,t);return k(n,()=>bi(void 0,e)),r}function bi(t,n=!1){n&&!gi()||z(e,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:ki(e),method:wi(n,"method")?String(n.method).toUpperCase():q(e)&&wi(e,"method")?String(e.method).toUpperCase():"GET"}}const e=t[0];return{url:ki(e),method:wi(e,"method")?String(e.method).toUpperCase():"GET"}}(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:1e3*Tt(),virtualError:s,headers:_i(r)};return t||_("fetch",{...a}),n.apply(e,r).then(async e=>(t?t(e):_("fetch",{...a,endTimestamp:1e3*Tt(),response:e}),e),t=>{_("fetch",{...a,endTimestamp:1e3*Tt(),error:t}),A(t)&&void 0===t.stack&&(t.stack=s.stack,H(t,"framesToPop",1));const e=Vt(),n=e?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==n&&t instanceof TypeError&&("Failed to fetch"===t.message||"Load failed"===t.message||"NetworkError when attempting to fetch resource."===t.message))try{const e=new URL(a.fetchData.url).host;"always"===n?t.message=`${t.message} (${e})`:H(t,"__sentry_fetch_url_host__",e)}catch{}throw t})}})}function Si(t){let e;try{e=t.clone()}catch{return}!async function(t,e){if(t?.body){const n=t.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let i=!0;for(;i;){let t;try{t=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:s}=await r.read();clearTimeout(t),s&&(e(),i=!1)}catch{i=!1}finally{clearTimeout(t)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}(e,()=>{_("fetch-body-resolved",{endTimestamp:1e3*Tt(),response:t})})}function wi(t,e){return!!t&&"object"==typeof t&&!!t[e]}function ki(t){return"string"==typeof t?t:t?wi(t,"url")?t.url:t.toString?t.toString():"":""}function _i(t){const[e,n]=t;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(q(e))return new Headers(e.headers)}catch{}}const Ti=e;function Ii(){try{return Ti.document.location.href}catch{return""}}
1function xi(t,e=5){if(!Ti.HTMLElement)return null;let n=t;for(let t=0;t<e;t++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}const Ei=()=>{},Ci=["attachTo","createForm","createWidget","remove"],Ri=Object.assign(t=>(c(()=>{console.warn("You are using feedbackIntegration() even though this bundle does not include feedback.")}),{name:"Feedback",...Ci.reduce((t,e)=>(t[e]=Ei,t),{})}),{_isShim:!0}),Oi=()=>(c(()=>{console.warn("You are using elementTimingIntegration() even though this bundle does not include element timing.")}),{name:"ElementTiming"});function Ai(t,e){}const Mi={trace:Ai,debug:Ai,info:Ai,warn:Ai,error:Ai,fatal:Ai,fmt:function(t,...e){return""}},$i=t=>({name:"ConsoleLogs",setup:Ei}),Li=e;let Di=0;function Pi(){return Di>0}function ji(t,n={}){if("function"!=typeof t)return t;try{if(Object.prototype.hasOwnProperty.call(t,"__sentry_wrapped__")){const e=t.__sentry_wrapped__;return"function"==typeof e?e:t}if(J(t))return t}catch{return t}const sentryWrapped=function(...r){e.$t=(e.$t||0)+1;try{const e=r.map(t=>ji(t,n));return t.apply(this,e)}catch(t){throw Di++,setTimeout(()=>{Di--}),Xt(e=>{e.addEventProcessor(t=>(n.mechanism&&(bt(t,void 0),St(t,n.mechanism)),t.extra={...t.extra,arguments:r},t)),captureException(t)}),t}finally{e.$t=(e.$t||0)-1}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch{}W(sentryWrapped,t),H(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch{}return sentryWrapped}function Fi(){const t=Ii(),{referrer:e}=Li.document||{},{userAgent:n}=Li.navigator||{};return{url:t,headers:{...e&&{Referer:e},...n&&{"User-Agent":n}}}}function Ni(t,e){const n=qi(t,e),r={type:Wi(e),value:Ji(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Bi(t,e,n,r){const s=Vt(),i=s?.getOptions().normalizeDepth,o=(a=e,Object.values(a).find(t=>t instanceof Error));var a;const c={__serialized__:ut(e,i)};if(o)return{exception:{values:[Ni(t,o)]},extra:c};const u={exception:{values:[{type:N(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Vi(e,{isUnhandledRejection:r})}]},extra:c};if(n){const e=qi(t,n);e.length&&(u.exception.values[0].stacktrace={frames:e})}return u}function Ui(t,e){return{exception:{values:[Ni(t,e)]}}}function qi(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t&&zi.test(t.message))return 1;return 0}(e),s=function(t){if("number"==typeof t.framesToPop)return t.framesToPop;return 0}(e);try{return t(n,r,s)}catch{}return[]}const zi=/Minified React error #\d+;/i;function Hi(t){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&t instanceof WebAssembly.Exception}function Wi(t){const e=t?.name;if(!e&&Hi(t)){return t.message&&Array.isArray(t.message)&&2==t.message.length?t.message[0]:"WebAssembly.Exception"}return e}function Ji(t){const e=t?.message;return Hi(t)?Array.isArray(t.message)&&2==t.message.length?t.message[1]:"wasm exception":e?e.error&&"string"==typeof e.error.message?Qs(e.error):Qs(t):"No error message"}function Ki(t,e,n,r){const s=Yi(t,e,n?.syntheticException||void 0,r);return St(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),gr(s)}function Gi(t,e,n="info",r,s){const i=Xi(t,e,r?.syntheticException||void 0,s);return i.level=n,r?.event_id&&(i.event_id=r.event_id),gr(i)}function Yi(t,e,n,r,s){let i;if($(e)&&e.error){return Ui(t,e.error)}if(L(e)||M(e,"DOMException")){const s=e;if("stack"in e){i=Ui(t,e);const s=i.exception?.values?.[0];if(r&&n&&s&&!s.stacktrace){const e=qi(t,n);e.length&&(s.stacktrace={frames:e},St(i,{synthetic:!0}))}}else{const e=s.name||(L(s)?"DOMError":"DOMException"),o=s.message?`${e}: ${s.message}`:e;i=Xi(t,o,n,r),bt(i,o)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}if(A(e))return Ui(t,e);if(F(e)||N(e)){return i=Bi(t,e,n,s),St(i,{synthetic:!0}),i}return i=Xi(t,e,n,r),bt(i,`${e}`),St(i,{synthetic:!0}),i}function Xi(t,e,n,r){const s={};if(r&&n){const r=qi(t,n);r.length&&(s.exception={values:[{value:e,stacktrace:{frames:r}}]}),St(s,{synthetic:!0})}
1if(P(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;return s.logentry={message:t,params:n},s}return s.message=e,s}function Vi(t,{isUnhandledRejection:e}){const n=function(t){const e=Object.keys(K(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"}(t),r=e?"promise rejection":"exception";if($(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(N(t)){return`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class Qi extends bs{constructor(t){const e=(r=t,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Li.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...r});var r;!function(t,e,r=[e],s="npm"){const i=(t._metadata=t._metadata||{}).sdk=t._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${e}`,i.packages=r.map(t=>({name:`${s}:@sentry/${t}`,version:n})),i.version=n)}(e,"browser",["browser"],Li.SENTRY_SDK_SOURCE||"cdn"),super(e);const{userInfo:s}=this.getDataCollectionOptions();e._metadata?.sdk&&(e._metadata.sdk.settings={infer_ip:s?"auto":"never",...e._metadata.sdk.settings});const{sendClientReports:i,enableLogs:o,_experiments:a,enableMetrics:c}=this.ut,u=c??a?.enableMetrics??!0;Li.document&&(i||o||u)&&Li.document.addEventListener("visibilitychange",()=>{"hidden"===Li.document.visibilityState&&(i&&this.Ct(),o&&Gr(this),u&&es(this))}),s&&this.on("beforeSendSession",Ds)}eventFromException(t,e){return Ki(this.ut.stackParser,t,e,this.ut.attachStacktrace)}eventFromMessage(t,e="info",n){return Gi(this.ut.stackParser,t,e,n,this.ut.attachStacktrace)}It(t,e,n,r){return t.platform=t.platform||"javascript",super.It(t,e,n,r)}}const Zi=e,to=(t,e,n,r)=>{let s,i;return o=>{e.value>=0&&(o||r)&&(i=e.value-(s??0),(i||void 0===s)&&(s=e.value,e.delta=i,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},eo=(t=!0)=>{const e=Zi.performance?.getEntriesByType?.("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e},no=()=>{const t=eo();return t?.activationStart??0};function ro(t,e,n){Zi.document&&Zi.addEventListener(t,e,n)}function so(t,e,n){Zi.document&&Zi.removeEventListener(t,e,n)}let io=-1;const oo=new Set,ao=t=>{if(function(t){return"pagehide"===t.type||"hidden"===Zi.document?.visibilityState}(t)&&io>-1){if("visibilitychange"===t.type||"pagehide"===t.type)for(const t of oo)t();isFinite(io)||(io="visibilitychange"===t.type?t.timeStamp:0,so("prerenderingchange",ao,!0))}},co=()=>{if(Zi.document&&io<0){const t=no(),e=Zi.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0]?.startTime;io=e??("hidden"!==Zi.document?.visibilityState||Zi.document?.prerendering?1/0:0),ro("visibilitychange",ao,!0),ro("pagehide",ao,!0),ro("prerenderingchange",ao,!0)}return{get firstHiddenTime(){return io},onHidden(t){oo.add(t)}}};const uo=(t,e=-1)=>{const n=eo();let r="navigate";n&&(Zi.document?.prerendering||no()>0?r="prerender":Zi.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},fo=new WeakMap;function lo(t,e){try{return fo.get(t)||fo.set(t,new e),fo.get(t)}catch(t){return new e}}class ho{constructor(){this.Lt=0,this.Dt=[]}Pt(t){if(t.hadRecentInput)return;const e=this.Dt[0],n=this.Dt[this.Dt.length-1];this.Lt&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(this.Lt+=t.value,this.Dt.push(t)):(this.Lt=t.value,this.Dt=[t]),this.jt?.(t)}}const po=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},mo=t=>{let e=!1;return()=>{e||(t(),e=!0)}},yo=t=>{Zi.document?.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},go=[1800,3e3],vo=[.1,.25],bo=(t,e={})=>{((t,e={})=>{yo(()=>{const n=co(),r=uo("FCP");let s;
1const i=po("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-no(),0),r.entries.push(e),s(!0)))});i&&(s=to(t,r,go,e.reportAllChanges))})})(mo(()=>{const n=uo("CLS",0);let r;const s=co(),i=lo(e,ho),o=t=>{for(const e of t)i.Pt(e);i.Lt>n.value&&(n.value=i.Lt,n.entries=i.Dt,r())},a=po("layout-shift",o);a&&(r=to(t,n,vo,e.reportAllChanges),s.onHidden(()=>{o(a.takeRecords()),r(!0)}),Zi?.setTimeout?.(r))}))};let So=0,wo=1/0,ko=0;const _o=t=>{t.forEach(t=>{t.interactionId&&(wo=Math.min(wo,t.interactionId),ko=Math.max(ko,t.interactionId),So=ko?(ko-wo)/7+1:0)})};let To;const Io=()=>To?So:performance.interactionCount||0,xo=()=>{"interactionCount"in performance||To||(To=po("event",_o,{type:"event",buffered:!0,durationThreshold:0}))};let Eo=0;class Co{constructor(){this.Ft=[],this.Nt=new Map}Bt(){Eo=Io(),this.Ft.length=0,this.Nt.clear()}Ut(){const t=Math.min(this.Ft.length-1,Math.floor((Io()-Eo)/50));return this.Ft[t]}Pt(t){if(this.qt?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.Ft.at(-1);let n=this.Nt.get(t.interactionId);if(n||this.Ft.length<10||t.duration>e.zt){if(n?t.duration>n.zt?(n.entries=[t],n.zt=t.duration):t.duration===n.zt&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],zt:t.duration},this.Nt.set(n.id,n),this.Ft.push(n)),this.Ft.sort((t,e)=>e.zt-t.zt),this.Ft.length>10){const t=this.Ft.splice(10);for(const e of t)this.Nt.delete(e.id)}this.Ht?.(n)}}}const Ro=t=>{const e=Zi.requestIdleCallback||Zi.setTimeout;"hidden"===Zi.document?.visibilityState?t():(ro("visibilitychange",t=mo(t),{once:!0,capture:!0}),ro("pagehide",t,{once:!0,capture:!0}),e(()=>{t(),so("visibilitychange",t,{capture:!0}),so("pagehide",t,{capture:!0})}))},Oo=[200,500];class Ao{Pt(t){this.qt?.(t)}}const Mo=[2500,4e3],$o=[800,1800],Lo=t=>{Zi.document?.prerendering?yo(()=>Lo(t)):"complete"!==Zi.document?.readyState?addEventListener("load",()=>Lo(t),!0):setTimeout(t)},Do={},Po={};let jo,Fo,No,Bo;function Uo(t,e=!1){return Xo("cls",t,Jo,jo,e)}function qo(t,e=!1){return Xo("lcp",t,Ko,Fo,e)}function zo(t){return Xo("inp",t,Yo,Bo)}function Ho(t,e){return Vo(t,e),Po[t]||(!function(t){const e={};"event"===t&&(e.durationThreshold=0);po(t,e=>{Wo(t,{entries:e})},e)}(t),Po[t]=!0),Qo(t,e)}function Wo(t,e){const n=Do[t];if(n?.length)for(const t of n)try{t(e)}catch(t){}}function Jo(){return bo(t=>{Wo("cls",{metric:t}),jo=t},{reportAllChanges:!0})}function Ko(){return((t,e={})=>{yo(()=>{const n=co(),r=uo("LCP");let s;const i=lo(e,Ao),o=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)i.Pt(e),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-no(),0),r.entries=[e],s())},a=po("largest-contentful-paint",o);if(a){s=to(t,r,Mo,e.reportAllChanges);const n=mo(()=>{o(a.takeRecords()),a.disconnect(),s(!0)}),i=t=>{t.isTrusted&&(Ro(n),so(t.type,i,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])ro(t,i,{capture:!0})}})})(t=>{Wo("lcp",{metric:t}),Fo=t},{reportAllChanges:!0})}function Go(){return((t,e={})=>{const n=uo("TTFB"),r=to(t,n,$o,e.reportAllChanges);Lo(()=>{const t=eo();t&&(n.value=Math.max(t.responseStart-no(),0),n.entries=[t],r(!0))})})(t=>{Wo("ttfb",{metric:t}),No=t})}function Yo(){return((t,e={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=co();yo(()=>{xo();const r=uo("INP");let s;const i=lo(e,Co),o=t=>{Ro(()=>{for(const e of t)i.Pt(e);const e=i.Ut();e&&e.zt!==r.value&&(r.value=e.zt,r.entries=e.entries,s())})},a=po("event",o,{durationThreshold:e.durationThreshold??40});s=to(t,r,Oo,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(a.takeRecords()),s(!0)}))})})(t=>{Wo("inp",{metric:t}),Bo=t})}function Xo(t,e,n,r,s=!1){let i;return Vo(t,e),Po[t]||(i=n(),Po[t]=!0),r&&e({metric:r}),Qo(t,e,s?i:void 0)}function Vo(t,e){Do[t]=Do[t]||[],Do[t].push(e)}function Qo(t,e,n){return()=>{n&&n();const r=Do[t];if(!r)return;const s=r.indexOf(e);-1!==s&&r.splice(s,1)}}const Zo={};try{"undefined"!=typeof Node&&(Zo.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(Zo.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,Zo.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,Zo.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,Zo.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(Zo.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function ta(t,e,n){const r=Zo[e];if(r)try{return r.call(t,n)}catch{}const s=t[e];return"function"==typeof s?s.call(t,n):s}function ea(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const f=Array.isArray(e)?e:e.keyAttrs,l=!Array.isArray(e)&&e.maxStringLength||80;for(;n&&i++<r&&(u=na(n,f),!("html"===u||i>1&&o+s.length*c+u.length>=l));)s.push(u),o+=u.length,n=ta(n,"parentNode");return s.reverse().join(a)}catch{return"<unknown>"}}function na(t,e){const n=[],r=ta(t,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){const e=ta(t,"dataset");if(e){if(e.sentryComponent)return e.sentryComponent;if(e.sentryElement)return e.sentryElement}}n.push(r.toLowerCase());const s=e?.length?e.filter(e=>ta(t,"getAttribute",e)).map(e=>[e,ta(t,"getAttribute",e)]):null;if(s?.length)s.forEach(t=>{n.push(`[${t[0]}="${t[1]}"]`)});
1else{const e=ta(t,"id");e&&n.push(`#${e}`);const r=ta(t,"className");if(r&&D(r)){const t=r.split(/\s+/);for(const e of t)n.push(`.${e}`)}}for(const e of["aria-label","type","name","title","alt"]){const r=ta(t,"getAttribute",e);r&&n.push(`[${e}="${r}"]`)}return n.join("")}function ra(t){return"number"==typeof t&&isFinite(t)}function sa(t,e,n,{...r}){const s=Ve(t).start_timestamp;return s&&s>e&&"function"==typeof t.updateStartTime&&t.updateStartTime(e),Qn(t,()=>{const t=Vn({startTime:e,...r});return t&&t.end(n),t})}function ia(t){const e=Vt();if(!e)return;const{name:n,transaction:r,attributes:s,startTime:i}=t,{release:o,environment:a}=e.getOptions(),{userInfo:c}=e.getDataCollectionOptions(),u=e.getIntegrationByName("Replay"),f=u?.getReplayId(),l=Kt(),h=l.getUser(),d=void 0!==h?h.email||h.id||h.ip_address:void 0;let p;try{p=l.getScopeData().contexts.profile.profile_id}catch{}return Vn({name:n,attributes:{release:o,environment:a,user:d||void 0,profile_id:p||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":Zi.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...s},startTime:i,experimental:{standalone:!0}})}function oa(){return Zi.addEventListener&&Zi.performance}function aa(t){return t/1e3}function ca(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch{return!1}}function ua(t,e){let n,r=!1;function s(t){!r&&n&&e(t,n.spanContext().spanId,n),r=!0}(t=>{const e=e=>{"pagehide"!==e.type&&"hidden"!==Zi.document?.visibilityState||t(e)};ro("visibilitychange",e,{capture:!0,once:!0}),ro("pagehide",e,{capture:!0,once:!0})})(()=>{s("pagehide")});const i=t.on("beforeStartNavigationSpan",(t,e)=>{e?.isRedirect||(s("navigation"),i(),o())}),o=t.on("afterStartPageLoadSpan",t=>{n=t,o()})}function fa(t){let e,n=0;if(!ca("layout-shift"))return;const r=Uo(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);ua(t,(t,s)=>{!function(t,e,n,r){const s=e?aa((xt()||0)+e.startTime):Tt(),i=Kt().getScopeData().transactionName,o=e?ea(e.sources[0]?.node):"Layout shift",a={[re]:"auto.http.browser.cls",[ne]:"ui.webvital.cls",[Se]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e?.sources&&e.sources.forEach((t,e)=>{a[`cls.source.${e+1}`]=ea(t.node)});const c=ia({name:o,transaction:i,attributes:a,startTime:s});c&&(c.addEvent("cls",{[ie]:"",[oe]:t}),c.end(s))}(n,e,s,t),r()})}function la(t){return null!=t&&t>0&&t<=6e4}function ha(t){let e,n=0;if(!ca("largest-contentful-paint"))return;const r=qo(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&la(t.value)&&(n=t.value,e=r)},!0);ua(t,(t,s)=>{!function(t,e,n,r){if(!la(t))return;const s=aa((xt()||0)+(e?.startTime||0)),i=Kt().getScopeData().transactionName,o=e?ea(e.element):"Largest contentful paint",a={[re]:"auto.http.browser.lcp",[ne]:"ui.webvital.lcp",[Se]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e&&(e.element&&(a["lcp.element"]=ea(e.element)),e.id&&(a["lcp.id"]=e.id),e.url&&(a["lcp.url"]=e.url),null!=e.loadTime&&(a["lcp.loadTime"]=e.loadTime),null!=e.renderTime&&(a["lcp.renderTime"]=e.renderTime),null!=e.size&&(a["lcp.size"]=e.size));const c=ia({name:o,transaction:i,attributes:a,startTime:s});c&&(c.addEvent("lcp",{[ie]:"millisecond",[oe]:t}),c.end(s))}(n,e,s,t),r()})}function da(t){return t?((xt()||performance.timeOrigin)+t)/1e3:t}function pa(t){const e={};if(null!=t.nextHopProtocol){const{name:n,version:r}=function(t){let e="unknown",n="unknown",r="";for(const s of t){if("/"===s){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e="h"===r?"http":r,n=t.split(r)[1];break}r+=s}return r===t&&(e=r),{name:e,version:n}}(t.nextHopProtocol);e["network.protocol.version"]=r,e["network.protocol.name"]=n}return xt()||oa()?.timeOrigin?(n={...e,"http.request.redirect_start":da(t.redirectStart),"http.request.redirect_end":da(t.redirectEnd),"http.request.worker_start":da(t.workerStart),"http.request.fetch_start":da(t.fetchStart),"http.request.domain_lookup_start":da(t.domainLookupStart),"http.request.domain_lookup_end":da(t.domainLookupEnd),"http.request.connect_start":da(t.connectStart),"http.request.secure_connection_start":da(t.secureConnectionStart),"http.request.connection_end":da(t.connectEnd),"http.request.request_start":da(t.requestStart),"http.request.response_start":da(t.responseStart),"http.request.response_end":da(t.responseEnd),"http.request.time_to_first_byte":null!=t.responseStart?t.responseStart/1e3:void 0},Object.fromEntries(Object.entries(n).filter(([,t])=>null!=t))):e;var n}const ma=2147483647;let ya,ga,va=0,ba={};function Sa({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:e,client:n}){const r=oa();if(r&&xt()){r.mark&&Zi.performance.mark("sentry-tracing-init");const s=e?ha(n):!1===e?qo(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&la(t.value)&&(ba.lcp={value:t.value,unit:"millisecond"},ya=e)},!0):void 0,i=t?fa(n):!1===t?Uo(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(ba.cls={value:t.value,unit:""},ga=e)},!0):void 0,o=Xo("ttfb",({metric:t})=>{t.entries[t.entries.length-1]&&(ba.ttfb={value:t.value,unit:"millisecond"})},Go,No),a=Ho("paint",({entries:t})=>{const e=co();for(const n of t){const t=n.startTime<e.firstHiddenTime;"first-paint"===n.name&&t&&(ba.fp={value:n.startTime,unit:"millisecond"}),"first-contentful-paint"===n.name&&t&&(ba.fcp={value:n.startTime,unit:"millisecond"})}});return()=>{o(),a(),s?.(),i?.()}}return()=>{}}function wa(t,e){const n=oa(),r=xt();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:s,ignorePerformanceApiSpans:i,ignoreResourceSpans:o}=e,a=aa(r),c=n.getEntries(),{op:u,start_timestamp:f}=Ve(t);
1c.slice(va).forEach(e=>{const n=aa(e.startTime),r=aa(Math.max(0,e.duration));if(!("navigation"===u&&f&&a+n<f))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Ta(t,e,r,n)}),Ta(t,e,"secureConnection",n,"TLS/SSL"),Ta(t,e,"fetch",n,"cache"),Ta(t,e,"domainLookup",n,"DNS"),function(t,e,n){const r=n+aa(e.requestStart),s=n+aa(e.responseEnd),i=n+aa(e.responseStart);e.responseEnd&&(sa(t,r,s,{op:"browser.request",name:e.name,attributes:{[re]:"auto.ui.browser.metrics"}}),sa(t,i,s,{op:"browser.response",name:e.name,attributes:{[re]:"auto.ui.browser.metrics"}}))}(t,e,n)}(t,e,a);break;case"mark":case"paint":case"measure":!function(t,e,n,r,s,i){if(function(t){if("measure"!==t?.entryType)return;try{return"Components â"===t.detail.devtools.track}catch{return}}(e))return;if(["mark","measure"].includes(e.entryType)&&mt(e.name,i))return;const o=eo(!1),a=aa(o?o.requestStart:0),c=s+Math.max(n,a),u=s+n,f=u+r,l={[re]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c);(function(t,e){try{const n=e.detail;if(!n)return;if("object"==typeof n){for(const[e,r]of Object.entries(n))if(r&&j(r))t[`sentry.browser.measure.detail.${e}`]=r;else if(void 0!==r)try{t[`sentry.browser.measure.detail.${e}`]=JSON.stringify(r)}catch{}return}if(j(n))return void(t["sentry.browser.measure.detail"]=n);try{t["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}})(l,e),c<=f&&sa(t,c,f,{name:e.name,op:e.entryType,attributes:l})}(t,e,n,r,a,i);break;case"resource":!function(t,e,n,r,s,i,o){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const a=e.initiatorType?`resource.${e.initiatorType}`:"resource.other";if(o?.includes(a))return;const c={[re]:"auto.resource.browser.metrics"},u=As(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop());u.host&&(c["server.address"]=u.host);c["url.same_origin"]=n.includes(Zi.location.origin),function(t,e,n){n.forEach(([n,r])=>{const s=t[n];null!=s&&("number"==typeof s&&s<ma||"string"==typeof s)&&(e[r]=s)})}(e,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const f={...c,...pa(e)},l=i+r,h=l+s;sa(t,l,h,{name:n.replace(Zi.location.origin,""),op:a,attributes:f})}(t,e,e.name,n,r,a,o)}}),va=Math.max(c.length-1,0),function(t,e){const n=Zi.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&t.setAttribute(e?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&t.setAttribute(e?"network.connection.type":"connectionType",r.type),ra(r.rtt)&&(e?t.setAttribute("network.connection.rtt",r.rtt):"pageload"===Ve(t).op&&zn("connection.rtt",r.rtt,"millisecond")));ra(n.deviceMemory)&&(e?t.setAttribute("device.memory.estimated_capacity",n.deviceMemory):t.setAttribute("deviceMemory",`${n.deviceMemory} GB`));ra(n.hardwareConcurrency)&&(e?t.setAttribute("device.processor_count",n.hardwareConcurrency):t.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}(t,s)}function ka(t,e){const n=xt();if(!oa()?.getEntries||!n)return void _a();const{spanStreamingEnabled:r,recordClsOnPageloadSpan:s,recordLcpOnPageloadSpan:i}=e,o=aa(n);if("pageload"===Ve(t).op){if(function(t){const e=eo(!1);if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(ba),r){const e=(e,n,r)=>{const s=r??`browser.web_vital.${e}.value`;t.setAttribute(s,n)};["ttfb","fp","fcp"].forEach(t=>{ba[t]&&e(t,ba[t].value)}),ba["ttfb.requestTime"]&&e("ttfb.requestTime",ba["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else s||delete ba.cls,i||delete ba.lcp,Object.entries(ba).forEach(([e,n])=>{zn(e,n.value,n.unit,t)}),function(t,e){ya&&e.recordLcpOnPageloadSpan&&(ya.element&&t.setAttribute("lcp.element",ea(ya.element)),ya.id&&t.setAttribute("lcp.id",ya.id),ya.url&&t.setAttribute("lcp.url",ya.url.trim().slice(0,200)),null!=ya.loadTime&&t.setAttribute("lcp.loadTime",ya.loadTime),null!=ya.renderTime&&t.setAttribute("lcp.renderTime",ya.renderTime),t.setAttribute("lcp.size",ya.size));
1ga?.sources&&e.recordClsOnPageloadSpan&&ga.sources.forEach((e,n)=>t.setAttribute(`cls.source.${n+1}`,ea(e.node)))}(t,e);t.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",o),t.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",no())}_a()}function _a(){ya=void 0,ga=void 0,ba={}}function Ta(t,e,n,r,s=n){const i=function(t){if("secureConnection"===t)return"connectEnd";if("fetch"===t)return"domainLookupStart";return`${t}End`}(n),o=e[i],a=e[`${n}Start`];a&&o&&sa(t,r+aa(a),r+aa(o),{op:`browser.${s}`,name:e.name,attributes:{[re]:"auto.ui.browser.metrics",..."redirect"===n&&null!=e.redirectCount?{"http.redirect_count":e.redirectCount}:{}}})}const Ia=[],xa=new Map,Ea=new Map;function Ca(){if(oa()&&xt()){const t=zo(Oa);return()=>{t()}}return()=>{}}const Ra={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"};const Oa=({metric:t})=>{if(null==t.value)return;const e=aa(t.value);if(e>60)return;const n=t.entries.find(e=>e.duration===t.value&&Ra[e.name]);if(!n)return;const{interactionId:r}=n,s=Ra[n.name],i=aa(xt()+n.startTime),o=dn(),a=o?ln(o):void 0,c=null!=r?xa.get(r):void 0,u=c?.span||a,f=u?Ve(u).description:Kt().getScopeData().transactionName,l=ia({name:c?.elementName||ea(n.target),transaction:f,attributes:{[re]:"auto.http.browser.inp",[ne]:`ui.interaction.${s}`,[Se]:n.duration},startTime:i});l&&(l.addEvent("inp",{[ie]:"millisecond",[oe]:t.value}),l.end(i+e))};function Aa(){const t=Object.keys(Ra);function e(t){const e=t.target;if(!e)return;const n=ea(e),r=Math.round(t.timeStamp);if(Ea.set(r,n),Ea.size>50){const t=Ea.keys().next().value;void 0!==t&&Ea.delete(t)}}Jr()&&t.forEach(t=>{Zi.addEventListener(t,e,{capture:!0,passive:!0})});const n=({entries:t})=>{const e=dn(),n=e&&ln(e);t.forEach(t=>{if(!function(t){return"duration"in t}(t))return;const e=t.interactionId;if(null==e)return;if(xa.has(e))return;const r=t.target?ea(t.target):function(t){const e=Math.round(t.startTime);let n=Ea.get(e);if(!n)for(let t=-5;t<=5;t++){const r=Ea.get(e+t);if(r){n=r;break}}return n||"<unknown>"}(t);if(Ia.length>10){const t=Ia.shift();xa.delete(t)}Ia.push(e),xa.set(e,{span:n,elementName:r})})};Ho("event",n),Ho("first-input",n)}function Ma(t){const{name:e,op:n,origin:r,metricName:s,value:i,attributes:o,parentSpan:a,reportEvent:c,startTime:u,endTime:f}=t,l=Kt().getScopeData().transactionName,h={[re]:r,[ne]:n,[Se]:0,[`browser.web_vital.${s}.value`]:i,"sentry.transaction":l,"user_agent.original":Zi.navigator?.userAgent,...o};a&&"pageload"===Qe(a).attributes?.[ne]&&(h["sentry.pageload.span_id"]=a.spanContext().spanId),c&&(h[`browser.web_vital.${s}.report_event`]=c);const d=Vn({name:e,attributes:h,startTime:u,parentSpan:a});d&&d.end(f??u)}function $a(t){let e,n=0;if(!ca("largest-contentful-paint"))return;const r=qo(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&la(t.value)&&(n=t.value,e=r)},!0);ua(t,(t,s,i)=>{!function(t,e,n,r){if(!la(t))return;const s=xt()||0,i=aa(s),o=aa(s+(e?.startTime||0)),a=e?ea(e.element):"Largest contentful paint",c={};e?.element&&(c["browser.web_vital.lcp.element"]=ea(e.element)),e?.id&&(c["browser.web_vital.lcp.id"]=e.id),e?.url&&(c["browser.web_vital.lcp.url"]=e.url),null!=e?.loadTime&&(c["browser.web_vital.lcp.load_time"]=e.loadTime),null!=e?.renderTime&&(c["browser.web_vital.lcp.render_time"]=e.renderTime),null!=e?.size&&(c["browser.web_vital.lcp.size"]=e.size),Ma({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:t,attributes:c,parentSpan:n,reportEvent:r,startTime:i,endTime:o})}(n,e,i,t),r()})}function La(t){let e,n=0;if(!ca("layout-shift"))return;const r=Uo(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);ua(t,(t,s,i)=>
1{!function(t,e,n,r){const s=e?aa((xt()||0)+e.startTime):Tt(),i=e?ea(e.sources[0]?.node):"Layout shift",o={};e?.sources&&e.sources.forEach((t,e)=>{o[`browser.web_vital.cls.source.${e+1}`]=ea(t.node)});Ma({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:t,attributes:o,parentSpan:n,reportEvent:r,startTime:s})}(n,e,i,t),r()})}function Da(){if(!oa()||!xt())return;zo(({metric:t})=>{if(null==t.value)return;if(aa(t.value)>60)return;const e=t.entries.find(e=>e.duration===t.value&&Ra[e.name]);e&&function(t,e){const n=aa(xt()+e.startTime),r=aa(t),s=Ra[e.name],i=(l=e.interactionId,null!=l?xa.get(l):void 0),o=dn(),a=o?ln(o):void 0,c=i?.span||a,u=c?Qe(c).name:Kt().getScopeData().transactionName,f=i?.elementName||ea(e.target);var l;Ma({name:f,op:`ui.interaction.${s}`,origin:"auto.http.browser.inp",metricName:"inp",value:t,attributes:{[Se]:e.duration,"sentry.transaction":u},startTime:n,endTime:n+r,parentSpan:c})}(t.value,e)})}let Pa,ja,Fa,Na;function Ba(t){w("dom",t),k("dom",Ua)}function Ua(){if(!Zi.document)return;const t=_.bind(null,"dom"),e=qa(t,!0);Zi.document.addEventListener("click",e,!1),Zi.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=Zi,r=n[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(z(r,"addEventListener",function(e){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=r[n]=r[n]||{refCount:0};if(!i.handler){const r=qa(t);i.handler=r,e.call(this,n,r,s)}i.refCount++}catch{}return e.call(this,n,r,s)}}),z(r,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[e];s&&(s.refCount--,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete n[e]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return t.call(this,e,n,r)}}))})}function qa(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(t){try{return t.target}catch{return null}}(n);if(function(t,e){return"keypress"===t&&(!e?.tagName||"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&!e.isContentEditable)}(n.type,r))return;H(n,"_sentryCaptured",!0),r&&!r._sentryId&&H(r,"_sentryId",yt());const s="keypress"===n.type?"input":n.type;if(!function(t){if(t.type!==ja)return!1;try{if(!t.target||t.target._sentryId!==Fa)return!1}catch{}return!0}(n)){t({event:n,name:s,global:e}),ja=n.type,Fa=r?r._sentryId:void 0}clearTimeout(Pa),Pa=Zi.setTimeout(()=>{Fa=void 0,ja=void 0},1e3)}}function za(t){const e="history";w(e,t),k(e,Ha)}function Ha(){function t(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const r=Na,s=function(t){try{return new URL(t,Zi.location.origin).toString()}catch{return t}}(String(n));if(Na=s,r===s)return t.apply(this,e);_("history",{from:r,to:s})}return t.apply(this,e)}}Zi.addEventListener("popstate",()=>{const t=Zi.location.href,e=Na;if(Na=t,e===t)return;_("history",{from:e,to:t})}),"history"in mi&&mi.history&&(z(Zi.history,"pushState",t),z(Zi.history,"replaceState",t))}const Wa={};function Ja(t){const e=Wa[t];if(e)return e;let n=Zi[t];if(yi(n))return Wa[t]=n.bind(Zi);const r=Zi.document;if(r&&"function"==typeof r.createElement)try{const e=r.createElement("iframe");e.hidden=!0,r.head.appendChild(e);const s=e.contentWindow;s?.[t]&&(n=s[t]),r.head.removeChild(e)}catch(t){}return n?Wa[t]=n.bind(Zi):n}function Ka(...t){return Ja("setTimeout")(...t)}const Ga="__sentry_xhr_v3__";function Ya(t){w("xhr",t),k("xhr",Xa)}function Xa(){if(!Zi.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,e,n){const r=new Error,s=1e3*Tt(),i=D(n[0])?n[0].toUpperCase():void 0,o=function(t){if(D(t))return t;try{return t.toString()}catch{}return}(n[1]);if(!i||!o)return t.apply(e,n);e[Ga]={method:i,url:o,request_headers:{}},"POST"===i&&o.match(/sentry_key/)&&(e.__sentry_own_request__=!0);const a=()=>{const t=e[Ga];if(t&&4===e.readyState){try{t.status_code=e.status}catch{}_("xhr",{endTimestamp:1e3*Tt(),startTimestamp:s,xhr:e,virtualError:r})}};return"onreadystatechange"in e&&"function"==typeof e.onreadystatechange?e.onreadystatechange=new Proxy(e.onreadystatechange,{apply:(t,e,n)=>(a(),t.apply(e,n))}):e.addEventListener("readystatechange",a),e.setRequestHeader=new Proxy(e.setRequestHeader,{apply(t,e,n){const[r,s]=n,i=e[Ga];return i&&D(r)&&D(s)&&(i.request_headers[r.toLowerCase()]=s),t.apply(e,n)}}),t.apply(e,n)}}),t.send=new Proxy(t.send,{apply(t,e,n){const r=e[Ga];if(!r)return t.apply(e,n);void 0!==n[0]&&(r.body=n[0]);return _("xhr",{startTimestamp:1e3*Tt(),xhr:e}),t.apply(e,n)}})}const Va=Symbol.for("sentry__originalRequestBody");function Qa(t){return new URLSearchParams(t).toString()}function Za(t,e=f){try{if("string"==typeof t)return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[Qa(t)];if(!t)return[void 0]}catch(t){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}function tc(t=[]){if(t.length>=2&&t[1]&&"object"==typeof t[1]&&"body"in t[1])return t[1].body;if(t.length>=1&&t[0]instanceof Request){const e=t[0][Va];return void 0!==e?e:void 0}}function ec(t){let e;try{e=t.getAllResponseHeaders()}catch(t){return{}}return e?e.split("\r\n").reduce((t,e)=>{const[n,r]=e.split(": ");return r&&(t[n.toLowerCase()]=r),t},{}):{}}function nc(t,e=Ja("fetch")){let n=0,r=0;return fs(t,async function(s){const i=s.body.length;n+=i,r++;
1const o={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{const n=await e(t.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(t){throw Wa["fetch"]=void 0,t}finally{n-=i,r--}},as(t.bufferSize||40))}const rc={startProfiler:function(){const t=Vt();if(!t)return;t.getIntegrationByName("BrowserProfiling")&&t.emit("startUIProfiler")},stopProfiler:function(){const t=Vt();if(!t)return;t.getIntegrationByName("BrowserProfiling")&&t.emit("stopUIProfiler")}};function sc(t,e,n,r){const s={filename:t,function:"<anonymous>"===e?l:e,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const ic=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,oc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ac=/\((\S*)(?::(\d+))(?::(\d+))\)/,cc=/at (.+?) ?\(data:(.+?),/,uc=[30,t=>{const e=t.match(cc);if(e)return{filename:`<data:${e[2]}>`,function:e[1]};const n=ic.exec(t);if(n){const[,t,e,r]=n;return sc(t,l,+e,+r)}const r=oc.exec(t);if(r){if(0===r[2]?.indexOf("eval")){const t=ac.exec(r[2]);t&&(r[2]=t[1],r[3]=t[2],r[4]=t[3])}const[t,e]=wc(r[1]||l,r[2]);return sc(e,t,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],fc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,lc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hc=[50,t=>{const e=fc.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=lc.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||l;return[n,t]=wc(n,t),sc(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],dc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,pc=[40,t=>{const e=dc.exec(t);return e?sc(e[2],e[1]||l,+e[3],e[4]?+e[4]:void 0):void 0}],mc=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,yc=[10,t=>{const e=mc.exec(t);return e?sc(e[2],e[3]||l,+e[1]):void 0}],gc=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,vc=[20,t=>{const e=gc.exec(t);return e?sc(e[5],e[3]||e[4]||l,+e[1],+e[2]):void 0}],bc=[uc,hc],Sc=p(...bc),wc=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:l,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};const kc=1024,_c=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(t){e.console&&function(t){const e="console",n=w(e,t);k(e,ti)}(function(t){return function(e){if(Vt()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:ei(e.level),message:dt(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${dt(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}Fs(n,{input:e.args,level:e.level})}}(t)),e.dom&&Ba(function(t,e){return function(n){if(Vt()!==t)return;let r,s,i="object"==typeof e?e.serializeAttribute:void 0,o="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;o&&o>kc&&(o=kc),"string"==typeof i&&(i=[i]);try{const t=n.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;r=ea(e,{keyAttrs:i,maxStringLength:o}),s=xi(e)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),Fs(a,{event:n.event,name:n.name,global:n.global})}}(t,e.dom)),e.xhr&&Ya(function(t){return function(e){if(Vt()!==t)return;const{startTimestamp:n,endTimestamp:r}=e,s=e.xhr[Ga];if(!n||!r||!s)return;const{method:i,url:o,status_code:a,body:c}=s,u={method:i,url:o,status_code:a},f={xhr:e.xhr,input:c,startTimestamp:n,endTimestamp:r},l={category:"xhr",data:u,type:"http",level:pi(a)};t.emit("beforeOutgoingRequestBreadcrumb",l,f),Fs(l,f)}}(t)),e.fetch&&vi(function(t){return function(e){if(Vt()!==t)return;const{startTimestamp:n,endTimestamp:r}=e;
1if(r&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const s={data:e.error,input:e.args,startTimestamp:n,endTimestamp:r},i={category:"fetch",data:e.fetchData,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",i,s),Fs(i,s)}else{const s=e.response,i={...e.fetchData,status_code:s?.status},o={input:e.args,response:s,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:i,type:"http",level:pi(i.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",a,o),Fs(a,o)}}}(t)),e.history&&za(function(t){return function(e){if(Vt()!==t)return;let n=e.from,r=e.to;const s=As(Li.location.href);let i=n?As(n):void 0;const o=As(r);i?.path||(i=s),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),s.protocol===i.protocol&&s.host===i.host&&(n=i.relative),Fs({category:"navigation",data:{from:n,to:r}})}}(t)),e.sentry&&t.on("beforeSendEvent",function(t){return function(e){Vt()===t&&Fs({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:vt(e)},{event:e})}}(t))}}};const Tc="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".split(","),Ic=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&z(Li,"setTimeout",xc),e.setInterval&&z(Li,"setInterval",xc),e.requestAnimationFrame&&z(Li,"requestAnimationFrame",Ec),e.XMLHttpRequest&&"XMLHttpRequest"in Li&&z(XMLHttpRequest.prototype,"send",Cc);const t=e.eventTarget;if(t){(Array.isArray(t)?t:Tc).forEach(t=>function(t,e){const n=Li,r=n[t]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;z(r,"addEventListener",function(n){return function(r,s,i){try{"function"==typeof s.handleEvent&&(s.handleEvent=ji(s.handleEvent,{mechanism:{data:{handler:g(s),target:t},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return e.unregisterOriginalCallbacks&&function(t,e,n){t&&"object"==typeof t&&"removeEventListener"in t&&"function"==typeof t.removeEventListener&&t.removeEventListener(e,n)}(this,r,s),n.apply(this,[r,ji(s,{mechanism:{data:{handler:g(s),target:t},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}}),z(r,"removeEventListener",function(t){return function(e,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const s=n.__sentry_wrapped__;s&&t.call(this,e,s,r)}}catch{}return t.call(this,e,n,r)}})}(t,e))}}}};function xc(t){return function(...e){const n=e[0];return e[0]=ji(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${g(t)}`}}),t.apply(this,e)}}function Ec(t){return function(e){return t.apply(this,[ji(e,{mechanism:{data:{handler:g(t)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Cc(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&z(n,t,function(e){const n={mechanism:{data:{handler:g(e)},handled:!1,type:`auto.browser.browserapierrors.xhr.${t}`}},r=J(e);return r&&(n.mechanism.data.handler=g(r)),ji(e,n)})}),t.apply(this,e)}}const Rc=(t={})=>{const e=t.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===Li.document)return;Lr({ignoreDuration:!0}),jr();const t=Gt();let n=t.getUser();t.addScopeListener(t=>{const e=t.getUser();n?.id===e?.id&&n?.ip_address===e?.ip_address||(jr(),n=e)}),"route"===e&&za(({from:t,to:e})=>{t!==e&&(Lr({ignoreDuration:!0}),jr())})}}},Oc=()=>({name:"CultureContext",preprocessEvent(t){const e=Ac();e&&(t.contexts={...t.contexts,culture:{...e,...t.contexts?.culture}})},processSegmentSpan(t){const e=Ac();e&&yr(t,{"culture.locale":e.locale,"culture.timezone":e.timezone,"culture.calendar":e.calendar})}});function Ac(){try{const t=Li.Intl;if(!t)return;const e=t.DateTimeFormat().resolvedOptions();return{locale:e.locale,timezone:e.timeZone,calendar:e.calendar}}catch{return}}const Mc=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&function(t){I(e=>{const{stackParser:n,attachStacktrace:r}=$c();if(Vt()!==t||Pi())return;const{msg:s,url:i,line:o,column:a,error:c}=e,u=function(t,e,n,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:Lc(e)??Ii(),function:l,in_app:!0});return t}(Yi(n,c||s,void 0,r,!1),i,o,a);u.level="error",Rr(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(t),e.onunhandledrejection&&function(t){C(e=>{const{stackParser:n,attachStacktrace:r}=$c();if(Vt()!==t||Pi())return;const s=function(t){if(j(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}(e),i=j(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:Yi(n,s,void 0,r,!0);i.level="error",Rr(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(t)}}};function $c(){const t=Vt();return t?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Lc(t){if(D(t)&&0!==t.length)return t.startsWith("data:")?`<${Ms(t,!1)}>`:t}const Dc=()=>({name:"HttpContext",preprocessEvent(t){if(!Li.navigator&&!Li.location&&!Li.document)return;const e=Fi(),n={...e.headers,...t.request?.headers};t.request={...e,...t.request,headers:n}},processSegmentSpan(t){const e=t.attributes?.[ne];if(!Li.navigator&&!Li.location&&!Li.document)return;const n=Fi();yr(t,{"url.full":"http.client"!==e?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),Pc=(t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,s){Ks(Ni,s.getOptions().stackParser,n,e,t,r)}}},jc=/^HTML(\w*)Element$/;function Fc(t){if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(function(t){if("undefined"==typeof Element)return!1;try{return t instanceof Element}catch{return!1}}(t)){const e=function(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}(t);if(jc.test(e))return`[HTMLElement: ${ea(t)}]`}}function Nc(){return!!function(){if(void 0===Li.window)return!1;const t=Li;
1if(t.nw)return!1;const e=t.chrome||t.browser;if(!e?.runtime?.id)return!1;const n=Ii();return!(Li===Li.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}()}function Bc(t){return[Hs(),Us(),oi(),Ic(),_c(),Mc(),Pc(),ni(),Dc(),Oc(),Rc()]}const Uc=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],qc={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};const zc=Li;const Hc=new WeakMap,Wc=new WeakMap,Jc=["text/event-stream","application/x-ndjson","application/stream+json"],Kc=()=>({name:"FetchStreamPerformance",setup(){!function(t){const e="fetch-body-resolved",n=w(e,t);k(e,()=>bi(Si))}(t=>{if(t.response){const e=Hc.get(t.response);if(e&&t.endTimestamp){e.end(t.endTimestamp);const n=Wc.get(t.response);n&&clearTimeout(n)}}}),vi(t=>{if(t.endTimestamp&&t.response){const e=t.response.headers?.get("content-type")||"";if(t.response.headers?.get("content-length")||!Jc.some(t=>e.startsWith(t)))return;const n=t.fetchData?.url||"",r=t.fetchData?.method||"GET",s=Rs(n),i=Vn({name:`${r} ${n.startsWith("data:")?Ms(n):s?Os(s):n}`,startTime:t.endTimestamp,attributes:{url:Ms(n),"http.method":r,type:"fetch",[ne]:"http.client.stream",[re]:"auto.http.browser.stream"}});Hc.set(t.response,i);const o=setTimeout(()=>{i.isRecording()&&i.end()},9e4);Wc.set(t.response,o)}})}}),Gc="WebVitals",Yc=(t={})=>{const e=new Set(t.ignore??[]);return{name:Gc,setup(n){const r=Wn(n),{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:i}=t._experiments??{},o=r||e.has("cls")?void 0:s||!1,a=r||e.has("lcp")?void 0:i||!1,c=Sa({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:a,client:n}),u=new WeakSet;n.on("afterStartPageLoadSpan",t=>{u.add(t)}),n.on("spanEnd",t=>{u.delete(t)&&(c(),ka(t,{recordClsOnPageloadSpan:!1===o,recordLcpOnPageloadSpan:!1===a,spanStreamingEnabled:r}))}),r?(e.has("lcp")||$a(n),e.has("cls")||La(n),e.has("inp")||Da()):e.has("inp")||Ca()},afterAllSetup(){e.has("inp")||Aa()}}};const Xc="sentry_previous_trace",Vc="sentry.previous_trace";function Qc(t,{linkPreviousTrace:e,consistentTraceSampling:n}){const r="session-storage"===e;let s=r?function(){try{const t=Li.sessionStorage?.getItem(Xc);return JSON.parse(t)}catch{return}}():void 0;t.on("spanStart",t=>{if(ln(t)!==t)return;const e=Kt().getPropagationContext();s=function(t,e,n){const r=Ve(e);function s(){try{const t=Number(r.data?.[te]??n.dsc?.sample_rate);return Number.isNaN(t)?0:t}catch{return 0}}const i={spanContext:e.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!t)return i;const o=t.spanContext;if(o.traceId===r.trace_id)return t;Date.now()/1e3-t.startTimestamp<=3600&&(e.addLink({context:o,attributes:{[we]:"previous_trace"}}),e.setAttribute(Vc,`${o.traceId}-${o.spanId}-${Zc(o)?1:0}`));return i}(s,t,e),r&&function(t){try{Li.sessionStorage.setItem(Xc,JSON.stringify(t))}catch(t){}}(s)});let i=!0;n&&t.on("beforeSampling",t=>{if(!s)return;const e=Kt(),n=e.getPropagationContext();i&&n.parentSpanId?i=!1:(e.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(s.sampleRate),sampled:String(Zc(s.spanContext))},sampleRand:s.sampleRand}),t.parentSampled=Zc(s.spanContext),t.parentSampleRate=s.sampleRate,t.spanAttributes={...t.spanAttributes,[ee]:s.sampleRate})})}function Zc(t){return 1===t.traceFlags}function tu(t){try{return new URL(t,Li.location.origin).href}catch{return}}function eu(t){try{return new Headers(t)}catch{return}}const nu={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function ru(t,e){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:o,onRequestSpanStart:a,onRequestSpanEnd:c}
1={...nu,...e},u="function"==typeof s?s:t=>!0,f=t=>function(t,e){const n=Ii();if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return e?mt(r.toString(),e)||i&&mt(r.pathname,e):i}{const n=!!t.match(/^\/(?!\/)/);return e?mt(t,e):n}}(t,o),l={},h=t.getOptions().propagateTraceparent;n&&vi(e=>{const n=ai(e,u,f,l,{propagateTraceparent:h,onRequestSpanEnd:c});if(n){const r=tu(e.fetchData.url),s=r?As(r).host:void 0,o=r?Ms(r):void 0;n.setAttributes({"http.url":o,"url.full":o,"server.address":s}),i&&iu(n,t),a?.(n,{headers:e.headers})}}),r&&Ya(e=>{const n=function(t,e,n,r,s,i){const o=t.xhr,a=o?.[Ga];if(!o||o.__sentry_own_request__||!a)return;const{url:c,method:u}=a,f=gn()&&e(c);if(t.endTimestamp){const e=o.__sentry_xhr_span_id__;if(!e)return;const n=r[e];return void(n&&(f&&void 0!==a.status_code&&(ke(n,a.status_code),n.end(),i?.(n,{headers:eu(ec(o)),error:t.error})),delete r[e]))}const l=tu(c),h=As(l||c),d=l?Ms(l):void 0,p=Ms((v=c,v.split(/[?#]/,1)[0])),m=Vt(),y=!!dn()||!!m&&Wn(m),g=f&&y?Vn({name:`${u} ${p}`,attributes:{url:Ms(c),type:"xhr","http.method":u,"http.url":d,"url.full":d,"server.address":h?.host,[re]:"auto.http.browser",[ne]:"http.client",...h?.search&&{"http.query":h?.search},...h?.hash&&{"http.fragment":h?.hash}}}):new _n;var v;f&&!y&&m?.recordDroppedEvent("no_parent_span","span");o.__sentry_xhr_span_id__=g.spanContext().spanId,r[o.__sentry_xhr_span_id__]=g,n(c)&&function(t,e,n){const{"sentry-trace":r,baggage:s,traceparent:i}=Ps({span:e,propagateTraceparent:n});r&&function(t,e,n,r){const s=t.__sentry_xhr_v3__?.request_headers;if(s?.["sentry-trace"]||!t.setRequestHeader)return;try{if(t.setRequestHeader("sentry-trace",e),r&&!s?.traceparent&&t.setRequestHeader("traceparent",r),n){const e=s?.baggage;e&&e.split(",").some(t=>t.trim().startsWith("sentry-"))||t.setRequestHeader("baggage",n)}}catch{}}(t,r,s,i)}(o,gn()&&y?g:void 0,s);m&&m.emit("beforeOutgoingRequestSpan",g,t);return g}(e,u,f,l,h,c);n&&(i&&iu(n,t),a?.(n,{headers:eu(e.xhr.__sentry_xhr_v3__?.request_headers)}))})}const su=300;function iu(t,e){const{url:n}=Ve(t).data;if(!n||"string"!=typeof n)return;let r=()=>{setTimeout(s)};if(Wn(e)){const e=t.end.bind(t);t.end=t=>{const n=t??Tt();let i=!1;const o=()=>{i||(i=!0,setTimeout(s),e(n),clearTimeout(a))};r=o;const a=setTimeout(o,su)}}const s=Ho("resource",({entries:e})=>{e.forEach(e=>{(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)})(e)&&e.name.endsWith(n)&&(t.setAttributes(pa(e)),r())})})}const ou=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function au(){const t=Li.navigator;return!!t?.userAgent&&ou.test(t.userAgent)}const cu={...ur,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...nu};function uu(t,e,n){t.emit("startPageLoadSpan",e,n),Kt().setTransactionName(e.name);const r=pu(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function fu(t,e,n){const{url:r,isRedirect:s}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:s}),t.emit("startNavigationSpan",e,{isRedirect:s});const i=Kt();return i.setTransactionName(e.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...Fi(),url:r}}),pu(t)}function lu(t){const e=Li.document,n=e?.querySelector(`meta[name=${t}]`);return n?.getAttribute("content")||void 0}function hu(t){const e=Li.performance?.getEntriesByType?.("navigation")[0],n=e?.serverTiming?.find(e=>e.name===t);return n?.description}const du="_sentry_idleSpan";function pu(t){return t[du]}function mu(t,e){H(t,du,e)}const yu=1.5;const gu=()=>({name:"SpanStreaming",beforeSetup(t){const e=t.getOptions();e.traceLifecycle||(e.traceLifecycle="stream")},setup(t){const e=t.getOptions();if(!Wn(t))return void(e.traceLifecycle="static");const n=e.beforeSendSpan;if(n&&!An(n))return void(e.traceLifecycle="static");const r=new di(t);t.on("afterSpanEnd",e=>{rn(e)&&r.add(mr(e,t))}),t.on("afterSegmentSpanEnd",t=>{const e=t.spanContext().traceId;setTimeout(()=>{r.flush(e)},500)})}}),vu=e,bu="sentryReplaySession",Su="Unable to send Replay",wu=15e4,ku=5e3,_u=2e7,Tu=36e5;var Iu=Object.defineProperty,xu=(t,e,n)=>((t,e,n)=>e in t?Iu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),Eu=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Eu||{});function Cu(t){const e=t?.host;return Boolean(e?.shadowRoot===t)}function Ru(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function Ou(t){try{const n=t.rules||t.cssRules;return n?((e=Array.from(n,Au).join("")).includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e):null}catch(t){return null}var e}function Au(t){let e;if(function(t){return"styleSheet"in t}(t))try{e=Ou(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}(t)}catch(t){}else if(function(t){return"selectorText"in t}(t)){let e=t.cssText;const n=t.selectorText.includes(":"),r="string"==typeof t.style.all&&t.style.all;if(r&&(e=function(t){let e="";for(let n=0;n<t.style.length;n++){const r=t.style,s=r[n],i=r.getPropertyPriority(s);e+=`${s}:${r.getPropertyValue(s)}
1${i?" !important":""};`}return`${t.selectorText} { ${e} }`}(t)),n&&(e=function(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}(e)),n||r)return e}return e||t.cssText}class Mu{constructor(){xu(this,"idNodeMap",new Map),xu(this,"nodeMetaMap",new WeakMap)}getId(t){if(!t)return-1;const e=this.getMeta(t)?.id;return e??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $u({maskInputOptions:t,tagName:e,type:n}){return"OPTION"===e&&(e="SELECT"),Boolean(t[e.toLowerCase()]||n&&t[n]||"password"===n||"INPUT"===e&&!n&&t.text)}function Lu({isMasked:t,element:e,value:n,maskInputFn:r}){let s=n||"";return t?(r&&(s=r(s,e)),"*".repeat(s.length)):s}function Du(t){return t.toLowerCase()}function Pu(t){return t.toUpperCase()}const ju="__rrweb_original__";function Fu(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Du(e):null}function Nu(t,e,n){return"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}function Bu(t,e){let n;try{n=new URL(t,window.location.href)}catch(t){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return r?.[1]??null}const Uu={};function qu(t){const e=Uu[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const s=e.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(e)}catch(t){}return Uu[t]=r.bind(window)}function zu(...t){return qu("setTimeout")(...t)}function Hu(...t){return qu("clearTimeout")(...t)}function Wu(t){try{return t.contentDocument}catch{}}let Ju=1;const Ku=new RegExp("[^a-z0-9-_:]");function Gu(){return Ju++}let Yu,Xu;const Vu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Qu=/^(?:[a-z+]+:)?\/\//i,Zu=/^www\..*/i,tf=/^(data:)([^,]*),(.*)/i;function ef(t,e){return(t||"").replace(Vu,(t,n,r,s,i,o)=>{const a=r||i||o,c=n||s||"";if(!a)return t;if(Qu.test(a)||Zu.test(a))return`url(${c}${a}${c})`;if(tf.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+a}${c})`;const u=e.split("/"),f=a.split("/");u.pop();for(const t of f)"."!==t&&(".."===t?u.pop():u.push(t));return`url(${c}${u.join("/")}${c})`})}const nf=/^[^ \t\n\r\u000c]+/,rf=/^[, \t\n\r\u000c]+/;const sf=new WeakMap;function of(t,e){return e&&""!==e.trim()?cf(t,e):e}function af(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function cf(t,e){let n=sf.get(t);if(n||(n=t.createElement("a"),sf.set(t,n)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return n.setAttribute("href",e),n.href}function uf(t,e,n,r,s,i,o){if(!r)return r;if("src"===n||"href"===n&&("use"!==e||"#"!==r[0]))return of(t,r);if("xlink:href"===n&&"#"!==r[0])return of(t,r);if("background"===n&&("table"===e||"td"===e||"th"===e))return of(t,r);if("srcset"===n)return function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r;const s=t.exec(e.substring(n));return s?(r=s[0],n+=r.length,r):""}const s=[];for(;r(rf),!(n>=e.length);){let i=r(nf);if(","===i.slice(-1))i=of(t,i.substring(0,i.length-1)),s.push(i);else{let r="";i=of(t,i);let o=!1;for(;;){const t=e.charAt(n);if(""===t){s.push((i+r).trim());break}if(o)")"===t&&(o=!1);else{if(","===t){n+=1,s.push((i+r).trim());break}"("===t&&(o=!0)}r+=t,n+=1}}}return s.join(", ")}(t,r);if("style"===n){let e=ef(r,cf(t));return o&&o.size>0&&(e=function(t,e){if(!t||0===e.size)return t;try{const n=t.split(";"),r=[];for(let t of n){if(t=t.trim(),!t)continue;const n=t.indexOf(":");if(-1===n){r.push(t);continue}const s=t.slice(0,n).trim();e.has(s)||r.push(t)}return r.join("; ")+(r.length>0&&t.endsWith(";")?";":"")}catch(e){return console.warn("Error filtering CSS properties:",e),t}}(e,o)),e}return"object"===e&&"data"===n?of(t,r):"function"==typeof i?i(n,r,s):r}function ff(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}
1function lf(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:lf(t.parentNode,e,n,r+1):-1}function hf(t,e){return n=>{const r=n;if(null===r)return!1;try{if(t)if("string"==typeof t){if(r.matches(`.${t}`))return!0}else if(function(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}(r,t))return!0;return!(!e||!r.matches(e))}catch{return!1}}}function df(t,e,n,r,s,i){try{const o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(null===o)return!1;if("INPUT"===o.tagName){const t=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(t))return!0}let a=-1,c=-1;if(i){if(c=lf(o,hf(r,s)),c<0)return!0;a=lf(o,hf(e,n),c>=0?c:1/0)}else{if(a=lf(o,hf(e,n)),a<0)return!1;c=lf(o,hf(r,s),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!i}catch(t){}return!!i}function pf(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:h,inlineStylesheet:d,maskInputOptions:p={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:S,newlyAddedElement:w=!1,ignoreCSSAttributes:k}=e,_=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:Eu.Document,childNodes:[],compatMode:t.compatMode}:{type:Eu.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Eu.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:_};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:f={},inlineImages:l,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:m,maskTextClass:y,unmaskTextClass:g,maskTextSelector:v,unmaskTextSelector:b,ignoreCSSAttributes:S}=e,w=function(t,e,n,r){try{if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}if(n)return t.matches(n)}catch(t){}return!1}(t,r,s,i),k=function(t){if(t instanceof HTMLFormElement)return"form";const e=Du(t.tagName);return Ku.test(e)?"div":e}(t);let _={};const T=t.attributes.length;for(let e=0;e<T;e++){const r=t.attributes[e];r.name&&!ff(k,r.name)&&(_[r.name]=uf(n,k,Du(r.name),r.value,t,c,S))}if("link"===k&&o){const e=Array.from(n.styleSheets).find(e=>e.href===t.href);let r=null;e&&(r=Ou(e)),r&&(_.rel=null,_.href=null,_.crossorigin=null,_._cssText=ef(r,e.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=Ou(t.sheet);e&&(_._cssText=ef(e,cf(n)))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const e=t,n=Fu(e),r=Nu(e,Pu(k),n),s=e.checked;if("submit"!==n&&"button"!==n&&r){const t=df(e,y,v,g,b,$u({type:n,tagName:Pu(k),maskInputOptions:a}));_.value=Lu({isMasked:t,element:e,value:r,maskInputFn:u})}s&&(_.checked=s)}"option"===k&&(t.selected&&!a.select?_.selected=!0:delete _.selected);if("canvas"===k&&h)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const s=e.getImageData,i=ju in s?s[ju]:s;if(new Uint32Array(i.call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(_.rr_dataURL=t.toDataURL(f.type,f.quality));else if(!("__context"in t)){const e=t.toDataURL(f.type,f.quality),r=n.createElement("canvas");r.width=t.width,r.height=t.height;e!==r.toDataURL(f.type,f.quality)&&(_.rr_dataURL=e)}if("img"===k&&l){Yu||(Yu=n.createElement("canvas"),Xu=Yu.getContext("2d"));const e=t,r=e.currentSrc||e.getAttribute("src")||"<unknown-src>",s=e.crossOrigin,i=()=>{e.removeEventListener("load",i);try{Yu.width=e.naturalWidth,Yu.height=e.naturalHeight,Xu.drawImage(e,0,0),_.rr_dataURL=Yu.toDataURL(f.type,f.quality)}catch(t){if("anonymous"!==e.crossOrigin)return e.crossOrigin="anonymous",void(e.complete&&0!==e.naturalWi
1dth?i():e.addEventListener("load",i));console.warn(`Cannot inline img src=${r}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(s?_.crossOrigin=s:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?i():e.addEventListener("load",i)}"audio"!==k&&"video"!==k||(_.rr_mediaState=t.paused?"paused":"played",_.rr_mediaCurrentTime=t.currentTime);p||(t.scrollLeft&&(_.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(_.rr_scrollTop=t.scrollTop));if(w){const{width:e,height:n}=t.getBoundingClientRect();_={class:_.class,rr_width:`${e}px`,rr_height:`${n}px`}}"iframe"!==k||d(_.src)||(w||Wu(t)||(_.rr_src=_.src),delete _.src);let I;try{customElements.get(k)&&(I=!0)}catch(t){}return{type:Eu.Element,tagName:k,attributes:_,childNodes:[],isSVG:af(t)||void 0,needBlock:w,rootId:m,isCustom:I}}(t,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:d,maskAttributeFn:c,maskInputOptions:p,maskInputFn:y,dataURLOptions:g,inlineImages:v,recordCanvas:b,keepIframeSrcFn:S,newlyAddedElement:w,rootId:_,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:h,ignoreCSSAttributes:k});case t.TEXT_NODE:return function(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:f}=e,l=t.parentNode&&t.parentNode.tagName;let h=t.textContent;const d="STYLE"===l||void 0,p="SCRIPT"===l||void 0,m="TEXTAREA"===l||void 0;if(d&&h){try{t.nextSibling||t.previousSibling||t.parentNode.sheet?.cssRules&&(h=Ou(t.parentNode.sheet))}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}h=ef(h,cf(e.doc))}p&&(h="SCRIPT_PLACEHOLDER");const y=df(t,r,i,s,o,n);d||p||m||!h||!y||(h=a?a(h,t.parentElement):h.replace(/[\S]/g,"*"));m&&h&&(c.textarea||y)&&(h=u?u(h,t.parentNode):h.replace(/[\S]/g,"*"));if("OPTION"===l&&h){h=Lu({isMasked:df(t,r,i,s,o,$u({type:null,tagName:l,maskInputOptions:c})),element:t,value:h,maskInputFn:u})}return{type:Eu.Text,textContent:h||"",isStyle:d,rootId:f}}(t,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:h,maskTextFn:m,maskInputOptions:p,maskInputFn:y,rootId:_});case t.CDATA_SECTION_NODE:return{type:Eu.CDATA,textContent:"",rootId:_};case t.COMMENT_NODE:return{type:Eu.Comment,textContent:t.textContent||"",rootId:_};default:return!1}}function mf(t){return null==t?"":t.toLowerCase()}function yf(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:h=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b={},inlineImages:S=!1,recordCanvas:w=!1,onSerialize:k,onIframeLoad:_,iframeLoadTimeout:T=5e3,onBlockedImageLoad:I,onStylesheetLoad:x,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:R=!1,ignoreCSSAttributes:O}=e;let{preserveWhiteSpace:A=!0}=e;const M=pf(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:b,inlineImages:S,recordCanvas:w,keepIframeSrcFn:C,newlyAddedElement:R,ignoreCSSAttributes:O});if(!M)return console.warn(t,"not serialized"),null;let $;$=r.hasNode(t)?r.getId(t):!function(t,e){if(e.comment&&t.type===Eu.Comment)return!0;if(t.type===Eu.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Bu(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(mf(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===mf(t.attributes.name)||"icon"===mf(t.attributes.rel)||"apple-touch-icon"===mf(t.attributes.rel)||"shortcut icon"===mf(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&mf(t.attributes.name).match(/^description|keywords$/))return!0;
1if(e.headMetaSocial&&(mf(t.attributes.property).match(/^(og|twitter|fb):/)||mf(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===mf(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===mf(t.attributes.name)||"googlebot"===mf(t.attributes.name)||"bingbot"===mf(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===mf(t.attributes.name)||"generator"===mf(t.attributes.name)||"framework"===mf(t.attributes.name)||"publisher"===mf(t.attributes.name)||"progid"===mf(t.attributes.name)||mf(t.attributes.property).match(/^article:/)||mf(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===mf(t.attributes.name)||"yandex-verification"===mf(t.attributes.name)||"csrf-token"===mf(t.attributes.name)||"p:domain_verify"===mf(t.attributes.name)||"verify-v1"===mf(t.attributes.name)||"verification"===mf(t.attributes.name)||"shopify-checkout-api-token"===mf(t.attributes.name)))return!0}}return!1}(M,v)&&(A||M.type!==Eu.Text||M.isStyle||M.textContent.trim().length)?Gu():-2;const L=Object.assign(M,{id:$});if(r.add(t,L),-2===$)return null;k&&k(t);let D=!h;if(L.type===Eu.Element){D=D&&!L.needBlock;const e=t.shadowRoot;e&&Ru(e)&&(L.isShadowHost=!0)}if((L.type===Eu.Document||L.type===Eu.Element)&&D){v.headWhitespace&&L.type===Eu.Element&&"head"===L.tagName&&(A=!1);const e={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:h,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:S,recordCanvas:w,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:_,iframeLoadTimeout:T,onBlockedImageLoad:I,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:C,ignoreCSSAttributes:O},R=t.childNodes?Array.from(t.childNodes):[];for(const t of R){const n=yf(t,e);n&&L.childNodes.push(n)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const r=yf(n,e);r&&(Ru(t.shadowRoot)&&(r.isShadow=!0),L.childNodes.push(r))}}if(t.parentNode&&Cu(t.parentNode)&&Ru(t.parentNode)&&(L.isShadow=!0),L.type!==Eu.Element||"iframe"!==L.tagName||L.needBlock||function(t,e,n){const r=function(t){try{return t.contentWindow}catch{}}(t);if(!r)return;let s,i=!1;try{s=r.document.readyState}catch(t){return}if("complete"!==s){const r=zu(()=>{i||(e(),i=!0)},n);return void t.addEventListener("load",()=>{Hu(r),i=!0,e()})}const o="about:blank";if(r.location.href!==o||t.src===o||""===t.src)return zu(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,()=>{const e=Wu(t);if(e&&_){const n=yf(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:S,recordCanvas:w,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:C,ignoreCSSAttributes:O});n&&_(t,n)}},T),L.type===Eu.Element&&"img"===L.tagName&&!t.complete&&L.needBlock){const e=t,n=()=>{if(e.isConnected&&!e.complete&&I)try{const t=e.getBoundingClientRect();t.width>0&&t.height>0&&I(e,L,t)}catch(t){}e.removeEventListener("load",n)};e.isConnected&&e.addEventListener("load",n)}return L.type===Eu.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===Bu(L.attributes.href))&&function(t,e,n){let r,s=!1;try{r=t.sheet}catch(t){r=null}if(r)return;const i=zu(()=>{s||(e(),s=!0)},n);t.addEventListener("load",()=>{Hu(i),s=!0,e()})}(t,()=>{if(x){const e=yf(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:S,recordCanvas:w,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:_,iframeLoadTimeout:T,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:C,ignoreCSSAttributes:O});e&&x(t,e)}},E),L.type===Eu.Element&&delete L.needBlock,L}function gf(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const vf="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 bf={map:{},getId:()=>(console.error(vf),-1),getNode:()=>(console.error(vf),null),removeNodeFromMap(){console.error(vf)},has:()=>(console.error(vf),!1),reset(){console.error(vf)}};function Sf(t,e,n={}){let r=null,s=0;return function(...i){const o=Date.now();s||!1!==n.leading||(s=o);const a=e-(o-s),c=this;a<=0||a>e?(r&&(!function(...t){Bf("clearTimeout")(...t)}(r),r=null),s=o,t.apply(c,i)):r||!1===n.trailing||(r=Uf(()=>{s=!1===n.leading?0:Date.now(),r=null,t.apply(c,i)},a))}}function wf(t,e,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(t){Uf(()=>{n.set.call(this,t)},0),i&&i.set&&i.set.call(this,t)}}),()=>wf(t,e,i||{},!0)}function kf(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(bf=new Proxy(bf,{get:(t,e,n)=>("map"===e&&console.error(vf),Reflect.get(t,e,n))}));let _f=Date.now;function Tf(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:e?.documentElement.scrollLeft||e?.body?.parentElement?.scrollLeft||e?.body?.scrollLeft||0,top:e.scrollingElement?e.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:e?.documentElement.scrollTop||e?.body?.parentElement?.scrollTop||e?.body?.scrollTop||0}}function If(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xf(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ef(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch(t){return null}}function Cf(t,e,n,r,s){if(!t)return!1;const i=Ef(t);if(!i)return!1;const o=hf(e,n);if(!s){const t=r&&i.matches(r);return o(i)&&!t}const a=lf(i,o);let c=-1;return!(a<0)&&(r&&(c=lf(i,hf(null,r))),a>-1&&c<0||a<c)}function Rf(t,e){return-2===e.getId(t)}function Of(t,e){if(Cu(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||Of(t.parentNode,e))}function Af(t){return Boolean(t.changedTouches)}function Mf(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function $f(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Lf(t){return Boolean(t?.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(_f=()=>(new Date).getTime());class Df{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Pf(t){let e=null;return t.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function jf(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;
1for(;e=Pf(n);)n=e;return n}(t);return e.contains(n)}function Ff(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||jf(t))}const Nf={};function Bf(t){const e=Nf[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const s=e.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(e)}catch(t){}return Nf[t]=r.bind(window)}function Uf(...t){return Bf("setTimeout")(...t)}var qf=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(qf||{}),zf=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(zf||{}),Hf=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Hf||{}),Wf=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Wf||{}),Jf=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Jf||{});let Kf;const Gf=t=>{if(!Kf)return t;return(...e)=>{try{return t(...e)}catch(t){if(Kf&&!0===Kf(t))return()=>{};throw t}}};for(var Yf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xf="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Vf=0;Vf<64;Vf++)Xf[Yf.charCodeAt(Vf)]=Vf;class Qf{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function Zf(t){try{return t.contentDocument}catch(t){}}function tl(t){try{return t.contentWindow}catch(t){}}class el{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if("undefined"==typeof CSSStyleSheet||"function"!=typeof CSSStyleSheet.prototype.replaceSync)return null;try{const e=new CSSStyleSheet;e.replaceSync(`x { ${t} }`);const n=e.cssRules[0];return n&&n.type===CSSRule.STYLE_RULE?n.style:null}catch{return null}}parseWithDetachedElement(t){const e=this.getUnattachedDoc().createElement("span");return e.setAttribute("style",t),e.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}}function nl(t){return"__ln"in t}class rl{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n<t;n++)e=e?.next||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&nl(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&nl(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const sl=(t,e)=>`${t}@${e}`;class il{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>
1{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,n=new rl,r=t=>{let e=t,n=-2;for(;-2===n;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},s=s=>{if(!s.parentNode||!Ff(s))return;const i=Cu(s.parentNode)?this.mirror.getId(Pf(s)):this.mirror.getId(s.parentNode),o=r(s);if(-1===i||-1===o)return n.addNode(s);const a=yf(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{Mf(t,this.mirror)&&!Cf(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(t),$f(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Lf(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(t,e)=>{if(Cf(t,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(t,e);const n=tl(t);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},onBlockedImageLoad:(t,e,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});a&&(t.push({parentId:i,nextId:o,node:a}),e.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)al(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||s(t);for(const t of this.addedSet)cl(this.droppedSet,t)||al(this.removes,t,this.mirror)?cl(this.movedSet,t)?s(t):this.droppedSet.add(t):s(t);let i=null;for(;n.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==e&&-1!==n&&(t=i)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==e){t=n;break}{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;if(-1!==this.mirror.getId(r)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}i=t.previous,n.removeNode(t.value),s(t.value)}const o={texts:this.texts.map(t=>({id:this.mirror.getId(t.node),value:t.value})).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{const{attributes:e}=t;if("string"==typeof e.style){const n=JSON.stringify(t.styleDiff),r=JSON.stringify(t.Wt);n.length<e.style.length&&(n+r).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(o.texts.length||o.attributes.length||o.removes.length||o.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(o))},this.processMutation=t=>{if(!Rf(t.target,this.mirror))switch(t.type){case"characterData":{const e=t.target.textContent;Cf(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||e===t.oldValue||this.texts.push({value:df(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e,Ef(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=t.attributeName,r=t.target.getAttribute(n);if("value"===n){const n=Fu(e),s=e.tagName;r=Nu(e,s,n);const i=$u({maskInputOptions:this.maskInputOptions,tagName:s,type:n});r=Lu({isMasked:df(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:e,value:r,maskInputFn:this.maskInputFn})}if(Cf(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===t.oldValue)return;let s=this.attributeMap.get(t.target);
1if("IFRAME"===e.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(Zf(e))return;n="rr_src"}if(s||(s={node:t.target,attributes:{},styleDiff:{},Wt:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),"type"===n&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),!ff(e.tagName,n)&&(s.attributes[n]=uf(this.doc,Du(e.tagName),Du(n),r,e,this.maskAttributeFn),"style"===n)){const n=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(const t of Array.from(e.style)){const r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);r!==(n?.getPropertyValue(t)||"")||i!==(n?.getPropertyPriority(t)||"")?s.styleDiff[t]=""===i?r:[r,i]:s.Wt[t]=[r,i]}if(n)for(const t of Array.from(n))""===e.style.getPropertyValue(t)&&(s.styleDiff[t]=!1)}break}case"childList":if(Cf(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const n=this.mirror.getId(e),r=Cu(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Cf(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Rf(e,this.mirror)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(ol(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||Of(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[sl(n,r)]?ol(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!(!Cu(t.target)||!Ru(t.target))||void 0})),this.mapRemoves.push(e))})}},this.genAdds=(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(Rf(t,this.mirror))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[sl(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Cf(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(t=>this.genAdds(t)),Lf(t)&&t.shadowRoot.childNodes.forEach(e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(e=>{this[e]=t[e]}),this.styleDeclarationParser=new el(this.doc)}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 ol(t,e){t.delete(e),e.childNodes?.forEach(e=>ol(t,e))}function al(t,e,n){return 0!==t.length&&function(t,e,n){let r=e.parentNode;for(;r;){const e=n.getId(r);if(t.some(t=>t.id===e))return!0;r=r.parentNode}return!1}(t,e,n)}function cl(t,e){return 0!==t.size&&ul(t,e)}function ul(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||ul(t,n))}const fl=[];function ll(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function hl(t,e){const n=new il;fl.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const s=window?.Zone?.__symbol__?.("MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(Gf(e=>{t.onMutation&&!1===t.onMutation(e)||n.processMutations.bind(n)(e)}));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function dl({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,c=[];let u=null;return Object.keys(Hf).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==a[t]).forEac
1h(o=>{let a=Du(o);const f=(e=>o=>{const a=ll(o);if(Cf(a,r,s,i,!0))return;let c=null,f=e;if("pointerType"in o){switch(o.pointerType){case"mouse":c=Wf.Mouse;break;case"touch":c=Wf.Touch;break;case"pen":c=Wf.Pen}c===Wf.Touch&&(Hf[e]===Hf.MouseDown?f="TouchStart":Hf[e]===Hf.MouseUp&&(f="TouchEnd"))}else Af(o)&&(c=Wf.Touch);null!==c?(u=c,(f.startsWith("Touch")&&c===Wf.Touch||f.startsWith("Mouse")&&c===Wf.Mouse)&&(c=null)):Hf[e]===Hf.Click&&(c=u,u=null);const l=Af(o)?o.changedTouches[0]:o;if(!l)return;const h=n.getId(a),{clientX:d,clientY:p}=l;Gf(t)({type:Hf[f],id:h,x:d,y:p,...null!==c&&{pointerType:c}})})(o);if(window.PointerEvent)switch(Hf[o]){case Hf.MouseDown:case Hf.MouseUp:a=a.replace("mouse","pointer");break;case Hf.TouchStart:case Hf.TouchEnd:return}c.push(gf(a,f,e))}),Gf(()=>{c.forEach(t=>t())})}function pl({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){return gf("scroll",Gf(Sf(Gf(o=>{const a=ll(o);if(!a||Cf(a,r,s,i,!0))return;const c=n.getId(a);if(a===e&&e.defaultView){const n=Tf(e.defaultView);t({id:c,x:n.left,y:n.top})}else t({id:c,x:a.scrollLeft,y:a.scrollTop})}),o.scroll||100)),e)}const ml=["INPUT","TEXTAREA","SELECT"],yl=new WeakMap;function gl({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:f,userTriggeredOnInput:l,maskTextClass:h,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m}){function y(t){let n=ll(t);const f=t.isTrusted,y=n&&Pu(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||ml.indexOf(y)<0||Cf(n,r,s,i,!0))return;const v=n;if(v.classList.contains(o)||a&&v.matches(a))return;const b=Fu(n);let S=Nu(v,y,b),w=!1;const k=$u({maskInputOptions:c,tagName:y,type:b}),_=df(n,h,p,d,m,k);"radio"!==b&&"checkbox"!==b||(w=n.checked),S=Lu({isMasked:_,element:n,value:S,maskInputFn:u}),g(n,l?{text:S,isChecked:w,userTriggered:f}:{text:S,isChecked:w});const T=n.name;"radio"===b&&T&&w&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(t=>{if(t!==n){const e=Lu({isMasked:_,element:t,value:Nu(t,y,b),maskInputFn:u});g(t,l?{text:e,isChecked:!w,userTriggered:!1}:{text:e,isChecked:!w})}})}function g(e,r){const s=yl.get(e);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){yl.set(e,r);const s=n.getId(e);Gf(t)({...r,id:s})}}const v=("last"===f.input?["change"]:["input","change"]).map(t=>gf(t,Gf(y),e)),b=e.defaultView;if(!b)return()=>{v.forEach(t=>t())};const S=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&v.push(...w.map(t=>wf(t[0],t[1],{set(){Gf(y)({target:this,isTrusted:!1})}},!1,b))),Gf(()=>{v.forEach(t=>t())})}function vl(t){return function(t,e){if(kl("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||kl("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||kl("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||kl("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function bl(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function Sl({mirror:t,stylesheetManager:e},n){let r=null;r="#document"===n.nodeName?t.getId(n):t.getId(n.host);const s="#document"===n.nodeName?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=s?.prototype?Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&i?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(t){const n=i.set?.call(this,t);if(null!==r&&-1!==r)try{e.adoptStyleSheets(t,r)}catch(t){}return n}}),Gf(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})})):()=>{}}function wl(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let r;t.recordDOM&&(r=hl(t,t.doc));const s=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const s="number"==typeof e.mousemove?e.mousemove:50,i="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let o,a=[];const c=Sf(Gf(e=>{const n=Date.now()-o;t(a.map(t=>(t.timeOffset-=n,t)),e),a=[],o=null}),i),u=Gf(Sf(Gf(t=>{const e=ll(t),{clientX:n,clientY:s}=Af(t)?t.changedTouches[0]:t;o||(o=_f()),a.push({x:n,y:s,id:r.getId(e),timeOffset:_f()-o}),c("undefined"!=typeof DragEvent&&t instanceof DragEvent?zf.Drag:t instanceof MouseEvent?zf.MouseMove:zf.TouchMove)}),s,{trailing:!1})),f=[gf("mousemove",u,n),gf("touchmove",u,n),gf("drag",u,n)];return Gf(()=>{f.forEach(t=>t())})}(t),i=dl(t),o=pl(t),a=function({viewportResizeCb:t},{win:e}){let n=-1,r=-1;return gf("resize",Gf(Sf(Gf(()=>{const e=If(),s=xf();n===e&&r===s||(t({width:Number(s),height:Number(e)}),n=e,r=s)}),200)),e)}(t,{win:n}),c=gl(t),u=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=Gf(o=>Sf(Gf(i=>{const a=ll(i);if(!a||Cf(a,e,n,r,!0))return;const{currentTime:c,volume:u,muted:f,playbackRate:l}=a;t({type:o,id:s.getId(a),currentTime:c,volume:u,muted:f,playbackRate:l})}),i.media||500)),c=[gf("play",a(Jf.Play),o),gf("pause",a(Jf.Pause),o),gf("seeked",a(Jf.Seeked),o),gf("volumechange",a(Jf.VolumeChange),o),gf("ratechange",a(Jf.RateChange),o)];return Gf(()=>
vendor: 4,856 bytes, line 1
1{c.forEach(t=>t())})}(t);let f=()=>{},l=()=>{},h=()=>{},d=()=>{};t.recordDOM&&(f=function({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:Gf((r,s,i)=>{const[o,a]=i,{id:c,styleId:u}=bl(s,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:o,index:a}]}),r.apply(s,i)})});const i=r.CSSStyleSheet.prototype.deleteRule;let o,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Gf((r,s,i)=>{const[o]=i,{id:a,styleId:c}=bl(s,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:o}]}),r.apply(s,i)})}),r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Gf((r,s,i)=>{const[o]=i,{id:a,styleId:c}=bl(s,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replace:o}),r.apply(s,i)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Gf((r,s,i)=>{const[o]=i,{id:a,styleId:c}=bl(s,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replaceSync:o}),r.apply(s,i)})}));const c={};_l("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(_l("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),_l("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),_l("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([r,s])=>{u[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(u[r].insertRule,{apply:Gf((r,s,i)=>{const[o,a]=i,{id:c,styleId:u}=bl(s.parentStyleSheet,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:o,index:[...vl(s),a||0]}]}),r.apply(s,i)})}),s.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:Gf((r,s,i)=>{const[o]=i,{id:a,styleId:c}=bl(s.parentStyleSheet,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:[...vl(s),o]}]}),r.apply(s,i)})})}),Gf(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([t,e])=>{e.prototype.insertRule=u[t].insertRule,e.prototype.deleteRule=u[t].deleteRule})})}(t,{win:n}),l=Sl(t,t.doc),h=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Gf((s,o,a)=>{const[c,u,f]=a;if(n.has(c))return i.apply(o,[c,u,f]);const{id:l,styleId:h}=bl(o.parentRule?.parentStyleSheet,e,r.styleMirror);return(l&&-1!==l||h&&-1!==h)&&t({id:l,styleId:h,set:{property:c,value:u,priority:f},index:vl(o.parentRule)}),s.apply(o,a)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Gf((s,i,a)=>{const[c]=a;if(n.has(c))return o.apply(i,[c]);const{id:u,styleId:f}=bl(i.parentRule?.parentStyleSheet,e,r.styleMirror);return(u&&-1!==u||f&&-1!==f)&&t({id:u,styleId:f,remove:{property:c},index:vl(i.parentRule)}),s.apply(i,a)})}),Gf(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}(t,{win:n}),t.collectFonts&&(d=function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(t,e,n){const r=new i(t,e,n);return s.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const o=kf(e.fonts,"add",function(e){return function(n){return Uf(Gf(()=>{const e=s.get(n);e&&(t(e),s.delete(n))}),0),e.apply(this,[n])}});return r.push(()=>{n.FontFace=i}),r.push(o),Gf(()=>{r.forEach(t=>t())})}(t)));const p=function(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=t;let a=!0;const c=Gf(()=>{const t=e.getSelection();if(!t||a&&t?.isCollapsed)return;a=t.isCollapsed||!1;const c=[],u=t.rangeCount||0;for(let e=0;e<u;e++){const o=t.getRangeAt(e),{startContainer:a,startOffset:u,endContainer:f,endOffset:l}=o;Cf(a,r,s,i,!0)||Cf(f,r,s,i,!0)||c.push({start:n.getId(a),startOffset:u,end:n.getId(f),endOffset:l})}o({ranges:c})});return c(),gf("selectionchange",c)}(t),m=function({doc:t,customElementCb:e}){const n=t.defaultView;return n&&n.customElements?kf(n.customElements,"define",function(t){return function(n,r,s){try{e({define:{name:n}})}catch(t){}return t.apply(this,[n,r,s])}}):()=>{}}(t),y=[];for(const e of t.plugins)y.push(e.observer(e.callback,n,e.options));return Gf(()=>{fl.forEach(t=>t.reset()),r?.disconnect(),s(),i(),o(),a(),c(),u(),f(),l(),h(),d(),p(),m(),y.forEac
vendor: 4,116 bytes, line 1
1h(t=>t())})}function kl(t){return void 0!==window[t]}function _l(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Tl{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,e,n,r){const s=n||this.getIdToRemoteIdMap(t),i=r||this.getRemoteIdToIdMap(t);let o=s.get(e);return o||(o=this.generateIdFn(),s.set(e,o),i.set(o,e)),o}getIds(t,e){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,n,r))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;const s=r.get(e);return s||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,n))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class Il{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Tl(Gu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Tl(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0);const e=tl(t);e&&this.crossOriginIframeMap.set(e,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&tl(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const n=Zf(t);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const r=this.transformCrossOriginEvent(n,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case qf.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:qf.IncrementalSnapshot,data:{source:zf.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case qf.Meta:case qf.Load:case qf.DomContentLoaded:return!1;case qf.Plugin:return e;case qf.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case qf.IncrementalSnapshot:switch(e.data.source){case zf.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case zf.Drag:case zf.TouchMove:case zf.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case zf.ViewportResize:return!1;case zf.MediaInteraction:case zf.MouseInteraction:case zf.Scroll:case zf.CanvasMutation:case zf.Input:return this.replaceIds(e.data,t,["id"]),e;case zf.StyleSheetRule:case zf.StyleDeclaration:return this.replaceIds(e.data,t,["i
1d"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case zf.Font:return e;case zf.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case zf.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),e.data.styles?.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,n,r){for(const s of r)(Array.isArray(e[s])||"number"==typeof e[s])&&(Array.isArray(e[s])?e[s]=t.getIds(n,e[s]):e[s]=t.getId(n,e[s]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Eu.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class xl{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(!Ru(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const n=hl({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(pl({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Uf(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Sl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const e=Zf(t),n=tl(t);e&&n&&this.patchAttachShadow(n.Element,e)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(kf(t.prototype,"attachShadow",function(t){return function(r){const s=t.call(this,r);return this.shadowRoot&&Ff(this)&&n.addShadowRoot(this.shadowRoot,e),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class El{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Df,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const n={id:e,styleIds:[]},r=[];for(const e of t){let t;this.styleMirror.has(e)?t=this.styleMirror.getId(e):(t=this.styleMirror.add(e),r.push({styleId:t,rules:Array.from(e.rules||CSSRule,(t,e)=>({rule:Au(t),index:e}))})),n.styleIds.push(t)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Cl{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,function(...t){Bf("requestAnimationFrame")(...t)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}let Rl,Ol;try{if(2!==Array.from([1],t=>2*t)[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=t.contentWindow?.Array.from||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Al=new Mu;function Ml(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:f="rr-mask",unmaskTextClass:l=null,maskTextSelector:h=null,unmaskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:v,maskInputFn:b,maskTextFn:S,maxCanvasSize:w=null,packFn:k,sampling:_={},dataURLOptions:T={},mousemoveWait:I,recordDOM:x=!0,recordCanvas:E=!1,recordCrossOriginIframes:C=!1,recordAfter:R=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:A=!1,inlineImages:M=!1,plugins:$,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:D=new Set([]),errorHandler:P,onMutation:j,getCanvasManager:F}=t;Kf=P;const N=!C||window.parent===window;let B=!1;if(!N)try{window.parent.document&&(B=!1)}catch(t){B=!0}if(N&&!e)throw new Error("emit function is required");if(!N&&!B)return()=>{};void 0!==I&&void 0===_.mousemove&&(_.mousemove=I),Al.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!==y?y:{},q=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};let z;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.N
1odeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let H=0;const W=t=>{for(const e of $||[])e.eventProcessor&&(t=e.eventProcessor(t));return k&&!B&&(t=k(t)),t};Rl=(t,s)=>{const i=t;if(i.timestamp=_f(),!fl[0]?.isFrozen()||i.type===qf.FullSnapshot||i.type===qf.IncrementalSnapshot&&i.data.source===zf.Mutation||fl.forEach(t=>t.unfreeze()),N)e?.(W(i),s);else if(B){const t={type:"rrweb",event:W(i),origin:window.location.origin,isCheckout:s};window.parent.postMessage(t,"*")}if(i.type===qf.FullSnapshot)z=i,H=0;else if(i.type===qf.IncrementalSnapshot){if(i.data.source===zf.Mutation&&i.data.isAttachIframe)return;H++;const t=r&&H>=r,e=n&&z&&i.timestamp-z.timestamp>n;(t||e)&&tt(!0)}};const J=t=>{Rl({type:qf.IncrementalSnapshot,data:{source:zf.Mutation,...t}})},K=t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.Scroll,...t}}),G=t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.CanvasMutation,...t}}),Y=new El({mutationCb:J,adoptedStyleSheetCb:t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.AdoptedStyleSheet,...t}})}),X=new Il({mirror:Al,mutationCb:J,stylesheetManager:Y,recordCrossOriginIframes:C,wrappedEmit:Rl});for(const t of $||[])t.getMirror&&t.getMirror({nodeMirror:Al,crossOriginIframeMirror:X.crossOriginIframeMirror,crossOriginIframeStyleMirror:X.crossOriginIframeStyleMirror});const V=new Cl,Q=function(t,e){try{return t?t(e):new Qf}catch{return console.warn("Unable to initialize CanvasManager"),new Qf}}(F,{mirror:Al,win:window,mutationCb:t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.CanvasMutation,...t}}),recordCanvas:E,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:w,sampling:_.canvas,dataURLOptions:T,errorHandler:P}),Z=new xl({mutationCb:J,scrollCb:K,bypassOptions:{onMutation:j,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:U,dataURLOptions:T,maskAttributeFn:v,maskTextFn:S,maskInputFn:b,recordCanvas:E,inlineImages:M,sampling:_,slimDOMOptions:q,iframeManager:X,stylesheetManager:Y,canvasManager:Q,keepIframeSrcFn:L,processedNodeManager:V,ignoreCSSAttributes:D},mirror:Al}),tt=(t=!1)=>{if(!x)return;Rl({type:qf.Meta,data:{href:window.location.href,width:xf(),height:If()}},t),Y.reset(),Z.init(),fl.forEach(t=>t.lock());const e=function(t,e){const{mirror:n=new Mu,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:f=null,inlineStylesheet:l=!0,inlineImages:h=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:S,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:_,onBlockedImageLoad:T,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:C=new Set([])}=e||{};return yf(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:l,maskInputOptions:!0===p?{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===p?{}:p,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,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:h,recordCanvas:d,preserveWhiteSpace:S,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:_,onBlockedImageLoad:T,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:E,newlyAddedElement:!1,ignoreCSSAttributes:C})}(document,{mirror:Al,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:p,maskAllInputs:U,maskAttributeFn:v,maskInputFn:b,maskTextFn:S,slimDOM:q,dataURLOptions:T,recordCanvas:E,inlineImages:M,onSerialize:t=>{Mf(t,Al)&&X.addIframe(t),$f(t,Al)&&Y.trackLinkElement(t),Lf(t)&&Z.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{X.attachIframe(t,e);const n=tl(t);n&&Q.addWindow(n),Z.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{Y.attachLinkElement(t,e)},onBlockedImageLoad:(t,e,{width:n,height:r})=>{J({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:L,ignoreCSSAttributes:D});if(!e)return console.warn("Failed to snapshot the document");Rl({type:qf.FullSnapshot,data:{node:e,initialOffset:Tf(window)}}),fl.forEach(t=>t.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Al.getId(document))};Ol=tt;try{const t=[],e=t=>Gf(wl)({onMutation:j,mutationCb:J,mousemoveCb:(t,e)=>Rl({type:qf.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.MouseInteraction,...t}}),scrollCb:K,viewportResizeCb:t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.ViewportResize,...t}}),inputCb:t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.Input,...t}}),mediaInteractionCb:t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.MediaInteraction,...t}}),styleSheetRuleCb:t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.StyleSheetRule,...t}}),styleDeclarationCb:t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.StyleDeclaration,...t}}),canvasMutationCb:G,fontCb:t=>Rl({type:qf.IncrementalSnapshot,data:{source:zf.Font,...t}}),selectionCb:t=>{Rl({type:qf.IncrementalSnapshot,data:{source:zf.Selection,...t}})},customElementCb:t=>{Rl({type:qf.IncrementalSnapshot,data:{source:zf.CustomElement,...t}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:h,unmaskTextSelector:d,maskInputOptions:U,inlineStylesheet:p,sampling:_,recordDOM:x,recordCanvas:E,inlineImages:M,userTr
1iggeredOnInput:O,collectFonts:A,doc:t,maskAttributeFn:v,maskInputFn:b,maskTextFn:S,keepIframeSrcFn:L,blockSelector:i,unblockSelector:o,slimDOMOptions:q,dataURLOptions:T,mirror:Al,iframeManager:X,stylesheetManager:Y,shadowDomManager:Z,processedNodeManager:V,canvasManager:Q,ignoreCSSAttributes:D,plugins:$?.filter(t=>t.observer)?.map(t=>({observer:t.observer,options:t.options,callback:e=>Rl({type:qf.Plugin,data:{plugin:t.name,payload:e}})}))||[]},{});X.addLoadListener(n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}});const n=()=>{tt(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(gf("DOMContentLoaded",()=>{Rl({type:qf.DomContentLoaded,data:{}}),"DOMContentLoaded"===R&&n()})),t.push(gf("load",()=>{Rl({type:qf.Load,data:{}}),"load"===R&&n()},window))),()=>{t.forEach(t=>t()),V.destroy(),Ol=void 0,Kf=void 0}}catch(t){console.warn(t)}}var $l,Ll;Ml.mirror=Al,Ml.takeFullSnapshot=function(t){if(!Ol)throw new Error("please take full snapshot after start recording");Ol(t)},(Ll=$l||($l={}))[Ll.NotStarted=0]="NotStarted",Ll[Ll.Running=1]="Running",Ll[Ll.Stopped=2]="Stopped";function Dl(t){return t>9999999999?t:1e3*t}function Pl(t){return t>9999999999?t/1e3:t}function jl(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:qf.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:ct(e,10,1e3)}}),"console"===e.category)))}function Fl(t){return t.closest("button,a")||t}function Nl(t){const e=Bl(t);return e&&e instanceof Element?Fl(e):e}function Bl(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let Ul;function ql(t){return Ul||(Ul=[],z(vu,"open",function(t){return function(...e){if(Ul)try{Ul.forEach(t=>t())}catch{}return t.apply(vu,e)}})),Ul.push(t),()=>{const e=Ul?Ul.indexOf(t):-1;e>-1&&Ul.splice(e,1)}}const zl=new Set([zf.Mutation,zf.StyleSheetRule,zf.StyleDeclaration,zf.AdoptedStyleSheet,zf.CanvasMutation,zf.Selection,zf.MediaInteraction]);class Hl{constructor(t,e,n=jl){this.Jt=0,this.Kt=0,this.Gt=[],this.Yt=e.timeout/1e3,this.Xt=e.threshold/1e3,this.Vt=e.scrollTimeout/1e3,this._replay=t,this.Qt=e.ignoreSelector,this.Zt=n}
1addListeners(){const t=ql(()=>{this.Jt=Jl()});this.te=()=>{t(),this.Gt=[],this.Jt=0,this.Kt=0}}removeListeners(){this.te&&this.te(),this.ee&&clearTimeout(this.ee)}handleClick(t,e){if(function(t,e){if(!Wl.includes(t.tagName))return!0;if("INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||""))return!0;if("A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))return!0;if(e&&t.matches(e))return!0;return!1}(e,this.Qt)||!function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t))return;const n={timestamp:Pl(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};this.Gt.some(t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1)||(this.Gt.push(n),1===this.Gt.length&&this.ne())}registerMutation(t=Date.now()){this.Jt=Pl(t)}registerScroll(t=Date.now()){this.Kt=Pl(t)}registerClick(t){const e=Fl(t);this.re(e)}re(t){this.se(t).forEach(t=>{t.clickCount++})}se(t){return this.Gt.filter(e=>e.node===t)}ie(){const t=[],e=Jl();this.Gt.forEach(n=>{!n.mutationAfter&&this.Jt&&(n.mutationAfter=n.timestamp<=this.Jt?this.Jt-n.timestamp:void 0),!n.scrollAfter&&this.Kt&&(n.scrollAfter=n.timestamp<=this.Kt?this.Kt-n.timestamp:void 0),n.timestamp+this.Yt<=e&&t.push(n)});for(const e of t){const t=this.Gt.indexOf(e);t>-1&&(this.oe(e),this.Gt.splice(t,1))}this.Gt.length&&this.ne()}oe(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this.Vt,r=t.mutationAfter&&t.mutationAfter<=this.Xt,s=!n&&!r,{clickCount:i,clickBreadcrumb:o}=t;if(s){const n=1e3*Math.min(t.mutationAfter||this.Yt,this.Yt),r=n<1e3*this.Yt?"mutation":"timeout",s={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:vu.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};return void this.Zt(e,s)}if(i>1){const t={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:vu.location.href,route:e.getCurrentRoute(),clickCount:i,metric:!0}};this.Zt(e,t)}}ne(){this.ee&&clearTimeout(this.ee),this.ee=Ka(()=>this.ie(),1e3)}}const Wl=["A","BUTTON","INPUT"];function Jl(){return Date.now()/1e3}function Kl(t,e){try{if(!function(t){return 3===t.type}(e))return;const{source:n}=e.data;if(zl.has(n)&&t.registerMutation(e.timestamp),n===zf.Scroll&&t.registerScroll(e.timestamp),function(t){return t.data.source===zf.MouseInteraction}(e)){const{type:n,id:r}=e.data,s=Ml.mirror.getNode(r);s instanceof HTMLElement&&n===Hf.Click&&t.registerClick(s)}}catch{}}function Gl(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var Yl=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Yl||{});const Xl=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Vl(t){const e={};!t["data-sentry-component"]&&t["data-sentry-element"]&&(t["data-sentry-component"]=t["data-sentry-element"]);for(const n in t)if(Xl.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}const Ql=t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?Nl(t.event):Bl(t.event),n=ea(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}(t);return Gl({category:`ui.${t.name}`,...Zl(e,n)})}(e);if(!n)return;const r="click"===e.name,s=r?e.event:void 0;var i,o,a;!(r&&t.clickDetector&&s?.target)||s.altKey||s.metaKey||s.ctrlKey||s.shiftKey||(i=t.clickDetector,o=n,a=Nl(e.event),i.handleClick(o,a)),jl(t,n)};function Zl(t,e){const n=Ml.mirror.getId(t),r=n&&Ml.mirror.getNode(n),s=r&&Ml.mirror.getMeta(r),i=s&&function(t){return t.type===Yl.Element}(s)?s:null;return{message:e,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(t=>t.type===Yl.Text&&t.textContent).filter(Boolean).map(t=>t.trim()).join(""),attributes:Vl(i.attributes)}}:{}}}function th(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=t;if(!o||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(o)||!i)return null;const a=e||r||s,c=1===i.length;if(!a&&c)return null;const u=ea(o,{maxStringLength:200})||"<unknown>",f=Zl(o,u);
1return Gl({category:"ui.keyDown",message:u,data:{...f.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}(e);n&&jl(t,n)}const eh={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=t;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${e}.${n}`,start:sh(i),end:sh(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:s}=t,i=sh(s);return{type:n,name:r,start:i,end:i+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:f,loadEventEnd:l,redirectCount:h,startTime:d,transferSize:p,type:m}=t;if(0===s)return null;return{type:`${e}.${m}`,start:sh(d),end:sh(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:f,loadEventEnd:l,domComplete:i,redirectCount:h}}}};function nh(t,e){return({metric:n})=>{e.replayPerformanceEntries.push(t(n))}}function rh(t){const e=eh[t.entryType];return e?e(t):null}function sh(t){return((xt()||vu.performance.timeOrigin)+t)/1e3}function ih(t){const e=t.entries[t.entries.length-1];return uh(t,"largest-contentful-paint",e?.element?[e.element]:void 0)}function oh(t){return void 0!==t.sources}function ah(t){const e=[],n=[];for(const r of t.entries)if(oh(r)){const t=[];for(const e of r.sources)if(e.node){n.push(e.node);const r=Ml.mirror.getId(e.node);r&&t.push(r)}e.push({value:r.value,nodeIds:t.length?t:void 0})}return uh(t,"cumulative-layout-shift",n,e)}function ch(t){const e=t.entries[t.entries.length-1];return uh(t,"interaction-to-next-paint",e?.target?[e.target]:void 0)}function uh(t,e,n,r){const s=t.value,i=t.rating,o=sh(s);return{type:"web-vital",name:e,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(t=>Ml.mirror.getId(t)):void 0,attributions:r}}}const fh=["log","warn","error"];const lh=function(){const t={exception:()=>{},infoTick:()=>{},setConfig:t=>{}};return fh.forEach(e=>{t[e]=()=>{}}),t}();class hh extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class dh{constructor(){this.events=[],this.ae=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this.ae+=e,this.ae>_u)throw new hh;this.events.push(t)}finish(){return new Promise(t=>{const e=this.events;this.clear(),t(JSON.stringify(e))})}clear(){this.events=[],this.ae=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:e}of this.events)(null===t||e<t)&&(t=e);return null===t?t:Dl(t)}}class ph{constructor(t){this.ce=({data:t})=>{const e=t;if("number"!=typeof e.id)return;const n=this.ue.get(e.id);n&&n.method===e.method&&(this.ue.delete(e.id),e.success?n.resolve(e.response):n.reject(new Error("Error in compression worker")))},this.fe=t,this.le=0,this.ue=new Map,this.fe.addEventListener("message",this.ce)}ensureReady(){return this.he||(this.he=new Promise((t,e)=>{this.fe.addEventListener("message",({data:n})=>{n.success?t():e(new Error("Received worker message with unsuccessful status"))},{once:!0}),this.fe.addEventListener("error",t=>{e(new Error(`Failed to load Replay compression worker: ${t instanceof ErrorEvent&&t.message?t.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})})),this.he}destroy(){this.fe.removeEventListener("message",this.ce),this.ue.forEach(t=>t.reject(new Error("Worker destroyed"))),this.ue.clear(),this.fe.terminate()}postMessage(t,e){const n=this.de();return new Promise((r,s)=>{this.ue.set(n,{method:t,resolve:r,reject:s});try{this.fe.postMessage({id:n,method:t,arg:e})}catch(t){this.ue.delete(n),s(t)}})}de(){return this.le++}}class mh{constructor(t){this.fe=new ph(t),this.pe=null,this.ae=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this.pe}get type(){return"worker"}ensureReady(){return this.fe.ensureReady()}destroy(){this.fe.destroy()}
1addEvent(t){const e=Dl(t.timestamp);(!this.pe||e<this.pe)&&(this.pe=e);const n=JSON.stringify(t);return this.ae+=n.length,this.ae>_u?Promise.reject(new hh):this.me(n)}finish(){return this.ye()}clear(){this.pe=null,this.ae=0,this.hasCheckout=!1,this.fe.postMessage("clear").then(null,t=>{})}getEarliestTimestamp(){return this.pe}me(t){return this.fe.postMessage("addEvent",t)}async ye(){const t=await this.fe.postMessage("finish");return this.pe=null,this.ae=0,t}}class yh{constructor(t){this.ge=new dh,this.ve=new mh(t),this.be=this.ge,this.Se=this.we()}get waitForCheckout(){return this.be.waitForCheckout}get type(){return this.be.type}get hasEvents(){return this.be.hasEvents}get hasCheckout(){return this.be.hasCheckout}set hasCheckout(t){this.be.hasCheckout=t}set waitForCheckout(t){this.be.waitForCheckout=t}destroy(){this.ge.destroy(),this.ve.destroy()}clear(){return this.be.clear()}getEarliestTimestamp(){return this.be.getEarliestTimestamp()}addEvent(t){return this.be.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this.be.finish()}ensureWorkerIsLoaded(){return this.Se}async we(){try{await this.ve.ensureReady()}catch(t){return}await this.ke()}async ke(){const{events:t,hasCheckout:e,waitForCheckout:n}=this.ge,r=[];for(const e of t)r.push(this.ve.addEvent(e));this.ve.hasCheckout=e,this.ve.waitForCheckout=n,this.be=this.ve;try{await Promise.all(r),this.ge.clear()}catch(t){}}}function gh({useCompression:t,workerUrl:e}){if(t&&window.Worker){const t=function(t){try{const e=t||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const t=new Blob(['
vendor: 10,329 bytes, line 1
1var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});
1']);return URL.createObjectURL(t)}();return""}();if(!e)return;const n=new Worker(e);return new yh(n)}catch(t){}}(e);if(t)return t}return new dh}function vh(){try{return"sessionStorage"in vu&&!!vu.sessionStorage}catch{return!1}}function bh(t){!function(){if(!vh())return;try{vu.sessionStorage.removeItem(bu)}catch{}}(),t.session=void 0}function Sh(t){return void 0!==t&&Math.random()<t}function wh(t){if(vh())try{vu.sessionStorage.setItem(bu,JSON.stringify(t))}catch{}}function kh(t){const e=Date.now();return{id:t.id||yt(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled,previousSessionId:t.previousSessionId,dirty:t.dirty||!1}}function _h({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){const s=function(t,e){return Sh(t)?"session":!!e&&"buffer"}(t,e),i=kh({sampled:s,previousSessionId:r});return n&&wh(i),i}function Th(t,e,n=+new Date){return null===t||void 0===e||e<0||0!==e&&t+e<=n}function Ih(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!!function(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return Th(t.started,e,r)||Th(t.lastActivity,n,r)}(t,{sessionIdleExpire:e,maxReplayDuration:n})&&("buffer"!==t.sampled||0!==t.segmentId)}function xh({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},r){const s=r.stickySession&&function(){if(!vh())return null;try{const t=vu.sessionStorage.getItem(bu);return t?kh(JSON.parse(t)):null}catch{return null}}();return s?Ih(s,{sessionIdleExpire:t,maxReplayDuration:e})?_h(r,{previousSessionId:s.id}):s:_h(r,{previousSessionId:n})}function Eh(t,e,n){return!!Rh(t,e)&&(Ch(t,e,n),!0)}async function Ch(t,e,n){const{eventBuffer:r}=t;if(!r||r.waitForCheckout&&!n)return null;const s="buffer"===t.recordingMode;try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=function(t,e){try{if("function"==typeof e&&function(t){return t.type===qf.Custom}(t))return e(t)}catch(t){return null}return t}(e,t.getOptions().beforeAddRecordingEvent);if(!i)return;return await r.addEvent(i)}catch(e){const n=e&&e instanceof hh,i=n?"eventBufferOverflow":"eventBufferError",o=Vt();if(o){const t=n?"buffer_overflow":"internal_sdk_error";o.recordDroppedEvent(t,"replay")}if(n&&s)return r.clear(),r.waitForCheckout=!0,null;t.handleException(e),await t.stop({reason:i})}}function Rh(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=Dl(e.timestamp);return!(n+t.timeouts.sessionIdlePause<Date.now())&&!(n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration)}function Oh(t,e){const n=t.getContext();n.traceIds.size<100&&n.traceIds.add(e)}function Ah(t){return!t.type}function Mh(t){return"transaction"===t.type}function $h(t){return"feedback"===t.type}function Lh(t){return(e,n)=>{if(!t.isEnabled()||!Ah(e)&&!Mh(e))return;const r=n.statusCode;!r||r<200||r>=300||(Mh(e)?function(t,e){const n=e.contexts?.trace?.trace_id;n&&Oh(t,n)}(t,e):function(t,e){const n=t.getContext();e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id);if("buffer"!==t.recordingMode||!e.tags?.replayId)return;const{beforeErrorSampling:r}=t.getOptions();if("function"==typeof r&&!r(e))return;Ka(async()=>{try{await t.sendBufferedReplayOrFlush()}catch(e){t.handleException(e)}})}(t,e))}}function Dh(t){return e=>{t.isEnabled()&&Ah(e)&&function(t,e){const n=e.exception?.values?.[0]?.value;if("string"!=typeof n)return;if(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)){jl(t,Gl({category:"replay.hydrate-error",data:{url:Ii()}}))}}(t,e)}}function Ph(t){const e=Vt();e&&e.on("beforeAddBreadcrumb",e=>function(t,e){if(!t.isEnabled()||!jh(e))return;const n=function(t){if(!jh(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(t){const e=t.data?.arguments;if(!Array.isArray(e)||0===e.length)return Gl(t);let n=!1;const r=e.map(t=>{if(!t)return t;if("string"==typeof t)return t.length>ku?(n=!0,`${t.slice(0,ku)}â¦`):t;if("object"==typeof t)try{const e=ct(t,7);return JSON.stringify(e).length>ku?(n=!0,`${JSON.stringify(e,null,2).slice(0,ku)}â¦`):e}catch{}return t});
1return Gl({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t);return Gl(t)}(e);n&&jl(t,n)}(t,e))}function jh(t){return!!t.category}function Fh(){const t=Kt().getPropagationContext().dsc;t&&delete t.replay_id;const e=dn();if(e){delete On(e).replay_id}}function Nh(t){const e=Kt().getPropagationContext().dsc;e&&(e.replay_id=t);const n=dn();if(n){On(n).replay_id=t}}function Bh(t){return Object.assign((e,n)=>{if(t.session&&Ih(t.session,{maxReplayDuration:t.getOptions().maxReplayDuration,sessionIdleExpire:t.timeouts.sessionIdleExpire})&&Fh(),!t.isEnabled()||t.isPaused())return e;if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!Ah(e)&&!Mh(e)&&!$h(e))return e;if(!t.checkAndHandleExpiredSession())return Fh(),e;if($h(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),function(t,e){t.triggerUserActivity(),t.addUpdate(()=>!e.timestamp||(t.throttledAddEvent({type:qf.Custom,timestamp:1e3*e.timestamp,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1))}(t,e),e;if(function(t,e){return!(t.type||!t.exception?.values?.length||!e.originalException?.__rrweb__)}(e,n)&&!t.getOptions()._experiments.captureExceptions)return null;const r=function(t,e){return"buffer"===t.recordingMode&&e.message!==Su&&!(!e.exception||e.type)&&Sh(t.getOptions().errorSampleRate)}(t,e);if((r||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),r&&"buffer"===t.recordingMode&&"buffer"===t.session?.sampled){const e=t.session;e.dirty=!0,t.getOptions().stickySession&&wh(e)}return e},{id:"Replay"})}function Uh(t,e){return e.map(({type:e,start:n,end:r,name:s,data:i})=>{const o=t.throttledAddEvent({type:qf.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:s,startTimestamp:n,endTimestamp:r,data:i}}});return"string"==typeof o?Promise.resolve(null):o})}function qh(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(Uh(t,[n]),!1)))}}function zh(t,e){t.isEnabled()&&(null!==e&&($s(e.name,Vt())||t.addUpdate(()=>(Uh(t,[e]),!0))))}function Hh(t){if(!t)return;const e=new TextEncoder;try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Qa(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function Wh(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Jh(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function Kh(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:s,data:{method:i,statusCode:o,request:a,response:c}}}function Gh(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Yh(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:s,warnings:i}=function(t){if(!t||"string"!=typeof t)return{body:t};const e=t.length>wu,n=function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t);if(e){const e=t.slice(0,wu);return n?{body:e,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${e}â¦`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch{}return{body:t}}(n);return r.body=s,i?.length&&(r._meta={warnings:i}),r}function Xh(t,e){return Object.entries(t).reduce((n,[r,s])=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=s),n},{})}function Vh(t,e){const n=function(t,e=vu.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(vu.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;if(!t.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(t);return mt(n,e)}async function Qh(t,e,n){try{const r=await async function(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=e,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:f}=t.data,l=Vh(o,n.networkDetailAllowUrls)&&!Vh(o,n.networkDetailDenyUrls),h=l?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const s=n?function(t,e){if(1===t.length&&"string"!=typeof t[0])return td(t[0],e);if(2===t.length)return td(t[1],e);return{}}(n,e):{};if(!t)return Yh(s,r,void 0);const i=tc(n),[o,a]=Za(i,lh),c=Yh(s,r,o);if(a)return Jh(c,a);return c}(n,e.input,u):Gh(u),d=await async function(t,{networkCaptureBodies:e,networkResponseHeaders:n}
1,r,s){if(!t&&void 0!==s)return Gh(s);const i=r?Zh(r.headers,n):{};if(!r||!e&&void 0!==s)return Yh(i,s,void 0);const[o,a]=await async function(t){const e=function(t){try{return t.clone()}catch(t){}}(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{const t=await function(t){return new Promise((e,n)=>{const r=Ka(()=>n(new Error("Timeout while trying to read response body")),500);(async function(t){return await t.text()})(t).then(t=>e(t),t=>n(t)).finally(()=>clearTimeout(r))})}(e);return[t]}catch(t){return t instanceof Error&&t.message.indexOf("Timeout")>-1?[void 0,"BODY_PARSE_TIMEOUT"]:[void 0,"BODY_PARSE_ERROR"]}}(r),c=function(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:s}){try{const i=t?.length&&void 0===n?Hh(t):n;return r?Yh(s,i,e?t:void 0):Gh(i)}catch(t){return Yh(s,n,void 0)}}(o,{networkCaptureBodies:e,responseBodySize:s,captureDetails:t,headers:i});if(a)return Jh(c,a);return c}(l,n,e.response,f);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:h,response:d}}(t,e,n),s=Kh("resource.fetch",r);zh(n.replay,s)}catch(t){}}function Zh(t,e){const n={};return e.forEach(e=>{t.get(e)&&(n[e]=t.get(e))}),n}function td(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?Zh(n,e):Array.isArray(n)?{}:Xh(n,e):{}}async function ed(t,e,n){try{const r=function(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=e,{url:c,method:u,status_code:f=0,request_body_size:l,response_body_size:h}=t.data;if(!c)return null;if(!a||!Vh(c,n.networkDetailAllowUrls)||Vh(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:f,request:Gh(l),response:Gh(h)}}const d=a[Ga],p=d?Xh(d.request_headers,n.networkRequestHeaders):{},m=Xh(ec(a),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?Za(o,lh):[void 0],[v,b]=n.networkCaptureBodies?function(t){try{return[t.responseText]}catch(t){}try{return function(t,e){try{if("string"==typeof t)return[t];if(t instanceof Document)return[t.body.outerHTML];if("json"===e&&t&&"object"==typeof t)return[JSON.stringify(t)];if(!t)return[void 0]}catch(t){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}(t.response,t.responseType)}catch(t){}return[void 0]}(a):[void 0],S=Yh(p,l,y),w=Yh(m,h,v);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:f,request:g?Jh(S,g):S,response:b?Jh(w,b):w}}(t,e,n),s=Kh("resource.xhr",r);zh(n.replay,s)}catch(t){}}function nd(t,e){const{xhr:n,input:r}=e;if(!n)return;const s=Hh(r),i=n.getResponseHeader("content-length")?Wh(n.getResponseHeader("content-length")):function(t,e){try{return Hh("json"===e&&t&&"object"==typeof t?JSON.stringify(t):t)}catch{return}}(n.response,n.responseType);void 0!==s&&(t.data.request_body_size=s),void 0!==i&&(t.data.response_body_size=i)}function rd(t){const e=Vt();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=t.getOptions(),a={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};e&&e.on("beforeAddBreadcrumb",(t,e)=>function(t,e,n){if(!e.data)return;try{(function(t){return"xhr"===t.category})(e)&&function(t){return t?.xhr}(n)&&(nd(e,n),ed(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return void 0!==t?.input}(n)&&(!function(t,e){const{input:n,response:r}=e,s=Hh(n?tc(n):void 0),i=r?Wh(r.headers.get("content-length")):void 0;void 0!==s&&(t.data.request_body_size=s),void 0!==i&&(t.data.response_body_size=i)}(e,n),Qh(e,n,t))}catch(t){}}(a,t,e))}catch{}}function sd(t){const e=Vt();Ba(Ql(t)),za(qh(t)),Ph(t),rd(t);$r(Bh(t)),e&&(e.on("beforeSendEvent",Dh(t)),e.on("afterSendEvent",Lh(t)),e.on("createDsc",e=>{const n=t.getSessionId();if(n&&t.isEnabled()&&"session"===t.recordingMode){t.checkAndHandleExpiredSession()&&(e.replay_id=n)}}),e.on("afterSegmentSpanEnd",function(t){return e=>{if(!t.isEnabled()||!rn(e))return;const n=e.spanContext().traceId;n&&Oh(t,n)}}(t)),e.on("spanStart",e=>{t.lastActiveSpan=e}),e.on("spanEnd",e=>{t.lastActiveSpan=e}),e.on("beforeSendFeedback",async(e,n)=>{const r=t.getSessionId();n?.includeReplay&&t.isEnabled()&&r&&e.contexts?.feedback&&("api"===e.contexts.feedback.source&&await t.sendBufferedReplayOrFlush(),e.contexts.feedback.replay_id=r)}),e.on("openFeedbackWidget",async()=>{await t.sendBufferedReplayOrFlush()}))}function id(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function od(t,e,n){return function(t,e,n){let r,s,i;const o=n?.maxWait?Math.max(n.maxWait,e):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=t(),r}function u(){void 0!==s&&clearTimeout(s),void 0!==i&&clearTimeout(i),s=i=void 0}function f(){return s&&clearTimeout(s),s=a(c,e),o&&void 0===i&&(i=a(c,o)),r}return f.cancel=u,f.flush=function(){return void 0!==s||void 0!==i?c():r},f}(t,e,{...n,setTimeoutImpl:Ka})}const ad=e.navigator;function cd(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return;const s=r||!e;e=!0,function(t){const e=t.data;if(!(t.type===qf.IncrementalSnapshot&&e&&"object"==typeof e&&"source"in e&&e.source===zf.Mutation&&"attributes"in e&&Array.isArray(e.attributes)))return;for(const t of e.attributes){const e=Ml.mirror.getNode(t.id),n=e&&Ml.mirror.getMeta(e);if(n?.type===Yl.Element)for(const[e,r]of Object.entries(t.attributes))null===r?delete n.attributes[e]:n.attributes[e]=r}}(n),t.clickDetector&&Kl(t.clickDetector,n),t.addUpdate(()=>{if("buffer"===t.recordingMode&&s&&t.setInitialState(),!Eh(t,n,s))return!0;
1if(!s)return!1;const e=t.session;if(function(t,e){if(!e||0!==t.session?.segmentId)return;Eh(t,function(t){const e=t.getOptions();return{type:qf.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,s),"buffer"===t.recordingMode&&e&&t.eventBuffer&&!e.dirty){const n=t.eventBuffer.getEarliestTimestamp();n&&(e.started=n,t.getOptions().stickySession&&wh(e))}return e?.previousSessionId||"session"===t.recordingMode&&t.flush(),!0})}}async function ud({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:f}=r,l=Vt(),h=Kt(),d=l?.getTransport(),p=l?.getDsn();if(!(l&&d&&p&&i.sampled))return Promise.resolve({});const m={type:"replay_event",replay_start_timestamp:f/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:e,segment_id:n,replay_type:i.sampled},y=await async function({client:t,scope:e,replayId:n,event:r}){const s={event_id:n,integrations:"object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations)};t.emit("preprocessEvent",r,s);const i=await xr(t.getOptions(),r,s,e,t,Gt());if(!i)return null;t.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const o=t.getSdkMetadata(),{name:a,version:c,settings:u}=o?.sdk||{};return i.sdk={...i.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},i}({scope:h,client:l,replayId:e,event:m});if(!y)return l.recordDroppedEvent("event_processor","replay"),Promise.resolve({});delete y.sdkProcessingMetadata;const g=function(t,e,n,r){return Mn(qn(t,Un(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(y,o,p,l.getOptions().tunnel);let v;try{v=await d.send(g)}catch(t){const e=new Error(Su);try{e.cause=t}catch{}throw e}const b=us({},v);if(cs(b,"replay"))throw new ld(b);if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new fd(v.statusCode);return v}class fd extends Error{constructor(t){super(`Transport returned status code ${t}`)}}
1class ld extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class hd extends Error{constructor(){super("Session is too long, not sending replay")}}async function dd(t,e={count:0,interval:5e3}){const{recordingData:n,onError:r}=t;if(n.length)try{return await ud(t),!0}catch(n){if(n instanceof fd||n instanceof ld)throw n;if(Or("Replays",{_e:e.count}),r&&r(n),e.count>=3){const t=new Error(`${Su} - max retries exceeded`);try{t.cause=n}catch{}throw t}return e.interval*=++e.count,new Promise((n,r)=>{Ka(async()=>{try{await dd(t,e),n(!0)}catch(t){r(t)}},e.interval)})}}const pd="__THROTTLED";function md(t,e,n){const r=new Map;let s=!1;return(...i)=>{const o=Math.floor(Date.now()/1e3);if((t=>{const e=t-n;r.forEach((t,n)=>{n<e&&r.delete(n)})})(o),[...r.values()].reduce((t,e)=>t+e,0)>=e){const t=s;return s=!0,t?"__SKIPPED":pd}s=!1;const a=r.get(o)||0;return r.set(o,a+1),t(...i)}}class yd{constructor({options:t,recordingOptions:e}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this.Te=Date.now(),this.kt=!1,this.Ie=!1,this.xe=!1,this.Ee=!1,this.Ce={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this.Re=e,this.ut=t,this.Oe=od(()=>this.Ae(),this.ut.flushMinDelay,{maxWait:this.ut.flushMaxDelay}),this.Me=md((t,e)=>function(t,e,n){return Rh(t,e)?Ch(t,e,n):Promise.resolve(null)}(this,t,e),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),s=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;s&&(this.clickDetector=new Hl(this,s)),this.$e=()=>{"visible"===vu.document.visibilityState?this.Le():this.De()},this.Pe=()=>{const t=Gl({category:"ui.blur"});this.De(t)},this.je=()=>{const t=Gl({category:"ui.focus"});this.Le(t)},this.Fe=t=>{th(this,t)}}getContext(){return this.Ce}isEnabled(){return this.kt}isPaused(){return this.Ie}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this.ut}handleException(t){this.ut.onError&&this.ut.onError(t)}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this.ut,r=e<=0&&n<=0;this.xe=r,r||(this.Ne(t),this.session&&!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",this.Be()))}start(){if(this.kt&&"session"===this.recordingMode)return;if(this.kt&&"buffer"===this.recordingMode)return;this.Ue();const t=xh({maxReplayDuration:this.ut.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this.ut.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this.Be()}startBuffering(){if(this.kt)return;const t=xh({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.ut.maxReplayDuration},{stickySession:this.ut.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this.Be()}startRecording(){try{const t=this._canvas;this.qe=Ml({...this.Re,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this.ut._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this.ut._experiments.continuousCheckout)},emit:cd(this),.../iPhone|iPad|iPod/i.test(ad?.userAgent??"")||/Macintosh/i.test(ad?.userAgent??"")&&ad?.maxTouchPoints&&ad?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this.ze.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this.qe&&(this.qe(),this.qe=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:e}={}){if(!this.kt)return;this.kt=!1,this.recordingMode="buffer";const n=e??"manual";Vt()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{Fh(),this.He(),this.stopRecording(),this.Oe.cancel(),t&&await this.Ae({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,bh(this)}catch(t){this.handleException(t)}}pause(){this.Ie||(this.Ie=!0,this.stopRecording())}resume(){this.Ie&&this.We()&&(this.Ie=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();await this.flushImmediate();const n=this.stopRecording();t&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this.Ue(e),this.Je(e),this.Ke(),Nh(this.session.id)),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&this.kt&&!0!==e&&this.Oe()}triggerUserActivity(){if(this.Ue(),this.qe)this.checkAndHandleExpiredSession(),this.Je();else{if(!this.We())return;this.resume()}}updateUserActivity(){this.Ue(),this.Je()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this.Oe()}flushImmediate(){return this.Oe(),this.Oe.flush()}cancelFlush(){this.Oe.cancel()}getSessionId(t){if(!t||!1!==this.session?.sampled)return this.session?.id}
1checkAndHandleExpiredSession(){if(!this.Te||!Th(this.Te,this.timeouts.sessionIdlePause)||"session"!==this.session?.sampled)return!!this.We();this.pause()}setInitialState(){const t=`${vu.location.pathname}${vu.location.hash}${vu.location.search}`,e=`${vu.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this.Ge(),this.Ce.initialUrl=e,this.Ce.initialTimestamp=Date.now(),this.Ce.urls.push(e)}throttledAddEvent(t,e){const n=this.Me(t,e);if(n===pd){const t=Gl({category:"replay.throttled"});this.addUpdate(()=>!Eh(this,{type:5,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}}))}return n}getCurrentRoute(){const t=this.lastActiveSpan||dn(),e=t&&ln(t),n=(e&&Ve(e).data||{})[Zt];if(e&&n&&["route","custom"].includes(n))return Ve(e).description}Be(){this.setInitialState(),this.Je(),this.eventBuffer=gh({useCompression:this.ut.useCompression,workerUrl:this.ut.workerUrl}),this.He(),this.Ye(),this.kt=!0,this.Ie=!1,this.session&&Vt()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),"session"===this.recordingMode&&this.session&&Nh(this.session.id)}Ne(t){const e=this.ut.errorSampleRate>0,n=xh({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.ut.maxReplayDuration,previousSessionId:t},{stickySession:this.ut.stickySession,sessionSampleRate:this.ut.sessionSampleRate,allowBuffering:e});this.session=n}We(){if(!this.session)return!1;const t=this.session;return!Ih(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this.ut.maxReplayDuration})||(this.Xe(t),!1)}async Xe(t){this.kt&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}Ye(){try{vu.document.addEventListener("visibilitychange",this.$e),vu.addEventListener("blur",this.Pe),vu.addEventListener("focus",this.je),vu.addEventListener("keydown",this.Fe),this.clickDetector&&this.clickDetector.addListeners(),this.Ee||(sd(this),this.Ee=!0)}catch(t){this.handleException(t)}this.Ve=function(t){function e(e){t.performanceEntries.includes(e)||t.performanceEntries.push(e)}function n({entries:t}){t.forEach(e)}const r=[];return["navigation","paint","resource"].forEach(t=>{r.push(Ho(t,n))}),r.push(qo(nh(ih,t)),Uo(nh(ah,t)),zo(nh(ch,t))),()=>{r.forEach(t=>t())}}(this)}He(){try{vu.document.removeEventListener("visibilitychange",this.$e),vu.removeEventListener("blur",this.Pe),vu.removeEventListener("focus",this.je),vu.removeEventListener("keydown",this.Fe),this.clickDetector&&this.clickDetector.removeListeners(),this.Ve&&this.Ve()}catch(t){this.handleException(t)}}De(t){if(!this.session)return;Ih(this.session,{maxReplayDuration:this.ut.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})?Fh():(t&&this.Qe(t),this.conditionalFlush())}Le(t){if(!this.session)return;this.checkAndHandleExpiredSession()&&t&&this.Qe(t)}Ue(t=Date.now()){this.Te=t}Je(t=Date.now()){this.session&&(this.session.lastActivity=t,this.Ke())}Qe(t){this.addUpdate(()=>{this.throttledAddEvent({type:qf.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}Ze(){let t=(e=this.performanceEntries,e.map(rh).filter(Boolean)).concat(this.replayPerformanceEntries);var e;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this.xe){const e=this.Ce.initialTimestamp/1e3;t=t.filter(t=>t.start>=e)}return Promise.all(Uh(this,t))}Ge(){this.Ce.errorIds.clear(),this.Ce.traceIds.clear(),this.Ce.urls=[]}tn(){const{session:t,eventBuffer:e}=this;if(!t||!e||this.xe)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&n<this.Ce.initialTimestamp&&(this.Ce.initialTimestamp=n)}en(){const t={initialTimestamp:this.Ce.initialTimestamp,initialUrl:this.Ce.initialUrl,errorIds:Array.from(this.Ce.errorIds),traceIds:Array.from(this.Ce.traceIds),urls:this.Ce.urls};return this.Ge(),t}async nn(){const t=this.getSessionId();if(this.session&&this.eventBuffer&&t&&(await this.Ze(),this.eventBuffer?.hasEvents&&(await async function(t){try{return Promise.all(Uh(t,[id(vu.performance.memory)]))}catch{return[]}}(this),this.eventBuffer&&t===this.getSessionId())))try{this.tn();const e=Date.now();if(e-this.Ce.initialTimestamp>this.ut.maxReplayDuration+3e4)throw new hd;const n=this.en(),r=this.session.segmentId++;this.Ke();const s=await this.eventBuffer.finish();
1await dd({replayId:t,recordingData:s,segmentId:r,eventContext:n,session:this.session,timestamp:e,onError:t=>this.handleException(t)})}catch(t){this.handleException(t),this.stop({reason:"sendError"});const e=Vt();if(e){let n;n=t instanceof ld?"ratelimit_backoff":t instanceof hd?"invalid":"send_error",e.recordDroppedEvent(n,"replay")}}}async Ae({force:t=!1}={}){if(!this.kt&&!t)return;if(!this.checkAndHandleExpiredSession())return;if(!this.session)return;const e=this.session.started,n=Date.now()-e;this.Oe.cancel();const r=n<this.ut.minReplayDuration,s=n>this.ut.maxReplayDuration+5e3;if(r||s)return void(r&&this.Oe());const i=!!this.rn;this.rn||(this.rn=this.nn());try{await this.rn}catch(t){this.handleException(t)}finally{this.rn=void 0,i&&this.Oe()}}Ke(){this.session&&this.ut.stickySession&&wh(this.session)}ze(t){const{ignoreMutations:e}=this.ut._experiments;if(e?.length&&t.some(t=>{const n=function(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch{return null}}(t.target),r=e.join(",");return n?.matches(r)}))return!1;const n=t.length,r=this.ut.mutationLimit,s=r&&n>r;if(n>this.ut.mutationBreadcrumbLimit||s){const t=Gl({category:"replay.mutations",data:{count:n,limit:s}});this.Qe(t)}return!s||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function gd(t,e){return[...t,...e].join(",")}const vd='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',bd=["content-length","content-type","accept"],Sd=Symbol.for("sentry__originalRequestBody");let wd=!1,kd=!1;class _d{constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:s=!0,useCompression:i=!0,workerUrl:o,_experiments:a={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:l=750,mutationLimit:h=1e4,slowClickTimeout:d=7e3,slowClickIgnoreSelectors:p=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:y=[],networkCaptureBodies:g=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:S=[],maskAttributes:w=["title","placeholder","aria-label"],unmask:k=[],block:_=[],unblock:T=[],ignore:I=[],maskFn:x,beforeAddRecordingEvent:E,beforeErrorSampling:C,onError:R,attachRawBodyFromRequest:O=!1}={}){this.name="Replay";const A=function({mask:t,unmask:e,block:n,unblock:r,ignore:s}){return{maskTextSelector:gd(t,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:gd(e,[]),blockSelector:gd(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:gd(r,[]),ignoreSelector:gd(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:S,unmask:k,block:_,unblock:T,ignore:I});if(this.Re={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(t,e,n)=>function({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){if(s.unmaskTextSelector&&t.matches(s.unmaskTextSelector))return i;const o=n.includes(e),a=r&&"value"===e&&"INPUT"===t.tagName&&["submit","button"].includes(t.getAttribute("type")||"");return o||a?i.replace(/[\S]/g,"*"):i}({maskAttributes:w,maskAllText:c,privacyOptions:A,key:t,value:e,el:n}),...A,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:t=>{try{t.__rrweb__=!0}catch{}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)},this.sn={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,5e4),maxReplayDuration:Math.min(r,Tu),stickySession:s,useCompression:i,workerUrl:o,blockAllMedia:f,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:l,mutationLimit:h,slowClickTimeout:d,slowClickIgnoreSelectors:p,networkDetailAllowUrls:m,networkDetailDenyUrls:y,networkCaptureBodies:g,networkRequestHeaders:Td(v),networkResponseHeaders:Td(b),beforeAddRecordingEvent:E,beforeErrorSampling:C,onError:R,attachRawBodyFromRequest:O,_experiments:a},this.sn.blockAllMedia&&(this.Re.blockSelector=this.Re.blockSelector?`${this.Re.blockSelector},${vd}`:vd,this.Re.ignoreCSSAttributes=new Set(["background-image"])),this.an&&Jr())throw new Error("Multiple Sentry Session Replay instances are not supported");this.an=!0}get an(){return wd}set an(t){wd=t}afterAllSetup(t){Jr()&&!this._replay&&(this.sn.attachRawBodyFromRequest&&function(){if("undefined"==typeof Request||kd)return;const t=Request;try{const n=function(e,n){const r=new t(e,n);return null!=n?.body&&(r[Sd]=n.body),r};n.prototype=t.prototype,e.Request=n,kd=!0}catch{}}(),this.cn(t),this.un(t))}start(){this._replay&&this._replay.start()}
1startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode,reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(t){const e=this.getReplayId(!0);e&&(yr(t,{"sentry.replay_id":e}),"buffer"===this.getRecordingMode()&&yr(t,{"sentry._internal.replay_is_buffering":!0}))}un(t){this._replay&&(this.fn(t),this._replay.initializeSampling())}cn(t){const e=function(t,e){const n=e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...t},s=Fe(n.replaysSessionSampleRate),i=Fe(n.replaysOnErrorSampleRate);null==s&&null==i&&c(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")});null!=s&&(r.sessionSampleRate=s);null!=i&&(r.errorSampleRate=i);return r}(this.sn,t);this._replay=new yd({options:e,recordingOptions:this.Re})}fn(t){try{const e=t.getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch{}}}function Td(t){return[...bd,...t.map(t=>t.toLowerCase())]}return yn(),t.BrowserClient=Qi,t.SDK_VERSION=n,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=ne,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=re,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=te,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=Zt,t.Scope=Mt,t.WINDOW=Li,t.addBreadcrumb=Fs,t.addEventProcessor=$r,t.addIntegration=function(t){const e=Vt();e&&e.addIntegration(t)},t.breadcrumbsIntegration=_c,t.browserApiErrorsIntegration=Ic,t.browserSessionIntegration=Rc,t.browserTracingIntegration=(t={})=>{"enableElementTiming"in t&&c(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const n={name:void 0,source:void 0},r=Li.document,{enableInp:s,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:a,enableStandaloneClsSpans:u,enableStandaloneLcpSpans:f},beforeStartSpan:l,idleTimeout:h,finalTimeout:d,childSpanTimeout:p,markBackgroundSpan:m,traceFetch:y,traceXHR:g,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:b,enableHTTPTimings:S,ignoreResourceSpans:w,ignorePerformanceApiSpans:k,instrumentPageLoad:_,instrumentNavigation:T,detectRedirects:I,linkPreviousTrace:x,consistentTraceSampling:E,enableReportPageLoaded:C,onRequestSpanStart:R,onRequestSpanEnd:O}={...cu,...t},A=au();let M,$;function L(t,e,s=!0){const i="pageload"===e.op,o=e.name,a=l?l(e):e,c=a.attributes||{};if(o!==a.name&&(c[Zt]="custom",a.attributes=c),!s){const t=kt();return void Vn({...a,startTime:t}).end(t)}n.name=a.name,n.source=c[Zt];const u=fr(a,{idleTimeout:h,finalTimeout:d,childSpanTimeout:p,disableAutoFinish:i,beforeSpanEnd:e=>{wa(e,{ignoreResourceSpans:w,ignorePerformanceApiSpans:k,spanStreamingEnabled:Wn(t)}),mu(t,void 0);const n=Kt(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:u.spanContext().traceId,sampled:rn(u),dsc:On(e)}),i&&($=void 0)},trimIdleSpanEndTimestamp:!C});function f(){r&&["interactive","complete"].includes(r.readyState)&&(t.emit("idleSpanEnableAutoFinish",u),r.removeEventListener("readystatechange",f))}i&&C&&($=u),mu(t,u),i&&!C&&r&&(r.addEventListener("readystatechange",f),f())}return{name:"BrowserTracing",setup(t){if(!A){if(yn(),o&&e.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?new PerformanceObserver(t=>{const e=dn();if(e)for(const n of t.getEntries()){if(!n.scripts[0])continue;const t=aa(xt()+n.startTime),{start_timestamp:r,op:s}=Ve(e);if("navigation"===s&&r&&t<r)continue;const i=aa(n.duration),o={[re]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:c,invokerType:u,sourceURL:f,sourceFunctionName:l,sourceCharPosition:h}=a;o["browser.script.invoker"]=c,o["browser.script.invoker_type"]=u,f&&(o["code.filepath"]=f),l&&(o["code.function"]=l),-1!==h&&(o["browser.script.source_char_position"]=h),sa(e,t,t+i,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:o})}}).observe({type:"long-animation-frame",buffered:!0}):i&&Ho("longtask",({entries:t})=>{const e=dn();if(!e)return;const{op:n,start_timestamp:r}=Ve(e);for(const s of t){const t=aa(xt()+s.startTime),i=aa(s.duration);"navigation"===n&&r&&t<r||sa(e,t,t+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[re]:"auto.ui.browser.metrics"}})}}),a&&Ho("event",({entries:t})=>{const e=dn();if(e)for(const n of t)if("click"===n.name){const t=aa(xt()+n.startTime),r=aa(n.duration),s={name:ea(n.target),op:`ui.interaction.${n.name}`,startTime:t,attributes:{[re]:"auto.ui.browser.metrics"}},i=xi(n.target);i&&(s.attributes["ui.component_name"]=i),sa(e,t,t+r,s)}}),I&&r){const t=()=>{M=Tt()};addEventListener("click",t,{capture:!0}),addEventListener("keydown",t,{capture:!0,passive:!0})}t.on("startNavigationSpan",(e,r)=>{if(Vt()!==t)return;if(r?.isRedirect)return void L(t,{op:"navigation.redirect",...e},!1);M=void 0,n(),Gt().setPropagationContext({traceId:Ot(),sampleRand:Math.random(),propagationSpanId:gn()?void 0:At()});const s=Kt();s.setPropagationContext({traceId:Ot(),sampleRand:Math.random(),propagationSpanId:gn()?void 0:At()}),s.setSDKProcessingMetadata({normalizedRequest:void 0}),L(t,{op:"navigation",...e,parentSpan:null,forceTransaction:!0})}),t.on("startPageLoadSpan",(e,r={})=>
1{if(Vt()!==t)return;n();const s=Be(r.sentryTrace||lu("sentry-trace")||hu("sentry-trace"),r.baggage||lu("baggage")||hu("baggage")),i=Kt();i.setPropagationContext(s),gn()||(i.getPropagationContext().propagationSpanId=At()),i.setSDKProcessingMetadata({normalizedRequest:Fi()}),L(t,{op:"pageload",...e})}),t.on("endPageloadSpan",()=>{C&&$&&($.setAttribute(se,"reportPageLoaded"),$.end())})}function n(){const e=pu(t);e&&!Ve(e).timestamp&&(e.setAttribute(se,"cancelled"),e.end())}},afterAllSetup(t){if(A)return;t.addIntegration&&!t.getIntegrationByName?.(Gc)&&t.addIntegration(Yc({ignore:s?[]:["inp"],_experiments:{enableStandaloneClsSpans:u,enableStandaloneLcpSpans:f}}));let e=Ii();if("off"!==x&&Qc(t,{linkPreviousTrace:x,consistentTraceSampling:E}),Li.location){if(_){const e=xt();uu(t,{name:Li.location.pathname,startTime:e?e/1e3:void 0,attributes:{[Zt]:"url",[re]:"auto.pageload.browser"}})}T&&za(({to:n,from:r})=>{if(void 0===r&&-1!==e?.indexOf(n))return void(e=void 0);e=void 0;const s=Rs(n),i=pu(t),o=i&&I&&function(t,e){const n=Ve(t),r=kt(),s=n.start_timestamp;if(r-s>yu)return!1;if(e&&r-e<=yu)return!1;return!0}(i,M);fu(t,{name:s?.pathname||Li.location.pathname,attributes:{[Zt]:"url",[re]:"auto.navigation.browser"}},{url:n,isRedirect:o})})}m&&Li.document&&Li.document.addEventListener("visibilitychange",()=>{const t=dn();if(!t)return;const e=ln(t);if(Li.document.hidden&&e){const t="cancelled",{status:n}=Ve(e);n||e.setStatus({code:2,message:t}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}),a&&function(t,e,n,r,s){const i=Li.document;let o;const a=()=>{const i="ui.action.click",a=pu(t);if(a){const t=Ve(a).op;if(["navigation","pageload"].includes(t))return}o&&(o.setAttribute(se,"interactionInterrupted"),o.end(),o=void 0),s.name&&(o=fr({name:s.name,op:i,attributes:{[Zt]:s.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r}))};i&&addEventListener("click",a,{capture:!0})}(t,h,d,p,n),ru(t,{traceFetch:y,traceXHR:g,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:S,onRequestSpanStart:R,onRequestSpanEnd:O}),v&&t.addIntegration(Kc())}}},t.captureEvent=Rr,t.captureException=captureException,t.captureFeedback=function(t,e={},n=Kt()){const{message:r,name:s,email:i,url:o,source:a,associatedEventId:c,tags:u}=t,f={contexts:{feedback:{contact_email:i,name:s,message:r,url:o,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||Vt();return l&&l.emit("beforeSendFeedback",f,e),n.captureEvent(f,e)},t.captureMessage=function(t,e){const n="string"==typeof e?e:void 0,r="string"!=typeof e?{captureContext:e}:void 0;return Kt().captureMessage(t,n,r)},t.captureSession=jr,t.chromeStackLineParser=uc,t.close=async function(t){const e=Vt();return e?e.close(t):Promise.resolve(!1)},t.consoleLoggingIntegration=$i,t.continueTrace=(t,e)=>{const n=qt(r());if(n.continueTrace)return n.continueTrace(t,e);const{sentryTrace:s,baggage:i}=t,o=Vt(),a=Re(i);return o&&!function(t,e){const n=Pe(t);return e&&n&&e!==n?(f.log(`Won't continue trace because org IDs don't match (incoming baggage: ${e}, SDK options: ${n})`),!1):!t.getOptions().strictTraceContinuation||!(e&&!n||!e&&n)||(f.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${e}, Sentry client: ${n})`),!1)}(o,a?.org_id)?Zn(e):Xt(t=>{const n=Be(s,i);return t.setPropagationContext(n),Q(t,void 0),e()})},t.createTransport=fs,t.createUserFeedbackEnvelope=function(t,{metadata:e,tunnel:n,dsn:r}){const s={event_id:t.event_id,sent_at:(new Date).toISOString(),...e?.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:Le(r)}},i=function(t){return[{type:"user_report"},t]}(t);return Mn(s,[i])},t.dedupeIntegration=ni,t.defaultStackLineParsers=bc,t.defaultStackParser=Sc,t.elementTimingIntegration=Oi,t.endSession=Dr,t.eventFiltersIntegration=zs,t.eventFromException=Ki,t.eventFromMessage=Gi,t.exceptionFromError=Ni,t.feedbackAsyncIntegration=Ri,t.feedbackIntegration=Ri,t.fetchStreamPerformanceIntegration=Kc,t.flush=async function(t){const e=Vt();return e?e.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=Us,t.geckoStackLineParser=hc,t.getActiveSpan=dn,t.getClient=Vt,t.getCurrentScope=Kt,t.getDefaultIntegrations=Bc,t.getGlobalScope=Yt,t.getIsolationScope=Gt,t.getReplay=function(){const t=Vt();return t?.getIntegrationByName("Replay")},t.getRootSpan=ln,t.getSpanDescendants=fn,t.getTraceData=Ps,t.globalHandlersIntegration=Mc,t.httpContextIntegration=Dc,t.inboundFiltersIntegration=Hs,t.init=function(t={}){const e=!t.skipBrowserExtensionCheck&&Nc();let n=null==t.defaultIntegrations?Bc():t.defaultIntegrations;const r={...t,enabled:!e&&t.enabled,stackParser:(s=t.stackParser||Sc,Array.isArray(s)?p(...s):s),integrations:Ur({integrations:t.integrations,defaultIntegrations:n}),transport:t.transport||nc};var s;return ot=Fc,function(t,e){!0===e.debug&&c(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}),Kt().update(e.initialScope);const n=new t(e);return Es(n),n.init(),n}(Qi,r)},t.isBotUserAgent=au,t.isEnabled=Mr,t.isInitialized=function(){return!!Vt()},t.lastEventId=Ar,t.lazyLoadIntegration=async function(t,e){const r=Uc.includes(t)?function(t){return qc[t]||t.replace("Integration","").toLowerCase()}(t):void 0,s=zc.Sentry=zc.Sentry||{};if(!r)throw new Error(`Cannot lazy load integration: ${t}`);const i=s[t];if("function"==typeof i&&!("_isShim"in i))return i;const o=function(t){const e=Vt(),r=e?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${n}/${t}.min.js`,r).toString()}(r),a=Li.document.createElement("script");
1a.src=o,a.crossOrigin="anonymous",a.referrerPolicy="strict-origin",e&&a.setAttribute("nonce",e);const c=new Promise((t,e)=>{a.addEventListener("load",()=>t()),a.addEventListener("error",e)}),u=Li.document.currentScript,f=Li.document.body||Li.document.head||u?.parentElement;if(!f)throw new Error(`Could not find parent element to insert lazy-loaded ${t} script`);f.appendChild(a);try{await c}catch{throw new Error(`Error when loading integration: ${t}`)}const l=s[t];if("function"!=typeof l)throw new Error(`Could not load integration: ${t}`);return l},t.linkedErrorsIntegration=Pc,t.logger=Mi,t.makeFetchTransport=nc,t.metrics=li,t.onLoad=function(t){t()},t.opera10StackLineParser=yc,t.opera11StackLineParser=vc,t.parameterize=function(t,...e){const n=new String(String.raw(t,...e));return n.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=e,n},t.replayIntegration=t=>new _d(t),t.reportPageLoaded=function(t=Vt()){t?.emit("endPageloadSpan")},t.setActiveSpanInBrowser=function(t){const e=dn();if(e===t)return;const n=Kt();t.end=new Proxy(t.end,{apply:(t,r,s)=>(Q(n,e),Reflect.apply(t,r,s))}),Q(n,t)},t.setAttribute=function(t,e){Gt().setAttribute(t,e)},t.setAttributes=function(t){Gt().setAttributes(t)},t.setContext=Or,t.setConversationId=function(t){Gt().setConversationId(t)},t.setCurrentClient=Es,t.setExtra=function(t,e){Gt().setExtra(t,e)},t.setExtras=function(t){Gt().setExtras(t)},t.setMeasurement=zn,t.setTag=function(t,e){Gt().setTag(t,e)},t.setTags=function(t){Gt().setTags(t)},t.setUser=function(t){Gt().setUser(t)},t.showReportDialog=function(t={}){const e=Li.document,n=e?.head||e?.body;if(!n)return;const r=Kt(),s=Vt(),i=s?.getDsn();if(!i)return;const o={...t,user:{...r.getUser(),...t.user},eventId:t.eventId||Ar()},a=Li.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=function(t,e){const n=je(t);if(!n)return"";const r=`${Fr(n)}embed/error-page/`;let s=`dsn=${Le(n)}`;for(const t in e)if("dsn"!==t&&"onClose"!==t)if("user"===t){const t=e.user;if(!t)continue;t.name&&(s+=`&name=${encodeURIComponent(t.name)}`),t.email&&(s+=`&email=${encodeURIComponent(t.email)}`)}else s+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${s}`}(i,o);const{onLoad:c,onClose:u}=o;if(c&&(a.onload=c),u){const t=e=>{if("__sentry_reportdialog_closed__"===e.data)try{u()}finally{Li.removeEventListener("message",t)}};Li.addEventListener("message",t)}n.appendChild(a)},t.spanStreamingIntegration=gu,t.spanToBaggageHeader=function(t){return Oe(On(t))},t.spanToJSON=Ve,t.spanToTraceHeader=Je,t.startBrowserTracingNavigationSpan=fu,t.startBrowserTracingPageLoadSpan=uu,t.startInactiveSpan=Vn,t.startNewTrace=Zn,t.startSession=Lr,t.startSpan=function(t,e){const n=rr();if(n.startSpan)return n.startSpan(t,e);const r=nr(t),{forceTransaction:s,parentSpan:i,scope:o}=t,a=o?.clone();return Xt(a,()=>or(i)(()=>{const n=Kt(),o=ir(n,i),a=Vt(),c=t.onlyIfParent&&!o?tr(n,a):er({parentSpan:o,spanArguments:r,forceTransaction:s,scope:n});return ar(c)&&o||Q(n,c),Yn(()=>e(c),()=>{const{status:t}=Ve(c);!c.isRecording()||t&&"ok"!==t||c.setStatus({code:2,message:"internal_error"})},()=>{c.end()})}))},t.startSpanManual=function(t,e){const n=rr();if(n.startSpanManual)return n.startSpanManual(t,e);const r=nr(t),{forceTransaction:s,parentSpan:i,scope:o}=t,a=o?.clone();return Xt(a,()=>or(i)(()=>{const n=Kt(),o=ir(n,i),a=t.onlyIfParent&&!o?tr(n,Vt()):er({parentSpan:o,spanArguments:r,forceTransaction:s,scope:n});return ar(a)&&o||Q(n,a),Yn(()=>e(a,()=>a.end()),()=>{const{status:t}=Ve(a);!a.isRecording()||t&&"ok"!==t||a.setStatus({code:2,message:"internal_error"})})}))},t.suppressTracing=function(t){const e=rr();return e.suppressTracing?e.suppressTracing(t):Xt(e=>{e.setSDKProcessingMetadata({[Xn]:!0});const n=t();return e.setSDKProcessingMetadata({[Xn]:void 0}),n})},t.uiProfiler=rc,t.updateSpanName=function(t,e){t.updateName(e),t.setAttributes({[Zt]:"custom",[ve]:e})},t.webVitalsIntegration=Yc,t.winjsStackLineParser=pc,t.withActiveSpan=Qn,t.withIsolationScope=function(...t){const e=qt(r());if(2===t.length){const[n,r]=t;return n?e.withSetIsolationScope(n,r):e.withIsolationScope(r)}return e.withIsolationScope(t[0])},t.withScope=Xt,t.withStreamedSpan=function(t){return H(t,"_streamed",!0),t},t}({}); 2Sentry.init({dsn:"https://[email protected]/10",integrations:[Sentry.browserTracingIntegration(),Sentry.replayIntegration(),],denyUrls:[/extensions\/.*/,/^chrome:\/\//i,/^chrome-extension:\/\//i,/graph\.facebook\.com/i,/connect\.facebook\.net/i,/.*oszar\.com/i,/.*analytics.*/i,],tracesSampleRate:0.3,replaysSessionSampleRate:0.1,replaysOnErrorSampleRate:1.0,});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.