mirror of
https://github.com/rxliuli/apps.apple.com.git
synced 2025-11-09 17:40:32 +00:00
3 lines
230 KiB
JavaScript
3 lines
230 KiB
JavaScript
import{k as Er,l as f,C as Gs,n as Z,o as Ps,p as _e,q as Ot,t as Sr,c as Qt,g,v as Ht,w as pe,x as Nt,D as Zn,y as zs,z as Ys,A as br,B as wr,E as en,F as Fs,H as Vn,I as Tr,J as Hs,K as nn,L as $s,r as vt,M as pn,G as we,N as gt,O as Si,P as vr,Q as bi,R as js,T as Ws,j as Rr,h as wn,d as dt,U as Tn,m as qs,f as je,a as Zs,e as wi,b as kr,u as Vs,V as Xs,W as Ks,X as Js,Y as Xn,Z as St,_ as te,$ as Qs,a0 as ta,a1 as vn,a2 as me,a3 as Kn,a4 as Ti,a5 as ea,a6 as na,a7 as Jn,a8 as ia,a9 as ra,aa as Ut,ab as vi,ac as sa,S as Ri,i as aa,ad as oa,ae as ca,af as We,ag as ua,s as la,ah as da,ai as et,aj as fa,ak as ha}from"./version~BNUm1OH-k3.js";import{al as gh,am as yh,an as Eh}from"./version~BNUm1OH-k3.js";const xe=Er();function _a(){const t=xe.chrome,e=t&&t.app&&t.app.runtime,n="history"in xe&&!!xe.history.pushState&&!!xe.history.replaceState;return!e&&n}const P=Er(),bt="__sentry_xhr_v2__",ce={},ki={};function pa(t){if(!ki[t])switch(ki[t]=!0,t){case"console":ma();break;case"dom":va();break;case"xhr":Ea();break;case"fetch":ga();break;case"history":Sa();break;case"error":Ra();break;case"unhandledrejection":ka();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("unknown instrumentation type:",t);return}}function K(t,e){ce[t]=ce[t]||[],ce[t].push(e),pa(t)}function ot(t,e){if(!(!t||!ce[t]))for(const n of ce[t]||[])try{n(e)}catch(i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("Error while triggering instrumentation handler.\nType: ".concat(t,"\nName: ").concat(Ot(n),"\nError:"),i)}}function ma(){"console"in P&&Gs.forEach(function(t){t in P.console&&Z(P.console,t,function(e){return function(...n){ot("console",{args:n,level:t}),e&&e.apply(P.console,n)}})})}function ga(){Ps()&&Z(P,"fetch",function(t){return function(...e){const{method:n,url:i}=ya(e),r={args:e,fetchData:{method:n,url:i},startTimestamp:Date.now()};return ot("fetch",{...r}),t.apply(P,e).then(s=>(ot("fetch",{...r,endTimestamp:Date.now(),response:s}),s),s=>{throw ot("fetch",{...r,endTimestamp:Date.now(),error:s}),s})}})}function Rn(t,e){return!!t&&typeof t=="object"&&!!t[e]}function xi(t){return typeof t=="string"?t:t?Rn(t,"url")?t.url:t.toString?t.toString():"":""}function ya(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,i]=t;return{url:xi(n),method:Rn(i,"method")?String(i.method).toUpperCase():"GET"}}const e=t[0];return{url:xi(e),method:Rn(e,"method")?String(e.method).toUpperCase():"GET"}}function Ea(){if(!("XMLHttpRequest"in P))return;const t=XMLHttpRequest.prototype;Z(t,"open",function(e){return function(...n){const i=n[1],r=this[bt]={method:_e(n[0])?n[0].toUpperCase():n[0],url:n[1],request_headers:{}};_e(i)&&r.method==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const s=()=>{const a=this[bt];if(a&&this.readyState===4){try{a.status_code=this.status}catch(o){}ot("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Z(this,"onreadystatechange",function(a){return function(...o){return s(),a.apply(this,o)}}):this.addEventListener("readystatechange",s),Z(this,"setRequestHeader",function(a){return function(...o){const[c,u]=o,l=this[bt];return l&&(l.request_headers[c.toLowerCase()]=u),a.apply(this,o)}}),e.apply(this,n)}}),Z(t,"send",function(e){return function(...n){const i=this[bt];return i&&n[0]!==void 0&&(i.body=n[0]),ot("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),e.apply(this,n)}})}let Ne;function Sa(){if(!_a())return;const t=P.onpopstate;P.onpopstate=function(...n){const i=P.location.href,r=Ne;if(Ne=i,ot("history",{from:r,to:i}),t)try{return t.apply(this,n)}catch(s){}};function e(n){return function(...i){const r=i.length>2?i[2]:void 0;if(r){const s=Ne,a=String(r);Ne=a,ot("history",{from:s,to:a})}return n.apply(this,i)}}Z(P.history,"pushState",e),Z(P.history,"replaceState",e)}const ba=1e3;let De,Ie;function wa(t,e){if(!t||t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(n){}return!1}function Ta(t){if(t.type!=="keypress")return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)return!1}catch(e){}return!0}function Ni(t,e=!1){return n=>{if(!n||Ie===n||Ta(n))return;const i=n.type==="keypress"?"input":n.type;De===void 0?(t({event:n,name:i,global:e}),Ie=n):wa(Ie,n)&&(t({event:n,name:i,global:e}),Ie=n),clearTimeout(De),De=P.setTimeout(()=>{De=void 0},ba)}}function va(){if(!("document"in P))return;const t=ot.bind(null,"dom"),e=Ni(t,!0);P.document.addEventListener("click",e,!1),P.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const i=P[n]&&P[n].prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Z(i,"addEventListener",function(r){return function(s,a,o){if(s==="click"||s=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[s]=u[s]||{refCount:0};if(!l.handler){const d=Ni(t);l.handler=d,r.call(this,s,d,o)}l.refCount++}catch(c){}return r.call(this,s,a,o)}}),Z(i,"removeEventListener",function(r){return function(s,a,o){if(s==="click"||s=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[s];l&&(l.refCount--,l.refCount<=0&&(r.call(this,s,l.handler,o),l.handler=void 0,delete u[s]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch(c){}return r.call(this,s,a,o)}}))})}let Ae=null;function Ra(){Ae=P.onerror,P.onerror=function(t,e,n,i,r){return ot("error",{column:i,error:r,line:n,msg:t,url:e}),Ae&&!Ae.__SENTRY_LOADER__?Ae.apply(this,arguments):!1},P.onerror.__SENTRY_INSTRUMENTED__=!0}let Ce=null;function ka(){Ce=P.onunhandledrejection,P.onunhandledrejection=function(t){return ot("unhandledrejection",t),Ce&&!Ce.__SENTRY_LOADER__?Ce.apply(this,arguments):!0},P.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function mn(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",i=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:i,relative:e[5]+n+i}}const xa=["fatal","error","warning","log","info","debug"];function Na(t){return t==="warn"?"warning":xa.includes(t)?t:"log"}const Da=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Ia(t){const e=t.match(Da);if(!t||!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function Aa(t,e,n){const i=[{type:"client_report"},{timestamp:Sr(),discarded_events:t}];return Qt(e?{dsn:e}:{},[i])}const kn="baggage",xr="sentry-",Ca=/^sentry-/,Oa=8192;function Ua(t){if(!_e(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((i,r)=>{const s=Di(r);return{...i,...s}},{});else{if(!t)return;e=Di(t)}const n=Object.entries(e).reduce((i,[r,s])=>{if(r.match(Ca)){const a=r.slice(xr.length);i[a]=s}return i},{});if(Object.keys(n).length>0)return n}function Nr(t){const e=Object.entries(t).reduce((n,[i,r])=>(r&&(n["".concat(xr).concat(i)]=r),n),{});return Ba(e)}function Di(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,i])=>(e[n]=i,e),{})}function Ba(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,i],r)=>{const s="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(i)),a=r===0?s:"".concat(e,",").concat(s);return a.length>Oa?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Not adding key: ".concat(n," with val: ").concat(i," to baggage header due to exceeding baggage size limits.")),e):a},"")}function rn(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=g().getClient(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Te(t){return(t||g()).getScope().getTransaction()}let Ii=!1;function La(){Ii||(Ii=!0,K("error",xn),K("unhandledrejection",xn))}function xn(){const t=Te();if(t){const e="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Transaction: ".concat(e," -> Global error occured")),t.setStatus(e)}}xn.tag="sentry_tracingErrorCallback";class sn{__init(){this.spans=[]}constructor(e=1e3){sn.prototype.__init.call(this),this._maxlen=e}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class ft{__init2(){this.traceId=Ht()}__init3(){this.spanId=Ht().substring(16)}__init4(){this.startTimestamp=pe()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(e){if(ft.prototype.__init2.call(this),ft.prototype.__init3.call(this),ft.prototype.__init4.call(this),ft.prototype.__init5.call(this),ft.prototype.__init6.call(this),ft.prototype.__init7.call(this),!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp),e.instrumenter&&(this.instrumenter=e.instrumenter)}startChild(e){const n=new ft({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n),n.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&n.transaction){const i=e&&e.op||"< unknown op >",r=n.transaction.name||"< unknown name >",s=n.transaction.spanId,a="[Tracing] Starting '".concat(i,"' span on transaction '").concat(r,"' (").concat(s,").");n.transaction.metadata.spanMetadata[n.spanId]={logMessage:a},f.log(a)}return n}setTag(e,n){return this.tags={...this.tags,[e]:n},this}setData(e,n){return this.data={...this.data,[e]:n},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);const n=Ma(e);return n!=="unknown_error"&&this.setStatus(n),this}isSuccess(){return this.status==="ok"}finish(e){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:n}=this.transaction.metadata.spanMetadata[this.spanId];n&&f.log(n.replace("Starting","Finishing"))}this.endTimestamp=typeof e=="number"?e:pe()}toTraceparent(){let e="";return this.sampled!==void 0&&(e=this.sampled?"-1":"-0"),"".concat(this.traceId,"-").concat(this.spanId).concat(e)}toContext(){return Nt({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return Nt({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Nt({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function Ma(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}class Ft extends ft{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(e,n){super(e),Ft.prototype.__init.call(this),Ft.prototype.__init2.call(this),Ft.prototype.__init3.call(this),this._hub=n||g(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;const i=this.metadata.dynamicSamplingContext;i&&(this._frozenDynamicSamplingContext={...i})}get name(){return this._name}set name(e){this.setName(e)}setName(e,n="custom"){this._name=e,this.metadata.source=n}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new sn(e)),this.spanRecorder.add(this)}setContext(e,n){n===null?delete this._contexts[e]:this._contexts[e]=n}setMeasurement(e,n,i=""){this._measurements[e]={value:n,unit:i}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const i=this.spanRecorder?this.spanRecorder.spans.filter(o=>o!==this&&o.endTimestamp):[];this._trimEnd&&i.length>0&&(this.endTimestamp=i.reduce((o,c)=>o.endTimestamp&&c.endTimestamp?o.endTimestamp>c.endTimestamp?o:c:o).endTimestamp);const r=this.metadata,s={contexts:{...this._contexts,trace:this.getTraceContext()},spans:i,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),s.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Finishing ".concat(this.op," transaction: ").concat(this.name,".")),this._hub.captureEvent(s)}toContext(){const e=super.toContext();return Nt({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const e=this._hub||g(),n=e&&e.getClient();if(!n)return{};const{environment:i,release:r}=n.getOptions()||{},{publicKey:s}=n.getDsn()||{},a=this.metadata.sampleRate,o=a!==void 0?a.toString():void 0,{segment:c}=e.getScope().getUser()||{},u=this.metadata.source,l=u&&u!=="url"?this.name:void 0,d=Nt({environment:i||Zn,release:r,transaction:l,user_segment:c,public_key:s,trace_id:this.traceId,sample_rate:o});return n.emit&&n.emit("createDsc",d),d}setHub(e){this._hub=e}}const ze={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Ga="finishReason",Mt=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Pa extends sn{constructor(e,n,i,r){super(r),this._pushActivity=e,this._popActivity=n,this.transactionSpanId=i}add(e){e.spanId!==this.transactionSpanId&&(e.finish=n=>{e.endTimestamp=typeof n=="number"?n:pe(),this._popActivity(e.spanId)},e.endTimestamp===void 0&&this._pushActivity(e.spanId)),super.add(e)}}class yt extends Ft{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=Mt[4]}constructor(e,n,i=ze.idleTimeout,r=ze.finalTimeout,s=ze.heartbeatInterval,a=!1){super(e,n),this._idleHub=n,this._idleTimeout=i,this._finalTimeout=r,this._heartbeatInterval=s,this._onScope=a,yt.prototype.__init.call(this),yt.prototype.__init2.call(this),yt.prototype.__init3.call(this),yt.prototype.__init4.call(this),yt.prototype.__init5.call(this),yt.prototype.__init6.call(this),a&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("Setting idle transaction on scope. Span ID: ".concat(this.spanId)),n.configureScope(o=>o.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Mt[3],this.finish())},this._finalTimeout)}finish(e=pe()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(Ga,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] finishing IdleTransaction",new Date(e*1e3).toISOString(),this.op);for(const n of this._beforeFinishCallbacks)n(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(n=>{if(n.spanId===this.spanId)return!0;n.endTimestamp||(n.endTimestamp=e,n.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(n,void 0,2)));const i=n.startTimestamp<e;return i||(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(n,void 0,2)),i}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] No active IdleTransaction");if(this._onScope){const n=this._idleHub.getScope();n.getTransaction()===this&&n.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const n=r=>{this._finished||this._pushActivity(r)},i=r=>{this._finished||this._popActivity(r)};this.spanRecorder=new Pa(n,i,this.spanId,e),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Mt[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=Mt[1],this.finish(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] pushActivity: ".concat(e)),this.activities[e]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] popActivity ".concat(e)),delete this.activities[e],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=pe();this._idleTimeoutCanceledPermanently?(this._finishReason=Mt[5],this.finish(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Mt[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("pinging Heartbeat -> current counter: ".concat(this._heartbeatCounter)),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function za(){const e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function Dr(t,e,n){if(!rn(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let i;return typeof e.tracesSampler=="function"?(i=e.tracesSampler(n),t.setMetadata({sampleRate:Number(i)})):n.parentSampled!==void 0?i=n.parentSampled:typeof e.tracesSampleRate<"u"?(i=e.tracesSampleRate,t.setMetadata({sampleRate:Number(i)})):(i=1,t.setMetadata({sampleRate:i})),Ya(i)?i?(t.sampled=Math.random()<i,t.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] starting ".concat(t.op," transaction - ").concat(t.name)),t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ".concat(Number(i),")")),t)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Discarding transaction because ".concat(typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function Ya(t){return Ys(t)||!(typeof t=="number"||typeof t=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(t)," of type ").concat(JSON.stringify(typeof t),".")),!1):t<0||t>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ".concat(t,".")),!1):!0}function Fa(t,e){const n=this.getClient(),i=n&&n.getOptions()||{},r=i.instrumenter||"sentry",s=t.instrumenter||"sentry";r!==s&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("A transaction was started with instrumenter=`".concat(s,"`, but the SDK is configured with the `").concat(r,"` instrumenter.\nThe transaction will not be sampled. Please use the ").concat(r," instrumentation to start transactions.")),t.sampled=!1);let a=new Ft(t,this);return a=Dr(a,i,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(i._experiments&&i._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function Ai(t,e,n,i,r,s,a){const o=t.getClient(),c=o&&o.getOptions()||{};let u=new yt(e,t,n,i,a,r);return u=Dr(u,c,{parentSampled:e.parentSampled,transactionContext:e,...s}),u.sampled&&u.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",u),u}function Ha(){const t=zs();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=Fa),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=za),La())}function Hf(t,e,n=()=>{}){const i={...t};i.name!==void 0&&i.description===void 0&&(i.description=i.name);const r=g(),s=r.getScope(),a=s.getSpan();function o(){if(rn())return a?a.startChild(i):r.startTransaction(i)}const c=o();s.setSpan(c);function u(){c&&c.finish(),r.getScope().setSpan(a)}let l;try{l=e(c)}catch(d){throw c&&c.setStatus("internal_error"),n(d),u(),d}return br(l)?Promise.resolve(l).then(()=>{u()},d=>{c&&c.setStatus("internal_error"),n(d),u()}):u(),l}function Qn(t,e){return g().captureException(t,{captureContext:e})}function $f(t,e){const n=typeof e=="string"?e:void 0,i=typeof e!="string"?{captureContext:e}:void 0;return g().captureMessage(t,n,i)}function jf(t,e){return g().captureEvent(t,e)}function Wf(t){g().configureScope(t)}function qf(t){g().addBreadcrumb(t)}function $a(t,e){g().setContext(t,e)}function Zf(t){g().setExtras(t)}function Vf(t,e){g().setExtra(t,e)}function Xf(t){g().setTags(t)}function Kf(t,e){g().setTag(t,e)}function Jf(t){g().setUser(t)}function ja(t){g().withScope(t)}function Qf(t,e){return g().startTransaction({...t},e)}const Wa="7";function Ir(t){const e=t.protocol?"".concat(t.protocol,":"):"",n=t.port?":".concat(t.port):"";return"".concat(e,"//").concat(t.host).concat(n).concat(t.path?"/".concat(t.path):"","/api/")}function qa(t){return"".concat(Ir(t)).concat(t.projectId,"/envelope/")}function Za(t,e){return Fs({sentry_key:t.publicKey,sentry_version:Wa,...e&&{sentry_client:"".concat(e.name,"/").concat(e.version)}})}function Ar(t,e={}){const n=typeof e=="string"?e:e.tunnel,i=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||"".concat(qa(t),"?").concat(Za(t,i))}function Va(t,e){const n=wr(t);if(!n)return"";const i="".concat(Ir(n),"embed/error-page/");let r="dsn=".concat(en(n));for(const s in e)if(s!=="dsn")if(s==="user"){const a=e.user;if(!a)continue;a.name&&(r+="&name=".concat(encodeURIComponent(a.name))),a.email&&(r+="&email=".concat(encodeURIComponent(a.email)))}else r+="&".concat(encodeURIComponent(s),"=").concat(encodeURIComponent(e[s]));return"".concat(i,"?").concat(r)}function Xa(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Ka(t,e,n,i){const r=Vn(n),s={sent_at:new Date().toISOString(),...r&&{sdk:r},...!!i&&{dsn:en(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Qt(s,[a])}function Ja(t,e,n,i){const r=Vn(n),s=t.type&&t.type!=="replay_event"?t.type:"event";Xa(t,n&&n.sdk);const a=Tr(t,r,i,e);return delete t.sdkProcessingMetadata,Qt(a,[[{type:s},t]])}const Ci=[];function Qa(t){const e={};return t.forEach(n=>{const{name:i}=n,r=e[i];r&&!r.isDefaultInstance&&n.isDefaultInstance||(e[i]=n)}),Object.keys(e).map(n=>e[n])}function to(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(a=>{a.isDefaultInstance=!0});let i;Array.isArray(n)?i=[...e,...n]:typeof n=="function"?i=Hs(n(e)):i=e;const r=Qa(i),s=no(r,a=>a.name==="Debug");if(s!==-1){const[a]=r.splice(s,1);r.push(a)}return r}function eo(t){const e={};return t.forEach(n=>{n&&Cr(n,e)}),e}function Cr(t,e){e[t.name]=t,Ci.indexOf(t.name)===-1&&(t.setupOnce(nn,g),Ci.push(t.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("Integration installed: ".concat(t.name)))}function no(t,e){for(let n=0;n<t.length;n++)if(e(t[n])===!0)return n;return-1}function Or(t,e,n,i){const{normalizeDepth:r=3,normalizeMaxBreadth:s=1e3}=t,a={...e,event_id:e.event_id||n.event_id||Ht(),timestamp:e.timestamp||Sr()},o=n.integrations||t.integrations.map(l=>l.name);io(a,t),ao(a,o),e.type===void 0&&ro(a,t.stackParser);let c=i;n.captureContext&&(c=$s.clone(c).update(n.captureContext));let u=vt(a);if(c){if(c.getAttachments){const l=[...n.attachments||[],...c.getAttachments()];l.length&&(n.attachments=l)}u=c.applyToEvent(a,n)}return u.then(l=>(l&&so(l),typeof r=="number"&&r>0?oo(l,r,s):l))}function io(t,e){const{environment:n,release:i,dist:r,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:Zn),t.release===void 0&&i!==void 0&&(t.release=i),t.dist===void 0&&r!==void 0&&(t.dist=r),t.message&&(t.message=pn(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=pn(a.value,s));const o=t.request;o&&o.url&&(o.url=pn(o.url,s))}const Oi=new WeakMap;function ro(t,e){const n=we._sentryDebugIds;if(!n)return;let i;const r=Oi.get(e);r?i=r:(i=new Map,Oi.set(e,i));const s=Object.keys(n).reduce((a,o)=>{let c;const u=i.get(o);u?c=u:(c=e(o),i.set(o,c));for(let l=c.length-1;l>=0;l--){const d=c[l];if(d.filename){a[d.filename]=n[o];break}}return a},{});try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=s[o.filename])})})}catch(a){}}function so(t){const e={};try{t.exception.values.forEach(i=>{i.stacktrace.frames.forEach(r=>{r.debug_id&&(r.abs_path?e[r.abs_path]=r.debug_id:r.filename&&(e[r.filename]=r.debug_id),delete r.debug_id)})})}catch(i){}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach(i=>{n.push({type:"sourcemap",code_file:i,debug_id:e[i]})})}function ao(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function oo(t,e,n){if(!t)return null;const i={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(r=>({...r,...r.data&&{data:gt(r.data,e,n)}}))},...t.user&&{user:gt(t.user,e,n)},...t.contexts&&{contexts:gt(t.contexts,e,n)},...t.extra&&{extra:gt(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&i.contexts&&(i.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(i.contexts.trace.data=gt(t.contexts.trace.data,e,n))),t.spans&&(i.spans=t.spans.map(r=>(r.data&&(r.data=gt(r.data,e,n)),r))),i}const Ui="Not capturing exception because it's already been captured.";class Rt{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(e){if(Rt.prototype.__init.call(this),Rt.prototype.__init2.call(this),Rt.prototype.__init3.call(this),Rt.prototype.__init4.call(this),Rt.prototype.__init5.call(this),this._options=e,e.dsn?this._dsn=wr(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("No DSN provided, client will not do anything."),this._dsn){const n=Ar(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,i){if(Si(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log(Ui);return}let r=n&&n.event_id;return this._process(this.eventFromException(e,n).then(s=>this._captureEvent(s,n,i)).then(s=>{r=s})),r}captureMessage(e,n,i,r){let s=i&&i.event_id;const a=vr(e)?this.eventFromMessage(String(e),n,i):this.eventFromException(e,i);return this._process(a.then(o=>this._captureEvent(o,i,r)).then(o=>{s=o})),s}captureEvent(e,n,i){if(n&&n.originalException&&Si(n.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log(Ui);return}let r=n&&n.event_id;return this._process(this._captureEvent(e,n,i).then(s=>{r=s})),r}captureSession(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),bi(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?this._isClientDoneProcessing(e).then(i=>n.flush(e).then(r=>i&&r)):vt(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=eo(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(n){return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Cannot retrieve integration ".concat(e.id," from the current Client")),null}}addIntegration(e){Cr(e,this._integrations)}sendEvent(e,n={}){if(this._dsn){let i=Ja(e,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])i=js(i,Ws(s,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(i);r&&r.then(s=>this.emit("afterSendEvent",e,s),null)}}sendSession(e){if(this._dsn){const n=Ka(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n,i){if(this._options.sendClientReports){const r="".concat(e,":").concat(n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log('Adding outcome: "'.concat(r,'"')),this._outcomes[r]=this._outcomes[r]+1||1}}on(e,n){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(n)}emit(e,...n){this._hooks[e]&&this._hooks[e].forEach(i=>i(...n))}_updateSessionFromEvent(e,n){let i=!1,r=!1;const s=n.exception&&n.exception.values;if(s){r=!0;for(const c of s){const u=c.mechanism;if(u&&u.handled===!1){i=!0;break}}}const a=e.status==="ok";(a&&e.errors===0||a&&i)&&(bi(e,{...i&&{status:"crashed"},errors:e.errors||Number(r||i)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Rr(n=>{let i=0;const r=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),n(!0)):(i+=r,e&&i>=e&&(clearInterval(s),n(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,i){const r=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),Or(r,e,n,i)}_captureEvent(e,n={},i){return this._processEvent(e,n,i).then(r=>r.event_id,r=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){const s=r;s.logLevel==="log"?f.log(s.message):f.warn(s)}})}_processEvent(e,n,i){const r=this.getOptions(),{sampleRate:s}=r;if(!this._isEnabled())return wn(new dt("SDK not enabled, will not capture event.","log"));const a=Br(e),o=Ur(e),c=e.type||"error",u="before send for type `".concat(c,"`");if(o&&typeof s=="number"&&Math.random()>s)return this.recordDroppedEvent("sample_rate","error",e),wn(new dt("Discarding event because it's not included in the random sample (sampling rate = ".concat(s,")"),"log"));const l=c==="replay_event"?"replay":c;return this._prepareEvent(e,n,i).then(d=>{if(d===null)throw this.recordDroppedEvent("event_processor",l,e),new dt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return d;const h=uo(r,d,n);return co(h,u)}).then(d=>{if(d===null)throw this.recordDroppedEvent("before_send",l,e),new dt("".concat(u," returned `null`, will not send event."),"log");const _=i&&i.getSession();!a&&_&&this._updateSessionFromEvent(_,d);const h=d.transaction_info;if(a&&h&&d.transaction!==e.transaction){const p="custom";d.transaction_info={...h,source:p}}return this.sendEvent(d,n),d}).then(null,d=>{throw d instanceof dt?d:(this.captureException(d,{data:{__sentry__:!0},originalException:d}),new dt("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(d)))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(e){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",e),this._transport.send(e).then(null,n=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("Error while sending event:",n)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{const[i,r]=n.split(":");return{reason:i,category:r,quantity:e[n]}})}}function co(t,e){const n="".concat(e," must return `null` or a valid event.");if(br(t))return t.then(i=>{if(!Tn(i)&&i!==null)throw new dt(n);return i},i=>{throw new dt("".concat(e," rejected with ").concat(i))});if(!Tn(t)&&t!==null)throw new dt(n);return t}function uo(t,e,n){const{beforeSend:i,beforeSendTransaction:r}=t;return Ur(e)&&i?i(e,n):Br(e)&&r?r(e,n):e}function Ur(t){return t.type===void 0}function Br(t){return t.type==="transaction"}function lo(t,e){e.debug===!0&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?f.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=g();n.getScope().update(e.initialScope);const r=new t(e);n.bindClient(r)}const fo=30;function Lr(t,e,n=qs(t.bufferSize||fo)){let i={};const r=a=>n.drain(a);function s(a){const o=[];if(je(a,(d,_)=>{const h=wi(_);if(Zs(i,h)){const p=Bi(d,_);t.recordDroppedEvent("ratelimit_backoff",h,p)}else o.push(d)}),o.length===0)return vt();const c=Qt(a[0],o),u=d=>{je(c,(_,h)=>{const p=Bi(_,h);t.recordDroppedEvent(d,wi(h),p)})},l=()=>e({body:kr(c,t.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Sentry responded with status code ".concat(d.statusCode," to sent event.")),i=Vs(i,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof dt)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("Skipped sending event because buffer is full."),u("queue_overflow"),vt();throw d})}return s.__sentry__baseTransport__=!0,{send:s,flush:r}}function Bi(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}const ho=100,Li=5e3,_o=36e5;function gn(t,e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.info("[Offline]: ".concat(t),e)}function po(t){return e=>{const n=t(e),i=e.createStore?e.createStore(e):void 0;let r=Li,s;function a(l,d,_){return Ks(l,["replay_event","replay_recording","client_report"])?!1:e.shouldStore?e.shouldStore(l,d,_):!0}function o(l){i&&(s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const d=await i.pop();d&&(gn("Attempting to send previously queued event"),u(d).catch(_=>{gn("Failed to retry sending",_)}))},l),typeof s!="number"&&s.unref&&s.unref())}function c(){s||(o(r),r=Math.min(r*2,_o))}async function u(l){try{const d=await n.send(l);let _=ho;if(d){if(d.headers&&d.headers["retry-after"])_=Xs(d.headers["retry-after"]);else if((d.statusCode||0)>=400)return d}return o(_),r=Li,d}catch(d){if(i&&await a(l,d,r))return await i.insert(l),c(),gn("Error sending. Event queued",d),{};throw d}}return e.flushAtStartup&&c(),{send:u,flush:l=>n.flush(l)}}}function mo(t,e){let n;return je(t,(i,r)=>(e.includes(r)&&(n=Array.isArray(i)?i[1]:void 0),!!n)),n}function th(t,e){return n=>{const i=t(n),r={};function s(c){if(!r[c]){const u=Js(c);if(!u)return;const l=Ar(u);r[c]=t({...n,url:l})}return r[c]}async function a(c){function u(_){const h=_&&_.length?_:["event"];return mo(c,h)}const l=e({envelope:c,getEvent:u}).map(_=>s(_)).filter(_=>!!_);return l.length===0&&l.push(i),(await Promise.all(l.map(_=>_.send(c))))[0]}async function o(c){const u=[...Object.keys(r).map(d=>r[d]),i];return(await Promise.all(u.map(d=>d.flush(c)))).every(d=>d)}return{send:a,flush:o}}}let Mi;class $t{constructor(){$t.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=$t.id}setupOnce(){Mi=Function.prototype.toString;try{Function.prototype.toString=function(...e){const n=Xn(this)||this;return Mi.apply(n,e)}}catch(e){}}}$t.__initStatic();const go=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],yo=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class Dt{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Dt.id}constructor(e={}){this._options=e,Dt.prototype.__init.call(this)}setupOnce(e,n){const i=r=>{const s=n();if(s){const a=s.getIntegration(Dt);if(a){const o=s.getClient(),c=o?o.getOptions():{},u=Eo(a._options,c);return So(r,u)?null:r}}return r};i.id=this.name,e(i)}}Dt.__initStatic();function Eo(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:go],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:yo],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function So(t,e){return e.ignoreInternal&&ko(t)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Event dropped due to being internal Sentry Error.\nEvent: ".concat(St(t))),!0):bo(t,e.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(St(t))),!0):wo(t,e.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Event dropped due to being matched by `ignoreTransactions` option.\nEvent: ".concat(St(t))),!0):To(t,e.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(St(t),".\nUrl: ").concat(qe(t))),!0):vo(t,e.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(St(t),".\nUrl: ").concat(qe(t))),!0)}function bo(t,e){return t.type||!e||!e.length?!1:Ro(t).some(n=>te(n,e))}function wo(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?te(n,e):!1}function To(t,e){if(!e||!e.length)return!1;const n=qe(t);return n?te(n,e):!1}function vo(t,e){if(!e||!e.length)return!0;const n=qe(t);return n?te(n,e):!0}function Ro(t){if(t.message)return[t.message];if(t.exception){const{values:e}=t.exception;try{const{type:n="",value:i=""}=e&&e[e.length-1]||{};return["".concat(i),"".concat(n,": ").concat(i)]}catch(n){return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("Cannot extract message for event ".concat(St(t))),[]}}return[]}function ko(t){try{return t.exception.values[0].type==="SentryError"}catch(e){}return!1}function xo(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function qe(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(n){}return e?xo(e):null}catch(e){return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("Cannot extract url for event ".concat(St(t))),null}}const No=Object.freeze(Object.defineProperty({__proto__:null,FunctionToString:$t,InboundFilters:Dt},Symbol.toStringTag,{value:"Module"})),E=we;let Nn=0;function Mr(){return Nn>0}function Do(){Nn++,setTimeout(()=>{Nn--})}function Bt(t,e={},n){if(typeof t!="function")return t;try{const r=t.__sentry_wrapped__;if(r)return r;if(Xn(t))return t}catch(r){return t}const i=function(){const r=Array.prototype.slice.call(arguments);try{const s=r.map(a=>Bt(a,e));return t.apply(this,s)}catch(s){throw Do(),ja(a=>{a.addEventProcessor(o=>(e.mechanism&&(vn(o,void 0),me(o,e.mechanism)),o.extra={...o.extra,arguments:r},o)),Qn(s)}),s}};try{for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}catch(r){}Qs(i,t),ta(t,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get(){return t.name}})}catch(r){}return i}function Gr(t,e){const n=ti(t,e),i={type:e&&e.name,value:Oo(e)};return n.length&&(i.stacktrace={frames:n}),i.type===void 0&&i.value===""&&(i.value="Unrecoverable error caught"),i}function Io(t,e,n,i){const s=g().getClient(),a=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:Jn(e)?e.constructor.name:i?"UnhandledRejection":"Error",value:Lo(e,{isUnhandledRejection:i})}]},extra:{__serialized__:ia(e,a)}};if(n){const c=ti(t,n);c.length&&(o.exception.values[0].stacktrace={frames:c})}return o}function yn(t,e){return{exception:{values:[Gr(t,e)]}}}function ti(t,e){const n=e.stacktrace||e.stack||"",i=Co(e);try{return t(n,i)}catch(r){}return[]}const Ao=/Minified React error #\d+;/i;function Co(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(Ao.test(t.message))return 1}return 0}function Oo(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Uo(t,e,n,i){const r=n&&n.syntheticException||void 0,s=ei(t,e,r,i);return me(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),vt(s)}function Bo(t,e,n="info",i,r){const s=i&&i.syntheticException||void 0,a=Dn(t,e,s,r);return a.level=n,i&&i.event_id&&(a.event_id=i.event_id),vt(a)}function ei(t,e,n,i,r){let s;if(Kn(e)&&e.error)return yn(t,e.error);if(Ti(e)||ea(e)){const a=e;if("stack"in e)s=yn(t,e);else{const o=a.name||(Ti(a)?"DOMError":"DOMException"),c=a.message?"".concat(o,": ").concat(a.message):o;s=Dn(t,c,n,i),vn(s,c)}return"code"in a&&(s.tags={...s.tags,"DOMException.code":"".concat(a.code)}),s}return na(e)?yn(t,e):Tn(e)||Jn(e)?(s=Io(t,e,n,r),me(s,{synthetic:!0}),s):(s=Dn(t,e,n,i),vn(s,"".concat(e)),me(s,{synthetic:!0}),s)}function Dn(t,e,n,i){const r={message:e};if(i&&n){const s=ti(t,n);s.length&&(r.exception={values:[{value:e,stacktrace:{frames:s}}]})}return r}function Lo(t,{isUnhandledRejection:e}){const n=ra(t),i=e?"promise rejection":"exception";if(Kn(t))return"Event `ErrorEvent` captured as ".concat(i," with message `").concat(t.message,"`");if(Jn(t)){const r=Mo(t);return"Event `".concat(r,"` (type=").concat(t.type,") captured as ").concat(i)}return"Object captured as ".concat(i," with keys: ").concat(n)}function Mo(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(e){}}const Oe=1024,Pr="Breadcrumbs";class jt{static __initStatic(){this.id=Pr}__init(){this.name=jt.id}constructor(e){jt.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&K("console",Po),this.options.dom&&K("dom",Go(this.options.dom)),this.options.xhr&&K("xhr",zo),this.options.fetch&&K("fetch",Yo),this.options.history&&K("history",Fo)}addSentryBreadcrumb(e){this.options.sentry&&g().addBreadcrumb({category:"sentry.".concat(e.type==="transaction"?"transaction":"event"),event_id:e.event_id,level:e.level,message:St(e)},{event:e})}}jt.__initStatic();function Go(t){function e(n){let i,r=typeof t=="object"?t.serializeAttribute:void 0,s=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;s&&s>Oe&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("`dom.maxStringLength` cannot exceed ".concat(Oe,", but a value of ").concat(s," was configured. Sentry will use ").concat(Oe," instead.")),s=Oe),typeof r=="string"&&(r=[r]);try{const a=n.event;i=Ho(a)?Ut(a.target,{keyAttrs:r,maxStringLength:s}):Ut(a,{keyAttrs:r,maxStringLength:s})}catch(a){i="<unknown>"}i.length!==0&&g().addBreadcrumb({category:"ui.".concat(n.name),message:i},{event:n.event,name:n.name,global:n.global})}return e}function Po(t){for(let n=0;n<t.args.length;n++)if(t.args[n]==="ref=Ref<"){t.args[n+1]="viewRef";break}const e={category:"console",data:{arguments:t.args,logger:"console"},level:Na(t.level),message:vi(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message="Assertion failed: ".concat(vi(t.args.slice(1)," ")||"console.assert"),e.data.arguments=t.args.slice(1);else return;g().addBreadcrumb(e,{input:t.args,level:t.level})}function zo(t){const{startTimestamp:e,endTimestamp:n}=t,i=t.xhr[bt];if(!e||!n||!i)return;const{method:r,url:s,status_code:a,body:o}=i,c={method:r,url:s,status_code:a},u={xhr:t.xhr,input:o,startTimestamp:e,endTimestamp:n};g().addBreadcrumb({category:"xhr",data:c,type:"http"},u)}function Yo(t){const{startTimestamp:e,endTimestamp:n}=t;if(n&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){const i=t.fetchData,r={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n};g().addBreadcrumb({category:"fetch",data:i,level:"error",type:"http"},r)}else{const i={...t.fetchData,status_code:t.response&&t.response.status},r={input:t.args,response:t.response,startTimestamp:e,endTimestamp:n};g().addBreadcrumb({category:"fetch",data:i,type:"http"},r)}}function Fo(t){let e=t.from,n=t.to;const i=mn(E.location.href);let r=mn(e);const s=mn(n);r.path||(r=i),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),i.protocol===r.protocol&&i.host===r.host&&(e=r.relative),g().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}function Ho(t){return!!t&&!!t.target}function $o(t,{metadata:e,tunnel:n,dsn:i}){const r={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!i&&{dsn:en(i)}},s=jo(t);return Qt(r,[s])}function jo(t){return[{type:"user_report"},t]}class Wo extends Rt{constructor(e){const n=E.SENTRY_SDK_SOURCE||sa();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"".concat(n,":@sentry/browser"),version:Ri}],version:Ri},super(e),e.sendClientReports&&E.document&&E.document.addEventListener("visibilitychange",()=>{E.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return Uo(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",i){return Bo(this._options.stackParser,e,n,i,this._options.attachStacktrace)}sendEvent(e,n){const i=this.getIntegrationById(Pr);i&&i.addSentryBreadcrumb&&i.addSentryBreadcrumb(e),super.sendEvent(e,n)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("SDK not enabled, will not capture user feedback.");return}const n=$o(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(e,n,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,i)}_flushOutcomes(){const e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("Sending outcomes:",e);const n=Aa(e,this._options.tunnel&&en(this._dsn));this._sendEnvelope(n)}}let ae;function qo(){if(ae)return ae;if(aa(E.fetch))return ae=E.fetch.bind(E);const t=E.document;let e=E.fetch;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const i=n.contentWindow;i&&i.fetch&&(e=i.fetch),t.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return ae=e.bind(E)}function Zo(){ae=void 0}function Vo(t,e=qo()){let n=0,i=0;function r(s){const a=s.body.length;n+=a,i++;const o={body:s.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&i<15,...t.fetchOptions};try{return e(t.url,o).then(c=>(n-=a,i--,{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 Zo(),n-=a,i--,wn(c)}}return Lr(t,r)}const Xo=4;function Ko(t){function e(n){return new Rr((i,r)=>{const s=new XMLHttpRequest;s.onerror=r,s.onreadystatechange=()=>{s.readyState===Xo&&i({statusCode:s.status,headers:{"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")}})},s.open("POST",t.url);for(const a in t.headers)Object.prototype.hasOwnProperty.call(t.headers,a)&&s.setRequestHeader(a,t.headers[a]);s.send(n.body)})}return Lr(t,e)}const ee="?",Jo=10,Qo=20,tc=30,ec=40,nc=50;function ve(t,e,n,i){const r={filename:t,function:e,in_app:!0};return n!==void 0&&(r.lineno=n),i!==void 0&&(r.colno=i),r}const ic=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rc=/\((\S*)(?::(\d+))(?::(\d+))\)/,sc=t=>{const e=ic.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){const s=rc.exec(e[2]);s&&(e[2]=s[1],e[3]=s[2],e[4]=s[3])}const[i,r]=zr(e[1]||ee,e[2]);return ve(r,i,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},ac=[tc,sc],oc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,cc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,uc=t=>{const e=oc.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const s=cc.exec(e[3]);s&&(e[1]=e[1]||"eval",e[3]=s[1],e[4]=s[2],e[5]="")}let i=e[3],r=e[1]||ee;return[r,i]=zr(r,i),ve(i,r,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},lc=[nc,uc],dc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,fc=t=>{const e=dc.exec(t);return e?ve(e[2],e[1]||ee,+e[3],e[4]?+e[4]:void 0):void 0},hc=[ec,fc],_c=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,pc=t=>{const e=_c.exec(t);return e?ve(e[2],e[3]||ee,+e[1]):void 0},eh=[Jo,pc],mc=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,gc=t=>{const e=mc.exec(t);return e?ve(e[5],e[3]||e[4]||ee,+e[1],+e[2]):void 0},nh=[Qo,gc],yc=[ac,lc,hc],Ec=oa(...yc),zr=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,i=t.indexOf("safari-web-extension")!==-1;return n||i?[t.indexOf("@")!==-1?t.split("@")[0]:ee,n?"safari-extension:".concat(e):"safari-web-extension:".concat(e)]:[t,e]};class pt{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=pt.id}__init2(){this._installFunc={onerror:Sc,onunhandledrejection:bc}}constructor(e){pt.prototype.__init.call(this),pt.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const n in e){const i=this._installFunc[n];i&&e[n]&&(vc(n),i(),this._installFunc[n]=void 0)}}}pt.__initStatic();function Sc(){K("error",t=>{const[e,n,i]=Hr();if(!e.getIntegration(pt))return;const{msg:r,url:s,line:a,column:o,error:c}=t;if(Mr()||c&&c.__sentry_own_request__)return;const u=c===void 0&&_e(r)?Tc(r,s,a,o):Yr(ei(n,c||r,void 0,i,!1),s,a,o);u.level="error",Fr(e,c,u,"onerror")})}function bc(){K("unhandledrejection",t=>{const[e,n,i]=Hr();if(!e.getIntegration(pt))return;let r=t;try{"reason"in t?r=t.reason:"detail"in t&&"reason"in t.detail&&(r=t.detail.reason)}catch(a){}if(Mr()||r&&r.__sentry_own_request__)return!0;const s=vr(r)?wc(r):ei(n,r,void 0,i,!0);s.level="error",Fr(e,r,s,"onunhandledrejection")})}function wc(t){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(t))}]}}}function Tc(t,e,n,i){const r=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=Kn(t)?t.message:t,a="Error";const o=s.match(r);return o&&(a=o[1],s=o[2]),Yr({exception:{values:[{type:a,value:s}]}},e,n,i)}function Yr(t,e,n,i){const r=t.exception=t.exception||{},s=r.values=r.values||[],a=s[0]=s[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],u=isNaN(parseInt(i,10))?void 0:i,l=isNaN(parseInt(n,10))?void 0:n,d=_e(e)&&e.length>0?e:ca();return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),t}function vc(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("Global Handler attached: ".concat(t))}function Fr(t,e,n,i){me(n,{handled:!1,type:i}),t.captureEvent(n,{originalException:e})}function Hr(){const t=g(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}const Rc=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Wt{static __initStatic(){this.id="TryCatch"}__init(){this.name=Wt.id}constructor(e){Wt.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&Z(E,"setTimeout",Gi),this._options.setInterval&&Z(E,"setInterval",Gi),this._options.requestAnimationFrame&&Z(E,"requestAnimationFrame",kc),this._options.XMLHttpRequest&&"XMLHttpRequest"in E&&Z(XMLHttpRequest.prototype,"send",xc);const e=this._options.eventTarget;e&&(Array.isArray(e)?e:Rc).forEach(Nc)}}Wt.__initStatic();function Gi(t){return function(...e){const n=e[0];return e[0]=Bt(n,{mechanism:{data:{function:Ot(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function kc(t){return function(e){return t.apply(this,[Bt(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Ot(t)},handled:!0,type:"instrument"}})])}}function xc(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Z(n,r,function(s){const a={mechanism:{data:{function:r,handler:Ot(s)},handled:!0,type:"instrument"}},o=Xn(s);return o&&(a.mechanism.data.handler=Ot(o)),Bt(s,a)})}),t.apply(this,e)}}function Nc(t){const e=E,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Z(n,"addEventListener",function(i){return function(r,s,a){try{typeof s.handleEvent=="function"&&(s.handleEvent=Bt(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ot(s),target:t},handled:!0,type:"instrument"}}))}catch(o){}return i.apply(this,[r,Bt(s,{mechanism:{data:{function:"addEventListener",handler:Ot(s),target:t},handled:!0,type:"instrument"}}),a])}}),Z(n,"removeEventListener",function(i){return function(r,s,a){const o=s;try{const c=o&&o.__sentry_wrapped__;c&&i.call(this,r,c,a)}catch(c){}return i.call(this,r,o,a)}}))}const Dc="cause",Ic=5;class It{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=It.id}constructor(e={}){It.prototype.__init.call(this),this._key=e.key||Dc,this._limit=e.limit||Ic}setupOnce(){const e=g().getClient();e&&nn((n,i)=>{const r=g().getIntegration(It);return r?Ac(e.getOptions().stackParser,r._key,r._limit,n,i):n})}}It.__initStatic();function Ac(t,e,n,i,r){if(!i.exception||!i.exception.values||!r||!We(r.originalException,Error))return i;const s=$r(t,n,r.originalException,e);return i.exception.values=[...s,...i.exception.values],i}function $r(t,e,n,i,r=[]){if(!We(n[i],Error)||r.length+1>=e)return r;const s=Gr(t,n[i]);return $r(t,e,n[i],i,[s,...r])}class At{constructor(){At.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=At.id}setupOnce(){nn(e=>{if(g().getIntegration(At)){if(!E.navigator&&!E.location&&!E.document)return e;const n=e.request&&e.request.url||E.location&&E.location.href,{referrer:i}=E.document||{},{userAgent:r}=E.navigator||{},s={...e.request&&e.request.headers,...i&&{Referer:i},...r&&{"User-Agent":r}},a={...e.request,...n&&{url:n},headers:s};return{...e,request:a}}return e})}}At.__initStatic();class Ct{constructor(){Ct.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Ct.id}setupOnce(e,n){const i=r=>{if(r.type)return r;const s=n().getIntegration(Ct);if(s){try{if(Cc(r,s._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(a){return s._previousEvent=r}return s._previousEvent=r}return r};i.id=this.name,e(i)}}Ct.__initStatic();function Cc(t,e){return e?!!(Oc(t,e)||Uc(t,e)):!1}function Oc(t,e){const n=t.message,i=e.message;return!(!n&&!i||n&&!i||!n&&i||n!==i||!Wr(t,e)||!jr(t,e))}function Uc(t,e){const n=Pi(e),i=Pi(t);return!(!n||!i||n.type!==i.type||n.value!==i.value||!Wr(t,e)||!jr(t,e))}function jr(t,e){let n=zi(t),i=zi(e);if(!n&&!i)return!0;if(n&&!i||!n&&i||(n=n,i=i,i.length!==n.length))return!1;for(let r=0;r<i.length;r++){const s=i[r],a=n[r];if(s.filename!==a.filename||s.lineno!==a.lineno||s.colno!==a.colno||s.function!==a.function)return!1}return!0}function Wr(t,e){let n=t.fingerprint,i=e.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;n=n,i=i;try{return n.join("")===i.join("")}catch(r){return!1}}function Pi(t){return t.exception&&t.exception.values&&t.exception.values[0]}function zi(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(n){return}}const Bc=[new Dt,new $t,new Wt,new jt,new pt,new It,new Ct,new At];function ih(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=Bc),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),E.SENTRY_RELEASE&&E.SENTRY_RELEASE.id&&(t.release=E.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);const e={...t,stackParser:ua(t.stackParser||Ec),integrations:to(t),transport:t.transport||(la()?Vo:Ko)};lo(Wo,e),t.autoSessionTracking&&Lc()}function rh(t={},e=g()){if(!E.document){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("Global document not defined in showReportDialog call");return}const{client:n,scope:i}=e.getStackTop(),r=t.dsn||n&&n.getDsn();if(!r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("DSN not configured for showReportDialog call");return}i&&(t.user={...i.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const s=E.document.createElement("script");s.async=!0,s.src=Va(r,t),t.onLoad&&(s.onload=t.onLoad);const a=E.document.head||E.document.body;a?a.appendChild(s):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("Not injecting report dialog. No injection point found in HTML")}function sh(){return g().lastEventId()}function ah(){}function oh(t){t()}function ch(t){const e=g().getClient();return e?e.flush(t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Cannot flush events. No client defined."),vt(!1))}function uh(t){const e=g().getClient();return e?e.close(t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Cannot flush events and disable SDK. No client defined."),vt(!1))}function lh(t){return Bt(t)()}function Yi(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function Lc(){if(typeof E.document>"u"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}const t=g();t.captureSession&&(Yi(t),K("history",({from:e,to:n})=>{e===void 0||e===n||Yi(g())}))}function dh(t){const e=g().getClient();e&&e.captureUserFeedback(t)}const Mc=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumbs:jt,Dedupe:Ct,GlobalHandlers:pt,HttpContext:At,LinkedErrors:It,TryCatch:Wt},Symbol.toStringTag,{value:"Module"})),R=we,ni="sentryReplaySession",Gc="replay_event",ii="Unable to send Replay",Pc=3e5,zc=9e5,Yc=36e5,Fc=5e3,Hc=5500,$c=6e4,jc=5e3,Wc=3,Ue=15e4,Be=5e3,qc=3e3,Zc=300,Vc=1e3,ri=2e7;var q;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(q||(q={}));function Xc(t){return t.nodeType===t.ELEMENT_NODE}function ue(t){const e=t==null?void 0:t.host;return!!(e&&e.shadowRoot&&e.shadowRoot===t)}function qr({maskInputOptions:t,tagName:e,type:n}){e.toLowerCase()==="option"&&(e="select");const i=typeof n=="string"?n.toLowerCase():void 0;return t[e.toLowerCase()]||i&&t[i]||i==="password"||e==="input"&&!n&&t.text}function Kc({tagName:t,type:e,maskInputOptions:n,maskInputSelector:i}){return i||qr({maskInputOptions:n,tagName:t,type:e})}function ge({input:t,maskInputSelector:e,unmaskInputSelector:n,maskInputOptions:i,tagName:r,type:s,value:a,maskInputFn:o}){let c=a||"";return n&&t.matches(n)||(t.hasAttribute("data-rr-is-password")&&(s="password"),(qr({maskInputOptions:i,tagName:r,type:s})||e&&t.matches(e))&&(o?c=o(c):c="*".repeat(c.length))),c}const Fi="__rrweb_original__";function Jc(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let i=0;i<t.width;i+=n)for(let r=0;r<t.height;r+=n){const s=e.getImageData,a=Fi in s?s[Fi]:s;if(new Uint32Array(a.call(e,i,r,Math.min(n,t.width-i),Math.min(n,t.height-r)).data.buffer).some(c=>c!==0))return!1}return!0}function Zr(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?e.toLowerCase():null}function In(t,e,n){return typeof n=="string"&&n.toLowerCase(),e==="INPUT"&&(n==="radio"||n==="checkbox")?t.getAttribute("value")||"":t.value}let Qc=1;const tu=new RegExp("[^a-z0-9-_:]"),ye=-2;function Vr(t){return t?t.replace(/[\S]/g,"*"):""}function eu(){return Qc++}function nu(t){if(t instanceof HTMLFormElement)return"form";const e=t.tagName.toLowerCase().trim();return tu.test(e)?"div":e}function An(t){try{const e=t.rules||t.cssRules;return e?Array.from(e).map(iu).join(""):null}catch(e){return null}}function iu(t){let e=t.cssText;if(ru(t))try{e=An(t.styleSheet)||e}catch(n){}return Xr(e)}function Xr(t){if(t.indexOf(":")>-1){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}return t}function ru(t){return"styleSheet"in t}function su(t){return t.cssRules?Array.from(t.cssRules).map(e=>e.cssText?Xr(e.cssText):"").join(""):""}function au(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}let Gt,Hi;const ou=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,cu=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,uu=/^(data:)([^,]*),(.*)/i;function Ye(t,e){return(t||"").replace(ou,(n,i,r,s,a,o)=>{const c=r||a||o,u=i||s||"";if(!c)return n;if(!cu.test(c)||uu.test(c))return"url(".concat(u).concat(c).concat(u,")");if(c[0]==="/")return"url(".concat(u).concat(au(e)+c).concat(u,")");const l=e.split("/"),d=c.split("/");l.pop();for(const _ of d)_!=="."&&(_===".."?l.pop():l.push(_));return"url(".concat(u).concat(l.join("/")).concat(u,")")})}const lu=/^[^ \t\n\r\u000c]+/,du=/^[, \t\n\r\u000c]+/;function fu(t,e){if(e.trim()==="")return e;let n=0;function i(s){let a,o=s.exec(e.substring(n));return o?(a=o[0],n+=a.length,a):""}let r=[];for(;i(du),!(n>=e.length);){let s=i(lu);if(s.slice(-1)===",")s=zt(t,s.substring(0,s.length-1)),r.push(s);else{let a="";s=zt(t,s);let o=!1;for(;;){let c=e.charAt(n);if(c===""){r.push((s+a).trim());break}else if(o)c===")"&&(o=!1);else if(c===","){n+=1,r.push((s+a).trim());break}else c==="("&&(o=!0);a+=c,n+=1}}}return r.join(", ")}function zt(t,e){if(!e||e.trim()==="")return e;const n=t.createElement("a");return n.href=e,n.href}function hu(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function Cn(){const t=document.createElement("a");return t.href="",t.href}function Kr(t,e,n,i,r,s,a,o){if(!r)return r;const c=i.toLowerCase(),u=n.toLowerCase();return c==="src"||c==="href"||c==="xlink:href"&&r[0]!=="#"||c==="background"&&(u==="table"||u==="td"||u==="th")?zt(t,r):c==="srcset"?fu(t,r):c==="style"?Ye(r,Cn()):u==="object"&&c==="data"?zt(t,r):s&&_u(e,c,u,a)?o?o(r):Vr(r):r}function _u(t,e,n,i){return i&&t.matches(i)?!1:["placeholder","title","aria-label"].indexOf(e)>-1||n==="input"&&e==="value"&&t.hasAttribute("type")&&["submit","button"].indexOf(t.getAttribute("type").toLowerCase())>-1}function pu(t,e,n,i){if(i&&t.matches(i))return!1;if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=0;r<t.classList.length;r++){const s=t.classList[r];if(e.test(s))return!0}return n?t.matches(n):!1}function Ze(t,e,n,i,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return Ze(t.parentNode,e,n,i,r);if(i&&(t.matches(i)||t.closest(i)))return!1;if(r)return!0;if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let s=0;s<t.classList.length;s++){const a=t.classList[s];if(e.test(a))return!0}return n&&t.matches(n)?!0:Ze(t.parentNode,e,n,i,r)}function mu(t,e,n){const i=t.contentWindow;if(!i)return;let r=!1,s;try{s=i.document.readyState}catch(o){return}if(s!=="complete"){const o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()});return}const a="about:blank";if(i.location.href!==a||t.src===a||t.src===""){setTimeout(e,0);return}t.addEventListener("load",e)}function gu(t,e){var n;const{doc:i,blockClass:r,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:u,inlineStylesheet:l,maskInputSelector:d,unmaskInputSelector:_,maskAllText:h,maskInputOptions:p={},maskTextFn:y,maskInputFn:T,dataURLOptions:b={},inlineImages:U,recordCanvas:I,keepIframeSrcFn:N}=e;let w;if(i.__sn){const D=i.__sn.id;w=D===1?void 0:D}switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:q.Document,childNodes:[],compatMode:t.compatMode,rootId:w}:{type:q.Document,childNodes:[],rootId:w};case t.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:const D=pu(t,r,s,a),v=nu(t);let S={};for(const{name:m,value:C}of Array.from(t.attributes))Su(v,m)||(S[m]=Kr(i,t,v,m,C,h,u,y));if(v==="link"&&l){const m=Array.from(i.styleSheets).find(F=>F.href===t.href);let C=null;m&&(C=An(m)),C&&(delete S.rel,delete S.href,S._cssText=Ye(C,m.href))}if(v==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const m=An(t.sheet);m&&(S._cssText=Ye(m,Cn()))}if(v==="input"||v==="textarea"||v==="select"||v==="option"){const m=t,C=Zr(m),F=In(m,v.toUpperCase(),C),J=t.checked;C!=="submit"&&C!=="button"&&F&&(S.value=ge({input:m,type:C,tagName:v,value:F,maskInputSelector:d,unmaskInputSelector:_,maskInputOptions:p,maskInputFn:T})),J&&(S.checked=J)}if(v==="option"&&(t.selected&&!p.select?S.selected=!0:delete S.selected),v==="canvas"&&I){if(t.__context==="2d")Jc(t)||(S.rr_dataURL=t.toDataURL(b.type,b.quality));else if(!("__context"in t)){const m=t.toDataURL(b.type,b.quality),C=document.createElement("canvas");C.width=t.width,C.height=t.height;const F=C.toDataURL(b.type,b.quality);m!==F&&(S.rr_dataURL=m)}}if(v==="img"&&U){Gt||(Gt=i.createElement("canvas"),Hi=Gt.getContext("2d"));const m=t,C=m.crossOrigin;m.crossOrigin="anonymous";const F=()=>{try{Gt.width=m.naturalWidth,Gt.height=m.naturalHeight,Hi.drawImage(m,0,0),S.rr_dataURL=Gt.toDataURL(b.type,b.quality)}catch(J){console.warn("Cannot inline img src=".concat(m.currentSrc,"! Error: ").concat(J))}C?S.crossOrigin=C:delete S.crossOrigin};m.complete&&m.naturalWidth!==0?F():m.onload=F}if((v==="audio"||v==="video")&&(S.rr_mediaState=t.paused?"paused":"played",S.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop),D){const{width:m,height:C}=t.getBoundingClientRect();S={class:S.class,rr_width:"".concat(m,"px"),rr_height:"".concat(C,"px")}}return v==="iframe"&&!N(S.src)&&(t.contentDocument||(S.rr_src=S.src),delete S.src),{type:q.Element,tagName:v,attributes:S,childNodes:[],isSVG:hu(t)||void 0,needBlock:D,rootId:w};case t.TEXT_NODE:const L=t.parentNode&&t.parentNode.tagName;let A=t.textContent;const Y=L==="STYLE"?!0:void 0,W=L==="SCRIPT"?!0:void 0;if(Y&&A){try{t.nextSibling||t.previousSibling||!((n=t.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(A=su(t.parentNode.sheet))}catch(m){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(m),t)}A=Ye(A,Cn())}if(W&&(A="SCRIPT_PLACEHOLDER"),L==="TEXTAREA"&&A)A="";else if(L==="OPTION"&&A){const m=t.parentNode;A=ge({input:m,type:null,tagName:L,value:A,maskInputSelector:d,unmaskInputSelector:_,maskInputOptions:p,maskInputFn:T})}else!Y&&!W&&Ze(t,o,c,u,h)&&A&&(A=y?y(A):Vr(A));return{type:q.Text,textContent:A||"",isStyle:Y,rootId:w};case t.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:q.Comment,textContent:t.textContent||"",rootId:w};default:return!1}}function M(t){return t==null?"":t.toLowerCase()}function yu(t,e){if(e.comment&&t.type===q.Comment)return!0;if(t.type===q.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(M(t.attributes.name).match(/^msapplication-tile(image|color)$/)||M(t.attributes.name)==="application-name"||M(t.attributes.rel)==="icon"||M(t.attributes.rel)==="apple-touch-icon"||M(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&M(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(M(t.attributes.property).match(/^(og|twitter|fb):/)||M(t.attributes.name).match(/^(og|twitter):/)||M(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(M(t.attributes.name)==="robots"||M(t.attributes.name)==="googlebot"||M(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(M(t.attributes.name)==="author"||M(t.attributes.name)==="generator"||M(t.attributes.name)==="framework"||M(t.attributes.name)==="publisher"||M(t.attributes.name)==="progid"||M(t.attributes.property).match(/^article:/)||M(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(M(t.attributes.name)==="google-site-verification"||M(t.attributes.name)==="yandex-verification"||M(t.attributes.name)==="csrf-token"||M(t.attributes.name)==="p:domain_verify"||M(t.attributes.name)==="verify-v1"||M(t.attributes.name)==="verification"||M(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function le(t,e){const{doc:n,map:i,blockClass:r,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:u,skipChild:l=!1,inlineStylesheet:d=!0,maskInputSelector:_,unmaskInputSelector:h,maskAllText:p,maskInputOptions:y={},maskTextFn:T,maskInputFn:b,slimDOMOptions:U,dataURLOptions:I={},inlineImages:N=!1,recordCanvas:w=!1,onSerialize:D,onIframeLoad:v,iframeLoadTimeout:S=5e3,keepIframeSrcFn:L=()=>!1}=e;let{preserveWhiteSpace:A=!0}=e;const Y=gu(t,{doc:n,blockClass:r,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:u,inlineStylesheet:d,maskInputSelector:_,unmaskInputSelector:h,maskAllText:p,maskInputOptions:y,maskTextFn:T,maskInputFn:b,dataURLOptions:I,inlineImages:N,recordCanvas:w,keepIframeSrcFn:L});if(!Y)return console.warn(t,"not serialized"),null;let W;"__sn"in t?W=t.__sn.id:yu(Y,U)||!A&&Y.type===q.Text&&!Y.isStyle&&!Y.textContent.replace(/^\s+|\s+$/gm,"").length?W=ye:W=eu();const m=Object.assign(Y,{id:W});if(t.__sn=m,W===ye)return null;i[W]=t,D&&D(t);let C=!l;if(m.type===q.Element&&(C=C&&!m.needBlock,delete m.needBlock,t.shadowRoot&&(m.isShadowHost=!0)),(m.type===q.Document||m.type===q.Element)&&C){U.headWhitespace&&Y.type===q.Element&&Y.tagName==="head"&&(A=!1);const F={doc:n,map:i,blockClass:r,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:u,skipChild:l,inlineStylesheet:d,maskInputSelector:_,unmaskInputSelector:h,maskAllText:p,maskInputOptions:y,maskTextFn:T,maskInputFn:b,slimDOMOptions:U,dataURLOptions:I,inlineImages:N,recordCanvas:w,preserveWhiteSpace:A,onSerialize:D,onIframeLoad:v,iframeLoadTimeout:S,keepIframeSrcFn:L};for(const J of Array.from(t.childNodes)){const ct=le(J,F);ct&&m.childNodes.push(ct)}if(Xc(t)&&t.shadowRoot)for(const J of Array.from(t.shadowRoot.childNodes)){const ct=le(J,F);ct&&(ct.isShadow=!0,m.childNodes.push(ct))}}return t.parentNode&&ue(t.parentNode)&&(m.isShadow=!0),m.type===q.Element&&m.tagName==="iframe"&&mu(t,()=>{const F=t.contentDocument;if(F&&v){const J=le(F,{doc:F,map:i,blockClass:r,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputSelector:_,unmaskInputSelector:h,maskAllText:p,maskInputOptions:y,maskTextFn:T,maskInputFn:b,slimDOMOptions:U,dataURLOptions:I,inlineImages:N,recordCanvas:w,preserveWhiteSpace:A,onSerialize:D,onIframeLoad:v,iframeLoadTimeout:S,keepIframeSrcFn:L});J&&v(t,J)}},S),m}function Eu(t,e){const{blockClass:n="rr-block",blockSelector:i=null,unblockSelector:r=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,unmaskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:u=!1,recordCanvas:l=!1,maskInputSelector:d=null,unmaskInputSelector:_=null,maskAllText:h=!1,maskAllInputs:p=!1,maskTextFn:y,maskInputFn:T,slimDOM:b=!1,dataURLOptions:U,preserveWhiteSpace:I,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D,keepIframeSrcFn:v=()=>!1}=e||{},S={};return[le(t,{doc:t,map:S,blockClass:n,blockSelector:i,unblockSelector:r,maskTextClass:s,maskTextSelector:a,unmaskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputSelector:d,unmaskInputSelector:_,maskAllText:h,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,maskTextFn:y,maskInputFn:T,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:U,inlineImages:u,recordCanvas:l,preserveWhiteSpace:I,onSerialize:N,onIframeLoad:w,iframeLoadTimeout:D,keepIframeSrcFn:v}),S]}function Su(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}var O;(function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin"})(O||(O={}));var X;(function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration"})(X||(X={}));var Ve;(function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel"})(Ve||(Ve={}));var qt;(function(t){t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2"})(qt||(qt={}));var $i;(function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange"})($i||($i={}));var ji;(function(t){t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back"})(ji||(ji={}));function nt(t,e,n=document){const i={capture:!0,passive:!0};return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}function bu(){return{map:{},getId(t){return!t||!t.__sn?-1:t.__sn.id},getNode(t){return this.map[t]||null},removeNodeFromMap(t){const e=t.__sn&&t.__sn.id;delete this.map[e],t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))},has(t){return this.map.hasOwnProperty(t)},reset(){this.map={}}}}const Pt="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Wi={map:{},getId(){return console.error(Pt),-1},getNode(){return console.error(Pt),null},removeNodeFromMap(){console.error(Pt)},has(){return console.error(Pt),!1},reset(){console.error(Pt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Wi=new Proxy(Wi,{get(t,e,n){return e==="map"&&console.error(Pt),Reflect.get(t,e,n)}}));function Ee(t,e,n={}){let i=null,r=0;return function(s){let a=Date.now();!r&&n.leading===!1&&(r=a);let o=e-(a-r),c=this,u=arguments;o<=0||o>e?(i&&(clearTimeout(i),i=null),r=a,t.apply(c,u)):!i&&n.trailing!==!1&&(i=setTimeout(()=>{r=n.leading===!1?0:Date.now(),i=null,t.apply(c,u)},o))}}function an(t,e,n,i,r=window){const s=r.Object.getOwnPropertyDescriptor(t,e);return r.Object.defineProperty(t,e,i?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),s&&s.set&&s.set.call(this,a)}}),()=>an(t,e,s||{},!0)}function Zt(t,e,n){try{if(!(e in t))return()=>{};const i=t[e],r=n(i);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=r,()=>{t[e]=i}}catch(i){return()=>{}}}function Jr(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Qr(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Q(t,e,n,i){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let r=!1;const s=i&&t.matches(i);return typeof e=="string"?t.closest!==void 0?r=!s&&t.closest("."+e)!==null:r=!s&&t.classList.contains(e):!s&&t.classList.forEach(a=>{e.test(a)&&(r=!0)}),!r&&n&&(r=t.matches(n)),!s&&r||Q(t.parentNode,e,n,i)}return t.nodeType===t.TEXT_NODE,Q(t.parentNode,e,n,i)}function En(t){return"__sn"in t?t.__sn.id===ye:!1}function ts(t,e){if(ue(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?ts(t.parentNode,e):!0:!0}function es(t){return!!t.changedTouches}function wu(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(n){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function ns(t){return"__sn"in t?t.__sn.type===q.Element&&t.__sn.tagName==="iframe":!1}function is(t){return!!(t!=null&&t.shadowRoot)}function qi(t){return"__ln"in t}class Tu{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let i=0;i<e;i++)n=(n==null?void 0:n.next)||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&qi(e.previousSibling)){const i=e.previousSibling.__ln.next;n.next=i,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,i&&(i.previous=n)}else if(e.nextSibling&&qi(e.nextSibling)&&e.nextSibling.__ln.previous){const i=e.nextSibling.__ln.previous;n.previous=i,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,i&&(i.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(e){const n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const Zi=(t,e)=>"".concat(t,"@").concat(e);function Vi(t){return"__sn"in t}class vu{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Tu,i=o=>{let c=o,u=ye;for(;u===ye;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},r=o=>{var c,u,l,d,_;const h=o.getRootNode?(c=o.getRootNode())===null||c===void 0?void 0:c.host:null;let p=h;for(;!((l=(u=p==null?void 0:p.getRootNode)===null||u===void 0?void 0:u.call(p))===null||l===void 0)&&l.host;)p=((_=(d=p==null?void 0:p.getRootNode)===null||d===void 0?void 0:d.call(p))===null||_===void 0?void 0:_.host)||null;const y=!this.doc.contains(o)&&(!p||!this.doc.contains(p));if(!o.parentNode||y)return;const T=ue(o.parentNode)?this.mirror.getId(h):this.mirror.getId(o.parentNode),b=i(o);if(T===-1||b===-1)return n.addNode(o);let U=le(o,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:I=>{ns(I)&&this.iframeManager.addIframe(I),is(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,document)},onIframeLoad:(I,N)=>{this.iframeManager.attachIframe(I,N),this.shadowDomManager.observeAttachShadow(I)}});U&&e.push({parentId:T,nextId:b,node:U})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)Un(this.removes,o,this.mirror)&&!this.movedSet.has(o.parentNode)||r(o);for(const o of this.addedSet)!Bn(this.droppedSet,o)&&!Un(this.removes,o,this.mirror)||Bn(this.movedSet,o)?r(o):this.droppedSet.add(o);let s=null;for(;n.length;){let o=null;if(s){const c=this.mirror.getId(s.value.parentNode),u=i(s.value);c!==-1&&u!==-1&&(o=s)}if(!o)for(let c=n.length-1;c>=0;c--){const u=n.get(c);if(u){const l=this.mirror.getId(u.value.parentNode),d=i(u.value);if(l!==-1&&d!==-1){o=u;break}}}if(!o){for(;n.head;)n.removeNode(n.head.value);break}s=o.previous,n.removeNode(o.value),r(o.value)}const a={texts:this.texts.map(o=>({id:this.mirror.getId(o.node),value:o.value})).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>({id:this.mirror.getId(o.node),attributes:o.attributes})).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=e=>{if(!En(e.target))switch(e.type){case"characterData":{const n=e.target.textContent;!Q(e.target,this.blockClass,this.blockSelector,this.unblockSelector)&&n!==e.oldValue&&this.texts.push({value:Ze(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let i=n.getAttribute(e.attributeName);if(e.attributeName==="value"&&(i=ge({input:n,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:n.getAttribute("type"),value:i,maskInputFn:this.maskInputFn})),Q(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||i===e.oldValue)return;let r=this.attributes.find(s=>s.node===e.target);if(r||(r={node:e.target,attributes:{}},this.attributes.push(r)),e.attributeName==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),e.attributeName==="style"){const s=this.doc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue),(r.attributes.style===void 0||r.attributes.style===null)&&(r.attributes.style={});try{const a=r.attributes.style;for(const o of Array.from(n.style)){const c=n.style.getPropertyValue(o),u=n.style.getPropertyPriority(o);(c!==s.style.getPropertyValue(o)||u!==s.style.getPropertyPriority(o))&&(u===""?a[o]=c:a[o]=[c,u])}for(const o of Array.from(s.style))n.style.getPropertyValue(o)===""&&(a[o]=!1)}catch(a){console.warn("[rrweb] Error when parsing update to style attribute:",a)}}else{const s=e.target;r.attributes[e.attributeName]=Kr(this.doc,s,s.tagName,e.attributeName,i,this.maskAllText,this.unmaskTextSelector,this.maskTextFn)}break}case"childList":{e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const i=this.mirror.getId(n),r=ue(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Q(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||En(n)||(this.addedSet.has(n)?(On(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&i===-1||ts(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Zi(i,r)]?On(this.movedSet,n):this.removes.push({parentId:r,id:i,isShadow:ue(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(!(n&&Q(n,this.blockClass,this.blockSelector,this.unblockSelector))){if(Vi(e)){if(En(e))return;this.movedSet.add(e);let i=null;n&&Vi(n)&&(i=n.__sn.id),i&&(this.movedMap[Zi(e.__sn.id,i)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Q(e,this.blockClass,this.blockSelector,this.unblockSelector)||e.childNodes.forEach(i=>this.genAdds(i))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach(n=>{this[n]=e[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 On(t,e){t.delete(e),e.childNodes.forEach(n=>On(t,n))}function Un(t,e,n){const{parentNode:i}=e;if(!i)return!1;const r=n.getId(i);return t.some(s=>s.id===r)?!0:Un(t,i,n)}function Bn(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Bn(t,n):!1}const x=t=>(...n)=>{try{return t(...n)}catch(i){try{i.__rrweb__=!0}catch(r){}throw i}},kt=[];function Re(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(e){}return t&&t.target}function rs(t,e){var n,i;const r=new vu;kt.push(r),r.init(t);let s=window.MutationObserver||window.__rrMutationObserver;const a=(i=(n=window==null?void 0:window.Zone)===null||n===void 0?void 0:n.__symbol__)===null||i===void 0?void 0:i.call(n,"MutationObserver");a&&window[a]&&(s=window[a]);const o=new s(x(c=>{t.onMutation&&t.onMutation(c)===!1||r.processMutations(c)}));return o.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ru({mousemoveCb:t,sampling:e,doc:n,mirror:i}){if(e.mousemove===!1)return()=>{};const r=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],o;const c=Ee(d=>{const _=Date.now()-o;x(t)(a.map(h=>(h.timeOffset-=_,h)),d),a=[],o=null},s),u=Ee(d=>{const _=Re(d),{clientX:h,clientY:p}=es(d)?d.changedTouches[0]:d;o||(o=Date.now()),a.push({x:h,y:p,id:i.getId(_),timeOffset:Date.now()-o}),c(typeof DragEvent<"u"&&d instanceof DragEvent?X.Drag:d instanceof MouseEvent?X.MouseMove:X.TouchMove)},r,{trailing:!1}),l=[nt("mousemove",x(u),n),nt("touchmove",x(u),n),nt("drag",x(u),n)];return x(()=>{l.forEach(d=>d())})}function ku({mouseInteractionCb:t,doc:e,mirror:n,blockClass:i,blockSelector:r,unblockSelector:s,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,c=[],u=l=>d=>{const _=Re(d);if(Q(_,i,r,s))return;const h=es(d)?d.changedTouches[0]:d;if(!h)return;const p=n.getId(_),{clientX:y,clientY:T}=h;x(t)({type:Ve[l],id:p,x:y,y:T})};return Object.keys(Ve).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&o[l]!==!1).forEach(l=>{const d=l.toLowerCase(),_=x(u(l));c.push(nt(d,_,e))}),x(()=>{c.forEach(l=>l())})}function ss({scrollCb:t,doc:e,mirror:n,blockClass:i,blockSelector:r,unblockSelector:s,sampling:a}){const o=Ee(c=>{const u=Re(c);if(!u||Q(u,i,r,s))return;const l=n.getId(u);if(u===e){const d=e.scrollingElement||e.documentElement;x(t)({id:l,x:d.scrollLeft,y:d.scrollTop})}else x(t)({id:l,x:u.scrollLeft,y:u.scrollTop})},a.scroll||100);return nt("scroll",x(o),e)}function xu({viewportResizeCb:t}){let e=-1,n=-1;const i=Ee(()=>{const r=Jr(),s=Qr();(e!==r||n!==s)&&(x(t)({width:Number(s),height:Number(r)}),e=r,n=s)},200);return nt("resize",x(i),window)}function Xi(t,e){const n=Object.assign({},t);return e||delete n.userTriggered,n}const Nu=["INPUT","TEXTAREA","SELECT"],Ki=new WeakMap;function Du({inputCb:t,doc:e,mirror:n,blockClass:i,blockSelector:r,unblockSelector:s,ignoreClass:a,ignoreSelector:o,maskInputSelector:c,unmaskInputSelector:u,maskInputOptions:l,maskInputFn:d,sampling:_,userTriggeredOnInput:h}){function p(N){let w=Re(N);const D=w&&w.tagName,v=N.isTrusted;if(D==="OPTION"&&(w=w.parentElement),!w||!D||Nu.indexOf(D)<0||Q(w,i,r,s))return;const S=w,L=Zr(S);if(S.classList.contains(a)||o&&S.matches(o))return;let A=In(S,D,L),Y=!1;(L==="radio"||L==="checkbox")&&(Y=w.checked),Kc({maskInputOptions:l,maskInputSelector:c,tagName:D,type:L})&&(A=ge({input:S,maskInputOptions:l,maskInputSelector:c,unmaskInputSelector:u,tagName:D,type:L,value:A,maskInputFn:d})),y(w,x(Xi)({text:A,isChecked:Y,userTriggered:v},h));const W=w.name;L==="radio"&&W&&Y&&e.querySelectorAll('input[type="radio"][name="'.concat(W,'"]')).forEach(m=>{if(m!==w){const C=ge({input:m,maskInputOptions:l,maskInputSelector:c,unmaskInputSelector:u,tagName:D,type:L,value:In(m,D,L),maskInputFn:d});y(m,x(Xi)({text:C,isChecked:!Y,userTriggered:!1},h))}})}function y(N,w){const D=Ki.get(N);if(!D||D.text!==w.text||D.isChecked!==w.isChecked){Ki.set(N,w);const v=n.getId(N);t(Object.assign(Object.assign({},w),{id:v}))}}const b=(_.input==="last"?["change"]:["input","change"]).map(N=>nt(N,x(p),e)),U=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),I=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return U&&U.set&&b.push(...I.map(N=>an(N[0],N[1],{set(){x(p)({target:this})}}))),x(()=>{b.forEach(N=>N())})}function Xe(t){const e=[];function n(i,r){if(Le("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||Le("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||Le("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||Le("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){const a=Array.from(i.parentRule.cssRules).indexOf(i);r.unshift(a)}else{const a=Array.from(i.parentStyleSheet.cssRules).indexOf(i);r.unshift(a)}return r}return n(t,e)}function Iu({styleSheetRuleCb:t,mirror:e},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:x((o,c,u)=>{const[l,d]=u,_=e.getId(c.ownerNode);return _!==-1&&t({id:_,adds:[{rule:l,index:d}]}),o.apply(c,u)})});const r=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(r,{apply:x((o,c,u)=>{const[l]=u,d=e.getId(c.ownerNode);return d!==-1&&t({id:d,removes:[{index:l}]}),o.apply(c,u)})});const s={};Me("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(Me("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),Me("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),Me("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(s).forEach(([o,c])=>{a[o]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(a[o].insertRule,{apply:x((u,l,d)=>{const[_,h]=d,p=e.getId(l.parentStyleSheet.ownerNode);return p!==-1&&t({id:p,adds:[{rule:_,index:[...Xe(l),h||0]}]}),u.apply(l,d)})}),c.prototype.deleteRule=new Proxy(a[o].deleteRule,{apply:x((u,l,d)=>{const[_]=d,h=e.getId(l.parentStyleSheet.ownerNode);return h!==-1&&t({id:h,removes:[{index:[...Xe(l),_]}]}),u.apply(l,d)})})}),x(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=r,Object.entries(s).forEach(([o,c])=>{c.prototype.insertRule=a[o].insertRule,c.prototype.deleteRule=a[o].deleteRule})})}function Au({styleDeclarationCb:t,mirror:e},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:x((s,a,o)=>{var c,u;const[l,d,_]=o,h=e.getId((u=(c=a.parentRule)===null||c===void 0?void 0:c.parentStyleSheet)===null||u===void 0?void 0:u.ownerNode);return h!==-1&&t({id:h,set:{property:l,value:d,priority:_},index:Xe(a.parentRule)}),s.apply(a,o)})});const r=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(r,{apply:x((s,a,o)=>{var c,u;const[l]=o,d=e.getId((u=(c=a.parentRule)===null||c===void 0?void 0:c.parentStyleSheet)===null||u===void 0?void 0:u.ownerNode);return d!==-1&&t({id:d,remove:{property:l},index:Xe(a.parentRule)}),s.apply(a,o)})}),x(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=r})}function Cu({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:i,mirror:r,sampling:s}){const a=c=>Ee(x(u=>{const l=Re(u);if(!l||Q(l,e,n,i))return;const{currentTime:d,volume:_,muted:h}=l;t({type:c,id:r.getId(l),currentTime:d,volume:_,muted:h})}),s.media||500),o=[nt("play",a(0)),nt("pause",a(1)),nt("seeked",a(2)),nt("volumechange",a(3))];return x(()=>{o.forEach(c=>c())})}function Ou({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const i=[],r=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,l){const d=new s(c,u,l);return r.set(d,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const a=Zt(e.fonts,"add",function(o){return function(c){return setTimeout(()=>{const u=r.get(c);u&&(t(u),r.delete(c))},0),o.apply(this,[c])}});return i.push(()=>{n.FontFace=s}),i.push(a),x(()=>{i.forEach(o=>o())})}function Uu(t,e){const{mutationCb:n,mousemoveCb:i,mouseInteractionCb:r,scrollCb:s,viewportResizeCb:a,inputCb:o,mediaInteractionCb:c,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:d,fontCb:_}=t;t.mutationCb=(...h)=>{e.mutation&&e.mutation(...h),n(...h)},t.mousemoveCb=(...h)=>{e.mousemove&&e.mousemove(...h),i(...h)},t.mouseInteractionCb=(...h)=>{e.mouseInteraction&&e.mouseInteraction(...h),r(...h)},t.scrollCb=(...h)=>{e.scroll&&e.scroll(...h),s(...h)},t.viewportResizeCb=(...h)=>{e.viewportResize&&e.viewportResize(...h),a(...h)},t.inputCb=(...h)=>{e.input&&e.input(...h),o(...h)},t.mediaInteractionCb=(...h)=>{e.mediaInteaction&&e.mediaInteaction(...h),c(...h)},t.styleSheetRuleCb=(...h)=>{e.styleSheetRule&&e.styleSheetRule(...h),u(...h)},t.styleDeclarationCb=(...h)=>{e.styleDeclaration&&e.styleDeclaration(...h),l(...h)},t.canvasMutationCb=(...h)=>{e.canvasMutation&&e.canvasMutation(...h),d(...h)},t.fontCb=(...h)=>{e.font&&e.font(...h),_(...h)}}function Bu(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};Uu(t,e);const i=rs(t,t.doc),r=Ru(t),s=ku(t),a=ss(t),o=xu(t),c=Du(t),u=Cu(t),l=Iu(t,{win:n}),d=Au(t,{win:n}),_=t.collectFonts?Ou(t):()=>{},h=[];for(const p of t.plugins)h.push(p.observer(p.callback,n,p.options));return x(()=>{kt.forEach(p=>p.reset()),i.disconnect(),r(),s(),a(),o(),c(),u();try{l(),d()}catch(p){}_(),h.forEach(p=>p())})}function Le(t){return typeof window[t]<"u"}function Me(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Lu{constructor(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}addIframe(e){this.iframes.set(e,!0)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var i;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(i=this.loadListener)===null||i===void 0||i.call(this,e)}}class Mu{constructor(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const n=this;this.restorePatches.push(Zt(HTMLElement.prototype,"attachShadow",function(i){return function(){const r=i.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),r}}))}addShadowRoot(e,n){rs(Object.assign(Object.assign({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),ss(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}observeAttachShadow(e){if(e.contentWindow){const n=this;this.restorePatches.push(Zt(e.contentWindow.HTMLElement.prototype,"attachShadow",function(i){return function(){const r=i.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,e.contentDocument),r}}))}}reset(){this.restorePatches.forEach(e=>e())}}function Gu(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function Pu(t,e,n,i,r,s){const a=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const c of o)try{if(typeof e.CanvasRenderingContext2D.prototype[c]!="function")continue;const u=Zt(e.CanvasRenderingContext2D.prototype,c,function(l){return function(...d){return Q(this.canvas,n,r,i)||setTimeout(()=>{const _=[...d];if(c==="drawImage"&&_[0]&&_[0]instanceof HTMLCanvasElement){const h=_[0],p=h.getContext("2d");let y=p==null?void 0:p.getImageData(0,0,h.width,h.height),T=y==null?void 0:y.data;_[0]=JSON.stringify(T)}t(this.canvas,{type:qt["2D"],property:c,args:_})},0),l.apply(this,d)}});a.push(u)}catch(u){const l=an(e.CanvasRenderingContext2D.prototype,c,{set(d){t(this.canvas,{type:qt["2D"],property:c,args:[d],setter:!0})}});a.push(l)}return()=>{a.forEach(c=>c())}}function zu(t,e,n,i){const r=[];try{const s=Zt(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(o,...c){return Q(this,e,n,i)||"__context"in this||(this.__context=o),a.apply(this,[o,...c])}});r.push(s)}catch(s){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(s=>s())}}var Yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ge=0;Ge<Yt.length;Ge++)Yu[Yt.charCodeAt(Ge)]=Ge;var Fu=function(t){var e=new Uint8Array(t),n,i=e.length,r="";for(n=0;n<i;n+=3)r+=Yt[e[n]>>2],r+=Yt[(e[n]&3)<<4|e[n+1]>>4],r+=Yt[(e[n+1]&15)<<2|e[n+2]>>6],r+=Yt[e[n+2]&63];return i%3===2?r=r.substring(0,r.length-1)+"=":i%3===1&&(r=r.substring(0,r.length-2)+"=="),r};const Ji=new Map;function Hu(t,e){let n=Ji.get(t);return n||(n=new Map,Ji.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const as=(t,e,n)=>{if(!t||!(os(t,e)||typeof t=="object"))return;const i=t.constructor.name,r=Hu(n,i);let s=r.indexOf(t);return s===-1&&(s=r.length,r.push(t)),s};function Fe(t,e,n){if(t instanceof Array)return t.map(i=>Fe(i,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const i=t.constructor.name,r=Fu(t);return{rr_type:i,base64:r}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Fe(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const i=t.constructor.name,{src:r}=t;return{rr_type:i,src:r}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[Fe(t.data,e,n),t.width,t.height]};if(os(t,e)||typeof t=="object"){const i=t.constructor.name,r=as(t,e,n);return{rr_type:i,index:r}}}}return t}const $u=(t,e,n)=>[...t].map(i=>Fe(i,e,n)),os=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof e[r]=="function").find(r=>t instanceof e[r]);function Qi(t,e,n,i,r,s,a,o){const c=[],u=Object.getOwnPropertyNames(t);for(const l of u)try{if(typeof t[l]!="function")continue;const d=Zt(t,l,function(_){return function(...h){const p=_.apply(this,h);if(as(p,o,t),!Q(this.canvas,i,s,r)){const y=a.getId(this.canvas),T=$u([...h],o,t),b={type:e,property:l,args:T};n(this.canvas,b)}return p}});c.push(d)}catch(d){const _=an(t,l,{set(h){n(this.canvas,{type:e,property:l,args:[h],setter:!0})}});c.push(_)}return c}function ju(t,e,n,i,r,s){const a=[];return a.push(...Qi(e.WebGLRenderingContext.prototype,qt.WebGL,t,n,i,r,s,e)),typeof e.WebGL2RenderingContext<"u"&&a.push(...Qi(e.WebGL2RenderingContext.prototype,qt.WebGL2,t,n,i,r,s,e)),()=>{a.forEach(o=>o())}}class Wu{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(n,i){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(n)||this.pendingCanvasMutations.set(n,[]),this.pendingCanvasMutations.get(n).push(i)},this.mutationCb=e.mutationCb,this.mirror=e.mirror,e.recordCanvas===!0&&this.initCanvasMutationObserver(e.win,e.blockClass,e.blockSelector,e.unblockSelector)}initCanvasMutationObserver(e,n,i,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=zu(e,n,r,i),a=Pu(this.processMutation.bind(this),e,n,r,i,this.mirror),o=ju(this.processMutation.bind(this),e,n,r,i,this.mirror);this.resetObservers=()=>{s(),a(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const i=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(e);if(!i||n===-1)return;const r=i.map(a=>Gu(a,["type"])),{type:s}=i[0];this.mutationCb({id:n,type:s,commands:r}),this.pendingCanvasMutations.delete(e)}}function V(t){return Object.assign(Object.assign({},t),{timestamp:Date.now()})}let $,de;const oe=bu();function Lt(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,maskInputSelector:d=null,unmaskTextSelector:_=null,unmaskInputSelector:h=null,inlineStylesheet:p=!0,maskAllText:y=!1,maskAllInputs:T,maskInputOptions:b,slimDOMOptions:U,maskInputFn:I,maskTextFn:N,hooks:w,packFn:D,sampling:v={},mousemoveWait:S,recordCanvas:L=!1,userTriggeredOnInput:A=!1,collectFonts:Y=!1,inlineImages:W=!1,plugins:m,keepIframeSrcFn:C=()=>!1,onMutation:F}=t;if(!e)throw new Error("emit function is required");S!==void 0&&v.mousemove===void 0&&(v.mousemove=S);const J=T===!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}:b!==void 0?b:{},ct=U===!0||U==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:U==="all",headMetaDescKeywords:U==="all"}:U||{};wu();let mi,fn=0;const Ls=k=>{for(const rt of m||[])rt.eventProcessor&&(k=rt.eventProcessor(k));return D&&(k=D(k)),k};$=(k,rt)=>{var ut;if(!((ut=kt[0])===null||ut===void 0)&&ut.isFrozen()&&k.type!==O.FullSnapshot&&!(k.type===O.IncrementalSnapshot&&k.data.source===X.Mutation)&&kt.forEach(tt=>tt.unfreeze()),e(Ls(k),rt),k.type===O.FullSnapshot)mi=k,fn=0;else if(k.type===O.IncrementalSnapshot){if(k.data.source===X.Mutation&&k.data.isAttachIframe)return;fn++;const tt=i&&fn>=i,st=n&&k.timestamp-mi.timestamp>n;(tt||st)&&de(!0)}};const hn=k=>{$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.Mutation},k)}))},gi=k=>$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.Scroll},k)})),yi=k=>$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.CanvasMutation},k)})),ne=new Lu({mutationCb:hn}),Ei=new Wu({recordCanvas:L,mutationCb:yi,win:window,blockClass:r,blockSelector:s,unblockSelector:a,mirror:oe}),_n=new Mu({mutationCb:hn,scrollCb:gi,bypassOptions:{onMutation:F,blockClass:r,blockSelector:s,unblockSelector:a,maskTextClass:u,maskTextSelector:l,unmaskTextSelector:_,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:p,maskAllText:y,maskInputOptions:J,maskTextFn:N,maskInputFn:I,recordCanvas:L,inlineImages:W,sampling:v,slimDOMOptions:ct,iframeManager:ne,canvasManager:Ei},mirror:oe});de=(k=!1)=>{var rt,ut,tt,st;$(V({type:O.Meta,data:{href:window.location.href,width:Qr(),height:Jr()}}),k),kt.forEach(at=>at.lock());const[G,ie]=Eu(document,{blockClass:r,blockSelector:s,unblockSelector:a,maskTextClass:u,maskTextSelector:l,unmaskTextSelector:_,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:p,maskAllText:y,maskAllInputs:J,maskTextFn:N,slimDOM:ct,recordCanvas:L,inlineImages:W,onSerialize:at=>{ns(at)&&ne.addIframe(at),is(at)&&_n.addShadowRoot(at.shadowRoot,document)},onIframeLoad:(at,Ms)=>{ne.attachIframe(at,Ms),_n.observeAttachShadow(at)},keepIframeSrcFn:C});if(!G)return console.warn("Failed to snapshot the document");oe.map=ie,$(V({type:O.FullSnapshot,data:{node:G,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:(document==null?void 0:document.documentElement.scrollLeft)||((ut=(rt=document==null?void 0:document.body)===null||rt===void 0?void 0:rt.parentElement)===null||ut===void 0?void 0:ut.scrollLeft)||(document==null?void 0:document.body.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:(document==null?void 0:document.documentElement.scrollTop)||((st=(tt=document==null?void 0:document.body)===null||tt===void 0?void 0:tt.parentElement)===null||st===void 0?void 0:st.scrollTop)||(document==null?void 0:document.body.scrollTop)||0}}})),kt.forEach(at=>at.unlock())};try{const k=[];k.push(nt("DOMContentLoaded",()=>{$(V({type:O.DomContentLoaded,data:{}}))}));const rt=tt=>{var st;return x(Bu)({onMutation:F,mutationCb:hn,mousemoveCb:(G,ie)=>$(V({type:O.IncrementalSnapshot,data:{source:ie,positions:G}})),mouseInteractionCb:G=>$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.MouseInteraction},G)})),scrollCb:gi,viewportResizeCb:G=>$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.ViewportResize},G)})),inputCb:G=>$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.Input},G)})),mediaInteractionCb:G=>$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.MediaInteraction},G)})),styleSheetRuleCb:G=>$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.StyleSheetRule},G)})),styleDeclarationCb:G=>$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.StyleDeclaration},G)})),canvasMutationCb:yi,fontCb:G=>$(V({type:O.IncrementalSnapshot,data:Object.assign({source:X.Font},G)})),blockClass:r,ignoreClass:o,ignoreSelector:c,maskTextClass:u,maskTextSelector:l,unmaskTextSelector:_,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:J,inlineStylesheet:p,sampling:v,recordCanvas:L,inlineImages:W,userTriggeredOnInput:A,collectFonts:Y,doc:tt,maskAllText:y,maskInputFn:I,maskTextFn:N,blockSelector:s,unblockSelector:a,slimDOMOptions:ct,mirror:oe,iframeManager:ne,shadowDomManager:_n,canvasManager:Ei,plugins:((st=m==null?void 0:m.filter(G=>G.observer))===null||st===void 0?void 0:st.map(G=>({observer:G.observer,options:G.options,callback:ie=>$(V({type:O.Plugin,data:{plugin:G.name,payload:ie}}))})))||[]},w)};ne.addLoadListener(tt=>{try{k.push(rt(tt.contentDocument))}catch(st){console.warn(st)}});const ut=()=>{de(),k.push(rt(document))};return document.readyState==="interactive"||document.readyState==="complete"?ut():k.push(nt("load",()=>{$(V({type:O.Load,data:{}})),ut()},window)),()=>{k.forEach(tt=>tt())}}catch(k){console.warn(k)}}Lt.addCustomEvent=(t,e)=>{if(!$)throw new Error("please add custom event after start recording");$(V({type:O.Custom,data:{tag:t,payload:e}}))};Lt.freezePage=()=>{kt.forEach(t=>t.freeze())};Lt.takeFullSnapshot=t=>{if(!de)throw new Error("please take full snapshot after start recording");de(t)};Lt.mirror=oe;function on(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:O.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:gt(e,10,1e3)}}),e.category==="console")))}const qu="button,a";function si(t){const e=cs(t);return!e||!(e instanceof Element)?e:e.closest(qu)||e}function cs(t){return Zu(t)?t.target:t}function Zu(t){return typeof t=="object"&&!!t&&"target"in t}let Et;function Vu(t){return Et||(Et=[],Xu()),Et.push(t),()=>{const e=Et?Et.indexOf(t):-1;e>-1&&Et.splice(e,1)}}function Xu(){Z(R,"open",function(t){return function(...e){if(Et)try{Et.forEach(n=>n())}catch(n){}return t.apply(R,e)}})}function Ku(t,e,n){t.handleClick(e,n)}class fe{__init(){this._lastMutation=0}__init2(){this._lastScroll=0}__init3(){this._clicks=[]}constructor(e,n,i=on){fe.prototype.__init.call(this),fe.prototype.__init2.call(this),fe.prototype.__init3.call(this),this._timeout=n.timeout/1e3,this._multiClickTimeout=n.multiClickTimeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=i}addListeners(){const e=()=>{this._lastMutation=re()},n=()=>{this._lastScroll=re()},i=Vu(()=>{this._lastMutation=re()}),r=a=>{if(!a.target)return;const o=si(a);o&&this._handleMultiClick(o)},s=new MutationObserver(e);s.observe(R.document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),R.addEventListener("scroll",n,{passive:!0}),R.addEventListener("click",r,{passive:!0}),this._teardown=()=>{R.removeEventListener("scroll",n),R.removeEventListener("click",r),i(),s.disconnect(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,n){if(Qu(n,this._ignoreSelector)||!tl(e)||this._getClick(n))return;const r={timestamp:e.timestamp,clickBreadcrumb:e,clickCount:0,node:n};this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks()}_handleMultiClick(e){const n=this._getClick(e);n&&n.clickCount++}_getClick(e){const n=re();return this._clicks.find(i=>i.node===e&&n-i.timestamp<this._multiClickTimeout)}_checkClicks(){const e=[],n=re();this._clicks.forEach(i=>{!i.mutationAfter&&this._lastMutation&&(i.mutationAfter=i.timestamp<=this._lastMutation?this._lastMutation-i.timestamp:void 0),!i.scrollAfter&&this._lastScroll&&(i.scrollAfter=i.timestamp<=this._lastScroll?this._lastScroll-i.timestamp:void 0);const r=i.scrollAfter||i.mutationAfter||0;if(r&&r>=this._multiClickTimeout){e.push(i);return}i.timestamp+this._timeout<=n&&e.push(i)});for(const i of e){this._generateBreadcrumbs(i);const r=this._clicks.indexOf(i);r!==-1&&this._clicks.splice(r,1)}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const n=this._replay,i=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!i&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(s){const c=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:R.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:a||1}};this._addBreadcrumbEvent(n,l);return}if(a>1){const c={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:R.location.href,route:n.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const Ju=["A","BUTTON","INPUT"];function Qu(t,e){return!!(!Ju.includes(t.tagName)||t.tagName==="INPUT"&&!["submit","button"].includes(t.getAttribute("type")||"")||t.tagName==="A"&&(t.hasAttribute("download")||t.hasAttribute("target")&&t.getAttribute("target")!=="_self")||e&&t.matches(e))}function tl(t){return!!(t.data&&typeof t.data.nodeId=="number"&&t.timestamp)}function re(){return Date.now()/1e3}function _t(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var Ke;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(Ke||(Ke={}));const el=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled"]);function nl(t){const e={};for(const n in t)if(el.has(n)){let i=n;(n==="data-testid"||n==="data-test-id")&&(i="testId"),e[i]=t[n]}return e}const il=t=>e=>{if(!t.isEnabled())return;const n=rl(e);if(!n)return;const i=e.name==="click",r=i&&e.event;i&&t.clickDetector&&r&&!r.altKey&&!r.metaKey&&!r.ctrlKey&&Ku(t.clickDetector,n,si(e.event)),on(t,n)};function us(t,e){const n=t&&al(t)&&t.__sn.type===Ke.Element?t.__sn:null;return{message:e,data:n?{nodeId:n.id,node:{id:n.id,tagName:n.tagName,textContent:t?Array.from(t.childNodes).map(i=>"__sn"in i&&i.__sn.type===Ke.Text&&i.__sn.textContent).filter(Boolean).map(i=>i.trim()).join(""):"",attributes:nl(n.attributes)}}:{}}}function rl(t){const{target:e,message:n}=sl(t);return _t({category:"ui.".concat(t.name),...us(e,n)})}function sl(t){const e=t.name==="click";let n,i=null;try{i=e?si(t.event):cs(t.event),n=Ut(i,{maxStringLength:200})||"<unknown>"}catch(r){n="<unknown>"}return{target:i,message:n}}function al(t){return"__sn"in t}function ol(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=cl(e);n&&on(t,n)}function cl(t){const{metaKey:e,shiftKey:n,ctrlKey:i,altKey:r,key:s,target:a}=t;if(!a||ul(a)||!s)return null;const o=e||i||r,c=s.length===1;if(!o&&c)return null;const u=Ut(a,{maxStringLength:200})||"<unknown>",l=us(a,u);return _t({category:"ui.keyDown",message:u,data:{...l.data,metaKey:e,shiftKey:n,ctrlKey:i,altKey:r,key:s}})}function ul(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}const ll=["name","type","startTime","transferSize","duration"];function tr(t){return function(e){return ll.every(n=>t[n]===e[n])}}function dl(t,e){const[n,i,r]=t.reduce((c,u)=>(u.entryType==="navigation"?c[0].push(u):u.entryType==="largest-contentful-paint"?c[1].push(u):c[2].push(u),c),[[],[],[]]),s=[],a=[];let o=i.length?i[i.length-1]:void 0;return e.forEach(c=>{if(c.entryType==="largest-contentful-paint"){(!o||o.startTime<c.startTime)&&(o=c);return}if(c.entryType==="navigation"){const u=c;c.duration>0&&!n.find(tr(u))&&!a.find(tr(u))&&a.push(u);return}s.push(c)}),[...o?[o]:[],...n,...r,...s,...a].sort((c,u)=>c.startTime-u.startTime)}function fl(t){const e=i=>{const r=dl(t.performanceEvents,i.getEntries());t.performanceEvents=r},n=new PerformanceObserver(e);return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach(i=>{try{n.observe({type:i,buffered:!0})}catch(r){}}),n}const hl='/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([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]),a=new Uint8Array([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]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},U=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let S=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},O={_tr_init:t=>{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),S=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:T,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var St={deflateInit:(t,e)=>Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Ft=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ft=!1}const Lt=new Uint8Array(256);for(let t=0;t<256;t++)Lt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Lt[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(U=0,S=r[m]):r[m]>=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Ue={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,r-f):F(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,t.next_out-f):F(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function _l(){const t=new Blob([hl]);return URL.createObjectURL(t)}function ai(t){return t>9999999999?t:t*1e3}class oi extends Error{constructor(){super("Event buffer exceeded maximum size of ".concat(ri,"."))}}class cn{__init(){this._totalSize=0}constructor(){cn.prototype.__init.call(this),this.events=[]}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const n=JSON.stringify(e).length;if(this._totalSize+=n,this._totalSize>ri)throw new oi;this.events.push(e)}finish(){return new Promise(e=>{const n=this.events;this.clear(),e(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0}getEarliestTimestamp(){const e=this.events.map(n=>n.timestamp).sort()[0];return e?ai(e):null}}class pl{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((e,n)=>{this._worker.addEventListener("message",({data:i})=>{i.success?e():n()},{once:!0}),this._worker.addEventListener("error",i=>{n(i)},{once:!0})}),this._ensureReadyPromise)}destroy(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,n){const i=this._getAndIncrementId();return new Promise((r,s)=>{const a=({data:o})=>{const c=o;if(c.method===e&&c.id===i){if(this._worker.removeEventListener("message",a),!c.success){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("[Replay]",c.response),s(new Error("Error in compression worker"));return}r(c.response)}};this._worker.addEventListener("message",a),this._worker.postMessage({id:i,method:e,arg:n})})}_getAndIncrementId(){return this._id++}}class ci{__init(){this._totalSize=0}constructor(e){ci.prototype.__init.call(this),this._worker=new pl(e),this._earliestTimestamp=null}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const n=ai(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const i=JSON.stringify(e);return this._totalSize+=i.length,this._totalSize>ri?Promise.reject(new oi):this._sendEventToWorker(i)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this._worker.postMessage("clear")}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class ml{constructor(e){this._fallback=new cn,this._compression=new ci(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e}=this._fallback,n=[];for(const i of e)n.push(this._compression.addEvent(i));this._used=this._compression;try{await Promise.all(n)}catch(i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Replay] Failed to add events when switching buffers.",i)}}}function gl({useCompression:t}){if(t&&window.Worker)try{const e=_l();(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Using compression worker");const n=new Worker(e);return new ml(n)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Failed to create compression worker")}return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Using simple buffer"),new cn}function ui(){return"sessionStorage"in R&&!!R.sessionStorage}function yl(t){El(),t.session=void 0}function El(){if(ui())try{R.sessionStorage.removeItem(ni)}catch(t){}}function Ln(t,e,n=+new Date){return t===null||e===void 0||e<0?!0:e===0?!1:t+e<=n}function ls(t,e,n=+new Date){return Ln(t.started,e.maxSessionLife,n)||Ln(t.lastActivity,e.sessionIdleExpire,n)}function ds(t){return t===void 0?!1:Math.random()<t}function li(t){if(ui())try{R.sessionStorage.setItem(ni,JSON.stringify(t))}catch(e){}}function di(t){const e=Date.now(),n=t.id||Ht(),i=t.started||e,r=t.lastActivity||e,s=t.segmentId||0,a=t.sampled;return{id:n,started:i,lastActivity:r,segmentId:s,sampled:a,shouldRefresh:!0}}function Sl(t,e){return ds(t)?"session":e?"buffer":!1}function bl({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1}){const i=Sl(t,e),r=di({sampled:i});return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Creating new session: ".concat(r.id)),n&&li(r),r}function wl(){if(!ui())return null;try{const t=R.sessionStorage.getItem(ni);if(!t)return null;const e=JSON.parse(t);return di(e)}catch(t){return null}}function Sn({timeouts:t,currentSession:e,stickySession:n,sessionSampleRate:i,allowBuffering:r}){const s=e||n&&wl();if(s){if(!ls(s,t)||r&&s.shouldRefresh)return{type:"saved",session:s};if(s.shouldRefresh)(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Session has expired");else return{type:"new",session:di({sampled:!1})}}return{type:"new",session:bl({stickySession:n,sessionSampleRate:i,allowBuffering:r})}}function Tl(t){return t.type===O.Custom}async function Je(t,e,n){if(!t.eventBuffer||t.isPaused()||ai(e.timestamp)+t.timeouts.sessionIdlePause<Date.now())return null;try{n&&t.eventBuffer.clear();const r=t.getOptions(),s=typeof r.beforeAddRecordingEvent=="function"&&Tl(e)?r.beforeAddRecordingEvent(e):e;return s?await t.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof oi?"addEventSizeExceeded":"addEvent";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error(r),await t.stop(s);const a=g().getClient();a&&a.recordDroppedEvent("internal_sdk_error","replay")}}function Mn(t){return!t.type}function Gn(t){return t.type==="transaction"}function vl(t){return t.type==="replay_event"}function fs(t){const e=Rl();return(n,i)=>{if(!Mn(n)&&!Gn(n))return;const r=i&&i.statusCode;if(!(e&&(!r||r<200||r>=300))){if(Gn(n)&&n.contexts&&n.contexts.trace&&n.contexts.trace.trace_id){t.getContext().traceIds.add(n.contexts.trace.trace_id);return}Mn(n)&&(n.event_id&&t.getContext().errorIds.add(n.event_id),t.recordingMode==="buffer"&&n.tags&&n.tags.replayId&&setTimeout(()=>{t.sendBufferedReplayOrFlush()}))}}}function Rl(){const t=g().getClient();if(!t)return!1;const e=t.getTransport();return e&&e.send.__sentry__baseTransport__||!1}function kl(t,e){return t.type||!t.exception||!t.exception.values||!t.exception.values.length?!1:e.originalException&&e.originalException.__rrweb__?!0:t.exception.values.some(n=>!n.stacktrace||!n.stacktrace.frames||!n.stacktrace.frames.length?!1:n.stacktrace.frames.some(i=>i.filename&&i.filename.includes("/rrweb/src/")))}function xl(t,e){return t.recordingMode!=="buffer"||e.message===ii||!e.exception||e.type?!1:ds(t.getOptions().errorSampleRate)}function Nl(t,e=!1){const n=e?fs(t):void 0;return(i,r)=>vl(i)?(delete i.breadcrumbs,i):!Mn(i)&&!Gn(i)?i:kl(i,r)&&!t.getOptions()._experiments.captureExceptions?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Ignoring error from rrweb internals",i),null):((xl(t,i)||t.recordingMode==="session")&&(i.tags={...i.tags,replayId:t.getSessionId()}),n&&n(i,{statusCode:200}),i)}function un(t,e){return e.map(({type:n,start:i,end:r,name:s,data:a})=>{const o=t.throttledAddEvent({type:O.Custom,timestamp:i,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:i,endTimestamp:r,data:a}}});return typeof o=="string"?Promise.resolve(null):o})}function Dl(t){const{from:e,to:n}=t,i=Date.now()/1e3;return{type:"navigation.push",start:i,end:i,name:n,data:{previous:e}}}function Il(t){return e=>{if(!t.isEnabled())return;const n=Dl(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(un(t,[n]),!1)))}}function Al(t,e){return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&t.getOptions()._experiments.traceInternals?!1:Cl(e)}function Cl(t){const e=g().getClient(),n=e&&e.getDsn();return n?t.includes(n.host):!1}function ln(t,e){t.isEnabled()&&e!==null&&(Al(t,e.name)||t.addUpdate(()=>(un(t,[e]),!0)))}function Ol(t){const{startTimestamp:e,endTimestamp:n,fetchData:i,response:r}=t;if(!n)return null;const{method:s,url:a}=i;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:a,data:{method:s,statusCode:r?r.status:void 0}}}function Ul(t){return e=>{if(!t.isEnabled())return;const n=Ol(e);ln(t,n)}}function Bl(t){const{startTimestamp:e,endTimestamp:n,xhr:i}=t,r=i[bt];if(!e||!n||!r)return null;const{method:s,url:a,status_code:o}=r;return a===void 0?null:{type:"resource.xhr",name:a,start:e/1e3,end:n/1e3,data:{method:s,statusCode:o}}}function Ll(t){return e=>{if(!t.isEnabled())return;const n=Bl(e);ln(t,n)}}const wt=10,fi=11,Pn=12,mt=13,zn=14,Vt=15,ht=20,it=21,Yn=22,Xt=23,hs=["true","false","null"];function Ml(t,e){if(!e.length)return t;let n=t;const i=e.length-1,r=e[i];n=Gl(n,r);for(let s=i;s>=0;s--)switch(e[s]){case wt:n="".concat(n,"}");break;case ht:n="".concat(n,"]");break}return n}function Gl(t,e){switch(e){case wt:return"".concat(t,'"~~":"~~"');case fi:return"".concat(t,':"~~"');case Pn:return"".concat(t,'~~":"~~"');case mt:return Yl(t);case zn:return"".concat(t,'~~"');case Vt:return"".concat(t,',"~~":"~~"');case ht:return"".concat(t,'"~~"');case it:return Pl(t);case Yn:return"".concat(t,'~~"');case Xt:return"".concat(t,',"~~"')}return t}function Pl(t){const e=zl(t);if(e>-1){const n=t.slice(e+1);return hs.includes(n.trim())?"".concat(t,',"~~"'):"".concat(t.slice(0,e+1),'"~~"')}return t}function zl(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n===","||n==="[")return e}return-1}function Yl(t){const e=t.lastIndexOf(":"),n=t.slice(e+1);return hs.includes(n.trim())?"".concat(t,',"~~":"~~"'):"".concat(t.slice(0,e+1),'"~~"')}function Fl(t){const e=[];for(let n=0;n<t.length;n++)Hl(e,t,n);return e}function Hl(t,e,n){const i=t[t.length-1],r=e[n];if(!/\s/.test(r)){if(r==='"'&&!_s(e,n)){$l(t,i);return}switch(r){case"{":jl(t,i);break;case"[":Wl(t,i);break;case":":ql(t,i);break;case",":Zl(t,i);break;case"}":Vl(t,i);break;case"]":Xl(t,i);break}}}function $l(t,e){if(e===zn){t.pop(),t.push(Vt);return}if(e===Yn){t.pop(),t.push(Xt);return}if(e===mt){t.push(zn);return}if(e===it){t.push(Yn);return}if(e===wt){t.push(Pn);return}if(e===Pn){t.pop(),t.push(fi);return}}function jl(t,e){if(!e){t.push(wt);return}if(e===mt){t.push(wt);return}if(e===it&&t.push(wt),e===ht){t.push(wt);return}}function Wl(t,e){if(!e){t.push(ht),t.push(it);return}if(e===mt){t.push(ht),t.push(it);return}if(e===it&&(t.push(ht),t.push(it)),e===ht){t.push(ht),t.push(it);return}}function ql(t,e){e===fi&&(t.pop(),t.push(mt))}function Zl(t,e){if(e===mt){t.pop();return}if(e===Vt){t.pop(),t.pop();return}if(e!==it&&e===Xt){t.pop();return}}function Vl(t,e){e===wt&&t.pop(),e===mt&&(t.pop(),t.pop()),e===Vt&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===mt&&t.push(Vt),t[t.length-1]===it&&t.push(Xt)}function Xl(t,e){e===ht&&t.pop(),e===it&&(t.pop(),t.pop()),e===Xt&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===mt&&t.push(Vt),t[t.length-1]===it&&t.push(Xt)}function _s(t,e){return t[e-1]==="\\"&&!_s(t,e-1)}function ps(t){const e=Fl(t);return Ml(t,e)}function Qe(t,e){if(t)try{if(typeof t=="string")return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Es(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(n){}}function ms(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function gs(t){if(typeof t=="string")return t;if(t instanceof URLSearchParams)return t.toString();if(t instanceof FormData)return Es(t)}function ys(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:i,url:r,method:s,statusCode:a,request:o,response:c}=e;return{type:t,start:n/1e3,end:i/1e3,name:r,data:Nt({method:s,statusCode:a,request:o,response:c})}}function Se(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Tt(t,e,n){if(!e&&Object.keys(t).length===0)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const i={headers:t,size:e},{body:r,warnings:s}=Kl(n);return i.body=r,s.length>0&&(i._meta={warnings:s}),i}function Fn(t,e){return Object.keys(t).reduce((n,i)=>{const r=i.toLowerCase();return e.includes(r)&&t[i]&&(n[r]=t[i]),n},{})}function Es(t){return new URLSearchParams(t).toString()}function Kl(t){if(!t||typeof t!="string")return{body:t,warnings:[]};const e=t.length>Ue;if(Jl(t))try{const n=e?ps(t.slice(0,Ue)):t;return{body:JSON.parse(n),warnings:e?["JSON_TRUNCATED"]:[]}}catch(n){return{body:e?"".concat(t.slice(0,Ue),"…"):t,warnings:e?["INVALID_JSON","TEXT_TRUNCATED"]:["INVALID_JSON"]}}return{body:e?"".concat(t.slice(0,Ue),"…"):t,warnings:e?["TEXT_TRUNCATED"]:[]}}function Jl(t){const e=t[0],n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function Ss(t,e){const n=Ql(t);return te(n,e)}function Ql(t,e=R.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(R.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const i=n.href;return!t.endsWith("/")&&i.endsWith("/")?i.slice(0,-1):i}async function td(t,e,n){try{const i=await nd(t,e,n),r=ys("resource.fetch",i);ln(n.replay,r)}catch(i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("[Replay] Failed to capture fetch breadcrumb",i)}}function ed(t,e,n){const{input:i,response:r}=e,s=bs(i),a=Qe(s,n.textEncoder),o=r?ms(r.headers.get("content-length")):void 0;a!==void 0&&(t.data.request_body_size=a),o!==void 0&&(t.data.response_body_size=o)}async function nd(t,e,n){const{startTimestamp:i,endTimestamp:r}=e,{url:s,method:a,status_code:o=0,request_body_size:c,response_body_size:u}=t.data,l=Ss(s,n.networkDetailAllowUrls),d=l?id(n,e.input,c):Se(c),_=await rd(l,n,e.response,u);return{startTimestamp:i,endTimestamp:r,url:s,method:a,statusCode:o,request:d,response:_}}function id({networkCaptureBodies:t,networkRequestHeaders:e},n,i){const r=ad(n,e);if(!t)return Tt(r,i,void 0);const s=bs(n),a=gs(s);return Tt(r,i,a)}async function rd(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:i},r,s){if(!t&&s!==void 0)return Se(s);const a=ws(r.headers,i);if(!e&&s!==void 0)return Tt(a,s,void 0);try{const o=r.clone(),c=await sd(o),u=c&&c.length&&s===void 0?Qe(c,n):s;return t?e?Tt(a,u,c):Tt(a,u,void 0):Se(u)}catch(o){return Tt(a,s,void 0)}}async function sd(t){try{return await t.text()}catch(e){return}}function bs(t=[]){if(!(t.length!==2||typeof t[1]!="object"))return t[1].body}function ws(t,e){const n={};return e.forEach(i=>{t.get(i)&&(n[i]=t.get(i))}),n}function ad(t,e){return t.length===1&&typeof t[0]!="string"?er(t[0],e):t.length===2?er(t[1],e):{}}function er(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?ws(n,e):Array.isArray(n)?{}:Fn(n,e):{}}async function od(t,e,n){try{const i=ud(t,e,n),r=ys("resource.xhr",i);ln(n.replay,r)}catch(i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("[Replay] Failed to capture fetch breadcrumb",i)}}function cd(t,e,n){const{xhr:i,input:r}=e,s=Qe(r,n.textEncoder),a=i.getResponseHeader("content-length")?ms(i.getResponseHeader("content-length")):Qe(i.response,n.textEncoder);s!==void 0&&(t.data.request_body_size=s),a!==void 0&&(t.data.response_body_size=a)}function ud(t,e,n){const{startTimestamp:i,endTimestamp:r,input:s,xhr:a}=e,{url:o,method:c,status_code:u=0,request_body_size:l,response_body_size:d}=t.data;if(!o)return null;if(!Ss(o,n.networkDetailAllowUrls)){const b=Se(l),U=Se(d);return{startTimestamp:i,endTimestamp:r,url:o,method:c,statusCode:u,request:b,response:U}}const _=a[bt],h=_?Fn(_.request_headers,n.networkRequestHeaders):{},p=Fn(ld(a),n.networkResponseHeaders),y=Tt(h,l,n.networkCaptureBodies?gs(s):void 0),T=Tt(p,d,n.networkCaptureBodies?e.xhr.responseText:void 0);return{startTimestamp:i,endTimestamp:r,url:o,method:c,statusCode:u,request:y,response:T}}function ld(t){const e=t.getAllResponseHeaders();return e?e.split("\r\n").reduce((n,i)=>{const[r,s]=i.split(": ");return n[r.toLowerCase()]=s,n},{}):{}}function dd(t){const e=g().getClient();try{const n=new TextEncoder,{networkDetailAllowUrls:i,networkCaptureBodies:r,networkRequestHeaders:s,networkResponseHeaders:a}=t.getOptions(),o={replay:t,textEncoder:n,networkDetailAllowUrls:i,networkCaptureBodies:r,networkRequestHeaders:s,networkResponseHeaders:a};e&&e.on?e.on("beforeAddBreadcrumb",(c,u)=>fd(o,c,u)):(K("fetch",Ul(t)),K("xhr",Ll(t)))}catch(n){}}function fd(t,e,n){if(e.data)try{hd(e)&&pd(n)&&(cd(e,n,t),od(e,n,t)),_d(e)&&md(n)&&(ed(e,n,t),td(e,n,t))}catch(i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Error when enriching network breadcrumb")}}function hd(t){return t.category==="xhr"}function _d(t){return t.category==="fetch"}function pd(t){return t&&t.xhr}function md(t){return t&&t.response}let nr=null;function gd(t){return!!t.category}const yd=t=>e=>{if(!t.isEnabled())return;const n=Ed(e);n&&on(t,n)};function Ed(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();return nr===e||!e||(nr=e,!gd(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))?null:e.category==="console"?Sd(e):_t(e)}function Sd(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||e.length===0)return _t(t);let n=!1;const i=e.map(r=>{if(!r)return r;if(typeof r=="string")return r.length>Be?(n=!0,"".concat(r.slice(0,Be),"…")):r;if(typeof r=="object")try{const s=gt(r,7),a=JSON.stringify(s);if(a.length>Be){const o=ps(a.slice(0,Be)),c=JSON.parse(o);return n=!0,c}return s}catch(s){}return r});return _t({...t,data:{...t.data,arguments:i,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function bd(t){const e=g().getScope(),n=g().getClient();e&&e.addScopeListener(yd(t)),K("dom",il(t)),K("history",Il(t)),dd(t),nn(Nl(t,!ir(n))),ir(n)&&(n.on("afterSendEvent",fs(t)),n.on("createDsc",i=>{const r=t.getSessionId();r&&t.isEnabled()&&t.recordingMode==="session"&&(i.replay_id=r)}),n.on("startTransaction",i=>{t.lastTransaction=i}),n.on("finishTransaction",i=>{t.lastTransaction=i}))}function ir(t){return!!(t&&t.on)}async function wd(t){try{return Promise.all(un(t,[Td(R.performance.memory)]))}catch(e){return[]}}function Td(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:i}=t,r=Date.now()/1e3;return{type:"memory",name:"memory",start:r,end:r,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:i}}}}const rr={resource:Nd,paint:kd,navigation:xd,"largest-contentful-paint":Dd};function vd(t){return t.map(Rd).filter(Boolean)}function Rd(t){return rr[t.entryType]===void 0?null:rr[t.entryType](t)}function Kt(t){return((et||R.performance.timeOrigin)+t)/1e3}function kd(t){const{duration:e,entryType:n,name:i,startTime:r}=t,s=Kt(r);return{type:n,name:i,start:s,end:s+e,data:void 0}}function xd(t){const{entryType:e,name:n,decodedBodySize:i,duration:r,domComplete:s,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:_,startTime:h,transferSize:p,type:y}=t;return r===0?null:{type:"".concat(e,".").concat(y),start:Kt(h),end:Kt(s),name:n,data:{size:p,decodedBodySize:i,encodedBodySize:a,duration:r,domInteractive:u,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:s,redirectCount:_}}}function Nd(t){const{entryType:e,initiatorType:n,name:i,responseEnd:r,startTime:s,decodedBodySize:a,encodedBodySize:o,responseStatus:c,transferSize:u}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:"".concat(e,".").concat(n),start:Kt(s),end:Kt(r),name:i,data:{size:u,statusCode:c,decodedBodySize:a,encodedBodySize:o}}}function Dd(t){const{entryType:e,startTime:n,size:i}=t;let r=0;if(R.performance){const o=R.performance.getEntriesByType("navigation")[0];r=o&&o.activationStart||0}const s=Math.max(n-r,0),a=Kt(r)+s/1e3;return{type:e,name:e,start:a,end:a,data:{value:s,size:i,nodeId:Lt.mirror.getId(t.element)}}}function Id(t,e,n){let i,r,s;const a=n&&n.maxWait?Math.max(n.maxWait,e):0;function o(){return c(),i=t(),i}function c(){r!==void 0&&clearTimeout(r),s!==void 0&&clearTimeout(s),r=s=void 0}function u(){return r!==void 0||s!==void 0?o():i}function l(){return r&&clearTimeout(r),r=setTimeout(o,e),a&&s===void 0&&(s=setTimeout(o,a)),i}return l.cancel=c,l.flush=u,l}function Ad(t){let e=!1;return(n,i)=>{if(!t.checkAndHandleExpiredSession()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Replay] Received replay event after session expired.");return}const r=i||!e;e=!0,t.addUpdate(()=>{if(t.recordingMode==="buffer"&&r&&t.setInitialState(),Je(t,n,r),!r)return!1;if(Od(t,r),t.session&&t.session.previousSessionId)return!0;if(t.recordingMode==="buffer"&&t.session&&t.eventBuffer){const s=t.eventBuffer.getEarliestTimestamp();s&&(t.session.started=s,t.getOptions().stickySession&&li(t.session))}return t.recordingMode==="session"&&t.flush(),!0})}}function Cd(t){const e=t.getOptions();return{type:O.Custom,timestamp:Date.now(),data:{tag:"options",payload:{sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:t.eventBuffer?t.eventBuffer.type==="worker":!1,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}function Od(t,e){return!e||!t.session||t.session.segmentId!==0?Promise.resolve(null):Je(t,Cd(t),!1)}function Ud(t,e,n,i){return Qt(Tr(t,Vn(t),i,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e=="string"?new TextEncoder().encode(e).length:e.length},e]])}function Bd({recordingData:t,headers:e}){let n;const i="".concat(JSON.stringify(e),"\n");if(typeof t=="string")n="".concat(i).concat(t);else{const s=new TextEncoder().encode(i);n=new Uint8Array(s.length+t.length),n.set(s),n.set(t,s.length)}return n}async function Ld({client:t,scope:e,replayId:n,event:i}){const r=typeof t._integrations=="object"&&t._integrations!==null&&!Array.isArray(t._integrations)?Object.keys(t._integrations):void 0,s=await Or(t.getOptions(),i,{event_id:n,integrations:r},e);if(!s)return null;s.platform=s.platform||"javascript";const a=t.getSdkMetadata&&t.getSdkMetadata(),{name:o,version:c}=a&&a.sdk||{};return s.sdk={...s.sdk,name:o||"sentry.javascript.unknown",version:c||"0.0.0"},s}async function Md({recordingData:t,replayId:e,segmentId:n,eventContext:i,timestamp:r,session:s}){const a=Bd({recordingData:t,headers:{segment_id:n}}),{urls:o,errorIds:c,traceIds:u,initialTimestamp:l}=i,d=g(),_=d.getClient(),h=d.getScope(),p=_&&_.getTransport(),y=_&&_.getDsn();if(!_||!p||!y||!s.sampled)return;const T={type:Gc,replay_start_timestamp:l/1e3,timestamp:r/1e3,error_ids:c,trace_ids:u,urls:o,replay_id:e,segment_id:n,replay_type:s.sampled},b=await Ld({scope:h,client:_,replayId:e,event:T});if(!b){_.recordDroppedEvent("event_processor","replay",T),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("An event processor returned `null`, will not send event.");return}const U=Ud(b,a,y,_.getOptions().tunnel);let I;try{I=await p.send(U)}catch(N){const w=new Error(ii);try{w.cause=N}catch(D){}throw w}if(!I)return I;if(typeof I.statusCode=="number"&&(I.statusCode<200||I.statusCode>=300))throw new Ts(I.statusCode);return I}class Ts extends Error{constructor(e){super("Transport returned status code ".concat(e))}}async function vs(t,e={count:0,interval:jc}){const{recordingData:n,options:i}=t;if(n.length)try{return await Md(t),!0}catch(r){if(r instanceof Ts)throw r;if($a("Replays",{_retryCount:e.count}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&i._experiments&&i._experiments.captureExceptions&&Qn(r),e.count>=Wc){const s=new Error("".concat(ii," - max retries exceeded"));try{s.cause=r}catch(a){}throw s}return e.interval*=++e.count,new Promise((s,a)=>{setTimeout(async()=>{try{await vs(t,e),s(!0)}catch(o){a(o)}},e.interval)})}}const Rs="__THROTTLED",Gd="__SKIPPED";function Pd(t,e,n){const i=new Map,r=o=>{const c=o-n;i.forEach((u,l)=>{l<c&&i.delete(l)})},s=()=>[...i.values()].reduce((o,c)=>o+c,0);let a=!1;return(...o)=>{const c=Math.floor(Date.now()/1e3);if(r(c),s()>=e){const l=a;return a=!0,l?Gd:Rs}a=!1;const u=i.get(c)||0;return i.set(c,u+1),t(...o)}}class H{__init(){this.eventBuffer=null}__init2(){this.performanceEvents=[]}__init3(){this.recordingMode="session"}__init4(){this.timeouts={sessionIdlePause:Pc,sessionIdleExpire:zc,maxSessionLife:Yc}}__init5(){this._performanceObserver=null}__init6(){this._flushLock=null}__init7(){this._lastActivity=Date.now()}__init8(){this._isEnabled=!1}__init9(){this._isPaused=!1}__init10(){this._hasInitializedCoreListeners=!1}__init11(){this._stopRecording=null}__init12(){this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""}}constructor({options:e,recordingOptions:n}){H.prototype.__init.call(this),H.prototype.__init2.call(this),H.prototype.__init3.call(this),H.prototype.__init4.call(this),H.prototype.__init5.call(this),H.prototype.__init6.call(this),H.prototype.__init7.call(this),H.prototype.__init8.call(this),H.prototype.__init9.call(this),H.prototype.__init10.call(this),H.prototype.__init11.call(this),H.prototype.__init12.call(this),H.prototype.__init13.call(this),H.prototype.__init14.call(this),H.prototype.__init15.call(this),H.prototype.__init16.call(this),H.prototype.__init17.call(this),H.prototype.__init18.call(this),this._recordingOptions=n,this._options=e,this._debouncedFlush=Id(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Pd((a,o)=>Je(this,a,o),300,5);const{slowClickTimeout:i,slowClickIgnoreSelectors:r}=this.getOptions(),s=i?{threshold:Math.min(qc,i),timeout:i,scrollTimeout:Zc,ignoreSelector:r?r.join(","):"",multiClickTimeout:Vc}:void 0;s&&(this.clickDetector=new fe(this,s))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(){const{errorSampleRate:e,sessionSampleRate:n}=this._options;if(!(e<=0&&n<=0||!this._loadAndCheckSession())){if(!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled&&this.session.sampled!=="session"&&(this.recordingMode="buffer"),this._initializeRecording()}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");const e=this.session&&this.session.id,{session:n}=Sn({timeouts:this.timeouts,stickySession:!!this._options.stickySession,currentSession:this.session,sessionSampleRate:1,allowBuffering:!1});n.previousSessionId=e,this.session=n,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");const e=this.session&&this.session.id,{session:n}=Sn({timeouts:this.timeouts,stickySession:!!this._options.stickySession,currentSession:this.session,sessionSampleRate:0,allowBuffering:!0});n.previousSessionId=e,this.session=n,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=Lt({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:$c},emit:Ad(this),onMutation:this._onMutationHandler})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop(e){if(this._isEnabled)try{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){const n="[Replay] Stopping Replay".concat(e?" triggered by ".concat(e):"");(this.getOptions()._experiments.traceInternals?console.warn:f.log)(n)}this._isEnabled=!1,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),this.recordingMode==="session"&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,yl(this)}catch(n){this._handleException(n)}}pause(){this._isPaused=!0,this.stopRecording()}resume(){this._loadAndCheckSession()&&(this._isPaused=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();await this.flushImmediate();const i=this.stopRecording();!e||!i||(this.recordingMode="session",this.session&&(this.session.shouldRefresh=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this.session.started=n,this._maybeSaveSession()),this.startRecording())}addUpdate(e){const n=e();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._loadAndCheckSession())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(){const e=this.getSessionId();if(this._lastActivity&&Ln(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return this._loadAndCheckSession()?e!==this.getSessionId()?(this._triggerFullSnapshot(),!1):!0:void 0}setInitialState(){const e="".concat(R.location.pathname).concat(R.location.hash).concat(R.location.search),n="".concat(R.location.origin).concat(e);this.performanceEvents=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(e,n){const i=this._throttledAddEvent(e,n);if(i===Rs){const r=_t({category:"replay.throttled"});this.addUpdate(()=>{Je(this,{type:O.Custom,timestamp:r.timestamp||0,data:{tag:"breadcrumb",payload:r,metric:!0}})})}return i}getCurrentRoute(){const e=this.lastTransaction||g().getScope().getTransaction();if(!(!e||!["route","custom"].includes(e.metadata.source)))return e.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=gl({useCompression:this._options.useCompression}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this.startRecording()}_handleException(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("[Replay]",e),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Qn(e)}_loadAndCheckSession(){const{type:e,session:n}=Sn({timeouts:this.timeouts,stickySession:!!this._options.stickySession,currentSession:this.session,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0||this.recordingMode==="buffer"});e==="new"&&this.setInitialState();const i=this.getSessionId();return n.id!==i&&(n.previousSessionId=i),this.session=n,this.session.sampled?!0:(this.stop("session unsampled"),!1)}_addListeners(){try{R.document.addEventListener("visibilitychange",this._handleVisibilityChange),R.addEventListener("blur",this._handleWindowBlur),R.addEventListener("focus",this._handleWindowFocus),R.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(bd(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}"PerformanceObserver"in R&&(this._performanceObserver=fl(this))}_removeListeners(){try{R.document.removeEventListener("visibilitychange",this._handleVisibilityChange),R.removeEventListener("blur",this._handleWindowBlur),R.removeEventListener("focus",this._handleWindowFocus),R.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=null)}catch(e){this._handleException(e)}}__init13(){this._handleVisibilityChange=()=>{R.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init14(){this._handleWindowBlur=()=>{const e=_t({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init15(){this._handleWindowFocus=()=>{const e=_t({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init16(){this._handleKeyboardEvent=e=>{ol(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;const n=ls(this.session,this.timeouts);e&&!n&&this._createCustomBreadcrumb(e),this.conditionalFlush()}_doChangeToForegroundTasks(e){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}_triggerFullSnapshot(e=!0){try{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Replay] Taking full rrweb snapshot"),Lt.takeFullSnapshot(e)}catch(n){this._handleException(n)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:O.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){const e=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(un(this,vd(e)))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:n}=this;if(!e||!n||e.segmentId)return;const i=n.getEarliestTimestamp();i&&i<this._context.initialTimestamp&&(this._context.initialTimestamp=i)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){if(!this.session||!this.eventBuffer){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await wd(this),!!this.eventBuffer))try{this._updateInitialTimestampFromEventBuffer();const e=await this.eventBuffer.finish(),n=this.session.id,i=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await vs({replayId:n,recordingData:e,segmentId:r,eventContext:i,session:this.session,options:this.getOptions(),timestamp:Date.now()})}catch(e){this._handleException(e),this.stop("sendReplay");const n=g().getClient();n&&n.recordDroppedEvent("send_error","replay")}}__init17(){this._flush=async({force:e=!1}={})=>{if(!(!this._isEnabled&&!e)){if(!this.checkAndHandleExpiredSession()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error("[Replay] No session found to flush.");return}if(this._debouncedFlush.cancel(),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=null;return}try{await this._flushLock}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.error(n)}finally{this._debouncedFlush()}}}}_maybeSaveSession(){this.session&&this._options.stickySession&&li(this.session)}__init18(){this._onMutationHandler=e=>{const n=e.length,i=this._options.mutationLimit,r=this._options.mutationBreadcrumbLimit,s=i&&n>i;if(n>r||s){const a=_t({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop("mutationLimit"),!1):!0}}}function se(t,e,n,i){const r=typeof i=="string"?i.split(","):[],s=[...t,...r,...e];return typeof n<"u"&&(typeof n=="string"&&s.push(".".concat(n)),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),s.join(",")}function zd({mask:t,unmask:e,block:n,unblock:i,ignore:r,blockClass:s,blockSelector:a,maskTextClass:o,maskTextSelector:c,ignoreClass:u}){const l=['base[href="/"]'],d=se(t,[".sentry-mask","[data-sentry-mask]"],o,c),_=se(e,[".sentry-unmask","[data-sentry-unmask]"]),h={maskTextSelector:d,unmaskTextSelector:_,maskInputSelector:d,unmaskInputSelector:_,blockSelector:se(n,[".sentry-block","[data-sentry-block]",...l],s,a),unblockSelector:se(i,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:se(r,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return s instanceof RegExp&&(h.blockClass=s),o instanceof RegExp&&(h.maskTextClass=o),h}function sr(){return typeof window<"u"&&(!da()||Yd())}function Yd(){return typeof process<"u"&&process.type==="renderer"}const ar='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Fd=["content-length","content-type","accept"];let or=!1;class tn{static __initStatic(){this.id="Replay"}__init(){this.name=tn.id}constructor({flushMinDelay:e=Fc,flushMaxDelay:n=Hc,stickySession:i=!0,useCompression:r=!0,_experiments:s={},sessionSampleRate:a,errorSampleRate:o,maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:d=750,mutationLimit:_=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:p=[],networkDetailAllowUrls:y=[],networkCaptureBodies:T=!0,networkRequestHeaders:b=[],networkResponseHeaders:U=[],mask:I=[],unmask:N=[],block:w=[],unblock:D=[],ignore:v=[],maskFn:S,beforeAddRecordingEvent:L,blockClass:A,blockSelector:Y,maskInputOptions:W,maskTextClass:m,maskTextSelector:C,ignoreClass:F}={}){if(tn.prototype.__init.call(this),this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{...W||{},password:!0},maskTextFn:S,maskInputFn:S,...zd({mask:I,unmask:N,block:w,unblock:D,ignore:v,blockClass:A,blockSelector:Y,maskTextClass:m,maskTextSelector:C,ignoreClass:F}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:e,flushMaxDelay:n,stickySession:i,sessionSampleRate:a,errorSampleRate:o,useCompression:r,blockAllMedia:l,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:_,slowClickTimeout:h,slowClickIgnoreSelectors:p,networkDetailAllowUrls:y,networkCaptureBodies:T,networkRequestHeaders:cr(b),networkResponseHeaders:cr(U),beforeAddRecordingEvent:L,_experiments:s},typeof a=="number"&&(console.warn("[Replay] You are passing `sessionSampleRate` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure `replaysSessionSampleRate` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ".concat(a," })")),this._initialOptions.sessionSampleRate=a),typeof o=="number"&&(console.warn("[Replay] You are passing `errorSampleRate` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure `replaysOnErrorSampleRate` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ".concat(o," })")),this._initialOptions.errorSampleRate=o),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?"".concat(this._recordingOptions.blockSelector,",").concat(ar):ar),this._isInitialized&&sr())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return or}set _isInitialized(e){or=e}setupOnce(){sr()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop():Promise.resolve()}flush(e){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(e)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&this._replay.initializeSampling()}_setup(){const e=Hd(this._initialOptions);this._replay=new H({options:e,recordingOptions:this._recordingOptions})}}tn.__initStatic();function Hd(t){const e=g().getClient(),n=e&&e.getOptions(),i={sessionSampleRate:0,errorSampleRate:0,...Nt(t)};return n?(t.sessionSampleRate==null&&t.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set."),typeof n.replaysSessionSampleRate=="number"&&(i.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(i.errorSampleRate=n.replaysOnErrorSampleRate),i):(console.warn("SDK client is not available."),i)}function cr(t){return[...Fd,...t.map(e=>e.toLowerCase())]}function ur(t){let e,n=t[0],i=1;for(;i<t.length;){const r=t[i],s=t[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(e=n,n=s(n)):(r==="call"||r==="optionalCall")&&(n=s((...a)=>n.call(e,...a)),e=void 0)}return n}const B=we;function $d(){B&&B.document?B.document.addEventListener("visibilitychange",()=>{const t=Te();if(B.document.hidden&&t){const e="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Transaction: ".concat(e," -> since tab moved to the background, op: ").concat(t.op)),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const hi=(t,e,n)=>{let i,r;return s=>{e.value>=0&&(s||n)&&(r=e.value-(i||0),(r||i===void 0)&&(i=e.value,e.delta=r,t(e)))}},jd=()=>"v3-".concat(Date.now(),"-").concat(Math.floor(Math.random()*(9e12-1))+1e12),Wd=()=>{const t=B.performance.timing,e=B.performance.navigation.type,n={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(const i in t)i!=="navigationStart"&&i!=="toJSON"&&(n[i]=Math.max(t[i]-t.navigationStart,0));return n},ks=()=>B.__WEB_VITALS_POLYFILL__?B.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Wd()):B.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],xs=()=>{const t=ks();return t&&t.activationStart||0},_i=(t,e)=>{const n=ks();let i="navigate";return n&&(B.document.prerendering||xs()>0?i="prerender":i=n.type.replace(/_/g,"-")),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:jd(),navigationType:i}},ke=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver(r=>{e(r.getEntries())});return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(i){}},dn=(t,e)=>{const n=i=>{(i.type==="pagehide"||B.document.visibilityState==="hidden")&&(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},qd=t=>{const e=_i("CLS",0);let n,i=0,r=[];const s=o=>{o.forEach(c=>{if(!c.hadRecentInput){const u=r[0],l=r[r.length-1];i&&r.length!==0&&c.startTime-l.startTime<1e3&&c.startTime-u.startTime<5e3?(i+=c.value,r.push(c)):(i=c.value,r=[c]),i>e.value&&(e.value=i,e.entries=r,n&&n())}})},a=ke("layout-shift",s);if(a){n=hi(t,e);const o=()=>{s(a.takeRecords()),n(!0)};return dn(o),o}};let He=-1;const Zd=()=>B.document.visibilityState==="hidden"&&!B.document.prerendering?0:1/0,Vd=()=>{dn(({timeStamp:t})=>{He=t},!0)},pi=()=>(He<0&&(He=Zd(),Vd()),{get firstHiddenTime(){return He}}),Xd=t=>{const e=pi(),n=_i("FID");let i;const r=o=>{o.startTime<e.firstHiddenTime&&(n.value=o.processingStart-o.startTime,n.entries.push(o),i(!0))},s=o=>{o.forEach(r)},a=ke("first-input",s);i=hi(t,n),a&&dn(()=>{s(a.takeRecords()),a.disconnect()},!0)},lr={},Kd=t=>{const e=pi(),n=_i("LCP");let i;const r=a=>{const o=a[a.length-1];if(o){const c=Math.max(o.startTime-xs(),0);c<e.firstHiddenTime&&(n.value=c,n.entries=[o],i())}},s=ke("largest-contentful-paint",r);if(s){i=hi(t,n);const a=()=>{lr[n.id]||(r(s.takeRecords()),s.disconnect(),lr[n.id]=!0,i(!0))};return["keydown","click"].forEach(o=>{addEventListener(o,a,{once:!0,capture:!0})}),dn(a,!0),a}};function bn(t){return typeof t=="number"&&isFinite(t)}function Jt(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function j(t){return t/1e3}function Ns(){return B&&B.addEventListener&&B.performance}let dr=0,z={},lt,he;function Jd(){const t=Ns();if(t&&et){t.mark&&B.performance.mark("sentry-tracing-init"),rf();const e=ef(),n=nf();return()=>{e&&e(),n&&n()}}return()=>{}}function Qd(){ke("longtask",e=>{for(const n of e){const i=Te();if(!i)return;const r=j(et+n.startTime),s=j(n.duration);i.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:r,endTimestamp:r+s})}})}function tf(){ke("event",e=>{for(const n of e){const i=Te();if(!i)return;if(n.name==="click"){const r=j(et+n.startTime),s=j(n.duration);i.startChild({description:Ut(n.target),op:"ui.interaction.".concat(n.name),startTimestamp:r,endTimestamp:r+s})}}},{durationThreshold:0})}function ef(){return qd(t=>{const e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Adding CLS"),z.cls={value:t.value,unit:""},he=e)})}function nf(){return Kd(t=>{const e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Adding LCP"),z.lcp={value:t.value,unit:"millisecond"},lt=e)})}function rf(){Xd(t=>{const e=t.entries.pop();if(!e)return;const n=j(et),i=j(e.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Adding FID"),z.fid={value:t.value,unit:"millisecond"},z["mark.fid"]={value:n+i,unit:"second"}})}function sf(t){const e=Ns();if(!e||!B.performance.getEntries||!et)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Adding & adjusting spans using Performance API");const n=j(et),i=e.getEntries();let r,s;if(i.slice(dr).forEach(a=>{const o=j(a.startTime),c=j(a.duration);if(!(t.op==="navigation"&&n+o<t.startTimestamp))switch(a.entryType){case"navigation":{of(t,a,n),r=n+j(a.responseStart),s=n+j(a.requestStart);break}case"mark":case"paint":case"measure":{af(t,a,o,c,n);const u=pi(),l=a.startTime<u.firstHiddenTime;a.name==="first-paint"&&l&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Adding FP"),z.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&l&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Adding FCP"),z.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{const u=a.name.replace(B.location.origin,"");uf(t,a,u,o,c,n);break}}}),dr=Math.max(i.length-1,0),lf(t),t.op==="pageload"){typeof r=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Adding TTFB"),z.ttfb={value:(r-t.startTimestamp)*1e3,unit:"millisecond"},typeof s=="number"&&s<=r&&(z["ttfb.requestTime"]={value:(r-s)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(o=>{if(!z[o]||n>=t.startTimestamp)return;const c=z[o].value,u=n+j(c),l=Math.abs((u-t.startTimestamp)*1e3),d=l-c;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Normalized ".concat(o," from ").concat(c," to ").concat(l," (").concat(d,")")),z[o].value=l});const a=z["mark.fid"];a&&z.fid&&(Jt(t,{description:"first input delay",endTimestamp:a.value+j(z.fid.value),op:"ui.action",startTimestamp:a.value}),delete z["mark.fid"]),"fcp"in z||delete z.cls,Object.keys(z).forEach(o=>{t.setMeasurement(o,z[o].value,z[o].unit)}),df(t)}lt=void 0,he=void 0,z={}}function af(t,e,n,i,r){const s=r+n,a=s+i;return Jt(t,{description:e.name,endTimestamp:a,op:e.entryType,startTimestamp:s}),s}function of(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(i=>{Pe(t,e,i,n)}),Pe(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),Pe(t,e,"fetch",n,"cache","domainLookupStart"),Pe(t,e,"domainLookup",n,"DNS"),cf(t,e,n)}function Pe(t,e,n,i,r,s){const a=s?e[s]:e["".concat(n,"End")],o=e["".concat(n,"Start")];!o||!a||Jt(t,{op:"browser",description:r||n,startTimestamp:i+j(o),endTimestamp:i+j(a)})}function cf(t,e,n){Jt(t,{op:"browser",description:"request",startTimestamp:n+j(e.requestStart),endTimestamp:n+j(e.responseEnd)}),Jt(t,{op:"browser",description:"response",startTimestamp:n+j(e.responseStart),endTimestamp:n+j(e.responseEnd)})}function uf(t,e,n,i,r,s){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const a={};"transferSize"in e&&(a["http.response_transfer_size"]=e.transferSize),"encodedBodySize"in e&&(a["http.response_content_length"]=e.encodedBodySize),"decodedBodySize"in e&&(a["http.decoded_response_content_length"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);const o=s+i,c=o+r;Jt(t,{description:n,endTimestamp:c,op:e.initiatorType?"resource.".concat(e.initiatorType):"resource.other",startTimestamp:o,data:a})}function lf(t){const e=B.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),bn(n.rtt)&&(z["connection.rtt"]={value:n.rtt,unit:"millisecond"})),bn(e.deviceMemory)&&t.setTag("deviceMemory","".concat(e.deviceMemory," GB")),bn(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}function df(t){lt&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Adding LCP Data"),lt.element&&t.setTag("lcp.element",Ut(lt.element)),lt.id&&t.setTag("lcp.id",lt.id),lt.url&&t.setTag("lcp.url",lt.url.trim().slice(0,200)),t.setTag("lcp.size",lt.size)),he&&he.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Measurements] Adding CLS Data"),he.sources.forEach((e,n)=>t.setTag("cls.source.".concat(n+1),Ut(e.node))))}const Hn=["localhost",/^\/(?!\/)/],$n={traceFetch:!0,traceXHR:!0,tracingOrigins:Hn,tracePropagationTargets:Hn,_experiments:{}};function ff(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:i,tracingOrigins:r,shouldCreateSpanForRequest:s,_experiments:a}={traceFetch:$n.traceFetch,traceXHR:$n.traceXHR,...t},o=typeof s=="function"?s:l=>!0,c=l=>_f(l,i||r),u={};e&&K("fetch",l=>{const d=pf(l,o,c,u);ur([a,"optionalAccess",_=>_.enableHTTPTimings])&&d&&fr(d)}),n&&K("xhr",l=>{const d=gf(l,o,c,u);ur([a,"optionalAccess",_=>_.enableHTTPTimings])&&d&&fr(d)})}function fr(t){const e=t.data.url,n=new PerformanceObserver(i=>{i.getEntries().forEach(s=>{(s.initiatorType==="fetch"||s.initiatorType==="xmlhttprequest")&&s.name.endsWith(e)&&(hf(s).forEach(o=>t.setData(...o)),n.disconnect())})});n.observe({entryTypes:["resource"]})}function hf(t){const e=t.nextHopProtocol.split("/")[1]||"none",n=[];return e&&n.push(["network.protocol.version",e]),et?[...n,["http.request.connect_start",(et+t.connectStart)/1e3],["http.request.request_start",(et+t.requestStart)/1e3],["http.request.response_start",(et+t.responseStart)/1e3]]:n}function _f(t,e){return te(t,e||Hn)}function pf(t,e,n,i){if(!rn()||!(t.fetchData&&e(t.fetchData.url)))return;if(t.endTimestamp){const a=t.fetchData.__span;if(!a)return;const o=i[a];if(o){if(t.response){o.setHttpStatus(t.response.status);const c=t.response&&t.response.headers&&t.response.headers.get("content-length"),u=parseInt(c);u>0&&o.setData("http.response_content_length",u)}else t.error&&o.setStatus("internal_error");o.finish(),delete i[a]}return}const r=g().getScope().getSpan(),s=r&&r.transaction;if(r&&s){const{method:a,url:o}=t.fetchData,c=r.startChild({data:{url:o,type:"fetch","http.method":a},description:"".concat(a," ").concat(o),op:"http.client"});t.fetchData.__span=c.spanId,i[c.spanId]=c;const u=t.args[0];t.args[1]=t.args[1]||{};const l=t.args[1];return n(t.fetchData.url)&&(l.headers=mf(u,s.getDynamicSamplingContext(),c,l)),c}}function mf(t,e,n,i){const r=Nr(e),s=n.toTraceparent(),a=typeof Request<"u"&&We(t,Request)?t.headers:i.headers;if(a)if(typeof Headers<"u"&&We(a,Headers)){const o=new Headers(a);return o.append("sentry-trace",s),r&&o.append(kn,r),o}else if(Array.isArray(a)){const o=[...a,["sentry-trace",s]];return r&&o.push([kn,r]),o}else{const o="baggage"in a?a.baggage:void 0,c=[];return Array.isArray(o)?c.push(...o):o&&c.push(o),r&&c.push(r),{...a,"sentry-trace":s,baggage:c.length>0?c.join(","):void 0}}else return{"sentry-trace":s,baggage:r}}function gf(t,e,n,i){const r=t.xhr,s=r&&r[bt];if(!rn()||r&&r.__sentry_own_request__||!(r&&s&&e(s.url)))return;if(t.endTimestamp){const c=r.__sentry_xhr_span_id__;if(!c)return;const u=i[c];u&&(u.setHttpStatus(s.status_code),u.finish(),delete i[c]);return}const a=g().getScope().getSpan(),o=a&&a.transaction;if(a&&o){const c=a.startChild({data:{...s.data,type:"xhr","http.method":s.method,url:s.url},description:"".concat(s.method," ").concat(s.url),op:"http.client"});if(r.__sentry_xhr_span_id__=c.spanId,i[r.__sentry_xhr_span_id__]=c,r.setRequestHeader&&n(s.url))try{r.setRequestHeader("sentry-trace",c.toTraceparent());const u=o.getDynamicSamplingContext(),l=Nr(u);l&&r.setRequestHeader(kn,l)}catch(u){}return c}}function yf(t,e=!0,n=!0){if(!B||!B.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("Could not initialize routing instrumentation due to invalid location");return}let i=B.location.href,r;e&&(r=t({name:B.location.pathname,startTimestamp:et?et/1e3:void 0,op:"pageload",metadata:{source:"url"}})),n&&K("history",({to:s,from:a})=>{if(a===void 0&&i&&i.indexOf(s)!==-1){i=void 0;return}a!==s&&(i=void 0,r&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Finishing current transaction with op: ".concat(r.op)),r.finish()),r=t({name:B.location.pathname,op:"navigation",metadata:{source:"url"}}))})}const Ef="BrowserTracing",Sf={...ze,markBackgroundTransactions:!0,routingInstrumentation:yf,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,...$n};class jn{__init(){this.name=Ef}__init2(){this._hasSetTracePropagationTargets=!1}constructor(e){jn.prototype.__init.call(this),jn.prototype.__init2.call(this),Ha(),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...Sf,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=Jd(),this.options.enableLongTask&&Qd(),this.options._experiments.enableInteractions&&tf()}setupOnce(e,n){this._getCurrentHub=n;const r=n().getClient(),s=r&&r.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:o,startTransactionOnPageLoad:c,markBackgroundTransactions:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:_,_experiments:h}=this.options,p=s&&s.tracePropagationTargets,y=p||this.options.tracePropagationTargets;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&p&&f.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a(T=>{const b=this._createRouteTransaction(T);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(b,T,n),b},c,o),u&&$d(),h.enableInteractions&&this._registerInteractionListener(),ff({traceFetch:l,traceXHR:d,tracePropagationTargets:y,shouldCreateSpanForRequest:_,_experiments:{enableHTTPTimings:h.enableHTTPTimings}})}_createRouteTransaction(e){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Tracing] Did not create ".concat(e.op," transaction because _getCurrentHub is invalid."));return}const{beforeNavigate:n,idleTimeout:i,finalTimeout:r,heartbeatInterval:s}=this.options,a=e.op==="pageload",o=a?hr("sentry-trace"):null,c=a?hr("baggage"):null,u=o?Ia(o):void 0,l=c?Ua(c):void 0,d={...e,...u,metadata:{...e.metadata,dynamicSamplingContext:u&&!l?{}:l},trimEnd:!0},_=typeof n=="function"?n(d):d,h=_===void 0?{...d,sampled:!1}:_;h.metadata=h.name!==d.name?{...h.metadata,source:"custom"}:h.metadata,this._latestRouteName=h.name,this._latestRouteSource=h.metadata&&h.metadata.source,h.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Will not send ".concat(h.op," transaction because of beforeNavigate.")),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Tracing] Starting ".concat(h.op," transaction on scope"));const p=this._getCurrentHub(),{location:y}=B,T=Ai(p,h,i,r,!0,{location:y},s);return T.registerBeforeFinishCallback(b=>{this._collectWebVitals(),sf(b)}),T}_registerInteractionListener(){let e;const n=()=>{const{idleTimeout:i,finalTimeout:r,heartbeatInterval:s}=this.options,a="ui.action.click",o=Te();if(o&&o.op&&["navigation","pageload"].includes(o.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Tracing] Did not create ".concat(a," transaction because a pageload or navigation transaction is in progress."));return}if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Tracing] Did not create ".concat(a," transaction because _getCurrentHub is invalid."));return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Tracing] Did not create ".concat(a," transaction because _latestRouteName is missing."));return}const c=this._getCurrentHub(),{location:u}=B,l={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=Ai(c,l,i,r,!0,{location:u},s)};["click"].forEach(i=>{addEventListener(i,n,{once:!1,capture:!0})})}}function hr(t){const e=fa("meta[name=".concat(t,"]"));return e?e.getAttribute("content"):null}function be(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function bf(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const i=be(n);return r=>i.then(s=>r(s.transaction(e,"readwrite").objectStore(e)))}function Ds(t){return be(t.getAllKeys())}function wf(t,e,n){return t(i=>Ds(i).then(r=>{if(!(r.length>=n))return i.put(e,Math.max(...r,0)+1),be(i.transaction)}))}function Tf(t){return t(e=>Ds(e).then(n=>{if(n.length!==0)return be(e.get(n[0])).then(i=>(e.delete(n[0]),be(e.transaction).then(()=>i)))}))}function vf(t){let e;function n(){return e==null&&(e=bf(t.dbName||"sentry-offline",t.storeName||"queue")),e}return{insert:async i=>{try{const r=await kr(i,t.textEncoder);await wf(n(),r,t.maxQueueSize||30)}catch(r){}},pop:async()=>{try{const i=await Tf(n());if(i)return ha(i,t.textEncoder||new TextEncoder,t.textDecoder||new TextDecoder)}catch(i){}}}}function Rf(t){return e=>t({...e,createStore:vf})}function fh(t){return Rf(po(t))}const _r=1e6,$e=String(0),kf="main";let Is="",As="",Cs="",Wn=E.navigator&&E.navigator.userAgent||"",Os="";const xf=E.navigator&&E.navigator.language||E.navigator&&E.navigator.languages&&E.navigator.languages[0]||"";function Nf(t){return typeof t=="object"&&t!==null&&"getHighEntropyValues"in t}const pr=E.navigator&&E.navigator.userAgentData;Nf(pr)&&pr.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(t=>{if(Is=t.platform||"",Cs=t.architecture||"",Os=t.model||"",As=t.platformVersion||"",t.fullVersionList&&t.fullVersionList.length>0){const e=t.fullVersionList[t.fullVersionList.length-1];Wn="".concat(e.brand," ").concat(e.version)}}).catch(t=>{});function Df(t){return!("thread_metadata"in t)}function If(t){return Df(t)?Of(t):t}function Af(t){const e=t&&t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id;return typeof e=="string"&&e.length!==32&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Invalid traceId: ".concat(e," on profiled event")),typeof e!="string"?"":e}function Cf(t,e,n){if(t.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(e==null)throw new TypeError("Cannot construct profiling event envelope without a valid profile. Got ".concat(e," instead."));const i=Af(t),r=If(e),s=typeof t.start_timestamp=="number"?t.start_timestamp*1e3:Date.now(),a=typeof t.timestamp=="number"?t.timestamp*1e3:Date.now();return{event_id:n,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:t.release||"",environment:t.environment||Zn,runtime:{name:"javascript",version:E.navigator.userAgent},os:{name:Is,version:As,build_number:Wn},device:{locale:xf,model:Os,manufacturer:Wn,architecture:Cs,is_emulator:!1},debug_meta:{images:Lf(e.resources)},profile:r,transactions:[{name:t.transaction||"",id:t.event_id||Ht(),trace_id:i,active_thread_id:$e,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function Of(t){let e,n=0;const i={samples:[],stacks:[],frames:[],thread_metadata:{[$e]:{name:kf}}};if(!t.samples.length)return i;const r=t.samples[0].timestamp;for(let s=0;s<t.samples.length;s++){const a=t.samples[s];if(a.stackId===void 0){e===void 0&&(e=n,i.stacks[e]=[],n++),i.samples[s]={elapsed_since_start_ns:((a.timestamp-r)*_r).toFixed(0),stack_id:e,thread_id:$e};continue}let o=t.stacks[a.stackId];const c=[];for(;o;){c.push(o.frameId);const l=t.frames[o.frameId];i.frames[o.frameId]===void 0&&(i.frames[o.frameId]={function:l.name,file:l.resourceId?t.resources[l.resourceId]:void 0,line:l.line,column:l.column}),o=o.parentId===void 0?void 0:t.stacks[o.parentId]}const u={elapsed_since_start_ns:((a.timestamp-r)*_r).toFixed(0),stack_id:n,thread_id:$e};i.stacks[n]=c,i.samples[s]=u,n++}return i}function Uf(t,e){if(!e.length)return t;for(const n of e)t[1].push([{type:"profile"},n]);return t}function Bf(t){const e=[];return je(t,(n,i)=>{if(i==="transaction")for(let r=1;r<n.length;r++){const s=n[r];s&&s.contexts&&s.contexts.profile&&s.contexts.profile.profile_id&&e.push(n[r])}}),e}const mr=new WeakMap;function Lf(t){const e=we._sentryDebugIds;if(!e)return[];const n=g();if(!n)return[];const i=n.getClient();if(!i)return[];const r=i.getOptions();if(!r)return[];const s=r.stackParser;if(!s)return[];let a;const o=mr.get(s);o?a=o:(a=new Map,mr.set(s,a));const c=Object.keys(e).reduce((l,d)=>{let _;const h=a.get(d);h?_=h:(_=s(d),a.set(d,_));for(let p=_.length-1;p>=0;p--){const y=_[p],T=y&&y.filename;if(y&&T){l[T]=e[d];break}}return l},{}),u=[];for(const l of t)l&&c[l]&&u.push({type:"sourcemap",code_file:l,debug_id:c[l]});return u}function Mf(t){return typeof t!="number"&&typeof t!="boolean"||typeof t=="number"&&isNaN(t)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(t)," of type ").concat(JSON.stringify(typeof t),".")),!1):t===!0||t===!1?!0:t<0||t>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ".concat(t,".")),!1):!0}function Gf(t){return t.samples.length<2?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):t.frames.length?!0:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Discarding profile because it contains no frames"),!1)}function Pf(t,e,n){return Gf(e)?Cf(n,e,t):null}const xt=new Map;function zf(t,e){if(xt.set(t,e),xt.size>30){const n=xt.keys().next().value;xt.delete(n)}}const gr=3e4;let yr=!1;function Yf(t){return typeof t=="function"}function hh(t){return t?Us(t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Transaction is undefined, skipping profiling"),t)}function Us(t){const e=E.Profiler;if(!Yf(e))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."),t;if(yr)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Profiling has been disabled for the duration of the current user session."),t;const n=g().getClient(),i=n&&n.getOptions();if(!i)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Profiling disabled, no options found."),t;const r=i.profilesSampleRate;if(!Mf(r))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.warn("[Profiling] Discarding profile because of invalid sample rate."),t;if(!r)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),t;if(!(r===!0?!0:Math.random()<r))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ".concat(Number(r),")")),t;const a=10,o=Math.floor(gr/a);let c;try{c=new e({sampleInterval:a,maxBufferSize:o})}catch(p){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(f.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),f.log("[Profiling] Disabling profiling for current user session.")),yr=!0}if(!c)return t;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] started profiling transaction: ".concat(t.name||t.description));const u=Ht();async function l(){if(!t||!c)return null;const p=t.startChild({description:"profiler.stop",op:"profiler"});return c.stop().then(y=>(p.finish(),d&&(E.clearTimeout(d),d=void 0),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] stopped profiling of transaction: ".concat(t.name||t.description)),y?(zf(u,y),null):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] profiler returned null profile for: ".concat(t.name||t.description),"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(y=>(p.finish(),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] error while stopping profiler:",y),null))}let d=E.setTimeout(()=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] max profile duration elapsed, stopping profiling for:",t.name||t.description),l()},gr);const _=t.finish.bind(t);function h(){return t?(l().then(()=>{t.setContext("profile",{profile_id:u}),_()},()=>{_()}),t):_()}return t.finish=h,t}class qn{constructor(){qn.prototype.__init.call(this),qn.prototype.__init2.call(this)}__init(){this.name="BrowserProfilingIntegration"}__init2(){this.getCurrentHub=void 0}setupOnce(e,n){this.getCurrentHub=n;const i=this.getCurrentHub().getClient();i&&typeof i.on=="function"?(i.on("startTransaction",r=>{Us(r)}),i.on("beforeEnvelope",r=>{if(!xt.size)return;const s=Bf(r);if(!s.length)return;const a=[];for(const o of s){const c=o&&o.contexts,u=c&&c.profile&&c.profile.profile_id;if(!u){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] cannot find profile for a transaction without a profile context");continue}c&&c.profile&&delete c.profile;const l=xt.get(u);if(!l){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&f.log("[Profiling] Could not retrieve profile for transaction: ".concat(u));continue}xt.delete(u);const d=Pf(u,l,o);d&&a.push(d)}Uf(r,a)})):f.warn("[Profiling] Client does not support hooks, profiling will be disabled")}}let Bs={};E.Sentry&&E.Sentry.Integrations&&(Bs=E.Sentry.Integrations);const _h={...Bs,...No,...Mc};export{jt as Breadcrumbs,Wo as BrowserClient,qn as BrowserProfilingIntegration,jn as BrowserTracing,Ct as Dedupe,$t as FunctionToString,pt as GlobalHandlers,At as HttpContext,gh as Hub,Dt as InboundFilters,_h as Integrations,It as LinkedErrors,tn as Replay,Ri as SDK_VERSION,$s as Scope,Wt as TryCatch,E as WINDOW,qf as addBreadcrumb,nn as addGlobalEventProcessor,Ha as addTracingExtensions,jf as captureEvent,Qn as captureException,$f as captureMessage,dh as captureUserFeedback,ac as chromeStackLineParser,uh as close,Wf as configureScope,Lr as createTransport,$o as createUserFeedbackEnvelope,Bc as defaultIntegrations,$n as defaultRequestInstrumentationOptions,yc as defaultStackLineParsers,Ec as defaultStackParser,Uo as eventFromException,Bo as eventFromMessage,Ia as extractTraceparentData,ch as flush,ah as forceLoad,lc as geckoStackLineParser,Te as getActiveTransaction,g as getCurrentHub,yh as getHubFromCarrier,ih as init,ff as instrumentOutgoingRequests,sh as lastEventId,fh as makeBrowserOfflineTransport,Vo as makeFetchTransport,Eh as makeMain,th as makeMultiplexedTransport,Ko as makeXHRTransport,oh as onLoad,hh as onProfilingStartRouteTransaction,eh as opera10StackLineParser,nh as opera11StackLineParser,$a as setContext,Vf as setExtra,Zf as setExtras,Kf as setTag,Xf as setTags,Jf as setUser,rh as showReportDialog,Ma as spanStatusfromHttpCode,Qf as startTransaction,Hf as trace,hc as winjsStackLineParser,ja as withScope,lh as wrap};
|
|
//# sourceMappingURL=index~BRTBTu87nN.js.map
|