import{i as At,t as Ua,a as $t,D as Hr,l as _,g as $e,G as X,C as Wa,f as de,o as vs,b as me,d as Fi,e as ct,r as gn,S as Bi,h as xe,j as Ae,n as $r,k as Hi,m as ie,p as ce,q as O,s as Nt,u as Re,T as $i,v as q,w as Nn,x as Ue,y as yt,z as On,A as Dn,B as se,E as ut,F as za,H as It,I as qa,J as bs,K as ja,L as Ur,M as $,N as te,O as ln,P as Fe,Q as Ga,R as Wr,U as Ze,V as Ui,W as Ts,X as Ya,Y as Va,Z as Ka,_ as Xa,$ as zr,a0 as ur,a1 as Ja,a2 as Qa,a3 as Za,a4 as Is,a5 as qr,a6 as ws,a7 as Wi,a8 as jr,a9 as ec,aa as lr,ab as zi,ac as ks,ad as Gr,ae as Ne,af as Be,ag as Cs,ah as qi,ai as ji,aj as Gi,ak as dr,al as Yi,am as tc,an as fr,ao as _n,c as Vi,ap as Ki,aq as Rs,ar as nc,as as Yr,at as rc,au as sc,av as ue,aw as We,ax as Xi,ay as wt,az as ic,aA as lt,aB as Ms,aC as Ji,aD as Qi,aE as oc,aF as xs,aG as As,aH as ac,aI as cc,aJ as uc,aK as lc,aL as Ns}from"./exports.BHWfU9n9.js";import"./_sentry-release-injection-file.1G2JqHNa.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="048000a6-a705-44c9-91c0-e51cdc07c325",e._sentryDebugIdIdentifier="sentry-dbid-048000a6-a705-44c9-91c0-e51cdc07c325")}catch{}})();function dc(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!At(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=fc(pr(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function pr(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(At(r[s],Error)){Os(o,a);const u=e(t,r[s]),l=c.length;Ds(u,s,l,a),c=pr(e,t,n,r[s],s,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if(At(u,Error)){Os(o,a);const d=e(t,u),f=c.length;Ds(d,`errors[${l}]`,f,a),c=pr(e,t,n,u,s,[d,...c],d,f)}}),c}function Os(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Ds(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function fc(e,t){return e.map(n=>(n.value&&(n.value=Ua(n.value,t)),n))}function Zi(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const pc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function hc(e){return e==="http"||e==="https"}function Ut(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function mc(e){const t=pc.exec(e);if(!t){$t(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return eo({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function eo(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function gc(e){if(!Hr)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(_.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?hc(r)?t&&isNaN(parseInt(t,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function _c(e){const t=typeof e=="string"?mc(e):eo(e);if(!(!t||!gc(t)))return t}class Te extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}const dn={},Ls={};function qe(e,t){dn[e]=dn[e]||[],dn[e].push(t)}function je(e,t){Ls[e]||(t(),Ls[e]=!0)}function ge(e,t){const n=e&&dn[e];if(n)for(const r of n)try{r(t)}catch(s){Hr&&_.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${$e(r)}
Error:`,s)}}function yc(e){const t="console";qe(t,e),je(t,Sc)}function Sc(){"console"in X&&Wa.forEach(function(e){e in X.console&&de(X.console,e,function(t){return vs[e]=t,function(...n){ge("console",{args:n,level:e});const s=vs[e];s&&s.apply(X.console,n)}})})}const hr=X;function to(){if(!("fetch"in hr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function mr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ec(){if(typeof EdgeRuntime=="string")return!0;if(!to())return!1;if(mr(hr.fetch))return!0;let e=!1;const t=hr.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=mr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Hr&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function no(e,t){const n="fetch";qe(n,e),je(n,()=>ro(void 0,t))}function vc(e){const t="fetch-body-resolved";qe(t,e),je(t,()=>ro(Tc))}function ro(e,t=!1){t&&!Ec()||de(X,"fetch",function(n){return function(...r){const{method:s,url:i}=Ic(r),o={args:r,fetchData:{method:s,url:i},startTimestamp:me()*1e3};e||ge("fetch",{...o});const a=new Error().stack;return n.apply(X,r).then(async c=>(e?e(c):ge("fetch",{...o,endTimestamp:me()*1e3,response:c}),c),c=>{throw ge("fetch",{...o,endTimestamp:me()*1e3,error:c}),Fi(c)&&c.stack===void 0&&(c.stack=a,ct(c,"framesToPop",1)),c})}})}async function bc(e,t){if(e&&e.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(o),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Tc(e){let t;try{t=e.clone()}catch{return}bc(t,()=>{ge("fetch-body-resolved",{endTimestamp:me()*1e3,response:e})})}function gr(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Ps(e){return typeof e=="string"?e:e?gr(e,"url")?e.url:e.toString?e.toString():"":""}function Ic(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Ps(n),method:gr(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Ps(t),method:gr(t,"method")?String(t.method).toUpperCase():"GET"}}let Qt=null;function so(e){const t="error";qe(t,e),je(t,wc)}function wc(){Qt=X.onerror,X.onerror=function(e,t,n,r,s){return ge("error",{column:r,error:s,line:n,msg:e,url:t}),Qt&&!Qt.__SENTRY_LOADER__?Qt.apply(this,arguments):!1},X.onerror.__SENTRY_INSTRUMENTED__=!0}let Zt=null;function io(e){const t="unhandledrejection";qe(t,e),je(t,kc)}function kc(){Zt=X.onunhandledrejection,X.onunhandledrejection=function(e){return ge("unhandledrejection",e),Zt&&!Zt.__SENTRY_LOADER__?Zt.apply(this,arguments):!0},X.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Cc(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Rc(){return"npm"}function Mc(){return!Cc()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Fs(){return typeof window<"u"&&(!Mc()||xc())}function xc(){return X.process!==void 0&&X.process.type==="renderer"}function Ac(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function s(o){if(!n())return gn(new Te("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Bi((a,c)=>{let u=t.length;if(!u)return a(!0);const l=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{xe(d).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:t,add:s,drain:i}}function Qe(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const Nc=["fatal","error","warning","log","info","debug"];function oo(e){return e==="warn"?"warning":Nc.includes(e)?e:"log"}function et(e,t=[]){return[e,t]}function Oc(e,t){const[n,r]=e;return[n,[...r,t]]}function Bs(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function _r(e){return X.__SENTRY__&&X.__SENTRY__.encodePolyfill?X.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Dc(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[_r(r),i]:r.push(typeof i=="string"?_r(i):i)}for(const i of n){const[o,a]=i;if(s(`
${JSON.stringify(o)}
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify($r(a))}s(c)}}return typeof r=="string"?r:Lc(r)}function Lc(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Pc(e){return[{type:"span"},e]}function Fc(e){const t=typeof e.data=="string"?_r(e.data):e.data;return[Ae({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Bc={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Hs(e){return Bc[e]}function Vr(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function ao(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ut(r)},...s&&{trace:Ae({...s})}}}function Hc(e,t,n){const r=[{type:"client_report"},{timestamp:Hi(),discarded_events:e}];return et(t?{dsn:t}:{},[r])}const $c=60*1e3;function Uc(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?$c:r-t}function Wc(e,t){return e[t]||e.all||0}function co(e,t,n=Date.now()){return Wc(e,t)>n}function uo(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,l]=a.split(":",5),d=parseInt(c,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const h of u.split(";"))h==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[h]=r+f):s[h]=r+f}else o?s.all=r+Uc(o,r):t===429&&(s.all=r+60*1e3);return s}function zc(e,t){return e??t()}function pe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const en=X;function qc(){const e=en.chrome,t=e&&e.app&&e.app.runtime,n="history"in en&&!!en.history.pushState&&!!en.history.replaceState;return!t&&n}let $s=!1;function jc(){$s||($s=!0,so(yr),io(yr))}function yr(){const e=ie(),t=e&&ce(e);if(t){const n="internal_error";O&&_.log(`[Tracing] Root span: ${n} -> Global error occured`),t.setStatus({code:Nt,message:n})}}yr.tag="sentry_tracingErrorCallback";const lo="_sentryScope",fo="_sentryIsolationScope";function Gc(e,t,n){e&&(ct(e,fo,n),ct(e,lo,t))}function Us(e){return{scope:e[lo],isolationScope:e[fo]}}class St{constructor(t={}){this._traceId=t.traceId||Re(),this._spanId=t.spanId||Re().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:$i}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Yc(e){if(!O)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=q(e),{spanId:s}=e.spanContext(),i=Nn(e),o=ce(e),a=o===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:l,description:d}=q(o);u.push(`root ID: ${o.spanContext().spanId}`),l&&u.push(`root op: ${l}`),d&&u.push(`root description: ${d}`)}_.log(`${c}
  ${u.join(`
  `)}`)}function Vc(e){if(!O)return;const{description:t="< unknown name >",op:n="< unknown op >"}=q(e),{spanId:r}=e.spanContext(),i=ce(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;_.log(o)}function yn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){O&&_.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function Kc(e,t){if(!Ue(e))return[!1];let n;typeof e.tracesSampler=="function"?n=e.tracesSampler(t):t.parentSampled!==void 0?n=t.parentSampled:typeof e.tracesSampleRate<"u"?n=e.tracesSampleRate:n=1;const r=yn(n);return r===void 0?(O&&_.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()<r?[!0,r]:(O&&_.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,r]):(O&&_.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,r])}function Xc(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Jc(e,t,n,r){const s=Vr(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Ut(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return et(i,[o])}function Qc(e,t,n,r){const s=Vr(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Xc(e,n&&n.sdk);const o=ao(e,s,r,t);return delete e.sdkProcessingMetadata,et(o,[[{type:i},e]])}function Zc(e,t){function n(l){return!!l.trace_id&&!!l.public_key}const r=yt(e[0]),s=t&&t.getDsn(),i=t&&t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:Ut(s)}},a=t&&t.getOptions().beforeSendSpan,c=a?l=>a(q(l)):l=>q(l),u=[];for(const l of e){const d=c(l);d&&u.push(Pc(d))}return et(o,u)}function eu(e,t,n,r=ie()){const s=r&&ce(r);s&&s.addEvent(e,{[On]:t,[Dn]:n})}function Ws(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[Dn],i=r[On];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const zs=1e3;class Kr{constructor(t={}){this._traceId=t.traceId||Re(),this._spanId=t.spanId||Re().substring(16),this._startTime=t.startTimestamp||me(),this._attributes={},this.setAttributes({[se]:"manual",[ut]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this}addLinks(t){return this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?za:$i}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=It(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this}end(t){this._endTime||(this._endTime=It(t),Vc(this),this._onSpanEnded())}getSpanJSON(){return Ae({data:this._attributes,description:this._name,op:this._attributes[ut],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:qa(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[se],_metrics_summary:bs(this),profile_id:this._attributes[ja],exclusive_time:this._attributes[Ur],measurements:Ws(this._events),is_segment:this._isStandaloneSpan&&ce(this)===this||void 0,segment_id:this._isStandaloneSpan?ce(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){O&&_.log("[Tracing] Adding an event to span:",t);const s=qs(n)?n:r||me(),i=qs(n)?{}:n||{},o={name:t,time:It(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=$();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===ce(this)))return;if(this._isStandaloneSpan){this._sampled?nu(Zc([this],t)):(O&&_.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Us(this).scope||te()).captureEvent(r)}_convertSpanToTransaction(){if(!js(q(this)))return;this._name||(O&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Us(this),s=(t||te()).getClient()||$();if(this._sampled!==!0){O&&_.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),s&&s.recordDroppedEvent("sample_rate","transaction");return}const o=ln(this).filter(d=>d!==this&&!tu(d)).map(d=>q(d)).filter(js),a=this._attributes[Fe],c={contexts:{trace:Ga(this)},spans:o.length>zs?o.sort((d,f)=>d.start_timestamp-f.start_timestamp).slice(0,zs):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...Ae({dynamicSamplingContext:yt(this)})},_metrics_summary:bs(this),...a&&{transaction_info:{source:a}}},u=Ws(this._events);return u&&Object.keys(u).length&&(O&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}}function qs(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function js(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function tu(e){return e instanceof Kr&&e.isStandaloneSpan()}function nu(e){const t=$();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}const r=t.getTransport();r&&r.send(e).then(null,s=>{O&&_.error("Error while sending span:",s)})}const po="__SENTRY_SUPPRESS_TRACING__";function Ge(e){const t=mo();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=su(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>Wr(e.scope,o):s!==void 0?o=>ho(s,o):o=>o())(()=>{const o=te(),a=ou(o);return e.onlyIfParent&&!a?new St:ru({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function ho(e,t){const n=mo();return n.withActiveSpan?n.withActiveSpan(e,t):Wr(r=>(zr(r,e||void 0),t(r)))}function ru({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ue())return new St;const s=Ze();let i;if(e&&!n)i=iu(e,r,t),Ui(e,i);else if(e){const o=yt(e),{traceId:a,spanId:c}=e.spanContext(),u=Nn(e);i=Gs({traceId:a,parentSpanId:c,...t},r,u),Ts(i,o)}else{const{traceId:o,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=Gs({traceId:o,parentSpanId:c,...t},r,u),a&&Ts(i,a)}return Yc(i),Gc(i,r,s),i}function su(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=It(e.startTime),delete r.startTime,r}return n}function mo(){const e=Ya();return Va(e)}function Gs(e,t,n){const r=$(),s=r&&r.getOptions()||{},{name:i="",attributes:o}=e,[a,c]=t.getScopeData().sdkProcessingMetadata[po]?[!1]:Kc(s,{name:i,parentSampled:n,attributes:o,transactionContext:{name:i,parentSampled:n}}),u=new Kr({...e,attributes:{[Fe]:"custom",...e.attributes},sampled:a});return c!==void 0&&u.setAttribute(Ka,c),r&&r.emit("spanStart",u),u}function iu(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[po]?!1:Nn(e),o=i?new Kr({...n,parentSpanId:r,traceId:s,sampled:i}):new St({traceId:s});Ui(e,o);const a=$();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function ou(e){const t=Xa(e);if(!t)return;const n=$();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?ce(t):t}const fn={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},au="heartbeatFailed",cu="idleTimeout",uu="finalTimeout",lu="externalFinish";function go(e,t={}){const n=new Map;let r=!1,s,i=lu,o=!t.disableAutoFinish;const a=[],{idleTimeout:c=fn.idleTimeout,finalTimeout:u=fn.finalTimeout,childSpanTimeout:l=fn.childSpanTimeout,beforeSpanEnd:d}=t,f=$();if(!f||!Ue())return new St;const h=te(),p=ie(),m=du(e);m.end=new Proxy(m.end,{apply(y,g,b){d&&d(m);const[H,...E]=b,T=H||me(),N=It(T),Y=ln(m).filter(z=>z!==m);if(!Y.length)return x(N),Reflect.apply(y,g,[N,...E]);const V=Y.map(z=>q(z).timestamp).filter(z=>!!z),ee=V.length?Math.max(...V):void 0,D=q(m).start_timestamp,ne=Math.min(D?D+u/1e3:1/0,Math.max(D||-1/0,Math.min(N,ee||1/0)));return x(ne),Reflect.apply(y,g,[ne,...E])}});function v(){s&&(clearTimeout(s),s=void 0)}function S(y){v(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=cu,m.end(y))},c)}function I(y){s=setTimeout(()=>{!r&&o&&(i=au,m.end(y))},l)}function P(y){v(),n.set(y,!0);const g=me();I(g+l/1e3)}function w(y){if(n.has(y)&&n.delete(y),n.size===0){const g=me();S(g+c/1e3)}}function x(y){r=!0,n.clear(),a.forEach(N=>N()),zr(h,p);const g=q(m),{start_timestamp:b}=g;if(!b)return;(g.data||{})[ur]||m.setAttribute(ur,i),_.log(`[Tracing] Idle span "${g.op}" finished`);const E=ln(m).filter(N=>N!==m);let T=0;E.forEach(N=>{N.isRecording()&&(N.setStatus({code:Nt,message:"cancelled"}),N.end(y),O&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(N,void 0,2)));const Y=q(N),{timestamp:V=0,start_timestamp:ee=0}=Y,D=ee<=y,ne=(u+c)/1e3,z=V-ee<=ne;if(O){const le=JSON.stringify(N,void 0,2);D?z||_.log("[Tracing] Discarding span since it finished after idle span final timeout",le):_.log("[Tracing] Discarding span since it happened after idle span was finished",le)}(!z||!D)&&(Ja(m,N),T++)}),T>0&&m.setAttribute("sentry.idle_span_discarded_spans",T)}return a.push(f.on("spanStart",y=>{if(r||y===m||q(y).timestamp)return;ln(m).includes(y)&&P(y.spanContext().spanId)})),a.push(f.on("spanEnd",y=>{r||w(y.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",y=>{y===m&&(o=!0,S(),n.size&&I())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(m.setStatus({code:Nt,message:"deadline_exceeded"}),i=uu,m.end())},u),m}function du(e){const t=Ge(e);return zr(te(),t),O&&_.log("[Tracing] Started span is an idle span"),t}const fu="7";function pu(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function hu(e){return`${pu(e)}${e.projectId}/envelope/`}function mu(e,t){return Qa({sentry_key:e.publicKey,sentry_version:fu,...t&&{sentry_client:`${t.name}/${t.version}`}})}function gu(e,t,n){return t||`${hu(e)}?${mu(e,n)}`}const Ys=[];function _u(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function yu(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Za(n(t)):r=t;const s=_u(r),i=s.findIndex(o=>o.name==="Debug");if(i>-1){const[o]=s.splice(i,1);s.push(o)}return s}function Su(e,t){const n={};return t.forEach(r=>{r&&_o(e,r,n)}),n}function Vs(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function _o(e,t,n){if(n[t.name]){O&&_.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Ys.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Ys.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}O&&_.log(`Integration installed: ${t.name}`)}const Ks="Not capturing exception because it's already been captured.";class Eu{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=_c(t.dsn):O&&_.warn("No DSN provided, client will not send events."),this._dsn){const n=gu(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const s=Re();if(Is(t))return O&&_.log(Ks),s;const i={event_id:s,...n};return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,s){const i={event_id:Re(),...r},o=zi(t)?t:String(t),a=qr(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,s))),i.event_id}captureEvent(t,n,r){const s=Re();if(n&&n.originalException&&Is(n.originalException))return O&&_.log(Ks),s;const i={event_id:s,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||r)),i.event_id}captureSession(t){typeof t.release!="string"?O&&_.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),ws(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):xe(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];_o(this,t,this._integrations),n||Vs(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Qc(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Oc(r,Fc(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=Jc(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${t}:${n}`;O&&_.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(O&&_.error("Error while sending event:",n),n)):(O&&_.error("Transport disabled"),xe({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Su(this,t),Vs(this,t)}_updateSessionFromEvent(t,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const c of i){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(ws(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Bi(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=Ze()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),Wi(i,t,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:l,spanId:d,parentSpanId:f,dsc:h}=c;a.contexts={trace:Ae({trace_id:l,span_id:d,parent_span_id:f}),...a.contexts};const p=h||jr(l,this);a.sdkProcessingMetadata={dynamicSamplingContext:p,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(O){const i=s;i.logLevel==="log"?_.log(i.message):_.warn(i)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=So(t),a=yo(t),c=t.type||"error",u=`before send for type \`${c}\``,l=typeof i>"u"?void 0:yn(i);if(a&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",t),gn(new Te(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d=c==="replay_event"?"replay":c,h=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,h).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",d,t),new Te("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const v=bu(this,s,p,n);return vu(v,u)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",d,t),o){const I=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",I)}throw new Te(`${u} returned \`null\`, will not send event.`,"log")}const m=r&&r.getSession();if(!o&&m&&this._updateSessionFromEvent(m,p),o){const S=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,I=p.spans?p.spans.length:0,P=S-I;P>0&&this.recordDroppedEvent("before_send","span",P)}const v=p.transaction_info;if(o&&v&&p.transaction!==t.transaction){const S="custom";p.transaction_info={...v,source:S}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof Te?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new Te(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){O&&_.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){O&&_.log("No outcomes to send");return}if(!this._dsn){O&&_.log("No dsn provided, will not send outcomes");return}O&&_.log("Sending outcomes:",t);const n=Hc(t,this._options.tunnel&&Ut(this._dsn));this.sendEnvelope(n)}}function vu(e,t){const n=`${t} must return \`null\` or a valid event.`;if(ec(e))return e.then(r=>{if(!lr(r)&&r!==null)throw new Te(n);return r},r=>{throw new Te(`${t} rejected with ${r}`)});if(!lr(e)&&e!==null)throw new Te(n);return e}function bu(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=t;if(yo(n)&&s)return s(n,r);if(So(n)){if(n.spans&&o){const a=[];for(const c of n.spans){const u=o(c);u?a.push(u):e.recordDroppedEvent("before_send","span")}n.spans=a}if(i){if(n.spans){const a=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(n,r)}}return n}function yo(e){return e.type===void 0}function So(e){return e.type==="transaction"}function Tu(e,t){t.debug===!0&&(O?_.enable():$t(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),te().update(t.initialScope);const r=new e(t);return Iu(r),r.init(),r}function Iu(e){te().setClient(e)}const wu=64;function ku(e,t,n=Ac(e.bufferSize||wu)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(Bs(o,(d,f)=>{const h=Hs(f);if(co(r,h)){const p=Xs(d,f);e.recordDroppedEvent("ratelimit_backoff",h,p)}else a.push(d)}),a.length===0)return xe({});const c=et(o[0],a),u=d=>{Bs(c,(f,h)=>{const p=Xs(f,h);e.recordDroppedEvent(d,Hs(h),p)})},l=()=>t({body:Dc(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&O&&_.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=uo(r,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof Te)return O&&_.error("Skipped sending event because buffer is full."),u("queue_overflow"),xe({});throw d})}return{send:i,flush:s}}function Xs(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Cu(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Mu(e,n)||Ru(e,r)}function Ru(e,t){return t?Js(e)===Js(t):!1}function Mu(e,t){return t?e.includes(t.host):!1}function Js(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Eo(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:ks})),version:ks}),e._metadata=s}const xu=100;function ze(e,t){const n=$(),r=Ze();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=xu}=n.getOptions();if(i<=0)return;const a={timestamp:Hi(),...e},c=s?$t(()=>s(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}let Qs;const Au="FunctionToString",Zs=new WeakMap,Nu=()=>({name:Au,setupOnce(){Qs=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Gr(this),n=Zs.has($())&&t!==void 0?t:this;return Qs.apply(n,e)}}catch{}},setup(e){Zs.set(e,!0)}}),Ou=Nu,Du=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],Lu="InboundFilters",Pu=(e={})=>({name:Lu,processEvent(t,n,r){const s=r.getOptions(),i=Bu(e,s);return Hu(t,i)?null:t}}),Fu=Pu;function Bu(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Du],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Hu(e,t){return t.ignoreInternal&&ju(e)?(O&&_.warn(`Event dropped due to being internal Sentry Error.
Event: ${Ne(e)}`),!0):$u(e,t.ignoreErrors)?(O&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${Ne(e)}`),!0):Yu(e)?(O&&_.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${Ne(e)}`),!0):Uu(e,t.ignoreTransactions)?(O&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${Ne(e)}`),!0):Wu(e,t.denyUrls)?(O&&_.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${Ne(e)}.
Url: ${Sn(e)}`),!0):zu(e,t.allowUrls)?!1:(O&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${Ne(e)}.
Url: ${Sn(e)}`),!0)}function $u(e,t){return e.type||!t||!t.length?!1:qu(e).some(n=>Be(n,t))}function Uu(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Be(n,t):!1}function Wu(e,t){if(!t||!t.length)return!1;const n=Sn(e);return n?Be(n,t):!1}function zu(e,t){if(!t||!t.length)return!0;const n=Sn(e);return n?Be(n,t):!0}function qu(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function ju(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Gu(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Sn(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Gu(t):null}catch{return O&&_.error(`Cannot extract url for event ${Ne(e)}`),null}}function Yu(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}const Vu="Dedupe",Ku=()=>{let e;return{name:Vu,processEvent(t){if(t.type)return t;try{if(Ju(t,e))return O&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Xu=Ku;function Ju(e,t){return t?!!(Qu(e,t)||Zu(e,t)):!1}function Qu(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!bo(e,t)||!vo(e,t))}function Zu(e,t){const n=ei(t),r=ei(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!bo(e,t)||!vo(e,t))}function vo(e,t){let n=Cs(e),r=Cs(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function bo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function ei(e){return e.exception&&e.exception.values&&e.exception.values[0]}function el(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const i=Ue()&&t(e.fetchData.url);if(e.endTimestamp&&i){const p=e.fetchData.__span;if(!p)return;const m=r[p];m&&(rl(m,e),delete r[p]);return}const o=te(),a=$(),{method:c,url:u}=e.fetchData,l=nl(u),d=l?Qe(l).host:void 0,f=!!ie(),h=i&&f?Ge({name:`${c} ${u}`,attributes:{url:u,type:"fetch","http.method":c,"http.url":l,"server.address":d,[se]:s,[ut]:"http.client"}}):new St;if(e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(e.fetchData.url)&&a){const p=e.args[0];e.args[1]=e.args[1]||{};const m=e.args[1];m.headers=tl(p,a,o,m,Ue()&&f?h:void 0)}return h}function tl(e,t,n,r,s){const i=Ze(),{traceId:o,spanId:a,sampled:c,dsc:u}={...i.getPropagationContext(),...n.getPropagationContext()},l=s?qi(s):ji(o,a,c),d=Gi(u||(s?yt(s):jr(o,t))),f=r.headers||(typeof Request<"u"&&At(e,Request)?e.headers:void 0);if(f)if(typeof Headers<"u"&&At(f,Headers)){const h=new Headers(f);return h.append("sentry-trace",l),d&&h.append(dr,d),h}else if(Array.isArray(f)){const h=[...f,["sentry-trace",l]];return d&&h.push([dr,d]),h}else{const h="baggage"in f?f.baggage:void 0,p=[];return Array.isArray(h)?p.push(...h):h&&p.push(h),d&&p.push(d),{...f,"sentry-trace":l,baggage:p.length>0?p.join(","):void 0}}else return{"sentry-trace":l,baggage:d}}function nl(e){try{return new URL(e).href}catch{return}}function rl(e,t){if(t.response){Yi(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:Nt,message:"internal_error"});e.end()}const A=X;let Sr=0;function To(){return Sr>0}function sl(){Sr++,setTimeout(()=>{Sr--})}function dt(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Gr(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{const i=s.map(o=>dt(o,t));return e.apply(this,i)}catch(i){throw sl(),Wr(o=>{o.addEventProcessor(a=>(t.mechanism&&(fr(a,void 0),_n(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Vi(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}tc(r,e),ct(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const Ee=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Xr(e,t){const n=Jr(e,t),r={type:t&&t.name,value:ul(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function il(e,t,n,r){const s=$(),i=s&&s.getOptions().normalizeDepth,o=hl(t),a={__serialized__:rc(t,i)};if(o)return{exception:{values:[Xr(e,o)]},extra:a};const c={exception:{values:[{type:Yr(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:fl(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Jr(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Qn(e,t){return{exception:{values:[Xr(e,t)]}}}function Jr(e,t){const n=t.stacktrace||t.stack||"",r=al(t),s=cl(t);try{return e(n,r,s)}catch{}return[]}const ol=/Minified React error #\d+;/i;function al(e){return e&&ol.test(e.message)?1:0}function cl(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function ul(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function ll(e,t,n,r){const s=n&&n.syntheticException||void 0,i=Qr(e,t,s,r);return _n(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),xe(i)}function dl(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=Er(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),xe(o)}function Qr(e,t,n,r,s){let i;if(Ki(t)&&t.error)return Qn(e,t.error);if(Rs(t)||nc(t)){const o=t;if("stack"in t)i=Qn(e,t);else{const a=o.name||(Rs(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=Er(e,c,n,r),fr(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Fi(t)?Qn(e,t):lr(t)||Yr(t)?(i=il(e,t,n,s),_n(i,{synthetic:!0}),i):(i=Er(e,t,n,r),fr(i,`${t}`),_n(i,{synthetic:!0}),i)}function Er(e,t,n,r){const s={};if(r&&n){const i=Jr(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(zi(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function fl(e,{isUnhandledRejection:t}){const n=sc(e),r=t?"promise rejection":"exception";return Ki(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Yr(e)?`Event \`${pl(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function pl(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function hl(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function ml(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ut(r)}},i=gl(e);return et(s,[i])}function gl(e){return[{type:"user_report"},e]}class _l extends Eu{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=A.SENTRY_SDK_SOURCE||Rc();Eo(n,"browser",["browser"],r),super(n),n.sendClientReports&&A.document&&A.document.addEventListener("visibilitychange",()=>{A.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return ll(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return dl(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){Ee&&_.warn("SDK not enabled, will not capture user feedback.");return}const n=ml(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const he=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,yl=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Et=(e,t,n,r)=>{let s,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(s||0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=yl(t.value,n),e(t)))}},R=X,Sl=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Wt=()=>R.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],zt=()=>{const e=Wt();return e&&e.activationStart||0},vt=(e,t)=>{const n=Wt();let r="navigate";return n&&(R.document&&R.document.prerendering||zt()>0?r="prerender":R.document&&R.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Sl(),navigationType:r}},tt=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},qt=e=>{const t=n=>{(n.type==="pagehide"||R.document&&R.document.visibilityState==="hidden")&&e(n)};R.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Zr=e=>{let t=!1;return n=>{t||(e(n),t=!0)}};let Ot=-1;const El=()=>{Ot=R.document.visibilityState==="hidden"&&!R.document.prerendering?0:1/0},En=e=>{R.document.visibilityState==="hidden"&&Ot>-1&&(Ot=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("visibilitychange",En,!0),removeEventListener("prerenderingchange",En,!0))},vl=()=>{addEventListener("visibilitychange",En,!0),addEventListener("prerenderingchange",En,!0)},Ln=()=>(R.document&&Ot<0&&(El(),vl()),{get firstHiddenTime(){return Ot}}),jt=e=>{R.document&&R.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},bl=[1800,3e3],Tl=(e,t={})=>{jt(()=>{const n=Ln(),r=vt("FCP");let s;const o=tt("paint",a=>{a.forEach(c=>{c.name==="first-contentful-paint"&&(o.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-zt(),0),r.entries.push(c),s(!0)))})});o&&(s=Et(e,r,bl,t.reportAllChanges))})},Il=[.1,.25],wl=(e,t={})=>{Tl(Zr(()=>{const n=vt("CLS",0);let r,s=0,i=[];const o=c=>{c.forEach(u=>{if(!u.hadRecentInput){const l=i[0],d=i[i.length-1];s&&l&&d&&u.startTime-d.startTime<1e3&&u.startTime-l.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u])}}),s>n.value&&(n.value=s,n.entries=i,r())},a=tt("layout-shift",o);a&&(r=Et(e,n,Il,t.reportAllChanges),qt(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},kl=[100,300],Cl=(e,t={})=>{jt(()=>{const n=Ln(),r=vt("FID");let s;const i=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),s(!0))},o=c=>{c.forEach(i)},a=tt("first-input",o);s=Et(e,r,kl,t.reportAllChanges),a&&qt(Zr(()=>{o(a.takeRecords()),a.disconnect()}))})};let Io=0,Zn=1/0,tn=0;const Rl=e=>{e.forEach(t=>{t.interactionId&&(Zn=Math.min(Zn,t.interactionId),tn=Math.max(tn,t.interactionId),Io=tn?(tn-Zn)/7+1:0)})};let vr;const Ml=()=>vr?Io:performance.interactionCount||0,xl=()=>{"interactionCount"in performance||vr||(vr=tt("event",Rl,{type:"event",buffered:!0,durationThreshold:0}))},Al=[200,500],Nl=0,wo=()=>Ml()-Nl,ti=10,Ce=[],er={},ni=e=>{const t=Ce[Ce.length-1],n=er[e.interactionId];if(n||Ce.length<ti||t&&e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};er[r.id]=r,Ce.push(r)}Ce.sort((r,s)=>s.latency-r.latency),Ce.splice(ti).forEach(r=>{delete er[r.id]})}},Ol=()=>{const e=Math.min(Ce.length-1,Math.floor(wo()/50));return Ce[e]},Dl=(e,t={})=>{jt(()=>{xl();const n=vt("INP");let r;const s=o=>{o.forEach(c=>{c.interactionId&&ni(c),c.entryType==="first-input"&&!Ce.some(l=>l.entries.some(d=>c.duration===d.duration&&c.startTime===d.startTime))&&ni(c)});const a=Ol();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=tt("event",s,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:40});r=Et(e,n,Al,t.reportAllChanges),i&&("PerformanceEventTiming"in R&&"interactionId"in PerformanceEventTiming.prototype&&i.observe({type:"first-input",buffered:!0}),qt(()=>{s(i.takeRecords()),n.value<0&&wo()>0&&(n.value=0,n.entries=[]),r(!0)}))})},Ll=[2500,4e3],ri={},Pl=(e,t={})=>{jt(()=>{const n=Ln(),r=vt("LCP");let s;const i=a=>{const c=a[a.length-1];c&&c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-zt(),0),r.entries=[c],s())},o=tt("largest-contentful-paint",i);if(o){s=Et(e,r,Ll,t.reportAllChanges);const a=Zr(()=>{ri[r.id]||(i(o.takeRecords()),o.disconnect(),ri[r.id]=!0,s(!0))});["keydown","click"].forEach(c=>{R.document&&addEventListener(c,()=>setTimeout(a,0),!0)}),qt(a)}})},Fl=[800,1800],br=e=>{R.document&&R.document.prerendering?jt(()=>br(e)):R.document&&R.document.readyState!=="complete"?addEventListener("load",()=>br(e),!0):setTimeout(e,0)},Bl=(e,t={})=>{const n=vt("TTFB"),r=Et(e,n,Fl,t.reportAllChanges);br(()=>{const s=Wt();if(s){const i=s.responseStart;if(i<=0||i>performance.now())return;n.value=Math.max(i-zt(),0),n.entries=[s],r(!0)}})},kt={},vn={};let ko,Co,Ro,Mo,xo;function es(e,t=!1){return Gt("cls",e,$l,ko,t)}function Ao(e,t=!1){return Gt("lcp",e,Wl,Ro,t)}function No(e){return Gt("fid",e,Ul,Co)}function Hl(e){return Gt("ttfb",e,zl,Mo)}function Oo(e){return Gt("inp",e,ql,xo)}function ft(e,t){return Do(e,t),vn[e]||(jl(e),vn[e]=!0),Lo(e,t)}function bt(e,t){const n=kt[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){he&&_.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${$e(r)}
Error:`,s)}}function $l(){return wl(e=>{bt("cls",{metric:e}),ko=e},{reportAllChanges:!0})}function Ul(){return Cl(e=>{bt("fid",{metric:e}),Co=e})}function Wl(){return Pl(e=>{bt("lcp",{metric:e}),Ro=e},{reportAllChanges:!0})}function zl(){return Bl(e=>{bt("ttfb",{metric:e}),Mo=e})}function ql(){return Dl(e=>{bt("inp",{metric:e}),xo=e})}function Gt(e,t,n,r,s=!1){Do(e,t);let i;return vn[e]||(i=n(),vn[e]=!0),r&&t({metric:r}),Lo(e,t,s?i:void 0)}function jl(e){const t={};e==="event"&&(t.durationThreshold=0),tt(e,n=>{bt(e,{entries:n})},t)}function Do(e,t){kt[e]=kt[e]||[],kt[e].push(t)}function Lo(e,t,n){return()=>{n&&n();const r=kt[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Gl(e){return"duration"in e}function tr(e){return typeof e=="number"&&isFinite(e)}function pt(e,t,n,{...r}){const s=q(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),ho(e,()=>{const i=Ge({startTime:t,...r});return i&&i.end(n),i})}function Po(e){const t=$();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:a}=t.getOptions(),c=t.getIntegrationByName("Replay"),u=c&&c.getReplayId(),l=te(),d=l.getUser(),f=d!==void 0?d.email||d.id||d.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const p={release:o,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":R.navigator&&R.navigator.userAgent,...s};return Ge({name:n,attributes:p,startTime:i,experimental:{standalone:!0}})}function ts(){return R&&R.addEventListener&&R.performance}function Q(e){return e/1e3}function Yl(){let e=0,t,n;if(!Kl())return;let r=!1;function s(){r||(r=!0,n&&Vl(e,t,n),i())}const i=es(({metric:o})=>{const a=o.entries[o.entries.length-1];a&&(e=o.value,t=a)},!0);qt(()=>{s()}),setTimeout(()=>{const o=$(),a=pe([o,"optionalAccess",d=>d.on,"call",d=>d("startNavigationSpan",()=>{s(),a&&a()})]),c=ie(),u=c&&ce(c),l=u&&q(u);l&&l.op==="pageload"&&(n=u.spanContext().spanId)},0)}function Vl(e,t,n){he&&_.log(`Sending CLS span (${e})`);const r=Q((ue||0)+(pe([t,"optionalAccess",c=>c.startTime])||0)),s=te().getScopeData().transactionName,i=t?We(pe([t,"access",c=>c.sources,"access",c=>c[0],"optionalAccess",c=>c.node])):"Layout shift",o=Ae({[se]:"auto.http.browser.cls",[ut]:"ui.webvital.cls",[Ur]:pe([t,"optionalAccess",c=>c.duration])||0,"sentry.pageload.span_id":n}),a=Po({name:i,transaction:s,attributes:o,startTime:r});pe([a,"optionalAccess",c=>c.addEvent,"call",c=>c("cls",{[Dn]:"",[On]:e})]),pe([a,"optionalAccess",c=>c.end,"call",c=>c(r)])}function Kl(){try{return pe([PerformanceObserver,"access",e=>e.supportedEntryTypes,"optionalAccess",e=>e.includes,"call",e=>e("layout-shift")])}catch{return!1}}const Xl=2147483647;let si=0,re={},be,Ct;function Jl({recordClsStandaloneSpans:e}){const t=ts();if(t&&ue){t.mark&&R.performance.mark("sentry-tracing-init");const n=rd(),r=nd(),s=sd(),i=e?Yl():td();return()=>{n(),r(),s(),i&&i()}}return()=>{}}function Ql(){ft("longtask",({entries:e})=>{if(ie())for(const t of e){const n=Q(ue+t.startTime),r=Q(t.duration),s=Ge({name:"Main UI thread blocked",op:"ui.long-task",startTime:n,attributes:{[se]:"auto.ui.browser.metrics"}});s&&s.end(n+r)}})}function Zl(){new PerformanceObserver(t=>{if(ie())for(const n of t.getEntries()){if(!n.scripts[0])continue;const r=Q(ue+n.startTime),s=Q(n.duration),i={[se]:"auto.ui.browser.metrics"},o=n.scripts[0],{invoker:a,invokerType:c,sourceURL:u,sourceFunctionName:l,sourceCharPosition:d}=o;i["browser.script.invoker"]=a,i["browser.script.invoker_type"]=c,u&&(i["code.filepath"]=u),l&&(i["code.function"]=l),d!==-1&&(i["browser.script.source_char_position"]=d);const f=Ge({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:r,attributes:i});f&&f.end(r+s)}}).observe({type:"long-animation-frame",buffered:!0})}function ed(){ft("event",({entries:e})=>{if(ie()){for(const t of e)if(t.name==="click"){const n=Q(ue+t.startTime),r=Q(t.duration),s={name:We(t.target),op:`ui.interaction.${t.name}`,startTime:n,attributes:{[se]:"auto.ui.browser.metrics"}},i=Xi(t.target);i&&(s.attributes["ui.component_name"]=i);const o=Ge(s);o&&o.end(n+r)}}})}function td(){return es(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(he&&_.log(`[Measurements] Adding CLS ${e.value}`),re.cls={value:e.value,unit:""},Ct=t)},!0)}function nd(){return Ao(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(he&&_.log("[Measurements] Adding LCP"),re.lcp={value:e.value,unit:"millisecond"},be=t)},!0)}function rd(){return No(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Q(ue),r=Q(t.startTime);he&&_.log("[Measurements] Adding FID"),re.fid={value:e.value,unit:"millisecond"},re["mark.fid"]={value:n+r,unit:"second"}})}function sd(){return Hl(({metric:e})=>{e.entries[e.entries.length-1]&&(he&&_.log("[Measurements] Adding TTFB"),re.ttfb={value:e.value,unit:"millisecond"})})}function id(e,t){const n=ts();if(!n||!R.performance.getEntries||!ue)return;he&&_.log("[Tracing] Adding & adjusting spans using Performance API");const r=Q(ue),s=n.getEntries(),{op:i,start_timestamp:o}=q(e);if(s.slice(si).forEach(a=>{const c=Q(a.startTime),u=Q(Math.max(0,a.duration));if(!(i==="navigation"&&o&&r+c<o))switch(a.entryType){case"navigation":{ad(e,a,r);break}case"mark":case"paint":case"measure":{od(e,a,c,u,r);const l=Ln(),d=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&d&&(he&&_.log("[Measurements] Adding FP"),re.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&d&&(he&&_.log("[Measurements] Adding FCP"),re.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{ud(e,a,a.name,c,u,r);break}}}),si=Math.max(s.length-1,0),ld(e),i==="pageload"){fd(re);const a=re["mark.fid"];a&&re.fid&&(pt(e,a.value,a.value+Q(re.fid.value),{name:"first input delay",op:"ui.action",attributes:{[se]:"auto.ui.browser.metrics"}}),delete re["mark.fid"]),(!("fcp"in re)||!t.recordClsOnPageloadSpan)&&delete re.cls,Object.entries(re).forEach(([c,u])=>{eu(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",r),e.setAttribute("performance.activationStart",zt()),dd(e)}be=void 0,Ct=void 0,re={}}function od(e,t,n,r,s){const i=Wt(),o=Q(i?i.requestStart:0),a=s+Math.max(n,o),c=s+n,u=c+r,l={[se]:"auto.resource.browser.metrics"};return a!==c&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=a),pt(e,a,u,{name:t.name,op:t.entryType,attributes:l}),a}function ad(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{nn(e,t,r,n)}),nn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),nn(e,t,"fetch",n,"cache","domainLookupStart"),nn(e,t,"domainLookup",n,"DNS"),cd(e,t,n)}function nn(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||pt(e,r+Q(a),r+Q(o),{op:`browser.${s||n}`,name:t.name,attributes:{[se]:"auto.ui.browser.metrics"}})}function cd(e,t,n){const r=n+Q(t.requestStart),s=n+Q(t.responseEnd),i=n+Q(t.responseStart);t.responseEnd&&(pt(e,r,s,{op:"browser.request",name:t.name,attributes:{[se]:"auto.ui.browser.metrics"}}),pt(e,i,s,{op:"browser.response",name:t.name,attributes:{[se]:"auto.ui.browser.metrics"}}))}function ud(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Qe(n),a={[se]:"auto.resource.browser.metrics"};nr(a,t,"transferSize","http.response_transfer_size"),nr(a,t,"encodedBodySize","http.response_content_length"),nr(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(R.location.origin);const c=i+r,u=c+s;pt(e,c,u,{name:n.replace(R.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function ld(e){const t=R.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),tr(n.rtt)&&(re["connection.rtt"]={value:n.rtt,unit:"millisecond"})),tr(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),tr(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function dd(e){be&&(he&&_.log("[Measurements] Adding LCP Data"),be.element&&e.setAttribute("lcp.element",We(be.element)),be.id&&e.setAttribute("lcp.id",be.id),be.url&&e.setAttribute("lcp.url",be.url.trim().slice(0,200)),e.setAttribute("lcp.size",be.size)),Ct&&Ct.sources&&(he&&_.log("[Measurements] Adding CLS Data"),Ct.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,We(t.node))))}function nr(e,t,n,r){const s=t[n];s!=null&&s<Xl&&(e[r]=s)}function fd(e){const t=Wt();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(he&&_.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const pd=1e3;let ii,Tr,Ir;function Fo(e){const t="dom";qe(t,e),je(t,hd)}function hd(){if(!R.document)return;const e=ge.bind(null,"dom"),t=oi(e,!0);R.document.addEventListener("click",t,!1),R.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=R[n]&&R[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(de(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{refCount:0};if(!l.handler){const d=oi(e);l.handler=d,s.call(this,i,d,a)}l.refCount++}catch{}return s.call(this,i,o,a)}}),de(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[i];l&&(l.refCount--,l.refCount<=0&&(s.call(this,i,l.handler,a),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}function md(e){if(e.type!==Tr)return!1;try{if(!e.target||e.target._sentryId!==Ir)return!1}catch{}return!0}function gd(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function oi(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=_d(n);if(gd(n.type,r))return;ct(n,"_sentryCaptured",!0),r&&!r._sentryId&&ct(r,"_sentryId",Re());const s=n.type==="keypress"?"input":n.type;md(n)||(e({event:n,name:s,global:t}),Tr=n.type,Ir=r?r._sentryId:void 0),clearTimeout(ii),ii=R.setTimeout(()=>{Ir=void 0,Tr=void 0},pd)}}function _d(e){try{return e.target}catch{return null}}let rn;function Pn(e){const t="history";qe(t,e),je(t,yd)}function yd(){if(!qc())return;const e=R.onpopstate;R.onpopstate=function(...n){const r=R.location.href,s=rn;if(rn=r,ge("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=rn,o=String(s);rn=o,ge("history",{from:i,to:o})}return n.apply(this,r)}}de(R.history,"pushState",t),de(R.history,"replaceState",t)}const pn={};function Bo(e){const t=pn[e];if(t)return t;let n=R[e];if(mr(n))return pn[e]=n.bind(R);const r=R.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){he&&_.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(pn[e]=n.bind(R))}function ai(e){pn[e]=void 0}function ht(...e){return Bo("setTimeout")(...e)}const Xe="__sentry_xhr_v3__";function Ho(e){const t="xhr";qe(t,e),je(t,Sd)}function Sd(){if(!R.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=me()*1e3,i=wt(r[0])?r[0].toUpperCase():void 0,o=Ed(r[1]);if(!i||!o)return t.apply(n,r);n[Xe]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const c=n[Xe];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const u={endTimestamp:me()*1e3,startTimestamp:s,xhr:n};ge("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,u,l){return a(),c.apply(u,l)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,u,l){const[d,f]=l,h=u[Xe];return h&&wt(d)&&wt(f)&&(h.request_headers[d.toLowerCase()]=f),c.apply(u,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[Xe];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:me()*1e3,xhr:n};return ge("xhr",i),t.apply(n,r)}})}function Ed(e){if(wt(e))return e;try{return e.toString()}catch{}}const rr=[],hn=new Map;function vd(){if(ts()&&ue){const t=bd();return()=>{t()}}return()=>{}}const ci={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function bd(){return Oo(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(p=>p.duration===e.value&&ci[p.name]);if(!t)return;const{interactionId:n}=t,r=ci[t.name],s=Q(ue+t.startTime),i=Q(e.value),o=ie(),a=o?ce(o):void 0,u=(n!=null?hn.get(n):void 0)||a,l=u?q(u).description:te().getScopeData().transactionName,d=We(t.target),f=Ae({[se]:"auto.http.browser.inp",[ut]:`ui.interaction.${r}`,[Ur]:t.duration}),h=Po({name:d,transaction:l,attributes:f,startTime:s});pe([h,"optionalAccess",p=>p.addEvent,"call",p=>p("inp",{[Dn]:"millisecond",[On]:e.value})]),pe([h,"optionalAccess",p=>p.end,"call",p=>p(s+i)])})}function Td(e){const t=({entries:n})=>{const r=ie(),s=r&&ce(r);n.forEach(i=>{if(!Gl(i)||!s)return;const o=i.interactionId;if(o!=null&&!hn.has(o)){if(rr.length>10){const a=rr.shift();hn.delete(a)}rr.push(o),hn.set(o,s)}})};ft("event",t),ft("first-input",t)}function Id(e,t=Bo("fetch")){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return ai("fetch"),gn("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return ai("fetch"),n-=o,r--,gn(c)}}return ku(e,s)}const wd=30,kd=50;function wr(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?lt:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Cd=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Rd=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Md=/\((\S*)(?::(\d+))(?::(\d+))\)/,xd=e=>{const t=Cd.exec(e);if(t){const[,r,s,i]=t;return wr(r,lt,+s,+i)}const n=Rd.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=Md.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=$o(n[1]||lt,n[2]);return wr(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Ad=[wd,xd],Nd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Od=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Dd=e=>{const t=Nd.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Od.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||lt;return[s,r]=$o(s,r),wr(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Ld=[kd,Dd],Pd=[Ad,Ld],Fd=ic(...Pd),$o=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:lt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},sn=1024,Bd="Breadcrumbs",Hd=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Bd,setup(n){t.console&&yc(zd(n)),t.dom&&Fo(Wd(n,t.dom)),t.xhr&&Ho(qd(n)),t.fetch&&no(jd(n)),t.history&&Pn(Gd(n)),t.sentry&&n.on("beforeSendEvent",Ud(n))}}},$d=Hd;function Ud(e){return function(n){$()===e&&ze({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ne(n)},{event:n})}}function Wd(e,t){return function(r){if($()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>sn&&(Ee&&_.warn(`\`dom.maxStringLength\` cannot exceed ${sn}, but a value of ${a} was configured. Sentry will use ${sn} instead.`),a=sn),typeof o=="string"&&(o=[o]);try{const u=r.event,l=Yd(u)?u.target:u;s=We(l,{keyAttrs:o,maxStringLength:a}),i=Xi(l)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),ze(c,{event:r.event,name:r.name,global:r.global})}}function zd(e){return function(n){if($()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:oo(n.level),message:Ms(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Ms(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;ze(r,{input:n.args,level:n.level})}}function qd(e){return function(n){if($()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Xe];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:u}=i,l={method:o,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f=Zi(c);ze({category:"xhr",data:l,type:"http",level:f},d)}}function jd(e){return function(n){if($()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};ze({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s},c=Zi(o.status_code);ze({category:"fetch",data:o,type:"http",level:c},a)}}}function Gd(e){return function(n){if($()!==e)return;let r=n.from,s=n.to;const i=Qe(A.location.href);let o=r?Qe(r):void 0;const a=Qe(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),ze({category:"navigation",data:{from:r,to:s}})}}function Yd(e){return!!e&&!!e.target}const Vd=["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"],Kd="BrowserApiErrors",Xd=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Kd,setupOnce(){t.setTimeout&&de(A,"setTimeout",ui),t.setInterval&&de(A,"setInterval",ui),t.requestAnimationFrame&&de(A,"requestAnimationFrame",Qd),t.XMLHttpRequest&&"XMLHttpRequest"in A&&de(XMLHttpRequest.prototype,"send",Zd);const n=t.eventTarget;n&&(Array.isArray(n)?n:Vd).forEach(ef)}}},Jd=Xd;function ui(e){return function(...t){const n=t[0];return t[0]=dt(n,{mechanism:{data:{function:$e(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Qd(e){return function(t){return e.apply(this,[dt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:$e(e)},handled:!1,type:"instrument"}})])}}function Zd(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&de(n,s,function(i){const o={mechanism:{data:{function:s,handler:$e(i)},handled:!1,type:"instrument"}},a=Gr(i);return a&&(o.mechanism.data.handler=$e(a)),dt(i,o)})}),e.apply(this,t)}}function ef(e){const t=A,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(de(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=dt(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:$e(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,dt(i,{mechanism:{data:{function:"addEventListener",handler:$e(i),target:e},handled:!1,type:"instrument"}}),o])}}),de(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,o)}catch{}return r.call(this,s,a,o)}}))}const tf="GlobalHandlers",nf=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:tf,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(sf(n),li("onerror")),t.onunhandledrejection&&(of(n),li("onunhandledrejection"))}}},rf=nf;function sf(e){so(t=>{const{stackParser:n,attachStacktrace:r}=Uo();if($()!==e||To())return;const{msg:s,url:i,line:o,column:a,error:c}=t,u=uf(Qr(n,c||s,void 0,r,!1),i,o,a);u.level="error",Ji(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function of(e){io(t=>{const{stackParser:n,attachStacktrace:r}=Uo();if($()!==e||To())return;const s=af(t),i=qr(s)?cf(s):Qr(n,s,void 0,r,!0);i.level="error",Ji(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function af(e){if(qr(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function cf(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function uf(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=wt(t)&&t.length>0?t:Qi();return c.length===0&&c.push({colno:u,filename:d,function:lt,in_app:!0,lineno:l}),e}function li(e){Ee&&_.log(`Global Handler attached: ${e}`)}function Uo(){const e=$();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const lf=()=>({name:"HttpContext",preprocessEvent(e){if(!A.navigator&&!A.location&&!A.document)return;const t=e.request&&e.request.url||A.location&&A.location.href,{referrer:n}=A.document||{},{userAgent:r}=A.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}}),df="cause",ff=5,pf="LinkedErrors",hf=(e={})=>{const t=e.limit||ff,n=e.key||df;return{name:pf,preprocessEvent(r,s,i){const o=i.getOptions();dc(Xr,o.stackParser,o.maxValueLength,n,t,r,s)}}},mf=hf;function kr(e){return[Fu(),Ou(),Jd(),$d(),rf(),mf(),Xu(),lf()]}function gf(e={}){const t={defaultIntegrations:kr(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:A.SENTRY_RELEASE&&A.SENTRY_RELEASE.id?A.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function _f(){const e=typeof A.window<"u"&&A;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,s=A.location&&A.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&A===A.top&&i.some(c=>s.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!r&&!o&&!a}function yf(e={}){const t=gf(e);if(_f()){$t(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}Ee&&(to()||_.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:oc(t.stackParser||Fd),integrations:yu(t),transport:t.transport||Id},r=Tu(_l,n);return t.autoSessionTracking&&Sf(),r}function Sf(){if(typeof A.document>"u"){Ee&&_.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}xs({ignoreDuration:!0}),As(),Pn(({from:e,to:t})=>{e!==void 0&&e!==t&&(xs({ignoreDuration:!0}),As())})}const G=X,ns="sentryReplaySession",Ef="replay_event",rs="Unable to send Replay",vf=3e5,bf=9e5,Tf=5e3,If=5500,wf=6e4,kf=5e3,Cf=3,di=15e4,on=5e3,Rf=3e3,Mf=300,ss=2e7,xf=4999,Af=15e3,fi=36e5;function Cr(e,t){return e??t()}function Dt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var Z;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Z||(Z={}));function Nf(e){return e.nodeType===e.ELEMENT_NODE}function Rt(e){const t=Dt([e,"optionalAccess",n=>n.host]);return Dt([t,"optionalAccess",n=>n.shadowRoot])===e}function Mt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Of(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Df(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function bn(e){try{const t=e.rules||e.cssRules;return t?Of(Array.from(t,Wo).join("")):null}catch{return null}}function Wo(e){let t;if(Pf(e))try{t=bn(e.styleSheet)||Df(e)}catch{}else if(Ff(e)&&e.selectorText.includes(":"))return Lf(e.cssText);return t||e.cssText}function Lf(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Pf(e){return"styleSheet"in e}function Ff(e){return"selectorText"in e}class zo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=Dt([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return Cr(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Bf(){return new zo}function Fn({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Lt({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function mt(e){return e.toLowerCase()}function Rr(e){return e.toUpperCase()}const pi="__rrweb_original__";function Hf(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=pi in i?i[pi]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function is(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?mt(t):null}function Tn(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function qo(e,t){let n;try{n=new URL(e,Cr(t,()=>window.location.href))}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return Cr(Dt([s,"optionalAccess",i=>i[1]]),()=>null)}const hi={};function jo(e){const t=hi[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return hi[e]=r.bind(window)}function Mr(...e){return jo("setTimeout")(...e)}function Go(...e){return jo("clearTimeout")(...e)}let $f=1;const Uf=new RegExp("[^a-z0-9-_:]"),Pt=-2;function os(){return $f++}function Wf(e){if(e instanceof HTMLFormElement)return"form";const t=mt(e.tagName);return Uf.test(t)?"div":t}function zf(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let nt,mi;const qf=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,jf=/^(?:[a-z+]+:)?\/\//i,Gf=/^www\..*/i,Yf=/^(data:)([^,]*),(.*)/i;function In(e,t){return(e||"").replace(qf,(n,r,s,i,o,a)=>{const c=s||o||a,u=r||i||"";if(!c)return n;if(jf.test(c)||Gf.test(c))return`url(${u}${c}${u})`;if(Yf.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${zf(t)+c}${u})`;const l=t.split("/"),d=c.split("/");l.pop();for(const f of d)f!=="."&&(f===".."?l.pop():l.push(f));return`url(${u}${l.join("/")}${u})`})}const Vf=/^[^ \t\n\r\u000c]+/,Kf=/^[, \t\n\r\u000c]+/;function Xf(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(Kf),!(n>=t.length);){let i=r(Vf);if(i.slice(-1)===",")i=st(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=st(e,i);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}function st(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function Jf(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function as(){const e=document.createElement("a");return e.href="",e.href}function Yo(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?st(e,r):n==="srcset"?Xf(e,r):n==="style"?In(r,as()):t==="object"&&n==="data"?st(e,r):typeof i=="function"?i(n,r,s):r)}function Vo(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Qf(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function Zf(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Je(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Je(e.parentNode,t,n,r+1)}function it(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Zf(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function gt(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=Je(o,it(r,s)),c<0)return!0;a=Je(o,it(t,n),c>=0?c:1/0)}else{if(a=Je(o,it(t,n)),a<0)return!1;c=Je(o,it(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function ep(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=Mr(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{Go(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return Mr(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function tp(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=Mr(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Go(i),r=!0,t()})}function np(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:m,maskInputFn:v,dataURLOptions:S={},inlineImages:I,recordCanvas:P,keepIframeSrcFn:w,newlyAddedElement:x=!1}=t,y=rp(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Z.Document,childNodes:[],compatMode:e.compatMode}:{type:Z.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Z.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return ip(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:p,maskInputFn:v,dataURLOptions:S,inlineImages:I,recordCanvas:P,keepIframeSrcFn:w,newlyAddedElement:x,rootId:y,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return sp(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:p,maskInputFn:v,rootId:y});case e.CDATA_SECTION_NODE:return{type:Z.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:Z.Comment,textContent:e.textContent||"",rootId:y};default:return!1}}function rp(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function sp(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const h=d==="STYLE"?!0:void 0,p=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(h&&f){try{e.nextSibling||e.previousSibling||Dt([e,"access",S=>S.parentNode,"access",S=>S.sheet,"optionalAccess",S=>S.cssRules])&&(f=bn(e.parentNode.sheet))}catch(S){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`,e)}f=In(f,as())}p&&(f="SCRIPT_PLACEHOLDER");const v=gt(e,r,i,s,o,n);if(!h&&!p&&!m&&f&&v&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(c.textarea||v)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const S=Fn({type:null,tagName:d,maskInputOptions:c});f=Lt({isMasked:gt(e,r,i,s,o,S),element:e,value:f,maskInputFn:u})}return{type:Z.Text,textContent:f||"",isStyle:h,rootId:l}}function ip(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m,maskAllText:v,maskTextClass:S,unmaskTextClass:I,maskTextSelector:P,unmaskTextSelector:w}=t,x=Qf(e,r,s,i),y=Wf(e);let g={};const b=e.attributes.length;for(let E=0;E<b;E++){const T=e.attributes[E];T.name&&!Vo(y,T.name,T.value)&&(g[T.name]=Yo(n,y,mt(T.name),T.value,e,c))}if(y==="link"&&o){const E=Array.from(n.styleSheets).find(N=>N.href===e.href);let T=null;E&&(T=bn(E)),T&&(delete g.rel,delete g.href,g._cssText=In(T,E.href))}if(y==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=bn(e.sheet);E&&(g._cssText=In(E,as()))}if(y==="input"||y==="textarea"||y==="select"||y==="option"){const E=e,T=is(E),N=Tn(E,Rr(y),T),Y=E.checked;if(T!=="submit"&&T!=="button"&&N){const V=gt(E,S,P,I,w,Fn({type:T,tagName:Rr(y),maskInputOptions:a}));g.value=Lt({isMasked:V,element:E,value:N,maskInputFn:u})}Y&&(g.checked=Y)}if(y==="option"&&(e.selected&&!a.select?g.selected=!0:delete g.selected),y==="canvas"&&f){if(e.__context==="2d")Hf(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const E=e.toDataURL(l.type,l.quality),T=document.createElement("canvas");T.width=e.width,T.height=e.height;const N=T.toDataURL(l.type,l.quality);E!==N&&(g.rr_dataURL=E)}}if(y==="img"&&d){nt||(nt=n.createElement("canvas"),mi=nt.getContext("2d"));const E=e,T=E.crossOrigin;E.crossOrigin="anonymous";const N=()=>{E.removeEventListener("load",N);try{nt.width=E.naturalWidth,nt.height=E.naturalHeight,mi.drawImage(E,0,0),g.rr_dataURL=nt.toDataURL(l.type,l.quality)}catch(Y){console.warn(`Cannot inline img src=${E.currentSrc}! Error: ${Y}`)}T?g.crossOrigin=T:E.removeAttribute("crossorigin")};E.complete&&E.naturalWidth!==0?N():E.addEventListener("load",N)}if((y==="audio"||y==="video")&&(g.rr_mediaState=e.paused?"paused":"played",g.rr_mediaCurrentTime=e.currentTime),p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),x){const{width:E,height:T}=e.getBoundingClientRect();g={class:g.class,rr_width:`${E}px`,rr_height:`${T}px`}}y==="iframe"&&!h(g.src)&&(!x&&!e.contentDocument&&(g.rr_src=g.src),delete g.src);let H;try{customElements.get(y)&&(H=!0)}catch{}return{type:Z.Element,tagName:y,attributes:g,childNodes:[],isSVG:Jf(e)||void 0,needBlock:x,rootId:m,isCustom:H}}function j(e){return e==null?"":e.toLowerCase()}function op(e,t){if(t.comment&&e.type===Z.Comment)return!0;if(e.type===Z.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&qo(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(j(e.attributes.name).match(/^msapplication-tile(image|color)$/)||j(e.attributes.name)==="application-name"||j(e.attributes.rel)==="icon"||j(e.attributes.rel)==="apple-touch-icon"||j(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&j(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(j(e.attributes.property).match(/^(og|twitter|fb):/)||j(e.attributes.name).match(/^(og|twitter):/)||j(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(j(e.attributes.name)==="robots"||j(e.attributes.name)==="googlebot"||j(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(j(e.attributes.name)==="author"||j(e.attributes.name)==="generator"||j(e.attributes.name)==="framework"||j(e.attributes.name)==="publisher"||j(e.attributes.name)==="progid"||j(e.attributes.property).match(/^article:/)||j(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(j(e.attributes.name)==="google-site-verification"||j(e.attributes.name)==="yandex-verification"||j(e.attributes.name)==="csrf-token"||j(e.attributes.name)==="p:domain_verify"||j(e.attributes.name)==="verify-v1"||j(e.attributes.name)==="verification"||j(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ot(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:v,maskInputFn:S,slimDOMOptions:I,dataURLOptions:P={},inlineImages:w=!1,recordCanvas:x=!1,onSerialize:y,onIframeLoad:g,iframeLoadTimeout:b=5e3,onStylesheetLoad:H,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:N=!1}=t;let{preserveWhiteSpace:Y=!0}=t;const V=np(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:v,maskInputFn:S,dataURLOptions:P,inlineImages:w,recordCanvas:x,keepIframeSrcFn:T,newlyAddedElement:N});if(!V)return console.warn(e,"not serialized"),null;let ee;r.hasNode(e)?ee=r.getId(e):op(V,I)||!Y&&V.type===Z.Text&&!V.isStyle&&!V.textContent.replace(/^\s+|\s+$/gm,"").length?ee=Pt:ee=os();const D=Object.assign(V,{id:ee});if(r.add(e,D),ee===Pt)return null;y&&y(e);let ne=!f;if(D.type===Z.Element){ne=ne&&!D.needBlock,delete D.needBlock;const z=e.shadowRoot;z&&Mt(z)&&(D.isShadowHost=!0)}if((D.type===Z.Document||D.type===Z.Element)&&ne){I.headWhitespace&&D.type===Z.Element&&D.tagName==="head"&&(Y=!1);const z={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:v,maskInputFn:S,slimDOMOptions:I,dataURLOptions:P,inlineImages:w,recordCanvas:x,preserveWhiteSpace:Y,onSerialize:y,onIframeLoad:g,iframeLoadTimeout:b,onStylesheetLoad:H,stylesheetLoadTimeout:E,keepIframeSrcFn:T};for(const le of Array.from(e.childNodes)){const we=ot(le,z);we&&D.childNodes.push(we)}if(Nf(e)&&e.shadowRoot)for(const le of Array.from(e.shadowRoot.childNodes)){const we=ot(le,z);we&&(Mt(e.shadowRoot)&&(we.isShadow=!0),D.childNodes.push(we))}}return e.parentNode&&Rt(e.parentNode)&&Mt(e.parentNode)&&(D.isShadow=!0),D.type===Z.Element&&D.tagName==="iframe"&&ep(e,()=>{const z=e.contentDocument;if(z&&g){const le=ot(z,{doc:z,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:v,maskInputFn:S,slimDOMOptions:I,dataURLOptions:P,inlineImages:w,recordCanvas:x,preserveWhiteSpace:Y,onSerialize:y,onIframeLoad:g,iframeLoadTimeout:b,onStylesheetLoad:H,stylesheetLoadTimeout:E,keepIframeSrcFn:T});le&&g(e,le)}},b),D.type===Z.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&qo(D.attributes.href)==="css")&&tp(e,()=>{if(H){const z=ot(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:v,maskInputFn:S,slimDOMOptions:I,dataURLOptions:P,inlineImages:w,recordCanvas:x,preserveWhiteSpace:Y,onSerialize:y,onIframeLoad:g,iframeLoadTimeout:b,onStylesheetLoad:H,stylesheetLoadTimeout:E,keepIframeSrcFn:T});z&&H(e,z)}},E),D}function ap(e,t){const{mirror:n=new zo,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:v,maskInputFn:S,slimDOM:I=!1,dataURLOptions:P,preserveWhiteSpace:w,onSerialize:x,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:H,keepIframeSrcFn:E=()=>!1}=t||{};return ot(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:p===!1?{}:p,maskAttributeFn:m,maskTextFn:v,maskInputFn:S,slimDOMOptions:I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:I===!1?{}:I,dataURLOptions:P,inlineImages:f,recordCanvas:h,preserveWhiteSpace:w,onSerialize:x,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:H,keepIframeSrcFn:E,newlyAddedElement:!1})}function Oe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function ae(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const rt=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let gi={map:{},getId(){return console.error(rt),-1},getNode(){return console.error(rt),null},removeNodeFromMap(){console.error(rt)},has(){return console.error(rt),!1},reset(){console.error(rt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(gi=new Proxy(gi,{get(e,t,n){return t==="map"&&console.error(rt),Reflect.get(e,t,n)}}));function Ft(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),c=this;a<=0||a>t?(r&&(hp(r),r=null),s=o,e.apply(c,i)):!r&&n.trailing!==!1&&(r=Bn(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function Ko(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){Bn(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Ko(e,t,i||{},!0)}function cs(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let wn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(wn=()=>new Date().getTime());function Xo(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:Oe([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Oe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Oe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:Oe([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Oe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Oe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Jo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Qo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Zo(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function fe(e,t,n,r,s){if(!e)return!1;const i=Zo(e);if(!i)return!1;const o=it(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=Je(i,o);let c=-1;return a<0?!1:(r&&(c=Je(i,it(null,r))),a>-1&&c<0?!0:a<c)}function cp(e,t){return t.getId(e)!==-1}function sr(e,t){return t.getId(e)===Pt}function ea(e,t){if(Rt(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?ea(e.parentNode,t):!0:!0}function xr(e){return!!e.changedTouches}function up(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function ta(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function na(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Ar(e){return!!Oe([e,"optionalAccess",t=>t.shadowRoot])}class lp{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return zc(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ra(e){let t=null;return Oe([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function dp(e){let t=e,n;for(;n=ra(t);)t=n;return t}function fp(e){const t=e.ownerDocument;if(!t)return!1;const n=dp(e);return t.contains(n)}function sa(e){const t=e.ownerDocument;return t?t.contains(e)||fp(e):!1}const _i={};function us(e){const t=_i[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return _i[e]=r.bind(window)}function pp(...e){return us("requestAnimationFrame")(...e)}function Bn(...e){return us("setTimeout")(...e)}function hp(...e){return us("clearTimeout")(...e)}var L=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(L||{}),M=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(M||{}),oe=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(oe||{}),ke=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ke||{});function mp(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function yi(e){return"__ln"in e}class gp{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=mp([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&yi(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&yi(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Si=(e,t)=>`${e}@${t}`;class _p{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new gp,s=c=>{let u=c,l=Pt;for(;l===Pt;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},i=c=>{if(!c.parentNode||!sa(c))return;const u=Rt(c.parentNode)?this.mirror.getId(ra(c)):this.mirror.getId(c.parentNode),l=s(c);if(u===-1||l===-1)return r.addNode(c);const d=ot(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{ta(f,this.mirror)&&!fe(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),na(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Ar(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{fe(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,h),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)}});d&&(t.push({parentId:u,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Ei(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!vi(this.droppedSet,c)&&!Ei(this.removes,c,this.mirror)||vi(this.movedSet,c)?i(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){const u=this.mirror.getId(o.value.parentNode),l=s(o.value);u!==-1&&l!==-1&&(c=o)}if(!c){let u=r.tail;for(;u;){const l=u;if(u=u.previous,l){const d=this.mirror.getId(l.value.parentNode);if(s(l.value)===-1)continue;if(d!==-1){c=l;break}else{const h=l.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=h.parentNode.host;if(this.mirror.getId(p)!==-1){c=l;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}o=c.previous,r.removeNode(c.value),i(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const l=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+d).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!sr(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:gt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Zo(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=is(n),a=n.tagName;s=Tn(n,a,o);const c=Fn({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=gt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=Lt({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Vo(n.tagName,r)&&(i.attributes[r]=Yo(this.doc,mt(n.tagName),mt(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=Rt(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||sr(n,this.mirror)||!cp(n,this.mirror)||(this.addedSet.has(n)?(Nr(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||ea(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Si(r,s)]?Nr(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Rt(t.target)&&Mt(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(sr(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Si(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);fe(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),Ar(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Nr(e,t){e.delete(t),t.childNodes.forEach(n=>Nr(e,n))}function Ei(e,t,n){return e.length===0?!1:ia(e,t,n)}function ia(e,t,n){const{parentNode:r}=t;if(!r)return!1;const s=n.getId(r);return e.some(i=>i.id===s)?!0:ia(e,r,n)}function vi(e,t){return e.size===0?!1:oa(e,t)}function oa(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:oa(e,n):!1}let xt;function yp(e){xt=e}function Sp(){xt=void 0}const B=e=>xt?(...n)=>{try{return e(...n)}catch(r){if(xt&&xt(r)===!0)return()=>{};throw r}}:e;function Se(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const at=[];function Yt(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function aa(e,t){const n=new _p;at.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=Se([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(B(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Ep({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const c=Ft(B(d=>{const f=Date.now()-a;e(o.map(h=>(h.timeOffset-=f,h)),d),o=[],a=null}),i),u=B(Ft(B(d=>{const f=Yt(d),{clientX:h,clientY:p}=xr(d)?d.changedTouches[0]:d;a||(a=wn()),o.push({x:h,y:p,id:r.getId(f),timeOffset:wn()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?M.Drag:d instanceof MouseEvent?M.MouseMove:M.TouchMove)}),s,{trailing:!1})),l=[ae("mousemove",u,n),ae("touchmove",u,n),ae("drag",u,n)];return B(()=>{l.forEach(d=>d())})}function vp({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[];let u=null;const l=d=>f=>{const h=Yt(f);if(fe(h,r,s,i,!0))return;let p=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":p=ke.Mouse;break;case"touch":p=ke.Touch;break;case"pen":p=ke.Pen;break}p===ke.Touch?oe[d]===oe.MouseDown?m="TouchStart":oe[d]===oe.MouseUp&&(m="TouchEnd"):ke.Pen}else xr(f)&&(p=ke.Touch);p!==null?(u=p,(m.startsWith("Touch")&&p===ke.Touch||m.startsWith("Mouse")&&p===ke.Mouse)&&(p=null)):oe[d]===oe.Click&&(p=u,u=null);const v=xr(f)?f.changedTouches[0]:f;if(!v)return;const S=n.getId(h),{clientX:I,clientY:P}=v;B(e)({type:oe[m],id:S,x:I,y:P,...p!==null&&{pointerType:p}})};return Object.keys(oe).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=mt(d);const h=l(d);if(window.PointerEvent)switch(oe[d]){case oe.MouseDown:case oe.MouseUp:f=f.replace("mouse","pointer");break;case oe.TouchStart:case oe.TouchEnd:return}c.push(ae(f,h,t))}),B(()=>{c.forEach(d=>d())})}function ca({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=B(Ft(B(c=>{const u=Yt(c);if(!u||fe(u,r,s,i,!0))return;const l=n.getId(u);if(u===t&&t.defaultView){const d=Xo(t.defaultView);e({id:l,x:d.left,y:d.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return ae("scroll",a,t)}function bp({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=B(Ft(B(()=>{const i=Jo(),o=Qo();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return ae("resize",s,t)}const Tp=["INPUT","TEXTAREA","SELECT"],bi=new WeakMap;function Ip({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m}){function v(g){let b=Yt(g);const H=g.isTrusted,E=b&&Rr(b.tagName);if(E==="OPTION"&&(b=b.parentElement),!b||!E||Tp.indexOf(E)<0||fe(b,r,s,i,!0))return;const T=b;if(T.classList.contains(o)||a&&T.matches(a))return;const N=is(b);let Y=Tn(T,E,N),V=!1;const ee=Fn({maskInputOptions:c,tagName:E,type:N}),D=gt(b,f,p,h,m,ee);(N==="radio"||N==="checkbox")&&(V=b.checked),Y=Lt({isMasked:D,element:b,value:Y,maskInputFn:u}),S(b,d?{text:Y,isChecked:V,userTriggered:H}:{text:Y,isChecked:V});const ne=b.name;N==="radio"&&ne&&V&&t.querySelectorAll(`input[type="radio"][name="${ne}"]`).forEach(z=>{if(z!==b){const le=Lt({isMasked:D,element:z,value:Tn(z,E,N),maskInputFn:u});S(z,d?{text:le,isChecked:!V,userTriggered:!1}:{text:le,isChecked:!V})}})}function S(g,b){const H=bi.get(g);if(!H||H.text!==b.text||H.isChecked!==b.isChecked){bi.set(g,b);const E=n.getId(g);B(e)({...b,id:E})}}const P=(l.input==="last"?["change"]:["input","change"]).map(g=>ae(g,B(v),t)),w=t.defaultView;if(!w)return()=>{P.forEach(g=>g())};const x=w.Object.getOwnPropertyDescriptor(w.HTMLInputElement.prototype,"value"),y=[[w.HTMLInputElement.prototype,"value"],[w.HTMLInputElement.prototype,"checked"],[w.HTMLSelectElement.prototype,"value"],[w.HTMLTextAreaElement.prototype,"value"],[w.HTMLSelectElement.prototype,"selectedIndex"],[w.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&P.push(...y.map(g=>Ko(g[0],g[1],{set(){B(v)({target:this,isTrusted:!1})}},!1,w))),B(()=>{P.forEach(g=>g())})}function kn(e){const t=[];function n(r,s){if(an("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||an("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||an("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||an("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function De(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function wp({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:B((l,d,f)=>{const[h,p]=f,{id:m,styleId:v}=De(d,t,n.styleMirror);return(m&&m!==-1||v&&v!==-1)&&e({id:m,styleId:v,adds:[{rule:h,index:p}]}),l.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:B((l,d,f)=>{const[h]=f,{id:p,styleId:m}=De(d,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,removes:[{index:h}]}),l.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:B((l,d,f)=>{const[h]=f,{id:p,styleId:m}=De(d,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replace:h}),l.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:B((l,d,f)=>{const[h]=f,{id:p,styleId:m}=De(d,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replaceSync:h}),l.apply(d,f)})}));const c={};cn("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(cn("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),cn("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),cn("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([l,d])=>{u[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[l].insertRule,{apply:B((f,h,p)=>{const[m,v]=p,{id:S,styleId:I}=De(h.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||I&&I!==-1)&&e({id:S,styleId:I,adds:[{rule:m,index:[...kn(h),v||0]}]}),f.apply(h,p)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:B((f,h,p)=>{const[m]=p,{id:v,styleId:S}=De(h.parentStyleSheet,t,n.styleMirror);return(v&&v!==-1||S&&S!==-1)&&e({id:v,styleId:S,removes:[{index:[...kn(h),m]}]}),f.apply(h,p)})})}),B(()=>{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(([l,d])=>{d.prototype.insertRule=u[l].insertRule,d.prototype.deleteRule=u[l].deleteRule})})}function ua({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?Se([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):Se([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=Se([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(Se([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Se([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=Se([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),B(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function kp({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:B((a,c,u)=>{const[l,d,f]=u;if(n.has(l))return i.apply(c,[l,d,f]);const{id:h,styleId:p}=De(Se([c,"access",m=>m.parentRule,"optionalAccess",m=>m.parentStyleSheet]),t,r.styleMirror);return(h&&h!==-1||p&&p!==-1)&&e({id:h,styleId:p,set:{property:l,value:d,priority:f},index:kn(c.parentRule)}),a.apply(c,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:B((a,c,u)=>{const[l]=u;if(n.has(l))return o.apply(c,[l]);const{id:d,styleId:f}=De(Se([c,"access",h=>h.parentRule,"optionalAccess",h=>h.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:l},index:kn(c.parentRule)}),a.apply(c,u)})}),B(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Cp({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=B(u=>Ft(B(l=>{const d=Yt(l);if(!d||fe(d,t,n,r,!0))return;const{currentTime:f,volume:h,muted:p,playbackRate:m}=d;e({type:u,id:s.getId(d),currentTime:f,volume:h,muted:p,playbackRate:m})}),i.media||500)),c=[ae("play",a(0),o),ae("pause",a(1),o),ae("seeked",a(2),o),ae("volumechange",a(3),o),ae("ratechange",a(4),o)];return B(()=>{c.forEach(u=>u())})}function Rp({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,l){const d=new i(c,u,l);return s.set(d,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=cs(t.fonts,"add",function(a){return function(c){return Bn(B(()=>{const u=s.get(c);u&&(e(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(o),B(()=>{r.forEach(a=>a())})}function Mp(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const c=B(()=>{const u=t.getSelection();if(!u||a&&Se([u,"optionalAccess",f=>f.isCollapsed]))return;a=u.isCollapsed||!1;const l=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const h=u.getRangeAt(f),{startContainer:p,startOffset:m,endContainer:v,endOffset:S}=h;fe(p,r,s,i,!0)||fe(v,r,s,i,!0)||l.push({start:n.getId(p),startOffset:m,end:n.getId(v),endOffset:S})}o({ranges:l})});return c(),ae("selectionchange",c)}function xp({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:cs(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function Ap(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=aa(e,e.doc));const s=Ep(e),i=vp(e),o=ca(e),a=bp(e,{win:n}),c=Ip(e),u=Cp(e);let l=()=>{},d=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(l=wp(e,{win:n}),d=ua(e,e.doc),f=kp(e,{win:n}),e.collectFonts&&(h=Rp(e)));const p=Mp(e),m=xp(e),v=[];for(const S of e.plugins)v.push(S.observer(S.callback,n,S.options));return B(()=>{at.forEach(S=>S.reset()),Se([r,"optionalAccess",S=>S.disconnect,"call",S=>S()]),s(),i(),o(),a(),c(),u(),l(),d(),f(),h(),p(),m(),v.forEach(S=>S())})}function an(e){return typeof window[e]<"u"}function cn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Or{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}function Ti(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}class Np{constructor(){this.crossOriginIframeMirror=new Or(os),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Op{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Or(os),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Or(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Ti([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:L.IncrementalSnapshot,data:{source:M.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return n;case L.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case L.IncrementalSnapshot:switch(n.data.source){case M.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case M.Drag:case M.TouchMove:case M.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case M.ViewportResize:return!1;case M.MediaInteraction:case M.MouseInteraction:case M.Scroll:case M.CanvasMutation:case M.Input:return this.replaceIds(n.data,t,["id"]),n;case M.StyleSheetRule:case M.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case M.Font:return n;case M.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case M.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),Ti([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Z.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Dp{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Lp{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Mt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=aa({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ca({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Bn(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(ua({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(cs(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&sa(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class Ii{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Pp{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new lp,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:Wo(a),index:c}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Fp{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){pp(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let J,Cn;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=pe([e,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ye=Bf();function Me(e={}){const{emit:t,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:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:v,slimDOMOptions:S,maskAttributeFn:I,maskInputFn:P,maskTextFn:w,maxCanvasSize:x=null,packFn:y,sampling:g={},dataURLOptions:b={},mousemoveWait:H,recordDOM:E=!0,recordCanvas:T=!1,recordCrossOriginIframes:N=!1,recordAfter:Y=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:ee=!1,inlineImages:D=!1,plugins:ne,keepIframeSrcFn:z=()=>!1,ignoreCSSAttributes:le=new Set([]),errorHandler:we,onMutation:ys,getCanvasManager:Fa}=e;yp(we);const qn=N?window.parent===window:!0;let Kt=!1;if(!qn)try{window.parent.document&&(Kt=!1)}catch{Kt=!0}if(qn&&!t)throw new Error("emit function is required");H!==void 0&&g.mousemove===void 0&&(g.mousemove=H),ye.reset();const jn=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:v!==void 0?v:{},Gn=S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:S==="all",headMetaDescKeywords:S==="all"}:S||{};up();let Yn,Vn=0;const Ss=U=>{for(const _e of ne||[])_e.eventProcessor&&(U=_e.eventProcessor(U));return y&&!Kt&&(U=y(U)),U};J=(U,_e)=>{const F=U;if(F.timestamp=wn(),pe([at,"access",K=>K[0],"optionalAccess",K=>K.isFrozen,"call",K=>K()])&&F.type!==L.FullSnapshot&&!(F.type===L.IncrementalSnapshot&&F.data.source===M.Mutation)&&at.forEach(K=>K.unfreeze()),qn)pe([t,"optionalCall",K=>K(Ss(F),_e)]);else if(Kt){const K={type:"rrweb",event:Ss(F),origin:window.location.origin,isCheckout:_e};window.parent.postMessage(K,"*")}if(F.type===L.FullSnapshot)Yn=F,Vn=0;else if(F.type===L.IncrementalSnapshot){if(F.data.source===M.Mutation&&F.data.isAttachIframe)return;Vn++;const K=r&&Vn>=r,W=n&&Yn&&F.timestamp-Yn.timestamp>n;(K||W)&&Jn(!0)}};const Xt=U=>{J({type:L.IncrementalSnapshot,data:{source:M.Mutation,...U}})},Es=U=>J({type:L.IncrementalSnapshot,data:{source:M.Scroll,...U}}),Ba=U=>J({type:L.IncrementalSnapshot,data:{source:M.CanvasMutation,...U}}),Ha=U=>J({type:L.IncrementalSnapshot,data:{source:M.AdoptedStyleSheet,...U}}),Ye=new Pp({mutationCb:Xt,adoptedStyleSheetCb:Ha}),Ve=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Np:new Op({mirror:ye,mutationCb:Xt,stylesheetManager:Ye,recordCrossOriginIframes:N,wrappedEmit:J});for(const U of ne||[])U.getMirror&&U.getMirror({nodeMirror:ye,crossOriginIframeMirror:Ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ve.crossOriginIframeStyleMirror});const Kn=new Fp,Xn=Hp(Fa,{mirror:ye,win:window,mutationCb:U=>J({type:L.IncrementalSnapshot,data:{source:M.CanvasMutation,...U}}),recordCanvas:T,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:x,sampling:g.canvas,dataURLOptions:b,errorHandler:we}),Jt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Dp:new Lp({mutationCb:Xt,scrollCb:Es,bypassOptions:{onMutation:ys,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:jn,dataURLOptions:b,maskAttributeFn:I,maskTextFn:w,maskInputFn:P,recordCanvas:T,inlineImages:D,sampling:g,slimDOMOptions:Gn,iframeManager:Ve,stylesheetManager:Ye,canvasManager:Xn,keepIframeSrcFn:z,processedNodeManager:Kn},mirror:ye}),Jn=(U=!1)=>{if(!E)return;J({type:L.Meta,data:{href:window.location.href,width:Qo(),height:Jo()}},U),Ye.reset(),Jt.init(),at.forEach(F=>F.lock());const _e=ap(document,{mirror:ye,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:jn,maskAttributeFn:I,maskInputFn:P,maskTextFn:w,slimDOM:Gn,dataURLOptions:b,recordCanvas:T,inlineImages:D,onSerialize:F=>{ta(F,ye)&&Ve.addIframe(F),na(F,ye)&&Ye.trackLinkElement(F),Ar(F)&&Jt.addShadowRoot(F.shadowRoot,document)},onIframeLoad:(F,K)=>{Ve.attachIframe(F,K),F.contentWindow&&Xn.addWindow(F.contentWindow),Jt.observeAttachShadow(F)},onStylesheetLoad:(F,K)=>{Ye.attachLinkElement(F,K)},keepIframeSrcFn:z});if(!_e)return console.warn("Failed to snapshot the document");J({type:L.FullSnapshot,data:{node:_e,initialOffset:Xo(window)}}),at.forEach(F=>F.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ye.adoptStyleSheets(document.adoptedStyleSheets,ye.getId(document))};Cn=Jn;try{const U=[],_e=K=>B(Ap)({onMutation:ys,mutationCb:Xt,mousemoveCb:(W,Ke)=>J({type:L.IncrementalSnapshot,data:{source:Ke,positions:W}}),mouseInteractionCb:W=>J({type:L.IncrementalSnapshot,data:{source:M.MouseInteraction,...W}}),scrollCb:Es,viewportResizeCb:W=>J({type:L.IncrementalSnapshot,data:{source:M.ViewportResize,...W}}),inputCb:W=>J({type:L.IncrementalSnapshot,data:{source:M.Input,...W}}),mediaInteractionCb:W=>J({type:L.IncrementalSnapshot,data:{source:M.MediaInteraction,...W}}),styleSheetRuleCb:W=>J({type:L.IncrementalSnapshot,data:{source:M.StyleSheetRule,...W}}),styleDeclarationCb:W=>J({type:L.IncrementalSnapshot,data:{source:M.StyleDeclaration,...W}}),canvasMutationCb:Ba,fontCb:W=>J({type:L.IncrementalSnapshot,data:{source:M.Font,...W}}),selectionCb:W=>{J({type:L.IncrementalSnapshot,data:{source:M.Selection,...W}})},customElementCb:W=>{J({type:L.IncrementalSnapshot,data:{source:M.CustomElement,...W}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:jn,inlineStylesheet:p,sampling:g,recordDOM:E,recordCanvas:T,inlineImages:D,userTriggeredOnInput:V,collectFonts:ee,doc:K,maskAttributeFn:I,maskInputFn:P,maskTextFn:w,keepIframeSrcFn:z,blockSelector:i,unblockSelector:o,slimDOMOptions:Gn,dataURLOptions:b,mirror:ye,iframeManager:Ve,stylesheetManager:Ye,shadowDomManager:Jt,processedNodeManager:Kn,canvasManager:Xn,ignoreCSSAttributes:le,plugins:pe([ne,"optionalAccess",W=>W.filter,"call",W=>W(Ke=>Ke.observer),"optionalAccess",W=>W.map,"call",W=>W(Ke=>({observer:Ke.observer,options:Ke.options,callback:$a=>J({type:L.Plugin,data:{plugin:Ke.name,payload:$a}})}))])||[]},{});Ve.addLoadListener(K=>{try{U.push(_e(K.contentDocument))}catch(W){console.warn(W)}});const F=()=>{Jn(),U.push(_e(document))};return document.readyState==="interactive"||document.readyState==="complete"?F():(U.push(ae("DOMContentLoaded",()=>{J({type:L.DomContentLoaded,data:{}}),Y==="DOMContentLoaded"&&F()})),U.push(ae("load",()=>{J({type:L.Load,data:{}}),Y==="load"&&F()},window))),()=>{U.forEach(K=>K()),Kn.destroy(),Cn=void 0,Sp()}}catch(U){console.warn(U)}}function Bp(e){if(!Cn)throw new Error("please take full snapshot after start recording");Cn(e)}Me.mirror=ye;Me.takeFullSnapshot=Bp;function Hp(e,t){try{return e?e(t):new Ii}catch{return console.warn("Unable to initialize CanvasManager"),new Ii}}const k=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,wi=["info","warn","error","log"],mn="[Replay] ";function ir(e,t="info"){ze({category:"console",data:{logger:"replay"},level:t,message:`${mn}${e}`},{level:t})}function $p(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=r.captureExceptions,t=r.traceInternals}};return k?(wi.forEach(r=>{n[r]=(...s)=>{_[r](mn,...s),t&&ir(s.join(""),oo(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),_.error(mn,r),e?Vi(r):t&&ir(r,"error")},n.infoTick=(...r)=>{_.info(mn,...r),t&&setTimeout(()=>ir(r[0]),0)}):wi.forEach(r=>{n[r]=()=>{}}),n}const C=$p(),Up=3,Wp=5;function ls(e){return e>9999999999?e:e*1e3}function or(e){return e>9999999999?e/1e3:e}function Vt(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:L.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:$r(t,10,1e3)}}),t.category==="console")))}const zp="button,a";function la(e){return e.closest(zp)||e}function da(e){const t=fa(e);return!t||!(t instanceof Element)?t:la(t)}function fa(e){return qp(e)?e.target:e}function qp(e){return typeof e=="object"&&!!e&&"target"in e}let Le;function jp(e){return Le||(Le=[],Gp()),Le.push(e),()=>{const t=Le?Le.indexOf(e):-1;t>-1&&Le.splice(t,1)}}function Gp(){de(G,"open",function(e){return function(...t){if(Le)try{Le.forEach(n=>n())}catch{}return e.apply(G,t)}})}const Yp=new Set([M.Mutation,M.StyleSheetRule,M.StyleDeclaration,M.AdoptedStyleSheet,M.CanvasMutation,M.Selection,M.MediaInteraction]);function Vp(e,t,n){e.handleClick(t,n)}class Kp{constructor(t,n,r=Vt){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=jp(()=>{this._lastMutation=ki()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(Jp(n,this._ignoreSelector)||!Qp(t))return;const r={timestamp:or(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=or(t)}registerScroll(t=Date.now()){this._lastScroll=or(t)}registerClick(t){const n=la(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=ki();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:G.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,l);return}if(o>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:G.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=ht(()=>this._checkClicks(),1e3)}}const Xp=["A","BUTTON","INPUT"];function Jp(e,t){return!!(!Xp.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function Qp(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function ki(){return Date.now()/1e3}function Zp(e,t){try{if(!eh(t))return;const{source:n}=t.data;if(Yp.has(n)&&e.registerMutation(t.timestamp),n===M.Scroll&&e.registerScroll(t.timestamp),th(t)){const{type:r,id:s}=t.data,i=Me.mirror.getNode(s);i instanceof HTMLElement&&r===oe.Click&&e.registerClick(i)}}catch{}}function eh(e){return e.type===Up}function th(e){return e.data.source===M.MouseInteraction}function Ie(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Rn;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Rn||(Rn={}));const nh=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function rh(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(nh.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const sh=e=>t=>{if(!e.isEnabled())return;const n=ih(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Vp(e.clickDetector,n,da(t.event)),Vt(e,n)};function pa(e,t){const n=Me.mirror.getId(e),r=n&&Me.mirror.getNode(n),s=r&&Me.mirror.getMeta(r),i=s&&ah(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===Rn.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:rh(i.attributes)}}:{}}}function ih(e){const{target:t,message:n}=oh(e);return Ie({category:`ui.${e.name}`,...pa(t,n)})}function oh(e){const t=e.name==="click";let n,r=null;try{r=t?da(e.event):fa(e.event),n=We(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function ah(e){return e.type===Rn.Element}function ch(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=uh(t);n&&Vt(e,n)}function uh(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||lh(o)||!i)return null;const a=t||r||s,c=i.length===1;if(!a&&c)return null;const u=We(o,{maxStringLength:200})||"<unknown>",l=pa(o,u);return Ie({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function lh(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const dh={resource:gh,paint:hh,navigation:mh};function un(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function fh(e){return e.map(ph).filter(Boolean)}function ph(e){const t=dh[e.entryType];return t?t(e):null}function _t(e){return((ue||G.performance.timeOrigin)+e)/1e3}function hh(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=_t(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function mh(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:f,startTime:h,transferSize:p,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:_t(h),end:_t(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:f}}}function gh(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:_t(i),end:_t(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function _h(e){const t=e.entries[e.entries.length-1],n=t&&t.element?[t.element]:void 0;return Hn(e,"largest-contentful-paint",n)}function yh(e){return e.sources!==void 0}function Sh(e){const t=[],n=[];for(const r of e.entries)if(yh(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Me.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return Hn(e,"cumulative-layout-shift",n,t)}function Eh(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return Hn(e,"first-input-delay",n)}function vh(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return Hn(e,"interaction-to-next-paint",n)}function Hn(e,t,n,r){const s=e.value,i=e.rating,o=_t(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>Me.mirror.getId(a)):void 0,attributions:r}}}function bh(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(ft(s,n))}),r.push(Ao(un(_h,e)),es(un(Sh,e)),No(un(Eh,e)),Oo(un(vh,e))),()=>{r.forEach(s=>s())}}const Th='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(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},A=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},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),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=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+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(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(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;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(J)return J.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Ih(){const e=new Blob([Th]);return URL.createObjectURL(e)}class ds extends Error{constructor(){super(`Event buffer exceeded maximum size of ${ss}.`)}}class ha{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>ss)throw new ds;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?ls(t):null}}class wh{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){k&&C.info("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){k&&C.error("Error in compression worker: ",c.response),i(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class kh{constructor(t){this._worker=new wh(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=ls(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>ss?Promise.reject(new ds):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{k&&C.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Ch{constructor(t){this._fallback=new ha,this._compression=new kh(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){k&&C.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){k&&C.exception(s,"Failed to add events when switching buffers.")}}}function Rh({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Mh(t);if(n)return n}return k&&C.info("Using simple buffer"),new ha}function Mh(e){try{const t=e||xh();if(!t)return;k&&C.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Ch(n)}catch(t){k&&C.exception(t,"Failed to create compression worker")}}function xh(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Ih():""}function fs(){try{return"sessionStorage"in G&&!!G.sessionStorage}catch{return!1}}function Ah(e){Nh(),e.session=void 0}function Nh(){if(fs())try{G.sessionStorage.removeItem(ns)}catch{}}function ma(e){return e===void 0?!1:Math.random()<e}function ga(e){const t=Date.now(),n=e.id||Re(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function ps(e){if(fs())try{G.sessionStorage.setItem(ns,JSON.stringify(e))}catch{}}function Oh(e,t){return ma(e)?"session":t?"buffer":!1}function Ci({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Oh(e,t),i=ga({sampled:s,previousSessionId:r});return n&&ps(i),i}function Dh(){if(!fs())return null;try{const e=G.sessionStorage.getItem(ns);if(!e)return null;const t=JSON.parse(e);return k&&C.infoTick("Loading existing session"),ga(t)}catch{return null}}function Dr(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function _a(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Dr(e.started,t,r)||Dr(e.lastActivity,n,r)}function ya(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!_a(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function ar({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&Dh();return s?ya(s,{sessionIdleExpire:e,maxReplayDuration:t})?(k&&C.infoTick("Session in sessionStorage is expired, creating new one..."),Ci(r,{previousSessionId:s.id})):s:(k&&C.infoTick("Creating new session"),Ci(r,{previousSessionId:n}))}function Lh(e){return e.type===L.Custom}function hs(e,t,n){return Ea(e,t)?(Sa(e,t,n),!0):!1}function Ph(e,t,n){return Ea(e,t)?Sa(e,t,n):Promise.resolve(null)}async function Sa(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),s=Fh(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof ds?"addEventSizeExceeded":"addEvent";e.handleException(r),await e.stop({reason:s});const i=$();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function Ea(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=ls(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(k&&C.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Fh(e,t){try{if(typeof t=="function"&&Lh(e))return t(e)}catch(n){return k&&C.exception(n,"An error occured in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function ms(e){return!e.type}function Lr(e){return e.type==="transaction"}function Bh(e){return e.type==="replay_event"}function Ri(e){return e.type==="feedback"}function Hh(e){return(t,n)=>{if(!e.isEnabled()||!ms(t)&&!Lr(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(Lr(t)){$h(e,t);return}Uh(e,t)}}}function $h(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Uh(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||ht(()=>{e.sendBufferedReplayOrFlush()})}function Wh(e){return t=>{!e.isEnabled()||!ms(t)||zh(e,t)}}function zh(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=Ie({category:"replay.hydrate-error",data:{url:Qi()}});Vt(e,r)}}function qh(e){const t=$();t&&t.on("beforeAddBreadcrumb",n=>jh(e,n))}function jh(e,t){if(!e.isEnabled()||!va(t))return;const n=Gh(t);n&&Vt(e,n)}function Gh(e){return!va(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?Yh(e):Ie(e)}function Yh(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Ie(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>on?(n=!0,`${s.slice(0,on)}…`):s;if(typeof s=="object")try{const i=$r(s,7);return JSON.stringify(i).length>on?(n=!0,`${JSON.stringify(i,null,2).slice(0,on)}…`):i}catch{}return s});return Ie({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function va(e){return!!e.category}function Vh(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function Kh(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:L.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function Xh(e,t){return e.recordingMode!=="buffer"||t.message===rs||!t.exception||t.type?!1:ma(e.getOptions().errorSampleRate)}function Jh(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:Bh(t)?(delete t.breadcrumbs,t):!ms(t)&&!Lr(t)&&!Ri(t)||!e.checkAndHandleExpiredSession()?t:Ri(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Kh(e,t),t):Vh(t,n)&&!e.getOptions()._experiments.captureExceptions?(k&&C.log("Ignoring error from rrweb internals",t),null):((Xh(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t),{id:"Replay"})}function $n(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:L.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function Qh(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Zh(e){return t=>{if(!e.isEnabled())return;const n=Qh(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>($n(e,[n]),!1)))}}function em(e,t){return k&&e.getOptions()._experiments.traceInternals?!1:Cu(t,$())}function ba(e,t){e.isEnabled()&&t!==null&&(em(e,t.name)||e.addUpdate(()=>($n(e,[t]),!0)))}function Un(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=ka(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Ta(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Ia(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ka(e)];if(!e)return[void 0]}catch(t){return k&&C.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return k&&C.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Mn(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function wa(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:Ae({method:i,statusCode:o,request:a,response:c})}}function Bt(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function He(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=tm(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function Pr(e,t){return Object.entries(e).reduce((n,[r,s])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=s),n},{})}function ka(e){return new URLSearchParams(e).toString()}function tm(e){if(!e||typeof e!="string")return{body:e};const t=e.length>di,n=nm(e);if(t){const r=e.slice(0,di);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function nm(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function xn(e,t){const n=rm(e);return Be(n,t)}function rm(e,t=G.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(G.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function sm(e,t,n){try{const r=await om(e,t,n),s=wa("resource.fetch",r);ba(n.replay,s)}catch(r){k&&C.exception(r,"Failed to capture fetch breadcrumb")}}function im(e,t){const{input:n,response:r}=t,s=n?Ca(n):void 0,i=Un(s),o=r?Ta(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function om(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=xn(o,n.networkDetailAllowUrls)&&!xn(o,n.networkDetailDenyUrls),f=d?am(n,t.input,u):Bt(u),h=await cm(d,n,t.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:f,response:h}}function am({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?dm(n,t):{};if(!e)return He(s,r,void 0);const i=Ca(n),[o,a]=Ia(i),c=He(s,r,o);return a?Mn(c,a):c}async function cm(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return Bt(s);const i=r?Ra(r.headers,n):{};if(!r||!t&&s!==void 0)return He(i,s,void 0);const[o,a]=await lm(r),c=um(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?Mn(c,a):c}function um(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e&&e.length&&n===void 0?Un(e):n;return r?t?He(s,i,e):He(s,i,void 0):Bt(i)}catch(i){return k&&C.exception(i,"Failed to serialize response body"),He(s,n,void 0)}}async function lm(e){const t=fm(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await pm(t)]}catch(n){return k&&C.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"]}}function Ca(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Ra(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function dm(e,t){return e.length===1&&typeof e[0]!="string"?Mi(e[0],t):e.length===2?Mi(e[1],t):{}}function Mi(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Ra(n,t):Array.isArray(n)?{}:Pr(n,t):{}}function fm(e){try{return e.clone()}catch(t){k&&C.exception(t,"Failed to clone response body")}}function pm(e){return new Promise((t,n)=>{const r=ht(()=>n(new Error("Timeout while trying to read response body")),500);hm(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function hm(e){return await e.text()}async function mm(e,t,n){try{const r=_m(e,t,n),s=wa("resource.xhr",r);ba(n.replay,s)}catch(r){k&&C.exception(r,"Failed to capture xhr breadcrumb")}}function gm(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Un(r),i=n.getResponseHeader("content-length")?Ta(n.getResponseHeader("content-length")):vm(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function _m(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!a||!xn(c,n.networkDetailAllowUrls)||xn(c,n.networkDetailDenyUrls)){const y=Bt(d),g=Bt(f);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:y,response:g}}const h=a[Xe],p=h?Pr(h.request_headers,n.networkRequestHeaders):{},m=Pr(ym(a),n.networkResponseHeaders),[v,S]=n.networkCaptureBodies?Ia(o):[void 0],[I,P]=n.networkCaptureBodies?Sm(a):[void 0],w=He(p,d,v),x=He(m,f,I);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:S?Mn(w,S):w,response:P?Mn(x,P):x}}function ym(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function Sm(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Em(e.response,e.responseType)}catch(n){t.push(n)}return k&&C.warn("Failed to get xhr response body",...t),[void 0]}function Em(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return k&&C.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return k&&C.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function vm(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Un(n)}catch{return}}function bm(e){const t=$();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(c,u)=>Tm(a,c,u))}catch{}}function Tm(e,t,n){if(t.data)try{Im(t)&&km(n)&&(gm(t,n),mm(t,n,e)),wm(t)&&Cm(n)&&(im(t,n),sm(t,n,e))}catch(r){k&&C.exception(r,"Error when enriching network breadcrumb")}}function Im(e){return e.category==="xhr"}function wm(e){return e.category==="fetch"}function km(e){return e&&e.xhr}function Cm(e){return e&&e.response}function Rm(e){const t=$();Fo(sh(e)),Pn(Zh(e)),qh(e),bm(e);const n=Jh(e);ac(n),t&&(t.on("beforeSendEvent",Wh(e)),t.on("afterSendEvent",Hh(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",(r,s)=>{const i=e.getSessionId();s&&s.includeReplay&&e.isEnabled()&&i&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=i)}))}async function Mm(e){try{return Promise.all($n(e,[xm(G.performance.memory)]))}catch{return[]}}function xm(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Am(e,t,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function l(){return s&&clearTimeout(s),s=ht(a,t),o&&i===void 0&&(i=ht(a,o)),r}return l.cancel=c,l.flush=u,l}function Nm(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){k&&C.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&Zp(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!hs(e,n,s))return!0;if(!s)return!1;const i=e.session;if(Dm(e,s),i&&i.previousSessionId)return!0;if(e.recordingMode==="buffer"&&i&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(k&&C.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&ps(i))}return e.recordingMode==="session"&&e.flush(),!0})}}function Om(e){const t=e.getOptions();return{type:L.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function Dm(e,t){!t||!e.session||e.session.segmentId!==0||hs(e,Om(e),!1)}function Lm(e,t,n,r){return et(ao(e,Vr(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Pm({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function Fm({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit("preprocessEvent",r,i);const o=await Wi(e.getOptions(),r,i,t,e,Ze());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function Bm({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=Pm({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=$(),f=te(),h=d&&d.getTransport(),p=d&&d.getDsn();if(!d||!h||!p||!i.sampled)return xe({});const m={type:Ef,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},v=await Fm({scope:f,client:d,replayId:t,event:m});if(!v)return d.recordDroppedEvent("event_processor","replay",m),k&&C.info("An event processor returned `null`, will not send event."),xe({});delete v.sdkProcessingMetadata;const S=Lm(v,o,p,d.getOptions().tunnel);let I;try{I=await h.send(S)}catch(w){const x=new Error(rs);try{x.cause=w}catch{}throw x}if(typeof I.statusCode=="number"&&(I.statusCode<200||I.statusCode>=300))throw new Ma(I.statusCode);const P=uo({},I);if(co(P,"replay"))throw new gs(P);return I}class Ma extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class gs extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function xa(e,t={count:0,interval:kf}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Bm(e),!0}catch(s){if(s instanceof Ma||s instanceof gs)throw s;if(cc("Replays",{_retryCount:t.count}),r&&r(s),t.count>=Cf){const i=new Error(`${rs} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{ht(async()=>{try{await xa(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const Aa="__THROTTLED",Hm="__SKIPPED";function $m(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0);let o=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),i()>=t){const l=o;return o=!0,l?Hm:Aa}o=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class Pe{constructor({options:t,recordingOptions:n}){Pe.prototype.__init.call(this),Pe.prototype.__init2.call(this),Pe.prototype.__init3.call(this),Pe.prototype.__init4.call(this),Pe.prototype.__init5.call(this),Pe.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:vf,sessionIdleExpire:bf},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=Am(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=$m((o,a)=>Ph(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(Rf,r),timeout:r,scrollTimeout:Mf,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new Kp(this,i)),k){const o=t._experiments;C.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){k&&C.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){k&&C.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",k&&C.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){k&&C.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){k&&C.info("Buffering is in progress, call `flush()` to save the replay");return}k&&C.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=ar({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){k&&C.info("Buffering is in progress, call `flush()` to save the replay");return}k&&C.infoTick("Starting replay in buffer mode");const t=ar({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Me({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:wf}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Nm(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{k&&C.info(`Stopping Replay${n?` triggered by ${n}`:""}`),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Ah(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),k&&C.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),k&&C.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();k&&C.info("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Dr(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${G.location.pathname}${G.location.hash}${G.location.search}`,n=`${G.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===Aa){const s=Ie({category:"replay.throttled"});this.addUpdate(()=>!hs(this,{type:Wp,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||ie(),n=t&&ce(t),s=(n&&q(n).data||{})[Fe];if(!(!n||!s||!["route","custom"].includes(s)))return q(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Rh({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=ar({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return ya(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{G.document.addEventListener("visibilitychange",this._handleVisibilityChange),G.addEventListener("blur",this._handleWindowBlur),G.addEventListener("focus",this._handleWindowFocus),G.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Rm(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=bh(this)}_removeListeners(){try{G.document.removeEventListener("visibilitychange",this._handleVisibilityChange),G.removeEventListener("blur",this._handleWindowBlur),G.removeEventListener("focus",this._handleWindowFocus),G.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{G.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Ie({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Ie({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{ch(this,t)}}_doChangeToBackgroundTasks(t){!this.session||_a(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){k&&C.info("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:L.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=fh(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all($n(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){k&&C.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await Mm(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await xa({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=$();if(r){const s=n instanceof gs?"ratelimit_backoff":"send_error";r.recordDroppedEvent(s,"replay")}}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){k&&C.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){k&&C.info(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&k&&C.info("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&ps(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=Ie({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function Tt(e,t){return[...e,...t].join(",")}function Um({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=['base[href="/"]'],o=Tt(e,[".sentry-mask","[data-sentry-mask]"]),a=Tt(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:Tt(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Tt(r,[]),ignoreSelector:Tt(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Wm({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const xi='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',zm=["content-length","content-type","accept"];let Ai=!1;const qm=e=>new Wn(e);class Wn{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=Tf,flushMaxDelay:n=If,minReplayDuration:r=xf,maxReplayDuration:s=fi,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:l=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:v=[],networkDetailDenyUrls:S=[],networkCaptureBodies:I=!0,networkRequestHeaders:P=[],networkResponseHeaders:w=[],mask:x=[],maskAttributes:y=["title","placeholder"],unmask:g=[],block:b=[],unblock:H=[],ignore:E=[],maskFn:T,beforeAddRecordingEvent:N,beforeErrorSampling:Y}={}){this.name=Wn.id;const V=Um({mask:x,unmask:g,block:b,unblock:H,ignore:E});if(this._recordingOptions={maskAllInputs:l,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(ee,D,ne)=>Wm({maskAttributes:y,maskAllText:u,privacyOptions:V,key:ee,value:D,el:ne}),...V,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ee=>{try{ee.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Af),maxReplayDuration:Math.min(s,fi),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:l,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:v,networkDetailDenyUrls:S,networkCaptureBodies:I,networkRequestHeaders:Ni(P),networkResponseHeaders:Ni(w),beforeAddRecordingEvent:N,beforeErrorSampling:Y,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${xi}`:xi),this._isInitialized&&Fs())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Ai}set _isInitialized(t){Ai=t}afterAllSetup(t){!Fs()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=jm(this._initialOptions,t);this._replay=new Pe({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}Wn.__initStatic();function jm(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Ae(e)},s=yn(n.replaysSessionSampleRate),i=yn(n.replaysOnErrorSampleRate);return s==null&&i==null&&$t(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function Ni(e){return[...zm,...e.map(t=>t.toLowerCase())]}const Oi=new WeakMap,cr=new Map,Fr={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function Gm(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:o}={traceFetch:Fr.traceFetch,traceXHR:Fr.traceXHR,...t},a=typeof s=="function"?s:l=>!0,c=l=>Xm(l,o),u={};n&&(e.addEventProcessor(l=>(l.type==="transaction"&&l.spans&&l.spans.forEach(d=>{if(d.op==="http.client"){const f=cr.get(d.span_id);f&&(d.timestamp=f/1e3,cr.delete(d.span_id))}}),l)),vc(l=>{if(l.response){const d=Oi.get(l.response);d&&l.endTimestamp&&cr.set(d,l.endTimestamp)}}),no(l=>{const d=el(l,a,c,u);if(l.response&&l.fetchData.__span&&Oi.set(l.response,l.fetchData.__span),d){const f=Na(l.fetchData.url),h=f?Qe(f).host:void 0;d.setAttributes({"http.url":f,"server.address":h})}i&&d&&Di(d)})),r&&Ho(l=>{const d=Jm(l,a,c,u);i&&d&&Di(d)})}function Ym(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Di(e){const{url:t}=q(e).data||{};if(!t||typeof t!="string")return;const n=ft("resource",({entries:r})=>{r.forEach(s=>{Ym(s)&&s.name.endsWith(t)&&(Km(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function Vm(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function ve(e=0){return((ue||performance.timeOrigin)+e)/1e3}function Km(e){const{name:t,version:n}=Vm(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),ue?[...r,["http.request.redirect_start",ve(e.redirectStart)],["http.request.fetch_start",ve(e.fetchStart)],["http.request.domain_lookup_start",ve(e.domainLookupStart)],["http.request.domain_lookup_end",ve(e.domainLookupEnd)],["http.request.connect_start",ve(e.connectStart)],["http.request.secure_connection_start",ve(e.secureConnectionStart)],["http.request.connection_end",ve(e.connectEnd)],["http.request.request_start",ve(e.requestStart)],["http.request.response_start",ve(e.responseStart)],["http.request.response_end",ve(e.responseEnd)]]:r}function Xm(e,t){const n=A.location&&A.location.href;if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return t?Be(r.toString(),t)||i&&Be(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?Be(e,t):r}}function Jm(e,t,n,r){const s=e.xhr,i=s&&s[Xe];if(!s||s.__sentry_own_request__||!i)return;const o=Ue()&&t(i.url);if(e.endTimestamp&&o){const f=s.__sentry_xhr_span_id__;if(!f)return;const h=r[f];h&&i.status_code!==void 0&&(Yi(h,i.status_code),h.end(),delete r[f]);return}const a=Na(i.url),c=a?Qe(a).host:void 0,u=!!ie(),l=o&&u?Ge({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":a,url:i.url,"server.address":c,[se]:"auto.http.browser",[ut]:"http.client"}}):new St;s.__sentry_xhr_span_id__=l.spanContext().spanId,r[s.__sentry_xhr_span_id__]=l;const d=$();return s.setRequestHeader&&n(i.url)&&d&&Qm(s,d,Ue()&&u?l:void 0),l}function Qm(e,t,n){const r=te(),s=Ze(),{traceId:i,spanId:o,sampled:a,dsc:c}={...s.getPropagationContext(),...r.getPropagationContext()},u=n&&Ue()?qi(n):ji(i,o,a),l=Gi(c||(n?yt(n):jr(i,t)));Zm(e,u,l)}function Zm(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(dr,n)}catch{}}function Na(e){try{return new URL(e,A.location.origin).href}catch{return}}function eg(){A&&A.document?A.document.addEventListener("visibilitychange",()=>{const e=ie();if(!e)return;const t=ce(e);if(A.document.hidden&&t){const n="cancelled",{op:r,status:s}=q(t);Ee&&_.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:Nt,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Ee&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const tg="BrowserTracing",ng={...fn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Fr},Oa=(e={})=>{jc();const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:s,enableStandaloneClsSpans:i},beforeStartSpan:o,idleTimeout:a,finalTimeout:c,childSpanTimeout:u,markBackgroundSpan:l,traceFetch:d,traceXHR:f,shouldCreateSpanForRequest:h,enableHTTPTimings:p,instrumentPageLoad:m,instrumentNavigation:v}={...ng,...e},S=Jl({recordClsStandaloneSpans:i||!1});t&&vd(),r&&X.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Zl():n&&Ql(),s&&ed();const I={name:void 0,source:void 0};function P(w,x){const y=x.op==="pageload",g=o?o(x):x,b=g.attributes||{};x.name!==g.name&&(b[Fe]="custom",g.attributes=b),I.name=g.name,I.source=b[Fe];const H=go(g,{idleTimeout:a,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:y,beforeSpanEnd:T=>{S(),id(T,{recordClsOnPageloadSpan:!i})}});function E(){["interactive","complete"].includes(A.document.readyState)&&w.emit("idleSpanEnableAutoFinish",H)}return y&&A.document&&(A.document.addEventListener("readystatechange",()=>{E()}),E()),H}return{name:tg,afterAllSetup(w){let x,y=A.location&&A.location.href;w.on("startNavigationSpan",g=>{$()===w&&(x&&!q(x).timestamp&&(Ee&&_.log(`[Tracing] Finishing current root span with op: ${q(x).op}`),x.end()),x=P(w,{op:"navigation",...g}))}),w.on("startPageLoadSpan",(g,b={})=>{if($()!==w)return;x&&!q(x).timestamp&&(Ee&&_.log(`[Tracing] Finishing current root span with op: ${q(x).op}`),x.end());const H=b.sentryTrace||Li("sentry-trace"),E=b.baggage||Li("baggage"),T=uc(H,E);te().setPropagationContext(T),x=P(w,{op:"pageload",...g})}),w.on("spanEnd",g=>{const b=q(g).op;if(g!==ce(g)||b!=="navigation"&&b!=="pageload")return;const H=te(),E=H.getPropagationContext();H.setPropagationContext({...E,sampled:E.sampled!==void 0?E.sampled:Nn(g),dsc:E.dsc||yt(g)})}),A.location&&(m&&rg(w,{name:A.location.pathname,startTime:ue?ue/1e3:void 0,attributes:{[Fe]:"url",[se]:"auto.pageload.browser"}}),v&&Pn(({to:g,from:b})=>{if(b===void 0&&y&&y.indexOf(g)!==-1){y=void 0;return}b!==g&&(y=void 0,sg(w,{name:A.location.pathname,attributes:{[Fe]:"url",[se]:"auto.navigation.browser"}}))})),l&&eg(),s&&ig(a,c,u,I),t&&Td(),Gm(w,{traceFetch:d,traceXHR:f,tracePropagationTargets:w.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:p})}}};function rg(e,t,n){e.emit("startPageLoadSpan",t,n),te().setTransactionName(t.name);const r=ie();return(r&&q(r).op)==="pageload"?r:void 0}function sg(e,t){Ze().setPropagationContext(Ns()),te().setPropagationContext(Ns()),e.emit("startNavigationSpan",t),te().setTransactionName(t.name);const n=ie();return(n&&q(n).op)==="navigation"?n:void 0}function Li(e){const t=lc(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function ig(e,t,n,r){let s;const i=()=>{const o="ui.action.click",a=ie(),c=a&&ce(a);if(c){const u=q(c).op;if(["navigation","pageload"].includes(u)){Ee&&_.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(ur,"interactionInterrupted"),s.end(),s=void 0),!r.name){Ee&&_.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}s=go({name:r.name,op:o,attributes:{[Fe]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};A.document&&addEventListener("click",i,{once:!1,capture:!0})}function og(e){const t={defaultIntegrations:ag(),...e};return Eo(t,"astro",["astro","browser"]),yf(t)}function ag(e){return typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__?[...kr(),Oa()]:kr()}const Da=new Set,An=new WeakSet;let Br,La,Pi=!1;function cg(e){Pi||(Pi=!0,Br??=!1,La??="hover",ug(),lg(),dg(),pg())}function ug(){for(const e of["touchstart","mousedown"])document.body.addEventListener(e,t=>{Ht(t.target,"tap")&&zn(t.target.href,{ignoreSlowConnection:!0})},{passive:!0})}function lg(){let e;document.body.addEventListener("focusin",r=>{Ht(r.target,"hover")&&t(r)},{passive:!0}),document.body.addEventListener("focusout",n,{passive:!0}),_s(()=>{for(const r of document.getElementsByTagName("a"))An.has(r)||Ht(r,"hover")&&(An.add(r),r.addEventListener("mouseenter",t,{passive:!0}),r.addEventListener("mouseleave",n,{passive:!0}))});function t(r){const s=r.target.href;e&&clearTimeout(e),e=setTimeout(()=>{zn(s)},80)}function n(){e&&(clearTimeout(e),e=0)}}function dg(){let e;_s(()=>{for(const t of document.getElementsByTagName("a"))An.has(t)||Ht(t,"viewport")&&(An.add(t),e??=fg(),e.observe(t))})}function fg(){const e=new WeakMap;return new IntersectionObserver((t,n)=>{for(const r of t){const s=r.target,i=e.get(s);r.isIntersecting?(i&&clearTimeout(i),e.set(s,setTimeout(()=>{n.unobserve(s),e.delete(s),zn(s.href)},300))):i&&(clearTimeout(i),e.delete(s))}})}function pg(){_s(()=>{for(const e of document.getElementsByTagName("a"))Ht(e,"load")&&zn(e.href)})}function zn(e,t){e=e.replace(/#.*/,"");const n=t?.ignoreSlowConnection??!1;if(hg(e,n))if(Da.add(e),document.createElement("link").relList?.supports?.("prefetch")&&t?.with!=="fetch"){const r=document.createElement("link");r.rel="prefetch",r.setAttribute("href",e),document.head.append(r)}else fetch(e,{priority:"low"})}function hg(e,t){if(!navigator.onLine||!t&&Pa())return!1;try{const n=new URL(e,location.href);return location.origin===n.origin&&(location.pathname!==n.pathname||location.search!==n.search)&&!Da.has(e)}catch{}return!1}function Ht(e,t){if(e?.tagName!=="A")return!1;const n=e.dataset.astroPrefetch;return n==="false"?!1:t==="tap"&&(n!=null||Br)&&Pa()?!0:n==null&&Br||n===""?t===La:n===t}function Pa(){if("connection"in navigator){const e=navigator.connection;return e.saveData||/2g/.test(e.effectiveType)}return!1}function _s(e){e();let t=!1;document.addEventListener("astro:page-load",()=>{if(!t){t=!0;return}e()})}og({dsn:"https://969547b97537bd1444ce2905aba49823@o193361.ingest.us.sentry.io/4508078018789376",debug:!1,environment:"production",release:void 0,tracesSampleRate:1,integrations:[Oa(),qm()],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});cg();
//# sourceMappingURL=page.BBXkquuq.js.map
