import{a as e,n as t,o as n,r,t as i}from"./rolldown-runtime-Bhmf7a9N.js";var a=i((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function D(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function re(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+D(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(ne,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+D(s,l);c+=re(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+D(s,l++),c+=re(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function O(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ae={current:null},oe={transition:null},se={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:oe,ReactCurrentOwner:C};e.Children={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=oe.transition;oe.transition={};try{e()}finally{oe.transition=t}},e.unstable_act=function(){throw Error(`act(...) is not supported in production builds of React.`)},e.useCallback=function(e,t){return ae.current.useCallback(e,t)},e.useContext=function(e){return ae.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return ae.current.useDeferredValue(e)},e.useEffect=function(e,t){return ae.current.useEffect(e,t)},e.useId=function(){return ae.current.useId()},e.useImperativeHandle=function(e,t,n){return ae.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return ae.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return ae.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return ae.current.useMemo(e,t)},e.useReducer=function(e,t,n){return ae.current.useReducer(e,t,n)},e.useRef=function(e){return ae.current.useRef(e)},e.useState=function(e){return ae.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return ae.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return ae.current.useTransition()},e.version=`18.2.0`})),o=i(((e,t)=>{t.exports=a()}));function s(e){switch(w.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:return!0;default:return S(e,Error)}}function c(e,t){return w.call(e)===`[object ${t}]`}function l(e){return c(e,`ErrorEvent`)}function u(e){return c(e,`DOMError`)}function d(e){return c(e,`DOMException`)}function f(e){return c(e,`String`)}function p(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function m(e){return e===null||p(e)||typeof e!=`object`&&typeof e!=`function`}function h(e){return c(e,`Object`)}function g(e){return typeof Event<`u`&&S(e,Event)}function _(e){return typeof Element<`u`&&S(e,Element)}function v(e){return c(e,`RegExp`)}function y(e){return!!(e&&e.then&&typeof e.then==`function`)}function b(e){return h(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function x(e){return typeof e==`number`&&e!==e}function S(e,t){try{return e instanceof t}catch{return!1}}function C(e){return!!(typeof e==`object`&&e&&(e.__isVue||e._isVue))}var w,T=t((()=>{w=Object.prototype.toString}));function E(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ee(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let a=Math.min(i+140,r);return a>r-5&&(a=r),a===r&&(i=Math.max(a-140,0)),n=n.slice(i,a),i>0&&(n=`'{snip} ${n}`),a<r&&(n+=` {snip}`),n}function te(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{C(r)?n.push(`[VueViewModel]`):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function ne(e,t,n=!1){return f(e)?v(t)?t.test(e):f(t)?n?e===t:e.includes(t):!1:!1}function D(e,t=[],n=!1){return t.some(t=>ne(e,t,n))}var re=t((()=>{T()}));function O(e,t,n=250,r,i,a,o){if(!a.exception||!a.exception.values||!o||!S(o.originalException,Error))return;let s=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;s&&(a.exception.values=se(ie(e,t,i,o.originalException,r,a.exception.values,s,0),n))}function ie(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(S(r[i],Error)){ae(o,s);let a=e(t,r[i]),l=c.length;oe(a,i,l,s),c=ie(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,a)=>{if(S(r,Error)){ae(o,s);let l=e(t,r),u=c.length;oe(l,`errors[${a}]`,u,s),c=ie(e,t,n,r,i,[l,...c],l,u)}}),c}function ae(e,t){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,...e.type===`AggregateError`&&{is_exception_group:!0},exception_id:t}}function oe(e,t,n,r){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function se(e,t){return e.map(e=>(e.value&&=E(e.value,t),e))}var ce=t((()=>{T(),re()}));function le(e){return e&&e.Math==Math?e:void 0}function ue(){return k}function de(e,t,n){let r=n||k,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}var k,fe=t((()=>{k=typeof globalThis==`object`&&le(globalThis)||typeof window==`object`&&le(window)||typeof self==`object`&&le(self)||typeof global==`object`&&le(global)||(function(){return this})()||{}}));function pe(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||ye;for(;n&&i++<5&&(o=me(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function me(e,t){let n=e,r=[],i,a,o,s,c;if(!n||!n.tagName)return``;if(ve.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(l&&l.length)l.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&f(i))for(a=i.split(/\s+/),c=0;c<a.length;c++)r.push(`.${a[c]}`);let u=[`aria-label`,`type`,`name`,`title`,`alt`];for(c=0;c<u.length;c++)o=u[c],s=n.getAttribute(o),s&&r.push(`[${o}="${s}"]`);return r.join(``)}function he(){try{return ve.document.location.href}catch{return``}}function ge(e){return ve.document&&ve.document.querySelector?ve.document.querySelector(e):null}function _e(e){if(!ve.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}var ve,ye,be=t((()=>{T(),fe(),ve=ue(),ye=80})),xe,Se=t((()=>{xe=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__}));function Ce(e){if(!(`console`in k))return e();let t=k.console,n={},r=Object.keys(De);r.forEach(e=>{let r=De[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function we(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return xe?Ee.forEach(n=>{t[n]=(...t)=>{e&&Ce(()=>{k.console[n](`${Te}[${n}]:`,...t)})}}):Ee.forEach(e=>{t[e]=()=>void 0}),t}var Te,Ee,De,A,Oe=t((()=>{Se(),fe(),Te=`Sentry Logger `,Ee=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],De={},A=we()}));function ke(e){return e===`http`||e===`https`}function Ae(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function je(e){let t=Fe.exec(e);if(!t){Ce(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a,o=``,s]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Me({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function Me(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function Ne(e){if(!xe)return!0;let{port:t,projectId:n,protocol:r}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(A.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?ke(r)?t&&isNaN(parseInt(t,10))?(A.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(A.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(A.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Pe(e){let t=typeof e==`string`?je(e):Me(e);if(!(!t||!Ne(t)))return t}var Fe,Ie=t((()=>{Se(),Oe(),Fe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/})),Le,Re=t((()=>{Le=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}}));function ze(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i==`function`&&Ve(i,r),e[t]=i}function Be(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{xe&&A.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ve(e,t){try{e.prototype=t.prototype=t.prototype||{},Be(e,`__sentry_original__`,t)}catch{}}function He(e){return e.__sentry_original__}function Ue(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join(`&`)}function We(e){if(s(e))return{message:e.message,name:e.name,stack:e.stack,...Ke(e)};if(g(e)){let t={type:e.type,target:Ge(e.target),currentTarget:Ge(e.currentTarget),...Ke(e)};return typeof CustomEvent<`u`&&S(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Ge(e){try{return _(e)?pe(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}}function Ke(e){if(typeof e==`object`&&e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function qe(e,t=40){let n=Object.keys(We(e));if(n.sort(),!n.length)return`[object has no keys]`;if(n[0].length>=t)return E(n[0],t);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`, `);if(!(r.length>t))return e===n.length?r:E(r,t)}return``}function Je(e){return Ye(e,new Map)}function Ye(e,t){if(Xe(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let n of Object.keys(e))e[n]!==void 0&&(r[n]=Ye(e[n],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(e=>{r.push(Ye(e,t))}),r}return e}function Xe(e){if(!h(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t===`Object`}catch{return!0}}var Ze=t((()=>{be(),Se(),T(),Oe(),re()}));function Qe(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{let r=[],i=e.split(`
`);for(let e=n;e<i.length;e++){let n=i[e];if(n.length>1024)continue;let a=rt.test(n)?n.replace(rt,`$1`):n;if(!a.match(/\S*Error: /)){for(let e of t){let t=e(a);if(t){r.push(t);break}}if(r.length>=nt)break}}return et(r)}}function $e(e){return Array.isArray(e)?Qe(...e):e}function et(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||``)&&t.pop(),t.reverse(),it.test(t[t.length-1].function||``)&&(t.pop(),it.test(t[t.length-1].function||``)&&t.pop()),t.slice(0,nt).map(e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||`?`}))}function tt(e){try{return!e||typeof e!=`function`?at:e.name||at}catch{return at}}var nt,rt,it,at,ot=t((()=>{nt=50,rt=/\(error: (.*)\)/,it=/captureMessage|captureException/,at=`<anonymous>`}));function st(e,t){ut[e]=ut[e]||[],ut[e].push(t)}function ct(e,t){dt[e]||(t(),dt[e]=!0)}function lt(e,t){let n=e&&ut[e];if(n)for(let r of n)try{r(t)}catch(t){xe&&A.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${tt(r)}\nError:`,t)}}var ut,dt,ft=t((()=>{Se(),Oe(),ot(),ut={},dt={}}));function pt(e){let t=`console`;st(t,e),ct(t,mt)}function mt(){`console`in k&&Ee.forEach(function(e){e in k.console&&ze(k.console,e,function(t){return De[e]=t,function(...t){lt(`console`,{args:t,level:e});let n=De[e];n&&n.apply(k.console,t)}})})}var ht=t((()=>{Oe(),Ze(),fe(),ft()}));function j(){let e=k,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,``);t&&t.getRandomValues&&(n=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return`10000000100040008000100000000000`.replace(/[018]/g,e=>(e^(n()&15)>>e/4).toString(16))}function gt(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function _t(e){let{message:t,event_id:n}=e;if(t)return t;let r=gt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function vt(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function yt(e,t){let n=gt(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i&&i.data,...t.data};n.mechanism.data=e}}function bt(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(e=>ee(e,0)),t.context_line=ee(e[Math.min(r-1,i)],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(e=>ee(e,0))}function xt(e){if(e&&e.__sentry_captured__)return!0;try{Be(e,`__sentry_captured__`,!0)}catch{}return!1}function St(e){return Array.isArray(e)?e:[e]}var Ct=t((()=>{Ze(),re(),fe()}));function wt(e){st(`dom`,e),ct(`dom`,Tt)}function Tt(){if(!At.document)return;let e=lt.bind(null,`dom`),t=Ot(e,!0);At.document.addEventListener(`click`,t,!1),At.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=At[t]&&At[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty(`addEventListener`)||(ze(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this,a=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=a[n]=a[n]||{refCount:0};if(!o.handler){let r=Ot(e);o.handler=r,t.call(this,n,r,i)}o.refCount++}catch{}return t.call(this,n,r,i)}}),ze(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this,i=n.__sentry_instrumentation_handlers__||{},a=i[t];a&&(a.refCount--,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete i[t]),Object.keys(i).length===0&&delete n.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Et(e){if(e.type!==Nt)return!1;try{if(!e.target||e.target._sentryId!==Pt)return!1}catch{}return!0}function Dt(e,t){return e===`keypress`?!t||!t.tagName?!0:!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!1}function Ot(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=kt(n);if(Dt(n.type,r))return;Be(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Be(r,`_sentryId`,j());let i=n.type===`keypress`?`input`:n.type;Et(n)||(e({event:n,name:i,global:t}),Nt=n.type,Pt=r?r._sentryId:void 0),clearTimeout(Mt),Mt=At.setTimeout(()=>{Pt=void 0,Nt=void 0},jt)}}function kt(e){try{return e.target}catch{return null}}var At,jt,Mt,Nt,Pt,Ft=t((()=>{Ct(),Ze(),fe(),ft(),At=k,jt=1e3}));function It(){if(!(`fetch`in Bt))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}function Lt(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Rt(){if(typeof EdgeRuntime==`string`)return!0;if(!It())return!1;if(Lt(Bt.fetch))return!0;let e=!1,t=Bt.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Lt(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){xe&&A.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function zt(){return`ReportingObserver`in Bt}var Bt,Vt=t((()=>{Se(),Oe(),fe(),Bt=ue()}));function Ht(e){let t=`fetch`;st(t,e),ct(t,Ut)}function Ut(){Rt()&&ze(k,`fetch`,function(e){return function(...t){let{method:n,url:r}=Kt(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return lt(`fetch`,{...i}),e.apply(k,t).then(e=>(lt(`fetch`,{...i,endTimestamp:Date.now(),response:e}),e),e=>{throw lt(`fetch`,{...i,endTimestamp:Date.now(),error:e}),e})}})}function Wt(e,t){return!!e&&typeof e==`object`&&!!e[t]}function Gt(e){return typeof e==`string`?e:e?Wt(e,`url`)?e.url:e.toString?e.toString():``:``}function Kt(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Gt(t),method:Wt(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:Gt(t),method:Wt(t,`method`)?String(t.method).toUpperCase():`GET`}}var qt=t((()=>{Ze(),Vt(),fe(),ft()}));function Jt(e){let t=`error`;st(t,e),ct(t,Yt)}function Yt(){Xt=k.onerror,k.onerror=function(e,t,n,r,i){return lt(`error`,{column:r,error:i,line:n,msg:e,url:t}),Xt&&!Xt.__SENTRY_LOADER__?Xt.apply(this,arguments):!1},k.onerror.__SENTRY_INSTRUMENTED__=!0}var Xt,Zt=t((()=>{fe(),ft(),Xt=null}));function Qt(e){let t=`unhandledrejection`;st(t,e),ct(t,$t)}function $t(){en=k.onunhandledrejection,k.onunhandledrejection=function(e){return lt(`unhandledrejection`,e),en&&!en.__SENTRY_LOADER__?en.apply(this,arguments):!0},k.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var en,tn=t((()=>{fe(),ft(),en=null}));function nn(){let e=rn.chrome,t=e&&e.app&&e.app.runtime,n=`history`in rn&&!!rn.history.pushState&&!!rn.history.replaceState;return!t&&n}var rn,an=t((()=>{fe(),rn=ue()}));function on(e){let t=`history`;st(t,e),ct(t,sn)}function sn(){if(!nn())return;let e=cn.onpopstate;cn.onpopstate=function(...t){let n=cn.location.href,r=ln;if(ln=n,lt(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}};function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=ln,t=String(n);ln=t,lt(`history`,{from:e,to:t})}return e.apply(this,t)}}ze(cn.history,`pushState`,t),ze(cn.history,`replaceState`,t)}var cn,ln,un=t((()=>{Ze(),fe(),an(),ft(),cn=k}));function dn(e){st(`xhr`,e),ct(`xhr`,fn)}function fn(){if(!mn.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;ze(e,`open`,function(e){return function(...t){let n=Date.now(),r=f(t[0])?t[0].toUpperCase():void 0,i=pn(t[1]);if(!r||!i)return e.apply(this,t);this[hn]={method:r,url:i,request_headers:{}},r===`POST`&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let e=this[hn];if(e&&this.readyState===4){try{e.status_code=this.status}catch{}lt(`xhr`,{args:[r,i],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return`onreadystatechange`in this&&typeof this.onreadystatechange==`function`?ze(this,`onreadystatechange`,function(e){return function(...t){return a(),e.apply(this,t)}}):this.addEventListener(`readystatechange`,a),ze(this,`setRequestHeader`,function(e){return function(...t){let[n,r]=t,i=this[hn];return i&&f(n)&&f(r)&&(i.request_headers[n.toLowerCase()]=r),e.apply(this,t)}}),e.apply(this,t)}}),ze(e,`send`,function(e){return function(...t){let n=this[hn];return n?(t[0]!==void 0&&(n.body=t[0]),lt(`xhr`,{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),e.apply(this,t)):e.apply(this,t)}})}function pn(e){if(f(e))return e;try{return e.toString()}catch{}}var mn,hn,gn=t((()=>{T(),Ze(),fe(),ft(),mn=k,hn=`__sentry_xhr_v3__`}));function _n(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function vn(){return`npm`}var yn=t((()=>{}));function bn(){return!_n()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}var xn=t((()=>{yn()}));function Sn(){return typeof window<`u`&&(!bn()||Cn())}function Cn(){return k.process!==void 0&&k.process.type===`renderer`}var wn=t((()=>{xn(),fe()}));function Tn(){let e=typeof WeakSet==`function`,t=e?new WeakSet:[];function n(n){if(e)return t.has(n)?!0:(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1}function r(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}return[n,r]}var En=t((()=>{}));function Dn(e,t=100,n=1/0){try{return kn(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function On(e,t=3,n=100*1024){let r=Dn(e,t);return Nn(r)>n?On(e,t-1,n):r}function kn(e,t,n=1/0,r=1/0,i=Tn()){let[a,o]=i;if(t==null||[`number`,`boolean`,`string`].includes(typeof t)&&!x(t))return t;let s=An(e,t);if(!s.startsWith(`[object `))return s;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__==`number`?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let l=t;if(l&&typeof l.toJSON==`function`)try{return kn(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=We(t);for(let e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){u[e]=`[MaxProperties ~]`;break}let t=f[e];u[e]=kn(e,t,c-1,r,i),d++}return o(t),u}function An(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(C(t))return`[VueViewModel]`;if(b(t))return`[SyntheticEvent]`;if(typeof t==`number`&&t!==t)return`[NaN]`;if(typeof t==`function`)return`[Function: ${tt(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let n=jn(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function jn(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:`null prototype`}function Mn(e){return~-encodeURI(e).split(/%..|./).length}function Nn(e){return Mn(JSON.stringify(e))}var Pn=t((()=>{T(),En(),Ze(),ot()}));function Fn(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];r===`.`?e.splice(t,1):r===`..`?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift(`..`);return e}function In(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Vn.exec(t);return n?n.slice(1):[]}function Ln(...e){let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:`/`;i&&(t=`${i}/${t}`,n=i.charAt(0)===`/`)}return t=Fn(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`}function Rn(e){let t=0;for(;t<e.length&&e[t]===``;t++);let n=e.length-1;for(;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n-t+1)}function zn(e,t){e=Ln(e).slice(1),t=Ln(t).slice(1);let n=Rn(e.split(`/`)),r=Rn(t.split(`/`)),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let o=[];for(let e=a;e<n.length;e++)o.push(`..`);return o=o.concat(r.slice(a)),o.join(`/`)}function Bn(e,t){let n=In(e)[2];return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var Vn,Hn=t((()=>{Vn=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/}));function Un(e){return new Kn(t=>{t(e)})}function Wn(e){return new Kn((t,n)=>{n(e)})}var Gn,Kn,qn=t((()=>{T(),(function(e){e[e.PENDING=0]=`PENDING`,e[e.RESOLVED=1]=`RESOLVED`,e[e.REJECTED=2]=`REJECTED`})(Gn||={}),Kn=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=Gn.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}__init(){this._resolve=e=>{this._setResult(Gn.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Gn.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Gn.PENDING){if(y(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Gn.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===Gn.RESOLVED&&e[1](this._value),this._state===Gn.REJECTED&&e[2](this._value),!0)})}}}}));function Jn(e){let t=[];function n(){return e===void 0||t.length<e}function r(e){return t.splice(t.indexOf(e),1)[0]}function i(e){if(!n())return Wn(new Le(`Not adding Promise because buffer limit was reached.`));let i=e();return t.indexOf(i)===-1&&t.push(i),i.then(()=>r(i)).then(null,()=>r(i).then(null,()=>{})),i}function a(e){return new Kn((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Un(e).then(()=>{--i||(clearTimeout(a),n(!0))},r)})})}return{$:t,add:i,drain:a}}var Yn=t((()=>{Re(),qn()}));function Xn(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Zn(e){return e.split(/[\?#]/,1)[0]}var Qn=t((()=>{}));function $n(e){return e===`warn`?`warning`:er.includes(e)?e:`log`}var er,tr=t((()=>{er=[`fatal`,`error`,`warning`,`log`,`info`,`debug`]}));function nr(){return Date.now()/ir}function rr(){let{performance:e}=k;if(!e||!e.now)return nr;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/ir}var ir,ar,or,sr=t((()=>{fe(),ir=1e3,ar=rr(),or=(()=>{let{performance:e}=k;if(!e||!e.now)return;let t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,o=e.timing&&e.timing.navigationStart,s=typeof o==`number`?Math.abs(o+n-r):t;return a||s<t?i<=s?e.timeOrigin:o:r})()}));function cr(e){if(!f(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((e,t)=>{let n=ur(t);for(let t of Object.keys(n))e[t]=n[t];return e},{});else{if(!e)return;t=ur(e)}let n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(mr)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function lr(e){if(e)return dr(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${pr}${t}`]=n),e),{}))}function ur(e){return e.split(`,`).map(e=>e.split(`=`).map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(e[t]=n,e),{})}function dr(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,n],r)=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,a=r===0?i:`${e},${i}`;return a.length>8192?(xe&&A.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a},``)}var fr,pr,mr,hr=t((()=>{Se(),T(),Oe(),fr=`baggage`,pr=`sentry-`,mr=/^sentry-/}));function gr(e){if(!e)return;let t=e.match(br);if(!t)return;let n;return t[3]===`1`?n=!0:t[3]===`0`&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function _r(e,t){let n=gr(e),r=cr(t),{traceId:i,parentSpanId:a,parentSampled:o}=n||{};return n?{traceparentData:n,dynamicSamplingContext:r||{},propagationContext:{traceId:i||j(),parentSpanId:a||j().substring(16),spanId:j().substring(16),sampled:o,dsc:r||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:i||j(),spanId:j().substring(16)}}}function vr(e,t){let n=gr(e),r=cr(t),{traceId:i,parentSpanId:a,parentSampled:o}=n||{};return n?{traceId:i||j(),parentSpanId:a||j().substring(16),spanId:j().substring(16),sampled:o,dsc:r||{}}:{traceId:i||j(),spanId:j().substring(16)}}function yr(e=j(),t=j().substring(16),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}var br,xr=t((()=>{hr(),Ct(),br=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`)}));function Sr(e,t=[]){return[e,t]}function Cr(e,t){let[n,r]=e;return[n,[...r,t]]}function wr(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Tr(e,t){return wr(e,(e,n)=>t.includes(n))}function Er(e,t){return(t||new TextEncoder).encode(e)}function Dr(e,t){let[n,r]=e,i=JSON.stringify(n);function a(e){typeof i==`string`?i=typeof e==`string`?i+e:[Er(i,t),e]:i.push(typeof e==`string`?Er(e,t):e)}for(let e of r){let[t,n]=e;if(a(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)a(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Dn(n))}a(e)}}return typeof i==`string`?i:Or(i)}function Or(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function kr(e,t,n){let r=typeof e==`string`?t.encode(e):e;function i(e){let t=r.subarray(0,e);return r=r.subarray(e+1),t}function a(){let e=r.indexOf(10);return e<0&&(e=r.length),JSON.parse(n.decode(i(e)))}let o=a(),s=[];for(;r.length;){let e=a(),t=typeof e.length==`number`?e.length:void 0;s.push([e,t?i(t):a()])}return[o,s]}function Ar(e,t){let n=typeof e.data==`string`?Er(e.data,t):e.data;return[Je({type:`attachment`,length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}function jr(e){return Pr[e]}function Mr(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Nr(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ae(r)},...i&&{trace:Je({...i})}}}var Pr,Fr=t((()=>{Ie(),Pn(),Ze(),Pr={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 Ir(e,t,n){let r=[{type:`client_report`},{timestamp:n||nr(),discarded_events:e}];return Sr(t?{dsn:t}:{},[r])}var Lr=t((()=>{Fr(),sr()}));function Rr(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Hr:r-t}function zr(e,t){return e[t]||e.all||0}function Br(e,t,n=Date.now()){return zr(e,t)>n}function Vr(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},a=n&&n[`x-sentry-rate-limits`],o=n&&n[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+Rr(o,r):t===429&&(i.all=r+60*1e3);return i}var Hr,Ur=t((()=>{Hr=60*1e3}));function Wr(e,t){return e(t.stack||``,1)}function Gr(e,t){let n={type:t.name||t.constructor.name,value:t.message},r=Wr(e,t);return r.length&&(n.stacktrace={frames:r}),n}var Kr=t((()=>{}));function qr(e,t){return e??t()}var Jr=t((()=>{}));function Yr(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var Xr=t((()=>{})),M=t((()=>{ce(),be(),Ie(),Re(),fe(),T(),wn(),Oe(),Ct(),Pn(),Ze(),Hn(),Yn(),tr(),ot(),re(),Vt(),qn(),sr(),xr(),yn(),Fr(),Lr(),Ur(),hr(),Qn(),Kr(),Jr(),Xr(),ht(),Ft(),gn(),qt(),un(),Zt(),tn()})),N,Zr=t((()=>{N=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__})),Qr,$r=t((()=>{Qr=`production`}));function ei(){return de(`globalEventProcessors`,()=>[])}function ti(e){ei().push(e)}function ni(e,t,n,r=0){return new Kn((i,a)=>{let o=e[r];if(t===null||typeof o!=`function`)i(t);else{let s=o({...t},n);N&&o.id&&s===null&&A.log(`Event processor "${o.id}" dropped event`),y(s)?s.then(t=>ni(e,t,n,r+1).then(i)).then(null,a):ni(e,s,n,r+1).then(i).then(null,a)}})}var ri=t((()=>{M(),Zr()}));function ii(e){let t=ar(),n={sid:j(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>si(n)};return e&&ai(n,e),n}function ai(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ar(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:j()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function oi(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),ai(e,n)}function si(e){return Je({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var ci=t((()=>{M()}));function li(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,tags:s,origin:c}=P(e);return Je({data:r,op:i,parent_span_id:a,span_id:t,status:o,tags:s,trace_id:n,origin:c})}function ui(e){let{traceId:t,spanId:n}=e.spanContext();return yr(t,n,mi(e))}function di(e){return typeof e==`number`?fi(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?fi(e.getTime()):ar()}function fi(e){return e>9999999999?e/1e3:e}function P(e){return pi(e)?e.getSpanJSON():typeof e.toJSON==`function`?e.toJSON():{}}function pi(e){return typeof e.getSpanJSON==`function`}function mi(e){let{traceFlags:t}=e.spanContext();return!!(t&1)}var hi=t((()=>{M()}));function gi(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||j(),timestamp:t.timestamp||nr()},l=n.integrations||e.integrations.map(e=>e.name);_i(c,e),bi(c,l),t.type===void 0&&vi(c,e.stackParser);let u=Si(r,n.captureContext);n.mechanism&&yt(c,n.mechanism);let d=i&&i.getEventProcessors?i.getEventProcessors():[],f=ma().getScopeData();a&&oa(f,a.getScopeData()),u&&oa(f,u.getScopeData());let p=[...n.attachments||[],...f.attachments];return p.length&&(n.attachments=p),aa(c,f),ni([...d,...ei(),...f.eventProcessors],c,n).then(e=>(e&&yi(e),typeof o==`number`&&o>0?xi(e,o,s):e))}function _i(e,t){let{environment:n,release:r,dist:i,maxValueLength:a=250}=t;`environment`in e||(e.environment=`environment`in t?n:Qr),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&=E(e.message,a);let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=E(o.value,a));let s=e.request;s&&s.url&&(s.url=E(s.url,a))}function vi(e,t){let n=k._sentryDebugIds;if(!n)return;let r,i=Ei.get(t);i?r=i:(r=new Map,Ei.set(t,r));let a=Object.keys(n).reduce((e,i)=>{let a,o=r.get(i);o?a=o:(a=t(i),r.set(i,a));for(let t=a.length-1;t>=0;t--){let r=a[t];if(r.filename){e[r.filename]=n[i];break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=a[e.filename])})})}catch{}}function yi(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(e=>{n.push({type:`sourcemap`,code_file:e,debug_id:t[e]})})}function bi(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function xi(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Dn(e.data,t,n)}}))},...e.user&&{user:Dn(e.user,t,n)},...e.contexts&&{contexts:Dn(e.contexts,t,n)},...e.extra&&{extra:Dn(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Dn(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>{let r=P(e).data;return r&&(e.data=Dn(r,t,n)),e})),r}function Si(e,t){if(!t)return e;let n=e?e.clone():new va;return n.update(t),n}function Ci(e){if(e)return wi(e)||Ti(e)?{captureContext:e}:e}function wi(e){return e instanceof va||typeof e==`function`}function Ti(e){return Object.keys(e).some(e=>Di.includes(e))}var Ei,Di,Oi=t((()=>{M(),$r(),ri(),ya(),pa(),hi(),Ei=new WeakMap,Di=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`requestSession`,`propagationContext`]}));function ki(e,t){return I().captureException(e,Ci(t))}function Ai(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return I().captureMessage(e,n,r)}function ji(e,t){return I().captureEvent(e,t)}function Mi(e){I().configureScope(e)}function Ni(e,t){I().addBreadcrumb(e,t)}function Pi(e,t){I().setContext(e,t)}function Fi(e){I().setExtras(e)}function Ii(e,t){I().setExtra(e,t)}function Li(e){I().setTags(e)}function Ri(e,t){I().setTag(e,t)}function zi(e){I().setUser(e)}function Bi(...e){let t=I();if(e.length===2){let[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function Vi(e){return Ea(()=>e(wa()))}function Hi(e,t){return Bi(n=>(n.setSpan(e),t(n)))}function Ui(e,t){return I().startTransaction({...e},t)}async function Wi(e){let t=F();return t?t.flush(e):(N&&A.warn(`Cannot flush events. No client defined.`),Promise.resolve(!1))}async function Gi(e){let t=F();return t?t.close(e):(N&&A.warn(`Cannot flush events and disable SDK. No client defined.`),Promise.resolve(!1))}function Ki(){return I().lastEventId()}function F(){return I().getClient()}function qi(){return!!F()}function Ji(){return I().getScope()}function Yi(e){let t=F(),n=wa(),r=Ji(),{release:i,environment:a=Qr}=t&&t.getOptions()||{},{userAgent:o}=k.navigator||{},s=ii({release:i,environment:a,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status===`ok`&&ai(c,{status:`exited`}),Xi(),n.setSession(s),r.setSession(s),s}function Xi(){let e=wa(),t=Ji(),n=t.getSession()||e.getSession();n&&oi(n),Zi(),e.setSession(),t.setSession()}function Zi(){let e=wa(),t=Ji(),n=F(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Qi(e=!1){if(e){Xi();return}Zi()}var $i=t((()=>{M(),$r(),Zr(),Na(),ci(),Oi()}));function ea(e){return e.transaction}var ta=t((()=>{}));function na(e,t,n){let r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=n&&n.getUser()||{},o=Je({environment:r.environment||`production`,release:r.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit(`createDsc`,o),o}function ra(e){let t=F();if(!t)return{};let n=na(P(e).trace_id||``,t,Ji()),r=ea(e);if(!r)return n;let i=r&&r._frozenDynamicSamplingContext;if(i)return i;let{sampleRate:a,source:o}=r.metadata;a!=null&&(n.sample_rate=`${a}`);let s=P(r);return o&&o!==`url`&&(n.transaction=s.description),n.sampled=String(mi(r)),t.emit&&t.emit(`createDsc`,n),n}var ia=t((()=>{M(),$r(),$i(),ta(),hi()}));function aa(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;ca(e,t),r&&da(e,r),fa(e,n),la(e,i),ua(e,a)}function oa(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:f,transactionName:p,span:m}=t;sa(e,`extra`,n),sa(e,`tags`,r),sa(e,`user`,i),sa(e,`contexts`,a),sa(e,`sdkProcessingMetadata`,s),o&&(e.level=o),p&&(e.transactionName=p),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function sa(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function ca(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t,c=Je(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=Je(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=Je(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=Je(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),s&&(e.transaction=s)}function la(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ua(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function da(e,t){e.contexts={trace:li(t),...e.contexts};let n=ea(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:ra(t),...e.sdkProcessingMetadata};let r=P(n).description;r&&(e.tags={transaction:r,...e.tags})}}function fa(e,t){e.fingerprint=e.fingerprint?St(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}var pa=t((()=>{M(),ia(),ta(),hi()}));function ma(){return _a||=new va,_a}function ha(){return{traceId:j(),spanId:j().substring(16)}}var ga,_a,va,ya=t((()=>{M(),ri(),ci(),pa(),ga=100,va=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ha()}static clone(t){return t?t.clone():new e}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(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&&ai(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,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},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,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let 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(t){if(!t)return this;let n=typeof t==`function`?t(this):t;if(n instanceof e){let e=n.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else if(h(n)){let e=t;this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.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=ha(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:ga;if(n<=0)return this;let r={timestamp:nr(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,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(){let{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:i,_user:a,_level:o,_fingerprint:s,_eventProcessors:c,_propagationContext:l,_sdkProcessingMetadata:u,_transactionName:d,_span:f}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:i,user:a,level:o,fingerprint:s||[],eventProcessors:c,propagationContext:l,sdkProcessingMetadata:u,transactionName:d,span:f}}applyToEvent(e,t={},n=[]){return aa(e,this.getScopeData()),ni([...n,...ei(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:j();if(!this._client)return A.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n&&n.event_id?n.event_id:j();if(!this._client)return A.warn(`No client configured on scope - will not capture message!`),r;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:j();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(A.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}}})),ba,xa=t((()=>{ba=`7.120.0`}));function Sa(){return k.__SENTRY__=k.__SENTRY__||{extensions:{},hub:void 0},k}function Ca(e){let t=Sa(),n=Oa(t);return ka(t,e),n}function I(){let e=Sa();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Ta(e)}function wa(){return I().getIsolationScope()}function Ta(e=Sa()){return(!Da(e)||Oa(e).isOlderThan(Aa))&&ka(e,new Ma),Oa(e)}function Ea(e,t={}){let n=Sa();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(e,t):e()}function Da(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Oa(e){return de(`hub`,()=>new Ma,e)}function ka(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}var Aa,ja,Ma,Na=t((()=>{M(),$r(),Zr(),ya(),ci(),xa(),Aa=parseFloat(ba),ja=100,Ma=class{constructor(e,t,n,r=Aa){this._version=r;let i;t?i=t:(i=new va,i.setClient(e));let a;n?a=n:(a=new va,a.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=a}isOlderThan(e){return this._version<e}bindClient(e){let t=this.getStackTop();t.client=e,t.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let 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){let t=this.pushScope(),n;try{n=e(t)}catch(e){throw this.popScope(),e}return y(n)?n.then(e=>(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),n)}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,t){let n=this._lastEventId=t&&t.event_id?t.event_id:j(),r=Error(`Sentry syntheticException`);return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:j(),i=Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r}),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:j();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:n,client:r}=this.getStackTop();if(!r)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=ja}=r.getOptions&&r.getOptions()||{};if(a<=0)return;let o={timestamp:nr(),...e},s=i?Ce(()=>i(o,t)):o;s!==null&&(r.emit&&r.emit(`beforeAddBreadcrumb`,s,t),n.addBreadcrumb(s,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,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){let{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){let t=Ca(this);try{e(this)}finally{Ca(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return N&&A.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){let n=this._callExtensionMethod(`startTransaction`,e,t);return N&&!n&&(this.getClient()?A.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):A.warn(`Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'`)),n}traceHeaders(){return this._callExtensionMethod(`traceHeaders`)}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop().scope,t=e.getSession();t&&oi(t),this._sendSessionUpdate(),e.setSession()}startSession(e){let{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=Qr}=n&&n.getOptions()||{},{userAgent:a}=k.navigator||{},o=ii({release:r,environment:i,user:t.getUser(),...a&&{userAgent:a},...e}),s=t.getSession&&t.getSession();return s&&s.status===`ok`&&ai(s,{status:`exited`}),this.endSession(),t.setSession(o),o}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){let n=Sa().__SENTRY__;if(n&&n.extensions&&typeof n.extensions[e]==`function`)return n.extensions[e].apply(this,t);N&&A.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}}));function Pa(e){return(e||I()).getScope().getTransaction()}var Fa,Ia=t((()=>{M(),Na(),Fa=gr}));function La(){za||(za=!0,Jt(Ra),Qt(Ra))}function Ra(){let e=Pa();if(e){let t=`internal_error`;N&&A.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}var za,Ba=t((()=>{M(),Zr(),Ia(),za=!1,Ra.tag=`sentry_tracingErrorCallback`}));function Va(e){if(e<400&&e>=100)return`ok`;if(e>=400&&e<500)switch(e){case 401:return`unauthenticated`;case 403:return`permission_denied`;case 404:return`not_found`;case 409:return`already_exists`;case 413:return`failed_precondition`;case 429:return`resource_exhausted`;default:return`invalid_argument`}if(e>=500&&e<600)switch(e){case 501:return`unimplemented`;case 503:return`unavailable`;case 504:return`deadline_exceeded`;default:return`internal_error`}return`unknown_error`}function Ha(e,t){e.setTag(`http.status_code`,String(t)),e.setData(`http.response.status_code`,t);let n=Va(t);n!==`unknown_error`&&e.setStatus(n)}var Ua,Wa,Ga=t((()=>{(function(e){e.Ok=`ok`,e.DeadlineExceeded=`deadline_exceeded`,e.Unauthenticated=`unauthenticated`,e.PermissionDenied=`permission_denied`,e.NotFound=`not_found`,e.ResourceExhausted=`resource_exhausted`,e.InvalidArgument=`invalid_argument`,e.Unimplemented=`unimplemented`,e.Unavailable=`unavailable`,e.InternalError=`internal_error`,e.UnknownError=`unknown_error`,e.Cancelled=`cancelled`,e.AlreadyExists=`already_exists`,e.FailedPrecondition=`failed_precondition`,e.Aborted=`aborted`,e.OutOfRange=`out_of_range`,e.DataLoss=`data_loss`})(Ua||={}),Wa=Va}));function Ka(e,t,n=()=>{}){let r;try{r=e()}catch(e){throw t(e),n(),e}return qa(r,t,n)}function qa(e,t,n){return y(e)?e.then(e=>(n(),e),e=>{throw t(e),n(),e}):(n(),e)}var Ja=t((()=>{M()}));function Ya(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=F(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||`tracesSampleRate`in n||`tracesSampler`in n)}var Xa=t((()=>{$i()}));function Za(e,t,n=()=>{},r=()=>{}){let i=I(),a=Ji(),o=a.getSpan(),s=no(i,{parentSpan:o,spanContext:ro(e),forceTransaction:!1,scope:a});return a.setSpan(s),Ka(()=>t(s),e=>{s&&s.setStatus(`internal_error`),n(e,s)},()=>{s&&s.end(),a.setSpan(o),r()})}function Qa(e,t){let n=ro(e);return Ea(()=>Bi(e.scope,r=>{let i=I(),a=r.getSpan(),o=e.onlyIfParent&&!a?void 0:no(i,{parentSpan:a,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return Ka(()=>t(o),()=>{if(o){let{status:e}=P(o);(!e||e===`ok`)&&o.setStatus(`internal_error`)}},()=>o&&o.end())}))}function $a(e,t){let n=ro(e);return Ea(()=>Bi(e.scope,r=>{let i=I(),a=r.getSpan(),o=e.onlyIfParent&&!a?void 0:no(i,{parentSpan:a,spanContext:n,forceTransaction:e.forceTransaction,scope:r});function s(){o&&o.end()}return Ka(()=>t(o,s),()=>{if(o&&o.isRecording()){let{status:e}=P(o);(!e||e===`ok`)&&o.setStatus(`internal_error`)}})}))}function eo(e){if(!Ya())return;let t=ro(e),n=I(),r=e.scope?e.scope.getSpan():to();if(e.onlyIfParent&&!r)return;let i=(e.scope||Ji()).clone();return no(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:i})}function to(){return Ji().getSpan()}function no(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:i}){if(!Ya())return;let a=wa(),o;if(t&&!r)o=t.startChild(n);else if(t){let r=ra(t),{traceId:i,spanId:a}=t.spanContext(),s=mi(t);o=e.startTransaction({traceId:i,parentSpanId:a,parentSampled:s,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}else{let{traceId:t,dsc:r,parentSpanId:s,sampled:c}={...a.getPropagationContext(),...i.getPropagationContext()};o=e.startTransaction({traceId:t,parentSpanId:s,parentSampled:c,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}return i.setSpan(o),io(o,i,a),o}function ro(e){if(e.startTime){let t={...e};return t.startTimestamp=di(e.startTime),delete t.startTime,t}return e}function io(e,t,n){e&&(Be(e,co,n),Be(e,so,t))}function ao(e){return{scope:e[so],isolationScope:e[co]}}var oo,so,co,lo=t((()=>{M(),Zr(),Na(),hi(),ia(),$i(),Ja(),Xa(),oo=({sentryTrace:e,baggage:t},n)=>{let r=Ji(),{traceparentData:i,dynamicSamplingContext:a,propagationContext:o}=_r(e,t);r.setPropagationContext(o),N&&i&&A.log(`[Tracing] Continuing trace ${i.traceId}.`);let s={...i,metadata:Je({dynamicSamplingContext:a})};return n?Ea(()=>n(s)):s},so=`_sentryScope`,co=`_sentryIsolationScope`}));function uo(e){return mo?mo.get(e):void 0}function fo(e){let t=uo(e);if(!t)return;let n={};for(let[,[e,r]]of t)n[e]||(n[e]=[]),n[e].push(Je(r));return n}function po(e,t,n,r,i,a){let o=to();if(o){let s=uo(o)||new Map,c=`${e}:${t}@${r}`,l=s.get(a);if(l){let[,e]=l;s.set(a,[c,{min:Math.min(e.min,n),max:Math.max(e.max,n),count:e.count+=1,sum:e.sum+=n,tags:e.tags}])}else s.set(a,[c,{min:n,max:n,count:1,sum:n,tags:i}]);mo||=new WeakMap,mo.set(o,s)}}var mo,ho=t((()=>{M(),lo()})),go,_o,vo,yo,bo,xo=t((()=>{go=`sentry.source`,_o=`sentry.sample_rate`,vo=`sentry.op`,yo=`sentry.origin`,bo=`profile_id`})),So,Co,wo=t((()=>{M(),Zr(),ho(),xo(),ta(),hi(),Ga(),So=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},Co=class e{constructor(e={}){this._traceId=e.traceId||j(),this._spanId=e.spanId||j().substring(16),this._startTime=e.startTimestamp||ar(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||`sentry`,this._attributes={},this.setAttributes({[yo]:e.origin||`manual`,[vo]: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[vo]}set op(e){this.setAttribute(vo,e)}get origin(){return this._attributes[yo]}set origin(e){this.setAttribute(yo,e)}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}startChild(t){let n=new e({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);let r=ea(this);if(n.transaction=r,N&&r){let e=`[Tracing] Starting '${t&&t.op||`< unknown op >`}' span on transaction '${P(n).description||`< unknown name >`}' (${r.spanContext().spanId}).`;A.log(e),this._logMessage=e}return n}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setAttribute(e,t){t===void 0?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach(t=>this.setAttribute(t,e[t]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return Ha(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;let t=ea(this);if(N&&t&&t.spanContext().spanId!==this._spanId){let e=this._logMessage;e&&A.log(e.replace(`Starting`,`Finishing`))}this._endTime=di(e)}toTraceparent(){return ui(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 li(this)}getSpanJSON(){return Je({data:this._getData(),description:this._name,op:this._attributes[vo],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[yo],_metrics_summary:fo(this),profile_id:this._attributes[bo],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){let{data:e,_attributes:t}=this,n=Object.keys(e).length>0,r=Object.keys(t).length>0;if(!(!n&&!r))return n&&r?{...e,...t}:n?e:t}}})),To,Eo=t((()=>{M(),Zr(),Na(),ho(),xo(),hi(),ia(),wo(),lo(),To=class extends Co{constructor(e,t){super(e),this._contexts={},this._hub=t||I(),this._name=e.name||``,this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;let n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:`custom`,spanMetadata:{},...this._metadata,...this._attributes[`sentry.source`]&&{source:this._attributes[`sentry.source`]},...this._attributes[`sentry.sample_rate`]&&{sampleRate:this._attributes[`sentry.sample_rate`]}}}set metadata(e){this._metadata=e}setName(e,t=`custom`){this._name=e,this.setAttribute(go,t)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||=new So(e),this.spanRecorder.add(this)}setContext(e,t){t===null?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=``){this._measurements[e]={value:t,unit:n}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){let t=di(e),n=this._finishTransaction(t);if(n)return this._hub.captureEvent(n)}toContext(){return Je({...super.toContext(),name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||``,this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return ra(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&&A.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`),super.end(e);let t=this._hub.getClient();if(t&&t.emit&&t.emit(`finishTransaction`,this),this._sampled!==!0){N&&A.log(`[Tracing] Discarding transaction because its trace was not chosen to be sampled.`),t&&t.recordDroppedEvent(`sample_rate`,`transaction`);return}let n=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&P(e).timestamp):[];this._trimEnd&&n.length>0&&(this._endTime=n.map(e=>P(e).timestamp).filter(Boolean).reduce((e,t)=>e>t?e:t));let{scope:r,isolationScope:i}=ao(this),{metadata:a}=this,{source:o}=a,s={contexts:{...this._contexts,trace:li(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{...a,capturedSpanScope:r,capturedSpanIsolationScope:i,...Je({dynamicSamplingContext:ra(this)})},_metrics_summary:fo(this),...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(N&&A.log(`[Measurements] Adding measurements to transaction`,JSON.stringify(this._measurements,void 0,2)),s.measurements=this._measurements),N&&A.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),s}}})),Do,Oo,ko,Ao,jo,Mo=t((()=>{M(),Zr(),hi(),wo(),Eo(),Do={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Oo=`finishReason`,ko=[`heartbeatFailed`,`idleTimeout`,`documentHidden`,`finalTimeout`,`externalFinish`,`cancelled`],Ao=class extends So{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){if(e.spanContext().spanId!==this.transactionSpanId){let t=e.end;e.end=(...n)=>(this._popActivity(e.spanContext().spanId),t.apply(e,n)),P(e).timestamp===void 0&&this._pushActivity(e.spanContext().spanId)}super.add(e)}},jo=class extends To{constructor(e,t,n=Do.idleTimeout,r=Do.finalTimeout,i=Do.heartbeatInterval,a=!1,o=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=ko[4],this._autoFinishAllowed=!o,a&&(N&&A.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),t.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus(`deadline_exceeded`),this._finishReason=ko[3],this.end())},this._finalTimeout)}end(e){let t=di(e);if(this._finished=!0,this.activities={},this.op===`ui.action.click`&&this.setAttribute(Oo,this._finishReason),this.spanRecorder){N&&A.log(`[Tracing] finishing IdleTransaction`,new Date(t*1e3).toISOString(),this.op);for(let e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanContext().spanId===this.spanContext().spanId)return!0;P(e).timestamp||(e.setStatus(`cancelled`),e.end(t),N&&A.log(`[Tracing] cancelling span since transaction ended early`,JSON.stringify(e,void 0,2)));let{start_timestamp:n,timestamp:r}=P(e),i=n&&n<t,a=(this._finalTimeout+this._idleTimeout)/1e3,o=r&&n&&r-n<a;if(N){let t=JSON.stringify(e,void 0,2);i?o||A.log(`[Tracing] discarding Span since it finished after Transaction final timeout`,t):A.log(`[Tracing] discarding Span since it happened after Transaction was finished`,t)}return i&&o}),N&&A.log(`[Tracing] flushing IdleTransaction`)}else N&&A.log(`[Tracing] No active IdleTransaction`);if(this._onScope){let e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){this.spanRecorder||(this.spanRecorder=new Ao(e=>{this._finished||this._pushActivity(e)},e=>{this._finished||this._popActivity(e)},this.spanContext().spanId,e),N&&A.log(`Starting heartbeat`),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=t===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=ko[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||=(N&&A.log(`[Tracing] Received finish signal for idle transaction.`),this._restartIdleTimeout(),!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=ko[1],this.end(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),N&&A.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,N&&A.log(`[Tracing] new activities count`,Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(N&&A.log(`[Tracing] popActivity ${e}`),delete this.activities[e],N&&A.log(`[Tracing] new activities count`,Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let e=ar();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=ko[5],this.end(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join(``);e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(N&&A.log(`[Tracing] Transaction finished because of no change for 3 heart beats`),this.setStatus(`deadline_exceeded`),this._finishReason=ko[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){N&&A.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}}));function No(e,t,n){if(!Ya(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(_o,Number(e.sampled)),e;let r;return typeof t.tracesSampler==`function`?(r=t.tracesSampler(n),e.setAttribute(_o,Number(r))):n.parentSampled===void 0?t.tracesSampleRate===void 0?(r=1,e.setAttribute(_o,r)):(r=t.tracesSampleRate,e.setAttribute(_o,Number(r))):r=n.parentSampled,Po(r)?r?(e.sampled=Math.random()<r,e.sampled?(N&&A.log(`[Tracing] starting ${e.op} transaction - ${P(e).description}`),e):(N&&A.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(N&&A.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),e.sampled=!1,e):(N&&A.warn(`[Tracing] Discarding transaction because of invalid sample rate.`),e.sampled=!1,e)}function Po(e){return x(e)||!(typeof e==`number`||typeof e==`boolean`)?(N&&A.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(N&&A.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}var Fo=t((()=>{M(),Zr(),xo(),Xa(),hi()}));function Io(){let e=this.getScope().getSpan();return e?{"sentry-trace":ui(e)}:{}}function Lo(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||`sentry`,a=e.instrumenter||`sentry`;i!==a&&(N&&A.error(`A transaction was started with instrumenter=\`${a}\`, but the SDK is configured with the \`${i}\` instrumenter.
The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let o=new To(e,this);return o=No(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit(`startTransaction`,o),o}function Ro(e,t,n,r,i,a,o,s=!1){let c=e.getClient(),l=c&&c.getOptions()||{},u=new jo(t,e,n,r,o,i,s);return u=No(u,l,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...a}),u.isRecording()&&u.initSpanRecorder(l._experiments&&l._experiments.maxSpans),c&&c.emit&&c.emit(`startTransaction`,u),u}function zo(){let e=Sa();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=Lo),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Io),La())}var Bo=t((()=>{M(),Zr(),Na(),hi(),Ba(),Mo(),Fo(),Eo()}));function Vo(e,t,n){let r=Pa();r&&r.setMeasurement(e,t,n)}var Ho=t((()=>{Ia()}));function Uo(e,t){return t?(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]],e):e}function Wo(e,t,n,r){let i=Mr(n);return Sr({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Ae(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function Go(e,t,n,r){let i=Mr(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;Uo(e,n&&n.sdk);let o=Nr(e,i,r,t);return delete e.sdkProcessingMetadata,Sr(o,[[{type:a},e]])}var Ko=t((()=>{M()}));function qo(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function Jo(e){return`${qo(e)}${e.projectId}/envelope/`}function Yo(e,t){return Ue({sentry_key:e.publicKey,sentry_version:Qo,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Xo(e,t={}){let n=typeof t==`string`?t:t.tunnel,r=typeof t==`string`||!t._metadata?void 0:t._metadata.sdk;return n||`${Jo(e)}?${Yo(e,r)}`}function Zo(e,t){let n=Pe(e);if(!n)return``;let r=`${qo(n)}embed/error-page/`,i=`dsn=${Ae(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`)if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${i}`}var Qo,$o=t((()=>{M(),Qo=`7`}));function es(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.keys(t).map(e=>t[e])}function ts(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;r=Array.isArray(n)?[...t,...n]:typeof n==`function`?St(n(t)):t;let i=es(r),a=os(i,e=>e.name===`Debug`);if(a!==-1){let[e]=i.splice(a,1);i.push(e)}return i}function ns(e,t){let n={};return t.forEach(t=>{t&&is(e,t,n)}),n}function rs(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function is(e,t,n){if(n[t.name]){N&&A.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,ls.indexOf(t.name)===-1&&(t.setupOnce(ti,I),ls.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),e.on&&typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(e.addEventProcessor&&typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}N&&A.log(`Integration installed: ${t.name}`)}function as(e){let t=F();if(!t||!t.addIntegration){N&&A.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function os(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function ss(e,t){return Object.assign(function(...e){return t(...e)},{id:e})}function cs(e){return e}var ls,us=t((()=>{M(),Zr(),ri(),$i(),Na(),ls=[]}));function ds(e,t,n,r){return`${e}${t}${n}${Object.entries(Je(r)).sort((e,t)=>e[0].localeCompare(t[0]))}`}function fs(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t>>>0}function ps(e){let t=``;for(let n of e){let e=Object.entries(n.tags),r=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(`,`)}`:``;t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t}function ms(e){return e.replace(/[^\w]+/gi,`_`)}function hs(e){return e.replace(/[^\w\-.]+/gi,`_`)}function gs(e){return e.replace(/[^\w\-./]+/gi,``)}function _s(e){for(let[t,n]of bs)if(e===t)return n;return e}function vs(e){return[...e].reduce((e,t)=>e+_s(t),``)}function ys(e){let t={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=gs(n);t[r]=vs(String(e[n]))}return t}var bs,xs=t((()=>{M(),bs=[[`
`,`\\n`],[`\r`,`\\r`],[`	`,`\\t`],[`\\`,`\\\\`],[`|`,`\\u{7c}`],[`,`,`\\u{2c}`]]}));function Ss(e,t,n,r){let i={sent_at:new Date().toISOString()};return n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(i.dsn=Ae(t)),Sr(i,[Cs(e)])}function Cs(e){let t=ps(e);return[{type:`statsd`,length:t.length},t]}var ws=t((()=>{M(),xs()}));function Ts(e,t){let n=`${t} must return \`null\` or a valid event.`;if(y(e))return e.then(e=>{if(!h(e)&&e!==null)throw new Le(n);return e},e=>{throw new Le(`${t} rejected with ${e}`)});if(!h(e)&&e!==null)throw new Le(n);return e}function Es(e,t,n){let{beforeSend:r,beforeSendTransaction:i}=e;if(Ds(t)&&r)return r(t,n);if(Os(t)&&i){if(t.spans){let e=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(t,n)}return t}function Ds(e){return e.type===void 0}function Os(e){return e.type===`transaction`}function ks(e){let t=F();!t||!t.addEventProcessor||t.addEventProcessor(e)}var As,js,Ms=t((()=>{M(),$o(),Zr(),Ko(),$i(),Na(),us(),ws(),ci(),ia(),Oi(),As=`Not capturing exception because it's already been captured.`,js=class{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Pe(e.dsn):N&&A.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Xo(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(xt(e)){N&&A.log(As);return}let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id,a=p(e)?e:String(e),o=m(e)?this.eventFromMessage(a,t,n):this.eventFromException(e,n);return this._process(o.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&xt(t.originalException)){N&&A.log(As);return}let r=t&&t.event_id,i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,i||n).then(e=>{r=e})),r}captureSession(e){typeof e.release==`string`?(this.sendSession(e),ai(e,{init:!1})):N&&A.warn(`Discarded session because of missing or non-string release`)}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):Un(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e))}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&&A.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){let t=this._integrations[e.name];is(this,e,this._integrations),t||rs(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Go(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=Cr(n,Ar(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));let r=this._sendEnvelope(n);r&&r.then(t=>this.emit(`afterSendEvent`,e,t),null)}sendSession(e){let t=Wo(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=typeof n==`number`?n:1,i=`${e}:${t}`;N&&A.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}captureAggregateMetrics(e){N&&A.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);let t=Ss(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(e=>e(...t))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=ns(this,e),rs(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let e of i){let t=e.mechanism;if(t&&t.handled===!1){n=!0;break}}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(ai(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Kn(t=>{let n=0,r=setInterval(()=>{this._numProcessing==0?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r=wa()){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),gi(i,e,t,n,this,r).then(e=>{if(e===null)return e;let t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){let{traceId:r,spanId:i,parentSpanId:a,dsc:o}=t;e.contexts={trace:{trace_id:r,span_id:i,parent_span_id:a},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:o||na(r,this,n),...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if(N){let t=e;t.logLevel===`log`?A.log(t.message):A.warn(t)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=Os(e),o=Ds(e),s=e.type||`error`,c=`before send for type \`${s}\``;if(o&&typeof i==`number`&&Math.random()>i)return this.recordDroppedEvent(`sample_rate`,`error`,e),Wn(new Le(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,`log`));let l=s===`replay_event`?`replay`:s,u=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,u).then(n=>{if(n===null)throw this.recordDroppedEvent(`event_processor`,l,e),new Le("An event processor returned `null`, will not send event.",`log`);return t.data&&t.data.__sentry__===!0?n:Ts(Es(r,n,t),c)}).then(r=>{if(r===null){if(this.recordDroppedEvent(`before_send`,l,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw new Le(`${c} returned \`null\`, will not send event.`,`log`)}let i=n&&n.getSession();if(!a&&i&&this._updateSessionFromEvent(i,r),a){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let o=r.transaction_info;return a&&o&&r.transaction!==e.transaction&&(r.transaction_info={...o,source:`custom`}),this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof Le?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Le(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,e=>{N&&A.error(`Error while sending event:`,e)});N&&A.error(`Transport disabled`)}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[n,r]=t.split(`:`);return{reason:n,category:r,quantity:e[t]}})}}})),Ns,Ps=t((()=>{Ns=5e3})),Fs,Is,Ls,Rs,zs,Bs=t((()=>{Ps(),xs(),Fs=class{constructor(e){this._value=e}get weight(){return 1}add(e){this._value+=e}toString(){return`${this._value}`}},Is=class{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}`}},Ls=class{constructor(e){this._value=[e]}get weight(){return this._value.length}add(e){this._value.push(e)}toString(){return this._value.join(`:`)}},Rs=class{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`?fs(e):e).join(`:`)}},zs={c:Fs,g:Is,d:Ls,s:Rs}}));function Vs(e,t){t.debug===!0&&(N?A.enable():Ce(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Ji().update(t.initialScope);let n=new e(t);Hs(n),Us(n)}function Hs(e){let t=I().getStackTop();t.client=e,t.scope.setClient(e)}function Us(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}var Ws=t((()=>{M(),Zr(),$i(),Na()}));function Gs(e,t,n=Jn(e.bufferSize||30)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(wr(i,(t,n)=>{let i=jr(n);if(Br(r,i)){let r=Ks(t,n);e.recordDroppedEvent(`ratelimit_backoff`,i,r)}else a.push(t)}),a.length===0)return Un();let o=Sr(i[0],a),s=t=>{wr(o,(n,r)=>{let i=Ks(n,r);e.recordDroppedEvent(t,jr(r),i)})};return n.add(()=>t({body:Dr(o,e.textEncoder)}).then(e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&N&&A.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Vr(r,e),e),e=>{throw s(`network_error`),e})).then(e=>e,e=>{if(e instanceof Le)return N&&A.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Un();throw e})}return a.__sentry__baseTransport__=!0,{send:a,flush:i}}function Ks(e,t){if(!(t!==`event`&&t!==`transaction`))return Array.isArray(e)?e[1]:void 0}var qs=t((()=>{M(),Zr()}));function Js(e,t){N&&A.info(`[Offline]: ${e}`,t)}function Ys(e){return t=>{let n=e(t),r=t.createStore?t.createStore(t):void 0,i=Xs,a;function o(e,n,r){return Tr(e,[`replay_event`,`replay_recording`,`client_report`])?!1:t.shouldStore?t.shouldStore(e,n,r):!0}function s(e){r&&(a&&clearTimeout(a),a=setTimeout(async()=>{a=void 0;let e=await r.pop();e&&(Js(`Attempting to send previously queued event`),l(e).catch(e=>{Js(`Failed to retry sending`,e)}))},e),typeof a!=`number`&&a.unref&&a.unref())}function c(){a||(s(i),i=Math.min(i*2,Zs))}async function l(e){try{let t=await n.send(e),r=100;if(t){if(t.headers&&t.headers[`retry-after`])r=Rr(t.headers[`retry-after`]);else if((t.statusCode||0)>=400)return t}return s(r),i=Xs,t}catch(t){if(r&&await o(e,t,i))return await r.insert(e),c(),Js(`Error sending. Event queued`,t),{};throw t}}return t.flushAtStartup&&c(),{send:l,flush:e=>n.flush(e)}}}var Xs,Zs,Qs=t((()=>{M(),Zr(),Xs=5e3,Zs=36e5}));function $s(e,t){let n;return wr(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function ec(e,t){return n=>{let r=e(n);return{...r,send:async e=>{let n=$s(e,[`event`,`transaction`,`profile`,`replay_event`]);return n&&(n.release=t),r.send(e)}}}}function tc(e,t){return Sr(t?{...e[0],dsn:t}:e[0],e[1])}function nc(e,t){return n=>{let r=e(n),i=new Map;function a(t,r){let a=r?`${t}:${r}`:t,o=i.get(a);if(!o){let s=je(t);if(!s)return;let c=Xo(s,n.tunnel);o=r?ec(e,r)({...n,url:c}):e({...n,url:c}),i.set(a,o)}return[t,o]}async function o(e){function n(t){return $s(e,t&&t.length?t:[`event`])}let i=t({envelope:e,getEvent:n}).map(e=>typeof e==`string`?a(e,void 0):a(e.dsn,e.release)).filter(e=>!!e);return i.length===0&&i.push([``,r]),(await Promise.all(i.map(([t,n])=>n.send(tc(e,t)))))[0]}async function s(e){let t=[await r.flush(e)];for(let[,n]of i)t.push(await n.flush(e));return t.every(e=>e)}return{send:o,flush:s}}}var rc=t((()=>{M(),$o()}));function ic(e,t){let n={sent_at:new Date().toISOString()};return t&&(n.dsn=Ae(t)),Sr(n,e.map(ac))}function ac(e){return[{type:`span`},e]}var oc=t((()=>{M()}));function sc(e,t){let n=t&&dc(t)?t.getClient():t,r=n&&n.getDsn(),i=n&&n.getOptions().tunnel;return lc(e,r)||cc(e,i)}function cc(e,t){return t?uc(e)===uc(t):!1}function lc(e,t){return t?e.includes(t.host):!1}function uc(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function dc(e){return e.getClient!==void 0}var fc=t((()=>{}));function pc(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join(`\0`).replace(/%/g,`%%`).replace(/\0/g,`%s`),n.__sentry_template_values__=t,n}var mc=t((()=>{}));function hc(e,t,n=[t],r=`npm`){let i=e._metadata||{};i.sdk||={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:ba})),version:ba},e._metadata=i}var gc=t((()=>{xa()}));function _c(e){if(k._sentryModuleMetadata)for(let t of Object.keys(k._sentryModuleMetadata)){let n=k._sentryModuleMetadata[t];if(Sc.has(t))continue;Sc.add(t);let r=e(t);for(let e of r.reverse())if(e.filename){xc.set(e.filename,n);break}}}function vc(e,t){return _c(e),xc.get(t)}function yc(e,t){try{t.exception.values.forEach(t=>{if(t.stacktrace)for(let n of t.stacktrace.frames||[]){if(!n.filename)continue;let t=vc(e,n.filename);t&&(n.module_metadata=t)}})}catch{}}function bc(e){try{e.exception.values.forEach(e=>{if(e.stacktrace)for(let t of e.stacktrace.frames||[])delete t.module_metadata})}catch{}}var xc,Sc,Cc=t((()=>{M(),xc=new Map,Sc=new Set})),wc,Tc,Ec,Dc,Oc=t((()=>{M(),us(),Cc(),wc=`ModuleMetadata`,Tc=(()=>({name:wc,setupOnce(){},setup(e){typeof e.on==`function`&&e.on(`beforeEnvelope`,e=>{wr(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(bc(t),e[1]=t)}})})},processEvent(e,t,n){let r=n.getOptions().stackParser;return yc(r,e),e}})),Ec=cs(Tc),Dc=ss(wc,Ec)}));function kc(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:zc],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:Bc],ignoreInternal:e.ignoreInternal===void 0?!0:e.ignoreInternal}}function Ac(e,t){return t.ignoreInternal&&Ic(e)?(N&&A.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${_t(e)}`),!0):jc(e,t.ignoreErrors)?(N&&A.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${_t(e)}`),!0):Mc(e,t.ignoreTransactions)?(N&&A.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${_t(e)}`),!0):Nc(e,t.denyUrls)?(N&&A.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${_t(e)}.\nUrl: ${Rc(e)}`),!0):Pc(e,t.allowUrls)?!1:(N&&A.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${_t(e)}.\nUrl: ${Rc(e)}`),!0)}function jc(e,t){return e.type||!t||!t.length?!1:Fc(e).some(e=>D(e,t))}function Mc(e,t){if(e.type!==`transaction`||!t||!t.length)return!1;let n=e.transaction;return n?D(n,t):!1}function Nc(e,t){if(!t||!t.length)return!1;let n=Rc(e);return n?D(n,t):!1}function Pc(e,t){if(!t||!t.length)return!0;let n=Rc(e);return n?D(n,t):!0}function Fc(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),N&&t.length===0&&A.error(`Could not extract message for event ${_t(e)}`),t}function Ic(e){try{return e.exception.values[0].type===`SentryError`}catch{}return!1}function Lc(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Rc(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Lc(t):null}catch{return N&&A.error(`Cannot extract url for event ${_t(e)}`),null}}var zc,Bc,Vc,Hc,Uc,Wc,Gc=t((()=>{M(),Zr(),us(),zc=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],Bc=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Vc=`InboundFilters`,Hc=((e={})=>({name:Vc,setupOnce(){},processEvent(t,n,r){return Ac(t,kc(e,r.getOptions()))?null:t}})),Uc=cs(Hc),Wc=ss(Vc,Uc)})),Kc,qc,Jc,Yc,Xc,Zc,Qc=t((()=>{M(),$i(),us(),qc=`FunctionToString`,Jc=new WeakMap,Yc=(()=>({name:qc,setupOnce(){Kc=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=He(this),n=Jc.has(F())&&t!==void 0?t:this;return Kc.apply(n,e)}}catch{}},setup(e){Jc.set(e,!0)}})),Xc=cs(Yc),Zc=ss(qc,Xc)})),$c,el,tl,nl,rl,il,al=t((()=>{M(),us(),$c=`cause`,el=5,tl=`LinkedErrors`,nl=((e={})=>{let t=e.limit||el,n=e.key||$c;return{name:tl,setupOnce(){},preprocessEvent(e,r,i){let a=i.getOptions();O(Gr,a.stackParser,a.maxValueLength,n,t,e,r)}}}),rl=cs(nl),il=ss(tl,rl)})),ol=r({FunctionToString:()=>Zc,InboundFilters:()=>Wc,LinkedErrors:()=>il}),sl=t((()=>{Qc(),Gc(),al()})),cl,ll=t((()=>{M(),Ps(),Bs(),ho(),xs(),cl=class{constructor(e){this._client=e,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),Ns)}add(e,t,n,r=`none`,i={},a=ar()){let o=Math.floor(a),s=hs(t),c=ys(i),l=ms(r),u=ds(e,s,l,c),d=this._buckets.get(u),f=d&&e===`s`?d.metric.weight:0;d?(d.metric.add(n),d.timestamp<o&&(d.timestamp=o)):(d={metric:new zs[e](n),timestamp:o,metricType:e,name:s,unit:l,tags:c},this._buckets.set(u,d)),po(e,s,typeof n==`string`?d.metric.weight-f:n,l,i,u)}flush(){if(this._buckets.size!==0){if(this._client.captureAggregateMetrics){let e=Array.from(this._buckets).map(([,e])=>e);this._client.captureAggregateMetrics(e)}this._buckets.clear()}}close(){clearInterval(this._interval),this.flush()}}})),ul,dl,fl,pl,ml=t((()=>{us(),ll(),ul=`MetricsAggregator`,dl=(()=>({name:ul,setupOnce(){},setup(e){e.metricsAggregator=new cl(e)}})),fl=cs(dl),pl=ss(ul,fl)}));function hl(e,t,n,r={}){let i=F(),a=Ji();if(i){if(!i.metricsAggregator){N&&A.warn(`No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs`);return}let{unit:o,tags:s,timestamp:c}=r,{release:l,environment:u}=i.getOptions(),d=a.getTransaction(),f={};l&&(f.release=l),u&&(f.environment=u),d&&(f.transaction=P(d).description||``),N&&A.log(`Adding value of ${n} to ${e} metric ${t}`),i.metricsAggregator.add(e,t,n,o,{...f,...s},c)}}function gl(e,t=1,n){hl(`c`,e,t,n)}function _l(e,t,n){hl(`d`,e,t,n)}function vl(e,t,n){hl(`s`,e,t,n)}function yl(e,t,n){hl(`g`,e,t,n)}var bl,xl=t((()=>{M(),Zr(),$i(),hi(),Ps(),ml(),bl={increment:gl,distribution:_l,set:vl,gauge:yl,MetricsAggregator:pl,metricsAggregatorIntegration:fl}})),Sl,L=t((()=>{Bo(),Mo(),wo(),Ia(),Ga(),lo(),ia(),Ho(),Fo(),xo(),Ko(),$i(),Na(),ya(),ri(),$o(),Ms(),Ws(),qs(),Qs(),rc(),xa(),us(),Oi(),oc(),Xa(),fc(),mc(),hi(),gc(),$r(),Oc(),Gc(),Qc(),sl(),xl(),Sl=ol})),R,Cl=t((()=>{R=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__})),z,wl=t((()=>{M(),z=k}));function Tl(){z.document?z.document.addEventListener(`visibilitychange`,()=>{let e=Pa();if(z.document.hidden&&e){let t=`cancelled`,{op:n,status:r}=P(e);R&&A.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag(`visibilitychange`,`document.hidden`),e.end()}}):R&&A.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var El=t((()=>{L(),M(),Cl(),wl()})),Dl,Ol=t((()=>{Dl=(e,t,n)=>{let r,i;return a=>{t.value>=0&&(a||n)&&(i=t.value-(r||0),(i||r===void 0)&&(r=t.value,t.delta=i,e(t)))}}})),kl,Al=t((()=>{kl=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`})),jl,Ml,Nl=t((()=>{wl(),jl=()=>{let e=z.performance.timing,t=z.performance.navigation.type,n={entryType:`navigation`,startTime:0,type:t==2?`back_forward`:t===1?`reload`:`navigate`};for(let t in e)t!==`navigationStart`&&t!==`toJSON`&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n},Ml=()=>z.__WEB_VITALS_POLYFILL__?z.performance&&(performance.getEntriesByType&&performance.getEntriesByType(`navigation`)[0]||jl()):z.performance&&performance.getEntriesByType&&performance.getEntriesByType(`navigation`)[0]})),Pl,Fl=t((()=>{Nl(),Pl=()=>{let e=Ml();return e&&e.activationStart||0}})),Il,Ll=t((()=>{wl(),Al(),Fl(),Nl(),Il=(e,t)=>{let n=Ml(),r=`navigate`;return n&&(r=z.document&&z.document.prerendering||Pl()>0?`prerender`:n.type.replace(/_/g,`-`)),{name:e,value:t===void 0?-1:t,rating:`good`,delta:0,entries:[],id:kl(),navigationType:r}}})),Rl,zl=t((()=>{Rl=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{t(e.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}}})),Bl,Vl=t((()=>{wl(),Bl=(e,t)=>{let n=r=>{(r.type===`pagehide`||z.document.visibilityState===`hidden`)&&(e(r),t&&(removeEventListener(`visibilitychange`,n,!0),removeEventListener(`pagehide`,n,!0)))};z.document&&(addEventListener(`visibilitychange`,n,!0),addEventListener(`pagehide`,n,!0))}})),Hl,Ul=t((()=>{Ol(),Ll(),zl(),Vl(),Hl=(e,t={})=>{let n=Il(`CLS`,0),r,i=0,a=[],o=e=>{e.forEach(e=>{if(!e.hadRecentInput){let t=a[0],o=a[a.length-1];i&&a.length!==0&&e.startTime-o.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e]),i>n.value&&(n.value=i,n.entries=a,r&&r())}})},s=Rl(`layout-shift`,o);if(s){r=Dl(e,n,t.reportAllChanges);let i=()=>{o(s.takeRecords()),r(!0)};return Bl(i),i}}})),Wl,Gl,Kl,ql,Jl=t((()=>{wl(),Vl(),Wl=-1,Gl=()=>{z.document&&z.document.visibilityState&&(Wl=z.document.visibilityState===`hidden`&&!z.document.prerendering?0:1/0)},Kl=()=>{Bl(({timeStamp:e})=>{Wl=e},!0)},ql=()=>(Wl<0&&(Gl(),Kl()),{get firstHiddenTime(){return Wl}})})),Yl,Xl=t((()=>{Ol(),Jl(),Ll(),zl(),Vl(),Yl=e=>{let t=ql(),n=Il(`FID`),r,i=e=>{e.startTime<t.firstHiddenTime&&(n.value=e.processingStart-e.startTime,n.entries.push(e),r(!0))},a=e=>{e.forEach(i)},o=Rl(`first-input`,a);r=Dl(e,n),o&&Bl(()=>{a(o.takeRecords()),o.disconnect()},!0)}})),Zl,Ql,$l,eu,tu,nu,ru,iu=t((()=>{zl(),Zl=0,Ql=1/0,$l=0,eu=e=>{e.forEach(e=>{e.interactionId&&(Ql=Math.min(Ql,e.interactionId),$l=Math.max($l,e.interactionId),Zl=$l?($l-Ql)/7+1:0)})},nu=()=>tu?Zl:performance.interactionCount||0,ru=()=>{`interactionCount`in performance||tu||(tu=Rl(`event`,eu,{type:`event`,buffered:!0,durationThreshold:0}))}})),au,ou,su,cu,lu,uu,du,fu=t((()=>{Ol(),Ll(),zl(),Vl(),iu(),au=()=>nu(),ou=10,su=[],cu={},lu=e=>{let t=su[su.length-1],n=cu[e.interactionId];if(n||su.length<ou||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{let t={id:e.interactionId,latency:e.duration,entries:[e]};cu[t.id]=t,su.push(t)}su.sort((e,t)=>t.latency-e.latency),su.splice(ou).forEach(e=>{delete cu[e.id]})}},uu=()=>su[Math.min(su.length-1,Math.floor(au()/50))],du=(e,t)=>{t||={},ru();let n=Il(`INP`),r,i=e=>{e.forEach(e=>{e.interactionId&&lu(e),e.entryType===`first-input`&&(su.some(t=>t.entries.some(t=>e.duration===t.duration&&e.startTime===t.startTime))||lu(e))});let t=uu();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())},a=Rl(`event`,i,{durationThreshold:t.durationThreshold||40});r=Dl(e,n,t.reportAllChanges),a&&(a.observe({type:`first-input`,buffered:!0}),Bl(()=>{i(a.takeRecords()),n.value<0&&au()>0&&(n.value=0,n.entries=[]),r(!0)}))}})),pu,mu,hu=t((()=>{wl(),Ol(),Fl(),Jl(),Ll(),zl(),Vl(),pu={},mu=e=>{let t=ql(),n=Il(`LCP`),r,i=e=>{let i=e[e.length-1];if(i){let e=Math.max(i.startTime-Pl(),0);e<t.firstHiddenTime&&(n.value=e,n.entries=[i],r())}},a=Rl(`largest-contentful-paint`,i);if(a){r=Dl(e,n);let t=()=>{pu[n.id]||(i(a.takeRecords()),a.disconnect(),pu[n.id]=!0,r(!0))};return[`keydown`,`click`].forEach(e=>{z.document&&addEventListener(e,t,{once:!0,capture:!0})}),Bl(t,!0),t}}})),gu,_u,vu=t((()=>{wl(),Ol(),Fl(),Nl(),Ll(),gu=e=>{z.document&&(z.document.prerendering?addEventListener(`prerenderingchange`,()=>gu(e),!0):z.document.readyState===`complete`?setTimeout(e,0):addEventListener(`load`,()=>gu(e),!0))},_u=(e,t)=>{t||={};let n=Il(`TTFB`),r=Dl(e,n,t.reportAllChanges);gu(()=>{let e=Ml();if(e){if(n.value=Math.max(e.responseStart-Pl(),0),n.value<0||n.value>performance.now())return;n.entries=[e],r(!0)}})}}));function yu(e,t=!1){return ju(`cls`,e,Eu,Lu,t)}function bu(e,t=!1){return ju(`lcp`,e,Ou,zu,t)}function xu(e){return ju(`ttfb`,e,ku,Bu)}function Su(e){return ju(`fid`,e,Du,Ru)}function Cu(e){return ju(`inp`,e,Au,Vu)}function wu(e,t){return Nu(e,t),Iu[e]||(Mu(e),Iu[e]=!0),Pu(e,t)}function Tu(e,t){let n=Fu[e];if(!(!n||!n.length))for(let r of n)try{r(t)}catch(t){R&&A.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${tt(r)}\nError:`,t)}}function Eu(){return Hl(e=>{Tu(`cls`,{metric:e}),Lu=e},{reportAllChanges:!0})}function Du(){return Yl(e=>{Tu(`fid`,{metric:e}),Ru=e})}function Ou(){return mu(e=>{Tu(`lcp`,{metric:e}),zu=e})}function ku(){return _u(e=>{Tu(`ttfb`,{metric:e}),Bu=e})}function Au(){return du(e=>{Tu(`inp`,{metric:e}),Vu=e})}function ju(e,t,n,r,i=!1){Nu(e,t);let a;return Iu[e]||(a=n(),Iu[e]=!0),r&&t({metric:r}),Pu(e,t,i?a:void 0)}function Mu(e){let t={};e===`event`&&(t.durationThreshold=0),Rl(e,t=>{Tu(e,{entries:t})},t)}function Nu(e,t){Fu[e]=Fu[e]||[],Fu[e].push(t)}function Pu(e,t,n){return()=>{n&&n();let r=Fu[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}var Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu=t((()=>{M(),Cl(),Ul(),Xl(),fu(),hu(),zl(),vu(),Fu={},Iu={}}));function Uu(e){return typeof e==`number`&&isFinite(e)}function Wu(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}var Gu=t((()=>{}));function Ku(e){return e/1e3}function qu(){return z&&z.addEventListener&&z.performance}function Ju(){let e=qu();if(e&&or){e.mark&&z.performance.mark(`sentry-tracing-init`);let t=ed(),n=Qu(),r=$u(),i=td();return()=>{t(),n(),r(),i()}}return()=>void 0}function Yu(){wu(`longtask`,({entries:e})=>{for(let t of e){let e=Pa();if(!e)return;let n=Ku(or+t.startTime),r=Ku(t.duration);e.startChild({description:`Main UI thread blocked`,op:`ui.long-task`,origin:`auto.ui.browser.metrics`,startTimestamp:n,endTimestamp:n+r})}})}function Xu(){wu(`event`,({entries:e})=>{for(let t of e){let e=Pa();if(!e)return;if(t.name===`click`){let n=Ku(or+t.startTime),r=Ku(t.duration),i={description:pe(t.target),op:`ui.interaction.${t.name}`,origin:`auto.ui.browser.metrics`,startTimestamp:n,endTimestamp:n+r},a=_e(t.target);a&&(i.attributes={"ui.component_name":a}),e.startChild(i)}}})}function Zu(e,t){if(qu()&&or){let n=nd(e,t);return()=>{n()}}return()=>void 0}function Qu(){return yu(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(R&&A.log(`[Measurements] Adding CLS`),gd.cls={value:e.value,unit:``},vd=t)},!0)}function $u(){return bu(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(R&&A.log(`[Measurements] Adding LCP`),gd.lcp={value:e.value,unit:`millisecond`},_d=t)},!0)}function ed(){return Su(({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=Ku(or),r=Ku(t.startTime);R&&A.log(`[Measurements] Adding FID`),gd.fid={value:e.value,unit:`millisecond`},gd[`mark.fid`]={value:n+r,unit:`second`}})}function td(){return xu(({metric:e})=>{e.entries[e.entries.length-1]&&(R&&A.log(`[Measurements] Adding TTFB`),gd.ttfb={value:e.value,unit:`millisecond`})})}function nd(e,t){return Cu(({metric:n})=>{if(n.value===void 0)return;let r=n.entries.find(e=>e.duration===n.value&&yd[e.name]!==void 0),i=F();if(!r||!i)return;let a=yd[r.name],o=i.getOptions(),s=Ku(or+r.startTime),c=Ku(n.value),l=r.interactionId===void 0?void 0:e[r.interactionId];if(l===void 0)return;let{routeName:u,parentContext:d,activeTransaction:f,user:p,replayId:m}=l,h=p===void 0?void 0:p.email||p.id||p.ip_address,g=f===void 0?void 0:f.getProfileId(),_=new Co({startTimestamp:s,endTimestamp:s+c,op:`ui.interaction.${a}`,name:pe(r.target),attributes:{release:o.release,environment:o.environment,transaction:u,...h!==void 0&&h!==``?{user:h}:{},...g===void 0?{}:{profile_id:g},...m===void 0?{}:{replay_id:m}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:`millisecond`}}}),v=pd(d,o,t);if(v&&Math.random()<v){let e=_?ic([_],i.getDsn()):void 0,t=i&&i.getTransport();t&&e&&t.send(e).then(null,e=>{R&&A.error(`Error while sending interaction:`,e)});return}})}function rd(e){let t=qu();if(!t||!z.performance.getEntries||!or)return;R&&A.log(`[Tracing] Adding & adjusting spans using Performance API`);let n=Ku(or),r=t.getEntries(),{op:i,start_timestamp:a}=P(e);if(r.slice(hd).forEach(t=>{let r=Ku(t.startTime),i=Ku(t.duration);if(!(e.op===`navigation`&&a&&n+r<a))switch(t.entryType){case`navigation`:ad(e,t,n);break;case`mark`:case`paint`:case`measure`:{id(e,t,r,i,n);let a=ql(),o=t.startTime<a.firstHiddenTime;t.name===`first-paint`&&o&&(R&&A.log(`[Measurements] Adding FP`),gd.fp={value:t.startTime,unit:`millisecond`}),t.name===`first-contentful-paint`&&o&&(R&&A.log(`[Measurements] Adding FCP`),gd.fcp={value:t.startTime,unit:`millisecond`});break}case`resource`:cd(e,t,t.name,r,i,n);break}}),hd=Math.max(r.length-1,0),ld(e),i===`pageload`){fd(gd),[`fcp`,`fp`,`lcp`].forEach(e=>{if(!gd[e]||!a||n>=a)return;let t=gd[e].value,r=n+Ku(t),i=Math.abs((r-a)*1e3),o=i-t;R&&A.log(`[Measurements] Normalized ${e} from ${t} to ${i} (${o})`),gd[e].value=i});let t=gd[`mark.fid`];t&&gd.fid&&(Wu(e,{description:`first input delay`,endTimestamp:t.value+Ku(gd.fid.value),op:`ui.action`,origin:`auto.ui.browser.metrics`,startTimestamp:t.value}),delete gd[`mark.fid`]),`fcp`in gd||delete gd.cls,Object.keys(gd).forEach(e=>{Vo(e,gd[e].value,gd[e].unit)}),ud(e)}_d=void 0,vd=void 0,gd={}}function id(e,t,n,r,i){let a=i+n,o=a+r;return Wu(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:`auto.resource.browser.metrics`,startTimestamp:a}),a}function ad(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{od(e,t,r,n)}),od(e,t,`secureConnection`,n,`TLS/SSL`,`connectEnd`),od(e,t,`fetch`,n,`cache`,`domainLookupStart`),od(e,t,`domainLookup`,n,`DNS`),sd(e,t,n)}function od(e,t,n,r,i,a){let o=a?t[a]:t[`${n}End`],s=t[`${n}Start`];!s||!o||Wu(e,{op:`browser`,origin:`auto.browser.browser.metrics`,description:i||n,startTimestamp:r+Ku(s),endTimestamp:r+Ku(o)})}function sd(e,t,n){t.responseEnd&&(Wu(e,{op:`browser`,origin:`auto.browser.browser.metrics`,description:`request`,startTimestamp:n+Ku(t.requestStart),endTimestamp:n+Ku(t.responseEnd)}),Wu(e,{op:`browser`,origin:`auto.browser.browser.metrics`,description:`response`,startTimestamp:n+Ku(t.responseStart),endTimestamp:n+Ku(t.responseEnd)}))}function cd(e,t,n,r,i,a){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let o=Xn(n),s={};dd(s,t,`transferSize`,`http.response_transfer_size`),dd(s,t,`encodedBodySize`,`http.response_content_length`),dd(s,t,`decodedBodySize`,`http.decoded_response_content_length`),`renderBlockingStatus`in t&&(s[`resource.render_blocking_status`]=t.renderBlockingStatus),o.protocol&&(s[`url.scheme`]=o.protocol.split(`:`).pop()),o.host&&(s[`server.address`]=o.host),s[`url.same_origin`]=n.includes(z.location.origin);let c=a+r,l=c+i;Wu(e,{description:n.replace(z.location.origin,``),endTimestamp:l,op:t.initiatorType?`resource.${t.initiatorType}`:`resource.other`,origin:`auto.resource.browser.metrics`,startTimestamp:c,data:s})}function ld(e){let t=z.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag(`effectiveConnectionType`,n.effectiveType),n.type&&e.setTag(`connectionType`,n.type),Uu(n.rtt)&&(gd[`connection.rtt`]={value:n.rtt,unit:`millisecond`})),Uu(t.deviceMemory)&&e.setTag(`deviceMemory`,`${t.deviceMemory} GB`),Uu(t.hardwareConcurrency)&&e.setTag(`hardwareConcurrency`,String(t.hardwareConcurrency))}function ud(e){_d&&(R&&A.log(`[Measurements] Adding LCP Data`),_d.element&&e.setTag(`lcp.element`,pe(_d.element)),_d.id&&e.setTag(`lcp.id`,_d.id),_d.url&&e.setTag(`lcp.url`,_d.url.trim().slice(0,200)),e.setTag(`lcp.size`,_d.size)),vd&&vd.sources&&(R&&A.log(`[Measurements] Adding CLS Data`),vd.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,pe(t.node))))}function dd(e,t,n,r){let i=t[n];i!=null&&i<md&&(e[r]=i)}function fd(e){let t=Ml();if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(R&&A.log(`[Measurements] Adding TTFB Request Time`),e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}function pd(e,t,n){if(!Ya(t))return!1;let r;return r=e!==void 0&&typeof t.tracesSampler==`function`?t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:z.location}):e!==void 0&&e.sampled!==void 0?e.sampled:t.tracesSampleRate===void 0?1:t.tracesSampleRate,Po(r)?r===!0?n:r===!1?0:r*n:(R&&A.warn(`[Tracing] Discarding interaction span because of invalid sample rate.`),!1)}var md,hd,gd,_d,vd,yd,bd=t((()=>{L(),M(),Cl(),Hu(),wl(),Jl(),Gu(),Nl(),md=2147483647,hd=0,gd={},yd={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 xd(e,t,n,r,i=`auto.http.browser`){if(!Ya()||!e.fetchData)return;let a=t(e.fetchData.url);if(e.endTimestamp&&a){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(wd(n,e),delete r[t]);return}let o=Ji(),s=F(),{method:c,url:l}=e.fetchData,u=Cd(l),d=u?Xn(u).host:void 0,f=a?eo({name:`${c} ${l}`,onlyIfParent:!0,attributes:{url:l,type:`fetch`,"http.method":c,"http.url":u,"server.address":d,[yo]:i},op:`http.client`}):void 0;if(f&&(e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(e.fetchData.url)&&s){let t=e.args[0];e.args[1]=e.args[1]||{};let n=e.args[1];n.headers=Sd(t,s,o,n,f)}return f}function Sd(e,t,n,r,i){let a=i||n.getSpan(),{traceId:o,spanId:s,sampled:c,dsc:l}={...wa().getPropagationContext(),...n.getPropagationContext()},u=a?ui(a):yr(o,s,c),d=lr(l||(a?ra(a):na(o,t,n))),f=r.headers||(typeof Request<`u`&&S(e,Request)?e.headers:void 0);if(!f)return{"sentry-trace":u,baggage:d};if(typeof Headers<`u`&&S(f,Headers)){let e=new Headers(f);return e.append(`sentry-trace`,u),d&&e.append(fr,d),e}else if(Array.isArray(f)){let e=[...f,[`sentry-trace`,u]];return d&&e.push([fr,d]),e}else{let e=`baggage`in f?f.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),d&&t.push(d),{...f,"sentry-trace":u,baggage:t.length>0?t.join(`,`):void 0}}}function Cd(e){try{return new URL(e).href}catch{return}}function wd(e,t){if(t.response){Ha(e,t.response.status);let n=t.response&&t.response.headers&&t.response.headers.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus(`internal_error`);e.end()}var Td=t((()=>{L(),M()}));function Ed(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:a,enableHTTPTimings:o}={traceFetch:Ld.traceFetch,traceXHR:Ld.traceXHR,...e},s=typeof a==`function`?a:e=>!0,c=e=>Md(e,r||i),l={};t&&Ht(e=>{let t=xd(e,s,c,l);if(t){let n=Fd(e.fetchData.url),r=n?Xn(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}o&&t&&Od(t)}),n&&dn(e=>{let t=Nd(e,s,c,l);o&&t&&Od(t)})}function Dd(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function Od(e){let{url:t}=P(e).data||{};if(!t||typeof t!=`string`)return;let n=wu(`resource`,({entries:r})=>{r.forEach(r=>{Dd(r)&&r.name.endsWith(t)&&(jd(r).forEach(t=>e.setAttribute(...t)),setTimeout(n))})})}function kd(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function Ad(e=0){return((or||performance.timeOrigin)+e)/1e3}function jd(e){let{name:t,version:n}=kd(e.nextHopProtocol),r=[];return r.push([`network.protocol.version`,n],[`network.protocol.name`,t]),or?[...r,[`http.request.redirect_start`,Ad(e.redirectStart)],[`http.request.fetch_start`,Ad(e.fetchStart)],[`http.request.domain_lookup_start`,Ad(e.domainLookupStart)],[`http.request.domain_lookup_end`,Ad(e.domainLookupEnd)],[`http.request.connect_start`,Ad(e.connectStart)],[`http.request.secure_connection_start`,Ad(e.secureConnectionStart)],[`http.request.connection_end`,Ad(e.connectEnd)],[`http.request.request_start`,Ad(e.requestStart)],[`http.request.response_start`,Ad(e.responseStart)],[`http.request.response_end`,Ad(e.responseEnd)]]:r}function Md(e,t){return D(e,t||Id)}function Nd(e,t,n,r){let i=e.xhr,a=i&&i.__sentry_xhr_v3__;if(!Ya()||!i||i.__sentry_own_request__||!a)return;let o=t(a.url);if(e.endTimestamp&&o){let e=i.__sentry_xhr_span_id__;if(!e)return;let t=r[e];t&&a.status_code!==void 0&&(Ha(t,a.status_code),t.end(),delete r[e]);return}let s=Ji(),c=wa(),l=Fd(a.url),u=l?Xn(l).host:void 0,d=o?eo({name:`${a.method} ${a.url}`,onlyIfParent:!0,attributes:{type:`xhr`,"http.method":a.method,"http.url":l,url:a.url,"server.address":u,[yo]:`auto.http.browser`},op:`http.client`}):void 0;d&&(i.__sentry_xhr_span_id__=d.spanContext().spanId,r[i.__sentry_xhr_span_id__]=d);let f=F();if(i.setRequestHeader&&n(a.url)&&f){let{traceId:e,spanId:t,sampled:n,dsc:r}={...c.getPropagationContext(),...s.getPropagationContext()};Pd(i,d?ui(d):yr(e,t,n),lr(r||(d?ra(d):na(e,f,s))))}return d}function Pd(e,t,n){try{e.setRequestHeader(`sentry-trace`,t),n&&e.setRequestHeader(fr,n)}catch{}}function Fd(e){try{return new URL(e,z.location.origin).href}catch{return}}var Id,Ld,Rd=t((()=>{L(),M(),Td(),Hu(),wl(),Id=[`localhost`,/^\/(?!\/)/],Ld={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Id,tracePropagationTargets:Id}}));function zd(e,t=!0,n=!0){if(!z||!z.location){R&&A.warn(`Could not initialize routing instrumentation due to invalid location`);return}let r=z.location.href,i;t&&(i=e({name:z.location.pathname,startTimestamp:or?or/1e3:void 0,op:`pageload`,origin:`auto.pageload.browser`,metadata:{source:`url`}})),n&&on(({to:t,from:n})=>{if(n===void 0&&r&&r.indexOf(t)!==-1){r=void 0;return}n!==t&&(r=void 0,i&&(R&&A.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.end()),i=e({name:z.location.pathname,op:`navigation`,origin:`auto.navigation.browser`,metadata:{source:`url`}}))})}var Bd=t((()=>{M(),Cl(),wl()}));function Vd(e){let t=ge(`meta[name=${e}]`);return t?t.getAttribute(`content`):void 0}function Hd(e){let t=e.attributes&&e.attributes[`sentry.source`],n=e.data&&e.data[`sentry.source`],r=e.metadata&&e.metadata.source;return t||n||r}function Ud(e){return`duration`in e}var Wd,Gd,Kd,qd,Jd=t((()=>{L(),M(),Cl(),El(),Hu(),bd(),Rd(),Bd(),wl(),Wd=`BrowserTracing`,Gd={...Do,markBackgroundTransactions:!0,routingInstrumentation:zd,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Ld},Kd=10,qd=class{constructor(e){this.name=Wd,this._hasSetTracePropagationTargets=!1,zo(),R&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...Gd,...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=Ju(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&Zu(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&Yu(),this.options._experiments.enableInteractions&&Xu(),this._latestRoute={name:void 0,context:void 0}}setupOnce(e,t){this._getCurrentHub=t;let n=t().getClient(),r=n&&n.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:a,startTransactionOnPageLoad:o,markBackgroundTransactions:s,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,enableHTTPTimings:d,_experiments:f}=this.options,p=r&&r.tracePropagationTargets,m=p||this.options.tracePropagationTargets;R&&this._hasSetTracePropagationTargets&&p&&A.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."),i(e=>{let n=this._createRouteTransaction(e);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,e,t),n},o,a),s&&Tl(),f.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),Ed({traceFetch:c,traceXHR:l,tracePropagationTargets:m,shouldCreateSpanForRequest:u,enableHTTPTimings:d})}_createRouteTransaction(e){if(!this._getCurrentHub){R&&A.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:i,heartbeatInterval:a}=this.options,o=e.op===`pageload`,s;if(o){let{traceId:t,dsc:n,parentSpanId:r,sampled:i}=vr(o?Vd(`sentry-trace`):``,o?Vd(`baggage`):void 0);s={traceId:t,parentSpanId:r,parentSampled:i,...e,metadata:{...e.metadata,dynamicSamplingContext:n},trimEnd:!0}}else s={trimEnd:!0,...e};let c=typeof n==`function`?n(s):s,l=c===void 0?{...s,sampled:!1}:c;l.metadata=l.name===s.name?l.metadata:{...l.metadata,source:`custom`},this._latestRoute.name=l.name,this._latestRoute.context=l,l.sampled===!1&&R&&A.log(`[Tracing] Will not send ${l.op} transaction because of beforeNavigate.`),R&&A.log(`[Tracing] Starting ${l.op} transaction on scope`);let{location:u}=z,d=Ro(t,l,r,i,!0,{location:u},a,o);return o&&z.document&&(z.document.addEventListener(`readystatechange`,()=>{[`interactive`,`complete`].includes(z.document.readyState)&&d.sendAutoFinishSignal()}),[`interactive`,`complete`].includes(z.document.readyState)&&d.sendAutoFinishSignal()),d.registerBeforeFinishCallback(e=>{this._collectWebVitals(),rd(e)}),d}_registerInteractionListener(){let e,t=()=>{let{idleTimeout:t,finalTimeout:n,heartbeatInterval:r}=this.options,i=`ui.action.click`,a=Pa();if(a&&a.op&&[`navigation`,`pageload`].includes(a.op)){R&&A.warn(`[Tracing] Did not create ${i} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&=(e.setFinishReason(`interactionInterrupted`),e.end(),void 0),!this._getCurrentHub){R&&A.warn(`[Tracing] Did not create ${i} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){R&&A.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`);return}let o=this._getCurrentHub(),{location:s}=z;e=Ro(o,{name:this._latestRoute.name,op:i,trimEnd:!0,data:{[go]:this._latestRoute.context?Hd(this._latestRoute.context):`url`}},t,n,!0,{location:s},r)};[`click`].forEach(e=>{z.document&&addEventListener(e,t,{once:!1,capture:!0})})}_registerInpInteractionListener(){let e=({entries:e})=>{let t=F(),n=t!==void 0&&t.getIntegrationByName!==void 0?t.getIntegrationByName(`Replay`):void 0,r=n===void 0?void 0:n.getReplayId(),i=Pa(),a=Ji(),o=a===void 0?void 0:a.getUser();e.forEach(e=>{if(Ud(e)){let t=e.interactionId;if(t===void 0)return;let n=this._interactionIdToRouteNameMapping[t],a=e.duration,s=e.startTime,c=Object.keys(this._interactionIdToRouteNameMapping),l=c.length>0?c.reduce((e,t)=>this._interactionIdToRouteNameMapping[e].duration<this._interactionIdToRouteNameMapping[t].duration?e:t):void 0;if(e.entryType===`first-input`&&c.map(e=>this._interactionIdToRouteNameMapping[e]).some(e=>e.duration===a&&e.startTime===s)||!t)return;if(n)n.duration=Math.max(n.duration,a);else if(c.length<Kd||l===void 0||a>this._interactionIdToRouteNameMapping[l].duration){let e=this._latestRoute.name,n=this._latestRoute.context;e&&n&&(l&&Object.keys(this._interactionIdToRouteNameMapping).length>=Kd&&delete this._interactionIdToRouteNameMapping[l],this._interactionIdToRouteNameMapping[t]={routeName:e,duration:a,parentContext:n,user:o,activeTransaction:i,replayId:r,startTime:s})}}})};wu(`event`,e),wu(`first-input`,e)}}}));function Yd(e,t){if(!e.emit)return;e.emit(`startPageLoadSpan`,t);let n=to();return(n&&P(n).op)===`pageload`?n:void 0}function Xd(e,t){if(!e.emit)return;e.emit(`startNavigationSpan`,t);let n=to();return(n&&P(n).op)===`navigation`?n:void 0}function Zd(e){let t=ge(`meta[name=${e}]`);return t?t.getAttribute(`content`):void 0}function Qd(e,t){let n,r=()=>{let{idleTimeout:r,finalTimeout:i,heartbeatInterval:a}=e,o=`ui.action.click`,s=Pa();if(s&&s.op&&[`navigation`,`pageload`].includes(s.op)){R&&A.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&=(n.setFinishReason(`interactionInterrupted`),n.end(),void 0),!t.name){R&&A.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}let{location:c}=z,l={name:t.name,op:o,trimEnd:!0,data:{[go]:t.context?tf(t.context):`url`}};n=Ro(I(),l,r,i,!0,{location:c},a)};[`click`].forEach(e=>{z.document&&addEventListener(e,r,{once:!1,capture:!0})})}function $d(e){return`duration`in e}function ef(e,t){let n=({entries:n})=>{let r=F(),i=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName(`Replay`):void 0,a=i===void 0?void 0:i.getReplayId(),o=Pa(),s=Ji(),c=s===void 0?void 0:s.getUser();n.forEach(n=>{if($d(n)){let r=n.interactionId;if(r===void 0)return;let i=e[r],s=n.duration,l=n.startTime,u=Object.keys(e),d=u.length>0?u.reduce((t,n)=>e[t].duration<e[n].duration?t:n):void 0;if(n.entryType===`first-input`&&u.map(t=>e[t]).some(e=>e.duration===s&&e.startTime===l)||!r)return;if(i)i.duration=Math.max(i.duration,s);else if(u.length<of||d===void 0||s>e[d].duration){let n=t.name,i=t.context;n&&i&&(d&&Object.keys(e).length>=of&&delete e[d],e[r]={routeName:n,duration:s,parentContext:i,user:c,activeTransaction:o,replayId:a,startTime:l})}}})};wu(`event`,n),wu(`first-input`,n)}function tf(e){let t=e.attributes&&e.attributes[`sentry.source`],n=e.data&&e.data[`sentry.source`],r=e.metadata&&e.metadata.source;return t||n||r}var nf,rf,af,of,sf=t((()=>{L(),M(),Cl(),El(),Hu(),bd(),Rd(),wl(),nf=`BrowserTracing`,rf={...Do,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Ld},af=((e={})=>{let t=R?!!(e.tracePropagationTargets||e.tracingOrigins):!1;zo(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);let n={...rf,...e},r=Ju(),i={};n.enableInp&&Zu(i,n.interactionsSampleRate),n.enableLongTask&&Yu(),n._experiments.enableInteractions&&Xu();let a={name:void 0,context:void 0};function o(e){let t=I(),{beforeStartSpan:i,idleTimeout:o,finalTimeout:s,heartbeatInterval:c}=n,l=e.op===`pageload`,u;if(l){let{traceId:t,dsc:n,parentSpanId:r,sampled:i}=vr(l?Zd(`sentry-trace`):``,l?Zd(`baggage`):void 0);u={traceId:t,parentSpanId:r,parentSampled:i,...e,metadata:{...e.metadata,dynamicSamplingContext:n},trimEnd:!0}}else u={trimEnd:!0,...e};let d=i?i(u):u;d.metadata=d.name===u.name?d.metadata:{...d.metadata,source:`custom`},a.name=d.name,a.context=d,d.sampled===!1&&R&&A.log(`[Tracing] Will not send ${d.op} transaction because of beforeNavigate.`),R&&A.log(`[Tracing] Starting ${d.op} transaction on scope`);let{location:f}=z,p=Ro(t,d,o,s,!0,{location:f},c,l);return l&&z.document&&(z.document.addEventListener(`readystatechange`,()=>{[`interactive`,`complete`].includes(z.document.readyState)&&p.sendAutoFinishSignal()}),[`interactive`,`complete`].includes(z.document.readyState)&&p.sendAutoFinishSignal()),p.registerBeforeFinishCallback(e=>{r(),rd(e)}),p}return{name:nf,setupOnce:()=>{},afterAllSetup(e){let r=e.getOptions(),{markBackgroundSpan:s,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,enableHTTPTimings:d,_experiments:f}=n,p=r&&r.tracePropagationTargets,m=p||n.tracePropagationTargets;R&&t&&p&&A.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 h,g=z.location&&z.location.href;e.on&&(e.on(`startNavigationSpan`,e=>{h&&(R&&A.log(`[Tracing] Finishing current transaction with op: ${P(h).op}`),h.end()),h=o({op:`navigation`,...e})}),e.on(`startPageLoadSpan`,e=>{h&&(R&&A.log(`[Tracing] Finishing current transaction with op: ${P(h).op}`),h.end()),h=o({op:`pageload`,...e})})),n.instrumentPageLoad&&e.emit&&z.location&&Yd(e,{name:z.location.pathname,startTimestamp:or?or/1e3:void 0,origin:`auto.pageload.browser`,attributes:{[go]:`url`}}),n.instrumentNavigation&&e.emit&&z.location&&on(({to:t,from:n})=>{if(n===void 0&&g&&g.indexOf(t)!==-1){g=void 0;return}n!==t&&(g=void 0,Xd(e,{name:z.location.pathname,origin:`auto.navigation.browser`,attributes:{[go]:`url`}}))}),s&&Tl(),f.enableInteractions&&Qd(n,a),n.enableInp&&ef(i,a),Ed({traceFetch:c,traceXHR:l,tracePropagationTargets:m,shouldCreateSpanForRequest:u,enableHTTPTimings:d})},options:n}}),of=10})),cf=t((()=>{Jd(),sf(),Rd(),Hu()}));function lf(){return ff>0}function uf(){ff++,setTimeout(()=>{ff--})}function df(e,t={},n){if(typeof e!=`function`)return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(He(e))return e}catch{return e}let r=function(){let r=Array.prototype.slice.call(arguments);try{n&&typeof n==`function`&&n.apply(this,arguments);let i=r.map(e=>df(e,t));return e.apply(this,i)}catch(e){throw uf(),Bi(n=>{n.addEventProcessor(e=>(t.mechanism&&(vt(e,void 0,void 0),yt(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),ki(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}Ve(r,e),Be(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,`name`,{get(){return e.name}})}catch{}return r}var B,ff,pf=t((()=>{L(),M(),B=k,ff=0})),V,mf=t((()=>{V=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__}));function hf(e,t){let n=vf(e,t),r={type:t&&t.name,value:bf(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function gf(e,t,n,r){let i=F(),a=i&&i.getOptions().normalizeDepth,o={exception:{values:[{type:g(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Tf(t,{isUnhandledRejection:r})}]},extra:{__serialized__:On(t,a)}};if(n){let t=vf(e,n);t.length&&(o.exception.values[0].stacktrace={frames:t})}return o}function _f(e,t){return{exception:{values:[hf(e,t)]}}}function vf(e,t){let n=t.stacktrace||t.stack||``,r=yf(t);try{return e(n,r)}catch{}return[]}function yf(e){if(e){if(typeof e.framesToPop==`number`)return e.framesToPop;if(Df.test(e.message))return 1}return 0}function bf(e){let t=e&&e.message;return t?t.error&&typeof t.error.message==`string`?t.error.message:t:`No error message`}function xf(e,t,n,r){let i=Cf(e,t,n&&n.syntheticException||void 0,r);return yt(i),i.level=`error`,n&&n.event_id&&(i.event_id=n.event_id),Un(i)}function Sf(e,t,n=`info`,r,i){let a=wf(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),Un(a)}function Cf(e,t,n,r,i){let a;if(l(t)&&t.error)return _f(e,t.error);if(u(t)||d(t)){let i=t;if(`stack`in t)a=_f(e,t);else{let t=i.name||(u(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=wf(e,o,n,r),vt(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return s(t)?_f(e,t):h(t)||g(t)?(a=gf(e,t,n,i),yt(a,{synthetic:!0}),a):(a=wf(e,t,n,r),vt(a,`${t}`,void 0),yt(a,{synthetic:!0}),a)}function wf(e,t,n,r){let i={};if(r&&n){let r=vf(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}if(p(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Tf(e,{isUnhandledRejection:t}){let n=qe(e),r=t?`promise rejection`:`exception`;return l(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:g(e)?`Event \`${Ef(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ef(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}var Df,Of=t((()=>{L(),M(),Df=/Minified React error #\d+;/i}));function kf(e,{metadata:t,tunnel:n,dsn:r}){return Sr({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ae(r)}},[Af(e)])}function Af(e){return[{type:`user_report`},e]}var jf=t((()=>{M()})),Mf,Nf=t((()=>{L(),M(),mf(),Of(),pf(),jf(),Mf=class extends js{constructor(e){hc(e,`browser`,[`browser`],B.SENTRY_SDK_SOURCE||vn()),super(e),e.sendClientReports&&B.document&&B.document.addEventListener(`visibilitychange`,()=>{B.document.visibilityState===`hidden`&&this._flushOutcomes()})}eventFromException(e,t){return xf(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return Sf(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){V&&A.warn(`SDK not enabled, will not capture user feedback.`);return}let t=kf(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){V&&A.log(`No outcomes to send`);return}if(!this._dsn){V&&A.log(`No dsn provided, will not send outcomes`);return}V&&A.log(`Sending outcomes:`,e);let t=Ir(e,this._options.tunnel&&Ae(this._dsn));this._sendEnvelope(t)}}}));function Pf(){if(If)return If;if(Lt(B.fetch))return If=B.fetch.bind(B);let e=B.document,t=B.fetch;if(e&&typeof e.createElement==`function`)try{let n=e.createElement(`iframe`);n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){V&&A.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return If=t.bind(B)}function Ff(){If=void 0}var If,Lf=t((()=>{M(),mf(),pf(),If=void 0}));function Rf(e,t=Pf()){let n=0,r=0;function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,o).then(e=>(n-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get(`X-Sentry-Rate-Limits`),"retry-after":e.headers.get(`Retry-After`)}}))}catch(e){return Ff(),n-=a,r--,Wn(e)}}return Gs(e,i)}var zf=t((()=>{L(),M(),Lf()}));function Bf(e){function t(t){return new Kn((n,r)=>{let i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{i.readyState===Vf&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader(`X-Sentry-Rate-Limits`),"retry-after":i.getResponseHeader(`Retry-After`)}})},i.open(`POST`,e.url);for(let t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)})}return Gs(e,t)}var Vf,Hf=t((()=>{L(),M(),Vf=4}));function Uf(e,t,n,r){let i={filename:e,function:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp=t((()=>{M(),Wf=`?`,Gf=10,Kf=20,qf=30,Jf=40,Yf=50,Xf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Zf=/\((\S*)(?::(\d+))(?::(\d+))\)/,Qf=e=>{let t=Xf.exec(e);if(t){if(t[2]&&t[2].indexOf(`eval`)===0){let e=Zf.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}let[e,n]=hp(t[1]||Wf,t[2]);return Uf(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},$f=[qf,Qf],ep=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,tp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,np=e=>{let t=ep.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=tp.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||Wf;return[n,e]=hp(n,e),Uf(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},rp=[Yf,np],ip=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ap=e=>{let t=ip.exec(e);return t?Uf(t[2],t[1]||Wf,+t[3],t[4]?+t[4]:void 0):void 0},op=[Jf,ap],sp=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,cp=e=>{let t=sp.exec(e);return t?Uf(t[2],t[3]||Wf,+t[1]):void 0},lp=[Gf,cp],up=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,dp=e=>{let t=up.exec(e);return t?Uf(t[5],t[3]||t[4]||Wf,+t[1],+t[2]):void 0},fp=[Kf,dp],pp=[$f,rp,op],mp=Qe(...pp),hp=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?Wf:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]}}));function _p(e){return function(t){F()===e&&Ni({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:_t(t)},{event:t})}}function vp(e,t){return function(n){if(F()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>wp&&(V&&A.warn(`\`dom.maxStringLength\` cannot exceed ${wp}, but a value of ${o} was configured. Sentry will use ${wp} instead.`),o=wp),typeof a==`string`&&(a=[a]);try{let e=n.event,t=Cp(e)?e.target:e;r=pe(t,{keyAttrs:a,maxStringLength:o}),i=_e(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Ni(s,{event:n.event,name:n.name,global:n.global})}}function yp(e){return function(t){if(F()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:$n(t.level),message:te(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${te(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;Ni(n,{input:t.args,level:t.level})}}function bp(e){return function(t){if(F()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[hn];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};Ni({category:`xhr`,data:l,type:`http`},u)}}function xp(e){return function(t){if(F()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let e=t.fetchData,i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};Ni({category:`fetch`,data:e,level:`error`,type:`http`},i)}else{let e=t.response,i={...t.fetchData,status_code:e&&e.status},a={input:t.args,response:e,startTimestamp:n,endTimestamp:r};Ni({category:`fetch`,data:i,type:`http`},a)}}}function Sp(e){return function(t){if(F()!==e)return;let n=t.from,r=t.to,i=Xn(B.location.href),a=n?Xn(n):void 0,o=Xn(r);(!a||!a.path)&&(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),Ni({category:`navigation`,data:{from:n,to:r}})}}function Cp(e){return!!e&&!!e.target}var wp,Tp,Ep,Dp,Op,kp=t((()=>{L(),M(),mf(),pf(),wp=1024,Tp=`Breadcrumbs`,Ep=((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Tp,setupOnce(){},setup(e){t.console&&pt(yp(e)),t.dom&&wt(vp(e,t.dom)),t.xhr&&dn(bp(e)),t.fetch&&Ht(xp(e)),t.history&&on(Sp(e)),t.sentry&&e.on&&e.on(`beforeSendEvent`,_p(e))}}}),Dp=cs(Ep),Op=ss(Tp,Dp)}));function Ap(e,t){return t?!!(jp(e,t)||Mp(e,t)):!1}function jp(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Pp(e,t)||!Np(e,t))}function Mp(e,t){let n=Fp(t),r=Fp(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Pp(e,t)||!Np(e,t))}function Np(e,t){let n=Ip(e),r=Ip(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Pp(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function Fp(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Ip(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}var Lp,Rp,zp,Bp,Vp=t((()=>{L(),M(),mf(),Lp=`Dedupe`,Rp=(()=>{let e;return{name:Lp,setupOnce(){},processEvent(t){if(t.type)return t;try{if(Ap(t,e))return V&&A.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}),zp=cs(Rp),Bp=ss(Lp,zp)}));function Hp(e){Jt(t=>{let{stackParser:n,attachStacktrace:r}=Yp();if(F()!==e||lf())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=c===void 0&&f(i)?Kp(i,a,o,s):qp(Cf(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,ji(l,{originalException:c,mechanism:{handled:!1,type:`onerror`}})})}function Up(e){Qt(t=>{let{stackParser:n,attachStacktrace:r}=Yp();if(F()!==e||lf())return;let i=Wp(t),a=m(i)?Gp(i):Cf(n,i,void 0,r,!0);a.level=`error`,ji(a,{originalException:i,mechanism:{handled:!1,type:`onunhandledrejection`}})})}function Wp(e){if(m(e))return e;let t=e;try{if(`reason`in t)return t.reason;if(`detail`in t&&`reason`in t.detail)return t.detail.reason}catch{}return e}function Gp(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Kp(e,t,n,r){let i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,a=l(e)?e.message:e,o=`Error`,s=a.match(i);return s&&(o=s[1],a=s[2]),qp({exception:{values:[{type:o,value:a}]}},t,n,r)}function qp(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=f(t)&&t.length>0?t:he();return c.length===0&&c.push({colno:l,filename:d,function:`?`,in_app:!0,lineno:u}),e}function Jp(e){V&&A.log(`Global Handler attached: ${e}`)}function Yp(){let e=F();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Xp,Zp,Qp,$p,em=t((()=>{L(),M(),mf(),Of(),pf(),Xp=`GlobalHandlers`,Zp=((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Xp,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(Hp(e),Jp(`onerror`)),t.onunhandledrejection&&(Up(e),Jp(`onunhandledrejection`))}}}),Qp=cs(Zp),$p=ss(Xp,Qp)})),tm,nm,rm,im,am=t((()=>{L(),pf(),tm=`HttpContext`,nm=(()=>({name:tm,setupOnce(){},preprocessEvent(e){if(!B.navigator&&!B.location&&!B.document)return;let t=e.request&&e.request.url||B.location&&B.location.href,{referrer:n}=B.document||{},{userAgent:r}=B.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};e.request={...e.request,...t&&{url:t},headers:i}}})),rm=cs(nm),im=ss(tm,rm)})),om,sm,cm,lm,um,dm,fm=t((()=>{L(),M(),Of(),om=`cause`,sm=5,cm=`LinkedErrors`,lm=((e={})=>{let t=e.limit||sm,n=e.key||om;return{name:cm,setupOnce(){},preprocessEvent(e,r,i){let a=i.getOptions();O(hf,a.stackParser,a.maxValueLength,n,t,e,r)}}}),um=cs(lm),dm=ss(cm,um)}));function pm(e){return function(...t){let n=t[0];return t[0]=df(n,{mechanism:{data:{function:tt(e)},handled:!1,type:`instrument`}}),e.apply(this,t)}}function mm(e){return function(t){return e.apply(this,[df(t,{mechanism:{data:{function:`requestAnimationFrame`,handler:tt(e)},handled:!1,type:`instrument`}})])}}function hm(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&ze(n,e,function(t){let n={mechanism:{data:{function:e,handler:tt(t)},handled:!1,type:`instrument`}},r=He(t);return r&&(n.mechanism.data.handler=tt(r)),df(t,n)})}),e.apply(this,t)}}function gm(e){let t=B,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty(`addEventListener`)||(ze(n,`addEventListener`,function(t){return function(n,r,i){try{typeof r.handleEvent==`function`&&(r.handleEvent=df(r.handleEvent,{mechanism:{data:{function:`handleEvent`,handler:tt(r),target:e},handled:!1,type:`instrument`}}))}catch{}return t.apply(this,[n,df(r,{mechanism:{data:{function:`addEventListener`,handler:tt(r),target:e},handled:!1,type:`instrument`}}),i])}}),ze(n,`removeEventListener`,function(e){return function(t,n,r){let i=n;try{let n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch{}return e.call(this,t,i,r)}}))}var _m,vm,ym,bm,xm,Sm=t((()=>{L(),M(),pf(),_m=`EventTarget.Window.Node.ApplicationCache.AudioTrackList.BroadcastChannel.ChannelMergerNode.CryptoOperation.EventSource.FileReader.HTMLUnknownElement.IDBDatabase.IDBRequest.IDBTransaction.KeyOperation.MediaController.MessagePort.ModalWindow.Notification.SVGElementInstance.Screen.SharedWorker.TextTrack.TextTrackCue.TextTrackList.WebSocket.WebSocketWorker.Worker.XMLHttpRequest.XMLHttpRequestEventTarget.XMLHttpRequestUpload`.split(`.`),vm=`TryCatch`,ym=((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:vm,setupOnce(){t.setTimeout&&ze(B,`setTimeout`,pm),t.setInterval&&ze(B,`setInterval`,pm),t.requestAnimationFrame&&ze(B,`requestAnimationFrame`,mm),t.XMLHttpRequest&&`XMLHttpRequest`in B&&ze(XMLHttpRequest.prototype,`send`,hm);let e=t.eventTarget;e&&(Array.isArray(e)?e:_m).forEach(gm)}}}),bm=cs(ym),xm=ss(vm,bm)}));function Cm(e){return[...Am]}function wm(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Cm()),e.release===void 0&&(typeof __SENTRY_RELEASE__==`string`&&(e.release=__SENTRY_RELEASE__),B.SENTRY_RELEASE&&B.SENTRY_RELEASE.id&&(e.release=B.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0),Vs(Mf,{...e,stackParser:$e(e.stackParser||mp),integrations:ts(e),transport:e.transport||(It()?Rf:Bf)}),e.autoSessionTracking&&Om()}function Tm(){}function Em(e){e()}function Dm(e){return df(e)()}function Om(){if(B.document===void 0){V&&A.warn(`Session tracking in non-browser environment with @sentry/browser is not supported.`);return}Yi({ignoreDuration:!0}),Qi(),on(({from:e,to:t})=>{e!==void 0&&e!==t&&(Yi({ignoreDuration:!0}),Qi())})}function km(e){let t=F();t&&t.captureUserFeedback(e)}var Am,jm,Mm=t((()=>{L(),M(),Nf(),mf(),pf(),kp(),Vp(),em(),am(),fm(),Sm(),gp(),zf(),Hf(),Am=[Uc(),Xc(),bm(),Dp(),Qp(),um(),zp(),rm()],jm=(e={},t=I())=>{if(!B.document){V&&A.error(`Global document not defined in showReportDialog call`);return}let{client:n,scope:r}=t.getStackTop(),i=e.dsn||n&&n.getDsn();if(!i){V&&A.error(`DSN not configured for showReportDialog call`);return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||=t.lastEventId();let a=B.document.createElement(`script`);a.async=!0,a.crossOrigin=`anonymous`,a.src=Zo(i,e),e.onLoad&&(a.onload=e.onLoad);let{onClose:o}=e;if(o){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{o()}finally{B.removeEventListener(`message`,e)}};B.addEventListener(`message`,e)}let s=B.document.head||B.document.body;s?s.appendChild(a):V&&A.error(`Not injecting report dialog. No injection point found in HTML`)}})),Nm=r({Breadcrumbs:()=>Op,Dedupe:()=>Bp,GlobalHandlers:()=>$p,HttpContext:()=>im,LinkedErrors:()=>dm,TryCatch:()=>xm}),Pm=t((()=>{em(),Sm(),kp(),fm(),am(),Vp()}));function Fm(e,t){return e??t()}function Im(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}function Lm(e){return e.nodeType===e.ELEMENT_NODE}function Rm(e){return Im([Im([e,`optionalAccess`,e=>e.host]),`optionalAccess`,e=>e.shadowRoot])===e}function zm(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function Bm(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(` background-clip: text;`,` -webkit-background-clip: text; background-clip: text;`)),e}function Vm(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function Hm(e){try{let t=e.rules||e.cssRules;return t?Bm(Array.from(t,Um).join(``)):null}catch{return null}}function Um(e){let t;if(Gm(e))try{t=Hm(e.styleSheet)||Vm(e)}catch{}else if(Km(e)&&e.selectorText.includes(`:`))return Wm(e.cssText);return t||e.cssText}function Wm(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function Gm(e){return`styleSheet`in e}function Km(e){return`selectorText`in e}function qm(){return new My}function Jm({maskInputOptions:e,tagName:t,type:n}){return t===`OPTION`&&(t=`SELECT`),!!(e[t.toLowerCase()]||n&&e[n]||n===`password`||t===`INPUT`&&!n&&e.text)}function Ym({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function Xm(e){return e.toLowerCase()}function Zm(e){return e.toUpperCase()}function Qm(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=Ny in i?i[Ny]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function $m(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?Xm(t):null}function eh(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}function th(){return Py++}function nh(e){if(e instanceof HTMLFormElement)return`form`;let t=Xm(e.tagName);return Fy.test(t)?`div`:t}function rh(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}function ih(e,t){return(e||``).replace(zy,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(By.test(s)||Vy.test(s)||Hy.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${rh(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}function ah(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(Wy),!(n>=t.length);){let a=r(Uy);if(a.slice(-1)===`,`)a=oh(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=oh(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}else if(o)e===`)`&&(o=!1);else if(e===`,`){n+=1,i.push((a+r).trim());break}else e===`(`&&(o=!0);r+=e,n+=1}}}return i.join(`, `)}function oh(e,t){if(!t||t.trim()===``)return t;let n=e.createElement(`a`);return n.href=t,n.href}function sh(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function ch(){let e=document.createElement(`a`);return e.href=``,e.href}function lh(e,t,n,r,i,a){return r&&(n===`src`||n===`href`&&!(t===`use`&&r[0]===`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`)?oh(e,r):n===`srcset`?ah(e,r):n===`style`?ih(r,ch()):t===`object`&&n===`data`?oh(e,r):typeof a==`function`?a(n,r,i):r)}function uh(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function dh(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function fh(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function ph(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ph(e.parentNode,t,n,r+1)}function mh(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(fh(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function hh(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;if(a){if(c=ph(o,mh(r,i)),c<0)return!0;s=ph(o,mh(t,n),c>=0?c:1/0)}else{if(s=ph(o,mh(t,n)),s<0)return!1;c=ph(o,mh(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function gh(e,t,n){let r=e.contentWindow;if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=setTimeout(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return setTimeout(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function _h(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(a),r=!0,t()})}function vh(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1}=t,S=yh(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:jy.Document,childNodes:[]}:{type:jy.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:jy.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return xh(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:S,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return bh(e,{maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:S});case e.CDATA_SECTION_NODE:return{type:jy.CDATA,textContent:``,rootId:S};case e.COMMENT_NODE:return{type:jy.Comment,textContent:e.textContent||``,rootId:S};default:return!1}}function yh(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function bh(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`?!0:void 0,m=d===`SCRIPT`?!0:void 0,h=d===`TEXTAREA`?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||Im([e,`access`,e=>e.parentNode,`access`,e=>e.sheet,`optionalAccess`,e=>e.cssRules])&&(f=Hm(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=ih(f,ch())}m&&(f=`SCRIPT_PLACEHOLDER`);let g=hh(e,r,a,i,o,n);return!p&&!m&&!h&&f&&g&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||g)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=Ym({isMasked:hh(e,r,a,i,o,Jm({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:jy.Text,textContent:f||``,isStyle:p,rootId:u}}function xh(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskAllText:g,maskTextClass:_,unmaskTextClass:v,maskTextSelector:y,unmaskTextSelector:b}=t,x=dh(e,r,i,a),S=nh(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!uh(S,r.name,r.value)&&(C[r.name]=lh(n,S,Xm(r.name),r.value,e,c))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=Hm(t)),r&&(delete C.rel,delete C.href,C._cssText=ih(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=Hm(e.sheet);t&&(C._cssText=ih(t,ch()))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=$m(t),r=eh(t,Zm(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&r){let e=hh(t,_,y,v,b,Jm({type:n,tagName:Zm(S),maskInputOptions:s}));C.value=Ym({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f){if(e.__context===`2d`)Qm(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),n=document.createElement(`canvas`);n.width=e.width,n.height=e.height,t!==n.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}if(S===`img`&&d){Ly||(Ly=n.createElement(`canvas`),Ry=Ly.getContext(`2d`));let t=e,r=t.crossOrigin;t.crossOrigin=`anonymous`;let i=()=>{t.removeEventListener(`load`,i);try{Ly.width=t.naturalWidth,Ly.height=t.naturalHeight,Ry.drawImage(t,0,0),C.rr_dataURL=Ly.toDataURL(u.type,u.quality)}catch(e){console.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`)}r?C.crossOrigin=r:t.removeAttribute(`crossorigin`)};t.complete&&t.naturalWidth!==0?i():t.addEventListener(`load`,i)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(e.contentDocument||(C.rr_src=C.src),delete C.src);let T;try{customElements.get(S)&&(T=!0)}catch{}return{type:jy.Element,tagName:S,attributes:C,childNodes:[],isSVG:sh(e)||void 0,needBlock:x,rootId:h,isCustom:T}}function H(e){return e==null?``:e.toLowerCase()}function Sh(e,t){return!!(t.comment&&e.type===jy.Comment||e.type===jy.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`||e.attributes.rel===`modulepreload`)&&e.attributes.as===`script`||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&e.attributes.href.endsWith(`.js`))||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||H(e.attributes.name)===`application-name`||H(e.attributes.rel)===`icon`||H(e.attributes.rel)===`apple-touch-icon`||H(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||H(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(H(e.attributes.name)===`robots`||H(e.attributes.name)===`googlebot`||H(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(H(e.attributes.name)===`author`||H(e.attributes.name)===`generator`||H(e.attributes.name)===`framework`||H(e.attributes.name)===`publisher`||H(e.attributes.name)===`progid`||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(H(e.attributes.name)===`google-site-verification`||H(e.attributes.name)===`yandex-verification`||H(e.attributes.name)===`csrf-token`||H(e.attributes.name)===`p:domain_verify`||H(e.attributes.name)===`verify-v1`||H(e.attributes.name)===`verification`||H(e.attributes.name)===`shopify-checkout-api-token`))))}function Ch(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:ee=()=>!1,newlyAddedElement:te=!1}=t,{preserveWhiteSpace:ne=!0}=t,D=vh(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:ee,newlyAddedElement:te});if(!D)return console.warn(e,`not serialized`),null;let re;re=r.hasNode(e)?r.getId(e):Sh(D,v)||!ne&&D.type===jy.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,``).length?Iy:th();let O=Object.assign(D,{id:re});if(r.add(e,O),re===Iy)return null;S&&S(e);let ie=!f;if(O.type===jy.Element){ie&&=!O.needBlock,delete O.needBlock;let t=e.shadowRoot;t&&zm(t)&&(O.isShadowHost=!0)}if((O.type===jy.Document||O.type===jy.Element)&&ie){v.headWhitespace&&O.type===jy.Element&&O.tagName===`head`&&(ne=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ne,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:ee};for(let n of Array.from(e.childNodes)){let e=Ch(n,t);e&&O.childNodes.push(e)}if(Lm(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=Ch(n,t);r&&(zm(e.shadowRoot)&&(r.isShadow=!0),O.childNodes.push(r))}}return e.parentNode&&Rm(e.parentNode)&&zm(e.parentNode)&&(O.isShadow=!0),O.type===jy.Element&&O.tagName===`iframe`&&gh(e,()=>{let t=e.contentDocument;if(t&&C){let n=Ch(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ne,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:ee});n&&C(e,n)}},w),O.type===jy.Element&&O.tagName===`link`&&O.attributes.rel===`stylesheet`&&_h(e,()=>{if(T){let t=Ch(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ne,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:ee});t&&T(e,t)}},E),O}function wh(e,t){let{mirror:n=new My,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:w,stylesheetLoadTimeout:T,keepIframeSrcFn:E=()=>!1}=t||{};return Ch(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,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:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:w,stylesheetLoadTimeout:T,keepIframeSrcFn:E,newlyAddedElement:!1})}function Th(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}function Eh(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function Dh(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(Xh(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=Yh(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function Oh(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){Yh(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>Oh(e,t,a||{},!0)}function kh(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}function Ah(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?Th([t,`optionalAccess`,e=>e.documentElement,`access`,e=>e.scrollLeft])||Th([t,`optionalAccess`,e=>e.body,`optionalAccess`,e=>e.parentElement,`optionalAccess`,e=>e.scrollLeft])||Th([t,`optionalAccess`,e=>e.body,`optionalAccess`,e=>e.scrollLeft])||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?Th([t,`optionalAccess`,e=>e.documentElement,`access`,e=>e.scrollTop])||Th([t,`optionalAccess`,e=>e.body,`optionalAccess`,e=>e.parentElement,`optionalAccess`,e=>e.scrollTop])||Th([t,`optionalAccess`,e=>e.body,`optionalAccess`,e=>e.scrollTop])||0:e.pageYOffset}}function jh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Mh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Nh(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Ph(e,t,n,r,i){if(!e)return!1;let a=Nh(e);if(!a)return!1;let o=mh(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=ph(a,o),c=-1;return s<0?!1:(r&&(c=ph(a,mh(null,r))),s>-1&&c<0?!0:s<c)}function Fh(e,t){return t.getId(e)!==-1}function Ih(e,t){return t.getId(e)===Iy}function Lh(e,t){if(Rm(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Lh(e.parentNode,t):!0:!0}function Rh(e){return!!e.changedTouches}function zh(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function Bh(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function Vh(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function Hh(e){return!!Th([e,`optionalAccess`,e=>e.shadowRoot])}function Uh(e){let t=null;return Th([e,`access`,e=>e.getRootNode,`optionalCall`,e=>e(),`optionalAccess`,e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Wh(e){let t=e,n;for(;n=Uh(t);)t=n;return t}function Gh(e){let t=e.ownerDocument;if(!t)return!1;let n=Wh(e);return t.contains(n)}function Kh(e){let t=e.ownerDocument;return t?t.contains(e)||Gh(e):!1}function qh(e){let t=Yy[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return Yy[e]=r.bind(window)}function Jh(...e){return qh(`requestAnimationFrame`)(...e)}function Yh(...e){return qh(`setTimeout`)(...e)}function Xh(...e){return qh(`clearTimeout`)(...e)}function Zh(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}function Qh(e){return`__ln`in e}function $h(e,t){e.delete(t),t.childNodes.forEach(t=>$h(e,t))}function eg(e,t,n){return e.length===0?!1:tg(e,t,n)}function tg(e,t,n){let{parentNode:r}=t;if(!r)return!1;let i=n.getId(r);return e.some(e=>e.id===i)?!0:tg(e,r,n)}function ng(e,t){return e.size===0?!1:rg(e,t)}function rg(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:rg(e,n):!1}function ig(e){tb=e}function ag(){tb=void 0}function og(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}function sg(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function cg(e,t){let n=new eb;nb.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=og([window,`optionalAccess`,e=>e.Zone,`optionalAccess`,e=>e.__symbol__,`optionalCall`,e=>e(`MutationObserver`)]);i&&window[i]&&(r=window[i]);let a=new r(K(t=>{e.onMutation&&e.onMutation(t)===!1||n.processMutations.bind(n)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function lg({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=Dh(K(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=K(Dh(K(e=>{let t=sg(e),{clientX:n,clientY:i}=Rh(e)?e.changedTouches[0]:e;s||=qy(),o.push({x:n,y:i,id:r.getId(t),timeOffset:qy()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?G.Drag:e instanceof MouseEvent?G.MouseMove:G.TouchMove)}),i,{trailing:!1})),u=[Eh(`mousemove`,l,n),Eh(`touchmove`,l,n),Eh(`drag`,l,n)];return K(()=>{u.forEach(e=>e())})}function ug({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=sg(o);if(Ph(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=Zy.Mouse;break;case`touch`:c=Zy.Touch;break;case`pen`:c=Zy.Pen;break}c===Zy.Touch?Xy[t]===Xy.MouseDown?u=`TouchStart`:Xy[t]===Xy.MouseUp&&(u=`TouchEnd`):Zy.Pen}else Rh(o)&&(c=Zy.Touch);c===null?Xy[t]===Xy.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===Zy.Touch||u.startsWith(`Mouse`)&&c===Zy.Mouse)&&(c=null));let d=Rh(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;K(e)({type:Xy[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(Xy).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=Xm(e),r=u(e);if(window.PointerEvent)switch(Xy[e]){case Xy.MouseDown:case Xy.MouseUp:n=n.replace(`mouse`,`pointer`);break;case Xy.TouchStart:case Xy.TouchEnd:return}c.push(Eh(n,r,t))}),K(()=>{c.forEach(e=>e())})}function dg({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return Eh(`scroll`,K(Dh(K(o=>{let s=sg(o);if(!s||Ph(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=Ah(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function fg({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Eh(`resize`,K(Dh(K(()=>{let t=jh(),i=Mh();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}function pg({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=sg(e),u=e.isTrusted,g=n&&Zm(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||rb.indexOf(g)<0||Ph(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=$m(n),b=eh(v,g,y),x=!1,S=Jm({maskInputOptions:c,tagName:g,type:y}),C=hh(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=Ym({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=Ym({isMasked:C,element:e,value:eh(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=ib.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){ib.set(t,r);let i=n.getId(t);K(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>Eh(e,K(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>Oh(e[0],e[1],{set(){K(g)({target:this,isTrusted:!1})}},!1,y))),K(()=>{v.forEach(e=>e())})}function mg(e){let t=[];function n(e,t){if(wg(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||wg(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||wg(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||wg(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function hg(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function gg({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:K((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=hg(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:K((r,i,a)=>{let[o]=a,{id:s,styleId:c}=hg(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:K((r,i,a)=>{let[o]=a,{id:s,styleId:c}=hg(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:K((r,i,a)=>{let[o]=a,{id:s,styleId:c}=hg(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};Tg(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(Tg(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),Tg(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),Tg(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:K((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=hg(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...mg(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:K((r,i,a)=>{let[o]=a,{id:s,styleId:c}=hg(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...mg(i),o]}]}),r.apply(i,a)})})}),K(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function _g({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let i=n.nodeName===`#document`?og([n,`access`,e=>e.defaultView,`optionalAccess`,e=>e.Document]):og([n,`access`,e=>e.ownerDocument,`optionalAccess`,e=>e.defaultView,`optionalAccess`,e=>e.ShadowRoot]),a=og([i,`optionalAccess`,e=>e.prototype])?Object.getOwnPropertyDescriptor(og([i,`optionalAccess`,e=>e.prototype]),`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,`adoptedStyleSheets`,{configurable:a.configurable,enumerable:a.enumerable,get(){return og([a,`access`,e=>e.get,`optionalAccess`,e=>e.call,`call`,e=>e(this)])},set(e){let n=og([a,`access`,e=>e.set,`optionalAccess`,e=>e.call,`call`,t=>t(this,e)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),K(()=>{Object.defineProperty(n,`adoptedStyleSheets`,{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function vg({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:K((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=hg(og([o,`access`,e=>e.parentRule,`optionalAccess`,e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:mg(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:K((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=hg(og([a,`access`,e=>e.parentRule,`optionalAccess`,e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:mg(a.parentRule)}),i.apply(a,s)})}),K(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function yg({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=K(o=>Dh(K(a=>{let s=sg(a);if(!s||Ph(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[Eh(`play`,s(0),o),Eh(`pause`,s(1),o),Eh(`seeked`,s(2),o),Eh(`volumechange`,s(3),o),Eh(`ratechange`,s(4),o)];return K(()=>{c.forEach(e=>e())})}function bg({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=kh(t.fonts,`add`,function(t){return function(n){return Yh(K(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),K(()=>{r.forEach(e=>e())})}function xg(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=K(()=>{let e=t.getSelection();if(!e||s&&og([e,`optionalAccess`,e=>e.isCollapsed]))return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);Ph(o,r,i,a,!0)||Ph(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),Eh(`selectionchange`,c)}function Sg({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:kh(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function Cg(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r=cg(e,e.doc),i=lg(e),a=ug(e),o=dg(e),s=fg(e,{win:n}),c=pg(e),l=yg(e),u=gg(e,{win:n}),d=_g(e,e.doc),f=vg(e,{win:n}),p=e.collectFonts?bg(e):()=>{},m=xg(e),h=Sg(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return K(()=>{nb.forEach(e=>e.reset()),r.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function wg(e){return window[e]!==void 0}function Tg(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}function Eg(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}function Dg(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:T,recordCanvas:E=!1,recordCrossOriginIframes:ee=!1,recordAfter:te=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ne=!1,collectFonts:D=!1,inlineImages:re=!1,plugins:O,keepIframeSrcFn:ie=()=>!1,ignoreCSSAttributes:ae=new Set([]),errorHandler:oe,onMutation:se,getCanvasManager:ce}=e;ig(oe);let le=ee?window.parent===window:!0,ue=!1;if(!le)try{window.parent.document&&(ue=!1)}catch{ue=!0}if(le&&!t)throw Error(`emit function is required`);T!==void 0&&C.mousemove===void 0&&(C.mousemove=T),hb.reset();let de=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,k=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};zh();let fe,pe=0,me=e=>{for(let t of O||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!ue&&(e=S(e)),e};pb=(e,i)=>{let a=e;if(a.timestamp=qy(),Yr([nb,`access`,e=>e[0],`optionalAccess`,e=>e.isFrozen,`call`,e=>e()])&&a.type!==W.FullSnapshot&&!(a.type===W.IncrementalSnapshot&&a.data.source===G.Mutation)&&nb.forEach(e=>e.unfreeze()),le)Yr([t,`optionalCall`,e=>e(me(a),i)]);else if(ue){let e={type:`rrweb`,event:me(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===W.FullSnapshot)fe=a,pe=0;else if(a.type===W.IncrementalSnapshot){if(a.data.source===G.Mutation&&a.data.isAttachIframe)return;pe++;let e=r&&pe>=r,t=n&&fe&&a.timestamp-fe.timestamp>n;(e||t)&&Ce(!0)}};let he=e=>{pb({type:W.IncrementalSnapshot,data:{source:G.Mutation,...e}})},ge=e=>pb({type:W.IncrementalSnapshot,data:{source:G.Scroll,...e}}),_e=e=>pb({type:W.IncrementalSnapshot,data:{source:G.CanvasMutation,...e}}),ve=new db({mutationCb:he,adoptedStyleSheetCb:e=>pb({type:W.IncrementalSnapshot,data:{source:G.AdoptedStyleSheet,...e}})}),ye=typeof __RRWEB_EXCLUDE_IFRAME__==`boolean`&&__RRWEB_EXCLUDE_IFRAME__?new ob:new sb({mirror:hb,mutationCb:he,stylesheetManager:ve,recordCrossOriginIframes:ee,wrappedEmit:pb});for(let e of O||[])e.getMirror&&e.getMirror({nodeMirror:hb,crossOriginIframeMirror:ye.crossOriginIframeMirror,crossOriginIframeStyleMirror:ye.crossOriginIframeStyleMirror});let be=new fb,xe=kg(ce,{mirror:hb,win:window,mutationCb:e=>pb({type:W.IncrementalSnapshot,data:{source:G.CanvasMutation,...e}}),recordCanvas:E,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:oe}),Se=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==`boolean`&&__RRWEB_EXCLUDE_SHADOW_DOM__?new cb:new lb({mutationCb:he,scrollCb:ge,bypassOptions:{onMutation:se,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:de,dataURLOptions:w,maskAttributeFn:v,maskTextFn:b,maskInputFn:y,recordCanvas:E,inlineImages:re,sampling:C,slimDOMOptions:k,iframeManager:ye,stylesheetManager:ve,canvasManager:xe,keepIframeSrcFn:ie,processedNodeManager:be},mirror:hb}),Ce=(e=!1)=>{pb({type:W.Meta,data:{href:window.location.href,width:Mh(),height:jh()}},e),ve.reset(),Se.init(),nb.forEach(e=>e.lock());let t=wh(document,{mirror:hb,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:de,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:k,dataURLOptions:w,recordCanvas:E,inlineImages:re,onSerialize:e=>{Bh(e,hb)&&ye.addIframe(e),Vh(e,hb)&&ve.trackLinkElement(e),Hh(e)&&Se.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{ye.attachIframe(e,t),Se.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{ve.attachLinkElement(e,t)},keepIframeSrcFn:ie});if(!t)return console.warn(`Failed to snapshot the document`);pb({type:W.FullSnapshot,data:{node:t,initialOffset:Ah(window)}}),nb.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,hb.getId(document))};mb=Ce;try{let e=[],t=e=>K(Cg)({onMutation:se,mutationCb:he,mousemoveCb:(e,t)=>pb({type:W.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>pb({type:W.IncrementalSnapshot,data:{source:G.MouseInteraction,...e}}),scrollCb:ge,viewportResizeCb:e=>pb({type:W.IncrementalSnapshot,data:{source:G.ViewportResize,...e}}),inputCb:e=>pb({type:W.IncrementalSnapshot,data:{source:G.Input,...e}}),mediaInteractionCb:e=>pb({type:W.IncrementalSnapshot,data:{source:G.MediaInteraction,...e}}),styleSheetRuleCb:e=>pb({type:W.IncrementalSnapshot,data:{source:G.StyleSheetRule,...e}}),styleDeclarationCb:e=>pb({type:W.IncrementalSnapshot,data:{source:G.StyleDeclaration,...e}}),canvasMutationCb:_e,fontCb:e=>pb({type:W.IncrementalSnapshot,data:{source:G.Font,...e}}),selectionCb:e=>{pb({type:W.IncrementalSnapshot,data:{source:G.Selection,...e}})},customElementCb:e=>{pb({type:W.IncrementalSnapshot,data:{source:G.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:de,inlineStylesheet:m,sampling:C,recordCanvas:E,inlineImages:re,userTriggeredOnInput:ne,collectFonts:D,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:ie,blockSelector:a,unblockSelector:o,slimDOMOptions:k,dataURLOptions:w,mirror:hb,iframeManager:ye,stylesheetManager:ve,shadowDomManager:Se,processedNodeManager:be,canvasManager:xe,ignoreCSSAttributes:ae,plugins:Yr([O,`optionalAccess`,e=>e.filter,`call`,e=>e(e=>e.observer),`optionalAccess`,e=>e.map,`call`,e=>e(e=>({observer:e.observer,options:e.options,callback:t=>pb({type:W.Plugin,data:{plugin:e.name,payload:t}})}))])||[]},{});ye.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{Ce(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(Eh(`DOMContentLoaded`,()=>{pb({type:W.DomContentLoaded,data:{}}),te===`DOMContentLoaded`&&n()})),e.push(Eh(`load`,()=>{pb({type:W.Load,data:{}}),te===`load`&&n()},window))),()=>{e.forEach(e=>e()),be.destroy(),mb=void 0,ag()}}catch(e){console.warn(e)}}function Og(e){if(!mb)throw Error(`please take full snapshot after start recording`);mb(e)}function kg(e,t){try{return e?e(t):new ub}catch{return console.warn(`Unable to initialize CanvasManager`),new ub}}function Ag(e){return e>9999999999?e:e*1e3}function jg(e){return e>9999999999?e/1e3:e}function Mg(e,t){t.category!==`sentry.transaction`&&([`ui.click`,`ui.input`].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:W.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:`breadcrumb`,payload:Dn(t,10,1e3)}}),t.category===`console`)))}function Ng(e){return e.closest(vb)||e}function Pg(e){let t=Fg(e);return!t||!(t instanceof Element)?t:Ng(t)}function Fg(e){return Ig(e)?e.target:e}function Ig(e){return typeof e==`object`&&!!e&&`target`in e}function Lg(e){return yb||(yb=[],Rg()),yb.push(e),()=>{let t=yb?yb.indexOf(e):-1;t>-1&&yb.splice(t,1)}}function Rg(){ze(U,`open`,function(e){return function(...t){if(yb)try{yb.forEach(e=>e())}catch{}return e.apply(U,t)}})}function zg(e,t,n){e.handleClick(t,n)}function Bg(e,t){return!!(!xb.includes(e.tagName)||e.tagName===`INPUT`&&![`submit`,`button`].includes(e.getAttribute(`type`)||``)||e.tagName===`A`&&(e.hasAttribute(`download`)||e.hasAttribute(`target`)&&e.getAttribute(`target`)!==`_self`)||t&&e.matches(t))}function Vg(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function Hg(){return Date.now()/1e3}function Ug(e,t){try{if(!Wg(t))return;let{source:n}=t.data;if(n===G.Mutation&&e.registerMutation(t.timestamp),n===G.Scroll&&e.registerScroll(t.timestamp),Gg(t)){let{type:n,id:r}=t.data,i=Dg.mirror.getNode(r);i instanceof HTMLElement&&n===Xy.Click&&e.registerClick(i)}}catch{}}function Wg(e){return e.type===gb}function Gg(e){return e.data.source===G.MouseInteraction}function Kg(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}function qg(e){let t={};for(let n in e)if(Cb.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return t}function Jg(e,t){let n=Dg.mirror.getId(e),r=n&&Dg.mirror.getNode(n),i=r&&Dg.mirror.getMeta(r),a=i&&Zg(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===Sb.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:qg(a.attributes)}}:{}}}function Yg(e){let{target:t,message:n}=Xg(e);return Kg({category:`ui.${e.name}`,...Jg(t,n)})}function Xg(e){let t=e.name===`click`,n,r=null;try{r=t?Pg(e.event):Fg(e.event),n=pe(r,{maxStringLength:200})||`<unknown>`}catch{n=`<unknown>`}return{target:r,message:n}}function Zg(e){return e.type===Sb.Element}function Qg(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=$g(t);n&&Mg(e,n)}function $g(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a,target:o}=e;if(!o||e_(o)||!a)return null;let s=t||r||i,c=a.length===1;if(!s&&c)return null;let l=pe(o,{maxStringLength:200})||`<unknown>`;return Kg({category:`ui.keyDown`,message:l,data:{...Jg(o,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a}})}function e_(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}function t_(e){return e.map(n_).filter(Boolean)}function n_(e){return Tb[e.entryType]?Tb[e.entryType](e):null}function r_(e){return((or||U.performance.timeOrigin)+e)/1e3}function i_(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=r_(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function a_(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:r_(p),end:r_(a),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function o_(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:r_(a),end:r_(i),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function s_(e){let t=e.entries,n=t[t.length-1],r=n?n.element:void 0,i=e.value,a=r_(i);return{type:`largest-contentful-paint`,name:`largest-contentful-paint`,start:a,end:a,data:{value:i,size:i,nodeId:r?Dg.mirror.getId(r):void 0}}}function c_(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(wu(e,n))}),r.push(bu(({metric:t})=>{e.replayPerformanceEntries.push(s_(t))})),()=>{r.forEach(e=>e())}}function l_(){let e=new Blob([Eb]);return URL.createObjectURL(e)}function u_(e,t){q&&(A.info(e),t&&f_(e))}function d_(e,t){q&&(A.info(e),t&&setTimeout(()=>{f_(e)},0))}function f_(e){Ni({category:`console`,data:{logger:`replay`},level:`info`,message:e},{level:`info`})}function p_({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=m_(t);if(e)return e}return u_(`[Replay] Using simple buffer`),new Ob}function m_(e){try{let t=e||h_();return t?(u_(`[Replay] Using compression worker${e?` from ${e}`:``}`),new jb(new Worker(t))):void 0}catch{u_(`[Replay] Failed to create compression worker`)}}function h_(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?l_():``}function g_(){try{return`sessionStorage`in U&&!!U.sessionStorage}catch{return!1}}function __(e){v_(),e.session=void 0}function v_(){if(g_())try{U.sessionStorage.removeItem(py)}catch{}}function y_(e){return e===void 0?!1:Math.random()<e}function b_(e){let t=Date.now();return{id:e.id||j(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function x_(e){if(g_())try{U.sessionStorage.setItem(py,JSON.stringify(e))}catch{}}function S_(e,t){return y_(e)?`session`:t?`buffer`:!1}function C_({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=b_({sampled:S_(e,t),previousSessionId:r});return n&&x_(i),i}function w_(e){if(!g_())return null;try{let t=U.sessionStorage.getItem(py);if(!t)return null;let n=JSON.parse(t);return d_(`[Replay] Loading existing session`,e),b_(n)}catch{return null}}function T_(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function E_(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return T_(e.started,t,r)||T_(e.lastActivity,n,r)}function D_(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!E_(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function O_({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},i){let a=i.stickySession&&w_(e);return a?D_(a,{sessionIdleExpire:t,maxReplayDuration:n})?(d_(`[Replay] Session in sessionStorage is expired, creating new one...`),C_(i,{previousSessionId:a.id})):a:(d_(`[Replay] Creating new session`,e),C_(i,{previousSessionId:r}))}function k_(e){return e.type===W.Custom}function A_(e,t,n){return N_(e,t)?(M_(e,t,n),!0):!1}function j_(e,t,n){return N_(e,t)?M_(e,t,n):Promise.resolve(null)}async function M_(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode===`buffer`&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);let r=P_(t,e.getOptions().beforeAddRecordingEvent);return r?await e.eventBuffer.addEvent(r):void 0}catch(t){let n=t&&t instanceof Db?`addEventSizeExceeded`:`addEvent`;q&&A.error(t),await e.stop({reason:n});let r=F();r&&r.recordDroppedEvent(`internal_sdk_error`,`replay`)}}function N_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=Ag(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(u_(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function P_(e,t){try{if(typeof t==`function`&&k_(e))return t(e)}catch(e){return q&&A.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",e),null}return e}function F_(e){return!e.type}function I_(e){return e.type===`transaction`}function L_(e){return e.type===`replay_event`}function R_(e){return e.type===`feedback`}function z_(e){let t=H_();return(n,r)=>{if(!e.isEnabled()||!F_(n)&&!I_(n))return;let i=r&&r.statusCode;if(!(t&&(!i||i<200||i>=300))){if(I_(n)){B_(e,n);return}V_(e,n)}}}function B_(e,t){let n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function V_(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r==`function`&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function H_(){let e=F();if(!e)return!1;let t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function U_(e){return t=>{!e.isEnabled()||!F_(t)||W_(e,t)}}function W_(e,t){let n=t.exception&&t.exception.values&&t.exception.values[0].value;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))&&Mg(e,Kg({category:`replay.hydrate-error`}))}function G_(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function K_(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:W.Custom,timestamp:t.timestamp*1e3,data:{tag:`breadcrumb`,payload:{timestamp:t.timestamp,type:`default`,category:`sentry.feedback`,data:{feedbackId:t.event_id}}}}),!1):!0)}function q_(e,t){return e.recordingMode!==`buffer`||t.message===hy||!t.exception||t.type?!1:y_(e.getOptions().errorSampleRate)}function J_(e,t=!1){let n=t?z_(e):void 0;return Object.assign((t,r)=>e.isEnabled()?L_(t)?(delete t.breadcrumbs,t):!F_(t)&&!I_(t)&&!R_(t)||!e.checkAndHandleExpiredSession()?t:R_(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),K_(e,t),t):G_(t,r)&&!e.getOptions()._experiments.captureExceptions?(q&&A.log(`[Replay] Ignoring error from rrweb internals`,t),null):((q_(e,t)||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&n(t,{statusCode:200}),t):t,{id:`Replay`})}function Y_(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:W.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function X_(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function Z_(e){return t=>{if(!e.isEnabled())return;let n=X_(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Y_(e,[n]),!1)))}}function Q_(e,t){return q&&e.getOptions()._experiments.traceInternals?!1:sc(t,F())}function $_(e,t){e.isEnabled()&&t!==null&&(Q_(e,t.name)||e.addUpdate(()=>(Y_(e,[t]),!0)))}function ev(e){let{startTimestamp:t,endTimestamp:n,fetchData:r,response:i}=e;if(!n)return null;let{method:a,url:o}=r;return{type:`resource.fetch`,start:t/1e3,end:n/1e3,name:o,data:{method:a,statusCode:i?i.status:void 0}}}function tv(e){return t=>{e.isEnabled()&&$_(e,ev(t))}}function nv(e){let{startTimestamp:t,endTimestamp:n,xhr:r}=e,i=r[hn];if(!t||!n||!i)return null;let{method:a,url:o,status_code:s}=i;return o===void 0?null:{type:`resource.xhr`,name:o,start:t/1e3,end:n/1e3,data:{method:a,statusCode:s}}}function rv(e){return t=>{e.isEnabled()&&$_(e,nv(t))}}function iv(e,t){if(e)try{if(typeof e==`string`)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=fv(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function av(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function ov(e){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[fv(e)];if(!e)return[void 0]}catch{return q&&A.warn(`[Replay] Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return q&&A.info(`[Replay] Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function sv(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function cv(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:Je({method:a,statusCode:o,request:s,response:c})}}function lv(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function uv(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=pv(n);return r.body=i,a&&a.length>0&&(r._meta={warnings:a}),r}function dv(e,t){return Object.keys(e).reduce((n,r)=>{let i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=e[r]),n},{})}function fv(e){return new URLSearchParams(e).toString()}function pv(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>Cy,n=mv(e);if(t){let t=e.slice(0,Cy);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}…`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function mv(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function hv(e,t){return D(gv(e),t)}function gv(e,t=U.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(U.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}async function _v(e,t,n){try{let r=cv(`resource.fetch`,await yv(e,t,n));$_(n.replay,r)}catch(e){q&&A.error(`[Replay] Failed to capture fetch breadcrumb`,e)}}function vv(e,t,n){let{input:r,response:i}=t,a=iv(r?wv(r):void 0,n.textEncoder),o=i?av(i.headers.get(`content-length`)):void 0;a!==void 0&&(e.data.request_body_size=a),o!==void 0&&(e.data.response_body_size=o)}async function yv(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=hv(o,n.networkDetailAllowUrls)&&!hv(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?bv(n,t.input,l):lv(l),response:await xv(d,n,t.response,u)}}function bv({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?Ev(n,t):{};if(!e)return uv(i,r,void 0);let[a,o]=ov(wv(n)),s=uv(i,r,a);return o?sv(s,o):s}async function xv(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},i,a){if(!e&&a!==void 0)return lv(a);let o=i?Tv(i.headers,r):{};if(!i||!t&&a!==void 0)return uv(o,a,void 0);let[s,c]=await Cv(i),l=Sv(s,{networkCaptureBodies:t,textEncoder:n,responseBodySize:a,captureDetails:e,headers:o});return c?sv(l,c):l}function Sv(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:i,headers:a}){try{let o=e&&e.length&&r===void 0?iv(e,n):r;return i?t?uv(a,o,e):uv(a,o,void 0):lv(o)}catch(e){return q&&A.warn(`[Replay] Failed to serialize response body`,e),uv(a,r,void 0)}}async function Cv(e){let t=Ov(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await kv(t)]}catch(e){return q&&A.warn(`[Replay] Failed to get text body from response`,e),[void 0,`BODY_PARSE_ERROR`]}}function wv(e=[]){if(!(e.length!==2||typeof e[1]!=`object`))return e[1].body}function Tv(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function Ev(e,t){return e.length===1&&typeof e[0]!=`string`?Dv(e[0],t):e.length===2?Dv(e[1],t):{}}function Dv(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?Tv(n,t):Array.isArray(n)?{}:dv(n,t):{}}function Ov(e){try{return e.clone()}catch(e){q&&A.warn(`[Replay] Failed to clone response body`,e)}}function kv(e){return new Promise((t,n)=>{let r=setTimeout(()=>n(Error(`Timeout while trying to read response body`)),500);Av(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function Av(e){return await e.text()}async function jv(e,t,n){try{let r=cv(`resource.xhr`,Nv(e,t,n));$_(n.replay,r)}catch(e){q&&A.error(`[Replay] Failed to capture xhr breadcrumb`,e)}}function Mv(e,t,n){let{xhr:r,input:i}=t;if(!r)return;let a=iv(i,n.textEncoder),o=r.getResponseHeader(`content-length`)?av(r.getResponseHeader(`content-length`)):Lv(r.response,r.responseType,n.textEncoder);a!==void 0&&(e.data.request_body_size=a),o!==void 0&&(e.data.response_body_size=o)}function Nv(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r,input:o,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!s||!hv(c,n.networkDetailAllowUrls)||hv(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:lv(d),response:lv(f)};let p=s[hn],m=p?dv(p.request_headers,n.networkRequestHeaders):{},h=dv(Pv(s),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?ov(o):[void 0],[v,y]=n.networkCaptureBodies?Fv(s):[void 0],b=uv(m,d,g),x=uv(h,f,v);return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:_?sv(b,_):b,response:y?sv(x,y):x}}function Pv(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return e[n.toLowerCase()]=r,e},{}):{}}function Fv(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return Iv(e.response,e.responseType)}catch(e){t.push(e)}return q&&A.warn(`[Replay] Failed to get xhr response body`,...t),[void 0]}function Iv(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&e&&typeof e==`object`)return[JSON.stringify(e)];if(!e)return[void 0]}catch{return q&&A.warn(`[Replay] Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return q&&A.info(`[Replay] Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function Lv(e,t,n){try{return iv(t===`json`&&e&&typeof e==`object`?JSON.stringify(e):e,n)}catch{return}}function Rv(e){let t=F();try{let n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on?t.on(`beforeAddBreadcrumb`,(e,t)=>zv(c,e,t)):(Ht(tv(e)),dn(rv(e)))}catch{}}function zv(e,t,n){if(t.data)try{Bv(t)&&Hv(n)&&(Mv(t,n,e),jv(t,n,e)),Vv(t)&&Uv(n)&&(vv(t,n,e),_v(t,n,e))}catch{q&&A.warn(`Error when enriching network breadcrumb`)}}function Bv(e){return e.category===`xhr`}function Vv(e){return e.category===`fetch`}function Hv(e){return e&&e.xhr}function Uv(e){return e&&e.response}function Wv(e){return!!e.category}function Gv(e){let t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return Mb===t||!t||(Mb=t,!Wv(t)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(t.category)||t.category.startsWith(`ui.`))?null:t.category===`console`?Kv(t):Kg(t)}function Kv(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Kg(e);let n=!1,r=t.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>wy?(n=!0,`${e.slice(0,wy)}…`):e;if(typeof e==`object`)try{let t=Dn(e,7);return JSON.stringify(t).length>wy?(n=!0,`${JSON.stringify(t,null,2).slice(0,wy)}…`):t}catch{}return e});return Kg({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function qv(e){let t=Ji(),n=F();t.addScopeListener(Nb(e)),wt(wb(e)),on(Z_(e)),Rv(e);let r=J_(e,!Jv(n));n&&n.addEventProcessor?n.addEventProcessor(r):ks(r),Jv(n)&&(n.on(`beforeSendEvent`,U_(e)),n.on(`afterSendEvent`,z_(e)),n.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),n.on(`startTransaction`,t=>{e.lastTransaction=t}),n.on(`finishTransaction`,t=>{e.lastTransaction=t}),n.on(`beforeSendFeedback`,(t,n)=>{let r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)}))}function Jv(e){return!!(e&&e.on)}async function Yv(e){try{return Promise.all(Y_(e,[Xv(U.performance.memory)]))}catch{return[]}}function Xv(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:`memory`,name:`memory`,start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Zv(e,t,n){let r,i,a,o=n&&n.maxWait?Math.max(n.maxWait,t):0;function s(){return c(),r=e(),r}function c(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function l(){return i!==void 0||a!==void 0?s():r}function u(){return i&&clearTimeout(i),i=setTimeout(s,t),o&&a===void 0&&(a=setTimeout(s,o)),r}return u.cancel=c,u.flush=l,u}function Qv(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){q&&A.warn(`[Replay] Received replay event after session expired.`);return}let i=r||!t;t=!0,e.clickDetector&&Ug(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!A_(e,n,i))return!0;if(!i)return!1;if(ey(e,i),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode===`buffer`&&e.session&&e.eventBuffer){let t=e.eventBuffer.getEarliestTimestamp();t&&(u_(`[Replay] Updating session start time to earliest event in buffer to ${new Date(t)}`,e.getOptions()._experiments.traceInternals),e.session.started=t,e.getOptions().stickySession&&x_(e.session))}return e.recordingMode===`session`&&e.flush(),!0})}}function $v(e){let t=e.getOptions();return{type:W.Custom,timestamp:Date.now(),data:{tag:`options`,payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type===`worker`:!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function ey(e,t){!t||!e.session||e.session.segmentId!==0||A_(e,$v(e),!1)}function ty(e,t,n,r){return Sr(Nr(e,Mr(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function ny({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
`;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function ry({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:typeof e._integrations==`object`&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit&&e.emit(`preprocessEvent`,r,i);let a=await gi(e.getOptions(),r,i,t,e,wa());if(!a)return null;a.platform=a.platform||`javascript`;let o=e.getSdkMetadata&&e.getSdkMetadata(),{name:s,version:c}=o&&o.sdk||{};return a.sdk={...a.sdk,name:s||`sentry.javascript.unknown`,version:c||`0.0.0`},a}async function iy({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=ny({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=F(),f=Ji(),p=d&&d.getTransport(),m=d&&d.getDsn();if(!d||!p||!m||!a.sampled)return;let h={type:my,replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled},g=await ry({scope:f,client:d,replayId:t,event:h});if(!g){d.recordDroppedEvent(`event_processor`,`replay`,h),u_("An event processor returned `null`, will not send event.");return}delete g.sdkProcessingMetadata;let _=ty(g,o,m,d.getOptions().tunnel),v;try{v=await p.send(_)}catch(e){let t=Error(hy);try{t.cause=e}catch{}throw t}if(!v)return v;if(typeof v.statusCode==`number`&&(v.statusCode<200||v.statusCode>=300))throw new Pb(v.statusCode);let y=Vr({},v);if(Br(y,`replay`))throw new Fb(y);return v}async function ay(e,t={count:0,interval:xy}){let{recordingData:n,options:r}=e;if(n.length)try{return await iy(e),!0}catch(n){if(n instanceof Pb||n instanceof Fb)throw n;if(Pi(`Replays`,{_retryCount:t.count}),q&&r._experiments&&r._experiments.captureExceptions&&ki(n),t.count>=Sy){let e=Error(`${hy} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{setTimeout(async()=>{try{await ay(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}function oy(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?Lb:Ib}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}function sy(e,t,n,r){let i=typeof r==`string`?r.split(`,`):[],a=[...e,...i,...t];return n!==void 0&&(typeof n==`string`&&a.push(`.${n}`),Ce(()=>{console.warn(`[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.`)})),a.join(`,`)}function cy({mask:e,unmask:t,block:n,unblock:r,ignore:i,blockClass:a,blockSelector:o,maskTextClass:s,maskTextSelector:c,ignoreClass:l}){let u={maskTextSelector:sy(e,[`.sentry-mask`,`[data-sentry-mask]`],s,c),unmaskTextSelector:sy(t,[`.sentry-unmask`,`[data-sentry-unmask]`]),blockSelector:sy(n,[`.sentry-block`,`[data-sentry-block]`,...[`base[href="/"]`]],a,o),unblockSelector:sy(r,[`.sentry-unblock`,`[data-sentry-unblock]`]),ignoreSelector:sy(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`],l)};return a instanceof RegExp&&(u.blockClass=a),s instanceof RegExp&&(u.maskTextClass=s),u}function ly({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?a:n.includes(t)||t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``)?a.replace(/[\S]/g,`*`):a}function uy(e){let t=F(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Je(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Ce(()=>{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):(Ce(()=>{console.warn(`SDK client is not available.`)}),r)}function dy(e){return[...Bb,...e.map(e=>e.toLowerCase())]}function fy(){let e=F();return e&&e.getIntegrationByName&&e.getIntegrationByName(`Replay`)}var U,py,my,hy,gy,_y,vy,yy,by,xy,Sy,Cy,wy,Ty,Ey,Dy,Oy,ky,Ay,jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy,Gy,Ky,qy,Jy,Yy,W,G,Xy,Zy,Qy,$y,eb,tb,K,nb,rb,ib,ab,ob,sb,cb,lb,ub,db,fb,pb,mb,hb,gb,_b,vb,yb,bb,xb,Sb,Cb,wb,Tb,q,Eb,Db,Ob,kb,Ab,jb,Mb,Nb,Pb,Fb,Ib,Lb,Rb,zb,Bb,Vb,Hb,Ub,Wb=t((()=>{M(),L(),cf(),U=k,py=`sentryReplaySession`,my=`replay_event`,hy=`Unable to send Replay`,gy=3e5,_y=9e5,vy=5e3,yy=5500,by=6e4,xy=5e3,Sy=3,Cy=15e4,wy=5e3,Ty=3e3,Ey=300,Dy=2e7,Oy=4999,ky=15e3,Ay=36e5,(function(e){e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`})(jy||={}),My=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){return e?Fm(Im([this,`access`,e=>e.getMeta,`call`,t=>t(e),`optionalAccess`,e=>e.id]),()=>-1):-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){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}},Ny=`__rrweb_original__`,Py=1,Fy=RegExp(`[^a-z0-9-_:]`),Iy=-2,zy=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,By=/^(?:[a-z+]+:)?\/\//i,Vy=/^www\..*/i,Hy=/^(data:)([^,]*),(.*)/i,Uy=/^[^ \t\n\r\u000c]+/,Wy=/^[, \t\n\r\u000c]+/,Gy=`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.`,Ky={map:{},getId(){return console.error(Gy),-1},getNode(){return console.error(Gy),null},removeNodeFromMap(){console.error(Gy)},has(){return console.error(Gy),!1},reset(){console.error(Gy)}},typeof window<`u`&&window.Proxy&&window.Reflect&&(Ky=new Proxy(Ky,{get(e,t,n){return t===`map`&&console.error(Gy),Reflect.get(e,t,n)}})),qy=Date.now,/[1-9][0-9]{12}/.test(Date.now().toString())||(qy=()=>new Date().getTime()),Jy=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return qr(this.styleIDMap.get(e),()=>-1)}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},Yy={},W=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(W||{}),G=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(G||{}),Xy=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(Xy||{}),Zy=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(Zy||{}),Qy=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=Zh([t,`optionalAccess`,e=>e.next])||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Qh(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Qh(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},$y=(e,t)=>`${e}@${t}`,eb=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new Qy,r=e=>{let t=e,n=Iy;for(;n===Iy;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!Kh(i))return;let a=Rm(i.parentNode)?this.mirror.getId(Uh(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=Ch(i,{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:e=>{Bh(e,this.mirror)&&this.iframeManager.addIframe(e),Vh(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Hh(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)eg(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(let e of this.addedSet)!ng(this.droppedSet,e)&&!eg(this.removes,e,this.mirror)||ng(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(r(n.value)===-1)continue;if(t!==-1){e=n;break}else{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.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(!Ih(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!Ph(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:hh(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Nh(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=$m(t),i=t.tagName;r=eh(t,i,n);let a=Jm({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=Ym({isMasked:hh(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(Ph(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r))if(!t.contentDocument)n=`rr_src`;else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!uh(t.tagName,n)&&(i.attributes[n]=lh(this.doc,Xm(t.tagName),Xm(n),r,t,this.maskAttributeFn),n===`style`)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement(`span`);e.oldValue&&n.setAttribute(`style`,e.oldValue);for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||a!==n.style.getPropertyPriority(e)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}for(let e of Array.from(n.style))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(Ph(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=Rm(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Ph(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Ih(t,this.mirror)||!Fh(t,this.mirror)||(this.addedSet.has(t)?($h(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||Lh(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[$y(n,r)]?$h(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:Rm(e.target)&&zm(e.target)?!0:void 0})),this.mapRemoves.push(t))});break}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ih(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[$y(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ph(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(e=>this.genAdds(e)),Hh(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,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`.split(`.`).forEach(t=>{this[t]=e[t]})}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()}},K=e=>tb?((...t)=>{try{return e(...t)}catch(e){if(tb&&tb(e)===!0)return()=>{};throw e}}):e,nb=[],rb=[`INPUT`,`TEXTAREA`,`SELECT`],ib=new WeakMap,ab=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},ob=class{constructor(){this.crossOriginIframeMirror=new ab(th),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},sb=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ab(th),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ab(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,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Eg([this,`access`,e=>e.loadListener,`optionalCall`,t=>t(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case W.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:W.IncrementalSnapshot,data:{source:G.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case W.Meta:case W.Load:case W.DomContentLoaded:return!1;case W.Plugin:return t;case W.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case W.IncrementalSnapshot:switch(t.data.source){case G.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case G.Drag:case G.TouchMove:case G.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case G.ViewportResize:return!1;case G.MediaInteraction:case G.MouseInteraction:case G.Scroll:case G.CanvasMutation:case G.Input:return this.replaceIds(t.data,e,[`id`]),t;case G.StyleSheetRule:case G.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case G.Font:return t;case G.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case G.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),Eg([t,`access`,e=>e.data,`access`,e=>e.styles,`optionalAccess`,e=>e.forEach,`call`,t=>t(t=>{this.replaceStyleIds(t,e,[`styleId`])})]),t}}return!1}replace(e,t,n,r){for(let i of r)!Array.isArray(t[i])&&typeof t[i]!=`number`||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==jy.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},cb=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},lb=class{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,t){if(!zm(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=cg({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(dg({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Yh(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(_g({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(kh(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&Kh(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},ub=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}},db=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Jy,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:Um(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},fb=class{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){Jh(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}},hb=qm(),Dg.mirror=hb,Dg.takeFullSnapshot=Og,gb=3,_b=5,vb=`button,a`,bb=class{constructor(e,t,n=Mg){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let e=Lg(()=>{this._lastMutation=Hg()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(Bg(t,this._ignoreSelector)||!Vg(e))return;let n={timestamp:jg(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=jg(e)}registerScroll(e=Date.now()){this._lastScroll=jg(e)}registerClick(e){let t=Ng(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=Hg();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:U.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i);return}if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:U.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}},xb=[`A`,`BUTTON`,`INPUT`],(function(e){e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`})(Sb||={}),Cb=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]),wb=e=>t=>{if(!e.isEnabled())return;let n=Yg(t);if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&zg(e.clickDetector,n,Pg(t.event)),Mg(e,n)},Tb={resource:o_,paint:i_,navigation:a_},q=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Eb=`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});`,Db=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Dy}.`)}},Ob=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return`sync`}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Dy)throw new Db;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=this.events.map(e=>e.timestamp).sort()[0];return e?Ag(e):null}},kb=class{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():t()},{once:!0}),this._worker.addEventListener(`error`,e=>{t(e)},{once:!0})}),this._ensureReadyPromise}destroy(){u_(`[Replay] Destroying compression worker`),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{let a=({data:t})=>{let o=t;if(o.method===e&&o.id===n){if(this._worker.removeEventListener(`message`,a),!o.success){q&&A.error(`[Replay]`,o.response),i(Error(`Error in compression worker`));return}r(o.response)}};this._worker.addEventListener(`message`,a),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}},Ab=class{constructor(e){this._worker=new kb(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){let t=Ag(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Dy?Promise.reject(new Db):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{q&&A.warn(`[Replay] Sending "clear" message to worker failed`,e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},jb=class{constructor(e){this._fallback=new Ob,this._compression=new Ab(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{u_(`[Replay] Failed to load the compression worker, falling back to simple buffer`);return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t}=this._fallback,n=[];for(let t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(e){q&&A.warn(`[Replay] Failed to add events when switching buffers.`,e)}}},Mb=null,Nb=e=>t=>{if(!e.isEnabled())return;let n=Gv(t);n&&Mg(e,n)},Pb=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},Fb=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}},Ib=`__THROTTLED`,Lb=`__SKIPPED`,Rb=class e{constructor({options:t,recordingOptions:n}){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:gy,sessionIdleExpire:_y},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:``},this._recordingOptions=n,this._options=t,this._debouncedFlush=Zv(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=oy((e,t)=>j_(this,e,t),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),a=r?{threshold:Math.min(Ty,r),timeout:r,scrollTimeout:Ey,ignoreSelector:i?i.join(`,`):``}:void 0;a&&(this.clickDetector=new bb(this,a))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options;if(!(t<=0&&n<=0)){if(this._initializeSessionForSampling(e),!this.session){this._handleException(Error(`Unable to initialize and create session`));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,d_(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode===`session`)throw Error(`Replay recording is already in progress`);if(this._isEnabled&&this.recordingMode===`buffer`)throw Error("Replay buffering is in progress, call `flush()` to save the replay");d_(`[Replay] Starting replay in session mode`,this._options._experiments.traceInternals),this._updateUserActivity(),this.session=O_({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1}),this._initializeRecording()}startBuffering(){if(this._isEnabled)throw Error(`Replay recording is already in progress`);d_(`[Replay] Starting replay in buffer mode`,this._options._experiments.traceInternals),this.session=O_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0}),this.recordingMode=`buffer`,this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=Dg({...this._recordingOptions,...this.recordingMode===`buffer`&&{checkoutEveryNms:by},emit:Qv(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(),void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{u_(`[Replay] Stopping Replay${t?` triggered by ${t}`:``}`,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,__(this)}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),u_(`[Replay] Pausing replay`,this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),u_(`[Replay] Resuming replay`,this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();u_(`[Replay] Converting buffer to session`,this._options._experiments.traceInternals),await this.flushImmediate();let n=this.stopRecording();!e||!n||this.recordingMode!==`session`&&(this.recordingMode=`session`,this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){let t=e();this.recordingMode!==`buffer`&&t!==!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&&T_(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled===`session`){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${U.location.pathname}${U.location.hash}${U.location.search}`,t=`${U.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===Ib){let e=Kg({category:`replay.throttled`});this.addUpdate(()=>!A_(this,{type:_b,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastTransaction||Ji().getTransaction(),t=(e&&P(e).data||{})[go];if(!(!e||!t||![`route`,`custom`].includes(t)))return P(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=p_({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){q&&A.error(`[Replay]`,e),q&&this._options._experiments&&this._options._experiments.captureExceptions&&ki(e)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0;this.session=O_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t})}_checkSession(){if(!this.session)return!1;let e=this.session;return D_(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{U.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),U.addEventListener(`blur`,this._handleWindowBlur),U.addEventListener(`focus`,this._handleWindowFocus),U.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(qv(this),!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=c_(this)}_removeListeners(){try{U.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),U.removeEventListener(`blur`,this._handleWindowBlur),U.removeEventListener(`focus`,this._handleWindowFocus),U.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{U.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let e=Kg({category:`ui.blur`});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{let e=Kg({category:`ui.focus`});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Qg(this,e)}}_doChangeToBackgroundTasks(e){this.session&&(E_(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){u_(`[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:W.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=t_(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Y_(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let 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(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){q&&A.error(`[Replay] No session or eventBuffer found to flush.`);return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await Yv(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw Error(`Session is too long, not sending replay`);let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await ay({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(e){this._handleException(e),this.stop({reason:`sendReplay`});let t=F();t&&t.recordDroppedEvent(`send_error`,`replay`)}}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){q&&A.error(`[Replay] Attempting to finish replay event after session expired.`);return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){u_(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?`short`:`long`}, not sending replay.`,this._options._experiments.traceInternals),r&&this._debouncedFlush();return}let a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&u_(`[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(e){q&&A.error(e)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&x_(this.session)}__init6(){this._onMutationHandler=e=>{let t=e.length,n=this._options.mutationLimit,r=this._options.mutationBreadcrumbLimit,i=n&&t>n;if(t>r||i){let e=Kg({category:`replay.mutations`,data:{count:t,limit:i}});this._createCustomBreadcrumb(e)}return i?(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1):!0}}},zb=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,Bb=[`content-length`,`content-type`,`accept`],Vb=!1,Hb=(e=>new Ub(e)),Ub=class e{static __initStatic(){this.id=`Replay`}constructor({flushMinDelay:t=vy,flushMaxDelay:n=yy,minReplayDuration:r=Oy,maxReplayDuration:i=Ay,stickySession:a=!0,useCompression:o=!0,workerUrl:s,_experiments:c={},sessionSampleRate:l,errorSampleRate:u,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:m=750,mutationLimit:h=1e4,slowClickTimeout:g=7e3,slowClickIgnoreSelectors:_=[],networkDetailAllowUrls:v=[],networkDetailDenyUrls:y=[],networkCaptureBodies:b=!0,networkRequestHeaders:x=[],networkResponseHeaders:S=[],mask:C=[],maskAttributes:w=[`title`,`placeholder`],unmask:T=[],block:E=[],unblock:ee=[],ignore:te=[],maskFn:ne,beforeAddRecordingEvent:D,beforeErrorSampling:re,blockClass:O,blockSelector:ie,maskInputOptions:ae,maskTextClass:oe,maskTextSelector:se,ignoreClass:ce}={}){this.name=e.id;let le=cy({mask:C,unmask:T,block:E,unblock:ee,ignore:te,blockClass:O,blockSelector:ie,maskTextClass:oe,maskTextSelector:se,ignoreClass:ce});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...ae||{},password:!0},maskTextFn:ne,maskInputFn:ne,maskAttributeFn:(e,t,n)=>ly({maskAttributes:w,maskAllText:d,privacyOptions:le,key:e,value:t,el:n}),...le,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,ky),maxReplayDuration:Math.min(i,Ay),stickySession:a,sessionSampleRate:l,errorSampleRate:u,useCompression:o,workerUrl:s,blockAllMedia:p,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:m,mutationLimit:h,slowClickTimeout:g,slowClickIgnoreSelectors:_,networkDetailAllowUrls:v,networkDetailDenyUrls:y,networkCaptureBodies:b,networkRequestHeaders:dy(x),networkResponseHeaders:dy(S),beforeAddRecordingEvent:D,beforeErrorSampling:re,_experiments:c},typeof l==`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: ${l} })`),this._initialOptions.sessionSampleRate=l),typeof u==`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: ${u} })`),this._initialOptions.errorSampleRate=u),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${zb}`:zb),this._isInitialized&&Sn())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return Vb}set _isInitialized(e){Vb=e}setupOnce(){Sn()&&(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(){this._replay=new Rb({options:uy(this._initialOptions),recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let e=F().getIntegrationByName(`ReplayCanvas`);if(!e)return;this._replay._canvas=e.getOptions()}catch{}}},Ub.__initStatic()}));function Gb(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Kb(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Kb(e.parentNode,t,n,r+1)}function qb(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(Gb(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Jb(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){ex(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>Jb(e,t,a||{},!0)}function Yb(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}function Xb(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Zb(e,t,n,r,i){if(!e)return!1;let a=Xb(e);if(!a)return!1;let o=qb(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=Kb(a,o),c=-1;return s<0?!1:(r&&(c=Kb(a,qb(null,r))),s>-1&&c<0?!0:s<c)}function Qb(e){let t=px[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return px[e]=r.bind(window)}function $b(...e){return Qb(`requestAnimationFrame`)(...e)}function ex(...e){return Qb(`setTimeout`)(...e)}function tx(e){hx=e}function nx(e,t){let n=xx.get(e);return n||(n=new Map,xx.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function rx(e,t,n){if(e instanceof Array)return e.map(e=>rx(e,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:bx(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[rx(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}else if(e instanceof HTMLCanvasElement)return{rr_type:`HTMLImageElement`,src:e.toDataURL()};else if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[rx(e.data,t,n),e.width,e.height]};else if(wx(e,t)||typeof e==`object`)return{rr_type:e.constructor.name,index:Sx(e,t,n)};return e}function ix(e,t,n,r,i){let a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!=`function`)continue;let o=Yb(t.CanvasRenderingContext2D.prototype,s,function(a){return function(...o){return Zb(this.canvas,n,r,i,!0)||ex(()=>{let n=Cx(o,t,this);e(this.canvas,{type:mx[`2D`],property:s,args:n})},0),a.apply(this,o)}});a.push(o)}catch{let n=Jb(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:mx[`2D`],property:s,args:[t],setter:!0})}});a.push(n)}return()=>{a.forEach(e=>e())}}function ax(e){return e===`experimental-webgl`?`webgl`:e}function ox(e,t,n,r,i){let a=[];try{let o=Yb(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(a,...o){if(!Zb(this,t,n,r,!0)){let e=ax(a);if(`__context`in this||(this.__context=e),i&&[`webgl`,`webgl2`].includes(e))if(o[0]&&typeof o[0]==`object`){let e=o[0];e.preserveDrawingBuffer||=!0}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[a,...o])}});a.push(o)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{a.forEach(e=>e())}}function sx(e,t,n,r,i,a,o,s){let c=[],l=Object.getOwnPropertyNames(e);for(let o of l)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(o))try{if(typeof e[o]!=`function`)continue;let l=Yb(e,o,function(e){return function(...c){let l=e.apply(this,c);if(Sx(l,s,this),`tagName`in this.canvas&&!Zb(this.canvas,r,i,a,!0)){let e={type:t,property:o,args:Cx(c,s,this)};n(this.canvas,e)}return l}});c.push(l)}catch{let r=Jb(e,o,{set(e){n(this.canvas,{type:t,property:o,args:[e],setter:!0})}});c.push(r)}return c}function cx(e,t,n,r,i,a){let o=[];return o.push(...sx(t.WebGLRenderingContext.prototype,mx.WebGL,e,n,r,i,a,t)),t.WebGL2RenderingContext!==void 0&&o.push(...sx(t.WebGL2RenderingContext.prototype,mx.WebGL2,e,n,r,i,a,t)),()=>{o.forEach(e=>e())}}function lx(){let e=new Blob([Tx]);return URL.createObjectURL(e)}var ux,dx,fx,px,mx,hx,gx,_x,vx,yx,bx,xx,Sx,Cx,wx,Tx,Ex,Dx,Ox,kx,Ax,jx,Mx,Nx=t((()=>{for(M(),L(),(function(e){e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`})(ux||={}),dx=`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.`,fx={map:{},getId(){return console.error(dx),-1},getNode(){return console.error(dx),null},removeNodeFromMap(){console.error(dx)},has(){return console.error(dx),!1},reset(){console.error(dx)}},typeof window<`u`&&window.Proxy&&window.Reflect&&(fx=new Proxy(fx,{get(e,t,n){return t===`map`&&console.error(dx),Reflect.get(e,t,n)}})),/[1-9][0-9]{12}/.test(Date.now().toString()),px={},mx=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(mx||{}),gx=e=>hx?((...t)=>{try{return e(...t)}catch(e){if(hx&&hx(e)===!0)return()=>{};throw e}}):e,_x=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,vx=typeof Uint8Array>`u`?[]:new Uint8Array(256),yx=0;yx<_x.length;yx++)vx[_x.charCodeAt(yx)]=yx;bx=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=_x[t[n]>>2],i+=_x[(t[n]&3)<<4|t[n+1]>>4],i+=_x[(t[n+1]&15)<<2|t[n+2]>>6],i+=_x[t[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},xx=new Map,Sx=(e,t,n)=>{if(!e||!(wx(e,t)||typeof e==`object`))return;let r=e.constructor.name,i=nx(n,r),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a},Cx=(e,t,n)=>e.map(e=>rx(e,t,n)),wx=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]),Tx=`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)}};`,Ex=class{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=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{sampling:t=`all`,win:n,blockClass:r,blockSelector:i,unblockSelector:a,maxCanvasSize:o,recordCanvas:s,dataURLOptions:c,errorHandler:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,l&&tx(l),!e.enableManualSnapshot&&gx(()=>{s&&t===`all`&&this.initCanvasMutationObserver(n,r,i,a),s&&typeof t==`number`&&this.initCanvasFPSObserver(t,n,r,i,a,o,{dataURLOptions:c})})()}initCanvasFPSObserver(e,t,n,r,i,a,o){let s=ox(t,n,r,i,!0),c=this.takeSnapshot(!1,e,t,n,r,i,a,o.dataURLOptions);this.resetObservers=()=>{s(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=ox(e,t,n,r,!1),a=ix(this.processMutation.bind(this),e,t,n,r),o=cx(this.processMutation.bind(this),e,t,n,r,this.mirror);this.resetObservers=()=>{i(),a(),o()}}snapshot(e){let{options:t}=this,n=this.takeSnapshot(!0,t.sampling===`all`?2:t.sampling||2,t.win,t.blockClass,t.blockSelector,t.unblockSelector,t.maxCanvasSize,t.dataURLOptions,e);this.resetObservers=()=>{cancelAnimationFrame(n)}}takeSnapshot(e,t,n,r,i,a,o,s,c){let l=new Map,u=new Worker(lx());u.onmessage=e=>{let t=e.data,{id:n}=t;if(l.set(n,!1),!(`base64`in t))return;let{base64:r,type:i,width:a,height:o}=t;this.mutationCb({id:n,type:mx[`2D`],commands:[{property:`clearRect`,args:[0,0,a,o]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:r}],type:i}]},0,0,a,o]}]})};let d=1e3/t,f=0,p,m=e=>{if(e)return[e];let t=[];return n.document.querySelectorAll(`canvas`).forEach(e=>{Zb(e,r,i,a,!0)||t.push(e)}),t},h=t=>{if(f&&t-f<d){p=$b(h);return}f=t,m(c).forEach(t=>{let n=this.mirror.getId(t);if(!l.get(n)&&!(!t.width||!t.height)){if(l.set(n,!0),!e&&[`webgl`,`webgl2`].includes(t.__context)){let e=t.getContext(t.__context);Yr([e,`optionalAccess`,e=>e.getContextAttributes,`call`,e=>e(),`optionalAccess`,e=>e.preserveDrawingBuffer])===!1&&e.clear(e.COLOR_BUFFER_BIT)}createImageBitmap(t).then(e=>{u.postMessage({id:n,bitmap:e,width:t.width,height:t.height,dataURLOptions:s,maxCanvasSize:o},[e])}).catch(e=>{gx(()=>{throw e})()})}}),p=$b(h)};return p=$b(h),p}startPendingCanvasMutationFlusher(){$b(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,$b(e)};$b(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),$b(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}},Dx={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}}},Ox=`ReplayCanvas`,kx=1280,Ax=((e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||`medium`,enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,kx):kx,n?Math.min(n,kx):kx]},i,a=new Promise(e=>i=e);return{name:Ox,setupOnce(){},getOptions(){let{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{let r=new Ex({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{typeof e==`object`&&(e.__rrweb__=!0)}catch{}}});return i(r),r},...Dx[e||`medium`]||Dx.medium}},async snapshot(e){(await a).snapshot(e)}}}),jx=cs(Ax),Mx=ss(Ox,jx)}));async function Px({client:e,scope:t,event:n}){let r={};e.emit&&e.emit(`preprocessEvent`,n,r);let i=await gi(e.getOptions(),n,r,t,e,wa());return i===null?(e.recordDroppedEvent(`event_processor`,`feedback`,n),null):(i.platform=i.platform||`javascript`,i)}async function Fx({feedback:{message:e,email:t,name:n,source:r,url:i}},{includeReplay:a=!0}={}){let o=F(),s=o&&o.getTransport(),c=o&&o.getDsn();if(!o||!s||!c)return;let l={contexts:{feedback:{contact_email:t,name:n,message:e,url:i,source:r}},type:`feedback`};return Bi(async e=>{e.clearBreadcrumbs(),[SS,xS].includes(String(r))&&e.setLevel(`info`);let t=await Px({scope:e,client:o,event:l});if(!t)return;o.emit&&o.emit(`beforeSendFeedback`,t,{includeReplay:!!a});let n=Go(t,c,o.getOptions()._metadata,o.getOptions().tunnel),i;try{i=await s.send(n)}catch(e){let t=Error(`Unable to send Feedback`);try{t.cause=e}catch{}throw t}if(i){if(typeof i.statusCode==`number`&&(i.statusCode<200||i.statusCode>=300))throw Error(`Unable to send Feedback`);return i}})}function Ix({name:e,email:t,message:n,source:r=SS,url:i=he()},a={}){if(!n)throw Error(`Unable to submit feedback with empty message`);return Fx({feedback:{name:e,email:t,message:n,url:i,source:r}},a)}function Lx(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Rx(e){let t=e.createElement(`style`);return t.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);
}
`,t}function zx(e){let t=e.createElement(`style`);return t.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);
}
`,t}function Bx(e){return`
  --background: ${e.background};
  --background-hover: ${e.backgroundHover};
  --foreground: ${e.foreground};
  --error: ${e.error};
  --success: ${e.success};
  --border: ${e.border};
  --border-radius: ${e.borderRadius};
  --box-shadow: ${e.boxShadow};

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

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

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

  --form-border-radius: ${e.formBorderRadius};
  --form-content-border-radius: ${e.formContentBorderRadius};
  `}function Vx(e,t,n){let r=e.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);

  ${Bx(t===`dark`?n.dark:n.light)}
}

${t===`system`?`
@media (prefers-color-scheme: dark) {
  :host {
    ${Bx(n.dark)}
  }
}`:``}
}`,r}function Hx({id:e,colorScheme:t,themeDark:n,themeLight:r}){try{let i=rS.document,a=i.createElement(`div`);a.id=e;let o=a.attachShadow({mode:`open`});return o.appendChild(Vx(i,t,{dark:n,light:r})),o.appendChild(zx(i)),{shadow:o,host:a}}catch{throw A.warn(`[Feedback] Browser does not support shadow DOM API`),Error(`Browser does not support shadow DOM API.`)}}async function Ux(e,t,n){if(!e)return;let r=()=>{e&&e.showError(`There was a problem submitting feedback, please wait and try again.`)};e.hideError();try{return await Ix({...t,source:xS},n)}catch(e){CS&&A.error(e),r()}}function Wx(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}function Gx(){let e=e=>rS.document.createElementNS(TS,e),t=Wx(e(`svg`),{class:`feedback-icon`,width:`${wS}`,height:`${wS}`,viewBox:`0 0 ${wS} ${wS}`,fill:`none`}),n=Wx(e(`g`),{clipPath:`url(#clip0_57_80)`}),r=Wx(e(`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`});t.appendChild(n).appendChild(r);let i=e(`defs`),a=Wx(e(`clipPath`),{id:`clip0_57_80`}),o=Wx(e(`rect`),{width:`${wS}`,height:`${wS}`,fill:`white`});return a.appendChild(o),i.appendChild(a),t.appendChild(i).appendChild(a).appendChild(o),{get el(){return t}}}function Kx(e,t,...n){let r=rS.document.createElement(e);t&&Object.entries(t).forEach(([e,t])=>{e===`className`&&typeof t==`string`?r.setAttribute(`class`,t):typeof t==`boolean`&&t?r.setAttribute(e,``):typeof t==`string`?r.setAttribute(e,t):e.startsWith(`on`)&&typeof t==`function`&&r.addEventListener(e.substring(2).toLowerCase(),t)});for(let e of n)qx(r,e);return r}function qx(e,t){let n=rS.document;if(t!=null)if(Array.isArray(t))for(let n of t)qx(e,n);else t===!1||(typeof t==`string`?e.appendChild(n.createTextNode(t)):t instanceof Node?e.appendChild(t):e.appendChild(n.createTextNode(String(t))))}function Jx({buttonLabel:e,onClick:t}){function n(e){t&&t(e)}let r=Kx(`button`,{type:`button`,className:`widget__actor`,"aria-label":e,"aria-hidden":`false`},Gx().el,e?Kx(`span`,{className:`widget__actor__text`},e):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 Yx({label:e}){return{el:Kx(`button`,{type:`submit`,className:`btn btn--primary`,"aria-label":e},e)}}function Xx(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function Zx({nameLabel:e,namePlaceholder:t,emailLabel:n,emailPlaceholder:r,messageLabel:i,messagePlaceholder:a,isRequiredLabel:o,cancelButtonLabel:s,submitButtonLabel:c,showName:l,showEmail:u,isNameRequired:d,isEmailRequired:f,defaultName:p,defaultEmail:m,onCancel:h,onSubmit:g}){let{el:_}=Yx({label:c});function v(e){if(e.preventDefault(),e.target instanceof HTMLFormElement)try{if(g){let t=new FormData(e.target);g({name:Xx(t,`name`),email:Xx(t,`email`),message:Xx(t,`message`)})}}catch{}}let y=Kx(`div`,{className:`form__error-container form__error-container--hidden`,"aria-hidden":`true`});function b(e){y.textContent=e,y.classList.remove(`form__error-container--hidden`),y.setAttribute(`aria-hidden`,`false`)}function x(){y.textContent=``,y.classList.add(`form__error-container--hidden`),y.setAttribute(`aria-hidden`,`true`)}let S=Kx(`input`,{id:`name`,type:l?`text`:`hidden`,"aria-hidden":l?`false`:`true`,name:`name`,required:d,className:`form__input`,placeholder:t,value:p}),C=Kx(`input`,{id:`email`,type:u?`text`:`hidden`,"aria-hidden":u?`false`:`true`,name:`email`,required:f,className:`form__input`,placeholder:r,value:m}),w=Kx(`textarea`,{id:`message`,autoFocus:`true`,rows:`5`,name:`message`,required:!0,className:`form__input form__input--textarea`,placeholder:a}),T=Kx(`button`,{type:`button`,className:`btn btn--default`,"aria-label":s,onClick:e=>{h&&h(e)}},s),E=Kx(`form`,{className:`form`,onSubmit:v},[y,l&&Kx(`label`,{htmlFor:`name`,className:`form__label`},[Kx(`span`,{className:`form__label__text`},e,d&&Kx(`span`,{className:`form__label__text--required`},` ${o}`)),S]),!l&&S,u&&Kx(`label`,{htmlFor:`email`,className:`form__label`},[Kx(`span`,{className:`form__label__text`},n,f&&Kx(`span`,{className:`form__label__text--required`},` ${o}`)),C]),!u&&C,Kx(`label`,{htmlFor:`message`,className:`form__label`},[Kx(`span`,{className:`form__label__text`},i,Kx(`span`,{className:`form__label__text--required`},` ${o}`)),w]),Kx(`div`,{className:`btn-group`},[_,T])]);return{get el(){return E},showError:b,hideError:x}}function Qx({colorScheme:e}){let t=e=>rS.document.createElementNS(ES,e),n=Wx(t(`svg`),{class:`sentry-logo`,width:`32`,height:`30`,viewBox:`0 0 72 66`,fill:`none`}),r=Wx(t(`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);let i=t(`defs`),a=t(`style`);return a.textContent=`
    path {
      fill: ${e===`dark`?`#fff`:`#362d59`};
    }`,e===`system`&&(a.textContent+=`
    @media (prefers-color-scheme: dark) {
      path: {
        fill: '#fff';
      }
    }
    `),i.append(a),n.append(i),{get el(){return n}}}function $x({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:i,isEmailRequired:a,colorScheme:o,defaultName:s,defaultEmail:c,onClosed:l,onCancel:u,onSubmit:d,...f}){let p=null;function m(){h(),l&&l()}function h(){p&&(p.open=!1)}function g(){p&&(p.open=!0)}function _(){return p&&p.open===!0||!1}let{el:v,showError:y,hideError:b}=Zx({showEmail:r,showName:n,isEmailRequired:a,isNameRequired:i,defaultName:s,defaultEmail:c,onSubmit:d,onCancel:u,...f});return p=Kx(`dialog`,{className:`dialog`,open:!0,onClick:m},Kx(`div`,{className:`dialog__content`,onClick:e=>{e.stopPropagation()}},Kx(`h2`,{className:`dialog__header`},e,t&&Kx(`a`,{className:`brand-link`,target:`_blank`,href:`https://sentry.io/welcome/`,title:`Powered by Sentry`,rel:`noopener noreferrer`},Qx({colorScheme:o}).el)),v)),{get el(){return p},showError:y,hideError:b,open:g,close:h,checkIsOpen:_}}function eS(){let e=e=>rS.document.createElementNS(kS,e),t=Wx(e(`svg`),{class:`success-icon`,width:`${DS}`,height:`${OS}`,viewBox:`0 0 ${DS} ${OS}`,fill:`none`}),n=Wx(e(`g`),{clipPath:`url(#clip0_57_156)`}),r=Wx(e(`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=Wx(e(`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`});t.appendChild(n).append(i,r);let a=e(`defs`),o=Wx(e(`clipPath`),{id:`clip0_57_156`}),s=Wx(e(`rect`),{width:`${DS}`,height:`${DS}`,fill:`white`,transform:`translate(0 0.5)`});return o.appendChild(s),a.appendChild(o),t.appendChild(a).appendChild(o).appendChild(s),{get el(){return t}}}function tS({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}let r=Kx(`div`,{className:`success-message`,onClick:n},eS().el,e);return{el:r,remove:n}}function nS({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let i,a,o=!1;function s(){if(e)try{let t=tS({message:n.successMessageText,onRemove:()=>{r&&clearTimeout(r),u()}});if(!t.el)throw Error(`Unable to show success message`);e.appendChild(t.el);let r=setTimeout(()=>{t&&t.remove()},5e3)}catch(e){A.error(e)}}async function c(e){if(!a)return;let t=[];if(n.isNameRequired&&!e.name&&t.push(n.nameLabel),n.isEmailRequired&&!e.email&&t.push(n.emailLabel),e.message||t.push(n.messageLabel),t.length>0){a.showError(`Please enter in the following required fields: ${t.join(`, `)}`);return}if(!await Ux(a,e)){n.onSubmitError&&n.onSubmitError();return}h(),s(),n.onSubmitSuccess&&n.onSubmitSuccess()}function l(){let e=F(),t=e&&e.getIntegrationByName&&e.getIntegrationByName(`Replay`);t&&t.flush().catch(e=>{CS&&A.error(e)})}function u(){i&&i.show()}function d(){i&&i.hide()}function f(){i&&i.el&&i.el.remove()}function p(){try{if(a){a.open(),o=!0,n.onFormOpen&&n.onFormOpen(),l();return}let t=n.useSentryUser,r=Ji(),i=r&&r.getUser();if(a=$x({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:t&&i&&i[t.name]||``,defaultEmail:t&&i&&i[t.email]||``,onClosed:()=>{u(),o=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{m(),u()},onSubmit:c}),!a.el)throw Error(`Unable to open Feedback dialog`);e.appendChild(a.el),d(),n.onFormOpen&&n.onFormOpen(),l()}catch(e){A.error(e)}}function m(){a&&(a.close(),o=!1,n.onFormClose&&n.onFormClose())}function h(){if(a){m();let e=a.el;e&&e.remove(),a=void 0}}function g(){o||p(),d()}return r?r.addEventListener(`click`,g):t&&(i=Jx({buttonLabel:n.buttonLabel,onClick:g}),i.el&&e.appendChild(i.el)),{get actor(){return i},get dialog(){return a},showActor:u,hideActor:d,removeActor:f,openDialog:p,closeDialog:m,removeDialog:h}}var rS,iS,aS,oS,sS,cS,lS,uS,dS,fS,pS,mS,hS,gS,_S,vS,yS,bS,xS,SS,CS,wS,TS,ES,DS,OS,kS,AS,jS,MS,NS=t((()=>{M(),L(),rS=k,iS=`#ffffff`,aS=`inherit`,oS=`rgba(108, 95, 199, 1)`,sS={fontFamily:`system-ui, 'Helvetica Neue', Arial, sans-serif`,fontSize:`14px`,background:iS,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:oS,submitBorder:oS,submitOutlineFocus:`#29232f`,submitForeground:iS,submitForegroundHover:iS,cancelBackground:`transparent`,cancelBackgroundHover:`var(--background-hover)`,cancelBorder:`var(--border)`,cancelOutlineFocus:`var(--input-outline-focus)`,cancelForeground:`var(--foreground)`,cancelForegroundHover:`var(--foreground)`,inputBackground:aS,inputForeground:aS,inputBorder:`var(--border)`,inputOutlineFocus:oS,formBorderRadius:`20px`,formContentBorderRadius:`6px`},cS={light:sS,dark:{...sS,background:`#29232f`,backgroundHover:`#352f3b`,foreground:`#ebe6ef`,border:`1.5px solid rgba(235, 230, 239, 0.15)`,success:`#2da98c`,error:`#f55459`}},lS=`Report a Bug`,uS=`Cancel`,dS=`Send Bug Report`,fS=`Report a Bug`,pS=`your.email@example.org`,mS=`Email`,hS=`What's the bug? What did you expect?`,gS=`Description`,_S=`Your Name`,vS=`Name`,yS=`(required)`,bS=`Thank you for your report!`,xS=`widget`,SS=`api`,CS=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,wS=20,TS=`http://www.w3.org/2000/svg`,ES=`http://www.w3.org/2000/svg`,DS=16,OS=17,kS=`http://www.w3.org/2000/svg`,AS=rS.document,jS=(e=>new MS(e)),MS=class e{static __initStatic(){this.id=`Feedback`}constructor({autoInject:t=!0,id:n=`sentry-feedback`,isEmailRequired:r=!1,isNameRequired:i=!1,showBranding:a=!0,showEmail:o=!0,showName:s=!0,useSentryUser:c={email:`email`,name:`username`},themeDark:l,themeLight:u,colorScheme:d=`system`,buttonLabel:f=lS,cancelButtonLabel:p=uS,submitButtonLabel:m=dS,formTitle:h=fS,emailPlaceholder:g=pS,emailLabel:_=mS,messagePlaceholder:v=hS,messageLabel:y=gS,namePlaceholder:b=_S,nameLabel:x=vS,isRequiredLabel:S=yS,successMessageText:C=bS,onFormClose:w,onFormOpen:T,onSubmitError:E,onSubmitSuccess:ee}={}){this.name=e.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:t,showBranding:a,id:n,isEmailRequired:r,isNameRequired:i,showEmail:o,showName:s,useSentryUser:c,colorScheme:d,themeDark:{...cS.dark,...l},themeLight:{...cS.light,...u},buttonLabel:f,cancelButtonLabel:p,submitButtonLabel:m,formTitle:h,emailLabel:_,emailPlaceholder:g,messageLabel:y,messagePlaceholder:v,nameLabel:x,namePlaceholder:b,isRequiredLabel:S,successMessageText:C,onFormClose:w,onFormOpen:T,onSubmitError:E,onSubmitSuccess:ee}}setupOnce(){if(Sn())try{this._cleanupWidgetIfExists();let{autoInject:e}=this.options;if(!e)return;this._createWidget(this.options)}catch(e){CS&&A.error(e)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(e,t){try{let n=Lx(this.options,t||{});return this._ensureShadowHost(n,({shadow:t})=>{let r=typeof e==`string`?AS.querySelector(e):typeof e.addEventListener==`function`?e:null;if(!r)return CS&&A.error(`[Feedback] Unable to attach to target element`),null;let i=nS({shadow:t,options:n,attachTo:r});return this._widgets.add(i),this._widget||=i,i})}catch(e){return CS&&A.error(e),null}}createWidget(e){try{return this._createWidget(Lx(this.options,e||{}))}catch(e){return CS&&A.error(e),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(e){CS&&A.error(e)}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();let e=AS.querySelector(`#${this.options.id}`);e&&e.remove()}_createWidget(e){return this._ensureShadowHost(e,({shadow:t})=>{let n=nS({shadow:t,options:e});return!this._hasInsertedActorStyles&&n.actor&&(t.appendChild(Rx(AS)),this._hasInsertedActorStyles=!0),this._widgets.add(n),this._widget||=n,n})}_ensureShadowHost(e,t){let n=!1;if(!this._shadow||!this._host){let{id:t,colorScheme:r,themeLight:i,themeDark:a}=e,{shadow:o,host:s}=Hx({id:t,colorScheme:r,themeLight:i,themeDark:a});this._shadow=o,this._host=s,n=!0}this._host.dataset.sentryFeedbackColorscheme=e.colorScheme;let r=t({shadow:this._shadow,host:this._host});return n&&AS.body.appendChild(this._host),r}},MS.__initStatic()}));function PS(e,t){let n={level:$n(t),extra:{arguments:e}};Bi(r=>{if(r.addEventProcessor(e=>(e.logger=`console`,yt(e,{handled:!1,type:`console`}),e)),t===`assert`&&e[0]===!1){let t=`Assertion failed: ${te(e.slice(1),` `)||`console.assert`}`;r.setExtra(`arguments`,e.slice(1)),Ai(t,n);return}let i=e.find(e=>e instanceof Error);if(t===`error`&&i){ki(i,n);return}Ai(te(e,` `),n)})}var FS,IS,LS,RS=t((()=>{L(),M(),FS=`CaptureConsole`,IS=((e={})=>{let t=e.levels||Ee;return{name:FS,setupOnce(){},setup(e){`console`in k&&pt(({args:n,level:r})=>{F()!==e||!t.includes(r)||PS(n,r)})}}}),LS=cs(IS),ss(FS,LS)})),zS,BS,VS,HS=t((()=>{L(),M(),zS=`Debug`,BS=((e={})=>{let t={debugger:!1,stringify:!1,...e};return{name:zS,setupOnce(){},setup(e){e.on&&e.on(`beforeSendEvent`,(e,n)=>{if(t.debugger)debugger;Ce(()=>{t.stringify?(console.log(JSON.stringify(e,null,2)),n&&Object.keys(n).length&&console.log(JSON.stringify(n,null,2))):(console.log(e),n&&Object.keys(n).length&&console.log(n))})})}}}),VS=cs(BS),ss(zS,VS)})),US,WS=t((()=>{US=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__}));function GS(e,t){return t?!!(KS(e,t)||qS(e,t)):!1}function KS(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!YS(e,t)||!JS(e,t))}function qS(e,t){let n=XS(t),r=XS(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!YS(e,t)||!JS(e,t))}function JS(e,t){let n=ZS(e),r=ZS(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function YS(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function XS(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ZS(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}var QS,$S,eC,tC=t((()=>{L(),M(),WS(),QS=`Dedupe`,$S=(()=>{let e;return{name:QS,setupOnce(){},processEvent(t){if(t.type)return t;try{if(GS(t,e))return US&&A.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}),eC=cs($S),ss(QS,eC)}));function nC(e,t={},n,r){if(!t.originalException||!s(t.originalException))return e;let i=t.originalException.name||t.originalException.constructor.name,a=rC(t.originalException,r);if(a){let t={...e.contexts},r=Dn(a,n);return h(r)&&(Be(r,`__sentry_skip_normalization__`,!0),t[i]=r),{...e,contexts:t}}return e}function rC(e,t){try{let n=[`name`,`message`,`stack`,`line`,`column`,`fileName`,`lineNumber`,`columnNumber`,`toJSON`],r={};for(let t of Object.keys(e)){if(n.indexOf(t)!==-1)continue;let i=e[t];r[t]=s(i)?i.toString():i}if(t&&e.cause!==void 0&&(r.cause=s(e.cause)?e.cause.toString():e.cause),typeof e.toJSON==`function`){let t=e.toJSON();for(let e of Object.keys(t)){let n=t[e];r[e]=s(n)?n.toString():n}}return r}catch(e){US&&A.error(`Unable to extract extra data from the Error object:`,e)}return null}var iC,aC,oC,sC=t((()=>{L(),M(),WS(),iC=`ExtraErrorData`,aC=((e={})=>{let t=e.depth||3,n=e.captureErrorCause||!1;return{name:iC,setupOnce(){},processEvent(e,r){return nC(e,r,t,n)}}}),oC=cs(aC),ss(iC,oC)})),cC,lC,uC,dC,fC,pC=t((()=>{L(),M(),cC=k,lC=`ReportingObserver`,uC=new WeakMap,dC=((e={})=>{let t=e.types||[`crash`,`deprecation`,`intervention`];function n(e){if(uC.has(F()))for(let t of e)Bi(e=>{e.setExtra(`url`,t.url);let n=`ReportingObserver [${t.type}]`,r=`No details available`;if(t.body){let n={};for(let e in t.body)n[e]=t.body[e];if(e.setExtra(`body`,n),t.type===`crash`){let e=t.body;r=[e.crashId||``,e.reason||``].join(` `).trim()||r}else r=t.body.message||r}Ai(`${n}: ${r}`)})}return{name:lC,setupOnce(){zt()&&new cC.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){uC.set(e,!0)}}}),fC=cs(dC),ss(lC,fC)})),mC,hC,gC,_C=t((()=>{L(),M(),mC=`RewriteFrames`,hC=((e={})=>{let t=e.root,n=e.prefix||`app:///`,r=e.iteratee||(e=>{if(!e.filename)return e;let r=/^[a-zA-Z]:\\/.test(e.filename)||e.filename.includes(`\\`)&&!e.filename.includes(`/`),i=/^\//.test(e.filename);if(r||i){let i=r?e.filename.replace(/^[a-zA-Z]:/,``).replace(/\\/g,`/`):e.filename;e.filename=`${n}${t?zn(t,i):Bn(i)}`}return e});function i(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:a(e.stacktrace)}}))}}}catch{return e}}function a(e){return{...e,frames:e&&e.frames&&e.frames.map(e=>r(e))}}return{name:mC,setupOnce(){},processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=i(t)),t}}}),gC=cs(hC),ss(mC,gC)})),vC,yC,bC,xC=t((()=>{L(),vC=`SessionTiming`,yC=(()=>{let e=Date.now();return{name:vC,setupOnce(){},processEvent(t){let n=Date.now();return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}}),bC=cs(yC),ss(vC,bC)}));function SC(e,t,n,r){if(MC(e,n.status,n.url)){let e=PC(t,r),i,a,o,s;FC()&&([{headers:i,cookies:o},{headers:a,cookies:s}]=[{cookieHeader:`Cookie`,obj:e},{cookieHeader:`Set-Cookie`,obj:n}].map(({cookieHeader:e,obj:t})=>{let n=EC(t.headers),r;try{let t=n[e]||n[e.toLowerCase()]||void 0;t&&(r=TC(t))}catch{US&&A.log(`Could not extract cookies from header ${e}`)}return{headers:n,cookies:r}})),ji(NC({url:e.url,method:e.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:o,responseCookies:s}))}}function CC(e,t,n,r){if(MC(e,t.status,t.responseURL)){let e,i,a;if(FC()){try{let e=t.getResponseHeader(`Set-Cookie`)||t.getResponseHeader(`set-cookie`)||void 0;e&&(i=TC(e))}catch{US&&A.log(`Could not extract cookies from response headers`)}try{a=DC(t)}catch{US&&A.log(`Could not extract headers from response`)}e=r}ji(NC({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:a,responseCookies:i}))}}function wC(e){if(e){let t=e[`Content-Length`]||e[`content-length`];if(t)return parseInt(t,10)}}function TC(e){return e.split(`; `).reduce((e,t)=>{let[n,r]=t.split(`=`);return e[n]=r,e},{})}function EC(e){let t={};return e.forEach((e,n)=>{t[n]=e}),t}function DC(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return e[n]=r,e},{}):{}}function OC(e,t){return e.some(e=>typeof e==`string`?t.includes(e):e.test(t))}function kC(e,t){return e.some(e=>typeof e==`number`?e===t:t>=e[0]&&t<=e[1])}function AC(e,t){Rt()&&Ht(n=>{if(F()!==e)return;let{response:r,args:i}=n,[a,o]=i;r&&SC(t,a,r,o)})}function jC(e,t){`XMLHttpRequest`in k&&dn(n=>{if(F()!==e)return;let r=n.xhr,i=r[hn];if(!i)return;let{method:a,request_headers:o}=i;try{CC(t,r,a,o)}catch(e){US&&A.warn(`Error while extracting response event form XHR response`,e)}})}function MC(e,t,n){return kC(e.failedRequestStatusCodes,t)&&OC(e.failedRequestTargets,n)&&!sc(n,F())}function NC(e){let t=`HTTP Client Error with status code: ${e.status}`,n={message:t,exception:{values:[{type:`Error`,value:t}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:wC(e.responseHeaders)}}};return yt(n,{type:`http.client`,handled:!1}),n}function PC(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function FC(){let e=F();return e?!!e.getOptions().sendDefaultPii:!1}var IC,LC,RC,zC=t((()=>{L(),M(),WS(),IC=`HttpClient`,LC=((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:IC,setupOnce(){},setup(e){AC(e,t),jC(e,t)}}}),RC=cs(LC),ss(IC,RC)}));function BC(e,t){let n=HC.document,r=HC.location&&Zn(HC.location.href);if(!n||!r)return e;let i=e.exception&&e.exception.values;if(!i||!i.length)return e;let a=n.documentElement.innerHTML;if(!a)return e;let o=[`<!DOCTYPE html>`,`<html>`,...a.split(`
`),`</html>`];return i.forEach(e=>{let n=e.stacktrace;n&&n.frames&&(n.frames=n.frames.map(e=>VC(e,o,r,t)))}),e}function VC(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||bt(t,e,r),e}var HC,UC,WC,GC,KC,qC=t((()=>{L(),M(),HC=k,UC=7,WC=`ContextLines`,GC=((e={})=>{let t=e.frameContextLines==null?UC:e.frameContextLines;return{name:WC,setupOnce(){},processEvent(e){return BC(e,t)}}}),KC=cs(GC),ss(WC,KC)})),JC=t((()=>{RS(),HS(),tC(),sC(),pC(),_C(),xC(),zC(),qC()}));function YC(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function XC(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=YC(n);return e=>r.then(n=>e(n.transaction(t,`readwrite`).objectStore(t)))}function ZC(e){return YC(e.getAllKeys())}function QC(e,t,n){return e(e=>ZC(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),YC(e.transaction)}))}function $C(e){return e(e=>ZC(e).then(t=>{if(t.length!==0)return YC(e.get(t[0])).then(n=>(e.delete(t[0]),YC(e.transaction).then(()=>n)))}))}function ew(e){let t;function n(){return t??=XC(e.dbName||`sentry-offline`,e.storeName||`queue`),t}return{insert:async t=>{try{let r=await Dr(t,e.textEncoder);await QC(n(),r,e.maxQueueSize||30)}catch{}},pop:async()=>{try{let t=await $C(n());if(t)return kr(t,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch{}}}}function tw(e){return t=>e({...t,createStore:ew})}function nw(e){return tw(Ys(e))}var rw=t((()=>{L(),M()}));function iw(e){return typeof e==`object`&&!!e&&`getHighEntropyValues`in e}function aw(e){return!(`thread_metadata`in e)}function ow(e){return aw(e)?uw(e):e}function sw(e){let t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t==`string`&&t.length!==32&&V&&A.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t==`string`?t:``}function cw(e,t,n,r){if(r.type!==`transaction`)throw TypeError(`Profiling events may only be attached to transactions, this should never occur.`);if(n==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let i=sw(r),a=ow(n),o=t||(typeof r.start_timestamp==`number`?r.start_timestamp*1e3:Date.now()),s=typeof r.timestamp==`number`?r.timestamp*1e3:Date.now();return{event_id:e,timestamp:new Date(o).toISOString(),platform:`javascript`,version:`1`,release:r.release||``,environment:r.environment||`production`,runtime:{name:`javascript`,version:B.navigator.userAgent},os:{name:Ew,version:Dw,build_number:kw},device:{locale:jw,model:Aw,manufacturer:kw,architecture:Ow,is_emulator:!1},debug_meta:{images:pw(n.resources)},profile:a,transactions:[{name:r.transaction||``,id:r.event_id||j(),trace_id:i,active_thread_id:ww,relative_start_ns:`0`,relative_end_ns:((s-o)*1e6).toFixed(0)}]}}function lw(e){return e.op===`pageload`}function uw(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[ww]:{name:Tw}}};if(!e.samples.length)return r;let i=e.samples[0].timestamp,a=typeof performance.timeOrigin==`number`?performance.timeOrigin:or||0,o=a-(or||a);for(let a=0;a<e.samples.length;a++){let s=e.samples[a];if(s.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((s.timestamp+o-i)*Cw).toFixed(0),stack_id:t,thread_id:ww};continue}let c=e.stacks[s.stackId],l=[];for(;c;){l.push(c.frameId);let t=e.frames[c.frameId];r.frames[c.frameId]===void 0&&(r.frames[c.frameId]={function:t.name,abs_path:typeof t.resourceId==`number`?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),c=c.parentId===void 0?void 0:e.stacks[c.parentId]}let u={elapsed_since_start_ns:((s.timestamp+o-i)*Cw).toFixed(0),stack_id:n,thread_id:ww};r.stacks[n]=l,r.samples[a]=u,n++}return r}function dw(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:`profile`},n]);return e}function fw(e){let t=[];return wr(e,(e,n)=>{if(n===`transaction`)for(let n=1;n<e.length;n++){let r=e[n];r&&r.contexts&&r.contexts.profile&&r.contexts.profile.profile_id&&t.push(e[n])}}),t}function pw(e){let t=k._sentryDebugIds;if(!t)return[];let n=F(),r=n&&n.getOptions(),i=r&&r.stackParser;if(!i)return[];let a,o=Nw.get(i);o?a=o:(a=new Map,Nw.set(i,a));let s=Object.keys(t).reduce((e,n)=>{let r,o=a.get(n);o?r=o:(r=i(n),a.set(n,r));for(let i=r.length-1;i>=0;i--){let a=r[i],o=a&&a.filename;if(a&&o){e[o]=t[n];break}}return e},{}),c=[];for(let t of e)t&&s[t]&&c.push({type:`sourcemap`,code_file:t,debug_id:s[t]});return c}function mw(e){return typeof e!=`number`&&typeof e!=`boolean`||typeof e==`number`&&isNaN(e)?(V&&A.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(V&&A.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function hw(e){return e.samples.length<2?(V&&A.log(`[Profiling] Discarding profile because it contains less than 2 samples`),!1):e.frames.length?!0:(V&&A.log(`[Profiling] Discarding profile because it contains no frames`),!1)}function gw(e){return typeof e==`function`}function _w(){let e=B.Profiler;if(!gw(e)){V&&A.log(`[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.`);return}let t=Math.floor(Fw/10);try{return new e({sampleInterval:10,maxBufferSize:t})}catch{V&&(A.log(`[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.`),A.log(`[Profiling] Disabling profiling for current user session.`)),Pw=!0}}function vw(e){if(Pw)return V&&A.log(`[Profiling] Profiling has been disabled for the duration of the current user session.`),!1;if(!e.isRecording())return V&&A.log(`[Profiling] Discarding profile because transaction was not sampled.`),!1;let t=F(),n=t&&t.getOptions();if(!n)return V&&A.log(`[Profiling] Profiling disabled, no options found.`),!1;let r=n.profilesSampleRate;return mw(r)?r?r===!0||Math.random()<r?!0:(V&&A.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(V&&A.log(`[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0`),!1):(V&&A.warn(`[Profiling] Discarding profile because of invalid sample rate.`),!1)}function yw(e,t,n,r){return hw(n)?cw(e,t,n,r):null}function bw(){return Iw.size}function xw(e){let t=Iw.get(e);return t&&Iw.delete(e),t}function Sw(e,t){if(Iw.set(e,t),Iw.size>30){let e=Iw.keys().next().value;Iw.delete(e)}}var Cw,ww,Tw,Ew,Dw,Ow,kw,Aw,jw,Mw,Nw,Pw,Fw,Iw,Lw=t((()=>{L(),M(),mf(),pf(),Cw=1e6,ww=`0`,Tw=`main`,Ew=``,Dw=``,Ow=``,kw=B.navigator&&B.navigator.userAgent||``,Aw=``,jw=B.navigator&&B.navigator.language||B.navigator&&B.navigator.languages&&B.navigator.languages[0]||``,Mw=B.navigator&&B.navigator.userAgentData,iw(Mw)&&Mw.getHighEntropyValues([`architecture`,`model`,`platform`,`platformVersion`,`fullVersionList`]).then(e=>{if(Ew=e.platform||``,Ow=e.architecture||``,Aw=e.model||``,Dw=e.platformVersion||``,e.fullVersionList&&e.fullVersionList.length>0){let t=e.fullVersionList[e.fullVersionList.length-1];kw=`${t.brand} ${t.version}`}}).catch(e=>void 0),Nw=new WeakMap,Pw=!1,Fw=3e4,Iw=new Map}));function Rw(e){return e?vw(e)?zw(e):e:(V&&A.log(`[Profiling] Transaction is undefined, skipping profiling`),e)}function zw(e){let t;lw(e)&&(t=ar()*1e3);let n=_w();if(!n)return e;V&&A.log(`[Profiling] started profiling transaction: ${P(e).description}`);let r=j();async function i(){return!e||!n?null:n.stop().then(t=>(a&&=(B.clearTimeout(a),void 0),V&&A.log(`[Profiling] stopped profiling of transaction: ${P(e).description}`),t?(Sw(r,t),null):(V&&A.log(`[Profiling] profiler returned null profile for: ${P(e).description}`,`this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started`),null))).catch(e=>(V&&A.log(`[Profiling] error while stopping profiler:`,e),null))}let a=B.setTimeout(()=>{V&&A.log(`[Profiling] max profile duration elapsed, stopping profiling for:`,P(e).description),i()},Fw),o=e.end.bind(e);function s(){return e?(i().then(()=>{e.setContext(`profile`,{profile_id:r,start_timestamp:t}),o()},()=>{o()}),e):o()}return e.end=s,e}var Bw=t((()=>{L(),M(),mf(),pf(),Lw()})),Vw,Hw,Uw,Ww,Gw=t((()=>{L(),M(),mf(),Bw(),Lw(),Vw=`BrowserProfiling`,Hw=(()=>({name:Vw,setupOnce(){},setup(e){let t=Ji().getTransaction();if(t&&lw(t)&&vw(t)&&zw(t),typeof e.on!=`function`){A.warn(`[Profiling] Client does not support hooks, profiling will be disabled`);return}e.on(`startTransaction`,e=>{vw(e)&&zw(e)}),e.on(`beforeEnvelope`,e=>{if(!bw())return;let t=fw(e);if(!t.length)return;let n=[];for(let e of t){let t=e&&e.contexts,r=t&&t.profile&&t.profile.profile_id,i=t&&t.profile&&t.profile.start_timestamp;if(typeof r!=`string`){V&&A.log(`[Profiling] cannot find profile for a transaction without a profile context`);continue}if(!r){V&&A.log(`[Profiling] cannot find profile for a transaction without a profile context`);continue}t&&t.profile&&delete t.profile;let a=xw(r);if(!a){V&&A.log(`[Profiling] Could not retrieve profile for transaction: ${r}`);continue}let o=yw(r,i,a,e);o&&n.push(o)}dw(e,n)})}})),Uw=cs(Hw),Ww=ss(Vw,Uw)})),Kw=r({Breadcrumbs:()=>Op,BrowserClient:()=>Mf,BrowserProfilingIntegration:()=>Ww,BrowserTracing:()=>qd,Dedupe:()=>Bp,Feedback:()=>MS,FunctionToString:()=>Zc,GlobalHandlers:()=>$p,HttpContext:()=>im,Hub:()=>Ma,InboundFilters:()=>Wc,Integrations:()=>Jw,LinkedErrors:()=>dm,ModuleMetadata:()=>Dc,Replay:()=>Ub,ReplayCanvas:()=>Mx,SDK_VERSION:()=>ba,SEMANTIC_ATTRIBUTE_SENTRY_OP:()=>vo,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:()=>yo,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:()=>_o,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:()=>go,Scope:()=>va,TryCatch:()=>xm,WINDOW:()=>B,addBreadcrumb:()=>Ni,addEventProcessor:()=>ks,addGlobalEventProcessor:()=>ti,addIntegration:()=>as,addTracingExtensions:()=>zo,breadcrumbsIntegration:()=>Dp,browserApiErrorsIntegration:()=>bm,browserProfilingIntegration:()=>Uw,browserTracingIntegration:()=>af,captureConsoleIntegration:()=>LS,captureEvent:()=>ji,captureException:()=>ki,captureMessage:()=>Ai,captureSession:()=>Qi,captureUserFeedback:()=>km,chromeStackLineParser:()=>$f,close:()=>Gi,configureScope:()=>Mi,contextLinesIntegration:()=>KC,continueTrace:()=>oo,createTransport:()=>Gs,createUserFeedbackEnvelope:()=>kf,debugIntegration:()=>VS,dedupeIntegration:()=>eC,defaultIntegrations:()=>Am,defaultRequestInstrumentationOptions:()=>Ld,defaultStackLineParsers:()=>pp,defaultStackParser:()=>mp,endSession:()=>Xi,eventFromException:()=>xf,eventFromMessage:()=>Sf,exceptionFromError:()=>hf,extraErrorDataIntegration:()=>oC,extractTraceparentData:()=>Fa,feedbackIntegration:()=>jS,flush:()=>Wi,forceLoad:()=>Tm,functionToStringIntegration:()=>Xc,geckoStackLineParser:()=>rp,getActiveSpan:()=>to,getActiveTransaction:()=>Pa,getClient:()=>F,getCurrentHub:()=>I,getCurrentScope:()=>Ji,getDefaultIntegrations:()=>Cm,getHubFromCarrier:()=>Oa,getReplay:()=>fy,getSpanStatusFromHttpCode:()=>Va,globalHandlersIntegration:()=>Qp,httpClientIntegration:()=>RC,httpContextIntegration:()=>rm,inboundFiltersIntegration:()=>Uc,init:()=>wm,instrumentOutgoingRequests:()=>Ed,isInitialized:()=>qi,lastEventId:()=>Ki,linkedErrorsIntegration:()=>um,makeBrowserOfflineTransport:()=>nw,makeFetchTransport:()=>Rf,makeMain:()=>Ca,makeMultiplexedTransport:()=>nc,makeXHRTransport:()=>Bf,metrics:()=>bl,moduleMetadataIntegration:()=>Ec,onLoad:()=>Em,onProfilingStartRouteTransaction:()=>Rw,opera10StackLineParser:()=>lp,opera11StackLineParser:()=>fp,parameterize:()=>pc,replayCanvasIntegration:()=>jx,replayIntegration:()=>Hb,reportingObserverIntegration:()=>fC,rewriteFramesIntegration:()=>gC,sendFeedback:()=>Ix,sessionTimingIntegration:()=>bC,setContext:()=>Pi,setCurrentClient:()=>Hs,setExtra:()=>Ii,setExtras:()=>Fi,setHttpStatus:()=>Ha,setMeasurement:()=>Vo,setTag:()=>Ri,setTags:()=>Li,setUser:()=>zi,showReportDialog:()=>jm,spanStatusfromHttpCode:()=>Wa,startBrowserTracingNavigationSpan:()=>Xd,startBrowserTracingPageLoadSpan:()=>Yd,startInactiveSpan:()=>eo,startSession:()=>Yi,startSpan:()=>Qa,startSpanManual:()=>$a,startTransaction:()=>Ui,trace:()=>Za,winjsStackLineParser:()=>op,withActiveSpan:()=>Hi,withIsolationScope:()=>Vi,withScope:()=>Bi,wrap:()=>Dm}),qw,Jw,Yw=t((()=>{L(),pf(),Nf(),zf(),Hf(),gp(),Of(),jf(),Mm(),kp(),Vp(),em(),am(),fm(),Sm(),Pm(),Wb(),Nx(),NS(),JC(),cf(),rw(),Bw(),Gw(),qw={},B.Sentry&&B.Sentry.Integrations&&(qw=B.Sentry.Integrations),Jw={...qw,...Sl,...Nm}}));Yw(),L();function Xw(e){let t={...e};hc(t,`react`),wm(t)}var Zw=i((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Qw=i(((e,t)=>{t.exports=Zw()})),$w=i(((e,t)=>{var n=Qw(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h})),eT=`ui.react.render`,tT=`ui.react.update`,nT=`ui.react.mount`;Yw(),L(),M();var rT=n($w()),iT=n(o()),aT=`/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx`,oT=class extends iT.Component{static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(e){super(e);let{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=eo({name:`<${t}>`,onlyIfParent:!0,op:nT,origin:`auto.ui.react.profiler`,attributes:{"ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){let t=Object.keys(e).filter(t=>e[t]!==this.props.updateProps[t]);if(t.length>0){let e=ar();this._updateSpan=Hi(this._mountSpan,()=>eo({name:`<${this.props.name}>`,onlyIfParent:!0,op:tT,origin:`auto.ui.react.profiler`,startTimestamp:e,attributes:{"ui.component_name":this.props.name,"ui.react.changed_props":t}}))}}return!0}componentDidUpdate(){this._updateSpan&&=(this._updateSpan.end(),void 0)}componentWillUnmount(){let e=ar(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){let n=P(this._mountSpan).timestamp;Hi(this._mountSpan,()=>{let r=eo({onlyIfParent:!0,name:`<${t}>`,op:eT,origin:`auto.ui.react.profiler`,startTimestamp:n,attributes:{"ui.component_name":t}});r&&r.end(e)})}}render(){return this.props.children}};oT.__initStatic();function sT(e,t){let n=t&&t.name||e.displayName||e.name||`unknown`,r=r=>iT.createElement(oT,{...t,name:n,updateProps:r,__self:this,__source:{fileName:aT,lineNumber:159}},iT.createElement(e,{...r,__self:this,__source:{fileName:aT,lineNumber:160}}));return r.displayName=`profiler(${n})`,(0,rT.default)(r,e),r}var cT=Object.prototype.toString;function lT(e,t){return cT.call(e)===`[object ${t}]`}function uT(e){return lT(e,`String`)}function dT(e){return lT(e,`Object`)}function fT(e){return lT(e,`RegExp`)}function pT(e){return!!(e&&e.then&&typeof e.then==`function`)}function mT(e){return typeof e==`number`&&e!==e}function hT(e,t){try{return e instanceof t}catch{return!1}}function gT(e,t,n=!1){return uT(e)?fT(t)?t.test(e):uT(t)?n?e===t:e.includes(t):!1:!1}function _T(e,t=[],n=!1){return t.some(t=>gT(e,t,n))}function vT(e){return e&&e.Math==Math?e:void 0}var yT=typeof globalThis==`object`&&vT(globalThis)||typeof window==`object`&&vT(window)||typeof self==`object`&&vT(self)||typeof global==`object`&&vT(global)||(function(){return this})()||{};function bT(){return yT}function xT(e,t,n){let r=n||yT,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}var ST=bT(),CT=80;function wT(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||CT;for(;n&&i++<5&&(o=TT(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function TT(e,t){let n=e,r=[],i,a,o,s,c;if(!n||!n.tagName)return``;if(ST.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(l&&l.length)l.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&uT(i))for(a=i.split(/\s+/),c=0;c<a.length;c++)r.push(`.${a[c]}`);let u=[`aria-label`,`type`,`name`,`title`,`alt`];for(c=0;c<u.length;c++)o=u[c],s=n.getAttribute(o),s&&r.push(`[${o}="${s}"]`);return r.join(``)}function ET(e){return ST.document&&ST.document.querySelector?ST.document.querySelector(e):null}function DT(e){if(!ST.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}var OT=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,kT=`Sentry Logger `,AT=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],jT={};function MT(e){if(!(`console`in yT))return e();let t=yT.console,n={},r=Object.keys(jT);r.forEach(e=>{let r=jT[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function NT(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return OT?AT.forEach(n=>{t[n]=(...t)=>{e&&MT(()=>{yT.console[n](`${kT}[${n}]:`,...t)})}}):AT.forEach(e=>{t[e]=()=>void 0}),t}var J=NT();function PT(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function FT(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i==`function`&&LT(i,r),e[t]=i}function IT(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{OT&&J.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function LT(e,t){try{e.prototype=t.prototype=t.prototype||{},IT(e,`__sentry_original__`,t)}catch{}}function RT(e){return zT(e,new Map)}function zT(e,t){if(BT(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let n of Object.keys(e))e[n]!==void 0&&(r[n]=zT(e[n],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(e=>{r.push(zT(e,t))}),r}return e}function BT(e){if(!dT(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t===`Object`}catch{return!0}}var VT=`<anonymous>`;function HT(e){try{return!e||typeof e!=`function`?VT:e.name||VT}catch{return VT}}var UT={},WT={};function GT(e,t){UT[e]=UT[e]||[],UT[e].push(t)}function KT(e,t){WT[e]||(t(),WT[e]=!0)}function qT(e,t){let n=e&&UT[e];if(n)for(let r of n)try{r(t)}catch(t){OT&&J.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${HT(r)}\nError:`,t)}}function JT(){let e=yT,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,``);t&&t.getRandomValues&&(n=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return`10000000100040008000100000000000`.replace(/[018]/g,e=>(e^(n()&15)>>e/4).toString(16))}function YT(e){return Array.isArray(e)?e:[e]}var XT=bT();function ZT(){if(!(`fetch`in XT))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}function QT(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function $T(){if(typeof EdgeRuntime==`string`)return!0;if(!ZT())return!1;if(QT(XT.fetch))return!0;let e=!1,t=XT.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=QT(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){OT&&J.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function eE(e){let t=`fetch`;GT(t,e),KT(t,tE)}function tE(){$T()&&FT(yT,`fetch`,function(e){return function(...t){let{method:n,url:r}=iE(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return qT(`fetch`,{...i}),e.apply(yT,t).then(e=>(qT(`fetch`,{...i,endTimestamp:Date.now(),response:e}),e),e=>{throw qT(`fetch`,{...i,endTimestamp:Date.now(),error:e}),e})}})}function nE(e,t){return!!e&&typeof e==`object`&&!!e[t]}function rE(e){return typeof e==`string`?e:e?nE(e,`url`)?e.url:e.toString?e.toString():``:``}function iE(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:rE(t),method:nE(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:rE(t),method:nE(t,`method`)?String(t.method).toUpperCase():`GET`}}var aE=null;function oE(e){let t=`error`;GT(t,e),KT(t,sE)}function sE(){aE=yT.onerror,yT.onerror=function(e,t,n,r,i){return qT(`error`,{column:r,error:i,line:n,msg:e,url:t}),aE&&!aE.__SENTRY_LOADER__?aE.apply(this,arguments):!1},yT.onerror.__SENTRY_INSTRUMENTED__=!0}var cE=null;function lE(e){let t=`unhandledrejection`;GT(t,e),KT(t,uE)}function uE(){cE=yT.onunhandledrejection,yT.onunhandledrejection=function(e){return qT(`unhandledrejection`,e),cE&&!cE.__SENTRY_LOADER__?cE.apply(this,arguments):!0},yT.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var dE=bT();function fE(){let e=dE.chrome,t=e&&e.app&&e.app.runtime,n=`history`in dE&&!!dE.history.pushState&&!!dE.history.replaceState;return!t&&n}var pE=yT,mE;function hE(e){let t=`history`;GT(t,e),KT(t,gE)}function gE(){if(!fE())return;let e=pE.onpopstate;pE.onpopstate=function(...t){let n=pE.location.href,r=mE;if(mE=n,qT(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}};function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=mE,t=String(n);mE=t,qT(`history`,{from:e,to:t})}return e.apply(this,t)}}FT(pE.history,`pushState`,t),FT(pE.history,`replaceState`,t)}var _E=yT,vE=`__sentry_xhr_v3__`;function yE(e){GT(`xhr`,e),KT(`xhr`,bE)}function bE(){if(!_E.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;FT(e,`open`,function(e){return function(...t){let n=Date.now(),r=uT(t[0])?t[0].toUpperCase():void 0,i=xE(t[1]);if(!r||!i)return e.apply(this,t);this[vE]={method:r,url:i,request_headers:{}},r===`POST`&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let e=this[vE];if(e&&this.readyState===4){try{e.status_code=this.status}catch{}qT(`xhr`,{args:[r,i],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return`onreadystatechange`in this&&typeof this.onreadystatechange==`function`?FT(this,`onreadystatechange`,function(e){return function(...t){return a(),e.apply(this,t)}}):this.addEventListener(`readystatechange`,a),FT(this,`setRequestHeader`,function(e){return function(...t){let[n,r]=t,i=this[vE];return i&&uT(n)&&uT(r)&&(i.request_headers[n.toLowerCase()]=r),e.apply(this,t)}}),e.apply(this,t)}}),FT(e,`send`,function(e){return function(...t){let n=this[vE];return n?(t[0]!==void 0&&(n.body=t[0]),qT(`xhr`,{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),e.apply(this,t)):e.apply(this,t)}})}function xE(e){if(uT(e))return e;try{return e.toString()}catch{}}function SE(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function CE(){return!SE()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function wE(e,t){return e.require(t)}function TE(e){let t;try{t=wE(module,e)}catch{}try{let{cwd:n}=wE(module,`process`);t=wE(module,`${n()}/node_modules/${e}`)}catch{}return t}var EE;(function(e){e[e.PENDING=0]=`PENDING`,e[e.RESOLVED=1]=`RESOLVED`,e[e.REJECTED=2]=`REJECTED`})(EE||={});var DE=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=EE.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}__init(){this._resolve=e=>{this._setResult(EE.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(EE.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===EE.PENDING){if(pT(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===EE.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===EE.RESOLVED&&e[1](this._value),this._state===EE.REJECTED&&e[2](this._value),!0)})}}};function OE(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function kE(e){return e.split(/[\?#]/,1)[0]}function AE(e){return e.split(/\\?\//).filter(e=>e.length>0&&e!==`,`).length}function jE(e,t={}){let n=e.method&&e.method.toUpperCase(),r=``,i=`url`;t.customRoute||e.route?(r=t.customRoute||`${e.baseUrl||``}${e.route&&e.route.path}`,i=`route`):(e.originalUrl||e.url)&&(r=kE(e.originalUrl||e.url||``));let a=``;return t.method&&n&&(a+=n),t.method&&t.path&&(a+=` `),t.path&&r&&(a+=r),[a,i]}var ME=1e3;function NE(){return Date.now()/ME}function PE(){let{performance:e}=yT;if(!e||!e.now)return NE;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/ME}var FE=PE(),IE=(()=>{let{performance:e}=yT;if(!e||!e.now)return;let t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,o=e.timing&&e.timing.navigationStart,s=typeof o==`number`?Math.abs(o+n-r):t;return a||s<t?i<=s?e.timeOrigin:o:r})(),LE=`baggage`,RE=`sentry-`,zE=/^sentry-/;function BE(e){if(!uT(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((e,t)=>{let n=HE(t);for(let t of Object.keys(n))e[t]=n[t];return e},{});else{if(!e)return;t=HE(e)}let n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(zE)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function VE(e){if(e)return UE(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${RE}${t}`]=n),e),{}))}function HE(e){return e.split(`,`).map(e=>e.split(`=`).map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(e[t]=n,e),{})}function UE(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,n],r)=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,a=r===0?i:`${e},${i}`;return a.length>8192?(OT&&J.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a},``)}var WE=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function GE(e){if(!e)return;let t=e.match(WE);if(!t)return;let n;return t[3]===`1`?n=!0:t[3]===`0`&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function KE(e,t){let n=GE(e),r=BE(t),{traceId:i,parentSpanId:a,parentSampled:o}=n||{};return n?{traceId:i||JT(),parentSpanId:a||JT().substring(16),spanId:JT().substring(16),sampled:o,dsc:r||{}}:{traceId:i||JT(),spanId:JT().substring(16)}}function qE(e=JT(),t=JT().substring(16),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function JE(e,t=[]){return[e,t]}function Y(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var X=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,YE=`production`;function XE(){return xT(`globalEventProcessors`,()=>[])}function ZE(e,t,n,r=0){return new DE((i,a)=>{let o=e[r];if(t===null||typeof o!=`function`)i(t);else{let s=o({...t},n);X&&o.id&&s===null&&J.log(`Event processor "${o.id}" dropped event`),pT(s)?s.then(t=>ZE(e,t,n,r+1).then(i)).then(null,a):ZE(e,s,n,r+1).then(i).then(null,a)}})}function QE(e){let t=FE(),n={sid:JT(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>tD(n)};return e&&$E(n,e),n}function $E(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||FE(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:JT()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function eD(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),$E(e,n)}function tD(e){return RT({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function nD(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,tags:s,origin:c}=oD(e);return RT({data:r,op:i,parent_span_id:a,span_id:t,status:o,tags:s,trace_id:n,origin:c})}function rD(e){let{traceId:t,spanId:n}=e.spanContext();return qE(t,n,cD(e))}function iD(e){return typeof e==`number`?aD(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?aD(e.getTime()):FE()}function aD(e){return e>9999999999?e/1e3:e}function oD(e){return sD(e)?e.getSpanJSON():typeof e.toJSON==`function`?e.toJSON():{}}function sD(e){return typeof e.getSpanJSON==`function`}function cD(e){let{traceFlags:t}=e.spanContext();return!!(t&1)}function lD(...e){let t=kD();if(e.length===2){let[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function uD(){return kD().getClient()}function dD(){return kD().getScope()}function fD(e){return e.transaction}function pD(e,t,n){let r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=n&&n.getUser()||{},o=RT({environment:r.environment||`production`,release:r.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit(`createDsc`,o),o}function mD(e){let t=uD();if(!t)return{};let n=pD(oD(e).trace_id||``,t,dD()),r=fD(e);if(!r)return n;let i=r&&r._frozenDynamicSamplingContext;if(i)return i;let{sampleRate:a,source:o}=r.metadata;a!=null&&(n.sample_rate=`${a}`);let s=oD(r);return o&&o!==`url`&&(n.transaction=s.description),n.sampled=String(cD(r)),t.emit&&t.emit(`createDsc`,n),n}function hD(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;gD(e,t),r&&yD(e,r),bD(e,n),_D(e,i),vD(e,a)}function gD(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t,c=RT(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=RT(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=RT(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=RT(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),s&&(e.transaction=s)}function _D(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function vD(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function yD(e,t){e.contexts={trace:nD(t),...e.contexts};let n=fD(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:mD(t),...e.sdkProcessingMetadata};let r=oD(n).description;r&&(e.tags={transaction:r,...e.tags})}}function bD(e,t){e.fingerprint=e.fingerprint?YT(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}var xD=100,SD=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=CD()}static clone(t){return t?t.clone():new e}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(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&&$E(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,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},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,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let 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(t){if(!t)return this;let n=typeof t==`function`?t(this):t;if(n instanceof e){let e=n.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else if(dT(n)){let e=t;this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.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=CD(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:xD;if(n<=0)return this;let r={timestamp:NE(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,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(){let{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:i,_user:a,_level:o,_fingerprint:s,_eventProcessors:c,_propagationContext:l,_sdkProcessingMetadata:u,_transactionName:d,_span:f}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:i,user:a,level:o,fingerprint:s||[],eventProcessors:c,propagationContext:l,sdkProcessingMetadata:u,transactionName:d,span:f}}applyToEvent(e,t={},n=[]){return hD(e,this.getScopeData()),ZE([...n,...XE(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:JT();if(!this._client)return J.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n&&n.event_id?n.event_id:JT();if(!this._client)return J.warn(`No client configured on scope - will not capture message!`),r;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:JT();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(J.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function CD(){return{traceId:JT(),spanId:JT().substring(16)}}var wD=7.114,TD=100,ED=class{constructor(e,t,n,r=wD){this._version=r;let i;t?i=t:(i=new SD,i.setClient(e));let a;n?a=n:(a=new SD,a.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=a}isOlderThan(e){return this._version<e}bindClient(e){let t=this.getStackTop();t.client=e,t.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let 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){let t=this.pushScope(),n;try{n=e(t)}catch(e){throw this.popScope(),e}return pT(n)?n.then(e=>(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),n)}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,t){let n=this._lastEventId=t&&t.event_id?t.event_id:JT(),r=Error(`Sentry syntheticException`);return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:JT(),i=Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r}),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:JT();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:n,client:r}=this.getStackTop();if(!r)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=TD}=r.getOptions&&r.getOptions()||{};if(a<=0)return;let o={timestamp:NE(),...e},s=i?MT(()=>i(o,t)):o;s!==null&&(r.emit&&r.emit(`beforeAddBreadcrumb`,s,t),n.addBreadcrumb(s,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,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){let{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){let t=OD(this);try{e(this)}finally{OD(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return X&&J.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){let n=this._callExtensionMethod(`startTransaction`,e,t);return X&&!n&&(this.getClient()?J.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):J.warn(`Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'`)),n}traceHeaders(){return this._callExtensionMethod(`traceHeaders`)}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop().scope,t=e.getSession();t&&eD(t),this._sendSessionUpdate(),e.setSession()}startSession(e){let{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=YE}=n&&n.getOptions()||{},{userAgent:a}=yT.navigator||{},o=QE({release:r,environment:i,user:t.getUser(),...a&&{userAgent:a},...e}),s=t.getSession&&t.getSession();return s&&s.status===`ok`&&$E(s,{status:`exited`}),this.endSession(),t.setSession(o),o}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){let n=DD().__SENTRY__;if(n&&n.extensions&&typeof n.extensions[e]==`function`)return n.extensions[e].apply(this,t);X&&J.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function DD(){return yT.__SENTRY__=yT.__SENTRY__||{extensions:{},hub:void 0},yT}function OD(e){let t=DD(),n=PD(t);return FD(t,e),n}function kD(){let e=DD();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return jD(e)}function AD(){return kD().getIsolationScope()}function jD(e=DD()){return(!ND(e)||PD(e).isOlderThan(wD))&&FD(e,new ED),PD(e)}function MD(e,t={}){let n=DD();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(e,t):e()}function ND(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function PD(e){return xT(`hub`,()=>new ED,e)}function FD(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function ID(e){return(e||kD()).getScope().getTransaction()}var LD=!1;function RD(){LD||(LD=!0,oE(zD),lE(zD))}function zD(){let e=ID();if(e){let t=`internal_error`;X&&J.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}zD.tag=`sentry_tracingErrorCallback`;var BD;(function(e){e.Ok=`ok`,e.DeadlineExceeded=`deadline_exceeded`,e.Unauthenticated=`unauthenticated`,e.PermissionDenied=`permission_denied`,e.NotFound=`not_found`,e.ResourceExhausted=`resource_exhausted`,e.InvalidArgument=`invalid_argument`,e.Unimplemented=`unimplemented`,e.Unavailable=`unavailable`,e.InternalError=`internal_error`,e.UnknownError=`unknown_error`,e.Cancelled=`cancelled`,e.AlreadyExists=`already_exists`,e.FailedPrecondition=`failed_precondition`,e.Aborted=`aborted`,e.OutOfRange=`out_of_range`,e.DataLoss=`data_loss`})(BD||={});function VD(e){if(e<400&&e>=100)return`ok`;if(e>=400&&e<500)switch(e){case 401:return`unauthenticated`;case 403:return`permission_denied`;case 404:return`not_found`;case 409:return`already_exists`;case 413:return`failed_precondition`;case 429:return`resource_exhausted`;default:return`invalid_argument`}if(e>=500&&e<600)switch(e){case 501:return`unimplemented`;case 503:return`unavailable`;case 504:return`deadline_exceeded`;default:return`internal_error`}return`unknown_error`}function HD(e,t){e.setTag(`http.status_code`,String(t)),e.setData(`http.response.status_code`,t);let n=VD(t);n!==`unknown_error`&&e.setStatus(n)}function UD(e,t,n=()=>{}){let r;try{r=e()}catch(e){throw t(e),n(),e}return WD(r,t,n)}function WD(e,t,n){return pT(e)?e.then(e=>(n(),e),e=>{throw t(e),n(),e}):(n(),e)}function GD(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=uD(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||`tracesSampleRate`in n||`tracesSampler`in n)}function KD(e,t){let n=XD(e);return MD(()=>lD(e.scope,r=>{let i=kD(),a=r.getSpan(),o=e.onlyIfParent&&!a?void 0:YD(i,{parentSpan:a,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return UD(()=>t(o),()=>{if(o){let{status:e}=oD(o);(!e||e===`ok`)&&o.setStatus(`internal_error`)}},()=>o&&o.end())}))}function qD(e){if(!GD())return;let t=XD(e),n=kD(),r=e.scope?e.scope.getSpan():JD();if(e.onlyIfParent&&!r)return;let i=(e.scope||dD()).clone();return YD(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:i})}function JD(){return dD().getSpan()}function YD(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:i}){if(!GD())return;let a=AD(),o;if(t&&!r)o=t.startChild(n);else if(t){let r=mD(t),{traceId:i,spanId:a}=t.spanContext(),s=cD(t);o=e.startTransaction({traceId:i,parentSpanId:a,parentSampled:s,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}else{let{traceId:t,dsc:r,parentSpanId:s,sampled:c}={...a.getPropagationContext(),...i.getPropagationContext()};o=e.startTransaction({traceId:t,parentSpanId:s,parentSampled:c,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}return i.setSpan(o),$D(o,i,a),o}function XD(e){if(e.startTime){let t={...e};return t.startTimestamp=iD(e.startTime),delete t.startTime,t}return e}var ZD=`_sentryScope`,QD=`_sentryIsolationScope`;function $D(e,t,n){e&&(IT(e,QD,n),IT(e,ZD,t))}function eO(e){return{scope:e[ZD],isolationScope:e[QD]}}var tO;function nO(e){return tO?tO.get(e):void 0}function rO(e){let t=nO(e);if(!t)return;let n={};for(let[,[e,r]]of t)n[e]||(n[e]=[]),n[e].push(RT(r));return n}var iO=`sentry.source`,aO=`sentry.sample_rate`,oO=`sentry.op`,sO=`sentry.origin`,cO=`profile_id`,lO=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},uO=class e{constructor(e={}){this._traceId=e.traceId||JT(),this._spanId=e.spanId||JT().substring(16),this._startTime=e.startTimestamp||FE(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||`sentry`,this._attributes={},this.setAttributes({[sO]:e.origin||`manual`,[oO]: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[oO]}set op(e){this.setAttribute(oO,e)}get origin(){return this._attributes[sO]}set origin(e){this.setAttribute(sO,e)}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}startChild(t){let n=new e({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);let r=fD(this);if(n.transaction=r,X&&r){let e=`[Tracing] Starting '${t&&t.op||`< unknown op >`}' span on transaction '${oD(n).description||`< unknown name >`}' (${r.spanContext().spanId}).`;J.log(e),this._logMessage=e}return n}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setAttribute(e,t){t===void 0?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach(t=>this.setAttribute(t,e[t]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return HD(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;let t=fD(this);if(X&&t&&t.spanContext().spanId!==this._spanId){let e=this._logMessage;e&&J.log(e.replace(`Starting`,`Finishing`))}this._endTime=iD(e)}toTraceparent(){return rD(this)}toContext(){return RT({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 nD(this)}getSpanJSON(){return RT({data:this._getData(),description:this._name,op:this._attributes[oO],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[sO],_metrics_summary:rO(this),profile_id:this._attributes[cO],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){let{data:e,_attributes:t}=this,n=Object.keys(e).length>0,r=Object.keys(t).length>0;if(!(!n&&!r))return n&&r?{...e,...t}:n?e:t}},dO=class extends uO{constructor(e,t){super(e),this._contexts={},this._hub=t||kD(),this._name=e.name||``,this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;let n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:`custom`,spanMetadata:{},...this._metadata,...this._attributes[`sentry.source`]&&{source:this._attributes[`sentry.source`]},...this._attributes[`sentry.sample_rate`]&&{sampleRate:this._attributes[`sentry.sample_rate`]}}}set metadata(e){this._metadata=e}setName(e,t=`custom`){this._name=e,this.setAttribute(iO,t)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||=new lO(e),this.spanRecorder.add(this)}setContext(e,t){t===null?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=``){this._measurements[e]={value:t,unit:n}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){let t=iD(e),n=this._finishTransaction(t);if(n)return this._hub.captureEvent(n)}toContext(){return RT({...super.toContext(),name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||``,this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return mD(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||=(X&&J.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`),super.end(e);let t=this._hub.getClient();if(t&&t.emit&&t.emit(`finishTransaction`,this),this._sampled!==!0){X&&J.log(`[Tracing] Discarding transaction because its trace was not chosen to be sampled.`),t&&t.recordDroppedEvent(`sample_rate`,`transaction`);return}let n=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&oD(e).timestamp):[];this._trimEnd&&n.length>0&&(this._endTime=n.map(e=>oD(e).timestamp).filter(Boolean).reduce((e,t)=>e>t?e:t));let{scope:r,isolationScope:i}=eO(this),{metadata:a}=this,{source:o}=a,s={contexts:{...this._contexts,trace:nD(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{...a,capturedSpanScope:r,capturedSpanIsolationScope:i,...RT({dynamicSamplingContext:mD(this)})},_metrics_summary:rO(this),...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(X&&J.log(`[Measurements] Adding measurements to transaction`,JSON.stringify(this._measurements,void 0,2)),s.measurements=this._measurements),X&&J.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),s}},fO={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},pO=`finishReason`,mO=[`heartbeatFailed`,`idleTimeout`,`documentHidden`,`finalTimeout`,`externalFinish`,`cancelled`],hO=class extends lO{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){if(e.spanContext().spanId!==this.transactionSpanId){let t=e.end;e.end=(...n)=>(this._popActivity(e.spanContext().spanId),t.apply(e,n)),oD(e).timestamp===void 0&&this._pushActivity(e.spanContext().spanId)}super.add(e)}},gO=class extends dO{constructor(e,t,n=fO.idleTimeout,r=fO.finalTimeout,i=fO.heartbeatInterval,a=!1,o=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=mO[4],this._autoFinishAllowed=!o,a&&(X&&J.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),t.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus(`deadline_exceeded`),this._finishReason=mO[3],this.end())},this._finalTimeout)}end(e){let t=iD(e);if(this._finished=!0,this.activities={},this.op===`ui.action.click`&&this.setAttribute(pO,this._finishReason),this.spanRecorder){X&&J.log(`[Tracing] finishing IdleTransaction`,new Date(t*1e3).toISOString(),this.op);for(let e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanContext().spanId===this.spanContext().spanId)return!0;oD(e).timestamp||(e.setStatus(`cancelled`),e.end(t),X&&J.log(`[Tracing] cancelling span since transaction ended early`,JSON.stringify(e,void 0,2)));let{start_timestamp:n,timestamp:r}=oD(e),i=n&&n<t,a=(this._finalTimeout+this._idleTimeout)/1e3,o=r&&n&&r-n<a;if(X){let t=JSON.stringify(e,void 0,2);i?o||J.log(`[Tracing] discarding Span since it finished after Transaction final timeout`,t):J.log(`[Tracing] discarding Span since it happened after Transaction was finished`,t)}return i&&o}),X&&J.log(`[Tracing] flushing IdleTransaction`)}else X&&J.log(`[Tracing] No active IdleTransaction`);if(this._onScope){let e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){this.spanRecorder||(this.spanRecorder=new hO(e=>{this._finished||this._pushActivity(e)},e=>{this._finished||this._popActivity(e)},this.spanContext().spanId,e),X&&J.log(`Starting heartbeat`),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=t===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=mO[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||=(X&&J.log(`[Tracing] Received finish signal for idle transaction.`),this._restartIdleTimeout(),!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=mO[1],this.end(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),X&&J.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,X&&J.log(`[Tracing] new activities count`,Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(X&&J.log(`[Tracing] popActivity ${e}`),delete this.activities[e],X&&J.log(`[Tracing] new activities count`,Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let e=FE();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=mO[5],this.end(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join(``);e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(X&&J.log(`[Tracing] Transaction finished because of no change for 3 heart beats`),this.setStatus(`deadline_exceeded`),this._finishReason=mO[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){X&&J.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function _O(e,t,n){if(!GD(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(aO,Number(e.sampled)),e;let r;return typeof t.tracesSampler==`function`?(r=t.tracesSampler(n),e.setAttribute(aO,Number(r))):n.parentSampled===void 0?t.tracesSampleRate===void 0?(r=1,e.setAttribute(aO,r)):(r=t.tracesSampleRate,e.setAttribute(aO,Number(r))):r=n.parentSampled,vO(r)?r?(e.sampled=Math.random()<r,e.sampled?(X&&J.log(`[Tracing] starting ${e.op} transaction - ${oD(e).description}`),e):(X&&J.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(X&&J.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),e.sampled=!1,e):(X&&J.warn(`[Tracing] Discarding transaction because of invalid sample rate.`),e.sampled=!1,e)}function vO(e){return mT(e)||!(typeof e==`number`||typeof e==`boolean`)?(X&&J.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(X&&J.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function yO(){let e=this.getScope().getSpan();return e?{"sentry-trace":rD(e)}:{}}function bO(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||`sentry`,a=e.instrumenter||`sentry`;i!==a&&(X&&J.error(`A transaction was started with instrumenter=\`${a}\`, but the SDK is configured with the \`${i}\` instrumenter.
The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let o=new dO(e,this);return o=_O(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit(`startTransaction`,o),o}function xO(e,t,n,r,i,a,o,s=!1){let c=e.getClient(),l=c&&c.getOptions()||{},u=new gO(t,e,n,r,o,i,s);return u=_O(u,l,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...a}),u.isRecording()&&u.initSpanRecorder(l._experiments&&l._experiments.maxSpans),c&&c.emit&&c.emit(`startTransaction`,u),u}function SO(){let e=DD();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=bO),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=yO),RD())}function CO(e,t,n){let r=ID();r&&r.setMeasurement(e,t,n)}function wO(e,t){let n={sent_at:new Date().toISOString()};return t&&(n.dsn=PT(t)),JE(n,e.map(TO))}function TO(e){return[{type:`span`},e]}var Z=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function EO(e){return(Y([Y([e,`call`,e=>e(),`access`,e=>e.getClient,`call`,e=>e(),`optionalAccess`,e=>e.getOptions,`call`,e=>e()]),`optionalAccess`,e=>e.instrumenter])||`sentry`)!==`sentry`}var DO=class e{static __initStatic(){this.id=`Express`}constructor(t={}){this.name=e.id,this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat(`use`)}setupOnce(e,t){if(!this._router){Z&&J.error(`ExpressIntegration is missing an Express instance`);return}if(EO(t)){Z&&J.log(`Express Integration is skipped because of instrumenter configuration.`);return}jO(this._router,this._methods),MO(this._router)}};DO.__initStatic();function OO(e,t){let n=e.length;switch(n){case 2:return function(n,r){let i=r.__sentry_transaction;if(i){let n=i.startChild({description:e.name,op:`middleware.express.${t}`,origin:`auto.middleware.express`});r.once(`finish`,()=>{n.end()})}return e.call(this,n,r)};case 3:return function(n,r,i){let a=r.__sentry_transaction,o=Y([a,`optionalAccess`,e=>e.startChild,`call`,n=>n({description:e.name,op:`middleware.express.${t}`,origin:`auto.middleware.express`})]);e.call(this,n,r,function(...e){Y([o,`optionalAccess`,e=>e.end,`call`,e=>e()]),i.call(this,...e)})};case 4:return function(n,r,i,a){let o=i.__sentry_transaction,s=Y([o,`optionalAccess`,e=>e.startChild,`call`,n=>n({description:e.name,op:`middleware.express.${t}`,origin:`auto.middleware.express`})]);e.call(this,n,r,i,function(...e){Y([s,`optionalAccess`,e=>e.end,`call`,e=>e()]),a.call(this,...e)})};default:throw Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}function kO(e,t){return e.map(e=>typeof e==`function`?OO(e,t):Array.isArray(e)?e.map(e=>typeof e==`function`?OO(e,t):e):e)}function AO(e,t){let n=e[t];return e[t]=function(...e){return n.call(this,...kO(e,t))},e}function jO(e,t=[]){t.forEach(t=>AO(e,t))}function MO(e){let t=`settings`in e;t&&e._router===void 0&&e.lazyrouter&&e.lazyrouter();let n=t?e._router:e;if(!n){Z&&J.debug(`Cannot instrument router for URL Parameterization (did not find a valid router).`),Z&&J.debug(`Routing instrumentation is currently only supported in Express 4.`);return}let r=Object.getPrototypeOf(n),i=r.process_params;r.process_params=function(e,t,n,r,a){n._reconstructedRoute||=``;let{layerRoutePath:o,isRegex:s,isArray:c,numExtraSegments:l}=PO(e);(o||s||c)&&(n._hasParameters=!0);let u;u=o||LO(n.originalUrl,n._reconstructedRoute,e.path)||``;let d=u.split(`/`).filter(e=>e.length>0&&(s||c||!e.includes(`*`))).join(`/`);if(d&&d.length>0&&(n._reconstructedRoute+=`/${d}${s?`/`:``}`),AE(kE(n.originalUrl||``))+l===AE(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl?kE(n.originalUrl):n.originalUrl);let e=r.__sentry_transaction,t=e&&oD(e).data||{};if(e&&t[`sentry.source`]!==`custom`){let[t,r]=jE(n,{path:!0,method:!0,customRoute:n._reconstructedRoute||`/`});e.updateName(t),e.setAttribute(iO,r)}}return i.call(this,e,t,n,r,a)}}var NO=(e,t,n)=>{if(!e||!t||!n||Object.keys(n).length===0||!Y([n,`access`,e=>e[0],`optionalAccess`,e=>e.offset]))return;let r=n.sort((e,t)=>e.offset-t.offset),i=new RegExp(t,`${t.flags}d`).exec(e);if(!i||!i.indices)return;let[,...a]=i.indices;if(a.length!==r.length)return;let o=e,s=0;return a.forEach((e,t)=>{if(e){let[n,i]=e,a=o.substring(0,n-s),c=`:${r[t].name}`,l=o.substring(i-s);o=a+c+l,s+=i-n-c.length}}),o};function PO(e){let t=Y([e,`access`,e=>e.route,`optionalAccess`,e=>e.path]),n=fT(t),r=Array.isArray(t);if(!t){let[n]=yT.process.versions.node.split(`.`).map(Number);n>=16&&(t=NO(e.path,e.regexp,e.keys))}if(!t)return{isRegex:n,isArray:r,numExtraSegments:0};let i=r?Math.max(FO(t)-AE(e.path||``),0):0;return{layerRoutePath:IO(r,t),isRegex:n,isArray:r,numExtraSegments:i}}function FO(e){return e.reduce((e,t)=>e+AE(t.toString()),0)}function IO(e,t){return e?t.map(e=>e.toString()).join(`,`):t&&t.toString()}function LO(e,t,n){let r=Y([kE(e||``),`optionalAccess`,e=>e.split,`call`,e=>e(`/`),`access`,e=>e.filter,`call`,e=>e(e=>!!e)]),i=0,a=Y([t,`optionalAccess`,e=>e.split,`call`,e=>e(`/`),`access`,e=>e.filter,`call`,e=>e(e=>!!e),`access`,e=>e.length])||0;return Y([n,`optionalAccess`,e=>e.split,`call`,e=>e(`/`),`access`,e=>e.filter,`call`,e=>e(e=>Y([r,`optionalAccess`,e=>e[a+i]])===e?(i+=1,!0):!1),`access`,e=>e.join,`call`,e=>e(`/`)])}var RO=class e{static __initStatic(){this.id=`Postgres`}constructor(t={}){this.name=e.id,this._usePgNative=!!t.usePgNative,this._module=t.module}loadDependency(){return this._module=this._module||TE(`pg`)}setupOnce(e,t){if(EO(t)){Z&&J.log(`Postgres Integration is skipped because of instrumenter configuration.`);return}let n=this.loadDependency();if(!n){Z&&J.error("Postgres Integration was unable to require `pg` package.");return}let r=this._usePgNative?Y([n,`access`,e=>e.native,`optionalAccess`,e=>e.Client]):n.Client;if(!r){Z&&J.error(`Postgres Integration was unable to access 'pg-native' bindings.`);return}FT(r.prototype,`query`,function(e){return function(n,r,i){let a=t().getScope().getSpan(),o={"db.system":`postgresql`};try{this.database&&(o[`db.name`]=this.database),this.host&&(o[`server.address`]=this.host),this.port&&(o[`server.port`]=this.port),this.user&&(o[`db.user`]=this.user)}catch{}let s=Y([a,`optionalAccess`,e=>e.startChild,`call`,e=>e({description:typeof n==`string`?n:n.text,op:`db`,origin:`auto.db.postgres`,data:o})]);if(typeof i==`function`)return e.call(this,n,r,function(e,t){Y([s,`optionalAccess`,e=>e.end,`call`,e=>e()]),i(e,t)});if(typeof r==`function`)return e.call(this,n,function(e,t){Y([s,`optionalAccess`,e=>e.end,`call`,e=>e()]),r(e,t)});let c=r===void 0?e.call(this,n):e.call(this,n,r);return pT(c)?c.then(e=>(Y([s,`optionalAccess`,e=>e.end,`call`,e=>e()]),e)):(Y([s,`optionalAccess`,e=>e.end,`call`,e=>e()]),c)}})}};RO.__initStatic();var zO=class e{static __initStatic(){this.id=`Mysql`}constructor(){this.name=e.id}loadDependency(){return this._module=this._module||TE(`mysql/lib/Connection.js`)}setupOnce(e,t){if(EO(t)){Z&&J.log(`Mysql Integration is skipped because of instrumenter configuration.`);return}let n=this.loadDependency();if(!n){Z&&J.error("Mysql Integration was unable to require `mysql` package.");return}let r;try{n.prototype.connect=new Proxy(n.prototype.connect,{apply(e,t,n){return r||=t.config,e.apply(t,n)}})}catch{Z&&J.error("Mysql Integration was unable to instrument `mysql` config.")}function i(){return r?{"server.address":r.host,"server.port":r.port,"db.user":r.user}:{}}function a(e){if(!e)return;let t=i();Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),e.end()}FT(n,`createQuery`,function(e){return function(n,r,i){let o=Y([t().getScope().getSpan(),`optionalAccess`,e=>e.startChild,`call`,e=>e({description:typeof n==`string`?n:n.sql,op:`db`,origin:`auto.db.mysql`,data:{"db.system":`mysql`}})]);if(typeof i==`function`)return e.call(this,n,r,function(e,t,n){a(o),i(e,t,n)});if(typeof r==`function`)return e.call(this,n,function(e,t,n){a(o),r(e,t,n)});let s=e.call(this,n,r);return s.on(`end`,()=>{a(o)}),s}})}};zO.__initStatic();var BO=`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`.split(`.`),VO={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 HO(e){return e&&typeof e==`object`&&e.once&&typeof e.once==`function`}var UO=class e{static __initStatic(){this.id=`Mongo`}constructor(t={}){this.name=e.id,this._operations=Array.isArray(t.operations)?t.operations:BO,this._describeOperations=`describeOperations`in t?t.describeOperations:!0,this._useMongoose=!!t.useMongoose}loadDependency(){let e=this._useMongoose?`mongoose`:`mongodb`;return this._module=this._module||TE(e)}setupOnce(e,t){if(EO(t)){Z&&J.log(`Mongo Integration is skipped because of instrumenter configuration.`);return}let n=this.loadDependency();if(!n){let e=this._useMongoose?`mongoose`:`mongodb`;Z&&J.error(`Mongo Integration was unable to require \`${e}\` package.`);return}this._instrumentOperations(n.Collection,this._operations,t)}_instrumentOperations(e,t,n){t.forEach(t=>this._patchOperation(e,t,n))}_patchOperation(e,t,n){if(!(t in e.prototype))return;let r=this._getSpanContextFromOperationArguments.bind(this);FT(e.prototype,t,function(e){return function(...i){let a=i[i.length-1],o=n(),s=o.getScope(),c=o.getClient(),l=s.getSpan(),u=Y([c,`optionalAccess`,e=>e.getOptions,`call`,e=>e(),`access`,e=>e.sendDefaultPii]);if(typeof a!=`function`||t===`mapReduce`&&i.length===2){let n=Y([l,`optionalAccess`,e=>e.startChild,`call`,e=>e(r(this,t,i,u))]),a=e.call(this,...i);if(pT(a))return a.then(e=>(Y([n,`optionalAccess`,e=>e.end,`call`,e=>e()]),e));if(HO(a)){let e=a;try{e.once(`close`,()=>{Y([n,`optionalAccess`,e=>e.end,`call`,e=>e()])})}catch{Y([n,`optionalAccess`,e=>e.end,`call`,e=>e()])}return e}else return Y([n,`optionalAccess`,e=>e.end,`call`,e=>e()]),a}let d=Y([l,`optionalAccess`,e=>e.startChild,`call`,e=>e(r(this,t,i.slice(0,-1)))]);return e.call(this,...i.slice(0,-1),function(e,t){Y([d,`optionalAccess`,e=>e.end,`call`,e=>e()]),a(e,t)})}})}_getSpanContextFromOperationArguments(e,t,n,r=!1){let i={"db.system":`mongodb`,"db.name":e.dbName,"db.operation":t,"db.mongodb.collection":e.collectionName},a={op:`db`,origin:`auto.db.mongo`,description:t,data:i},o=VO[t],s=Array.isArray(this._describeOperations)?this._describeOperations.includes(t):this._describeOperations;if(!o||!s||!r)return a;try{if(t===`mapReduce`){let[e,t]=n;i[o[0]]=typeof e==`string`?e:e.name||`<anonymous>`,i[o[1]]=typeof t==`string`?t:t.name||`<anonymous>`}else for(let e=0;e<o.length;e++)i[`db.mongodb.${o[e]}`]=JSON.stringify(n[e])}catch{}return a}};UO.__initStatic();function WO(e){return!!e&&!!e.$use}var GO=class e{static __initStatic(){this.id=`Prisma`}constructor(t={}){if(this.name=e.id,WO(t.client)&&!t.client._sentryInstrumented){IT(t.client,`_sentryInstrumented`,!0);let e={};try{let n=t.client._engineConfig;if(n){let{activeProvider:t,clientVersion:r}=n;t&&(e[`db.system`]=t),r&&(e[`db.prisma.version`]=r)}}catch{}t.client.$use((t,n)=>{if(EO(kD))return n(t);let r=t.action,i=t.model;return KD({name:i?`${i} ${r}`:r,onlyIfParent:!0,op:`db.prisma`,attributes:{[sO]:`auto.db.prisma`},data:{...e,"db.operation":r}},()=>n(t))})}else Z&&J.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client:`,t.client)}setupOnce(){}};GO.__initStatic();var KO=class e{static __initStatic(){this.id=`GraphQL`}constructor(){this.name=e.id}loadDependency(){return this._module=this._module||TE(`graphql/execution/execute.js`)}setupOnce(e,t){if(EO(t)){Z&&J.log(`GraphQL Integration is skipped because of instrumenter configuration.`);return}let n=this.loadDependency();if(!n){Z&&J.error(`GraphQL Integration was unable to require graphql/execution package.`);return}FT(n,`execute`,function(e){return function(...n){let r=t().getScope(),i=r.getSpan(),a=Y([i,`optionalAccess`,e=>e.startChild,`call`,e=>e({description:`execute`,op:`graphql.execute`,origin:`auto.graphql.graphql`})]);Y([r,`optionalAccess`,e=>e.setSpan,`call`,e=>e(a)]);let o=e.call(this,...n);return pT(o)?o.then(e=>(Y([a,`optionalAccess`,e=>e.end,`call`,e=>e()]),Y([r,`optionalAccess`,e=>e.setSpan,`call`,e=>e(i)]),e)):(Y([a,`optionalAccess`,e=>e.end,`call`,e=>e()]),Y([r,`optionalAccess`,e=>e.setSpan,`call`,e=>e(i)]),o)}})}};KO.__initStatic();var qO=class e{static __initStatic(){this.id=`Apollo`}constructor(t={useNestjs:!1}){this.name=e.id,this._useNest=!!t.useNestjs}loadDependency(){return this._useNest?this._module=this._module||TE(`@nestjs/graphql`):this._module=this._module||TE(`apollo-server-core`),this._module}setupOnce(e,t){if(EO(t)){Z&&J.log(`Apollo Integration is skipped because of instrumenter configuration.`);return}if(this._useNest){let e=this.loadDependency();if(!e){Z&&J.error(`Apollo-NestJS Integration was unable to require @nestjs/graphql package.`);return}FT(e.GraphQLFactory.prototype,`mergeWithSchema`,function(e){return function(...n){return FT(this.resolversExplorerService,`explore`,function(e){return function(){return JO(YT(e.call(this)),t)}}),e.call(this,...n)}})}else{let e=this.loadDependency();if(!e){Z&&J.error(`Apollo Integration was unable to require apollo-server-core package.`);return}FT(e.ApolloServerBase.prototype,`constructSchema`,function(e){return function(){if(!this.config.resolvers)return Z&&(this.config.schema?(J.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."),J.warn()):this.config.modules&&J.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),J.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),e.call(this);let n=YT(this.config.resolvers);return this.config.resolvers=JO(n,t),e.call(this)}})}}};qO.__initStatic();function JO(e,t){return e.map(e=>(Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(r=>{typeof e[n][r]==`function`&&YO(e,n,r,t)})}),e))}function YO(e,t,n,r){FT(e[t],n,function(e){return function(...i){let a=Y([r().getScope().getSpan(),`optionalAccess`,e=>e.startChild,`call`,e=>e({description:`${t}.${n}`,op:`graphql.resolve`,origin:`auto.graphql.apollo`})]),o=e.call(this,...i);return pT(o)?o.then(e=>(Y([a,`optionalAccess`,e=>e.end,`call`,e=>e()]),e)):(Y([a,`optionalAccess`,e=>e.end,`call`,e=>e()]),o)}})}var Q=yT;function XO(){Q.document?Q.document.addEventListener(`visibilitychange`,()=>{let e=ID();if(Q.document.hidden&&e){let t=`cancelled`,{op:n,status:r}=oD(e);Z&&J.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag(`visibilitychange`,`document.hidden`),e.end()}}):Z&&J.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var ZO=(e,t,n)=>{let r,i;return a=>{t.value>=0&&(a||n)&&(i=t.value-(r||0),(i||r===void 0)&&(r=t.value,t.delta=i,e(t)))}},QO=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,$O=()=>{let e=Q.performance.timing,t=Q.performance.navigation.type,n={entryType:`navigation`,startTime:0,type:t==2?`back_forward`:t===1?`reload`:`navigate`};for(let t in e)t!==`navigationStart`&&t!==`toJSON`&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n},ek=()=>Q.__WEB_VITALS_POLYFILL__?Q.performance&&(performance.getEntriesByType&&performance.getEntriesByType(`navigation`)[0]||$O()):Q.performance&&performance.getEntriesByType&&performance.getEntriesByType(`navigation`)[0],tk=()=>{let e=ek();return e&&e.activationStart||0},nk=(e,t)=>{let n=ek(),r=`navigate`;return n&&(r=Q.document&&Q.document.prerendering||tk()>0?`prerender`:n.type.replace(/_/g,`-`)),{name:e,value:t===void 0?-1:t,rating:`good`,delta:0,entries:[],id:QO(),navigationType:r}},rk=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{t(e.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},ik=(e,t)=>{let n=r=>{(r.type===`pagehide`||Q.document.visibilityState===`hidden`)&&(e(r),t&&(removeEventListener(`visibilitychange`,n,!0),removeEventListener(`pagehide`,n,!0)))};Q.document&&(addEventListener(`visibilitychange`,n,!0),addEventListener(`pagehide`,n,!0))},ak=(e,t={})=>{let n=nk(`CLS`,0),r,i=0,a=[],o=e=>{e.forEach(e=>{if(!e.hadRecentInput){let t=a[0],o=a[a.length-1];i&&a.length!==0&&e.startTime-o.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e]),i>n.value&&(n.value=i,n.entries=a,r&&r())}})},s=rk(`layout-shift`,o);if(s){r=ZO(e,n,t.reportAllChanges);let i=()=>{o(s.takeRecords()),r(!0)};return ik(i),i}},ok=-1,sk=()=>{Q.document&&Q.document.visibilityState&&(ok=Q.document.visibilityState===`hidden`&&!Q.document.prerendering?0:1/0)},ck=()=>{ik(({timeStamp:e})=>{ok=e},!0)},lk=()=>(ok<0&&(sk(),ck()),{get firstHiddenTime(){return ok}}),uk=e=>{let t=lk(),n=nk(`FID`),r,i=e=>{e.startTime<t.firstHiddenTime&&(n.value=e.processingStart-e.startTime,n.entries.push(e),r(!0))},a=e=>{e.forEach(i)},o=rk(`first-input`,a);r=ZO(e,n),o&&ik(()=>{a(o.takeRecords()),o.disconnect()},!0)},dk=0,fk=1/0,pk=0,mk=e=>{e.forEach(e=>{e.interactionId&&(fk=Math.min(fk,e.interactionId),pk=Math.max(pk,e.interactionId),dk=pk?(pk-fk)/7+1:0)})},hk,gk=()=>hk?dk:performance.interactionCount||0,_k=()=>{`interactionCount`in performance||hk||(hk=rk(`event`,mk,{type:`event`,buffered:!0,durationThreshold:0}))},vk=()=>gk(),yk=10,bk=[],xk={},Sk=e=>{let t=bk[bk.length-1],n=xk[e.interactionId];if(n||bk.length<yk||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{let t={id:e.interactionId,latency:e.duration,entries:[e]};xk[t.id]=t,bk.push(t)}bk.sort((e,t)=>t.latency-e.latency),bk.splice(yk).forEach(e=>{delete xk[e.id]})}},Ck=()=>bk[Math.min(bk.length-1,Math.floor(vk()/50))],wk=(e,t)=>{t||={},_k();let n=nk(`INP`),r,i=e=>{e.forEach(e=>{e.interactionId&&Sk(e),e.entryType===`first-input`&&(bk.some(t=>t.entries.some(t=>e.duration===t.duration&&e.startTime===t.startTime))||Sk(e))});let t=Ck();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())},a=rk(`event`,i,{durationThreshold:t.durationThreshold||40});r=ZO(e,n,t.reportAllChanges),a&&(a.observe({type:`first-input`,buffered:!0}),ik(()=>{i(a.takeRecords()),n.value<0&&vk()>0&&(n.value=0,n.entries=[]),r(!0)}))},Tk={},Ek=e=>{let t=lk(),n=nk(`LCP`),r,i=e=>{let i=e[e.length-1];if(i){let e=Math.max(i.startTime-tk(),0);e<t.firstHiddenTime&&(n.value=e,n.entries=[i],r())}},a=rk(`largest-contentful-paint`,i);if(a){r=ZO(e,n);let t=()=>{Tk[n.id]||(i(a.takeRecords()),a.disconnect(),Tk[n.id]=!0,r(!0))};return[`keydown`,`click`].forEach(e=>{Q.document&&addEventListener(e,t,{once:!0,capture:!0})}),ik(t,!0),t}},Dk=e=>{Q.document&&(Q.document.prerendering?addEventListener(`prerenderingchange`,()=>Dk(e),!0):Q.document.readyState===`complete`?setTimeout(e,0):addEventListener(`load`,()=>Dk(e),!0))},Ok=(e,t)=>{t||={};let n=nk(`TTFB`),r=ZO(e,n,t.reportAllChanges);Dk(()=>{let e=ek();if(e){if(n.value=Math.max(e.responseStart-tk(),0),n.value<0||n.value>performance.now())return;n.entries=[e],r(!0)}})},kk={},Ak={},jk,Mk,Nk,Pk,Fk;function Ik(e,t=!1){return Jk(`cls`,e,Uk,jk,t)}function Lk(e,t=!1){return Jk(`lcp`,e,Gk,Nk,t)}function Rk(e){return Jk(`ttfb`,e,Kk,Pk)}function zk(e){return Jk(`fid`,e,Wk,Mk)}function Bk(e){return Jk(`inp`,e,qk,Fk)}function Vk(e,t){return Xk(e,t),Ak[e]||(Yk(e),Ak[e]=!0),Zk(e,t)}function Hk(e,t){let n=kk[e];if(!(!n||!n.length))for(let r of n)try{r(t)}catch(t){Z&&J.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${HT(r)}\nError:`,t)}}function Uk(){return ak(e=>{Hk(`cls`,{metric:e}),jk=e},{reportAllChanges:!0})}function Wk(){return uk(e=>{Hk(`fid`,{metric:e}),Mk=e})}function Gk(){return Ek(e=>{Hk(`lcp`,{metric:e}),Nk=e})}function Kk(){return Ok(e=>{Hk(`ttfb`,{metric:e}),Pk=e})}function qk(){return wk(e=>{Hk(`inp`,{metric:e}),Fk=e})}function Jk(e,t,n,r,i=!1){Xk(e,t);let a;return Ak[e]||(a=n(),Ak[e]=!0),r&&t({metric:r}),Zk(e,t,i?a:void 0)}function Yk(e){let t={};e===`event`&&(t.durationThreshold=0),rk(e,t=>{Hk(e,{entries:t})},t)}function Xk(e,t){kk[e]=kk[e]||[],kk[e].push(t)}function Zk(e,t,n){return()=>{n&&n();let r=kk[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function Qk(e){return typeof e==`number`&&isFinite(e)}function $k(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}var eA=2147483647;function tA(e){return e/1e3}function nA(){return Q&&Q.addEventListener&&Q.performance}var rA=0,iA={},aA,oA;function sA(){let e=nA();if(e&&IE){e.mark&&Q.performance.mark(`sentry-tracing-init`);let t=pA(),n=dA(),r=fA(),i=mA();return()=>{t(),n(),r(),i()}}return()=>void 0}function cA(){Vk(`longtask`,({entries:e})=>{for(let t of e){let e=ID();if(!e)return;let n=tA(IE+t.startTime),r=tA(t.duration);e.startChild({description:`Main UI thread blocked`,op:`ui.long-task`,origin:`auto.ui.browser.metrics`,startTimestamp:n,endTimestamp:n+r})}})}function lA(){Vk(`event`,({entries:e})=>{for(let t of e){let e=ID();if(!e)return;if(t.name===`click`){let n=tA(IE+t.startTime),r=tA(t.duration),i={description:wT(t.target),op:`ui.interaction.${t.name}`,origin:`auto.ui.browser.metrics`,startTimestamp:n,endTimestamp:n+r},a=DT(t.target);a&&(i.attributes={"ui.component_name":a}),e.startChild(i)}}})}function uA(e,t){if(nA()&&IE){let n=gA(e,t);return()=>{n()}}return()=>void 0}function dA(){return Ik(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Z&&J.log(`[Measurements] Adding CLS`),iA.cls={value:e.value,unit:``},oA=t)},!0)}function fA(){return Lk(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Z&&J.log(`[Measurements] Adding LCP`),iA.lcp={value:e.value,unit:`millisecond`},aA=t)},!0)}function pA(){return zk(({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=tA(IE),r=tA(t.startTime);Z&&J.log(`[Measurements] Adding FID`),iA.fid={value:e.value,unit:`millisecond`},iA[`mark.fid`]={value:n+r,unit:`second`}})}function mA(){return Rk(({metric:e})=>{e.entries[e.entries.length-1]&&(Z&&J.log(`[Measurements] Adding TTFB`),iA.ttfb={value:e.value,unit:`millisecond`})})}var hA={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 gA(e,t){return Bk(({metric:n})=>{if(n.value===void 0)return;let r=n.entries.find(e=>e.duration===n.value&&hA[e.name]!==void 0),i=uD();if(!r||!i)return;let a=hA[r.name],o=i.getOptions(),s=tA(IE+r.startTime),c=tA(n.value),l=r.interactionId===void 0?void 0:e[r.interactionId];if(l===void 0)return;let{routeName:u,parentContext:d,activeTransaction:f,user:p,replayId:m}=l,h=p===void 0?void 0:p.email||p.id||p.ip_address,g=f===void 0?void 0:f.getProfileId(),_=new uO({startTimestamp:s,endTimestamp:s+c,op:`ui.interaction.${a}`,name:wT(r.target),attributes:{release:o.release,environment:o.environment,transaction:u,...h!==void 0&&h!==``?{user:h}:{},...g===void 0?{}:{profile_id:g},...m===void 0?{}:{replay_id:m}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:`millisecond`}}}),v=DA(d,o,t);if(v&&Math.random()<v){let e=_?wO([_],i.getDsn()):void 0,t=i&&i.getTransport();t&&e&&t.send(e).then(null,e=>{Z&&J.error(`Error while sending interaction:`,e)});return}})}function _A(e){let t=nA();if(!t||!Q.performance.getEntries||!IE)return;Z&&J.log(`[Tracing] Adding & adjusting spans using Performance API`);let n=tA(IE),r=t.getEntries(),{op:i,start_timestamp:a}=oD(e);if(r.slice(rA).forEach(t=>{let r=tA(t.startTime),i=tA(t.duration);if(!(e.op===`navigation`&&a&&n+r<a))switch(t.entryType){case`navigation`:yA(e,t,n);break;case`mark`:case`paint`:case`measure`:{vA(e,t,r,i,n);let a=lk(),o=t.startTime<a.firstHiddenTime;t.name===`first-paint`&&o&&(Z&&J.log(`[Measurements] Adding FP`),iA.fp={value:t.startTime,unit:`millisecond`}),t.name===`first-contentful-paint`&&o&&(Z&&J.log(`[Measurements] Adding FCP`),iA.fcp={value:t.startTime,unit:`millisecond`});break}case`resource`:SA(e,t,t.name,r,i,n);break}}),rA=Math.max(r.length-1,0),CA(e),i===`pageload`){EA(iA),[`fcp`,`fp`,`lcp`].forEach(e=>{if(!iA[e]||!a||n>=a)return;let t=iA[e].value,r=n+tA(t),i=Math.abs((r-a)*1e3),o=i-t;Z&&J.log(`[Measurements] Normalized ${e} from ${t} to ${i} (${o})`),iA[e].value=i});let t=iA[`mark.fid`];t&&iA.fid&&($k(e,{description:`first input delay`,endTimestamp:t.value+tA(iA.fid.value),op:`ui.action`,origin:`auto.ui.browser.metrics`,startTimestamp:t.value}),delete iA[`mark.fid`]),`fcp`in iA||delete iA.cls,Object.keys(iA).forEach(e=>{CO(e,iA[e].value,iA[e].unit)}),wA(e)}aA=void 0,oA=void 0,iA={}}function vA(e,t,n,r,i){let a=i+n,o=a+r;return $k(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:`auto.resource.browser.metrics`,startTimestamp:a}),a}function yA(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{bA(e,t,r,n)}),bA(e,t,`secureConnection`,n,`TLS/SSL`,`connectEnd`),bA(e,t,`fetch`,n,`cache`,`domainLookupStart`),bA(e,t,`domainLookup`,n,`DNS`),xA(e,t,n)}function bA(e,t,n,r,i,a){let o=a?t[a]:t[`${n}End`],s=t[`${n}Start`];!s||!o||$k(e,{op:`browser`,origin:`auto.browser.browser.metrics`,description:i||n,startTimestamp:r+tA(s),endTimestamp:r+tA(o)})}function xA(e,t,n){t.responseEnd&&($k(e,{op:`browser`,origin:`auto.browser.browser.metrics`,description:`request`,startTimestamp:n+tA(t.requestStart),endTimestamp:n+tA(t.responseEnd)}),$k(e,{op:`browser`,origin:`auto.browser.browser.metrics`,description:`response`,startTimestamp:n+tA(t.responseStart),endTimestamp:n+tA(t.responseEnd)}))}function SA(e,t,n,r,i,a){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let o=OE(n),s={};TA(s,t,`transferSize`,`http.response_transfer_size`),TA(s,t,`encodedBodySize`,`http.response_content_length`),TA(s,t,`decodedBodySize`,`http.decoded_response_content_length`),`renderBlockingStatus`in t&&(s[`resource.render_blocking_status`]=t.renderBlockingStatus),o.protocol&&(s[`url.scheme`]=o.protocol.split(`:`).pop()),o.host&&(s[`server.address`]=o.host),s[`url.same_origin`]=n.includes(Q.location.origin);let c=a+r,l=c+i;$k(e,{description:n.replace(Q.location.origin,``),endTimestamp:l,op:t.initiatorType?`resource.${t.initiatorType}`:`resource.other`,origin:`auto.resource.browser.metrics`,startTimestamp:c,data:s})}function CA(e){let t=Q.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag(`effectiveConnectionType`,n.effectiveType),n.type&&e.setTag(`connectionType`,n.type),Qk(n.rtt)&&(iA[`connection.rtt`]={value:n.rtt,unit:`millisecond`})),Qk(t.deviceMemory)&&e.setTag(`deviceMemory`,`${t.deviceMemory} GB`),Qk(t.hardwareConcurrency)&&e.setTag(`hardwareConcurrency`,String(t.hardwareConcurrency))}function wA(e){aA&&(Z&&J.log(`[Measurements] Adding LCP Data`),aA.element&&e.setTag(`lcp.element`,wT(aA.element)),aA.id&&e.setTag(`lcp.id`,aA.id),aA.url&&e.setTag(`lcp.url`,aA.url.trim().slice(0,200)),e.setTag(`lcp.size`,aA.size)),oA&&oA.sources&&(Z&&J.log(`[Measurements] Adding CLS Data`),oA.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,wT(t.node))))}function TA(e,t,n,r){let i=t[n];i!=null&&i<eA&&(e[r]=i)}function EA(e){let t=ek();if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(Z&&J.log(`[Measurements] Adding TTFB Request Time`),e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}function DA(e,t,n){if(!GD(t))return!1;let r;return r=e!==void 0&&typeof t.tracesSampler==`function`?t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:Q.location}):e!==void 0&&e.sampled!==void 0?e.sampled:t.tracesSampleRate===void 0?1:t.tracesSampleRate,vO(r)?r===!0?n:r===!1?0:r*n:(Z&&J.warn(`[Tracing] Discarding interaction span because of invalid sample rate.`),!1)}function OA(e,t,n,r,i=`auto.http.browser`){if(!GD()||!e.fetchData)return;let a=t(e.fetchData.url);if(e.endTimestamp&&a){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(jA(n,e),delete r[t]);return}let o=dD(),s=uD(),{method:c,url:l}=e.fetchData,u=AA(l),d=u?OE(u).host:void 0,f=a?qD({name:`${c} ${l}`,onlyIfParent:!0,attributes:{url:l,type:`fetch`,"http.method":c,"http.url":u,"server.address":d,[sO]:i},op:`http.client`}):void 0;if(f&&(e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(e.fetchData.url)&&s){let t=e.args[0];e.args[1]=e.args[1]||{};let n=e.args[1];n.headers=kA(t,s,o,n,f)}return f}function kA(e,t,n,r,i){let a=i||n.getSpan(),{traceId:o,spanId:s,sampled:c,dsc:l}={...AD().getPropagationContext(),...n.getPropagationContext()},u=a?rD(a):qE(o,s,c),d=VE(l||(a?mD(a):pD(o,t,n))),f=r.headers||(typeof Request<`u`&&hT(e,Request)?e.headers:void 0);if(!f)return{"sentry-trace":u,baggage:d};if(typeof Headers<`u`&&hT(f,Headers)){let e=new Headers(f);return e.append(`sentry-trace`,u),d&&e.append(LE,d),e}else if(Array.isArray(f)){let e=[...f,[`sentry-trace`,u]];return d&&e.push([LE,d]),e}else{let e=`baggage`in f?f.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),d&&t.push(d),{...f,"sentry-trace":u,baggage:t.length>0?t.join(`,`):void 0}}}function AA(e){try{return new URL(e).href}catch{return}}function jA(e,t){if(t.response){HD(e,t.response.status);let n=t.response&&t.response.headers&&t.response.headers.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus(`internal_error`);e.end()}var MA=[`localhost`,/^\/(?!\/)/],NA={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:MA,tracePropagationTargets:MA};function PA(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:a,enableHTTPTimings:o}={traceFetch:NA.traceFetch,traceXHR:NA.traceXHR,...e},s=typeof a==`function`?a:e=>!0,c=e=>BA(e,r||i),l={};t&&eE(e=>{let t=OA(e,s,c,l);if(t){let n=UA(e.fetchData.url),r=n?OE(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}o&&t&&IA(t)}),n&&yE(e=>{let t=VA(e,s,c,l);o&&t&&IA(t)})}function FA(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function IA(e){let{url:t}=oD(e).data||{};if(!t||typeof t!=`string`)return;let n=Vk(`resource`,({entries:r})=>{r.forEach(r=>{FA(r)&&r.name.endsWith(t)&&(zA(r).forEach(t=>e.setAttribute(...t)),setTimeout(n))})})}function LA(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function RA(e=0){return((IE||performance.timeOrigin)+e)/1e3}function zA(e){let{name:t,version:n}=LA(e.nextHopProtocol),r=[];return r.push([`network.protocol.version`,n],[`network.protocol.name`,t]),IE?[...r,[`http.request.redirect_start`,RA(e.redirectStart)],[`http.request.fetch_start`,RA(e.fetchStart)],[`http.request.domain_lookup_start`,RA(e.domainLookupStart)],[`http.request.domain_lookup_end`,RA(e.domainLookupEnd)],[`http.request.connect_start`,RA(e.connectStart)],[`http.request.secure_connection_start`,RA(e.secureConnectionStart)],[`http.request.connection_end`,RA(e.connectEnd)],[`http.request.request_start`,RA(e.requestStart)],[`http.request.response_start`,RA(e.responseStart)],[`http.request.response_end`,RA(e.responseEnd)]]:r}function BA(e,t){return _T(e,t||MA)}function VA(e,t,n,r){let i=e.xhr,a=i&&i.__sentry_xhr_v3__;if(!GD()||!i||i.__sentry_own_request__||!a)return;let o=t(a.url);if(e.endTimestamp&&o){let e=i.__sentry_xhr_span_id__;if(!e)return;let t=r[e];t&&a.status_code!==void 0&&(HD(t,a.status_code),t.end(),delete r[e]);return}let s=dD(),c=AD(),l=UA(a.url),u=l?OE(l).host:void 0,d=o?qD({name:`${a.method} ${a.url}`,onlyIfParent:!0,attributes:{type:`xhr`,"http.method":a.method,"http.url":l,url:a.url,"server.address":u,[sO]:`auto.http.browser`},op:`http.client`}):void 0;d&&(i.__sentry_xhr_span_id__=d.spanContext().spanId,r[i.__sentry_xhr_span_id__]=d);let f=uD();if(i.setRequestHeader&&n(a.url)&&f){let{traceId:e,spanId:t,sampled:n,dsc:r}={...c.getPropagationContext(),...s.getPropagationContext()};HA(i,d?rD(d):qE(e,t,n),VE(r||(d?mD(d):pD(e,f,s))))}return d}function HA(e,t,n){try{e.setRequestHeader(`sentry-trace`,t),n&&e.setRequestHeader(LE,n)}catch{}}function UA(e){try{return new URL(e,Q.location.origin).href}catch{return}}function WA(e,t=!0,n=!0){if(!Q||!Q.location){Z&&J.warn(`Could not initialize routing instrumentation due to invalid location`);return}let r=Q.location.href,i;t&&(i=e({name:Q.location.pathname,startTimestamp:IE?IE/1e3:void 0,op:`pageload`,origin:`auto.pageload.browser`,metadata:{source:`url`}})),n&&hE(({to:t,from:n})=>{if(n===void 0&&r&&r.indexOf(t)!==-1){r=void 0;return}n!==t&&(r=void 0,i&&(Z&&J.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.end()),i=e({name:Q.location.pathname,op:`navigation`,origin:`auto.navigation.browser`,metadata:{source:`url`}}))})}var GA=`BrowserTracing`,KA={...fO,markBackgroundTransactions:!0,routingInstrumentation:WA,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...NA},qA=10,JA=class{constructor(e){this.name=GA,this._hasSetTracePropagationTargets=!1,SO(),Z&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...KA,...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=sA(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&uA(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&cA(),this.options._experiments.enableInteractions&&lA(),this._latestRoute={name:void 0,context:void 0}}setupOnce(e,t){this._getCurrentHub=t;let n=t().getClient(),r=n&&n.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:a,startTransactionOnPageLoad:o,markBackgroundTransactions:s,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,enableHTTPTimings:d,_experiments:f}=this.options,p=r&&r.tracePropagationTargets,m=p||this.options.tracePropagationTargets;Z&&this._hasSetTracePropagationTargets&&p&&J.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."),i(e=>{let n=this._createRouteTransaction(e);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,e,t),n},o,a),s&&XO(),f.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),PA({traceFetch:c,traceXHR:l,tracePropagationTargets:m,shouldCreateSpanForRequest:u,enableHTTPTimings:d})}_createRouteTransaction(e){if(!this._getCurrentHub){Z&&J.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:i,heartbeatInterval:a}=this.options,o=e.op===`pageload`,s;if(o){let{traceId:t,dsc:n,parentSpanId:r,sampled:i}=KE(o?YA(`sentry-trace`):``,o?YA(`baggage`):void 0);s={traceId:t,parentSpanId:r,parentSampled:i,...e,metadata:{...e.metadata,dynamicSamplingContext:n},trimEnd:!0}}else s={trimEnd:!0,...e};let c=typeof n==`function`?n(s):s,l=c===void 0?{...s,sampled:!1}:c;l.metadata=l.name===s.name?l.metadata:{...l.metadata,source:`custom`},this._latestRoute.name=l.name,this._latestRoute.context=l,l.sampled===!1&&Z&&J.log(`[Tracing] Will not send ${l.op} transaction because of beforeNavigate.`),Z&&J.log(`[Tracing] Starting ${l.op} transaction on scope`);let{location:u}=Q,d=xO(t,l,r,i,!0,{location:u},a,o);return o&&Q.document&&(Q.document.addEventListener(`readystatechange`,()=>{[`interactive`,`complete`].includes(Q.document.readyState)&&d.sendAutoFinishSignal()}),[`interactive`,`complete`].includes(Q.document.readyState)&&d.sendAutoFinishSignal()),d.registerBeforeFinishCallback(e=>{this._collectWebVitals(),_A(e)}),d}_registerInteractionListener(){let e,t=()=>{let{idleTimeout:t,finalTimeout:n,heartbeatInterval:r}=this.options,i=`ui.action.click`,a=ID();if(a&&a.op&&[`navigation`,`pageload`].includes(a.op)){Z&&J.warn(`[Tracing] Did not create ${i} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&=(e.setFinishReason(`interactionInterrupted`),e.end(),void 0),!this._getCurrentHub){Z&&J.warn(`[Tracing] Did not create ${i} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){Z&&J.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`);return}let o=this._getCurrentHub(),{location:s}=Q;e=xO(o,{name:this._latestRoute.name,op:i,trimEnd:!0,data:{[iO]:this._latestRoute.context?XA(this._latestRoute.context):`url`}},t,n,!0,{location:s},r)};[`click`].forEach(e=>{Q.document&&addEventListener(e,t,{once:!1,capture:!0})})}_registerInpInteractionListener(){let e=({entries:e})=>{let t=uD(),n=t!==void 0&&t.getIntegrationByName!==void 0?t.getIntegrationByName(`Replay`):void 0,r=n===void 0?void 0:n.getReplayId(),i=ID(),a=dD(),o=a===void 0?void 0:a.getUser();e.forEach(e=>{if(ZA(e)){let t=e.interactionId;if(t===void 0)return;let n=this._interactionIdToRouteNameMapping[t],a=e.duration,s=e.startTime,c=Object.keys(this._interactionIdToRouteNameMapping),l=c.length>0?c.reduce((e,t)=>this._interactionIdToRouteNameMapping[e].duration<this._interactionIdToRouteNameMapping[t].duration?e:t):void 0;if(e.entryType===`first-input`&&c.map(e=>this._interactionIdToRouteNameMapping[e]).some(e=>e.duration===a&&e.startTime===s)||!t)return;if(n)n.duration=Math.max(n.duration,a);else if(c.length<qA||l===void 0||a>this._interactionIdToRouteNameMapping[l].duration){let e=this._latestRoute.name,n=this._latestRoute.context;e&&n&&(l&&Object.keys(this._interactionIdToRouteNameMapping).length>=qA&&delete this._interactionIdToRouteNameMapping[l],this._interactionIdToRouteNameMapping[t]={routeName:e,duration:a,parentContext:n,user:o,activeTransaction:i,replayId:r,startTime:s})}}})};Vk(`event`,e),Vk(`first-input`,e)}};function YA(e){let t=ET(`meta[name=${e}]`);return t?t.getAttribute(`content`):void 0}function XA(e){let t=e.attributes&&e.attributes[`sentry.source`],n=e.data&&e.data[`sentry.source`],r=e.metadata&&e.metadata.source;return t||n||r}function ZA(e){return`duration`in e}function QA(){let e=DD();if(!e.__SENTRY__)return;let t={mongodb(){return new(wE(module,`./node/integrations/mongo`)).Mongo},mongoose(){return new(wE(module,`./node/integrations/mongo`)).Mongo},mysql(){return new(wE(module,`./node/integrations/mysql`)).Mysql},pg(){return new(wE(module,`./node/integrations/postgres`)).Postgres}},n=Object.keys(t).filter(e=>!!TE(e)).map(e=>{try{return t[e]()}catch{return}}).filter(e=>e);n.length>0&&(e.__SENTRY__.integrations=[...e.__SENTRY__.integrations||[],...n])}function $A(){SO(),CE()&&QA()}var ej={BrowserTracing:JA,Apollo:qO,Express:DO,GraphQL:KO,Mongo:UO,Mysql:zO,Postgres:RO,Prisma:GO};(typeof __SENTRY_TRACING__>`u`||__SENTRY_TRACING__)&&$A();var tj=i((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.StatsigInvalidArgumentError=e.StatsigUninitializedError=void 0,e.StatsigUninitializedError=function(e){t(n,e);function n(t){var r=e.call(this,t??`Call and wait for initialize() to finish first.`)||this;return Object.setPrototypeOf(r,n.prototype),r}return n}(Error),e.StatsigInvalidArgumentError=function(e){t(n,e);function n(t){var r=e.call(this,t)||this;return Object.setPrototypeOf(r,n.prototype),r}return n}(Error)})),nj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=function(){function e(e,t,n,r,i,a,o,s,c,l){i===void 0&&(i=[]),a===void 0&&(a=``),o===void 0&&(o=null),s===void 0&&(s=null),c===void 0&&(c=null),l===void 0&&(l=null),this.onDefaultValueFallback=null,this.name=e,this.value=JSON.parse(JSON.stringify(t??{})),this.ruleID=n??``,this.secondaryExposures=i,this.allocatedExperimentName=a,this.evaluationDetails=r,this.onDefaultValueFallback=o,this.groupName=s,this.idType=c,this.isExperimentActive=l}return e.prototype.get=function(e,t,n){var r,i,a=this.getValue(e,t);if(a==null)return t;var o=Array.isArray(t)?`array`:typeof t,s=Array.isArray(a)?`array`:typeof a;return n?n(a)?a:((r=this.onDefaultValueFallback)==null||r.call(this,this,e,o,s),t):t==null||o===s?a:((i=this.onDefaultValueFallback)==null||i.call(this,this,e,o,s),t)},e.prototype.getValue=function(e,t){return e==null?this.value:(t??=null,this.value[e]==null?t:this.value[e])},e.prototype.getRuleID=function(){return this.ruleID},e.prototype.getGroupName=function(){return this.groupName},e.prototype.getIDType=function(){return this.idType},e.prototype.getName=function(){return this.name},e.prototype.getEvaluationDetails=function(){return this.evaluationDetails},e.prototype._getSecondaryExposures=function(){return this.secondaryExposures},e.prototype._getAllocatedExperimentName=function(){return this.allocatedExperimentName},e.prototype.getIsExperimentActive=function(){return this.isExperimentActive},e}()})),rj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.difference=e.now=void 0;function t(e){return e===void 0&&(e={withPrecision:!1}),typeof performance>`u`||!performance?Date.now():e.withPrecision?performance.now():performance.now()|0}e.now=t;function n(e){return t()-e}e.difference=n})),ij=i((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,`__esModule`,{value:!0}),e.DiagnosticsImpl=void 0;var n=rj(),r=function(){function e(e){var t=this;this.mark={overall:this.selectAction(`overall`),intialize:this.selectStep(`initialize`),bootstrap:this.selectStep(`bootstrap`),api_call:function(e){switch(e){case`getConfig`:return t.selectAction(`get_config`);case`getExperiment`:return t.selectAction(`get_experiment`);case`checkGate`:return t.selectAction(`check_gate`);case`getLayer`:return t.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=e.markers??{initialize:[],config_sync:[],event_logging:[],api_call:[]},this.disabled=e.options?.getDisableDiagnosticsLogging()??!1}return e.prototype.setContext=function(e){this.context=e},e.prototype.selectAction=function(e,r){var i=this;return{start:function(a,o){return i.addMarker(t({key:e,step:r,action:`start`,timestamp:(0,n.now)({withPrecision:!0})},a??{}),o)},end:function(a,o){return i.addMarker(t({key:e,step:r,action:`end`,timestamp:(0,n.now)({withPrecision:!0})},a??{}),o)}}},e.prototype.selectStep=function(e){return{process:this.selectAction(e,`process`),networkRequest:this.selectAction(e,`network_request`)}},e.prototype.addMarker=function(e,t){if(this.disabled)return!1;var n=t??this.context;return this.maxMarkers[n]!==void 0&&this.markers[n].length>=(this.maxMarkers[n]??this.defaultMaxMarkers)?!1:(this.markers[n].push(e),!0)},e.prototype.getMarkers=function(e){return this.markers[e]},e.prototype.setMaxMarkers=function(e,t){this.maxMarkers[e]=t},e.prototype.getMarkerCount=function(e){return this.markers[e].length},e.prototype.clearContext=function(e){this.markers[e]=[]},e}();e.DiagnosticsImpl=r,e.default=function(){function e(){}return e.initialize=function(e){this.instance=new r(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)},e.formatError=function(e){if(e&&typeof e==`object`)return{code:this.safeGetField(e,`code`),name:this.safeGetField(e,`name`),message:this.safeGetField(e,`message`)}},e.safeGetField=function(e,t){if(t in e)return e[t]},e}()})),aj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){var t=e??Error(`[Statsig] Error was empty`),r=t instanceof Error;return{name:r?t.name:`No Name`,message:r?t.message:void 0,trace:r?t.stack:n(t)}}e.default=t;function n(e){try{return JSON.stringify(e)}catch{return`[Statsig] Failed to get string for error.`}}})),oj=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.ExceptionEndpoint=void 0;var i=tj(),a=r(ij()),o=r(aj());e.ExceptionEndpoint=`https://statsigapi.net/v1/sdk_exception`;var s=30,c=1e4;e.default=function(){function r(e){this.sdkKey=e,this.seen=new Set;var t=Math.floor(Math.random()*c);this.setupDiagnostics(t===0?s:0)}return r.prototype.setStatsigMetadata=function(e){this.statsigMetadata=e},r.prototype.swallow=function(e,t,n){n===void 0&&(n={}),this.capture(e,t,function(){},n)},r.prototype.capture=function(e,t,n,r){var i=this,a=r===void 0?{}:r,o=a.getExtraData,s=a.configName,c=null;try{c=this.beginMarker(e);var l=t(),u=!0;return l instanceof Promise?l.catch(function(t){return u=!1,i.onCaught(e,t,n,o)}).then(function(t){return i.endMarker(e,u,c),t}):(this.endMarker(e,!0,c,s),l)}catch(t){return this.endMarker(e,!1,c,s),this.onCaught(e,t,n,o)}},r.prototype.logError=function(r,i,a){var s=this;(function(){return t(s,void 0,void 0,function(){var t,s,c,l,u,d,f;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,4,,5]),typeof a==`function`?[4,a()]:[3,2];case 1:return s=n.sent(),[3,3];case 2:s=null,n.label=3;case 3:return t=s,c=(0,o.default)(i),l=c.name,u=c.trace,this.seen.has(l)?[2]:(this.seen.add(l),d=this.statsigMetadata??{},f=JSON.stringify({tag:r,exception:l,info:u,statsigMetadata:d,extra:t??{}}),[2,fetch(e.ExceptionEndpoint,{method:`POST`,headers:{"STATSIG-API-KEY":this.sdkKey,"STATSIG-SDK-TYPE":String(d.sdkType),"STATSIG-SDK-VERSION":String(d.sdkVersion),"Content-Type":`application/json; charset=UTF-8`},body:f})]);case 4:return n.sent(),[3,5];case 5:return[2]}})})})().catch(function(){})},r.prototype.setupDiagnostics=function(e){a.default.setMaxMarkers(`api_call`,e)},r.prototype.beginMarker=function(e){var t=a.default.mark.api_call(e);if(!t)return null;var n=a.default.getMarkerCount(`api_call`),r=e+`_`+n;return t.start({markerID:r},`api_call`)?r:null},r.prototype.endMarker=function(e,t,n,r){var i=a.default.mark.api_call(e);!n||!i||i.end({markerID:n,success:t,configName:r},`api_call`)},r.prototype.onCaught=function(e,t,n,r){if(t instanceof i.StatsigUninitializedError||t instanceof i.StatsigInvalidArgumentError)throw t;return console.error(`[Statsig] An unexpected exception occurred.`,t),this.logError(e,t,r),n()},r}()})),sj=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=function(){function e(e,t,n,r,i,a,o,s,c,l){i===void 0&&(i=null),a===void 0&&(a=[]),o===void 0&&(o=[]),s===void 0&&(s=``),c===void 0&&(c=[]),l===void 0&&(l=null),this.logParameterFunction=i,this.name=e,this.value=JSON.parse(JSON.stringify(t??{})),this.ruleID=n??``,this.evaluationDetails=r,this.secondaryExposures=a,this.undelegatedSecondaryExposures=o,this.allocatedExperimentName=s,this.explicitParameters=c,this.groupName=l}return e._create=function(t,n,r,i,a,o,s,c,l,u){return a===void 0&&(a=null),o===void 0&&(o=[]),s===void 0&&(s=[]),c===void 0&&(c=``),l===void 0&&(l=[]),u===void 0&&(u=null),new e(t,n,r,i,a,o,s,c,l,u)},e.prototype.get=function(e,t,n){var r=this,i=this.value[e];if(i==null)return t;var a=function(){return r.logLayerParameterExposure(e),i};return n?n(i)?a():t:t==null||typeof i==typeof t&&Array.isArray(t)===Array.isArray(i)?a():t},e.prototype.getValue=function(e,t){t??=null;var n=this.value[e];return n!=null&&this.logLayerParameterExposure(e),n??t},e.prototype.getRuleID=function(){return this.ruleID},e.prototype.getGroupName=function(){return this.groupName},e.prototype.getName=function(){return this.name},e.prototype.getEvaluationDetails=function(){return this.evaluationDetails},e.prototype._getSecondaryExposures=function(){return this.secondaryExposures},e.prototype._getUndelegatedSecondaryExposures=function(){return this.undelegatedSecondaryExposures},e.prototype._getAllocatedExperimentName=function(){return this.allocatedExperimentName},e.prototype._getExplicitParameters=function(){return this.explicitParameters},e.prototype._getEvaluationDetails=function(){return this.evaluationDetails},e.prototype.logLayerParameterExposure=function(e){var t;(t=this.logParameterFunction)==null||t.call(this,this,e)},e}()})),cj=i((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=function(){function e(e){this.user=null,this.value=null,this.metadata=null,this.eventName=e,this.statsigMetadata={},this.time=Date.now()}return e.prototype.getName=function(){return this.eventName},e.prototype.setValue=function(e){this.value=e},e.prototype.setMetadata=function(e){this.metadata=e},e.prototype.addStatsigMetadata=function(e,t){this.statsigMetadata[e]=t},e.prototype.setUser=function(e){this.user=t({},e),delete this.user.privateAttributes},e.prototype.setSecondaryExposures=function(e){e===void 0&&(e=[]),this.secondaryExposures=e},e.prototype.toJsonObject=function(){return{eventName:this.eventName,user:this.user,value:this.value,metadata:this.metadata,time:this.time,statsigMetadata:this.statsigMetadata,secondaryExposures:this.secondaryExposures??void 0}},e}()}));function lj(){if(!uj&&(uj=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<`u`&&typeof msCrypto.getRandomValues==`function`&&msCrypto.getRandomValues.bind(msCrypto),!uj))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return uj(dj)}var uj,dj,fj=t((()=>{dj=new Uint8Array(16)})),pj,mj=t((()=>{pj=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i}));function hj(e){return typeof e==`string`&&pj.test(e)}var gj=t((()=>{mj()}));function _j(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(vj[e[t+0]]+vj[e[t+1]]+vj[e[t+2]]+vj[e[t+3]]+`-`+vj[e[t+4]]+vj[e[t+5]]+`-`+vj[e[t+6]]+vj[e[t+7]]+`-`+vj[e[t+8]]+vj[e[t+9]]+`-`+vj[e[t+10]]+vj[e[t+11]]+vj[e[t+12]]+vj[e[t+13]]+vj[e[t+14]]+vj[e[t+15]]).toLowerCase();if(!hj(n))throw TypeError(`Stringified UUID is invalid`);return n}var vj,yj,bj=t((()=>{for(gj(),vj=[],yj=0;yj<256;++yj)vj.push((yj+256).toString(16).substr(1))}));function xj(e,t,n){var r=t&&n||0,i=t||Array(16);e||={};var a=e.node||Sj,o=e.clockseq===void 0?Cj:e.clockseq;if(a==null||o==null){var s=e.random||(e.rng||lj)();a??=Sj=[s[0]|1,s[1],s[2],s[3],s[4],s[5]],o??=Cj=(s[6]<<8|s[7])&16383}var c=e.msecs===void 0?Date.now():e.msecs,l=e.nsecs===void 0?Tj+1:e.nsecs,u=c-wj+(l-Tj)/1e4;if(u<0&&e.clockseq===void 0&&(o=o+1&16383),(u<0||c>wj)&&e.nsecs===void 0&&(l=0),l>=1e4)throw Error(`uuid.v1(): Can't create more than 10M uuids/sec`);wj=c,Tj=l,Cj=o,c+=0xb1d069b5400;var d=((c&268435455)*1e4+l)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;var f=c/4294967296*1e4&268435455;i[r++]=f>>>8&255,i[r++]=f&255,i[r++]=f>>>24&15|16,i[r++]=f>>>16&255,i[r++]=o>>>8|128,i[r++]=o&255;for(var p=0;p<6;++p)i[r+p]=a[p];return t||_j(i)}var Sj,Cj,wj,Tj,Ej=t((()=>{fj(),bj(),wj=0,Tj=0}));function Dj(e){if(!hj(e))throw TypeError(`Invalid UUID`);var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}var Oj=t((()=>{gj()}));function kj(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}function Aj(e,t,n){function r(e,r,i,a){if(typeof e==`string`&&(e=kj(e)),typeof r==`string`&&(r=Dj(r)),r.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);var o=new Uint8Array(16+e.length);if(o.set(r),o.set(e,r.length),o=n(o),o[6]=o[6]&15|t,o[8]=o[8]&63|128,i){a||=0;for(var s=0;s<16;++s)i[a+s]=o[s];return i}return _j(o)}try{r.name=e}catch{}return r.DNS=jj,r.URL=Mj,r}var jj,Mj,Nj=t((()=>{bj(),Oj(),jj=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,Mj=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`}));function Pj(e){if(typeof e==`string`){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return Fj(Lj(Rj(e),e.length*8))}function Fj(e){for(var t=[],n=e.length*32,r=`0123456789abcdef`,i=0;i<n;i+=8){var a=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(a>>>4&15)+r.charAt(a&15),16);t.push(o)}return t}function Ij(e){return(e+64>>>9<<4)+14+1}function Lj(e,t){e[t>>5]|=128<<t%32,e[Ij(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o<e.length;o+=16){var s=n,c=r,l=i,u=a;n=Hj(n,r,i,a,e[o],7,-680876936),a=Hj(a,n,r,i,e[o+1],12,-389564586),i=Hj(i,a,n,r,e[o+2],17,606105819),r=Hj(r,i,a,n,e[o+3],22,-1044525330),n=Hj(n,r,i,a,e[o+4],7,-176418897),a=Hj(a,n,r,i,e[o+5],12,1200080426),i=Hj(i,a,n,r,e[o+6],17,-1473231341),r=Hj(r,i,a,n,e[o+7],22,-45705983),n=Hj(n,r,i,a,e[o+8],7,1770035416),a=Hj(a,n,r,i,e[o+9],12,-1958414417),i=Hj(i,a,n,r,e[o+10],17,-42063),r=Hj(r,i,a,n,e[o+11],22,-1990404162),n=Hj(n,r,i,a,e[o+12],7,1804603682),a=Hj(a,n,r,i,e[o+13],12,-40341101),i=Hj(i,a,n,r,e[o+14],17,-1502002290),r=Hj(r,i,a,n,e[o+15],22,1236535329),n=Uj(n,r,i,a,e[o+1],5,-165796510),a=Uj(a,n,r,i,e[o+6],9,-1069501632),i=Uj(i,a,n,r,e[o+11],14,643717713),r=Uj(r,i,a,n,e[o],20,-373897302),n=Uj(n,r,i,a,e[o+5],5,-701558691),a=Uj(a,n,r,i,e[o+10],9,38016083),i=Uj(i,a,n,r,e[o+15],14,-660478335),r=Uj(r,i,a,n,e[o+4],20,-405537848),n=Uj(n,r,i,a,e[o+9],5,568446438),a=Uj(a,n,r,i,e[o+14],9,-1019803690),i=Uj(i,a,n,r,e[o+3],14,-187363961),r=Uj(r,i,a,n,e[o+8],20,1163531501),n=Uj(n,r,i,a,e[o+13],5,-1444681467),a=Uj(a,n,r,i,e[o+2],9,-51403784),i=Uj(i,a,n,r,e[o+7],14,1735328473),r=Uj(r,i,a,n,e[o+12],20,-1926607734),n=Wj(n,r,i,a,e[o+5],4,-378558),a=Wj(a,n,r,i,e[o+8],11,-2022574463),i=Wj(i,a,n,r,e[o+11],16,1839030562),r=Wj(r,i,a,n,e[o+14],23,-35309556),n=Wj(n,r,i,a,e[o+1],4,-1530992060),a=Wj(a,n,r,i,e[o+4],11,1272893353),i=Wj(i,a,n,r,e[o+7],16,-155497632),r=Wj(r,i,a,n,e[o+10],23,-1094730640),n=Wj(n,r,i,a,e[o+13],4,681279174),a=Wj(a,n,r,i,e[o],11,-358537222),i=Wj(i,a,n,r,e[o+3],16,-722521979),r=Wj(r,i,a,n,e[o+6],23,76029189),n=Wj(n,r,i,a,e[o+9],4,-640364487),a=Wj(a,n,r,i,e[o+12],11,-421815835),i=Wj(i,a,n,r,e[o+15],16,530742520),r=Wj(r,i,a,n,e[o+2],23,-995338651),n=Gj(n,r,i,a,e[o],6,-198630844),a=Gj(a,n,r,i,e[o+7],10,1126891415),i=Gj(i,a,n,r,e[o+14],15,-1416354905),r=Gj(r,i,a,n,e[o+5],21,-57434055),n=Gj(n,r,i,a,e[o+12],6,1700485571),a=Gj(a,n,r,i,e[o+3],10,-1894986606),i=Gj(i,a,n,r,e[o+10],15,-1051523),r=Gj(r,i,a,n,e[o+1],21,-2054922799),n=Gj(n,r,i,a,e[o+8],6,1873313359),a=Gj(a,n,r,i,e[o+15],10,-30611744),i=Gj(i,a,n,r,e[o+6],15,-1560198380),r=Gj(r,i,a,n,e[o+13],21,1309151649),n=Gj(n,r,i,a,e[o+4],6,-145523070),a=Gj(a,n,r,i,e[o+11],10,-1120210379),i=Gj(i,a,n,r,e[o+2],15,718787259),r=Gj(r,i,a,n,e[o+9],21,-343485551),n=zj(n,s),r=zj(r,c),i=zj(i,l),a=zj(a,u)}return[n,r,i,a]}function Rj(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(Ij(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function zj(e,t){var n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function Bj(e,t){return e<<t|e>>>32-t}function Vj(e,t,n,r,i,a){return zj(Bj(zj(zj(t,e),zj(r,a)),i),n)}function Hj(e,t,n,r,i,a,o){return Vj(t&n|~t&r,e,t,i,a,o)}function Uj(e,t,n,r,i,a,o){return Vj(t&r|n&~r,e,t,i,a,o)}function Wj(e,t,n,r,i,a,o){return Vj(t^n^r,e,t,i,a,o)}function Gj(e,t,n,r,i,a,o){return Vj(n^(t|~r),e,t,i,a,o)}var Kj=t((()=>{})),qj,Jj=t((()=>{Nj(),Kj(),qj=Aj(`v3`,48,Pj)}));function Yj(e,t,n){e||={};var r=e.random||(e.rng||lj)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n||=0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return _j(r)}var Xj=t((()=>{fj(),bj()}));function Zj(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function Qj(e,t){return e<<t|e>>>32-t}function $j(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e==`string`){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,o=Math.ceil(a/16),s=Array(o),c=0;c<o;++c){for(var l=new Uint32Array(16),u=0;u<16;++u)l[u]=e[c*64+u*4]<<24|e[c*64+u*4+1]<<16|e[c*64+u*4+2]<<8|e[c*64+u*4+3];s[c]=l}s[o-1][14]=(e.length-1)*8/2**32,s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<o;++d){for(var f=new Uint32Array(80),p=0;p<16;++p)f[p]=s[d][p];for(var m=16;m<80;++m)f[m]=Qj(f[m-3]^f[m-8]^f[m-14]^f[m-16],1);for(var h=n[0],g=n[1],_=n[2],v=n[3],y=n[4],b=0;b<80;++b){var x=Math.floor(b/20),S=Qj(h,5)+Zj(x,g,_,v)+y+t[x]+f[b]>>>0;y=v,v=_,_=Qj(g,30)>>>0,g=h,h=S}n[0]=n[0]+h>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+_>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}var eM=t((()=>{})),tM,nM=t((()=>{Nj(),eM(),tM=Aj(`v5`,80,$j)})),rM,iM=t((()=>{rM=`00000000-0000-0000-0000-000000000000`}));function aM(e){if(!hj(e))throw TypeError(`Invalid UUID`);return parseInt(e.substr(14,1),16)}var oM=t((()=>{gj()})),sM=r({NIL:()=>rM,parse:()=>Dj,stringify:()=>_j,v1:()=>xj,v3:()=>qj,v4:()=>Yj,v5:()=>tM,validate:()=>hj,version:()=>aM}),cM=t((()=>{Ej(),Jj(),Xj(),nM(),iM(),oM(),gj(),bj(),Oj()})),lM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.STORAGE_PREFIX=e.LOCAL_STORAGE_KEYS=e.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY=e.STATSIG_STABLE_ID_KEY=e.INTERNAL_STORE_KEY=e.STICKY_DEVICE_EXPERIMENTS_KEY=e.OVERRIDES_STORE_KEY=void 0,e.OVERRIDES_STORE_KEY=`STATSIG_LOCAL_STORAGE_INTERNAL_STORE_OVERRIDES_V3`,e.STICKY_DEVICE_EXPERIMENTS_KEY=`STATSIG_LOCAL_STORAGE_STICKY_DEVICE_EXPERIMENTS`,e.INTERNAL_STORE_KEY=`STATSIG_LOCAL_STORAGE_INTERNAL_STORE_V4`,e.STATSIG_STABLE_ID_KEY=`STATSIG_LOCAL_STORAGE_STABLE_ID`,e.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY=`STATSIG_LOCAL_STORAGE_LOGGING_REQUEST`,e.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},e.STORAGE_PREFIX=`STATSIG_LOCAL_STORAGE`})),uM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=function(){function e(){}return e.getItemAsync=function(t){return e.asyncStorage?e.asyncStorage.getItem(t)??null:Promise.resolve(null)},e.setItemAsync=function(t,n){return e.asyncStorage?e.asyncStorage.setItem(t,n):Promise.resolve()},e.removeItemAsync=function(t){return e.asyncStorage?e.asyncStorage.removeItem(t):Promise.resolve()},e}()})),dM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=lM();e.default=function(){function e(){}return e.getItem=function(e){try{if(this.isStorageAccessible())return window.localStorage.getItem(e)}catch{}return this.fallbackSessionCache[e]??null},e.setItem=function(e,t){try{if(this.isStorageAccessible()){window.localStorage.setItem(e,t);return}}catch{}this.fallbackSessionCache[e]=t},e.removeItem=function(e){try{if(this.isStorageAccessible()){window.localStorage.removeItem(e);return}}catch{}delete this.fallbackSessionCache[e]},e.cleanup=function(){try{if(this.isStorageAccessible(!0))for(var e in window.localStorage)typeof window.localStorage[e]==`string`&&e!=null&&(!this.disabled&&e in t.LOCAL_STORAGE_KEYS||!this.disabled&&e.substring(0,t.STORAGE_PREFIX.length)!==t.STORAGE_PREFIX||window.localStorage.removeItem(e))}catch{}},e.isStorageAccessible=function(e){e===void 0&&(e=!1),this.canAccessStorageAccessible??=typeof Storage<`u`&&typeof window<`u`&&window!=null&&window.localStorage!=null;var t=this.canAccessStorageAccessible;return(e||!this.disabled)&&t},e.disabled=!1,e.fallbackSessionCache={},e.canAccessStorageAccessible=null,e}()})),fM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.version=void 0,e.version=`4.42.0`})),pM=i((t=>{var n=t&&t.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},r=t&&t.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},i=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0});var a=(cM(),e(sM)),o=lM(),s=i(uM()),c=i(dM()),l=fM();t.default=function(){function e(e,t,n){this.platform=null,this.nativeModules=null,this.sdkType=`js-client`,this.reactNativeUUID=n,this.user=e,this.sdkVersion=l.version,this.statsigMetadata={sdkType:this.sdkType,sdkVersion:this.sdkVersion};var r=t;s.default.asyncStorage||(r=r??c.default.getItem(o.STATSIG_STABLE_ID_KEY)??this.getUUID()),r&&(this.statsigMetadata.stableID=r)}return e.prototype.saveStableID=function(){this.statsigMetadata.stableID!=null&&c.default.setItem(o.STATSIG_STABLE_ID_KEY,this.statsigMetadata.stableID)},e.prototype.initAsync=function(){return n(this,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return e=this.statsigMetadata.stableID,e?[3,2]:[4,s.default.getItemAsync(o.STATSIG_STABLE_ID_KEY)];case 1:e=t.sent(),e??=this.getUUID(),t.label=2;case 2:return s.default.setItemAsync(o.STATSIG_STABLE_ID_KEY,e).catch(function(){}),this.statsigMetadata.stableID=e,[2,this]}})})},e.prototype.getSDKType=function(){return this.sdkType},e.prototype.getSDKVersion=function(){return this.sdkVersion},e.prototype.getStatsigMetadata=function(){return this.statsigMetadata.sdkType=this.sdkType,this.statsigMetadata.sdkVersion=this.sdkVersion,this.statsigMetadata},e.prototype.getUser=function(){return this.user},e.prototype.updateUser=function(e){this.user=e},e.prototype.setSDKPackageInfo=function(e){this.sdkType=e.sdkType,this.sdkVersion=e.sdkVersion},e.prototype.setPlatform=function(e){this.platform=e,this.updateMetadataFromNativeModules()},e.prototype.setNativeModules=function(e){this.nativeModules=e,this.updateMetadataFromNativeModules()},e.prototype.updateMetadataFromNativeModules=function(){this.platform==null||this.nativeModules==null||(this.platform.OS?.toLocaleLowerCase()===`android`?this.statsigMetadata.locale=this.nativeModules.I18nManager?.localeIdentifier:this.platform.OS?.toLocaleLowerCase()===`ios`&&(this.statsigMetadata.locale=this.nativeModules.SettingsManager?.settings?.AppleLocale||(this.nativeModules.SettingsManager?.settings)?.AppleLanguages[0]))},e.prototype.getUUID=function(){return this.reactNativeUUID?.v4()??(0,a.v4)()},e.prototype.setRNDeviceInfo=function(e){this.statsigMetadata.appVersion=e.getVersion()??``,this.statsigMetadata.systemVersion=e.getSystemVersion()??``,this.statsigMetadata.systemName=e.getSystemName()??``,this.statsigMetadata.deviceModelName=e.getModel()??``,this.statsigMetadata.deviceModel=e.getDeviceId()??``},e.prototype.setExpoConstants=function(e){this.statsigMetadata.appVersion=e.nativeAppVersion??e.nativeBuildVersion??``},e.prototype.setExpoDevice=function(e){this.statsigMetadata.systemVersion=e.osVersion??``,this.statsigMetadata.systemName=e.osName??``,this.statsigMetadata.deviceModelName=e.modelName??``,this.statsigMetadata.deviceModel=e.modelId??``},e}()})),mM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=function(){function e(){}return e.encodeInitializeCall=!0,e}()})),hM=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.StatsigEndpoint=void 0;var i=r(mM()),a=r(ij()),o;(function(e){e.Initialize=`initialize`,e.Rgstr=`rgstr`,e.LogEventBeacon=`log_event_beacon`})(o=e.StatsigEndpoint||={});var s=204;e.default=function(){function e(e){this.retryCodes={408:!0,500:!0,502:!0,503:!0,504:!0,522:!0,524:!0,599:!0},this.canUseKeepalive=!1,this.sdkInternal=e,this.leakyBucket={},this.init()}return e.prototype.init=function(){if(!this.sdkInternal.getOptions().getDisableNetworkKeepalive())try{this.canUseKeepalive=`keepalive`in new Request(``)}catch{this.canUseKeepalive=!1}},e.prototype.fetchValues=function(e){var t=e.user,n=e.sinceTime,r=e.timeout,i=e.useDeltas,s=e.prefetchUsers,c=e.previousDerivedFields,l=e.hadBadDeltaChecksum,u=e.badChecksum,d={user:t,prefetchUsers:s,statsigMetadata:this.sdkInternal.getStatsigMetadata(),sinceTime:n??void 0,canProcessDeltas:i,hash:`djb2`,previousDerivedFields:c,hadBadDeltaChecksum:l,badChecksum:u};return this.postWithTimeout(o.Initialize,d,{timeout:r,retries:3,diagnostics:a.default.mark.intialize.networkRequest})},e.prototype.postWithTimeout=function(e,r,i){var a=this,o=i??{},s=o.timeout,c=s===void 0?0:s,l=o.retries,u=l===void 0?0:l,d=o.backoff,f=d===void 0?1e3:d,p=o.diagnostics,m=p===void 0?null:p,h=!1,g=null,_=null,v=[],y=function(e){return function(t){return h&&_?t(_):v.push(t),e}};c!=0&&(g=new Promise(function(e,t){setTimeout(function(){h=!0,t(Error(`The initialization timeout of `+c+`ms has been hit before the network request has completed.`))},c)}));var b,x=this.postToEndpoint(e,r,{retryOptions:{retryLimit:u,backoff:f},diagnostics:m}).then(function(i){if(b=i,!b.ok)return Promise.reject(Error(`Request to `+e+` failed with status `+b.status));if(typeof b.data!=`object`){var o=Error(`Request to `+e+` received invalid response type. Expected 'object' but got '`+typeof b.data+`'`);return a.sdkInternal.getErrorBoundary().logError(`postWithTimeoutInvalidRes`,o,function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,this.getErrorData(e,r,u,f,b)]})})}),Promise.reject(o)}var s=b.data;return a.sdkInternal.getErrorBoundary().capture(`postWithTimeout`,function(){return t(a,void 0,void 0,function(){return n(this,function(e){return _=s,h&&(v.forEach(function(e){return e(s)}),v=[]),[2,Promise.resolve(s)]})})},function(){return Promise.resolve({})},{getExtraData:function(){return t(a,void 0,void 0,function(){return n(this,function(t){return[2,this.getErrorData(e,r,u,f,b)]})})}})}).catch(function(e){return Promise.reject(e)}),S=g?Promise.race([x,g]):x;return S.eventually=y(S),S},e.prototype.sendLogBeacon=function(e){var t=this.sdkInternal.getOptions();if(t.getLocalModeEnabled())return!0;var n=new URL(t.getEventLoggingApi()+o.LogEventBeacon);n.searchParams.append(`k`,this.sdkInternal.getSDKKey()),e.clientTime=Date.now()+``;var r=null;try{r=JSON.stringify(e)}catch{return!1}return navigator.sendBeacon(n.toString(),r)},e.prototype.postToEndpoint=function(e,r,a){return t(this,void 0,void 0,function(){var c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee,te,ne,D=this;return n(this,function(re){if(c=a??{},l=c.useKeepalive,u=l===void 0?!1:l,d=c.diagnostics,f=d===void 0?null:d,p=a?.retryOptions??{},m=p.retryLimit,h=m===void 0?0:m,g=p.attempt,_=g===void 0?1:g,v=p.backoff,y=v===void 0?1e3:v,b=this.sdkInternal.getOptions(),b.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`&&!b.getIgnoreWindowUndefined())return[2,Promise.reject(`window is not defined`)];if(x=[o.Initialize].includes(e)?b.getApi():b.getEventLoggingApi(),S=x+e,C=this.leakyBucket[S],C!=null&&C>=30)return[2,Promise.reject(Error(`Request failed because you are making the same request too frequently.`))];if(C==null?this.leakyBucket[S]=1:this.leakyBucket[S]=C+1,w=e===o.Initialize&&i.default.encodeInitializeCall&&typeof window<`u`&&typeof(window==null?void 0:window.btoa)==`function`,T=JSON.stringify(r),w)try{E=window.btoa(T).split(``).reverse().join(``),T=E}catch{w=!1}return ee={method:`POST`,body:T,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":w?`1`:`0`}},this.canUseKeepalive&&u&&(ee.keepalive=!0),f?.start({attempt:_}),ne=!0,[2,fetch(S,ee).then(function(e){return t(D,void 0,void 0,function(){var t,r,i;return n(this,function(n){switch(n.label){case 0:return te=e,te.ok?(t=te,te.status===s?(t.data={has_updates:!1,is_no_content:!0},[3,3]):[3,1]):[3,4];case 1:return[4,te.text()];case 2:r=n.sent(),t.data=JSON.parse(r),n.label=3;case 3:return f?.end(this.getDiagnosticsData(te,_)),[2,Promise.resolve(t)];case 4:return this.retryCodes[te.status]||(ne=!1),[4,te.text()];case 5:return i=n.sent(),[2,Promise.reject(Error(te.status+`: `+i))]}})})}).catch(function(t){return f?.end(D.getDiagnosticsData(te,_,t)),_<h&&ne?new Promise(function(t,n){setTimeout(function(){D.leakyBucket[S]=Math.max(D.leakyBucket[S]-1,0),D.postToEndpoint(e,r,{retryOptions:{retryLimit:h,attempt:_+1,backoff:y*2},useKeepalive:u,diagnostics:f}).then(t).catch(n)},y)}):Promise.reject(t)}).finally(function(){D.leakyBucket[S]=Math.max(D.leakyBucket[S]-1,0)})]})})},e.prototype.supportsKeepalive=function(){return this.canUseKeepalive},e.prototype.getDiagnosticsData=function(e,t,n){return{success:e?.ok===!0,statusCode:e?.status,sdkRegion:(e?.headers)?.get(`x-statsig-region`),isDelta:e?.data?.is_delta===!0,attempt:t,error:a.default.formatError(n)}},e.prototype.getErrorData=function(e,r,i,a,o){return t(this,void 0,void 0,function(){var t;return n(this,function(n){try{return t={},(o.headers??[]).forEach(function(e,n){t[n]=e}),[2,{responseInfo:{headers:t,status:o.status,statusText:o.statusText,type:o.type,url:o.url,redirected:o.redirected,bodySnippet:o.data?JSON.stringify(o.data).slice(0,500):null},requestInfo:{endpointName:e,bodySnippet:JSON.stringify(r).slice(0,500),retries:i,backoff:a}}]}catch{return[2,{statusText:`statsig::failed to extract extra data`}]}return[2]})})},e}()})),gM=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var i=r(cj()),a=hM(),o=lM(),s=r(ij()),c=r(uM()),l=r(dM()),u=`statsig::`,d=u+`config_exposure`,f=u+`layer_exposure`,p=u+`gate_exposure`,m=u+`log_event_failed`,h=u+`app_error`,g=u+`app_metrics::page_load_time`,_=u+`app_metrics::dom_interactive_time`,v=u+`app_metrics::scroll_depth`,y=u+`app_metrics::time_on_page_ms`,b=u+`diagnostics`,x=u+`default_value_type_mismatch`,S=7200*60*1e3,C=100,w=1e3,T=1024*w,E=10;e.default=function(){function e(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 e.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)))},e.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 t=window.location.href.split(/[?#]/);t?.length>0&&e.addStatsigMetadata(`currentPage`,t[0])}}catch{}this.queue.push(e.toJsonObject()),this.queue.length>=this.sdkInternal.getOptions().getLoggingBufferMaxSize()&&this.flush()}},e.prototype.resetDedupeKeys=function(){this.exposureDedupeKeys={}},e.prototype.shouldLogExposure=function(e){var t=this.exposureDedupeKeys[e],n=Date.now();return t==null?(this.exposureDedupeKeys[e]=n,!0):t>=n-600*1e3?!1:(this.exposureDedupeKeys[e]=n,!0)},e.prototype.logGateExposure=function(e,t,n,r,a,o,s){var c=t+String(n)+r+o.reason;if(this.shouldLogExposure(c)){var l={gate:t,gateValue:String(n),ruleID:r,reason:o.reason,time:o.time};s&&(l.isManualExposure=`true`);var u=new i.default(p);u.setUser(e),u.setMetadata(l),u.setSecondaryExposures(a),this.log(u)}},e.prototype.logConfigExposure=function(e,t,n,r,a,o){var s=t+n+a.reason;if(this.shouldLogExposure(s)){var c={config:t,ruleID:n,reason:a.reason,time:a.time};o&&(c.isManualExposure=`true`);var l=new i.default(d);l.setUser(e),l.setMetadata(c),l.setSecondaryExposures(r),this.log(l)}},e.prototype.logLayerExposure=function(e,t,n,r,a,o,s,c,l){var u=[t,n,a,o,String(s),c.reason].join(`|`);if(this.shouldLogExposure(u)){var d={config:t,ruleID:n,allocatedExperiment:a,parameterName:o,isExplicitParameter:String(s),reason:c.reason,time:c.time};l&&(d.isManualExposure=`true`);var p=new i.default(f);p.setUser(e),p.setMetadata(d),p.setSecondaryExposures(r),this.log(p)}},e.prototype.logConfigDefaultValueFallback=function(e,t,n){this.logGenericEvent(x,e,t,n),this.loggedErrors.add(t),this.sdkInternal.getConsoleLogger().error(t)},e.prototype.logAppError=function(e,t,n){var r=t.substring(0,128);this.loggedErrors.has(r)||this.loggedErrors.size>E||(this.logGenericEvent(h,e,r,n),this.loggedErrors.add(r))},e.prototype.logDiagnostics=function(e,t){if(!s.default.disabled){var n=s.default.getMarkers(t);s.default.clearContext(t);var r=this.makeDiagnosticsEvent(e,{markers:n,context:t});this.log(r)}},e.prototype.logAppMetrics=function(e){var t=this;if(typeof(window==null?void 0:window.performance)?.getEntriesByType==`function`){var n=window.performance.getEntriesByType(`navigation`);if(!(!n||n.length<1)){var r=n[0],i={url:r.name};if(r instanceof PerformanceNavigationTiming&&(this.logGenericEvent(g,e,r.duration,i),this.logGenericEvent(_,e,r.domInteractive-r.startTime,i)),typeof(window==null?void 0:window.addEventListener)==`function`&&document!=null&&document.body){var a=0;window.addEventListener(`scroll`,function(){var e=document.body.scrollHeight||1,t=Math.min(100,Math.round((window.scrollY+window.innerHeight)/e*100));t>a&&(a=t)}),window.addEventListener(`beforeunload`,function(){t.logGenericEvent(v,e,a,i),t.logGenericEvent(y,e,window.performance.now(),i)})}}}},e.prototype.logGenericEvent=function(e,t,n,r){var a=new i.default(e);return a.setUser(t),a.setValue(n),a.setMetadata(r),this.log(a),a},e.prototype.shutdown=function(){this.flushInterval&&=(clearInterval(this.flushInterval),null),this.flush(!0)},e.prototype.flush=function(e){var r=this;if(e===void 0&&(e=!1),this.addErrorBoundaryDiagnostics(),this.queue.length!==0){var i=this.queue;if(this.queue=[],e&&!this.sdkInternal.getNetwork().supportsKeepalive()&&typeof navigator<`u`&&(navigator==null?void 0:navigator.sendBeacon)!=null){this.sdkInternal.getNetwork().sendLogBeacon({events:i,statsigMetadata:this.sdkInternal.getStatsigMetadata()})||(this.queue=i.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(a.StatsigEndpoint.Rgstr,{events:i,statsigMetadata:this.sdkInternal.getStatsigMetadata()},{retryOptions:{retryLimit:3,backoff:1e3},useKeepalive:e}).then(function(e){if(!e.ok)throw e}).catch(function(e){typeof e.text==`function`?e.text().then(function(a){r.sdkInternal.getErrorBoundary().logError(m,e,function(){return t(r,void 0,void 0,function(){return n(this,function(e){return[2,{eventCount:i.length,error:a}]})})})}):r.sdkInternal.getErrorBoundary().logError(m,e,function(){return t(r,void 0,void 0,function(){return n(this,function(t){return[2,{eventCount:i.length,error:e.message}]})})}),r.newFailedRequest(m,i)}).finally(function(){return t(r,void 0,void 0,function(){return n(this,function(t){return e&&(this.queue.length>0&&(this.addFailedRequest({events:this.queue,statsigMetadata:this.sdkInternal.getStatsigMetadata(),time:Date.now()}),this.queue=[]),this.saveFailedRequests()),[2]})})})}},e.prototype.saveFailedRequests=function(){var e=this;if(this.failedLogEvents.length>0){var t=JSON.stringify(this.failedLogEvents);if(t.length>T){this.clearLocalStorageRequests();return}if(c.default.asyncStorage){c.default.setItemAsync(o.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY,t).catch(function(t){return e.sdkInternal.getErrorBoundary().logError(`saveFailedRequests`,t)});return}l.default.setItem(o.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY,t)}},e.prototype.sendSavedRequests=function(){return t(this,void 0,void 0,function(){var e,t,r,i,s,u,d,f,p=this;return n(this,function(n){switch(n.label){case 0:return t=!1,c.default.asyncStorage?[4,c.default.getItemAsync(o.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY)]:[3,2];case 1:return e=n.sent(),[3,3];case 2:e=l.default.getItem(o.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY),n.label=3;case 3:if(e==null)return this.clearLocalStorageRequests(),[2];e.length>T&&(t=!0),r=[];try{for(r=JSON.parse(e),i=function(e){e!=null&&e.events&&Array.isArray(e.events)&&s.sdkInternal.getNetwork().postToEndpoint(a.StatsigEndpoint.Rgstr,e).then(function(e){if(!e.ok)throw Error(e.status+``)}).catch(function(){t||p.addFailedRequest(e)})},s=this,u=0,d=r;u<d.length;u++)f=d[u],i(f)}catch(e){this.sdkInternal.getErrorBoundary().logError(`sendSavedRequests`,e)}finally{this.clearLocalStorageRequests()}return[2]}})})},e.prototype.addFailedRequest=function(e){if(!(e.time<Date.now()-S)&&!(this.failedLogEvents.length>C)){var t=e.events.length;this.failedLogEventCount+t>w||(this.failedLogEvents.push(e),this.failedLogEventCount+=t)}},e.prototype.clearLocalStorageRequests=function(){var e=this;c.default.asyncStorage?c.default.removeItemAsync(o.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY).catch(function(t){return e.sdkInternal.getErrorBoundary().logError(`clearLocalStorageRequests`,t)}):l.default.removeItem(o.STATSIG_LOCAL_STORAGE_LOGGING_REQUEST_KEY)},e.prototype.newFailedRequest=function(e,t){this.loggedErrors.has(e)||(this.loggedErrors.add(e),this.failedLogEvents.push({events:t,statsigMetadata:this.sdkInternal.getStatsigMetadata(),time:Date.now()}),this.saveFailedRequests())},e.prototype.makeDiagnosticsEvent=function(e,t){var n=new i.default(b);return n.setUser(e),n.setMetadata(t),n},e.prototype.addErrorBoundaryDiagnostics=function(){if(s.default.getMarkerCount(`api_call`)!==0){var e=this.makeDiagnosticsEvent(this.sdkInternal.getCurrentUser(),{context:`api_call`,markers:s.default.getMarkers(`api_call`)});this.queue.push(e),s.default.clearContext(`api_call`)}},e}()})),_M=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LogLevel=e.INIT_TIMEOUT_DEFAULT_MS=void 0;var t=`https://featuregates.org/v1/`,n=`https://events.statsigapi.net/v1/`;e.INIT_TIMEOUT_DEFAULT_MS=3e3;var r;(function(e){e[e.NONE=0]=`NONE`,e[e.INFO=1]=`INFO`,e[e.DEBUG=2]=`DEBUG`})(r=e.LogLevel||={}),e.default=function(){function i(i){i??={};var a=i.api??t;this.api=a.endsWith(`/`)?a:a+`/`,this.disableCurrentPageLogging=i.disableCurrentPageLogging??!1,this.environment=i.environment??null,this.loggingIntervalMillis=this.normalizeNumberInput(i.loggingIntervalMillis,{default:1e4,min:1e3,max:6e4}),this.loggingBufferMaxSize=this.normalizeNumberInput(i.loggingBufferMaxSize,{default:100,min:2,max:500}),this.disableNetworkKeepalive=i.disableNetworkKeepalive??!1,this.overrideStableID=i.overrideStableID??null,this.localMode=i.localMode??!1,this.initTimeoutMs=i.initTimeoutMs&&i.initTimeoutMs>=0?i.initTimeoutMs:e.INIT_TIMEOUT_DEFAULT_MS,this.disableErrorLogging=i.disableErrorLogging??!1,this.disableAutoMetricsLogging=i.disableAutoMetricsLogging??!1,this.initializeValues=i.initializeValues??null;var o=i.eventLoggingApi??i.api??n;this.eventLoggingApi=o.endsWith(`/`)?o:o+`/`,this.prefetchUsers=i.prefetchUsers??[],this.disableLocalStorage=i.disableLocalStorage??!1,this.initCompletionCallback=i.initCompletionCallback??null,this.updateCompletionCallback=i.updateUserCompletionCallback??null,this.disableDiagnosticsLogging=i.disableDiagnosticsLogging??!1,this.logLevel=i?.logLevel??r.NONE,this.ignoreWindowUndefined=i?.ignoreWindowUndefined??!1,this.fetchMode=i.fetchMode??`network-only`,this.disableLocalOverrides=i?.disableLocalOverrides??!1,this.gateEvaluationCallback=i?.gateEvaluationCallback??null,this.userPersistentStorage=i?.userPersistentStorage??null,this.disableAllLogging=i.disableAllLogging??!1}return i.prototype.getApi=function(){return this.api},i.prototype.getEnvironment=function(){return this.environment},i.prototype.getDisableCurrentPageLogging=function(){return this.disableCurrentPageLogging},i.prototype.getLoggingIntervalMillis=function(){return this.loggingIntervalMillis},i.prototype.getLoggingBufferMaxSize=function(){return this.loggingBufferMaxSize},i.prototype.getDisableNetworkKeepalive=function(){return this.disableNetworkKeepalive},i.prototype.getOverrideStableID=function(){return this.overrideStableID},i.prototype.getLocalModeEnabled=function(){return this.localMode},i.prototype.getInitTimeoutMs=function(){return this.initTimeoutMs},i.prototype.getDisableErrorLogging=function(){return this.disableErrorLogging},i.prototype.getDisableAutoMetricsLogging=function(){return this.disableAutoMetricsLogging},i.prototype.getInitializeValues=function(){return this.initializeValues},i.prototype.getEventLoggingApi=function(){return this.eventLoggingApi},i.prototype.getPrefetchUsers=function(){return this.prefetchUsers},i.prototype.getDisableLocalStorage=function(){return this.disableLocalStorage},i.prototype.getInitCompletionCallback=function(){return this.initCompletionCallback},i.prototype.getUpdateUserCompletionCallback=function(){return this.updateCompletionCallback},i.prototype.getDisableDiagnosticsLogging=function(){return this.disableDiagnosticsLogging},i.prototype.getLogLevel=function(){return this.logLevel},i.prototype.getIgnoreWindowUndefined=function(){return this.ignoreWindowUndefined},i.prototype.getFetchMode=function(){return this.fetchMode},i.prototype.getDisableLocalOverrides=function(){return this.disableLocalOverrides},i.prototype.getGateEvaluationCallback=function(){return this.gateEvaluationCallback},i.prototype.getUserPersistentStorage=function(){return this.userPersistentStorage},i.prototype.isAllLoggingDisabled=function(){return this.disableAllLogging},i.prototype.reenableAllLogging=function(){this.disableAllLogging=!1},i.prototype.normalizeNumberInput=function(e,t){return e==null?t.default:Math.max(Math.min(e,t.max),t.min)},i}()})),vM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Base64=void 0,e.Base64={_keyStr:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,_encodeBinary:function(e){for(var t=``,n,r,i,a,o,s,c,l=0;l<e.length;)n=e.charCodeAt(l++),r=e.charCodeAt(l++),i=e.charCodeAt(l++),a=n>>2,o=(n&3)<<4|r>>4,s=(r&15)<<2|i>>6,c=i&63,isNaN(r)?s=c=64:isNaN(i)&&(c=64),t=t+this._keyStr.charAt(a)+this._keyStr.charAt(o)+this._keyStr.charAt(s)+this._keyStr.charAt(c);return t},encodeArrayBuffer:function(t){for(var n=``,r=new Uint8Array(t),i=r.byteLength,a=0;a<i;a++)n+=String.fromCharCode(r[a]);return e.Base64._encodeBinary(n)}}})),yM=i(((e,t)=>{t.exports={}})),bM=i(((e,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`,a=!r.JS_SHA256_NO_NODE_JS&&typeof process==`object`&&process.versions&&process.versions.node;a?r=global:i&&(r=self);var o=!r.JS_SHA256_NO_COMMON_JS&&typeof t==`object`&&t.exports,s=typeof define==`function`&&define.amd,c=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,l=`0123456789abcdef`.split(``),u=[-2147483648,8388608,32768,128],d=[24,16,8,0],f=[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],p=[`hex`,`array`,`digest`,`arrayBuffer`],m=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)===`[object Array]`}),c&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});var h=function(e,t){return function(n){return new b(t,!0).update(n)[e]()}},g=function(e){var t=h(`hex`,e);a&&(t=_(t,e)),t.create=function(){return new b(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<p.length;++n){var r=p[n];t[r]=h(r,e)}return t},_=function(t,n){var i=yM(),a=yM().Buffer,o=n?`sha224`:`sha256`,s=a.from&&!r.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)};return function(n){if(typeof n==`string`)return i.createHash(o).update(n,`utf8`).digest(`hex`);if(n==null)throw Error(e);return n.constructor===ArrayBuffer&&(n=new Uint8Array(n)),Array.isArray(n)||ArrayBuffer.isView(n)||n.constructor===a?i.createHash(o).update(s(n)).digest(`hex`):t(n)}},v=function(e,t){return function(n,r){return new x(n,t,!0).update(r)[e]()}},y=function(e){var t=v(`hex`,e);t.create=function(t){return new x(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<p.length;++n){var r=p[n];t[r]=v(r,e)}return t};function b(e,t){t?(m[0]=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0,this.blocks=m):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(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=e}b.prototype.update=function(t){if(!this.finalized){var n,r=typeof t;if(r!==`string`){if(r===`object`){if(t===null)throw Error(e);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw Error(e)}else throw Error(e);n=!0}for(var i,a=0,o,s=t.length,l=this.blocks;a<s;){if(this.hashed&&(this.hashed=!1,l[0]=this.block,l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),n)for(o=this.start;a<s&&o<64;++a)l[o>>2]|=t[a]<<d[o++&3];else for(o=this.start;a<s&&o<64;++a)i=t.charCodeAt(a),i<128?l[o>>2]|=i<<d[o++&3]:i<2048?(l[o>>2]|=(192|i>>6)<<d[o++&3],l[o>>2]|=(128|i&63)<<d[o++&3]):i<55296||i>=57344?(l[o>>2]|=(224|i>>12)<<d[o++&3],l[o>>2]|=(128|i>>6&63)<<d[o++&3],l[o>>2]|=(128|i&63)<<d[o++&3]):(i=65536+((i&1023)<<10|t.charCodeAt(++a)&1023),l[o>>2]|=(240|i>>18)<<d[o++&3],l[o>>2]|=(128|i>>12&63)<<d[o++&3],l[o>>2]|=(128|i>>6&63)<<d[o++&3],l[o>>2]|=(128|i&63)<<d[o++&3]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=l[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this}},b.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=u[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},b.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=this.blocks,l,u,d,p,m,h,g,_,v,y,b;for(l=16;l<64;++l)m=c[l-15],u=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=c[l-2],d=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,c[l]=c[l-16]+u+c[l-7]+d<<0;for(b=t&n,l=0;l<64;l+=4)this.first?(this.is224?(_=300032,m=c[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(_=704751109,m=c[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),_=e&t,p=_^e&n^b,g=i&a^~i&o,m=s+d+g+f[l]+c[l],h=u+p,s=r+m<<0,r=m+h<<0),u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),v=r&e,p=v^r&t^_,g=s&i^~s&a,m=o+d+g+f[l+1]+c[l+1],h=u+p,o=n+m<<0,n=m+h<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),d=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=n&r,p=y^n&e^v,g=o&s^~o&i,m=a+d+g+f[l+2]+c[l+2],h=u+p,a=t+m<<0,t=m+h<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),d=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&n,p=b^t&r^y,g=a&o^~a&s,m=i+d+g+f[l+3]+c[l+3],h=u+p,i=e+m<<0,e=m+h<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0},b.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=l[e>>28&15]+l[e>>24&15]+l[e>>20&15]+l[e>>16&15]+l[e>>12&15]+l[e>>8&15]+l[e>>4&15]+l[e&15]+l[t>>28&15]+l[t>>24&15]+l[t>>20&15]+l[t>>16&15]+l[t>>12&15]+l[t>>8&15]+l[t>>4&15]+l[t&15]+l[n>>28&15]+l[n>>24&15]+l[n>>20&15]+l[n>>16&15]+l[n>>12&15]+l[n>>8&15]+l[n>>4&15]+l[n&15]+l[r>>28&15]+l[r>>24&15]+l[r>>20&15]+l[r>>16&15]+l[r>>12&15]+l[r>>8&15]+l[r>>4&15]+l[r&15]+l[i>>28&15]+l[i>>24&15]+l[i>>20&15]+l[i>>16&15]+l[i>>12&15]+l[i>>8&15]+l[i>>4&15]+l[i&15]+l[a>>28&15]+l[a>>24&15]+l[a>>20&15]+l[a>>16&15]+l[a>>12&15]+l[a>>8&15]+l[a>>4&15]+l[a&15]+l[o>>28&15]+l[o>>24&15]+l[o>>20&15]+l[o>>16&15]+l[o>>12&15]+l[o>>8&15]+l[o>>4&15]+l[o&15];return this.is224||(c+=l[s>>28&15]+l[s>>24&15]+l[s>>20&15]+l[s>>16&15]+l[s>>12&15]+l[s>>8&15]+l[s>>4&15]+l[s&15]),c},b.prototype.toString=b.prototype.hex,b.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,i>>24&255,i>>16&255,i>>8&255,i&255,a>>24&255,a>>16&255,a>>8&255,a&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||c.push(s>>24&255,s>>16&255,s>>8&255,s&255),c},b.prototype.array=b.prototype.digest,b.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function x(t,n,r){var i,a=typeof t;if(a===`string`){var o=[],s=t.length,l=0,u;for(i=0;i<s;++i)u=t.charCodeAt(i),u<128?o[l++]=u:u<2048?(o[l++]=192|u>>6,o[l++]=128|u&63):u<55296||u>=57344?(o[l++]=224|u>>12,o[l++]=128|u>>6&63,o[l++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++i)&1023),o[l++]=240|u>>18,o[l++]=128|u>>12&63,o[l++]=128|u>>6&63,o[l++]=128|u&63);t=o}else if(a===`object`){if(t===null)throw Error(e);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw Error(e)}else throw Error(e);t.length>64&&(t=new b(n,!0).update(t).array());var d=[],f=[];for(i=0;i<64;++i){var p=t[i]||0;d[i]=92^p,f[i]=54^p}b.call(this,n,r),this.update(f),this.oKeyPad=d,this.inner=!0,this.sharedMemory=r}x.prototype=new b,x.prototype.finalize=function(){if(b.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();b.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),b.prototype.finalize.call(this)}};var S=g();S.sha256=S,S.sha224=g(!0),S.sha256.hmac=y(),S.sha224.hmac=y(!0),o?t.exports=S:(r.sha256=S.sha256,r.sha224=S.sha224,s&&define(function(){return S}))})()})),xM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getUserCacheKey=e.getSortedObject=e.djb2HashForObject=e.sha256Hash=e.djb2Hash=e.memoizedUserCacheKeyHash=e.fasthash=void 0;var t=vM(),n=bM(),r={};function i(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t}e.fasthash=i;function a(e){var t=r[e];if(t)return t;var n=String(i(e));return r[e]=n,n}e.memoizedUserCacheKeyHash=a;function o(e){return String(i(e)>>>0)}e.djb2Hash=o;function s(e){var i=r[e];if(i)return i;var a=n.sha256.create().update(e).arrayBuffer(),o=t.Base64.encodeArrayBuffer(a);return r[e]=o,o}e.sha256Hash=s;function c(e){return o(JSON.stringify(l(e)))}e.djb2HashForObject=c;function l(e){if(e==null)return null;var t=Object.keys(e).sort(),n={};return t.forEach(function(t){var r=e[t];r instanceof Object&&(r=l(r)),n[t]=r}),n}e.getSortedObject=l;function u(e,t){var n=[`userID:`+String(t?.userID??``)],r=t?.customIDs;if(r!=null)for(var i=0,o=Object.entries(r);i<o.length;i++){var s=o[i],c=s[0],l=s[1];n.push(c+`:`+l)}var u=a(n.join(`;`));return n.splice(1,0,`stableID:`+e),{v1:a(n.join(`;`)),v2:u}}e.getUserCacheKey=u})),SM=i((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(e,`__esModule`,{value:!0}),e.getUserHashWithoutStableID=void 0;var r=xM();function i(e){var i=e.customIDs,a=n(e,[`customIDs`]),o=t({},i);return delete o.stableID,(0,r.djb2HashForObject)(t(t({},a),{customIDs:o}))}e.getUserHashWithoutStableID=i})),CM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.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`})(e.EvaluationReason||={})})),wM=i((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,`__esModule`,{value:!0});var n=SM(),r=CM();e.default=function(){function e(){}return e.getEvaluationReasonForBootstrap=function(t,i,a){var o=!0,s=!1;try{var c=i.evaluated_keys;if(c&&typeof c==`object`){var l=this.copyObject(c),u=t==null?null:this.copyObject(t);o=o&&e.validate(l,u)&&e.validate(u,l),a!=c.customIDs?.stableID&&(s=!0)}var d=i.user_hash;d&&typeof d==`string`&&t!=null&&(o&&=d===(0,n.getUserHashWithoutStableID)(t))}catch{}return o?s?r.EvaluationReason.BootstrapStableIDMismatch:r.EvaluationReason.Bootstrap:r.EvaluationReason.InvalidBootstrap},e.validate=function(e,t){if(e==null)return t==null;if(t==null)return!1;for(var n=0,r=Object.entries(e);n<r.length;n++){var i=r[n],a=i[0],o=i[1];if(a!==`stableID`){if(typeof o!=typeof t[a])return!1;if(typeof o==`string`){if(o!==t[a])return!1}else if(typeof o==`object`)return this.validate(o,t[a]);else return!1}}return!0},e.copyObject=function(e){if(e==null)return null;var n={};if(e?.userID&&(n.userID=e?.userID),e?.customIDs){var r=t({},e.customIDs);delete r.stableID,Object.keys(r).length!==0&&(n.customIDs=r)}return n},e}()})),TM=i((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},r=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var a=i(nj()),o=i(sj()),s=i(wM()),c=lM(),l=xM(),u=i(uM()),d=i(dM()),f=CM(),p=10;e.default=function(){function e(e,t){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=f.EvaluationReason.Uninitialized,this.userPersistentStorageAdapter=this.sdkInternal.getOptions().getUserPersistentStorage(),this.userPersistentStorageData={experiments:{}},t?this.bootstrap(t):this.load()}return e.prototype.load=function(){this.loadFromLocalStorage(),this.partialLoadFromPersistentStorageAdapter()},e.prototype.loadAsync=function(){return n(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,this.loadFromAsyncStorage()];case 1:return e.sent(),this.partialLoadFromPersistentStorageAdapter(),[2]}})})},e.prototype.updateUser=function(e){this.userCacheKey=this.sdkInternal.getCurrentUserCacheKey();var t=this.setUserValueFromCache(e);return this.partialLoadFromPersistentStorageAdapter(),t},e.prototype.loadFromAsyncStorage=function(){return n(this,void 0,void 0,function(){var e,t;return r(this,function(n){switch(n.label){case 0:return e=this.parseCachedValues,[4,u.default.getItemAsync(c.INTERNAL_STORE_KEY)];case 1:return t=[n.sent()],[4,u.default.getItemAsync(c.STICKY_DEVICE_EXPERIMENTS_KEY)];case 2:return e.apply(this,t.concat([n.sent()])),this.userCacheKey=this.sdkInternal.getCurrentUserCacheKey(),this.loaded=!0,[2]}})})},e.prototype.bootstrap=function(e){var t=this.sdkInternal.getCurrentUserCacheKey(),n=this.sdkInternal.getCurrentUser(),r=n?.customIDs?.stableID??this.sdkInternal.getStatsigMetadata().stableID??null,i=s.default.getEvaluationReasonForBootstrap(n,e,r);this.loaded=!0;try{var a=e;this.userValues.feature_gates=a.feature_gates??{},this.userValues.dynamic_configs=a.dynamic_configs??{},this.userValues.layer_configs=a.layer_configs??{},this.userValues.evaluation_time=Date.now(),this.userValues.time=Date.now(),this.userValues.hash_used=a.hash_used,this.values[t.v2]=this.userValues,this.reason=i,this.loadOverrides()}catch{return}},e.prototype.loadFromLocalStorage=function(){u.default.asyncStorage||(this.parseCachedValues(d.default.getItem(c.INTERNAL_STORE_KEY),d.default.getItem(c.STICKY_DEVICE_EXPERIMENTS_KEY)),this.loaded=!0)},e.prototype.partialLoadFromPersistentStorageAdapter=function(){if(this.userPersistentStorageAdapter){var e=this.userPersistentStorageAdapter.userIDType??`userID`,t=this.sdkInternal.getCurrentUserUnitID(e);if(t){try{this.userPersistentStorageData=JSON.parse(this.userPersistentStorageAdapter.load(t+`:`+e))}catch(e){console.warn(`Failed to load from user persistent storage.`,e)}this.userValues.sticky_experiments=this.userPersistentStorageData.experiments}}},e.prototype.saveStickyExperimentsToPersistentStorageAdapter=function(){if(this.userPersistentStorageAdapter){var e=this.userPersistentStorageAdapter.userIDType??`userID`,n=this.sdkInternal.getCurrentUserUnitID(e);if(n){var r=t(t({},this.userPersistentStorageData),{experiments:this.userValues.sticky_experiments});try{this.userPersistentStorageAdapter.save(n+`:`+e,JSON.stringify(r))}catch(e){console.warn(`Failed to save user experiment values to persistent storage.`,e)}}}},e.prototype.isLoaded=function(){return this.loaded},e.prototype.getLastUpdateTime=function(e){var t=(0,l.djb2HashForObject)(e);return this.userValues.user_hash==t?this.userValues.time:null},e.prototype.getPreviousDerivedFields=function(e){var t=(0,l.djb2HashForObject)(e);if(this.userValues.user_hash==t)return this.userValues.derived_fields},e.prototype.parseCachedValues=function(e,t){try{this.values=e?JSON.parse(e):this.values,this.setUserValueFromCache()}catch{this.removeFromStorage(c.INTERNAL_STORE_KEY)}try{var n=t?JSON.parse(t):null;n&&(this.stickyDeviceExperiments=n)}catch{this.removeFromStorage(c.STICKY_DEVICE_EXPERIMENTS_KEY)}this.loadOverrides()},e.prototype.getUserValues=function(e){return this.values[e.v2]??this.values[e.v1]},e.prototype.setUserValueFromCache=function(e){e===void 0&&(e=!1);var t=this.getUserValues(this.userCacheKey);return t==null?(this.resetUserValues(),this.reason=f.EvaluationReason.Uninitialized,null):(this.userValues=t,this.reason=e?f.EvaluationReason.Prefetch:f.EvaluationReason.Cache,t.evaluation_time??0)},e.prototype.removeFromStorage=function(e){var t=this;u.default.removeItemAsync(e).catch(function(e){return t.sdkInternal.getErrorBoundary().logError(`removeFromStorage`,e)}),d.default.removeItem(e)},e.prototype.loadOverrides=function(){if(!this.sdkInternal.getOptions().getDisableLocalOverrides()){var e=d.default.getItem(c.OVERRIDES_STORE_KEY);if(e!=null)try{this.overrides=JSON.parse(e)}catch{d.default.removeItem(c.OVERRIDES_STORE_KEY)}}},e.prototype.setEvaluationReason=function(e){this.reason=e},e.prototype.save=function(e,t,i){return n(this,void 0,void 0,function(){var n,a,o,s;return r(this,function(r){switch(r.label){case 0:return n=(0,l.getUserCacheKey)(this.getStableID(),e),a=t,a.is_delta?[2,this.saveInitDeltas(e,t,!0,i)]:(this.mergeInitializeResponseIntoUserMap(a,this.values,n,e,function(e){return e},i),o=this.getUserValues(n),o&&n&&n.v2===this.userCacheKey.v2&&(this.userValues=o,this.reason=f.EvaluationReason.Network),s=this,[4,this.writeValuesToStorage(this.values)]);case 1:return s.values=r.sent(),[2]}})})},e.prototype.saveWithoutUpdatingClientState=function(e,t,i){return n(this,void 0,void 0,function(){var n,a,o;return r(this,function(r){switch(r.label){case 0:return n=(0,l.getUserCacheKey)(this.getStableID(),e),a=t,a.is_delta?[2,this.saveInitDeltas(e,t,!1,i)]:(o=JSON.parse(JSON.stringify(this.values)),this.mergeInitializeResponseIntoUserMap(a,o,n,e,function(e){return e},i),[4,this.writeValuesToStorage(o)]);case 1:return r.sent(),[2]}})})},e.prototype.saveInitDeltas=function(e,t,i,a){return n(this,void 0,void 0,function(){var n,o,s,c,u,d,p,h,g,_,v,y=this;return r(this,function(r){switch(r.label){case 0:return n=(0,l.getUserCacheKey)(this.getStableID(),e),o=t,s=JSON.parse(JSON.stringify(this.values)),this.mergeInitializeResponseIntoUserMap(o,s,n,e,function(e,t){var n=s[t]??y.getDefaultUserCacheValues();return y.mergeUserCacheValues(n,e)},a),c=!1,u=void 0,d=!1,p=Object.keys(o.prefetched_user_values??{}),p.forEach(function(e){var t=s[e],n=o.prefetched_user_values?.[e];if(t&&n){m(n,t);var r=n.checksum,i=(0,l.djb2HashForObject)({feature_gates:s[e].feature_gates,dynamic_configs:s[e].dynamic_configs,layer_configs:s[e].layer_configs});r&&r!==i&&(c=!0,u=i),h.hash_used!==o.hash_used&&(d=!0)}}),h=s[n.v2]??s[n.v1],m(o,h),g=o.checksum,_=(0,l.djb2HashForObject)({feature_gates:h.feature_gates,dynamic_configs:h.dynamic_configs,layer_configs:h.layer_configs}),g&&g!==_&&(c=!0,u=_),h.hash_used!==o.hash_used&&(d=!0),c||d?(this.refetchAndSaveValues(e,a,void 0,u,c).catch(function(e){return y.sdkInternal.getErrorBoundary().logError(`refetchAndSaveValues`,e)}),[2]):i?(h&&n.v2===this.userCacheKey.v2&&(this.userValues=h,this.reason=f.EvaluationReason.Network),v=this,[4,this.writeValuesToStorage(s)]):[3,2];case 1:return v.values=r.sent(),[3,4];case 2:return[4,this.writeValuesToStorage(s)];case 3:r.sent(),r.label=4;case 4:return[2]}})})},e.prototype.refetchAndSaveValues=function(e,t,i,a,o){return i===void 0&&(i=this.sdkInternal.getOptions().getInitTimeoutMs()),n(this,void 0,void 0,function(){var n,s,c=this;return r(this,function(r){return n=this.getLastUpdateTime(e),s=this.getPreviousDerivedFields(e),[2,this.sdkInternal.getNetwork().fetchValues({user:e,sinceTime:n,timeout:i,useDeltas:!1,prefetchUsers:t,previousDerivedFields:s,hadBadDeltaChecksum:o,badChecksum:a}).then(function(n){n?.has_updates&&c.saveWithoutUpdatingClientState(e,n,t).catch(function(e){return c.sdkInternal.getErrorBoundary().logError(`refetchAndSaveValues:then`,e)})}).catch(function(e){return c.sdkInternal.getErrorBoundary().logError(`refetchAndSaveValues`,e)})]})})},e.prototype.getStableID=function(){return this.sdkInternal.getStableID()},e.prototype.mergeInitializeResponseIntoUserMap=function(e,t,n,r,i,a){if(e.prefetched_user_values)for(var o=Object.keys(e.prefetched_user_values),s=0,c=o;s<c.length;s++){var u=c[s],d=e.prefetched_user_values[u],f=i(this.convertAPIDataToCacheValues(d,u),u);if(e.has_updates&&e.time&&a){var p=(0,l.djb2HashForObject)(a[u]);f.user_hash=p}t[u]=f}if(n){var m=this.convertAPIDataToCacheValues(e,n.v2);if(e.has_updates&&e.time){var p=(0,l.djb2HashForObject)(r);m.user_hash=p}t[n.v2]=i(m,n.v2)}},e.prototype.getDefaultUserCacheValues=function(){return{feature_gates:{},layer_configs:{},dynamic_configs:{},sticky_experiments:{},time:0,evaluation_time:0,derived_fields:{}}},e.prototype.mergeUserCacheValues=function(e,n){return{feature_gates:t(t({},e.feature_gates),n.feature_gates),layer_configs:t(t({},e.layer_configs),n.layer_configs),dynamic_configs:t(t({},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}},e.prototype.writeValuesToStorage=function(e){return n(this,void 0,void 0,function(){var t;return r(this,function(n){switch(n.label){case 0:return e[this.userCacheKey.v2]&&delete e[this.userCacheKey.v1],t=Object.entries(e).sort(function(e,t){var n=e[1],r=t[1];return n==null?1:r==null?-1:(r?.evaluation_time??r?.time)-(n?.evaluation_time??n?.time)}).slice(0,p),e=Object.fromEntries(t),u.default.asyncStorage?[4,u.default.setItemAsync(c.INTERNAL_STORE_KEY,JSON.stringify(e))]:[3,2];case 1:return n.sent(),[3,3];case 2:d.default.setItem(c.INTERNAL_STORE_KEY,JSON.stringify(e)),n.label=3;case 3:return[2,e]}})})},e.prototype.checkGate=function(e,t){t===void 0&&(t=!1);var n=this.getHashedSpecName(e),r={name:e,value:!1,rule_id:``,secondary_exposures:[]},i;if(!t&&this.overrides.gates[e]!=null)r={name:e,value:this.overrides.gates[e],rule_id:`override`,secondary_exposures:[]},i=this.getEvaluationDetails(!1,f.EvaluationReason.LocalOverride);else{var a=this.userValues?.feature_gates[n];a&&(r=a),i=this.getEvaluationDetails(a!=null)}return{evaluationDetails:i,gate:r}},e.prototype.getConfig=function(e,t){t===void 0&&(t=!1);var n=this.getHashedSpecName(e),r,i;if(!t&&this.overrides.configs[e]!=null)i=this.getEvaluationDetails(!1,f.EvaluationReason.LocalOverride),r=new a.default(e,this.overrides.configs[e],`override`,i,[],``,this.makeOnConfigDefaultValueFallback(this.sdkInternal.getCurrentUser()));else if(this.userValues?.dynamic_configs[n]!=null){var o=this.userValues?.dynamic_configs[n];i=this.getEvaluationDetails(!0),r=this.createDynamicConfig(e,o,i)}else i=this.getEvaluationDetails(!1),r=new a.default(e,{},``,i);return r},e.prototype.getExperiment=function(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r,i;if(!n&&this.overrides.configs[e]!=null)i=this.getEvaluationDetails(!1,f.EvaluationReason.LocalOverride),r=new a.default(e,this.overrides.configs[e],`override`,i);else{var o=this.getLatestValue(e,`dynamic_configs`);i=this.getEvaluationDetails(o!=null);var s=this.getPossiblyStickyValue(e,o,t,!1,i);r=this.createDynamicConfig(e,s,i)}return r},e.prototype.getLayer=function(e,t,n){if(this.overrides.layers[t]!=null){var r=this.getEvaluationDetails(!1,f.EvaluationReason.LocalOverride);return o.default._create(t,this.overrides.layers[t]??{},`override`,r,e)}var i=this.getLatestValue(t,`layer_configs`),a=this.getEvaluationDetails(i!=null),s=this.getPossiblyStickyValue(t,i,n,!0,a);return o.default._create(t,s?.value??{},s?.rule_id??``,a,e,s?.secondary_exposures,s?.undelegated_secondary_exposures,s?.allocated_experiment_name??``,s?.explicit_parameters,s?.group_name)},e.prototype.overrideConfig=function(e,t){try{JSON.stringify(t)}catch(e){console.warn(`Failed to stringify given config override.  Dropping`,e);return}this.overrides.configs[e]=t,this.saveOverrides()},e.prototype.overrideLayer=function(e,t){try{JSON.stringify(t)}catch(e){console.warn(`Failed to stringify given layer override.  Dropping`,e);return}this.overrides.layers[e]=t,this.saveOverrides()},e.prototype.overrideGate=function(e,t){this.overrides.gates[e]=t,this.saveOverrides()},e.prototype.removeGateOverride=function(e){e==null?this.overrides.gates={}:delete this.overrides.gates[e],this.saveOverrides()},e.prototype.removeConfigOverride=function(e){e==null?this.overrides.configs={}:delete this.overrides.configs[e],this.saveOverrides()},e.prototype.removeLayerOverride=function(e){e==null?this.overrides.layers={}:delete this.overrides.layers[e],this.saveOverrides()},e.prototype.getAllOverrides=function(){return this.overrides},e.prototype.saveOverrides=function(){try{d.default.setItem(c.OVERRIDES_STORE_KEY,JSON.stringify(this.overrides))}catch{console.warn(`Failed to persist gate/config overrides`)}},e.prototype.getLatestValue=function(e,t){var n=this.getHashedSpecName(e);return this.userValues?.[t]?.[n]??this.userValues?.[t]?.[e]},e.prototype.getPossiblyStickyValue=function(e,t,n,r,i){var a=this.getHashedSpecName(e);if(!n)return this.removeStickyValue(a),t;var o=this.getStickyValue(a);if(!o)return this.attemptToSaveStickyValue(a,t),t;var s=null;return s=r?this.getLatestValue(o?.allocated_experiment_name??``,`dynamic_configs`):t,s?.is_experiment_active==1?(i.reason=f.EvaluationReason.Sticky,o):(t?.is_experiment_active==1?this.attemptToSaveStickyValue(a,t):this.removeStickyValue(a),t)},e.prototype.createDynamicConfig=function(e,t,n){return new a.default(e,t?.value??{},t?.rule_id??``,n,t?.secondary_exposures,t?.allocated_experiment_name??``,this.makeOnConfigDefaultValueFallback(this.sdkInternal.getCurrentUser()),t?.group_name,t?.id_type,t?.is_experiment_active)},e.prototype.getStickyValue=function(e){return this.userValues?.sticky_experiments[e]??this.stickyDeviceExperiments[e]},e.prototype.attemptToSaveStickyValue=function(e,t){!t||!t.is_user_in_experiment||!t.is_experiment_active||(t.is_device_based===!0?this.stickyDeviceExperiments[e]=t:this.userValues?.sticky_experiments&&(this.userValues.sticky_experiments[e]=t),this.saveStickyValuesToStorage())},e.prototype.removeStickyValue=function(e){var t;Object.keys(this.userValues?.sticky_experiments??{}).length===0&&Object.keys(this.stickyDeviceExperiments??{}).length===0||((t=this.userValues)==null||delete t.sticky_experiments[e],delete this.stickyDeviceExperiments[e],this.saveStickyValuesToStorage())},e.prototype.saveStickyValuesToStorage=function(){this.userPersistentStorageAdapter?this.saveStickyExperimentsToPersistentStorageAdapter():(this.values[this.userCacheKey.v2]=this.userValues,this.setItemToStorage(c.INTERNAL_STORE_KEY,JSON.stringify(this.values)),this.setItemToStorage(c.STICKY_DEVICE_EXPERIMENTS_KEY,JSON.stringify(this.stickyDeviceExperiments)))},e.prototype.getGlobalEvaluationDetails=function(){return{reason:this.reason??f.EvaluationReason.Uninitialized,time:this.userValues.evaluation_time??0}},e.prototype.getEvaluationDetails=function(e,t){return e?{reason:this.reason,time:this.userValues.evaluation_time??Date.now()}:{reason:t??(this.reason==f.EvaluationReason.Uninitialized?f.EvaluationReason.Uninitialized:f.EvaluationReason.Unrecognized),time:Date.now()}},e.prototype.resetUserValues=function(){this.userValues={feature_gates:{},dynamic_configs:{},sticky_experiments:{},layer_configs:{},time:0,evaluation_time:0,derived_fields:{}}},e.prototype.getHashedSpecName=function(e){switch(this.userValues.hash_used){case`djb2`:return(0,l.djb2Hash)(e);case`none`:return e;default:return(0,l.sha256Hash)(e)}},e.prototype.convertAPIDataToCacheValues=function(e,t){return{feature_gates:e.feature_gates,layer_configs:e.layer_configs,dynamic_configs:e.dynamic_configs,sticky_experiments:this.values[t]?.sticky_experiments??{},time:e.time==null||isNaN(e.time)?0:e.time,evaluation_time:Date.now(),hash_used:e.hash_used,derived_fields:e.derived_fields}},e.prototype.setItemToStorage=function(e,t){var n=this;u.default.asyncStorage?u.default.setItemAsync(e,t).catch(function(e){n.sdkInternal.getErrorBoundary().logError(`setItemToStorage`,e)}):d.default.setItem(e,t)},e.prototype.makeOnConfigDefaultValueFallback=function(e){var t=this;return function(n,r,i,a){t.isLoaded()&&t.sdkInternal.getLogger().logConfigDefaultValueFallback(e,`Parameter `+r+` is a value of type `+a+`.
          Returning requested defaultValue type `+i,{name:n.getName(),ruleID:n.getRuleID(),parameter:r,defaultValueType:i,valueType:a})}},e}();function m(e,t){(e.deleted_configs??[]).forEach(function(e){delete t.dynamic_configs[e]}),(e.deleted_gates??[]).forEach(function(e){delete t.feature_gates[e]}),(e.deleted_layers??[]).forEach(function(e){delete t.layer_configs[e]})}})),EM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=_M();e.default=function(){function e(e){this.logLevel=e}return e.prototype.info=function(e){this.logLevel!==t.LogLevel.NONE&&console.log(e)},e.prototype.error=function(e){this.logLevel===t.LogLevel.DEBUG&&console.error(e)},e}()})),DM=i((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},r=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var a=i(nj()),o=i(oj()),s=tj(),c=i(sj()),l=i(cj()),u=i(pM()),d=i(gM()),f=i(hM()),p=i(_M()),m=i(TM()),h=CM(),g=xM(),_=i(uM()),v=i(dM()),y=i(ij()),b=i(EM()),x=rj(),S=64,C=2048;e.default=function(){function e(t,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(e,t,n){n===void 0&&(n=!1);var r=``,a=e._getUndelegatedSecondaryExposures(),o=e._getExplicitParameters().includes(t);o&&(r=e._getAllocatedExperimentName(),a=e._getSecondaryExposures()),i.logger.logLayerExposure(i.getCurrentUser(),e.getName(),e.getRuleID(),a,r,t,o,e._getEvaluationDetails(),n)},r?.localMode!==!0&&(typeof t!=`string`||!t.startsWith(`client-`)))throw new s.StatsigInvalidArgumentError(`Invalid key provided.  You must use a Client SDK Key from the Statsig console to initialize the sdk`);if(this.startTime=(0,x.now)(),this.options=new p.default(r),this.logger=new d.default(this),y.default.initialize({options:this.options}),this.errorBoundary=new o.default(t),this.ready=!1,this.sdkKey=t,this.consoleLogger=new b.default(this.options.getLogLevel()),v.default.disabled=this.options.getDisableLocalStorage(),this.identity=new u.default(this.normalizeUser(n??null),this.options.getOverrideStableID(),e.reactNativeUUID),this.network=new f.default(this),this.store=new m.default(this,this.options.getInitializeValues()),this.errorBoundary.setStatsigMetadata(this.getStatsigMetadata()),this.options.getInitializeValues()!=null){var a=this.options.getInitCompletionCallback();this.ready=!0,this.initCalled=!0,setTimeout(function(){return i.delayedSetup()},20),this.handleOptionalLogging(),a&&a((0,x.now)()-this.startTime,!0,null)}}return e.prototype.getErrorBoundary=function(){return this.errorBoundary},e.prototype.getNetwork=function(){return this.network},e.prototype.getStore=function(){return this.store},e.prototype.getLogger=function(){return this.logger},e.prototype.getOptions=function(){return this.options},e.prototype.getSDKKey=function(){var e=this;return this.errorBoundary.capture(`getSDKKey`,function(){return e.sdkKey??``},function(){return``})},e.prototype.getCurrentUser=function(){var e=this;return this.errorBoundary.capture(`getCurrentUser`,function(){return e.identity.getUser()},function(){return null})},e.prototype.getCurrentUserCacheKey=function(){var e=this;return this.errorBoundary.capture(`getCurrentUserCacheKey`,function(){return(0,g.getUserCacheKey)(e.getStableID(),e.getCurrentUser())},function(){return{v1:``,v2:``}})},e.prototype.getCurrentUserUnitID=function(e){var t=this;return this.errorBoundary.capture(`getCurrentUserUnitID`,function(){return t.getUnitID(t.getCurrentUser(),e)},function(){return``})},e.prototype.getCurrentUserID=function(){var e=this;return this.errorBoundary.capture(`getCurrentUserID`,function(){return e.getUnitID(e.getCurrentUser(),`userid`)},function(){return``})},e.prototype.getUnitID=function(e,t){return e?t.toLowerCase()===`userid`?e.userID?.toString()??null:e.customIDs?e.customIDs[t]??e.customIDs[t.toLowerCase()]:null:null},e.prototype.getStatsigMetadata=function(){var e=this;return this.errorBoundary.capture(`getStatsigMetadata`,function(){return e.identity.getStatsigMetadata()},function(){return{}})},e.prototype.getSDKType=function(){var e=this;return this.errorBoundary.capture(`getSDKType`,function(){return e.identity.getSDKType()},function(){return``})},e.prototype.getSDKVersion=function(){var e=this;return this.errorBoundary.capture(`getSDKVersion`,function(){return e.identity.getSDKVersion()},function(){return``})},e.prototype.getConsoleLogger=function(){return this.consoleLogger},e.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(t){return e.errorBoundary.logError(`sendSavedRequests:delayedSetup`,t)})})},e.prototype.setInitializeValues=function(e){var t=this;this.errorBoundary.capture(`setInitializeValues`,function(){t.store.bootstrap(e);var n=null;t.ready||(t.ready=!0,t.initCalled=!0,n=t.options.getInitCompletionCallback()),t.handleOptionalLogging(),t.logger.sendSavedRequests().catch(function(e){return t.errorBoundary.logError(`sendSavedRequests:setInitializeValues`,e)}),n&&n((0,x.now)()-t.startTime,!0,null)},function(){t.ready=!0,t.initCalled=!0;var e=t.options.getInitCompletionCallback();e&&e((0,x.now)()-t.startTime,!1,`Caught an exception during setInitializeValues`)})},e.prototype.initializeAsync=function(){return n(this,void 0,void 0,function(){var e=this;return r(this,function(t){return[2,this.errorBoundary.capture(`initializeAsync`,function(){return n(e,void 0,void 0,function(){var e,t=this,i;return r(this,function(a){switch(a.label){case 0:return this.pendingInitPromise==null?this.ready?[2,Promise.resolve()]:(y.default.mark.overall.start({}),this.initCalled=!0,_.default.asyncStorage?[4,this.identity.initAsync()]:[3,3]):[2,this.pendingInitPromise];case 1:return a.sent(),[4,this.store.loadAsync()];case 2:a.sent(),a.label=3;case 3:return(i=this.onCacheLoadedForReact)==null||i.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()]:(e=this.identity.getUser(),this.pendingInitPromise=this.fetchAndSaveValues({user:e,prefetchUsers:this.options.getPrefetchUsers(),timeout:this.options.getInitTimeoutMs()}).then(function(){return y.default.mark.overall.end({success:!0,evaluationDetails:t.store.getGlobalEvaluationDetails()}),{success:!0,message:null}}).catch(function(e){return t.errorBoundary.logError(`initializeAsync:fetchAndSaveValues`,e),y.default.mark.overall.end({success:!1,error:y.default.formatError(e),evaluationDetails:t.store.getGlobalEvaluationDetails()}),{success:!1,message:e.message??null}}).then(function(e){var n=e.success,r=e.message,i=t.options.getInitCompletionCallback();i&&i((0,x.now)()-t.startTime,n,r)}).finally(function(){return n(t,void 0,void 0,function(){return r(this,function(t){return this.pendingInitPromise=null,this.ready=!0,this.delayedSetup(),this.logger.logDiagnostics(e,`initialize`),[2]})})}),this.handleOptionalLogging(),[2,this.pendingInitPromise])}})})},function(){return e.ready=!0,e.initCalled=!0,Promise.resolve()})]})})},e.prototype.prefetchUsers=function(e){return n(this,void 0,void 0,function(){var t=this;return r(this,function(n){return[2,this.errorBoundary.capture(`prefetchUsers`,function(){if(!(!e||e.length==0))return t.fetchAndSaveValues({user:null,prefetchUsers:e,timeout:0})},function(){return Promise.resolve()})]})})},e.prototype.getEvaluationDetails=function(){var e=this;return this.errorBoundary.capture(`getEvaluationDetails`,function(){return e.store.getGlobalEvaluationDetails()},function(){return{time:Date.now(),reason:h.EvaluationReason.Error}})},e.prototype.checkGate=function(e,t){var n=this;return t===void 0&&(t=!1),this.errorBoundary.capture(`checkGate`,function(){var r=n.checkGateImpl(e,t);n.logGateExposureImpl(e,r);var i=n.options.getGateEvaluationCallback();return i&&i(e,r.gate.value,{withExposureLoggingDisabled:!1}),r.gate.value===!0},function(){return!1},{configName:e})},e.prototype.checkGateWithExposureLoggingDisabled=function(e,t){var n=this;return t===void 0&&(t=!1),this.errorBoundary.capture(`checkGateWithExposureLoggingDisabled`,function(){var r=n.checkGateImpl(e,t),i=n.options.getGateEvaluationCallback();return i&&i(e,r.gate.value,{withExposureLoggingDisabled:!0}),r.gate.value===!0},function(){return!1})},e.prototype.logGateExposure=function(e){var t=this;this.errorBoundary.swallow(`logGateExposure`,function(){t.logGateExposureImpl(e)})},e.prototype.getConfig=function(e,t){var n=this;return t===void 0&&(t=!1),this.errorBoundary.capture(`getConfig`,function(){var r=n.getConfigImpl(e,t);return n.logConfigExposureImpl(e,r),r},function(){return n.getEmptyConfig(e)},{configName:e})},e.prototype.getConfigWithExposureLoggingDisabled=function(e,t){var n=this;return t===void 0&&(t=!1),this.errorBoundary.capture(`getConfig`,function(){return n.getConfigImpl(e,t)},function(){return n.getEmptyConfig(e)})},e.prototype.logConfigExposure=function(e){var t=this;this.errorBoundary.swallow(`logConfigExposure`,function(){t.logConfigExposureImpl(e)})},e.prototype.getExperiment=function(e,t,n){var r=this;return t===void 0&&(t=!1),n===void 0&&(n=!1),this.errorBoundary.capture(`getExperiment`,function(){var i=r.getExperimentImpl(e,t,n);return r.logExperimentExposureImpl(e,t,i),i},function(){return r.getEmptyConfig(e)},{configName:e})},e.prototype.getExperimentWithExposureLoggingDisabled=function(e,t,n){var r=this;return t===void 0&&(t=!1),n===void 0&&(n=!1),this.errorBoundary.capture(`getExperimentWithExposureLoggingDisabled`,function(){return r.getExperimentImpl(e,t,n)},function(){return r.getEmptyConfig(e)})},e.prototype.logExperimentExposure=function(e,t){var n=this;this.errorBoundary.swallow(`logExperimentExposure`,function(){n.logExperimentExposureImpl(e,t)})},e.prototype.getLayer=function(e,t){var n=this;return t===void 0&&(t=!1),this.errorBoundary.capture(`getLayer`,function(){return n.getLayerImpl(n.logLayerParameterExposureForLayer,e,t)},function(){return c.default._create(e,{},``,n.getEvalutionDetailsForError())},{configName:e})},e.prototype.getLayerWithExposureLoggingDisabled=function(e,t){var n=this;return t===void 0&&(t=!1),this.errorBoundary.capture(`getLayerWithExposureLoggingDisabled`,function(){return n.getLayerImpl(null,e,t)},function(){return c.default._create(e,{},``,n.getEvalutionDetailsForError())})},e.prototype.logLayerParameterExposure=function(e,t,n){var r=this;n===void 0&&(n=!1),this.errorBoundary.swallow(`logLayerParameterExposure`,function(){var i=r.getLayerImpl(null,e,n);r.logLayerParameterExposureForLayer(i,t,!0)})},e.prototype.logEvent=function(e,t,n){var r=this;t===void 0&&(t=null),n===void 0&&(n=null),this.errorBoundary.swallow(`logEvent`,function(){if(!r.logger||!r.sdkKey)throw new s.StatsigUninitializedError(`Must initialize() before logging events.`);if(typeof e!=`string`||e.length===0){r.consoleLogger.error(`Event not logged. No valid eventName passed.`);return}r.shouldTrimParam(e,S)&&(r.consoleLogger.info(`eventName is too long, trimming to `+S+` characters.`),e=e.substring(0,S)),typeof t==`string`&&r.shouldTrimParam(t,S)&&(r.consoleLogger.info(`value is too long, trimming to `+S+`.`),t=t.substring(0,S)),r.shouldTrimParam(n,C)&&(r.consoleLogger.info(`metadata is too big. Dropping the metadata.`),n={error:`not logged due to size too large`});var i=new l.default(e);i.setValue(t),i.setMetadata(n),i.setUser(r.getCurrentUser()),r.logger.log(i)})},e.prototype.updateUserWithValues=function(e,t){var n=this,r;return this.errorBoundary.capture(`updateUserWithValues`,function(){var i=Date.now();if(!n.initializeCalled())throw new s.StatsigUninitializedError(`Call initialize() first.`);return r=function(e,t){n.options.getUpdateUserCompletionCallback()?.(Date.now()-i,e,t)},n.identity.updateUser(n.normalizeUser(e)),n.store.bootstrap(t),r(!0,null),!0},function(){return r?.(!1,`Failed to update user. An unexpected error occured.`),!1})},e.prototype.updateUser=function(e){return n(this,void 0,void 0,function(){var t,i=this;return r(this,function(a){return[2,this.errorBoundary.capture(`updateUser`,function(){return n(i,void 0,void 0,function(){var n,i,a,o,c,l=this;return r(this,function(r){switch(r.label){case 0:if(n=Date.now(),!this.initializeCalled())throw new s.StatsigUninitializedError(`Call initialize() first.`);return t=function(e,t){l.options.getUpdateUserCompletionCallback()?.(Date.now()-n,e,t)},this.identity.updateUser(this.normalizeUser(e)),i=this.getCurrentUserCacheKey(),a=!!this.prefetchedUsersByCacheKey[i.v2],o=this.store.updateUser(a),y.default.clearContext(`api_call`),this.logger.resetDedupeKeys(),o!=null&&(a||this.isCacheValidForFetchMode(o))?(t(!0,null),[2,Promise.resolve(!0)]):this.pendingInitPromise==null?[3,2]:[4,this.pendingInitPromise];case 1:r.sent(),r.label=2;case 2:return this.options.getLocalModeEnabled()?(t(!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 t(!0,null),Promise.resolve(!0)}).catch(function(e){return t(!1,`Failed to update user: `+e),Promise.resolve(!1)})])}})})},function(){return t?.(!1,`Failed to update user. An unexpected error occured.`),Promise.resolve(!1)})]})})},e.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)),v.default.cleanup()})},e.prototype.overrideGate=function(e,t){var n=this;this.errorBoundary.swallow(`overrideGate`,function(){n.ensureStoreLoaded(),n.store.overrideGate(e,t)})},e.prototype.overrideConfig=function(e,t){var n=this;this.errorBoundary.swallow(`overrideConfig`,function(){n.ensureStoreLoaded(),n.store.overrideConfig(e,t)})},e.prototype.overrideLayer=function(e,t){var n=this;this.errorBoundary.swallow(`overrideLayer`,function(){n.ensureStoreLoaded(),n.store.overrideLayer(e,t)})},e.prototype.removeGateOverride=function(e){var t=this;this.errorBoundary.swallow(`removeGateOverride`,function(){t.ensureStoreLoaded(),t.store.removeGateOverride(e)})},e.prototype.removeConfigOverride=function(e){var t=this;this.errorBoundary.swallow(`removeConfigOverride`,function(){t.ensureStoreLoaded(),t.store.removeConfigOverride(e)})},e.prototype.removeLayerOverride=function(e){var t=this;this.errorBoundary.swallow(`removeLayerOverride`,function(){t.ensureStoreLoaded(),t.store.removeLayerOverride(e)})},e.prototype.removeOverride=function(e){var t=this;this.errorBoundary.swallow(`removeOverride`,function(){t.ensureStoreLoaded(),t.store.removeGateOverride(e)})},e.prototype.getOverrides=function(){var e=this;return this.errorBoundary.capture(`getOverrides`,function(){return e.ensureStoreLoaded(),e.store.getAllOverrides().gates},function(){return{}})},e.prototype.getAllOverrides=function(){var e=this;return this.errorBoundary.capture(`getAllOverrides`,function(){return e.ensureStoreLoaded(),e.store.getAllOverrides()},function(){return{gates:{},configs:{},layers:{}}})},e.prototype.getStableID=function(){var e=this;return this.errorBoundary.capture(`getStableID`,function(){return e.identity.getStatsigMetadata().stableID},function(){return``})},e.prototype.initializeCalled=function(){return this.initCalled},e.prototype.setSDKPackageInfo=function(e){e!=null&&(this.identity.setSDKPackageInfo(e),this.errorBoundary.setStatsigMetadata(this.getStatsigMetadata()))},e.setAsyncStorage=function(e){e!=null&&(_.default.asyncStorage=e)},e.prototype.setOnCacheLoadedReactCallback=function(e){this.onCacheLoadedForReact=e??null},e.setReactNativeUUID=function(t){t!=null&&(e.reactNativeUUID=t)},e.prototype.setAppState=function(e){e!=null&&(this.appState=e)},e.prototype.setNativeModules=function(e){e!=null&&this.identity.setNativeModules(e)},e.prototype.setPlatform=function(e){e!=null&&this.identity.setPlatform(e)},e.prototype.setRNDeviceInfo=function(e){e!=null&&this.identity.setRNDeviceInfo(e)},e.prototype.setExpoConstants=function(e){e!=null&&this.identity.setExpoConstants(e)},e.prototype.setExpoDevice=function(e){e!=null&&this.identity.setExpoDevice(e)},e.prototype.flushEvents=function(){this.logger.flush()},e.prototype.reenableAllLogging=function(){this.getOptions().reenableAllLogging()},e.prototype.isCacheValidForFetchMode=function(e){return this.options.getFetchMode()===`cache-or-network`?e>this.startTime:!1},e.prototype.handleOptionalLogging=function(){var e=this,t=this.options.getDisableErrorLogging(),n=this.options.getDisableAutoMetricsLogging();if(!(t&&n)&&!(this.optionalLoggingSetup||typeof window>`u`||!window||!window.addEventListener)){var r=this.identity.getUser();if(t||window.addEventListener(`error`,function(t){var n=t.error;if(typeof n==`object`&&n)try{n=JSON.stringify(n)}catch{n=`Failed to stringify Error`}e.logger.logAppError(r,t.message??``,{filename:t.filename,lineno:t.lineno,colno:t.colno,error_obj:n})}),!n){if(typeof document>`u`||!document||typeof setTimeout>`u`||!setTimeout)return;var i=function(){setTimeout(function(){e.logger.logAppMetrics(r)},1e3)};document.readyState===`complete`?i():window.addEventListener(`load`,function(){return i()})}this.optionalLoggingSetup=!0}},e.prototype.handleAppStateChange=function(e){var t=this;this.currentAppState===`active`&&e.match(/inactive|background/)?this.logger.flush(!0):this.currentAppState?.match(/inactive|background/)&&e===`active`&&this.logger.sendSavedRequests().catch(function(e){return t.errorBoundary.logError(`sendSavedRequests:handleAppStateChange`,e)}),this.currentAppState=e},e.prototype.shouldTrimParam=function(e,t){return e==null?!1:typeof e==`string`?e.length>t:typeof e==`object`?JSON.stringify(e).length>t:typeof e==`number`?e.toString().length>t:!1},e.prototype.normalizePrefetchUsers=function(e){var t=this;return e==null?[]:e.map(function(e){return t.normalizeUser(e)})},e.prototype.normalizeUser=function(e){var t={};try{t=JSON.parse(JSON.stringify(e))}catch{throw new s.StatsigInvalidArgumentError(`User object must be convertable to JSON string.`)}return t=this.trimUserObjIfNeeded(t),this.options.getEnvironment()!=null&&(t.statsigEnvironment=this.options.getEnvironment()),t},e.prototype.trimUserObjIfNeeded=function(e){return e==null?{}:(this.shouldTrimParam(e.userID??null,S)&&(this.consoleLogger.info(`User ID is too large, trimming to `+S+`characters`),e.userID=e.userID?.toString().substring(0,S)),this.shouldTrimParam(e,C)&&(e.custom={},this.shouldTrimParam(e,C)?(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)},e.prototype.ensureStoreLoaded=function(){if(!this.store.isLoaded())throw new s.StatsigUninitializedError(`Call and wait for initialize() to finish first.`)},e.prototype.getEvalutionDetailsForError=function(){return{time:Date.now(),reason:h.EvaluationReason.Error}},e.prototype.fetchAndSaveValues=function(e){return n(this,void 0,void 0,function(){var i,a,o,s,c,l,u=this;return r(this,function(d){return i=e.user,a=e.prefetchUsers??[],o=e.timeout??this.options.getInitTimeoutMs(),a.length>5&&this.consoleLogger.info(`Cannot prefetch more than 5 users.`),s=this.normalizePrefetchUsers(a).slice(0,5).reduce(function(e,t){return e[(0,g.getUserCacheKey)(u.getStableID(),t).v2]=t,e},{}),c=null,a.length===0&&(c=this.store.getLastUpdateTime(i)),l=this.store.getPreviousDerivedFields(i),[2,this.network.fetchValues({user:i,sinceTime:c,timeout:o,useDeltas:c!=null,prefetchUsers:a.length>0?s:void 0,previousDerivedFields:l}).eventually(function(e){e?.has_updates&&u.store.saveWithoutUpdatingClientState(i,e,a.length>0?s:void 0).catch(function(e){return u.errorBoundary.logError(`fetchAndSaveValues:eventually`,e)})}).then(function(e){return n(u,void 0,void 0,function(){var o=this;return r(this,function(c){return[2,this.errorBoundary.swallow(`fetchAndSaveValues`,function(){return n(o,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return y.default.mark.intialize.process.start({}),e?.has_updates?[4,this.store.save(i,e,a.length>0?s:void 0)]:[3,2];case 1:return n.sent(),[3,3];case 2:e?.is_no_content&&this.store.setEvaluationReason(h.EvaluationReason.NetworkNotModified),n.label=3;case 3:return this.prefetchedUsersByCacheKey=t(t({},this.prefetchedUsersByCacheKey),s),y.default.mark.intialize.process.end({success:!0}),[2]}})})})]})})})]})})},e.prototype.checkGateImpl=function(e,t){if(this.ensureStoreLoaded(),typeof e!=`string`||e.length===0)throw new s.StatsigInvalidArgumentError(`Must pass a valid string as the gateName.`);return this.store.checkGate(e,t)},e.prototype.logGateExposureImpl=function(e,t){var n=!t,r=t??this.checkGateImpl(e,!1),i=r.gate;this.logger.logGateExposure(this.getCurrentUser(),e,i.value,i.rule_id,i.secondary_exposures,r.evaluationDetails,n)},e.prototype.getConfigImpl=function(e,t){if(this.ensureStoreLoaded(),typeof e!=`string`||e.length===0)throw new s.StatsigInvalidArgumentError(`Must pass a valid string as the configName.`);return this.store.getConfig(e,t)},e.prototype.logConfigExposureImpl=function(e,t){var n=!t,r=t??this.getConfigImpl(e,!1);this.logger.logConfigExposure(this.getCurrentUser(),e,r.getRuleID(),r._getSecondaryExposures(),r.getEvaluationDetails(),n)},e.prototype.getExperimentImpl=function(e,t,n){if(this.ensureStoreLoaded(),typeof e!=`string`||e.length===0)throw new s.StatsigInvalidArgumentError(`Must pass a valid string as the experimentName.`);return this.store.getExperiment(e,t,n)},e.prototype.logExperimentExposureImpl=function(e,t,n){var r=!n,i=n??this.getExperimentImpl(e,t,!1);this.logger.logConfigExposure(this.getCurrentUser(),e,i.getRuleID(),i._getSecondaryExposures(),i.getEvaluationDetails(),r)},e.prototype.getLayerImpl=function(e,t,n){if(this.ensureStoreLoaded(),typeof t!=`string`||t.length===0)throw new s.StatsigInvalidArgumentError(`Must pass a valid string as the layerName.`);return this.store.getLayer(e,t,n)},e.prototype.getEmptyConfig=function(e){return new a.default(e,{},``,this.getEvalutionDetailsForError())},e.prototype.fireAndForgetPrefechUsers=function(){this.prefetchUsers(this.options.getPrefetchUsers()).catch(function(){})},e}()})),OM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(){Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r})}e.default=t})),kM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(){Object.fromEntries||(Object.fromEntries=function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];if(Object(i)!==i)throw TypeError(`iterable for fromEntries should yield objects`);var a=i[0],o=i[1];Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:o})}return t})}e.default=t})),AM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(){Promise.prototype.finally=Promise.prototype.finally||{finally:function(e){var t=function(t){return Promise.resolve(e()).then(t)};return this.then(function(e){return t(function(){return e})},function(e){return t(function(){return Promise.reject(e)})})}}.finally}e.default=t})),jM=i((e=>{var t=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},n=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.StatsigAsyncStorage=e.EvaluationReason=e.StatsigClient=e.Layer=e.DynamicConfig=void 0;var i=tj(),a=r(DM()),o=r(mM()),s=r(OM()),c=r(kM()),l=r(AM()),u=CM(),d=nj();Object.defineProperty(e,`DynamicConfig`,{enumerable:!0,get:function(){return r(d).default}});var f=sj();Object.defineProperty(e,`Layer`,{enumerable:!0,get:function(){return r(f).default}});var p=DM();Object.defineProperty(e,`StatsigClient`,{enumerable:!0,get:function(){return r(p).default}});var m=CM();Object.defineProperty(e,`EvaluationReason`,{enumerable:!0,get:function(){return m.EvaluationReason}});var h=uM();Object.defineProperty(e,`StatsigAsyncStorage`,{enumerable:!0,get:function(){return r(h).default}}),(0,s.default)(),(0,c.default)(),(0,l.default)(),e.default=function(){function e(){}return Object.defineProperty(e,`encodeIntializeCall`,{get:function(){return o.default.encodeInitializeCall},set:function(e){o.default.encodeInitializeCall=e},enumerable:!1,configurable:!0}),e.initialize=function(r,i,o){return t(this,void 0,void 0,function(){var t;return n(this,function(n){return t=e.instance??new a.default(r,i,o),e.instance||=t,[2,t.initializeAsync()]})})},e.prefetchUsers=function(r){return t(this,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,e.getClientX().prefetchUsers(r)];case 1:return[2,t.sent()]}})})},e.setInitializeValues=function(t){e.getClientX().setInitializeValues(t)},e.checkGate=function(t,n){return n===void 0&&(n=!1),e.getClientX().checkGate(t,n)},e.checkGateWithExposureLoggingDisabled=function(t,n){return n===void 0&&(n=!1),e.getClientX().checkGateWithExposureLoggingDisabled(t,n)},e.manuallyLogGateExposure=function(t){e.getClientX().logGateExposure(t)},e.getConfig=function(t,n){return n===void 0&&(n=!1),e.getClientX().getConfig(t,n)},e.getConfigWithExposureLoggingDisabled=function(t,n){return n===void 0&&(n=!1),e.getClientX().getConfigWithExposureLoggingDisabled(t,n)},e.manuallyLogConfigExposure=function(t){e.getClientX().logConfigExposure(t)},e.getExperiment=function(t,n,r){return n===void 0&&(n=!1),r===void 0&&(r=!1),e.getClientX().getExperiment(t,n,r)},e.getExperimentWithExposureLoggingDisabled=function(t,n,r){return n===void 0&&(n=!1),r===void 0&&(r=!1),e.getClientX().getExperimentWithExposureLoggingDisabled(t,n,r)},e.manuallyLogExperimentExposure=function(t,n){n===void 0&&(n=!1),e.getClientX().logExperimentExposure(t,n)},e.getLayer=function(t,n){return n===void 0&&(n=!1),e.getClientX().getLayer(t,n)},e.getLayerWithExposureLoggingDisabled=function(t,n){return n===void 0&&(n=!1),e.getClientX().getLayerWithExposureLoggingDisabled(t,n)},e.manuallyLogLayerParameterExposure=function(t,n,r){r===void 0&&(r=!1),e.getClientX().logLayerParameterExposure(t,n,r)},e.logEvent=function(t,n,r){return n===void 0&&(n=null),r===void 0&&(r=null),e.getClientX().logEvent(t,n,r)},e.updateUser=function(t){return e.getClientX().updateUser(t)},e.updateUserWithValues=function(t,n){return e.getClientX().updateUserWithValues(t,n)},e.shutdown=function(){e.getClientX().shutdown(),e.instance=null},e.overrideGate=function(t,n){e.getClientX().overrideGate(t,n)},e.overrideConfig=function(t,n){e.getClientX().overrideConfig(t,n)},e.overrideLayer=function(t,n){e.getClientX().overrideLayer(t,n)},e.removeGateOverride=function(t){e.getClientX().removeGateOverride(t)},e.removeConfigOverride=function(t){e.getClientX().removeConfigOverride(t)},e.removeLayerOverride=function(t){e.getClientX().removeLayerOverride(t)},e.getAllOverrides=function(){return e.getClientX().getAllOverrides()},e.getStableID=function(){return e.getClientX().getStableID()},e.getEvaluationDetails=function(){return e.instance?.getEvaluationDetails()??{reason:u.EvaluationReason.Uninitialized,time:0}},e.removeOverride=function(t){e.getClientX().removeOverride(t)},e.getOverrides=function(){return e.getClientX().getOverrides()},e.initializeCalled=function(){return e.instance!=null&&e.instance.initializeCalled()},e.flushEvents=function(){e.getClientX().flushEvents()},e.reenableAllLogging=function(){e.getClientX().reenableAllLogging()},e.getClientX=function(){if(!e.instance)throw new i.StatsigUninitializedError;return e.instance},e.instance=null,e}()})),MM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.staticImplements=void 0;function t(){return function(e){}}e.staticImplements=t})),NM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.version=void 0,e.version=`1.32.0`})),PM=i((e=>{var t=e&&e.__decorate||function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},n=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},r=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(e,`__esModule`,{value:!0});var i=jM(),a=MM(),o=NM();e.default=function(){function e(e,t,n){if(s.instance!=null&&s.canThrow())throw Error(`Cannot create another instance of the static Statsig class`);s.instance=new i.StatsigClient(e,t,n)}s=e,e.initialize=function(e,t,a){return n(this,void 0,void 0,function(){return r(this,function(n){try{return s.instance||(s.instance=new i.StatsigClient(e,t,a),s.instance.setSDKPackageInfo(this.sdkPackageInfo),s.instance.setAppState(this.appState),s.instance.setNativeModules(this.nativeModules),s.instance.setPlatform(this.platform),s.instance.setRNDeviceInfo(this.deviceInfo),s.instance.setExpoConstants(this.expoConstants),s.instance.setExpoDevice(this.expoDevice),s.instance.setOnCacheLoadedReactCallback(this.onCacheLoadedCallback)),[2,s.instance.initializeAsync()]}catch(e){if(s.canThrow())throw e}return[2,Promise.resolve()]})})},e.bootstrap=function(e,t,n,r){if(s.instance!=null){s.setInitializeValues(t);return}r??={},r.initializeValues=t,s.instance=new i.StatsigClient(e,n,r),s.instance.setSDKPackageInfo({sdkType:`react-client`,sdkVersion:o.version})},e.flushEvents=function(){return this.capture(function(){return s.getClientX().flushEvents()},void 0)},e.reenableAllLogging=function(){return this.capture(function(){return s.getClientX().reenableAllLogging()},void 0)},e.prefetchUsers=function(e){return n(this,void 0,void 0,function(){return r(this,function(t){return[2,this.capture(function(){return s.getClientX().prefetchUsers(e)},Promise.resolve())]})})},e.setInitializeValues=function(e){this.capture(function(){return s.getClientX().setInitializeValues(e)},void 0)},e.getCurrentUser=function(){return this.capture(function(){return s.getClientX().getCurrentUser()},null)},e.checkGate=function(e,t){return t===void 0&&(t=!1),this.capture(function(){return s.getClientX().checkGate(e,t)},!1)},e.checkGateWithExposureLoggingDisabled=function(e,t){return this.capture(function(){return s.getClientX().checkGateWithExposureLoggingDisabled(e,t?.ignoreOverrides)},!1)},e.manuallyLogGateExposure=function(e){this.capture(function(){return s.getClientX().logGateExposure(e)},void 0)},e.getConfig=function(e,t){return t===void 0&&(t=!1),this.capture(function(){return s.getClientX().getConfig(e,t)},new i.DynamicConfig(e,{},``,{time:Date.now(),reason:i.EvaluationReason.Uninitialized}))},e.getConfigWithExposureLoggingDisabled=function(e,t){return this.capture(function(){return s.getClientX().getConfigWithExposureLoggingDisabled(e,t?.ignoreOverrides)},new i.DynamicConfig(e,{},``,{time:Date.now(),reason:i.EvaluationReason.Uninitialized}))},e.manuallyLogConfigExposure=function(e){this.capture(function(){return s.getClientX().logConfigExposure(e)},void 0)},e.getExperiment=function(e,t,n){return t===void 0&&(t=!1),n===void 0&&(n=!1),this.capture(function(){return s.getClientX().getExperiment(e,t,n)},new i.DynamicConfig(e,{},``,{time:Date.now(),reason:i.EvaluationReason.Uninitialized}))},e.getExperimentWithExposureLoggingDisabled=function(e,t){return this.capture(function(){return s.getClientX().getExperimentWithExposureLoggingDisabled(e,t?.keepDeviceValue,t?.ignoreOverrides)},new i.DynamicConfig(e,{},``,{time:Date.now(),reason:i.EvaluationReason.Uninitialized}))},e.manuallyLogExperimentExposure=function(e,t){this.capture(function(){return s.getClientX().logExperimentExposure(e,t)},void 0)},e.getLayer=function(e,t){return t===void 0&&(t=!1),this.capture(function(){return s.getClientX().getLayer(e,t)},i.Layer._create(e,{},``,{time:Date.now(),reason:i.EvaluationReason.Uninitialized}))},e.getLayerWithExposureLoggingDisabled=function(e,t){return this.capture(function(){return s.getClientX().getLayerWithExposureLoggingDisabled(e,t?.keepDeviceValue)},i.Layer._create(e,{},``,{time:Date.now(),reason:i.EvaluationReason.Uninitialized}))},e.manuallyLogLayerParameterExposure=function(e,t,n){n===void 0&&(n=!1),this.capture(function(){return s.getClientX().logLayerParameterExposure(e,t,n)},void 0)},e.logEvent=function(e,t,n){t===void 0&&(t=null),n===void 0&&(n=null),this.capture(function(){return s.getClientX().logEvent(e,t,n)},void 0)},e.updateUser=function(e){return this.capture(function(){return s.getClientX().updateUser(e)},Promise.resolve(!1))},e.updateUserWithValues=function(e,t){return this.capture(function(){return s.getClientX().updateUserWithValues(e,t)},!1)},e.shutdown=function(){this.capture(function(){return s.getClientX().shutdown()},void 0),s.instance=void 0},e.overrideGate=function(e,t){this.capture(function(){s.getAllOverrides().gates?.[e]!==t&&(s.getClientX().overrideGate(e,t),s.updateContext())},void 0)},e.overrideConfig=function(e,t){this.capture(function(){s.getAllOverrides().configs?.[e]!==t&&(s.getClientX().overrideConfig(e,t),s.updateContext())},void 0)},e.overrideLayer=function(e,t){this.capture(function(){s.getAllOverrides().layers?.[e]!==t&&(s.getClientX().overrideLayer(e,t),s.updateContext())},void 0)},e.removeGateOverride=function(e){this.capture(function(){s.getClientX().removeGateOverride(e),s.updateContext()},void 0)},e.removeConfigOverride=function(e){this.capture(function(){s.getClientX().removeConfigOverride(e),s.updateContext()},void 0)},e.removeLayerOverride=function(e){this.capture(function(){s.getClientX().removeLayerOverride(e),s.updateContext()},void 0)},e.getAllOverrides=function(){return this.capture(function(){return s.getClientX().getAllOverrides()},{gates:{},configs:{},layers:{}})},e.getEvaluationDetails=function(){return s.instance?.getEvaluationDetails()??{reason:i.EvaluationReason.Uninitialized,time:0}},e.getStableID=function(){return this.capture(function(){return s.getClientX().getStableID()},``)},e.initializeCalled=function(){return s.instance!=null&&s.instance.initializeCalled()},e.setSDKPackageInfo=function(e){s.sdkPackageInfo=e},e.setReactNativeUUID=function(e){e!=null&&i.StatsigClient.setReactNativeUUID(e)},e.setAsyncStorage=function(e){e!=null&&(i.StatsigAsyncStorage.asyncStorage=e)},e.setAppState=function(e){e!=null&&(s.appState=e)},e.setNativeModules=function(e){e!=null&&(s.nativeModules=e)},e.setPlatform=function(e){e!=null&&(s.platform=e)},e.setRNDeviceInfo=function(e){e!=null&&(s.deviceInfo=e)},e.setExpoConstants=function(e){e!=null&&(s.expoConstants=e)},e.setExpoDevice=function(e){e!=null&&(s.expoDevice=e)},e.setReactContextUpdater=function(e){s.reactContextUpdater=e},e.setOnCacheLoadedCallback=function(e){s.onCacheLoadedCallback=e},e.getClientX=function(){if(!s.instance)throw Error(`Call and wait for initialize() to finish first.`);return s.instance},e.capture=function(e,t){try{return e()}catch(e){if(s.canThrow())throw e;return t}},e.updateContext=function(){s.reactContextUpdater!=null&&s.reactContextUpdater()},e.canThrow=function(){return typeof process>`u`||(process==null?void 0:{})?.REACT_APP_STATSIG_SDK_MODE!==`silent`};var s;return e.reactContextUpdater=null,e=s=t([(0,a.staticImplements)()],e),e}()})),FM=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t(o()).default.createContext({initialized:!1,statsigPromise:null,userVersion:0,initStarted:!1,updateUser:function(){}})})),IM=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var a=r(o()),s=i(FM()),c=i(jM()),l=i(PM()),u=NM();function d(e){var t=(0,a.useRef)(null);return(0,a.useEffect)(function(){t.current=e},[e]),t.current}function f(e){var t=e.children,n=e.sdkKey,r=e.user,i=e.setUser,o=e.options,f=e.waitForCache,m=e.waitForInitialization,h=e.initializingComponent,g=e.mountKey,_=e.shutdownOnUnmount,v=_===void 0?!1:_,y=e._reactNativeDependencies,b=!!y,x=(0,a.useState)(!1),S=x[0],C=x[1],w=(0,a.useState)(!1),T=w[0],E=w[1],ee=(0,a.useRef)(null),te=(0,a.useState)(0),ne=te[0],D=te[1],re=(0,a.useRef)(new Promise(function(e){ee.current=e})),O=(0,a.useMemo)(function(){return r},[JSON.stringify(r)]),ie=d(g??null);(0,a.useEffect)(function(){if(l.default.initializeCalled()){re.current=new Promise(function(e){ee.current=e});var e=g===void 0||ie!==g;e&&(E(!1),C(!1)),l.default.updateUser(r).then(function(){ee.current&&ee.current(),D(function(e){return e+1}),e&&(E(!0),C(!0))});return}l.default.setSDKPackageInfo({sdkType:`react-client`,sdkVersion:u.version}),b&&(l.default.setSDKPackageInfo(y.SDKPackageInfo),l.default.setAppState(y.AppState),l.default.setAsyncStorage(y.AsyncStorage),l.default.setNativeModules(y.NativeModules),l.default.setPlatform(y.Platform),l.default.setRNDeviceInfo(y.RNDevice),l.default.setReactNativeUUID(y.ReactNativeUUID),l.default.setExpoConstants(y.Constants),l.default.setExpoDevice(y.ExpoDevice)),l.default.setOnCacheLoadedCallback(function(){C(!0)}),l.default.initialize(n,O,o).then(function(){E(!0),ee.current&&ee.current()}),typeof window<`u`&&(window.__STATSIG_SDK__=l.default,window.__STATSIG_JS_SDK__=c.default,window.__STATSIG_RERENDER_OVERRIDE__=function(){D(ne+1)})},[O]),(0,a.useEffect)(function(){return l.default.setReactContextUpdater(function(){return D(function(e){return e+1})}),function(){v&&l.default.shutdown(),l.default.setReactContextUpdater(null)}},[]);var ae=p(f===!0,m===!0,T,S,t,h),oe=(0,a.useMemo)(function(){return{initialized:T,statsigPromise:re,userVersion:ne,initStarted:l.default.initializeCalled(),updateUser:i??(function(){})}},[T,re,ne,l.default.initializeCalled(),i]);return a.default.createElement(s.default.Provider,{value:oe},ae)}e.default=f;function p(e,t,n,r,i,a){return n||t!==!0&&e!==!0||e&&r||t&&n?i:(t||e)&&a!=null?a:null}})),LM=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.useLayerImpl=e.useExperimentImpl=e.useConfigImpl=e.useGateImpl=void 0;var n=o(),r=jM(),i=t(FM()),a=t(PM());function s(e,t,r){r===void 0&&(r=!1);var o=(0,n.useContext)(i.default),s=o.initialized,c=o.userVersion,l=o.initStarted,u=(0,n.useMemo)(function(){return l?r?a.default.checkGateWithExposureLoggingDisabled(e,t):a.default.checkGate(e,t?.ignoreOverrides):!1},[s,l,e,c,t,r]);return{isLoading:!s,value:u}}e.useGateImpl=s;function c(e,t,o){o===void 0&&(o=!1);var s=(0,n.useContext)(i.default),c=s.initialized,l=s.initStarted,u=s.userVersion,d=(0,n.useMemo)(function(){return l?o?a.default.getConfigWithExposureLoggingDisabled(e,t):a.default.getConfig(e,t?.ignoreOverrides):new r.DynamicConfig(e,{},``,{time:Date.now(),reason:r.EvaluationReason.Uninitialized})},[c,l,e,u,t,o]);return{isLoading:!c,config:d}}e.useConfigImpl=c;function l(e,t,o){o===void 0&&(o=!1);var s=(0,n.useContext)(i.default),c=s.initialized,l=s.initStarted,u=s.userVersion,d=(0,n.useMemo)(function(){return l?o?a.default.getExperimentWithExposureLoggingDisabled(e,t):a.default.getExperiment(e,t?.keepDeviceValue,t?.ignoreOverrides):new r.DynamicConfig(e,{},``,{time:Date.now(),reason:r.EvaluationReason.Uninitialized})},[c,l,e,u,t,o]);return{isLoading:!c,config:d}}e.useExperimentImpl=l;function u(e,t,o){o===void 0&&(o=!1);var s=(0,n.useContext)(i.default),c=s.initialized,l=s.initStarted,u=s.userVersion,d=(0,n.useMemo)(function(){return l?o?a.default.getLayerWithExposureLoggingDisabled(e,t):a.default.getLayer(e,t?.keepDeviceValue):r.Layer._create(e,{},``,{time:Date.now(),reason:r.EvaluationReason.Uninitialized})},[c,l,e,u,t,o]);return{isLoading:!c,layer:d}}e.useLayerImpl=u})),RM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=LM();function n(e,n){return(0,t.useConfigImpl)(e,{ignoreOverrides:n})}e.default=n})),zM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=LM();function n(e,n,r){return n===void 0&&(n=!1),(0,t.useExperimentImpl)(e,{keepDeviceValue:n,ignoreOverrides:r})}e.default=n})),BM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=LM();function n(e,n){return(0,t.useGateImpl)(e,{ignoreOverrides:n})}e.default=n})),VM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=LM();function n(e,n){return n===void 0&&(n=!1),(0,t.useLayerImpl)(e,{keepDeviceValue:n})}e.default=n})),HM=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var n=o(),r=t(PM()),i=t(FM());function a(e){var t=(0,n.useContext)(i.default).initStarted;(0,n.useEffect)(function(){!t||e.length==0||r.default.prefetchUsers(e).catch(function(){})},[t,e])}e.default=a})),UM=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var n=o(),r=t(PM()),i=t(FM());function a(e,t,a){var o=(0,n.useContext)(i.default).initStarted;(0,n.useEffect)(function(){o&&r.default.logEvent(e,t,a)},[o])}e.default=a})),WM=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var a=r(o()),s=i(FM()),c=i(jM()),l=i(PM());function u(e){var t=e.children,n=e.sdkKey,r=e.user,i=e.options,o=e.initializeValues,u=e.setUser,d=e.shutdownOnUnmount,f=(0,a.useState)(0),p=f[0],m=f[1],h=(0,a.useState)(!0),g=h[0],_=h[1],v=(0,a.useRef)(!0),y=(0,a.useMemo)(function(){return r},[JSON.stringify(r)]);(0,a.useMemo)(function(){return l.default.bootstrap(n,o,y,i),o},[JSON.stringify(o)]),(0,a.useEffect)(function(){if(v.current){v.current=!1,typeof window<`u`&&(window.__STATSIG_SDK__=l.default,window.__STATSIG_JS_SDK__=c.default,window.__STATSIG_RERENDER_OVERRIDE__=function(){m(p+1)});return}_(!1),l.default.updateUser(r).then(function(){m(p+1),_(!0)})},[y]),(0,a.useEffect)(function(){return l.default.setReactContextUpdater(function(){return m(function(e){return e+1})}),function(){d&&l.default.shutdown(),l.default.setReactContextUpdater(null)}},[]);var b=(0,a.useMemo)(function(){return{initialized:g,statsigPromise:null,userVersion:p,initStarted:l.default.initializeCalled(),updateUser:u??(function(){})}},[g,p,l.default.initializeCalled(),u]);return a.default.createElement(s.default.Provider,{value:b},t)}e.default=u})),GM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=LM();function n(e,n){return(0,t.useConfigImpl)(e,n,!0)}e.default=n})),KM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=LM();function n(e,n){return(0,t.useGateImpl)(e,n,!0)}e.default=n})),qM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=LM();function n(e,n){return(0,t.useExperimentImpl)(e,n,!0)}e.default=n})),JM=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=LM();function n(e,n){return(0,t.useLayerImpl)(e,n,!0)}e.default=n})),YM=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var n=o(),r=t(FM());function i(){return(0,n.useContext)(r.default).updateUser}e.default=i})),XM=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.StatsigSynchronousProvider=e.Layer=e.staticImplements=e.DynamicConfig=e.useUpdateUser=e.useStatsigLogEffect=e.useGateWithExposureLoggingDisabled=e.useGate=e.usePrefetchUsers=e.useLayerWithExposureLoggingDisabled=e.useLayer=e.useExperimentWithExposureLoggingDisabled=e.useExperiment=e.useConfigWithExposureLoggingDisabled=e.useConfig=e.StatsigProvider=e.StatsigContext=e.Statsig=void 0;var n=jM();Object.defineProperty(e,`DynamicConfig`,{enumerable:!0,get:function(){return n.DynamicConfig}}),Object.defineProperty(e,`Layer`,{enumerable:!0,get:function(){return n.Layer}}),e.Statsig=t(PM()).default,e.StatsigContext=t(FM()).default,e.StatsigProvider=t(IM()).default;var r=MM();Object.defineProperty(e,`staticImplements`,{enumerable:!0,get:function(){return r.staticImplements}}),e.useConfig=t(RM()).default,e.useExperiment=t(zM()).default,e.useGate=t(BM()).default,e.useLayer=t(VM()).default,e.usePrefetchUsers=t(HM()).default,e.useStatsigLogEffect=t(UM()).default,e.StatsigSynchronousProvider=t(WM()).default,e.useConfigWithExposureLoggingDisabled=t(GM()).default,e.useGateWithExposureLoggingDisabled=t(KM()).default,e.useExperimentWithExposureLoggingDisabled=t(qM()).default,e.useLayerWithExposureLoggingDisabled=t(JM()).default,e.useUpdateUser=t(YM()).default})),ZM,QM,$M,eN,tN=-1,nN=function(e){addEventListener(`pageshow`,(function(t){t.persisted&&(tN=t.timeStamp,e(t))}),!0)},rN=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType(`navigation`)[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},iN=function(){var e=rN();return e&&e.activationStart||0},aN=function(e,t){var n=rN(),r=`navigate`;return tN>=0?r=`back-forward-cache`:n&&(document.prerendering||iN()>0?r=`prerender`:document.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t===void 0?-1:t,rating:`good`,delta:0,entries:[],id:`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+0xe8d4a51000}`,navigationType:r}},oN=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},sN=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`}(t.value,n),e(t))}},cN=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},lN=function(e){document.addEventListener(`visibilitychange`,(function(){document.visibilityState===`hidden`&&e()}))},uN=function(e){var t=!1;return function(){t||=(e(),!0)}},dN=-1,fN=function(){return document.visibilityState!==`hidden`||document.prerendering?1/0:0},pN=function(e){document.visibilityState===`hidden`&&dN>-1&&(dN=e.type===`visibilitychange`?e.timeStamp:0,hN())},mN=function(){addEventListener(`visibilitychange`,pN,!0),addEventListener(`prerenderingchange`,pN,!0)},hN=function(){removeEventListener(`visibilitychange`,pN,!0),removeEventListener(`prerenderingchange`,pN,!0)},gN=function(){return dN<0&&(dN=fN(),mN(),nN((function(){setTimeout((function(){dN=fN(),mN()}),0)}))),{get firstHiddenTime(){return dN}}},_N=function(e){document.prerendering?addEventListener(`prerenderingchange`,(function(){return e()}),!0):e()},vN=[1800,3e3],yN=function(e,t){t||={},_N((function(){var n,r=gN(),i=aN(`FCP`),a=oN(`paint`,(function(e){e.forEach((function(e){e.name===`first-contentful-paint`&&(a.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-iN(),0),i.entries.push(e),n(!0)))}))}));a&&(n=sN(e,i,vN,t.reportAllChanges),nN((function(r){i=aN(`FCP`),n=sN(e,i,vN,t.reportAllChanges),cN((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))},bN=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=uN(e),document.visibilityState===`hidden`?e():(n=t(e),lN(e)),n},xN=[2500,4e3],SN={},CN=function(e,t){t||={},_N((function(){var n,r=gN(),i=aN(`LCP`),a=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-iN(),0),i.entries=[e],n())}))},o=oN(`largest-contentful-paint`,a);if(o){n=sN(e,i,xN,t.reportAllChanges);var s=uN((function(){SN[i.id]||(a(o.takeRecords()),o.disconnect(),SN[i.id]=!0,n(!0))}));[`keydown`,`click`].forEach((function(e){addEventListener(e,(function(){return bN(s)}),!0)})),lN(s),nN((function(r){i=aN(`LCP`),n=sN(e,i,xN,t.reportAllChanges),cN((function(){i.value=performance.now()-r.timeStamp,SN[i.id]=!0,n(!0)}))}))}}))},wN={passive:!0,capture:!0},TN=new Date,EN=function(e,t){ZM||(ZM=t,QM=e,$M=new Date,kN(removeEventListener),DN())},DN=function(){if(QM>=0&&QM<$M-TN){var e={entryType:`first-input`,name:ZM.type,target:ZM.target,cancelable:ZM.cancelable,startTime:ZM.timeStamp,processingStart:ZM.timeStamp+QM};eN.forEach((function(t){t(e)})),eN=[]}},ON=function(e){if(e.cancelable){var t=(e.timeStamp>0xe8d4a51000?new Date:performance.now())-e.timeStamp;e.type==`pointerdown`?function(e,t){var n=function(){EN(e,t),i()},r=function(){i()},i=function(){removeEventListener(`pointerup`,n,wN),removeEventListener(`pointercancel`,r,wN)};addEventListener(`pointerup`,n,wN),addEventListener(`pointercancel`,r,wN)}(t,e):EN(t,e)}},kN=function(e){[`mousedown`,`keydown`,`touchstart`,`pointerdown`].forEach((function(t){return e(t,ON,wN)}))},AN=function(){return AN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},AN.apply(this,arguments)};function jN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function MN(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function NN(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function PN(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function FN(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function IN(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var LN;(function(e){e.SET=`$set`,e.SET_ONCE=`$setOnce`,e.ADD=`$add`,e.APPEND=`$append`,e.PREPEND=`$prepend`,e.REMOVE=`$remove`,e.PREINSERT=`$preInsert`,e.POSTINSERT=`$postInsert`,e.UNSET=`$unset`,e.CLEAR_ALL=`$clearAll`})(LN||={});var RN;(function(e){e.REVENUE_PRODUCT_ID=`$productId`,e.REVENUE_QUANTITY=`$quantity`,e.REVENUE_PRICE=`$price`,e.REVENUE_TYPE=`$revenueType`,e.REVENUE=`$revenue`})(RN||={});var zN;(function(e){e.IDENTIFY=`$identify`,e.GROUP_IDENTIFY=`$groupidentify`,e.REVENUE=`revenue_amount`})(zN||={});var BN;(function(e){e[e.None=0]=`None`,e[e.Error=1]=`Error`,e[e.Warn=2]=`Warn`,e[e.Verbose=3]=`Verbose`,e[e.Debug=4]=`Debug`})(BN||={});var VN;(function(e){e.BEFORE=`before`,e.ENRICHMENT=`enrichment`,e.DESTINATION=`destination`})(VN||={});var HN;(function(e){e.US=`US`,e.EU=`EU`})(HN||={});var UN;(function(e){e.Unknown=`unknown`,e.Skipped=`skipped`,e.Success=`success`,e.RateLimit=`rate_limit`,e.PayloadTooLarge=`payload_too_large`,e.Invalid=`invalid`,e.Failed=`failed`,e.Timeout=`Timeout`,e.SystemError=`SystemError`})(UN||={});var WN;(function(e){e.XHR=`xhr`,e.SendBeacon=`beacon`,e.Fetch=`fetch`})(WN||={});var GN=`AMP_unsent`,KN=`https://api2.amplitude.com/2/httpapi`,qN=`https://api.eu.amplitude.com/2/httpapi`,JN=`https://api2.amplitude.com/batch`,YN=`https://api.eu.amplitude.com/batch`,XN=1e3,ZN=function(e){if(Object.keys(e).length>XN)return!1;for(var t in e){var n=e[t];if(!QN(t,n))return!1}return!0},QN=function(e,t){var n,r;if(typeof e!=`string`)return!1;if(Array.isArray(t)){var i=!0;try{for(var a=PN(t),o=a.next();!o.done;o=a.next()){var s=o.value;if(Array.isArray(s))return!1;if(typeof s==`object`)i&&=ZN(s);else if(![`number`,`string`].includes(typeof s))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}else if(t==null)return!1;else if(typeof t==`object`)return ZN(t);else if(![`number`,`string`,`boolean`].includes(typeof t))return!1;return!0},$N=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return AN({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(LN.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(LN.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(LN.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(LN.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(LN.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(LN.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(LN.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(LN.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(LN.UNSET,e,`-`),this},e.prototype.clearAll=function(){return this._properties={},this._properties[LN.CLEAR_ALL]=`-`,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return r===void 0&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return this._properties[LN.CLEAR_ALL]!==void 0||this._propertySet.has(t)?!1:e===LN.ADD?typeof n==`number`:e!==LN.UNSET&&e!==LN.REMOVE?QN(t,n):!0},e}(),eP=function(e,t,n){return AN(AN(AN({},typeof e==`string`?{event_type:e}:e),n),t&&{event_properties:t})},tP=function(e,t){return AN(AN({},t),{event_type:zN.IDENTIFY,user_properties:e.getUserProperties()})},nP=function(e,t,n,r){var i;return AN(AN({},r),{event_type:zN.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)})},rP=function(e,t,n){var r,i=new $N;return i.set(e,t),AN(AN({},n),{event_type:zN.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)})},iP=function(e,t){return AN(AN({},t),{event_type:zN.REVENUE,event_properties:e.getEventProperties()})},aP=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=UN.Unknown),{event:e,code:t,message:n}},oP=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){return MN(this,void 0,void 0,function(){return NN(this,function(n){switch(n.label){case 0:return[4,e.setup(t)];case 1:return n.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e){return this.plugins.splice(this.plugins.findIndex(function(t){return t.name===e}),1),Promise.resolve()},e.prototype.reset=function(){this.applying=!1,this.plugins=[]},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return MN(this,void 0,void 0,function(){var t,n,r,i,a,o,s,c,l,u,d,f,c,p,m,h,g,_,v,y;return NN(this,function(b){switch(b.label){case 0:if(!e)return[2];t=FN(e,1),n=t[0],r=FN(e,2),i=r[1],a=this.plugins.filter(function(e){return e.type===VN.BEFORE}),b.label=1;case 1:b.trys.push([1,6,7,8]),o=PN(a),s=o.next(),b.label=2;case 2:return s.done?[3,5]:(c=s.value,[4,c.execute(AN({},n))]);case 3:n=b.sent(),b.label=4;case 4:return s=o.next(),[3,2];case 5:return[3,8];case 6:return l=b.sent(),g={error:l},[3,8];case 7:try{s&&!s.done&&(_=o.return)&&_.call(o)}finally{if(g)throw g.error}return[7];case 8:u=this.plugins.filter(function(e){return e.type===VN.ENRICHMENT}),b.label=9;case 9:b.trys.push([9,14,15,16]),d=PN(u),f=d.next(),b.label=10;case 10:return f.done?[3,13]:(c=f.value,[4,c.execute(AN({},n))]);case 11:n=b.sent(),b.label=12;case 12:return f=d.next(),[3,10];case 13:return[3,16];case 14:return p=b.sent(),v={error:p},[3,16];case 15:try{f&&!f.done&&(y=d.return)&&y.call(d)}finally{if(v)throw v.error}return[7];case 16:return m=this.plugins.filter(function(e){return e.type===VN.DESTINATION}),h=m.map(function(e){var t=AN({},n);return e.execute(t).catch(function(e){return aP(t,0,String(e))})}),Promise.all(h).then(function(e){var t=FN(e,1)[0];i(t)}),[2]}})})},e.prototype.flush=function(){return MN(this,void 0,void 0,function(){var e,t,n,r=this;return NN(this,function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return r.apply(e)}))];case 1:return i.sent(),t=this.plugins.filter(function(e){return e.type===VN.DESTINATION}),n=t.map(function(e){return e.flush&&e.flush()}),[4,Promise.all(n)];case 2:return i.sent(),[2]}})})},e}(),sP=`Event tracked successfully`,cP=`Unexpected error occurred`,lP=`Event rejected due to exceeded retry count`,uP=`Event skipped due to optOut config`,dP=`Event rejected due to missing API key`,fP=`Client not initialized`,pP=function(){function e(e){e===void 0&&(e=`$default`),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new oP,this.name=e}return e.prototype._init=function(e){return MN(this,void 0,void 0,function(){return NN(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(),[4,this.runQueuedFunctions(`q`)];case 1:return t.sent(),[2]}})})},e.prototype.runQueuedFunctions=function(e){return MN(this,void 0,void 0,function(){var t,n,r,i,a,o,s;return NN(this,function(c){switch(c.label){case 0:t=this[e],this[e]=[],c.label=1;case 1:c.trys.push([1,6,7,8]),n=PN(t),r=n.next(),c.label=2;case 2:return r.done?[3,5]:(i=r.value,[4,i()]);case 3:c.sent(),c.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return a=c.sent(),o={error:a},[3,8];case 7:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 8:return[2]}})})},e.prototype.track=function(e,t,n){var r=eP(e,t,n);return this.dispatch(r)},e.prototype.identify=function(e,t){var n=tP(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,r){var i=nP(e,t,n,r);return this.dispatch(i)},e.prototype.setGroup=function(e,t,n){var r=rP(e,t,n);return this.dispatch(r)},e.prototype.revenue=function(e,t){var n=iP(e,t);return this.dispatch(n)},e.prototype.add=function(e){return MN(this,void 0,void 0,function(){return NN(this,function(t){return this.config?[2,this.timeline.register(e,this.config)]:(this.q.push(this.add.bind(this,e)),[2])})})},e.prototype.remove=function(e){return MN(this,void 0,void 0,function(){return NN(this,function(t){return this.config?[2,this.timeline.deregister(e)]:(this.q.push(this.remove.bind(this,e)),[2])})})},e.prototype.dispatchWithCallback=function(e,t){if(!this.config)return t(aP(e,0,fP));this.process(e).then(t)},e.prototype.dispatch=function(e){return MN(this,void 0,void 0,function(){var t=this;return NN(this,function(n){return this.config?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.process=function(e){return MN(this,void 0,void 0,function(){var t,n,r,t;return NN(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.config.optOut?[2,aP(e,0,uP)]:[4,this.timeline.push(e)];case 1:return t=i.sent(),t.code===200?this.config.loggerProvider.log(t.message):this.config.loggerProvider.error(t.message),[2,t];case 2:return n=i.sent(),r=String(n),this.config.loggerProvider.error(r),t=aP(e,0,r),[2,t];case 3:return[2]}})})},e.prototype.setOptOut=function(e){if(!this.config){this.q.push(this.setOptOut.bind(this,!!e));return}this.config.optOut=!!e},e.prototype.flush=function(){return this.timeline.flush()},e}(),mP=function(){function e(){this.productId=``,this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return ZN(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?AN({},this.properties):{};return e[RN.REVENUE_PRODUCT_ID]=this.productId,e[RN.REVENUE_QUANTITY]=this.quantity,e[RN.REVENUE_PRICE]=this.price,e[RN.REVENUE_TYPE]=this.revenueType,e[RN.REVENUE]=this.revenue,e},e}(),hP=function(e,t){var n=Math.max(t,1);return e.reduce(function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e},[])},gP=`Amplitude Logger `,_P=function(){function e(){this.logLevel=BN.None}return e.prototype.disable=function(){this.logLevel=BN.None},e.prototype.enable=function(e){e===void 0&&(e=BN.Warn),this.logLevel=e},e.prototype.log=function(){var e=[...arguments];this.logLevel<BN.Verbose||console.log(`${gP}[Log]: ${e.join(` `)}`)},e.prototype.warn=function(){var e=[...arguments];this.logLevel<BN.Warn||console.warn(`${gP}[Warn]: ${e.join(` `)}`)},e.prototype.error=function(){var e=[...arguments];this.logLevel<BN.Error||console.error(`${gP}[Error]: ${e.join(` `)}`)},e.prototype.debug=function(){var e=[...arguments];this.logLevel<BN.Debug||console.log(`${gP}[Debug]: ${e.join(` `)}`)},e}(),vP=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:BN.Warn,loggerProvider:new _P,optOut:!1,serverUrl:KN,serverZone:HN.US,useBatch:!1}},yP=function(){function e(e){this._optOut=!1;var t=vP();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis||t.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||t.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||t.flushQueueSize,this.loggerProvider=e.loggerProvider||t.loggerProvider,this.logLevel=e.logLevel??t.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=e.optOut??t.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||t.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=e.useBatch??t.useBatch,this.loggerProvider.enable(this.logLevel);var n=xP(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=n.serverZone,this.serverUrl=n.serverUrl}return Object.defineProperty(e.prototype,`optOut`,{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),bP=function(e,t){return e===HN.EU?t?YN:qN:t?JN:KN},xP=function(e,t,n){if(e===void 0&&(e=``),t===void 0&&(t=vP().serverZone),n===void 0&&(n=vP().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=[`US`,`EU`].includes(t)?t:vP().serverZone;return{serverZone:r,serverUrl:bP(r,n)}},SP=function(){function e(){this.name=`amplitude`,this.type=VN.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey=``,this.scheduled=null,this.queue=[]}return e.prototype.setup=function(e){return MN(this,void 0,void 0,function(){var t,n=this;return NN(this,function(r){switch(r.label){case 0:return this.config=e,this.storageKey=`${GN}_${this.config.apiKey.substring(0,10)}`,[4,this.config.storageProvider?.get(this.storageKey)];case 1:return t=r.sent(),this.saveEvents(),t&&t.length>0&&Promise.all(t.map(function(e){return n.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return new Promise(function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.addToQueue(r)})},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.filter(function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,lP),!1)}).forEach(function(t){if(e.queue=e.queue.concat(t),t.timeout===0){e.schedule(e.config.flushIntervalMillis);return}setTimeout(function(){t.timeout=0,e.schedule(0)},t.timeout)}),this.saveEvents()},e.prototype.schedule=function(e){var t=this;this.scheduled||=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},e)},e.prototype.flush=function(e){return e===void 0&&(e=!1),MN(this,void 0,void 0,function(){var t,n,r,i=this;return NN(this,function(a){switch(a.label){case 0:return t=[],n=[],this.queue.forEach(function(e){return e.timeout===0?t.push(e):n.push(e)}),this.queue=n,this.scheduled&&=(clearTimeout(this.scheduled),null),r=hP(t,this.config.flushQueueSize),[4,Promise.all(r.map(function(t){return i.send(t,e)}))];case 1:return a.sent(),[2]}})})},e.prototype.send=function(e,t){return t===void 0&&(t=!0),MN(this,void 0,void 0,function(){var n,r,i,a,o;return NN(this,function(s){switch(s.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,dP)];n={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,jN(t,[`extra`])}),options:{min_id_length:this.config.minIdLength}},s.label=1;case 1:return s.trys.push([1,3,,4]),r=xP(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(i=s.sent(),i===null)return this.fulfillRequest(e,0,cP),[2];if(!t){if(`body`in i){a=``;try{a=JSON.stringify(i.body,null,2)}catch{}this.fulfillRequest(e,i.statusCode,`${i.status}: ${a}`)}else this.fulfillRequest(e,i.statusCode,i.status);return[2]}return this.handleReponse(i,e),[3,4];case 3:return o=s.sent(),this.fulfillRequest(e,0,String(o)),[3,4];case 4:return[2]}})})},e.prototype.handleReponse=function(e,t){switch(e.status){case UN.Success:this.handleSuccessResponse(e,t);break;case UN.Invalid:this.handleInvalidResponse(e,t);break;case UN.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case UN.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,sP)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(`Invalid API key`)){this.fulfillRequest(t,e.statusCode,e.body.error);return}var r=IN(IN(IN(IN([],FN(Object.values(e.body.eventsWithInvalidFields)),!1),FN(Object.values(e.body.eventsWithMissingFields)),!1),FN(Object.values(e.body.eventsWithInvalidIdLengths)),!1),FN(e.body.silencedEvents),!1).flat(),i=new Set(r),a=t.filter(function(t,r){if(i.has(r)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return!0});this.addToQueue.apply(this,IN([],FN(a),!1))},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(t.length===1){this.fulfillRequest(t,e.statusCode,e.body.error);return}this.config.flushQueueSize/=2,this.addToQueue.apply(this,IN([],FN(t),!1))},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),a=e.body.throttledEvents,o=new Set(r),s=new Set(i),c=new Set(a),l=t.filter(function(t,r){if(t.event.user_id&&o.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return c.has(r)&&(t.timeout=n.throttleTimeout),!0});this.addToQueue.apply(this,IN([],FN(l),!1))},e.prototype.handleOtherReponse=function(e){var t=this;this.addToQueue.apply(this,IN([],FN(e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e})),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach(function(e){return e.callback(aP(e.event,t,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map(function(e){return e.event}));this.config.storageProvider.set(this.storageKey,e)}},e}(),CP=function(e){return function(){var t=[...arguments];return{promise:e.apply(void 0,IN([],FN(t),!1))}}},wP=function(e){return e===void 0&&(e=0),(Error().stack||``).split(`
`).slice(2+e).map(function(e){return e.trim()})},TP=function(e){return function(){var t=AN({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},EP=function(e,t){var n,r;t=t.replace(/\[(\w+)\]/g,`.$1`),t=t.replace(/^\./,``);try{for(var i=PN(t.split(`.`)),a=i.next();!a.done;a=i.next()){var o=a.value;if(o in e)e=e[o];else return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},DP=function(e,t){return function(){var n,r,i={};try{for(var a=PN(t),o=a.next();!o.done;o=a.next()){var s=o.value;i[s]=EP(e,s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}},OP=function(e,t,n,r,i){return i===void 0&&(i=null),function(){var a=[...arguments],o=n(),s=o.logger,c=o.logLevel;if(c&&c<BN.Debug||!c||!s)return e.apply(i,a);var l={type:`invoke public method`,name:t,args:a,stacktrace:wP(1),time:{start:new Date().toISOString()},states:{}};r&&l.states&&(l.states.before=r());var u=e.apply(i,a);return u&&u.promise?u.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),s.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),s.debug(JSON.stringify(l,null,2))),u}},kP=function(e){return e?(e^Math.random()*16>>e/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,kP)},AP=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return MN(this,void 0,void 0,function(){return NN(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return MN(this,void 0,void 0,function(){return NN(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return MN(this,void 0,void 0,function(){var t;return NN(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return t=n.sent(),[2,t?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return MN(this,void 0,void 0,function(){return NN(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return MN(this,void 0,void 0,function(){return NN(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return MN(this,void 0,void 0,function(){return NN(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),jP=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if(typeof e!=`object`)return null;var t=e.code||0,n=this.buildStatus(t);switch(n){case UN.Success:return{status:n,statusCode:t,body:{eventsIngested:e.events_ingested??0,payloadSizeBytes:e.payload_size_bytes??0,serverUploadTime:e.server_upload_time??0}};case UN.Invalid:return{status:n,statusCode:t,body:{error:e.error??``,missingField:e.missing_field??``,eventsWithInvalidFields:e.events_with_invalid_fields??{},eventsWithMissingFields:e.events_with_missing_fields??{},eventsWithInvalidIdLengths:e.events_with_invalid_id_lengths??{},epsThreshold:e.eps_threshold??0,exceededDailyQuotaDevices:e.exceeded_daily_quota_devices??{},silencedDevices:e.silenced_devices??[],silencedEvents:e.silenced_events??[],throttledDevices:e.throttled_devices??{},throttledEvents:e.throttled_events??[]}};case UN.PayloadTooLarge:return{status:n,statusCode:t,body:{error:e.error??``}};case UN.RateLimit:return{status:n,statusCode:t,body:{error:e.error??``,epsThreshold:e.eps_threshold??0,throttledDevices:e.throttled_devices??{},throttledUsers:e.throttled_users??{},exceededDailyQuotaDevices:e.exceeded_daily_quota_devices??{},exceededDailyQuotaUsers:e.exceeded_daily_quota_users??{},throttledEvents:e.throttled_events??[]}};case UN.Timeout:default:return{status:n,statusCode:t}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?UN.Success:e===429?UN.RateLimit:e===413?UN.PayloadTooLarge:e===408?UN.Timeout:e>=400&&e<500?UN.Invalid:e>=500?UN.Failed:UN.Unknown},e}(),MP=function(e,t){return MP=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},MP(e,t)};function NP(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);MP(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var $=function(){return $=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$.apply(this,arguments)};function PP(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function FP(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function IP(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function LP(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}var RP=function(e,t){return RP=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},RP(e,t)};function zP(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);RP(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var BP=function(){return BP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},BP.apply(this,arguments)};function VP(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function HP(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function UP(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function WP(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}var GP=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},KP=function(){var e=GP();return e?.location?.search?e.location.search.substring(1).split(`&`).filter(Boolean).reduce(function(e,t){var n=t.split(`=`,2),r=qP(n[0]),i=qP(n[1]);return i&&(e[r]=i),e},{}):{}},qP=function(e){e===void 0&&(e=``);try{return decodeURIComponent(e)}catch{return``}},JP=`utm_campaign`,YP=`utm_content`,XP=`utm_id`,ZP=`utm_medium`,QP=`utm_source`,$P=`utm_term`,eF=`dclid`,tF=`fbclid`,nF=`gbraid`,rF=`gclid`,iF=`ko_click_id`,aF=`msclkid`,oF=`ttclid`,sF=`twclid`,cF=`wbraid`,lF=`EMPTY`,uF={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},dF=`MKTG`,fF=function(){function e(){}return e.prototype.parse=function(){return HP(this,void 0,void 0,function(){return UP(this,function(e){return[2,BP(BP(BP(BP({},uF),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=KP();return{utm_campaign:e[JP],utm_content:e[YP],utm_id:e[XP],utm_medium:e[ZP],utm_source:e[QP],utm_term:e[$P]}},e.prototype.getReferrer=function(){var e={referrer:void 0,referring_domain:void 0};try{e.referrer=document.referrer||void 0,e.referring_domain=e.referrer?.split(`/`)[2]??void 0}catch{}return e},e.prototype.getClickIds=function(){var e,t=KP();return e={},e[eF]=t[eF],e[tF]=t[tF],e[nF]=t[nF],e[rF]=t[rF],e[iF]=t[iF],e[aF]=t[aF],e[oF]=t[oF],e[sF]=t[sF],e[cF]=t[cF],e},e}(),pF=function(e,t,n){return t===void 0&&(t=``),n===void 0&&(n=10),[`AMP`,t,e.substring(0,n)].filter(Boolean).join(`_`)},mF=function(e){return`amp_${e.substring(0,6)}`},hF=function(){function e(e,t){this.storage=t.storage,this.storageKey=pF(e,dF),this.parser=new fF,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=!!t.disabled,this.trackNewCampaigns=!!t.trackNewCampaigns,this.trackPageViews=!!t.trackPageViews,this.excludeReferrers=t.excludeReferrers??[],typeof location<`u`&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=t.initialEmptyValue??lF}return e.prototype.isNewCampaign=function(e,t,n){n===void 0&&(n=!1),e.referrer;var r=e.referring_domain,i=VP(e,[`referrer`,`referring_domain`]),a=t||{};a.referrer;var o=a.referring_domain,s=VP(a,[`referrer`,`referring_domain`]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var c=JSON.stringify(i)!==JSON.stringify(s),l=n?gF(r||``)!==gF(o||``):r!==o;return!t||c||l},e.prototype.saveCampaignToStorage=function(e){return HP(this,void 0,void 0,function(){return UP(this,function(t){switch(t.label){case 0:return[4,this.storage.set(this.storageKey,e)];case 1:return t.sent(),[2]}})})},e.prototype.getCampaignFromStorage=function(){return HP(this,void 0,void 0,function(){return UP(this,function(e){switch(e.label){case 0:return[4,this.storage.get(this.storageKey)];case 1:return[2,e.sent()]}})})},e.prototype.createCampaignEvent=function(e){var t=this,n=BP(BP({},uF),e),r=Object.entries(n).reduce(function(e,n){var r=WP(n,2),i=r[0],a=r[1];return e.setOnce(`initial_${i}`,a||t.initialEmptyValue),a?e.set(i,a):e.unset(i)},new $N),i={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 BP(BP({},tP(r)),this.trackPageViews&&i)},e.prototype.send=function(e){return HP(this,void 0,void 0,function(){var t,n;return UP(this,function(r){switch(r.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return t=r.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=r.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(t,n))return[2];this.onNewCampaign(t)}return[4,this.track(this.createCampaignEvent(t))];case 3:return r.sent(),[4,this.saveCampaignToStorage(t)];case 4:return r.sent(),[2]}})})},e}(),gF=function(e){var t=e.split(`.`);return t.length<=2?e:t.slice(t.length-2,t.length).join(`.`)},_F=function(){function e(e){this.options=BP({},e)}return e.prototype.isEnabled=function(){return HP(this,void 0,void 0,function(){var t,n,r,i;return UP(this,function(a){switch(a.label){case 0:if(!GP())return[2,!1];t=String(Date.now()),n=new e(this.options),r=`AMP_TEST`,a.label=1;case 1:return a.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return a.sent(),[4,n.get(r)];case 3:return i=a.sent(),[2,i===t];case 4:return a.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return a.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return HP(this,void 0,void 0,function(){var t;return UP(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(t=n.sent(),!t)return[2,void 0];try{try{t=decodeURIComponent(atob(t))}catch{}return[2,JSON.parse(t)]}catch{return[2,void 0]}return[2]}})})},e.prototype.getRaw=function(e){return HP(this,void 0,void 0,function(){var t,n,r;return UP(this,function(i){return t=GP(),n=t?.document.cookie.split(`; `)??[],r=n.find(function(t){return t.indexOf(e+`=`)===0}),r?[2,r.substring(e.length+1)]:[2,void 0]})})},e.prototype.set=function(e,t){return HP(this,void 0,void 0,function(){var n,r,i,a,o,s;return UP(this,function(c){try{n=this.options.expirationDays??0,r=t===null?-1:n,i=void 0,r&&(a=new Date,a.setTime(a.getTime()+r*24*60*60*1e3),i=a),o=`${e}=${btoa(encodeURIComponent(JSON.stringify(t)))}`,i&&(o+=`; expires=${i.toUTCString()}`),o+=`; path=/`,this.options.domain&&(o+=`; domain=${this.options.domain}`),this.options.secure&&(o+=`; Secure`),this.options.sameSite&&(o+=`; SameSite=${this.options.sameSite}`),s=GP(),s&&(s.document.cookie=o)}catch{}return[2]})})},e.prototype.remove=function(e){return HP(this,void 0,void 0,function(){return UP(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return HP(this,void 0,void 0,function(){return UP(this,function(e){return[2]})})},e}(),vF=function(e){zP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(e,t){return HP(this,void 0,void 0,function(){var n,r,i;return UP(this,function(a){switch(a.label){case 0:if(typeof fetch>`u`)throw Error(`FetchTransport is not supported`);return n={headers:{"Content-Type":`application/json`,Accept:`*/*`},body:JSON.stringify(t),method:`POST`},[4,fetch(e,n)];case 1:return r=a.sent(),[4,r.json()];case 2:return i=a.sent(),[2,this.buildResponse(i)]}})})},t}(jP),yF=n(i(((e,t)=>{(function(n,r){var i=`0.7.31`,a=``,o=`?`,s=`function`,c=`undefined`,l=`object`,u=`string`,d=`major`,f=`model`,p=`name`,m=`type`,h=`vendor`,g=`version`,_=`architecture`,v=`console`,y=`mobile`,b=`tablet`,x=`smarttv`,S=`wearable`,C=`embedded`,w=275,T=`Amazon`,E=`Apple`,ee=`ASUS`,te=`BlackBerry`,ne=`Browser`,D=`Chrome`,re=`Edge`,O=`Firefox`,ie=`Google`,ae=`Huawei`,oe=`LG`,se=`Microsoft`,ce=`Motorola`,le=`Opera`,ue=`Samsung`,de=`Sony`,k=`Xiaomi`,fe=`Zebra`,pe=`Facebook`,me=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},he=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},ge=function(e,t){return typeof e===u?_e(t).indexOf(_e(e))!==-1:!1},_e=function(e){return e.toLowerCase()},ve=function(e){return typeof e===u?e.replace(/[^\d\.]/g,a).split(`.`)[0]:r},ye=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,a).replace(/\s\s*$/,a),typeof t===c?e:e.substring(0,w)},be=function(e,t){for(var n=0,i,a,o,c,u,d;n<t.length&&!u;){var f=t[n],p=t[n+1];for(i=a=0;i<f.length&&!u;)if(u=f[i++].exec(e),u)for(o=0;o<p.length;o++)d=u[++a],c=p[o],typeof c===l&&c.length>0?c.length===2?typeof c[1]==s?this[c[0]]=c[1].call(this,d):this[c[0]]=c[1]:c.length===3?typeof c[1]===s&&!(c[1].exec&&c[1].test)?this[c[0]]=d?c[1].call(this,d,c[2]):r:this[c[0]]=d?d.replace(c[1],c[2]):r:c.length===4&&(this[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):r):this[c]=d||r;n+=2}},xe=function(e,t){for(var n in t)if(typeof t[n]===l&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(ge(t[n][i],e))return n===o?r:n}else if(ge(t[n],e))return n===o?r:n;return e},Se={"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},Ce={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`},we={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[g,[p,`Chrome`]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[g,[p,`Edge`]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,g],[/opios[\/ ]+([\w\.]+)/i],[g,[p,le+` Mini`]],[/\bopr\/([\w\.]+)/i],[g,[p,le]],[/(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],[p,g],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[g,[p,`UC`+ne]],[/\bqbcore\/([\w\.]+)/i],[g,[p,`WeChat(Win) Desktop`]],[/micromessenger\/([\w\.]+)/i],[g,[p,`WeChat`]],[/konqueror\/([\w\.]+)/i],[g,[p,`Konqueror`]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[g,[p,`IE`]],[/yabrowser\/([\w\.]+)/i],[g,[p,`Yandex`]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,`$1 Secure `+ne],g],[/\bfocus\/([\w\.]+)/i],[g,[p,O+` Focus`]],[/\bopt\/([\w\.]+)/i],[g,[p,le+` Touch`]],[/coc_coc\w+\/([\w\.]+)/i],[g,[p,`Coc Coc`]],[/dolfin\/([\w\.]+)/i],[g,[p,`Dolphin`]],[/coast\/([\w\.]+)/i],[g,[p,le+` Coast`]],[/miuibrowser\/([\w\.]+)/i],[g,[p,`MIUI `+ne]],[/fxios\/([-\w\.]+)/i],[g,[p,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,`360 `+ne]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,`$1 `+ne],g],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g,` `],g],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,g],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,pe],g],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,g],[/\bgsa\/([\w\.]+) .*safari\//i],[g,[p,`GSA`]],[/headlesschrome(?:\/([\w\.]+)| )/i],[g,[p,D+` Headless`]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,D+` WebView`],g],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[g,[p,`Android `+ne]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,g],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[g,[p,`Mobile Safari`]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[g,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[g,xe,Se]],[/(webkit|khtml)\/([\w\.]+)/i],[p,g],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,`Netscape`],g],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[g,[p,O+` 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],[p,g]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[_,`amd64`]],[/(ia32(?=;))/i],[[_,_e]],[/((?:i[346]|x)86)[;\)]/i],[[_,`ia32`]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[_,`arm64`]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[_,`armhf`]],[/windows (ce|mobile); ppc;/i],[[_,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[_,/ower/,a,_e]],[/(sun4\w)[;\)]/i],[[_,`sparc`]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[_,_e]]],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,[h,ue],[m,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[h,ue],[m,y]],[/((ipod|iphone)\d+,\d+)/i],[f,[h,E],[m,y]],[/(ipad\d+,\d+)/i],[f,[h,E],[m,b]],[/\((ip(?:hone|od)[\w ]*);/i],[f,[h,E],[m,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[h,E],[m,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[h,ae],[m,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[h,ae],[m,y]],[/\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,` `],[h,k],[m,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g,` `],[h,k],[m,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[h,`OPPO`],[m,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[h,`Vivo`],[m,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[f,[h,`Realme`],[m,y]],[/\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,[h,ce],[m,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[h,ce],[m,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[h,oe],[m,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[h,oe],[m,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[h,`Lenovo`],[m,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g,` `],[h,`Nokia`],[m,y]],[/(pixel c)\b/i],[f,[h,ie],[m,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[h,ie],[m,y]],[/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,[h,de],[m,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,`Xperia Tablet`],[h,de],[m,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[h,`OnePlus`],[m,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[h,T],[m,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,`Fire Phone $1`],[h,T],[m,y]],[/(playbook);[-\w\),; ]+(rim)/i],[f,h,[m,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[h,te],[m,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[h,ee],[m,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[h,ee],[m,y]],[/(nexus 9)/i],[f,[h,`HTC`],[m,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[f,/_/g,` `],[m,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[h,`Acer`],[m,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[h,`Meizu`],[m,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[h,`Sharp`],[m,y]],[/(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],[h,f,[m,y]],[/(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],[h,f,[m,b]],[/(surface duo)/i],[f,[h,se],[m,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[h,`Fairphone`],[m,y]],[/(u304aa)/i],[f,[h,`AT&T`],[m,y]],[/\bsie-(\w*)/i],[f,[h,`Siemens`],[m,y]],[/\b(rct\w+) b/i],[f,[h,`RCA`],[m,b]],[/\b(venue[\d ]{2,7}) b/i],[f,[h,`Dell`],[m,b]],[/\b(q(?:mv|ta)\w+) b/i],[f,[h,`Verizon`],[m,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[h,`Barnes & Noble`],[m,b]],[/\b(tm\d{3}\w+) b/i],[f,[h,`NuVision`],[m,b]],[/\b(k88) b/i],[f,[h,`ZTE`],[m,b]],[/\b(nx\d{3}j) b/i],[f,[h,`ZTE`],[m,y]],[/\b(gen\d{3}) b.+49h/i],[f,[h,`Swiss`],[m,y]],[/\b(zur\d{3}) b/i],[f,[h,`Swiss`],[m,b]],[/\b((zeki)?tb.*\b) b/i],[f,[h,`Zeki`],[m,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,`Dragon Touch`],f,[m,b]],[/\b(ns-?\w{0,9}) b/i],[f,[h,`Insignia`],[m,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[h,`NextBook`],[m,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,`Voice`],f,[m,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,`LvTel`],f,[m,y]],[/\b(ph-1) /i],[f,[h,`Essential`],[m,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[h,`Envizen`],[m,b]],[/\b(trio[-\w\. ]+) b/i],[f,[h,`MachSpeed`],[m,b]],[/\btu_(1491) b/i],[f,[h,`Rotor`],[m,b]],[/(shield[\w ]+) b/i],[f,[h,`Nvidia`],[m,b]],[/(sprint) (\w+)/i],[h,f,[m,y]],[/(kin\.[onetw]{3})/i],[[f,/\./g,` `],[h,se],[m,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[h,fe],[m,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[h,fe],[m,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,f,[m,v]],[/droid.+; (shield) bui/i],[f,[h,`Nvidia`],[m,v]],[/(playstation [345portablevi]+)/i],[f,[h,de],[m,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[h,se],[m,v]],[/smart-tv.+(samsung)/i],[h,[m,x]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,`SmartTV`],[h,ue],[m,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,oe],[m,x]],[/(apple) ?tv/i],[h,[f,E+` TV`],[m,x]],[/crkey/i],[[f,D+`cast`],[h,ie],[m,x]],[/droid.+aft(\w)( bui|\))/i],[f,[h,T],[m,x]],[/\(dtv[\);].+(aquos)/i],[f,[h,`Sharp`],[m,x]],[/(bravia[\w- ]+) bui/i],[f,[h,de],[m,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,ye],[f,ye],[m,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,x]],[/((pebble))app/i],[h,f,[m,S]],[/droid.+; (glass) \d/i],[f,[h,ie],[m,S]],[/droid.+; (wt63?0{2,3})\)/i],[f,[h,fe],[m,S]],[/(quest( 2)?)/i],[f,[h,pe],[m,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[m,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[f,[m,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,b]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[m,y]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[h,`Generic`]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[g,[p,re+`HTML`]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[p,`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],[p,g],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[g,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,g],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[g,xe,Ce]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,`Windows`],[g,xe,Ce]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[g,/_/g,`.`],[p,`iOS`]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,`Mac OS`],[g,/_/g,`.`]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[g,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,g],[/\(bb(10);/i],[g,[p,te]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[g,[p,`Symbian`]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[g,[p,O+` OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[g,[p,`webOS`]],[/crkey\/([\d\.]+)/i],[g,[p,D+`cast`]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[p,`Chromium OS`],g],[/(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],[p,g],[/(sunos) ?([\w\.\d]*)/i],[[p,`Solaris`],g],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[p,g]]},Te=function(e,t){if(typeof e===l&&(t=e,e=r),!(this instanceof Te))return new Te(e,t).getResult();var i=e||(typeof n!==c&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:a),o=t?me(we,t):we;return this.getBrowser=function(){var e={};return e[p]=r,e[g]=r,be.call(e,i,o.browser),e.major=ve(e.version),e},this.getCPU=function(){var e={};return e[_]=r,be.call(e,i,o.cpu),e},this.getDevice=function(){var e={};return e[h]=r,e[f]=r,e[m]=r,be.call(e,i,o.device),e},this.getEngine=function(){var e={};return e[p]=r,e[g]=r,be.call(e,i,o.engine),e},this.getOS=function(){var e={};return e[p]=r,e[g]=r,be.call(e,i,o.os),e},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 i},this.setUA=function(e){return i=typeof e===u&&e.length>w?ye(e,w):e,this},this.setUA(i),this};Te.VERSION=i,Te.BROWSER=he([p,g,d]),Te.CPU=he([_]),Te.DEVICE=he([f,h,m,v,y,x,b,S,C]),Te.ENGINE=Te.OS=he([p,g]),typeof e===c?typeof define===s&&define.amd?define(function(){return Te}):typeof n!==c&&(n.UAParser=Te):(typeof t!==c&&t.exports&&(e=t.exports=Te),e.UAParser=Te);var Ee=typeof n!==c&&(n.jQuery||n.Zepto);if(Ee&&!Ee.ua){var De=new Te;Ee.ua=De.getResult(),Ee.ua.get=function(){return De.getUA()},Ee.ua.set=function(e){De.setUA(e);var t=De.getResult();for(var n in t)Ee.ua[n]=t[n]}}})(typeof window==`object`?window:e)}))()),bF=function(){function e(){this.ua=new yF.UAParser(typeof navigator<`u`?navigator.userAgent:null).getResult()}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:CF(),platform:`Web`,os:xF(this.ua),deviceModel:SF(this.ua)}},e}(),xF=function(e){return[e.browser?.name,e.browser?.major].filter(function(e){return e!=null}).join(` `)},SF=function(e){return e.os?.name},CF=function(){return typeof navigator<`u`&&(navigator.languages&&navigator.languages[0]||navigator.language)||``},wF=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),TF=function(){return TF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},TF.apply(this,arguments)},EF=function(e,t){var n=[`string`,`number`,`boolean`,`undefined`],r=typeof e;if(r!==typeof t)return!1;for(var i=0,a=n;i<a.length;i++)if(a[i]===r)return e===t;if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;var o=Array.isArray(e),s=Array.isArray(t);if(o!==s)return!1;if(o&&s){for(var c=0;c<e.length;c++)if(!EF(e[c],t[c]))return!1}else{if(!EF(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var l=!0;return Object.keys(e).forEach(function(n){EF(e[n],t[n])||(l=!1)}),l}return!0},DF=`$set`,OF=`$unset`,kF=`$clearAll`;Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var AF=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=TF({},this.identity.userProperties),n=TF(TF({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},updateUserProperties:function(e){for(var t=n.userProperties||{},r=0,i=Object.entries(e);r<i.length;r++){var a=i[r],o=a[0],s=a[1];switch(o){case DF:for(var c=0,l=Object.entries(s);c<l.length;c++){var u=l[c],d=u[0],f=u[1];t[d]=f}break;case OF:for(var p=0,m=Object.keys(s);p<m.length;p++){var d=m[p];delete t[d]}break;case kF:t={};break}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return TF({},this.identity)},e.prototype.setIdentity=function(e){var t=TF({},this.identity);this.identity=TF({},e),EF(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),jF=typeof globalThis<`u`?globalThis:typeof global<`u`?global:self,MF=function(){function e(){this.identityStore=new AF,this.eventBridge=new wF,this.applicationContextProvider=new bF}return e.getInstance=function(t){return jF.analyticsConnectorInstances||={},jF.analyticsConnectorInstances[t]||(jF.analyticsConnectorInstances[t]=new e),jF.analyticsConnectorInstances[t]},e}(),NF=function(){return MF.getInstance(`$default_instance`)},PF=function(){function e(){this.name=`identity`,this.type=VN.BEFORE,this.identityStore=NF().identityStore}return e.prototype.execute=function(e){return HP(this,void 0,void 0,function(){var t;return UP(this,function(n){return t=e.user_properties,t&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}(),FF=function(){if(typeof navigator>`u`)return``;var e=navigator.userLanguage;return navigator.languages?.[0]??navigator.language??e??``},IF=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,a=r.args,o=r.resolve,s=e&&e[i];if(typeof s==`function`){var c=s.apply(e,a);typeof o==`function`&&o(c?.promise)}}return e},LF=function(e){var t=e;return t&&t._q!==void 0},RF=`1.8.0`,zF=`Web`,BF=`$remote`,VF=function(){function e(){this.name=`context`,this.type=VN.BEFORE,this.eventId=0,this.library=`amplitude-ts/${RF}`;var e;typeof navigator<`u`&&(e=navigator.userAgent),this.uaResult=new yF.default(e).getResult()}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){return PP(this,void 0,void 0,function(){var t,n,r,i,a,o;return FP(this,function(s){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),t=new Date().getTime(),n=this.uaResult.browser.name,r=this.uaResult.browser.version,i=this.uaResult.device.model||this.uaResult.os.name,a=this.uaResult.device.vendor,o=$($($($($($($($($($($($({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:t},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:zF}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:r}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:a}),this.config.trackingOptions.deviceModel&&{device_model:i}),this.config.trackingOptions.language&&{language:FF()}),this.config.trackingOptions.ipAddress&&{ip:BF}),{insert_id:kP(),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]})})},e.prototype.isSessionValid=function(){var e=this.config.lastEventTime||Date.now();return Date.now()-e<this.config.sessionTimeout},e}(),HF=function(){function e(){}return e.prototype.isEnabled=function(){return PP(this,void 0,void 0,function(){var t,n,r,i;return FP(this,function(a){switch(a.label){case 0:if(!GP())return[2,!1];t=String(Date.now()),n=new e,r=`AMP_TEST`,a.label=1;case 1:return a.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return a.sent(),[4,n.get(r)];case 3:return i=a.sent(),[2,i===t];case 4:return a.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return a.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return PP(this,void 0,void 0,function(){var t;return FP(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return t=n.sent(),t?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){return PP(this,void 0,void 0,function(){return FP(this,function(t){return[2,GP()?.localStorage.getItem(e)||void 0]})})},e.prototype.set=function(e,t){var n;return PP(this,void 0,void 0,function(){return FP(this,function(r){try{(n=GP())==null||n.localStorage.setItem(e,JSON.stringify(t))}catch{}return[2]})})},e.prototype.remove=function(e){var t;return PP(this,void 0,void 0,function(){return FP(this,function(n){try{(t=GP())==null||t.localStorage.removeItem(e)}catch{}return[2]})})},e.prototype.reset=function(){var e;return PP(this,void 0,void 0,function(){return FP(this,function(t){try{(e=GP())==null||e.localStorage.clear()}catch{}return[2]})})},e}(),UF=function(e){NP(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={done:4},t}return t.prototype.send=function(e,t){return PP(this,void 0,void 0,function(){var n=this;return FP(this,function(r){return[2,new Promise(function(r,i){typeof XMLHttpRequest>`u`&&i(Error(`XHRTransport is not supported.`));var a=new XMLHttpRequest;a.open(`POST`,e,!0),a.onreadystatechange=function(){if(a.readyState===n.state.done)try{var e=a.responseText,t=JSON.parse(e);r(n.buildResponse(t))}catch(e){i(e)}},a.setRequestHeader(`Content-Type`,`application/json`),a.setRequestHeader(`Accept`,`*/*`),a.send(JSON.stringify(t))})]})})},t}(jP),WF=function(e){NP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(e,t){return PP(this,void 0,void 0,function(){var n=this;return FP(this,function(r){return[2,new Promise(function(r,i){var a=GP();if(!a?.navigator.sendBeacon)throw Error(`SendBeaconTransport is not supported`);try{var o=JSON.stringify(t);return a.navigator.sendBeacon(e,JSON.stringify(t))?r(n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:o.length,server_upload_time:Date.now()})):r(n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(jP),GF=function(){return{cookieExpiration:365,cookieSameSite:`Lax`,cookieSecure:!1,cookieStorage:new AP,cookieUpgrade:!0,disableCookies:!1,domain:``,sessionTimeout:1800*1e3,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new vF}},KF=function(e){NP(t,e);function t(t,n){var r=this,i=GF();return r=e.call(this,$($({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30,transportProvider:i.transportProvider},n),{apiKey:t}))||this,r._optOut=!1,r.cookieStorage=n?.cookieStorage??i.cookieStorage,r.deviceId=n?.deviceId,r.lastEventTime=n?.lastEventTime,r.optOut=!!n?.optOut,r.sessionId=n?.sessionId,r.userId=n?.userId,r.appVersion=n?.appVersion,r.attribution=n?.attribution,r.cookieExpiration=n?.cookieExpiration??i.cookieExpiration,r.cookieSameSite=n?.cookieSameSite??i.cookieSameSite,r.cookieSecure=n?.cookieSecure??i.cookieSecure,r.cookieUpgrade=n?.cookieUpgrade??i.cookieUpgrade,r.disableCookies=n?.disableCookies??i.disableCookies,r.domain=n?.domain??i.domain,r.partnerId=n?.partnerId,r.sessionTimeout=n?.sessionTimeout??i.sessionTimeout,r.trackingOptions=n?.trackingOptions??i.trackingOptions,r}return Object.defineProperty(t.prototype,`deviceId`,{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`userId`,{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`sessionId`,{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`optOut`,{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lastEventTime`,{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e,t={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime};(e=this.cookieStorage)==null||e.set(pF(this.apiKey),t)},t}(yP),qF=function(e,t){return PP(void 0,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;return FP(this,function(v){switch(v.label){case 0:return n=GF(),(_=t?.domain)==null?[3,1]:(i=_,[3,3]);case 1:return[4,QF()];case 2:i=v.sent(),v.label=3;case 3:return r=i,[4,JF($($({},t),{domain:r}))];case 4:return a=v.sent(),[4,a.get(pF(e))];case 5:return o=v.sent(),s=KP(),c=t?.deviceId??s.deviceId??o?.deviceId??kP(),l=t?.lastEventTime??o?.lastEventTime,u=t?.optOut??!!o?.optOut,d=t?.sessionId??o?.sessionId,f=t?.userId??o?.userId,p=KF.bind,m=[void 0,e],h=[$({},t)],g={cookieStorage:a,deviceId:c,domain:r,lastEventTime:l,optOut:u,sessionId:d},[4,XF(t)];case 6:return[2,new(p.apply(KF,m.concat([$.apply(void 0,h.concat([(g.storageProvider=v.sent(),g.trackingOptions=$($({},n.trackingOptions),t?.trackingOptions),g.transportProvider=t?.transportProvider??ZF(t?.transport),g.userId=f,g)]))])))]}})})},JF=function(e,t){return t===void 0&&(t=GF()),PP(void 0,void 0,void 0,function(){var n,r,i;return FP(this,function(a){switch(a.label){case 0:return n=$($({},t),e),r=e?.cookieStorage,i=!r,i?[3,2]:[4,r.isEnabled()];case 1:i=!a.sent(),a.label=2;case 2:return i?[2,YF(n)]:[2,r]}})})},YF=function(e){return PP(void 0,void 0,void 0,function(){var t,n;return FP(this,function(r){switch(r.label){case 0:return t=new _F({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),n=e.disableCookies,n?[3,2]:[4,t.isEnabled()];case 1:n=!r.sent(),r.label=2;case 2:return n?(t=new HF,[4,t.isEnabled()]):[3,4];case 3:r.sent()||(t=new AP),r.label=4;case 4:return[2,t]}})})},XF=function(e){return PP(void 0,void 0,void 0,function(){var t,n,r,i,a,o,s,c;return FP(this,function(l){switch(l.label){case 0:if(t=e&&Object.prototype.hasOwnProperty.call(e,`storageProvider`),!(!t||e.storageProvider))return[3,9];l.label=1;case 1:l.trys.push([1,7,8,9]),n=IP([e?.storageProvider,new HF]),r=n.next(),l.label=2;case 2:return r.done?[3,6]:(i=r.value,a=i,a?[4,i.isEnabled()]:[3,4]);case 3:a=l.sent(),l.label=4;case 4:if(a)return[2,i];l.label=5;case 5:return r=n.next(),[3,2];case 6:return[3,9];case 7:return o=l.sent(),s={error:o},[3,9];case 8:try{r&&!r.done&&(c=n.return)&&c.call(n)}finally{if(s)throw s.error}return[7];case 9:return[2,void 0]}})})},ZF=function(e){return e===WN.XHR?new UF:e===WN.SendBeacon?new WF:GF().transportProvider},QF=function(e){return PP(void 0,void 0,void 0,function(){var t,n,r,i,a,a,o,s,c,l;return FP(this,function(u){switch(u.label){case 0:return[4,new _F().isEnabled()];case 1:if(!u.sent()||!e&&typeof location>`u`)return[2,``];for(t=e??location.hostname,n=t.split(`.`),r=[],i=`AMP_TLDTEST`,a=n.length-2;a>=0;--a)r.push(n.slice(a).join(`.`));a=0,u.label=2;case 2:return a<r.length?(o=r[a],s={domain:`.`+o},c=new _F(s),[4,c.set(i,1)]):[3,7];case 3:return u.sent(),[4,c.get(i)];case 4:return l=u.sent(),l?[4,c.remove(i)]:[3,6];case 5:return u.sent(),[2,`.`+o];case 6:return a++,[3,2];case 7:return[2,``]}})})},$F=function(e,t){return PP(void 0,void 0,void 0,function(){var n,r,i,a,o,s,c,l,u;return FP(this,function(d){switch(d.label){case 0:return n=new _F,[4,n.isEnabled()];case 1:return(!d.sent()||t?.disableCookies)&&(n=new HF),[4,n.isEnabled()];case 2:return d.sent()?(r=mF(e),[4,n.getRaw(r)]):[2,{optOut:!1}];case 3:return i=d.sent(),i?t?.cookieUpgrade??GF().cookieUpgrade?[4,n.remove(r)]:[3,5]:[2,{optOut:!1}];case 4:d.sent(),d.label=5;case 5:return a=LP(i.split(`.`),5),o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],[2,{deviceId:o,userId:tI(s),sessionId:eI(l),lastEventTime:eI(u),optOut:!!c}]}})})},eI=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},tI=function(e){if(!(!atob||!escape||!e))try{return decodeURIComponent(escape(atob(e)))}catch{return}},nI=function(e){NP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(t,n,r){return t===void 0&&(t=``),PP(this,void 0,void 0,function(){var i,a,o,s,c=this;return FP(this,function(l){switch(l.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,$F(t,r)]);case 1:return i=l.sent(),[4,qF(t,$($({},r),{deviceId:i.deviceId??r?.deviceId,sessionId:i.sessionId??r?.sessionId,optOut:r?.optOut??i.optOut,lastEventTime:i.lastEventTime,userId:n??i.userId}))];case 2:return a=l.sent(),[4,e.prototype._init.call(this,a)];case 3:return l.sent(),o=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),o=!0),s=NF(),s.eventBridge.setEventReceiver(function(e){c.track(e.eventType,e.eventProperties)}),s.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new VF)];case 4:return l.sent(),[4,this.add(new PF)];case 5:return l.sent(),[4,this.add(new SP)];case 6:return l.sent(),this.initializing=!1,[4,this.runAttributionStrategy(a.attribution,o)];case 7:return l.sent(),[4,this.runQueuedFunctions(`dispatchQ`)];case 8:return l.sent(),[2]}})})},t.prototype.runAttributionStrategy=function(e,t){return t===void 0&&(t=!1),PP(this,void 0,void 0,function(){var n,r,i,a;return FP(this,function(o){switch(o.label){case 0:return n=this.track.bind(this),r=this.setSessionId.bind(this,Date.now()),[4,YF(this.config)];case 1:return i=o.sent(),a=new hF(this.config.apiKey,$($({},e),{storage:i,track:n,onNewCampaign:r})),[4,a.send(t)];case 2:return o.sent(),[2]}})})},t.prototype.getUserId=function(){return this.config?.userId},t.prototype.setUserId=function(e){if(!this.config){this.q.push(this.setUserId.bind(this,e));return}this.config.userId=e},t.prototype.getDeviceId=function(){return this.config?.deviceId},t.prototype.setDeviceId=function(e){if(!this.config){this.q.push(this.setDeviceId.bind(this,e));return}this.config.deviceId=e},t.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId(kP())},t.prototype.getSessionId=function(){return this.config?.sessionId},t.prototype.setSessionId=function(e){if(!this.config){this.q.push(this.setSessionId.bind(this,e));return}this.config.sessionId=e,this.config.lastEventTime=void 0},t.prototype.setTransport=function(e){if(!this.config){this.q.push(this.setTransport.bind(this,e));return}this.config.transportProvider=ZF(e)},t.prototype.identify=function(t,n){if(LF(t)){var r=t._q;t._q=[],t=IF(new $N,r)}return n?.user_id&&this.setUserId(n.user_id),n?.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(LF(r)){var a=r._q;r._q=[],r=IF(new $N,a)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(LF(t)){var r=t._q;t._q=[],t=IF(new mP,r)}return e.prototype.revenue.call(this,t,n)},t}(pP),rI=function(){var e=new nI;return{init:OP(CP(e.init.bind(e)),`init`,TP(e),DP(e,[`config`])),add:OP(CP(e.add.bind(e)),`add`,TP(e),DP(e,[`config.apiKey`,`timeline.plugins`])),remove:OP(CP(e.remove.bind(e)),`remove`,TP(e),DP(e,[`config.apiKey`,`timeline.plugins`])),track:OP(CP(e.track.bind(e)),`track`,TP(e),DP(e,[`config.apiKey`,`timeline.queue.length`])),logEvent:OP(CP(e.logEvent.bind(e)),`logEvent`,TP(e),DP(e,[`config.apiKey`,`timeline.queue.length`])),identify:OP(CP(e.identify.bind(e)),`identify`,TP(e),DP(e,[`config.apiKey`,`timeline.queue.length`])),groupIdentify:OP(CP(e.groupIdentify.bind(e)),`groupIdentify`,TP(e),DP(e,[`config.apiKey`,`timeline.queue.length`])),setGroup:OP(CP(e.setGroup.bind(e)),`setGroup`,TP(e),DP(e,[`config.apiKey`,`timeline.queue.length`])),revenue:OP(CP(e.revenue.bind(e)),`revenue`,TP(e),DP(e,[`config.apiKey`,`timeline.queue.length`])),flush:OP(CP(e.flush.bind(e)),`flush`,TP(e),DP(e,[`config.apiKey`,`timeline.queue.length`])),getUserId:OP(e.getUserId.bind(e),`getUserId`,TP(e),DP(e,[`config`,`config.userId`])),setUserId:OP(e.setUserId.bind(e),`setUserId`,TP(e),DP(e,[`config`,`config.userId`])),getDeviceId:OP(e.getDeviceId.bind(e),`getDeviceId`,TP(e),DP(e,[`config`,`config.deviceId`])),setDeviceId:OP(e.setDeviceId.bind(e),`setDeviceId`,TP(e),DP(e,[`config`,`config.deviceId`])),reset:OP(e.reset.bind(e),`reset`,TP(e),DP(e,[`config`,`config.userId`,`config.deviceId`])),getSessionId:OP(e.getSessionId.bind(e),`getSessionId`,TP(e),DP(e,[`config`])),setSessionId:OP(e.setSessionId.bind(e),`setSessionId`,TP(e),DP(e,[`config`])),setOptOut:OP(e.setOptOut.bind(e),`setOptOut`,TP(e),DP(e,[`config`])),setTransport:OP(e.setTransport.bind(e),`setTransport`,TP(e),DP(e,[`config`]))}}();rI.add,rI.flush,rI.getDeviceId,rI.getSessionId,rI.getUserId,rI.groupIdentify;var iI=rI.identify,aI=rI.init;rI.logEvent,rI.remove;var oI=rI.reset;rI.revenue,rI.setDeviceId,rI.setGroup,rI.setOptOut,rI.setSessionId,rI.setTransport;var sI=rI.setUserId,cI=rI.track;export{Ai as C,o as E,ki as S,Bi as T,Xw as _,cI as a,Hb as b,yN as c,cM as d,Yj as f,Qw as g,$w as h,sI as i,XM as l,sT as m,aI as n,$N as o,ej as p,oI as r,CN as s,iI as t,yM as u,Kw as v,zi as w,I as x,Yw as y};