import{h as iv,r as Pt,d as A,g as zh,e as sv}from"./react-Bmxett5h.js";import{e as av}from"./utils-BtcNZi-5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="19bf9908-e510-4275-9b2f-5cb4c9abfcf3",t._sentryDebugIdIdentifier="sentry-dbid-19bf9908-e510-4275-9b2f-5cb4c9abfcf3")}catch{}})();const Wh=Object.prototype.toString;function xr(t){switch(Wh.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Zt(t,Error)}}function Xr(t,e){return Wh.call(t)===`[object ${e}]`}function dc(t){return Xr(t,"ErrorEvent")}function td(t){return Xr(t,"DOMError")}function ov(t){return Xr(t,"DOMException")}function Nt(t){return Xr(t,"String")}function fc(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function hc(t){return t===null||fc(t)||typeof t!="object"&&typeof t!="function"}function Yn(t){return Xr(t,"Object")}function Ka(t){return typeof Event<"u"&&Zt(t,Event)}function uv(t){return typeof Element<"u"&&Zt(t,Element)}function cv(t){return Xr(t,"RegExp")}function Gi(t){return!!(t&&t.then&&typeof t.then=="function")}function lv(t){return Yn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function qh(t){return typeof t=="number"&&t!==t}function Zt(t,e){try{return t instanceof e}catch{return!1}}function Vh(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function Rr(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function No(t,e){let n=t;const r=n.length;if(r<=150)return n;e>r&&(e=r);let i=Math.max(e-60,0);i<5&&(i=0);let s=Math.min(i+140,r);return s>r-5&&(s=r),s===r&&(i=Math.max(s-140,0)),n=n.slice(i,s),i>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function oa(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const i=t[r];try{Vh(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function dv(t,e,n=!1){return Nt(t)?cv(e)?e.test(t):Nt(e)?n?t===e:t.includes(e):!1:!1}function Jr(t,e=[],n=!1){return e.some(r=>dv(t,r,n))}function Kh(t,e,n=250,r,i,s,a){if(!s.exception||!s.exception.values||!a||!Zt(a.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=fv(fu(t,e,i,a.originalException,r,s.exception.values,o,0),n))}function fu(t,e,n,r,i,s,a,o){if(s.length>=n+1)return s;let u=[...s];if(Zt(r[i],Error)){nd(a,o);const c=t(e,r[i]),l=u.length;rd(c,i,l,o),u=fu(t,e,n,r[i],i,[c,...u],c,l)}return Array.isArray(r.errors)&&r.errors.forEach((c,l)=>{if(Zt(c,Error)){nd(a,o);const d=t(e,c),f=u.length;rd(d,`errors[${l}]`,f,o),u=fu(t,e,n,c,i,[d,...u],d,f)}}),u}function nd(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function rd(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function fv(t,e){return t.map(n=>(n.value&&(n.value=Rr(n.value,e)),n))}function Ts(t){return t&&t.Math==Math?t:void 0}const V=typeof globalThis=="object"&&Ts(globalThis)||typeof window=="object"&&Ts(window)||typeof self=="object"&&Ts(self)||typeof global=="object"&&Ts(global)||function(){return this}()||{};function pc(){return V}function Yh(t,e,n){const r=n||V,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}const Or=pc(),hv=80;function En(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,i=[];let s=0,a=0;const o=" > ",u=o.length;let c;const l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||hv;for(;n&&s++<r&&(c=pv(n,l),!(c==="html"||s>1&&a+i.length*u+c.length>=d));)i.push(c),a+=c.length,n=n.parentNode;return i.reverse().join(o)}catch{return"<unknown>"}}function pv(t,e){const n=t,r=[];let i,s,a,o,u;if(!n||!n.tagName)return"";if(Or.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const c=e&&e.length?e.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(c&&c.length)c.forEach(d=>{r.push(`[${d[0]}="${d[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&Nt(i))for(s=i.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const l=["aria-label","type","name","title","alt"];for(u=0;u<l.length;u++)a=l[u],o=n.getAttribute(a),o&&r.push(`[${a}="${o}"]`);return r.join("")}function Xh(){try{return Or.document.location.href}catch{return""}}function Jh(t){return Or.document&&Or.document.querySelector?Or.document.querySelector(t):null}function Qh(t){if(!Or.HTMLElement)return null;let e=t;const n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement&&e.dataset.sentryComponent)return e.dataset.sentryComponent;e=e.parentNode}return null}const Qr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,gv="Sentry Logger ",ua=["debug","info","warn","error","log","assert","trace"],ca={};function Tn(t){if(!("console"in V))return t();const e=V.console,n={},r=Object.keys(ca);r.forEach(i=>{const s=ca[i];n[i]=e[i],e[i]=s});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function mv(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Qr?ua.forEach(n=>{e[n]=(...r)=>{t&&Tn(()=>{V.console[n](`${gv}[${n}]:`,...r)})}}):ua.forEach(n=>{e[n]=()=>{}}),e}const T=mv(),_v=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function yv(t){return t==="http"||t==="https"}function nr(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:u}=t;return`${o}://${u}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${a}`}function Zh(t){const e=_v.exec(t);if(!e){Tn(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,i="",s,a="",o]=e.slice(1);let u="",c=o;const l=c.split("/");if(l.length>1&&(u=l.slice(0,-1).join("/"),c=l.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return ep({host:s,pass:i,path:u,projectId:c,port:a,protocol:n,publicKey:r})}function ep(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function vv(t){if(!Qr)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(T.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?yv(r)?e&&isNaN(parseInt(e,10))?(T.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(T.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(T.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function tp(t){const e=typeof t=="string"?Zh(t):ep(t);if(!(!e||!vv(e)))return e}class Dt extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function He(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);typeof i=="function"&&np(i,r),t[e]=i}function In(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Qr&&T.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function np(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,In(t,"__sentry_original__",e)}catch{}}function gc(t){return t.__sentry_original__}function bv(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function rp(t){if(xr(t))return{message:t.message,name:t.name,stack:t.stack,...sd(t)};if(Ka(t)){const e={type:t.type,target:id(t.target),currentTarget:id(t.currentTarget),...sd(t)};return typeof CustomEvent<"u"&&Zt(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function id(t){try{return uv(t)?En(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function sd(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Sv(t,e=40){const n=Object.keys(rp(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Rr(n[0],e);for(let r=n.length;r>0;r--){const i=n.slice(0,r).join(", ");if(!(i.length>e))return r===n.length?i:Rr(i,e)}return""}function je(t){return hu(t,new Map)}function hu(t,e){if(Ev(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const i of Object.keys(t))typeof t[i]<"u"&&(r[i]=hu(t[i],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(i=>{r.push(hu(i,e))}),r}return t}function Ev(t){if(!Yn(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const ip=50,ad=/\(error: (.*)\)/,od=/captureMessage|captureException/;function sp(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const i=[],s=n.split(`
`);for(let a=r;a<s.length;a++){const o=s[a];if(o.length>1024)continue;const u=ad.test(o)?o.replace(ad,"$1"):o;if(!u.match(/\S*Error: /)){for(const c of e){const l=c(u);if(l){i.push(l);break}}if(i.length>=ip)break}}return Iv(i)}}function Tv(t){return Array.isArray(t)?sp(...t):t}function Iv(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),od.test(e[e.length-1].function||"")&&(e.pop(),od.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,ip).map(n=>({...n,filename:n.filename||e[e.length-1].filename,function:n.function||"?"}))}const Po="<anonymous>";function en(t){try{return!t||typeof t!="function"?Po:t.name||Po}catch{return Po}}const Js={},ud={};function rr(t,e){Js[t]=Js[t]||[],Js[t].push(e)}function ir(t,e){ud[t]||(e(),ud[t]=!0)}function St(t,e){const n=t&&Js[t];if(n)for(const r of n)try{r(e)}catch(i){Qr&&T.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${en(r)}
Error:`,i)}}function ap(t){const e="console";rr(e,t),ir(e,wv)}function wv(){"console"in V&&ua.forEach(function(t){t in V.console&&He(V.console,t,function(e){return ca[t]=e,function(...n){St("console",{args:n,level:t});const i=ca[t];i&&i.apply(V.console,n)}})})}function ae(){const t=V,e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function op(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function _n(t){const{message:e,event_id:n}=t;if(e)return e;const r=op(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function pu(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type="Error")}function Xn(t,e){const n=op(t);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...e},e&&"data"in e){const s={...i&&i.data,...e.data};n.mechanism.data=s}}function Cv(t,e,n=5){if(e.lineno===void 0)return;const r=t.length,i=Math.max(Math.min(r-1,e.lineno-1),0);e.pre_context=t.slice(Math.max(0,i-n),i).map(s=>No(s,0)),e.context_line=No(t[Math.min(r-1,i)],e.colno||0),e.post_context=t.slice(Math.min(i+1,r),i+1+n).map(s=>No(s,0))}function cd(t){if(t&&t.__sentry_captured__)return!0;try{In(t,"__sentry_captured__",!0)}catch{}return!1}function up(t){return Array.isArray(t)?t:[t]}const yr=V,kv=1e3;let ld,gu,mu;function cp(t){const e="dom";rr(e,t),ir(e,xv)}function xv(){if(!yr.document)return;const t=St.bind(null,"dom"),e=dd(t,!0);yr.document.addEventListener("click",e,!1),yr.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const r=yr[n]&&yr[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(He(r,"addEventListener",function(i){return function(s,a,o){if(s==="click"||s=="keypress")try{const u=this,c=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},l=c[s]=c[s]||{refCount:0};if(!l.handler){const d=dd(t);l.handler=d,i.call(this,s,d,o)}l.refCount++}catch{}return i.call(this,s,a,o)}}),He(r,"removeEventListener",function(i){return function(s,a,o){if(s==="click"||s=="keypress")try{const u=this,c=u.__sentry_instrumentation_handlers__||{},l=c[s];l&&(l.refCount--,l.refCount<=0&&(i.call(this,s,l.handler,o),l.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,o)}}))})}function Rv(t){if(t.type!==gu)return!1;try{if(!t.target||t.target._sentryId!==mu)return!1}catch{}return!0}function Ov(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function dd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Av(n);if(Ov(n.type,r))return;In(n,"_sentryCaptured",!0),r&&!r._sentryId&&In(r,"_sentryId",ae());const i=n.type==="keypress"?"input":n.type;Rv(n)||(t({event:n,name:i,global:e}),gu=n.type,mu=r?r._sentryId:void 0),clearTimeout(ld),ld=yr.setTimeout(()=>{mu=void 0,gu=void 0},kv)}}function Av(t){try{return t.target}catch{return null}}const la=pc();function lp(){if(!("fetch"in la))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function _u(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function dp(){if(typeof EdgeRuntime=="string")return!0;if(!lp())return!1;if(_u(la.fetch))return!0;let t=!1;const e=la.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=_u(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Qr&&T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function Dv(){return"ReportingObserver"in la}function Ya(t){const e="fetch";rr(e,t),ir(e,Mv)}function Mv(){dp()&&He(V,"fetch",function(t){return function(...e){const{method:n,url:r}=Lv(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return St("fetch",{...i}),t.apply(V,e).then(s=>{const a={...i,endTimestamp:Date.now(),response:s};return St("fetch",a),s},s=>{const a={...i,endTimestamp:Date.now(),error:s};throw St("fetch",a),s})}})}function yu(t,e){return!!t&&typeof t=="object"&&!!t[e]}function fd(t){return typeof t=="string"?t:t?yu(t,"url")?t.url:t.toString?t.toString():"":""}function Lv(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:fd(n),method:yu(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:fd(e),method:yu(e,"method")?String(e.method).toUpperCase():"GET"}}let Is=null;function fp(t){const e="error";rr(e,t),ir(e,Nv)}function Nv(){Is=V.onerror,V.onerror=function(t,e,n,r,i){return St("error",{column:r,error:i,line:n,msg:t,url:e}),Is&&!Is.__SENTRY_LOADER__?Is.apply(this,arguments):!1},V.onerror.__SENTRY_INSTRUMENTED__=!0}let ws=null;function hp(t){const e="unhandledrejection";rr(e,t),ir(e,Pv)}function Pv(){ws=V.onunhandledrejection,V.onunhandledrejection=function(t){return St("unhandledrejection",t),ws&&!ws.__SENTRY_LOADER__?ws.apply(this,arguments):!0},V.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Cs=pc();function $v(){const t=Cs.chrome,e=t&&t.app&&t.app.runtime,n="history"in Cs&&!!Cs.history.pushState&&!!Cs.history.replaceState;return!e&&n}const pi=V;let ks;function zi(t){const e="history";rr(e,t),ir(e,Uv)}function Uv(){if(!$v())return;const t=pi.onpopstate;pi.onpopstate=function(...n){const r=pi.location.href,i=ks;if(ks=r,St("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const s=ks,a=String(i);ks=a,St("history",{from:s,to:a})}return n.apply(this,r)}}He(pi.history,"pushState",e),He(pi.history,"replaceState",e)}const Fv=V,Xt="__sentry_xhr_v3__";function Xa(t){const e="xhr";rr(e,t),ir(e,Bv)}function Bv(){if(!Fv.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;He(t,"open",function(e){return function(...n){const r=Date.now(),i=Nt(n[0])?n[0].toUpperCase():void 0,s=Hv(n[1]);if(!i||!s)return e.apply(this,n);this[Xt]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const a=()=>{const o=this[Xt];if(o&&this.readyState===4){try{o.status_code=this.status}catch{}const u={args:[i,s],endTimestamp:Date.now(),startTimestamp:r,xhr:this};St("xhr",u)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?He(this,"onreadystatechange",function(o){return function(...u){return a(),o.apply(this,u)}}):this.addEventListener("readystatechange",a),He(this,"setRequestHeader",function(o){return function(...u){const[c,l]=u,d=this[Xt];return d&&Nt(c)&&Nt(l)&&(d.request_headers[c.toLowerCase()]=l),o.apply(this,u)}}),e.apply(this,n)}}),He(t,"send",function(e){return function(...n){const r=this[Xt];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const i={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return St("xhr",i),e.apply(this,n)}})}function Hv(t){if(Nt(t))return t;try{return t.toString()}catch{}}function jv(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Gv(){return"npm"}function zv(){return!jv()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function vu(){return typeof window<"u"&&(!zv()||Wv())}function Wv(){return V.process!==void 0&&V.process.type==="renderer"}function qv(){const t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let s=0;s<e.length;s++)if(e[s]===i)return!0;return e.push(i),!1}function r(i){if(t)e.delete(i);else for(let s=0;s<e.length;s++)if(e[s]===i){e.splice(s,1);break}}return[n,r]}function _t(t,e=100,n=1/0){try{return bu("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function pp(t,e=3,n=100*1024){const r=_t(t,e);return Xv(r)>n?pp(t,e-1,n):r}function bu(t,e,n=1/0,r=1/0,i=qv()){const[s,a]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!qh(e))return e;const o=Vv(t,e);if(!o.startsWith("[object "))return o;if(e.__sentry_skip_normalization__)return e;const u=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(u===0)return o.replace("object ","");if(s(e))return"[Circular ~]";const c=e;if(c&&typeof c.toJSON=="function")try{const h=c.toJSON();return bu("",h,u-1,r,i)}catch{}const l=Array.isArray(e)?[]:{};let d=0;const f=rp(e);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(d>=r){l[h]="[MaxProperties ~]";break}const p=f[h];l[h]=bu(h,p,u-1,r,i),d++}return a(e),l}function Vv(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(Vh(e))return"[VueViewModel]";if(lv(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${en(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=Kv(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Kv(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Yv(t){return~-encodeURI(t).split(/%..|./).length}function Xv(t){return Yv(JSON.stringify(t))}function Jv(t,e){let n=0;for(let r=t.length-1;r>=0;r--){const i=t[r];i==="."?t.splice(r,1):i===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}const Qv=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Zv(t){const e=t.length>1024?`<truncated>${t.slice(-1024)}`:t,n=Qv.exec(e);return n?n.slice(1):[]}function hd(...t){let e="",n=!1;for(let r=t.length-1;r>=-1&&!n;r--){const i=r>=0?t[r]:"/";i&&(e=`${i}/${e}`,n=i.charAt(0)==="/")}return e=Jv(e.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+e||"."}function pd(t){let e=0;for(;e<t.length&&t[e]==="";e++);let n=t.length-1;for(;n>=0&&t[n]==="";n--);return e>n?[]:t.slice(e,n-e+1)}function eb(t,e){t=hd(t).slice(1),e=hd(e).slice(1);const n=pd(t.split("/")),r=pd(e.split("/")),i=Math.min(n.length,r.length);let s=i;for(let o=0;o<i;o++)if(n[o]!==r[o]){s=o;break}let a=[];for(let o=s;o<n.length;o++)a.push("..");return a=a.concat(r.slice(s)),a.join("/")}function tb(t,e){return Zv(t)[2]}var qt;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const r=2;t[t.REJECTED=r]="REJECTED"})(qt||(qt={}));function Lr(t){return new Zr(e=>{e(t)})}function mc(t){return new Zr((e,n)=>{n(t)})}let Zr=class Fn{constructor(e){Fn.prototype.__init.call(this),Fn.prototype.__init2.call(this),Fn.prototype.__init3.call(this),Fn.prototype.__init4.call(this),this._state=qt.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new Fn((r,i)=>{this._handlers.push([!1,s=>{if(!e)r(s);else try{r(e(s))}catch(a){i(a)}},s=>{if(!n)i(s);else try{r(n(s))}catch(a){i(a)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new Fn((n,r)=>{let i,s;return this.then(a=>{s=!1,i=a,e&&e()},a=>{s=!0,i=a,e&&e()}).then(()=>{if(s){r(i);return}n(i)})})}__init(){this._resolve=e=>{this._setResult(qt.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(qt.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===qt.PENDING){if(Gi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===qt.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===qt.RESOLVED&&n[1](this._value),this._state===qt.REJECTED&&n[2](this._value),n[0]=!0)})}}};function nb(t){const e=[];function n(){return t===void 0||e.length<t}function r(a){return e.splice(e.indexOf(a),1)[0]}function i(a){if(!n())return mc(new Dt("Not adding Promise because buffer limit was reached."));const o=a();return e.indexOf(o)===-1&&e.push(o),o.then(()=>r(o)).then(null,()=>r(o).then(null,()=>{})),o}function s(a){return new Zr((o,u)=>{let c=e.length;if(!c)return o(!0);const l=setTimeout(()=>{a&&a>0&&o(!1)},a);e.forEach(d=>{Lr(d).then(()=>{--c||(clearTimeout(l),o(!0))},u)})})}return{$:e,add:i,drain:s}}function Kn(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function rb(t){return t.split(/[\?#]/,1)[0]}const ib=["fatal","error","warning","log","info","debug"];function gp(t){return t==="warn"?"warning":ib.includes(t)?t:"log"}const mp=1e3;function Wi(){return Date.now()/mp}function sb(){const{performance:t}=V;if(!t||!t.now)return Wi;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/mp}const tn=sb(),qe=(()=>{const{performance:t}=V;if(!t||!t.now)return;const e=3600*1e3,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=i<e,a=t.timing&&t.timing.navigationStart,u=typeof a=="number"?Math.abs(a+n-r):e,c=u<e;return s||c?i<=u?t.timeOrigin:a:r})(),Su="baggage",_p="sentry-",ab=/^sentry-/,ob=8192;function yp(t){if(!Nt(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((r,i)=>{const s=gd(i);for(const a of Object.keys(s))r[a]=s[a];return r},{});else{if(!t)return;e=gd(t)}const n=Object.entries(e).reduce((r,[i,s])=>{if(i.match(ab)){const a=i.slice(_p.length);r[a]=s}return r},{});if(Object.keys(n).length>0)return n}function vp(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,i])=>(i&&(n[`${_p}${r}`]=i),n),{});return ub(e)}function gd(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(e[n]=r,e),{})}function ub(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],i)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,a=i===0?s:`${e},${s}`;return a.length>ob?(Qr&&T.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):a},"")}const cb=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function _c(t){if(!t)return;const e=t.match(cb);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function lb(t,e){const n=_c(t),r=yp(e),{traceId:i,parentSpanId:s,parentSampled:a}=n||{};return n?{traceparentData:n,dynamicSamplingContext:r||{},propagationContext:{traceId:i||ae(),parentSpanId:s||ae().substring(16),spanId:ae().substring(16),sampled:a,dsc:r||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:i||ae(),spanId:ae().substring(16)}}}function bp(t,e){const n=_c(t),r=yp(e),{traceId:i,parentSpanId:s,parentSampled:a}=n||{};return n?{traceId:i||ae(),parentSpanId:s||ae().substring(16),spanId:ae().substring(16),sampled:a,dsc:r||{}}:{traceId:i||ae(),spanId:ae().substring(16)}}function yc(t=ae(),e=ae().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function rn(t,e=[]){return[t,e]}function db(t,e){const[n,r]=t;return[n,[...r,e]]}function Nr(t,e){const n=t[1];for(const r of n){const i=r[0].type;if(e(r,i))return!0}return!1}function fb(t,e){return Nr(t,(n,r)=>e.includes(r))}function Eu(t,e){return(e||new TextEncoder).encode(t)}function Sp(t,e){const[n,r]=t;let i=JSON.stringify(n);function s(a){typeof i=="string"?i=typeof a=="string"?i+a:[Eu(i,e),a]:i.push(typeof a=="string"?Eu(a,e):a)}for(const a of r){const[o,u]=a;if(s(`
${JSON.stringify(o)}
`),typeof u=="string"||u instanceof Uint8Array)s(u);else{let c;try{c=JSON.stringify(u)}catch{c=JSON.stringify(_t(u))}s(c)}}return typeof i=="string"?i:hb(i)}function hb(t){const e=t.reduce((i,s)=>i+s.length,0),n=new Uint8Array(e);let r=0;for(const i of t)n.set(i,r),r+=i.length;return n}function pb(t,e,n){let r=typeof t=="string"?e.encode(t):t;function i(u){const c=r.subarray(0,u);return r=r.subarray(u+1),c}function s(){let u=r.indexOf(10);return u<0&&(u=r.length),JSON.parse(n.decode(i(u)))}const a=s(),o=[];for(;r.length;){const u=s(),c=typeof u.length=="number"?u.length:void 0;o.push([u,c?i(c):s()])}return[a,o]}function gb(t,e){const n=typeof t.data=="string"?Eu(t.data,e):t.data;return[je({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const mb={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 md(t){return mb[t]}function vc(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Ep(t,e,n,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:nr(r)},...i&&{trace:je({...i})}}}function _b(t,e,n){const r=[{type:"client_report"},{timestamp:Wi(),discarded_events:t}];return rn(e?{dsn:e}:{},[r])}const yb=60*1e3;function Tp(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?yb:r-e}function vb(t,e){return t[e]||t.all||0}function Ip(t,e,n=Date.now()){return vb(t,e)>n}function wp(t,{statusCode:e,headers:n},r=Date.now()){const i={...t},s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(const o of s.trim().split(",")){const[u,c,,,l]=o.split(":",5),d=parseInt(u,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=r+f;else for(const h of c.split(";"))h==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(i[h]=r+f):i[h]=r+f}else a?i.all=r+Tp(a,r):e===429&&(i.all=r+60*1e3);return i}function bb(t,e){return t(e.stack||"",1)}function Sb(t,e){const n={type:e.name||e.constructor.name,value:e.message},r=bb(t,e);return r.length&&(n.stacktrace={frames:r}),n}function Eb(t,e){return t??e()}function Qs(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...a)=>n.call(e,...a)),e=void 0)}return n}const N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qi="production";function bc(){return Yh("globalEventProcessors",()=>[])}function Cp(t){bc().push(t)}function da(t,e,n,r=0){return new Zr((i,s)=>{const a=t[r];if(e===null||typeof a!="function")i(e);else{const o=a({...e},n);N&&a.id&&o===null&&T.log(`Event processor "${a.id}" dropped event`),Gi(o)?o.then(u=>da(t,u,n,r+1).then(i)).then(null,s):da(t,o,n,r+1).then(i).then(null,s)}})}function kp(t){const e=tn(),n={sid:ae(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Tb(n)};return t&&Jn(n,t),n}function Jn(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||tn(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:ae()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function xp(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),Jn(t,n)}function Tb(t){return je({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}const Ib=0,Rp=1;function Sc(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:i,parent_span_id:s,status:a,tags:o,origin:u}=oe(t);return je({data:r,op:i,parent_span_id:s,span_id:e,status:a,tags:o,trace_id:n,origin:u})}function Ja(t){const{traceId:e,spanId:n}=t.spanContext(),r=Ec(t);return yc(e,n,r)}function Qa(t){return typeof t=="number"?_d(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?_d(t.getTime()):tn()}function _d(t){return t>9999999999?t/1e3:t}function oe(t){return wb(t)?t.getSpanJSON():typeof t.toJSON=="function"?t.toJSON():{}}function wb(t){return typeof t.getSpanJSON=="function"}function Ec(t){const{traceFlags:e}=t.spanContext();return!!(e&Rp)}function Tc(t,e,n,r,i,s){const{normalizeDepth:a=3,normalizeMaxBreadth:o=1e3}=t,u={...e,event_id:e.event_id||n.event_id||ae(),timestamp:e.timestamp||Wi()},c=n.integrations||t.integrations.map(y=>y.name);Cb(u,t),Rb(u,c),e.type===void 0&&kb(u,t.stackParser);const l=Ab(r,n.captureContext);n.mechanism&&Xn(u,n.mechanism);const d=i&&i.getEventProcessors?i.getEventProcessors():[],f=eS().getScopeData();if(s){const y=s.getScopeData();vd(f,y)}if(l){const y=l.getScopeData();vd(f,y)}const h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),Dp(u,f);const p=[...d,...bc(),...f.eventProcessors];return da(p,u,n).then(y=>(y&&xb(y),typeof a=="number"&&a>0?Ob(y,a,o):y))}function Cb(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:qi),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=Rr(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=Rr(a.value,s));const o=t.request;o&&o.url&&(o.url=Rr(o.url,s))}const yd=new WeakMap;function kb(t,e){const n=V._sentryDebugIds;if(!n)return;let r;const i=yd.get(e);i?r=i:(r=new Map,yd.set(e,r));const s=Object.keys(n).reduce((a,o)=>{let u;const c=r.get(o);c?u=c:(u=e(o),r.set(o,u));for(let l=u.length-1;l>=0;l--){const d=u[l];if(d.filename){a[d.filename]=n[o];break}}return a},{});try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=s[o.filename])})})}catch{}}function xb(t){const e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:e[r]})})}function Rb(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Ob(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>({...i,...i.data&&{data:_t(i.data,e,n)}}))},...t.user&&{user:_t(t.user,e,n)},...t.contexts&&{contexts:_t(t.contexts,e,n)},...t.extra&&{extra:_t(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=_t(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>{const s=oe(i).data;return s&&(i.data=_t(s,e,n)),i})),r}function Ab(t,e){if(!e)return t;const n=t?t.clone():new $r;return n.update(e),n}function Db(t){if(t)return Mb(t)?{captureContext:t}:Nb(t)?{captureContext:t}:t}function Mb(t){return t instanceof $r||typeof t=="function"}const Lb=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Nb(t){return Object.keys(t).some(e=>Lb.includes(e))}function Vi(t,e){return ue().captureException(t,Db(e))}function fa(t,e){const n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return ue().captureMessage(t,n,r)}function Ki(t,e){return ue().captureEvent(t,e)}function Pb(t){ue().configureScope(t)}function nn(t,e){ue().addBreadcrumb(t,e)}function Op(t,e){ue().setContext(t,e)}function $b(t){ue().setExtras(t)}function Ub(t,e){ue().setExtra(t,e)}function Fb(t){ue().setTags(t)}function Bb(t,e){ue().setTag(t,e)}function Hb(t){ue().setUser(t)}function Rn(...t){const e=ue();if(t.length===2){const[n,r]=t;return n?e.withScope(()=>(e.getStackTop().scope=n,r(n))):e.withScope(r)}return e.withScope(t[0])}function jb(t){return eo(()=>t(Ut()))}function Tu(t,e){return Rn(n=>(n.setSpan(t),e(n)))}function Gb(t,e){return ue().startTransaction({...t},e)}async function zb(t){const e=j();return e?e.flush(t):(N&&T.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Wb(t){const e=j();return e?e.close(t):(N&&T.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function qb(){return ue().lastEventId()}function j(){return ue().getClient()}function Vb(){return!!j()}function we(){return ue().getScope()}function Iu(t){const e=j(),n=Ut(),r=we(),{release:i,environment:s=qi}=e&&e.getOptions()||{},{userAgent:a}=V.navigator||{},o=kp({release:i,environment:s,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...t}),u=n.getSession();return u&&u.status==="ok"&&Jn(u,{status:"exited"}),Ic(),n.setSession(o),r.setSession(o),o}function Ic(){const t=Ut(),e=we(),n=e.getSession()||t.getSession();n&&xp(n),Ap(),t.setSession(),e.setSession()}function Ap(){const t=Ut(),e=we(),n=j(),r=e.getSession()||t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function wu(t=!1){if(t){Ic();return}Ap()}function ha(t){return t.transaction}function Za(t,e,n){const r=e.getOptions(),{publicKey:i}=e.getDsn()||{},{segment:s}=n&&n.getUser()||{},a=je({environment:r.environment||qi,release:r.release,user_segment:s,public_key:i,trace_id:t});return e.emit&&e.emit("createDsc",a),a}function Pr(t){const e=j();if(!e)return{};const n=Za(oe(t).trace_id||"",e,we()),r=ha(t);if(!r)return n;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:s,source:a}=r.metadata;s!=null&&(n.sample_rate=`${s}`);const o=oe(r);return a&&a!=="url"&&(n.transaction=o.description),n.sampled=String(Ec(r)),e.emit&&e.emit("createDsc",n),n}function Dp(t,e){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=e;Kb(t,e),r&&Jb(t,r),Qb(t,n),Yb(t,i),Xb(t,s)}function vd(t,e){const{extra:n,tags:r,user:i,contexts:s,level:a,sdkProcessingMetadata:o,breadcrumbs:u,fingerprint:c,eventProcessors:l,attachments:d,propagationContext:f,transactionName:h,span:p}=e;gi(t,"extra",n),gi(t,"tags",r),gi(t,"user",i),gi(t,"contexts",s),gi(t,"sdkProcessingMetadata",o),a&&(t.level=a),h&&(t.transactionName=h),p&&(t.span=p),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),c.length&&(t.fingerprint=[...t.fingerprint,...c]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...f}}function gi(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function Kb(t,e){const{extra:n,tags:r,user:i,contexts:s,level:a,transactionName:o}=e,u=je(n);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const c=je(r);c&&Object.keys(c).length&&(t.tags={...c,...t.tags});const l=je(i);l&&Object.keys(l).length&&(t.user={...l,...t.user});const d=je(s);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts}),a&&(t.level=a),o&&(t.transaction=o)}function Yb(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Xb(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Jb(t,e){t.contexts={trace:Sc(e),...t.contexts};const n=ha(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:Pr(e),...t.sdkProcessingMetadata};const r=oe(n).description;r&&(t.tags={transaction:r,...t.tags})}}function Qb(t,e){t.fingerprint=t.fingerprint?up(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}const Zb=100;let $o,$r=class Zs{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=bd()}static clone(e){return e?e.clone():new Zs}clone(){const e=new Zs;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Jn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e;if(n instanceof Zs){const 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(Yn(n)){const r=e;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=bd(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:Zb;if(r<=0)return this;const i={timestamp:Wi(),...e},s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>r?s.slice(-r):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:n,_contexts:r,_tags:i,_extra:s,_user:a,_level:o,_fingerprint:u,_eventProcessors:c,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:f,_span:h}=this;return{breadcrumbs:e,attachments:n,contexts:r,tags:i,extra:s,user:a,level:o,fingerprint:u||[],eventProcessors:c,propagationContext:l,sdkProcessingMetadata:d,transactionName:f,span:h}}applyToEvent(e,n={},r=[]){Dp(e,this.getScopeData());const i=[...r,...bc(),...this._eventProcessors];return da(i,e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n&&n.event_id?n.event_id:ae();if(!this._client)return T.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureMessage(e,n,r){const i=r&&r.event_id?r.event_id:ae();if(!this._client)return T.warn("No client configured on scope - will not capture message!"),i;const s=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:s,...r,event_id:i},this),i}captureEvent(e,n){const r=n&&n.event_id?n.event_id:ae();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(T.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}};function eS(){return $o||($o=new $r),$o}function bd(){return{traceId:ae(),spanId:ae().substring(16)}}const pa="7.120.0",Mp=parseFloat(pa),tS=100;let wc=class{constructor(e,n,r,i=Mp){this._version=i;let s;n?s=n:(s=new $r,s.setClient(e));let a;r?a=r:(a=new $r,a.setClient(e)),this._stack=[{scope:s}],e&&this.bindClient(e),this._isolationScope=a}isOlderThan(e){return this._version<e}bindClient(e){const n=this.getStackTop();n.client=e,n.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){const n=this.pushScope();let r;try{r=e(n)}catch(i){throw this.popScope(),i}return Gi(r)?r.then(i=>(this.popScope(),i),i=>{throw this.popScope(),i}):(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(e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:ae(),i=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:i,...n,event_id:r}),r}captureMessage(e,n,r){const i=this._lastEventId=r&&r.event_id?r.event_id:ae(),s=new Error(e);return this.getScope().captureMessage(e,n,{originalException:e,syntheticException:s,...r,event_id:i}),i}captureEvent(e,n){const r=n&&n.event_id?n.event_id:ae();return e.type||(this._lastEventId=r),this.getScope().captureEvent(e,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){const{scope:r,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:a=tS}=i.getOptions&&i.getOptions()||{};if(a<=0)return;const u={timestamp:Wi(),...e},c=s?Tn(()=>s(u,n)):u;c!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",c,n),r.addBreadcrumb(c,a))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,n){this.getScope().setTag(e,n),this.getIsolationScope().setTag(e,n)}setExtra(e,n){this.getScope().setExtra(e,n),this.getIsolationScope().setExtra(e,n)}setContext(e,n){this.getScope().setContext(e,n),this.getIsolationScope().setContext(e,n)}configureScope(e){const{scope:n,client:r}=this.getStackTop();r&&e(n)}run(e){const n=Cu(this);try{e(this)}finally{Cu(n)}}getIntegration(e){const n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return N&&T.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){const r=this._callExtensionMethod("startTransaction",e,n);return N&&!r&&(this.getClient()?T.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):T.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&xp(r),this._sendSessionUpdate(),n.setSession()}startSession(e){const{scope:n,client:r}=this.getStackTop(),{release:i,environment:s=qi}=r&&r.getOptions()||{},{userAgent:a}=V.navigator||{},o=kp({release:i,environment:s,user:n.getUser(),...a&&{userAgent:a},...e}),u=n.getSession&&n.getSession();return u&&u.status==="ok"&&Jn(u,{status:"exited"}),this.endSession(),n.setSession(o),o}shouldSendDefaultPii(){const e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:n}=this.getStackTop(),r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(e,...n){const i=ei().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[e]=="function")return i.extensions[e].apply(this,n);N&&T.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function ei(){return V.__SENTRY__=V.__SENTRY__||{extensions:{},hub:void 0},V}function Cu(t){const e=ei(),n=ga(e);return Lp(e,t),n}function ue(){const t=ei();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return nS(t)}function Ut(){return ue().getIsolationScope()}function nS(t=ei()){return(!rS(t)||ga(t).isOlderThan(Mp))&&Lp(t,new wc),ga(t)}function eo(t,e={}){const n=ei();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(t,e):t()}function rS(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function ga(t){return Yh("hub",()=>new wc,t)}function Lp(t,e){if(!t)return!1;const n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}function $t(t){return(t||ue()).getScope().getTransaction()}const iS=_c;let Sd=!1;function sS(){Sd||(Sd=!0,fp(ku),hp(ku))}function ku(){const t=$t();if(t){const e="internal_error";N&&T.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}ku.tag="sentry_tracingErrorCallback";var Ed;(function(t){const e="ok";t.Ok=e;const n="deadline_exceeded";t.DeadlineExceeded=n;const r="unauthenticated";t.Unauthenticated=r;const i="permission_denied";t.PermissionDenied=i;const s="not_found";t.NotFound=s;const a="resource_exhausted";t.ResourceExhausted=a;const o="invalid_argument";t.InvalidArgument=o;const u="unimplemented";t.Unimplemented=u;const c="unavailable";t.Unavailable=c;const l="internal_error";t.InternalError=l;const d="unknown_error";t.UnknownError=d;const f="cancelled";t.Cancelled=f;const h="already_exists";t.AlreadyExists=h;const p="failed_precondition";t.FailedPrecondition=p;const g="aborted";t.Aborted=g;const y="out_of_range";t.OutOfRange=y;const m="data_loss";t.DataLoss=m})(Ed||(Ed={}));function Cc(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}const aS=Cc;function to(t,e){t.setTag("http.status_code",String(e)),t.setData("http.response.status_code",e);const n=Cc(e);n!=="unknown_error"&&t.setStatus(n)}function kc(t,e,n=()=>{}){let r;try{r=t()}catch(i){throw e(i),n(),i}return oS(r,e,n)}function oS(t,e,n){return Gi(t)?t.then(r=>(n(),r),r=>{throw e(r),n(),r}):(n(),t)}function ti(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=j(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function uS(t,e,n=()=>{},r=()=>{}){const i=ue(),s=we(),a=s.getSpan(),o=ro(t),u=no(i,{parentSpan:a,spanContext:o,forceTransaction:!1,scope:s});return s.setSpan(u),kc(()=>e(u),c=>{u&&u.setStatus("internal_error"),n(c,u)},()=>{u&&u.end(),s.setSpan(a),r()})}function cS(t,e){const n=ro(t);return eo(()=>Rn(t.scope,r=>{const i=ue(),s=r.getSpan(),o=t.onlyIfParent&&!s?void 0:no(i,{parentSpan:s,spanContext:n,forceTransaction:t.forceTransaction,scope:r});return kc(()=>e(o),()=>{if(o){const{status:u}=oe(o);(!u||u==="ok")&&o.setStatus("internal_error")}},()=>o&&o.end())}))}function lS(t,e){const n=ro(t);return eo(()=>Rn(t.scope,r=>{const i=ue(),s=r.getSpan(),o=t.onlyIfParent&&!s?void 0:no(i,{parentSpan:s,spanContext:n,forceTransaction:t.forceTransaction,scope:r});function u(){o&&o.end()}return kc(()=>e(o,u),()=>{if(o&&o.isRecording()){const{status:c}=oe(o);(!c||c==="ok")&&o.setStatus("internal_error")}})}))}function Ar(t){if(!ti())return;const e=ro(t),n=ue(),r=t.scope?t.scope.getSpan():Yi();if(t.onlyIfParent&&!r)return;const a=(t.scope||we()).clone();return no(n,{parentSpan:r,spanContext:e,forceTransaction:t.forceTransaction,scope:a})}function Yi(){return we().getSpan()}const dS=({sentryTrace:t,baggage:e},n)=>{const r=we(),{traceparentData:i,dynamicSamplingContext:s,propagationContext:a}=lb(t,e);r.setPropagationContext(a),N&&i&&T.log(`[Tracing] Continuing trace ${i.traceId}.`);const o={...i,metadata:je({dynamicSamplingContext:s})};return n?eo(()=>n(o)):o};function no(t,{parentSpan:e,spanContext:n,forceTransaction:r,scope:i}){if(!ti())return;const s=Ut();let a;if(e&&!r)a=e.startChild(n);else if(e){const o=Pr(e),{traceId:u,spanId:c}=e.spanContext(),l=Ec(e);a=t.startTransaction({traceId:u,parentSpanId:c,parentSampled:l,...n,metadata:{dynamicSamplingContext:o,...n.metadata}})}else{const{traceId:o,dsc:u,parentSpanId:c,sampled:l}={...s.getPropagationContext(),...i.getPropagationContext()};a=t.startTransaction({traceId:o,parentSpanId:c,parentSampled:l,...n,metadata:{dynamicSamplingContext:u,...n.metadata}})}return i.setSpan(a),fS(a,i,s),a}function ro(t){if(t.startTime){const e={...t};return e.startTimestamp=Qa(t.startTime),delete e.startTime,e}return t}const Np="_sentryScope",Pp="_sentryIsolationScope";function fS(t,e,n){t&&(In(t,Pp,n),In(t,Np,e))}function hS(t){return{scope:t[Np],isolationScope:t[Pp]}}let Ii;function $p(t){return Ii?Ii.get(t):void 0}function Up(t){const e=$p(t);if(!e)return;const n={};for(const[,[r,i]]of e)n[r]||(n[r]=[]),n[r].push(je(i));return n}function pS(t,e,n,r,i,s){const a=Yi();if(a){const o=$p(a)||new Map,u=`${t}:${e}@${r}`,c=o.get(s);if(c){const[,l]=c;o.set(s,[u,{min:Math.min(l.min,n),max:Math.max(l.max,n),count:l.count+=1,sum:l.sum+=n,tags:l.tags}])}else o.set(s,[u,{min:n,max:n,count:1,sum:n,tags:i}]);Ii||(Ii=new WeakMap),Ii.set(a,o)}}const st="sentry.source",jn="sentry.sample_rate",Si="sentry.op",Gn="sentry.origin",gS="profile_id";let Fp=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},Bp=class Hp{constructor(e={}){this._traceId=e.traceId||ae(),this._spanId=e.spanId||ae().substring(16),this._startTime=e.startTimestamp||tn(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[Gn]:e.origin||"manual",[Si]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),e.exclusiveTime!==void 0&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[Si]}set op(e){this.setAttribute(Si,e)}get origin(){return this._attributes[Gn]}set origin(e){this.setAttribute(Gn,e)}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?Rp:Ib}}startChild(e){const n=new Hp({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=ha(this);if(n.transaction=r,N&&r){const i=e&&e.op||"< unknown op >",s=oe(n).description||"< unknown name >",a=r.spanContext().spanId,o=`[Tracing] Starting '${i}' span on transaction '${s}' (${a}).`;T.log(o),this._logMessage=o}return n}setTag(e,n){return this.tags={...this.tags,[e]:n},this}setData(e,n){return this.data={...this.data,[e]:n},this}setAttribute(e,n){n===void 0?delete this._attributes[e]:this._attributes[e]=n}setAttributes(e){Object.keys(e).forEach(n=>this.setAttribute(n,e[n]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return to(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return this._status==="ok"}finish(e){return this.end(e)}end(e){if(this._endTime)return;const n=ha(this);if(N&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&T.log(r.replace("Starting","Finishing"))}this._endTime=Qa(e)}toTraceparent(){return Ja(this)}toContext(){return je({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(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return Sc(this)}getSpanJSON(){return je({data:this._getData(),description:this._name,op:this._attributes[Si],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[Gn],_metrics_summary:Up(this),profile_id:this._attributes[gS],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(){const{data:e,_attributes:n}=this,r=Object.keys(e).length>0,i=Object.keys(n).length>0;if(!(!r&&!i))return r&&i?{...e,...n}:r?e:n}},jp=class extends Bp{constructor(e,n){super(e),this._contexts={},this._hub=n||ue(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[st]&&{source:this._attributes[st]},...this._attributes[jn]&&{sampleRate:this._attributes[jn]}}}set metadata(e){this._metadata=e}setName(e,n="custom"){this._name=e,this.setAttribute(st,n)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new Fp(e)),this.spanRecorder.add(this)}setContext(e,n){n===null?delete this._contexts[e]:this._contexts[e]=n}setMeasurement(e,n,r=""){this._measurements[e]={value:n,unit:r}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){const n=Qa(e),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const e=super.toContext();return je({...e,name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return Pr(this)}setHub(e){this._hub=e}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(e){if(this._endTime!==void 0)return;this._name||(N&&T.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(e);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){N&&T.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&oe(l).timestamp):[];if(this._trimEnd&&r.length>0){const l=r.map(d=>oe(d).timestamp).filter(Boolean);this._endTime=l.reduce((d,f)=>d>f?d:f)}const{scope:i,isolationScope:s}=hS(this),{metadata:a}=this,{source:o}=a,u={contexts:{...this._contexts,trace:Sc(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...a,capturedSpanScope:i,capturedSpanIsolationScope:s,...je({dynamicSamplingContext:Pr(this)})},_metrics_summary:Up(this),...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(N&&T.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),u.measurements=this._measurements),N&&T.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),u}};const wi={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},mS="finishReason",dr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];let _S=class extends Fp{constructor(e,n,r,i){super(i),this._pushActivity=e,this._popActivity=n,this.transactionSpanId=r}add(e){if(e.spanContext().spanId!==this.transactionSpanId){const n=e.end;e.end=(...r)=>(this._popActivity(e.spanContext().spanId),n.apply(e,r)),oe(e).timestamp===void 0&&this._pushActivity(e.spanContext().spanId)}super.add(e)}},yS=class extends jp{constructor(e,n,r=wi.idleTimeout,i=wi.finalTimeout,s=wi.heartbeatInterval,a=!1,o=!1){super(e,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=i,this._heartbeatInterval=s,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=dr[4],this._autoFinishAllowed=!o,a&&(N&&T.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=dr[3],this.end())},this._finalTimeout)}end(e){const n=Qa(e);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(mS,this._finishReason),this.spanRecorder){N&&T.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;oe(r).timestamp||(r.setStatus("cancelled"),r.end(n),N&&T.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:i,timestamp:s}=oe(r),a=i&&i<n,o=(this._finalTimeout+this._idleTimeout)/1e3,u=s&&i&&s-i<o;if(N){const c=JSON.stringify(r,void 0,2);a?u||T.log("[Tracing] discarding Span since it finished after Transaction final timeout",c):T.log("[Tracing] discarding Span since it happened after Transaction was finished",c)}return a&&u}),N&&T.log("[Tracing] flushing IdleTransaction")}else N&&T.log("[Tracing] No active IdleTransaction");if(this._onScope){const r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const n=i=>{this._finished||this._pushActivity(i)},r=i=>{this._finished||this._popActivity(i)};this.spanRecorder=new _S(n,r,this.spanContext().spanId,e),N&&T.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=dr[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(N&&T.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=dr[1],this.end(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),N&&T.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,N&&T.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(N&&T.log(`[Tracing] popActivity ${e}`),delete this.activities[e],N&&T.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=tn();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=dr[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(N&&T.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=dr[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){N&&T.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function Gp(t,e,n){if(!ti(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setAttribute(jn,Number(t.sampled)),t;let r;return typeof e.tracesSampler=="function"?(r=e.tracesSampler(n),t.setAttribute(jn,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof e.tracesSampleRate<"u"?(r=e.tracesSampleRate,t.setAttribute(jn,Number(r))):(r=1,t.setAttribute(jn,r)),zp(r)?r?(t.sampled=Math.random()<r,t.sampled?(N&&T.log(`[Tracing] starting ${t.op} transaction - ${oe(t).description}`),t):(N&&T.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),t)):(N&&T.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),t.sampled=!1,t):(N&&T.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function zp(t){return qh(t)||!(typeof t=="number"||typeof t=="boolean")?(N&&T.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t<0||t>1?(N&&T.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function vS(){const e=this.getScope().getSpan();return e?{"sentry-trace":Ja(e)}:{}}function bS(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=t.instrumenter||"sentry";i!==s&&(N&&T.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter.
The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),t.sampled=!1);let a=new jp(t,this);return a=Gp(a,r,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...e}),a.isRecording()&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function ma(t,e,n,r,i,s,a,o=!1){const u=t.getClient(),c=u&&u.getOptions()||{};let l=new yS(e,t,n,r,a,i,o);return l=Gp(l,c,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...s}),l.isRecording()&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),u&&u.emit&&u.emit("startTransaction",l),l}function xc(){const t=ei();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=bS),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=vS),sS())}function Wp(t,e,n){const r=$t();r&&r.setMeasurement(t,e,n)}function SS(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function ES(t,e,n,r){const i=vc(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&e&&{dsn:nr(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return rn(s,[a])}function qp(t,e,n,r){const i=vc(n),s=t.type&&t.type!=="replay_event"?t.type:"event";SS(t,n&&n.sdk);const a=Ep(t,i,r,e);return delete t.sdkProcessingMetadata,rn(a,[[{type:s},t]])}const TS="7";function Vp(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function IS(t){return`${Vp(t)}${t.projectId}/envelope/`}function wS(t,e){return bv({sentry_key:t.publicKey,sentry_version:TS,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Kp(t,e={}){const n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${IS(t)}?${wS(t,r)}`}function CS(t,e){const n=tp(t);if(!n)return"";const r=`${Vp(n)}embed/error-page/`;let i=`dsn=${nr(n)}`;for(const s in e)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const a=e.user;if(!a)continue;a.name&&(i+=`&name=${encodeURIComponent(a.name)}`),a.email&&(i+=`&email=${encodeURIComponent(a.email)}`)}else i+=`&${encodeURIComponent(s)}=${encodeURIComponent(e[s])}`;return`${r}?${i}`}const Td=[];function kS(t){const e={};return t.forEach(n=>{const{name:r}=n,i=e[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.keys(e).map(n=>e[n])}function xS(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(a=>{a.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...e,...n]:typeof n=="function"?r=up(n(e)):r=e;const i=kS(r),s=AS(i,a=>a.name==="Debug");if(s!==-1){const[a]=i.splice(s,1);i.push(a)}return i}function RS(t,e){const n={};return e.forEach(r=>{r&&Yp(t,r,n)}),n}function Id(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Yp(t,e,n){if(n[e.name]){N&&T.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Td.indexOf(e.name)===-1&&(e.setupOnce(Cp,ue),Td.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),t.on&&typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,s)=>r(i,s,t))}if(t.addEventProcessor&&typeof e.processEvent=="function"){const r=e.processEvent.bind(e),i=Object.assign((s,a)=>r(s,a,t),{id:e.name});t.addEventProcessor(i)}N&&T.log(`Integration installed: ${e.name}`)}function OS(t){const e=j();if(!e||!e.addIntegration){N&&T.warn(`Cannot add integration "${t.name}" because no SDK Client is available.`);return}e.addIntegration(t)}function AS(t,e){for(let n=0;n<t.length;n++)if(e(t[n])===!0)return n;return-1}function Ee(t,e){return Object.assign(function(...r){return e(...r)},{id:t})}function DS(t,e,n,r){const i=Object.entries(je(r)).sort((s,a)=>s[0].localeCompare(a[0]));return`${t}${e}${n}${i}`}function MS(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e&=e}return e>>>0}function LS(t){let e="";for(const n of t){const r=Object.entries(n.tags),i=r.length>0?`|#${r.map(([s,a])=>`${s}:${a}`).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${i}|T${n.timestamp}
`}return e}function NS(t){return t.replace(/[^\w]+/gi,"_")}function PS(t){return t.replace(/[^\w\-.]+/gi,"_")}function $S(t){return t.replace(/[^\w\-./]+/gi,"")}const US=[[`
`,"\\n"],["\r","\\r"],["	","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function FS(t){for(const[e,n]of US)if(t===e)return n;return t}function BS(t){return[...t].reduce((e,n)=>e+FS(n),"")}function HS(t){const e={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=$S(n);e[r]=BS(String(t[n]))}return e}function jS(t,e,n,r){const i={sent_at:new Date().toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&e&&(i.dsn=nr(e));const s=GS(t);return rn(i,[s])}function GS(t){const e=LS(t);return[{type:"statsd",length:e.length},e]}const wd="Not capturing exception because it's already been captured.";class zS{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=tp(e.dsn):N&&T.warn("No DSN provided, client will not send events."),this._dsn){const n=Kp(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){if(cd(e)){N&&T.log(wd);return}let i=n&&n.event_id;return this._process(this.eventFromException(e,n).then(s=>this._captureEvent(s,n,r)).then(s=>{i=s})),i}captureMessage(e,n,r,i){let s=r&&r.event_id;const a=fc(e)?e:String(e),o=hc(e)?this.eventFromMessage(a,n,r):this.eventFromException(e,r);return this._process(o.then(u=>this._captureEvent(u,r,i)).then(u=>{s=u})),s}captureEvent(e,n,r){if(n&&n.originalException&&cd(n.originalException)){N&&T.log(wd);return}let i=n&&n.event_id;const a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,n,a||r).then(o=>{i=o})),i}captureSession(e){typeof e.release!="string"?N&&T.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Jn(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(i=>r&&i))):Lr(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return N&&T.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const n=this._integrations[e.name];Yp(this,e,this._integrations),n||Id(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=qp(e,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=db(r,gb(s,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(r);i&&i.then(s=>this.emit("afterSendEvent",e,s),null)}sendSession(e){const n=ES(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){const i=typeof r=="number"?r:1,s=`${e}:${n}`;N&&T.log(`Recording outcome: "${s}"${i>1?` (${i} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+i}}captureAggregateMetrics(e){N&&T.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const n=jS(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(e,n){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(n)}emit(e,...n){this._hooks[e]&&this._hooks[e].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=RS(this,e),Id(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,n){let r=!1,i=!1;const s=n.exception&&n.exception.values;if(s){i=!0;for(const u of s){const c=u.mechanism;if(c&&c.handled===!1){r=!0;break}}}const a=e.status==="ok";(a&&e.errors===0||a&&r)&&(Jn(e,{...r&&{status:"crashed"},errors:e.errors||Number(i||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Zr(n=>{let r=0;const i=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),n(!0)):(r+=i,e&&r>=e&&(clearInterval(s),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,i=Ut()){const s=this.getOptions(),a=Object.keys(this._integrations);return!n.integrations&&a.length>0&&(n.integrations=a),this.emit("preprocessEvent",e,n),Tc(s,e,n,r,this,i).then(o=>{if(o===null)return o;const u={...i.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(o.contexts&&o.contexts.trace)&&u){const{traceId:l,spanId:d,parentSpanId:f,dsc:h}=u;o.contexts={trace:{trace_id:l,span_id:d,parent_span_id:f},...o.contexts};const p=h||Za(l,this,r);o.sdkProcessingMetadata={dynamicSamplingContext:p,...o.sdkProcessingMetadata}}return o})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(i=>i.event_id,i=>{if(N){const s=i;s.logLevel==="log"?T.log(s.message):T.warn(s)}})}_processEvent(e,n,r){const i=this.getOptions(),{sampleRate:s}=i,a=Jp(e),o=Xp(e),u=e.type||"error",c=`before send for type \`${u}\``;if(o&&typeof s=="number"&&Math.random()>s)return this.recordDroppedEvent("sample_rate","error",e),mc(new Dt(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const l=u==="replay_event"?"replay":u,f=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,f).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",l,e),new Dt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return h;const g=qS(i,h,n);return WS(g,c)}).then(h=>{if(h===null){if(this.recordDroppedEvent("before_send",l,e),a){const m=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",m)}throw new Dt(`${c} returned \`null\`, will not send event.`,"log")}const p=r&&r.getSession();if(!a&&p&&this._updateSessionFromEvent(p,h),a){const y=h.sdkProcessingMetadata&&h.sdkProcessingMetadata.spanCountBeforeProcessing||0,m=h.spans?h.spans.length:0,v=y-m;v>0&&this.recordDroppedEvent("before_send","span",v)}const g=h.transaction_info;if(a&&g&&h.transaction!==e.transaction){const y="custom";h.transaction_info={...g,source:y}}return this.sendEvent(h,n),h}).then(null,h=>{throw h instanceof Dt?h:(this.captureException(h,{data:{__sentry__:!0},originalException:h}),new Dt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${h}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,n=>{N&&T.error("Error while sending event:",n)});N&&T.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{const[r,i]=n.split(":");return{reason:r,category:i,quantity:e[n]}})}}function WS(t,e){const n=`${e} must return \`null\` or a valid event.`;if(Gi(t))return t.then(r=>{if(!Yn(r)&&r!==null)throw new Dt(n);return r},r=>{throw new Dt(`${e} rejected with ${r}`)});if(!Yn(t)&&t!==null)throw new Dt(n);return t}function qS(t,e,n){const{beforeSend:r,beforeSendTransaction:i}=t;if(Xp(e)&&r)return r(e,n);if(Jp(e)&&i){if(e.spans){const s=e.spans.length;e.sdkProcessingMetadata={...e.sdkProcessingMetadata,spanCountBeforeProcessing:s}}return i(e,n)}return e}function Xp(t){return t.type===void 0}function Jp(t){return t.type==="transaction"}function Qp(t){const e=j();!e||!e.addEventProcessor||e.addEventProcessor(t)}const Zp="c",eg="g",Rc="s",tg="d",VS=5e3;class KS{constructor(e){this._value=e}get weight(){return 1}add(e){this._value+=e}toString(){return`${this._value}`}}class YS{constructor(e){this._last=e,this._min=e,this._max=e,this._sum=e,this._count=1}get weight(){return 5}add(e){this._last=e,e<this._min&&(this._min=e),e>this._max&&(this._max=e),this._sum+=e,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class XS{constructor(e){this._value=[e]}get weight(){return this._value.length}add(e){this._value.push(e)}toString(){return this._value.join(":")}}class JS{constructor(e){this.first=e,this._value=new Set([e])}get weight(){return this._value.size}add(e){this._value.add(e)}toString(){return Array.from(this._value).map(e=>typeof e=="string"?MS(e):e).join(":")}}const QS={[Zp]:KS,[eg]:YS,[tg]:XS,[Rc]:JS};function ZS(t,e){e.debug===!0&&(N?T.enable():Tn(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),we().update(e.initialScope);const r=new t(e);ng(r),eE(r)}function ng(t){const n=ue().getStackTop();n.client=t,n.scope.setClient(t)}function eE(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}const tE=30;function Oc(t,e,n=nb(t.bufferSize||tE)){let r={};const i=a=>n.drain(a);function s(a){const o=[];if(Nr(a,(d,f)=>{const h=md(f);if(Ip(r,h)){const p=Cd(d,f);t.recordDroppedEvent("ratelimit_backoff",h,p)}else o.push(d)}),o.length===0)return Lr();const u=rn(a[0],o),c=d=>{Nr(u,(f,h)=>{const p=Cd(f,h);t.recordDroppedEvent(d,md(h),p)})},l=()=>e({body:Sp(u,t.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&N&&T.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=wp(r,d),d),d=>{throw c("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof Dt)return N&&T.error("Skipped sending event because buffer is full."),c("queue_overflow"),Lr();throw d})}return s.__sentry__baseTransport__=!0,{send:s,flush:i}}function Cd(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}const nE=100,kd=5e3,rE=36e5;function Uo(t,e){N&&T.info(`[Offline]: ${t}`,e)}function iE(t){return e=>{const n=t(e),r=e.createStore?e.createStore(e):void 0;let i=kd,s;function a(l,d,f){return fb(l,["replay_event","replay_recording","client_report"])?!1:e.shouldStore?e.shouldStore(l,d,f):!0}function o(l){r&&(s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const d=await r.pop();d&&(Uo("Attempting to send previously queued event"),c(d).catch(f=>{Uo("Failed to retry sending",f)}))},l),typeof s!="number"&&s.unref&&s.unref())}function u(){s||(o(i),i=Math.min(i*2,rE))}async function c(l){try{const d=await n.send(l);let f=nE;if(d){if(d.headers&&d.headers["retry-after"])f=Tp(d.headers["retry-after"]);else if((d.statusCode||0)>=400)return d}return o(f),i=kd,d}catch(d){if(r&&await a(l,d,i))return await r.insert(l),u(),Uo("Error sending. Event queued",d),{};throw d}}return e.flushAtStartup&&u(),{send:c,flush:l=>n.flush(l)}}}function rg(t,e){let n;return Nr(t,(r,i)=>(e.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function sE(t,e){return n=>{const r=t(n);return{...r,send:async i=>{const s=rg(i,["event","transaction","profile","replay_event"]);return s&&(s.release=e),r.send(i)}}}}function aE(t,e){return rn(e?{...t[0],dsn:e}:t[0],t[1])}function oE(t,e){return n=>{const r=t(n),i=new Map;function s(u,c){const l=c?`${u}:${c}`:u;let d=i.get(l);if(!d){const f=Zh(u);if(!f)return;const h=Kp(f,n.tunnel);d=c?sE(t,c)({...n,url:h}):t({...n,url:h}),i.set(l,d)}return[u,d]}async function a(u){function c(f){const h=f&&f.length?f:["event"];return rg(u,h)}const l=e({envelope:u,getEvent:c}).map(f=>typeof f=="string"?s(f,void 0):s(f.dsn,f.release)).filter(f=>!!f);return l.length===0&&l.push(["",r]),(await Promise.all(l.map(([f,h])=>h.send(aE(u,f)))))[0]}async function o(u){const c=[await r.flush(u)];for(const[,l]of i)c.push(await l.flush(u));return c.every(l=>l)}return{send:a,flush:o}}}function uE(t,e){const n={sent_at:new Date().toISOString()};e&&(n.dsn=nr(e));const r=t.map(cE);return rn(n,r)}function cE(t){return[{type:"span"},t]}function ig(t,e){const n=e&&fE(e)?e.getClient():e,r=n&&n.getDsn(),i=n&&n.getOptions().tunnel;return dE(t,r)||lE(t,i)}function lE(t,e){return e?xd(t)===xd(e):!1}function dE(t,e){return e?t.includes(e.host):!1}function xd(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function fE(t){return t.getClient!==void 0}function hE(t,...e){const n=new String(String.raw(t,...e));return n.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=e,n}function sg(t,e,n=[e],r="npm"){const i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${e}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:pa})),version:pa}),t._metadata=i}const ag=new Map,Rd=new Set;function pE(t){if(V._sentryModuleMetadata)for(const e of Object.keys(V._sentryModuleMetadata)){const n=V._sentryModuleMetadata[e];if(Rd.has(e))continue;Rd.add(e);const r=t(e);for(const i of r.reverse())if(i.filename){ag.set(i.filename,n);break}}}function gE(t,e){return pE(t),ag.get(e)}function mE(t,e){try{e.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename)continue;const i=gE(t,r.filename);i&&(r.module_metadata=i)}})}catch{}}function _E(t){try{t.exception.values.forEach(e=>{if(e.stacktrace)for(const n of e.stacktrace.frames||[])delete n.module_metadata})}catch{}}const og="ModuleMetadata",yE=()=>({name:og,setupOnce(){},setup(t){typeof t.on=="function"&&t.on("beforeEnvelope",e=>{Nr(e,(n,r)=>{if(r==="event"){const i=Array.isArray(n)?n[1]:void 0;i&&(_E(i),n[1]=i)}})})},processEvent(t,e,n){const r=n.getOptions().stackParser;return mE(r,t),t}}),ug=yE,vE=Ee(og,ug),bE=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],SE=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],cg="InboundFilters",EE=(t={})=>({name:cg,setupOnce(){},processEvent(e,n,r){const i=r.getOptions(),s=TE(t,i);return IE(e,s)?null:e}}),Ac=EE,lg=Ee(cg,Ac);function TE(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:bE],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:SE],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function IE(t,e){return e.ignoreInternal&&OE(t)?(N&&T.warn(`Event dropped due to being internal Sentry Error.
Event: ${_n(t)}`),!0):wE(t,e.ignoreErrors)?(N&&T.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${_n(t)}`),!0):CE(t,e.ignoreTransactions)?(N&&T.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${_n(t)}`),!0):kE(t,e.denyUrls)?(N&&T.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${_n(t)}.
Url: ${_a(t)}`),!0):xE(t,e.allowUrls)?!1:(N&&T.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${_n(t)}.
Url: ${_a(t)}`),!0)}function wE(t,e){return t.type||!e||!e.length?!1:RE(t).some(n=>Jr(n,e))}function CE(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?Jr(n,e):!1}function kE(t,e){if(!e||!e.length)return!1;const n=_a(t);return n?Jr(n,e):!1}function xE(t,e){if(!e||!e.length)return!0;const n=_a(t);return n?Jr(n,e):!0}function RE(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),N&&e.length===0&&T.error(`Could not extract message for event ${_n(t)}`),e}function OE(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function AE(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function _a(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?AE(e):null}catch{return N&&T.error(`Cannot extract url for event ${_n(t)}`),null}}let Od;const dg="FunctionToString",Ad=new WeakMap,DE=()=>({name:dg,setupOnce(){Od=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=gc(this),n=Ad.has(j())&&e!==void 0?e:this;return Od.apply(n,t)}}catch{}},setup(t){Ad.set(t,!0)}}),Dc=DE,fg=Ee(dg,Dc),ME="cause",LE=5,hg="LinkedErrors",NE=(t={})=>{const e=t.limit||LE,n=t.key||ME;return{name:hg,setupOnce(){},preprocessEvent(r,i,s){const a=s.getOptions();Kh(Sb,a.stackParser,a.maxValueLength,n,e,r,i)}}},PE=NE,$E=Ee(hg,PE),UE=Object.freeze(Object.defineProperty({__proto__:null,FunctionToString:fg,InboundFilters:lg,LinkedErrors:$E},Symbol.toStringTag,{value:"Module"}));class FE{constructor(e){this._client=e,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),VS)}add(e,n,r,i="none",s={},a=tn()){const o=Math.floor(a),u=PS(n),c=HS(s),l=NS(i),d=DS(e,u,l,c);let f=this._buckets.get(d);const h=f&&e===Rc?f.metric.weight:0;f?(f.metric.add(r),f.timestamp<o&&(f.timestamp=o)):(f={metric:new QS[e](r),timestamp:o,metricType:e,name:u,unit:l,tags:c},this._buckets.set(d,f));const p=typeof r=="string"?f.metric.weight-h:r;pS(e,u,p,l,s,d)}flush(){if(this._buckets.size!==0){if(this._client.captureAggregateMetrics){const e=Array.from(this._buckets).map(([,n])=>n);this._client.captureAggregateMetrics(e)}this._buckets.clear()}}close(){clearInterval(this._interval),this.flush()}}const pg="MetricsAggregator",BE=()=>({name:pg,setupOnce(){},setup(t){t.metricsAggregator=new FE(t)}}),gg=BE,HE=Ee(pg,gg);function io(t,e,n,r={}){const i=j(),s=we();if(i){if(!i.metricsAggregator){N&&T.warn("No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs");return}const{unit:a,tags:o,timestamp:u}=r,{release:c,environment:l}=i.getOptions(),d=s.getTransaction(),f={};c&&(f.release=c),l&&(f.environment=l),d&&(f.transaction=oe(d).description||""),N&&T.log(`Adding value of ${n} to ${t} metric ${e}`),i.metricsAggregator.add(t,e,n,a,{...f,...o},u)}}function jE(t,e=1,n){io(Zp,t,e,n)}function GE(t,e,n){io(tg,t,e,n)}function zE(t,e,n){io(Rc,t,e,n)}function WE(t,e,n){io(eg,t,e,n)}const qE={increment:jE,distribution:GE,set:zE,gauge:WE,MetricsAggregator:HE,metricsAggregatorIntegration:gg},VE=UE,te=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,B=V;function mg(){B.document?B.document.addEventListener("visibilitychange",()=>{const t=$t();if(B.document.hidden&&t){const e="cancelled",{op:n,status:r}=oe(t);te&&T.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.end()}}):te&&T.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Xi=(t,e,n)=>{let r,i;return s=>{e.value>=0&&(s||n)&&(i=e.value-(r||0),(i||r===void 0)&&(r=e.value,e.delta=i,t(e)))}},KE=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,YE=()=>{const t=B.performance.timing,e=B.performance.navigation.type,n={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(const r in t)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(t[r]-t.navigationStart,0));return n},so=()=>B.__WEB_VITALS_POLYFILL__?B.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||YE()):B.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Mc=()=>{const t=so();return t&&t.activationStart||0},Ji=(t,e)=>{const n=so();let r="navigate";return n&&(B.document&&B.document.prerendering||Mc()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:KE(),navigationType:r}},ni=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(i=>{e(i.getEntries())});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},Qi=(t,e)=>{const n=r=>{(r.type==="pagehide"||B.document.visibilityState==="hidden")&&(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};B.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},XE=(t,e={})=>{const n=Ji("CLS",0);let r,i=0,s=[];const a=u=>{u.forEach(c=>{if(!c.hadRecentInput){const l=s[0],d=s[s.length-1];i&&s.length!==0&&c.startTime-d.startTime<1e3&&c.startTime-l.startTime<5e3?(i+=c.value,s.push(c)):(i=c.value,s=[c]),i>n.value&&(n.value=i,n.entries=s,r&&r())}})},o=ni("layout-shift",a);if(o){r=Xi(t,n,e.reportAllChanges);const u=()=>{a(o.takeRecords()),r(!0)};return Qi(u),u}};let ya=-1;const JE=()=>{B.document&&B.document.visibilityState&&(ya=B.document.visibilityState==="hidden"&&!B.document.prerendering?0:1/0)},QE=()=>{Qi(({timeStamp:t})=>{ya=t},!0)},Lc=()=>(ya<0&&(JE(),QE()),{get firstHiddenTime(){return ya}}),ZE=t=>{const e=Lc(),n=Ji("FID");let r;const i=o=>{o.startTime<e.firstHiddenTime&&(n.value=o.processingStart-o.startTime,n.entries.push(o),r(!0))},s=o=>{o.forEach(i)},a=ni("first-input",s);r=Xi(t,n),a&&Qi(()=>{s(a.takeRecords()),a.disconnect()},!0)};let _g=0,Fo=1/0,xs=0;const e0=t=>{t.forEach(e=>{e.interactionId&&(Fo=Math.min(Fo,e.interactionId),xs=Math.max(xs,e.interactionId),_g=xs?(xs-Fo)/7+1:0)})};let xu;const t0=()=>xu?_g:performance.interactionCount||0,n0=()=>{"interactionCount"in performance||xu||(xu=ni("event",e0,{type:"event",buffered:!0,durationThreshold:0}))},yg=()=>t0(),Dd=10,Kt=[],Bo={},Md=t=>{const e=Kt[Kt.length-1],n=Bo[t.interactionId];if(n||Kt.length<Dd||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{const r={id:t.interactionId,latency:t.duration,entries:[t]};Bo[r.id]=r,Kt.push(r)}Kt.sort((r,i)=>i.latency-r.latency),Kt.splice(Dd).forEach(r=>{delete Bo[r.id]})}},r0=()=>{const t=Math.min(Kt.length-1,Math.floor(yg()/50));return Kt[t]},i0=(t,e)=>{e=e||{},n0();const n=Ji("INP");let r;const i=a=>{a.forEach(u=>{u.interactionId&&Md(u),u.entryType==="first-input"&&!Kt.some(l=>l.entries.some(d=>u.duration===d.duration&&u.startTime===d.startTime))&&Md(u)});const o=r0();o&&o.latency!==n.value&&(n.value=o.latency,n.entries=o.entries,r())},s=ni("event",i,{durationThreshold:e.durationThreshold||40});r=Xi(t,n,e.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Qi(()=>{i(s.takeRecords()),n.value<0&&yg()>0&&(n.value=0,n.entries=[]),r(!0)}))},Ld={},s0=t=>{const e=Lc(),n=Ji("LCP");let r;const i=a=>{const o=a[a.length-1];if(o){const u=Math.max(o.startTime-Mc(),0);u<e.firstHiddenTime&&(n.value=u,n.entries=[o],r())}},s=ni("largest-contentful-paint",i);if(s){r=Xi(t,n);const a=()=>{Ld[n.id]||(i(s.takeRecords()),s.disconnect(),Ld[n.id]=!0,r(!0))};return["keydown","click"].forEach(o=>{B.document&&addEventListener(o,a,{once:!0,capture:!0})}),Qi(a,!0),a}},Ru=t=>{B.document&&(B.document.prerendering?addEventListener("prerenderingchange",()=>Ru(t),!0):B.document.readyState!=="complete"?addEventListener("load",()=>Ru(t),!0):setTimeout(t,0))},a0=(t,e)=>{e=e||{};const n=Ji("TTFB"),r=Xi(t,n,e.reportAllChanges);Ru(()=>{const i=so();if(i){if(n.value=Math.max(i.responseStart-Mc(),0),n.value<0||n.value>performance.now())return;n.entries=[i],r(!0)}})},Ci={},va={};let vg,bg,Sg,Eg,Tg;function o0(t,e=!1){return Zi("cls",t,d0,vg,e)}function Ig(t,e=!1){return Zi("lcp",t,h0,Sg,e)}function u0(t){return Zi("ttfb",t,p0,Eg)}function c0(t){return Zi("fid",t,f0,bg)}function l0(t){return Zi("inp",t,g0,Tg)}function wn(t,e){return wg(t,e),va[t]||(m0(t),va[t]=!0),Cg(t,e)}function ri(t,e){const n=Ci[t];if(!(!n||!n.length))for(const r of n)try{r(e)}catch(i){te&&T.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${en(r)}
Error:`,i)}}function d0(){return XE(t=>{ri("cls",{metric:t}),vg=t},{reportAllChanges:!0})}function f0(){return ZE(t=>{ri("fid",{metric:t}),bg=t})}function h0(){return s0(t=>{ri("lcp",{metric:t}),Sg=t})}function p0(){return a0(t=>{ri("ttfb",{metric:t}),Eg=t})}function g0(){return i0(t=>{ri("inp",{metric:t}),Tg=t})}function Zi(t,e,n,r,i=!1){wg(t,e);let s;return va[t]||(s=n(),va[t]=!0),r&&e({metric:r}),Cg(t,e,i?s:void 0)}function m0(t){const e={};t==="event"&&(e.durationThreshold=0),ni(t,n=>{ri(t,{entries:n})},e)}function wg(t,e){Ci[t]=Ci[t]||[],Ci[t].push(e)}function Cg(t,e,n){return()=>{n&&n();const r=Ci[t];if(!r)return;const i=r.indexOf(e);i!==-1&&r.splice(i,1)}}function Ho(t){return typeof t=="number"&&isFinite(t)}function Ur(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}const _0=2147483647;function De(t){return t/1e3}function Nc(){return B.addEventListener&&B.performance}let Nd=0,be={},xt,ki;function kg(){const t=Nc();if(t&&qe){t.mark&&B.performance.mark("sentry-tracing-init");const e=b0(),n=y0(),r=v0(),i=S0();return()=>{e(),n(),r(),i()}}return()=>{}}function xg(){wn("longtask",({entries:t})=>{for(const e of t){const n=$t();if(!n)return;const r=De(qe+e.startTime),i=De(e.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i})}})}function Rg(){wn("event",({entries:t})=>{for(const e of t){const n=$t();if(!n)return;if(e.name==="click"){const r=De(qe+e.startTime),i=De(e.duration),s={description:En(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i},a=Qh(e.target);a&&(s.attributes={"ui.component_name":a}),n.startChild(s)}}})}function Og(t,e){if(Nc()&&qe){const r=E0(t,e);return()=>{r()}}return()=>{}}function y0(){return o0(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(te&&T.log("[Measurements] Adding CLS"),be.cls={value:t.value,unit:""},ki=e)},!0)}function v0(){return Ig(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(te&&T.log("[Measurements] Adding LCP"),be.lcp={value:t.value,unit:"millisecond"},xt=e)},!0)}function b0(){return c0(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=De(qe),r=De(e.startTime);te&&T.log("[Measurements] Adding FID"),be.fid={value:t.value,unit:"millisecond"},be["mark.fid"]={value:n+r,unit:"second"}})}function S0(){return u0(({metric:t})=>{t.entries[t.entries.length-1]&&(te&&T.log("[Measurements] Adding TTFB"),be.ttfb={value:t.value,unit:"millisecond"})})}const Pd={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 E0(t,e){return l0(({metric:n})=>{if(n.value===void 0)return;const r=n.entries.find(_=>_.duration===n.value&&Pd[_.name]!==void 0),i=j();if(!r||!i)return;const s=Pd[r.name],a=i.getOptions(),o=De(qe+r.startTime),u=De(n.value),c=r.interactionId!==void 0?t[r.interactionId]:void 0;if(c===void 0)return;const{routeName:l,parentContext:d,activeTransaction:f,user:h,replayId:p}=c,g=h!==void 0?h.email||h.id||h.ip_address:void 0,y=f!==void 0?f.getProfileId():void 0,m=new Bp({startTimestamp:o,endTimestamp:o+u,op:`ui.interaction.${s}`,name:En(r.target),attributes:{release:a.release,environment:a.environment,transaction:l,...g!==void 0&&g!==""?{user:g}:{},...y!==void 0?{profile_id:y}:{},...p!==void 0?{replay_id:p}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),v=O0(d,a,e);if(v&&Math.random()<v){const _=m?uE([m],i.getDsn()):void 0,E=i&&i.getTransport();E&&_&&E.send(_).then(null,C=>{te&&T.error("Error while sending interaction:",C)});return}})}function Ag(t){const e=Nc();if(!e||!B.performance.getEntries||!qe)return;te&&T.log("[Tracing] Adding & adjusting spans using Performance API");const n=De(qe),r=e.getEntries(),{op:i,start_timestamp:s}=oe(t);if(r.slice(Nd).forEach(a=>{const o=De(a.startTime),u=De(a.duration);if(!(t.op==="navigation"&&s&&n+o<s))switch(a.entryType){case"navigation":{I0(t,a,n);break}case"mark":case"paint":case"measure":{T0(t,a,o,u,n);const c=Lc(),l=a.startTime<c.firstHiddenTime;a.name==="first-paint"&&l&&(te&&T.log("[Measurements] Adding FP"),be.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&l&&(te&&T.log("[Measurements] Adding FCP"),be.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{C0(t,a,a.name,o,u,n);break}}}),Nd=Math.max(r.length-1,0),k0(t),i==="pageload"){R0(be),["fcp","fp","lcp"].forEach(o=>{if(!be[o]||!s||n>=s)return;const u=be[o].value,c=n+De(u),l=Math.abs((c-s)*1e3),d=l-u;te&&T.log(`[Measurements] Normalized ${o} from ${u} to ${l} (${d})`),be[o].value=l});const a=be["mark.fid"];a&&be.fid&&(Ur(t,{description:"first input delay",endTimestamp:a.value+De(be.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete be["mark.fid"]),"fcp"in be||delete be.cls,Object.keys(be).forEach(o=>{Wp(o,be[o].value,be[o].unit)}),x0(t)}xt=void 0,ki=void 0,be={}}function T0(t,e,n,r,i){const s=i+n,a=s+r;return Ur(t,{description:e.name,endTimestamp:a,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s}),s}function I0(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Rs(t,e,r,n)}),Rs(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),Rs(t,e,"fetch",n,"cache","domainLookupStart"),Rs(t,e,"domainLookup",n,"DNS"),w0(t,e,n)}function Rs(t,e,n,r,i,s){const a=s?e[s]:e[`${n}End`],o=e[`${n}Start`];!o||!a||Ur(t,{op:"browser",origin:"auto.browser.browser.metrics",description:i||n,startTimestamp:r+De(o),endTimestamp:r+De(a)})}function w0(t,e,n){e.responseEnd&&(Ur(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+De(e.requestStart),endTimestamp:n+De(e.responseEnd)}),Ur(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+De(e.responseStart),endTimestamp:n+De(e.responseEnd)}))}function C0(t,e,n,r,i,s){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const a=Kn(n),o={};jo(o,e,"transferSize","http.response_transfer_size"),jo(o,e,"encodedBodySize","http.response_content_length"),jo(o,e,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in e&&(o["resource.render_blocking_status"]=e.renderBlockingStatus),a.protocol&&(o["url.scheme"]=a.protocol.split(":").pop()),a.host&&(o["server.address"]=a.host),o["url.same_origin"]=n.includes(B.location.origin);const u=s+r,c=u+i;Ur(t,{description:n.replace(B.location.origin,""),endTimestamp:c,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:u,data:o})}function k0(t){const e=B.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),Ho(n.rtt)&&(be["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Ho(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Ho(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}function x0(t){xt&&(te&&T.log("[Measurements] Adding LCP Data"),xt.element&&t.setTag("lcp.element",En(xt.element)),xt.id&&t.setTag("lcp.id",xt.id),xt.url&&t.setTag("lcp.url",xt.url.trim().slice(0,200)),t.setTag("lcp.size",xt.size)),ki&&ki.sources&&(te&&T.log("[Measurements] Adding CLS Data"),ki.sources.forEach((e,n)=>t.setTag(`cls.source.${n+1}`,En(e.node))))}function jo(t,e,n,r){const i=e[n];i!=null&&i<_0&&(t[r]=i)}function R0(t){const e=so();if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(te&&T.log("[Measurements] Adding TTFB Request Time"),t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function O0(t,e,n){if(!ti(e))return!1;let r;return t!==void 0&&typeof e.tracesSampler=="function"?r=e.tracesSampler({transactionContext:t,name:t.name,parentSampled:t.parentSampled,attributes:{...t.data,...t.attributes},location:B.location}):t!==void 0&&t.sampled!==void 0?r=t.sampled:typeof e.tracesSampleRate<"u"?r=e.tracesSampleRate:r=1,zp(r)?r===!0?n:r===!1?0:r*n:(te&&T.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function A0(t,e,n,r,i="auto.http.browser"){if(!ti()||!t.fetchData)return;const s=e(t.fetchData.url);if(t.endTimestamp&&s){const h=t.fetchData.__span;if(!h)return;const p=r[h];p&&(L0(p,t),delete r[h]);return}const a=we(),o=j(),{method:u,url:c}=t.fetchData,l=M0(c),d=l?Kn(l).host:void 0,f=s?Ar({name:`${u} ${c}`,onlyIfParent:!0,attributes:{url:c,type:"fetch","http.method":u,"http.url":l,"server.address":d,[Gn]:i},op:"http.client"}):void 0;if(f&&(t.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(t.fetchData.url)&&o){const h=t.args[0];t.args[1]=t.args[1]||{};const p=t.args[1];p.headers=D0(h,o,a,p,f)}return f}function D0(t,e,n,r,i){const s=i||n.getSpan(),a=Ut(),{traceId:o,spanId:u,sampled:c,dsc:l}={...a.getPropagationContext(),...n.getPropagationContext()},d=s?Ja(s):yc(o,u,c),f=vp(l||(s?Pr(s):Za(o,e,n))),h=r.headers||(typeof Request<"u"&&Zt(t,Request)?t.headers:void 0);if(h)if(typeof Headers<"u"&&Zt(h,Headers)){const p=new Headers(h);return p.append("sentry-trace",d),f&&p.append(Su,f),p}else if(Array.isArray(h)){const p=[...h,["sentry-trace",d]];return f&&p.push([Su,f]),p}else{const p="baggage"in h?h.baggage:void 0,g=[];return Array.isArray(p)?g.push(...p):p&&g.push(p),f&&g.push(f),{...h,"sentry-trace":d,baggage:g.length>0?g.join(","):void 0}}else return{"sentry-trace":d,baggage:f}}function M0(t){try{return new URL(t).href}catch{return}}function L0(t,e){if(e.response){to(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus("internal_error");t.end()}const Ou=["localhost",/^\/(?!\/)/],Pi={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Ou,tracePropagationTargets:Ou};function Pc(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,enableHTTPTimings:a}={traceFetch:Pi.traceFetch,traceXHR:Pi.traceXHR,...t},o=typeof s=="function"?s:l=>!0,u=l=>U0(l,r||i),c={};e&&Ya(l=>{const d=A0(l,o,u,c);if(d){const f=Dg(l.fetchData.url),h=f?Kn(f).host:void 0;d.setAttributes({"http.url":f,"server.address":h})}a&&d&&$d(d)}),n&&Xa(l=>{const d=F0(l,o,u,c);a&&d&&$d(d)})}function N0(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function $d(t){const{url:e}=oe(t).data||{};if(!e||typeof e!="string")return;const n=wn("resource",({entries:r})=>{r.forEach(i=>{N0(i)&&i.name.endsWith(e)&&($0(i).forEach(a=>t.setAttribute(...a)),setTimeout(n))})})}function P0(t){let e="unknown",n="unknown",r="";for(const i of t){if(i==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(i))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=i}return r===t&&(e=r),{name:e,version:n}}function It(t=0){return((qe||performance.timeOrigin)+t)/1e3}function $0(t){const{name:e,version:n}=P0(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),qe?[...r,["http.request.redirect_start",It(t.redirectStart)],["http.request.fetch_start",It(t.fetchStart)],["http.request.domain_lookup_start",It(t.domainLookupStart)],["http.request.domain_lookup_end",It(t.domainLookupEnd)],["http.request.connect_start",It(t.connectStart)],["http.request.secure_connection_start",It(t.secureConnectionStart)],["http.request.connection_end",It(t.connectEnd)],["http.request.request_start",It(t.requestStart)],["http.request.response_start",It(t.responseStart)],["http.request.response_end",It(t.responseEnd)]]:r}function U0(t,e){return Jr(t,e||Ou)}function F0(t,e,n,r){const i=t.xhr,s=i&&i[Xt];if(!ti()||!i||i.__sentry_own_request__||!s)return;const a=e(s.url);if(t.endTimestamp&&a){const h=i.__sentry_xhr_span_id__;if(!h)return;const p=r[h];p&&s.status_code!==void 0&&(to(p,s.status_code),p.end(),delete r[h]);return}const o=we(),u=Ut(),c=Dg(s.url),l=c?Kn(c).host:void 0,d=a?Ar({name:`${s.method} ${s.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":s.method,"http.url":c,url:s.url,"server.address":l,[Gn]:"auto.http.browser"},op:"http.client"}):void 0;d&&(i.__sentry_xhr_span_id__=d.spanContext().spanId,r[i.__sentry_xhr_span_id__]=d);const f=j();if(i.setRequestHeader&&n(s.url)&&f){const{traceId:h,spanId:p,sampled:g,dsc:y}={...u.getPropagationContext(),...o.getPropagationContext()},m=d?Ja(d):yc(h,p,g),v=vp(y||(d?Pr(d):Za(h,f,o)));B0(i,m,v)}return d}function B0(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(Su,n)}catch{}}function Dg(t){try{return new URL(t,B.location.origin).href}catch{return}}function H0(t,e=!0,n=!0){if(!B||!B.location){te&&T.warn("Could not initialize routing instrumentation due to invalid location");return}let r=B.location.href,i;e&&(i=t({name:B.location.pathname,startTimestamp:qe?qe/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&zi(({to:s,from:a})=>{if(a===void 0&&r&&r.indexOf(s)!==-1){r=void 0;return}a!==s&&(r=void 0,i&&(te&&T.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.end()),i=t({name:B.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const j0="BrowserTracing",G0={...wi,markBackgroundTransactions:!0,routingInstrumentation:H0,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Pi},Ud=10;let z0=class{constructor(e){this.name=j0,this._hasSetTracePropagationTargets=!1,xc(),te&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...G0,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=kg(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&Og(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&xg(),this.options._experiments.enableInteractions&&Rg(),this._latestRoute={name:void 0,context:void 0}}setupOnce(e,n){this._getCurrentHub=n;const i=n().getClient(),s=i&&i.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:o,startTransactionOnPageLoad:u,markBackgroundTransactions:c,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:h,_experiments:p}=this.options,g=s&&s.tracePropagationTargets,y=g||this.options.tracePropagationTargets;te&&this._hasSetTracePropagationTargets&&g&&T.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a(m=>{const v=this._createRouteTransaction(m);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(v,m,n),v},u,o),c&&mg(),p.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),Pc({traceFetch:l,traceXHR:d,tracePropagationTargets:y,shouldCreateSpanForRequest:f,enableHTTPTimings:h})}_createRouteTransaction(e){if(!this._getCurrentHub){te&&T.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:i,finalTimeout:s,heartbeatInterval:a}=this.options,o=e.op==="pageload";let u;if(o){const h=o?Fd("sentry-trace"):"",p=o?Fd("baggage"):void 0,{traceId:g,dsc:y,parentSpanId:m,sampled:v}=bp(h,p);u={traceId:g,parentSpanId:m,parentSampled:v,...e,metadata:{...e.metadata,dynamicSamplingContext:y},trimEnd:!0}}else u={trimEnd:!0,...e};const c=typeof r=="function"?r(u):u,l=c===void 0?{...u,sampled:!1}:c;l.metadata=l.name!==u.name?{...l.metadata,source:"custom"}:l.metadata,this._latestRoute.name=l.name,this._latestRoute.context=l,l.sampled===!1&&te&&T.log(`[Tracing] Will not send ${l.op} transaction because of beforeNavigate.`),te&&T.log(`[Tracing] Starting ${l.op} transaction on scope`);const{location:d}=B,f=ma(n,l,i,s,!0,{location:d},a,o);return o&&B.document&&(B.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(B.document.readyState)&&f.sendAutoFinishSignal()}),["interactive","complete"].includes(B.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback(h=>{this._collectWebVitals(),Ag(h)}),f}_registerInteractionListener(){let e;const n=()=>{const{idleTimeout:r,finalTimeout:i,heartbeatInterval:s}=this.options,a="ui.action.click",o=$t();if(o&&o.op&&["navigation","pageload"].includes(o.op)){te&&T.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.end(),e=void 0),!this._getCurrentHub){te&&T.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){te&&T.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}const u=this._getCurrentHub(),{location:c}=B,l={name:this._latestRoute.name,op:a,trimEnd:!0,data:{[st]:this._latestRoute.context?W0(this._latestRoute.context):"url"}};e=ma(u,l,r,i,!0,{location:c},s)};["click"].forEach(r=>{B.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){const e=({entries:n})=>{const r=j(),i=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,s=i!==void 0?i.getReplayId():void 0,a=$t(),o=we(),u=o!==void 0?o.getUser():void 0;n.forEach(c=>{if(q0(c)){const l=c.interactionId;if(l===void 0)return;const d=this._interactionIdToRouteNameMapping[l],f=c.duration,h=c.startTime,p=Object.keys(this._interactionIdToRouteNameMapping),g=p.length>0?p.reduce((y,m)=>this._interactionIdToRouteNameMapping[y].duration<this._interactionIdToRouteNameMapping[m].duration?y:m):void 0;if(c.entryType==="first-input"&&p.map(m=>this._interactionIdToRouteNameMapping[m]).some(m=>m.duration===f&&m.startTime===h)||!l)return;if(d)d.duration=Math.max(d.duration,f);else if(p.length<Ud||g===void 0||f>this._interactionIdToRouteNameMapping[g].duration){const y=this._latestRoute.name,m=this._latestRoute.context;y&&m&&(g&&Object.keys(this._interactionIdToRouteNameMapping).length>=Ud&&delete this._interactionIdToRouteNameMapping[g],this._interactionIdToRouteNameMapping[l]={routeName:y,duration:f,parentContext:m,user:u,activeTransaction:a,replayId:s,startTime:h})}}})};wn("event",e),wn("first-input",e)}};function Fd(t){const e=Jh(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}function W0(t){const e=t.attributes&&t.attributes[st],n=t.data&&t.data[st],r=t.metadata&&t.metadata.source;return e||n||r}function q0(t){return"duration"in t}const V0="BrowserTracing",K0={...wi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Pi},Y0=(t={})=>{const e=te?!!(t.tracePropagationTargets||t.tracingOrigins):!1;xc(),!t.tracePropagationTargets&&t.tracingOrigins&&(t.tracePropagationTargets=t.tracingOrigins);const n={...K0,...t},r=kg(),i={};n.enableInp&&Og(i,n.interactionsSampleRate),n.enableLongTask&&xg(),n._experiments.enableInteractions&&Rg();const s={name:void 0,context:void 0};function a(o){const u=ue(),{beforeStartSpan:c,idleTimeout:l,finalTimeout:d,heartbeatInterval:f}=n,h=o.op==="pageload";let p;if(h){const v=h?Bd("sentry-trace"):"",_=h?Bd("baggage"):void 0,{traceId:E,dsc:C,parentSpanId:b,sampled:S}=bp(v,_);p={traceId:E,parentSpanId:b,parentSampled:S,...o,metadata:{...o.metadata,dynamicSamplingContext:C},trimEnd:!0}}else p={trimEnd:!0,...o};const g=c?c(p):p;g.metadata=g.name!==p.name?{...g.metadata,source:"custom"}:g.metadata,s.name=g.name,s.context=g,g.sampled===!1&&te&&T.log(`[Tracing] Will not send ${g.op} transaction because of beforeNavigate.`),te&&T.log(`[Tracing] Starting ${g.op} transaction on scope`);const{location:y}=B,m=ma(u,g,l,d,!0,{location:y},f,h);return h&&B.document&&(B.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(B.document.readyState)&&m.sendAutoFinishSignal()}),["interactive","complete"].includes(B.document.readyState)&&m.sendAutoFinishSignal()),m.registerBeforeFinishCallback(v=>{r(),Ag(v)}),m}return{name:V0,setupOnce:()=>{},afterAllSetup(o){const u=o.getOptions(),{markBackgroundSpan:c,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:h,_experiments:p}=n,g=u&&u.tracePropagationTargets,y=g||n.tracePropagationTargets;te&&e&&g&&T.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 m,v=B.location&&B.location.href;if(o.on&&(o.on("startNavigationSpan",_=>{m&&(te&&T.log(`[Tracing] Finishing current transaction with op: ${oe(m).op}`),m.end()),m=a({op:"navigation",..._})}),o.on("startPageLoadSpan",_=>{m&&(te&&T.log(`[Tracing] Finishing current transaction with op: ${oe(m).op}`),m.end()),m=a({op:"pageload",..._})})),n.instrumentPageLoad&&o.emit&&B.location){const _={name:B.location.pathname,startTimestamp:qe?qe/1e3:void 0,origin:"auto.pageload.browser",attributes:{[st]:"url"}};Mg(o,_)}n.instrumentNavigation&&o.emit&&B.location&&zi(({to:_,from:E})=>{if(E===void 0&&v&&v.indexOf(_)!==-1){v=void 0;return}if(E!==_){v=void 0;const C={name:B.location.pathname,origin:"auto.navigation.browser",attributes:{[st]:"url"}};Lg(o,C)}}),c&&mg(),p.enableInteractions&&X0(n,s),n.enableInp&&Q0(i,s),Pc({traceFetch:l,traceXHR:d,tracePropagationTargets:y,shouldCreateSpanForRequest:f,enableHTTPTimings:h})},options:n}};function Mg(t,e){if(!t.emit)return;t.emit("startPageLoadSpan",e);const n=Yi();return(n&&oe(n).op)==="pageload"?n:void 0}function Lg(t,e){if(!t.emit)return;t.emit("startNavigationSpan",e);const n=Yi();return(n&&oe(n).op)==="navigation"?n:void 0}function Bd(t){const e=Jh(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}function X0(t,e){let n;const r=()=>{const{idleTimeout:i,finalTimeout:s,heartbeatInterval:a}=t,o="ui.action.click",u=$t();if(u&&u.op&&["navigation","pageload"].includes(u.op)){te&&T.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!e.name){te&&T.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}const{location:c}=B,l={name:e.name,op:o,trimEnd:!0,data:{[st]:e.context?Z0(e.context):"url"}};n=ma(ue(),l,i,s,!0,{location:c},a)};["click"].forEach(i=>{B.document&&addEventListener(i,r,{once:!1,capture:!0})})}function J0(t){return"duration"in t}const Hd=10;function Q0(t,e){const n=({entries:r})=>{const i=j(),s=i!==void 0&&i.getIntegrationByName!==void 0?i.getIntegrationByName("Replay"):void 0,a=s!==void 0?s.getReplayId():void 0,o=$t(),u=we(),c=u!==void 0?u.getUser():void 0;r.forEach(l=>{if(J0(l)){const d=l.interactionId;if(d===void 0)return;const f=t[d],h=l.duration,p=l.startTime,g=Object.keys(t),y=g.length>0?g.reduce((m,v)=>t[m].duration<t[v].duration?m:v):void 0;if(l.entryType==="first-input"&&g.map(v=>t[v]).some(v=>v.duration===h&&v.startTime===p)||!d)return;if(f)f.duration=Math.max(f.duration,h);else if(g.length<Hd||y===void 0||h>t[y].duration){const m=e.name,v=e.context;m&&v&&(y&&Object.keys(t).length>=Hd&&delete t[y],t[d]={routeName:m,duration:h,parentContext:v,user:c,activeTransaction:o,replayId:a,startTime:p})}}})};wn("event",n),wn("first-input",n)}function Z0(t){const e=t.attributes&&t.attributes[st],n=t.data&&t.data[st],r=t.metadata&&t.metadata.source;return e||n||r}const H=V;let Au=0;function Ng(){return Au>0}function eT(){Au++,setTimeout(()=>{Au--})}function Qn(t,e={},n){if(typeof t!="function")return t;try{const i=t.__sentry_wrapped__;if(i)return typeof i=="function"?i:t;if(gc(t))return t}catch{return t}const r=function(){const i=Array.prototype.slice.call(arguments);try{const s=i.map(a=>Qn(a,e));return t.apply(this,s)}catch(s){throw eT(),Rn(a=>{a.addEventProcessor(o=>(e.mechanism&&(pu(o,void 0),Xn(o,e.mechanism)),o.extra={...o.extra,arguments:i},o)),Vi(s)}),s}};try{for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}np(r,t),In(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}const re=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function $c(t,e){const n=Uc(t,e),r={type:e&&e.name,value:iT(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function tT(t,e,n,r){const i=j(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:Ka(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:sT(e,{isUnhandledRejection:r})}]},extra:{__serialized__:pp(e,s)}};if(n){const o=Uc(t,n);o.length&&(a.exception.values[0].stacktrace={frames:o})}return a}function Go(t,e){return{exception:{values:[$c(t,e)]}}}function Uc(t,e){const n=e.stacktrace||e.stack||"",r=rT(e);try{return t(n,r)}catch{}return[]}const nT=/Minified React error #\d+;/i;function rT(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(nT.test(t.message))return 1}return 0}function iT(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Pg(t,e,n,r){const i=n&&n.syntheticException||void 0,s=Fc(t,e,i,r);return Xn(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Lr(s)}function $g(t,e,n="info",r,i){const s=r&&r.syntheticException||void 0,a=Du(t,e,s,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),Lr(a)}function Fc(t,e,n,r,i){let s;if(dc(e)&&e.error)return Go(t,e.error);if(td(e)||ov(e)){const a=e;if("stack"in e)s=Go(t,e);else{const o=a.name||(td(a)?"DOMError":"DOMException"),u=a.message?`${o}: ${a.message}`:o;s=Du(t,u,n,r),pu(s,u)}return"code"in a&&(s.tags={...s.tags,"DOMException.code":`${a.code}`}),s}return xr(e)?Go(t,e):Yn(e)||Ka(e)?(s=tT(t,e,n,i),Xn(s,{synthetic:!0}),s):(s=Du(t,e,n,r),pu(s,`${e}`),Xn(s,{synthetic:!0}),s)}function Du(t,e,n,r){const i={};if(r&&n){const s=Uc(t,n);s.length&&(i.exception={values:[{value:e,stacktrace:{frames:s}}]})}if(fc(e)){const{__sentry_template_string__:s,__sentry_template_values__:a}=e;return i.logentry={message:s,params:a},i}return i.message=e,i}function sT(t,{isUnhandledRejection:e}){const n=Sv(t),r=e?"promise rejection":"exception";return dc(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Ka(t)?`Event \`${aT(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function aT(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Ug(t,{metadata:e,tunnel:n,dsn:r}){const i={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:nr(r)}},s=oT(t);return rn(i,[s])}function oT(t){return[{type:"user_report"},t]}class Fg extends zS{constructor(e){const n=H.SENTRY_SDK_SOURCE||Gv();sg(e,"browser",["browser"],n),super(e),e.sendClientReports&&H.document&&H.document.addEventListener("visibilitychange",()=>{H.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return Pg(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return $g(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){re&&T.warn("SDK not enabled, will not capture user feedback.");return}const n=Ug(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){const e=this._clearOutcomes();if(e.length===0){re&&T.log("No outcomes to send");return}if(!this._dsn){re&&T.log("No dsn provided, will not send outcomes");return}re&&T.log("Sending outcomes:",e);const n=_b(e,this._options.tunnel&&nr(this._dsn));this._sendEnvelope(n)}}let Ei;function uT(){if(Ei)return Ei;if(_u(H.fetch))return Ei=H.fetch.bind(H);const t=H.document;let e=H.fetch;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){re&&T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Ei=e.bind(H)}function cT(){Ei=void 0}function Bg(t,e=uT()){let n=0,r=0;function i(s){const a=s.body.length;n+=a,r++;const o={body:s.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,o).then(u=>(n-=a,r--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return cT(),n-=a,r--,mc(u)}}return Oc(t,i)}const lT=4;function Hg(t){function e(n){return new Zr((r,i)=>{const s=new XMLHttpRequest;s.onerror=i,s.onreadystatechange=()=>{s.readyState===lT&&r({statusCode:s.status,headers:{"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")}})},s.open("POST",t.url);for(const a in t.headers)Object.prototype.hasOwnProperty.call(t.headers,a)&&s.setRequestHeader(a,t.headers[a]);s.send(n.body)})}return Oc(t,e)}const ii="?",dT=10,fT=20,hT=30,pT=40,gT=50;function es(t,e,n,r){const i={filename:t,function:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const mT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_T=/\((\S*)(?::(\d+))(?::(\d+))\)/,yT=t=>{const e=mT.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){const s=_T.exec(e[2]);s&&(e[2]=s[1],e[3]=s[2],e[4]=s[3])}const[r,i]=Vg(e[1]||ii,e[2]);return es(i,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},jg=[hT,yT],vT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,bT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ST=t=>{const e=vT.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const s=bT.exec(e[3]);s&&(e[1]=e[1]||"eval",e[3]=s[1],e[4]=s[2],e[5]="")}let r=e[3],i=e[1]||ii;return[i,r]=Vg(i,r),es(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Gg=[gT,ST],ET=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,TT=t=>{const e=ET.exec(t);return e?es(e[2],e[1]||ii,+e[3],e[4]?+e[4]:void 0):void 0},zg=[pT,TT],IT=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,wT=t=>{const e=IT.exec(t);return e?es(e[2],e[3]||ii,+e[1]):void 0},CT=[dT,wT],kT=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,xT=t=>{const e=kT.exec(t);return e?es(e[5],e[3]||e[4]||ii,+e[1],+e[2]):void 0},RT=[fT,xT],Wg=[jg,Gg,zg],qg=sp(...Wg),Vg=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:ii,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Os=1024,Kg="Breadcrumbs",OT=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:Kg,setupOnce(){},setup(n){e.console&&ap(MT(n)),e.dom&&cp(DT(n,e.dom)),e.xhr&&Xa(LT(n)),e.fetch&&Ya(NT(n)),e.history&&zi(PT(n)),e.sentry&&n.on&&n.on("beforeSendEvent",AT(n))}}},Bc=OT,Yg=Ee(Kg,Bc);function AT(t){return function(n){j()===t&&nn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:_n(n)},{event:n})}}function DT(t,e){return function(r){if(j()!==t)return;let i,s,a=typeof e=="object"?e.serializeAttribute:void 0,o=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;o&&o>Os&&(re&&T.warn(`\`dom.maxStringLength\` cannot exceed ${Os}, but a value of ${o} was configured. Sentry will use ${Os} instead.`),o=Os),typeof a=="string"&&(a=[a]);try{const c=r.event,l=$T(c)?c.target:c;i=En(l,{keyAttrs:a,maxStringLength:o}),s=Qh(l)}catch{i="<unknown>"}if(i.length===0)return;const u={category:`ui.${r.name}`,message:i};s&&(u.data={"ui.component_name":s}),nn(u,{event:r.event,name:r.name,global:r.global})}}function MT(t){return function(n){if(j()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:gp(n.level),message:oa(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${oa(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;nn(r,{input:n.args,level:n.level})}}function LT(t){return function(n){if(j()!==t)return;const{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[Xt];if(!r||!i||!s)return;const{method:a,url:o,status_code:u,body:c}=s,l={method:a,url:o,status_code:u},d={xhr:n.xhr,input:c,startTimestamp:r,endTimestamp:i};nn({category:"xhr",data:l,type:"http"},d)}}function NT(t){return function(n){if(j()!==t)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s=n.fetchData,a={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};nn({category:"fetch",data:s,level:"error",type:"http"},a)}else{const s=n.response,a={...n.fetchData,status_code:s&&s.status},o={input:n.args,response:s,startTimestamp:r,endTimestamp:i};nn({category:"fetch",data:a,type:"http"},o)}}}function PT(t){return function(n){if(j()!==t)return;let r=n.from,i=n.to;const s=Kn(H.location.href);let a=r?Kn(r):void 0;const o=Kn(i);(!a||!a.path)&&(a=s),s.protocol===o.protocol&&s.host===o.host&&(i=o.relative),s.protocol===a.protocol&&s.host===a.host&&(r=a.relative),nn({category:"navigation",data:{from:r,to:i}})}}function $T(t){return!!t&&!!t.target}const Xg="Dedupe",UT=()=>{let t;return{name:Xg,setupOnce(){},processEvent(e){if(e.type)return e;try{if(FT(e,t))return re&&T.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Jg=UT,Qg=Ee(Xg,Jg);function FT(t,e){return e?!!(BT(t,e)||HT(t,e)):!1}function BT(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!em(t,e)||!Zg(t,e))}function HT(t,e){const n=jd(e),r=jd(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!em(t,e)||!Zg(t,e))}function Zg(t,e){let n=Gd(t),r=Gd(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const s=r[i],a=n[i];if(s.filename!==a.filename||s.lineno!==a.lineno||s.colno!==a.colno||s.function!==a.function)return!1}return!0}function em(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function jd(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Gd(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}const tm="GlobalHandlers",jT=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:tm,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(GT(n),zd("onerror")),e.onunhandledrejection&&(zT(n),zd("onunhandledrejection"))}}},Hc=jT,nm=Ee(tm,Hc);function GT(t){fp(e=>{const{stackParser:n,attachStacktrace:r}=im();if(j()!==t||Ng())return;const{msg:i,url:s,line:a,column:o,error:u}=e,c=u===void 0&&Nt(i)?VT(i,s,a,o):rm(Fc(n,u||i,void 0,r,!1),s,a,o);c.level="error",Ki(c,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function zT(t){hp(e=>{const{stackParser:n,attachStacktrace:r}=im();if(j()!==t||Ng())return;const i=WT(e),s=hc(i)?qT(i):Fc(n,i,void 0,r,!0);s.level="error",Ki(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function WT(t){if(hc(t))return t;const e=t;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return t}function qT(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function VT(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=dc(t)?t.message:t,a="Error";const o=s.match(i);return o&&(a=o[1],s=o[2]),rm({exception:{values:[{type:a,value:s}]}},e,n,r)}function rm(t,e,n,r){const i=t.exception=t.exception||{},s=i.values=i.values||[],a=s[0]=s[0]||{},o=a.stacktrace=a.stacktrace||{},u=o.frames=o.frames||[],c=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=Nt(e)&&e.length>0?e:Xh();return u.length===0&&u.push({colno:c,filename:d,function:"?",in_app:!0,lineno:l}),t}function zd(t){re&&T.log(`Global Handler attached: ${t}`)}function im(){const t=j();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const sm="HttpContext",KT=()=>({name:sm,setupOnce(){},preprocessEvent(t){if(!H.navigator&&!H.location&&!H.document)return;const e=t.request&&t.request.url||H.location&&H.location.href,{referrer:n}=H.document||{},{userAgent:r}=H.navigator||{},i={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...t.request,...e&&{url:e},headers:i};t.request=s}}),jc=KT,am=Ee(sm,jc),YT="cause",XT=5,om="LinkedErrors",JT=(t={})=>{const e=t.limit||XT,n=t.key||YT;return{name:om,setupOnce(){},preprocessEvent(r,i,s){const a=s.getOptions();Kh($c,a.stackParser,a.maxValueLength,n,e,r,i)}}},Gc=JT,um=Ee(om,Gc),QT=["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"],cm="TryCatch",ZT=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:cm,setupOnce(){e.setTimeout&&He(H,"setTimeout",Wd),e.setInterval&&He(H,"setInterval",Wd),e.requestAnimationFrame&&He(H,"requestAnimationFrame",eI),e.XMLHttpRequest&&"XMLHttpRequest"in H&&He(XMLHttpRequest.prototype,"send",tI);const n=e.eventTarget;n&&(Array.isArray(n)?n:QT).forEach(nI)}}},zc=ZT,lm=Ee(cm,zc);function Wd(t){return function(...e){const n=e[0];return e[0]=Qn(n,{mechanism:{data:{function:en(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function eI(t){return function(e){return t.apply(this,[Qn(e,{mechanism:{data:{function:"requestAnimationFrame",handler:en(t)},handled:!1,type:"instrument"}})])}}function tI(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&He(n,i,function(s){const a={mechanism:{data:{function:i,handler:en(s)},handled:!1,type:"instrument"}},o=gc(s);return o&&(a.mechanism.data.handler=en(o)),Qn(s,a)})}),t.apply(this,e)}}function nI(t){const e=H,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(He(n,"addEventListener",function(r){return function(i,s,a){try{typeof s.handleEvent=="function"&&(s.handleEvent=Qn(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:en(s),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,Qn(s,{mechanism:{data:{function:"addEventListener",handler:en(s),target:t},handled:!1,type:"instrument"}}),a])}}),He(n,"removeEventListener",function(r){return function(i,s,a){const o=s;try{const u=o&&o.__sentry_wrapped__;u&&r.call(this,i,u,a)}catch{}return r.call(this,i,o,a)}}))}const dm=[Ac(),Dc(),zc(),Bc(),Hc(),Gc(),Jg(),jc()];function fm(t){return[...dm]}function hm(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=fm()),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),H.SENTRY_RELEASE&&H.SENTRY_RELEASE.id&&(t.release=H.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);const e={...t,stackParser:Tv(t.stackParser||qg),integrations:xS(t),transport:t.transport||(lp()?Bg:Hg)};ZS(Fg,e),t.autoSessionTracking&&oI()}const rI=(t={},e=ue())=>{if(!H.document){re&&T.error("Global document not defined in showReportDialog call");return}const{client:n,scope:r}=e.getStackTop(),i=t.dsn||n&&n.getDsn();if(!i){re&&T.error("DSN not configured for showReportDialog call");return}r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const s=H.document.createElement("script");s.async=!0,s.crossOrigin="anonymous",s.src=CS(i,t),t.onLoad&&(s.onload=t.onLoad);const{onClose:a}=t;if(a){const u=c=>{if(c.data==="__sentry_reportdialog_closed__")try{a()}finally{H.removeEventListener("message",u)}};H.addEventListener("message",u)}const o=H.document.head||H.document.body;o?o.appendChild(s):re&&T.error("Not injecting report dialog. No injection point found in HTML")};function iI(){}function sI(t){t()}function aI(t){return Qn(t)()}function oI(){if(typeof H.document>"u"){re&&T.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Iu({ignoreDuration:!0}),wu(),zi(({from:t,to:e})=>{t!==void 0&&t!==e&&(Iu({ignoreDuration:!0}),wu())})}function uI(t){const e=j();e&&e.captureUserFeedback(t)}const cI=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumbs:Yg,Dedupe:Qg,GlobalHandlers:nm,HttpContext:am,LinkedErrors:um,TryCatch:lm},Symbol.toStringTag,{value:"Module"})),fe=V,Wc="sentryReplaySession",lI="replay_event",qc="Unable to send Replay",dI=3e5,fI=9e5,hI=5e3,pI=5500,gI=6e4,mI=5e3,_I=3,qd=15e4,As=5e3,yI=3e3,vI=300,Vc=2e7,bI=4999,SI=15e3,Vd=36e5;function EI(t,e){return t??e()}function ba(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...a)=>n.call(e,...a)),e=void 0)}return n}var Oe;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(Oe||(Oe={}));function TI(t){return t.nodeType===t.ELEMENT_NODE}function xi(t){const e=ba([t,"optionalAccess",n=>n.host]);return ba([e,"optionalAccess",n=>n.shadowRoot])===t}function Ri(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function II(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t}function wI(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function Sa(t){try{const e=t.rules||t.cssRules;return e?II(Array.from(e,pm).join("")):null}catch{return null}}function pm(t){let e;if(kI(t))try{e=Sa(t.styleSheet)||wI(t)}catch{}else if(xI(t)&&t.selectorText.includes(":"))return CI(t.cssText);return e||t.cssText}function CI(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function kI(t){return"styleSheet"in t}function xI(t){return"selectorText"in t}class gm{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;const n=ba([this,"access",r=>r.getMeta,"call",r=>r(e),"optionalAccess",r=>r.id]);return EI(n,()=>-1)}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){const r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function RI(){return new gm}function ao({maskInputOptions:t,tagName:e,type:n}){return e==="OPTION"&&(e="SELECT"),!!(t[e.toLowerCase()]||n&&t[n]||n==="password"||e==="INPUT"&&!n&&t.text)}function $i({isMasked:t,element:e,value:n,maskInputFn:r}){let i=n||"";return t?(r&&(i=r(i,e)),"*".repeat(i.length)):i}function Fr(t){return t.toLowerCase()}function Mu(t){return t.toUpperCase()}const Kd="__rrweb_original__";function OI(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let r=0;r<t.width;r+=n)for(let i=0;i<t.height;i+=n){const s=e.getImageData,a=Kd in s?s[Kd]:s;if(new Uint32Array(a.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer).some(u=>u!==0))return!1}return!0}function Kc(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Fr(e):null}function Ea(t,e,n){return e==="INPUT"&&(n==="radio"||n==="checkbox")?t.getAttribute("value")||"":t.value}let AI=1;const DI=new RegExp("[^a-z0-9-_:]"),Ui=-2;function Yc(){return AI++}function MI(t){if(t instanceof HTMLFormElement)return"form";const e=Fr(t.tagName);return DI.test(e)?"div":e}function LI(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}let fr,Yd;const NI=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,PI=/^(?:[a-z+]+:)?\/\//i,$I=/^www\..*/i,UI=/^(data:)([^,]*),(.*)/i;function Ta(t,e){return(t||"").replace(NI,(n,r,i,s,a,o)=>{const u=i||a||o,c=r||s||"";if(!u)return n;if(PI.test(u)||$I.test(u))return`url(${c}${u}${c})`;if(UI.test(u))return`url(${c}${u}${c})`;if(u[0]==="/")return`url(${c}${LI(e)+u}${c})`;const l=e.split("/"),d=u.split("/");l.pop();for(const f of d)f!=="."&&(f===".."?l.pop():l.push(f));return`url(${c}${l.join("/")}${c})`})}const FI=/^[^ \t\n\r\u000c]+/,BI=/^[, \t\n\r\u000c]+/;function HI(t,e){if(e.trim()==="")return e;let n=0;function r(s){let a;const o=s.exec(e.substring(n));return o?(a=o[0],n+=a.length,a):""}const i=[];for(;r(BI),!(n>=e.length);){let s=r(FI);if(s.slice(-1)===",")s=Sr(t,s.substring(0,s.length-1)),i.push(s);else{let a="";s=Sr(t,s);let o=!1;for(;;){const u=e.charAt(n);if(u===""){i.push((s+a).trim());break}else if(o)u===")"&&(o=!1);else if(u===","){n+=1,i.push((s+a).trim());break}else u==="("&&(o=!0);a+=u,n+=1}}}return i.join(", ")}function Sr(t,e){if(!e||e.trim()==="")return e;const n=t.createElement("a");return n.href=e,n.href}function jI(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function Xc(){const t=document.createElement("a");return t.href="",t.href}function mm(t,e,n,r,i,s){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?Sr(t,r):n==="srcset"?HI(t,r):n==="style"?Ta(r,Xc()):e==="object"&&n==="data"?Sr(t,r):typeof s=="function"?s(n,r,i):r)}function _m(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function GI(t,e,n,r){try{if(r&&t.matches(r))return!1;if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let i=t.classList.length;i--;){const s=t.classList[i];if(e.test(s))return!0}if(n)return t.matches(n)}catch{}return!1}function zI(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}function zn(t,e,n=1/0,r=0){return!t||t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:zn(t.parentNode,e,n,r+1)}function Er(t,e){return n=>{const r=n;if(r===null)return!1;try{if(t){if(typeof t=="string"){if(r.matches(`.${t}`))return!0}else if(zI(r,t))return!0}return!!(e&&r.matches(e))}catch{return!1}}}function Br(t,e,n,r,i,s){try{const a=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(a===null)return!1;if(a.tagName==="INPUT"){const c=a.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(c))return!0}let o=-1,u=-1;if(s){if(u=zn(a,Er(r,i)),u<0)return!0;o=zn(a,Er(e,n),u>=0?u:1/0)}else{if(o=zn(a,Er(e,n)),o<0)return!1;u=zn(a,Er(r,i),o>=0?o:1/0)}return o>=0?u>=0?o<=u:!0:u>=0?!1:!!s}catch{}return!!s}function WI(t,e,n){const r=t.contentWindow;if(!r)return;let i=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const o=setTimeout(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),i=!0,e()});return}const a="about:blank";if(r.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function qI(t,e,n){let r=!1,i;try{i=t.sheet}catch{return}if(i)return;const s=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(s),r=!0,e()})}function VI(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:o,maskAttributeFn:u,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:g,maskInputFn:y,dataURLOptions:m={},inlineImages:v,recordCanvas:_,keepIframeSrcFn:E,newlyAddedElement:C=!1}=e,b=KI(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Oe.Document,childNodes:[],compatMode:t.compatMode}:{type:Oe.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Oe.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:b};case t.ELEMENT_NODE:return XI(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:a,inlineStylesheet:h,maskAttributeFn:u,maskInputOptions:p,maskInputFn:y,dataURLOptions:m,inlineImages:v,recordCanvas:_,keepIframeSrcFn:E,newlyAddedElement:C,rootId:b,maskAllText:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f});case t.TEXT_NODE:return YI(t,{maskAllText:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:g,maskInputOptions:p,maskInputFn:y,rootId:b});case t.CDATA_SECTION_NODE:return{type:Oe.CDATA,textContent:"",rootId:b};case t.COMMENT_NODE:return{type:Oe.Comment,textContent:t.textContent||"",rootId:b};default:return!1}}function KI(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function YI(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:a,maskTextFn:o,maskInputOptions:u,maskInputFn:c,rootId:l}=e,d=t.parentNode&&t.parentNode.tagName;let f=t.textContent;const h=d==="STYLE"?!0:void 0,p=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(h&&f){try{t.nextSibling||t.previousSibling||ba([t,"access",m=>m.parentNode,"access",m=>m.sheet,"optionalAccess",m=>m.cssRules])&&(f=Sa(t.parentNode.sheet))}catch(m){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${m}`,t)}f=Ta(f,Xc())}p&&(f="SCRIPT_PLACEHOLDER");const y=Br(t,r,s,i,a,n);if(!h&&!p&&!g&&f&&y&&(f=o?o(f,t.parentElement):f.replace(/[\S]/g,"*")),g&&f&&(u.textarea||y)&&(f=c?c(f,t.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const m=ao({type:null,tagName:d,maskInputOptions:u});f=$i({isMasked:Br(t,r,s,i,a,m),element:t,value:f,maskInputFn:c})}return{type:Oe.Text,textContent:f||"",isStyle:h,rootId:l}}function XI(t,e){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:a,maskInputOptions:o={},maskAttributeFn:u,maskInputFn:c,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:g,maskAllText:y,maskTextClass:m,unmaskTextClass:v,maskTextSelector:_,unmaskTextSelector:E}=e,C=GI(t,r,i,s),b=MI(t);let S={};const R=t.attributes.length;for(let I=0;I<R;I++){const w=t.attributes[I];w.name&&!_m(b,w.name,w.value)&&(S[w.name]=mm(n,b,Fr(w.name),w.value,t,u))}if(b==="link"&&a){const I=Array.from(n.styleSheets).find(O=>O.href===t.href);let w=null;I&&(w=Sa(I)),w&&(delete S.rel,delete S.href,S._cssText=Ta(w,I.href))}if(b==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const I=Sa(t.sheet);I&&(S._cssText=Ta(I,Xc()))}if(b==="input"||b==="textarea"||b==="select"||b==="option"){const I=t,w=Kc(I),O=Ea(I,Mu(b),w),x=I.checked;if(w!=="submit"&&w!=="button"&&O){const M=Br(I,m,_,v,E,ao({type:w,tagName:Mu(b),maskInputOptions:o}));S.value=$i({isMasked:M,element:I,value:O,maskInputFn:c})}x&&(S.checked=x)}if(b==="option"&&(t.selected&&!o.select?S.selected=!0:delete S.selected),b==="canvas"&&f){if(t.__context==="2d")OI(t)||(S.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){const I=t.toDataURL(l.type,l.quality),w=document.createElement("canvas");w.width=t.width,w.height=t.height;const O=w.toDataURL(l.type,l.quality);I!==O&&(S.rr_dataURL=I)}}if(b==="img"&&d){fr||(fr=n.createElement("canvas"),Yd=fr.getContext("2d"));const I=t,w=I.crossOrigin;I.crossOrigin="anonymous";const O=()=>{I.removeEventListener("load",O);try{fr.width=I.naturalWidth,fr.height=I.naturalHeight,Yd.drawImage(I,0,0),S.rr_dataURL=fr.toDataURL(l.type,l.quality)}catch(x){console.warn(`Cannot inline img src=${I.currentSrc}! Error: ${x}`)}w?S.crossOrigin=w:I.removeAttribute("crossorigin")};I.complete&&I.naturalWidth!==0?O():I.addEventListener("load",O)}if((b==="audio"||b==="video")&&(S.rr_mediaState=t.paused?"paused":"played",S.rr_mediaCurrentTime=t.currentTime),p||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),C){const{width:I,height:w}=t.getBoundingClientRect();S={class:S.class,rr_width:`${I}px`,rr_height:`${w}px`}}b==="iframe"&&!h(S.src)&&(t.contentDocument||(S.rr_src=S.src),delete S.src);let k;try{customElements.get(b)&&(k=!0)}catch{}return{type:Oe.Element,tagName:b,attributes:S,childNodes:[],isSVG:jI(t)||void 0,needBlock:C,rootId:g,isCustom:k}}function de(t){return t==null?"":t.toLowerCase()}function JI(t,e){if(e.comment&&t.type===Oe.Comment)return!0;if(t.type===Oe.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(de(t.attributes.name).match(/^msapplication-tile(image|color)$/)||de(t.attributes.name)==="application-name"||de(t.attributes.rel)==="icon"||de(t.attributes.rel)==="apple-touch-icon"||de(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&de(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(de(t.attributes.property).match(/^(og|twitter|fb):/)||de(t.attributes.name).match(/^(og|twitter):/)||de(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(de(t.attributes.name)==="robots"||de(t.attributes.name)==="googlebot"||de(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(de(t.attributes.name)==="author"||de(t.attributes.name)==="generator"||de(t.attributes.name)==="framework"||de(t.attributes.name)==="publisher"||de(t.attributes.name)==="progid"||de(t.attributes.property).match(/^article:/)||de(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(de(t.attributes.name)==="google-site-verification"||de(t.attributes.name)==="yandex-verification"||de(t.attributes.name)==="csrf-token"||de(t.attributes.name)==="p:domain_verify"||de(t.attributes.name)==="verify-v1"||de(t.attributes.name)==="verification"||de(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Tr(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:o,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskAttributeFn:g,maskTextFn:y,maskInputFn:m,slimDOMOptions:v,dataURLOptions:_={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:R=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:O=!1}=e;let{preserveWhiteSpace:x=!0}=e;const M=VI(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:o,unblockSelector:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:g,maskTextFn:y,maskInputFn:m,dataURLOptions:_,inlineImages:E,recordCanvas:C,keepIframeSrcFn:w,newlyAddedElement:O});if(!M)return console.warn(t,"not serialized"),null;let F;r.hasNode(t)?F=r.getId(t):JI(M,v)||!x&&M.type===Oe.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?F=Ui:F=Yc();const $=Object.assign(M,{id:F});if(r.add(t,$),F===Ui)return null;b&&b(t);let Y=!f;if($.type===Oe.Element){Y=Y&&!$.needBlock,delete $.needBlock;const G=t.shadowRoot;G&&Ri(G)&&($.isShadowHost=!0)}if(($.type===Oe.Document||$.type===Oe.Element)&&Y){v.headWhitespace&&$.type===Oe.Element&&$.tagName==="head"&&(x=!1);const G={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:o,unblockSelector:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:g,maskTextFn:y,maskInputFn:m,slimDOMOptions:v,dataURLOptions:_,inlineImages:E,recordCanvas:C,preserveWhiteSpace:x,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:R,onStylesheetLoad:k,stylesheetLoadTimeout:I,keepIframeSrcFn:w};for(const U of Array.from(t.childNodes)){const ie=Tr(U,G);ie&&$.childNodes.push(ie)}if(TI(t)&&t.shadowRoot)for(const U of Array.from(t.shadowRoot.childNodes)){const ie=Tr(U,G);ie&&(Ri(t.shadowRoot)&&(ie.isShadow=!0),$.childNodes.push(ie))}}return t.parentNode&&xi(t.parentNode)&&Ri(t.parentNode)&&($.isShadow=!0),$.type===Oe.Element&&$.tagName==="iframe"&&WI(t,()=>{const G=t.contentDocument;if(G&&S){const U=Tr(G,{doc:G,mirror:r,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:o,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:g,maskTextFn:y,maskInputFn:m,slimDOMOptions:v,dataURLOptions:_,inlineImages:E,recordCanvas:C,preserveWhiteSpace:x,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:R,onStylesheetLoad:k,stylesheetLoadTimeout:I,keepIframeSrcFn:w});U&&S(t,U)}},R),$.type===Oe.Element&&$.tagName==="link"&&$.attributes.rel==="stylesheet"&&qI(t,()=>{if(k){const G=Tr(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:o,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:g,maskTextFn:y,maskInputFn:m,slimDOMOptions:v,dataURLOptions:_,inlineImages:E,recordCanvas:C,preserveWhiteSpace:x,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:R,onStylesheetLoad:k,stylesheetLoadTimeout:I,keepIframeSrcFn:w});G&&k(t,G)}},I),$}function QI(t,e){const{mirror:n=new gm,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:a=!1,maskTextClass:o="rr-mask",unmaskTextClass:u=null,maskTextSelector:c=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskAttributeFn:g,maskTextFn:y,maskInputFn:m,slimDOM:v=!1,dataURLOptions:_,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:R,stylesheetLoadTimeout:k,keepIframeSrcFn:I=()=>!1}=e;return Tr(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:o,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:p===!1?{}:p,maskAttributeFn:g,maskTextFn:y,maskInputFn:m,slimDOMOptions:v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:_,inlineImages:f,recordCanvas:h,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:R,stylesheetLoadTimeout:k,keepIframeSrcFn:I,newlyAddedElement:!1})}function dn(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...a)=>n.call(e,...a)),e=void 0)}return n}function et(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const vr=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let Xd={map:{},getId(){return console.error(vr),-1},getNode(){return console.error(vr),null},removeNodeFromMap(){console.error(vr)},has(){return console.error(vr),!1},reset(){console.error(vr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Xd=new Proxy(Xd,{get(t,e,n){return e==="map"&&console.error(vr),Reflect.get(t,e,n)}}));function Fi(t,e,n={}){let r=null,i=0;return function(...s){const a=Date.now();!i&&n.leading===!1&&(i=a);const o=e-(a-i),u=this;o<=0||o>e?(r&&(sw(r),r=null),i=a,t.apply(u,s)):!r&&n.trailing!==!1&&(r=oo(()=>{i=n.leading===!1?0:Date.now(),r=null,t.apply(u,s)},o))}}function ym(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(a){oo(()=>{n.set.call(this,a)},0),s&&s.set&&s.set.call(this,a)}}),()=>ym(t,e,s||{},!0)}function Jc(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}let Ia=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ia=()=>new Date().getTime());function vm(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:dn([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||dn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||dn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:dn([e,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||dn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||dn([e,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function bm(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Sm(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Em(t){return t?t.nodeType===t.ELEMENT_NODE?t:t.parentElement:null}function yt(t,e,n,r,i){if(!t)return!1;const s=Em(t);if(!s)return!1;const a=Er(e,n);if(!i){const c=r&&s.matches(r);return a(s)&&!c}const o=zn(s,a);let u=-1;return o<0?!1:(r&&(u=zn(s,Er(null,r))),o>-1&&u<0?!0:o<u)}function ZI(t,e){return e.getId(t)!==-1}function zo(t,e){return e.getId(t)===Ui}function Tm(t,e){if(xi(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?Tm(t.parentNode,e):!0:!0}function Lu(t){return!!t.changedTouches}function ew(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let n=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Im(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function wm(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Nu(t){return!!dn([t,"optionalAccess",e=>e.shadowRoot])}class tw{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return Eb(this.styleIDMap.get(e),()=>-1)}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Cm(t){let e=null;return dn([t,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function nw(t){let e=t,n;for(;n=Cm(e);)e=n;return e}function rw(t){const e=t.ownerDocument;if(!e)return!1;const n=nw(t);return e.contains(n)}function km(t){const e=t.ownerDocument;return e?e.contains(t)||rw(t):!1}const Jd={};function Qc(t){const e=Jd[t];if(e)return e;const n=window.document;let r=window[t];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const s=i.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(i)}catch{}return Jd[t]=r.bind(window)}function iw(...t){return Qc("requestAnimationFrame")(...t)}function oo(...t){return Qc("setTimeout")(...t)}function sw(...t){return Qc("clearTimeout")(...t)}var X=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(X||{}),J=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(J||{}),Qe=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Qe||{}),zt=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(zt||{});function aw(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...a)=>n.call(e,...a)),e=void 0)}return n}function Qd(t){return"__ln"in t}class ow{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=aw([n,"optionalAccess",i=>i.next])||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Qd(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&Qd(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.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(e){const n=e.__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),e.__ln&&delete e.__ln,this.length--)}}const Zd=(t,e)=>`${t}@${e}`;class uw{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,r=new ow,i=u=>{let c=u,l=Ui;for(;l===Ui;)c=c&&c.nextSibling,l=c&&this.mirror.getId(c);return l},s=u=>{if(!u.parentNode||!km(u))return;const c=xi(u.parentNode)?this.mirror.getId(Cm(u)):this.mirror.getId(u.parentNode),l=i(u);if(c===-1||l===-1)return r.addNode(u);const d=Tr(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Im(f,this.mirror)&&this.iframeManager.addIframe(f),wm(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Nu(u)&&this.shadowDomManager.addShadowRoot(u.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{this.iframeManager.attachIframe(f,h),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)}});d&&(e.push({parentId:c,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)ef(this.removes,u,this.mirror)&&!this.movedSet.has(u.parentNode)||s(u);for(const u of this.addedSet)!tf(this.droppedSet,u)&&!ef(this.removes,u,this.mirror)||tf(this.movedSet,u)?s(u):this.droppedSet.add(u);let a=null;for(;r.length;){let u=null;if(a){const c=this.mirror.getId(a.value.parentNode),l=i(a.value);c!==-1&&l!==-1&&(u=a)}if(!u){let c=r.tail;for(;c;){const l=c;if(c=c.previous,l){const d=this.mirror.getId(l.value.parentNode);if(i(l.value)===-1)continue;if(d!==-1){u=l;break}else{const h=l.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=h.parentNode.host;if(this.mirror.getId(p)!==-1){u=l;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}a=u.previous,r.removeNode(u.value),s(u.value)}const o={texts:this.texts.map(u=>({id:this.mirror.getId(u.node),value:u.value})).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:c}=u;if(typeof c.style=="string"){const l=JSON.stringify(u.styleDiff),d=JSON.stringify(u._unchangedStyles);l.length<c.style.length&&(l+d).split("var(").length===c.style.split("var(").length&&(c.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:c}}).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!zo(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!yt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:Br(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Em(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const a=Kc(n),o=n.tagName;i=Ea(n,o,a);const u=ao({maskInputOptions:this.maskInputOptions,tagName:o,type:a}),c=Br(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,u);i=$i({isMasked:c,element:n,value:i,maskInputFn:this.maskInputFn})}if(yt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===e.oldValue)return;let s=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!_m(n.tagName,r)&&(s.attributes[r]=mm(this.doc,Fr(n.tagName),Fr(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const o of Array.from(n.style)){const u=n.style.getPropertyValue(o),c=n.style.getPropertyPriority(o);u!==a.style.getPropertyValue(o)||c!==a.style.getPropertyPriority(o)?c===""?s.styleDiff[o]=u:s.styleDiff[o]=[u,c]:s._unchangedStyles[o]=[u,c]}for(const o of Array.from(a.style))n.style.getPropertyValue(o)===""&&(s.styleDiff[o]=!1)}break}case"childList":{if(yt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),i=xi(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);yt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||zo(n,this.mirror)||!ZI(n,this.mirror)||(this.addedSet.has(n)?(Pu(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Tm(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Zd(r,i)]?Pu(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:xi(e.target)&&Ri(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(zo(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Zd(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);yt(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(r=>this.genAdds(r)),Nu(e)&&e.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Pu(t,e){t.delete(e),e.childNodes.forEach(n=>Pu(t,n))}function ef(t,e,n){return t.length===0?!1:xm(t,e,n)}function xm(t,e,n){const{parentNode:r}=e;if(!r)return!1;const i=n.getId(r);return t.some(s=>s.id===i)?!0:xm(t,r,n)}function tf(t,e){return t.size===0?!1:Rm(t,e)}function Rm(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Rm(t,n):!1}let Oi;function cw(t){Oi=t}function lw(){Oi=void 0}const ne=t=>Oi?(...n)=>{try{return t(...n)}catch(r){if(Oi&&Oi(r)===!0)return()=>{};throw r}}:t;function At(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...a)=>n.call(e,...a)),e=void 0)}return n}const Ir=[];function ts(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function Om(t,e){const n=new uw;Ir.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const i=At([window,"optionalAccess",a=>a.Zone,"optionalAccess",a=>a.__symbol__,"optionalCall",a=>a("MutationObserver")]);i&&window[i]&&(r=window[i]);const s=new r(ne(a=>{t.onMutation&&t.onMutation(a)===!1||n.processMutations.bind(n)(a)}));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function dw({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],o;const u=Fi(ne(d=>{const f=Date.now()-o;t(a.map(h=>(h.timeOffset-=f,h)),d),a=[],o=null}),s),c=ne(Fi(ne(d=>{const f=ts(d),{clientX:h,clientY:p}=Lu(d)?d.changedTouches[0]:d;o||(o=Ia()),a.push({x:h,y:p,id:r.getId(f),timeOffset:Ia()-o}),u(typeof DragEvent<"u"&&d instanceof DragEvent?J.Drag:d instanceof MouseEvent?J.MouseMove:J.TouchMove)}),i,{trailing:!1})),l=[et("mousemove",c,n),et("touchmove",c,n),et("drag",c,n)];return ne(()=>{l.forEach(d=>d())})}function fw({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,u=[];let c=null;const l=d=>f=>{const h=ts(f);if(yt(h,r,i,s,!0))return;let p=null,g=d;if("pointerType"in f){switch(f.pointerType){case"mouse":p=zt.Mouse;break;case"touch":p=zt.Touch;break;case"pen":p=zt.Pen;break}p===zt.Touch?Qe[d]===Qe.MouseDown?g="TouchStart":Qe[d]===Qe.MouseUp&&(g="TouchEnd"):zt.Pen}else Lu(f)&&(p=zt.Touch);p!==null?(c=p,(g.startsWith("Touch")&&p===zt.Touch||g.startsWith("Mouse")&&p===zt.Mouse)&&(p=null)):Qe[d]===Qe.Click&&(p=c,c=null);const y=Lu(f)?f.changedTouches[0]:f;if(!y)return;const m=n.getId(h),{clientX:v,clientY:_}=y;ne(t)({type:Qe[g],id:m,x:v,y:_,...p!==null&&{pointerType:p}})};return Object.keys(Qe).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&o[d]!==!1).forEach(d=>{let f=Fr(d);const h=l(d);if(window.PointerEvent)switch(Qe[d]){case Qe.MouseDown:case Qe.MouseUp:f=f.replace("mouse","pointer");break;case Qe.TouchStart:case Qe.TouchEnd:return}u.push(et(f,h,e))}),ne(()=>{u.forEach(d=>d())})}function Am({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){const o=ne(Fi(ne(u=>{const c=ts(u);if(!c||yt(c,r,i,s,!0))return;const l=n.getId(c);if(c===e&&e.defaultView){const d=vm(e.defaultView);t({id:l,x:d.left,y:d.top})}else t({id:l,x:c.scrollLeft,y:c.scrollTop})}),a.scroll||100));return et("scroll",o,e)}function hw({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const i=ne(Fi(ne(()=>{const s=bm(),a=Sm();(n!==s||r!==a)&&(t({width:Number(a),height:Number(s)}),n=s,r=a)}),200));return et("resize",i,e)}const pw=["INPUT","TEXTAREA","SELECT"],nf=new WeakMap;function gw({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:a,ignoreSelector:o,maskInputOptions:u,maskInputFn:c,sampling:l,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:g}){function y(S){let R=ts(S);const k=S.isTrusted,I=R&&Mu(R.tagName);if(I==="OPTION"&&(R=R.parentElement),!R||!I||pw.indexOf(I)<0||yt(R,r,i,s,!0))return;const w=R;if(w.classList.contains(a)||o&&w.matches(o))return;const O=Kc(R);let x=Ea(w,I,O),M=!1;const F=ao({maskInputOptions:u,tagName:I,type:O}),$=Br(R,f,p,h,g,F);(O==="radio"||O==="checkbox")&&(M=R.checked),x=$i({isMasked:$,element:R,value:x,maskInputFn:c}),m(R,d?{text:x,isChecked:M,userTriggered:k}:{text:x,isChecked:M});const Y=R.name;O==="radio"&&Y&&M&&e.querySelectorAll(`input[type="radio"][name="${Y}"]`).forEach(G=>{if(G!==R){const U=$i({isMasked:$,element:G,value:Ea(G,I,O),maskInputFn:c});m(G,d?{text:U,isChecked:!M,userTriggered:!1}:{text:U,isChecked:!M})}})}function m(S,R){const k=nf.get(S);if(!k||k.text!==R.text||k.isChecked!==R.isChecked){nf.set(S,R);const I=n.getId(S);ne(t)({...R,id:I})}}const _=(l.input==="last"?["change"]:["input","change"]).map(S=>et(S,ne(y),e)),E=e.defaultView;if(!E)return()=>{_.forEach(S=>S())};const C=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),b=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&_.push(...b.map(S=>ym(S[0],S[1],{set(){ne(y)({target:this,isTrusted:!1})}},!1,E))),ne(()=>{_.forEach(S=>S())})}function wa(t){const e=[];function n(r,i){if(Ds("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ds("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ds("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ds("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return n(t,e)}function fn(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function mw({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ne((l,d,f)=>{const[h,p]=f,{id:g,styleId:y}=fn(d,e,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&t({id:g,styleId:y,adds:[{rule:h,index:p}]}),l.apply(d,f)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:ne((l,d,f)=>{const[h]=f,{id:p,styleId:g}=fn(d,e,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&t({id:p,styleId:g,removes:[{index:h}]}),l.apply(d,f)})});let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:ne((l,d,f)=>{const[h]=f,{id:p,styleId:g}=fn(d,e,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&t({id:p,styleId:g,replace:h}),l.apply(d,f)})}));let o;r.CSSStyleSheet.prototype.replaceSync&&(o=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:ne((l,d,f)=>{const[h]=f,{id:p,styleId:g}=fn(d,e,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&t({id:p,styleId:g,replaceSync:h}),l.apply(d,f)})}));const u={};Ms("CSSGroupingRule")?u.CSSGroupingRule=r.CSSGroupingRule:(Ms("CSSMediaRule")&&(u.CSSMediaRule=r.CSSMediaRule),Ms("CSSConditionRule")&&(u.CSSConditionRule=r.CSSConditionRule),Ms("CSSSupportsRule")&&(u.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(u).forEach(([l,d])=>{c[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[l].insertRule,{apply:ne((f,h,p)=>{const[g,y]=p,{id:m,styleId:v}=fn(h.parentStyleSheet,e,n.styleMirror);return(m&&m!==-1||v&&v!==-1)&&t({id:m,styleId:v,adds:[{rule:g,index:[...wa(h),y||0]}]}),f.apply(h,p)})}),d.prototype.deleteRule=new Proxy(c[l].deleteRule,{apply:ne((f,h,p)=>{const[g]=p,{id:y,styleId:m}=fn(h.parentStyleSheet,e,n.styleMirror);return(y&&y!==-1||m&&m!==-1)&&t({id:y,styleId:m,removes:[{index:[...wa(h),g]}]}),f.apply(h,p)})})}),ne(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=s,a&&(r.CSSStyleSheet.prototype.replace=a),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(u).forEach(([l,d])=>{d.prototype.insertRule=c[l].insertRule,d.prototype.deleteRule=c[l].deleteRule})})}function Dm({mirror:t,stylesheetManager:e},n){let r=null;n.nodeName==="#document"?r=t.getId(n):r=t.getId(n.host);const i=n.nodeName==="#document"?At([n,"access",a=>a.defaultView,"optionalAccess",a=>a.Document]):At([n,"access",a=>a.ownerDocument,"optionalAccess",a=>a.defaultView,"optionalAccess",a=>a.ShadowRoot]),s=At([i,"optionalAccess",a=>a.prototype])?Object.getOwnPropertyDescriptor(At([i,"optionalAccess",a=>a.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return At([s,"access",a=>a.get,"optionalAccess",a=>a.call,"call",a=>a(this)])},set(a){const o=At([s,"access",u=>u.set,"optionalAccess",u=>u.call,"call",u=>u(this,a)]);if(r!==null&&r!==-1)try{e.adoptStyleSheets(a,r)}catch{}return o}}),ne(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function _w({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:ne((o,u,c)=>{const[l,d,f]=c;if(n.has(l))return s.apply(u,[l,d,f]);const{id:h,styleId:p}=fn(At([u,"access",g=>g.parentRule,"optionalAccess",g=>g.parentStyleSheet]),e,r.styleMirror);return(h&&h!==-1||p&&p!==-1)&&t({id:h,styleId:p,set:{property:l,value:d,priority:f},index:wa(u.parentRule)}),o.apply(u,c)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:ne((o,u,c)=>{const[l]=c;if(n.has(l))return a.apply(u,[l]);const{id:d,styleId:f}=fn(At([u,"access",h=>h.parentRule,"optionalAccess",h=>h.parentStyleSheet]),e,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&t({id:d,styleId:f,remove:{property:l},index:wa(u.parentRule)}),o.apply(u,c)})}),ne(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=a})}function yw({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:a}){const o=ne(c=>Fi(ne(l=>{const d=ts(l);if(!d||yt(d,e,n,r,!0))return;const{currentTime:f,volume:h,muted:p,playbackRate:g}=d;t({type:c,id:i.getId(d),currentTime:f,volume:h,muted:p,playbackRate:g})}),s.media||500)),u=[et("play",o(0),a),et("pause",o(1),a),et("seeked",o(2),a),et("volumechange",o(3),a),et("ratechange",o(4),a)];return ne(()=>{u.forEach(c=>c())})}function vw({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(u,c,l){const d=new s(u,c,l);return i.set(d,{family:u,buffer:typeof c!="string",descriptors:l,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};const a=Jc(e.fonts,"add",function(o){return function(u){return oo(ne(()=>{const c=i.get(u);c&&(t(c),i.delete(u))}),0),o.apply(this,[u])}});return r.push(()=>{n.FontFace=s}),r.push(a),ne(()=>{r.forEach(o=>o())})}function bw(t){const{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:a}=t;let o=!0;const u=ne(()=>{const c=e.getSelection();if(!c||o&&At([c,"optionalAccess",f=>f.isCollapsed]))return;o=c.isCollapsed||!1;const l=[],d=c.rangeCount||0;for(let f=0;f<d;f++){const h=c.getRangeAt(f),{startContainer:p,startOffset:g,endContainer:y,endOffset:m}=h;yt(p,r,i,s,!0)||yt(y,r,i,s,!0)||l.push({start:n.getId(p),startOffset:g,end:n.getId(y),endOffset:m})}a({ranges:l})});return u(),et("selectionchange",u)}function Sw({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:Jc(n.customElements,"define",function(i){return function(s,a,o){try{e({define:{name:s}})}catch{}return i.apply(this,[s,a,o])}})}function Ew(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};const r=Om(t,t.doc),i=dw(t),s=fw(t),a=Am(t),o=hw(t,{win:n}),u=gw(t),c=yw(t),l=mw(t,{win:n}),d=Dm(t,t.doc),f=_w(t,{win:n}),h=t.collectFonts?vw(t):()=>{},p=bw(t),g=Sw(t),y=[];for(const m of t.plugins)y.push(m.observer(m.callback,n,m.options));return ne(()=>{Ir.forEach(m=>m.reset()),r.disconnect(),i(),s(),a(),o(),u(),c(),l(),d(),f(),h(),p(),g(),y.forEach(m=>m())})}function Ds(t){return typeof window[t]<"u"}function Ms(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class $u{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,n,r,i){const s=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let o=s.get(n);return o||(o=this.generateIdFn(),s.set(n,o),a.set(o,n)),o}getIds(e,n){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return n.map(s=>this.getId(e,s,r,i))}getRemoteId(e,n,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;const s=i.get(n);return s||-1}getRemoteIds(e,n){const r=this.getRemoteIdToIdMap(e);return n.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}function rf(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...a)=>n.call(e,...a)),e=void 0)}return n}class Tw{constructor(){this.crossOriginIframeMirror=new $u(Yc),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Iw{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new $u(Yc),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new $u(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),rf([this,"access",r=>r.loadListener,"optionalCall",r=>r(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const s=this.transformCrossOriginEvent(i,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(e,n){switch(n.type){case X.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:X.IncrementalSnapshot,data:{source:J.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case X.Meta:case X.Load:case X.DomContentLoaded:return!1;case X.Plugin:return n;case X.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case X.IncrementalSnapshot:switch(n.data.source){case J.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);const i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(r.node,i)}),n.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case J.Drag:case J.TouchMove:case J.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case J.ViewportResize:return!1;case J.MediaInteraction:case J.MouseInteraction:case J.Scroll:case J.CanvasMutation:case J.Input:return this.replaceIds(n.data,e,["id"]),n;case J.StyleSheetRule:case J.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case J.Font:return n;case J.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),n;case J.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),rf([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(i=>{this.replaceStyleIds(i,e,["styleId"])})]),n}}return!1}replace(e,n,r,i){for(const s of i)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=e.getIds(r,n[s]):n[s]=e.getId(r,n[s]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==Oe.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class ww{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Cw{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!Ri(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Om({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Am({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),oo(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Dm({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(Jc(e.prototype,"attachShadow",function(i){return function(s){const a=i.call(this,s);return this.shadowRoot&&km(this)&&r.addShadowRoot(this.shadowRoot,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class sf{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class kw{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new tw,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;const r={id:n,styleIds:[]},i=[];for(const s of e){let a;this.styleMirror.has(s)?a=this.styleMirror.getId(s):(a=this.styleMirror.add(s),i.push({styleId:a,rules:Array.from(s.rules||CSSRule,(o,u)=>({rule:pm(o),index:u}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class xw{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){iw(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,n){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==n)}add(e,n){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let ve,Ca;const gt=RI();function yn(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:u=null,maskAllText:c=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:m,maskAttributeFn:v,maskInputFn:_,maskTextFn:E,maxCanvasSize:C=null,packFn:b,sampling:S={},dataURLOptions:R={},mousemoveWait:k,recordCanvas:I=!1,recordCrossOriginIframes:w=!1,recordAfter:O=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:x=!1,collectFonts:M=!1,inlineImages:F=!1,plugins:$,keepIframeSrcFn:Y=()=>!1,ignoreCSSAttributes:G=new Set([]),errorHandler:U,onMutation:ie,getCanvasManager:Ve}=t;cw(U);const me=w?window.parent===window:!0;let _e=!1;if(!me)try{window.parent.document&&(_e=!1)}catch{_e=!0}if(me&&!e)throw new Error("emit function is required");k!==void 0&&S.mousemove===void 0&&(S.mousemove=k),gt.reset();const Te=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:{},Ke=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};ew();let ot,cr=0;const bs=W=>{for(const Pe of $||[])Pe.eventProcessor&&(W=Pe.eventProcessor(W));return b&&!_e&&(W=b(W)),W};ve=(W,Pe)=>{const Q=W;if(Q.timestamp=Ia(),Qs([Ir,"access",P=>P[0],"optionalAccess",P=>P.isFrozen,"call",P=>P()])&&Q.type!==X.FullSnapshot&&!(Q.type===X.IncrementalSnapshot&&Q.data.source===J.Mutation)&&Ir.forEach(P=>P.unfreeze()),me)Qs([e,"optionalCall",P=>P(bs(Q),Pe)]);else if(_e){const P={type:"rrweb",event:bs(Q),origin:window.location.origin,isCheckout:Pe};window.parent.postMessage(P,"*")}if(Q.type===X.FullSnapshot)ot=Q,cr=0;else if(Q.type===X.IncrementalSnapshot){if(Q.data.source===J.Mutation&&Q.data.isAttachIframe)return;cr++;const P=r&&cr>=r,L=n&&ot&&Q.timestamp-ot.timestamp>n;(P||L)&&lr(!0)}};const Ft=W=>{ve({type:X.IncrementalSnapshot,data:{source:J.Mutation,...W}})},fi=W=>ve({type:X.IncrementalSnapshot,data:{source:J.Scroll,...W}}),Mn=W=>ve({type:X.IncrementalSnapshot,data:{source:J.CanvasMutation,...W}}),Lo=W=>ve({type:X.IncrementalSnapshot,data:{source:J.AdoptedStyleSheet,...W}}),ht=new kw({mutationCb:Ft,adoptedStyleSheetCb:Lo}),nt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Tw:new Iw({mirror:gt,mutationCb:Ft,stylesheetManager:ht,recordCrossOriginIframes:w,wrappedEmit:ve});for(const W of $||[])W.getMirror&&W.getMirror({nodeMirror:gt,crossOriginIframeMirror:nt.crossOriginIframeMirror,crossOriginIframeStyleMirror:nt.crossOriginIframeStyleMirror});const Ln=new xw,Ss=Ow(Ve,{mirror:gt,win:window,mutationCb:W=>ve({type:X.IncrementalSnapshot,data:{source:J.CanvasMutation,...W}}),recordCanvas:I,blockClass:i,blockSelector:s,unblockSelector:a,maxCanvasSize:C,sampling:S.canvas,dataURLOptions:R,errorHandler:U}),Nn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new ww:new Cw({mutationCb:Ft,scrollCb:fi,bypassOptions:{onMutation:ie,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:c,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:Te,dataURLOptions:R,maskAttributeFn:v,maskTextFn:E,maskInputFn:_,recordCanvas:I,inlineImages:F,sampling:S,slimDOMOptions:Ke,iframeManager:nt,stylesheetManager:ht,canvasManager:Ss,keepIframeSrcFn:Y,processedNodeManager:Ln},mirror:gt}),lr=(W=!1)=>{ve({type:X.Meta,data:{href:window.location.href,width:Sm(),height:bm()}},W),ht.reset(),Nn.init(),Ir.forEach(Q=>Q.lock());const Pe=QI(document,{mirror:gt,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:c,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:Te,maskAttributeFn:v,maskInputFn:_,maskTextFn:E,slimDOM:Ke,dataURLOptions:R,recordCanvas:I,inlineImages:F,onSerialize:Q=>{Im(Q,gt)&&nt.addIframe(Q),wm(Q,gt)&&ht.trackLinkElement(Q),Nu(Q)&&Nn.addShadowRoot(Q.shadowRoot,document)},onIframeLoad:(Q,P)=>{nt.attachIframe(Q,P),Nn.observeAttachShadow(Q)},onStylesheetLoad:(Q,P)=>{ht.attachLinkElement(Q,P)},keepIframeSrcFn:Y});if(!Pe)return console.warn("Failed to snapshot the document");ve({type:X.FullSnapshot,data:{node:Pe,initialOffset:vm(window)}}),Ir.forEach(Q=>Q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ht.adoptStyleSheets(document.adoptedStyleSheets,gt.getId(document))};Ca=lr;try{const W=[],Pe=P=>ne(Ew)({onMutation:ie,mutationCb:Ft,mousemoveCb:(L,q)=>ve({type:X.IncrementalSnapshot,data:{source:q,positions:L}}),mouseInteractionCb:L=>ve({type:X.IncrementalSnapshot,data:{source:J.MouseInteraction,...L}}),scrollCb:fi,viewportResizeCb:L=>ve({type:X.IncrementalSnapshot,data:{source:J.ViewportResize,...L}}),inputCb:L=>ve({type:X.IncrementalSnapshot,data:{source:J.Input,...L}}),mediaInteractionCb:L=>ve({type:X.IncrementalSnapshot,data:{source:J.MediaInteraction,...L}}),styleSheetRuleCb:L=>ve({type:X.IncrementalSnapshot,data:{source:J.StyleSheetRule,...L}}),styleDeclarationCb:L=>ve({type:X.IncrementalSnapshot,data:{source:J.StyleDeclaration,...L}}),canvasMutationCb:Mn,fontCb:L=>ve({type:X.IncrementalSnapshot,data:{source:J.Font,...L}}),selectionCb:L=>{ve({type:X.IncrementalSnapshot,data:{source:J.Selection,...L}})},customElementCb:L=>{ve({type:X.IncrementalSnapshot,data:{source:J.CustomElement,...L}})},blockClass:i,ignoreClass:o,ignoreSelector:u,maskAllText:c,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:Te,inlineStylesheet:p,sampling:S,recordCanvas:I,inlineImages:F,userTriggeredOnInput:x,collectFonts:M,doc:P,maskAttributeFn:v,maskInputFn:_,maskTextFn:E,keepIframeSrcFn:Y,blockSelector:s,unblockSelector:a,slimDOMOptions:Ke,dataURLOptions:R,mirror:gt,iframeManager:nt,stylesheetManager:ht,shadowDomManager:Nn,processedNodeManager:Ln,canvasManager:Ss,ignoreCSSAttributes:G,plugins:Qs([$,"optionalAccess",L=>L.filter,"call",L=>L(q=>q.observer),"optionalAccess",L=>L.map,"call",L=>L(q=>({observer:q.observer,options:q.options,callback:ye=>ve({type:X.Plugin,data:{plugin:q.name,payload:ye}})}))])||[]},{});nt.addLoadListener(P=>{try{W.push(Pe(P.contentDocument))}catch(L){console.warn(L)}});const Q=()=>{lr(),W.push(Pe(document))};return document.readyState==="interactive"||document.readyState==="complete"?Q():(W.push(et("DOMContentLoaded",()=>{ve({type:X.DomContentLoaded,data:{}}),O==="DOMContentLoaded"&&Q()})),W.push(et("load",()=>{ve({type:X.Load,data:{}}),O==="load"&&Q()},window))),()=>{W.forEach(P=>P()),Ln.destroy(),Ca=void 0,lw()}}catch(W){console.warn(W)}}function Rw(t){if(!Ca)throw new Error("please take full snapshot after start recording");Ca(t)}yn.mirror=gt;yn.takeFullSnapshot=Rw;function Ow(t,e){try{return t?t(e):new sf}catch{return console.warn("Unable to initialize CanvasManager"),new sf}}const Aw=3,Dw=5;function Zc(t){return t>9999999999?t:t*1e3}function Wo(t){return t>9999999999?t/1e3:t}function ns(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:X.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:_t(e,10,1e3)}}),e.category==="console")))}const Mw="button,a";function Mm(t){return t.closest(Mw)||t}function Lm(t){const e=Nm(t);return!e||!(e instanceof Element)?e:Mm(e)}function Nm(t){return Lw(t)?t.target:t}function Lw(t){return typeof t=="object"&&!!t&&"target"in t}let hn;function Nw(t){return hn||(hn=[],Pw()),hn.push(t),()=>{const e=hn?hn.indexOf(t):-1;e>-1&&hn.splice(e,1)}}function Pw(){He(fe,"open",function(t){return function(...e){if(hn)try{hn.forEach(n=>n())}catch{}return t.apply(fe,e)}})}function $w(t,e,n){t.handleClick(e,n)}class Uw{constructor(e,n,r=ns){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=e,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const e=Nw(()=>{this._lastMutation=af()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,n){if(Bw(n,this._ignoreSelector)||!Hw(e))return;const r={timestamp:Wo(e.timestamp),clickBreadcrumb:e,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Wo(e)}registerScroll(e=Date.now()){this._lastScroll=Wo(e)}registerClick(e){const n=Mm(e);this._handleMultiClick(n)}_handleMultiClick(e){this._getClicks(e).forEach(n=>{n.clickCount++})}_getClicks(e){return this._clicks.filter(n=>n.node===e)}_checkClicks(){const e=[],n=af();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&&e.push(r)});for(const r of e){const i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const n=this._replay,r=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,i=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!r&&!i,{clickCount:a,clickBreadcrumb:o}=e;if(s){const u=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,c=u<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:fe.location.href,route:n.getCurrentRoute(),timeAfterClickMs:u,endReason:c,clickCount:a||1}};this._addBreadcrumbEvent(n,l);return}if(a>1){const u={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:fe.location.href,route:n.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(n,u)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const Fw=["A","BUTTON","INPUT"];function Bw(t,e){return!!(!Fw.includes(t.tagName)||t.tagName==="INPUT"&&!["submit","button"].includes(t.getAttribute("type")||"")||t.tagName==="A"&&(t.hasAttribute("download")||t.hasAttribute("target")&&t.getAttribute("target")!=="_self")||e&&t.matches(e))}function Hw(t){return!!(t.data&&typeof t.data.nodeId=="number"&&t.timestamp)}function af(){return Date.now()/1e3}function jw(t,e){try{if(!Gw(e))return;const{source:n}=e.data;if(n===J.Mutation&&t.registerMutation(e.timestamp),n===J.Scroll&&t.registerScroll(e.timestamp),zw(e)){const{type:r,id:i}=e.data,s=yn.mirror.getNode(i);s instanceof HTMLElement&&r===Qe.Click&&t.registerClick(s)}}catch{}}function Gw(t){return t.type===Aw}function zw(t){return t.data.source===J.MouseInteraction}function Lt(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var ka;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(ka||(ka={}));const Ww=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function qw(t){const e={};for(const n in t)if(Ww.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),e[r]=t[n]}return e}const Vw=t=>e=>{if(!t.isEnabled())return;const n=Kw(e);if(!n)return;const r=e.name==="click",i=r?e.event:void 0;r&&t.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&$w(t.clickDetector,n,Lm(e.event)),ns(t,n)};function Pm(t,e){const n=yn.mirror.getId(t),r=n&&yn.mirror.getNode(n),i=r&&yn.mirror.getMeta(r),s=i&&Xw(i)?i:null;return{message:e,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(a=>a.type===ka.Text&&a.textContent).filter(Boolean).map(a=>a.trim()).join(""),attributes:qw(s.attributes)}}:{}}}function Kw(t){const{target:e,message:n}=Yw(t);return Lt({category:`ui.${t.name}`,...Pm(e,n)})}function Yw(t){const e=t.name==="click";let n,r=null;try{r=e?Lm(t.event):Nm(t.event),n=En(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Xw(t){return t.type===ka.Element}function Jw(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=Qw(e);n&&ns(t,n)}function Qw(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:a}=t;if(!a||Zw(a)||!s)return null;const o=e||r||i,u=s.length===1;if(!o&&u)return null;const c=En(a,{maxStringLength:200})||"<unknown>",l=Pm(a,c);return Lt({category:"ui.keyDown",message:c,data:{...l.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}function Zw(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}const of={resource:i1,paint:n1,navigation:r1};function e1(t){return t.map(t1).filter(Boolean)}function t1(t){return of[t.entryType]?of[t.entryType](t):null}function Hr(t){return((qe||fe.performance.timeOrigin)+t)/1e3}function n1(t){const{duration:e,entryType:n,name:r,startTime:i}=t,s=Hr(i);return{type:n,name:r,start:s,end:s+e,data:void 0}}function r1(t){const{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:u,domInteractive:c,loadEventStart:l,loadEventEnd:d,redirectCount:f,startTime:h,transferSize:p,type:g}=t;return i===0?null:{type:`${e}.${g}`,start:Hr(h),end:Hr(s),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:a,duration:i,domInteractive:c,domContentLoadedEventStart:o,domContentLoadedEventEnd:u,loadEventStart:l,loadEventEnd:d,domComplete:s,redirectCount:f}}}function i1(t){const{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:a,encodedBodySize:o,responseStatus:u,transferSize:c}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:Hr(s),end:Hr(i),name:r,data:{size:c,statusCode:u,decodedBodySize:a,encodedBodySize:o}}}function s1(t){const e=t.entries,n=e[e.length-1],r=n?n.element:void 0,i=t.value,s=Hr(i);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:s,end:s,data:{value:i,size:i,nodeId:r?yn.mirror.getId(r):void 0}}}function a1(t){function e(i){t.performanceEntries.includes(i)||t.performanceEntries.push(i)}function n({entries:i}){i.forEach(e)}const r=[];return["navigation","paint","resource"].forEach(i=>{r.push(wn(i,n))}),r.push(Ig(({metric:i})=>{t.replayPerformanceEntries.push(s1(i))})),()=>{r.forEach(i=>i())}}const le=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,o1='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},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<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},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<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,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<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}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<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function u1(){const t=new Blob([o1]);return URL.createObjectURL(t)}function Ze(t,e){le&&(T.info(t),e&&$m(t))}function Dr(t,e){le&&(T.info(t),e&&setTimeout(()=>{$m(t)},0))}function $m(t){nn({category:"console",data:{logger:"replay"},level:"info",message:t},{level:"info"})}class el extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Vc}.`)}}class Um{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(e){const n=JSON.stringify(e).length;if(this._totalSize+=n,this._totalSize>Vc)throw new el;this.events.push(e)}finish(){return new Promise(e=>{const n=this.events;this.clear(),e(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(n=>n.timestamp).sort()[0];return e?Zc(e):null}}class c1{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((e,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?e():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){Ze("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,n){const r=this._getAndIncrementId();return new Promise((i,s)=>{const a=({data:o})=>{const u=o;if(u.method===e&&u.id===r){if(this._worker.removeEventListener("message",a),!u.success){le&&T.error("[Replay]",u.response),s(new Error("Error in compression worker"));return}i(u.response)}};this._worker.addEventListener("message",a),this._worker.postMessage({id:r,method:e,arg:n})})}_getAndIncrementId(){return this._id++}}class l1{constructor(e){this._worker=new c1(e),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(e){const n=Zc(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(e);return this._totalSize+=r.length,this._totalSize>Vc?Promise.reject(new el):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{le&&T.warn('[Replay] Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class d1{constructor(e){this._fallback=new Um,this._compression=new l1(e),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(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{Ze("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:n}=this._fallback,r=[];for(const i of e)r.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(i){le&&T.warn("[Replay] Failed to add events when switching buffers.",i)}}}function f1({useCompression:t,workerUrl:e}){if(t&&window.Worker){const n=h1(e);if(n)return n}return Ze("[Replay] Using simple buffer"),new Um}function h1(t){try{const e=t||p1();if(!e)return;Ze(`[Replay] Using compression worker${t?` from ${t}`:""}`);const n=new Worker(e);return new d1(n)}catch{Ze("[Replay] Failed to create compression worker")}}function p1(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?u1():""}function tl(){try{return"sessionStorage"in fe&&!!fe.sessionStorage}catch{return!1}}function g1(t){m1(),t.session=void 0}function m1(){if(tl())try{fe.sessionStorage.removeItem(Wc)}catch{}}function Fm(t){return t===void 0?!1:Math.random()<t}function Bm(t){const e=Date.now(),n=t.id||ae(),r=t.started||e,i=t.lastActivity||e,s=t.segmentId||0,a=t.sampled,o=t.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:s,sampled:a,previousSessionId:o}}function nl(t){if(tl())try{fe.sessionStorage.setItem(Wc,JSON.stringify(t))}catch{}}function _1(t,e){return Fm(t)?"session":e?"buffer":!1}function uf({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){const i=_1(t,e),s=Bm({sampled:i,previousSessionId:r});return n&&nl(s),s}function y1(t){if(!tl())return null;try{const e=fe.sessionStorage.getItem(Wc);if(!e)return null;const n=JSON.parse(e);return Dr("[Replay] Loading existing session",t),Bm(n)}catch{return null}}function Uu(t,e,n=+new Date){return t===null||e===void 0||e<0?!0:e===0?!1:t+e<=n}function Hm(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return Uu(t.started,e,r)||Uu(t.lastActivity,n,r)}function jm(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!(!Hm(t,{sessionIdleExpire:e,maxReplayDuration:n})||t.sampled==="buffer"&&t.segmentId===0)}function qo({traceInternals:t,sessionIdleExpire:e,maxReplayDuration:n,previousSessionId:r},i){const s=i.stickySession&&y1(t);return s?jm(s,{sessionIdleExpire:e,maxReplayDuration:n})?(Dr("[Replay] Session in sessionStorage is expired, creating new one..."),uf(i,{previousSessionId:s.id})):s:(Dr("[Replay] Creating new session",t),uf(i,{previousSessionId:r}))}function v1(t){return t.type===X.Custom}function rl(t,e,n){return zm(t,e)?(Gm(t,e,n),!0):!1}function b1(t,e,n){return zm(t,e)?Gm(t,e,n):Promise.resolve(null)}async function Gm(t,e,n){if(!t.eventBuffer)return null;try{n&&t.recordingMode==="buffer"&&t.eventBuffer.clear(),n&&(t.eventBuffer.hasCheckout=!0);const r=t.getOptions(),i=S1(e,r.beforeAddRecordingEvent);return i?await t.eventBuffer.addEvent(i):void 0}catch(r){const i=r&&r instanceof el?"addEventSizeExceeded":"addEvent";le&&T.error(r),await t.stop({reason:i});const s=j();s&&s.recordDroppedEvent("internal_sdk_error","replay")}}function zm(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=Zc(e.timestamp);return n+t.timeouts.sessionIdlePause<Date.now()?!1:n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration?(Ze(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,t.getOptions()._experiments.traceInternals),!1):!0}function S1(t,e){try{if(typeof e=="function"&&v1(t))return e(t)}catch(n){return le&&T.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return t}function il(t){return!t.type}function Fu(t){return t.type==="transaction"}function E1(t){return t.type==="replay_event"}function cf(t){return t.type==="feedback"}function Wm(t){const e=w1();return(n,r)=>{if(!t.isEnabled()||!il(n)&&!Fu(n))return;const i=r&&r.statusCode;if(!(e&&(!i||i<200||i>=300))){if(Fu(n)){T1(t,n);return}I1(t,n)}}}function T1(t,e){const n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}function I1(t,e){const n=t.getContext();if(e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id),t.recordingMode!=="buffer"||!e.tags||!e.tags.replayId)return;const{beforeErrorSampling:r}=t.getOptions();typeof r=="function"&&!r(e)||setTimeout(()=>{t.sendBufferedReplayOrFlush()})}function w1(){const t=j();if(!t)return!1;const e=t.getTransport();return e&&e.send.__sentry__baseTransport__||!1}function C1(t){return e=>{!t.isEnabled()||!il(e)||k1(t,e)}}function k1(t,e){const n=e.exception&&e.exception.values&&e.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))){const r=Lt({category:"replay.hydrate-error"});ns(t,r)}}function x1(t,e){return t.type||!t.exception||!t.exception.values||!t.exception.values.length?!1:!!(e.originalException&&e.originalException.__rrweb__)}function R1(t,e){t.triggerUserActivity(),t.addUpdate(()=>e.timestamp?(t.throttledAddEvent({type:X.Custom,timestamp:e.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1):!0)}function O1(t,e){return t.recordingMode!=="buffer"||e.message===qc||!e.exception||e.type?!1:Fm(t.getOptions().errorSampleRate)}function A1(t,e=!1){const n=e?Wm(t):void 0;return Object.assign((r,i)=>t.isEnabled()?E1(r)?(delete r.breadcrumbs,r):!il(r)&&!Fu(r)&&!cf(r)||!t.checkAndHandleExpiredSession()?r:cf(r)?(t.flush(),r.contexts.feedback.replay_id=t.getSessionId(),R1(t,r),r):x1(r,i)&&!t.getOptions()._experiments.captureExceptions?(le&&T.log("[Replay] Ignoring error from rrweb internals",r),null):((O1(t,r)||t.recordingMode==="session")&&(r.tags={...r.tags,replayId:t.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function uo(t,e){return e.map(({type:n,start:r,end:i,name:s,data:a})=>{const o=t.throttledAddEvent({type:X.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:i,data:a}}});return typeof o=="string"?Promise.resolve(null):o})}function D1(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}function M1(t){return e=>{if(!t.isEnabled())return;const n=D1(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(uo(t,[n]),!1)))}}function L1(t,e){return le&&t.getOptions()._experiments.traceInternals?!1:ig(e,j())}function co(t,e){t.isEnabled()&&e!==null&&(L1(t,e.name)||t.addUpdate(()=>(uo(t,[e]),!0)))}function N1(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:i}=t;if(!n)return null;const{method:s,url:a}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:a,data:{method:s,statusCode:i?i.status:void 0}}}function P1(t){return e=>{if(!t.isEnabled())return;const n=N1(e);co(t,n)}}function $1(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,i=r[Xt];if(!e||!n||!i)return null;const{method:s,url:a,status_code:o}=i;return a===void 0?null:{type:"resource.xhr",name:a,start:e/1e3,end:n/1e3,data:{method:s,statusCode:o}}}function U1(t){return e=>{if(!t.isEnabled())return;const n=$1(e);co(t,n)}}function lo(t,e){if(t)try{if(typeof t=="string")return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Ym(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function qm(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Vm(t){try{if(typeof t=="string")return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[Ym(t)];if(!t)return[void 0]}catch{return le&&T.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return le&&T.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function xa(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function Km(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:a,request:o,response:u}=e;return{type:t,start:n/1e3,end:r/1e3,name:i,data:je({method:s,statusCode:a,request:o,response:u})}}function Bi(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function vn(t,e,n){if(!e&&Object.keys(t).length===0)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:i,warnings:s}=F1(n);return r.body=i,s&&s.length>0&&(r._meta={warnings:s}),r}function Bu(t,e){return Object.keys(t).reduce((n,r)=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=t[r]),n},{})}function Ym(t){return new URLSearchParams(t).toString()}function F1(t){if(!t||typeof t!="string")return{body:t};const e=t.length>qd,n=B1(t);if(e){const r=t.slice(0,qd);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch{}return{body:t}}function B1(t){const e=t[0],n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function Ra(t,e){const n=H1(t);return Jr(n,e)}function H1(t,e=fe.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(fe.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function j1(t,e,n){try{const r=await z1(t,e,n),i=Km("resource.fetch",r);co(n.replay,i)}catch(r){le&&T.error("[Replay] Failed to capture fetch breadcrumb",r)}}function G1(t,e,n){const{input:r,response:i}=e,s=r?Xm(r):void 0,a=lo(s,n.textEncoder),o=i?qm(i.headers.get("content-length")):void 0;a!==void 0&&(t.data.request_body_size=a),o!==void 0&&(t.data.response_body_size=o)}async function z1(t,e,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r}=e,{url:a,method:o,status_code:u=0,request_body_size:c,response_body_size:l}=t.data,d=Ra(a,n.networkDetailAllowUrls)&&!Ra(a,n.networkDetailDenyUrls),f=d?W1(n,e.input,c):Bi(c),h=await q1(d,n,e.response,l);return{startTimestamp:i,endTimestamp:s,url:a,method:o,statusCode:u,request:f,response:h}}function W1({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const i=n?Y1(n,e):{};if(!t)return vn(i,r,void 0);const s=Xm(n),[a,o]=Vm(s),u=vn(i,r,a);return o?xa(u,o):u}async function q1(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},i,s){if(!t&&s!==void 0)return Bi(s);const a=i?Jm(i.headers,r):{};if(!i||!e&&s!==void 0)return vn(a,s,void 0);const[o,u]=await K1(i),c=V1(o,{networkCaptureBodies:e,textEncoder:n,responseBodySize:s,captureDetails:t,headers:a});return u?xa(c,u):c}function V1(t,{networkCaptureBodies:e,textEncoder:n,responseBodySize:r,captureDetails:i,headers:s}){try{const a=t&&t.length&&r===void 0?lo(t,n):r;return i?e?vn(s,a,t):vn(s,a,void 0):Bi(a)}catch(a){return le&&T.warn("[Replay] Failed to serialize response body",a),vn(s,r,void 0)}}async function K1(t){const e=X1(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{return[await J1(e)]}catch(n){return le&&T.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function Xm(t=[]){if(!(t.length!==2||typeof t[1]!="object"))return t[1].body}function Jm(t,e){const n={};return e.forEach(r=>{t.get(r)&&(n[r]=t.get(r))}),n}function Y1(t,e){return t.length===1&&typeof t[0]!="string"?lf(t[0],e):t.length===2?lf(t[1],e):{}}function lf(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?Jm(n,e):Array.isArray(n)?{}:Bu(n,e):{}}function X1(t){try{return t.clone()}catch(e){le&&T.warn("[Replay] Failed to clone response body",e)}}function J1(t){return new Promise((e,n)=>{const r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);Q1(t).then(i=>e(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function Q1(t){return await t.text()}async function Z1(t,e,n){try{const r=tC(t,e,n),i=Km("resource.xhr",r);co(n.replay,i)}catch(r){le&&T.error("[Replay] Failed to capture xhr breadcrumb",r)}}function eC(t,e,n){const{xhr:r,input:i}=e;if(!r)return;const s=lo(i,n.textEncoder),a=r.getResponseHeader("content-length")?qm(r.getResponseHeader("content-length")):sC(r.response,r.responseType,n.textEncoder);s!==void 0&&(t.data.request_body_size=s),a!==void 0&&(t.data.response_body_size=a)}function tC(t,e,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r,input:a,xhr:o}=e,{url:u,method:c,status_code:l=0,request_body_size:d,response_body_size:f}=t.data;if(!u)return null;if(!o||!Ra(u,n.networkDetailAllowUrls)||Ra(u,n.networkDetailDenyUrls)){const b=Bi(d),S=Bi(f);return{startTimestamp:i,endTimestamp:s,url:u,method:c,statusCode:l,request:b,response:S}}const h=o[Xt],p=h?Bu(h.request_headers,n.networkRequestHeaders):{},g=Bu(nC(o),n.networkResponseHeaders),[y,m]=n.networkCaptureBodies?Vm(a):[void 0],[v,_]=n.networkCaptureBodies?rC(o):[void 0],E=vn(p,d,y),C=vn(g,f,v);return{startTimestamp:i,endTimestamp:s,url:u,method:c,statusCode:l,request:m?xa(E,m):E,response:_?xa(C,_):C}}function nC(t){const e=t.getAllResponseHeaders();return e?e.split(`\r
`).reduce((n,r)=>{const[i,s]=r.split(": ");return n[i.toLowerCase()]=s,n},{}):{}}function rC(t){const e=[];try{return[t.responseText]}catch(n){e.push(n)}try{return iC(t.response,t.responseType)}catch(n){e.push(n)}return le&&T.warn("[Replay] Failed to get xhr response body",...e),[void 0]}function iC(t,e){try{if(typeof t=="string")return[t];if(t instanceof Document)return[t.body.outerHTML];if(e==="json"&&t&&typeof t=="object")return[JSON.stringify(t)];if(!t)return[void 0]}catch{return le&&T.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return le&&T.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function sC(t,e,n){try{const r=e==="json"&&t&&typeof t=="object"?JSON.stringify(t):t;return lo(r,n)}catch{return}}function aC(t){const e=j();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:a,networkResponseHeaders:o}=t.getOptions(),u={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:a,networkResponseHeaders:o};e&&e.on?e.on("beforeAddBreadcrumb",(c,l)=>oC(u,c,l)):(Ya(P1(t)),Xa(U1(t)))}catch{}}function oC(t,e,n){if(e.data)try{uC(e)&&lC(n)&&(eC(e,n,t),Z1(e,n,t)),cC(e)&&dC(n)&&(G1(e,n,t),j1(e,n,t))}catch{le&&T.warn("Error when enriching network breadcrumb")}}function uC(t){return t.category==="xhr"}function cC(t){return t.category==="fetch"}function lC(t){return t&&t.xhr}function dC(t){return t&&t.response}let df=null;function fC(t){return!!t.category}const hC=t=>e=>{if(!t.isEnabled())return;const n=pC(e);n&&ns(t,n)};function pC(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();return df===e||!e||(df=e,!fC(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))?null:e.category==="console"?gC(e):Lt(e)}function gC(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||e.length===0)return Lt(t);let n=!1;const r=e.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>As?(n=!0,`${i.slice(0,As)}…`):i;if(typeof i=="object")try{const s=_t(i,7);return JSON.stringify(s).length>As?(n=!0,`${JSON.stringify(s,null,2).slice(0,As)}…`):s}catch{}return i});return Lt({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function mC(t){const e=we(),n=j();e.addScopeListener(hC(t)),cp(Vw(t)),zi(M1(t)),aC(t);const r=A1(t,!ff(n));n&&n.addEventProcessor?n.addEventProcessor(r):Qp(r),ff(n)&&(n.on("beforeSendEvent",C1(t)),n.on("afterSendEvent",Wm(t)),n.on("createDsc",i=>{const s=t.getSessionId();s&&t.isEnabled()&&t.recordingMode==="session"&&t.checkAndHandleExpiredSession()&&(i.replay_id=s)}),n.on("startTransaction",i=>{t.lastTransaction=i}),n.on("finishTransaction",i=>{t.lastTransaction=i}),n.on("beforeSendFeedback",(i,s)=>{const a=t.getSessionId();s&&s.includeReplay&&t.isEnabled()&&a&&i.contexts&&i.contexts.feedback&&(i.contexts.feedback.replay_id=a)}))}function ff(t){return!!(t&&t.on)}async function _C(t){try{return Promise.all(uo(t,[yC(fe.performance.memory)]))}catch{return[]}}function yC(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function vC(t,e,n){let r,i,s;const a=n.maxWait?Math.max(n.maxWait,e):0;function o(){return u(),r=t(),r}function u(){i!==void 0&&clearTimeout(i),s!==void 0&&clearTimeout(s),i=s=void 0}function c(){return i!==void 0||s!==void 0?o():r}function l(){return i&&clearTimeout(i),i=setTimeout(o,e),a&&s===void 0&&(s=setTimeout(o,a)),r}return l.cancel=u,l.flush=c,l}function bC(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession()){le&&T.warn("[Replay] Received replay event after session expired.");return}const i=r||!e;e=!0,t.clickDetector&&jw(t.clickDetector,n),t.addUpdate(()=>{if(t.recordingMode==="buffer"&&i&&t.setInitialState(),!rl(t,n,i))return!0;if(!i)return!1;if(EC(t,i),t.session&&t.session.previousSessionId)return!0;if(t.recordingMode==="buffer"&&t.session&&t.eventBuffer){const s=t.eventBuffer.getEarliestTimestamp();s&&(Ze(`[Replay] Updating session start time to earliest event in buffer to ${new Date(s)}`,t.getOptions()._experiments.traceInternals),t.session.started=s,t.getOptions().stickySession&&nl(t.session))}return t.recordingMode==="session"&&t.flush(),!0})}}function SC(t){const e=t.getOptions();return{type:X.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:t.eventBuffer?t.eventBuffer.type==="worker":!1,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}function EC(t,e){!e||!t.session||t.session.segmentId!==0||rl(t,SC(t),!1)}function TC(t,e,n,r){return rn(Ep(t,vc(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e=="string"?new TextEncoder().encode(e).length:e.length},e]])}function IC({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}
`;if(typeof t=="string")n=`${r}${t}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+t.length),n.set(s),n.set(t,s.length)}return n}async function wC({client:t,scope:e,replayId:n,event:r}){const i=typeof t._integrations=="object"&&t._integrations!==null&&!Array.isArray(t._integrations)?Object.keys(t._integrations):void 0,s={event_id:n,integrations:i};t.emit&&t.emit("preprocessEvent",r,s);const a=await Tc(t.getOptions(),r,s,e,t,Ut());if(!a)return null;a.platform=a.platform||"javascript";const o=t.getSdkMetadata&&t.getSdkMetadata(),{name:u,version:c}=o&&o.sdk||{};return a.sdk={...a.sdk,name:u||"sentry.javascript.unknown",version:c||"0.0.0"},a}async function CC({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){const a=IC({recordingData:t,headers:{segment_id:n}}),{urls:o,errorIds:u,traceIds:c,initialTimestamp:l}=r,d=j(),f=we(),h=d&&d.getTransport(),p=d&&d.getDsn();if(!d||!h||!p||!s.sampled)return;const g={type:lI,replay_start_timestamp:l/1e3,timestamp:i/1e3,error_ids:u,trace_ids:c,urls:o,replay_id:e,segment_id:n,replay_type:s.sampled},y=await wC({scope:f,client:d,replayId:e,event:g});if(!y){d.recordDroppedEvent("event_processor","replay",g),Ze("An event processor returned `null`, will not send event.");return}delete y.sdkProcessingMetadata;const m=TC(y,a,p,d.getOptions().tunnel);let v;try{v=await h.send(m)}catch(E){const C=new Error(qc);try{C.cause=E}catch{}throw C}if(!v)return v;if(typeof v.statusCode=="number"&&(v.statusCode<200||v.statusCode>=300))throw new Qm(v.statusCode);const _=wp({},v);if(Ip(_,"replay"))throw new Zm(_);return v}class Qm extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Zm extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function e_(t,e={count:0,interval:mI}){const{recordingData:n,options:r}=t;if(n.length)try{return await CC(t),!0}catch(i){if(i instanceof Qm||i instanceof Zm)throw i;if(Op("Replays",{_retryCount:e.count}),le&&r._experiments&&r._experiments.captureExceptions&&Vi(i),e.count>=_I){const s=new Error(`${qc} - max retries exceeded`);try{s.cause=i}catch{}throw s}return e.interval*=++e.count,new Promise((s,a)=>{setTimeout(async()=>{try{await e_(t,e),s(!0)}catch(o){a(o)}},e.interval)})}}const t_="__THROTTLED",kC="__SKIPPED";function xC(t,e,n){const r=new Map,i=o=>{const u=o-n;r.forEach((c,l)=>{l<u&&r.delete(l)})},s=()=>[...r.values()].reduce((o,u)=>o+u,0);let a=!1;return(...o)=>{const u=Math.floor(Date.now()/1e3);if(i(u),s()>=e){const l=a;return a=!0,l?kC:t_}a=!1;const c=r.get(u)||0;return r.set(u,c+1),t(...o)}}class pn{constructor({options:e,recordingOptions:n}){pn.prototype.__init.call(this),pn.prototype.__init2.call(this),pn.prototype.__init3.call(this),pn.prototype.__init4.call(this),pn.prototype.__init5.call(this),pn.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:dI,sessionIdleExpire:fI},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=e,this._debouncedFlush=vC(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=xC((a,o)=>b1(this,a,o),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),s=r?{threshold:Math.min(yI,r),timeout:r,scrollTimeout:vI,ignoreSelector:i?i.join(","):""}:void 0;s&&(this.clickDetector=new Uw(this,s))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(e){const{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(e),!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",Dr(`[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");Dr("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const e=qo({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Dr("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const e=qo({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=yn({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:gI},emit:bC(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{Ze(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,g1(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ze("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ze("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Ze("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const r=this.stopRecording();!e||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const n=e();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._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&&Uu(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const e=`${fe.location.pathname}${fe.location.hash}${fe.location.search}`,n=`${fe.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(e,n){const r=this._throttledAddEvent(e,n);if(r===t_){const i=Lt({category:"replay.throttled"});this.addUpdate(()=>!rl(this,{type:Dw,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const e=this.lastTransaction||we().getTransaction(),r=(e&&oe(e).data||{})[st];if(!(!e||!r||!["route","custom"].includes(r)))return oe(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=f1({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){le&&T.error("[Replay]",e),le&&this._options._experiments&&this._options._experiments.captureExceptions&&Vi(e)}_initializeSessionForSampling(e){const n=this._options.errorSampleRate>0,r=qo({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const e=this.session;return jm(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{fe.document.addEventListener("visibilitychange",this._handleVisibilityChange),fe.addEventListener("blur",this._handleWindowBlur),fe.addEventListener("focus",this._handleWindowFocus),fe.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(mC(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=a1(this)}_removeListeners(){try{fe.document.removeEventListener("visibilitychange",this._handleVisibilityChange),fe.removeEventListener("blur",this._handleWindowBlur),fe.removeEventListener("focus",this._handleWindowFocus),fe.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{fe.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=Lt({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=Lt({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Jw(this,e)}}_doChangeToBackgroundTasks(e){!this.session||Hm(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Ze("[Replay] Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:X.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){const e=e1(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(uo(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:n}=this;if(!e||!n||e.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){le&&T.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await _C(this),!!this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await e_({replayId:e,recordingData:s,segmentId:i,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});const r=j();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){le&&T.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();const s=i<this._options.minReplayDuration,a=i>this._options.maxReplayDuration+5e3;if(s||a){Ze(`[Replay] Session duration (${Math.floor(i/1e3)}s) is too ${s?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),s&&this._debouncedFlush();return}const o=this.eventBuffer;if(o&&this.session.segmentId===0&&!o.hasCheckout&&Ze("[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(u){le&&T.error(u)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&nl(this.session)}__init6(){this._onMutationHandler=e=>{const n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=r&&n>r;if(n>i||s){const a=Lt({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function mi(t,e,n,r){const i=typeof r=="string"?r.split(","):[],s=[...t,...i,...e];return typeof n<"u"&&(typeof n=="string"&&s.push(`.${n}`),Tn(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),s.join(",")}function RC({mask:t,unmask:e,block:n,unblock:r,ignore:i,blockClass:s,blockSelector:a,maskTextClass:o,maskTextSelector:u,ignoreClass:c}){const l=['base[href="/"]'],d=mi(t,[".sentry-mask","[data-sentry-mask]"],o,u),f=mi(e,[".sentry-unmask","[data-sentry-unmask]"]),h={maskTextSelector:d,unmaskTextSelector:f,blockSelector:mi(n,[".sentry-block","[data-sentry-block]",...l],s,a),unblockSelector:mi(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:mi(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],c)};return s instanceof RegExp&&(h.blockClass=s),o instanceof RegExp&&(h.maskTextClass=o),h}function OC({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){return!r||i.unmaskTextSelector&&t.matches(i.unmaskTextSelector)?s:n.includes(e)||e==="value"&&t.tagName==="INPUT"&&["submit","button"].includes(t.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const hf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',AC=["content-length","content-type","accept"];let pf=!1;const DC=t=>new rs(t);class rs{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=hI,flushMaxDelay:n=pI,minReplayDuration:r=bI,maxReplayDuration:i=Vd,stickySession:s=!0,useCompression:a=!0,workerUrl:o,_experiments:u={},sessionSampleRate:c,errorSampleRate:l,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:h=!0,mutationBreadcrumbLimit:p=750,mutationLimit:g=1e4,slowClickTimeout:y=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:v=[],networkDetailDenyUrls:_=[],networkCaptureBodies:E=!0,networkRequestHeaders:C=[],networkResponseHeaders:b=[],mask:S=[],maskAttributes:R=["title","placeholder"],unmask:k=[],block:I=[],unblock:w=[],ignore:O=[],maskFn:x,beforeAddRecordingEvent:M,beforeErrorSampling:F,blockClass:$,blockSelector:Y,maskInputOptions:G,maskTextClass:U,maskTextSelector:ie,ignoreClass:Ve}={}){this.name=rs.id;const me=RC({mask:S,unmask:k,block:I,unblock:w,ignore:O,blockClass:$,blockSelector:Y,maskTextClass:U,maskTextSelector:ie,ignoreClass:Ve});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...G||{},password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(_e,Te,Ke)=>OC({maskAttributes:R,maskAllText:d,privacyOptions:me,key:_e,value:Te,el:Ke}),...me,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:_e=>{try{_e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:n,minReplayDuration:Math.min(r,SI),maxReplayDuration:Math.min(i,Vd),stickySession:s,sessionSampleRate:c,errorSampleRate:l,useCompression:a,workerUrl:o,blockAllMedia:h,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:p,mutationLimit:g,slowClickTimeout:y,slowClickIgnoreSelectors:m,networkDetailAllowUrls:v,networkDetailDenyUrls:_,networkCaptureBodies:E,networkRequestHeaders:gf(C),networkResponseHeaders:gf(b),beforeAddRecordingEvent:M,beforeErrorSampling:F,_experiments:u},typeof c=="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: ${c} })`),this._initialOptions.sessionSampleRate=c),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},${hf}`:hf),this._isInitialized&&vu())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return pf}set _isInitialized(e){pf=e}setupOnce(){vu()&&(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(e){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(e)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const e=MC(this._initialOptions);this._replay=new pn({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const n=j().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}rs.__initStatic();function MC(t){const e=j(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...je(t)};return n?(t.sessionSampleRate==null&&t.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Tn(()=>{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):(Tn(()=>{console.warn("SDK client is not available.")}),r)}function gf(t){return[...AC,...t.map(e=>e.toLowerCase())]}function LC(){const t=j();return t&&t.getIntegrationByName&&t.getIntegrationByName("Replay")}var mf;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(mf||(mf={}));function NC(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}function Hu(t,e,n=1/0,r=0){return!t||t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Hu(t.parentNode,e,n,r+1)}function _f(t,e){return n=>{const r=n;if(r===null)return!1;try{if(t){if(typeof t=="string"){if(r.matches(`.${t}`))return!0}else if(NC(r,t))return!0}return!!(e&&r.matches(e))}catch{return!1}}}const br=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let yf={map:{},getId(){return console.error(br),-1},getNode(){return console.error(br),null},removeNodeFromMap(){console.error(br)},has(){return console.error(br),!1},reset(){console.error(br)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(yf=new Proxy(yf,{get(t,e,n){return e==="map"&&console.error(br),Reflect.get(t,e,n)}}));function sl(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(a){r_(()=>{n.set.call(this,a)},0),s&&s.set&&s.set.call(this,a)}}),()=>sl(t,e,s||{},!0)}function al(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString());function PC(t){return t?t.nodeType===t.ELEMENT_NODE?t:t.parentElement:null}function fo(t,e,n,r,i){if(!t)return!1;const s=PC(t);if(!s)return!1;const a=_f(e,n),o=Hu(s,a);let u=-1;return o<0?!1:(r&&(u=Hu(s,_f(null,r))),o>-1&&u<0?!0:o<u)}const vf={};function n_(t){const e=vf[t];if(e)return e;const n=window.document;let r=window[t];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const s=i.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(i)}catch{}return vf[t]=r.bind(window)}function Pn(...t){return n_("requestAnimationFrame")(...t)}function r_(...t){return n_("setTimeout")(...t)}var jr=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(jr||{});let ea;function $C(t){ea=t}const bf=t=>ea?(...n)=>{try{return t(...n)}catch(r){if(ea&&ea(r)===!0)return()=>{};throw r}}:t;var wr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",UC=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ls=0;Ls<wr.length;Ls++)UC[wr.charCodeAt(Ls)]=Ls;var FC=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3)i+=wr[e[n]>>2],i+=wr[(e[n]&3)<<4|e[n+1]>>4],i+=wr[(e[n+1]&15)<<2|e[n+2]>>6],i+=wr[e[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Sf=new Map;function BC(t,e){let n=Sf.get(t);return n||(n=new Map,Sf.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const i_=(t,e,n)=>{if(!t||!(a_(t,e)||typeof t=="object"))return;const r=t.constructor.name,i=BC(n,r);let s=i.indexOf(t);return s===-1&&(s=i.length,i.push(t)),s};function ta(t,e,n){if(t instanceof Array)return t.map(r=>ta(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,i=FC(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[ta(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:i}=t;return{rr_type:r,src:i}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",i=t.toDataURL();return{rr_type:r,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[ta(t.data,e,n),t.width,t.height]};if(a_(t,e)||typeof t=="object"){const r=t.constructor.name,i=i_(t,e,n);return{rr_type:r,index:i}}}}return t}const s_=(t,e,n)=>t.map(r=>ta(r,e,n)),a_=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>t instanceof e[i]);function HC(t,e,n,r,i){const s=[],a=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of a)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const u=al(e.CanvasRenderingContext2D.prototype,o,function(c){return function(...l){return fo(this.canvas,n,r,i,!0)||r_(()=>{const d=s_(l,e,this);t(this.canvas,{type:jr["2D"],property:o,args:d})},0),c.apply(this,l)}});s.push(u)}catch{const c=sl(e.CanvasRenderingContext2D.prototype,o,{set(l){t(this.canvas,{type:jr["2D"],property:o,args:[l],setter:!0})}});s.push(c)}return()=>{s.forEach(o=>o())}}function jC(t){return t==="experimental-webgl"?"webgl":t}function Ef(t,e,n,r,i){const s=[];try{const a=al(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(u,...c){if(!fo(this,e,n,r,!0)){const l=jC(u);if("__context"in this||(this.__context=l),i&&["webgl","webgl2"].includes(l))if(c[0]&&typeof c[0]=="object"){const d=c[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[u,...c])}});s.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(a=>a())}}function Tf(t,e,n,r,i,s,a,o){const u=[],c=Object.getOwnPropertyNames(t);for(const l of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof t[l]!="function")continue;const d=al(t,l,function(f){return function(...h){const p=f.apply(this,h);if(i_(p,o,this),"tagName"in this.canvas&&!fo(this.canvas,r,i,s,!0)){const g=s_(h,o,this),y={type:e,property:l,args:g};n(this.canvas,y)}return p}});u.push(d)}catch{const f=sl(t,l,{set(h){n(this.canvas,{type:e,property:l,args:[h],setter:!0})}});u.push(f)}return u}function GC(t,e,n,r,i,s){const a=[];return a.push(...Tf(e.WebGLRenderingContext.prototype,jr.WebGL,t,n,r,i,s,e)),typeof e.WebGL2RenderingContext<"u"&&a.push(...Tf(e.WebGL2RenderingContext.prototype,jr.WebGL2,t,n,r,i,s,e)),()=>{a.forEach(o=>o())}}var zC='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function WC(){const t=new Blob([zC]);return URL.createObjectURL(t)}class qC{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(d,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(f)};const{sampling:n="all",win:r,blockClass:i,blockSelector:s,unblockSelector:a,maxCanvasSize:o,recordCanvas:u,dataURLOptions:c,errorHandler:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,l&&$C(l),!e.enableManualSnapshot&&bf(()=>{u&&n==="all"&&this.initCanvasMutationObserver(r,i,s,a),u&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,i,s,a,o,{dataURLOptions:c})})()}initCanvasFPSObserver(e,n,r,i,s,a,o){const u=Ef(n,r,i,s,!0),c=this.takeSnapshot(!1,e,n,r,i,s,a,o.dataURLOptions);this.resetObservers=()=>{u(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,n,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Ef(e,n,r,i,!1),a=HC(this.processMutation.bind(this),e,n,r,i),o=GC(this.processMutation.bind(this),e,n,r,i,this.mirror);this.resetObservers=()=>{s(),a(),o()}}snapshot(e){const{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.win,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,e);this.resetObservers=()=>{cancelAnimationFrame(r)}}takeSnapshot(e,n,r,i,s,a,o,u,c){const l=new Map,d=new Worker(WC());d.onmessage=m=>{const v=m.data,{id:_}=v;if(l.set(_,!1),!("base64"in v))return;const{base64:E,type:C,width:b,height:S}=v;this.mutationCb({id:_,type:jr["2D"],commands:[{property:"clearRect",args:[0,0,b,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:E}],type:C}]},0,0,b,S]}]})};const f=1e3/n;let h=0,p;const g=m=>{if(m)return[m];const v=[];return r.document.querySelectorAll("canvas").forEach(_=>{fo(_,i,s,a)||v.push(_)}),v},y=m=>{if(h&&m-h<f){p=Pn(y);return}h=m,g(c).forEach(v=>{const _=this.mirror.getId(v);if(!l.get(_)&&!(!v.width||!v.height)){if(l.set(_,!0),!e&&["webgl","webgl2"].includes(v.__context)){const E=v.getContext(v.__context);Qs([E,"optionalAccess",C=>C.getContextAttributes,"call",C=>C(),"optionalAccess",C=>C.preserveDrawingBuffer])===!1&&E.clear(E.COLOR_BUFFER_BIT)}createImageBitmap(v).then(E=>{d.postMessage({id:_,bitmap:E,width:v.width,height:v.height,dataURLOptions:u,maxCanvasSize:o},[E])}).catch(E=>{bf(()=>{throw E})()})}}),p=Pn(y)};return p=Pn(y),p}startPendingCanvasMutationFlusher(){Pn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,Pn(e)};Pn(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Pn(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const i=r.map(a=>{const{type:o,...u}=a;return u}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:i}),this.pendingCanvasMutations.delete(e)}}const If={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},o_="ReplayCanvas",Ns=1280,VC=(t={})=>{const[e,n]=t.maxCanvasSize||[],r={quality:t.quality||"medium",enableManualSnapshot:t.enableManualSnapshot,maxCanvasSize:[e?Math.min(e,Ns):Ns,n?Math.min(n,Ns):Ns]};let i;const s=new Promise(a=>i=a);return{name:o_,setupOnce(){},getOptions(){const{quality:a,enableManualSnapshot:o,maxCanvasSize:u}=r;return{enableManualSnapshot:o,recordCanvas:!0,getCanvasManager:c=>{const l=new qC({...c,enableManualSnapshot:o,maxCanvasSize:u,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return i(l),l},...If[a||"medium"]||If.medium}},async snapshot(a){(await s).snapshot(a)}}},u_=VC,KC=Ee(o_,u_),sr=V,Vo="#ffffff",wf="inherit",Ko="rgba(108, 95, 199, 1)",Cf={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:Vo,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"25px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:Ko,submitBorder:Ko,submitOutlineFocus:"#29232f",submitForeground:Vo,submitForegroundHover:Vo,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:wf,inputForeground:wf,inputBorder:"var(--border)",inputOutlineFocus:Ko,formBorderRadius:"20px",formContentBorderRadius:"6px"},kf={light:Cf,dark:{...Cf,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"}},YC="Report a Bug",XC="Cancel",JC="Send Bug Report",QC="Report a Bug",ZC="your.email@example.org",ek="Email",tk="What's the bug? What did you expect?",nk="Description",rk="Your Name",ik="Name",sk="(required)",ak="Thank you for your report!",c_="widget",l_="api";async function ok({client:t,scope:e,event:n}){const r={};t.emit&&t.emit("preprocessEvent",n,r);const i=await Tc(t.getOptions(),n,r,e,t,Ut());return i===null?(t.recordDroppedEvent("event_processor","feedback",n),null):(i.platform=i.platform||"javascript",i)}async function uk({feedback:{message:t,email:e,name:n,source:r,url:i}},{includeReplay:s=!0}={}){const a=j(),o=a&&a.getTransport(),u=a&&a.getDsn();if(!a||!o||!u)return;const c={contexts:{feedback:{contact_email:e,name:n,message:t,url:i,source:r}},type:"feedback"};return Rn(async l=>{l.clearBreadcrumbs(),[l_,c_].includes(String(r))&&l.setLevel("info");const d=await ok({scope:l,client:a,event:c});if(!d)return;a.emit&&a.emit("beforeSendFeedback",d,{includeReplay:!!s});const f=qp(d,u,a.getOptions()._metadata,a.getOptions().tunnel);let h;try{h=await o.send(f)}catch(p){const g=new Error("Unable to send Feedback");try{g.cause=p}catch{}throw g}if(h){if(typeof h.statusCode=="number"&&(h.statusCode<200||h.statusCode>=300))throw new Error("Unable to send Feedback");return h}})}function d_({name:t,email:e,message:n,source:r=l_,url:i=Xh()},s={}){if(!n)throw new Error("Unable to submit feedback with empty message");return uk({feedback:{name:t,email:e,message:n,url:i,source:r}},s)}const Bn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function xf(t,e){return{...t,...e,themeDark:{...t.themeDark,...e.themeDark},themeLight:{...t.themeLight,...e.themeLight}}}function ck(t){const e=t.createElement("style");return e.textContent=`
.widget__actor {
  position: fixed;
  left: var(--left);
  right: var(--right);
  bottom: var(--bottom);
  top: var(--top);
  z-index: var(--z-index);

  line-height: 16px;

  display: flex;
  align-items: center;
  gap: 8px;

  border-radius: var(--border-radius);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size);
  font-weight: 600;
  padding: 16px;
  text-decoration: none;
  z-index: 9000;

  color: var(--foreground);
  background-color: var(--background);
  border: var(--border);
  box-shadow: var(--box-shadow);
  opacity: 1;
  transition: opacity 0.1s ease-in-out;
}

.widget__actor:hover {
  background-color: var(--background-hover);
}

.widget__actor svg {
  width: 16px;
  height: 16px;
}

.widget__actor--hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.widget__actor__text {
}

@media (max-width: 600px) {
  .widget__actor__text {
    display: none;
  }
}

.feedback-icon path {
  fill: var(--foreground);
}
`,e}function lk(t){const e=t.createElement("style");return e.textContent=`
.dialog {
  line-height: 25px;
  background-color: rgba(0, 0, 0, 0.05);
  border: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.dialog:not([open]) {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.dialog:not([open]) .dialog__content {
  transform: translate(0, -16px) scale(0.98);
}

.dialog__content {
  position: fixed;
  left: var(--left);
  right: var(--right);
  bottom: var(--bottom);
  top: var(--top);

  border: var(--border);
  border-radius: var(--form-border-radius);
  background-color: var(--background);
  color: var(--foreground);

  width: 320px;
  max-width: 100%;
  max-height: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  box-shadow: var(--box-shadow);
  transition: transform 0.2s ease-in-out;
  transform: translate(0, 0) scale(1);
}

.dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 600;
  padding: 24px 24px 0 24px;
  margin: 0;
  margin-bottom: 16px;
}

.brand-link {
  display: inline-flex;
}

.error {
  color: var(--error);
  margin-bottom: 16px;
}

.form {
  display: grid;
  overflow: auto;
  flex-direction: column;
  gap: 16px;
  padding: 0 24px 24px;
}

.form__error-container {
  color: var(--error);
}

.form__error-container--hidden {
  display: none;
}

.form__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0px;
}

.form__label__text {
  display: grid;
  gap: 4px;
  align-items: center;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
}

.form__label__text--required {
  font-size: 0.85em;
}

.form__input {
  line-height: inherit;
  background-color: var(--input-background);
  box-sizing: border-box;
  border: var(--input-border);
  border-radius: var(--form-content-border-radius);
  color: var(--input-foreground);
  font-family: inherit;
  font-size: var(--font-size);
  font-weight: 500;
  padding: 6px 12px;
}

.form__input::placeholder {
  color: var(--input-foreground);
  opacity: 0.65;
}

.form__input:focus-visible {
  outline: 1px auto var(--input-outline-focus);
}

.form__input--textarea {
  font-family: inherit;
  resize: vertical;
}

.btn-group {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.btn {
  line-height: inherit;
  border: var(--cancel-border);
  border-radius: var(--form-content-border-radius);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size);
  font-weight: 600;
  padding: 6px 16px;
}
.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.btn--primary {
  background-color: var(--submit-background);
  border-color: var(--submit-border);
  color: var(--submit-foreground);
}
.btn--primary:hover {
  background-color: var(--submit-background-hover);
  color: var(--submit-foreground-hover);
}
.btn--primary:focus-visible {
  outline: 1px auto var(--submit-outline-focus);
}

.btn--default {
  background-color: var(--cancel-background);
  color: var(--cancel-foreground);
  font-weight: 500;
}
.btn--default:hover {
  background-color: var(--cancel-background-hover);
  color: var(--cancel-foreground-hover);
}
.btn--default:focus-visible {
  outline: 1px auto var(--cancel-outline-focus);
}

.success-message {
  background-color: var(--background);
  border: var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  font-weight: 600;
  color: var(--success);
  padding: 12px 24px;
  line-height: 25px;
  display: grid;
  align-items: center;
  grid-auto-flow: column;
  gap: 6px;
  cursor: default;
}

.success-icon path {
  fill: var(--success);
}
`,e}function Rf(t){return`
  --background: ${t.background};
  --background-hover: ${t.backgroundHover};
  --foreground: ${t.foreground};
  --error: ${t.error};
  --success: ${t.success};
  --border: ${t.border};
  --border-radius: ${t.borderRadius};
  --box-shadow: ${t.boxShadow};

  --submit-background: ${t.submitBackground};
  --submit-background-hover: ${t.submitBackgroundHover};
  --submit-border: ${t.submitBorder};
  --submit-outline-focus: ${t.submitOutlineFocus};
  --submit-foreground: ${t.submitForeground};
  --submit-foreground-hover: ${t.submitForegroundHover};

  --cancel-background: ${t.cancelBackground};
  --cancel-background-hover: ${t.cancelBackgroundHover};
  --cancel-border: ${t.cancelBorder};
  --cancel-outline-focus: ${t.cancelOutlineFocus};
  --cancel-foreground: ${t.cancelForeground};
  --cancel-foreground-hover: ${t.cancelForegroundHover};

  --input-background: ${t.inputBackground};
  --input-foreground: ${t.inputForeground};
  --input-border: ${t.inputBorder};
  --input-outline-focus: ${t.inputOutlineFocus};

  --form-border-radius: ${t.formBorderRadius};
  --form-content-border-radius: ${t.formContentBorderRadius};
  `}function dk(t,e,n){const r=t.createElement("style");return r.textContent=`
:host {
  --bottom: 1rem;
  --right: 1rem;
  --top: auto;
  --left: auto;
  --z-index: 100000;
  --font-family: ${n.light.fontFamily};
  --font-size: ${n.light.fontSize};

  position: fixed;
  left: var(--left);
  right: var(--right);
  bottom: var(--bottom);
  top: var(--top);
  z-index: var(--z-index);

  font-family: var(--font-family);
  font-size: var(--font-size);

  ${Rf(e==="dark"?n.dark:n.light)}
}

${e==="system"?`
@media (prefers-color-scheme: dark) {
  :host {
    ${Rf(n.dark)}
  }
}`:""}
}`,r}function fk({id:t,colorScheme:e,themeDark:n,themeLight:r}){try{const i=sr.document,s=i.createElement("div");s.id=t;const a=s.attachShadow({mode:"open"});return a.appendChild(dk(i,e,{dark:n,light:r})),a.appendChild(lk(i)),{shadow:a,host:s}}catch{throw T.warn("[Feedback] Browser does not support shadow DOM API"),new Error("Browser does not support shadow DOM API.")}}async function hk(t,e,n){if(!t)return;const r=()=>{t&&t.showError("There was a problem submitting feedback, please wait and try again.")};t.hideError();try{return await d_({...e,source:c_},n)}catch(i){Bn&&T.error(i),r()}}function it(t,e){return Object.entries(e).forEach(([n,r])=>{t.setAttributeNS(null,n,r)}),t}const hr=20,pk="http://www.w3.org/2000/svg";function gk(){const t=o=>sr.document.createElementNS(pk,o),e=it(t("svg"),{class:"feedback-icon",width:`${hr}`,height:`${hr}`,viewBox:`0 0 ${hr} ${hr}`,fill:"none"}),n=it(t("g"),{clipPath:"url(#clip0_57_80)"}),r=it(t("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});e.appendChild(n).appendChild(r);const i=t("defs"),s=it(t("clipPath"),{id:"clip0_57_80"}),a=it(t("rect"),{width:`${hr}`,height:`${hr}`,fill:"white"});return s.appendChild(a),i.appendChild(s),e.appendChild(i).appendChild(s).appendChild(a),{get el(){return e}}}function pe(t,e,...n){const i=sr.document.createElement(t);e&&Object.entries(e).forEach(([s,a])=>{s==="className"&&typeof a=="string"?i.setAttribute("class",a):typeof a=="boolean"&&a?i.setAttribute(s,""):typeof a=="string"?i.setAttribute(s,a):s.startsWith("on")&&typeof a=="function"&&i.addEventListener(s.substring(2).toLowerCase(),a)});for(const s of n)f_(i,s);return i}function f_(t,e){const n=sr.document;if(!(typeof e>"u"||e===null))if(Array.isArray(e))for(const r of e)f_(t,r);else e===!1||(typeof e=="string"?t.appendChild(n.createTextNode(e)):e instanceof Node?t.appendChild(e):t.appendChild(n.createTextNode(String(e))))}function mk({buttonLabel:t,onClick:e}){function n(i){e&&e(i)}const r=pe("button",{type:"button",className:"widget__actor","aria-label":t,"aria-hidden":"false"},gk().el,t?pe("span",{className:"widget__actor__text"},t):null);return r.addEventListener("click",n),{get el(){return r},show:()=>{r.classList.remove("widget__actor--hidden"),r.setAttribute("aria-hidden","false")},hide:()=>{r.classList.add("widget__actor--hidden"),r.setAttribute("aria-hidden","true")}}}function _k({label:t}){return{el:pe("button",{type:"submit",className:"btn btn--primary","aria-label":t},t)}}function Yo(t,e){const n=t.get(e);return typeof n=="string"?n.trim():""}function yk({nameLabel:t,namePlaceholder:e,emailLabel:n,emailPlaceholder:r,messageLabel:i,messagePlaceholder:s,isRequiredLabel:a,cancelButtonLabel:o,submitButtonLabel:u,showName:c,showEmail:l,isNameRequired:d,isEmailRequired:f,defaultName:h,defaultEmail:p,onCancel:g,onSubmit:y}){const{el:m}=_k({label:u});function v(w){if(w.preventDefault(),w.target instanceof HTMLFormElement)try{if(y){const O=new FormData(w.target),x={name:Yo(O,"name"),email:Yo(O,"email"),message:Yo(O,"message")};y(x)}}catch{}}const _=pe("div",{className:"form__error-container form__error-container--hidden","aria-hidden":"true"});function E(w){_.textContent=w,_.classList.remove("form__error-container--hidden"),_.setAttribute("aria-hidden","false")}function C(){_.textContent="",_.classList.add("form__error-container--hidden"),_.setAttribute("aria-hidden","true")}const b=pe("input",{id:"name",type:c?"text":"hidden","aria-hidden":c?"false":"true",name:"name",required:d,className:"form__input",placeholder:e,value:h}),S=pe("input",{id:"email",type:l?"text":"hidden","aria-hidden":l?"false":"true",name:"email",required:f,className:"form__input",placeholder:r,value:p}),R=pe("textarea",{id:"message",autoFocus:"true",rows:"5",name:"message",required:!0,className:"form__input form__input--textarea",placeholder:s}),k=pe("button",{type:"button",className:"btn btn--default","aria-label":o,onClick:w=>{g&&g(w)}},o),I=pe("form",{className:"form",onSubmit:v},[_,c&&pe("label",{htmlFor:"name",className:"form__label"},[pe("span",{className:"form__label__text"},t,d&&pe("span",{className:"form__label__text--required"},` ${a}`)),b]),!c&&b,l&&pe("label",{htmlFor:"email",className:"form__label"},[pe("span",{className:"form__label__text"},n,f&&pe("span",{className:"form__label__text--required"},` ${a}`)),S]),!l&&S,pe("label",{htmlFor:"message",className:"form__label"},[pe("span",{className:"form__label__text"},i,pe("span",{className:"form__label__text--required"},` ${a}`)),R]),pe("div",{className:"btn-group"},[m,k])]);return{get el(){return I},showError:E,hideError:C}}const vk="http://www.w3.org/2000/svg";function bk({colorScheme:t}){const e=a=>sr.document.createElementNS(vk,a),n=it(e("svg"),{class:"sentry-logo",width:"32",height:"30",viewBox:"0 0 72 66",fill:"none"}),r=it(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});n.append(r);const i=e("defs"),s=e("style");return s.textContent=`
    path {
      fill: ${t==="dark"?"#fff":"#362d59"};
    }`,t==="system"&&(s.textContent+=`
    @media (prefers-color-scheme: dark) {
      path: {
        fill: '#fff';
      }
    }
    `),i.append(s),n.append(i),{get el(){return n}}}function Sk({formTitle:t,showBranding:e,showName:n,showEmail:r,isNameRequired:i,isEmailRequired:s,colorScheme:a,defaultName:o,defaultEmail:u,onClosed:c,onCancel:l,onSubmit:d,...f}){let h=null;function p(){g(),c&&c()}function g(){h&&(h.open=!1)}function y(){h&&(h.open=!0)}function m(){return h&&h.open===!0||!1}const{el:v,showError:_,hideError:E}=yk({showEmail:r,showName:n,isEmailRequired:s,isNameRequired:i,defaultName:o,defaultEmail:u,onSubmit:d,onCancel:l,...f});return h=pe("dialog",{className:"dialog",open:!0,onClick:p},pe("div",{className:"dialog__content",onClick:C=>{C.stopPropagation()}},pe("h2",{className:"dialog__header"},t,e&&pe("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},bk({colorScheme:a}).el)),v)),{get el(){return h},showError:_,hideError:E,open:y,close:g,checkIsOpen:m}}const Ps=16,Of=17,Ek="http://www.w3.org/2000/svg";function Tk(){const t=u=>sr.document.createElementNS(Ek,u),e=it(t("svg"),{class:"success-icon",width:`${Ps}`,height:`${Of}`,viewBox:`0 0 ${Ps} ${Of}`,fill:"none"}),n=it(t("g"),{clipPath:"url(#clip0_57_156)"}),r=it(t("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),i=it(t("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});e.appendChild(n).append(i,r);const s=t("defs"),a=it(t("clipPath"),{id:"clip0_57_156"}),o=it(t("rect"),{width:`${Ps}`,height:`${Ps}`,fill:"white",transform:"translate(0 0.5)"});return a.appendChild(o),s.appendChild(a),e.appendChild(s).appendChild(a).appendChild(o),{get el(){return e}}}function Ik({message:t,onRemove:e}){function n(){r&&(r.remove(),e&&e())}const r=pe("div",{className:"success-message",onClick:n},Tk().el,t);return{el:r,remove:n}}function Af({shadow:t,options:{shouldCreateActor:e=!0,...n},attachTo:r}){let i,s,a=!1;function o(){if(t)try{const m=Ik({message:n.successMessageText,onRemove:()=>{v&&clearTimeout(v),l()}});if(!m.el)throw new Error("Unable to show success message");t.appendChild(m.el);const v=setTimeout(()=>{m&&m.remove()},5e3)}catch(m){T.error(m)}}async function u(m){if(!s)return;const v=[];if(n.isNameRequired&&!m.name&&v.push(n.nameLabel),n.isEmailRequired&&!m.email&&v.push(n.emailLabel),m.message||v.push(n.messageLabel),v.length>0){s.showError(`Please enter in the following required fields: ${v.join(", ")}`);return}if(!await hk(s,m)){n.onSubmitError&&n.onSubmitError();return}g(),o(),n.onSubmitSuccess&&n.onSubmitSuccess()}function c(){const m=j(),v=m&&m.getIntegrationByName&&m.getIntegrationByName("Replay");v&&v.flush().catch(_=>{Bn&&T.error(_)})}function l(){i&&i.show()}function d(){i&&i.hide()}function f(){i&&i.el&&i.el.remove()}function h(){try{if(s){s.open(),a=!0,n.onFormOpen&&n.onFormOpen(),c();return}const m=n.useSentryUser,v=we(),_=v&&v.getUser();if(s=Sk({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:m&&_&&_[m.name]||"",defaultEmail:m&&_&&_[m.email]||"",onClosed:()=>{l(),a=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{p(),l()},onSubmit:u}),!s.el)throw new Error("Unable to open Feedback dialog");t.appendChild(s.el),d(),n.onFormOpen&&n.onFormOpen(),c()}catch(m){T.error(m)}}function p(){s&&(s.close(),a=!1,n.onFormClose&&n.onFormClose())}function g(){if(s){p();const m=s.el;m&&m.remove(),s=void 0}}function y(){a||h(),d()}return r?r.addEventListener("click",y):e&&(i=mk({buttonLabel:n.buttonLabel,onClick:y}),i.el&&t.appendChild(i.el)),{get actor(){return i},get dialog(){return s},showActor:l,hideActor:d,removeActor:f,openDialog:h,closeDialog:p,removeDialog:g}}const $s=sr.document,wk=t=>new is(t);class is{static __initStatic(){this.id="Feedback"}constructor({autoInject:e=!0,id:n="sentry-feedback",isEmailRequired:r=!1,isNameRequired:i=!1,showBranding:s=!0,showEmail:a=!0,showName:o=!0,useSentryUser:u={email:"email",name:"username"},themeDark:c,themeLight:l,colorScheme:d="system",buttonLabel:f=YC,cancelButtonLabel:h=XC,submitButtonLabel:p=JC,formTitle:g=QC,emailPlaceholder:y=ZC,emailLabel:m=ek,messagePlaceholder:v=tk,messageLabel:_=nk,namePlaceholder:E=rk,nameLabel:C=ik,isRequiredLabel:b=sk,successMessageText:S=ak,onFormClose:R,onFormOpen:k,onSubmitError:I,onSubmitSuccess:w}={}){this.name=is.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:e,showBranding:s,id:n,isEmailRequired:r,isNameRequired:i,showEmail:a,showName:o,useSentryUser:u,colorScheme:d,themeDark:{...kf.dark,...c},themeLight:{...kf.light,...l},buttonLabel:f,cancelButtonLabel:h,submitButtonLabel:p,formTitle:g,emailLabel:m,emailPlaceholder:y,messageLabel:_,messagePlaceholder:v,nameLabel:C,namePlaceholder:E,isRequiredLabel:b,successMessageText:S,onFormClose:R,onFormOpen:k,onSubmitError:I,onSubmitSuccess:w}}setupOnce(){if(vu())try{this._cleanupWidgetIfExists();const{autoInject:e}=this.options;if(!e)return;this._createWidget(this.options)}catch(e){Bn&&T.error(e)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(e,n){try{const r=xf(this.options,n||{});return this._ensureShadowHost(r,({shadow:i})=>{const s=typeof e=="string"?$s.querySelector(e):typeof e.addEventListener=="function"?e:null;if(!s)return Bn&&T.error("[Feedback] Unable to attach to target element"),null;const a=Af({shadow:i,options:r,attachTo:s});return this._widgets.add(a),this._widget||(this._widget=a),a})}catch(r){return Bn&&T.error(r),null}}createWidget(e){try{return this._createWidget(xf(this.options,e||{}))}catch(n){return Bn&&T.error(n),null}}removeWidget(e){if(!e)return!1;try{if(this._widgets.has(e))return e.removeActor(),e.removeDialog(),this._widgets.delete(e),this._widget===e&&(this._widget=null),!0}catch(n){Bn&&T.error(n)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();const e=$s.querySelector(`#${this.options.id}`);e&&e.remove()}_createWidget(e){return this._ensureShadowHost(e,({shadow:n})=>{const r=Af({shadow:n,options:e});return!this._hasInsertedActorStyles&&r.actor&&(n.appendChild(ck($s)),this._hasInsertedActorStyles=!0),this._widgets.add(r),this._widget||(this._widget=r),r})}_ensureShadowHost(e,n){let r=!1;if(!this._shadow||!this._host){const{id:s,colorScheme:a,themeLight:o,themeDark:u}=e,{shadow:c,host:l}=fk({id:s,colorScheme:a,themeLight:o,themeDark:u});this._shadow=c,this._host=l,r=!0}this._host.dataset.sentryFeedbackColorscheme=e.colorScheme;const i=n({shadow:this._shadow,host:this._host});return r&&$s.body.appendChild(this._host),i}}is.__initStatic();const h_="CaptureConsole",Ck=(t={})=>{const e=t.levels||ua;return{name:h_,setupOnce(){},setup(n){"console"in V&&ap(({args:r,level:i})=>{j()!==n||!e.includes(i)||kk(r,i)})}}},p_=Ck;Ee(h_,p_);function kk(t,e){const n={level:gp(e),extra:{arguments:t}};Rn(r=>{if(r.addEventProcessor(a=>(a.logger="console",Xn(a,{handled:!1,type:"console"}),a)),e==="assert"&&t[0]===!1){const a=`Assertion failed: ${oa(t.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",t.slice(1)),fa(a,n);return}const i=t.find(a=>a instanceof Error);if(e==="error"&&i){Vi(i,n);return}const s=oa(t," ");fa(s,n)})}const g_="Debug",xk=(t={})=>{const e={debugger:!1,stringify:!1,...t};return{name:g_,setupOnce(){},setup(n){n.on&&n.on("beforeSendEvent",(r,i)=>{if(e.debugger)debugger;Tn(()=>{e.stringify?(console.log(JSON.stringify(r,null,2)),i&&Object.keys(i).length&&console.log(JSON.stringify(i,null,2))):(console.log(r),i&&Object.keys(i).length&&console.log(i))})})}}},m_=xk;Ee(g_,m_);const Gr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,__="Dedupe",Rk=()=>{let t;return{name:__,setupOnce(){},processEvent(e){if(e.type)return e;try{if(Ok(e,t))return Gr&&T.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},y_=Rk;Ee(__,y_);function Ok(t,e){return e?!!(Ak(t,e)||Dk(t,e)):!1}function Ak(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!b_(t,e)||!v_(t,e))}function Dk(t,e){const n=Df(e),r=Df(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!b_(t,e)||!v_(t,e))}function v_(t,e){let n=Mf(t),r=Mf(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const s=r[i],a=n[i];if(s.filename!==a.filename||s.lineno!==a.lineno||s.colno!==a.colno||s.function!==a.function)return!1}return!0}function b_(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Df(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Mf(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}const S_="ExtraErrorData",Mk=(t={})=>{const e=t.depth||3,n=t.captureErrorCause||!1;return{name:S_,setupOnce(){},processEvent(r,i){return Lk(r,i,e,n)}}},E_=Mk;Ee(S_,E_);function Lk(t,e={},n,r){if(!e.originalException||!xr(e.originalException))return t;const i=e.originalException.name||e.originalException.constructor.name,s=Nk(e.originalException,r);if(s){const a={...t.contexts},o=_t(s,n);return Yn(o)&&(In(o,"__sentry_skip_normalization__",!0),a[i]=o),{...t,contexts:a}}return t}function Nk(t,e){try{const n=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],r={};for(const i of Object.keys(t)){if(n.indexOf(i)!==-1)continue;const s=t[i];r[i]=xr(s)?s.toString():s}if(e&&t.cause!==void 0&&(r.cause=xr(t.cause)?t.cause.toString():t.cause),typeof t.toJSON=="function"){const i=t.toJSON();for(const s of Object.keys(i)){const a=i[s];r[s]=xr(a)?a.toString():a}}return r}catch(n){Gr&&T.error("Unable to extract extra data from the Error object:",n)}return null}function aN(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const Pk=V,T_="ReportingObserver",Lf=new WeakMap,$k=(t={})=>{const e=t.types||["crash","deprecation","intervention"];function n(r){if(Lf.has(j()))for(const i of r)Rn(s=>{s.setExtra("url",i.url);const a=`ReportingObserver [${i.type}]`;let o="No details available";if(i.body){const u={};for(const c in i.body)u[c]=i.body[c];if(s.setExtra("body",u),i.type==="crash"){const c=i.body;o=[c.crashId||"",c.reason||""].join(" ").trim()||o}else o=i.body.message||o}fa(`${a}: ${o}`)})}return{name:T_,setupOnce(){if(!Dv())return;new Pk.ReportingObserver(n,{buffered:!0,types:e}).observe()},setup(r){Lf.set(r,!0)}}},I_=$k;Ee(T_,I_);const w_="RewriteFrames",Uk=(t={})=>{const e=t.root,n=t.prefix||"app:///",r=t.iteratee||(a=>{if(!a.filename)return a;const o=/^[a-zA-Z]:\\/.test(a.filename)||a.filename.includes("\\")&&!a.filename.includes("/"),u=/^\//.test(a.filename);if(o||u){const c=o?a.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):a.filename,l=e?eb(e,c):tb(c);a.filename=`${n}${l}`}return a});function i(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(o=>({...o,...o.stacktrace&&{stacktrace:s(o.stacktrace)}}))}}}catch{return a}}function s(a){return{...a,frames:a&&a.frames&&a.frames.map(o=>r(o))}}return{name:w_,setupOnce(){},processEvent(a){let o=a;return a.exception&&Array.isArray(a.exception.values)&&(o=i(o)),o}}},C_=Uk;Ee(w_,C_);const k_="SessionTiming",Fk=()=>{const t=Date.now();return{name:k_,setupOnce(){},processEvent(e){const n=Date.now();return{...e,extra:{...e.extra,"session:start":t,"session:duration":n-t,"session:end":n}}}}},x_=Fk;Ee(k_,x_);const R_="HttpClient",Bk=(t={})=>{const e={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...t};return{name:R_,setupOnce(){},setup(n){Kk(n,e),Yk(n,e)}}},O_=Bk;Ee(R_,O_);function Hk(t,e,n,r){if(D_(t,n.status,n.url)){const i=Xk(e,r);let s,a,o,u;L_()&&([{headers:s,cookies:o},{headers:a,cookies:u}]=[{cookieHeader:"Cookie",obj:i},{cookieHeader:"Set-Cookie",obj:n}].map(({cookieHeader:l,obj:d})=>{const f=zk(d.headers);let h;try{const p=f[l]||f[l.toLowerCase()]||void 0;p&&(h=A_(p))}catch{Gr&&T.log(`Could not extract cookies from header ${l}`)}return{headers:f,cookies:h}}));const c=M_({url:i.url,method:i.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:o,responseCookies:u});Ki(c)}}function jk(t,e,n,r){if(D_(t,e.status,e.responseURL)){let i,s,a;if(L_()){try{const u=e.getResponseHeader("Set-Cookie")||e.getResponseHeader("set-cookie")||void 0;u&&(s=A_(u))}catch{Gr&&T.log("Could not extract cookies from response headers")}try{a=Wk(e)}catch{Gr&&T.log("Could not extract headers from response")}i=r}const o=M_({url:e.responseURL,method:n,status:e.status,requestHeaders:i,responseHeaders:a,responseCookies:s});Ki(o)}}function Gk(t){if(t){const e=t["Content-Length"]||t["content-length"];if(e)return parseInt(e,10)}}function A_(t){return t.split("; ").reduce((e,n)=>{const[r,i]=n.split("=");return e[r]=i,e},{})}function zk(t){const e={};return t.forEach((n,r)=>{e[r]=n}),e}function Wk(t){const e=t.getAllResponseHeaders();return e?e.split(`\r
`).reduce((n,r)=>{const[i,s]=r.split(": ");return n[i]=s,n},{}):{}}function qk(t,e){return t.some(n=>typeof n=="string"?e.includes(n):n.test(e))}function Vk(t,e){return t.some(n=>typeof n=="number"?n===e:e>=n[0]&&e<=n[1])}function Kk(t,e){dp()&&Ya(n=>{if(j()!==t)return;const{response:r,args:i}=n,[s,a]=i;r&&Hk(e,s,r,a)})}function Yk(t,e){"XMLHttpRequest"in V&&Xa(n=>{if(j()!==t)return;const r=n.xhr,i=r[Xt];if(!i)return;const{method:s,request_headers:a}=i;try{jk(e,r,s,a)}catch(o){Gr&&T.warn("Error while extracting response event form XHR response",o)}})}function D_(t,e,n){return Vk(t.failedRequestStatusCodes,e)&&qk(t.failedRequestTargets,n)&&!ig(n,j())}function M_(t){const e=`HTTP Client Error with status code: ${t.status}`,n={message:e,exception:{values:[{type:"Error",value:e}]},request:{url:t.url,method:t.method,headers:t.requestHeaders,cookies:t.requestCookies},contexts:{response:{status_code:t.status,headers:t.responseHeaders,cookies:t.responseCookies,body_size:Gk(t.responseHeaders)}}};return Xn(n,{type:"http.client",handled:!1}),n}function Xk(t,e){return!e&&t instanceof Request||t instanceof Request&&t.bodyUsed?t:new Request(t,e)}function L_(){const t=j();return t?!!t.getOptions().sendDefaultPii:!1}const Xo=V,Jk=7,N_="ContextLines",Qk=(t={})=>{const e=t.frameContextLines!=null?t.frameContextLines:Jk;return{name:N_,setupOnce(){},processEvent(n){return Zk(n,e)}}},P_=Qk;Ee(N_,P_);function Zk(t,e){const n=Xo.document,r=Xo.location&&rb(Xo.location.href);if(!n||!r)return t;const i=t.exception&&t.exception.values;if(!i||!i.length)return t;const s=n.documentElement.innerHTML;if(!s)return t;const a=["<!DOCTYPE html>","<html>",...s.split(`
`),"</html>"];return i.forEach(o=>{const u=o.stacktrace;u&&u.frames&&(u.frames=u.frames.map(c=>ex(c,a,r,e)))}),t}function ex(t,e,n,r){return t.filename!==n||!t.lineno||!e.length||Cv(e,t,r),t}function Hi(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function tx(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const r=Hi(n);return i=>r.then(s=>i(s.transaction(e,"readwrite").objectStore(e)))}function $_(t){return Hi(t.getAllKeys())}function nx(t,e,n){return t(r=>$_(r).then(i=>{if(!(i.length>=n))return r.put(e,Math.max(...i,0)+1),Hi(r.transaction)}))}function rx(t){return t(e=>$_(e).then(n=>{if(n.length!==0)return Hi(e.get(n[0])).then(r=>(e.delete(n[0]),Hi(e.transaction).then(()=>r)))}))}function ix(t){let e;function n(){return e==null&&(e=tx(t.dbName||"sentry-offline",t.storeName||"queue")),e}return{insert:async r=>{try{const i=await Sp(r,t.textEncoder);await nx(n(),i,t.maxQueueSize||30)}catch{}},pop:async()=>{try{const r=await rx(n());if(r)return pb(r,t.textEncoder||new TextEncoder,t.textDecoder||new TextDecoder)}catch{}}}}function sx(t){return e=>t({...e,createStore:ix})}function ax(t){return sx(iE(t))}const Nf=1e6,na=String(0),ox="main";let U_="",F_="",B_="",ju=H.navigator&&H.navigator.userAgent||"",H_="";const ux=H.navigator&&H.navigator.language||H.navigator&&H.navigator.languages&&H.navigator.languages[0]||"";function cx(t){return typeof t=="object"&&t!==null&&"getHighEntropyValues"in t}const Pf=H.navigator&&H.navigator.userAgentData;cx(Pf)&&Pf.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(t=>{if(U_=t.platform||"",B_=t.architecture||"",H_=t.model||"",F_=t.platformVersion||"",t.fullVersionList&&t.fullVersionList.length>0){const e=t.fullVersionList[t.fullVersionList.length-1];ju=`${e.brand} ${e.version}`}}).catch(t=>{});function lx(t){return!("thread_metadata"in t)}function dx(t){return lx(t)?px(t):t}function fx(t){const e=t&&t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id;return typeof e=="string"&&e.length!==32&&re&&T.log(`[Profiling] Invalid traceId: ${e} on profiled event`),typeof e!="string"?"":e}function hx(t,e,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const i=fx(r),s=dx(n),a=e||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Date.now()),o=typeof r.timestamp=="number"?r.timestamp*1e3:Date.now();return{event_id:t,timestamp:new Date(a).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||qi,runtime:{name:"javascript",version:H.navigator.userAgent},os:{name:U_,version:F_,build_number:ju},device:{locale:ux,model:H_,manufacturer:ju,architecture:B_,is_emulator:!1},debug_meta:{images:_x(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||ae(),trace_id:i,active_thread_id:na,relative_start_ns:"0",relative_end_ns:((o-a)*1e6).toFixed(0)}]}}function j_(t){return t.op==="pageload"}function px(t){let e,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[na]:{name:ox}}};if(!t.samples.length)return r;const i=t.samples[0].timestamp,s=typeof performance.timeOrigin=="number"?performance.timeOrigin:qe||0,a=s-(qe||s);for(let o=0;o<t.samples.length;o++){const u=t.samples[o];if(u.stackId===void 0){e===void 0&&(e=n,r.stacks[e]=[],n++),r.samples[o]={elapsed_since_start_ns:((u.timestamp+a-i)*Nf).toFixed(0),stack_id:e,thread_id:na};continue}let c=t.stacks[u.stackId];const l=[];for(;c;){l.push(c.frameId);const f=t.frames[c.frameId];r.frames[c.frameId]===void 0&&(r.frames[c.frameId]={function:f.name,abs_path:typeof f.resourceId=="number"?t.resources[f.resourceId]:void 0,lineno:f.line,colno:f.column}),c=c.parentId===void 0?void 0:t.stacks[c.parentId]}const d={elapsed_since_start_ns:((u.timestamp+a-i)*Nf).toFixed(0),stack_id:n,thread_id:na};r.stacks[n]=l,r.samples[o]=d,n++}return r}function gx(t,e){if(!e.length)return t;for(const n of e)t[1].push([{type:"profile"},n]);return t}function mx(t){const e=[];return Nr(t,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;i++){const s=n[i];s&&s.contexts&&s.contexts.profile&&s.contexts.profile.profile_id&&e.push(n[i])}}),e}const $f=new WeakMap;function _x(t){const e=V._sentryDebugIds;if(!e)return[];const n=j(),r=n&&n.getOptions(),i=r&&r.stackParser;if(!i)return[];let s;const a=$f.get(i);a?s=a:(s=new Map,$f.set(i,s));const o=Object.keys(e).reduce((c,l)=>{let d;const f=s.get(l);f?d=f:(d=i(l),s.set(l,d));for(let h=d.length-1;h>=0;h--){const p=d[h],g=p&&p.filename;if(p&&g){c[g]=e[l];break}}return c},{}),u=[];for(const c of t)c&&o[c]&&u.push({type:"sourcemap",code_file:c,debug_id:o[c]});return u}function yx(t){return typeof t!="number"&&typeof t!="boolean"||typeof t=="number"&&isNaN(t)?(re&&T.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t===!0||t===!1?!0:t<0||t>1?(re&&T.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function vx(t){return t.samples.length<2?(re&&T.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):t.frames.length?!0:(re&&T.log("[Profiling] Discarding profile because it contains no frames"),!1)}let G_=!1;const z_=3e4;function bx(t){return typeof t=="function"}function Sx(){const t=H.Profiler;if(!bx(t)){re&&T.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const e=10,n=Math.floor(z_/e);try{return new t({sampleInterval:e,maxBufferSize:n})}catch{re&&(T.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),T.log("[Profiling] Disabling profiling for current user session.")),G_=!0}}function Gu(t){if(G_)return re&&T.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!t.isRecording())return re&&T.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const e=j(),n=e&&e.getOptions();if(!n)return re&&T.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return yx(r)?r?(r===!0?!0:Math.random()<r)?!0:(re&&T.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(re&&T.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(re&&T.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function Ex(t,e,n,r){return vx(n)?hx(t,e,n,r):null}const Wn=new Map;function Tx(){return Wn.size}function Ix(t){const e=Wn.get(t);return e&&Wn.delete(t),e}function wx(t,e){if(Wn.set(t,e),Wn.size>30){const n=Wn.keys().next().value;Wn.delete(n)}}function Cx(t){return t?Gu(t)?zu(t):t:(re&&T.log("[Profiling] Transaction is undefined, skipping profiling"),t)}function zu(t){let e;j_(t)&&(e=tn()*1e3);const n=Sx();if(!n)return t;re&&T.log(`[Profiling] started profiling transaction: ${oe(t).description}`);const r=ae();async function i(){return!t||!n?null:n.stop().then(u=>(s&&(H.clearTimeout(s),s=void 0),re&&T.log(`[Profiling] stopped profiling of transaction: ${oe(t).description}`),u?(wx(r,u),null):(re&&T.log(`[Profiling] profiler returned null profile for: ${oe(t).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(u=>(re&&T.log("[Profiling] error while stopping profiler:",u),null))}let s=H.setTimeout(()=>{re&&T.log("[Profiling] max profile duration elapsed, stopping profiling for:",oe(t).description),i()},z_);const a=t.end.bind(t);function o(){return t?(i().then(()=>{t.setContext("profile",{profile_id:r,start_timestamp:e}),a()},()=>{a()}),t):a()}return t.end=o,t}const W_="BrowserProfiling",kx=()=>({name:W_,setupOnce(){},setup(t){const n=we().getTransaction();if(n&&j_(n)&&Gu(n)&&zu(n),typeof t.on!="function"){T.warn("[Profiling] Client does not support hooks, profiling will be disabled");return}t.on("startTransaction",r=>{Gu(r)&&zu(r)}),t.on("beforeEnvelope",r=>{if(!Tx())return;const i=mx(r);if(!i.length)return;const s=[];for(const a of i){const o=a&&a.contexts,u=o&&o.profile&&o.profile.profile_id,c=o&&o.profile&&o.profile.start_timestamp;if(typeof u!="string"){re&&T.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!u){re&&T.log("[Profiling] cannot find profile for a transaction without a profile context");continue}o&&o.profile&&delete o.profile;const l=Ix(u);if(!l){re&&T.log(`[Profiling] Could not retrieve profile for transaction: ${u}`);continue}const d=Ex(u,c,l,a);d&&s.push(d)}gx(r,s)})}}),q_=kx,xx=Ee(W_,q_);let V_={};H.Sentry&&H.Sentry.Integrations&&(V_=H.Sentry.Integrations);const Rx={...V_,...VE,...cI},oN=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumbs:Yg,BrowserClient:Fg,BrowserProfilingIntegration:xx,BrowserTracing:z0,Dedupe:Qg,Feedback:is,FunctionToString:fg,GlobalHandlers:nm,HttpContext:am,Hub:wc,InboundFilters:lg,Integrations:Rx,LinkedErrors:um,ModuleMetadata:vE,Replay:rs,ReplayCanvas:KC,SDK_VERSION:pa,SEMANTIC_ATTRIBUTE_SENTRY_OP:Si,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:Gn,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:jn,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:st,Scope:$r,TryCatch:lm,WINDOW:H,addBreadcrumb:nn,addEventProcessor:Qp,addGlobalEventProcessor:Cp,addIntegration:OS,addTracingExtensions:xc,breadcrumbsIntegration:Bc,browserApiErrorsIntegration:zc,browserProfilingIntegration:q_,browserTracingIntegration:Y0,captureConsoleIntegration:p_,captureEvent:Ki,captureException:Vi,captureMessage:fa,captureSession:wu,captureUserFeedback:uI,chromeStackLineParser:jg,close:Wb,configureScope:Pb,contextLinesIntegration:P_,continueTrace:dS,createTransport:Oc,createUserFeedbackEnvelope:Ug,debugIntegration:m_,dedupeIntegration:y_,defaultIntegrations:dm,defaultRequestInstrumentationOptions:Pi,defaultStackLineParsers:Wg,defaultStackParser:qg,endSession:Ic,eventFromException:Pg,eventFromMessage:$g,exceptionFromError:$c,extraErrorDataIntegration:E_,extractTraceparentData:iS,feedbackIntegration:wk,flush:zb,forceLoad:iI,functionToStringIntegration:Dc,geckoStackLineParser:Gg,getActiveSpan:Yi,getActiveTransaction:$t,getClient:j,getCurrentHub:ue,getCurrentScope:we,getDefaultIntegrations:fm,getHubFromCarrier:ga,getReplay:LC,getSpanStatusFromHttpCode:Cc,globalHandlersIntegration:Hc,httpClientIntegration:O_,httpContextIntegration:jc,inboundFiltersIntegration:Ac,init:hm,instrumentOutgoingRequests:Pc,isInitialized:Vb,lastEventId:qb,linkedErrorsIntegration:Gc,makeBrowserOfflineTransport:ax,makeFetchTransport:Bg,makeMain:Cu,makeMultiplexedTransport:oE,makeXHRTransport:Hg,metrics:qE,moduleMetadataIntegration:ug,onLoad:sI,onProfilingStartRouteTransaction:Cx,opera10StackLineParser:CT,opera11StackLineParser:RT,parameterize:hE,replayCanvasIntegration:u_,replayIntegration:DC,reportingObserverIntegration:I_,rewriteFramesIntegration:C_,sendFeedback:d_,sessionTimingIntegration:x_,setContext:Op,setCurrentClient:ng,setExtra:Ub,setExtras:$b,setHttpStatus:to,setMeasurement:Wp,setTag:Bb,setTags:Fb,setUser:Hb,showReportDialog:rI,spanStatusfromHttpCode:aS,startBrowserTracingNavigationSpan:Lg,startBrowserTracingPageLoadSpan:Mg,startInactiveSpan:Ar,startSession:Iu,startSpan:cS,startSpanManual:lS,startTransaction:Gb,trace:uS,winjsStackLineParser:zg,withActiveSpan:Tu,withIsolationScope:jb,withScope:Rn,wrap:aI},Symbol.toStringTag,{value:"Module"}));function uN(t){const e={...t};sg(e,"react"),hm(e)}const Ox="ui.react.render",Ax="ui.react.update",Dx="ui.react.mount",Uf="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx",Mx="unknown";class K_ extends Pt.Component{static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(e){super(e);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=Ar({name:`<${n}>`,onlyIfParent:!0,op:Dx,origin:"auto.ui.react.profiler",attributes:{"ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:n=!0}){if(n&&this._mountSpan&&e!==this.props.updateProps){const r=Object.keys(e).filter(i=>e[i]!==this.props.updateProps[i]);if(r.length>0){const i=tn();this._updateSpan=Tu(this._mountSpan,()=>Ar({name:`<${this.props.name}>`,onlyIfParent:!0,op:Ax,origin:"auto.ui.react.profiler",startTimestamp:i,attributes:{"ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const e=tn(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const i=oe(this._mountSpan).timestamp;Tu(this._mountSpan,()=>{const s=Ar({onlyIfParent:!0,name:`<${n}>`,op:Ox,origin:"auto.ui.react.profiler",startTimestamp:i,attributes:{"ui.component_name":n}});s&&s.end(e)})}}render(){return this.props.children}}K_.__initStatic();function cN(t,e){const n=t.displayName||t.name||Mx,r=i=>Pt.createElement(K_,{...e,name:n,updateProps:i,__self:this,__source:{fileName:Uf,lineNumber:159}},Pt.createElement(t,{...i,__self:this,__source:{fileName:Uf,lineNumber:160}}));return r.displayName=`profiler(${n})`,iv(r,t),r}const Lx=Object.prototype.toString;function ol(t,e){return Lx.call(t)===`[object ${e}]`}function bn(t){return ol(t,"String")}function Y_(t){return ol(t,"Object")}function X_(t){return ol(t,"RegExp")}function On(t){return!!(t&&t.then&&typeof t.then=="function")}function Nx(t){return typeof t=="number"&&t!==t}function Ff(t,e){try{return t instanceof e}catch{return!1}}function Px(t,e,n=!1){return bn(t)?X_(e)?e.test(t):bn(e)?n?t===e:t.includes(e):!1:!1}function $x(t,e=[],n=!1){return e.some(r=>Px(t,r,n))}function Us(t){return t&&t.Math==Math?t:void 0}const ge=typeof globalThis=="object"&&Us(globalThis)||typeof window=="object"&&Us(window)||typeof self=="object"&&Us(self)||typeof global=="object"&&Us(global)||function(){return this}()||{};function ul(){return ge}function J_(t,e,n){const r=n||ge,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}const Ai=ul(),Ux=80;function Oa(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,i=[];let s=0,a=0;const o=" > ",u=o.length;let c;const l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Ux;for(;n&&s++<r&&(c=Fx(n,l),!(c==="html"||s>1&&a+i.length*u+c.length>=d));)i.push(c),a+=c.length,n=n.parentNode;return i.reverse().join(o)}catch{return"<unknown>"}}function Fx(t,e){const n=t,r=[];let i,s,a,o,u;if(!n||!n.tagName)return"";if(Ai.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const c=e&&e.length?e.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(c&&c.length)c.forEach(d=>{r.push(`[${d[0]}="${d[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&bn(i))for(s=i.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const l=["aria-label","type","name","title","alt"];for(u=0;u<l.length;u++)a=l[u],o=n.getAttribute(a),o&&r.push(`[${a}="${o}"]`);return r.join("")}function Bx(t){return Ai.document&&Ai.document.querySelector?Ai.document.querySelector(t):null}function Hx(t){if(!Ai.HTMLElement)return null;let e=t;const n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement&&e.dataset.sentryComponent)return e.dataset.sentryComponent;e=e.parentNode}return null}const ss=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,jx="Sentry Logger ",Bf=["debug","info","warn","error","log","assert","trace"],Hf={};function Q_(t){if(!("console"in ge))return t();const e=ge.console,n={},r=Object.keys(Hf);r.forEach(i=>{const s=Hf[i];n[i]=e[i],e[i]=s});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function Gx(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return ss?Bf.forEach(n=>{e[n]=(...r)=>{t&&Q_(()=>{ge.console[n](`${jx}[${n}]:`,...r)})}}):Bf.forEach(n=>{e[n]=()=>{}}),e}const D=Gx();function zx(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:u}=t;return`${o}://${u}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${a}`}function tt(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);typeof i=="function"&&Wx(i,r),t[e]=i}function Aa(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{ss&&D.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Wx(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,Aa(t,"__sentry_original__",e)}catch{}}function vt(t){return Wu(t,new Map)}function Wu(t,e){if(qx(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const i of Object.keys(t))typeof t[i]<"u"&&(r[i]=Wu(t[i],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(i=>{r.push(Wu(i,e))}),r}return t}function qx(t){if(!Y_(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const Jo="<anonymous>";function Z_(t){try{return!t||typeof t!="function"?Jo:t.name||Jo}catch{return Jo}}const ra={},jf={};function as(t,e){ra[t]=ra[t]||[],ra[t].push(e)}function os(t,e){jf[t]||(e(),jf[t]=!0)}function Qt(t,e){const n=t&&ra[t];if(n)for(const r of n)try{r(e)}catch(i){ss&&D.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${Z_(r)}
Error:`,i)}}function Me(){const t=ge,e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function qu(t){return Array.isArray(t)?t:[t]}const Vu=ul();function Vx(){if(!("fetch"in Vu))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Gf(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Kx(){if(typeof EdgeRuntime=="string")return!0;if(!Vx())return!1;if(Gf(Vu.fetch))return!0;let t=!1;const e=Vu.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=Gf(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){ss&&D.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function Yx(t){const e="fetch";as(e,t),os(e,Xx)}function Xx(){Kx()&&tt(ge,"fetch",function(t){return function(...e){const{method:n,url:r}=Jx(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Qt("fetch",{...i}),t.apply(ge,e).then(s=>{const a={...i,endTimestamp:Date.now(),response:s};return Qt("fetch",a),s},s=>{const a={...i,endTimestamp:Date.now(),error:s};throw Qt("fetch",a),s})}})}function Ku(t,e){return!!t&&typeof t=="object"&&!!t[e]}function zf(t){return typeof t=="string"?t:t?Ku(t,"url")?t.url:t.toString?t.toString():"":""}function Jx(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:zf(n),method:Ku(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:zf(e),method:Ku(e,"method")?String(e.method).toUpperCase():"GET"}}let Fs=null;function Qx(t){const e="error";as(e,t),os(e,Zx)}function Zx(){Fs=ge.onerror,ge.onerror=function(t,e,n,r,i){return Qt("error",{column:r,error:i,line:n,msg:t,url:e}),Fs&&!Fs.__SENTRY_LOADER__?Fs.apply(this,arguments):!1},ge.onerror.__SENTRY_INSTRUMENTED__=!0}let Bs=null;function eR(t){const e="unhandledrejection";as(e,t),os(e,tR)}function tR(){Bs=ge.onunhandledrejection,ge.onunhandledrejection=function(t){return Qt("unhandledrejection",t),Bs&&!Bs.__SENTRY_LOADER__?Bs.apply(this,arguments):!0},ge.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Hs=ul();function nR(){const t=Hs.chrome,e=t&&t.app&&t.app.runtime,n="history"in Hs&&!!Hs.history.pushState&&!!Hs.history.replaceState;return!e&&n}const _i=ge;let js;function rR(t){const e="history";as(e,t),os(e,iR)}function iR(){if(!nR())return;const t=_i.onpopstate;_i.onpopstate=function(...n){const r=_i.location.href,i=js;if(js=r,Qt("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const s=js,a=String(i);js=a,Qt("history",{from:s,to:a})}return n.apply(this,r)}}tt(_i.history,"pushState",e),tt(_i.history,"replaceState",e)}const sR=ge,Ti="__sentry_xhr_v3__";function aR(t){const e="xhr";as(e,t),os(e,oR)}function oR(){if(!sR.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;tt(t,"open",function(e){return function(...n){const r=Date.now(),i=bn(n[0])?n[0].toUpperCase():void 0,s=uR(n[1]);if(!i||!s)return e.apply(this,n);this[Ti]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const a=()=>{const o=this[Ti];if(o&&this.readyState===4){try{o.status_code=this.status}catch{}const u={args:[i,s],endTimestamp:Date.now(),startTimestamp:r,xhr:this};Qt("xhr",u)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?tt(this,"onreadystatechange",function(o){return function(...u){return a(),o.apply(this,u)}}):this.addEventListener("readystatechange",a),tt(this,"setRequestHeader",function(o){return function(...u){const[c,l]=u,d=this[Ti];return d&&bn(c)&&bn(l)&&(d.request_headers[c.toLowerCase()]=l),o.apply(this,u)}}),e.apply(this,n)}}),tt(t,"send",function(e){return function(...n){const r=this[Ti];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const i={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return Qt("xhr",i),e.apply(this,n)}})}function uR(t){if(bn(t))return t;try{return t.toString()}catch{}}function cR(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function lR(){return!cR()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function qn(t,e){return t.require(e)}function Zn(t){let e;try{e=qn(module,t)}catch{}try{const{cwd:n}=qn(module,"process");e=qn(module,`${n()}/node_modules/${t}`)}catch{}return e}var Vt;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const r=2;t[t.REJECTED=r]="REJECTED"})(Vt||(Vt={}));class gn{constructor(e){gn.prototype.__init.call(this),gn.prototype.__init2.call(this),gn.prototype.__init3.call(this),gn.prototype.__init4.call(this),this._state=Vt.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new gn((r,i)=>{this._handlers.push([!1,s=>{if(!e)r(s);else try{r(e(s))}catch(a){i(a)}},s=>{if(!n)i(s);else try{r(n(s))}catch(a){i(a)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new gn((n,r)=>{let i,s;return this.then(a=>{s=!1,i=a,e&&e()},a=>{s=!0,i=a,e&&e()}).then(()=>{if(s){r(i);return}n(i)})})}__init(){this._resolve=e=>{this._setResult(Vt.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Vt.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===Vt.PENDING){if(On(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Vt.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Vt.RESOLVED&&n[1](this._value),this._state===Vt.REJECTED&&n[2](this._value),n[0]=!0)})}}}function ho(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Da(t){return t.split(/[\?#]/,1)[0]}function Ma(t){return t.split(/\\?\//).filter(e=>e.length>0&&e!==",").length}function dR(t,e={}){const n=t.method&&t.method.toUpperCase();let r="",i="url";e.customRoute||t.route?(r=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`,i="route"):(t.originalUrl||t.url)&&(r=Da(t.originalUrl||t.url||""));let s="";return e.method&&n&&(s+=n),e.method&&e.path&&(s+=" "),e.path&&r&&(s+=r),[s,i]}const ey=1e3;function cl(){return Date.now()/ey}function fR(){const{performance:t}=ge;if(!t||!t.now)return cl;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/ey}const us=fR(),ft=(()=>{const{performance:t}=ge;if(!t||!t.now)return;const e=3600*1e3,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=i<e,a=t.timing&&t.timing.navigationStart,u=typeof a=="number"?Math.abs(a+n-r):e,c=u<e;return s||c?i<=u?t.timeOrigin:a:r})(),Yu="baggage",ty="sentry-",hR=/^sentry-/,pR=8192;function gR(t){if(!bn(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((r,i)=>{const s=Wf(i);for(const a of Object.keys(s))r[a]=s[a];return r},{});else{if(!t)return;e=Wf(t)}const n=Object.entries(e).reduce((r,[i,s])=>{if(i.match(hR)){const a=i.slice(ty.length);r[a]=s}return r},{});if(Object.keys(n).length>0)return n}function ny(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,i])=>(i&&(n[`${ty}${r}`]=i),n),{});return mR(e)}function Wf(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(e[n]=r,e),{})}function mR(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],i)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,a=i===0?s:`${e},${s}`;return a.length>pR?(ss&&D.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):a},"")}const _R=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function yR(t){if(!t)return;const e=t.match(_R);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function vR(t,e){const n=yR(t),r=gR(e),{traceId:i,parentSpanId:s,parentSampled:a}=n||{};return n?{traceId:i||Me(),parentSpanId:s||Me().substring(16),spanId:Me().substring(16),sampled:a,dsc:r||{}}:{traceId:i||Me(),spanId:Me().substring(16)}}function ll(t=Me(),e=Me().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function bR(t,e=[]){return[t,e]}function Z(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=s(n)):(i==="call"||i==="optionalCall")&&(n=s((...a)=>n.call(e,...a)),e=void 0)}return n}const se=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ry="production";function SR(){return J_("globalEventProcessors",()=>[])}function Xu(t,e,n,r=0){return new gn((i,s)=>{const a=t[r];if(e===null||typeof a!="function")i(e);else{const o=a({...e},n);se&&a.id&&o===null&&D.log(`Event processor "${a.id}" dropped event`),On(o)?o.then(u=>Xu(t,u,n,r+1).then(i)).then(null,s):Xu(t,o,n,r+1).then(i).then(null,s)}})}function ER(t){const e=us(),n={sid:Me(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>IR(n)};return po(n,t),n}function po(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||us(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Me()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function TR(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),po(t,n)}function IR(t){return vt({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}const wR=0,iy=1;function dl(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:i,parent_span_id:s,status:a,tags:o,origin:u}=Xe(t);return vt({data:r,op:i,parent_span_id:s,span_id:e,status:a,tags:o,trace_id:n,origin:u})}function go(t){const{traceId:e,spanId:n}=t.spanContext(),r=fl(t);return ll(e,n,r)}function mo(t){return typeof t=="number"?qf(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?qf(t.getTime()):us()}function qf(t){return t>9999999999?t/1e3:t}function Xe(t){return CR(t)?t.getSpanJSON():typeof t.toJSON=="function"?t.toJSON():{}}function CR(t){return typeof t.getSpanJSON=="function"}function fl(t){const{traceFlags:e}=t.spanContext();return!!(e&iy)}function kR(...t){const e=sn();if(t.length===2){const[n,r]=t;return n?e.withScope(()=>(e.getStackTop().scope=n,r(n))):e.withScope(r)}return e.withScope(t[0])}function si(){return sn().getClient()}function ai(){return sn().getScope()}function La(t){return t.transaction}function hl(t,e,n){const r=e.getOptions(),{publicKey:i}=e.getDsn()||{},{segment:s}=n&&n.getUser()||{},a=vt({environment:r.environment||ry,release:r.release,user_segment:s,public_key:i,trace_id:t});return e.emit&&e.emit("createDsc",a),a}function zr(t){const e=si();if(!e)return{};const n=hl(Xe(t).trace_id||"",e,ai()),r=La(t);if(!r)return n;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:s,source:a}=r.metadata;s!=null&&(n.sample_rate=`${s}`);const o=Xe(r);return a&&a!=="url"&&(n.transaction=o.description),n.sampled=String(fl(r)),e.emit&&e.emit("createDsc",n),n}function xR(t,e){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=e;RR(t,e),r&&DR(t,r),MR(t,n),OR(t,i),AR(t,s)}function RR(t,e){const{extra:n,tags:r,user:i,contexts:s,level:a,transactionName:o}=e,u=vt(n);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const c=vt(r);c&&Object.keys(c).length&&(t.tags={...c,...t.tags});const l=vt(i);l&&Object.keys(l).length&&(t.user={...l,...t.user});const d=vt(s);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts}),a&&(t.level=a),o&&(t.transaction=o)}function OR(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function AR(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function DR(t,e){t.contexts={trace:dl(e),...t.contexts};const n=La(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:zr(e),...t.sdkProcessingMetadata};const r=Xe(n).description;r&&(t.tags={transaction:r,...t.tags})}}function MR(t,e){t.fingerprint=t.fingerprint?qu(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}const LR=100;class Mr{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Vf()}static clone(e){return e?e.clone():new Mr}clone(){const e=new Mr;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&po(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e;if(n instanceof Mr){const 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(Y_(n)){const r=e;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=Vf(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:LR;if(r<=0)return this;const i={timestamp:cl(),...e},s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>r?s.slice(-r):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:n,_contexts:r,_tags:i,_extra:s,_user:a,_level:o,_fingerprint:u,_eventProcessors:c,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:f,_span:h}=this;return{breadcrumbs:e,attachments:n,contexts:r,tags:i,extra:s,user:a,level:o,fingerprint:u||[],eventProcessors:c,propagationContext:l,sdkProcessingMetadata:d,transactionName:f,span:h}}applyToEvent(e,n={},r=[]){xR(e,this.getScopeData());const i=[...r,...SR(),...this._eventProcessors];return Xu(i,e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n&&n.event_id?n.event_id:Me();if(!this._client)return D.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureMessage(e,n,r){const i=r&&r.event_id?r.event_id:Me();if(!this._client)return D.warn("No client configured on scope - will not capture message!"),i;const s=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:s,...r,event_id:i},this),i}captureEvent(e,n){const r=n&&n.event_id?n.event_id:Me();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(D.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function Vf(){return{traceId:Me(),spanId:Me().substring(16)}}const NR="7.114.0",sy=parseFloat(NR),PR=100;class ay{constructor(e,n,r,i=sy){this._version=i;let s;n?s=n:(s=new Mr,s.setClient(e));let a;r?a=r:(a=new Mr,a.setClient(e)),this._stack=[{scope:s}],e&&this.bindClient(e),this._isolationScope=a}isOlderThan(e){return this._version<e}bindClient(e){const n=this.getStackTop();n.client=e,n.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){const n=this.pushScope();let r;try{r=e(n)}catch(i){throw this.popScope(),i}return On(r)?r.then(i=>(this.popScope(),i),i=>{throw this.popScope(),i}):(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(e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Me(),i=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:i,...n,event_id:r}),r}captureMessage(e,n,r){const i=this._lastEventId=r&&r.event_id?r.event_id:Me(),s=new Error(e);return this.getScope().captureMessage(e,n,{originalException:e,syntheticException:s,...r,event_id:i}),i}captureEvent(e,n){const r=n&&n.event_id?n.event_id:Me();return e.type||(this._lastEventId=r),this.getScope().captureEvent(e,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){const{scope:r,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:a=PR}=i.getOptions&&i.getOptions()||{};if(a<=0)return;const u={timestamp:cl(),...e},c=s?Q_(()=>s(u,n)):u;c!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",c,n),r.addBreadcrumb(c,a))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,n){this.getScope().setTag(e,n),this.getIsolationScope().setTag(e,n)}setExtra(e,n){this.getScope().setExtra(e,n),this.getIsolationScope().setExtra(e,n)}setContext(e,n){this.getScope().setContext(e,n),this.getIsolationScope().setContext(e,n)}configureScope(e){const{scope:n,client:r}=this.getStackTop();r&&e(n)}run(e){const n=Kf(this);try{e(this)}finally{Kf(n)}}getIntegration(e){const n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return se&&D.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){const r=this._callExtensionMethod("startTransaction",e,n);return se&&!r&&(this.getClient()?D.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):D.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&TR(r),this._sendSessionUpdate(),n.setSession()}startSession(e){const{scope:n,client:r}=this.getStackTop(),{release:i,environment:s=ry}=r&&r.getOptions()||{},{userAgent:a}=ge.navigator||{},o=ER({release:i,environment:s,user:n.getUser(),...a&&{userAgent:a},...e}),u=n.getSession&&n.getSession();return u&&u.status==="ok"&&po(u,{status:"exited"}),this.endSession(),n.setSession(o),o}shouldSendDefaultPii(){const e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:n}=this.getStackTop(),r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(e,...n){const i=ar().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[e]=="function")return i.extensions[e].apply(this,n);se&&D.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function ar(){return ge.__SENTRY__=ge.__SENTRY__||{extensions:{},hub:void 0},ge}function Kf(t){const e=ar(),n=Ju(e);return oy(e,t),n}function sn(){const t=ar();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return $R(t)}function pl(){return sn().getIsolationScope()}function $R(t=ar()){return(!FR(t)||Ju(t).isOlderThan(sy))&&oy(t,new ay),Ju(t)}function UR(t,e={}){const n=ar();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(t,e):t()}function FR(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Ju(t){return J_("hub",()=>new ay,t)}function oy(t,e){if(!t)return!1;const n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}function er(t){return(t||sn()).getScope().getTransaction()}let Yf=!1;function BR(){Yf||(Yf=!0,Qx(Qu),eR(Qu))}function Qu(){const t=er();if(t){const e="internal_error";se&&D.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}Qu.tag="sentry_tracingErrorCallback";var Xf;(function(t){const e="ok";t.Ok=e;const n="deadline_exceeded";t.DeadlineExceeded=n;const r="unauthenticated";t.Unauthenticated=r;const i="permission_denied";t.PermissionDenied=i;const s="not_found";t.NotFound=s;const a="resource_exhausted";t.ResourceExhausted=a;const o="invalid_argument";t.InvalidArgument=o;const u="unimplemented";t.Unimplemented=u;const c="unavailable";t.Unavailable=c;const l="internal_error";t.InternalError=l;const d="unknown_error";t.UnknownError=d;const f="cancelled";t.Cancelled=f;const h="already_exists";t.AlreadyExists=h;const p="failed_precondition";t.FailedPrecondition=p;const g="aborted";t.Aborted=g;const y="out_of_range";t.OutOfRange=y;const m="data_loss";t.DataLoss=m})(Xf||(Xf={}));function HR(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function gl(t,e){t.setTag("http.status_code",String(e)),t.setData("http.response.status_code",e);const n=HR(e);n!=="unknown_error"&&t.setStatus(n)}function jR(t,e,n=()=>{}){let r;try{r=t()}catch(i){throw e(i),n(),i}return GR(r,e,n)}function GR(t,e,n){return On(t)?t.then(r=>(n(),r),r=>{throw e(r),n(),r}):(n(),t)}function oi(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=si(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function zR(t,e){const n=ly(t);return UR(()=>kR(t.scope,r=>{const i=sn(),s=r.getSpan(),o=t.onlyIfParent&&!s?void 0:cy(i,{parentSpan:s,spanContext:n,forceTransaction:t.forceTransaction,scope:r});return jR(()=>e(o),()=>{if(o){const{status:u}=Xe(o);(!u||u==="ok")&&o.setStatus("internal_error")}},()=>o&&o.end())}))}function uy(t){if(!oi())return;const e=ly(t),n=sn(),r=t.scope?t.scope.getSpan():WR();if(t.onlyIfParent&&!r)return;const a=(t.scope||ai()).clone();return cy(n,{parentSpan:r,spanContext:e,forceTransaction:t.forceTransaction,scope:a})}function WR(){return ai().getSpan()}function cy(t,{parentSpan:e,spanContext:n,forceTransaction:r,scope:i}){if(!oi())return;const s=pl();let a;if(e&&!r)a=e.startChild(n);else if(e){const o=zr(e),{traceId:u,spanId:c}=e.spanContext(),l=fl(e);a=t.startTransaction({traceId:u,parentSpanId:c,parentSampled:l,...n,metadata:{dynamicSamplingContext:o,...n.metadata}})}else{const{traceId:o,dsc:u,parentSpanId:c,sampled:l}={...s.getPropagationContext(),...i.getPropagationContext()};a=t.startTransaction({traceId:o,parentSpanId:c,parentSampled:l,...n,metadata:{dynamicSamplingContext:u,...n.metadata}})}return i.setSpan(a),qR(a,i,s),a}function ly(t){if(t.startTime){const e={...t};return e.startTimestamp=mo(t.startTime),delete e.startTime,e}return t}const dy="_sentryScope",fy="_sentryIsolationScope";function qR(t,e,n){t&&(Aa(t,fy,n),Aa(t,dy,e))}function VR(t){return{scope:t[dy],isolationScope:t[fy]}}const Sn="sentry.source",Cr="sentry.sample_rate",Gs="sentry.op",Vn="sentry.origin",KR="profile_id";class hy{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class _o{constructor(e={}){this._traceId=e.traceId||Me(),this._spanId=e.spanId||Me().substring(16),this._startTime=e.startTimestamp||us(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[Vn]:e.origin||"manual",[Gs]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),e.exclusiveTime!==void 0&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[Gs]}set op(e){this.setAttribute(Gs,e)}get origin(){return this._attributes[Vn]}set origin(e){this.setAttribute(Vn,e)}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?iy:wR}}startChild(e){const n=new _o({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=La(this);if(n.transaction=r,se&&r){const i=e&&e.op||"< unknown op >",s=Xe(n).description||"< unknown name >",a=r.spanContext().spanId,o=`[Tracing] Starting '${i}' span on transaction '${s}' (${a}).`;D.log(o),this._logMessage=o}return n}setTag(e,n){return this.tags={...this.tags,[e]:n},this}setData(e,n){return this.data={...this.data,[e]:n},this}setAttribute(e,n){n===void 0?delete this._attributes[e]:this._attributes[e]=n}setAttributes(e){Object.keys(e).forEach(n=>this.setAttribute(n,e[n]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return gl(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return this._status==="ok"}finish(e){return this.end(e)}end(e){if(this._endTime)return;const n=La(this);if(se&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&D.log(r.replace("Starting","Finishing"))}this._endTime=mo(e)}toTraceparent(){return go(this)}toContext(){return vt({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(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return dl(this)}getSpanJSON(){return vt({data:this._getData(),description:this._name,op:this._attributes[Gs],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[Vn],_metrics_summary:void 0,profile_id:this._attributes[KR],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(){const{data:e,_attributes:n}=this,r=Object.keys(e).length>0,i=Object.keys(n).length>0;if(!(!r&&!i))return r&&i?{...e,...n}:r?e:n}}class py extends _o{constructor(e,n){super(e),this._contexts={},this._hub=n||sn(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[Sn]&&{source:this._attributes[Sn]},...this._attributes[Cr]&&{sampleRate:this._attributes[Cr]}}}set metadata(e){this._metadata=e}setName(e,n="custom"){this._name=e,this.setAttribute(Sn,n)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new hy(e)),this.spanRecorder.add(this)}setContext(e,n){n===null?delete this._contexts[e]:this._contexts[e]=n}setMeasurement(e,n,r=""){this._measurements[e]={value:n,unit:r}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){const n=mo(e),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const e=super.toContext();return vt({...e,name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return zr(this)}setHub(e){this._hub=e}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(e){if(this._endTime!==void 0)return;this._name||(se&&D.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(e);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){se&&D.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&Xe(l).timestamp):[];if(this._trimEnd&&r.length>0){const l=r.map(d=>Xe(d).timestamp).filter(Boolean);this._endTime=l.reduce((d,f)=>d>f?d:f)}const{scope:i,isolationScope:s}=VR(this),{metadata:a}=this,{source:o}=a,u={contexts:{...this._contexts,trace:dl(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...a,capturedSpanScope:i,capturedSpanIsolationScope:s,...vt({dynamicSamplingContext:zr(this)})},_metrics_summary:void 0,...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(se&&D.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),u.measurements=this._measurements),se&&D.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),u}}const ia={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},YR="finishReason",pr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class XR extends hy{constructor(e,n,r,i){super(i),this._pushActivity=e,this._popActivity=n,this.transactionSpanId=r}add(e){if(e.spanContext().spanId!==this.transactionSpanId){const n=e.end;e.end=(...r)=>(this._popActivity(e.spanContext().spanId),n.apply(e,r)),Xe(e).timestamp===void 0&&this._pushActivity(e.spanContext().spanId)}super.add(e)}}class JR extends py{constructor(e,n,r=ia.idleTimeout,i=ia.finalTimeout,s=ia.heartbeatInterval,a=!1,o=!1){super(e,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=i,this._heartbeatInterval=s,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=pr[4],this._autoFinishAllowed=!o,a&&(se&&D.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=pr[3],this.end())},this._finalTimeout)}end(e){const n=mo(e);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(YR,this._finishReason),this.spanRecorder){se&&D.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;Xe(r).timestamp||(r.setStatus("cancelled"),r.end(n),se&&D.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:i,timestamp:s}=Xe(r),a=i&&i<n,o=(this._finalTimeout+this._idleTimeout)/1e3,u=s&&i&&s-i<o;if(se){const c=JSON.stringify(r,void 0,2);a?u||D.log("[Tracing] discarding Span since it finished after Transaction final timeout",c):D.log("[Tracing] discarding Span since it happened after Transaction was finished",c)}return a&&u}),se&&D.log("[Tracing] flushing IdleTransaction")}else se&&D.log("[Tracing] No active IdleTransaction");if(this._onScope){const r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const n=i=>{this._finished||this._pushActivity(i)},r=i=>{this._finished||this._popActivity(i)};this.spanRecorder=new XR(n,r,this.spanContext().spanId,e),se&&D.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=pr[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(se&&D.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=pr[1],this.end(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),se&&D.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,se&&D.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(se&&D.log(`[Tracing] popActivity ${e}`),delete this.activities[e],se&&D.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=us();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=pr[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(se&&D.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=pr[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){se&&D.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function gy(t,e,n){if(!oi(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setAttribute(Cr,Number(t.sampled)),t;let r;return typeof e.tracesSampler=="function"?(r=e.tracesSampler(n),t.setAttribute(Cr,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof e.tracesSampleRate<"u"?(r=e.tracesSampleRate,t.setAttribute(Cr,Number(r))):(r=1,t.setAttribute(Cr,r)),my(r)?r?(t.sampled=Math.random()<r,t.sampled?(se&&D.log(`[Tracing] starting ${t.op} transaction - ${Xe(t).description}`),t):(se&&D.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),t)):(se&&D.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),t.sampled=!1,t):(se&&D.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function my(t){return Nx(t)||!(typeof t=="number"||typeof t=="boolean")?(se&&D.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t<0||t>1?(se&&D.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function QR(){const e=this.getScope().getSpan();return e?{"sentry-trace":go(e)}:{}}function ZR(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=t.instrumenter||"sentry";i!==s&&(se&&D.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter.
The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),t.sampled=!1);let a=new py(t,this);return a=gy(a,r,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...e}),a.isRecording()&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function Jf(t,e,n,r,i,s,a,o=!1){const u=t.getClient(),c=u&&u.getOptions()||{};let l=new JR(e,t,n,r,a,i,o);return l=gy(l,c,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...s}),l.isRecording()&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),u&&u.emit&&u.emit("startTransaction",l),l}function _y(){const t=ar();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=ZR),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=QR),BR())}function eO(t,e,n){const r=er();r&&r.setMeasurement(t,e,n)}function tO(t,e){const n={sent_at:new Date().toISOString()};e&&(n.dsn=zx(e));const r=t.map(nO);return bR(n,r)}function nO(t){return[{type:"span"},t]}const z=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function or(t){const e=Z([t,"call",r=>r(),"access",r=>r.getClient,"call",r=>r(),"optionalAccess",r=>r.getOptions,"call",r=>r()]);return(Z([e,"optionalAccess",r=>r.instrumenter])||"sentry")!=="sentry"}class yo{static __initStatic(){this.id="Express"}constructor(e={}){this.name=yo.id,this._router=e.router||e.app,this._methods=(Array.isArray(e.methods)?e.methods:[]).concat("use")}setupOnce(e,n){if(!this._router){z&&D.error("ExpressIntegration is missing an Express instance");return}if(or(n)){z&&D.log("Express Integration is skipped because of instrumenter configuration.");return}sO(this._router,this._methods),aO(this._router)}}yo.__initStatic();function Qf(t,e){const n=t.length;switch(n){case 2:return function(r,i){const s=i.__sentry_transaction;if(s){const a=s.startChild({description:t.name,op:`middleware.express.${e}`,origin:"auto.middleware.express"});i.once("finish",()=>{a.end()})}return t.call(this,r,i)};case 3:return function(r,i,s){const a=i.__sentry_transaction,o=Z([a,"optionalAccess",u=>u.startChild,"call",u=>u({description:t.name,op:`middleware.express.${e}`,origin:"auto.middleware.express"})]);t.call(this,r,i,function(...u){Z([o,"optionalAccess",c=>c.end,"call",c=>c()]),s.call(this,...u)})};case 4:return function(r,i,s,a){const o=s.__sentry_transaction,u=Z([o,"optionalAccess",c=>c.startChild,"call",c=>c({description:t.name,op:`middleware.express.${e}`,origin:"auto.middleware.express"})]);t.call(this,r,i,s,function(...c){Z([u,"optionalAccess",l=>l.end,"call",l=>l()]),a.call(this,...c)})};default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}function rO(t,e){return t.map(n=>typeof n=="function"?Qf(n,e):Array.isArray(n)?n.map(r=>typeof r=="function"?Qf(r,e):r):n)}function iO(t,e){const n=t[e];return t[e]=function(...r){return n.call(this,...rO(r,e))},t}function sO(t,e=[]){e.forEach(n=>iO(t,n))}function aO(t){const e="settings"in t;e&&t._router===void 0&&t.lazyrouter&&t.lazyrouter();const n=e?t._router:t;if(!n){z&&D.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),z&&D.debug("Routing instrumentation is currently only supported in Express 4.");return}const r=Object.getPrototypeOf(n),i=r.process_params;r.process_params=function(a,o,u,c,l){u._reconstructedRoute||(u._reconstructedRoute="");const{layerRoutePath:d,isRegex:f,isArray:h,numExtraSegments:p}=uO(a);(d||f||h)&&(u._hasParameters=!0);let g;d?g=d:g=dO(u.originalUrl,u._reconstructedRoute,a.path)||"";const y=g.split("/").filter(_=>_.length>0&&(f||h||!_.includes("*"))).join("/");y&&y.length>0&&(u._reconstructedRoute+=`/${y}${f?"/":""}`);const m=Ma(Da(u.originalUrl||""))+p,v=Ma(u._reconstructedRoute);if(m===v){u._hasParameters||u._reconstructedRoute!==u.originalUrl&&(u._reconstructedRoute=u.originalUrl?Da(u.originalUrl):u.originalUrl);const _=c.__sentry_transaction,E=_&&Xe(_).data||{};if(_&&E[Sn]!=="custom"){const C=u._reconstructedRoute||"/",[b,S]=dR(u,{path:!0,method:!0,customRoute:C});_.updateName(b),_.setAttribute(Sn,S)}}return i.call(this,a,o,u,c,l)}}const oO=(t,e,n)=>{if(!t||!e||!n||Object.keys(n).length===0||!Z([n,"access",c=>c[0],"optionalAccess",c=>c.offset]))return;const r=n.sort((c,l)=>c.offset-l.offset),s=new RegExp(e,`${e.flags}d`).exec(t);if(!s||!s.indices)return;const[,...a]=s.indices;if(a.length!==r.length)return;let o=t,u=0;return a.forEach((c,l)=>{if(c){const[d,f]=c,h=o.substring(0,d-u),p=`:${r[l].name}`,g=o.substring(f-u);o=h+p+g,u=u+(f-d-p.length)}}),o};function uO(t){let e=Z([t,"access",a=>a.route,"optionalAccess",a=>a.path]);const n=X_(e),r=Array.isArray(e);if(!e){const[a]=ge.process.versions.node.split(".").map(Number);a>=16&&(e=oO(t.path,t.regexp,t.keys))}if(!e)return{isRegex:n,isArray:r,numExtraSegments:0};const i=r?Math.max(cO(e)-Ma(t.path||""),0):0;return{layerRoutePath:lO(r,e),isRegex:n,isArray:r,numExtraSegments:i}}function cO(t){return t.reduce((e,n)=>e+Ma(n.toString()),0)}function lO(t,e){return t?e.map(n=>n.toString()).join(","):e&&e.toString()}function dO(t,e,n){const r=Da(t||""),i=Z([r,"optionalAccess",u=>u.split,"call",u=>u("/"),"access",u=>u.filter,"call",u=>u(c=>!!c)]);let s=0;const a=Z([e,"optionalAccess",u=>u.split,"call",u=>u("/"),"access",u=>u.filter,"call",u=>u(c=>!!c),"access",u=>u.length])||0;return Z([n,"optionalAccess",u=>u.split,"call",u=>u("/"),"access",u=>u.filter,"call",u=>u(c=>Z([i,"optionalAccess",l=>l[a+s]])===c?(s+=1,!0):!1),"access",u=>u.join,"call",u=>u("/")])}class vo{static __initStatic(){this.id="Postgres"}constructor(e={}){this.name=vo.id,this._usePgNative=!!e.usePgNative,this._module=e.module}loadDependency(){return this._module=this._module||Zn("pg")}setupOnce(e,n){if(or(n)){z&&D.log("Postgres Integration is skipped because of instrumenter configuration.");return}const r=this.loadDependency();if(!r){z&&D.error("Postgres Integration was unable to require `pg` package.");return}const i=this._usePgNative?Z([r,"access",s=>s.native,"optionalAccess",s=>s.Client]):r.Client;if(!i){z&&D.error("Postgres Integration was unable to access 'pg-native' bindings.");return}tt(i.prototype,"query",function(s){return function(a,o,u){const l=n().getScope().getSpan(),d={"db.system":"postgresql"};try{this.database&&(d["db.name"]=this.database),this.host&&(d["server.address"]=this.host),this.port&&(d["server.port"]=this.port),this.user&&(d["db.user"]=this.user)}catch{}const f=Z([l,"optionalAccess",p=>p.startChild,"call",p=>p({description:typeof a=="string"?a:a.text,op:"db",origin:"auto.db.postgres",data:d})]);if(typeof u=="function")return s.call(this,a,o,function(p,g){Z([f,"optionalAccess",y=>y.end,"call",y=>y()]),u(p,g)});if(typeof o=="function")return s.call(this,a,function(p,g){Z([f,"optionalAccess",y=>y.end,"call",y=>y()]),o(p,g)});const h=typeof o<"u"?s.call(this,a,o):s.call(this,a);return On(h)?h.then(p=>(Z([f,"optionalAccess",g=>g.end,"call",g=>g()]),p)):(Z([f,"optionalAccess",p=>p.end,"call",p=>p()]),h)}})}}vo.__initStatic();class bo{static __initStatic(){this.id="Mysql"}constructor(){this.name=bo.id}loadDependency(){return this._module=this._module||Zn("mysql/lib/Connection.js")}setupOnce(e,n){if(or(n)){z&&D.log("Mysql Integration is skipped because of instrumenter configuration.");return}const r=this.loadDependency();if(!r){z&&D.error("Mysql Integration was unable to require `mysql` package.");return}let i;try{r.prototype.connect=new Proxy(r.prototype.connect,{apply(o,u,c){return i||(i=u.config),o.apply(u,c)}})}catch{z&&D.error("Mysql Integration was unable to instrument `mysql` config.")}function s(){return i?{"server.address":i.host,"server.port":i.port,"db.user":i.user}:{}}function a(o){if(!o)return;const u=s();Object.keys(u).forEach(c=>{o.setAttribute(c,u[c])}),o.end()}tt(r,"createQuery",function(o){return function(u,c,l){const f=n().getScope().getSpan(),h=Z([f,"optionalAccess",g=>g.startChild,"call",g=>g({description:typeof u=="string"?u:u.sql,op:"db",origin:"auto.db.mysql",data:{"db.system":"mysql"}})]);if(typeof l=="function")return o.call(this,u,c,function(g,y,m){a(h),l(g,y,m)});if(typeof c=="function")return o.call(this,u,function(g,y,m){a(h),c(g,y,m)});const p=o.call(this,u,c);return p.on("end",()=>{a(h)}),p}})}}bo.__initStatic();const fO=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],hO={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]};function pO(t){return t&&typeof t=="object"&&t.once&&typeof t.once=="function"}class So{static __initStatic(){this.id="Mongo"}constructor(e={}){this.name=So.id,this._operations=Array.isArray(e.operations)?e.operations:fO,this._describeOperations="describeOperations"in e?e.describeOperations:!0,this._useMongoose=!!e.useMongoose}loadDependency(){const e=this._useMongoose?"mongoose":"mongodb";return this._module=this._module||Zn(e)}setupOnce(e,n){if(or(n)){z&&D.log("Mongo Integration is skipped because of instrumenter configuration.");return}const r=this.loadDependency();if(!r){const i=this._useMongoose?"mongoose":"mongodb";z&&D.error(`Mongo Integration was unable to require \`${i}\` package.`);return}this._instrumentOperations(r.Collection,this._operations,n)}_instrumentOperations(e,n,r){n.forEach(i=>this._patchOperation(e,i,r))}_patchOperation(e,n,r){if(!(n in e.prototype))return;const i=this._getSpanContextFromOperationArguments.bind(this);tt(e.prototype,n,function(s){return function(...a){const o=a[a.length-1],u=r(),c=u.getScope(),l=u.getClient(),d=c.getSpan(),f=Z([l,"optionalAccess",p=>p.getOptions,"call",p=>p(),"access",p=>p.sendDefaultPii]);if(typeof o!="function"||n==="mapReduce"&&a.length===2){const p=Z([d,"optionalAccess",y=>y.startChild,"call",y=>y(i(this,n,a,f))]),g=s.call(this,...a);if(On(g))return g.then(y=>(Z([p,"optionalAccess",m=>m.end,"call",m=>m()]),y));if(pO(g)){const y=g;try{y.once("close",()=>{Z([p,"optionalAccess",m=>m.end,"call",m=>m()])})}catch{Z([p,"optionalAccess",v=>v.end,"call",v=>v()])}return y}else return Z([p,"optionalAccess",y=>y.end,"call",y=>y()]),g}const h=Z([d,"optionalAccess",p=>p.startChild,"call",p=>p(i(this,n,a.slice(0,-1)))]);return s.call(this,...a.slice(0,-1),function(p,g){Z([h,"optionalAccess",y=>y.end,"call",y=>y()]),o(p,g)})}})}_getSpanContextFromOperationArguments(e,n,r,i=!1){const s={"db.system":"mongodb","db.name":e.dbName,"db.operation":n,"db.mongodb.collection":e.collectionName},a={op:"db",origin:"auto.db.mongo",description:n,data:s},o=hO[n],u=Array.isArray(this._describeOperations)?this._describeOperations.includes(n):this._describeOperations;if(!o||!u||!i)return a;try{if(n==="mapReduce"){const[c,l]=r;s[o[0]]=typeof c=="string"?c:c.name||"<anonymous>",s[o[1]]=typeof l=="string"?l:l.name||"<anonymous>"}else for(let c=0;c<o.length;c++)s[`db.mongodb.${o[c]}`]=JSON.stringify(r[c])}catch{}return a}}So.__initStatic();function gO(t){return!!t&&!!t.$use}class Eo{static __initStatic(){this.id="Prisma"}constructor(e={}){if(this.name=Eo.id,gO(e.client)&&!e.client._sentryInstrumented){Aa(e.client,"_sentryInstrumented",!0);const n={};try{const r=e.client._engineConfig;if(r){const{activeProvider:i,clientVersion:s}=r;i&&(n["db.system"]=i),s&&(n["db.prisma.version"]=s)}}catch{}e.client.$use((r,i)=>{if(or(sn))return i(r);const s=r.action,a=r.model;return zR({name:a?`${a} ${s}`:s,onlyIfParent:!0,op:"db.prisma",attributes:{[Vn]:"auto.db.prisma"},data:{...n,"db.operation":s}},()=>i(r))})}else z&&D.warn("Unsupported Prisma client provided to PrismaIntegration. Provided client:",e.client)}setupOnce(){}}Eo.__initStatic();class To{static __initStatic(){this.id="GraphQL"}constructor(){this.name=To.id}loadDependency(){return this._module=this._module||Zn("graphql/execution/execute.js")}setupOnce(e,n){if(or(n)){z&&D.log("GraphQL Integration is skipped because of instrumenter configuration.");return}const r=this.loadDependency();if(!r){z&&D.error("GraphQL Integration was unable to require graphql/execution package.");return}tt(r,"execute",function(i){return function(...s){const a=n().getScope(),o=a.getSpan(),u=Z([o,"optionalAccess",l=>l.startChild,"call",l=>l({description:"execute",op:"graphql.execute",origin:"auto.graphql.graphql"})]);Z([a,"optionalAccess",l=>l.setSpan,"call",l=>l(u)]);const c=i.call(this,...s);return On(c)?c.then(l=>(Z([u,"optionalAccess",d=>d.end,"call",d=>d()]),Z([a,"optionalAccess",d=>d.setSpan,"call",d=>d(o)]),l)):(Z([u,"optionalAccess",l=>l.end,"call",l=>l()]),Z([a,"optionalAccess",l=>l.setSpan,"call",l=>l(o)]),c)}})}}To.__initStatic();class Io{static __initStatic(){this.id="Apollo"}constructor(e={useNestjs:!1}){this.name=Io.id,this._useNest=!!e.useNestjs}loadDependency(){return this._useNest?this._module=this._module||Zn("@nestjs/graphql"):this._module=this._module||Zn("apollo-server-core"),this._module}setupOnce(e,n){if(or(n)){z&&D.log("Apollo Integration is skipped because of instrumenter configuration.");return}if(this._useNest){const r=this.loadDependency();if(!r){z&&D.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package.");return}tt(r.GraphQLFactory.prototype,"mergeWithSchema",function(i){return function(...s){return tt(this.resolversExplorerService,"explore",function(a){return function(){const o=qu(a.call(this));return Zf(o,n)}}),i.call(this,...s)}})}else{const r=this.loadDependency();if(!r){z&&D.error("Apollo Integration was unable to require apollo-server-core package.");return}tt(r.ApolloServerBase.prototype,"constructSchema",function(i){return function(){if(!this.config.resolvers)return z&&(this.config.schema?(D.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),D.warn()):this.config.modules&&D.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),D.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),i.call(this);const s=qu(this.config.resolvers);return this.config.resolvers=Zf(s,n),i.call(this)}})}}}Io.__initStatic();function Zf(t,e){return t.map(n=>(Object.keys(n).forEach(r=>{Object.keys(n[r]).forEach(i=>{typeof n[r][i]=="function"&&mO(n,r,i,e)})}),n))}function mO(t,e,n,r){tt(t[e],n,function(i){return function(...s){const o=r().getScope().getSpan(),u=Z([o,"optionalAccess",l=>l.startChild,"call",l=>l({description:`${e}.${n}`,op:"graphql.resolve",origin:"auto.graphql.apollo"})]),c=i.call(this,...s);return On(c)?c.then(l=>(Z([u,"optionalAccess",d=>d.end,"call",d=>d()]),l)):(Z([u,"optionalAccess",l=>l.end,"call",l=>l()]),c)}})}const K=ge;function _O(){K.document?K.document.addEventListener("visibilitychange",()=>{const t=er();if(K.document.hidden&&t){const e="cancelled",{op:n,status:r}=Xe(t);z&&D.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.end()}}):z&&D.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const cs=(t,e,n)=>{let r,i;return s=>{e.value>=0&&(s||n)&&(i=e.value-(r||0),(i||r===void 0)&&(r=e.value,e.delta=i,t(e)))}},yO=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,vO=()=>{const t=K.performance.timing,e=K.performance.navigation.type,n={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(const r in t)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(t[r]-t.navigationStart,0));return n},wo=()=>K.__WEB_VITALS_POLYFILL__?K.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||vO()):K.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],ml=()=>{const t=wo();return t&&t.activationStart||0},ls=(t,e)=>{const n=wo();let r="navigate";return n&&(K.document&&K.document.prerendering||ml()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:yO(),navigationType:r}},ui=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(i=>{e(i.getEntries())});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},ds=(t,e)=>{const n=r=>{(r.type==="pagehide"||K.document.visibilityState==="hidden")&&(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};K.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},bO=(t,e={})=>{const n=ls("CLS",0);let r,i=0,s=[];const a=u=>{u.forEach(c=>{if(!c.hadRecentInput){const l=s[0],d=s[s.length-1];i&&s.length!==0&&c.startTime-d.startTime<1e3&&c.startTime-l.startTime<5e3?(i+=c.value,s.push(c)):(i=c.value,s=[c]),i>n.value&&(n.value=i,n.entries=s,r&&r())}})},o=ui("layout-shift",a);if(o){r=cs(t,n,e.reportAllChanges);const u=()=>{a(o.takeRecords()),r(!0)};return ds(u),u}};let Na=-1;const SO=()=>{K.document&&K.document.visibilityState&&(Na=K.document.visibilityState==="hidden"&&!K.document.prerendering?0:1/0)},EO=()=>{ds(({timeStamp:t})=>{Na=t},!0)},_l=()=>(Na<0&&(SO(),EO()),{get firstHiddenTime(){return Na}}),TO=t=>{const e=_l(),n=ls("FID");let r;const i=o=>{o.startTime<e.firstHiddenTime&&(n.value=o.processingStart-o.startTime,n.entries.push(o),r(!0))},s=o=>{o.forEach(i)},a=ui("first-input",s);r=cs(t,n),a&&ds(()=>{s(a.takeRecords()),a.disconnect()},!0)};let yy=0,Qo=1/0,zs=0;const IO=t=>{t.forEach(e=>{e.interactionId&&(Qo=Math.min(Qo,e.interactionId),zs=Math.max(zs,e.interactionId),yy=zs?(zs-Qo)/7+1:0)})};let Zu;const wO=()=>Zu?yy:performance.interactionCount||0,CO=()=>{"interactionCount"in performance||Zu||(Zu=ui("event",IO,{type:"event",buffered:!0,durationThreshold:0}))},vy=()=>wO(),eh=10,Yt=[],Zo={},th=t=>{const e=Yt[Yt.length-1],n=Zo[t.interactionId];if(n||Yt.length<eh||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{const r={id:t.interactionId,latency:t.duration,entries:[t]};Zo[r.id]=r,Yt.push(r)}Yt.sort((r,i)=>i.latency-r.latency),Yt.splice(eh).forEach(r=>{delete Zo[r.id]})}},kO=()=>{const t=Math.min(Yt.length-1,Math.floor(vy()/50));return Yt[t]},xO=(t,e)=>{e=e||{},CO();const n=ls("INP");let r;const i=a=>{a.forEach(u=>{u.interactionId&&th(u),u.entryType==="first-input"&&!Yt.some(l=>l.entries.some(d=>u.duration===d.duration&&u.startTime===d.startTime))&&th(u)});const o=kO();o&&o.latency!==n.value&&(n.value=o.latency,n.entries=o.entries,r())},s=ui("event",i,{durationThreshold:e.durationThreshold||40});r=cs(t,n,e.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),ds(()=>{i(s.takeRecords()),n.value<0&&vy()>0&&(n.value=0,n.entries=[]),r(!0)}))},nh={},RO=t=>{const e=_l(),n=ls("LCP");let r;const i=a=>{const o=a[a.length-1];if(o){const u=Math.max(o.startTime-ml(),0);u<e.firstHiddenTime&&(n.value=u,n.entries=[o],r())}},s=ui("largest-contentful-paint",i);if(s){r=cs(t,n);const a=()=>{nh[n.id]||(i(s.takeRecords()),s.disconnect(),nh[n.id]=!0,r(!0))};return["keydown","click"].forEach(o=>{K.document&&addEventListener(o,a,{once:!0,capture:!0})}),ds(a,!0),a}},ec=t=>{K.document&&(K.document.prerendering?addEventListener("prerenderingchange",()=>ec(t),!0):K.document.readyState!=="complete"?addEventListener("load",()=>ec(t),!0):setTimeout(t,0))},OO=(t,e)=>{e=e||{};const n=ls("TTFB"),r=cs(t,n,e.reportAllChanges);ec(()=>{const i=wo();if(i){if(n.value=Math.max(i.responseStart-ml(),0),n.value<0||n.value>performance.now())return;n.entries=[i],r(!0)}})},Di={},Pa={};let by,Sy,Ey,Ty,Iy;function AO(t,e=!1){return fs("cls",t,PO,by,e)}function DO(t,e=!1){return fs("lcp",t,UO,Ey,e)}function MO(t){return fs("ttfb",t,FO,Ty)}function LO(t){return fs("fid",t,$O,Sy)}function NO(t){return fs("inp",t,BO,Iy)}function ji(t,e){return wy(t,e),Pa[t]||(HO(t),Pa[t]=!0),Cy(t,e)}function ci(t,e){const n=Di[t];if(!(!n||!n.length))for(const r of n)try{r(e)}catch(i){z&&D.error(`Error while triggering instrumentation handler.
Type: ${t}
Name: ${Z_(r)}
Error:`,i)}}function PO(){return bO(t=>{ci("cls",{metric:t}),by=t},{reportAllChanges:!0})}function $O(){return TO(t=>{ci("fid",{metric:t}),Sy=t})}function UO(){return RO(t=>{ci("lcp",{metric:t}),Ey=t})}function FO(){return OO(t=>{ci("ttfb",{metric:t}),Ty=t})}function BO(){return xO(t=>{ci("inp",{metric:t}),Iy=t})}function fs(t,e,n,r,i=!1){wy(t,e);let s;return Pa[t]||(s=n(),Pa[t]=!0),r&&e({metric:r}),Cy(t,e,i?s:void 0)}function HO(t){const e={};t==="event"&&(e.durationThreshold=0),ui(t,n=>{ci(t,{entries:n})},e)}function wy(t,e){Di[t]=Di[t]||[],Di[t].push(e)}function Cy(t,e,n){return()=>{n&&n();const r=Di[t];if(!r)return;const i=r.indexOf(e);i!==-1&&r.splice(i,1)}}function eu(t){return typeof t=="number"&&isFinite(t)}function Wr(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}const jO=2147483647;function Le(t){return t/1e3}function yl(){return K.addEventListener&&K.performance}let rh=0,Se={},Rt,Mi;function GO(){const t=yl();if(t&&ft){t.mark&&K.performance.mark("sentry-tracing-init");const e=YO(),n=VO(),r=KO(),i=XO();return()=>{e(),n(),r(),i()}}return()=>{}}function zO(){ji("longtask",({entries:t})=>{for(const e of t){const n=er();if(!n)return;const r=Le(ft+e.startTime),i=Le(e.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i})}})}function WO(){ji("event",({entries:t})=>{for(const e of t){const n=er();if(!n)return;if(e.name==="click"){const r=Le(ft+e.startTime),i=Le(e.duration),s={description:Oa(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+i},a=Hx(e.target);a&&(s.attributes={"ui.component_name":a}),n.startChild(s)}}})}function qO(t,e){if(yl()&&ft){const r=JO(t,e);return()=>{r()}}return()=>{}}function VO(){return AO(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(z&&D.log("[Measurements] Adding CLS"),Se.cls={value:t.value,unit:""},Mi=e)},!0)}function KO(){return DO(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(z&&D.log("[Measurements] Adding LCP"),Se.lcp={value:t.value,unit:"millisecond"},Rt=e)},!0)}function YO(){return LO(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=Le(ft),r=Le(e.startTime);z&&D.log("[Measurements] Adding FID"),Se.fid={value:t.value,unit:"millisecond"},Se["mark.fid"]={value:n+r,unit:"second"}})}function XO(){return MO(({metric:t})=>{t.entries[t.entries.length-1]&&(z&&D.log("[Measurements] Adding TTFB"),Se.ttfb={value:t.value,unit:"millisecond"})})}const ih={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 JO(t,e){return NO(({metric:n})=>{if(n.value===void 0)return;const r=n.entries.find(_=>_.duration===n.value&&ih[_.name]!==void 0),i=si();if(!r||!i)return;const s=ih[r.name],a=i.getOptions(),o=Le(ft+r.startTime),u=Le(n.value),c=r.interactionId!==void 0?t[r.interactionId]:void 0;if(c===void 0)return;const{routeName:l,parentContext:d,activeTransaction:f,user:h,replayId:p}=c,g=h!==void 0?h.email||h.id||h.ip_address:void 0,y=f!==void 0?f.getProfileId():void 0,m=new _o({startTimestamp:o,endTimestamp:o+u,op:`ui.interaction.${s}`,name:Oa(r.target),attributes:{release:a.release,environment:a.environment,transaction:l,...g!==void 0&&g!==""?{user:g}:{},...y!==void 0?{profile_id:y}:{},...p!==void 0?{replay_id:p}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),v=aA(d,a,e);if(v&&Math.random()<v){const _=m?tO([m],i.getDsn()):void 0,E=i&&i.getTransport();E&&_&&E.send(_).then(null,C=>{z&&D.error("Error while sending interaction:",C)});return}})}function QO(t){const e=yl();if(!e||!K.performance.getEntries||!ft)return;z&&D.log("[Tracing] Adding & adjusting spans using Performance API");const n=Le(ft),r=e.getEntries(),{op:i,start_timestamp:s}=Xe(t);if(r.slice(rh).forEach(a=>{const o=Le(a.startTime),u=Le(a.duration);if(!(t.op==="navigation"&&s&&n+o<s))switch(a.entryType){case"navigation":{eA(t,a,n);break}case"mark":case"paint":case"measure":{ZO(t,a,o,u,n);const c=_l(),l=a.startTime<c.firstHiddenTime;a.name==="first-paint"&&l&&(z&&D.log("[Measurements] Adding FP"),Se.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&l&&(z&&D.log("[Measurements] Adding FCP"),Se.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{nA(t,a,a.name,o,u,n);break}}}),rh=Math.max(r.length-1,0),rA(t),i==="pageload"){sA(Se),["fcp","fp","lcp"].forEach(o=>{if(!Se[o]||!s||n>=s)return;const u=Se[o].value,c=n+Le(u),l=Math.abs((c-s)*1e3),d=l-u;z&&D.log(`[Measurements] Normalized ${o} from ${u} to ${l} (${d})`),Se[o].value=l});const a=Se["mark.fid"];a&&Se.fid&&(Wr(t,{description:"first input delay",endTimestamp:a.value+Le(Se.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete Se["mark.fid"]),"fcp"in Se||delete Se.cls,Object.keys(Se).forEach(o=>{eO(o,Se[o].value,Se[o].unit)}),iA(t)}Rt=void 0,Mi=void 0,Se={}}function ZO(t,e,n,r,i){const s=i+n,a=s+r;return Wr(t,{description:e.name,endTimestamp:a,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s}),s}function eA(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Ws(t,e,r,n)}),Ws(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),Ws(t,e,"fetch",n,"cache","domainLookupStart"),Ws(t,e,"domainLookup",n,"DNS"),tA(t,e,n)}function Ws(t,e,n,r,i,s){const a=s?e[s]:e[`${n}End`],o=e[`${n}Start`];!o||!a||Wr(t,{op:"browser",origin:"auto.browser.browser.metrics",description:i||n,startTimestamp:r+Le(o),endTimestamp:r+Le(a)})}function tA(t,e,n){e.responseEnd&&(Wr(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+Le(e.requestStart),endTimestamp:n+Le(e.responseEnd)}),Wr(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+Le(e.responseStart),endTimestamp:n+Le(e.responseEnd)}))}function nA(t,e,n,r,i,s){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const a=ho(n),o={};tu(o,e,"transferSize","http.response_transfer_size"),tu(o,e,"encodedBodySize","http.response_content_length"),tu(o,e,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in e&&(o["resource.render_blocking_status"]=e.renderBlockingStatus),a.protocol&&(o["url.scheme"]=a.protocol.split(":").pop()),a.host&&(o["server.address"]=a.host),o["url.same_origin"]=n.includes(K.location.origin);const u=s+r,c=u+i;Wr(t,{description:n.replace(K.location.origin,""),endTimestamp:c,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:u,data:o})}function rA(t){const e=K.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),eu(n.rtt)&&(Se["connection.rtt"]={value:n.rtt,unit:"millisecond"})),eu(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),eu(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}function iA(t){Rt&&(z&&D.log("[Measurements] Adding LCP Data"),Rt.element&&t.setTag("lcp.element",Oa(Rt.element)),Rt.id&&t.setTag("lcp.id",Rt.id),Rt.url&&t.setTag("lcp.url",Rt.url.trim().slice(0,200)),t.setTag("lcp.size",Rt.size)),Mi&&Mi.sources&&(z&&D.log("[Measurements] Adding CLS Data"),Mi.sources.forEach((e,n)=>t.setTag(`cls.source.${n+1}`,Oa(e.node))))}function tu(t,e,n,r){const i=e[n];i!=null&&i<jO&&(t[r]=i)}function sA(t){const e=wo();if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(z&&D.log("[Measurements] Adding TTFB Request Time"),t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function aA(t,e,n){if(!oi(e))return!1;let r;return t!==void 0&&typeof e.tracesSampler=="function"?r=e.tracesSampler({transactionContext:t,name:t.name,parentSampled:t.parentSampled,attributes:{...t.data,...t.attributes},location:K.location}):t!==void 0&&t.sampled!==void 0?r=t.sampled:typeof e.tracesSampleRate<"u"?r=e.tracesSampleRate:r=1,my(r)?r===!0?n:r===!1?0:r*n:(z&&D.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function oA(t,e,n,r,i="auto.http.browser"){if(!oi()||!t.fetchData)return;const s=e(t.fetchData.url);if(t.endTimestamp&&s){const h=t.fetchData.__span;if(!h)return;const p=r[h];p&&(lA(p,t),delete r[h]);return}const a=ai(),o=si(),{method:u,url:c}=t.fetchData,l=cA(c),d=l?ho(l).host:void 0,f=s?uy({name:`${u} ${c}`,onlyIfParent:!0,attributes:{url:c,type:"fetch","http.method":u,"http.url":l,"server.address":d,[Vn]:i},op:"http.client"}):void 0;if(f&&(t.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(t.fetchData.url)&&o){const h=t.args[0];t.args[1]=t.args[1]||{};const p=t.args[1];p.headers=uA(h,o,a,p,f)}return f}function uA(t,e,n,r,i){const s=i||n.getSpan(),a=pl(),{traceId:o,spanId:u,sampled:c,dsc:l}={...a.getPropagationContext(),...n.getPropagationContext()},d=s?go(s):ll(o,u,c),f=ny(l||(s?zr(s):hl(o,e,n))),h=r.headers||(typeof Request<"u"&&Ff(t,Request)?t.headers:void 0);if(h)if(typeof Headers<"u"&&Ff(h,Headers)){const p=new Headers(h);return p.append("sentry-trace",d),f&&p.append(Yu,f),p}else if(Array.isArray(h)){const p=[...h,["sentry-trace",d]];return f&&p.push([Yu,f]),p}else{const p="baggage"in h?h.baggage:void 0,g=[];return Array.isArray(p)?g.push(...p):p&&g.push(p),f&&g.push(f),{...h,"sentry-trace":d,baggage:g.length>0?g.join(","):void 0}}else return{"sentry-trace":d,baggage:f}}function cA(t){try{return new URL(t).href}catch{return}}function lA(t,e){if(e.response){gl(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus("internal_error");t.end()}const tc=["localhost",/^\/(?!\/)/],nc={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:tc,tracePropagationTargets:tc};function dA(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,enableHTTPTimings:a}={traceFetch:nc.traceFetch,traceXHR:nc.traceXHR,...t},o=typeof s=="function"?s:l=>!0,u=l=>gA(l,r||i),c={};e&&Yx(l=>{const d=oA(l,o,u,c);if(d){const f=ky(l.fetchData.url),h=f?ho(f).host:void 0;d.setAttributes({"http.url":f,"server.address":h})}a&&d&&sh(d)}),n&&aR(l=>{const d=mA(l,o,u,c);a&&d&&sh(d)})}function fA(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function sh(t){const{url:e}=Xe(t).data||{};if(!e||typeof e!="string")return;const n=ji("resource",({entries:r})=>{r.forEach(i=>{fA(i)&&i.name.endsWith(e)&&(pA(i).forEach(a=>t.setAttribute(...a)),setTimeout(n))})})}function hA(t){let e="unknown",n="unknown",r="";for(const i of t){if(i==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(i))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=i}return r===t&&(e=r),{name:e,version:n}}function wt(t=0){return((ft||performance.timeOrigin)+t)/1e3}function pA(t){const{name:e,version:n}=hA(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),ft?[...r,["http.request.redirect_start",wt(t.redirectStart)],["http.request.fetch_start",wt(t.fetchStart)],["http.request.domain_lookup_start",wt(t.domainLookupStart)],["http.request.domain_lookup_end",wt(t.domainLookupEnd)],["http.request.connect_start",wt(t.connectStart)],["http.request.secure_connection_start",wt(t.secureConnectionStart)],["http.request.connection_end",wt(t.connectEnd)],["http.request.request_start",wt(t.requestStart)],["http.request.response_start",wt(t.responseStart)],["http.request.response_end",wt(t.responseEnd)]]:r}function gA(t,e){return $x(t,e||tc)}function mA(t,e,n,r){const i=t.xhr,s=i&&i[Ti];if(!oi()||!i||i.__sentry_own_request__||!s)return;const a=e(s.url);if(t.endTimestamp&&a){const h=i.__sentry_xhr_span_id__;if(!h)return;const p=r[h];p&&s.status_code!==void 0&&(gl(p,s.status_code),p.end(),delete r[h]);return}const o=ai(),u=pl(),c=ky(s.url),l=c?ho(c).host:void 0,d=a?uy({name:`${s.method} ${s.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":s.method,"http.url":c,url:s.url,"server.address":l,[Vn]:"auto.http.browser"},op:"http.client"}):void 0;d&&(i.__sentry_xhr_span_id__=d.spanContext().spanId,r[i.__sentry_xhr_span_id__]=d);const f=si();if(i.setRequestHeader&&n(s.url)&&f){const{traceId:h,spanId:p,sampled:g,dsc:y}={...u.getPropagationContext(),...o.getPropagationContext()},m=d?go(d):ll(h,p,g),v=ny(y||(d?zr(d):hl(h,f,o)));_A(i,m,v)}return d}function _A(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(Yu,n)}catch{}}function ky(t){try{return new URL(t,K.location.origin).href}catch{return}}function yA(t,e=!0,n=!0){if(!K||!K.location){z&&D.warn("Could not initialize routing instrumentation due to invalid location");return}let r=K.location.href,i;e&&(i=t({name:K.location.pathname,startTimestamp:ft?ft/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&rR(({to:s,from:a})=>{if(a===void 0&&r&&r.indexOf(s)!==-1){r=void 0;return}a!==s&&(r=void 0,i&&(z&&D.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.end()),i=t({name:K.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const vA="BrowserTracing",bA={...ia,markBackgroundTransactions:!0,routingInstrumentation:yA,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...nc},ah=10;let SA=class{constructor(e){this.name=vA,this._hasSetTracePropagationTargets=!1,_y(),z&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...bA,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=GO(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&qO(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&zO(),this.options._experiments.enableInteractions&&WO(),this._latestRoute={name:void 0,context:void 0}}setupOnce(e,n){this._getCurrentHub=n;const i=n().getClient(),s=i&&i.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:o,startTransactionOnPageLoad:u,markBackgroundTransactions:c,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:h,_experiments:p}=this.options,g=s&&s.tracePropagationTargets,y=g||this.options.tracePropagationTargets;z&&this._hasSetTracePropagationTargets&&g&&D.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a(m=>{const v=this._createRouteTransaction(m);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(v,m,n),v},u,o),c&&_O(),p.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),dA({traceFetch:l,traceXHR:d,tracePropagationTargets:y,shouldCreateSpanForRequest:f,enableHTTPTimings:h})}_createRouteTransaction(e){if(!this._getCurrentHub){z&&D.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:i,finalTimeout:s,heartbeatInterval:a}=this.options,o=e.op==="pageload";let u;if(o){const h=o?oh("sentry-trace"):"",p=o?oh("baggage"):void 0,{traceId:g,dsc:y,parentSpanId:m,sampled:v}=vR(h,p);u={traceId:g,parentSpanId:m,parentSampled:v,...e,metadata:{...e.metadata,dynamicSamplingContext:y},trimEnd:!0}}else u={trimEnd:!0,...e};const c=typeof r=="function"?r(u):u,l=c===void 0?{...u,sampled:!1}:c;l.metadata=l.name!==u.name?{...l.metadata,source:"custom"}:l.metadata,this._latestRoute.name=l.name,this._latestRoute.context=l,l.sampled===!1&&z&&D.log(`[Tracing] Will not send ${l.op} transaction because of beforeNavigate.`),z&&D.log(`[Tracing] Starting ${l.op} transaction on scope`);const{location:d}=K,f=Jf(n,l,i,s,!0,{location:d},a,o);return o&&K.document&&(K.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(K.document.readyState)&&f.sendAutoFinishSignal()}),["interactive","complete"].includes(K.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback(h=>{this._collectWebVitals(),QO(h)}),f}_registerInteractionListener(){let e;const n=()=>{const{idleTimeout:r,finalTimeout:i,heartbeatInterval:s}=this.options,a="ui.action.click",o=er();if(o&&o.op&&["navigation","pageload"].includes(o.op)){z&&D.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.end(),e=void 0),!this._getCurrentHub){z&&D.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){z&&D.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}const u=this._getCurrentHub(),{location:c}=K,l={name:this._latestRoute.name,op:a,trimEnd:!0,data:{[Sn]:this._latestRoute.context?EA(this._latestRoute.context):"url"}};e=Jf(u,l,r,i,!0,{location:c},s)};["click"].forEach(r=>{K.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){const e=({entries:n})=>{const r=si(),i=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,s=i!==void 0?i.getReplayId():void 0,a=er(),o=ai(),u=o!==void 0?o.getUser():void 0;n.forEach(c=>{if(TA(c)){const l=c.interactionId;if(l===void 0)return;const d=this._interactionIdToRouteNameMapping[l],f=c.duration,h=c.startTime,p=Object.keys(this._interactionIdToRouteNameMapping),g=p.length>0?p.reduce((y,m)=>this._interactionIdToRouteNameMapping[y].duration<this._interactionIdToRouteNameMapping[m].duration?y:m):void 0;if(c.entryType==="first-input"&&p.map(m=>this._interactionIdToRouteNameMapping[m]).some(m=>m.duration===f&&m.startTime===h)||!l)return;if(d)d.duration=Math.max(d.duration,f);else if(p.length<ah||g===void 0||f>this._interactionIdToRouteNameMapping[g].duration){const y=this._latestRoute.name,m=this._latestRoute.context;y&&m&&(g&&Object.keys(this._interactionIdToRouteNameMapping).length>=ah&&delete this._interactionIdToRouteNameMapping[g],this._interactionIdToRouteNameMapping[l]={routeName:y,duration:f,parentContext:m,user:u,activeTransaction:a,replayId:s,startTime:h})}}})};ji("event",e),ji("first-input",e)}};function oh(t){const e=Bx(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}function EA(t){const e=t.attributes&&t.attributes[Sn],n=t.data&&t.data[Sn],r=t.metadata&&t.metadata.source;return e||n||r}function TA(t){return"duration"in t}function IA(){const t=ar();if(!t.__SENTRY__)return;const e={mongodb(){const r=qn(module,"./node/integrations/mongo");return new r.Mongo},mongoose(){const r=qn(module,"./node/integrations/mongo");return new r.Mongo},mysql(){const r=qn(module,"./node/integrations/mysql");return new r.Mysql},pg(){const r=qn(module,"./node/integrations/postgres");return new r.Postgres}},n=Object.keys(e).filter(r=>!!Zn(r)).map(r=>{try{return e[r]()}catch{return}}).filter(r=>r);n.length>0&&(t.__SENTRY__.integrations=[...t.__SENTRY__.integrations||[],...n])}function wA(){_y(),lR()&&IA()}const CA=SA,dN={BrowserTracing:CA,Apollo:Io,Express:yo,GraphQL:To,Mongo:So,Mysql:bo,Postgres:vo,Prisma:Eo};(typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__)&&wA();var kA={},li={},Cn={},xy=A&&A.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.StatsigInvalidArgumentError=Cn.StatsigUninitializedError=void 0;var xA=function(t){xy(e,t);function e(n){var r=t.call(this,n??"Call and wait for initialize() to finish first.")||this;return Object.setPrototypeOf(r,e.prototype),r}return e}(Error);Cn.StatsigUninitializedError=xA;var RA=function(t){xy(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e}(Error);Cn.StatsigInvalidArgumentError=RA;var $a={},hs={};Object.defineProperty(hs,"__esModule",{value:!0});var OA=function(){function t(e,n,r,i,s,a,o,u,c,l){s===void 0&&(s=[]),a===void 0&&(a=""),o===void 0&&(o=null),u===void 0&&(u=null),c===void 0&&(c=null),l===void 0&&(l=null),this.onDefaultValueFallback=null,this.name=e,this.value=JSON.parse(JSON.stringify(n??{})),this.ruleID=r??"",this.secondaryExposures=s,this.allocatedExperimentName=a,this.evaluationDetails=i,this.onDefaultValueFallback=o,this.groupName=u,this.idType=c,this.isExperimentActive=l}return t.prototype.get=function(e,n,r){var i,s,a=this.getValue(e,n);if(a==null)return n;var o=Array.isArray(n)?"array":typeof n,u=Array.isArray(a)?"array":typeof a;return r?r(a)?a:((i=this.onDefaultValueFallback)===null||i===void 0||i.call(this,this,e,o,u),n):n==null||o===u?a:((s=this.onDefaultValueFallback)===null||s===void 0||s.call(this,this,e,o,u),n)},t.prototype.getValue=function(e,n){return e==null?this.value:(n==null&&(n=null),this.value[e]==null?n:this.value[e])},t.prototype.getRuleID=function(){return this.ruleID},t.prototype.getGroupName=function(){return this.groupName},t.prototype.getIDType=function(){return this.idType},t.prototype.getName=function(){return this.name},t.prototype.getEvaluationDetails=function(){return this.evaluationDetails},t.prototype._getSecondaryExposures=function(){return this.secondaryExposures},t.prototype._getAllocatedExperimentName=function(){return this.allocatedExperimentName},t.prototype.getIsExperimentActive=function(){return this.isExperimentActive},t}();hs.default=OA;var Ry={},An={},tr={};Object.defineProperty(tr,"__esModule",{value:!0});tr.difference=tr.now=void 0;function Oy(t){return t===void 0&&(t={withPrecision:!1}),typeof performance>"u"||!performance?Date.now():t.withPrecision?performance.now():performance.now()|0}tr.now=Oy;function AA(t){return Oy()-t}tr.difference=AA;var Ua=A&&A.__assign||function(){return Ua=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ua.apply(this,arguments)};Object.defineProperty(An,"__esModule",{value:!0});An.DiagnosticsImpl=void 0;var uh=tr,Ay=function(){function t(e){var n=this,r,i,s;this.mark={overall:this.selectAction("overall"),intialize:this.selectStep("initialize"),bootstrap:this.selectStep("bootstrap"),api_call:function(a){switch(a){case"getConfig":return n.selectAction("get_config");case"getExperiment":return n.selectAction("get_experiment");case"checkGate":return n.selectAction("check_gate");case"getLayer":return n.selectAction("get_layer")}return null}},this.context="initialize",this.defaultMaxMarkers=30,this.maxMarkers={initialize:this.defaultMaxMarkers,config_sync:this.defaultMaxMarkers,event_logging:this.defaultMaxMarkers,api_call:this.defaultMaxMarkers},this.markers=(r=e.markers)!==null&&r!==void 0?r:{initialize:[],config_sync:[],event_logging:[],api_call:[]},this.disabled=(s=(i=e.options)===null||i===void 0?void 0:i.getDisableDiagnosticsLogging())!==null&&s!==void 0?s:!1}return t.prototype.setContext=function(e){this.context=e},t.prototype.selectAction=function(e,n){var r=this;return{start:function(i,s){return r.addMarker(Ua({key:e,step:n,action:"start",timestamp:(0,uh.now)({withPrecision:!0})},i??{}),s)},end:function(i,s){return r.addMarker(Ua({key:e,step:n,action:"end",timestamp:(0,uh.now)({withPrecision:!0})},i??{}),s)}}},t.prototype.selectStep=function(e){return{process:this.selectAction(e,"process"),networkRequest:this.selectAction(e,"network_request")}},t.prototype.addMarker=function(e,n){var r;if(this.disabled)return!1;var i=n??this.context;return this.maxMarkers[i]!==void 0&&this.markers[i].length>=((r=this.maxMarkers[i])!==null&&r!==void 0?r:this.defaultMaxMarkers)?!1:(this.markers[i].push(e),!0)},t.prototype.getMarkers=function(e){return this.markers[e]},t.prototype.setMaxMarkers=function(e,n){this.maxMarkers[e]=n},t.prototype.getMarkerCount=function(e){return this.markers[e].length},t.prototype.clearContext=function(e){this.markers[e]=[]},t}();An.DiagnosticsImpl=Ay;var DA=function(){function t(){}return t.initialize=function(e){this.instance=new Ay(e),this.mark=this.instance.mark,this.disabled=this.instance.disabled,this.getMarkers=this.instance.getMarkers.bind(this.instance),this.getMarkerCount=this.instance.getMarkerCount.bind(this.instance),this.setMaxMarkers=this.instance.setMaxMarkers.bind(this.instance),this.setContext=this.instance.setContext.bind(this.instance),this.clearContext=this.instance.clearContext.bind(this.instance)},t.formatError=function(e){if(e&&typeof e=="object")return{code:this.safeGetField(e,"code"),name:this.safeGetField(e,"name"),message:this.safeGetField(e,"message")}},t.safeGetField=function(e,n){if(n in e)return e[n]},t}();An.default=DA;var vl={};Object.defineProperty(vl,"__esModule",{value:!0});function MA(t){var e=t??Error("[Statsig] Error was empty"),n=e instanceof Error,r=n?e.name:"No Name",i=n?e.message:void 0,s=n?e.stack:LA(e);return{name:r,message:i,trace:s}}vl.default=MA;function LA(t){try{return JSON.stringify(t)}catch{return"[Statsig] Failed to get string for error."}}(function(t){var e=A&&A.__awaiter||function(l,d,f,h){function p(g){return g instanceof f?g:new f(function(y){y(g)})}return new(f||(f=Promise))(function(g,y){function m(E){try{_(h.next(E))}catch(C){y(C)}}function v(E){try{_(h.throw(E))}catch(C){y(C)}}function _(E){E.done?g(E.value):p(E.value).then(m,v)}_((h=h.apply(l,d||[])).next())})},n=A&&A.__generator||function(l,d){var f={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},h,p,g,y;return y={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function m(_){return function(E){return v([_,E])}}function v(_){if(h)throw new TypeError("Generator is already executing.");for(;f;)try{if(h=1,p&&(g=_[0]&2?p.return:_[0]?p.throw||((g=p.return)&&g.call(p),0):p.next)&&!(g=g.call(p,_[1])).done)return g;switch(p=0,g&&(_=[_[0]&2,g.value]),_[0]){case 0:case 1:g=_;break;case 4:return f.label++,{value:_[1],done:!1};case 5:f.label++,p=_[1],_=[0];continue;case 7:_=f.ops.pop(),f.trys.pop();continue;default:if(g=f.trys,!(g=g.length>0&&g[g.length-1])&&(_[0]===6||_[0]===2)){f=0;continue}if(_[0]===3&&(!g||_[1]>g[0]&&_[1]<g[3])){f.label=_[1];break}if(_[0]===6&&f.label<g[1]){f.label=g[1],g=_;break}if(g&&f.label<g[2]){f.label=g[2],f.ops.push(_);break}g[2]&&f.ops.pop(),f.trys.pop();continue}_=d.call(l,f)}catch(E){_=[6,E],p=0}finally{h=g=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},r=A&&A.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExceptionEndpoint=void 0;var i=Cn,s=r(An),a=r(vl);t.ExceptionEndpoint="https://statsigapi.net/v1/sdk_exception";var o=30,u=1e4,c=function(){function l(d){this.sdkKey=d,this.seen=new Set;var f=Math.floor(Math.random()*u);this.setupDiagnostics(f===0?o:0)}return l.prototype.setStatsigMetadata=function(d){this.statsigMetadata=d},l.prototype.swallow=function(d,f,h){h===void 0&&(h={}),this.capture(d,f,function(){},h)},l.prototype.capture=function(d,f,h,p){var g=this,y=p===void 0?{}:p,m=y.getExtraData,v=y.configName,_=null;try{_=this.beginMarker(d);var E=f(),C=!0;return E instanceof Promise?E.catch(function(b){return C=!1,g.onCaught(d,b,h,m)}).then(function(b){return g.endMarker(d,C,_),b}):(this.endMarker(d,!0,_,v),E)}catch(b){return this.endMarker(d,!1,_,v),this.onCaught(d,b,h,m)}},l.prototype.logError=function(d,f,h){var p=this;(function(){return e(p,void 0,void 0,function(){var g,y,m,v,_,E,C,b;return n(this,function(S){switch(S.label){case 0:return S.trys.push([0,4,,5]),typeof h!="function"?[3,2]:[4,h()];case 1:return y=S.sent(),[3,3];case 2:y=null,S.label=3;case 3:return g=y,m=(0,a.default)(f),v=m.name,_=m.trace,this.seen.has(v)?[2]:(this.seen.add(v),E=(b=this.statsigMetadata)!==null&&b!==void 0?b:{},C=JSON.stringify({tag:d,exception:v,info:_,statsigMetadata:E,extra:g??{}}),[2,fetch(t.ExceptionEndpoint,{method:"POST",headers:{"STATSIG-API-KEY":this.sdkKey,"STATSIG-SDK-TYPE":String(E.sdkType),"STATSIG-SDK-VERSION":String(E.sdkVersion),"Content-Type":"application/json; charset=UTF-8"},body:C})]);case 4:return S.sent(),[3,5];case 5:return[2]}})})})().catch(function(){})},l.prototype.setupDiagnostics=function(d){s.default.setMaxMarkers("api_call",d)},l.prototype.beginMarker=function(d){var f=s.default.mark.api_call(d);if(!f)return null;var h=s.default.getMarkerCount("api_call"),p=d+"_"+h,g=f.start({markerID:p},"api_call");return g?p:null},l.prototype.endMarker=function(d,f,h,p){var g=s.default.mark.api_call(d);!h||!g||g.end({markerID:h,success:f,configName:p},"api_call")},l.prototype.onCaught=function(d,f,h,p){if(f instanceof i.StatsigUninitializedError||f instanceof i.StatsigInvalidArgumentError)throw f;return console.error("[Statsig] An unexpected exception occurred.",f),this.logError(d,f,p),h()},l}();t.default=c})(Ry);var ps={};Object.defineProperty(ps,"__esModule",{value:!0});var NA=function(){function t(e,n,r,i,s,a,o,u,c,l){s===void 0&&(s=null),a===void 0&&(a=[]),o===void 0&&(o=[]),u===void 0&&(u=""),c===void 0&&(c=[]),l===void 0&&(l=null),this.logParameterFunction=s,this.name=e,this.value=JSON.parse(JSON.stringify(n??{})),this.ruleID=r??"",this.evaluationDetails=i,this.secondaryExposures=a,this.undelegatedSecondaryExposures=o,this.allocatedExperimentName=u,this.explicitParameters=c,this.groupName=l}return t._create=function(e,n,r,i,s,a,o,u,c,l){return s===void 0&&(s=null),a===void 0&&(a=[]),o===void 0&&(o=[]),u===void 0&&(u=""),c===void 0&&(c=[]),l===void 0&&(l=null),new t(e,n,r,i,s,a,o,u,c,l)},t.prototype.get=function(e,n,r){var i=this,s=this.value[e];if(s==null)return n;var a=function(){return i.logLayerParameterExposure(e),s};return r?r(s)?a():n:n==null||typeof s==typeof n&&Array.isArray(n)===Array.isArray(s)?a():n},t.prototype.getValue=function(e,n){n==null&&(n=null);var r=this.value[e];return r!=null&&this.logLayerParameterExposure(e),r??n},t.prototype.getRuleID=function(){return this.ruleID},t.prototype.getGroupName=function(){return this.groupName},t.prototype.getName=function(){return this.name},t.prototype.getEvaluationDetails=function(){return this.evaluationDetails},t.prototype._getSecondaryExposures=function(){return this.secondaryExposures},t.prototype._getUndelegatedSecondaryExposures=function(){return this.undelegatedSecondaryExposures},t.prototype._getAllocatedExperimentName=function(){return this.allocatedExperimentName},t.prototype._getExplicitParameters=function(){return this.explicitParameters},t.prototype._getEvaluationDetails=function(){return this.evaluationDetails},t.prototype.logLayerParameterExposure=function(e){var n;(n=this.logParameterFunction)===null||n===void 0||n.call(this,this,e)},t}();ps.default=NA;var Co={},rc=A&&A.__assign||function(){return rc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},rc.apply(this,arguments)};Object.defineProperty(Co,"__esModule",{value:!0});var PA=function(){function t(e){this.user=null,this.value=null,this.metadata=null,this.eventName=e,this.statsigMetadata={},this.time=Date.now()}return t.prototype.getName=function(){return this.eventName},t.prototype.setValue=function(e){this.value=e},t.prototype.setMetadata=function(e){this.metadata=e},t.prototype.addStatsigMetadata=function(e,n){this.statsigMetadata[e]=n},t.prototype.setUser=function(e){this.user=rc({},e),delete this.user.privateAttributes},t.prototype.setSecondaryExposures=function(e){e===void 0&&(e=[]),this.secondaryExposures=e},t.prototype.toJsonObject=function(){var e;return{eventName:this.eventName,user:this.user,value:this.value,metadata:this.metadata,time:this.time,statsigMetadata:this.statsigMetadata,secondaryExposures:(e=this.secondaryExposures)!==null&&e!==void 0?e:void 0}},t}();Co.default=PA;var bl={};const $A=zh(av);var Ae={};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.STORAGE_PREFIX=Ae.LOCAL_STORAGE_KEYS=Ae.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY=Ae.STATSIG_STABLE_ID_KEY=Ae.INTERNAL_STORE_KEY=Ae.STICKY_DEVICE_EXPERIMENTS_KEY=Ae.OVERRIDES_STORE_KEY=void 0;Ae.OVERRIDES_STORE_KEY="STATSIG_LOCAL_STORAGE_INTERNAL_STORE_OVERRIDES_V3";Ae.STICKY_DEVICE_EXPERIMENTS_KEY="STATSIG_LOCAL_STORAGE_STICKY_DEVICE_EXPERIMENTS";Ae.INTERNAL_STORE_KEY="STATSIG_LOCAL_STORAGE_INTERNAL_STORE_V4";Ae.STATSIG_STABLE_ID_KEY="STATSIG_LOCAL_STORAGE_STABLE_ID";Ae.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY="STATSIG_LOCAL_STORAGE_LOGGING_REQUEST";Ae.LOCAL_STORAGE_KEYS={STATSIG_LOCAL_STORAGE_STABLE_ID:!0,STATSIG_LOCAL_STORAGE_INTERNAL_STORE_V4:!0,STATSIG_LOCAL_STORAGE_STICKY_DEVICE_EXPERIMENTS:!0,STATSIG_LOCAL_STORAGE_INTERNAL_STORE_OVERRIDES_V3:!0,STATSIG_LOCAL_STORAGE_LOGGING_REQUEST:!0};Ae.STORAGE_PREFIX="STATSIG_LOCAL_STORAGE";var ur={};Object.defineProperty(ur,"__esModule",{value:!0});var UA=function(){function t(){}return t.getItemAsync=function(e){var n;return t.asyncStorage?(n=t.asyncStorage.getItem(e))!==null&&n!==void 0?n:null:Promise.resolve(null)},t.setItemAsync=function(e,n){return t.asyncStorage?t.asyncStorage.setItem(e,n):Promise.resolve()},t.removeItemAsync=function(e){return t.asyncStorage?t.asyncStorage.removeItem(e):Promise.resolve()},t}();ur.default=UA;var di={};Object.defineProperty(di,"__esModule",{value:!0});var nu=Ae,FA=function(){function t(){}return t.getItem=function(e){var n;try{if(this.isStorageAccessible())return window.localStorage.getItem(e)}catch{}return(n=this.fallbackSessionCache[e])!==null&&n!==void 0?n:null},t.setItem=function(e,n){try{if(this.isStorageAccessible()){window.localStorage.setItem(e,n);return}}catch{}this.fallbackSessionCache[e]=n},t.removeItem=function(e){try{if(this.isStorageAccessible()){window.localStorage.removeItem(e);return}}catch{}delete this.fallbackSessionCache[e]},t.cleanup=function(){try{if(this.isStorageAccessible(!0))for(var e in window.localStorage)typeof window.localStorage[e]=="string"&&e!=null&&(!this.disabled&&e in nu.LOCAL_STORAGE_KEYS||!this.disabled&&e.substring(0,nu.STORAGE_PREFIX.length)!==nu.STORAGE_PREFIX||window.localStorage.removeItem(e))}catch{}},t.isStorageAccessible=function(e){e===void 0&&(e=!1),this.canAccessStorageAccessible==null&&(this.canAccessStorageAccessible=typeof Storage<"u"&&typeof window<"u"&&window!=null&&window.localStorage!=null);var n=this.canAccessStorageAccessible;return(e||!this.disabled)&&n},t.disabled=!1,t.fallbackSessionCache={},t.canAccessStorageAccessible=null,t}();di.default=FA;var ko={};Object.defineProperty(ko,"__esModule",{value:!0});ko.version=void 0;ko.version="4.42.0";var BA=A&&A.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((r=r.apply(t,e||[])).next())})},HA=A&&A.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Dy=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bl,"__esModule",{value:!0});var jA=$A,qs=Ae,ru=Dy(ur),ch=Dy(di),GA=ko,zA=function(){function t(e,n,r){var i;this.platform=null,this.nativeModules=null,this.sdkType="js-client",this.reactNativeUUID=r,this.user=e,this.sdkVersion=GA.version,this.statsigMetadata={sdkType:this.sdkType,sdkVersion:this.sdkVersion};var s=n;ru.default.asyncStorage||(s=(i=s??ch.default.getItem(qs.STATSIG_STABLE_ID_KEY))!==null&&i!==void 0?i:this.getUUID()),s&&(this.statsigMetadata.stableID=s)}return t.prototype.saveStableID=function(){this.statsigMetadata.stableID!=null&&ch.default.setItem(qs.STATSIG_STABLE_ID_KEY,this.statsigMetadata.stableID)},t.prototype.initAsync=function(){return BA(this,void 0,void 0,function(){var e;return HA(this,function(n){switch(n.label){case 0:return e=this.statsigMetadata.stableID,e?[3,2]:[4,ru.default.getItemAsync(qs.STATSIG_STABLE_ID_KEY)];case 1:e=n.sent(),e=e??this.getUUID(),n.label=2;case 2:return ru.default.setItemAsync(qs.STATSIG_STABLE_ID_KEY,e).catch(function(){}),this.statsigMetadata.stableID=e,[2,this]}})})},t.prototype.getSDKType=function(){return this.sdkType},t.prototype.getSDKVersion=function(){return this.sdkVersion},t.prototype.getStatsigMetadata=function(){return this.statsigMetadata.sdkType=this.sdkType,this.statsigMetadata.sdkVersion=this.sdkVersion,this.statsigMetadata},t.prototype.getUser=function(){return this.user},t.prototype.updateUser=function(e){this.user=e},t.prototype.setSDKPackageInfo=function(e){this.sdkType=e.sdkType,this.sdkVersion=e.sdkVersion},t.prototype.setPlatform=function(e){this.platform=e,this.updateMetadataFromNativeModules()},t.prototype.setNativeModules=function(e){this.nativeModules=e,this.updateMetadataFromNativeModules()},t.prototype.updateMetadataFromNativeModules=function(){var e,n,r,i,s,a,o;this.platform==null||this.nativeModules==null||(((e=this.platform.OS)===null||e===void 0?void 0:e.toLocaleLowerCase())==="android"?this.statsigMetadata.locale=(n=this.nativeModules.I18nManager)===null||n===void 0?void 0:n.localeIdentifier:((r=this.platform.OS)===null||r===void 0?void 0:r.toLocaleLowerCase())==="ios"&&(this.statsigMetadata.locale=((s=(i=this.nativeModules.SettingsManager)===null||i===void 0?void 0:i.settings)===null||s===void 0?void 0:s.AppleLocale)||((o=(a=this.nativeModules.SettingsManager)===null||a===void 0?void 0:a.settings)===null||o===void 0?void 0:o.AppleLanguages[0])))},t.prototype.getUUID=function(){var e,n;return(n=(e=this.reactNativeUUID)===null||e===void 0?void 0:e.v4())!==null&&n!==void 0?n:(0,jA.v4)()},t.prototype.setRNDeviceInfo=function(e){var n,r,i,s,a;this.statsigMetadata.appVersion=(n=e.getVersion())!==null&&n!==void 0?n:"",this.statsigMetadata.systemVersion=(r=e.getSystemVersion())!==null&&r!==void 0?r:"",this.statsigMetadata.systemName=(i=e.getSystemName())!==null&&i!==void 0?i:"",this.statsigMetadata.deviceModelName=(s=e.getModel())!==null&&s!==void 0?s:"",this.statsigMetadata.deviceModel=(a=e.getDeviceId())!==null&&a!==void 0?a:""},t.prototype.setExpoConstants=function(e){var n,r;this.statsigMetadata.appVersion=(r=(n=e.nativeAppVersion)!==null&&n!==void 0?n:e.nativeBuildVersion)!==null&&r!==void 0?r:""},t.prototype.setExpoDevice=function(e){var n,r,i,s;this.statsigMetadata.systemVersion=(n=e.osVersion)!==null&&n!==void 0?n:"",this.statsigMetadata.systemName=(r=e.osName)!==null&&r!==void 0?r:"",this.statsigMetadata.deviceModelName=(i=e.modelName)!==null&&i!==void 0?i:"",this.statsigMetadata.deviceModel=(s=e.modelId)!==null&&s!==void 0?s:""},t}();bl.default=zA;var Sl={},El={},xo={};Object.defineProperty(xo,"__esModule",{value:!0});var WA=function(){function t(){}return t.encodeInitializeCall=!0,t}();xo.default=WA;(function(t){var e=A&&A.__awaiter||function(c,l,d,f){function h(p){return p instanceof d?p:new d(function(g){g(p)})}return new(d||(d=Promise))(function(p,g){function y(_){try{v(f.next(_))}catch(E){g(E)}}function m(_){try{v(f.throw(_))}catch(E){g(E)}}function v(_){_.done?p(_.value):h(_.value).then(y,m)}v((f=f.apply(c,l||[])).next())})},n=A&&A.__generator||function(c,l){var d={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,h,p,g;return g={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function y(v){return function(_){return m([v,_])}}function m(v){if(f)throw new TypeError("Generator is already executing.");for(;d;)try{if(f=1,h&&(p=v[0]&2?h.return:v[0]?h.throw||((p=h.return)&&p.call(h),0):h.next)&&!(p=p.call(h,v[1])).done)return p;switch(h=0,p&&(v=[v[0]&2,p.value]),v[0]){case 0:case 1:p=v;break;case 4:return d.label++,{value:v[1],done:!1};case 5:d.label++,h=v[1],v=[0];continue;case 7:v=d.ops.pop(),d.trys.pop();continue;default:if(p=d.trys,!(p=p.length>0&&p[p.length-1])&&(v[0]===6||v[0]===2)){d=0;continue}if(v[0]===3&&(!p||v[1]>p[0]&&v[1]<p[3])){d.label=v[1];break}if(v[0]===6&&d.label<p[1]){d.label=p[1],p=v;break}if(p&&d.label<p[2]){d.label=p[2],d.ops.push(v);break}p[2]&&d.ops.pop(),d.trys.pop();continue}v=l.call(c,d)}catch(_){v=[6,_],h=0}finally{f=p=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},r=A&&A.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEndpoint=void 0;var i=r(xo),s=r(An),a;(function(c){c.Initialize="initialize",c.Rgstr="rgstr",c.LogEventBeacon="log_event_beacon"})(a=t.StatsigEndpoint||(t.StatsigEndpoint={}));var o=204,u=function(){function c(l){this.retryCodes={408:!0,500:!0,502:!0,503:!0,504:!0,522:!0,524:!0,599:!0},this.canUseKeepalive=!1,this.sdkInternal=l,this.leakyBucket={},this.init()}return c.prototype.init=function(){if(!this.sdkInternal.getOptions().getDisableNetworkKeepalive())try{this.canUseKeepalive="keepalive"in new Request("")}catch{this.canUseKeepalive=!1}},c.prototype.fetchValues=function(l){var d=l.user,f=l.sinceTime,h=l.timeout,p=l.useDeltas,g=l.prefetchUsers,y=l.previousDerivedFields,m=l.hadBadDeltaChecksum,v=l.badChecksum,_={user:d,prefetchUsers:g,statsigMetadata:this.sdkInternal.getStatsigMetadata(),sinceTime:f??void 0,canProcessDeltas:p,hash:"djb2",previousDerivedFields:y,hadBadDeltaChecksum:m,badChecksum:v};return this.postWithTimeout(a.Initialize,_,{timeout:h,retries:3,diagnostics:s.default.mark.intialize.networkRequest})},c.prototype.postWithTimeout=function(l,d,f){var h=this,p=f??{},g=p.timeout,y=g===void 0?0:g,m=p.retries,v=m===void 0?0:m,_=p.backoff,E=_===void 0?1e3:_,C=p.diagnostics,b=C===void 0?null:C,S=!1,R=null,k=null,I=[],w=function(F){return function($){return S&&k?$(k):I.push($),F}};y!=0&&(R=new Promise(function(F,$){setTimeout(function(){S=!0,$(new Error("The initialization timeout of "+y+"ms has been hit before the network request has completed."))},y)}));var O,x=this.postToEndpoint(l,d,{retryOptions:{retryLimit:v,backoff:E},diagnostics:b}).then(function(F){if(O=F,!O.ok)return Promise.reject(new Error("Request to "+l+" failed with status "+O.status));if(typeof O.data!="object"){var $=new Error("Request to "+l+" received invalid response type. Expected 'object' but got '"+typeof O.data+"'");return h.sdkInternal.getErrorBoundary().logError("postWithTimeoutInvalidRes",$,function(){return e(h,void 0,void 0,function(){return n(this,function(G){return[2,this.getErrorData(l,d,v,E,O)]})})}),Promise.reject($)}var Y=O.data;return h.sdkInternal.getErrorBoundary().capture("postWithTimeout",function(){return e(h,void 0,void 0,function(){return n(this,function(G){return k=Y,S&&(I.forEach(function(U){return U(Y)}),I=[]),[2,Promise.resolve(Y)]})})},function(){return Promise.resolve({})},{getExtraData:function(){return e(h,void 0,void 0,function(){return n(this,function(G){return[2,this.getErrorData(l,d,v,E,O)]})})}})}).catch(function(F){return Promise.reject(F)}),M=R?Promise.race([x,R]):x;return M.eventually=w(M),M},c.prototype.sendLogBeacon=function(l){var d=this.sdkInternal.getOptions();if(d.getLocalModeEnabled())return!0;var f=new URL(d.getEventLoggingApi()+a.LogEventBeacon);f.searchParams.append("k",this.sdkInternal.getSDKKey()),l.clientTime=Date.now()+"";var h=null;try{h=JSON.stringify(l)}catch{return!1}return navigator.sendBeacon(f.toString(),h)},c.prototype.postToEndpoint=function(l,d,f){var h;return e(this,void 0,void 0,function(){var p,g,y,m,v,_,E,C,b,S,R,k,I,w,O,x,M,F,$,Y,G,U,ie=this;return n(this,function(Ve){if(p=f??{},g=p.useKeepalive,y=g===void 0?!1:g,m=p.diagnostics,v=m===void 0?null:m,_=(h=f==null?void 0:f.retryOptions)!==null&&h!==void 0?h:{},E=_.retryLimit,C=E===void 0?0:E,b=_.attempt,S=b===void 0?1:b,R=_.backoff,k=R===void 0?1e3:R,I=this.sdkInternal.getOptions(),I.getLocalModeEnabled())return[2,Promise.reject("no network requests in localMode")];if(typeof fetch!="function")return[2,Promise.reject("fetch is not defined")];if(typeof window>"u"&&!I.getIgnoreWindowUndefined())return[2,Promise.reject("window is not defined")];if(w=[a.Initialize].includes(l)?I.getApi():I.getEventLoggingApi(),O=w+l,x=this.leakyBucket[O],x!=null&&x>=30)return[2,Promise.reject(new Error("Request failed because you are making the same request too frequently."))];if(x==null?this.leakyBucket[O]=1:this.leakyBucket[O]=x+1,M=l===a.Initialize&&i.default.encodeInitializeCall&&typeof window<"u"&&typeof(window==null?void 0:window.btoa)=="function",F=JSON.stringify(d),M)try{$=window.btoa(F).split("").reverse().join(""),F=$}catch{M=!1}return Y={method:"POST",body:F,headers:{"Content-type":"application/json; charset=UTF-8","STATSIG-API-KEY":this.sdkInternal.getSDKKey(),"STATSIG-CLIENT-TIME":Date.now()+"","STATSIG-SDK-TYPE":this.sdkInternal.getSDKType(),"STATSIG-SDK-VERSION":this.sdkInternal.getSDKVersion(),"STATSIG-ENCODED":M?"1":"0"}},this.canUseKeepalive&&y&&(Y.keepalive=!0),v==null||v.start({attempt:S}),U=!0,[2,fetch(O,Y).then(function(me){return e(ie,void 0,void 0,function(){var _e,Te,Ke;return n(this,function(ot){switch(ot.label){case 0:return G=me,G.ok?(_e=G,G.status!==o?[3,1]:(_e.data={has_updates:!1,is_no_content:!0},[3,3])):[3,4];case 1:return[4,G.text()];case 2:Te=ot.sent(),_e.data=JSON.parse(Te),ot.label=3;case 3:return v==null||v.end(this.getDiagnosticsData(G,S)),[2,Promise.resolve(_e)];case 4:return this.retryCodes[G.status]||(U=!1),[4,G.text()];case 5:return Ke=ot.sent(),[2,Promise.reject(new Error(G.status+": "+Ke))]}})})}).catch(function(me){return v==null||v.end(ie.getDiagnosticsData(G,S,me)),S<C&&U?new Promise(function(_e,Te){setTimeout(function(){ie.leakyBucket[O]=Math.max(ie.leakyBucket[O]-1,0),ie.postToEndpoint(l,d,{retryOptions:{retryLimit:C,attempt:S+1,backoff:k*2},useKeepalive:y,diagnostics:v}).then(_e).catch(Te)},k)}):Promise.reject(me)}).finally(function(){ie.leakyBucket[O]=Math.max(ie.leakyBucket[O]-1,0)})]})})},c.prototype.supportsKeepalive=function(){return this.canUseKeepalive},c.prototype.getDiagnosticsData=function(l,d,f){var h,p;return{success:(l==null?void 0:l.ok)===!0,statusCode:l==null?void 0:l.status,sdkRegion:(h=l==null?void 0:l.headers)===null||h===void 0?void 0:h.get("x-statsig-region"),isDelta:((p=l==null?void 0:l.data)===null||p===void 0?void 0:p.is_delta)===!0,attempt:d,error:s.default.formatError(f)}},c.prototype.getErrorData=function(l,d,f,h,p){var g;return e(this,void 0,void 0,function(){var y;return n(this,function(m){try{return y={},((g=p.headers)!==null&&g!==void 0?g:[]).forEach(function(v,_){y[_]=v}),[2,{responseInfo:{headers:y,status:p.status,statusText:p.statusText,type:p.type,url:p.url,redirected:p.redirected,bodySnippet:p.data?JSON.stringify(p.data).slice(0,500):null},requestInfo:{endpointName:l,bodySnippet:JSON.stringify(d).slice(0,500),retries:f,backoff:h}}]}catch{return[2,{statusText:"statsig::failed to extract extra data"}]}return[2]})})},c}();t.default=u})(El);var Vs=A&&A.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((r=r.apply(t,e||[])).next())})},Ks=A&&A.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Ro=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sl,"__esModule",{value:!0});var yi=Ro(Co),lh=El,gr=Ae,mr=Ro(An),_r=Ro(ur),iu=Ro(di),Et="statsig::",qA=Et+"config_exposure",VA=Et+"layer_exposure",KA=Et+"gate_exposure",su=Et+"log_event_failed",YA=Et+"app_error",XA=Et+"app_metrics::page_load_time",JA=Et+"app_metrics::dom_interactive_time",QA=Et+"app_metrics::scroll_depth",ZA=Et+"app_metrics::time_on_page_ms",eD=Et+"diagnostics",tD=Et+"default_value_type_mismatch",nD=5*24*60*60*1e3,rD=100,My=1e3,dh=1024*My,iD=10,sD=function(){function t(e){this.failedLogEventCount=0,this.sdkInternal=e,this.queue=[],this.flushInterval=null,this.loggedErrors=new Set,this.failedLogEvents=[],this.exposureDedupeKeys={},this.failedLogEventCount=0,this.init()}return t.prototype.init=function(){var e=this;typeof window<"u"&&typeof window.addEventListener=="function"&&(window.addEventListener("blur",function(){return e.flush(!0)}),window.addEventListener("beforeunload",function(){return e.flush(!0)}),window.addEventListener("load",function(){setTimeout(function(){return e.flush()},100),setTimeout(function(){return e.flush()},1e3)})),typeof document<"u"&&typeof document.addEventListener=="function"&&document.addEventListener("visibilitychange",function(){e.flush(document.visibilityState!=="visible")}),!(!this.sdkInternal.getOptions().getIgnoreWindowUndefined()&&(typeof window>"u"||window==null))&&(this.sdkInternal.getOptions().getLocalModeEnabled()||(this.flushInterval=setInterval(function(){e.flush()},this.sdkInternal.getOptions().getLoggingIntervalMillis()),setTimeout(function(){return e.flush()},100),setTimeout(function(){return e.flush()},1e3)))},t.prototype.log=function(e){if(!this.sdkInternal.getOptions().isAllLoggingDisabled()){try{if(!this.sdkInternal.getOptions().getDisableCurrentPageLogging()&&typeof window<"u"&&window!=null&&typeof window.location=="object"&&typeof window.location.href=="string"){var n=window.location.href.split(/[?#]/);(n==null?void 0:n.length)>0&&e.addStatsigMetadata("currentPage",n[0])}}catch{}this.queue.push(e.toJsonObject()),this.queue.length>=this.sdkInternal.getOptions().getLoggingBufferMaxSize()&&this.flush()}},t.prototype.resetDedupeKeys=function(){this.exposureDedupeKeys={}},t.prototype.shouldLogExposure=function(e){var n=this.exposureDedupeKeys[e],r=Date.now();return n==null?(this.exposureDedupeKeys[e]=r,!0):n>=r-600*1e3?!1:(this.exposureDedupeKeys[e]=r,!0)},t.prototype.logGateExposure=function(e,n,r,i,s,a,o){var u=n+String(r)+i+a.reason;if(this.shouldLogExposure(u)){var c={gate:n,gateValue:String(r),ruleID:i,reason:a.reason,time:a.time};o&&(c.isManualExposure="true");var l=new yi.default(KA);l.setUser(e),l.setMetadata(c),l.setSecondaryExposures(s),this.log(l)}},t.prototype.logConfigExposure=function(e,n,r,i,s,a){var o=n+r+s.reason;if(this.shouldLogExposure(o)){var u={config:n,ruleID:r,reason:s.reason,time:s.time};a&&(u.isManualExposure="true");var c=new yi.default(qA);c.setUser(e),c.setMetadata(u),c.setSecondaryExposures(i),this.log(c)}},t.prototype.logLayerExposure=function(e,n,r,i,s,a,o,u,c){var l=[n,r,s,a,String(o),u.reason].join("|");if(this.shouldLogExposure(l)){var d={config:n,ruleID:r,allocatedExperiment:s,parameterName:a,isExplicitParameter:String(o),reason:u.reason,time:u.time};c&&(d.isManualExposure="true");var f=new yi.default(VA);f.setUser(e),f.setMetadata(d),f.setSecondaryExposures(i),this.log(f)}},t.prototype.logConfigDefaultValueFallback=function(e,n,r){this.logGenericEvent(tD,e,n,r),this.loggedErrors.add(n),this.sdkInternal.getConsoleLogger().error(n)},t.prototype.logAppError=function(e,n,r){var i=n.substring(0,128);this.loggedErrors.has(i)||this.loggedErrors.size>iD||(this.logGenericEvent(YA,e,i,r),this.loggedErrors.add(i))},t.prototype.logDiagnostics=function(e,n){if(!mr.default.disabled){var r=mr.default.getMarkers(n);mr.default.clearContext(n);var i=this.makeDiagnosticsEvent(e,{markers:r,context:n});this.log(i)}},t.prototype.logAppMetrics=function(e){var n=this,r;if(typeof((r=window==null?void 0:window.performance)===null||r===void 0?void 0:r.getEntriesByType)=="function"){var i=window.performance.getEntriesByType("navigation");if(!(!i||i.length<1)){var s=i[0],a={url:s.name};if(s instanceof PerformanceNavigationTiming&&(this.logGenericEvent(XA,e,s.duration,a),this.logGenericEvent(JA,e,s.domInteractive-s.startTime,a)),typeof(window==null?void 0:window.addEventListener)=="function"&&(document!=null&&document.body)){var o=0;window.addEventListener("scroll",function(){var u=document.body.scrollHeight||1,c=Math.min(100,Math.round((window.scrollY+window.innerHeight)/u*100));c>o&&(o=c)}),window.addEventListener("beforeunload",function(){n.logGenericEvent(QA,e,o,a),n.logGenericEvent(ZA,e,window.performance.now(),a)})}}}},t.prototype.logGenericEvent=function(e,n,r,i){var s=new yi.default(e);return s.setUser(n),s.setValue(r),s.setMetadata(i),this.log(s),s},t.prototype.shutdown=function(){this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.flush(!0)},t.prototype.flush=function(e){var n=this;if(e===void 0&&(e=!1),this.addErrorBoundaryDiagnostics(),this.queue.length!==0){var r=this.queue;if(this.queue=[],e&&!this.sdkInternal.getNetwork().supportsKeepalive()&&typeof navigator<"u"&&(navigator==null?void 0:navigator.sendBeacon)!=null){var i=this.sdkInternal.getNetwork().sendLogBeacon({events:r,statsigMetadata:this.sdkInternal.getStatsigMetadata()});i||(this.queue=r.concat(this.queue),this.queue.length>0&&(this.addFailedRequest({events:this.queue,statsigMetadata:this.sdkInternal.getStatsigMetadata(),time:Date.now()}),this.queue=[]),this.saveFailedRequests());return}this.sdkInternal.getNetwork().postToEndpoint(lh.StatsigEndpoint.Rgstr,{events:r,statsigMetadata:this.sdkInternal.getStatsigMetadata()},{retryOptions:{retryLimit:3,backoff:1e3},useKeepalive:e}).then(function(s){if(!s.ok)throw s}).catch(function(s){typeof s.text=="function"?s.text().then(function(a){n.sdkInternal.getErrorBoundary().logError(su,s,function(){return Vs(n,void 0,void 0,function(){return Ks(this,function(o){return[2,{eventCount:r.length,error:a}]})})})}):n.sdkInternal.getErrorBoundary().logError(su,s,function(){return Vs(n,void 0,void 0,function(){return Ks(this,function(a){return[2,{eventCount:r.length,error:s.message}]})})}),n.newFailedRequest(su,r)}).finally(function(){return Vs(n,void 0,void 0,function(){return Ks(this,function(s){return e&&(this.queue.length>0&&(this.addFailedRequest({events:this.queue,statsigMetadata:this.sdkInternal.getStatsigMetadata(),time:Date.now()}),this.queue=[]),this.saveFailedRequests()),[2]})})})}},t.prototype.saveFailedRequests=function(){var e=this;if(this.failedLogEvents.length>0){var n=JSON.stringify(this.failedLogEvents);if(n.length>dh){this.clearLocalStorageRequests();return}if(_r.default.asyncStorage){_r.default.setItemAsync(gr.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY,n).catch(function(r){return e.sdkInternal.getErrorBoundary().logError("saveFailedRequests",r)});return}iu.default.setItem(gr.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY,n)}},t.prototype.sendSavedRequests=function(){return Vs(this,void 0,void 0,function(){var e,n,r,i,s,a,o,u,c=this;return Ks(this,function(l){switch(l.label){case 0:return n=!1,_r.default.asyncStorage?[4,_r.default.getItemAsync(gr.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY)]:[3,2];case 1:return e=l.sent(),[3,3];case 2:e=iu.default.getItem(gr.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY),l.label=3;case 3:if(e==null)return this.clearLocalStorageRequests(),[2];e.length>dh&&(n=!0),r=[];try{for(r=JSON.parse(e),i=function(d){d!=null&&d.events&&Array.isArray(d.events)&&s.sdkInternal.getNetwork().postToEndpoint(lh.StatsigEndpoint.Rgstr,d).then(function(f){if(!f.ok)throw Error(f.status+"")}).catch(function(){n||c.addFailedRequest(d)})},s=this,a=0,o=r;a<o.length;a++)u=o[a],i(u)}catch(d){this.sdkInternal.getErrorBoundary().logError("sendSavedRequests",d)}finally{this.clearLocalStorageRequests()}return[2]}})})},t.prototype.addFailedRequest=function(e){if(!(e.time<Date.now()-nD)&&!(this.failedLogEvents.length>rD)){var n=e.events.length;this.failedLogEventCount+n>My||(this.failedLogEvents.push(e),this.failedLogEventCount+=n)}},t.prototype.clearLocalStorageRequests=function(){var e=this;_r.default.asyncStorage?_r.default.removeItemAsync(gr.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY).catch(function(n){return e.sdkInternal.getErrorBoundary().logError("clearLocalStorageRequests",n)}):iu.default.removeItem(gr.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY)},t.prototype.newFailedRequest=function(e,n){this.loggedErrors.has(e)||(this.loggedErrors.add(e),this.failedLogEvents.push({events:n,statsigMetadata:this.sdkInternal.getStatsigMetadata(),time:Date.now()}),this.saveFailedRequests())},t.prototype.makeDiagnosticsEvent=function(e,n){var r=new yi.default(eD);return r.setUser(e),r.setMetadata(n),r},t.prototype.addErrorBoundaryDiagnostics=function(){if(mr.default.getMarkerCount("api_call")!==0){var e=this.makeDiagnosticsEvent(this.sdkInternal.getCurrentUser(),{context:"api_call",markers:mr.default.getMarkers("api_call")});this.queue.push(e),mr.default.clearContext("api_call")}},t}();Sl.default=sD;var Tl={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=t.INIT_TIMEOUT_DEFAULT_MS=void 0;var e="https://featuregates.org/v1/",n="https://events.statsigapi.net/v1/";t.INIT_TIMEOUT_DEFAULT_MS=3e3;var r;(function(s){s[s.NONE=0]="NONE",s[s.INFO=1]="INFO",s[s.DEBUG=2]="DEBUG"})(r=t.LogLevel||(t.LogLevel={}));var i=function(){function s(a){var o,u,c,l,d,f,h,p,g,y,m,v,_,E,C,b,S,R,k,I,w,O,x;a==null&&(a={});var M=(o=a.api)!==null&&o!==void 0?o:e;this.api=M.endsWith("/")?M:M+"/",this.disableCurrentPageLogging=(u=a.disableCurrentPageLogging)!==null&&u!==void 0?u:!1,this.environment=(c=a.environment)!==null&&c!==void 0?c:null,this.loggingIntervalMillis=this.normalizeNumberInput(a.loggingIntervalMillis,{default:1e4,min:1e3,max:6e4}),this.loggingBufferMaxSize=this.normalizeNumberInput(a.loggingBufferMaxSize,{default:100,min:2,max:500}),this.disableNetworkKeepalive=(l=a.disableNetworkKeepalive)!==null&&l!==void 0?l:!1,this.overrideStableID=(d=a.overrideStableID)!==null&&d!==void 0?d:null,this.localMode=(f=a.localMode)!==null&&f!==void 0?f:!1,this.initTimeoutMs=a.initTimeoutMs&&a.initTimeoutMs>=0?a.initTimeoutMs:t.INIT_TIMEOUT_DEFAULT_MS,this.disableErrorLogging=(h=a.disableErrorLogging)!==null&&h!==void 0?h:!1,this.disableAutoMetricsLogging=(p=a.disableAutoMetricsLogging)!==null&&p!==void 0?p:!1,this.initializeValues=(g=a.initializeValues)!==null&&g!==void 0?g:null;var F=(m=(y=a.eventLoggingApi)!==null&&y!==void 0?y:a.api)!==null&&m!==void 0?m:n;this.eventLoggingApi=F.endsWith("/")?F:F+"/",this.prefetchUsers=(v=a.prefetchUsers)!==null&&v!==void 0?v:[],this.disableLocalStorage=(_=a.disableLocalStorage)!==null&&_!==void 0?_:!1,this.initCompletionCallback=(E=a.initCompletionCallback)!==null&&E!==void 0?E:null,this.updateCompletionCallback=(C=a.updateUserCompletionCallback)!==null&&C!==void 0?C:null,this.disableDiagnosticsLogging=(b=a.disableDiagnosticsLogging)!==null&&b!==void 0?b:!1,this.logLevel=(S=a==null?void 0:a.logLevel)!==null&&S!==void 0?S:r.NONE,this.ignoreWindowUndefined=(R=a==null?void 0:a.ignoreWindowUndefined)!==null&&R!==void 0?R:!1,this.fetchMode=(k=a.fetchMode)!==null&&k!==void 0?k:"network-only",this.disableLocalOverrides=(I=a==null?void 0:a.disableLocalOverrides)!==null&&I!==void 0?I:!1,this.gateEvaluationCallback=(w=a==null?void 0:a.gateEvaluationCallback)!==null&&w!==void 0?w:null,this.userPersistentStorage=(O=a==null?void 0:a.userPersistentStorage)!==null&&O!==void 0?O:null,this.disableAllLogging=(x=a.disableAllLogging)!==null&&x!==void 0?x:!1}return s.prototype.getApi=function(){return this.api},s.prototype.getEnvironment=function(){return this.environment},s.prototype.getDisableCurrentPageLogging=function(){return this.disableCurrentPageLogging},s.prototype.getLoggingIntervalMillis=function(){return this.loggingIntervalMillis},s.prototype.getLoggingBufferMaxSize=function(){return this.loggingBufferMaxSize},s.prototype.getDisableNetworkKeepalive=function(){return this.disableNetworkKeepalive},s.prototype.getOverrideStableID=function(){return this.overrideStableID},s.prototype.getLocalModeEnabled=function(){return this.localMode},s.prototype.getInitTimeoutMs=function(){return this.initTimeoutMs},s.prototype.getDisableErrorLogging=function(){return this.disableErrorLogging},s.prototype.getDisableAutoMetricsLogging=function(){return this.disableAutoMetricsLogging},s.prototype.getInitializeValues=function(){return this.initializeValues},s.prototype.getEventLoggingApi=function(){return this.eventLoggingApi},s.prototype.getPrefetchUsers=function(){return this.prefetchUsers},s.prototype.getDisableLocalStorage=function(){return this.disableLocalStorage},s.prototype.getInitCompletionCallback=function(){return this.initCompletionCallback},s.prototype.getUpdateUserCompletionCallback=function(){return this.updateCompletionCallback},s.prototype.getDisableDiagnosticsLogging=function(){return this.disableDiagnosticsLogging},s.prototype.getLogLevel=function(){return this.logLevel},s.prototype.getIgnoreWindowUndefined=function(){return this.ignoreWindowUndefined},s.prototype.getFetchMode=function(){return this.fetchMode},s.prototype.getDisableLocalOverrides=function(){return this.disableLocalOverrides},s.prototype.getGateEvaluationCallback=function(){return this.gateEvaluationCallback},s.prototype.getUserPersistentStorage=function(){return this.userPersistentStorage},s.prototype.isAllLoggingDisabled=function(){return this.disableAllLogging},s.prototype.reenableAllLogging=function(){this.disableAllLogging=!1},s.prototype.normalizeNumberInput=function(a,o){return a==null?o.default:Math.max(Math.min(a,o.max),o.min)},s}();t.default=i})(Tl);var Il={},wl={},Oo={},Ue={},Ly={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Base64=void 0,t.Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_encodeBinary:function(e){for(var n="",r,i,s,a,o,u,c,l=0;l<e.length;)r=e.charCodeAt(l++),i=e.charCodeAt(l++),s=e.charCodeAt(l++),a=r>>2,o=(r&3)<<4|i>>4,u=(i&15)<<2|s>>6,c=s&63,isNaN(i)?u=c=64:isNaN(s)&&(c=64),n=n+this._keyStr.charAt(a)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(c);return n},encodeArrayBuffer:function(e){for(var n="",r=new Uint8Array(e),i=r.byteLength,s=0;s<i;s++)n+=String.fromCharCode(r[s]);return t.Base64._encodeBinary(n)}}})(Ly);var Ny={exports:{}};const aD={},oD=Object.freeze(Object.defineProperty({__proto__:null,default:aD},Symbol.toStringTag,{value:"Module"})),fh=zh(oD);/**
 * [js-sha256]{@link https://github.com/emn178/js-sha256}
 *
 * @version 0.10.1
 * @author Chen, Yi-Cyuan [emn178@gmail.com]
 * @copyright Chen, Yi-Cyuan 2014-2023
 * @license MIT
 */(function(t){(function(){var e="input is invalid type",n=typeof window=="object",r=n?window:{};r.JS_SHA256_NO_WINDOW&&(n=!1);var i=!n&&typeof self=="object",s=!r.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?r=A:i&&(r=self);var a=!r.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,o=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),c=[-2147483648,8388608,32768,128],l=[24,16,8,0],d=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],f=["hex","array","digest","arrayBuffer"],h=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"}),o&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(b){return typeof b=="object"&&b.buffer&&b.buffer.constructor===ArrayBuffer});var p=function(b,S){return function(R){return new _(S,!0).update(R)[b]()}},g=function(b){var S=p("hex",b);s&&(S=y(S,b)),S.create=function(){return new _(b)},S.update=function(I){return S.create().update(I)};for(var R=0;R<f.length;++R){var k=f[R];S[k]=p(k,b)}return S},y=function(b,S){var R=fh,k=fh.Buffer,I=S?"sha224":"sha256",w;k.from&&!r.JS_SHA256_NO_BUFFER_FROM?w=k.from:w=function(x){return new k(x)};var O=function(x){if(typeof x=="string")return R.createHash(I).update(x,"utf8").digest("hex");if(x==null)throw new Error(e);return x.constructor===ArrayBuffer&&(x=new Uint8Array(x)),Array.isArray(x)||ArrayBuffer.isView(x)||x.constructor===k?R.createHash(I).update(w(x)).digest("hex"):b(x)};return O},m=function(b,S){return function(R,k){return new E(R,S,!0).update(k)[b]()}},v=function(b){var S=m("hex",b);S.create=function(I){return new E(I,b)},S.update=function(I,w){return S.create(I).update(w)};for(var R=0;R<f.length;++R){var k=f[R];S[k]=m(k,b)}return S};function _(b,S){S?(h[0]=h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0,this.blocks=h):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=b}_.prototype.update=function(b){if(!this.finalized){var S,R=typeof b;if(R!=="string"){if(R==="object"){if(b===null)throw new Error(e);if(o&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!Array.isArray(b)&&(!o||!ArrayBuffer.isView(b)))throw new Error(e)}else throw new Error(e);S=!0}for(var k,I=0,w,O=b.length,x=this.blocks;I<O;){if(this.hashed&&(this.hashed=!1,x[0]=this.block,x[16]=x[1]=x[2]=x[3]=x[4]=x[5]=x[6]=x[7]=x[8]=x[9]=x[10]=x[11]=x[12]=x[13]=x[14]=x[15]=0),S)for(w=this.start;I<O&&w<64;++I)x[w>>2]|=b[I]<<l[w++&3];else for(w=this.start;I<O&&w<64;++I)k=b.charCodeAt(I),k<128?x[w>>2]|=k<<l[w++&3]:k<2048?(x[w>>2]|=(192|k>>6)<<l[w++&3],x[w>>2]|=(128|k&63)<<l[w++&3]):k<55296||k>=57344?(x[w>>2]|=(224|k>>12)<<l[w++&3],x[w>>2]|=(128|k>>6&63)<<l[w++&3],x[w>>2]|=(128|k&63)<<l[w++&3]):(k=65536+((k&1023)<<10|b.charCodeAt(++I)&1023),x[w>>2]|=(240|k>>18)<<l[w++&3],x[w>>2]|=(128|k>>12&63)<<l[w++&3],x[w>>2]|=(128|k>>6&63)<<l[w++&3],x[w>>2]|=(128|k&63)<<l[w++&3]);this.lastByteIndex=w,this.bytes+=w-this.start,w>=64?(this.block=x[16],this.start=w-64,this.hash(),this.hashed=!0):this.start=w}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},_.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var b=this.blocks,S=this.lastByteIndex;b[16]=this.block,b[S>>2]|=c[S&3],this.block=b[16],S>=56&&(this.hashed||this.hash(),b[0]=this.block,b[16]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=b[9]=b[10]=b[11]=b[12]=b[13]=b[14]=b[15]=0),b[14]=this.hBytes<<3|this.bytes>>>29,b[15]=this.bytes<<3,this.hash()}},_.prototype.hash=function(){var b=this.h0,S=this.h1,R=this.h2,k=this.h3,I=this.h4,w=this.h5,O=this.h6,x=this.h7,M=this.blocks,F,$,Y,G,U,ie,Ve,me,_e,Te,Ke;for(F=16;F<64;++F)U=M[F-15],$=(U>>>7|U<<25)^(U>>>18|U<<14)^U>>>3,U=M[F-2],Y=(U>>>17|U<<15)^(U>>>19|U<<13)^U>>>10,M[F]=M[F-16]+$+M[F-7]+Y<<0;for(Ke=S&R,F=0;F<64;F+=4)this.first?(this.is224?(me=300032,U=M[0]-1413257819,x=U-150054599<<0,k=U+24177077<<0):(me=704751109,U=M[0]-210244248,x=U-1521486534<<0,k=U+143694565<<0),this.first=!1):($=(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10),Y=(I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7),me=b&S,G=me^b&R^Ke,Ve=I&w^~I&O,U=x+Y+Ve+d[F]+M[F],ie=$+G,x=k+U<<0,k=U+ie<<0),$=(k>>>2|k<<30)^(k>>>13|k<<19)^(k>>>22|k<<10),Y=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),_e=k&b,G=_e^k&S^me,Ve=x&I^~x&w,U=O+Y+Ve+d[F+1]+M[F+1],ie=$+G,O=R+U<<0,R=U+ie<<0,$=(R>>>2|R<<30)^(R>>>13|R<<19)^(R>>>22|R<<10),Y=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),Te=R&k,G=Te^R&b^_e,Ve=O&x^~O&I,U=w+Y+Ve+d[F+2]+M[F+2],ie=$+G,w=S+U<<0,S=U+ie<<0,$=(S>>>2|S<<30)^(S>>>13|S<<19)^(S>>>22|S<<10),Y=(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7),Ke=S&R,G=Ke^S&k^Te,Ve=w&O^~w&x,U=I+Y+Ve+d[F+3]+M[F+3],ie=$+G,I=b+U<<0,b=U+ie<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+b<<0,this.h1=this.h1+S<<0,this.h2=this.h2+R<<0,this.h3=this.h3+k<<0,this.h4=this.h4+I<<0,this.h5=this.h5+w<<0,this.h6=this.h6+O<<0,this.h7=this.h7+x<<0},_.prototype.hex=function(){this.finalize();var b=this.h0,S=this.h1,R=this.h2,k=this.h3,I=this.h4,w=this.h5,O=this.h6,x=this.h7,M=u[b>>28&15]+u[b>>24&15]+u[b>>20&15]+u[b>>16&15]+u[b>>12&15]+u[b>>8&15]+u[b>>4&15]+u[b&15]+u[S>>28&15]+u[S>>24&15]+u[S>>20&15]+u[S>>16&15]+u[S>>12&15]+u[S>>8&15]+u[S>>4&15]+u[S&15]+u[R>>28&15]+u[R>>24&15]+u[R>>20&15]+u[R>>16&15]+u[R>>12&15]+u[R>>8&15]+u[R>>4&15]+u[R&15]+u[k>>28&15]+u[k>>24&15]+u[k>>20&15]+u[k>>16&15]+u[k>>12&15]+u[k>>8&15]+u[k>>4&15]+u[k&15]+u[I>>28&15]+u[I>>24&15]+u[I>>20&15]+u[I>>16&15]+u[I>>12&15]+u[I>>8&15]+u[I>>4&15]+u[I&15]+u[w>>28&15]+u[w>>24&15]+u[w>>20&15]+u[w>>16&15]+u[w>>12&15]+u[w>>8&15]+u[w>>4&15]+u[w&15]+u[O>>28&15]+u[O>>24&15]+u[O>>20&15]+u[O>>16&15]+u[O>>12&15]+u[O>>8&15]+u[O>>4&15]+u[O&15];return this.is224||(M+=u[x>>28&15]+u[x>>24&15]+u[x>>20&15]+u[x>>16&15]+u[x>>12&15]+u[x>>8&15]+u[x>>4&15]+u[x&15]),M},_.prototype.toString=_.prototype.hex,_.prototype.digest=function(){this.finalize();var b=this.h0,S=this.h1,R=this.h2,k=this.h3,I=this.h4,w=this.h5,O=this.h6,x=this.h7,M=[b>>24&255,b>>16&255,b>>8&255,b&255,S>>24&255,S>>16&255,S>>8&255,S&255,R>>24&255,R>>16&255,R>>8&255,R&255,k>>24&255,k>>16&255,k>>8&255,k&255,I>>24&255,I>>16&255,I>>8&255,I&255,w>>24&255,w>>16&255,w>>8&255,w&255,O>>24&255,O>>16&255,O>>8&255,O&255];return this.is224||M.push(x>>24&255,x>>16&255,x>>8&255,x&255),M},_.prototype.array=_.prototype.digest,_.prototype.arrayBuffer=function(){this.finalize();var b=new ArrayBuffer(this.is224?28:32),S=new DataView(b);return S.setUint32(0,this.h0),S.setUint32(4,this.h1),S.setUint32(8,this.h2),S.setUint32(12,this.h3),S.setUint32(16,this.h4),S.setUint32(20,this.h5),S.setUint32(24,this.h6),this.is224||S.setUint32(28,this.h7),b};function E(b,S,R){var k,I=typeof b;if(I==="string"){var w=[],O=b.length,x=0,M;for(k=0;k<O;++k)M=b.charCodeAt(k),M<128?w[x++]=M:M<2048?(w[x++]=192|M>>6,w[x++]=128|M&63):M<55296||M>=57344?(w[x++]=224|M>>12,w[x++]=128|M>>6&63,w[x++]=128|M&63):(M=65536+((M&1023)<<10|b.charCodeAt(++k)&1023),w[x++]=240|M>>18,w[x++]=128|M>>12&63,w[x++]=128|M>>6&63,w[x++]=128|M&63);b=w}else if(I==="object"){if(b===null)throw new Error(e);if(o&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!Array.isArray(b)&&(!o||!ArrayBuffer.isView(b)))throw new Error(e)}else throw new Error(e);b.length>64&&(b=new _(S,!0).update(b).array());var F=[],$=[];for(k=0;k<64;++k){var Y=b[k]||0;F[k]=92^Y,$[k]=54^Y}_.call(this,S,R),this.update($),this.oKeyPad=F,this.inner=!0,this.sharedMemory=R}E.prototype=new _,E.prototype.finalize=function(){if(_.prototype.finalize.call(this),this.inner){this.inner=!1;var b=this.array();_.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(b),_.prototype.finalize.call(this)}};var C=g();C.sha256=C,C.sha224=g(!0),C.sha256.hmac=v(),C.sha224.hmac=v(!0),a?t.exports=C:(r.sha256=C.sha256,r.sha224=C.sha224)})()})(Ny);var uD=Ny.exports;Object.defineProperty(Ue,"__esModule",{value:!0});Ue.getUserCacheKey=Ue.getSortedObject=Ue.djb2HashForObject=Ue.sha256Hash=Ue.djb2Hash=Ue.memoizedUserCacheKeyHash=Ue.fasthash=void 0;var cD=Ly,lD=uD,Fa={};function Cl(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return e}Ue.fasthash=Cl;function ic(t){var e=Fa[t];if(e)return e;var n=String(Cl(t));return Fa[t]=n,n}Ue.memoizedUserCacheKeyHash=ic;function Py(t){return String(Cl(t)>>>0)}Ue.djb2Hash=Py;function dD(t){var e=Fa[t];if(e)return e;var n=lD.sha256.create().update(t).arrayBuffer(),r=cD.Base64.encodeArrayBuffer(n);return Fa[t]=r,r}Ue.sha256Hash=dD;function fD(t){return Py(JSON.stringify(kl(t)))}Ue.djb2HashForObject=fD;function kl(t){if(t==null)return null;var e=Object.keys(t).sort(),n={};return e.forEach(function(r){var i=t[r];i instanceof Object&&(i=kl(i)),n[r]=i}),n}Ue.getSortedObject=kl;function hD(t,e){var n,r=["userID:"+String((n=e==null?void 0:e.userID)!==null&&n!==void 0?n:"")],i=e==null?void 0:e.customIDs;if(i!=null)for(var s=0,a=Object.entries(i);s<a.length;s++){var o=a[s],u=o[0],c=o[1];r.push(u+":"+c)}var l=ic(r.join(";"));r.splice(1,0,"stableID:"+t);var d=ic(r.join(";"));return{v1:d,v2:l}}Ue.getUserCacheKey=hD;var Li=A&&A.__assign||function(){return Li=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Li.apply(this,arguments)},pD=A&&A.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.getUserHashWithoutStableID=void 0;var gD=Ue;function mD(t){var e=t.customIDs,n=pD(t,["customIDs"]),r=Li({},e);return delete r.stableID,(0,gD.djb2HashForObject)(Li(Li({},n),{customIDs:r}))}Oo.getUserHashWithoutStableID=mD;var qr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EvaluationReason=void 0,function(e){e.Network="Network",e.Bootstrap="Bootstrap",e.InvalidBootstrap="InvalidBootstrap",e.Cache="Cache",e.Prefetch="Prefetch",e.Sticky="Sticky",e.LocalOverride="LocalOverride",e.Unrecognized="Unrecognized",e.Uninitialized="Uninitialized",e.Error="Error",e.NetworkNotModified="NetworkNotModified",e.BootstrapStableIDMismatch="BootstrapStableIDMismatch"}(t.EvaluationReason||(t.EvaluationReason={}))})(qr);var sc=A&&A.__assign||function(){return sc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},sc.apply(this,arguments)};Object.defineProperty(wl,"__esModule",{value:!0});var _D=Oo,au=qr,yD=function(){function t(){}return t.getEvaluationReasonForBootstrap=function(e,n,r){var i=!0,s=!1;try{var a=n.evaluated_keys;if(a&&typeof a=="object"){var o=this.copyObject(a),u=e==null?null:this.copyObject(e);i=i&&t.validate(o,u)&&t.validate(u,o);var c=a.customIDs;r!=(c==null?void 0:c.stableID)&&(s=!0)}var l=n.user_hash;l&&typeof l=="string"&&e!=null&&(i=i&&l===(0,_D.getUserHashWithoutStableID)(e))}catch{}return i?s?au.EvaluationReason.BootstrapStableIDMismatch:au.EvaluationReason.Bootstrap:au.EvaluationReason.InvalidBootstrap},t.validate=function(e,n){if(e==null)return n==null;if(n==null)return!1;for(var r=0,i=Object.entries(e);r<i.length;r++){var s=i[r],a=s[0],o=s[1];if(a!=="stableID"){if(typeof o!=typeof n[a])return!1;if(typeof o=="string"){if(o!==n[a])return!1}else return typeof o=="object"?this.validate(o,n[a]):!1}}return!0},t.copyObject=function(e){if(e==null)return null;var n={};if(e!=null&&e.userID&&(n.userID=e==null?void 0:e.userID),e!=null&&e.customIDs){var r=sc({},e.customIDs);delete r.stableID,Object.keys(r).length!==0&&(n.customIDs=r)}return n},t}();wl.default=yD;var Ot=A&&A.__assign||function(){return Ot=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ot.apply(this,arguments)},$n=A&&A.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((r=r.apply(t,e||[])).next())})},Un=A&&A.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},gs=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Il,"__esModule",{value:!0});var Ys=gs(hs),hh=gs(ps),vD=gs(wl),rt=Ae,pt=Ue,on=gs(ur),un=gs(di),Je=qr,bD=10,SD=function(){function t(e,n){this.overrides={gates:{},configs:{},layers:{}},this.sdkInternal=e,this.userCacheKey=this.sdkInternal.getCurrentUserCacheKey(),this.values={},this.userValues={feature_gates:{},dynamic_configs:{},sticky_experiments:{},layer_configs:{},has_updates:!1,time:0,evaluation_time:0,derived_fields:{}},this.stickyDeviceExperiments={},this.loaded=!1,this.reason=Je.EvaluationReason.Uninitialized,this.userPersistentStorageAdapter=this.sdkInternal.getOptions().getUserPersistentStorage(),this.userPersistentStorageData={experiments:{}},n?this.bootstrap(n):this.load()}return t.prototype.load=function(){this.loadFromLocalStorage(),this.partialLoadFromPersistentStorageAdapter()},t.prototype.loadAsync=function(){return $n(this,void 0,void 0,function(){return Un(this,function(e){switch(e.label){case 0:return[4,this.loadFromAsyncStorage()];case 1:return e.sent(),this.partialLoadFromPersistentStorageAdapter(),[2]}})})},t.prototype.updateUser=function(e){this.userCacheKey=this.sdkInternal.getCurrentUserCacheKey();var n=this.setUserValueFromCache(e);return this.partialLoadFromPersistentStorageAdapter(),n},t.prototype.loadFromAsyncStorage=function(){return $n(this,void 0,void 0,function(){var e,n;return Un(this,function(r){switch(r.label){case 0:return e=this.parseCachedValues,[4,on.default.getItemAsync(rt.INTERNAL_STORE_KEY)];case 1:return n=[r.sent()],[4,on.default.getItemAsync(rt.STICKY_DEVICE_EXPERIMENTS_KEY)];case 2:return e.apply(this,n.concat([r.sent()])),this.userCacheKey=this.sdkInternal.getCurrentUserCacheKey(),this.loaded=!0,[2]}})})},t.prototype.bootstrap=function(e){var n,r,i,s,a,o,u=this.sdkInternal.getCurrentUserCacheKey(),c=this.sdkInternal.getCurrentUser(),l=(i=(r=(n=c==null?void 0:c.customIDs)===null||n===void 0?void 0:n.stableID)!==null&&r!==void 0?r:this.sdkInternal.getStatsigMetadata().stableID)!==null&&i!==void 0?i:null,d=vD.default.getEvaluationReasonForBootstrap(c,e,l);this.loaded=!0;try{var f=e;this.userValues.feature_gates=(s=f.feature_gates)!==null&&s!==void 0?s:{},this.userValues.dynamic_configs=(a=f.dynamic_configs)!==null&&a!==void 0?a:{},this.userValues.layer_configs=(o=f.layer_configs)!==null&&o!==void 0?o:{},this.userValues.evaluation_time=Date.now(),this.userValues.time=Date.now(),this.userValues.hash_used=f.hash_used,this.values[u.v2]=this.userValues,this.reason=d,this.loadOverrides()}catch{return}},t.prototype.loadFromLocalStorage=function(){on.default.asyncStorage||(this.parseCachedValues(un.default.getItem(rt.INTERNAL_STORE_KEY),un.default.getItem(rt.STICKY_DEVICE_EXPERIMENTS_KEY)),this.loaded=!0)},t.prototype.partialLoadFromPersistentStorageAdapter=function(){var e;if(this.userPersistentStorageAdapter){var n=(e=this.userPersistentStorageAdapter.userIDType)!==null&&e!==void 0?e:"userID",r=this.sdkInternal.getCurrentUserUnitID(n);if(r){try{this.userPersistentStorageData=JSON.parse(this.userPersistentStorageAdapter.load(r+":"+n))}catch(i){console.warn("Failed to load from user persistent storage.",i)}this.userValues.sticky_experiments=this.userPersistentStorageData.experiments}}},t.prototype.saveStickyExperimentsToPersistentStorageAdapter=function(){var e;if(this.userPersistentStorageAdapter){var n=(e=this.userPersistentStorageAdapter.userIDType)!==null&&e!==void 0?e:"userID",r=this.sdkInternal.getCurrentUserUnitID(n);if(r){var i=Ot(Ot({},this.userPersistentStorageData),{experiments:this.userValues.sticky_experiments});try{this.userPersistentStorageAdapter.save(r+":"+n,JSON.stringify(i))}catch(s){console.warn("Failed to save user experiment values to persistent storage.",s)}}}},t.prototype.isLoaded=function(){return this.loaded},t.prototype.getLastUpdateTime=function(e){var n=(0,pt.djb2HashForObject)(e);return this.userValues.user_hash==n?this.userValues.time:null},t.prototype.getPreviousDerivedFields=function(e){var n=(0,pt.djb2HashForObject)(e);if(this.userValues.user_hash==n)return this.userValues.derived_fields},t.prototype.parseCachedValues=function(e,n){try{this.values=e?JSON.parse(e):this.values,this.setUserValueFromCache()}catch{this.removeFromStorage(rt.INTERNAL_STORE_KEY)}try{var r=n?JSON.parse(n):null;r&&(this.stickyDeviceExperiments=r)}catch{this.removeFromStorage(rt.STICKY_DEVICE_EXPERIMENTS_KEY)}this.loadOverrides()},t.prototype.getUserValues=function(e){var n;return(n=this.values[e.v2])!==null&&n!==void 0?n:this.values[e.v1]},t.prototype.setUserValueFromCache=function(e){var n;e===void 0&&(e=!1);var r=this.getUserValues(this.userCacheKey);return r==null?(this.resetUserValues(),this.reason=Je.EvaluationReason.Uninitialized,null):(this.userValues=r,this.reason=e?Je.EvaluationReason.Prefetch:Je.EvaluationReason.Cache,(n=r.evaluation_time)!==null&&n!==void 0?n:0)},t.prototype.removeFromStorage=function(e){var n=this;on.default.removeItemAsync(e).catch(function(r){return n.sdkInternal.getErrorBoundary().logError("removeFromStorage",r)}),un.default.removeItem(e)},t.prototype.loadOverrides=function(){if(!this.sdkInternal.getOptions().getDisableLocalOverrides()){var e=un.default.getItem(rt.OVERRIDES_STORE_KEY);if(e!=null)try{this.overrides=JSON.parse(e)}catch{un.default.removeItem(rt.OVERRIDES_STORE_KEY)}}},t.prototype.setEvaluationReason=function(e){this.reason=e},t.prototype.save=function(e,n,r){return $n(this,void 0,void 0,function(){var i,s,a,o;return Un(this,function(u){switch(u.label){case 0:return i=(0,pt.getUserCacheKey)(this.getStableID(),e),s=n,s.is_delta?[2,this.saveInitDeltas(e,n,!0,r)]:(this.mergeInitializeResponseIntoUserMap(s,this.values,i,e,function(c){return c},r),a=this.getUserValues(i),a&&i&&i.v2===this.userCacheKey.v2&&(this.userValues=a,this.reason=Je.EvaluationReason.Network),o=this,[4,this.writeValuesToStorage(this.values)]);case 1:return o.values=u.sent(),[2]}})})},t.prototype.saveWithoutUpdatingClientState=function(e,n,r){return $n(this,void 0,void 0,function(){var i,s,a;return Un(this,function(o){switch(o.label){case 0:return i=(0,pt.getUserCacheKey)(this.getStableID(),e),s=n,s.is_delta?[2,this.saveInitDeltas(e,n,!1,r)]:(a=JSON.parse(JSON.stringify(this.values)),this.mergeInitializeResponseIntoUserMap(s,a,i,e,function(u){return u},r),[4,this.writeValuesToStorage(a)]);case 1:return o.sent(),[2]}})})},t.prototype.saveInitDeltas=function(e,n,r,i){var s,a;return $n(this,void 0,void 0,function(){var o,u,c,l,d,f,h,p,g,y,m,v=this;return Un(this,function(_){switch(_.label){case 0:return o=(0,pt.getUserCacheKey)(this.getStableID(),e),u=n,c=JSON.parse(JSON.stringify(this.values)),this.mergeInitializeResponseIntoUserMap(u,c,o,e,function(E,C){var b,S=(b=c[C])!==null&&b!==void 0?b:v.getDefaultUserCacheValues();return v.mergeUserCacheValues(S,E)},i),l=!1,d=void 0,f=!1,h=Object.keys((s=u.prefetched_user_values)!==null&&s!==void 0?s:{}),h.forEach(function(E){var C,b=c[E],S=(C=u.prefetched_user_values)===null||C===void 0?void 0:C[E];if(b&&S){ph(S,b);var R=S.checksum,k=(0,pt.djb2HashForObject)({feature_gates:c[E].feature_gates,dynamic_configs:c[E].dynamic_configs,layer_configs:c[E].layer_configs});R&&R!==k&&(l=!0,d=k),p.hash_used!==u.hash_used&&(f=!0)}}),p=(a=c[o.v2])!==null&&a!==void 0?a:c[o.v1],ph(u,p),g=u.checksum,y=(0,pt.djb2HashForObject)({feature_gates:p.feature_gates,dynamic_configs:p.dynamic_configs,layer_configs:p.layer_configs}),g&&g!==y&&(l=!0,d=y),p.hash_used!==u.hash_used&&(f=!0),l||f?(this.refetchAndSaveValues(e,i,void 0,d,l).catch(function(E){return v.sdkInternal.getErrorBoundary().logError("refetchAndSaveValues",E)}),[2]):r?(p&&o.v2===this.userCacheKey.v2&&(this.userValues=p,this.reason=Je.EvaluationReason.Network),m=this,[4,this.writeValuesToStorage(c)]):[3,2];case 1:return m.values=_.sent(),[3,4];case 2:return[4,this.writeValuesToStorage(c)];case 3:_.sent(),_.label=4;case 4:return[2]}})})},t.prototype.refetchAndSaveValues=function(e,n,r,i,s){return r===void 0&&(r=this.sdkInternal.getOptions().getInitTimeoutMs()),$n(this,void 0,void 0,function(){var a,o,u=this;return Un(this,function(c){return a=this.getLastUpdateTime(e),o=this.getPreviousDerivedFields(e),[2,this.sdkInternal.getNetwork().fetchValues({user:e,sinceTime:a,timeout:r,useDeltas:!1,prefetchUsers:n,previousDerivedFields:o,hadBadDeltaChecksum:s,badChecksum:i}).then(function(l){l!=null&&l.has_updates&&u.saveWithoutUpdatingClientState(e,l,n).catch(function(d){return u.sdkInternal.getErrorBoundary().logError("refetchAndSaveValues:then",d)})}).catch(function(l){return u.sdkInternal.getErrorBoundary().logError("refetchAndSaveValues",l)})]})})},t.prototype.getStableID=function(){return this.sdkInternal.getStableID()},t.prototype.mergeInitializeResponseIntoUserMap=function(e,n,r,i,s,a){if(e.prefetched_user_values)for(var o=Object.keys(e.prefetched_user_values),u=0,c=o;u<c.length;u++){var l=c[u],d=e.prefetched_user_values[l],f=s(this.convertAPIDataToCacheValues(d,l),l);if(e.has_updates&&e.time&&a){var h=(0,pt.djb2HashForObject)(a[l]);f.user_hash=h}n[l]=f}if(r){var p=this.convertAPIDataToCacheValues(e,r.v2);if(e.has_updates&&e.time){var h=(0,pt.djb2HashForObject)(i);p.user_hash=h}n[r.v2]=s(p,r.v2)}},t.prototype.getDefaultUserCacheValues=function(){return{feature_gates:{},layer_configs:{},dynamic_configs:{},sticky_experiments:{},time:0,evaluation_time:0,derived_fields:{}}},t.prototype.mergeUserCacheValues=function(e,n){return{feature_gates:Ot(Ot({},e.feature_gates),n.feature_gates),layer_configs:Ot(Ot({},e.layer_configs),n.layer_configs),dynamic_configs:Ot(Ot({},e.dynamic_configs),n.dynamic_configs),sticky_experiments:e.sticky_experiments,time:n.time,evaluation_time:n.evaluation_time,derived_fields:n.derived_fields,hash_used:n.hash_used,user_hash:n.user_hash}},t.prototype.writeValuesToStorage=function(e){return $n(this,void 0,void 0,function(){var n;return Un(this,function(r){switch(r.label){case 0:return e[this.userCacheKey.v2]&&delete e[this.userCacheKey.v1],n=Object.entries(e).sort(function(i,s){var a,o,u=i[1],c=s[1];return u==null?1:c==null?-1:((a=c==null?void 0:c.evaluation_time)!==null&&a!==void 0?a:c==null?void 0:c.time)-((o=u==null?void 0:u.evaluation_time)!==null&&o!==void 0?o:u==null?void 0:u.time)}).slice(0,bD),e=Object.fromEntries(n),on.default.asyncStorage?[4,on.default.setItemAsync(rt.INTERNAL_STORE_KEY,JSON.stringify(e))]:[3,2];case 1:return r.sent(),[3,3];case 2:un.default.setItem(rt.INTERNAL_STORE_KEY,JSON.stringify(e)),r.label=3;case 3:return[2,e]}})})},t.prototype.checkGate=function(e,n){var r;n===void 0&&(n=!1);var i=this.getHashedSpecName(e),s={name:e,value:!1,rule_id:"",secondary_exposures:[]},a;if(!n&&this.overrides.gates[e]!=null)s={name:e,value:this.overrides.gates[e],rule_id:"override",secondary_exposures:[]},a=this.getEvaluationDetails(!1,Je.EvaluationReason.LocalOverride);else{var o=(r=this.userValues)===null||r===void 0?void 0:r.feature_gates[i];o&&(s=o),a=this.getEvaluationDetails(o!=null)}return{evaluationDetails:a,gate:s}},t.prototype.getConfig=function(e,n){var r,i;n===void 0&&(n=!1);var s=this.getHashedSpecName(e),a,o;if(!n&&this.overrides.configs[e]!=null)o=this.getEvaluationDetails(!1,Je.EvaluationReason.LocalOverride),a=new Ys.default(e,this.overrides.configs[e],"override",o,[],"",this.makeOnConfigDefaultValueFallback(this.sdkInternal.getCurrentUser()));else if(((r=this.userValues)===null||r===void 0?void 0:r.dynamic_configs[s])!=null){var u=(i=this.userValues)===null||i===void 0?void 0:i.dynamic_configs[s];o=this.getEvaluationDetails(!0),a=this.createDynamicConfig(e,u,o)}else o=this.getEvaluationDetails(!1),a=new Ys.default(e,{},"",o);return a},t.prototype.getExperiment=function(e,n,r){n===void 0&&(n=!1),r===void 0&&(r=!1);var i,s;if(!r&&this.overrides.configs[e]!=null)s=this.getEvaluationDetails(!1,Je.EvaluationReason.LocalOverride),i=new Ys.default(e,this.overrides.configs[e],"override",s);else{var a=this.getLatestValue(e,"dynamic_configs");s=this.getEvaluationDetails(a!=null);var o=this.getPossiblyStickyValue(e,a,n,!1,s);i=this.createDynamicConfig(e,o,s)}return i},t.prototype.getLayer=function(e,n,r){var i,s,a,o;if(this.overrides.layers[n]!=null){var u=this.getEvaluationDetails(!1,Je.EvaluationReason.LocalOverride);return hh.default._create(n,(i=this.overrides.layers[n])!==null&&i!==void 0?i:{},"override",u,e)}var c=this.getLatestValue(n,"layer_configs"),l=this.getEvaluationDetails(c!=null),d=this.getPossiblyStickyValue(n,c,r,!0,l);return hh.default._create(n,(s=d==null?void 0:d.value)!==null&&s!==void 0?s:{},(a=d==null?void 0:d.rule_id)!==null&&a!==void 0?a:"",l,e,d==null?void 0:d.secondary_exposures,d==null?void 0:d.undelegated_secondary_exposures,(o=d==null?void 0:d.allocated_experiment_name)!==null&&o!==void 0?o:"",d==null?void 0:d.explicit_parameters,d==null?void 0:d.group_name)},t.prototype.overrideConfig=function(e,n){try{JSON.stringify(n)}catch(r){console.warn("Failed to stringify given config override.  Dropping",r);return}this.overrides.configs[e]=n,this.saveOverrides()},t.prototype.overrideLayer=function(e,n){try{JSON.stringify(n)}catch(r){console.warn("Failed to stringify given layer override.  Dropping",r);return}this.overrides.layers[e]=n,this.saveOverrides()},t.prototype.overrideGate=function(e,n){this.overrides.gates[e]=n,this.saveOverrides()},t.prototype.removeGateOverride=function(e){e==null?this.overrides.gates={}:delete this.overrides.gates[e],this.saveOverrides()},t.prototype.removeConfigOverride=function(e){e==null?this.overrides.configs={}:delete this.overrides.configs[e],this.saveOverrides()},t.prototype.removeLayerOverride=function(e){e==null?this.overrides.layers={}:delete this.overrides.layers[e],this.saveOverrides()},t.prototype.getAllOverrides=function(){return this.overrides},t.prototype.saveOverrides=function(){try{un.default.setItem(rt.OVERRIDES_STORE_KEY,JSON.stringify(this.overrides))}catch{console.warn("Failed to persist gate/config overrides")}},t.prototype.getLatestValue=function(e,n){var r,i,s,a,o,u=this.getHashedSpecName(e);return(s=(i=(r=this.userValues)===null||r===void 0?void 0:r[n])===null||i===void 0?void 0:i[u])!==null&&s!==void 0?s:(o=(a=this.userValues)===null||a===void 0?void 0:a[n])===null||o===void 0?void 0:o[e]},t.prototype.getPossiblyStickyValue=function(e,n,r,i,s){var a,o=this.getHashedSpecName(e);if(!r)return this.removeStickyValue(o),n;var u=this.getStickyValue(o);if(!u)return this.attemptToSaveStickyValue(o,n),n;var c=null;return i?c=this.getLatestValue((a=u==null?void 0:u.allocated_experiment_name)!==null&&a!==void 0?a:"","dynamic_configs"):c=n,(c==null?void 0:c.is_experiment_active)==!0?(s.reason=Je.EvaluationReason.Sticky,u):((n==null?void 0:n.is_experiment_active)==!0?this.attemptToSaveStickyValue(o,n):this.removeStickyValue(o),n)},t.prototype.createDynamicConfig=function(e,n,r){var i,s,a;return new Ys.default(e,(i=n==null?void 0:n.value)!==null&&i!==void 0?i:{},(s=n==null?void 0:n.rule_id)!==null&&s!==void 0?s:"",r,n==null?void 0:n.secondary_exposures,(a=n==null?void 0:n.allocated_experiment_name)!==null&&a!==void 0?a:"",this.makeOnConfigDefaultValueFallback(this.sdkInternal.getCurrentUser()),n==null?void 0:n.group_name,n==null?void 0:n.id_type,n==null?void 0:n.is_experiment_active)},t.prototype.getStickyValue=function(e){var n,r;return(r=(n=this.userValues)===null||n===void 0?void 0:n.sticky_experiments[e])!==null&&r!==void 0?r:this.stickyDeviceExperiments[e]},t.prototype.attemptToSaveStickyValue=function(e,n){var r;!n||!n.is_user_in_experiment||!n.is_experiment_active||(n.is_device_based===!0?this.stickyDeviceExperiments[e]=n:!((r=this.userValues)===null||r===void 0)&&r.sticky_experiments&&(this.userValues.sticky_experiments[e]=n),this.saveStickyValuesToStorage())},t.prototype.removeStickyValue=function(e){var n,r,i,s;Object.keys((r=(n=this.userValues)===null||n===void 0?void 0:n.sticky_experiments)!==null&&r!==void 0?r:{}).length===0&&Object.keys((i=this.stickyDeviceExperiments)!==null&&i!==void 0?i:{}).length===0||((s=this.userValues)===null||s===void 0||delete s.sticky_experiments[e],delete this.stickyDeviceExperiments[e],this.saveStickyValuesToStorage())},t.prototype.saveStickyValuesToStorage=function(){this.userPersistentStorageAdapter?this.saveStickyExperimentsToPersistentStorageAdapter():(this.values[this.userCacheKey.v2]=this.userValues,this.setItemToStorage(rt.INTERNAL_STORE_KEY,JSON.stringify(this.values)),this.setItemToStorage(rt.STICKY_DEVICE_EXPERIMENTS_KEY,JSON.stringify(this.stickyDeviceExperiments)))},t.prototype.getGlobalEvaluationDetails=function(){var e,n;return{reason:(e=this.reason)!==null&&e!==void 0?e:Je.EvaluationReason.Uninitialized,time:(n=this.userValues.evaluation_time)!==null&&n!==void 0?n:0}},t.prototype.getEvaluationDetails=function(e,n){var r;return e?{reason:this.reason,time:(r=this.userValues.evaluation_time)!==null&&r!==void 0?r:Date.now()}:{reason:n??(this.reason==Je.EvaluationReason.Uninitialized?Je.EvaluationReason.Uninitialized:Je.EvaluationReason.Unrecognized),time:Date.now()}},t.prototype.resetUserValues=function(){this.userValues={feature_gates:{},dynamic_configs:{},sticky_experiments:{},layer_configs:{},time:0,evaluation_time:0,derived_fields:{}}},t.prototype.getHashedSpecName=function(e){switch(this.userValues.hash_used){case"djb2":return(0,pt.djb2Hash)(e);case"none":return e;default:return(0,pt.sha256Hash)(e)}},t.prototype.convertAPIDataToCacheValues=function(e,n){var r,i;return{feature_gates:e.feature_gates,layer_configs:e.layer_configs,dynamic_configs:e.dynamic_configs,sticky_experiments:(i=(r=this.values[n])===null||r===void 0?void 0:r.sticky_experiments)!==null&&i!==void 0?i:{},time:e.time==null||isNaN(e.time)?0:e.time,evaluation_time:Date.now(),hash_used:e.hash_used,derived_fields:e.derived_fields}},t.prototype.setItemToStorage=function(e,n){var r=this;on.default.asyncStorage?on.default.setItemAsync(e,n).catch(function(i){r.sdkInternal.getErrorBoundary().logError("setItemToStorage",i)}):un.default.setItem(e,n)},t.prototype.makeOnConfigDefaultValueFallback=function(e){var n=this;return function(r,i,s,a){n.isLoaded()&&n.sdkInternal.getLogger().logConfigDefaultValueFallback(e,"Parameter "+i+" is a value of type "+a+`.
          Returning requested defaultValue type `+s,{name:r.getName(),ruleID:r.getRuleID(),parameter:i,defaultValueType:s,valueType:a})}},t}();Il.default=SD;function ph(t,e){var n,r,i;((n=t.deleted_configs)!==null&&n!==void 0?n:[]).forEach(function(s){delete e.dynamic_configs[s]}),((r=t.deleted_gates)!==null&&r!==void 0?r:[]).forEach(function(s){delete e.feature_gates[s]}),((i=t.deleted_layers)!==null&&i!==void 0?i:[]).forEach(function(s){delete e.layer_configs[s]})}var xl={};Object.defineProperty(xl,"__esModule",{value:!0});var gh=Tl,ED=function(){function t(e){this.logLevel=e}return t.prototype.info=function(e){this.logLevel!==gh.LogLevel.NONE&&console.log(e)},t.prototype.error=function(e){this.logLevel===gh.LogLevel.DEBUG&&console.error(e)},t}();xl.default=ED;var Ba=A&&A.__assign||function(){return Ba=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ba.apply(this,arguments)},Bt=A&&A.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((r=r.apply(t,e||[])).next())})},Ht=A&&A.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},at=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($a,"__esModule",{value:!0});var TD=at(hs),ID=at(Ry),Ct=Cn,mh=at(ps),wD=at(Co),CD=at(bl),kD=at(Sl),xD=at(El),RD=at(Tl),OD=at(Il),ou=qr,_h=Ue,yh=at(ur),vh=at(di),cn=at(An),AD=at(xl),vi=tr,jt=64,uu=2048,DD=function(){function t(e,n,r){var i=this;if(this.appState=null,this.currentAppState=null,this.onCacheLoadedForReact=null,this.initCalled=!1,this.pendingInitPromise=null,this.optionalLoggingSetup=!1,this.prefetchedUsersByCacheKey={},this.logLayerParameterExposureForLayer=function(a,o,u){u===void 0&&(u=!1);var c="",l=a._getUndelegatedSecondaryExposures(),d=a._getExplicitParameters().includes(o);d&&(c=a._getAllocatedExperimentName(),l=a._getSecondaryExposures()),i.logger.logLayerExposure(i.getCurrentUser(),a.getName(),a.getRuleID(),l,c,o,d,a._getEvaluationDetails(),u)},(r==null?void 0:r.localMode)!==!0&&(typeof e!="string"||!e.startsWith("client-")))throw new Ct.StatsigInvalidArgumentError("Invalid key provided.  You must use a Client SDK Key from the Statsig console to initialize the sdk");if(this.startTime=(0,vi.now)(),this.options=new RD.default(r),this.logger=new kD.default(this),cn.default.initialize({options:this.options}),this.errorBoundary=new ID.default(e),this.ready=!1,this.sdkKey=e,this.consoleLogger=new AD.default(this.options.getLogLevel()),vh.default.disabled=this.options.getDisableLocalStorage(),this.identity=new CD.default(this.normalizeUser(n??null),this.options.getOverrideStableID(),t.reactNativeUUID),this.network=new xD.default(this),this.store=new OD.default(this,this.options.getInitializeValues()),this.errorBoundary.setStatsigMetadata(this.getStatsigMetadata()),this.options.getInitializeValues()!=null){var s=this.options.getInitCompletionCallback();this.ready=!0,this.initCalled=!0,setTimeout(function(){return i.delayedSetup()},20),this.handleOptionalLogging(),s&&s((0,vi.now)()-this.startTime,!0,null)}}return t.prototype.getErrorBoundary=function(){return this.errorBoundary},t.prototype.getNetwork=function(){return this.network},t.prototype.getStore=function(){return this.store},t.prototype.getLogger=function(){return this.logger},t.prototype.getOptions=function(){return this.options},t.prototype.getSDKKey=function(){var e=this;return this.errorBoundary.capture("getSDKKey",function(){var n;return(n=e.sdkKey)!==null&&n!==void 0?n:""},function(){return""})},t.prototype.getCurrentUser=function(){var e=this;return this.errorBoundary.capture("getCurrentUser",function(){return e.identity.getUser()},function(){return null})},t.prototype.getCurrentUserCacheKey=function(){var e=this;return this.errorBoundary.capture("getCurrentUserCacheKey",function(){return(0,_h.getUserCacheKey)(e.getStableID(),e.getCurrentUser())},function(){return{v1:"",v2:""}})},t.prototype.getCurrentUserUnitID=function(e){var n=this;return this.errorBoundary.capture("getCurrentUserUnitID",function(){return n.getUnitID(n.getCurrentUser(),e)},function(){return""})},t.prototype.getCurrentUserID=function(){var e=this;return this.errorBoundary.capture("getCurrentUserID",function(){return e.getUnitID(e.getCurrentUser(),"userid")},function(){return""})},t.prototype.getUnitID=function(e,n){var r,i,s;return e?n.toLowerCase()==="userid"?(i=(r=e.userID)===null||r===void 0?void 0:r.toString())!==null&&i!==void 0?i:null:e.customIDs?(s=e.customIDs[n])!==null&&s!==void 0?s:e.customIDs[n.toLowerCase()]:null:null},t.prototype.getStatsigMetadata=function(){var e=this;return this.errorBoundary.capture("getStatsigMetadata",function(){return e.identity.getStatsigMetadata()},function(){return{}})},t.prototype.getSDKType=function(){var e=this;return this.errorBoundary.capture("getSDKType",function(){return e.identity.getSDKType()},function(){return""})},t.prototype.getSDKVersion=function(){var e=this;return this.errorBoundary.capture("getSDKVersion",function(){return e.identity.getSDKVersion()},function(){return""})},t.prototype.getConsoleLogger=function(){return this.consoleLogger},t.prototype.delayedSetup=function(){var e=this;this.errorBoundary.swallow("delayedSetup",function(){e.options.getInitializeValues()!=null&&e.fireAndForgetPrefechUsers(),e.identity.saveStableID(),e.logger.sendSavedRequests().catch(function(n){return e.errorBoundary.logError("sendSavedRequests:delayedSetup",n)})})},t.prototype.setInitializeValues=function(e){var n=this;this.errorBoundary.capture("setInitializeValues",function(){n.store.bootstrap(e);var r=null;n.ready||(n.ready=!0,n.initCalled=!0,r=n.options.getInitCompletionCallback()),n.handleOptionalLogging(),n.logger.sendSavedRequests().catch(function(i){return n.errorBoundary.logError("sendSavedRequests:setInitializeValues",i)}),r&&r((0,vi.now)()-n.startTime,!0,null)},function(){n.ready=!0,n.initCalled=!0;var r=n.options.getInitCompletionCallback();r&&r((0,vi.now)()-n.startTime,!1,"Caught an exception during setInitializeValues")})},t.prototype.initializeAsync=function(){return Bt(this,void 0,void 0,function(){var e=this;return Ht(this,function(n){return[2,this.errorBoundary.capture("initializeAsync",function(){return Bt(e,void 0,void 0,function(){var r,i=this,s;return Ht(this,function(a){switch(a.label){case 0:return this.pendingInitPromise!=null?[2,this.pendingInitPromise]:this.ready?[2,Promise.resolve()]:(cn.default.mark.overall.start({}),this.initCalled=!0,yh.default.asyncStorage?[4,this.identity.initAsync()]:[3,3]);case 1:return a.sent(),[4,this.store.loadAsync()];case 2:a.sent(),a.label=3;case 3:return(s=this.onCacheLoadedForReact)===null||s===void 0||s.call(this),this.appState&&this.appState.addEventListener&&typeof this.appState.addEventListener=="function"&&(this.currentAppState=this.appState.currentState,this.appState.addEventListener("change",this.handleAppStateChange.bind(this))),this.options.getLocalModeEnabled()?[2,Promise.resolve()]:(r=this.identity.getUser(),this.pendingInitPromise=this.fetchAndSaveValues({user:r,prefetchUsers:this.options.getPrefetchUsers(),timeout:this.options.getInitTimeoutMs()}).then(function(){return cn.default.mark.overall.end({success:!0,evaluationDetails:i.store.getGlobalEvaluationDetails()}),{success:!0,message:null}}).catch(function(o){var u;return i.errorBoundary.logError("initializeAsync:fetchAndSaveValues",o),cn.default.mark.overall.end({success:!1,error:cn.default.formatError(o),evaluationDetails:i.store.getGlobalEvaluationDetails()}),{success:!1,message:(u=o.message)!==null&&u!==void 0?u:null}}).then(function(o){var u=o.success,c=o.message,l=i.options.getInitCompletionCallback();l&&l((0,vi.now)()-i.startTime,u,c)}).finally(function(){return Bt(i,void 0,void 0,function(){return Ht(this,function(o){return this.pendingInitPromise=null,this.ready=!0,this.delayedSetup(),this.logger.logDiagnostics(r,"initialize"),[2]})})}),this.handleOptionalLogging(),[2,this.pendingInitPromise])}})})},function(){return e.ready=!0,e.initCalled=!0,Promise.resolve()})]})})},t.prototype.prefetchUsers=function(e){return Bt(this,void 0,void 0,function(){var n=this;return Ht(this,function(r){return[2,this.errorBoundary.capture("prefetchUsers",function(){if(!(!e||e.length==0))return n.fetchAndSaveValues({user:null,prefetchUsers:e,timeout:0})},function(){return Promise.resolve()})]})})},t.prototype.getEvaluationDetails=function(){var e=this;return this.errorBoundary.capture("getEvaluationDetails",function(){return e.store.getGlobalEvaluationDetails()},function(){return{time:Date.now(),reason:ou.EvaluationReason.Error}})},t.prototype.checkGate=function(e,n){var r=this;return n===void 0&&(n=!1),this.errorBoundary.capture("checkGate",function(){var i=r.checkGateImpl(e,n);r.logGateExposureImpl(e,i);var s=r.options.getGateEvaluationCallback();return s&&s(e,i.gate.value,{withExposureLoggingDisabled:!1}),i.gate.value===!0},function(){return!1},{configName:e})},t.prototype.checkGateWithExposureLoggingDisabled=function(e,n){var r=this;return n===void 0&&(n=!1),this.errorBoundary.capture("checkGateWithExposureLoggingDisabled",function(){var i=r.checkGateImpl(e,n),s=r.options.getGateEvaluationCallback();return s&&s(e,i.gate.value,{withExposureLoggingDisabled:!0}),i.gate.value===!0},function(){return!1})},t.prototype.logGateExposure=function(e){var n=this;this.errorBoundary.swallow("logGateExposure",function(){n.logGateExposureImpl(e)})},t.prototype.getConfig=function(e,n){var r=this;return n===void 0&&(n=!1),this.errorBoundary.capture("getConfig",function(){var i=r.getConfigImpl(e,n);return r.logConfigExposureImpl(e,i),i},function(){return r.getEmptyConfig(e)},{configName:e})},t.prototype.getConfigWithExposureLoggingDisabled=function(e,n){var r=this;return n===void 0&&(n=!1),this.errorBoundary.capture("getConfig",function(){return r.getConfigImpl(e,n)},function(){return r.getEmptyConfig(e)})},t.prototype.logConfigExposure=function(e){var n=this;this.errorBoundary.swallow("logConfigExposure",function(){n.logConfigExposureImpl(e)})},t.prototype.getExperiment=function(e,n,r){var i=this;return n===void 0&&(n=!1),r===void 0&&(r=!1),this.errorBoundary.capture("getExperiment",function(){var s=i.getExperimentImpl(e,n,r);return i.logExperimentExposureImpl(e,n,s),s},function(){return i.getEmptyConfig(e)},{configName:e})},t.prototype.getExperimentWithExposureLoggingDisabled=function(e,n,r){var i=this;return n===void 0&&(n=!1),r===void 0&&(r=!1),this.errorBoundary.capture("getExperimentWithExposureLoggingDisabled",function(){return i.getExperimentImpl(e,n,r)},function(){return i.getEmptyConfig(e)})},t.prototype.logExperimentExposure=function(e,n){var r=this;this.errorBoundary.swallow("logExperimentExposure",function(){r.logExperimentExposureImpl(e,n)})},t.prototype.getLayer=function(e,n){var r=this;return n===void 0&&(n=!1),this.errorBoundary.capture("getLayer",function(){return r.getLayerImpl(r.logLayerParameterExposureForLayer,e,n)},function(){return mh.default._create(e,{},"",r.getEvalutionDetailsForError())},{configName:e})},t.prototype.getLayerWithExposureLoggingDisabled=function(e,n){var r=this;return n===void 0&&(n=!1),this.errorBoundary.capture("getLayerWithExposureLoggingDisabled",function(){return r.getLayerImpl(null,e,n)},function(){return mh.default._create(e,{},"",r.getEvalutionDetailsForError())})},t.prototype.logLayerParameterExposure=function(e,n,r){var i=this;r===void 0&&(r=!1),this.errorBoundary.swallow("logLayerParameterExposure",function(){var s=i.getLayerImpl(null,e,r);i.logLayerParameterExposureForLayer(s,n,!0)})},t.prototype.logEvent=function(e,n,r){var i=this;n===void 0&&(n=null),r===void 0&&(r=null),this.errorBoundary.swallow("logEvent",function(){if(!i.logger||!i.sdkKey)throw new Ct.StatsigUninitializedError("Must initialize() before logging events.");if(typeof e!="string"||e.length===0){i.consoleLogger.error("Event not logged. No valid eventName passed.");return}i.shouldTrimParam(e,jt)&&(i.consoleLogger.info("eventName is too long, trimming to "+jt+" characters."),e=e.substring(0,jt)),typeof n=="string"&&i.shouldTrimParam(n,jt)&&(i.consoleLogger.info("value is too long, trimming to "+jt+"."),n=n.substring(0,jt)),i.shouldTrimParam(r,uu)&&(i.consoleLogger.info("metadata is too big. Dropping the metadata."),r={error:"not logged due to size too large"});var s=new wD.default(e);s.setValue(n),s.setMetadata(r),s.setUser(i.getCurrentUser()),i.logger.log(s)})},t.prototype.updateUserWithValues=function(e,n){var r=this,i;return this.errorBoundary.capture("updateUserWithValues",function(){var s=Date.now();if(!r.initializeCalled())throw new Ct.StatsigUninitializedError("Call initialize() first.");return i=function(a,o){var u=r.options.getUpdateUserCompletionCallback();u==null||u(Date.now()-s,a,o)},r.identity.updateUser(r.normalizeUser(e)),r.store.bootstrap(n),i(!0,null),!0},function(){return i==null||i(!1,"Failed to update user. An unexpected error occured."),!1})},t.prototype.updateUser=function(e){return Bt(this,void 0,void 0,function(){var n,r=this;return Ht(this,function(i){return[2,this.errorBoundary.capture("updateUser",function(){return Bt(r,void 0,void 0,function(){var s,a,o,u,c,l=this;return Ht(this,function(d){switch(d.label){case 0:if(s=Date.now(),!this.initializeCalled())throw new Ct.StatsigUninitializedError("Call initialize() first.");return n=function(f,h){var p=l.options.getUpdateUserCompletionCallback();p==null||p(Date.now()-s,f,h)},this.identity.updateUser(this.normalizeUser(e)),a=this.getCurrentUserCacheKey(),o=!!this.prefetchedUsersByCacheKey[a.v2],u=this.store.updateUser(o),cn.default.clearContext("api_call"),this.logger.resetDedupeKeys(),u!=null&&(o||this.isCacheValidForFetchMode(u))?(n(!0,null),[2,Promise.resolve(!0)]):this.pendingInitPromise==null?[3,2]:[4,this.pendingInitPromise];case 1:d.sent(),d.label=2;case 2:return this.options.getLocalModeEnabled()?(n(!0,null),[2,Promise.resolve(!0)]):(c=this.identity.getUser(),this.pendingInitPromise=this.fetchAndSaveValues({user:c,prefetchUsers:[],timeout:void 0}).finally(function(){l.pendingInitPromise=null}),[2,this.pendingInitPromise.then(function(){return n(!0,null),Promise.resolve(!0)}).catch(function(f){return n(!1,"Failed to update user: "+f),Promise.resolve(!1)})])}})})},function(){return n==null||n(!1,"Failed to update user. An unexpected error occured."),Promise.resolve(!1)})]})})},t.prototype.shutdown=function(){var e=this;this.errorBoundary.swallow("shutdown",function(){e.logger.shutdown(),e.appState&&e.appState.removeEventListener&&typeof e.appState.removeEventListener=="function"&&e.appState.removeEventListener("change",e.handleAppStateChange.bind(e)),vh.default.cleanup()})},t.prototype.overrideGate=function(e,n){var r=this;this.errorBoundary.swallow("overrideGate",function(){r.ensureStoreLoaded(),r.store.overrideGate(e,n)})},t.prototype.overrideConfig=function(e,n){var r=this;this.errorBoundary.swallow("overrideConfig",function(){r.ensureStoreLoaded(),r.store.overrideConfig(e,n)})},t.prototype.overrideLayer=function(e,n){var r=this;this.errorBoundary.swallow("overrideLayer",function(){r.ensureStoreLoaded(),r.store.overrideLayer(e,n)})},t.prototype.removeGateOverride=function(e){var n=this;this.errorBoundary.swallow("removeGateOverride",function(){n.ensureStoreLoaded(),n.store.removeGateOverride(e)})},t.prototype.removeConfigOverride=function(e){var n=this;this.errorBoundary.swallow("removeConfigOverride",function(){n.ensureStoreLoaded(),n.store.removeConfigOverride(e)})},t.prototype.removeLayerOverride=function(e){var n=this;this.errorBoundary.swallow("removeLayerOverride",function(){n.ensureStoreLoaded(),n.store.removeLayerOverride(e)})},t.prototype.removeOverride=function(e){var n=this;this.errorBoundary.swallow("removeOverride",function(){n.ensureStoreLoaded(),n.store.removeGateOverride(e)})},t.prototype.getOverrides=function(){var e=this;return this.errorBoundary.capture("getOverrides",function(){return e.ensureStoreLoaded(),e.store.getAllOverrides().gates},function(){return{}})},t.prototype.getAllOverrides=function(){var e=this;return this.errorBoundary.capture("getAllOverrides",function(){return e.ensureStoreLoaded(),e.store.getAllOverrides()},function(){return{gates:{},configs:{},layers:{}}})},t.prototype.getStableID=function(){var e=this;return this.errorBoundary.capture("getStableID",function(){return e.identity.getStatsigMetadata().stableID},function(){return""})},t.prototype.initializeCalled=function(){return this.initCalled},t.prototype.setSDKPackageInfo=function(e){e!=null&&(this.identity.setSDKPackageInfo(e),this.errorBoundary.setStatsigMetadata(this.getStatsigMetadata()))},t.setAsyncStorage=function(e){e!=null&&(yh.default.asyncStorage=e)},t.prototype.setOnCacheLoadedReactCallback=function(e){this.onCacheLoadedForReact=e??null},t.setReactNativeUUID=function(e){e!=null&&(t.reactNativeUUID=e)},t.prototype.setAppState=function(e){e!=null&&(this.appState=e)},t.prototype.setNativeModules=function(e){e!=null&&this.identity.setNativeModules(e)},t.prototype.setPlatform=function(e){e!=null&&this.identity.setPlatform(e)},t.prototype.setRNDeviceInfo=function(e){e!=null&&this.identity.setRNDeviceInfo(e)},t.prototype.setExpoConstants=function(e){e!=null&&this.identity.setExpoConstants(e)},t.prototype.setExpoDevice=function(e){e!=null&&this.identity.setExpoDevice(e)},t.prototype.flushEvents=function(){this.logger.flush()},t.prototype.reenableAllLogging=function(){this.getOptions().reenableAllLogging()},t.prototype.isCacheValidForFetchMode=function(e){return this.options.getFetchMode()!=="cache-or-network"?!1:e>this.startTime},t.prototype.handleOptionalLogging=function(){var e=this,n=this.options.getDisableErrorLogging(),r=this.options.getDisableAutoMetricsLogging();if(!(n&&r)&&!(this.optionalLoggingSetup||typeof window>"u"||!window||!window.addEventListener)){var i=this.identity.getUser();if(n||window.addEventListener("error",function(a){var o,u=a.error;if(u!=null&&typeof u=="object")try{u=JSON.stringify(u)}catch{u="Failed to stringify Error"}e.logger.logAppError(i,(o=a.message)!==null&&o!==void 0?o:"",{filename:a.filename,lineno:a.lineno,colno:a.colno,error_obj:u})}),!r){if(typeof document>"u"||!document||typeof setTimeout>"u"||!setTimeout)return;var s=function(){setTimeout(function(){e.logger.logAppMetrics(i)},1e3)};document.readyState==="complete"?s():window.addEventListener("load",function(){return s()})}this.optionalLoggingSetup=!0}},t.prototype.handleAppStateChange=function(e){var n=this,r;this.currentAppState==="active"&&e.match(/inactive|background/)?this.logger.flush(!0):!((r=this.currentAppState)===null||r===void 0)&&r.match(/inactive|background/)&&e==="active"&&this.logger.sendSavedRequests().catch(function(i){return n.errorBoundary.logError("sendSavedRequests:handleAppStateChange",i)}),this.currentAppState=e},t.prototype.shouldTrimParam=function(e,n){return e==null?!1:typeof e=="string"?e.length>n:typeof e=="object"?JSON.stringify(e).length>n:typeof e=="number"?e.toString().length>n:!1},t.prototype.normalizePrefetchUsers=function(e){var n=this;return e==null?[]:e.map(function(r){return n.normalizeUser(r)})},t.prototype.normalizeUser=function(e){var n={};try{n=JSON.parse(JSON.stringify(e))}catch{throw new Ct.StatsigInvalidArgumentError("User object must be convertable to JSON string.")}return n=this.trimUserObjIfNeeded(n),this.options.getEnvironment()!=null&&(n.statsigEnvironment=this.options.getEnvironment()),n},t.prototype.trimUserObjIfNeeded=function(e){var n,r;return e==null?{}:(this.shouldTrimParam((n=e.userID)!==null&&n!==void 0?n:null,jt)&&(this.consoleLogger.info("User ID is too large, trimming to "+jt+"characters"),e.userID=(r=e.userID)===null||r===void 0?void 0:r.toString().substring(0,jt)),this.shouldTrimParam(e,uu)&&(e.custom={},this.shouldTrimParam(e,uu)?(this.consoleLogger.info("User object is too large, only keeping the user ID."),e={userID:e.userID}):this.consoleLogger.info("User object is too large, dropping the custom property.")),e)},t.prototype.ensureStoreLoaded=function(){if(!this.store.isLoaded())throw new Ct.StatsigUninitializedError("Call and wait for initialize() to finish first.")},t.prototype.getEvalutionDetailsForError=function(){return{time:Date.now(),reason:ou.EvaluationReason.Error}},t.prototype.fetchAndSaveValues=function(e){var n,r;return Bt(this,void 0,void 0,function(){var i,s,a,o,u,c,l=this;return Ht(this,function(d){return i=e.user,s=(n=e.prefetchUsers)!==null&&n!==void 0?n:[],a=(r=e.timeout)!==null&&r!==void 0?r:this.options.getInitTimeoutMs(),s.length>5&&this.consoleLogger.info("Cannot prefetch more than 5 users."),o=this.normalizePrefetchUsers(s).slice(0,5).reduce(function(f,h){return f[(0,_h.getUserCacheKey)(l.getStableID(),h).v2]=h,f},{}),u=null,s.length===0&&(u=this.store.getLastUpdateTime(i)),c=this.store.getPreviousDerivedFields(i),[2,this.network.fetchValues({user:i,sinceTime:u,timeout:a,useDeltas:u!=null,prefetchUsers:s.length>0?o:void 0,previousDerivedFields:c}).eventually(function(f){f!=null&&f.has_updates&&l.store.saveWithoutUpdatingClientState(i,f,s.length>0?o:void 0).catch(function(h){return l.errorBoundary.logError("fetchAndSaveValues:eventually",h)})}).then(function(f){return Bt(l,void 0,void 0,function(){var h=this;return Ht(this,function(p){return[2,this.errorBoundary.swallow("fetchAndSaveValues",function(){return Bt(h,void 0,void 0,function(){return Ht(this,function(g){switch(g.label){case 0:return cn.default.mark.intialize.process.start({}),f!=null&&f.has_updates?[4,this.store.save(i,f,s.length>0?o:void 0)]:[3,2];case 1:return g.sent(),[3,3];case 2:f!=null&&f.is_no_content&&this.store.setEvaluationReason(ou.EvaluationReason.NetworkNotModified),g.label=3;case 3:return this.prefetchedUsersByCacheKey=Ba(Ba({},this.prefetchedUsersByCacheKey),o),cn.default.mark.intialize.process.end({success:!0}),[2]}})})})]})})})]})})},t.prototype.checkGateImpl=function(e,n){if(this.ensureStoreLoaded(),typeof e!="string"||e.length===0)throw new Ct.StatsigInvalidArgumentError("Must pass a valid string as the gateName.");return this.store.checkGate(e,n)},t.prototype.logGateExposureImpl=function(e,n){var r=!n,i=n??this.checkGateImpl(e,!1),s=i.gate;this.logger.logGateExposure(this.getCurrentUser(),e,s.value,s.rule_id,s.secondary_exposures,i.evaluationDetails,r)},t.prototype.getConfigImpl=function(e,n){if(this.ensureStoreLoaded(),typeof e!="string"||e.length===0)throw new Ct.StatsigInvalidArgumentError("Must pass a valid string as the configName.");return this.store.getConfig(e,n)},t.prototype.logConfigExposureImpl=function(e,n){var r=!n,i=n??this.getConfigImpl(e,!1);this.logger.logConfigExposure(this.getCurrentUser(),e,i.getRuleID(),i._getSecondaryExposures(),i.getEvaluationDetails(),r)},t.prototype.getExperimentImpl=function(e,n,r){if(this.ensureStoreLoaded(),typeof e!="string"||e.length===0)throw new Ct.StatsigInvalidArgumentError("Must pass a valid string as the experimentName.");return this.store.getExperiment(e,n,r)},t.prototype.logExperimentExposureImpl=function(e,n,r){var i=!r,s=r??this.getExperimentImpl(e,n,!1);this.logger.logConfigExposure(this.getCurrentUser(),e,s.getRuleID(),s._getSecondaryExposures(),s.getEvaluationDetails(),i)},t.prototype.getLayerImpl=function(e,n,r){if(this.ensureStoreLoaded(),typeof n!="string"||n.length===0)throw new Ct.StatsigInvalidArgumentError("Must pass a valid string as the layerName.");return this.store.getLayer(e,n,r)},t.prototype.getEmptyConfig=function(e){return new TD.default(e,{},"",this.getEvalutionDetailsForError())},t.prototype.fireAndForgetPrefechUsers=function(){this.prefetchUsers(this.options.getPrefetchUsers()).catch(function(){})},t}();$a.default=DD;var Rl={};Object.defineProperty(Rl,"__esModule",{value:!0});function MD(){Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r})}Rl.default=MD;var Ol={};Object.defineProperty(Ol,"__esModule",{value:!0});function LD(){Object.fromEntries||(Object.fromEntries=function(t){for(var e={},n=0,r=t;n<r.length;n++){var i=r[n];if(Object(i)!==i)throw new TypeError("iterable for fromEntries should yield objects");var s=i[0],a=i[1];Object.defineProperty(e,s,{configurable:!0,enumerable:!0,writable:!0,value:a})}return e})}Ol.default=LD;var Al={};Object.defineProperty(Al,"__esModule",{value:!0});function ND(){Promise.prototype.finally=Promise.prototype.finally||function(t){var e=function(n){return Promise.resolve(t()).then(n)};return this.then(function(n){return e(function(){return n})},function(n){return e(function(){return Promise.reject(n)})})}}Al.default=ND;(function(t){var e=A&&A.__awaiter||function(m,v,_,E){function C(b){return b instanceof _?b:new _(function(S){S(b)})}return new(_||(_=Promise))(function(b,S){function R(w){try{I(E.next(w))}catch(O){S(O)}}function k(w){try{I(E.throw(w))}catch(O){S(O)}}function I(w){w.done?b(w.value):C(w.value).then(R,k)}I((E=E.apply(m,v||[])).next())})},n=A&&A.__generator||function(m,v){var _={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},E,C,b,S;return S={next:R(0),throw:R(1),return:R(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function R(I){return function(w){return k([I,w])}}function k(I){if(E)throw new TypeError("Generator is already executing.");for(;_;)try{if(E=1,C&&(b=I[0]&2?C.return:I[0]?C.throw||((b=C.return)&&b.call(C),0):C.next)&&!(b=b.call(C,I[1])).done)return b;switch(C=0,b&&(I=[I[0]&2,b.value]),I[0]){case 0:case 1:b=I;break;case 4:return _.label++,{value:I[1],done:!1};case 5:_.label++,C=I[1],I=[0];continue;case 7:I=_.ops.pop(),_.trys.pop();continue;default:if(b=_.trys,!(b=b.length>0&&b[b.length-1])&&(I[0]===6||I[0]===2)){_=0;continue}if(I[0]===3&&(!b||I[1]>b[0]&&I[1]<b[3])){_.label=I[1];break}if(I[0]===6&&_.label<b[1]){_.label=b[1],b=I;break}if(b&&_.label<b[2]){_.label=b[2],_.ops.push(I);break}b[2]&&_.ops.pop(),_.trys.pop();continue}I=v.call(m,_)}catch(w){I=[6,w],C=0}finally{E=b=0}if(I[0]&5)throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}},r=A&&A.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigAsyncStorage=t.EvaluationReason=t.StatsigClient=t.Layer=t.DynamicConfig=void 0;var i=Cn,s=r($a),a=r(xo),o=r(Rl),u=r(Ol),c=r(Al),l=qr,d=hs;Object.defineProperty(t,"DynamicConfig",{enumerable:!0,get:function(){return r(d).default}});var f=ps;Object.defineProperty(t,"Layer",{enumerable:!0,get:function(){return r(f).default}});var h=$a;Object.defineProperty(t,"StatsigClient",{enumerable:!0,get:function(){return r(h).default}});var p=qr;Object.defineProperty(t,"EvaluationReason",{enumerable:!0,get:function(){return p.EvaluationReason}});var g=ur;Object.defineProperty(t,"StatsigAsyncStorage",{enumerable:!0,get:function(){return r(g).default}}),(0,o.default)(),(0,u.default)(),(0,c.default)();var y=function(){function m(){}return Object.defineProperty(m,"encodeIntializeCall",{get:function(){return a.default.encodeInitializeCall},set:function(v){a.default.encodeInitializeCall=v},enumerable:!1,configurable:!0}),m.initialize=function(v,_,E){var C;return e(this,void 0,void 0,function(){var b;return n(this,function(S){return b=(C=m.instance)!==null&&C!==void 0?C:new s.default(v,_,E),m.instance||(m.instance=b),[2,b.initializeAsync()]})})},m.prefetchUsers=function(v){return e(this,void 0,void 0,function(){return n(this,function(_){switch(_.label){case 0:return[4,m.getClientX().prefetchUsers(v)];case 1:return[2,_.sent()]}})})},m.setInitializeValues=function(v){m.getClientX().setInitializeValues(v)},m.checkGate=function(v,_){return _===void 0&&(_=!1),m.getClientX().checkGate(v,_)},m.checkGateWithExposureLoggingDisabled=function(v,_){return _===void 0&&(_=!1),m.getClientX().checkGateWithExposureLoggingDisabled(v,_)},m.manuallyLogGateExposure=function(v){m.getClientX().logGateExposure(v)},m.getConfig=function(v,_){return _===void 0&&(_=!1),m.getClientX().getConfig(v,_)},m.getConfigWithExposureLoggingDisabled=function(v,_){return _===void 0&&(_=!1),m.getClientX().getConfigWithExposureLoggingDisabled(v,_)},m.manuallyLogConfigExposure=function(v){m.getClientX().logConfigExposure(v)},m.getExperiment=function(v,_,E){return _===void 0&&(_=!1),E===void 0&&(E=!1),m.getClientX().getExperiment(v,_,E)},m.getExperimentWithExposureLoggingDisabled=function(v,_,E){return _===void 0&&(_=!1),E===void 0&&(E=!1),m.getClientX().getExperimentWithExposureLoggingDisabled(v,_,E)},m.manuallyLogExperimentExposure=function(v,_){_===void 0&&(_=!1),m.getClientX().logExperimentExposure(v,_)},m.getLayer=function(v,_){return _===void 0&&(_=!1),m.getClientX().getLayer(v,_)},m.getLayerWithExposureLoggingDisabled=function(v,_){return _===void 0&&(_=!1),m.getClientX().getLayerWithExposureLoggingDisabled(v,_)},m.manuallyLogLayerParameterExposure=function(v,_,E){E===void 0&&(E=!1),m.getClientX().logLayerParameterExposure(v,_,E)},m.logEvent=function(v,_,E){return _===void 0&&(_=null),E===void 0&&(E=null),m.getClientX().logEvent(v,_,E)},m.updateUser=function(v){return m.getClientX().updateUser(v)},m.updateUserWithValues=function(v,_){return m.getClientX().updateUserWithValues(v,_)},m.shutdown=function(){m.getClientX().shutdown(),m.instance=null},m.overrideGate=function(v,_){m.getClientX().overrideGate(v,_)},m.overrideConfig=function(v,_){m.getClientX().overrideConfig(v,_)},m.overrideLayer=function(v,_){m.getClientX().overrideLayer(v,_)},m.removeGateOverride=function(v){m.getClientX().removeGateOverride(v)},m.removeConfigOverride=function(v){m.getClientX().removeConfigOverride(v)},m.removeLayerOverride=function(v){m.getClientX().removeLayerOverride(v)},m.getAllOverrides=function(){return m.getClientX().getAllOverrides()},m.getStableID=function(){return m.getClientX().getStableID()},m.getEvaluationDetails=function(){var v,_;return(_=(v=m.instance)===null||v===void 0?void 0:v.getEvaluationDetails())!==null&&_!==void 0?_:{reason:l.EvaluationReason.Uninitialized,time:0}},m.removeOverride=function(v){m.getClientX().removeOverride(v)},m.getOverrides=function(){return m.getClientX().getOverrides()},m.initializeCalled=function(){return m.instance!=null&&m.instance.initializeCalled()},m.flushEvents=function(){m.getClientX().flushEvents()},m.reenableAllLogging=function(){m.getClientX().reenableAllLogging()},m.getClientX=function(){if(!m.instance)throw new i.StatsigUninitializedError;return m.instance},m.instance=null,m}();t.default=y})(li);var Dn={},ms={};Object.defineProperty(ms,"__esModule",{value:!0});ms.staticImplements=void 0;function PD(){return function(t){}}ms.staticImplements=PD;var _s={};Object.defineProperty(_s,"__esModule",{value:!0});_s.version=void 0;_s.version="1.32.0";var bh={},$D=A&&A.__decorate||function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(i<3?a(s):i>3?a(e,n,s):a(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},Sh=A&&A.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((r=r.apply(t,e||[])).next())})},Eh=A&&A.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Dn,"__esModule",{value:!0});var $e=li,UD=ms,FD=_s,BD=function(){function t(n,r,i){if(e.instance!=null&&e.canThrow())throw new Error("Cannot create another instance of the static Statsig class");e.instance=new $e.StatsigClient(n,r,i)}e=t,t.initialize=function(n,r,i){return Sh(this,void 0,void 0,function(){return Eh(this,function(s){try{return e.instance||(e.instance=new $e.StatsigClient(n,r,i),e.instance.setSDKPackageInfo(this.sdkPackageInfo),e.instance.setAppState(this.appState),e.instance.setNativeModules(this.nativeModules),e.instance.setPlatform(this.platform),e.instance.setRNDeviceInfo(this.deviceInfo),e.instance.setExpoConstants(this.expoConstants),e.instance.setExpoDevice(this.expoDevice),e.instance.setOnCacheLoadedReactCallback(this.onCacheLoadedCallback)),[2,e.instance.initializeAsync()]}catch(a){if(e.canThrow())throw a}return[2,Promise.resolve()]})})},t.bootstrap=function(n,r,i,s){if(e.instance!=null){e.setInitializeValues(r);return}s==null&&(s={}),s.initializeValues=r,e.instance=new $e.StatsigClient(n,i,s),e.instance.setSDKPackageInfo({sdkType:"react-client",sdkVersion:FD.version})},t.flushEvents=function(){return this.capture(function(){return e.getClientX().flushEvents()},void 0)},t.reenableAllLogging=function(){return this.capture(function(){return e.getClientX().reenableAllLogging()},void 0)},t.prefetchUsers=function(n){return Sh(this,void 0,void 0,function(){return Eh(this,function(r){return[2,this.capture(function(){return e.getClientX().prefetchUsers(n)},Promise.resolve())]})})},t.setInitializeValues=function(n){this.capture(function(){return e.getClientX().setInitializeValues(n)},void 0)},t.getCurrentUser=function(){return this.capture(function(){return e.getClientX().getCurrentUser()},null)},t.checkGate=function(n,r){return r===void 0&&(r=!1),this.capture(function(){return e.getClientX().checkGate(n,r)},!1)},t.checkGateWithExposureLoggingDisabled=function(n,r){return this.capture(function(){return e.getClientX().checkGateWithExposureLoggingDisabled(n,r==null?void 0:r.ignoreOverrides)},!1)},t.manuallyLogGateExposure=function(n){this.capture(function(){return e.getClientX().logGateExposure(n)},void 0)},t.getConfig=function(n,r){return r===void 0&&(r=!1),this.capture(function(){return e.getClientX().getConfig(n,r)},new $e.DynamicConfig(n,{},"",{time:Date.now(),reason:$e.EvaluationReason.Uninitialized}))},t.getConfigWithExposureLoggingDisabled=function(n,r){return this.capture(function(){return e.getClientX().getConfigWithExposureLoggingDisabled(n,r==null?void 0:r.ignoreOverrides)},new $e.DynamicConfig(n,{},"",{time:Date.now(),reason:$e.EvaluationReason.Uninitialized}))},t.manuallyLogConfigExposure=function(n){this.capture(function(){return e.getClientX().logConfigExposure(n)},void 0)},t.getExperiment=function(n,r,i){return r===void 0&&(r=!1),i===void 0&&(i=!1),this.capture(function(){return e.getClientX().getExperiment(n,r,i)},new $e.DynamicConfig(n,{},"",{time:Date.now(),reason:$e.EvaluationReason.Uninitialized}))},t.getExperimentWithExposureLoggingDisabled=function(n,r){return this.capture(function(){return e.getClientX().getExperimentWithExposureLoggingDisabled(n,r==null?void 0:r.keepDeviceValue,r==null?void 0:r.ignoreOverrides)},new $e.DynamicConfig(n,{},"",{time:Date.now(),reason:$e.EvaluationReason.Uninitialized}))},t.manuallyLogExperimentExposure=function(n,r){this.capture(function(){return e.getClientX().logExperimentExposure(n,r)},void 0)},t.getLayer=function(n,r){return r===void 0&&(r=!1),this.capture(function(){return e.getClientX().getLayer(n,r)},$e.Layer._create(n,{},"",{time:Date.now(),reason:$e.EvaluationReason.Uninitialized}))},t.getLayerWithExposureLoggingDisabled=function(n,r){return this.capture(function(){return e.getClientX().getLayerWithExposureLoggingDisabled(n,r==null?void 0:r.keepDeviceValue)},$e.Layer._create(n,{},"",{time:Date.now(),reason:$e.EvaluationReason.Uninitialized}))},t.manuallyLogLayerParameterExposure=function(n,r,i){i===void 0&&(i=!1),this.capture(function(){return e.getClientX().logLayerParameterExposure(n,r,i)},void 0)},t.logEvent=function(n,r,i){r===void 0&&(r=null),i===void 0&&(i=null),this.capture(function(){return e.getClientX().logEvent(n,r,i)},void 0)},t.updateUser=function(n){return this.capture(function(){return e.getClientX().updateUser(n)},Promise.resolve(!1))},t.updateUserWithValues=function(n,r){return this.capture(function(){return e.getClientX().updateUserWithValues(n,r)},!1)},t.shutdown=function(){this.capture(function(){return e.getClientX().shutdown()},void 0),e.instance=void 0},t.overrideGate=function(n,r){this.capture(function(){var i;((i=e.getAllOverrides().gates)===null||i===void 0?void 0:i[n])!==r&&(e.getClientX().overrideGate(n,r),e.updateContext())},void 0)},t.overrideConfig=function(n,r){this.capture(function(){var i;((i=e.getAllOverrides().configs)===null||i===void 0?void 0:i[n])!==r&&(e.getClientX().overrideConfig(n,r),e.updateContext())},void 0)},t.overrideLayer=function(n,r){this.capture(function(){var i;((i=e.getAllOverrides().layers)===null||i===void 0?void 0:i[n])!==r&&(e.getClientX().overrideLayer(n,r),e.updateContext())},void 0)},t.removeGateOverride=function(n){this.capture(function(){e.getClientX().removeGateOverride(n),e.updateContext()},void 0)},t.removeConfigOverride=function(n){this.capture(function(){e.getClientX().removeConfigOverride(n),e.updateContext()},void 0)},t.removeLayerOverride=function(n){this.capture(function(){e.getClientX().removeLayerOverride(n),e.updateContext()},void 0)},t.getAllOverrides=function(){return this.capture(function(){return e.getClientX().getAllOverrides()},{gates:{},configs:{},layers:{}})},t.getEvaluationDetails=function(){var n,r;return(r=(n=e.instance)===null||n===void 0?void 0:n.getEvaluationDetails())!==null&&r!==void 0?r:{reason:$e.EvaluationReason.Uninitialized,time:0}},t.getStableID=function(){return this.capture(function(){return e.getClientX().getStableID()},"")},t.initializeCalled=function(){return e.instance!=null&&e.instance.initializeCalled()},t.setSDKPackageInfo=function(n){e.sdkPackageInfo=n},t.setReactNativeUUID=function(n){n!=null&&$e.StatsigClient.setReactNativeUUID(n)},t.setAsyncStorage=function(n){n!=null&&($e.StatsigAsyncStorage.asyncStorage=n)},t.setAppState=function(n){n!=null&&(e.appState=n)},t.setNativeModules=function(n){n!=null&&(e.nativeModules=n)},t.setPlatform=function(n){n!=null&&(e.platform=n)},t.setRNDeviceInfo=function(n){n!=null&&(e.deviceInfo=n)},t.setExpoConstants=function(n){n!=null&&(e.expoConstants=n)},t.setExpoDevice=function(n){n!=null&&(e.expoDevice=n)},t.setReactContextUpdater=function(n){e.reactContextUpdater=n},t.setOnCacheLoadedCallback=function(n){e.onCacheLoadedCallback=n},t.getClientX=function(){if(!e.instance)throw new Error("Call and wait for initialize() to finish first.");return e.instance},t.capture=function(n,r){try{return n()}catch(i){if(e.canThrow())throw i;return r}},t.updateContext=function(){e.reactContextUpdater!=null&&e.reactContextUpdater()},t.canThrow=function(){var n;return typeof process>"u"||typeof bh>"u"||((n=process==null?void 0:bh)===null||n===void 0?void 0:n.REACT_APP_STATSIG_SDK_MODE)!=="silent"};var e;return t.reactContextUpdater=null,t=e=$D([(0,UD.staticImplements)()],t),t}();Dn.default=BD;var an={},HD=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(an,"__esModule",{value:!0});var jD=HD(Pt);an.default=jD.default.createContext({initialized:!1,statsigPromise:null,userVersion:0,initStarted:!1,updateUser:function(){}});var Dl={},GD=A&&A.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),zD=A&&A.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),WD=A&&A.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&GD(e,t,n);return zD(e,t),e},Ml=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dl,"__esModule",{value:!0});var ut=WD(Pt),qD=Ml(an),VD=Ml(li),Ie=Ml(Dn),KD=_s;function YD(t){var e=(0,ut.useRef)(null);return(0,ut.useEffect)(function(){e.current=t},[t]),e.current}function XD(t){var e=t.children,n=t.sdkKey,r=t.user,i=t.setUser,s=t.options,a=t.waitForCache,o=t.waitForInitialization,u=t.initializingComponent,c=t.mountKey,l=t.shutdownOnUnmount,d=l===void 0?!1:l,f=t._reactNativeDependencies,h=!!f,p=(0,ut.useState)(!1),g=p[0],y=p[1],m=(0,ut.useState)(!1),v=m[0],_=m[1],E=(0,ut.useRef)(null),C=(0,ut.useState)(0),b=C[0],S=C[1],R=(0,ut.useRef)(new Promise(function(x){E.current=x})),k=(0,ut.useMemo)(function(){return r},[JSON.stringify(r)]),I=YD(c??null);(0,ut.useEffect)(function(){if(Ie.default.initializeCalled()){R.current=new Promise(function(M){E.current=M});var x=c===void 0||I!==c;x&&(_(!1),y(!1)),Ie.default.updateUser(r).then(function(){E.current&&E.current(),S(function(M){return M+1}),x&&(_(!0),y(!0))});return}Ie.default.setSDKPackageInfo({sdkType:"react-client",sdkVersion:KD.version}),h&&(Ie.default.setSDKPackageInfo(f.SDKPackageInfo),Ie.default.setAppState(f.AppState),Ie.default.setAsyncStorage(f.AsyncStorage),Ie.default.setNativeModules(f.NativeModules),Ie.default.setPlatform(f.Platform),Ie.default.setRNDeviceInfo(f.RNDevice),Ie.default.setReactNativeUUID(f.ReactNativeUUID),Ie.default.setExpoConstants(f.Constants),Ie.default.setExpoDevice(f.ExpoDevice)),Ie.default.setOnCacheLoadedCallback(function(){y(!0)}),Ie.default.initialize(n,k,s).then(function(){_(!0),E.current&&E.current()}),typeof window<"u"&&(window.__STATSIG_SDK__=Ie.default,window.__STATSIG_JS_SDK__=VD.default,window.__STATSIG_RERENDER_OVERRIDE__=function(){S(b+1)})},[k]),(0,ut.useEffect)(function(){return Ie.default.setReactContextUpdater(function(){return S(function(x){return x+1})}),function(){d&&Ie.default.shutdown(),Ie.default.setReactContextUpdater(null)}},[]);var w=JD(a===!0,o===!0,v,g,e,u),O=(0,ut.useMemo)(function(){return{initialized:v,statsigPromise:R,userVersion:b,initStarted:Ie.default.initializeCalled(),updateUser:i??function(){}}},[v,R,b,Ie.default.initializeCalled(),i]);return ut.default.createElement(qD.default.Provider,{value:O},w)}Dl.default=XD;function JD(t,e,n,r,i,s){return n||e!==!0&&t!==!0||t&&r||e&&n?i:(e||t)&&s!=null?s:null}var Ll={},We={},$y=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(We,"__esModule",{value:!0});We.useLayerImpl=We.useExperimentImpl=We.useConfigImpl=We.useGateImpl=void 0;var kn=Pt,Vr=li,Ao=$y(an),xn=$y(Dn);function QD(t,e,n){n===void 0&&(n=!1);var r=(0,kn.useContext)(Ao.default),i=r.initialized,s=r.userVersion,a=r.initStarted,o=(0,kn.useMemo)(function(){return a?n?xn.default.checkGateWithExposureLoggingDisabled(t,e):xn.default.checkGate(t,e==null?void 0:e.ignoreOverrides):!1},[i,a,t,s,e,n]);return{isLoading:!i,value:o}}We.useGateImpl=QD;function ZD(t,e,n){n===void 0&&(n=!1);var r=(0,kn.useContext)(Ao.default),i=r.initialized,s=r.initStarted,a=r.userVersion,o=(0,kn.useMemo)(function(){return s?n?xn.default.getConfigWithExposureLoggingDisabled(t,e):xn.default.getConfig(t,e==null?void 0:e.ignoreOverrides):new Vr.DynamicConfig(t,{},"",{time:Date.now(),reason:Vr.EvaluationReason.Uninitialized})},[i,s,t,a,e,n]);return{isLoading:!i,config:o}}We.useConfigImpl=ZD;function eM(t,e,n){n===void 0&&(n=!1);var r=(0,kn.useContext)(Ao.default),i=r.initialized,s=r.initStarted,a=r.userVersion,o=(0,kn.useMemo)(function(){return s?n?xn.default.getExperimentWithExposureLoggingDisabled(t,e):xn.default.getExperiment(t,e==null?void 0:e.keepDeviceValue,e==null?void 0:e.ignoreOverrides):new Vr.DynamicConfig(t,{},"",{time:Date.now(),reason:Vr.EvaluationReason.Uninitialized})},[i,s,t,a,e,n]);return{isLoading:!i,config:o}}We.useExperimentImpl=eM;function tM(t,e,n){n===void 0&&(n=!1);var r=(0,kn.useContext)(Ao.default),i=r.initialized,s=r.initStarted,a=r.userVersion,o=(0,kn.useMemo)(function(){return s?n?xn.default.getLayerWithExposureLoggingDisabled(t,e):xn.default.getLayer(t,e==null?void 0:e.keepDeviceValue):Vr.Layer._create(t,{},"",{time:Date.now(),reason:Vr.EvaluationReason.Uninitialized})},[i,s,t,a,e,n]);return{isLoading:!i,layer:o}}We.useLayerImpl=tM;Object.defineProperty(Ll,"__esModule",{value:!0});var nM=We;function rM(t,e){return(0,nM.useConfigImpl)(t,{ignoreOverrides:e})}Ll.default=rM;var Nl={};Object.defineProperty(Nl,"__esModule",{value:!0});var iM=We;function sM(t,e,n){return e===void 0&&(e=!1),(0,iM.useExperimentImpl)(t,{keepDeviceValue:e,ignoreOverrides:n})}Nl.default=sM;var Pl={};Object.defineProperty(Pl,"__esModule",{value:!0});var aM=We;function oM(t,e){return(0,aM.useGateImpl)(t,{ignoreOverrides:e})}Pl.default=oM;var $l={};Object.defineProperty($l,"__esModule",{value:!0});var uM=We;function cM(t,e){return e===void 0&&(e=!1),(0,uM.useLayerImpl)(t,{keepDeviceValue:e})}$l.default=cM;var Ul={},Uy=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ul,"__esModule",{value:!0});var Th=Pt,lM=Uy(Dn),dM=Uy(an);function fM(t){var e=(0,Th.useContext)(dM.default).initStarted;(0,Th.useEffect)(function(){!e||t.length==0||lM.default.prefetchUsers(t).catch(function(){})},[e,t])}Ul.default=fM;var Fl={},Fy=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fl,"__esModule",{value:!0});var Ih=Pt,hM=Fy(Dn),pM=Fy(an);function gM(t,e,n){var r=(0,Ih.useContext)(pM.default).initStarted;(0,Ih.useEffect)(function(){r&&hM.default.logEvent(t,e,n)},[r])}Fl.default=gM;var Bl={},mM=A&&A.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),_M=A&&A.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yM=A&&A.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&mM(e,t,n);return _M(e,t),e},Hl=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bl,"__esModule",{value:!0});var Gt=yM(Pt),vM=Hl(an),bM=Hl(li),ln=Hl(Dn);function SM(t){var e=t.children,n=t.sdkKey,r=t.user,i=t.options,s=t.initializeValues,a=t.setUser,o=t.shutdownOnUnmount,u=(0,Gt.useState)(0),c=u[0],l=u[1],d=(0,Gt.useState)(!0),f=d[0],h=d[1],p=(0,Gt.useRef)(!0),g=(0,Gt.useMemo)(function(){return r},[JSON.stringify(r)]);(0,Gt.useMemo)(function(){return ln.default.bootstrap(n,s,g,i),s},[JSON.stringify(s)]),(0,Gt.useEffect)(function(){if(p.current){p.current=!1,typeof window<"u"&&(window.__STATSIG_SDK__=ln.default,window.__STATSIG_JS_SDK__=bM.default,window.__STATSIG_RERENDER_OVERRIDE__=function(){l(c+1)});return}h(!1),ln.default.updateUser(r).then(function(){l(c+1),h(!0)})},[g]),(0,Gt.useEffect)(function(){return ln.default.setReactContextUpdater(function(){return l(function(m){return m+1})}),function(){o&&ln.default.shutdown(),ln.default.setReactContextUpdater(null)}},[]);var y=(0,Gt.useMemo)(function(){return{initialized:f,statsigPromise:null,userVersion:c,initStarted:ln.default.initializeCalled(),updateUser:a??function(){}}},[f,c,ln.default.initializeCalled(),a]);return Gt.default.createElement(vM.default.Provider,{value:y},e)}Bl.default=SM;var jl={};Object.defineProperty(jl,"__esModule",{value:!0});var EM=We;function TM(t,e){return(0,EM.useConfigImpl)(t,e,!0)}jl.default=TM;var Gl={};Object.defineProperty(Gl,"__esModule",{value:!0});var IM=We;function wM(t,e){return(0,IM.useGateImpl)(t,e,!0)}Gl.default=wM;var zl={};Object.defineProperty(zl,"__esModule",{value:!0});var CM=We;function kM(t,e){return(0,CM.useExperimentImpl)(t,e,!0)}zl.default=kM;var Wl={};Object.defineProperty(Wl,"__esModule",{value:!0});var xM=We;function RM(t,e){return(0,xM.useLayerImpl)(t,e,!0)}Wl.default=RM;var ql={},OM=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ql,"__esModule",{value:!0});var AM=Pt,DM=OM(an);function MM(){var t=(0,AM.useContext)(DM.default);return t.updateUser}ql.default=MM;(function(t){var e=A&&A.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSynchronousProvider=t.Layer=t.staticImplements=t.DynamicConfig=t.useUpdateUser=t.useStatsigLogEffect=t.useGateWithExposureLoggingDisabled=t.useGate=t.usePrefetchUsers=t.useLayerWithExposureLoggingDisabled=t.useLayer=t.useExperimentWithExposureLoggingDisabled=t.useExperiment=t.useConfigWithExposureLoggingDisabled=t.useConfig=t.StatsigProvider=t.StatsigContext=t.Statsig=void 0;var n=li;Object.defineProperty(t,"DynamicConfig",{enumerable:!0,get:function(){return n.DynamicConfig}}),Object.defineProperty(t,"Layer",{enumerable:!0,get:function(){return n.Layer}});var r=e(Dn);t.Statsig=r.default;var i=e(an);t.StatsigContext=i.default;var s=e(Dl);t.StatsigProvider=s.default;var a=ms;Object.defineProperty(t,"staticImplements",{enumerable:!0,get:function(){return a.staticImplements}});var o=e(Ll);t.useConfig=o.default;var u=e(Nl);t.useExperiment=u.default;var c=e(Pl);t.useGate=c.default;var l=e($l);t.useLayer=l.default;var d=e(Ul);t.usePrefetchUsers=d.default;var f=e(Fl);t.useStatsigLogEffect=f.default;var h=e(Bl);t.StatsigSynchronousProvider=h.default;var p=e(jl);t.useConfigWithExposureLoggingDisabled=p.default;var g=e(Gl);t.useGateWithExposureLoggingDisabled=g.default;var y=e(zl);t.useExperimentWithExposureLoggingDisabled=y.default;var m=e(Wl);t.useLayerWithExposureLoggingDisabled=m.default;var v=e(ql);t.useUpdateUser=v.default})(kA);var By=-1,Vl=function(t){addEventListener("pageshow",function(e){e.persisted&&(By=e.timeStamp,t(e))},!0)},Hy=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Kl=function(){var t=Hy();return t&&t.activationStart||0},Ha=function(t,e){var n=Hy(),r="navigate";return By>=0?r="back-forward-cache":n&&(document.prerendering||Kl()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:-1,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},jy=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},ja=function(t,e,n,r){var i,s;return function(a){e.value>=0&&(a||r)&&((s=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=s,e.rating=function(o,u){return o>u[1]?"poor":o>u[0]?"needs-improvement":"good"}(e.value,n),t(e))}},Gy=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},zy=function(t){document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&t()})},Wy=function(t){var e=!1;return function(){e||(t(),e=!0)}},kr=-1,wh=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Ga=function(t){document.visibilityState==="hidden"&&kr>-1&&(kr=t.type==="visibilitychange"?t.timeStamp:0,LM())},Ch=function(){addEventListener("visibilitychange",Ga,!0),addEventListener("prerenderingchange",Ga,!0)},LM=function(){removeEventListener("visibilitychange",Ga,!0),removeEventListener("prerenderingchange",Ga,!0)},qy=function(){return kr<0&&(kr=wh(),Ch(),Vl(function(){setTimeout(function(){kr=wh(),Ch()},0)})),{get firstHiddenTime(){return kr}}},Vy=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},kh=[1800,3e3],fN=function(t,e){e=e||{},Vy(function(){var n,r=qy(),i=Ha("FCP"),s=jy("paint",function(a){a.forEach(function(o){o.name==="first-contentful-paint"&&(s.disconnect(),o.startTime<r.firstHiddenTime&&(i.value=Math.max(o.startTime-Kl(),0),i.entries.push(o),n(!0)))})});s&&(n=ja(t,i,kh,e.reportAllChanges),Vl(function(a){i=Ha("FCP"),n=ja(t,i,kh,e.reportAllChanges),Gy(function(){i.value=performance.now()-a.timeStamp,n(!0)})}))})},NM=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=Wy(t),document.visibilityState==="hidden"?t():(n=e(t),zy(t)),n},xh=[2500,4e3],cu={},hN=function(t,e){e=e||{},Vy(function(){var n,r=qy(),i=Ha("LCP"),s=function(u){e.reportAllChanges||(u=u.slice(-1)),u.forEach(function(c){c.startTime<r.firstHiddenTime&&(i.value=Math.max(c.startTime-Kl(),0),i.entries=[c],n())})},a=jy("largest-contentful-paint",s);if(a){n=ja(t,i,xh,e.reportAllChanges);var o=Wy(function(){cu[i.id]||(s(a.takeRecords()),a.disconnect(),cu[i.id]=!0,n(!0))});["keydown","click"].forEach(function(u){addEventListener(u,function(){return NM(o)},!0)}),zy(o),Vl(function(u){i=Ha("LCP"),n=ja(t,i,xh,e.reportAllChanges),Gy(function(){i.value=performance.now()-u.timeStamp,cu[i.id]=!0,n(!0)})})}})},Ne=function(){return Ne=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Ne.apply(this,arguments)};function PM(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Fe(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((r=r.apply(t,[])).next())})}function Be(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Kr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ct(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}function Wt(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var Ye;(function(t){t.SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll"})(Ye||(Ye={}));var Hn;(function(t){t.REVENUE_PRODUCT_ID="$productId",t.REVENUE_QUANTITY="$quantity",t.REVENUE_PRICE="$price",t.REVENUE_TYPE="$revenueType",t.REVENUE="$revenue"})(Hn||(Hn={}));var Yr;(function(t){t.IDENTIFY="$identify",t.GROUP_IDENTIFY="$groupidentify",t.REVENUE="revenue_amount"})(Yr||(Yr={}));var mt;(function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})(mt||(mt={}));var Jt;(function(t){t.BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})(Jt||(Jt={}));var za;(function(t){t.US="US",t.EU="EU"})(za||(za={}));var Re;(function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})(Re||(Re={}));var Wa;(function(t){t.XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})(Wa||(Wa={}));var Rh="-",Yl="AMP",$M="".concat(Yl,"_unsent"),Ky="https://api2.amplitude.com/2/httpapi",UM="https://api.eu.amplitude.com/2/httpapi",FM="https://api2.amplitude.com/batch",BM="https://api.eu.amplitude.com/batch",HM=1e3,ac=function(t){if(Object.keys(t).length>HM)return!1;for(var e in t){var n=t[e];if(!Yy(e,n))return!1}return!0},Yy=function(t,e){var n,r;if(typeof t!="string")return!1;if(Array.isArray(e)){var i=!0;try{for(var s=Kr(e),a=s.next();!a.done;a=s.next()){var o=a.value;if(Array.isArray(o))return!1;if(typeof o=="object")i=i&&ac(o);else if(!["number","string"].includes(typeof o))return!1;if(!i)return!1}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}else{if(e==null)return!1;if(typeof e=="object")return ac(e);if(!["number","string","boolean"].includes(typeof e))return!1}return!0},qa=function(){function t(){this._propertySet=new Set,this._properties={}}return t.prototype.getUserProperties=function(){return Ne({},this._properties)},t.prototype.set=function(e,n){return this._safeSet(Ye.SET,e,n),this},t.prototype.setOnce=function(e,n){return this._safeSet(Ye.SET_ONCE,e,n),this},t.prototype.append=function(e,n){return this._safeSet(Ye.APPEND,e,n),this},t.prototype.prepend=function(e,n){return this._safeSet(Ye.PREPEND,e,n),this},t.prototype.postInsert=function(e,n){return this._safeSet(Ye.POSTINSERT,e,n),this},t.prototype.preInsert=function(e,n){return this._safeSet(Ye.PREINSERT,e,n),this},t.prototype.remove=function(e,n){return this._safeSet(Ye.REMOVE,e,n),this},t.prototype.add=function(e,n){return this._safeSet(Ye.ADD,e,n),this},t.prototype.unset=function(e){return this._safeSet(Ye.UNSET,e,Rh),this},t.prototype.clearAll=function(){return this._properties={},this._properties[Ye.CLEAR_ALL]=Rh,this},t.prototype._safeSet=function(e,n,r){if(this._validate(e,n,r)){var i=this._properties[e];return i===void 0&&(i={},this._properties[e]=i),i[n]=r,this._propertySet.add(n),!0}return!1},t.prototype._validate=function(e,n,r){return this._properties[Ye.CLEAR_ALL]!==void 0||this._propertySet.has(n)?!1:e===Ye.ADD?typeof r=="number":e!==Ye.UNSET&&e!==Ye.REMOVE?Yy(n,r):!0},t}(),jM=function(t,e,n){var r=typeof t=="string"?{event_type:t}:t;return Ne(Ne(Ne({},r),n),e&&{event_properties:e})},Xy=function(t,e){var n=Ne(Ne({},e),{event_type:Yr.IDENTIFY,user_properties:t.getUserProperties()});return n},GM=function(t,e,n,r){var i,s=Ne(Ne({},r),{event_type:Yr.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[t]=e,i)});return s},zM=function(t,e,n){var r,i=new qa;i.set(t,e);var s=Ne(Ne({},n),{event_type:Yr.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[t]=e,r)});return s},WM=function(t,e){return Ne(Ne({},e),{event_type:Yr.REVENUE,event_properties:t.getEventProperties()})},Ni=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Re.Unknown),{event:t,code:e,message:n}},qM=function(){function t(){this.queue=[],this.applying=!1,this.plugins=[]}return t.prototype.register=function(e,n){return Fe(this,void 0,void 0,function(){return Be(this,function(r){switch(r.label){case 0:return[4,e.setup(n)];case 1:return r.sent(),this.plugins.push(e),[2]}})})},t.prototype.deregister=function(e){return this.plugins.splice(this.plugins.findIndex(function(n){return n.name===e}),1),Promise.resolve()},t.prototype.reset=function(){this.applying=!1,this.plugins=[]},t.prototype.push=function(e){var n=this;return new Promise(function(r){n.queue.push([e,r]),n.scheduleApply(0)})},t.prototype.scheduleApply=function(e){var n=this;this.applying||(this.applying=!0,setTimeout(function(){n.apply(n.queue.shift()).then(function(){n.applying=!1,n.queue.length>0&&n.scheduleApply(0)})},e))},t.prototype.apply=function(e){return Fe(this,void 0,void 0,function(){var n,r,i,s,a,o,u,h,c,l,d,f,h,p,g,y,m,v,_,E;return Be(this,function(C){switch(C.label){case 0:if(!e)return[2];n=ct(e,1),r=n[0],i=ct(e,2),s=i[1],a=this.plugins.filter(function(b){return b.type===Jt.BEFORE}),C.label=1;case 1:C.trys.push([1,6,7,8]),o=Kr(a),u=o.next(),C.label=2;case 2:return u.done?[3,5]:(h=u.value,[4,h.execute(Ne({},r))]);case 3:r=C.sent(),C.label=4;case 4:return u=o.next(),[3,2];case 5:return[3,8];case 6:return c=C.sent(),m={error:c},[3,8];case 7:try{u&&!u.done&&(v=o.return)&&v.call(o)}finally{if(m)throw m.error}return[7];case 8:l=this.plugins.filter(function(b){return b.type===Jt.ENRICHMENT}),C.label=9;case 9:C.trys.push([9,14,15,16]),d=Kr(l),f=d.next(),C.label=10;case 10:return f.done?[3,13]:(h=f.value,[4,h.execute(Ne({},r))]);case 11:r=C.sent(),C.label=12;case 12:return f=d.next(),[3,10];case 13:return[3,16];case 14:return p=C.sent(),_={error:p},[3,16];case 15:try{f&&!f.done&&(E=d.return)&&E.call(d)}finally{if(_)throw _.error}return[7];case 16:return g=this.plugins.filter(function(b){return b.type===Jt.DESTINATION}),y=g.map(function(b){var S=Ne({},r);return b.execute(S).catch(function(R){return Ni(S,0,String(R))})}),Promise.all(y).then(function(b){var S=ct(b,1),R=S[0];s(R)}),[2]}})})},t.prototype.flush=function(){return Fe(this,void 0,void 0,function(){var e,n,r,i=this;return Be(this,function(s){switch(s.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(a){return i.apply(a)}))];case 1:return s.sent(),n=this.plugins.filter(function(a){return a.type===Jt.DESTINATION}),r=n.map(function(a){return a.flush&&a.flush()}),[4,Promise.all(r)];case 2:return s.sent(),[2]}})})},t}(),VM="Event tracked successfully",KM="Unexpected error occurred",YM="Event rejected due to exceeded retry count",XM="Event skipped due to optOut config",JM="Event rejected due to missing API key",QM="Invalid API key",ZM="Client not initialized",eL=function(){function t(e){e===void 0&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new qM,this.name=e}return t.prototype._init=function(e){return Fe(this,void 0,void 0,function(){return Be(this,function(n){switch(n.label){case 0:return this.config=e,this.timeline.reset(),[4,this.runQueuedFunctions("q")];case 1:return n.sent(),[2]}})})},t.prototype.runQueuedFunctions=function(e){return Fe(this,void 0,void 0,function(){var n,r,i,s,a,o,u;return Be(this,function(c){switch(c.label){case 0:n=this[e],this[e]=[],c.label=1;case 1:c.trys.push([1,6,7,8]),r=Kr(n),i=r.next(),c.label=2;case 2:return i.done?[3,5]:(s=i.value,[4,s()]);case 3:c.sent(),c.label=4;case 4:return i=r.next(),[3,2];case 5:return[3,8];case 6:return a=c.sent(),o={error:a},[3,8];case 7:try{i&&!i.done&&(u=r.return)&&u.call(r)}finally{if(o)throw o.error}return[7];case 8:return[2]}})})},t.prototype.track=function(e,n,r){var i=jM(e,n,r);return this.dispatch(i)},t.prototype.identify=function(e,n){var r=Xy(e,n);return this.dispatch(r)},t.prototype.groupIdentify=function(e,n,r,i){var s=GM(e,n,r,i);return this.dispatch(s)},t.prototype.setGroup=function(e,n,r){var i=zM(e,n,r);return this.dispatch(i)},t.prototype.revenue=function(e,n){var r=WM(e,n);return this.dispatch(r)},t.prototype.add=function(e){return Fe(this,void 0,void 0,function(){return Be(this,function(n){return this.config?[2,this.timeline.register(e,this.config)]:(this.q.push(this.add.bind(this,e)),[2])})})},t.prototype.remove=function(e){return Fe(this,void 0,void 0,function(){return Be(this,function(n){return this.config?[2,this.timeline.deregister(e)]:(this.q.push(this.remove.bind(this,e)),[2])})})},t.prototype.dispatchWithCallback=function(e,n){if(!this.config)return n(Ni(e,0,ZM));this.process(e).then(n)},t.prototype.dispatch=function(e){return Fe(this,void 0,void 0,function(){var n=this;return Be(this,function(r){return this.config?[2,this.process(e)]:[2,new Promise(function(i){n.dispatchQ.push(n.dispatchWithCallback.bind(n,e,i))})]})})},t.prototype.process=function(e){return Fe(this,void 0,void 0,function(){var i,n,r,i;return Be(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),this.config.optOut?[2,Ni(e,0,XM)]:[4,this.timeline.push(e)];case 1:return i=s.sent(),i.code===200?this.config.loggerProvider.log(i.message):this.config.loggerProvider.error(i.message),[2,i];case 2:return n=s.sent(),r=String(n),this.config.loggerProvider.error(r),i=Ni(e,0,r),[2,i];case 3:return[2]}})})},t.prototype.setOptOut=function(e){if(!this.config){this.q.push(this.setOptOut.bind(this,!!e));return}this.config.optOut=!!e},t.prototype.flush=function(){return this.timeline.flush()},t}(),tL=function(){function t(){this.productId="",this.quantity=1,this.price=0}return t.prototype.setProductId=function(e){return this.productId=e,this},t.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},t.prototype.setPrice=function(e){return this.price=e,this},t.prototype.setRevenueType=function(e){return this.revenueType=e,this},t.prototype.setRevenue=function(e){return this.revenue=e,this},t.prototype.setEventProperties=function(e){return ac(e)&&(this.properties=e),this},t.prototype.getEventProperties=function(){var e=this.properties?Ne({},this.properties):{};return e[Hn.REVENUE_PRODUCT_ID]=this.productId,e[Hn.REVENUE_QUANTITY]=this.quantity,e[Hn.REVENUE_PRICE]=this.price,e[Hn.REVENUE_TYPE]=this.revenueType,e[Hn.REVENUE]=this.revenue,e},t}(),nL=function(t,e){var n=Math.max(e,1);return t.reduce(function(r,i,s){var a=Math.floor(s/n);return r[a]||(r[a]=[]),r[a].push(i),r},[])},Xs="Amplitude Logger ",rL=function(){function t(){this.logLevel=mt.None}return t.prototype.disable=function(){this.logLevel=mt.None},t.prototype.enable=function(e){e===void 0&&(e=mt.Warn),this.logLevel=e},t.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<mt.Verbose||console.log("".concat(Xs,"[Log]: ").concat(e.join(" ")))},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<mt.Warn||console.warn("".concat(Xs,"[Warn]: ").concat(e.join(" ")))},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<mt.Error||console.error("".concat(Xs,"[Error]: ").concat(e.join(" ")))},t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<mt.Debug||console.log("".concat(Xs,"[Debug]: ").concat(e.join(" ")))},t}(),sa=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:mt.Warn,loggerProvider:new rL,optOut:!1,serverUrl:Ky,serverZone:za.US,useBatch:!1}},iL=function(){function t(e){var n,r,i;this._optOut=!1;var s=sa();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis||s.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||s.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||s.flushQueueSize,this.loggerProvider=e.loggerProvider||s.loggerProvider,this.logLevel=(n=e.logLevel)!==null&&n!==void 0?n:s.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=(r=e.optOut)!==null&&r!==void 0?r:s.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||s.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=(i=e.useBatch)!==null&&i!==void 0?i:s.useBatch,this.loggerProvider.enable(this.logLevel);var a=Jy(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t}(),sL=function(t,e){return t===za.EU?e?BM:UM:e?FM:Ky},Jy=function(t,e,n){if(t===void 0&&(t=""),e===void 0&&(e=sa().serverZone),n===void 0&&(n=sa().useBatch),t)return{serverUrl:t,serverZone:void 0};var r=["US","EU"].includes(e)?e:sa().serverZone;return{serverZone:r,serverUrl:sL(r,n)}},aL=function(){function t(){this.name="amplitude",this.type=Jt.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return t.prototype.setup=function(e){var n;return Fe(this,void 0,void 0,function(){var r,i=this;return Be(this,function(s){switch(s.label){case 0:return this.config=e,this.storageKey="".concat($M,"_").concat(this.config.apiKey.substring(0,10)),[4,(n=this.config.storageProvider)===null||n===void 0?void 0:n.get(this.storageKey)];case 1:return r=s.sent(),this.saveEvents(),r&&r.length>0&&Promise.all(r.map(function(a){return i.execute(a)})).catch(),[2,Promise.resolve(void 0)]}})})},t.prototype.execute=function(e){var n=this;return new Promise(function(r){var i={event:e,attempts:0,callback:function(s){return r(s)},timeout:0};n.addToQueue(i)})},t.prototype.addToQueue=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.filter(function(s){return s.attempts<e.config.flushMaxRetries?(s.attempts+=1,!0):(e.fulfillRequest([s],500,YM),!1)});i.forEach(function(s){if(e.queue=e.queue.concat(s),s.timeout===0){e.schedule(e.config.flushIntervalMillis);return}setTimeout(function(){s.timeout=0,e.schedule(0)},s.timeout)}),this.saveEvents()},t.prototype.schedule=function(e){var n=this;this.scheduled||(this.scheduled=setTimeout(function(){n.flush(!0).then(function(){n.queue.length>0&&n.schedule(e)})},e))},t.prototype.flush=function(e){return e===void 0&&(e=!1),Fe(this,void 0,void 0,function(){var n,r,i,s=this;return Be(this,function(a){switch(a.label){case 0:return n=[],r=[],this.queue.forEach(function(o){return o.timeout===0?n.push(o):r.push(o)}),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=nL(n,this.config.flushQueueSize),[4,Promise.all(i.map(function(o){return s.send(o,e)}))];case 1:return a.sent(),[2]}})})},t.prototype.send=function(e,n){return n===void 0&&(n=!0),Fe(this,void 0,void 0,function(){var r,i,s,a,o;return Be(this,function(u){switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,JM)];r={api_key:this.config.apiKey,events:e.map(function(c){var l=c.event;l.extra;var d=PM(l,["extra"]);return d}),options:{min_id_length:this.config.minIdLength}},u.label=1;case 1:return u.trys.push([1,3,,4]),i=Jy(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,r)];case 2:if(s=u.sent(),s===null)return this.fulfillRequest(e,0,KM),[2];if(!n){if("body"in s){a="";try{a=JSON.stringify(s.body,null,2)}catch{}this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(a))}else this.fulfillRequest(e,s.statusCode,s.status);return[2]}return this.handleReponse(s,e),[3,4];case 3:return o=u.sent(),this.fulfillRequest(e,0,String(o)),[3,4];case 4:return[2]}})})},t.prototype.handleReponse=function(e,n){var r=e.status;switch(r){case Re.Success:this.handleSuccessResponse(e,n);break;case Re.Invalid:this.handleInvalidResponse(e,n);break;case Re.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,n);break;case Re.RateLimit:this.handleRateLimitResponse(e,n);break;default:this.handleOtherReponse(n)}},t.prototype.handleSuccessResponse=function(e,n){this.fulfillRequest(n,e.statusCode,VM)},t.prototype.handleInvalidResponse=function(e,n){var r=this;if(e.body.missingField||e.body.error.startsWith(QM)){this.fulfillRequest(n,e.statusCode,e.body.error);return}var i=Wt(Wt(Wt(Wt([],ct(Object.values(e.body.eventsWithInvalidFields)),!1),ct(Object.values(e.body.eventsWithMissingFields)),!1),ct(Object.values(e.body.eventsWithInvalidIdLengths)),!1),ct(e.body.silencedEvents),!1).flat(),s=new Set(i),a=n.filter(function(o,u){if(s.has(u)){r.fulfillRequest([o],e.statusCode,e.body.error);return}return!0});this.addToQueue.apply(this,Wt([],ct(a),!1))},t.prototype.handlePayloadTooLargeResponse=function(e,n){if(n.length===1){this.fulfillRequest(n,e.statusCode,e.body.error);return}this.config.flushQueueSize/=2,this.addToQueue.apply(this,Wt([],ct(n),!1))},t.prototype.handleRateLimitResponse=function(e,n){var r=this,i=Object.keys(e.body.exceededDailyQuotaUsers),s=Object.keys(e.body.exceededDailyQuotaDevices),a=e.body.throttledEvents,o=new Set(i),u=new Set(s),c=new Set(a),l=n.filter(function(d,f){if(d.event.user_id&&o.has(d.event.user_id)||d.event.device_id&&u.has(d.event.device_id)){r.fulfillRequest([d],e.statusCode,e.body.error);return}return c.has(f)&&(d.timeout=r.throttleTimeout),!0});this.addToQueue.apply(this,Wt([],ct(l),!1))},t.prototype.handleOtherReponse=function(e){var n=this;this.addToQueue.apply(this,Wt([],ct(e.map(function(r){return r.timeout=r.attempts*n.retryTimeout,r})),!1))},t.prototype.fulfillRequest=function(e,n,r){this.saveEvents(),e.forEach(function(i){return i.callback(Ni(i.event,n,r))})},t.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map(function(n){return n.event}));this.config.storageProvider.set(this.storageKey,e)}},t}(),kt=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return{promise:t.apply(void 0,Wt([],ct(e),!1))}}},oL=function(t){var e=new Error().stack||"";return e.split(`
`).slice(2+t).map(function(n){return n.trim()})},Ce=function(t){return function(){var e=Ne({},t.config),n=e.loggerProvider,r=e.logLevel;return{logger:n,logLevel:r}}},uL=function(t,e){var n,r;e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,"");try{for(var i=Kr(e.split(".")),s=i.next();!s.done;s=i.next()){var a=s.value;if(a in t)t=t[a];else return}}catch(o){n={error:o}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t},ke=function(t,e){return function(){var n,r,i={};try{for(var s=Kr(e),a=s.next();!a.done;a=s.next()){var o=a.value;i[o]=uL(t,o)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i}},xe=function(t,e,n,r,i){return i===void 0&&(i=null),function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var o=n(),u=o.logger,c=o.logLevel;if(c&&c<mt.Debug||!c||!u)return t.apply(i,s);var l={type:"invoke public method",name:e,args:s,stacktrace:oL(1),time:{start:new Date().toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=t.apply(i,s);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),u.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),u.debug(JSON.stringify(l,null,2))),d}},Do=function(t){return t?(t^Math.random()*16>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Do)},Qy=function(){function t(){this.memoryStorage=new Map}return t.prototype.isEnabled=function(){return Fe(this,void 0,void 0,function(){return Be(this,function(e){return[2,!0]})})},t.prototype.get=function(e){return Fe(this,void 0,void 0,function(){return Be(this,function(n){return[2,this.memoryStorage.get(e)]})})},t.prototype.getRaw=function(e){return Fe(this,void 0,void 0,function(){var n;return Be(this,function(r){switch(r.label){case 0:return[4,this.get(e)];case 1:return n=r.sent(),[2,n?JSON.stringify(n):void 0]}})})},t.prototype.set=function(e,n){return Fe(this,void 0,void 0,function(){return Be(this,function(r){return this.memoryStorage.set(e,n),[2]})})},t.prototype.remove=function(e){return Fe(this,void 0,void 0,function(){return Be(this,function(n){return this.memoryStorage.delete(e),[2]})})},t.prototype.reset=function(){return Fe(this,void 0,void 0,function(){return Be(this,function(e){return this.memoryStorage.clear(),[2]})})},t}(),Xl=function(){function t(){}return t.prototype.send=function(e,n){return Promise.resolve(null)},t.prototype.buildResponse=function(e){var n,r,i,s,a,o,u,c,l,d,f,h,p,g,y,m,v,_,E,C,b,S;if(typeof e!="object")return null;var R=e.code||0,k=this.buildStatus(R);switch(k){case Re.Success:return{status:k,statusCode:R,body:{eventsIngested:(n=e.events_ingested)!==null&&n!==void 0?n:0,payloadSizeBytes:(r=e.payload_size_bytes)!==null&&r!==void 0?r:0,serverUploadTime:(i=e.server_upload_time)!==null&&i!==void 0?i:0}};case Re.Invalid:return{status:k,statusCode:R,body:{error:(s=e.error)!==null&&s!==void 0?s:"",missingField:(a=e.missing_field)!==null&&a!==void 0?a:"",eventsWithInvalidFields:(o=e.events_with_invalid_fields)!==null&&o!==void 0?o:{},eventsWithMissingFields:(u=e.events_with_missing_fields)!==null&&u!==void 0?u:{},eventsWithInvalidIdLengths:(c=e.events_with_invalid_id_lengths)!==null&&c!==void 0?c:{},epsThreshold:(l=e.eps_threshold)!==null&&l!==void 0?l:0,exceededDailyQuotaDevices:(d=e.exceeded_daily_quota_devices)!==null&&d!==void 0?d:{},silencedDevices:(f=e.silenced_devices)!==null&&f!==void 0?f:[],silencedEvents:(h=e.silenced_events)!==null&&h!==void 0?h:[],throttledDevices:(p=e.throttled_devices)!==null&&p!==void 0?p:{},throttledEvents:(g=e.throttled_events)!==null&&g!==void 0?g:[]}};case Re.PayloadTooLarge:return{status:k,statusCode:R,body:{error:(y=e.error)!==null&&y!==void 0?y:""}};case Re.RateLimit:return{status:k,statusCode:R,body:{error:(m=e.error)!==null&&m!==void 0?m:"",epsThreshold:(v=e.eps_threshold)!==null&&v!==void 0?v:0,throttledDevices:(_=e.throttled_devices)!==null&&_!==void 0?_:{},throttledUsers:(E=e.throttled_users)!==null&&E!==void 0?E:{},exceededDailyQuotaDevices:(C=e.exceeded_daily_quota_devices)!==null&&C!==void 0?C:{},exceededDailyQuotaUsers:(b=e.exceeded_daily_quota_users)!==null&&b!==void 0?b:{},throttledEvents:(S=e.throttled_events)!==null&&S!==void 0?S:[]}};case Re.Timeout:default:return{status:k,statusCode:R}}},t.prototype.buildStatus=function(e){return e>=200&&e<300?Re.Success:e===429?Re.RateLimit:e===413?Re.PayloadTooLarge:e===408?Re.Timeout:e>=400&&e<500?Re.Invalid:e>=500?Re.Failed:Re.Unknown},t}(),oc=function(t,e){return oc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},oc(t,e)};function Mo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");oc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ce=function(){return ce=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},ce.apply(this,arguments)};function Ge(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((r=r.apply(t,[])).next())})}function ze(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function cL(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function lL(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}var uc=function(t,e){return uc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},uc(t,e)};function dL(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");uc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var bt=function(){return bt=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},bt.apply(this,arguments)};function Oh(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function lt(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(l){try{c(r.next(l))}catch(d){a(d)}}function u(l){try{c(r.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((r=r.apply(t,[])).next())})}function dt(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function fL(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}var Mt=function(){if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global},cc=function(){var t,e=Mt();if(!(!((t=e==null?void 0:e.location)===null||t===void 0)&&t.search))return{};var n=e.location.search.substring(1).split("&").filter(Boolean),r=n.reduce(function(i,s){var a=s.split("=",2),o=Ah(a[0]),u=Ah(a[1]);return u&&(i[o]=u),i},{});return r},Ah=function(t){t===void 0&&(t="");try{return decodeURIComponent(t)}catch{return""}},hL="utm_campaign",pL="utm_content",gL="utm_id",mL="utm_medium",_L="utm_source",yL="utm_term",Dh="dclid",Mh="fbclid",Lh="gbraid",Nh="gclid",Ph="ko_click_id",$h="msclkid",Uh="ttclid",Fh="twclid",Bh="wbraid",vL="EMPTY",Zy={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,msclkid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},bL="MKTG",SL=function(){function t(){}return t.prototype.parse=function(){return lt(this,void 0,void 0,function(){return dt(this,function(e){return[2,bt(bt(bt(bt({},Zy),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},t.prototype.getUtmParam=function(){var e=cc(),n=e[hL],r=e[pL],i=e[gL],s=e[mL],a=e[_L],o=e[yL];return{utm_campaign:n,utm_content:r,utm_id:i,utm_medium:s,utm_source:a,utm_term:o}},t.prototype.getReferrer=function(){var e,n,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=(n=(e=r.referrer)===null||e===void 0?void 0:e.split("/")[2])!==null&&n!==void 0?n:void 0}catch{}return r},t.prototype.getClickIds=function(){var e,n=cc();return e={},e[Dh]=n[Dh],e[Mh]=n[Mh],e[Lh]=n[Lh],e[Nh]=n[Nh],e[Ph]=n[Ph],e[$h]=n[$h],e[Uh]=n[Uh],e[Fh]=n[Fh],e[Bh]=n[Bh],e},t}(),Jl=function(t,e,n){return e===void 0&&(e=""),n===void 0&&(n=10),[Yl,e,t.substring(0,n)].filter(Boolean).join("_")},EL=function(t){return"".concat(Yl.toLowerCase(),"_").concat(t.substring(0,6))},TL=function(){function t(e,n){var r,i;this.storage=n.storage,this.storageKey=Jl(e,bL),this.parser=new SL,this.track=n.track,this.onNewCampaign=n.onNewCampaign,this.disabled=!!n.disabled,this.trackNewCampaigns=!!n.trackNewCampaigns,this.trackPageViews=!!n.trackPageViews,this.excludeReferrers=(r=n.excludeReferrers)!==null&&r!==void 0?r:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=(i=n.initialEmptyValue)!==null&&i!==void 0?i:vL}return t.prototype.isNewCampaign=function(e,n,r){r===void 0&&(r=!1),e.referrer;var i=e.referring_domain,s=Oh(e,["referrer","referring_domain"]),a=n||{};a.referrer;var o=a.referring_domain,u=Oh(a,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var c=JSON.stringify(s)!==JSON.stringify(u),l=r?Hh(i||"")!==Hh(o||""):i!==o;return!n||c||l},t.prototype.saveCampaignToStorage=function(e){return lt(this,void 0,void 0,function(){return dt(this,function(n){switch(n.label){case 0:return[4,this.storage.set(this.storageKey,e)];case 1:return n.sent(),[2]}})})},t.prototype.getCampaignFromStorage=function(){return lt(this,void 0,void 0,function(){return dt(this,function(e){switch(e.label){case 0:return[4,this.storage.get(this.storageKey)];case 1:return[2,e.sent()]}})})},t.prototype.createCampaignEvent=function(e){var n=this,r=bt(bt({},Zy),e),i=Object.entries(r).reduce(function(a,o){var u=fL(o,2),c=u[0],l=u[1];return a.setOnce("initial_".concat(c),l||n.initialEmptyValue),l?a.set(c,l):a.unset(c)},new qa),s={event_type:"Page View",event_properties:{page_title:typeof document<"u"&&document.title||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||""}};return bt(bt({},Xy(i)),this.trackPageViews&&s)},t.prototype.send=function(e){return lt(this,void 0,void 0,function(){var n,r;return dt(this,function(i){switch(i.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return n=i.sent(),[4,this.getCampaignFromStorage()];case 2:if(r=i.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(n,r))return[2];this.onNewCampaign(n)}return[4,this.track(this.createCampaignEvent(n))];case 3:return i.sent(),[4,this.saveCampaignToStorage(n)];case 4:return i.sent(),[2]}})})},t}(),Hh=function(t){var e=t.split(".");return e.length<=2?t:e.slice(e.length-2,e.length).join(".")},Va=function(){function t(e){this.options=bt({},e)}return t.prototype.isEnabled=function(){return lt(this,void 0,void 0,function(){var e,n,r,i;return dt(this,function(s){switch(s.label){case 0:if(!Mt())return[2,!1];e=String(Date.now()),n=new t(this.options),r="AMP_TEST",s.label=1;case 1:return s.trys.push([1,4,5,7]),[4,n.set(r,e)];case 2:return s.sent(),[4,n.get(r)];case 3:return i=s.sent(),[2,i===e];case 4:return s.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return s.sent(),[7];case 7:return[2]}})})},t.prototype.get=function(e){return lt(this,void 0,void 0,function(){var n;return dt(this,function(r){switch(r.label){case 0:return[4,this.getRaw(e)];case 1:if(n=r.sent(),!n)return[2,void 0];try{try{n=decodeURIComponent(atob(n))}catch{}return[2,JSON.parse(n)]}catch{return[2,void 0]}return[2]}})})},t.prototype.getRaw=function(e){var n;return lt(this,void 0,void 0,function(){var r,i,s;return dt(this,function(a){return r=Mt(),i=(n=r==null?void 0:r.document.cookie.split("; "))!==null&&n!==void 0?n:[],s=i.find(function(o){return o.indexOf(e+"=")===0}),s?[2,s.substring(e.length+1)]:[2,void 0]})})},t.prototype.set=function(e,n){var r;return lt(this,void 0,void 0,function(){var i,s,a,o,u,c;return dt(this,function(l){try{i=(r=this.options.expirationDays)!==null&&r!==void 0?r:0,s=n!==null?i:-1,a=void 0,s&&(o=new Date,o.setTime(o.getTime()+s*24*60*60*1e3),a=o),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(n)))),a&&(u+="; expires=".concat(a.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),c=Mt(),c&&(c.document.cookie=u)}catch{}return[2]})})},t.prototype.remove=function(e){return lt(this,void 0,void 0,function(){return dt(this,function(n){switch(n.label){case 0:return[4,this.set(e,null)];case 1:return n.sent(),[2]}})})},t.prototype.reset=function(){return lt(this,void 0,void 0,function(){return dt(this,function(e){return[2]})})},t}(),IL=function(t){dL(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.send=function(n,r){return lt(this,void 0,void 0,function(){var i,s,a;return dt(this,function(o){switch(o.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return i={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(r),method:"POST"},[4,fetch(n,i)];case 1:return s=o.sent(),[4,s.json()];case 2:return a=o.sent(),[2,this.buildResponse(a)]}})})},e}(Xl),lc={exports:{}};(function(t,e){(function(n,r){var i="0.7.31",s="",a="?",o="function",u="undefined",c="object",l="string",d="major",f="model",h="name",p="type",g="vendor",y="version",m="architecture",v="console",_="mobile",E="tablet",C="smarttv",b="wearable",S="embedded",R=275,k="Amazon",I="Apple",w="ASUS",O="BlackBerry",x="Browser",M="Chrome",F="Edge",$="Firefox",Y="Google",G="Huawei",U="LG",ie="Microsoft",Ve="Motorola",me="Opera",_e="Samsung",Te="Sony",Ke="Xiaomi",ot="Zebra",cr="Facebook",bs=function(P,L){var q={};for(var ye in P)L[ye]&&L[ye].length%2===0?q[ye]=L[ye].concat(P[ye]):q[ye]=P[ye];return q},Ft=function(P){for(var L={},q=0;q<P.length;q++)L[P[q].toUpperCase()]=P[q];return L},fi=function(P,L){return typeof P===l?Mn(L).indexOf(Mn(P))!==-1:!1},Mn=function(P){return P.toLowerCase()},Lo=function(P){return typeof P===l?P.replace(/[^\d\.]/g,s).split(".")[0]:r},ht=function(P,L){if(typeof P===l)return P=P.replace(/^\s\s*/,s).replace(/\s\s*$/,s),typeof L===u?P:P.substring(0,R)},nt=function(P,L){for(var q=0,ye,ee,Es,he,hi,Tt;q<L.length&&!hi;){var Zl=L[q],ed=L[q+1];for(ye=ee=0;ye<Zl.length&&!hi;)if(hi=Zl[ye++].exec(P),hi)for(Es=0;Es<ed.length;Es++)Tt=hi[++ee],he=ed[Es],typeof he===c&&he.length>0?he.length===2?typeof he[1]==o?this[he[0]]=he[1].call(this,Tt):this[he[0]]=he[1]:he.length===3?typeof he[1]===o&&!(he[1].exec&&he[1].test)?this[he[0]]=Tt?he[1].call(this,Tt,he[2]):r:this[he[0]]=Tt?Tt.replace(he[1],he[2]):r:he.length===4&&(this[he[0]]=Tt?he[3].call(this,Tt.replace(he[1],he[2])):r):this[he]=Tt||r;q+=2}},Ln=function(P,L){for(var q in L)if(typeof L[q]===c&&L[q].length>0){for(var ye=0;ye<L[q].length;ye++)if(fi(L[q][ye],P))return q===a?r:q}else if(fi(L[q],P))return q===a?r:q;return P},Ss={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Nn={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},lr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,y],[/opios[\/ ]+([\w\.]+)/i],[y,[h,me+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[h,me]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[h,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[h,"UC"+x]],[/\bqbcore\/([\w\.]+)/i],[y,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[h,"IE"]],[/yabrowser\/([\w\.]+)/i],[y,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+x],y],[/\bfocus\/([\w\.]+)/i],[y,[h,$+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[h,me+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[h,me+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[h,"MIUI "+x]],[/fxios\/([-\w\.]+)/i],[y,[h,$]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+x]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+x],y],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,cr],y],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[h,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[h,M+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,M+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[h,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,y],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[y,[h,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[y,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[y,Ln,Ss]],[/(webkit|khtml)\/([\w\.]+)/i],[h,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[h,$+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[h,y]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,Mn]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,s,Mn]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,Mn]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[g,_e],[p,E]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[g,_e],[p,_]],[/((ipod|iphone)\d+,\d+)/i],[f,[g,I],[p,_]],[/(ipad\d+,\d+)/i],[f,[g,I],[p,E]],[/\((ip(?:hone|od)[\w ]*);/i],[f,[g,I],[p,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[g,I],[p,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[g,G],[p,E]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[g,G],[p,_]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[f,/_/g," "],[g,Ke],[p,_]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[g,Ke],[p,E]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[g,"OPPO"],[p,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[g,"Vivo"],[p,_]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[f,[g,"Realme"],[p,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[g,Ve],[p,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[g,Ve],[p,E]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[g,U],[p,E]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[g,U],[p,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[g,"Lenovo"],[p,E]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[g,"Nokia"],[p,_]],[/(pixel c)\b/i],[f,[g,Y],[p,E]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[g,Y],[p,_]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[g,Te],[p,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[g,Te],[p,E]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[g,"OnePlus"],[p,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[g,k],[p,E]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[g,k],[p,_]],[/(playbook);[-\w\),; ]+(rim)/i],[f,g,[p,E]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[g,O],[p,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[g,w],[p,E]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[g,w],[p,_]],[/(nexus 9)/i],[f,[g,"HTC"],[p,E]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[f,/_/g," "],[p,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[g,"Acer"],[p,E]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[g,"Meizu"],[p,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[g,"Sharp"],[p,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,f,[p,_]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,f,[p,E]],[/(surface duo)/i],[f,[g,ie],[p,E]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[g,"Fairphone"],[p,_]],[/(u304aa)/i],[f,[g,"AT&T"],[p,_]],[/\bsie-(\w*)/i],[f,[g,"Siemens"],[p,_]],[/\b(rct\w+) b/i],[f,[g,"RCA"],[p,E]],[/\b(venue[\d ]{2,7}) b/i],[f,[g,"Dell"],[p,E]],[/\b(q(?:mv|ta)\w+) b/i],[f,[g,"Verizon"],[p,E]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[g,"Barnes & Noble"],[p,E]],[/\b(tm\d{3}\w+) b/i],[f,[g,"NuVision"],[p,E]],[/\b(k88) b/i],[f,[g,"ZTE"],[p,E]],[/\b(nx\d{3}j) b/i],[f,[g,"ZTE"],[p,_]],[/\b(gen\d{3}) b.+49h/i],[f,[g,"Swiss"],[p,_]],[/\b(zur\d{3}) b/i],[f,[g,"Swiss"],[p,E]],[/\b((zeki)?tb.*\b) b/i],[f,[g,"Zeki"],[p,E]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],f,[p,E]],[/\b(ns-?\w{0,9}) b/i],[f,[g,"Insignia"],[p,E]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[g,"NextBook"],[p,E]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],f,[p,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],f,[p,_]],[/\b(ph-1) /i],[f,[g,"Essential"],[p,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[g,"Envizen"],[p,E]],[/\b(trio[-\w\. ]+) b/i],[f,[g,"MachSpeed"],[p,E]],[/\btu_(1491) b/i],[f,[g,"Rotor"],[p,E]],[/(shield[\w ]+) b/i],[f,[g,"Nvidia"],[p,E]],[/(sprint) (\w+)/i],[g,f,[p,_]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[g,ie],[p,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[g,ot],[p,E]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[g,ot],[p,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,f,[p,v]],[/droid.+; (shield) bui/i],[f,[g,"Nvidia"],[p,v]],[/(playstation [345portablevi]+)/i],[f,[g,Te],[p,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[g,ie],[p,v]],[/smart-tv.+(samsung)/i],[g,[p,C]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[g,_e],[p,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,U],[p,C]],[/(apple) ?tv/i],[g,[f,I+" TV"],[p,C]],[/crkey/i],[[f,M+"cast"],[g,Y],[p,C]],[/droid.+aft(\w)( bui|\))/i],[f,[g,k],[p,C]],[/\(dtv[\);].+(aquos)/i],[f,[g,"Sharp"],[p,C]],[/(bravia[\w- ]+) bui/i],[f,[g,Te],[p,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[g,ht],[f,ht],[p,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,C]],[/((pebble))app/i],[g,f,[p,b]],[/droid.+; (glass) \d/i],[f,[g,Y],[p,b]],[/droid.+; (wt63?0{2,3})\)/i],[f,[g,ot],[p,b]],[/(quest( 2)?)/i],[f,[g,cr],[p,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[p,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[f,[p,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[p,E]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,E]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[p,_]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[h,F+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[h,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[y,Ln,Nn]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[y,Ln,Nn]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,"Mac OS"],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[y,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,y],[/\(bb(10);/i],[y,[h,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[h,$+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[h,"webOS"]],[/crkey\/([\d\.]+)/i],[y,[h,M+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[h,"Chromium OS"],y],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,y],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[h,y]]},W=function(P,L){if(typeof P===c&&(L=P,P=r),!(this instanceof W))return new W(P,L).getResult();var q=P||(typeof n!==u&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:s),ye=L?bs(lr,L):lr;return this.getBrowser=function(){var ee={};return ee[h]=r,ee[y]=r,nt.call(ee,q,ye.browser),ee.major=Lo(ee.version),ee},this.getCPU=function(){var ee={};return ee[m]=r,nt.call(ee,q,ye.cpu),ee},this.getDevice=function(){var ee={};return ee[g]=r,ee[f]=r,ee[p]=r,nt.call(ee,q,ye.device),ee},this.getEngine=function(){var ee={};return ee[h]=r,ee[y]=r,nt.call(ee,q,ye.engine),ee},this.getOS=function(){var ee={};return ee[h]=r,ee[y]=r,nt.call(ee,q,ye.os),ee},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return q},this.setUA=function(ee){return q=typeof ee===l&&ee.length>R?ht(ee,R):ee,this},this.setUA(q),this};W.VERSION=i,W.BROWSER=Ft([h,y,d]),W.CPU=Ft([m]),W.DEVICE=Ft([f,g,p,v,_,C,E,b,S]),W.ENGINE=W.OS=Ft([h,y]),t.exports&&(e=t.exports=W),e.UAParser=W;var Pe=typeof n!==u&&(n.jQuery||n.Zepto);if(Pe&&!Pe.ua){var Q=new W;Pe.ua=Q.getResult(),Pe.ua.get=function(){return Q.getUA()},Pe.ua.set=function(P){Q.setUA(P);var L=Q.getResult();for(var q in L)Pe.ua[q]=L[q]}}})(typeof window=="object"?window:A)})(lc,lc.exports);var ev=lc.exports;const wL=sv(ev);var CL=function(){function t(){this.ua=new ev.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return t.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:RL(),platform:"Web",os:kL(this.ua),deviceModel:xL(this.ua)}},t}(),kL=function(t){var e,n;return[(e=t.browser)===null||e===void 0?void 0:e.name,(n=t.browser)===null||n===void 0?void 0:n.major].filter(function(r){return r!=null}).join(" ")},xL=function(t){var e;return(e=t.os)===null||e===void 0?void 0:e.name},RL=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},OL=function(){function t(){this.queue=[]}return t.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},t.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(n){e(n)}),this.queue=[])},t}();/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var mn=function(){return mn=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},mn.apply(this,arguments)},aa=function(t,e){var n=["string","number","boolean","undefined"],r=typeof t,i=typeof e;if(r!==i)return!1;for(var s=0,a=n;s<a.length;s++){var o=a[s];if(o===r)return t===e}if(t==null&&e==null)return!0;if(t==null||e==null||t.length!==e.length)return!1;var u=Array.isArray(t),c=Array.isArray(e);if(u!==c)return!1;if(u&&c){for(var l=0;l<t.length;l++)if(!aa(t[l],e[l]))return!1}else{var d=Object.keys(t).sort(),f=Object.keys(e).sort();if(!aa(d,f))return!1;var h=!0;return Object.keys(t).forEach(function(p){aa(t[p],e[p])||(h=!1)}),h}return!0},AL="$set",DL="$unset",ML="$clearAll";Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r});var LL=function(){function t(){this.identity={userProperties:{}},this.listeners=new Set}return t.prototype.editIdentity=function(){var e=this,n=mn({},this.identity.userProperties),r=mn(mn({},this.identity),{userProperties:n});return{setUserId:function(i){return r.userId=i,this},setDeviceId:function(i){return r.deviceId=i,this},setUserProperties:function(i){return r.userProperties=i,this},updateUserProperties:function(i){for(var s=r.userProperties||{},a=0,o=Object.entries(i);a<o.length;a++){var u=o[a],c=u[0],l=u[1];switch(c){case AL:for(var d=0,f=Object.entries(l);d<f.length;d++){var h=f[d],p=h[0],g=h[1];s[p]=g}break;case DL:for(var y=0,m=Object.keys(l);y<m.length;y++){var p=m[y];delete s[p]}break;case ML:s={};break}}return r.userProperties=s,this},commit:function(){return e.setIdentity(r),this}}},t.prototype.getIdentity=function(){return mn({},this.identity)},t.prototype.setIdentity=function(e){var n=mn({},this.identity);this.identity=mn({},e),aa(n,this.identity)||this.listeners.forEach(function(r){r(e)})},t.prototype.addIdentityListener=function(e){this.listeners.add(e)},t.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},t}(),bi=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,NL=function(){function t(){this.identityStore=new LL,this.eventBridge=new OL,this.applicationContextProvider=new CL}return t.getInstance=function(e){return bi.analyticsConnectorInstances||(bi.analyticsConnectorInstances={}),bi.analyticsConnectorInstances[e]||(bi.analyticsConnectorInstances[e]=new t),bi.analyticsConnectorInstances[e]},t}(),tv=function(){return NL.getInstance("$default_instance")},PL=function(){function t(){this.name="identity",this.type=Jt.BEFORE,this.identityStore=tv().identityStore}return t.prototype.execute=function(e){return lt(this,void 0,void 0,function(){var n;return dt(this,function(r){return n=e.user_properties,n&&this.identityStore.editIdentity().updateUserProperties(n).commit(),[2,e]})})},t.prototype.setup=function(e){return Promise.resolve(void 0)},t}(),$L=function(){var t,e,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return(r=(n=(e=(t=navigator.languages)===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:navigator.language)!==null&&n!==void 0?n:i)!==null&&r!==void 0?r:""},lu=function(t,e){for(var n=0;n<e.length;n++){var r=e[n],i=r.name,s=r.args,a=r.resolve,o=t&&t[i];if(typeof o=="function"){var u=o.apply(t,s);typeof a=="function"&&a(u==null?void 0:u.promise)}}return t},du=function(t){var e=t;return e&&e._q!==void 0},UL="1.8.0",FL="Web",BL="$remote",HL=function(){function t(){this.name="context",this.type=Jt.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(UL);var e;typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new wL(e).getResult()}return t.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},t.prototype.execute=function(e){return Ge(this,void 0,void 0,function(){var n,r,i,s,a,o;return ze(this,function(u){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),n=new Date().getTime(),r=this.uaResult.browser.name,i=this.uaResult.browser.version,s=this.uaResult.device.model||this.uaResult.os.name,a=this.uaResult.device.vendor,o=ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce(ce({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:n},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:FL}),this.config.trackingOptions.osName&&{os_name:r}),this.config.trackingOptions.osVersion&&{os_version:i}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:a}),this.config.trackingOptions.deviceModel&&{device_model:s}),this.config.trackingOptions.language&&{language:$L()}),this.config.trackingOptions.ipAddress&&{ip:BL}),{insert_id:Do(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:this.eventId++,library:this.library}),[2,o]})})},t.prototype.isSessionValid=function(){var e=this.config.lastEventTime||Date.now(),n=Date.now()-e;return n<this.config.sessionTimeout},t}(),Ql=function(){function t(){}return t.prototype.isEnabled=function(){return Ge(this,void 0,void 0,function(){var e,n,r,i;return ze(this,function(s){switch(s.label){case 0:if(!Mt())return[2,!1];e=String(Date.now()),n=new t,r="AMP_TEST",s.label=1;case 1:return s.trys.push([1,4,5,7]),[4,n.set(r,e)];case 2:return s.sent(),[4,n.get(r)];case 3:return i=s.sent(),[2,i===e];case 4:return s.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return s.sent(),[7];case 7:return[2]}})})},t.prototype.get=function(e){return Ge(this,void 0,void 0,function(){var n;return ze(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return n=r.sent(),n?[2,JSON.parse(n)]:[2,void 0];case 2:return r.sent(),[2,void 0];case 3:return[2]}})})},t.prototype.getRaw=function(e){var n;return Ge(this,void 0,void 0,function(){return ze(this,function(r){return[2,((n=Mt())===null||n===void 0?void 0:n.localStorage.getItem(e))||void 0]})})},t.prototype.set=function(e,n){var r;return Ge(this,void 0,void 0,function(){return ze(this,function(i){try{(r=Mt())===null||r===void 0||r.localStorage.setItem(e,JSON.stringify(n))}catch{}return[2]})})},t.prototype.remove=function(e){var n;return Ge(this,void 0,void 0,function(){return ze(this,function(r){try{(n=Mt())===null||n===void 0||n.localStorage.removeItem(e)}catch{}return[2]})})},t.prototype.reset=function(){var e;return Ge(this,void 0,void 0,function(){return ze(this,function(n){try{(e=Mt())===null||e===void 0||e.localStorage.clear()}catch{}return[2]})})},t}(),jL=function(t){Mo(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={done:4},n}return e.prototype.send=function(n,r){return Ge(this,void 0,void 0,function(){var i=this;return ze(this,function(s){return[2,new Promise(function(a,o){typeof XMLHttpRequest>"u"&&o(new Error("XHRTransport is not supported."));var u=new XMLHttpRequest;u.open("POST",n,!0),u.onreadystatechange=function(){if(u.readyState===i.state.done)try{var c=u.responseText,l=JSON.parse(c),d=i.buildResponse(l);a(d)}catch(f){o(f)}},u.setRequestHeader("Content-Type","application/json"),u.setRequestHeader("Accept","*/*"),u.send(JSON.stringify(r))})]})})},e}(Xl),GL=function(t){Mo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.send=function(n,r){return Ge(this,void 0,void 0,function(){var i=this;return ze(this,function(s){return[2,new Promise(function(a,o){var u=Mt();if(!(u!=null&&u.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var c=JSON.stringify(r),l=u.navigator.sendBeacon(n,JSON.stringify(r));return a(l?i.buildResponse({code:200,events_ingested:r.events.length,payload_size_bytes:c.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(d){o(d)}})]})})},e}(Xl),ys=function(){var t=new Qy,e={deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0};return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:t,cookieUpgrade:!0,disableCookies:!1,domain:"",sessionTimeout:30*60*1e3,trackingOptions:e,transportProvider:new IL}},jh=function(t){Mo(e,t);function e(n,r){var i=this,s,a,o,u,c,l,d,f,h,p=ys();return i=t.call(this,ce(ce({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30,transportProvider:p.transportProvider},r),{apiKey:n}))||this,i._optOut=!1,i.cookieStorage=(s=r==null?void 0:r.cookieStorage)!==null&&s!==void 0?s:p.cookieStorage,i.deviceId=r==null?void 0:r.deviceId,i.lastEventTime=r==null?void 0:r.lastEventTime,i.optOut=!!(r!=null&&r.optOut),i.sessionId=r==null?void 0:r.sessionId,i.userId=r==null?void 0:r.userId,i.appVersion=r==null?void 0:r.appVersion,i.attribution=r==null?void 0:r.attribution,i.cookieExpiration=(a=r==null?void 0:r.cookieExpiration)!==null&&a!==void 0?a:p.cookieExpiration,i.cookieSameSite=(o=r==null?void 0:r.cookieSameSite)!==null&&o!==void 0?o:p.cookieSameSite,i.cookieSecure=(u=r==null?void 0:r.cookieSecure)!==null&&u!==void 0?u:p.cookieSecure,i.cookieUpgrade=(c=r==null?void 0:r.cookieUpgrade)!==null&&c!==void 0?c:p.cookieUpgrade,i.disableCookies=(l=r==null?void 0:r.disableCookies)!==null&&l!==void 0?l:p.disableCookies,i.domain=(d=r==null?void 0:r.domain)!==null&&d!==void 0?d:p.domain,i.partnerId=r==null?void 0:r.partnerId,i.sessionTimeout=(f=r==null?void 0:r.sessionTimeout)!==null&&f!==void 0?f:p.sessionTimeout,i.trackingOptions=(h=r==null?void 0:r.trackingOptions)!==null&&h!==void 0?h:p.trackingOptions,i}return Object.defineProperty(e.prototype,"deviceId",{get:function(){return this._deviceId},set:function(n){this._deviceId!==n&&(this._deviceId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userId",{get:function(){return this._userId},set:function(n){this._userId!==n&&(this._userId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionId",{get:function(){return this._sessionId},set:function(n){this._sessionId!==n&&(this._sessionId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(n){this._optOut!==n&&(this._optOut=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(n){this._lastEventTime!==n&&(this._lastEventTime=n,this.updateStorage())},enumerable:!1,configurable:!0}),e.prototype.updateStorage=function(){var n,r={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime};(n=this.cookieStorage)===null||n===void 0||n.set(Jl(this.apiKey),r)},e}(iL),zL=function(t,e){return Ge(void 0,void 0,void 0,function(){var n,r,i,s,a,o,u,c,l,d,f,h,p,g,y,m,v,_,E,C,b,S,R,k;return ze(this,function(I){switch(I.label){case 0:return n=ys(),(m=e==null?void 0:e.domain)!==null&&m!==void 0?(i=m,[3,3]):[3,1];case 1:return[4,VL()];case 2:i=I.sent(),I.label=3;case 3:return r=i,[4,WL(ce(ce({},e),{domain:r}))];case 4:return s=I.sent(),[4,s.get(Jl(t))];case 5:return a=I.sent(),o=cc(),u=(E=(_=(v=e==null?void 0:e.deviceId)!==null&&v!==void 0?v:o.deviceId)!==null&&_!==void 0?_:a==null?void 0:a.deviceId)!==null&&E!==void 0?E:Do(),c=(C=e==null?void 0:e.lastEventTime)!==null&&C!==void 0?C:a==null?void 0:a.lastEventTime,l=(b=e==null?void 0:e.optOut)!==null&&b!==void 0?b:!!(a!=null&&a.optOut),d=(S=e==null?void 0:e.sessionId)!==null&&S!==void 0?S:a==null?void 0:a.sessionId,f=(R=e==null?void 0:e.userId)!==null&&R!==void 0?R:a==null?void 0:a.userId,h=jh.bind,p=[void 0,t],g=[ce({},e)],y={cookieStorage:s,deviceId:u,domain:r,lastEventTime:c,optOut:l,sessionId:d},[4,qL(e)];case 6:return[2,new(h.apply(jh,p.concat([ce.apply(void 0,g.concat([(y.storageProvider=I.sent(),y.trackingOptions=ce(ce({},n.trackingOptions),e==null?void 0:e.trackingOptions),y.transportProvider=(k=e==null?void 0:e.transportProvider)!==null&&k!==void 0?k:rv(e==null?void 0:e.transport),y.userId=f,y)]))])))]}})})},WL=function(t,e){return e===void 0&&(e=ys()),Ge(void 0,void 0,void 0,function(){var n,r,i;return ze(this,function(s){switch(s.label){case 0:return n=ce(ce({},e),t),r=t==null?void 0:t.cookieStorage,i=!r,i?[3,2]:[4,r.isEnabled()];case 1:i=!s.sent(),s.label=2;case 2:return i?[2,nv(n)]:[2,r]}})})},nv=function(t){return Ge(void 0,void 0,void 0,function(){var e,n;return ze(this,function(r){switch(r.label){case 0:return e=new Va({domain:t.domain,expirationDays:t.cookieExpiration,sameSite:t.cookieSameSite,secure:t.cookieSecure}),n=t.disableCookies,n?[3,2]:[4,e.isEnabled()];case 1:n=!r.sent(),r.label=2;case 2:return n?(e=new Ql,[4,e.isEnabled()]):[3,4];case 3:r.sent()||(e=new Qy),r.label=4;case 4:return[2,e]}})})},qL=function(t){return Ge(void 0,void 0,void 0,function(){var e,n,r,i,s,a,o,u;return ze(this,function(c){switch(c.label){case 0:if(e=t&&Object.prototype.hasOwnProperty.call(t,"storageProvider"),!(!e||t.storageProvider))return[3,9];c.label=1;case 1:c.trys.push([1,7,8,9]),n=cL([t==null?void 0:t.storageProvider,new Ql]),r=n.next(),c.label=2;case 2:return r.done?[3,6]:(i=r.value,s=i,s?[4,i.isEnabled()]:[3,4]);case 3:s=c.sent(),c.label=4;case 4:if(s)return[2,i];c.label=5;case 5:return r=n.next(),[3,2];case 6:return[3,9];case 7:return a=c.sent(),o={error:a},[3,9];case 8:try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(o)throw o.error}return[7];case 9:return[2,void 0]}})})},rv=function(t){return t===Wa.XHR?new jL:t===Wa.SendBeacon?new GL:ys().transportProvider},VL=function(t){return Ge(void 0,void 0,void 0,function(){var e,n,r,i,s,s,a,o,u,c;return ze(this,function(l){switch(l.label){case 0:return[4,new Va().isEnabled()];case 1:if(!l.sent()||typeof location>"u")return[2,""];for(e=location.hostname,n=e.split("."),r=[],i="AMP_TLDTEST",s=n.length-2;s>=0;--s)r.push(n.slice(s).join("."));s=0,l.label=2;case 2:return s<r.length?(a=r[s],o={domain:"."+a},u=new Va(o),[4,u.set(i,1)]):[3,7];case 3:return l.sent(),[4,u.get(i)];case 4:return c=l.sent(),c?[4,u.remove(i)]:[3,6];case 5:return l.sent(),[2,"."+a];case 6:return s++,[3,2];case 7:return[2,""]}})})},KL=function(t,e){return Ge(void 0,void 0,void 0,function(){var n,r,i,s,a,o,u,c,l,d;return ze(this,function(f){switch(f.label){case 0:return n=new Va,[4,n.isEnabled()];case 1:return(!f.sent()||e!=null&&e.disableCookies)&&(n=new Ql),[4,n.isEnabled()];case 2:return f.sent()?(r=EL(t),[4,n.getRaw(r)]):[2,{optOut:!1}];case 3:return i=f.sent(),i?((d=e==null?void 0:e.cookieUpgrade)!==null&&d!==void 0?d:ys().cookieUpgrade)?[4,n.remove(r)]:[3,5]:[2,{optOut:!1}];case 4:f.sent(),f.label=5;case 5:return s=lL(i.split("."),5),a=s[0],o=s[1],u=s[2],c=s[3],l=s[4],[2,{deviceId:a,userId:YL(o),sessionId:Gh(c),lastEventTime:Gh(l),optOut:!!u}]}})})},Gh=function(t){var e=parseInt(t,32);if(!isNaN(e))return e},YL=function(t){if(!(!atob||!escape||!t))try{return decodeURIComponent(escape(atob(t)))}catch{return}},XL=function(t){Mo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(n,r,i){var s,a,o;return n===void 0&&(n=""),Ge(this,void 0,void 0,function(){var u,c,l,d,f=this;return ze(this,function(h){switch(h.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,KL(n,i)]);case 1:return u=h.sent(),[4,zL(n,ce(ce({},i),{deviceId:(s=u.deviceId)!==null&&s!==void 0?s:i==null?void 0:i.deviceId,sessionId:(a=u.sessionId)!==null&&a!==void 0?a:i==null?void 0:i.sessionId,optOut:(o=i==null?void 0:i.optOut)!==null&&o!==void 0?o:u.optOut,lastEventTime:u.lastEventTime,userId:r??u.userId}))];case 2:return c=h.sent(),[4,t.prototype._init.call(this,c)];case 3:return h.sent(),l=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),l=!0),d=tv(),d.eventBridge.setEventReceiver(function(p){f.track(p.eventType,p.eventProperties)}),d.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new HL)];case 4:return h.sent(),[4,this.add(new PL)];case 5:return h.sent(),[4,this.add(new aL)];case 6:return h.sent(),this.initializing=!1,[4,this.runAttributionStrategy(c.attribution,l)];case 7:return h.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return h.sent(),[2]}})})},e.prototype.runAttributionStrategy=function(n,r){return r===void 0&&(r=!1),Ge(this,void 0,void 0,function(){var i,s,a,o;return ze(this,function(u){switch(u.label){case 0:return i=this.track.bind(this),s=this.setSessionId.bind(this,Date.now()),[4,nv(this.config)];case 1:return a=u.sent(),o=new TL(this.config.apiKey,ce(ce({},n),{storage:a,track:i,onNewCampaign:s})),[4,o.send(r)];case 2:return u.sent(),[2]}})})},e.prototype.getUserId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.userId},e.prototype.setUserId=function(n){if(!this.config){this.q.push(this.setUserId.bind(this,n));return}this.config.userId=n},e.prototype.getDeviceId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.deviceId},e.prototype.setDeviceId=function(n){if(!this.config){this.q.push(this.setDeviceId.bind(this,n));return}this.config.deviceId=n},e.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId(Do())},e.prototype.getSessionId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.sessionId},e.prototype.setSessionId=function(n){if(!this.config){this.q.push(this.setSessionId.bind(this,n));return}this.config.sessionId=n,this.config.lastEventTime=void 0},e.prototype.setTransport=function(n){if(!this.config){this.q.push(this.setTransport.bind(this,n));return}this.config.transportProvider=rv(n)},e.prototype.identify=function(n,r){if(du(n)){var i=n._q;n._q=[],n=lu(new qa,i)}return r!=null&&r.user_id&&this.setUserId(r.user_id),r!=null&&r.device_id&&this.setDeviceId(r.device_id),t.prototype.identify.call(this,n,r)},e.prototype.groupIdentify=function(n,r,i,s){if(du(i)){var a=i._q;i._q=[],i=lu(new qa,a)}return t.prototype.groupIdentify.call(this,n,r,i,s)},e.prototype.revenue=function(n,r){if(du(n)){var i=n._q;n._q=[],n=lu(new tL,i)}return t.prototype.revenue.call(this,n,r)},e}(eL),JL=function(){var t=new XL;return{init:xe(kt(t.init.bind(t)),"init",Ce(t),ke(t,["config"])),add:xe(kt(t.add.bind(t)),"add",Ce(t),ke(t,["config.apiKey","timeline.plugins"])),remove:xe(kt(t.remove.bind(t)),"remove",Ce(t),ke(t,["config.apiKey","timeline.plugins"])),track:xe(kt(t.track.bind(t)),"track",Ce(t),ke(t,["config.apiKey","timeline.queue.length"])),logEvent:xe(kt(t.logEvent.bind(t)),"logEvent",Ce(t),ke(t,["config.apiKey","timeline.queue.length"])),identify:xe(kt(t.identify.bind(t)),"identify",Ce(t),ke(t,["config.apiKey","timeline.queue.length"])),groupIdentify:xe(kt(t.groupIdentify.bind(t)),"groupIdentify",Ce(t),ke(t,["config.apiKey","timeline.queue.length"])),setGroup:xe(kt(t.setGroup.bind(t)),"setGroup",Ce(t),ke(t,["config.apiKey","timeline.queue.length"])),revenue:xe(kt(t.revenue.bind(t)),"revenue",Ce(t),ke(t,["config.apiKey","timeline.queue.length"])),flush:xe(kt(t.flush.bind(t)),"flush",Ce(t),ke(t,["config.apiKey","timeline.queue.length"])),getUserId:xe(t.getUserId.bind(t),"getUserId",Ce(t),ke(t,["config","config.userId"])),setUserId:xe(t.setUserId.bind(t),"setUserId",Ce(t),ke(t,["config","config.userId"])),getDeviceId:xe(t.getDeviceId.bind(t),"getDeviceId",Ce(t),ke(t,["config","config.deviceId"])),setDeviceId:xe(t.setDeviceId.bind(t),"setDeviceId",Ce(t),ke(t,["config","config.deviceId"])),reset:xe(t.reset.bind(t),"reset",Ce(t),ke(t,["config","config.userId","config.deviceId"])),getSessionId:xe(t.getSessionId.bind(t),"getSessionId",Ce(t),ke(t,["config"])),setSessionId:xe(t.setSessionId.bind(t),"setSessionId",Ce(t),ke(t,["config"])),setOptOut:xe(t.setOptOut.bind(t),"setOptOut",Ce(t),ke(t,["config"])),setTransport:xe(t.setTransport.bind(t),"setTransport",Ce(t),ke(t,["config"]))}};const vs=JL();var pN=vs.identify,gN=vs.init,mN=vs.reset,_N=vs.setUserId,yN=vs.track;export{hN as G,qa as I,fN as S,pN as a,Vi as b,aN as c,kA as d,oN as e,Hb as f,fh as g,fa as h,gN as i,uN as j,dN as k,DC as l,cN as m,mN as r,_N as s,yN as t,Rn as w};
//# sourceMappingURL=analytics-fLNRt1uu.js.map