import{a as Ba}from"https://cdn.shopify.com/oxygen-v2/26990/12114/24902/1271030/build/_shared/chunk-UJLG5X7C.js";import{b as go,c as Fa,d as _o}from"https://cdn.shopify.com/oxygen-v2/26990/12114/24902/1271030/build/_shared/chunk-CFWRSLVV.js";var md=go($=>{"use strict";var fe=typeof Symbol=="function"&&Symbol.for,xa=fe?Symbol.for("react.element"):60103,Ra=fe?Symbol.for("react.portal"):60106,Zs=fe?Symbol.for("react.fragment"):60107,eo=fe?Symbol.for("react.strict_mode"):60108,to=fe?Symbol.for("react.profiler"):60114,no=fe?Symbol.for("react.provider"):60109,ro=fe?Symbol.for("react.context"):60110,wa=fe?Symbol.for("react.async_mode"):60111,so=fe?Symbol.for("react.concurrent_mode"):60111,oo=fe?Symbol.for("react.forward_ref"):60112,io=fe?Symbol.for("react.suspense"):60113,$y=fe?Symbol.for("react.suspense_list"):60120,ao=fe?Symbol.for("react.memo"):60115,co=fe?Symbol.for("react.lazy"):60116,jy=fe?Symbol.for("react.block"):60121,Gy=fe?Symbol.for("react.fundamental"):60117,Wy=fe?Symbol.for("react.responder"):60118,zy=fe?Symbol.for("react.scope"):60119;function Ne(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case xa:switch(e=e.type,e){case wa:case so:case Zs:case to:case eo:case io:return e;default:switch(e=e&&e.$$typeof,e){case ro:case oo:case co:case ao:case no:return e;default:return t}}case Ra:return t}}}function pd(e){return Ne(e)===so}$.AsyncMode=wa;$.ConcurrentMode=so;$.ContextConsumer=ro;$.ContextProvider=no;$.Element=xa;$.ForwardRef=oo;$.Fragment=Zs;$.Lazy=co;$.Memo=ao;$.Portal=Ra;$.Profiler=to;$.StrictMode=eo;$.Suspense=io;$.isAsyncMode=function(e){return pd(e)||Ne(e)===wa};$.isConcurrentMode=pd;$.isContextConsumer=function(e){return Ne(e)===ro};$.isContextProvider=function(e){return Ne(e)===no};$.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===xa};$.isForwardRef=function(e){return Ne(e)===oo};$.isFragment=function(e){return Ne(e)===Zs};$.isLazy=function(e){return Ne(e)===co};$.isMemo=function(e){return Ne(e)===ao};$.isPortal=function(e){return Ne(e)===Ra};$.isProfiler=function(e){return Ne(e)===to};$.isStrictMode=function(e){return Ne(e)===eo};$.isSuspense=function(e){return Ne(e)===io};$.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Zs||e===so||e===to||e===eo||e===io||e===$y||typeof e=="object"&&e!==null&&(e.$$typeof===co||e.$$typeof===ao||e.$$typeof===no||e.$$typeof===ro||e.$$typeof===oo||e.$$typeof===Gy||e.$$typeof===Wy||e.$$typeof===zy||e.$$typeof===jy)};$.typeOf=Ne});var gd=go((AC,hd)=>{"use strict";hd.exports=md()});var bd=go((OC,Id)=>{"use strict";var ka=gd(),qy={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Yy={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vy={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ed={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ca={};Ca[ka.ForwardRef]=Vy;Ca[ka.Memo]=Ed;function _d(e){return ka.isMemo(e)?Ed:Ca[e.$$typeof]||qy}var Ky=Object.defineProperty,Jy=Object.getOwnPropertyNames,yd=Object.getOwnPropertySymbols,Xy=Object.getOwnPropertyDescriptor,Qy=Object.getPrototypeOf,Sd=Object.prototype;function Td(e,t,n){if(typeof t!="string"){if(Sd){var r=Qy(t);r&&r!==Sd&&Td(e,r,n)}var s=Jy(t);yd&&(s=s.concat(yd(t)));for(var o=_d(e),i=_d(t),a=0;aHa(e,r,n))}function Wn(e,t,n=250,r,s,o,i){if(!o.exception||!o.exception.values||!i||!Ae(i.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=Hd(Io(e,t,s,i.originalException,r,o.exception.values,a,0),n))}function Io(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(Ae(r[s],Error)){$a(i,a);let u=e(t,r[s]),l=c.length;ja(u,s,l,a),c=Io(e,t,n,r[s],s,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if(Ae(u,Error)){$a(i,a);let d=e(t,u),p=c.length;ja(d,`errors[${l}]`,p,a),c=Io(e,t,n,u,s,[d,...c],d,p)}}),c}function $a(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function ja(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Hd(e,t){return e.map(n=>(n.value&&(n.value=nt(n.value,t)),n))}function jr(e){return e&&e.Math==Math?e:void 0}var b=typeof globalThis=="object"&&jr(globalThis)||typeof window=="object"&&jr(window)||typeof self=="object"&&jr(self)||typeof globalThis=="object"&&jr(globalThis)||function(){return this}()||{};function Wt(){return b}function zn(e,t,n){let r=n||b,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}var dn=Wt(),$d=80;function Oe(e,t={}){if(!e)return"";try{let n=e,r=5,s=[],o=0,i=0,a=" > ",c=a.length,u,l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||$d;for(;n&&o++1&&i+s.length*c+u.length>=d));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return""}}function jd(e,t){let n=e,r=[],s,o,i,a,c;if(!n||!n.tagName)return"";if(dn.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());let u=t&&t.length?t.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(u&&u.length)u.forEach(d=>{r.push(`[${d[0]}="${d[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&pe(s))for(o=s.split(/\s+/),c=0;c"u"||__SENTRY_DEBUG__;var Gd="Sentry Logger ",Yn=["debug","info","warn","error","log","assert","trace"],fn={};function Le(e){if(!("console"in b))return e();let t=b.console,n={},r=Object.keys(fn);r.forEach(s=>{let o=fn[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function Wd(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return De?Yn.forEach(n=>{t[n]=(...r)=>{e&&Le(()=>{b.console[n](`${Gd}[${n}]:`,...r)})}}):Yn.forEach(n=>{t[n]=()=>{}}),t}var m=Wd();var zd=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function qd(e){return e==="http"||e==="https"}function _e(e,t=!1){let{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Ga(e){let t=zd.exec(e);if(!t){Le(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,s="",o,i="",a]=t.slice(1),c="",u=a,l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){let d=u.match(/^\d+/);d&&(u=d[0])}return Wa({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Wa(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Yd(e){if(!De)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(m.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?qd(r)?t&&isNaN(parseInt(t,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Vn(e){let t=typeof e=="string"?Ga(e):Wa(e);if(!(!t||!Yd(t)))return t}var me=class extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}};function q(e,t,n){if(!(t in e))return;let r=e[t],s=n(r);typeof s=="function"&&Gr(s,r),e[t]=s}function Pe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{De&&m.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Gr(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Pe(e,"__sentry_original__",t)}catch{}}function zt(e){return e.__sentry_original__}function Ro(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Wr(e){if($t(e))return{message:e.message,name:e.name,stack:e.stack,...qa(e)};if(Gt(e)){let t={type:e.type,target:za(e.target),currentTarget:za(e.currentTarget),...qa(e)};return typeof CustomEvent<"u"&&Ae(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function za(e){try{return So(e)?Oe(e):Object.prototype.toString.call(e)}catch{return""}}function qa(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function wo(e,t=40){let n=Object.keys(Wr(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return nt(n[0],t);for(let r=n.length;r>0;r--){let s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length?s:nt(s,t)}return""}function W(e){return xo(e,new Map)}function xo(e,t){if(Vd(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let s of Object.keys(e))typeof e[s]<"u"&&(r[s]=xo(e[s],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(s=>{r.push(xo(s,t))}),r}return e}function Vd(e){if(!ze(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var Ka=50,Ya=/\(error: (.*)\)/,Va=/captureMessage|captureException/;function zr(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let s=[],o=n.split(` `);for(let i=r;i1024)continue;let c=Ya.test(a)?a.replace(Ya,"$1"):a;if(!c.match(/\S*Error: /)){for(let u of t){let l=u(c);if(l){s.push(l);break}}if(s.length>=Ka)break}}return Ja(s)}}function Co(e){return Array.isArray(e)?zr(...e):e}function Ja(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),Va.test(t[t.length-1].function||"")&&(t.pop(),Va.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Ka).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}var ko="";function be(e){try{return!e||typeof e!="function"?ko:e.name||ko}catch{return ko}}var qr={},Xa={};function ve(e,t){qr[e]=qr[e]||[],qr[e].push(t)}function xe(e,t){Xa[e]||(t(),Xa[e]=!0)}function ue(e,t){let n=e&&qr[e];if(n)for(let r of n)try{r(t)}catch(s){De&&m.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${be(r)} Error:`,s)}}function Ao(e){let t="console";ve(t,e),xe(t,Kd)}function Kd(){"console"in b&&Yn.forEach(function(e){e in b.console&&q(b.console,e,function(t){return fn[e]=t,function(...n){ue("console",{args:n,level:e});let s=fn[e];s&&s.apply(b.console,n)}})})}function F(){let e=b,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Qa(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function qe(e){let{message:t,event_id:n}=e;if(t)return t;let r=Qa(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function pn(e,t,n){let r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function ht(e,t){let n=Qa(e);if(!n)return;let r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){let o={...s&&s.data,...t.data};n.mechanism.data=o}}function Yr(e){if(e&&e.__sentry_captured__)return!0;try{Pe(e,"__sentry_captured__",!0)}catch{}return!1}function Kn(e){return Array.isArray(e)?e:[e]}var mn=b,Jd=1e3,Za,Oo,No;function Jn(e){let t="dom";ve(t,e),xe(t,Xd)}function Xd(){if(!mn.document)return;let e=ue.bind(null,"dom"),t=ec(e,!0);mn.document.addEventListener("click",t,!1),mn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=mn[n]&&mn[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(q(r,"addEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[o]=u[o]||{refCount:0};if(!l.handler){let d=ec(e);l.handler=d,s.call(this,o,d,a)}l.refCount++}catch{}return s.call(this,o,i,a)}}),q(r,"removeEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[o];l&&(l.refCount--,l.refCount<=0&&(s.call(this,o,l.handler,a),l.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,i,a)}}))})}function Qd(e){if(e.type!==Oo)return!1;try{if(!e.target||e.target._sentryId!==No)return!1}catch{}return!0}function Zd(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function ec(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=ef(n);if(Zd(n.type,r))return;Pe(n,"_sentryCaptured",!0),r&&!r._sentryId&&Pe(r,"_sentryId",F());let s=n.type==="keypress"?"input":n.type;Qd(n)||(e({event:n,name:s,global:t}),Oo=n.type,No=r?r._sentryId:void 0),clearTimeout(Za),Za=mn.setTimeout(()=>{No=void 0,Oo=void 0},Jd)}}function ef(e){try{return e.target}catch{return null}}var Mo=Wt();function Vr(){if(!("fetch"in Mo))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Xn(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Do(){if(typeof EdgeRuntime=="string")return!0;if(!Vr())return!1;if(Xn(Mo.fetch))return!0;let e=!1,t=Mo.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Xn(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){De&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function qt(e){let t="fetch";ve(t,e),xe(t,tf)}function tf(){Do()&&q(b,"fetch",function(e){return function(...t){let{method:n,url:r}=nf(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return ue("fetch",{...s}),e.apply(b,t).then(o=>{let i={...s,endTimestamp:Date.now(),response:o};return ue("fetch",i),o},o=>{let i={...s,endTimestamp:Date.now(),error:o};throw ue("fetch",i),o})}})}function Lo(e,t){return!!e&&typeof e=="object"&&!!e[t]}function tc(e){return typeof e=="string"?e:e?Lo(e,"url")?e.url:e.toString?e.toString():"":""}function nf(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:tc(n),method:Lo(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:tc(t),method:Lo(t,"method")?String(t.method).toUpperCase():"GET"}}var Kr=null;function Qn(e){let t="error";ve(t,e),xe(t,rf)}function rf(){Kr=b.onerror,b.onerror=function(e,t,n,r,s){return ue("error",{column:r,error:s,line:n,msg:e,url:t}),Kr&&!Kr.__SENTRY_LOADER__?Kr.apply(this,arguments):!1},b.onerror.__SENTRY_INSTRUMENTED__=!0}var Jr=null;function Zn(e){let t="unhandledrejection";ve(t,e),xe(t,sf)}function sf(){Jr=b.onunhandledrejection,b.onunhandledrejection=function(e){return ue("unhandledrejection",e),Jr&&!Jr.__SENTRY_LOADER__?Jr.apply(this,arguments):!0},b.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var Xr=Wt();function nc(){let e=Xr.chrome,t=e&&e.app&&e.app.runtime,n="history"in Xr&&!!Xr.history.pushState&&!!Xr.history.replaceState;return!t&&n}var er=b,Qr;function gt(e){let t="history";ve(t,e),xe(t,of)}function of(){if(!nc())return;let e=er.onpopstate;er.onpopstate=function(...n){let r=er.location.href,s=Qr;if(Qr=r,ue("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let s=r.length>2?r[2]:void 0;if(s){let o=Qr,i=String(s);Qr=i,ue("history",{from:o,to:i})}return n.apply(this,r)}}q(er.history,"pushState",t),q(er.history,"replaceState",t)}var af=b,Fe="__sentry_xhr_v3__";function Yt(e){let t="xhr";ve(t,e),xe(t,cf)}function cf(){if(!af.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;q(e,"open",function(t){return function(...n){let r=Date.now(),s=pe(n[0])?n[0].toUpperCase():void 0,o=uf(n[1]);if(!s||!o)return t.apply(this,n);this[Fe]={method:s,url:o,request_headers:{}},s==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let i=()=>{let a=this[Fe];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let c={args:[s,o],endTimestamp:Date.now(),startTimestamp:r,xhr:this};ue("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?q(this,"onreadystatechange",function(a){return function(...c){return i(),a.apply(this,c)}}):this.addEventListener("readystatechange",i),q(this,"setRequestHeader",function(a){return function(...c){let[u,l]=c,d=this[Fe];return d&&pe(u)&&pe(l)&&(d.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),t.apply(this,n)}}),q(e,"send",function(t){return function(...n){let r=this[Fe];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return ue("xhr",s),t.apply(this,n)}})}function uf(e){if(pe(e))return e;try{return e.toString()}catch{}}function Po(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Fo(){return"npm"}function Vt(){return!Po()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Zr(){return typeof window<"u"&&(!Vt()||lf())}function lf(){return b.process!==void 0&&b.process.type==="renderer"}function rc(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let o=0;on?ts(e,t-1,n):r}function es(e,t,n=1/0,r=1/0,s=rc()){let[o,i]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!jn(t))return t;let a=df(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let f=u.toJSON();return es("",f,c-1,r,s)}catch{}let l=Array.isArray(t)?[]:{},d=0,p=Wr(t);for(let f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(d>=r){l[f]="[MaxProperties ~]";break}let h=p[f];l[f]=es(f,h,c-1,r,s),d++}return i(t),l}function df(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof globalThis<"u"&&t===globalThis)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Gn(t))return"[VueViewModel]";if(To(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${be(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=ff(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ff(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function pf(e){return~-encodeURI(e).split(/%..|./).length}function mf(e){return pf(JSON.stringify(e))}var _t;(function(e){e[e.PENDING=0]="PENDING";let n=1;e[e.RESOLVED=n]="RESOLVED";let r=2;e[e.REJECTED=r]="REJECTED"})(_t||(_t={}));function Ye(e){return new se(t=>{t(e)})}function Kt(e){return new se((t,n)=>{n(e)})}var se=class{constructor(t){se.prototype.__init.call(this),se.prototype.__init2.call(this),se.prototype.__init3.call(this),se.prototype.__init4.call(this),this._state=_t.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new se((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new se((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(_t.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(_t.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===_t.PENDING){if(tt(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===_t.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===_t.RESOLVED&&n[1](this._value),this._state===_t.REJECTED&&n[2](this._value),n[0]=!0)})}}};function Bo(e){let t=[];function n(){return e===void 0||t.lengthr(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(i){return new se((a,c)=>{let u=t.length;if(!u)return a(!0);let l=setTimeout(()=>{i&&i>0&&a(!1)},i);t.forEach(d=>{Ye(d).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:t,add:s,drain:o}}function Be(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}var sc=["fatal","error","warning","log","info","debug"];function Uo(e){return e==="warn"?"warning":sc.includes(e)?e:"log"}var oc=1e3;function st(){return Date.now()/oc}function hf(){let{performance:e}=b;if(!e||!e.now)return st;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/oc}var Ve=hf();var tr,le=(()=>{let{performance:e}=b;if(!e||!e.now){tr="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s{let o=ic(s);for(let i of Object.keys(o))r[i]=o[i];return r},{});else{if(!e)return;t=ic(e)}let n=Object.entries(t).reduce((r,[s,o])=>{if(s.match(ac)){let i=s.slice(Ho.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function nr(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Ho}${r}`]=s),n),{});return gf(t)}function ic(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function gf(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{let o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=s===0?o:`${t},${o}`;return i.length>cc?(De&&m.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}var uc=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function lc(e){if(!e)return;let t=e.match(uc);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function jo(e,t){let n=lc(e),r=$o(t),{traceId:s,parentSpanId:o,parentSampled:i}=n||{};return n?{traceId:s||F(),parentSpanId:o||F().substring(16),spanId:F().substring(16),sampled:i,dsc:r||{}}:{traceId:s||F(),spanId:F().substring(16)}}function Jt(e=F(),t=F().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function he(e,t=[]){return[e,t]}function Wo(e,t){let[n,r]=e;return[n,[...r,t]]}function ns(e,t){let n=e[1];for(let r of n){let s=r[0].type;if(t(r,s))return!0}return!1}function Go(e,t){return(t||new TextEncoder).encode(e)}function zo(e,t){let[n,r]=e,s=JSON.stringify(n);function o(i){typeof s=="string"?s=typeof i=="string"?s+i:[Go(s,t),i]:s.push(typeof i=="string"?Go(i,t):i)}for(let i of r){let[a,c]=i;if(o(` ${JSON.stringify(a)} `),typeof c=="string"||c instanceof Uint8Array)o(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(Re(c))}o(u)}}return typeof s=="string"?s:_f(s)}function _f(e){let t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t),r=0;for(let s of e)n.set(s,r),r+=s.length;return n}function qo(e,t){let n=typeof e.data=="string"?Go(e.data,t):e.data;return[W({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var yf={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function rs(e){return yf[e]}function gn(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function rr(e,t,n,r){let s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:_e(r)},...s&&{trace:W({...s})}}}function Yo(e,t,n){let r=[{type:"client_report"},{timestamp:n||st(),discarded_events:e}];return he(t?{dsn:t}:{},[r])}function dc(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function fc(e,t){return e[t]||e.all||0}function sr(e,t,n=Date.now()){return fc(e,t)>n}function or(e,{statusCode:t,headers:n},r=Date.now()){let s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(let a of o.trim().split(",")){let[c,u,,,l]=a.split(":",5),d=parseInt(c,10),p=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+p;else for(let f of u.split(";"))f==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[f]=r+p):s[f]=r+p}else i?s.all=r+dc(i,r):t===429&&(s.all=r+60*1e3);return s}function pc(e,t){return e(t.stack||"",1)}function Vo(e,t){let n={type:t.name||t.constructor.name,value:t.message},r=pc(e,t);return r.length&&(n.stacktrace={frames:r}),n}function Ko(e,t){return e??t()}function yt(e){let t,n=e[0],r=1;for(;rn.call(t,...i)),t=void 0)}return n}var E=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var wt="production";function ir(){return zn("globalEventProcessors",()=>[])}function Jo(e){ir().push(e)}function _n(e,t,n,r=0){return new se((s,o)=>{let i=e[r];if(t===null||typeof i!="function")s(t);else{let a=i({...t},n);E&&i.id&&a===null&&m.log(`Event processor "${i.id}" dropped event`),tt(a)?a.then(c=>_n(e,c,n,r+1).then(s)).then(null,o):_n(e,a,n,r+1).then(s).then(null,o)}})}function ss(e){let t=Ve(),n={sid:F(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Ef(n)};return e&&Ke(n,e),n}function Ke(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ve(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:F()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function os(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Ke(e,n)}function Ef(e){return W({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var hc=0,Xo=1;function Xt(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,tags:a,origin:c}=D(e);return W({data:r,op:s,parent_span_id:o,span_id:t,status:i,tags:a,trace_id:n,origin:c})}function St(e){let{traceId:t,spanId:n}=e.spanContext(),r=yn(e);return Jt(t,n,r)}function kt(e){return typeof e=="number"?mc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?mc(e.getTime()):Ve()}function mc(e){return e>9999999999?e/1e3:e}function D(e){return Tf(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Tf(e){return typeof e.getSpanJSON=="function"}function yn(e){let{traceFlags:t}=e.spanContext();return Boolean(t&Xo)}function ar(e,t,n,r,s,o){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||F(),timestamp:t.timestamp||st()},u=n.integrations||e.integrations.map(y=>y.name);If(c,e),xf(c,u),t.type===void 0&&bf(c,e.stackParser);let l=wf(r,n.captureContext);n.mechanism&&ht(c,n.mechanism);let d=s&&s.getEventProcessors?s.getEventProcessors():[],p=yc().getScopeData();if(o){let y=o.getScopeData();Qo(p,y)}if(l){let y=l.getScopeData();Qo(p,y)}let f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),is(c,p);let h=[...d,...ir(),...p.eventProcessors];return _n(h,c,n).then(y=>(y&&vf(y),typeof i=="number"&&i>0?Rf(y,i,a):y))}function If(e,t){let{environment:n,release:r,dist:s,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:wt),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=nt(e.message,o));let i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=nt(i.value,o));let a=e.request;a&&a.url&&(a.url=nt(a.url,o))}var gc=new WeakMap;function bf(e,t){let n=b._sentryDebugIds;if(!n)return;let r,s=gc.get(t);s?r=s:(r=new Map,gc.set(t,r));let o=Object.keys(n).reduce((i,a)=>{let c,u=r.get(a);u?c=u:(c=t(a),r.set(a,c));for(let l=c.length-1;l>=0;l--){let d=c[l];if(d.filename){i[d.filename]=n[a];break}}return i},{});try{e.exception.values.forEach(i=>{i.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function vf(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function xf(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Rf(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:Re(s.data,t,n)}}))},...e.user&&{user:Re(e.user,t,n)},...e.contexts&&{contexts:Re(e.contexts,t,n)},...e.extra&&{extra:Re(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Re(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>{let o=D(s).data;return o&&(s.data=Re(o,t,n)),s})),r}function wf(e,t){if(!t)return e;let n=e?e.clone():new we;return n.update(t),n}function _c(e){if(e)return kf(e)?{captureContext:e}:Af(e)?{captureContext:e}:e}function kf(e){return e instanceof we||typeof e=="function"}var Cf=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Af(e){return Object.keys(e).some(t=>Cf.includes(t))}function Je(e,t){return Y().captureException(e,_c(t))}function cr(e,t){return Y().captureEvent(e,t)}function Ue(e,t){Y().addBreadcrumb(e,t)}function as(e,t){Y().setContext(e,t)}function Qt(...e){let t=Y();if(e.length===2){let[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function x(){return Y().getClient()}function X(){return Y().getScope()}function ur(e){let t=x(),n=ye(),r=X(),{release:s,environment:o=wt}=t&&t.getOptions()||{},{userAgent:i}=b.navigator||{},a=ss({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&c.status==="ok"&&Ke(c,{status:"exited"}),cs(),n.setSession(a),r.setSession(a),a}function cs(){let e=ye(),t=X(),n=t.getSession()||e.getSession();n&&os(n),Sc(),e.setSession(),t.setSession()}function Sc(){let e=ye(),t=X(),n=x(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function lr(e=!1){if(e){cs();return}Sc()}function ot(e){return e.transaction}function Ct(e,t,n){let r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},i=W({environment:r.environment||wt,release:r.release,user_segment:o,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",i),i}function He(e){let t=x();if(!t)return{};let n=Ct(D(e).trace_id||"",t,X()),r=ot(e);if(!r)return n;let s=r&&r._frozenDynamicSamplingContext;if(s)return s;let{sampleRate:o,source:i}=r.metadata;o!=null&&(n.sample_rate=`${o}`);let a=D(r);return i&&i!=="url"&&(n.transaction=a.description),n.sampled=String(yn(r)),t.emit&&t.emit("createDsc",n),n}function is(e,t){let{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;Of(e,t),r&&Df(e,r),Lf(e,n),Nf(e,s),Mf(e,o)}function Qo(e,t){let{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:f,span:h}=t;dr(e,"extra",n),dr(e,"tags",r),dr(e,"user",s),dr(e,"contexts",o),dr(e,"sdkProcessingMetadata",a),i&&(e.level=i),f&&(e.transactionName=f),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function dr(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function Of(e,t){let{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=W(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let u=W(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});let l=W(s);l&&Object.keys(l).length&&(e.user={...l,...e.user});let d=W(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),i&&(e.level=i),a&&(e.transaction=a)}function Nf(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Mf(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Df(e,t){e.contexts={trace:Xt(t),...e.contexts};let n=ot(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:He(t),...e.sdkProcessingMetadata};let r=D(n).description;r&&(e.tags={transaction:r,...e.tags})}}function Lf(e,t){e.fingerprint=e.fingerprint?Kn(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}var Pf=100,Zo,we=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Tc()}static clone(t){return t?t.clone():new we}clone(){let t=new we;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Ke(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t;if(n instanceof we){let r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(ze(n)){let r=t;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Tc(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:Pf;if(r<=0)return this;let s={timestamp:st(),...t},o=this._breadcrumbs;return o.push(s),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:s,_extra:o,_user:i,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:p,_span:f}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:s,extra:o,user:i,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:l,sdkProcessingMetadata:d,transactionName:p,span:f}}applyToEvent(t,n={},r=[]){is(t,this.getScopeData());let s=[...r,...ir(),...this._eventProcessors];return _n(s,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:F();if(!this._client)return m.warn("No client configured on scope - will not capture exception!"),r;let s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){let s=r&&r.event_id?r.event_id:F();if(!this._client)return m.warn("No client configured on scope - will not capture message!"),s;let o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}captureEvent(t,n){let r=n&&n.event_id?n.event_id:F();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(m.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function yc(){return Zo||(Zo=new we),Zo}function Tc(){return{traceId:F(),spanId:F().substring(16)}}var Sn="7.120.0";var Ic=parseFloat(Sn),Ff=100,En=class{constructor(t,n,r,s=Ic){this._version=s;let o;n?o=n:(o=new we,o.setClient(t));let i;r?i=r:(i=new we,i.setClient(t)),this._stack=[{scope:o}],t&&this.bindClient(t),this._isolationScope=i}isOlderThan(t){return this._version(this.popScope(),s),s=>{throw this.popScope(),s}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:F(),s=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureMessage(t,n,r){let s=this._lastEventId=r&&r.event_id?r.event_id:F(),o=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s}),s}captureEvent(t,n){let r=n&&n.event_id?n.event_id:F();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:s}=this.getStackTop();if(!s)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Ff}=s.getOptions&&s.getOptions()||{};if(i<=0)return;let c={timestamp:st(),...t},u=o?Le(()=>o(c,n)):c;u!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,i))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){let n=us(this);try{t(this)}finally{us(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return E&&m.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){let r=this._callExtensionMethod("startTransaction",t,n);return E&&!r&&(this.getClient()?m.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': Sentry.addTracingExtensions(); Sentry.init({...}); `):m.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let n=this.getStackTop().scope,r=n.getSession();r&&os(r),this._sendSessionUpdate(),n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:s,environment:o=wt}=r&&r.getOptions()||{},{userAgent:i}=b.navigator||{},a=ss({release:s,environment:o,user:n.getUser(),...i&&{userAgent:i},...t}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&Ke(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return Boolean(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){let s=Zt().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n);E&&m.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Zt(){return b.__SENTRY__=b.__SENTRY__||{extensions:{},hub:void 0},b}function us(e){let t=Zt(),n=fr(t);return ei(t,e),n}function Y(){let e=Zt();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Bf(e)}function ye(){return Y().getIsolationScope()}function Bf(e=Zt()){return(!Uf(e)||fr(e).isOlderThan(Ic))&&ei(e,new En),fr(e)}function Uf(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function fr(e){return zn("hub",()=>new En,e)}function ei(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function ke(e){return(e||Y()).getScope().getTransaction()}var bc=!1;function vc(){bc||(bc=!0,Qn(ti),Zn(ti))}function ti(){let e=ke();if(e){let t="internal_error";E&&m.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}ti.tag="sentry_tracingErrorCallback";var ni;(function(e){let t="ok";e.Ok=t;let n="deadline_exceeded";e.DeadlineExceeded=n;let r="unauthenticated";e.Unauthenticated=r;let s="permission_denied";e.PermissionDenied=s;let o="not_found";e.NotFound=o;let i="resource_exhausted";e.ResourceExhausted=i;let a="invalid_argument";e.InvalidArgument=a;let c="unimplemented";e.Unimplemented=c;let u="unavailable";e.Unavailable=u;let l="internal_error";e.InternalError=l;let d="unknown_error";e.UnknownError=d;let p="cancelled";e.Cancelled=p;let f="already_exists";e.AlreadyExists=f;let h="failed_precondition";e.FailedPrecondition=h;let g="aborted";e.Aborted=g;let y="out_of_range";e.OutOfRange=y;let _="data_loss";e.DataLoss=_})(ni||(ni={}));function ri(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){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(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function At(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);let n=ri(t);n!=="unknown_error"&&e.setStatus(n)}function $e(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=x(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Tn(e){if(!$e())return;let t=$f(e),n=Y(),r=e.scope?e.scope.getSpan():Et();if(e.onlyIfParent&&!r)return;let i=(e.scope||X()).clone();return Hf(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:i})}function Et(){return X().getSpan()}function Hf(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:s}){if(!$e())return;let o=ye(),i;if(t&&!r)i=t.startChild(n);else if(t){let a=He(t),{traceId:c,spanId:u}=t.spanContext(),l=yn(t);i=e.startTransaction({traceId:c,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:a,...n.metadata}})}else{let{traceId:a,dsc:c,parentSpanId:u,sampled:l}={...o.getPropagationContext(),...s.getPropagationContext()};i=e.startTransaction({traceId:a,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return s.setSpan(i),jf(i,s,o),i}function $f(e){if(e.startTime){let t={...e};return t.startTimestamp=kt(e.startTime),delete t.startTime,t}return e}var xc="_sentryScope",Rc="_sentryIsolationScope";function jf(e,t,n){e&&(Pe(e,Rc,n),Pe(e,xc,t))}function wc(e){return{scope:e[xc],isolationScope:e[Rc]}}var kc;function Gf(e){return kc?kc.get(e):void 0}function ls(e){let t=Gf(e);if(!t)return;let n={};for(let[,[r,s]]of t)n[r]||(n[r]=[]),n[r].push(W(s));return n}var ge="sentry.source",it="sentry.sample_rate",en="sentry.op",Xe="sentry.origin",si="profile_id";var In=class{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}},Tt=class{constructor(t={}){this._traceId=t.traceId||F(),this._spanId=t.spanId||F().substring(16),this._startTime=t.startTimestamp||Ve(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[Xe]:t.origin||"manual",[en]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[en]}set op(t){this.setAttribute(en,t)}get origin(){return this._attributes[Xe]}set origin(t){this.setAttribute(Xe,t)}spanContext(){let{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Xo:hc}}startChild(t){let n=new Tt({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);let r=ot(this);if(n.transaction=r,E&&r){let s=t&&t.op||"< unknown op >",o=D(n).description||"< unknown name >",i=r.spanContext().spanId,a=`[Tracing] Starting '${s}' span on transaction '${o}' (${i}).`;m.log(a),this._logMessage=a}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return At(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;let n=ot(this);if(E&&n&&n.spanContext().spanId!==this._spanId){let r=this._logMessage;r&&m.log(r.replace("Starting","Finishing"))}this._endTime=kt(t)}toTraceparent(){return St(this)}toContext(){return W({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return Xt(this)}getSpanJSON(){return W({data:this._getData(),description:this._name,op:this._attributes[en],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Xe],_metrics_summary:ls(this),profile_id:this._attributes[si],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){let{data:t,_attributes:n}=this,r=Object.keys(t).length>0,s=Object.keys(n).length>0;if(!(!r&&!s))return r&&s?{...t,...n}:r?t:n}};var bn=class extends Tt{constructor(t,n){super(t),this._contexts={},this._hub=n||Y(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;let r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[ge]&&{source:this._attributes[ge]},...this._attributes[it]&&{sampleRate:this._attributes[it]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(ge,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new In(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){let n=kt(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){let t=super.toContext();return W({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return He(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(E&&m.warn("Transaction has no name, falling back to ``."),this._name=""),super.end(t);let n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){E&&m.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}let r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&D(l).timestamp):[];if(this._trimEnd&&r.length>0){let l=r.map(d=>D(d).timestamp).filter(Boolean);this._endTime=l.reduce((d,p)=>d>p?d:p)}let{scope:s,isolationScope:o}=wc(this),{metadata:i}=this,{source:a}=i,c={contexts:{...this._contexts,trace:Xt(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...i,capturedSpanScope:s,capturedSpanIsolationScope:o,...W({dynamicSamplingContext:He(this)})},_metrics_summary:ls(this),...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(E&&m.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),E&&m.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}};var xn={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Wf="finishReason",vn=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],oi=class extends In{constructor(t,n,r,s){super(s),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){let n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),D(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}},pr=class extends bn{constructor(t,n,r=xn.idleTimeout,s=xn.finalTimeout,o=xn.heartbeatInterval,i=!1,a=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=o,this._onScope=i,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=vn[4],this._autoFinishAllowed=!a,i&&(E&&m.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=vn[3],this.end())},this._finalTimeout)}end(t){let n=kt(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(Wf,this._finishReason),this.spanRecorder){E&&m.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(let r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;D(r).timestamp||(r.setStatus("cancelled"),r.end(n),E&&m.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));let{start_timestamp:s,timestamp:o}=D(r),i=s&&s{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new oi(n,r,this.spanContext().spanId,t),E&&m.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{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=vn[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(E&&m.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=vn[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),E&&m.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,E&&m.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(E&&m.log(`[Tracing] popActivity ${t}`),delete this.activities[t],E&&m.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let n=Ve();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=vn[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(E&&m.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=vn[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){E&&m.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function ii(e,t,n){if(!$e(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(it,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(it,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(it,Number(r))):(r=1,e.setAttribute(it,r)),ds(r)?r?(e.sampled=Math.random()1?(E&&m.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function zf(){let t=this.getScope().getSpan();return t?{"sentry-trace":St(t)}:{}}function qf(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",o=e.instrumenter||"sentry";s!==o&&(E&&m.error(`A transaction was started with instrumenter=\`${o}\`, but the SDK is configured with the \`${s}\` instrumenter. The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),e.sampled=!1);let i=new bn(e,this);return i=ii(i,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),i.isRecording()&&i.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",i),i}function fs(e,t,n,r,s,o,i,a=!1){let c=e.getClient(),u=c&&c.getOptions()||{},l=new pr(t,e,n,r,i,s,a);return l=ii(l,u,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...o}),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function ps(){let e=Zt();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=qf),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=zf),vc())}function ms(e,t,n){let r=ke();r&&r.setMeasurement(e,t,n)}function Yf(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Cc(e,t,n,r){let s=gn(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:_e(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return he(o,[i])}function Ac(e,t,n,r){let s=gn(n),o=e.type&&e.type!=="replay_event"?e.type:"event";Yf(e,n&&n.sdk);let i=rr(e,s,r,t);return delete e.sdkProcessingMetadata,he(i,[[{type:o},e]])}var Vf="7";function Oc(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Kf(e){return`${Oc(e)}${e.projectId}/envelope/`}function Jf(e,t){return Ro({sentry_key:e.publicKey,sentry_version:Vf,...t&&{sentry_client:`${t.name}/${t.version}`}})}function ai(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${Kf(e)}?${Jf(e,r)}`}function ci(e,t){let n=Vn(e);if(!n)return"";let r=`${Oc(n)}embed/error-page/`,s=`dsn=${_e(n)}`;for(let o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){let i=t.user;if(!i)continue;i.name&&(s+=`&name=${encodeURIComponent(i.name)}`),i.email&&(s+=`&email=${encodeURIComponent(i.email)}`)}else s+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${s}`}var Nc=[];function Xf(e){let t={};return e.forEach(n=>{let{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function ui(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Kn(n(t)):r=t;let s=Xf(r),o=Qf(s,i=>i.name==="Debug");if(o!==-1){let[i]=s.splice(o,1);s.push(i)}return s}function Mc(e,t){let n={};return t.forEach(r=>{r&&di(e,r,n)}),n}function li(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function di(e,t,n){if(n[t.name]){E&&m.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Nc.indexOf(t.name)===-1&&(t.setupOnce(Jo,Y),Nc.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){let r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}E&&m.log(`Integration installed: ${t.name}`)}function Qf(e,t){for(let n=0;n0?`|#${r.map(([o,i])=>`${o}:${i}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp} `}return t}function Lc(e,t,n,r){let s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=_e(t));let o=Zf(e);return he(s,[o])}function Zf(e){let t=Dc(e);return[{type:"statsd",length:t.length},t]}var Pc="Not capturing exception because it's already been captured.",mr=class{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Vn(t.dsn):E&&m.warn("No DSN provided, client will not send events."),this._dsn){let n=ai(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(Yr(t)){E&&m.log(Pc);return}let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(o=>this._captureEvent(o,n,r)).then(o=>{s=o})),s}captureMessage(t,n,r,s){let o=r&&r.event_id,i=ln(t)?t:String(t),a=jt(t)?this.eventFromMessage(i,n,r):this.eventFromException(t,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{o=c})),o}captureEvent(t,n,r){if(n&&n.originalException&&Yr(n.originalException)){E&&m.log(Pc);return}let s=n&&n.event_id,i=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,i||r).then(a=>{s=a})),s}captureSession(t){typeof t.release!="string"?E&&m.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Ke(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Ye(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return E&&m.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){let n=this._integrations[t.name];di(this,t,this._integrations),n||li(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Ac(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=Wo(r,qo(o,this._options.transportOptions&&this._options.transportOptions.textEncoder));let s=this._sendEnvelope(r);s&&s.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){let n=Cc(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){let s=typeof r=="number"?r:1,o=`${t}:${n}`;E&&m.log(`Recording outcome: "${o}"${s>1?` (${s} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+s}}captureAggregateMetrics(t){E&&m.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);let n=Lc(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=Mc(this,t),li(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,s=!1,o=n.exception&&n.exception.values;if(o){s=!0;for(let c of o){let u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}let i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Ke(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new se(n=>{let r=0,s=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=s,t&&r>=t&&(clearInterval(o),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=ye()){let o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),this.emit("preprocessEvent",t,n),ar(o,t,n,r,this,s).then(a=>{if(a===null)return a;let c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){let{traceId:l,spanId:d,parentSpanId:p,dsc:f}=c;a.contexts={trace:{trace_id:l,span_id:d,parent_span_id:p},...a.contexts};let h=f||Ct(l,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(E){let o=s;o.logLevel==="log"?m.log(o.message):m.warn(o)}})}_processEvent(t,n,r){let s=this.getOptions(),{sampleRate:o}=s,i=Bc(t),a=Fc(t),c=t.type||"error",u=`before send for type \`${c}\``;if(a&&typeof o=="number"&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",t),Kt(new me(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));let l=c==="replay_event"?"replay":c,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,p).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",l,t),new me("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return f;let g=tp(s,f,n);return ep(g,u)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",l,t),i){let _=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",_)}throw new me(`${u} returned \`null\`, will not send event.`,"log")}let h=r&&r.getSession();if(!i&&h&&this._updateSessionFromEvent(h,f),i){let y=f.sdkProcessingMetadata&&f.sdkProcessingMetadata.spanCountBeforeProcessing||0,_=f.spans?f.spans.length:0,S=y-_;S>0&&this.recordDroppedEvent("before_send","span",S)}let g=f.transaction_info;if(i&&g&&f.transaction!==t.transaction){let y="custom";f.transaction_info={...g,source:y}}return this.sendEvent(f,n),f}).then(null,f=>{throw f instanceof me?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${f}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{E&&m.error("Error while sending event:",n)});E&&m.error("Transport disabled")}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{let[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}};function ep(e,t){let n=`${t} must return \`null\` or a valid event.`;if(tt(e))return e.then(r=>{if(!ze(r)&&r!==null)throw new me(n);return r},r=>{throw new me(`${t} rejected with ${r}`)});if(!ze(e)&&e!==null)throw new me(n);return e}function tp(e,t,n){let{beforeSend:r,beforeSendTransaction:s}=e;if(Fc(t)&&r)return r(t,n);if(Bc(t)&&s){if(t.spans){let o=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:o}}return s(t,n)}return t}function Fc(e){return e.type===void 0}function Bc(e){return e.type==="transaction"}function hs(e){let t=x();!t||!t.addEventProcessor||t.addEventProcessor(e)}function fi(e,t){t.debug===!0&&(E?m.enable():Le(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),X().update(t.initialScope);let r=new e(t);pi(r),np(r)}function pi(e){let n=Y().getStackTop();n.client=e,n.scope.setClient(e)}function np(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}var rp=30;function Rn(e,t,n=Bo(e.bufferSize||rp)){let r={},s=i=>n.drain(i);function o(i){let a=[];if(ns(i,(d,p)=>{let f=rs(p);if(sr(r,f)){let h=Uc(d,p);e.recordDroppedEvent("ratelimit_backoff",f,h)}else a.push(d)}),a.length===0)return Ye();let c=he(i[0],a),u=d=>{ns(c,(p,f)=>{let h=Uc(p,f);e.recordDroppedEvent(d,rs(f),h)})},l=()=>t({body:zo(c,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&E&&m.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=or(r,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof me)return E&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),Ye();throw d})}return o.__sentry__baseTransport__=!0,{send:o,flush:s}}function Uc(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function mi(e,t){let n={sent_at:new Date().toISOString()};t&&(n.dsn=_e(t));let r=e.map(sp);return he(n,r)}function sp(e){return[{type:"span"},e]}function hi(e,t){let n=t&&ap(t)?t.getClient():t,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return ip(e,r)||op(e,s)}function op(e,t){return t?Hc(e)===Hc(t):!1}function ip(e,t){return t?e.includes(t.host):!1}function Hc(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ap(e){return e.getClient!==void 0}function tn(e,t,n=[t],r="npm"){let s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:Sn})),version:Sn}),e._metadata=s}var cp=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],up=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],$c="InboundFilters",lp=(e={})=>({name:$c,setupOnce(){},processEvent(t,n,r){let s=r.getOptions(),o=dp(e,s);return fp(t,o)?null:t}}),hr=lp,_s=ie($c,hr);function dp(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:cp],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:up],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function fp(e,t){return t.ignoreInternal&&yp(e)?(E&&m.warn(`Event dropped due to being internal Sentry Error. Event: ${qe(e)}`),!0):pp(e,t.ignoreErrors)?(E&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${qe(e)}`),!0):mp(e,t.ignoreTransactions)?(E&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${qe(e)}`),!0):hp(e,t.denyUrls)?(E&&m.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${qe(e)}. Url: ${gs(e)}`),!0):gp(e,t.allowUrls)?!1:(E&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${qe(e)}. Url: ${gs(e)}`),!0)}function pp(e,t){return e.type||!t||!t.length?!1:_p(e).some(n=>rt(n,t))}function mp(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?rt(n,t):!1}function hp(e,t){if(!t||!t.length)return!1;let n=gs(e);return n?rt(n,t):!1}function gp(e,t){if(!t||!t.length)return!0;let n=gs(e);return n?rt(n,t):!0}function _p(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),E&&t.length===0&&m.error(`Could not extract message for event ${qe(e)}`),t}function yp(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Sp(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function gs(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Sp(t):null}catch{return E&&m.error(`Cannot extract url for event ${qe(e)}`),null}}var jc,Wc="FunctionToString",Gc=new WeakMap,Ep=()=>({name:Wc,setupOnce(){jc=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=zt(this),n=Gc.has(x())&&t!==void 0?t:this;return jc.apply(n,e)}}catch{}},setup(e){Gc.set(e,!0)}}),gr=Ep,ys=ie(Wc,gr);var Tp="cause",Ip=5,zc="LinkedErrors",bp=(e={})=>{let t=e.limit||Ip,n=e.key||Tp;return{name:zc,setupOnce(){},preprocessEvent(r,s,o){let i=o.getOptions();Wn(Vo,i.stackParser,i.maxValueLength,n,t,r,s)}}},vp=bp,qc=ie(zc,vp);var gi={};Fa(gi,{FunctionToString:()=>ys,InboundFilters:()=>_s,LinkedErrors:()=>qc});var Yc=gi;var j=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var v=b;function Vc(){v.document?v.document.addEventListener("visibilitychange",()=>{let e=ke();if(v.document.hidden&&e){let t="cancelled",{op:n,status:r}=D(e);j&&m.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):j&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var at=(e,t,n)=>{let r,s;return o=>{t.value>=0&&(o||n)&&(s=t.value-(r||0),(s||r===void 0)&&(r=t.value,t.delta=s,e(t)))}};var Kc=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var qp=()=>{let e=v.performance.timing,t=v.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(let r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},Ot=()=>v.__WEB_VITALS_POLYFILL__?v.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||qp()):v.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var wn=()=>{let e=Ot();return e&&e.activationStart||0};var ct=(e,t)=>{let n=Ot(),r="navigate";return n&&(v.document&&v.document.prerendering||wn()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Kc(),navigationType:r}};var je=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(s=>{t(s.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}};var ut=(e,t)=>{let n=r=>{(r.type==="pagehide"||v.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};v.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))};var Jc=(e,t={})=>{let n=ct("CLS",0),r,s=0,o=[],i=c=>{c.forEach(u=>{if(!u.hadRecentInput){let l=o[0],d=o[o.length-1];s&&o.length!==0&&u.startTime-d.startTime<1e3&&u.startTime-l.startTime<5e3?(s+=u.value,o.push(u)):(s=u.value,o=[u]),s>n.value&&(n.value=s,n.entries=o,r&&r())}})},a=je("layout-shift",i);if(a){r=at(e,n,t.reportAllChanges);let c=()=>{i(a.takeRecords()),r(!0)};return ut(c),c}};var Ss=-1,Yp=()=>{v.document&&v.document.visibilityState&&(Ss=v.document.visibilityState==="hidden"&&!v.document.prerendering?0:1/0)},Vp=()=>{ut(({timeStamp:e})=>{Ss=e},!0)},kn=()=>(Ss<0&&(Yp(),Vp()),{get firstHiddenTime(){return Ss}});var Xc=e=>{let t=kn(),n=ct("FID"),r,s=a=>{a.startTime{a.forEach(s)},i=je("first-input",o);r=at(e,n),i&&ut(()=>{o(i.takeRecords()),i.disconnect()},!0)};var Qc=0,_i=1/0,Es=0,Kp=e=>{e.forEach(t=>{t.interactionId&&(_i=Math.min(_i,t.interactionId),Es=Math.max(Es,t.interactionId),Qc=Es?(Es-_i)/7+1:0)})},yi,Zc=()=>yi?Qc:performance.interactionCount||0,eu=()=>{"interactionCount"in performance||yi||(yi=je("event",Kp,{type:"event",buffered:!0,durationThreshold:0}))};var ru=()=>Zc(),tu=10,bt=[],Si={},nu=e=>{let t=bt[bt.length-1],n=Si[e.interactionId];if(n||bt.lengtht.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{let r={id:e.interactionId,latency:e.duration,entries:[e]};Si[r.id]=r,bt.push(r)}bt.sort((r,s)=>s.latency-r.latency),bt.splice(tu).forEach(r=>{delete Si[r.id]})}},Jp=()=>{let e=Math.min(bt.length-1,Math.floor(ru()/50));return bt[e]},su=(e,t)=>{t=t||{},eu();let n=ct("INP"),r,s=i=>{i.forEach(c=>{c.interactionId&&nu(c),c.entryType==="first-input"&&!bt.some(l=>l.entries.some(d=>c.duration===d.duration&&c.startTime===d.startTime))&&nu(c)});let a=Jp();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},o=je("event",s,{durationThreshold:t.durationThreshold||40});r=at(e,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),ut(()=>{s(o.takeRecords()),n.value<0&&ru()>0&&(n.value=0,n.entries=[]),r(!0)}))};var ou={},iu=e=>{let t=kn(),n=ct("LCP"),r,s=i=>{let a=i[i.length-1];if(a){let c=Math.max(a.startTime-wn(),0);c{ou[n.id]||(s(o.takeRecords()),o.disconnect(),ou[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{v.document&&addEventListener(a,i,{once:!0,capture:!0})}),ut(i,!0),i}};var Ei=e=>{v.document&&(v.document.prerendering?addEventListener("prerenderingchange",()=>Ei(e),!0):v.document.readyState!=="complete"?addEventListener("load",()=>Ei(e),!0):setTimeout(e,0))},au=(e,t)=>{t=t||{};let n=ct("TTFB"),r=at(e,n,t.reportAllChanges);Ei(()=>{let s=Ot();if(s){if(n.value=Math.max(s.responseStart-wn(),0),n.value<0||n.value>performance.now())return;n.entries=[s],r(!0)}})};var _r={},Ts={},cu,uu,lu,du,fu;function Ti(e,t=!1){return Sr("cls",e,Xp,cu,t)}function yr(e,t=!1){return Sr("lcp",e,Zp,lu,t)}function pu(e){return Sr("ttfb",e,em,du)}function Ii(e){return Sr("fid",e,Qp,uu)}function mu(e){return Sr("inp",e,tm,fu)}function Qe(e,t){return hu(e,t),Ts[e]||(nm(e),Ts[e]=!0),gu(e,t)}function Cn(e,t){let n=_r[e];if(!(!n||!n.length))for(let r of n)try{r(t)}catch(s){j&&m.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${be(r)} Error:`,s)}}function Xp(){return Jc(e=>{Cn("cls",{metric:e}),cu=e},{reportAllChanges:!0})}function Qp(){return Xc(e=>{Cn("fid",{metric:e}),uu=e})}function Zp(){return iu(e=>{Cn("lcp",{metric:e}),lu=e})}function em(){return au(e=>{Cn("ttfb",{metric:e}),du=e})}function tm(){return su(e=>{Cn("inp",{metric:e}),fu=e})}function Sr(e,t,n,r,s=!1){hu(e,t);let o;return Ts[e]||(o=n(),Ts[e]=!0),r&&t({metric:r}),gu(e,t,s?o:void 0)}function nm(e){let t={};e==="event"&&(t.durationThreshold=0),je(e,n=>{Cn(e,{entries:n})},t)}function hu(e,t){_r[e]=_r[e]||[],_r[e].push(t)}function gu(e,t,n){return()=>{n&&n();let r=_r[e];if(!r)return;let s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Is(e){return typeof e=="number"&&isFinite(e)}function nn(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}var rm=2147483647;function ae(e){return e/1e3}function vi(){return v&&v.addEventListener&&v.performance}var _u=0,Z={},lt,Er;function Su(){let e=vi();if(e&&le){e.mark&&v.performance.mark("sentry-tracing-init");let t=im(),n=sm(),r=om(),s=am();return()=>{t(),n(),r(),s()}}return()=>{}}function Eu(){Qe("longtask",({entries:e})=>{for(let t of e){let n=ke();if(!n)return;let r=ae(le+t.startTime),s=ae(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function Tu(){Qe("event",({entries:e})=>{for(let t of e){let n=ke();if(!n)return;if(t.name==="click"){let r=ae(le+t.startTime),s=ae(t.duration),o={description:Oe(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s},i=qn(t.target);i&&(o.attributes={"ui.component_name":i}),n.startChild(o)}}})}function Iu(e,t){if(vi()&&le){let r=cm(e,t);return()=>{r()}}return()=>{}}function sm(){return Ti(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(j&&m.log("[Measurements] Adding CLS"),Z.cls={value:e.value,unit:""},Er=t)},!0)}function om(){return yr(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(j&&m.log("[Measurements] Adding LCP"),Z.lcp={value:e.value,unit:"millisecond"},lt=t)},!0)}function im(){return Ii(({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=ae(le),r=ae(t.startTime);j&&m.log("[Measurements] Adding FID"),Z.fid={value:e.value,unit:"millisecond"},Z["mark.fid"]={value:n+r,unit:"second"}})}function am(){return pu(({metric:e})=>{e.entries[e.entries.length-1]&&(j&&m.log("[Measurements] Adding TTFB"),Z.ttfb={value:e.value,unit:"millisecond"})})}var yu={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function cm(e,t){return mu(({metric:n})=>{if(n.value===void 0)return;let r=n.entries.find(w=>w.duration===n.value&&yu[w.name]!==void 0),s=x();if(!r||!s)return;let o=yu[r.name],i=s.getOptions(),a=ae(le+r.startTime),c=ae(n.value),u=r.interactionId!==void 0?e[r.interactionId]:void 0;if(u===void 0)return;let{routeName:l,parentContext:d,activeTransaction:p,user:f,replayId:h}=u,g=f!==void 0?f.email||f.id||f.ip_address:void 0,y=p!==void 0?p.getProfileId():void 0,_=new Tt({startTimestamp:a,endTimestamp:a+c,op:`ui.interaction.${o}`,name:Oe(r.target),attributes:{release:i.release,environment:i.environment,transaction:l,...g!==void 0&&g!==""?{user:g}:{},...y!==void 0?{profile_id:y}:{},...h!==void 0?{replay_id:h}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),S=gm(d,i,t);if(S&&Math.random(){j&&m.error("Error while sending interaction:",H)});return}})}function bu(e){let t=vi();if(!t||!v.performance.getEntries||!le)return;j&&m.log("[Tracing] Adding & adjusting spans using Performance API");let n=ae(le),r=t.getEntries(),{op:s,start_timestamp:o}=D(e);if(r.slice(_u).forEach(i=>{let a=ae(i.startTime),c=ae(i.duration);if(!(e.op==="navigation"&&o&&n+a{if(!Z[a]||!o||n>=o)return;let c=Z[a].value,u=n+ae(c),l=Math.abs((u-o)*1e3),d=l-c;j&&m.log(`[Measurements] Normalized ${a} from ${c} to ${l} (${d})`),Z[a].value=l});let i=Z["mark.fid"];i&&Z.fid&&(nn(e,{description:"first input delay",endTimestamp:i.value+ae(Z.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:i.value}),delete Z["mark.fid"]),"fcp"in Z||delete Z.cls,Object.keys(Z).forEach(a=>{ms(a,Z[a].value,Z[a].unit)}),mm(e)}lt=void 0,Er=void 0,Z={}}function um(e,t,n,r,s){let o=s+n,i=o+r;return nn(e,{description:t.name,endTimestamp:i,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:o}),o}function lm(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{bs(e,t,r,n)}),bs(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),bs(e,t,"fetch",n,"cache","domainLookupStart"),bs(e,t,"domainLookup",n,"DNS"),dm(e,t,n)}function bs(e,t,n,r,s,o){let i=o?t[o]:t[`${n}End`],a=t[`${n}Start`];!a||!i||nn(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+ae(a),endTimestamp:r+ae(i)})}function dm(e,t,n){t.responseEnd&&(nn(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+ae(t.requestStart),endTimestamp:n+ae(t.responseEnd)}),nn(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+ae(t.responseStart),endTimestamp:n+ae(t.responseEnd)}))}function fm(e,t,n,r,s,o){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let i=Be(n),a={};bi(a,t,"transferSize","http.response_transfer_size"),bi(a,t,"encodedBodySize","http.response_content_length"),bi(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),i.protocol&&(a["url.scheme"]=i.protocol.split(":").pop()),i.host&&(a["server.address"]=i.host),a["url.same_origin"]=n.includes(v.location.origin);let c=o+r,u=c+s;nn(e,{description:n.replace(v.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}function pm(e){let t=v.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Is(n.rtt)&&(Z["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Is(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Is(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function mm(e){lt&&(j&&m.log("[Measurements] Adding LCP Data"),lt.element&&e.setTag("lcp.element",Oe(lt.element)),lt.id&&e.setTag("lcp.id",lt.id),lt.url&&e.setTag("lcp.url",lt.url.trim().slice(0,200)),e.setTag("lcp.size",lt.size)),Er&&Er.sources&&(j&&m.log("[Measurements] Adding CLS Data"),Er.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,Oe(t.node))))}function bi(e,t,n,r){let s=t[n];s!=null&&s0?g.join(","):void 0}}else return{"sentry-trace":d,baggage:p}}function ym(e){try{return new URL(e).href}catch{return}}function Sm(e,t){if(t.response){At(e,t.response.status);let n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){let r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus("internal_error");e.end()}var xi=["localhost",/^\/(?!\/)/],Tr={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:xi,tracePropagationTargets:xi};function Ri(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:o,enableHTTPTimings:i}={traceFetch:Tr.traceFetch,traceXHR:Tr.traceXHR,...e},a=typeof o=="function"?o:l=>!0,c=l=>bm(l,r||s),u={};t&&qt(l=>{let d=vu(l,a,c,u);if(d){let p=Ru(l.fetchData.url),f=p?Be(p).host:void 0;d.setAttributes({"http.url":p,"server.address":f})}i&&d&&xu(d)}),n&&Yt(l=>{let d=vm(l,a,c,u);i&&d&&xu(d)})}function Em(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function xu(e){let{url:t}=D(e).data||{};if(!t||typeof t!="string")return;let n=Qe("resource",({entries:r})=>{r.forEach(s=>{Em(s)&&s.name.endsWith(t)&&(Im(s).forEach(i=>e.setAttribute(...i)),setTimeout(n))})})}function Tm(e){let t="unknown",n="unknown",r="";for(let s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function dt(e=0){return((le||performance.timeOrigin)+e)/1e3}function Im(e){let{name:t,version:n}=Tm(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),le?[...r,["http.request.redirect_start",dt(e.redirectStart)],["http.request.fetch_start",dt(e.fetchStart)],["http.request.domain_lookup_start",dt(e.domainLookupStart)],["http.request.domain_lookup_end",dt(e.domainLookupEnd)],["http.request.connect_start",dt(e.connectStart)],["http.request.secure_connection_start",dt(e.secureConnectionStart)],["http.request.connection_end",dt(e.connectEnd)],["http.request.request_start",dt(e.requestStart)],["http.request.response_start",dt(e.responseStart)],["http.request.response_end",dt(e.responseEnd)]]:r}function bm(e,t){return rt(e,t||xi)}function vm(e,t,n,r){let s=e.xhr,o=s&&s[Fe];if(!$e()||!s||s.__sentry_own_request__||!o)return;let i=t(o.url);if(e.endTimestamp&&i){let f=s.__sentry_xhr_span_id__;if(!f)return;let h=r[f];h&&o.status_code!==void 0&&(At(h,o.status_code),h.end(),delete r[f]);return}let a=X(),c=ye(),u=Ru(o.url),l=u?Be(u).host:void 0,d=i?Tn({name:`${o.method} ${o.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":o.method,"http.url":u,url:o.url,"server.address":l,[Xe]:"auto.http.browser"},op:"http.client"}):void 0;d&&(s.__sentry_xhr_span_id__=d.spanContext().spanId,r[s.__sentry_xhr_span_id__]=d);let p=x();if(s.setRequestHeader&&n(o.url)&&p){let{traceId:f,spanId:h,sampled:g,dsc:y}={...c.getPropagationContext(),...a.getPropagationContext()},_=d?St(d):Jt(f,h,g),S=nr(y||(d?He(d):Ct(f,p,a)));xm(s,_,S)}return d}function xm(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(hn,n)}catch{}}function Ru(e){try{return new URL(e,v.location.origin).href}catch{return}}var Rm="BrowserTracing",wm={...xn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Tr},vs=(e={})=>{let t=j?!!(e.tracePropagationTargets||e.tracingOrigins):!1;ps(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);let n={...wm,...e},r=Su(),s={};n.enableInp&&Iu(s,n.interactionsSampleRate),n.enableLongTask&&Eu(),n._experiments.enableInteractions&&Tu();let o={name:void 0,context:void 0};function i(a){let c=Y(),{beforeStartSpan:u,idleTimeout:l,finalTimeout:d,heartbeatInterval:p}=n,f=a.op==="pageload",h;if(f){let S=f?wu("sentry-trace"):"",w=f?wu("baggage"):void 0,{traceId:C,dsc:H,parentSpanId:k,sampled:T}=jo(S,w);h={traceId:C,parentSpanId:k,parentSampled:T,...a,metadata:{...a.metadata,dynamicSamplingContext:H},trimEnd:!0}}else h={trimEnd:!0,...a};let g=u?u(h):h;g.metadata=g.name!==h.name?{...g.metadata,source:"custom"}:g.metadata,o.name=g.name,o.context=g,g.sampled===!1&&j&&m.log(`[Tracing] Will not send ${g.op} transaction because of beforeNavigate.`),j&&m.log(`[Tracing] Starting ${g.op} transaction on scope`);let{location:y}=v,_=fs(c,g,l,d,!0,{location:y},p,f);return f&&v.document&&(v.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(v.document.readyState)&&_.sendAutoFinishSignal()}),["interactive","complete"].includes(v.document.readyState)&&_.sendAutoFinishSignal()),_.registerBeforeFinishCallback(S=>{r(),bu(S)}),_}return{name:Rm,setupOnce:()=>{},afterAllSetup(a){let c=a.getOptions(),{markBackgroundSpan:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:p,enableHTTPTimings:f,_experiments:h}=n,g=c&&c.tracePropagationTargets,y=g||n.tracePropagationTargets;j&&t&&g&&m.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.");let _,S=v.location&&v.location.href;if(a.on&&(a.on("startNavigationSpan",w=>{_&&(j&&m.log(`[Tracing] Finishing current transaction with op: ${D(_).op}`),_.end()),_=i({op:"navigation",...w})}),a.on("startPageLoadSpan",w=>{_&&(j&&m.log(`[Tracing] Finishing current transaction with op: ${D(_).op}`),_.end()),_=i({op:"pageload",...w})})),n.instrumentPageLoad&&a.emit&&v.location){let w={name:v.location.pathname,startTimestamp:le?le/1e3:void 0,origin:"auto.pageload.browser",attributes:{[ge]:"url"}};Ir(a,w)}n.instrumentNavigation&&a.emit&&v.location&>(({to:w,from:C})=>{if(C===void 0&&S&&S.indexOf(w)!==-1){S=void 0;return}if(C!==w){S=void 0;let H={name:v.location.pathname,origin:"auto.navigation.browser",attributes:{[ge]:"url"}};br(a,H)}}),u&&Vc(),h.enableInteractions&&km(n,o),n.enableInp&&Am(s,o),Ri({traceFetch:l,traceXHR:d,tracePropagationTargets:y,shouldCreateSpanForRequest:p,enableHTTPTimings:f})},options:n}};function Ir(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);let n=Et();return(n&&D(n).op)==="pageload"?n:void 0}function br(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);let n=Et();return(n&&D(n).op)==="navigation"?n:void 0}function wu(e){let t=vo(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function km(e,t){let n,r=()=>{let{idleTimeout:s,finalTimeout:o,heartbeatInterval:i}=e,a="ui.action.click",c=ke();if(c&&c.op&&["navigation","pageload"].includes(c.op)){j&&m.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name){j&&m.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}let{location:u}=v,l={name:t.name,op:a,trimEnd:!0,data:{[ge]:t.context?Om(t.context):"url"}};n=fs(Y(),l,s,o,!0,{location:u},i)};["click"].forEach(s=>{v.document&&addEventListener(s,r,{once:!1,capture:!0})})}function Cm(e){return"duration"in e}var ku=10;function Am(e,t){let n=({entries:r})=>{let s=x(),o=s!==void 0&&s.getIntegrationByName!==void 0?s.getIntegrationByName("Replay"):void 0,i=o!==void 0?o.getReplayId():void 0,a=ke(),c=X(),u=c!==void 0?c.getUser():void 0;r.forEach(l=>{if(Cm(l)){let d=l.interactionId;if(d===void 0)return;let p=e[d],f=l.duration,h=l.startTime,g=Object.keys(e),y=g.length>0?g.reduce((_,S)=>e[_].duratione[S]).some(S=>S.duration===f&&S.startTime===h)||!d)return;if(p)p.duration=Math.max(p.duration,f);else if(g.lengthe[y].duration){let _=t.name,S=t.context;_&&S&&(y&&Object.keys(e).length>=ku&&delete e[y],e[d]={routeName:_,duration:f,parentContext:S,user:u,activeTransaction:a,replayId:i,startTime:h})}}})};Qe("event",n),Qe("first-input",n)}function Om(e){let t=e.attributes&&e.attributes[ge],n=e.data&&e.data[ge],r=e.metadata&&e.metadata.source;return t||n||r}var K=b,Ji="sentryReplaySession",Nm="replay_event",Xi="Unable to send Replay",Mm=3e5,Dm=9e5,Lm=5e3,Pm=5500,Fm=6e4,Bm=5e3,Um=3,Cu=15e4,xs=5e3,Hm=3e3,$m=300,Qi=2e7,jm=4999,Gm=15e3,Au=36e5;function Wm(e,t){return e??t()}function ks(e){let t,n=e[0],r=1;for(;rn.call(t,...i)),t=void 0)}return n}var ce;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(ce||(ce={}));function zm(e){return e.nodeType===e.ELEMENT_NODE}function xr(e){let t=ks([e,"optionalAccess",n=>n.host]);return Boolean(ks([t,"optionalAccess",n=>n.shadowRoot])===e)}function Rr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function qm(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Ym(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Cs(e){try{let t=e.rules||e.cssRules;return t?qm(Array.from(t,Xu).join("")):null}catch{return null}}function Xu(e){let t;if(Km(e))try{t=Cs(e.styleSheet)||Ym(e)}catch{}else if(Jm(e)&&e.selectorText.includes(":"))return Vm(e.cssText);return t||e.cssText}function Vm(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Km(e){return"styleSheet"in e}function Jm(e){return"selectorText"in e}var As=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;let n=ks([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return Wm(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Xm(){return new As}function Gs({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function kr({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Fn(e){return e.toLowerCase()}function Ai(e){return e.toUpperCase()}var Ou="__rrweb_original__";function Qm(e){let t=e.getContext("2d");if(!t)return!0;let n=50;for(let r=0;rc!==0))return!1}return!0}function Zi(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Fn(t):null}function Os(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}var Zm=1,eh=new RegExp("[^a-z0-9-_:]"),Cr=-2;function ea(){return Zm++}function th(e){if(e instanceof HTMLFormElement)return"form";let t=Fn(e.tagName);return eh.test(t)?"div":t}function nh(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var An,Nu,rh=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,sh=/^(?:[a-z+]+:)?\/\//i,oh=/^www\..*/i,ih=/^(data:)([^,]*),(.*)/i;function Ns(e,t){return(e||"").replace(rh,(n,r,s,o,i,a)=>{let c=s||i||a,u=r||o||"";if(!c)return n;if(sh.test(c)||oh.test(c))return`url(${u}${c}${u})`;if(ih.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${nh(t)+c}${u})`;let l=t.split("/"),d=c.split("/");l.pop();for(let p of d)p!=="."&&(p===".."?l.pop():l.push(p));return`url(${u}${l.join("/")}${u})`})}var ah=/^[^ \t\n\r\u000c]+/,ch=/^[, \t\n\r\u000c]+/;function uh(e,t){if(t.trim()==="")return t;let n=0;function r(o){let i,a=o.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}let s=[];for(;r(ch),!(n>=t.length);){let o=r(ah);if(o.slice(-1)===",")o=Nn(e,o.substring(0,o.length-1)),s.push(o);else{let i="";o=Nn(e,o);let a=!1;for(;;){let c=t.charAt(n);if(c===""){s.push((o+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((o+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return s.join(", ")}function Nn(e,t){if(!t||t.trim()==="")return t;let n=e.createElement("a");return n.href=t,n.href}function lh(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function ta(){let e=document.createElement("a");return e.href="",e.href}function Qu(e,t,n,r,s,o){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Nn(e,r):n==="srcset"?uh(e,r):n==="style"?Ns(r,ta()):t==="object"&&n==="data"?Nn(e,r):typeof o=="function"?o(n,r,s):r)}function Zu(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function dh(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){let o=e.classList[s];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function fh(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function rn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:rn(e.parentNode,t,n,r+1)}function Mn(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(fh(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Bn(e,t,n,r,s,o){try{let i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){let u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(o){if(c=rn(i,Mn(r,s)),c<0)return!0;a=rn(i,Mn(t,n),c>=0?c:1/0)}else{if(a=rn(i,Mn(t,n)),a<0)return!1;c=rn(i,Mn(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!o}catch{}return!!o}function ph(e,t,n){let r=e.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let a=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()});return}let i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function mh(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;let o=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(o),r=!0,t()})}function hh(e,t){let{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:g,maskInputFn:y,dataURLOptions:_={},inlineImages:S,recordCanvas:w,keepIframeSrcFn:C,newlyAddedElement:H=!1}=t,k=gh(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ce.Document,childNodes:[],compatMode:e.compatMode}:{type:ce.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ce.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return yh(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:h,maskInputFn:y,dataURLOptions:_,inlineImages:S,recordCanvas:w,keepIframeSrcFn:C,newlyAddedElement:H,rootId:k,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return _h(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:g,maskInputOptions:h,maskInputFn:y,rootId:k});case e.CDATA_SECTION_NODE:return{type:ce.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:ce.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function gh(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function _h(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName,p=e.textContent,f=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||ks([e,"access",_=>_.parentNode,"access",_=>_.sheet,"optionalAccess",_=>_.cssRules])&&(p=Cs(e.parentNode.sheet))}catch(_){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${_}`,e)}p=Ns(p,ta())}h&&(p="SCRIPT_PLACEHOLDER");let y=Bn(e,r,o,s,i,n);if(!f&&!h&&!g&&p&&y&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),g&&p&&(c.textarea||y)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),d==="OPTION"&&p){let _=Gs({type:null,tagName:d,maskInputOptions:c});p=kr({isMasked:Bn(e,r,o,s,i,_),element:e,value:p,maskInputFn:u})}return{type:ce.Text,textContent:p||"",isStyle:f,rootId:l}}function yh(e,t){let{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:g,maskAllText:y,maskTextClass:_,unmaskTextClass:S,maskTextSelector:w,unmaskTextSelector:C}=t,H=dh(e,r,s,o),k=th(e),T={},M=e.attributes.length;for(let I=0;IJ.href===e.href),A=null;I&&(A=Cs(I)),A&&(delete T.rel,delete T.href,T._cssText=Ns(A,I.href))}if(k==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let I=Cs(e.sheet);I&&(T._cssText=Ns(I,ta()))}if(k==="input"||k==="textarea"||k==="select"||k==="option"){let I=e,A=Zi(I),J=Os(I,Ai(k),A),re=I.checked;if(A!=="submit"&&A!=="button"&&J){let oe=Bn(I,_,w,S,C,Gs({type:A,tagName:Ai(k),maskInputOptions:a}));T.value=kr({isMasked:oe,element:I,value:J,maskInputFn:u})}re&&(T.checked=re)}if(k==="option"&&(e.selected&&!a.select?T.selected=!0:delete T.selected),k==="canvas"&&p){if(e.__context==="2d")Qm(e)||(T.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){let I=e.toDataURL(l.type,l.quality),A=document.createElement("canvas");A.width=e.width,A.height=e.height;let J=A.toDataURL(l.type,l.quality);I!==J&&(T.rr_dataURL=I)}}if(k==="img"&&d){An||(An=n.createElement("canvas"),Nu=An.getContext("2d"));let I=e,A=I.crossOrigin;I.crossOrigin="anonymous";let J=()=>{I.removeEventListener("load",J);try{An.width=I.naturalWidth,An.height=I.naturalHeight,Nu.drawImage(I,0,0),T.rr_dataURL=An.toDataURL(l.type,l.quality)}catch(re){console.warn(`Cannot inline img src=${I.currentSrc}! Error: ${re}`)}A?T.crossOrigin=A:I.removeAttribute("crossorigin")};I.complete&&I.naturalWidth!==0?J():I.addEventListener("load",J)}if((k==="audio"||k==="video")&&(T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop)),H){let{width:I,height:A}=e.getBoundingClientRect();T={class:T.class,rr_width:`${I}px`,rr_height:`${A}px`}}k==="iframe"&&!f(T.src)&&(e.contentDocument||(T.rr_src=T.src),delete T.src);let te;try{customElements.get(k)&&(te=!0)}catch{}return{type:ce.Element,tagName:k,attributes:T,childNodes:[],isSVG:lh(e)||void 0,needBlock:H,rootId:g,isCustom:te}}function V(e){return e==null?"":e.toLowerCase()}function Sh(e,t){if(t.comment&&e.type===ce.Comment)return!0;if(e.type===ce.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(V(e.attributes.name).match(/^msapplication-tile(image|color)$/)||V(e.attributes.name)==="application-name"||V(e.attributes.rel)==="icon"||V(e.attributes.rel)==="apple-touch-icon"||V(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&V(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(V(e.attributes.property).match(/^(og|twitter|fb):/)||V(e.attributes.name).match(/^(og|twitter):/)||V(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(V(e.attributes.name)==="robots"||V(e.attributes.name)==="googlebot"||V(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(V(e.attributes.name)==="author"||V(e.attributes.name)==="generator"||V(e.attributes.name)==="framework"||V(e.attributes.name)==="publisher"||V(e.attributes.name)==="progid"||V(e.attributes.property).match(/^article:/)||V(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(V(e.attributes.name)==="google-site-verification"||V(e.attributes.name)==="yandex-verification"||V(e.attributes.name)==="csrf-token"||V(e.attributes.name)==="p:domain_verify"||V(e.attributes.name)==="verify-v1"||V(e.attributes.name)==="verification"||V(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Dn(e,t){let{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOMOptions:S,dataURLOptions:w={},inlineImages:C=!1,recordCanvas:H=!1,onSerialize:k,onIframeLoad:T,iframeLoadTimeout:M=5e3,onStylesheetLoad:te,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:J=!1}=t,{preserveWhiteSpace:re=!0}=t,oe=hh(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,dataURLOptions:w,inlineImages:C,recordCanvas:H,keepIframeSrcFn:A,newlyAddedElement:J});if(!oe)return console.warn(e,"not serialized"),null;let Ce;r.hasNode(e)?Ce=r.getId(e):Sh(oe,S)||!re&&oe.type===ce.Text&&!oe.isStyle&&!oe.textContent.replace(/^\s+|\s+$/gm,"").length?Ce=Cr:Ce=ea();let G=Object.assign(oe,{id:Ce});if(r.add(e,G),Ce===Cr)return null;k&&k(e);let Me=!p;if(G.type===ce.Element){Me=Me&&!G.needBlock,delete G.needBlock;let ne=e.shadowRoot;ne&&Rr(ne)&&(G.isShadowHost=!0)}if((G.type===ce.Document||G.type===ce.Element)&&Me){S.headWhitespace&&G.type===ce.Element&&G.tagName==="head"&&(re=!1);let ne={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOMOptions:S,dataURLOptions:w,inlineImages:C,recordCanvas:H,preserveWhiteSpace:re,onSerialize:k,onIframeLoad:T,iframeLoadTimeout:M,onStylesheetLoad:te,stylesheetLoadTimeout:I,keepIframeSrcFn:A};for(let Ie of Array.from(e.childNodes)){let Ge=Dn(Ie,ne);Ge&&G.childNodes.push(Ge)}if(zm(e)&&e.shadowRoot)for(let Ie of Array.from(e.shadowRoot.childNodes)){let Ge=Dn(Ie,ne);Ge&&(Rr(e.shadowRoot)&&(Ge.isShadow=!0),G.childNodes.push(Ge))}}return e.parentNode&&xr(e.parentNode)&&Rr(e.parentNode)&&(G.isShadow=!0),G.type===ce.Element&&G.tagName==="iframe"&&ph(e,()=>{let ne=e.contentDocument;if(ne&&T){let Ie=Dn(ne,{doc:ne,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOMOptions:S,dataURLOptions:w,inlineImages:C,recordCanvas:H,preserveWhiteSpace:re,onSerialize:k,onIframeLoad:T,iframeLoadTimeout:M,onStylesheetLoad:te,stylesheetLoadTimeout:I,keepIframeSrcFn:A});Ie&&T(e,Ie)}},M),G.type===ce.Element&&G.tagName==="link"&&G.attributes.rel==="stylesheet"&&mh(e,()=>{if(te){let ne=Dn(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOMOptions:S,dataURLOptions:w,inlineImages:C,recordCanvas:H,preserveWhiteSpace:re,onSerialize:k,onIframeLoad:T,iframeLoadTimeout:M,onStylesheetLoad:te,stylesheetLoadTimeout:I,keepIframeSrcFn:A});ne&&te(e,ne)}},I),G}function Eh(e,t){let{mirror:n=new As,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOM:S=!1,dataURLOptions:w,preserveWhiteSpace:C,onSerialize:H,onIframeLoad:k,iframeLoadTimeout:T,onStylesheetLoad:M,stylesheetLoadTimeout:te,keepIframeSrcFn:I=()=>!1}=t||{};return Dn(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:h===!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}:h===!1?{}:h,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:w,inlineImages:p,recordCanvas:f,preserveWhiteSpace:C,onSerialize:H,onIframeLoad:k,iframeLoadTimeout:T,onStylesheetLoad:M,stylesheetLoadTimeout:te,keepIframeSrcFn:I,newlyAddedElement:!1})}function Nt(e){let t,n=e[0],r=1;for(;rn.call(t,...i)),t=void 0)}return n}function Te(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var On=`Please stop import mirror directly. Instead of that,\r now you can use replayer.getMirror() to access the mirror instance of a replayer,\r or you can use record.mirror to access the mirror instance during recording.`,Mu={map:{},getId(){return console.error(On),-1},getNode(){return console.error(On),null},removeNodeFromMap(){console.error(On)},has(){return console.error(On),!1},reset(){console.error(On)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Mu=new Proxy(Mu,{get(e,t,n){return t==="map"&&console.error(On),Reflect.get(e,t,n)}}));function Ar(e,t,n={}){let r=null,s=0;return function(...o){let i=Date.now();!s&&n.leading===!1&&(s=i);let a=t-(i-s),c=this;a<=0||a>t?(r&&(Rh(r),r=null),s=i,e.apply(c,o)):!r&&n.trailing!==!1&&(r=Ws(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,o)},a))}}function el(e,t,n,r,s=window){let o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(i){Ws(()=>{n.set.call(this,i)},0),o&&o.set&&o.set.call(this,i)}}),()=>el(e,t,o||{},!0)}function na(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}var Ms=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ms=()=>new Date().getTime());function tl(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:Nt([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Nt([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Nt([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:Nt([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Nt([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Nt([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function nl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function rl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function sl(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function et(e,t,n,r,s){if(!e)return!1;let o=sl(e);if(!o)return!1;let i=Mn(t,n);if(!s){let u=r&&o.matches(r);return i(o)&&!u}let a=rn(o,i),c=-1;return a<0?!1:(r&&(c=rn(o,Mn(null,r))),a>-1&&c<0?!0:a{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function il(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function al(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Ni(e){return Boolean(Nt([e,"optionalAccess",t=>t.shadowRoot]))}var Mi=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Ko(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function cl(e){let t=null;return Nt([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function bh(e){let t=e,n;for(;n=cl(t);)t=n;return t}function vh(e){let t=e.ownerDocument;if(!t)return!1;let n=bh(e);return t.contains(n)}function ul(e){let t=e.ownerDocument;return t?t.contains(e)||vh(e):!1}var Du={};function ra(e){let t=Du[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);let o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return Du[e]=r.bind(window)}function xh(...e){return ra("requestAnimationFrame")(...e)}function Ws(...e){return ra("setTimeout")(...e)}function Rh(...e){return ra("clearTimeout")(...e)}var O=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(O||{}),N=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(N||{}),Se=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Se||{}),vt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(vt||{});function wh(e){let t,n=e[0],r=1;for(;rn.call(t,...i)),t=void 0)}return n}function Lu(e){return"__ln"in e}var Di=class{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;rs.next])||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Lu(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Lu(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},Pu=(e,t)=>`${e}@${t}`,Li=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],n=new Set,r=new Di,s=c=>{let u=c,l=Cr;for(;l===Cr;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},o=c=>{if(!c.parentNode||!ul(c))return;let u=xr(c.parentNode)?this.mirror.getId(cl(c)):this.mirror.getId(c.parentNode),l=s(c);if(u===-1||l===-1)return r.addNode(c);let d=Dn(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{il(p,this.mirror)&&this.iframeManager.addIframe(p),al(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Ni(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{this.iframeManager.attachIframe(p,f),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)}});d&&(t.push({parentId:u,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)Fu(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||o(c);for(let c of this.addedSet)!Bu(this.droppedSet,c)&&!Fu(this.removes,c,this.mirror)||Bu(this.movedSet,c)?o(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){let u=this.mirror.getId(i.value.parentNode),l=s(i.value);u!==-1&&l!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){let l=u;if(u=u.previous,l){let d=this.mirror.getId(l.value.parentNode);if(s(l.value)===-1)continue;if(d!==-1){c=l;break}else{let f=l.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=f.parentNode.host;if(this.mirror.getId(h)!==-1){c=l;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),o(c.value)}let a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:u}=c;if(typeof u.style=="string"){let l=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);l.length!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!wi(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!et(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Bn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,sl(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){let i=Zi(n),a=n.tagName;s=Os(n,a,i);let c=Gs({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=Bn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=kr({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(et(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Zu(n.tagName,r)&&(o.attributes[r]=Qu(this.doc,Fn(n.tagName),Fn(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let i=this.unattachedDoc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==i.style.getPropertyValue(a)||u!==i.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,u]:o._unchangedStyles[a]=[c,u]}for(let a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(et(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),s=xr(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);et(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||wi(n,this.mirror)||!Th(n,this.mirror)||(this.addedSet.has(n)?(Pi(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||ol(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Pu(r,s)]?Pi(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:xr(t.target)&&Rr(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(wi(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Pu(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);et(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),Ni(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Pi(e,t){e.delete(t),t.childNodes.forEach(n=>Pi(e,n))}function Fu(e,t,n){return e.length===0?!1:ll(e,t,n)}function ll(e,t,n){let{parentNode:r}=t;if(!r)return!1;let s=n.getId(r);return e.some(o=>o.id===s)?!0:ll(e,r,n)}function Bu(e,t){return e.size===0?!1:dl(e,t)}function dl(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:dl(e,n):!1}var wr;function kh(e){wr=e}function Ch(){wr=void 0}var L=e=>wr?(...n)=>{try{return e(...n)}catch(r){if(wr&&wr(r)===!0)return()=>{};throw r}}:e;function ft(e){let t,n=e[0],r=1;for(;rn.call(t,...i)),t=void 0)}return n}var Ln=[];function Dr(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function fl(e,t){let n=new Li;Ln.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,s=ft([window,"optionalAccess",i=>i.Zone,"optionalAccess",i=>i.__symbol__,"optionalCall",i=>i("MutationObserver")]);s&&window[s]&&(r=window[s]);let o=new r(L(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ah({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let s=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,i=[],a,c=Ar(L(d=>{let p=Date.now()-a;e(i.map(f=>(f.timeOffset-=p,f)),d),i=[],a=null}),o),u=L(Ar(L(d=>{let p=Dr(d),{clientX:f,clientY:h}=Oi(d)?d.changedTouches[0]:d;a||(a=Ms()),i.push({x:f,y:h,id:r.getId(p),timeOffset:Ms()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?N.Drag:d instanceof MouseEvent?N.MouseMove:N.TouchMove)}),s,{trailing:!1})),l=[Te("mousemove",u,n),Te("touchmove",u,n),Te("drag",u,n)];return L(()=>{l.forEach(d=>d())})}function Oh({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};let a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[],u=null,l=d=>p=>{let f=Dr(p);if(et(f,r,s,o,!0))return;let h=null,g=d;if("pointerType"in p){switch(p.pointerType){case"mouse":h=vt.Mouse;break;case"touch":h=vt.Touch;break;case"pen":h=vt.Pen;break}h===vt.Touch?Se[d]===Se.MouseDown?g="TouchStart":Se[d]===Se.MouseUp&&(g="TouchEnd"):vt.Pen}else Oi(p)&&(h=vt.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===vt.Touch||g.startsWith("Mouse")&&h===vt.Mouse)&&(h=null)):Se[d]===Se.Click&&(h=u,u=null);let y=Oi(p)?p.changedTouches[0]:p;if(!y)return;let _=n.getId(f),{clientX:S,clientY:w}=y;L(e)({type:Se[g],id:_,x:S,y:w,...h!==null&&{pointerType:h}})};return Object.keys(Se).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let p=Fn(d),f=l(d);if(window.PointerEvent)switch(Se[d]){case Se.MouseDown:case Se.MouseUp:p=p.replace("mouse","pointer");break;case Se.TouchStart:case Se.TouchEnd:return}c.push(Te(p,f,t))}),L(()=>{c.forEach(d=>d())})}function pl({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){let a=L(Ar(L(c=>{let u=Dr(c);if(!u||et(u,r,s,o,!0))return;let l=n.getId(u);if(u===t&&t.defaultView){let d=tl(t.defaultView);e({id:l,x:d.left,y:d.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Te("scroll",a,t)}function Nh({viewportResizeCb:e},{win:t}){let n=-1,r=-1,s=L(Ar(L(()=>{let o=nl(),i=rl();(n!==o||r!==i)&&(e({width:Number(i),height:Number(o)}),n=o,r=i)}),200));return Te("resize",s,t)}var Mh=["INPUT","TEXTAREA","SELECT"],Uu=new WeakMap;function Dh({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:g}){function y(T){let M=Dr(T),te=T.isTrusted,I=M&&Ai(M.tagName);if(I==="OPTION"&&(M=M.parentElement),!M||!I||Mh.indexOf(I)<0||et(M,r,s,o,!0))return;let A=M;if(A.classList.contains(i)||a&&A.matches(a))return;let J=Zi(M),re=Os(A,I,J),oe=!1,Ce=Gs({maskInputOptions:c,tagName:I,type:J}),G=Bn(M,p,h,f,g,Ce);(J==="radio"||J==="checkbox")&&(oe=M.checked),re=kr({isMasked:G,element:M,value:re,maskInputFn:u}),_(M,d?{text:re,isChecked:oe,userTriggered:te}:{text:re,isChecked:oe});let Me=M.name;J==="radio"&&Me&&oe&&t.querySelectorAll(`input[type="radio"][name="${Me}"]`).forEach(ne=>{if(ne!==M){let Ie=kr({isMasked:G,element:ne,value:Os(ne,I,J),maskInputFn:u});_(ne,d?{text:Ie,isChecked:!oe,userTriggered:!1}:{text:Ie,isChecked:!oe})}})}function _(T,M){let te=Uu.get(T);if(!te||te.text!==M.text||te.isChecked!==M.isChecked){Uu.set(T,M);let I=n.getId(T);L(e)({...M,id:I})}}let w=(l.input==="last"?["change"]:["input","change"]).map(T=>Te(T,L(y),t)),C=t.defaultView;if(!C)return()=>{w.forEach(T=>T())};let H=C.Object.getOwnPropertyDescriptor(C.HTMLInputElement.prototype,"value"),k=[[C.HTMLInputElement.prototype,"value"],[C.HTMLInputElement.prototype,"checked"],[C.HTMLSelectElement.prototype,"value"],[C.HTMLTextAreaElement.prototype,"value"],[C.HTMLSelectElement.prototype,"selectedIndex"],[C.HTMLOptionElement.prototype,"selected"]];return H&&H.set&&w.push(...k.map(T=>el(T[0],T[1],{set(){L(y)({target:this,isTrusted:!1})}},!1,C))),L(()=>{w.forEach(T=>T())})}function Ds(e){let t=[];function n(r,s){if(Rs("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Rs("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Rs("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Rs("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let i=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(i)}else if(r.parentStyleSheet){let i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(i)}return s}return n(e,t)}function Mt(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Lh({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:L((l,d,p)=>{let[f,h]=p,{id:g,styleId:y}=Mt(d,t,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&e({id:g,styleId:y,adds:[{rule:f,index:h}]}),l.apply(d,p)})});let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:L((l,d,p)=>{let[f]=p,{id:h,styleId:g}=Mt(d,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,removes:[{index:f}]}),l.apply(d,p)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:L((l,d,p)=>{let[f]=p,{id:h,styleId:g}=Mt(d,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replace:f}),l.apply(d,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:L((l,d,p)=>{let[f]=p,{id:h,styleId:g}=Mt(d,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replaceSync:f}),l.apply(d,p)})}));let c={};ws("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(ws("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),ws("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),ws("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(c).forEach(([l,d])=>{u[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[l].insertRule,{apply:L((p,f,h)=>{let[g,y]=h,{id:_,styleId:S}=Mt(f.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||S&&S!==-1)&&e({id:_,styleId:S,adds:[{rule:g,index:[...Ds(f),y||0]}]}),p.apply(f,h)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:L((p,f,h)=>{let[g]=h,{id:y,styleId:_}=Mt(f.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||_&&_!==-1)&&e({id:y,styleId:_,removes:[{index:[...Ds(f),g]}]}),p.apply(f,h)})})}),L(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([l,d])=>{d.prototype.insertRule=u[l].insertRule,d.prototype.deleteRule=u[l].deleteRule})})}function ml({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);let s=n.nodeName==="#document"?ft([n,"access",i=>i.defaultView,"optionalAccess",i=>i.Document]):ft([n,"access",i=>i.ownerDocument,"optionalAccess",i=>i.defaultView,"optionalAccess",i=>i.ShadowRoot]),o=ft([s,"optionalAccess",i=>i.prototype])?Object.getOwnPropertyDescriptor(ft([s,"optionalAccess",i=>i.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return ft([o,"access",i=>i.get,"optionalAccess",i=>i.call,"call",i=>i(this)])},set(i){let a=ft([o,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,i)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),L(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Ph({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){let o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:L((a,c,u)=>{let[l,d,p]=u;if(n.has(l))return o.apply(c,[l,d,p]);let{id:f,styleId:h}=Mt(ft([c,"access",g=>g.parentRule,"optionalAccess",g=>g.parentStyleSheet]),t,r.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:l,value:d,priority:p},index:Ds(c.parentRule)}),a.apply(c,u)})});let i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:L((a,c,u)=>{let[l]=u;if(n.has(l))return i.apply(c,[l]);let{id:d,styleId:p}=Mt(ft([c,"access",f=>f.parentRule,"optionalAccess",f=>f.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&e({id:d,styleId:p,remove:{property:l},index:Ds(c.parentRule)}),a.apply(c,u)})}),L(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i})}function Fh({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){let a=L(u=>Ar(L(l=>{let d=Dr(l);if(!d||et(d,t,n,r,!0))return;let{currentTime:p,volume:f,muted:h,playbackRate:g}=d;e({type:u,id:s.getId(d),currentTime:p,volume:f,muted:h,playbackRate:g})}),o.media||500)),c=[Te("play",a(0),i),Te("pause",a(1),i),Te("seeked",a(2),i),Te("volumechange",a(3),i),Te("ratechange",a(4),i)];return L(()=>{c.forEach(u=>u())})}function Bh({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,u,l){let d=new o(c,u,l);return s.set(d,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};let i=na(t.fonts,"add",function(a){return function(c){return Ws(L(()=>{let u=s.get(c);u&&(e(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(i),L(()=>{r.forEach(a=>a())})}function Uh(e){let{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e,a=!0,c=L(()=>{let u=t.getSelection();if(!u||a&&ft([u,"optionalAccess",p=>p.isCollapsed]))return;a=u.isCollapsed||!1;let l=[],d=u.rangeCount||0;for(let p=0;p{}:na(n.customElements,"define",function(s){return function(o,i,a){try{t({define:{name:o}})}catch{}return s.apply(this,[o,i,a])}})}function $h(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r=fl(e,e.doc),s=Ah(e),o=Oh(e),i=pl(e),a=Nh(e,{win:n}),c=Dh(e),u=Fh(e),l=Lh(e,{win:n}),d=ml(e,e.doc),p=Ph(e,{win:n}),f=e.collectFonts?Bh(e):()=>{},h=Uh(e),g=Hh(e),y=[];for(let _ of e.plugins)y.push(_.observer(_.callback,n,_.options));return L(()=>{Ln.forEach(_=>_.reset()),r.disconnect(),s(),o(),i(),a(),c(),u(),l(),d(),p(),f(),h(),g(),y.forEach(_=>_())})}function Rs(e){return typeof window[e]<"u"}function ws(e){return Boolean(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Or=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){let o=r||this.getIdToRemoteIdMap(t),i=s||this.getRemoteIdToIdMap(t),a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),i.set(a,n)),a}getIds(t,n){let r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,s))}getRemoteId(t,n,r){let s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let o=s.get(n);return o||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};function Hu(e){let t,n=e[0],r=1;for(;rn.call(t,...i)),t=void 0)}return n}var Fi=class{constructor(){this.crossOriginIframeMirror=new Or(ea),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Bi=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Or(ea),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Or(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Hu([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;let s=this.crossOriginIframeMap.get(t.source);if(!s)return;let o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case O.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);let r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:O.IncrementalSnapshot,data:{source:N.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case O.Meta:case O.Load:case O.DomContentLoaded:return!1;case O.Plugin:return n;case O.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case O.IncrementalSnapshot:switch(n.data.source){case N.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case N.Drag:case N.TouchMove:case N.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case N.ViewportResize:return!1;case N.MediaInteraction:case N.MouseInteraction:case N.Scroll:case N.CanvasMutation:case N.Input:return this.replaceIds(n.data,t,["id"]),n;case N.StyleSheetRule:case N.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case N.Font:return n;case N.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case N.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),Hu([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(let o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==ce.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},Ui=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Hi=class{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Rr(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let r=fl({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(pl({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Ws(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(ml({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){let r=this;this.restoreHandlers.push(na(t.prototype,"attachShadow",function(s){return function(o){let i=s.call(this,o);return this.shadowRoot&&ul(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Ls=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}},$i=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Mi,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},s=[];for(let o of t){let i;this.styleMirror.has(o)?i=this.styleMirror.getId(o):(i=this.styleMirror.add(o),s.push({styleId:i,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:Xu(a),index:c}))})),r.styleIds.push(i)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},ji=class{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){xh(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){let r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}},ee,Ps,Ze=Xm();function Lt(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:_,maskAttributeFn:S,maskInputFn:w,maskTextFn:C,maxCanvasSize:H=null,packFn:k,sampling:T={},dataURLOptions:M={},mousemoveWait:te,recordCanvas:I=!1,recordCrossOriginIframes:A=!1,recordAfter:J=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:re=!1,collectFonts:oe=!1,inlineImages:Ce=!1,plugins:G,keepIframeSrcFn:Me=()=>!1,ignoreCSSAttributes:ne=new Set([]),errorHandler:Ie,onMutation:Ge,getCanvasManager:lo}=e;kh(Ie);let on=A?window.parent===window:!0,Rt=!1;if(!on)try{window.parent.document&&(Rt=!1)}catch{Rt=!0}if(on&&!t)throw new Error("emit function is required");te!==void 0&&T.mousemove===void 0&&(T.mousemove=te),Ze.reset();let an=g===!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}:y!==void 0?y:{},$n=_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_==="all",headMetaDescKeywords:_==="all"}:_||{};Ih();let fo,po=0,Da=B=>{for(let We of G||[])We.eventProcessor&&(B=We.eventProcessor(B));return k&&!Rt&&(B=k(B)),B};ee=(B,We)=>{let P=B;if(P.timestamp=Ms(),yt([Ln,"access",Q=>Q[0],"optionalAccess",Q=>Q.isFrozen,"call",Q=>Q()])&&P.type!==O.FullSnapshot&&!(P.type===O.IncrementalSnapshot&&P.data.source===N.Mutation)&&Ln.forEach(Q=>Q.unfreeze()),on)yt([t,"optionalCall",Q=>Q(Da(P),We)]);else if(Rt){let Q={type:"rrweb",event:Da(P),origin:window.location.origin,isCheckout:We};window.parent.postMessage(Q,"*")}if(P.type===O.FullSnapshot)fo=P,po=0;else if(P.type===O.IncrementalSnapshot){if(P.data.source===N.Mutation&&P.data.isAttachIframe)return;po++;let Q=r&&po>=r,U=n&&fo&&P.timestamp-fo.timestamp>n;(Q||U)&&ho(!0)}};let Br=B=>{ee({type:O.IncrementalSnapshot,data:{source:N.Mutation,...B}})},La=B=>ee({type:O.IncrementalSnapshot,data:{source:N.Scroll,...B}}),Fd=B=>ee({type:O.IncrementalSnapshot,data:{source:N.CanvasMutation,...B}}),Bd=B=>ee({type:O.IncrementalSnapshot,data:{source:N.AdoptedStyleSheet,...B}}),Bt=new $i({mutationCb:Br,adoptedStyleSheetCb:Bd}),Ut=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Fi:new Bi({mirror:Ze,mutationCb:Br,stylesheetManager:Bt,recordCrossOriginIframes:A,wrappedEmit:ee});for(let B of G||[])B.getMirror&&B.getMirror({nodeMirror:Ze,crossOriginIframeMirror:Ut.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ut.crossOriginIframeStyleMirror});let mo=new ji,Pa=Gh(lo,{mirror:Ze,win:window,mutationCb:B=>ee({type:O.IncrementalSnapshot,data:{source:N.CanvasMutation,...B}}),recordCanvas:I,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:H,sampling:T.canvas,dataURLOptions:M,errorHandler:Ie}),Ur=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Ui:new Hi({mutationCb:Br,scrollCb:La,bypassOptions:{onMutation:Ge,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:an,dataURLOptions:M,maskAttributeFn:S,maskTextFn:C,maskInputFn:w,recordCanvas:I,inlineImages:Ce,sampling:T,slimDOMOptions:$n,iframeManager:Ut,stylesheetManager:Bt,canvasManager:Pa,keepIframeSrcFn:Me,processedNodeManager:mo},mirror:Ze}),ho=(B=!1)=>{ee({type:O.Meta,data:{href:window.location.href,width:rl(),height:nl()}},B),Bt.reset(),Ur.init(),Ln.forEach(P=>P.lock());let We=Eh(document,{mirror:Ze,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:an,maskAttributeFn:S,maskInputFn:w,maskTextFn:C,slimDOM:$n,dataURLOptions:M,recordCanvas:I,inlineImages:Ce,onSerialize:P=>{il(P,Ze)&&Ut.addIframe(P),al(P,Ze)&&Bt.trackLinkElement(P),Ni(P)&&Ur.addShadowRoot(P.shadowRoot,document)},onIframeLoad:(P,Q)=>{Ut.attachIframe(P,Q),Ur.observeAttachShadow(P)},onStylesheetLoad:(P,Q)=>{Bt.attachLinkElement(P,Q)},keepIframeSrcFn:Me});if(!We)return console.warn("Failed to snapshot the document");ee({type:O.FullSnapshot,data:{node:We,initialOffset:tl(window)}}),Ln.forEach(P=>P.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Bt.adoptStyleSheets(document.adoptedStyleSheets,Ze.getId(document))};Ps=ho;try{let B=[],We=Q=>L($h)({onMutation:Ge,mutationCb:Br,mousemoveCb:(U,Ht)=>ee({type:O.IncrementalSnapshot,data:{source:Ht,positions:U}}),mouseInteractionCb:U=>ee({type:O.IncrementalSnapshot,data:{source:N.MouseInteraction,...U}}),scrollCb:La,viewportResizeCb:U=>ee({type:O.IncrementalSnapshot,data:{source:N.ViewportResize,...U}}),inputCb:U=>ee({type:O.IncrementalSnapshot,data:{source:N.Input,...U}}),mediaInteractionCb:U=>ee({type:O.IncrementalSnapshot,data:{source:N.MediaInteraction,...U}}),styleSheetRuleCb:U=>ee({type:O.IncrementalSnapshot,data:{source:N.StyleSheetRule,...U}}),styleDeclarationCb:U=>ee({type:O.IncrementalSnapshot,data:{source:N.StyleDeclaration,...U}}),canvasMutationCb:Fd,fontCb:U=>ee({type:O.IncrementalSnapshot,data:{source:N.Font,...U}}),selectionCb:U=>{ee({type:O.IncrementalSnapshot,data:{source:N.Selection,...U}})},customElementCb:U=>{ee({type:O.IncrementalSnapshot,data:{source:N.CustomElement,...U}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:an,inlineStylesheet:h,sampling:T,recordCanvas:I,inlineImages:Ce,userTriggeredOnInput:re,collectFonts:oe,doc:Q,maskAttributeFn:S,maskInputFn:w,maskTextFn:C,keepIframeSrcFn:Me,blockSelector:o,unblockSelector:i,slimDOMOptions:$n,dataURLOptions:M,mirror:Ze,iframeManager:Ut,stylesheetManager:Bt,shadowDomManager:Ur,processedNodeManager:mo,canvasManager:Pa,ignoreCSSAttributes:ne,plugins:yt([G,"optionalAccess",U=>U.filter,"call",U=>U(Ht=>Ht.observer),"optionalAccess",U=>U.map,"call",U=>U(Ht=>({observer:Ht.observer,options:Ht.options,callback:Ud=>ee({type:O.Plugin,data:{plugin:Ht.name,payload:Ud}})}))])||[]},{});Ut.addLoadListener(Q=>{try{B.push(We(Q.contentDocument))}catch(U){console.warn(U)}});let P=()=>{ho(),B.push(We(document))};return document.readyState==="interactive"||document.readyState==="complete"?P():(B.push(Te("DOMContentLoaded",()=>{ee({type:O.DomContentLoaded,data:{}}),J==="DOMContentLoaded"&&P()})),B.push(Te("load",()=>{ee({type:O.Load,data:{}}),J==="load"&&P()},window))),()=>{B.forEach(Q=>Q()),mo.destroy(),Ps=void 0,Ch()}}catch(B){console.warn(B)}}function jh(e){if(!Ps)throw new Error("please take full snapshot after start recording");Ps(e)}Lt.mirror=Ze;Lt.takeFullSnapshot=jh;function Gh(e,t){try{return e?e(t):new Ls}catch{return console.warn("Unable to initialize CanvasManager"),new Ls}}var Wh=3,zh=5;function sa(e){return e>9999999999?e:e*1e3}function ki(e){return e>9999999999?e/1e3:e}function Lr(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:O.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Re(t,10,1e3)}}),t.category==="console")))}var qh="button,a";function hl(e){return e.closest(qh)||e}function gl(e){let t=_l(e);return!t||!(t instanceof Element)?t:hl(t)}function _l(e){return Yh(e)?e.target:e}function Yh(e){return typeof e=="object"&&!!e&&"target"in e}var Dt;function Vh(e){return Dt||(Dt=[],Kh()),Dt.push(e),()=>{let t=Dt?Dt.indexOf(e):-1;t>-1&&Dt.splice(t,1)}}function Kh(){q(K,"open",function(e){return function(...t){if(Dt)try{Dt.forEach(n=>n())}catch{}return e.apply(K,t)}})}function Jh(e,t,n){e.handleClick(t,n)}var Gi=class{constructor(t,n,r=Lr){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){let t=Vh(()=>{this._lastMutation=$u()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(Qh(n,this._ignoreSelector)||!Zh(t))return;let r={timestamp:ki(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=ki(t)}registerScroll(t=Date.now()){this._lastScroll=ki(t)}registerClick(t){let n=hl(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){let t=[],n=$u();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(let r of t){let s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!s,{clickCount:i,clickBreadcrumb:a}=t;if(o){let c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c1){let c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:K.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}},Xh=["A","BUTTON","INPUT"];function Qh(e,t){return!!(!Xh.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function Zh(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function $u(){return Date.now()/1e3}function eg(e,t){try{if(!tg(t))return;let{source:n}=t.data;if(n===N.Mutation&&e.registerMutation(t.timestamp),n===N.Scroll&&e.registerScroll(t.timestamp),ng(t)){let{type:r,id:s}=t.data,o=Lt.mirror.getNode(s);o instanceof HTMLElement&&r===Se.Click&&e.registerClick(o)}}catch{}}function tg(e){return e.type===Wh}function ng(e){return e.data.source===N.MouseInteraction}function mt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Fs;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Fs||(Fs={}));var rg=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function sg(e){let t={};for(let n in e)if(rg.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}var og=e=>t=>{if(!e.isEnabled())return;let n=ig(t);if(!n)return;let r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Jh(e.clickDetector,n,gl(t.event)),Lr(e,n)};function yl(e,t){let n=Lt.mirror.getId(e),r=n&&Lt.mirror.getNode(n),s=r&&Lt.mirror.getMeta(r),o=s&&cg(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(i=>i.type===Fs.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:sg(o.attributes)}}:{}}}function ig(e){let{target:t,message:n}=ag(e);return mt({category:`ui.${e.name}`,...yl(t,n)})}function ag(e){let t=e.name==="click",n,r=null;try{r=t?gl(e.event):_l(e.event),n=Oe(r,{maxStringLength:200})||""}catch{n=""}return{target:r,message:n}}function cg(e){return e.type===Fs.Element}function ug(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=lg(t);n&&Lr(e,n)}function lg(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||dg(i)||!o)return null;let a=t||r||s,c=o.length===1;if(!a&&c)return null;let u=Oe(i,{maxStringLength:200})||"",l=yl(i,u);return mt({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function dg(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var ju={resource:gg,paint:mg,navigation:hg};function fg(e){return e.map(pg).filter(Boolean)}function pg(e){return ju[e.entryType]?ju[e.entryType](e):null}function Un(e){return((le||K.performance.timeOrigin)+e)/1e3}function mg(e){let{duration:t,entryType:n,name:r,startTime:s}=e,o=Un(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function hg(e){let{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:f,transferSize:h,type:g}=e;return s===0?null:{type:`${t}.${g}`,start:Un(f),end:Un(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:o,redirectCount:p}}}function gg(e){let{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Un(o),end:Un(s),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function _g(e){let t=e.entries,n=t[t.length-1],r=n?n.element:void 0,s=e.value,o=Un(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:o,end:o,data:{value:s,size:s,nodeId:r?Lt.mirror.getId(r):void 0}}}function yg(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(s=>{r.push(Qe(s,n))}),r.push(yr(({metric:s})=>{e.replayPerformanceEntries.push(_g(s))})),()=>{r.forEach(s=>s())}}var z=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Sg='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a>h]=l}else for(o=new n(i),a=0;a>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;ad&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<e))break;p+=m-(1<>=y;p>0;){var M=o[a].s;g[M]=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i>1)),o=0,f=function(t){s[o++]=t};for(i=0;is.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Eg(){let e=new Blob([Sg]);return URL.createObjectURL(e)}function Ee(e,t){z&&(m.info(e),t&&Sl(e))}function Pn(e,t){z&&(m.info(e),t&&setTimeout(()=>{Sl(e)},0))}function Sl(e){Ue({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}var Nr=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Qi}.`)}},Bs=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){let n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Qi)throw new Nr;this.events.push(t)}finish(){return new Promise(t=>{let n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=this.events.map(n=>n.timestamp).sort()[0];return t?sa(t):null}},Wi=class{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){Ee("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){let r=this._getAndIncrementId();return new Promise((s,o)=>{let i=({data:a})=>{let c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",i),!c.success){z&&m.error("[Replay]",c.response),o(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}},zi=class{constructor(t){this._worker=new Wi(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){let n=sa(t.timestamp);(!this._earliestTimestamp||nQi?Promise.reject(new Nr):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{z&&m.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},qi=class{constructor(t){this._fallback=new Bs,this._compression=new zi(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{Ee("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:n}=this._fallback,r=[];for(let s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){z&&m.warn("[Replay] Failed to add events when switching buffers.",s)}}};function Tg({useCompression:e,workerUrl:t}){if(e&&window.Worker){let n=Ig(t);if(n)return n}return Ee("[Replay] Using simple buffer"),new Bs}function Ig(e){try{let t=e||bg();if(!t)return;Ee(`[Replay] Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new qi(n)}catch{Ee("[Replay] Failed to create compression worker")}}function bg(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Eg():""}function oa(){try{return"sessionStorage"in K&&!!K.sessionStorage}catch{return!1}}function vg(e){xg(),e.session=void 0}function xg(){if(oa())try{K.sessionStorage.removeItem(Ji)}catch{}}function El(e){return e===void 0?!1:Math.random()e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Ee(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function Ag(e,t){try{if(typeof t=="function"&&kg(e))return t(e)}catch(n){return z&&m.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function ca(e){return!e.type}function Vi(e){return e.type==="transaction"}function Og(e){return e.type==="replay_event"}function Wu(e){return e.type==="feedback"}function Rl(e){let t=Dg();return(n,r)=>{if(!e.isEnabled()||!ca(n)&&!Vi(n))return;let s=r&&r.statusCode;if(!(t&&(!s||s<200||s>=300))){if(Vi(n)){Ng(e,n);return}Mg(e,n)}}}function Ng(e,t){let n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Mg(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function Dg(){let e=x();if(!e)return!1;let t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function Lg(e){return t=>{!e.isEnabled()||!ca(t)||Pg(e,t)}}function Pg(e,t){let n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let r=mt({category:"replay.hydrate-error"});Lr(e,r)}}function Fg(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function Bg(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:O.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function Ug(e,t){return e.recordingMode!=="buffer"||t.message===Xi||!t.exception||t.type?!1:El(e.getOptions().errorSampleRate)}function Hg(e,t=!1){let n=t?Rl(e):void 0;return Object.assign((r,s)=>e.isEnabled()?Og(r)?(delete r.breadcrumbs,r):!ca(r)&&!Vi(r)&&!Wu(r)||!e.checkAndHandleExpiredSession()?r:Wu(r)?(e.flush(),r.contexts.feedback.replay_id=e.getSessionId(),Bg(e,r),r):Fg(r,s)&&!e.getOptions()._experiments.captureExceptions?(z&&m.log("[Replay] Ignoring error from rrweb internals",r),null):((Ug(e,r)||e.recordingMode==="session")&&(r.tags={...r.tags,replayId:e.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function zs(e,t){return t.map(({type:n,start:r,end:s,name:o,data:i})=>{let a=e.throttledAddEvent({type:O.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:s,data:i}}});return typeof a=="string"?Promise.resolve(null):a})}function $g(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function jg(e){return t=>{if(!e.isEnabled())return;let n=$g(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(zs(e,[n]),!1)))}}function Gg(e,t){return z&&e.getOptions()._experiments.traceInternals?!1:hi(t,x())}function qs(e,t){e.isEnabled()&&t!==null&&(Gg(e,t.name)||e.addUpdate(()=>(zs(e,[t]),!0)))}function Wg(e){let{startTimestamp:t,endTimestamp:n,fetchData:r,response:s}=e;if(!n)return null;let{method:o,url:i}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:i,data:{method:o,statusCode:s?s.status:void 0}}}function zg(e){return t=>{if(!e.isEnabled())return;let n=Wg(t);qs(e,n)}}function qg(e){let{startTimestamp:t,endTimestamp:n,xhr:r}=e,s=r[Fe];if(!t||!n||!s)return null;let{method:o,url:i,status_code:a}=s;return i===void 0?null:{type:"resource.xhr",name:i,start:t/1e3,end:n/1e3,data:{method:o,statusCode:a}}}function Yg(e){return t=>{if(!e.isEnabled())return;let n=qg(t);qs(e,n)}}function Ys(e,t){if(e)try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=Al(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function wl(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function kl(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Al(e)];if(!e)return[void 0]}catch{return z&&m.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return z&&m.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Us(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Cl(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:W({method:o,statusCode:i,request:a,response:c})}}function Mr(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Pt(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:s,warnings:o}=Vg(n);return r.body=s,o&&o.length>0&&(r._meta={warnings:o}),r}function Ki(e,t){return Object.keys(e).reduce((n,r)=>{let s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=e[r]),n},{})}function Al(e){return new URLSearchParams(e).toString()}function Vg(e){if(!e||typeof e!="string")return{body:e};let t=e.length>Cu,n=Kg(e);if(t){let r=e.slice(0,Cu);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Kg(e){let t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Hs(e,t){let n=Jg(e);return rt(n,t)}function Jg(e,t=K.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(K.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Xg(e,t,n){try{let r=await Zg(e,t,n),s=Cl("resource.fetch",r);qs(n.replay,s)}catch(r){z&&m.error("[Replay] Failed to capture fetch breadcrumb",r)}}function Qg(e,t,n){let{input:r,response:s}=t,o=r?Ol(r):void 0,i=Ys(o,n.textEncoder),a=s?wl(s.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function Zg(e,t,n){let r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=Hs(i,n.networkDetailAllowUrls)&&!Hs(i,n.networkDetailDenyUrls),p=d?e_(n,t.input,u):Mr(u),f=await t_(d,n,t.response,l);return{startTimestamp:s,endTimestamp:o,url:i,method:a,statusCode:c,request:p,response:f}}function e_({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let s=n?s_(n,t):{};if(!e)return Pt(s,r,void 0);let o=Ol(n),[i,a]=kl(o),c=Pt(s,r,i);return a?Us(c,a):c}async function t_(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},s,o){if(!e&&o!==void 0)return Mr(o);let i=s?Nl(s.headers,r):{};if(!s||!t&&o!==void 0)return Pt(i,o,void 0);let[a,c]=await r_(s),u=n_(a,{networkCaptureBodies:t,textEncoder:n,responseBodySize:o,captureDetails:e,headers:i});return c?Us(u,c):u}function n_(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:s,headers:o}){try{let i=e&&e.length&&r===void 0?Ys(e,n):r;return s?t?Pt(o,i,e):Pt(o,i,void 0):Mr(i)}catch(i){return z&&m.warn("[Replay] Failed to serialize response body",i),Pt(o,r,void 0)}}async function r_(e){let t=o_(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await i_(t)]}catch(n){return z&&m.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function Ol(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Nl(e,t){let n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function s_(e,t){return e.length===1&&typeof e[0]!="string"?zu(e[0],t):e.length===2?zu(e[1],t):{}}function zu(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?Nl(n,t):Array.isArray(n)?{}:Ki(n,t):{}}function o_(e){try{return e.clone()}catch(t){z&&m.warn("[Replay] Failed to clone response body",t)}}function i_(e){return new Promise((t,n)=>{let r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);a_(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function a_(e){return await e.text()}async function c_(e,t,n){try{let r=l_(e,t,n),s=Cl("resource.xhr",r);qs(n.replay,s)}catch(r){z&&m.error("[Replay] Failed to capture xhr breadcrumb",r)}}function u_(e,t,n){let{xhr:r,input:s}=t;if(!r)return;let o=Ys(s,n.textEncoder),i=r.getResponseHeader("content-length")?wl(r.getResponseHeader("content-length")):m_(r.response,r.responseType,n.textEncoder);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function l_(e,t,n){let r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!Hs(c,n.networkDetailAllowUrls)||Hs(c,n.networkDetailDenyUrls)){let k=Mr(d),T=Mr(p);return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:l,request:k,response:T}}let f=a[Fe],h=f?Ki(f.request_headers,n.networkRequestHeaders):{},g=Ki(d_(a),n.networkResponseHeaders),[y,_]=n.networkCaptureBodies?kl(i):[void 0],[S,w]=n.networkCaptureBodies?f_(a):[void 0],C=Pt(h,d,y),H=Pt(g,p,S);return{startTimestamp:s,endTimestamp:o,url:c,method:u,statusCode:l,request:_?Us(C,_):C,response:w?Us(H,w):H}}function d_(e){let t=e.getAllResponseHeaders();return t?t.split(`\r `).reduce((n,r)=>{let[s,o]=r.split(": ");return n[s.toLowerCase()]=o,n},{}):{}}function f_(e){let t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return p_(e.response,e.responseType)}catch(n){t.push(n)}return z&&m.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function p_(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return z&&m.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return z&&m.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function m_(e,t,n){try{let r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Ys(r,n)}catch{return}}function h_(e){let t=x();try{let n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(u,l)=>g_(c,u,l)):(qt(zg(e)),Yt(Yg(e)))}catch{}}function g_(e,t,n){if(t.data)try{__(t)&&S_(n)&&(u_(t,n,e),c_(t,n,e)),y_(t)&&E_(n)&&(Qg(t,n,e),Xg(t,n,e))}catch{z&&m.warn("Error when enriching network breadcrumb")}}function __(e){return e.category==="xhr"}function y_(e){return e.category==="fetch"}function S_(e){return e&&e.xhr}function E_(e){return e&&e.response}var qu=null;function T_(e){return!!e.category}var I_=e=>t=>{if(!e.isEnabled())return;let n=b_(t);n&&Lr(e,n)};function b_(e){let t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return qu===t||!t||(qu=t,!T_(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?v_(t):mt(t)}function v_(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return mt(e);let n=!1,r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>xs?(n=!0,`${s.slice(0,xs)}\u2026`):s;if(typeof s=="object")try{let o=Re(s,7);return JSON.stringify(o).length>xs?(n=!0,`${JSON.stringify(o,null,2).slice(0,xs)}\u2026`):o}catch{}return s});return mt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function x_(e){let t=X(),n=x();t.addScopeListener(I_(e)),Jn(og(e)),gt(jg(e)),h_(e);let r=Hg(e,!Yu(n));n&&n.addEventProcessor?n.addEventProcessor(r):hs(r),Yu(n)&&(n.on("beforeSendEvent",Lg(e)),n.on("afterSendEvent",Rl(e)),n.on("createDsc",s=>{let o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=o)}),n.on("startTransaction",s=>{e.lastTransaction=s}),n.on("finishTransaction",s=>{e.lastTransaction=s}),n.on("beforeSendFeedback",(s,o)=>{let i=e.getSessionId();o&&o.includeReplay&&e.isEnabled()&&i&&s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=i)}))}function Yu(e){return!!(e&&e.on)}async function R_(e){try{return Promise.all(zs(e,[w_(K.performance.memory)]))}catch{return[]}}function w_(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function k_(e,t,n){let r,s,o,i=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),o!==void 0&&clearTimeout(o),s=o=void 0}function u(){return s!==void 0||o!==void 0?a():r}function l(){return s&&clearTimeout(s),s=setTimeout(a,t),i&&o===void 0&&(o=setTimeout(a,i)),r}return l.cancel=c,l.flush=u,l}function C_(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){z&&m.warn("[Replay] Received replay event after session expired.");return}let s=r||!t;t=!0,e.clickDetector&&eg(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!aa(e,n,s))return!0;if(!s)return!1;if(O_(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){let o=e.eventBuffer.getEarliestTimestamp();o&&(Ee(`[Replay] Updating session start time to earliest event in buffer to ${new Date(o)}`,e.getOptions()._experiments.traceInternals),e.session.started=o,e.getOptions().stickySession&&ia(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function A_(e){let t=e.getOptions();return{type:O.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function O_(e,t){!t||!e.session||e.session.segmentId!==0||aa(e,A_(e),!1)}function N_(e,t,n,r){return he(rr(e,gn(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function M_({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)} `;if(typeof e=="string")n=`${r}${e}`;else{let o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function D_({client:e,scope:t,replayId:n,event:r}){let s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:s};e.emit&&e.emit("preprocessEvent",r,o);let i=await ar(e.getOptions(),r,o,t,e,ye());if(!i)return null;i.platform=i.platform||"javascript";let a=e.getSdkMetadata&&e.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},i}async function L_({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){let i=M_({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=x(),p=X(),f=d&&d.getTransport(),h=d&&d.getDsn();if(!d||!f||!h||!o.sampled)return;let g={type:Nm,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},y=await D_({scope:p,client:d,replayId:t,event:g});if(!y){d.recordDroppedEvent("event_processor","replay",g),Ee("An event processor returned `null`, will not send event.");return}delete y.sdkProcessingMetadata;let _=N_(y,i,h,d.getOptions().tunnel),S;try{S=await f.send(_)}catch(C){let H=new Error(Xi);try{H.cause=C}catch{}throw H}if(!S)return S;if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new $s(S.statusCode);let w=or({},S);if(sr(w,"replay"))throw new js(w);return S}var $s=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},js=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}};async function Ml(e,t={count:0,interval:Bm}){let{recordingData:n,options:r}=e;if(n.length)try{return await L_(e),!0}catch(s){if(s instanceof $s||s instanceof js)throw s;if(as("Replays",{_retryCount:t.count}),z&&r._experiments&&r._experiments.captureExceptions&&Je(s),t.count>=Um){let o=new Error(`${Xi} - max retries exceeded`);try{o.cause=s}catch{}throw o}return t.interval*=++t.count,new Promise((o,i)=>{setTimeout(async()=>{try{await Ml(e,t),o(!0)}catch(a){i(a)}},t.interval)})}}var Dl="__THROTTLED",P_="__SKIPPED";function F_(e,t,n){let r=new Map,s=a=>{let c=a-n;r.forEach((u,l)=>{l[...r.values()].reduce((a,c)=>a+c,0),i=!1;return(...a)=>{let c=Math.floor(Date.now()/1e3);if(s(c),o()>=t){let l=i;return i=!0,l?P_:Dl}i=!1;let u=r.get(c)||0;return r.set(c,u+1),e(...a)}}var pt=class{constructor({options:t,recordingOptions:n}){pt.prototype.__init.call(this),pt.prototype.__init2.call(this),pt.prototype.__init3.call(this),pt.prototype.__init4.call(this),pt.prototype.__init5.call(this),pt.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Mm,sessionIdleExpire:Dm},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=k_(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=F_((i,a)=>Cg(this,i,a),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),o=r?{threshold:Math.min(Hm,r),timeout:r,scrollTimeout:$m,ignoreSelector:s?s.join(","):""}:void 0;o&&(this.clickDetector=new Gi(this,o))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}initializeSampling(t){let{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Pn(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),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");Pn("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();let t=Ci({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Pn("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);let t=Ci({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{let t=this._canvas;this._stopRecording=Lt({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:Fm},emit:C_(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{Ee(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,vg(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ee("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ee("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();Ee("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();let r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){let n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Yi(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${K.location.pathname}${K.location.hash}${K.location.search}`,n=`${K.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){let r=this._throttledAddEvent(t,n);if(r===Dl){let s=mt({category:"replay.throttled"});this.addUpdate(()=>!aa(this,{type:zh,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){let t=this.lastTransaction||X().getTransaction(),r=(t&&D(t).data||{})[ge];if(!(!t||!r||!["route","custom"].includes(r)))return D(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Tg({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){z&&m.error("[Replay]",t),z&&this._options._experiments&&this._options._experiments.captureExceptions&&Je(t)}_initializeSessionForSampling(t){let n=this._options.errorSampleRate>0,r=Ci({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;let t=this.session;return bl(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{K.document.addEventListener("visibilitychange",this._handleVisibilityChange),K.addEventListener("blur",this._handleWindowBlur),K.addEventListener("focus",this._handleWindowFocus),K.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(x_(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=yg(this)}_removeListeners(){try{K.document.removeEventListener("visibilitychange",this._handleVisibilityChange),K.removeEventListener("blur",this._handleWindowBlur),K.removeEventListener("focus",this._handleWindowFocus),K.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{K.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let t=mt({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{let t=mt({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{ug(this,t)}}_doChangeToBackgroundTasks(t){!this.session||Il(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Ee("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:O.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=fg(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(zs(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;let r=n.getEarliestTimestamp();r&&rthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");let r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();let o=await this.eventBuffer.finish();await Ml({replayId:t,recordingData:o,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});let r=x();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){z&&m.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;let n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();let o=sthis._options.maxReplayDuration+5e3;if(o||i){Ee(`[Replay] Session duration (${Math.floor(s/1e3)}s) is too ${o?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),o&&this._debouncedFlush();return}let a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&Ee("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){z&&m.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&ia(this.session)}__init6(){this._onMutationHandler=t=>{let n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,o=r&&n>r;if(n>s||o){let i=mt({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(i)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}};function vr(e,t,n,r){let s=typeof r=="string"?r.split(","):[],o=[...e,...s,...t];return typeof n<"u"&&(typeof n=="string"&&o.push(`.${n}`),Le(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),o.join(",")}function B_({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){let l=['base[href="/"]'],d=vr(e,[".sentry-mask","[data-sentry-mask]"],a,c),p=vr(t,[".sentry-unmask","[data-sentry-unmask]"]),f={maskTextSelector:d,unmaskTextSelector:p,blockSelector:vr(n,[".sentry-block","[data-sentry-block]",...l],o,i),unblockSelector:vr(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:vr(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return o instanceof RegExp&&(f.blockClass=o),a instanceof RegExp&&(f.maskTextClass=a),f}function U_({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}var Vu='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',H_=["content-length","content-type","accept"],Ku=!1,$_=e=>new sn(e),sn=class{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=Lm,flushMaxDelay:n=Pm,minReplayDuration:r=jm,maxReplayDuration:s=Au,stickySession:o=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},sessionSampleRate:u,errorSampleRate:l,maskAllText:d=!0,maskAllInputs:p=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:h=750,mutationLimit:g=1e4,slowClickTimeout:y=7e3,slowClickIgnoreSelectors:_=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:w=[],networkCaptureBodies:C=!0,networkRequestHeaders:H=[],networkResponseHeaders:k=[],mask:T=[],maskAttributes:M=["title","placeholder"],unmask:te=[],block:I=[],unblock:A=[],ignore:J=[],maskFn:re,beforeAddRecordingEvent:oe,beforeErrorSampling:Ce,blockClass:G,blockSelector:Me,maskInputOptions:ne,maskTextClass:Ie,maskTextSelector:Ge,ignoreClass:lo}={}){this.name=sn.id;let on=B_({mask:T,unmask:te,block:I,unblock:A,ignore:J,blockClass:G,blockSelector:Me,maskTextClass:Ie,maskTextSelector:Ge,ignoreClass:lo});if(this._recordingOptions={maskAllInputs:p,maskAllText:d,maskInputOptions:{...ne||{},password:!0},maskTextFn:re,maskInputFn:re,maskAttributeFn:(Rt,an,$n)=>U_({maskAttributes:M,maskAllText:d,privacyOptions:on,key:Rt,value:an,el:$n}),...on,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:Rt=>{try{Rt.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Gm),maxReplayDuration:Math.min(s,Au),stickySession:o,sessionSampleRate:u,errorSampleRate:l,useCompression:i,workerUrl:a,blockAllMedia:f,maskAllInputs:p,maskAllText:d,mutationBreadcrumbLimit:h,mutationLimit:g,slowClickTimeout:y,slowClickIgnoreSelectors:_,networkDetailAllowUrls:S,networkDetailDenyUrls:w,networkCaptureBodies:C,networkRequestHeaders:Ju(H),networkResponseHeaders:Ju(k),beforeAddRecordingEvent:oe,beforeErrorSampling:Ce,_experiments:c},typeof u=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration. This option is deprecated and will be removed soon. Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.: Sentry.init({ replaysSessionSampleRate: ${u} })`),this._initialOptions.sessionSampleRate=u),typeof l=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration. This option is deprecated and will be removed soon. Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.: Sentry.init({ replaysOnErrorSampleRate: ${l} })`),this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Vu}`:Vu),this._isInitialized&&Zr())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Ku}set _isInitialized(t){Ku=t}setupOnce(){Zr()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){let t=j_(this._initialOptions);this._replay=new pt({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let n=x().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};sn.__initStatic();function j_(e){let t=x(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...W(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Le(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Le(()=>{console.warn("SDK client is not available.")}),r)}function Ju(e){return[...H_,...e.map(t=>t.toLowerCase())]}var R=b,ua=0;function la(){return ua>0}function G_(){ua++,setTimeout(()=>{ua--})}function Ft(e,t={},n){if(typeof e!="function")return e;try{let s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(zt(e))return e}catch{return e}let r=function(){let s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=s.map(i=>Ft(i,t));return e.apply(this,o)}catch(o){throw G_(),Qt(i=>{i.addEventProcessor(a=>(t.mechanism&&(pn(a,void 0,void 0),ht(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Je(o)}),o}};try{for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Gr(r,e),Pe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var de=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function pa(e,t){let n=ma(e,t),r={type:t&&t.name,value:Y_(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function W_(e,t,n,r){let s=x(),o=s&&s.getOptions().normalizeDepth,i={exception:{values:[{type:Gt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:V_(t,{isUnhandledRejection:r})}]},extra:{__serialized__:ts(t,o)}};if(n){let a=ma(e,n);a.length&&(i.exception.values[0].stacktrace={frames:a})}return i}function da(e,t){return{exception:{values:[pa(e,t)]}}}function ma(e,t){let n=t.stacktrace||t.stack||"",r=q_(t);try{return e(n,r)}catch{}return[]}var z_=/Minified React error #\d+;/i;function q_(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(z_.test(e.message))return 1}return 0}function Y_(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Ll(e,t,n,r){let s=n&&n.syntheticException||void 0,o=Vs(e,t,s,r);return ht(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Ye(o)}function Pl(e,t,n="info",r,s){let o=r&&r.syntheticException||void 0,i=fa(e,t,o,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),Ye(i)}function Vs(e,t,n,r,s){let o;if(un(t)&&t.error)return da(e,t.error);if(Hr(t)||yo(t)){let i=t;if("stack"in t)o=da(e,t);else{let a=i.name||(Hr(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=fa(e,c,n,r),pn(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return $t(t)?da(e,t):ze(t)||Gt(t)?(o=W_(e,t,n,s),ht(o,{synthetic:!0}),o):(o=fa(e,t,n,r),pn(o,`${t}`,void 0),ht(o,{synthetic:!0}),o)}function fa(e,t,n,r){let s={};if(r&&n){let o=ma(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]})}if(ln(t)){let{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function V_(e,{isUnhandledRejection:t}){let n=wo(e),r=t?"promise rejection":"exception";return un(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Gt(e)?`Event \`${K_(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function K_(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Fl(e,{metadata:t,tunnel:n,dsn:r}){let s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:_e(r)}},o=J_(e);return he(s,[o])}function J_(e){return[{type:"user_report"},e]}var Ks=class extends mr{constructor(t){let n=R.SENTRY_SDK_SOURCE||Fo();tn(t,"browser",["browser"],n),super(t),t.sendClientReports&&R.document&&R.document.addEventListener("visibilitychange",()=>{R.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Ll(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Pl(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){de&&m.warn("SDK not enabled, will not capture user feedback.");return}let n=Fl(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){de&&m.log("No outcomes to send");return}if(!this._dsn){de&&m.log("No dsn provided, will not send outcomes");return}de&&m.log("Sending outcomes:",t);let n=Yo(t,this._options.tunnel&&_e(this._dsn));this._sendEnvelope(n)}};var Pr;function Bl(){if(Pr)return Pr;if(Xn(R.fetch))return Pr=R.fetch.bind(R);let e=R.document,t=R.fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){de&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Pr=t.bind(R)}function Ul(){Pr=void 0}function Hl(e,t=Bl()){let n=0,r=0;function s(o){let i=o.body.length;n+=i,r++;let a={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(c=>(n-=i,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Ul(),n-=i,r--,Kt(c)}}return Rn(e,s)}var X_=4;function $l(e){function t(n){return new se((r,s)=>{let o=new XMLHttpRequest;o.onerror=s,o.onreadystatechange=()=>{o.readyState===X_&&r({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url);for(let i in e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&o.setRequestHeader(i,e.headers[i]);o.send(n.body)})}return Rn(e,t)}var Js="?";var Q_=30,Z_=40,ey=50;function ha(e,t,n,r){let s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}var ty=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ny=/\((\S*)(?::(\d+))(?::(\d+))\)/,ry=e=>{let t=ty.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let o=ny.exec(t[2]);o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3])}let[r,s]=Gl(t[1]||Js,t[2]);return ha(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},sy=[Q_,ry],oy=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,iy=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ay=e=>{let t=oy.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let o=iy.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||Js;return[s,r]=Gl(s,r),ha(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},cy=[ey,ay],uy=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ly=e=>{let t=uy.exec(e);return t?ha(t[2],t[1]||Js,+t[3],t[4]?+t[4]:void 0):void 0},dy=[Z_,ly];var fy=[sy,cy,dy],jl=zr(...fy),Gl=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Js,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Xs=1024,Wl="Breadcrumbs",py=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Wl,setupOnce(){},setup(n){t.console&&Ao(gy(n)),t.dom&&Jn(hy(n,t.dom)),t.xhr&&Yt(_y(n)),t.fetch&&qt(yy(n)),t.history&>(Sy(n)),t.sentry&&n.on&&n.on("beforeSendEvent",my(n))}}},ga=py,zl=ie(Wl,ga);function my(e){return function(n){x()===e&&Ue({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:qe(n)},{event:n})}}function hy(e,t){return function(r){if(x()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Xs&&(de&&m.warn(`\`dom.maxStringLength\` cannot exceed ${Xs}, but a value of ${a} was configured. Sentry will use ${Xs} instead.`),a=Xs),typeof i=="string"&&(i=[i]);try{let u=r.event,l=Ey(u)?u.target:u;s=Oe(l,{keyAttrs:i,maxStringLength:a}),o=qn(l)}catch{s=""}if(s.length===0)return;let c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),Ue(c,{event:r.event,name:r.name,global:r.global})}}function gy(e){return function(n){if(x()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Uo(n.level),message:$r(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${$r(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ue(r,{input:n.args,level:n.level})}}function _y(e){return function(n){if(x()!==e)return;let{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[Fe];if(!r||!s||!o)return;let{method:i,url:a,status_code:c,body:u}=o,l={method:i,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};Ue({category:"xhr",data:l,type:"http"},d)}}function yy(e){return function(n){if(x()!==e)return;let{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};Ue({category:"fetch",data:o,level:"error",type:"http"},i)}else{let o=n.response,i={...n.fetchData,status_code:o&&o.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:s};Ue({category:"fetch",data:i,type:"http"},a)}}}function Sy(e){return function(n){if(x()!==e)return;let r=n.from,s=n.to,o=Be(R.location.href),i=r?Be(r):void 0,a=Be(s);(!i||!i.path)&&(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),Ue({category:"navigation",data:{from:r,to:s}})}}function Ey(e){return!!e&&!!e.target}var Vl="Dedupe",Ty=()=>{let e;return{name:Vl,setupOnce(){},processEvent(t){if(t.type)return t;try{if(Iy(t,e))return de&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},_a=Ty,Kl=ie(Vl,_a);function Iy(e,t){return t?!!(by(e,t)||vy(e,t)):!1}function by(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Xl(e,t)||!Jl(e,t))}function vy(e,t){let n=ql(t),r=ql(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Xl(e,t)||!Jl(e,t))}function Jl(e,t){let n=Yl(e),r=Yl(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Zl,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Ry(n),Ql("onerror")),t.onunhandledrejection&&(wy(n),Ql("onunhandledrejection"))}}},ya=xy,ed=ie(Zl,ya);function Ry(e){Qn(t=>{let{stackParser:n,attachStacktrace:r}=nd();if(x()!==e||la())return;let{msg:s,url:o,line:i,column:a,error:c}=t,u=c===void 0&&pe(s)?Ay(s,o,i,a):td(Vs(n,c||s,void 0,r,!1),o,i,a);u.level="error",cr(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function wy(e){Zn(t=>{let{stackParser:n,attachStacktrace:r}=nd();if(x()!==e||la())return;let s=ky(t),o=jt(s)?Cy(s):Vs(n,s,void 0,r,!0);o.level="error",cr(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function ky(e){if(jt(e))return e;let t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function Cy(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Ay(e,t,n,r){let s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=un(e)?e.message:e,i="Error",a=o.match(s);return a&&(i=a[1],o=a[2]),td({exception:{values:[{type:i,value:o}]}},t,n,r)}function td(e,t,n,r){let s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=pe(t)&&t.length>0?t:bo();return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),e}function Ql(e){de&&m.log(`Global Handler attached: ${e}`)}function nd(){let e=x();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var rd="HttpContext",Oy=()=>({name:rd,setupOnce(){},preprocessEvent(e){if(!R.navigator&&!R.location&&!R.document)return;let t=e.request&&e.request.url||R.location&&R.location.href,{referrer:n}=R.document||{},{userAgent:r}=R.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),Sa=Oy,sd=ie(rd,Sa);var Ny="cause",My=5,od="LinkedErrors",Dy=(e={})=>{let t=e.limit||My,n=e.key||Ny;return{name:od,setupOnce(){},preprocessEvent(r,s,o){let i=o.getOptions();Wn(pa,i.stackParser,i.maxValueLength,n,t,r,s)}}},Ea=Dy,id=ie(od,Ea);var Ly=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],cd="TryCatch",Py=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:cd,setupOnce(){t.setTimeout&&q(R,"setTimeout",ad),t.setInterval&&q(R,"setInterval",ad),t.requestAnimationFrame&&q(R,"requestAnimationFrame",Fy),t.XMLHttpRequest&&"XMLHttpRequest"in R&&q(XMLHttpRequest.prototype,"send",By);let n=t.eventTarget;n&&(Array.isArray(n)?n:Ly).forEach(Uy)}}},Ta=Py,ud=ie(cd,Ta);function ad(e){return function(...t){let n=t[0];return t[0]=Ft(n,{mechanism:{data:{function:be(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Fy(e){return function(t){return e.apply(this,[Ft(t,{mechanism:{data:{function:"requestAnimationFrame",handler:be(e)},handled:!1,type:"instrument"}})])}}function By(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&q(n,s,function(o){let i={mechanism:{data:{function:s,handler:be(o)},handled:!1,type:"instrument"}},a=zt(o);return a&&(i.mechanism.data.handler=be(a)),Ft(o,i)})}),e.apply(this,t)}}function Uy(e){let t=R,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(q(n,"addEventListener",function(r){return function(s,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=Ft(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:be(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Ft(o,{mechanism:{data:{function:"addEventListener",handler:be(o),target:e},handled:!1,type:"instrument"}}),i])}}),q(n,"removeEventListener",function(r){return function(s,o,i){let a=o;try{let c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,i)}catch{}return r.call(this,s,a,i)}}))}var ld=[hr(),gr(),Ta(),ga(),ya(),Ea(),_a(),Sa()];function dd(e){return[...ld]}function Ia(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=dd()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),R.SENTRY_RELEASE&&R.SENTRY_RELEASE.id&&(e.release=R.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);let t={...e,stackParser:Co(e.stackParser||jl),integrations:ui(e),transport:e.transport||(Vr()?Hl:$l)};fi(Ks,t),e.autoSessionTracking&&Hy()}var Qs=(e={},t=Y())=>{if(!R.document){de&&m.error("Global document not defined in showReportDialog call");return}let{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s){de&&m.error("DSN not configured for showReportDialog call");return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());let o=R.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=ci(s,e),e.onLoad&&(o.onload=e.onLoad);let{onClose:i}=e;if(i){let c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{i()}finally{R.removeEventListener("message",c)}};R.addEventListener("message",c)}let a=R.document.head||R.document.body;a?a.appendChild(o):de&&m.error("Not injecting report dialog. No injection point found in HTML")};function Hy(){if(typeof R.document>"u"){de&&m.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}ur({ignoreDuration:!0}),lr(),gt(({from:e,to:t})=>{e!==void 0&&e!==t&&(ur({ignoreDuration:!0}),lr())})}var ba={};Fa(ba,{Breadcrumbs:()=>zl,Dedupe:()=>Kl,GlobalHandlers:()=>ed,HttpContext:()=>sd,LinkedErrors:()=>id,TryCatch:()=>ud});var fd={};R.Sentry&&R.Sentry.Integrations&&(fd=R.Sentry.Integrations);var SC={...fd,...Yc,...ba};function va(e){let t={...e};tn(t,"react"),Ia(t)}var wd=_o(bd()),xt=_o(Ba());var vd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var xd="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/errorboundary.tsx";function Zy(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}var eS="unknown",Rd={componentStack:null,error:null,eventId:null};function tS(e,t){let n=new WeakMap;function r(s,o){if(!n.has(s)){if(s.cause)return n.set(s,!0),r(s.cause,o);s.cause=o}}r(e,t)}var Hn=class extends xt.Component{constructor(t){super(t),Hn.prototype.__init.call(this),this.state=Rd,this._openFallbackReportDialog=!0;let n=x();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",r=>{!r.type&&r.event_id===this._lastEventId&&Qs({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){let{beforeCapture:r,onError:s,showDialog:o,dialogOptions:i}=this.props;Qt(a=>{if(Zy(xt.version)&&$t(t)){let u=new Error(t.message);u.name=`React ErrorBoundary ${t.name}`,u.stack=n,tS(t,u)}r&&r(a,t,n);let c=Je(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!!this.props.fallback}});s&&s(t,n,c),o&&(this._lastEventId=c,this._openFallbackReportDialog&&Qs({...i,eventId:c})),this.setState({error:t,componentStack:n,eventId:c})})}componentDidMount(){let{onMount:t}=this.props;t&&t()}componentWillUnmount(){let{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:s}=this.props;s&&s(t,n,r)}__init(){this.resetErrorBoundary=()=>{let{onReset:t}=this.props,{error:n,componentStack:r,eventId:s}=this.state;t&&t(n,r,s),this.setState(Rd)}}render(){let{fallback:t,children:n}=this.props,r=this.state;if(r.error){let s;return typeof t=="function"?s=t({error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):s=t,xt.isValidElement(s)?s:(t&&vd&&m.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}};function Aa(e,t){let n=e.displayName||e.name||eS,r=s=>xt.createElement(Hn,{...t,__self:this,__source:{fileName:xd,lineNumber:240}},xt.createElement(e,{...s,__self:this,__source:{fileName:xd,lineNumber:241}}));return r.displayName=`errorBoundary(${n})`,(0,wd.default)(r,e),r}var Oa=_o(Ba());var kd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Cd(){let e=b;if(e.__remixContext)return e.__remixContext.future}function Ad(){return yt([b,"access",t=>t.__remixContext,"optionalAccess",t=>t.state,"optionalAccess",t=>t.loaderData,"optionalAccess",t=>t.root,"optionalAccess",t=>t.remixVersion])}var Od="/home/runner/work/sentry-javascript/sentry-javascript/packages/remix/src/client/performance.tsx",Nd={"routing.instrumentation":"remix-router"},uo,Na,Ma,Fr,Md;function nS(){if(R&&R.location)return R.location.pathname}function rS(e){return e===2||yt([Cd,"call",t=>t(),"optionalAccess",t=>t.v2_errorBoundary])||!1}function Dd(){let e=nS();if(!e)return;let t={name:e,op:"pageload",origin:"auto.pageload.remix",tags:Nd,metadata:{source:"url"}};if(Fr)Fr(t);else{let n=x();if(!n)return;Ir(n,t)}}function sS(e){let t={name:e[e.length-1].id,op:"navigation",origin:"auto.navigation.remix",tags:Nd,metadata:{source:"route"}};if(Fr)Fr(t);else{let n=x();if(!n)return;br(n,t)}}function oS(e,t={wrapWithErrorBoundary:!0,errorBoundaryOptions:{}}){return r=>{if(!uo||!Na||!Ma)return kd&&!Vt()&&m.warn("Remix SDK was unable to wrap your root because of one or more missing parameters."),Oa.createElement(e,{...r,__self:this,__source:{fileName:Od,lineNumber:181}});let s=!1,o=Na(),i=Ma();return uo(()=>{let a=Et();if(a&&i&&i.length){let c=ot(a);c&&(c.updateName(i[i.length-1].id),c.setAttribute(ge,"route"))}s=!0},[]),uo(()=>{let a=Et();if(s){a&&a.end();return}Md&&i&&i.length&&(a&&a.end(),sS(i))},[o]),s=!1,!rS(Ad())&&t.wrapWithErrorBoundary?Aa(e,t.errorBoundaryOptions)(r):Oa.createElement(e,{...r,__self:this,__source:{fileName:Od,lineNumber:233}})}}function Ld({useEffect:e,useLocation:t,useMatches:n,instrumentNavigation:r,customStartTransaction:s}){uo=e,Na=t,Ma=n,Md=r,Fr=s}function iS(e){e.instrumentPageLoad===void 0&&(e.instrumentPageLoad=!0),e.instrumentNavigation===void 0&&(e.instrumentNavigation=!0),Ld({useEffect:e.useEffect,useLocation:e.useLocation,useMatches:e.useMatches,instrumentNavigation:e.instrumentNavigation});let t=vs({...e,instrumentPageLoad:!1,instrumentNavigation:!1});return{...t,afterAllSetup(n){t.afterAllSetup(n),e.instrumentPageLoad&&Dd()}}}function Pd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function aS(e){if(!(Pd(e)||Vt()||!(e instanceof Error)))return Je(e,{mechanism:{type:"instrument",handled:!1,data:{function:"ReactError"}}})}function u0(e){let t={...e,environment:e.environment||"production"};tn(t,"remix",["remix","react"]),va(t),X().setTag("runtime","browser")}export{$_ as a,aS as b,oS as c,iS as d,u0 as e}; /*! Bundled license information: react-is/cjs/react-is.production.min.js: (** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) */