@volley/vwr-loader 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,10 +1,12 @@
1
- var ka=Object.defineProperty,La=Object.defineProperties;var Na=Object.getOwnPropertyDescriptors;var He=Object.getOwnPropertySymbols;var no=Object.prototype.hasOwnProperty,ro=Object.prototype.propertyIsEnumerable;var eo=(t,e,n)=>e in t?ka(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,b=(t,e)=>{for(var n in e||(e={}))no.call(e,n)&&eo(t,n,e[n]);if(He)for(var n of He(e))ro.call(e,n)&&eo(t,n,e[n]);return t},H=(t,e)=>La(t,Na(e));var Ke=(t,e)=>{var n={};for(var r in t)no.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&He)for(var r of He(t))e.indexOf(r)<0&&ro.call(t,r)&&(n[r]=t[r]);return n};(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();const F={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},lt=console,zt={};Object.keys(F).forEach(t=>{zt[t]=lt[t]});const Se="Datadog Browser SDK:",T={debug:zt.debug.bind(lt,Se),log:zt.log.bind(lt,Se),info:zt.info.bind(lt,Se),warn:zt.warn.bind(lt,Se),error:zt.error.bind(lt,Se)},hn="https://docs.datadoghq.com",Pa=`${hn}/real_user_monitoring/browser/troubleshooting`,Rr="More details:";function os(t,e){return(...n)=>{try{return t(...n)}catch(r){T.error(e,r)}}}function wt(t){return t!==0&&Math.random()*100<=t}function ne(t,e){return+t.toFixed(e)}function Ma(t){return Me(t)&&t>=0&&t<=100}function Me(t){return typeof t=="number"}function Oe(t){return b({},t)}function cn(t,e){return Object.keys(t).some(n=>t[n]===e)}function Lt(t){return Object.keys(t).length===0}function ss(t,e){const n={};for(const r of Object.keys(t))n[r]=e(t[r]);return n}function rt(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let t=_dd_temp_;return delete Object.prototype._dd_temp_,typeof t!="object"&&(typeof self=="object"?t=self:typeof window=="object"?t=window:t={}),t}const ct=rt(),qt="WorkerGlobalScope"in ct;function Rt(t,e){const n=rt();let r;return n.Zone&&typeof n.Zone.__symbol__=="function"&&(r=t[n.Zone.__symbol__(e)]),r||(r=t[e]),r}let un,is=!1;function Da(t){un=t}function Ua(t){is=t}function Va(t,e,n){const r=n.value;n.value=function(...o){return(un?S(r):r).apply(this,o)}}function S(t){return function(...e){return ht(t,this,e)}}function ht(t,e,n){try{return t.apply(e,n)}catch(r){Ot(r)}}function Ot(t){if(gr(t),un)try{un(t)}catch(e){gr(e)}}function gr(...t){is&&T.error("[MONITOR]",...t)}function W(t,e){return Rt(rt(),"setTimeout")(S(t),e)}function st(t){Rt(rt(),"clearTimeout")(t)}function _e(t,e){return Rt(rt(),"setInterval")(S(t),e)}function mn(t){Rt(rt(),"clearInterval")(t)}function oo(t){var e;const n=(e=ct.queueMicrotask)===null||e===void 0?void 0:e.bind(ct);typeof n=="function"?n(S(t)):Promise.resolve().then(S(t))}class R{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}notify(e){this.observers.forEach(n=>n(e))}addObserver(e){this.observers.push(e),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(e){this.observers=this.observers.filter(n=>e!==n),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function as(...t){return new R(e=>{const n=t.map(r=>r.subscribe(o=>e.notify(o)));return()=>n.forEach(r=>r.unsubscribe())})}class cs extends R{constructor(e){super(),this.maxBufferSize=e,this.buffer=[]}notify(e){this.buffer.push(e),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(e)}subscribe(e){let n=!1;const r={unsubscribe:()=>{n=!0,this.removeObserver(e)}};return oo(()=>{for(const o of this.buffer){if(n)return;e(o)}n||this.addObserver(e)}),r}unbuffer(){oo(()=>{this.maxBufferSize=this.buffer.length=0})}}const q=1e3,Q=60*q,us=60*Q,Fa=24*us,ls=365*Fa;function gn(t){return{relative:t,timeStamp:za(t)}}function Ba(t){return{relative:_n(t),timeStamp:t}}function za(t){const e=J()-performance.now();return e>De()?Math.round(Nt(e,t)):Ga(t)}function $a(){return Math.round(J()-Nt(De(),performance.now()))}function A(t){return Me(t)?ne(t*1e6,0):t}function J(){return new Date().getTime()}function z(){return J()}function nt(){return performance.now()}function j(){return{relative:nt(),timeStamp:z()}}function ds(){return{relative:0,timeStamp:De()}}function $(t,e){return e-t}function Nt(t,e){return t+e}function _n(t){return t-De()}function Ga(t){return Math.round(Nt(De(),t))}function ja(t){return t<ls}let Kn;function De(){var t,e;return Kn===void 0&&(Kn=(e=(t=performance.timing)===null||t===void 0?void 0:t.navigationStart)!==null&&e!==void 0?e:performance.timeOrigin),Kn}function bn(t,e,n){const r=n&&n.leading!==void 0?n.leading:!0,o=n&&n.trailing!==void 0?n.trailing:!0;let s=!1,i,a;return{throttled:(...c)=>{if(s){i=c;return}r?t(...c):i=c,s=!0,a=W(()=>{o&&i&&t(...i),s=!1,i=void 0},e)},cancel:()=>{st(a),s=!1,i=void 0}}}function k(){}function Z(t){return t?(parseInt(t,10)^Math.random()*16>>parseInt(t,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,Z)}const le=/([\w-]+)\s*=\s*([^;]+)/g;function xe(t,e){for(le.lastIndex=0;;){const n=le.exec(t);if(n){if(n[1]===e)return n[2]}else break}}function Ha(t){const e=new Map;for(le.lastIndex=0;;){const n=le.exec(t);if(n){const r=n[1],o=n[2];e.has(r)?e.get(r).push(o):e.set(r,[o])}else break}return e}function Ka(t){const e=new Map;for(le.lastIndex=0;;){const n=le.exec(t);if(n)e.set(n[1],n[2]);else break}return e}function yn(t,e,n=""){const r=t.charCodeAt(e-1),s=r>=55296&&r<=56319?e+1:e;return t.length<=s?t:`${t.slice(0,s)}${n}`}function Wa(){return fs()===0}function e_(){return fs()===1}let We;function fs(){return We!=null?We:We=qa()}function qa(t=window){var e;const n=t.navigator.userAgent;return t.chrome||/HeadlessChrome/.test(n)?0:((e=t.navigator.vendor)===null||e===void 0?void 0:e.indexOf("Apple"))===0||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}function Or(t){return vn(t,location.href).href}function Ya(t){try{return!!vn(t)}catch(e){return!1}}function Xa(t){const e=vn(t).pathname;return e[0]==="/"?e:`/${e}`}function vn(t,e){const{URL:n}=Ja();try{return e!==void 0?new n(t,e):new n(t)}catch(r){throw new Error(`Failed to construct URL: ${String(r)}`)}}let Wn;function Ja(){if(!Wn){let t,e;try{t=document.createElement("iframe"),t.style.display="none",document.body.appendChild(t),e=t.contentWindow}catch(n){e=ct}Wn={URL:e.URL},t==null||t.remove()}return Wn}function En(t,e,n=0,r){const o=new Date;o.setTime(o.getTime()+n);const s=`expires=${o.toUTCString()}`,i=r&&r.crossSite?"none":"strict",a=r&&r.domain?`;domain=${r.domain}`:"",c=r&&r.secure?";secure":"",u=r&&r.partitioned?";partitioned":"";document.cookie=`${t}=${e};${s};path=/;samesite=${i}${a}${c}${u}`}function Sn(t){return xe(document.cookie,t)}function Za(t){return Ha(document.cookie).get(t)||[]}let qn;function At(t){return qn||(qn=Ka(document.cookie)),qn.get(t)}function ps(t,e){En(t,"",0,e)}function Qa(t){if(document.cookie===void 0||document.cookie===null)return!1;try{const e=`dd_cookie_test_${Z()}`,n="test";En(e,n,Q,t);const r=Sn(e)===n;return ps(e,t),r}catch(e){return T.error(e),!1}}let Yn;function hs(t=location.hostname,e=document.referrer){if(Yn===void 0){const n=tc(t,e);if(n){const r=`dd_site_test_${Z()}`,o="test",s=n.split(".");let i=s.pop();for(;s.length&&!Sn(r);)i=`${s.pop()}.${i}`,En(r,o,q,{domain:i});ps(r,{domain:i}),Yn=i}}return Yn}function tc(t,e){try{return t||vn(e).hostname}catch(n){}}const mt="_dd_s";function ms(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(e(r,n,t))return r}}function ln(t){return Object.values(t)}function xr(t){return Object.entries(t)}const Pt=4*us,gs=15*Q,ec=ls,_s="0",de={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},bs=/^([a-zA-Z]+)=([a-z0-9-]+)$/,kr="&";function nc(t){return!!t&&(t.indexOf(kr)!==-1||bs.test(t))}const rc="1";function $t(t,e){const n={isExpired:rc};return e.trackAnonymousUser&&(t!=null&&t.anonymousId)&&(n.anonymousId=t==null?void 0:t.anonymousId),n}function en(t){return Lt(t)}function ys(t){return!en(t)}function Ce(t){return t.isExpired!==void 0||!oc(t)}function oc(t){return(t.created===void 0||J()-Number(t.created)<Pt)&&(t.expire===void 0||J()<Number(t.expire))}function vs(t){t.expire=String(J()+gs)}function _r(t){return xr(t).map(([e,n])=>e==="anonymousId"?`aid=${n}`:`${e}=${n}`).join(kr)}function Tn(t){const e={};return nc(t)&&t.split(kr).forEach(n=>{const r=bs.exec(n);if(r!==null){const[,o,s]=r;o==="aid"?e.anonymousId=s:e[o]=s}}),e}const sc="_dd",ic="_dd_r",ac="_dd_l",cc="rum",uc="logs";function lc(t){if(!At(mt)){const n=At(sc),r=At(ic),o=At(ac),s={};n&&(s.id=n),o&&/^[01]$/.test(o)&&(s[uc]=o),r&&/^[012]$/.test(r)&&(s[cc]=r),ys(s)&&(vs(s),t.persistSession(s))}}const dc=0;function so(t){const e=pc(t);return e&&Qa(e)?{type:de.COOKIE,cookieOptions:e}:void 0}function fc(t,e){const n={isLockEnabled:Wa(),persistSession:r=>io(e,t,r,gs),retrieveSession:()=>Es(e,t),expireSession:r=>io(e,t,$t(r,t),Pt)};return lc(n),n}function io(t,e,n,r){let o=_r(n);e.betaEncodeCookieOptions&&(o=_r(b(b({},n),Lt(n)?{}:{c:Ss(t)}))),En(mt,o,e.trackAnonymousUser?ec:r,t)}function Es(t,e){if(e.betaEncodeCookieOptions)return hc(t);const n=Sn(mt);return Tn(n)}function pc(t){const e={};if(e.secure=!!t.useSecureSessionCookie||!!t.usePartitionedCrossSiteSessionCookie,e.crossSite=!!t.usePartitionedCrossSiteSessionCookie,e.partitioned=!!t.usePartitionedCrossSiteSessionCookie,t.trackSessionAcrossSubdomains){const n=hs();if(!n)return;e.domain=n}return e}function Ss(t){const e=t.domain?t.domain.split(".").length-1:0;let n=0;return n|=dc<<5,n|=e<<1,n|=t.crossSite?1:0,n.toString(16)}function hc(t){const e=Za(mt),n=Ss(t);let r;for(const o of e.reverse())if(r=Tn(o),r.c===n)break;return r==null||delete r.c,r!=null?r:{}}const mc="_dd_test_";function ao(){try{const t=Z(),e=`${mc}${t}`;localStorage.setItem(e,t);const n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:de.LOCAL_STORAGE}:void 0}catch(t){return}}function gc(t){return{isLockEnabled:!1,persistSession:Ts,retrieveSession:ws,expireSession:e=>_c(e,t)}}function Ts(t){localStorage.setItem(mt,_r(t))}function ws(){const t=localStorage.getItem(mt);return Tn(t)}function _c(t,e){Ts($t(t,e))}const bc=10,yc=100,vc=q,As="--",Is=[];let nn;function Gt(t,e,n=0){var r;const{isLockEnabled:o,persistSession:s,expireSession:i}=e,a=f=>s(H(b({},f),{lock:u})),c=()=>{const m=e.retrieveSession(),{lock:f}=m;return{session:Ke(m,["lock"]),lock:f&&!Sc(f)?f:void 0}};if(nn||(nn=t),t!==nn){Is.push(t);return}if(o&&n>=yc){co(e);return}let u,d=c();if(o){if(d.lock){qe(t,e,n);return}if(u=Ec(),a(d.session),d=c(),d.lock!==u){qe(t,e,n);return}}let l=t.process(d.session);if(o&&(d=c(),d.lock!==u)){qe(t,e,n);return}if(l&&(Ce(l)?i(l):(vs(l),o?a(l):s(l))),o&&!(l&&Ce(l))){if(d=c(),d.lock!==u){qe(t,e,n);return}s(d.session),l=d.session}(r=t.after)===null||r===void 0||r.call(t,l||d.session),co(e)}function qe(t,e,n){W(()=>{Gt(t,e,n+1)},bc)}function co(t){nn=void 0;const e=Is.shift();e&&Gt(e,t)}function Ec(){return Z()+As+z()}function Sc(t){const[,e]=t.split(As);return!e||$(Number(e),z())>vc}const uo=q;function Tc(t){switch(t.sessionPersistence){case de.COOKIE:return so(t);case de.LOCAL_STORAGE:return ao();case void 0:{let e=so(t);return!e&&t.allowFallbackToLocalStorage&&(e=ao()),e}default:T.error(`Invalid session persistence '${String(t.sessionPersistence)}'`)}}function wc(t,e){return t.type===de.COOKIE?fc(e,t.cookieOptions):gc(e)}function Ac(t,e,n,r,o=wc(t,e)){const s=new R,i=new R,a=new R,c=_e(p,uo);let u;h();const{throttled:d,cancel:l}=bn(()=>{Gt({process:g=>{if(en(g))return;const O=m(g);return _(O),O},after:g=>{ys(g)&&!E()&&y(g),u=g}},o)},uo);function f(){Gt({process:g=>E()?m(g):void 0},o)}function p(){const g=o.retrieveSession();Ce(g)?Gt({process:O=>Ce(O)?$t(O,e):void 0,after:m},o):m(g)}function m(g){return Ce(g)&&(g=$t(g,e)),E()&&(D(g)?U():(a.notify({previousState:u,newState:g}),u=g)),g}function h(){Gt({process:g=>{if(en(g))return g.anonymousId=Z(),$t(g,e)},after:g=>{u=g}},o)}function _(g){if(en(g))return!1;const O=r(g[n]);g[n]=O,delete g.isExpired,O!==_s&&!g.id&&(g.id=Z(),g.created=String(J()))}function E(){return(u==null?void 0:u[n])!==void 0}function D(g){return u.id!==g.id||u[n]!==g[n]}function U(){u=$t(u,e),i.notify()}function y(g){u=g,s.notify()}function v(g){Gt({process:O=>b(b({},O),g),after:m},o)}return{expandOrRenewSession:d,expandSession:f,getSession:()=>u,renewObservable:s,expireObservable:i,sessionStateUpdateObservable:a,restartSession:h,expire:g=>{l(),g===!1&&u&&delete u.anonymousId,o.expireSession(u),m($t(u,e))},stop:()=>{mn(c)},updateSessionState:v}}const br={GRANTED:"granted",NOT_GRANTED:"not-granted"};function Cs(t){const e=new R;return{tryToInit(n){t||(t=n)},update(n){t=n,e.notify()},isGranted(){return t===br.GRANTED},observable:e}}function Yt(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function ke(t){const e=Yt(t);return e==="string"||e==="function"||t instanceof RegExp}function wn(t,e,n=!1){return t.some(r=>{try{if(typeof r=="function")return r(e);if(r instanceof RegExp)return r.test(e);if(typeof r=="string")return n?e.startsWith(r):r===e}catch(o){T.error(o)}return!1})}const Ic=["chrome-extension://","moz-extension://"];function lo(t){return Ic.some(e=>t.includes(e))}function Cc(t,e=""){if(lo(t))return!1;const r=e.split(`
2
- `).filter(o=>{const s=o.trim();return s.length&&/^at\s+|@/.test(s)})[1]||"";return lo(r)}const Rc="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",Oc="SDK initialized on a non-allowed domain.";function xc(t,e,n=typeof location!="undefined"?location.origin:""){const r=t.allowedTrackingOrigins;if(!r)return Cc(n,e)?(T.error(Rc),!1):!0;const o=wn(r,n);return o||T.error(Oc),o}const Rs="datad0g.com",kc="dd0g-gov.com",Ht="datadoghq.com",Lc="datadoghq.eu",Nc="ddog-gov.com",Pc="pci.browser-intake-datadoghq.com",Mc=["ddsource","dd-api-key","dd-request-id"];function Tt(t,e,n){const r=Dc(t,e);return{build(o,s){const i=Uc(t,e,o,s,n);return r(i)},trackType:e}}function Dc(t,e){const n=`/api/v2/${e}`,r=t.proxy;if(typeof r=="string"){const s=Or(r);return i=>`${s}?ddforward=${encodeURIComponent(`${n}?${i}`)}`}if(typeof r=="function")return s=>r({path:n,parameters:s});const o=Os(e,t);return s=>`https://${o}${n}?${s}`}function Os(t,e){const{site:n=Ht,internalAnalyticsSubdomain:r}=e;if(t==="logs"&&e.usePciIntake&&n===Ht)return Pc;if(r&&n===Ht)return`${r}.${Ht}`;if(n===kc)return`http-intake.logs.${n}`;const o=n.split("."),s=o.pop();return`browser-intake-${o.join("-")}.${s}`}function Uc({clientToken:t,internalAnalyticsSubdomain:e,source:n="browser"},r,o,{retry:s,encoding:i},a=[]){const c=[`ddsource=${n}`,`dd-api-key=${t}`,`dd-evp-origin-version=${encodeURIComponent("6.25.2")}`,"dd-evp-origin=browser",`dd-request-id=${Z()}`].concat(a);return i&&c.push(`dd-evp-encoding=${i}`),r==="rum"&&(c.push(`batch_time=${z()}`,`_dd.api=${o}`),s&&c.push(`_dd.retry_count=${s.count}`,`_dd.retry_after=${s.lastFailureStatus}`)),e&&c.reverse(),c.join("&")}function Vc(t){const e=t.site||Ht,n=Fc(t.source),r=Bc(H(b({},t),{site:e,source:n})),o=zc(H(b({},t),{site:e,source:n}));return b({replica:o,site:e,source:n},r)}function Fc(t){return t==="flutter"||t==="unity"?t:"browser"}function Bc(t){return{logsEndpointBuilder:Tt(t,"logs"),rumEndpointBuilder:Tt(t,"rum"),profilingEndpointBuilder:Tt(t,"profile"),sessionReplayEndpointBuilder:Tt(t,"replay"),exposuresEndpointBuilder:Tt(t,"exposures"),flagEvaluationEndpointBuilder:Tt(t,"flagevaluation")}}function zc(t){if(!t.replica)return;const e=H(b({},t),{site:Ht,clientToken:t.replica.clientToken});return{logsEndpointBuilder:Tt(e,"logs"),rumEndpointBuilder:Tt(e,"rum",[`application.id=${t.replica.applicationId}`])}}function xs(t){return Mc.every(e=>t.includes(e))}const re={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},yr={ALL:"all",SAMPLED:"sampled"};function Xn(t,e){return t!=null&&typeof t!="string"?(T.error(`${e} must be defined as a string`),!1):!0}function $c(t){return t&&typeof t=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(t)?(T.error(`Site should be a valid Datadog site. ${Rr} ${hn}/getting_started/site/.`),!1):!0}function oe(t,e){return t!==void 0&&!Ma(t)?(T.error(`${e} Sample Rate should be a number between 0 and 100`),!1):!0}function ks(t,e){var n,r,o,s,i,a,c,u,d,l;if(!t||!t.clientToken){T.error("Client Token is not configured, we will not send any data.");return}if(t.allowedTrackingOrigins!==void 0&&!Array.isArray(t.allowedTrackingOrigins)){T.error("Allowed Tracking Origins must be an array");return}if(!(!$c(t.site)||!oe(t.sessionSampleRate,"Session")||!oe(t.telemetrySampleRate,"Telemetry")||!oe(t.telemetryConfigurationSampleRate,"Telemetry Configuration")||!oe(t.telemetryUsageSampleRate,"Telemetry Usage")||!Xn(t.version,"Version")||!Xn(t.env,"Env")||!Xn(t.service,"Service")||!xc(t,e!=null?e:""))){if(t.trackingConsent!==void 0&&!cn(br,t.trackingConsent)){T.error('Tracking Consent should be either "granted" or "not-granted"');return}return b({beforeSend:t.beforeSend&&os(t.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:qt?void 0:Tc(t),sessionSampleRate:(n=t.sessionSampleRate)!==null&&n!==void 0?n:100,telemetrySampleRate:(r=t.telemetrySampleRate)!==null&&r!==void 0?r:20,telemetryConfigurationSampleRate:(o=t.telemetryConfigurationSampleRate)!==null&&o!==void 0?o:5,telemetryUsageSampleRate:(s=t.telemetryUsageSampleRate)!==null&&s!==void 0?s:5,service:(i=t.service)!==null&&i!==void 0?i:void 0,env:(a=t.env)!==null&&a!==void 0?a:void 0,version:(c=t.version)!==null&&c!==void 0?c:void 0,datacenter:(u=t.datacenter)!==null&&u!==void 0?u:void 0,silentMultipleInit:!!t.silentMultipleInit,allowUntrustedEvents:!!t.allowUntrustedEvents,trackingConsent:(d=t.trackingConsent)!==null&&d!==void 0?d:br.GRANTED,trackAnonymousUser:(l=t.trackAnonymousUser)!==null&&l!==void 0?l:!0,storeContextsAcrossPages:!!t.storeContextsAcrossPages,betaEncodeCookieOptions:!!t.betaEncodeCookieOptions,variant:t.variant,sdkVersion:t.sdkVersion},Vc(t))}}function Ls(t){return{session_sample_rate:t.sessionSampleRate,telemetry_sample_rate:t.telemetrySampleRate,telemetry_configuration_sample_rate:t.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:t.telemetryUsageSampleRate,use_before_send:!!t.beforeSend,use_partitioned_cross_site_session_cookie:t.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:t.useSecureSessionCookie,use_proxy:!!t.proxy,silent_multiple_init:t.silentMultipleInit,track_session_across_subdomains:t.trackSessionAcrossSubdomains,track_anonymous_user:t.trackAnonymousUser,session_persistence:t.sessionPersistence,allow_fallback_to_local_storage:!!t.allowFallbackToLocalStorage,store_contexts_across_pages:!!t.storeContextsAcrossPages,allow_untrusted_events:!!t.allowUntrustedEvents,tracking_consent:t.trackingConsent,use_allowed_tracking_origins:Array.isArray(t.allowedTrackingOrigins),beta_encode_cookie_options:t.betaEncodeCookieOptions,source:t.source,sdk_version:t.sdkVersion,variant:t.variant}}var xt;(function(t){t.TRACK_INTAKE_REQUESTS="track_intake_requests",t.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",t.FEATURE_OPERATION_VITAL="feature_operation_vital",t.SHORT_SESSION_INVESTIGATION="short_session_investigation",t.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive"})(xt||(xt={}));const Lr=new Set;function Ns(t){Array.isArray(t)&&Gc(t.filter(e=>cn(xt,e)))}function Gc(t){t.forEach(e=>{Lr.add(e)})}function Ue(t){return Lr.has(t)}function jc(){return Lr}const fe="?";function Ve(t){var e,n;const r=[];let o=Jn(t,"stack");const s=String(t);if(o&&o.startsWith(s)&&(o=o.slice(s.length)),o&&o.split(`
3
- `).forEach(i=>{const a=Wc(i)||Yc(i)||Jc(i)||tu(i);a&&(!a.func&&a.line&&(a.func=fe),r.push(a))}),r.length>0&&ou()&&t instanceof Error){const i=[];let a=t;for(;(a=Object.getPrototypeOf(a))&&Ms(a);){const c=((e=a.constructor)===null||e===void 0?void 0:e.name)||fe;i.push(c)}for(let c=i.length-1;c>=0&&((n=r[0])===null||n===void 0?void 0:n.func)===i[c];c--)r.shift()}return{message:Jn(t,"message"),name:Jn(t,"name"),stack:r}}const Ps="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",pe="(?::(\\d+))",Hc=new RegExp(`^\\s*at (.*?) ?\\(${Ps}${pe}?${pe}?\\)?\\s*$`,"i"),Kc=new RegExp(`\\((\\S*)${pe}${pe}\\)`);function Wc(t){const e=Hc.exec(t);if(!e)return;const n=e[2]&&e[2].indexOf("native")===0,r=e[2]&&e[2].indexOf("eval")===0,o=Kc.exec(e[2]);return r&&o&&(e[2]=o[1],e[3]=o[2],e[4]=o[3]),{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||fe,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}const qc=new RegExp(`^\\s*at ?${Ps}${pe}?${pe}??\\s*$`,"i");function Yc(t){const e=qc.exec(t);if(e)return{args:[],column:e[3]?+e[3]:void 0,func:fe,line:e[2]?+e[2]:void 0,url:e[1]}}const Xc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Jc(t){const e=Xc.exec(t);if(e)return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||fe,line:+e[3],url:e[2]}}const Zc=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,Qc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function tu(t){const e=Zc.exec(t);if(!e)return;const n=e[3]&&e[3].indexOf(" > eval")>-1,r=Qc.exec(e[3]);return n&&r&&(e[3]=r[1],e[4]=r[2],e[5]=void 0),{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||fe,line:e[4]?+e[4]:void 0,url:e[3]}}function Jn(t,e){if(typeof t!="object"||!t||!(e in t))return;const n=t[e];return typeof n=="string"?n:void 0}function eu(t,e,n,r){if(e===void 0)return;const{name:o,message:s}=ru(t);return{name:o,message:s,stack:[{url:e,column:r,line:n}]}}const nu=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function ru(t){let e,n;return{}.toString.call(t)==="[object String]"&&([,e,n]=nu.exec(t)),{name:e,message:n}}function Ms(t){return String(t.constructor).startsWith("class ")}let Ye;function ou(){if(Ye!==void 0)return Ye;class t extends Error{constructor(){super(),this.name="Error"}}const[e,n]=[t,Error].map(r=>new r);return Ye=Ms(Object.getPrototypeOf(e))&&n.stack!==e.stack,Ye}function he(t){const n=new Error(t);n.name="HandlingStack";let r;return ht(()=>{const o=Ve(n);o.stack=o.stack.slice(2),r=Fe(o)}),r}function Fe(t){let e=Ds(t);return t.stack.forEach(n=>{const r=n.func==="?"?"<anonymous>":n.func,o=n.args&&n.args.length>0?`(${n.args.join(", ")})`:"",s=n.line?`:${n.line}`:"",i=n.line&&n.column?`:${n.column}`:"";e+=`
4
- at ${r}${o} @ ${n.url}${s}${i}`}),e}function Ds(t){return`${t.name||"Error"}: ${t.message}`}function dt(t,e,n,{computeHandlingStack:r}={}){let o=t[e];if(typeof o!="function")if(e in t&&typeof e=="string"&&e.startsWith("on"))o=k;else return{stop:k};let s=!1;const i=function(){if(s)return o.apply(this,arguments);const a=Array.from(arguments);let c;ht(n,null,[{target:this,parameters:a,onPostCall:d=>{c=d},handlingStack:r?he("instrumented method"):void 0}]);const u=o.apply(this,a);return c&&ht(c,null,[u]),u};return t[e]=i,{stop:()=>{s=!0,t[e]===i&&(t[e]=o)}}}function n_(t,e,n){const r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r.set||!r.configurable)return{stop:k};const o=k;let s=(a,c)=>{W(()=>{s!==o&&n(a,c)},0)};const i=function(a){r.set.call(this,a),s(this,a)};return Object.defineProperty(t,e,{set:i}),{stop:()=>{var a;((a=Object.getOwnPropertyDescriptor(t,e))===null||a===void 0?void 0:a.set)===i&&Object.defineProperty(t,e,r),s=o}}}const Mt=1024,Us=1024*Mt,su=/[^\u0000-\u007F]/;function Vs(t){return su.test(t)?window.TextEncoder!==void 0?new TextEncoder().encode(t).length:new Blob([t]).size:t.length}function Fs(t){if(t.length===1)return t[0];const e=t.reduce((o,s)=>o+s.length,0),n=new Uint8Array(e);let r=0;for(const o of t)n.set(o,r),r+=o.length;return n}function me(t,e,n){if(typeof t!="object"||t===null)return JSON.stringify(t);const r=se(Object.prototype),o=se(Array.prototype),s=se(Object.getPrototypeOf(t)),i=se(t);try{return JSON.stringify(t,e,n)}catch(a){return"<error: unable to serialize object>"}finally{r(),o(),s(),i()}}function se(t){const e=t,n=e.toJSON;return n?(delete e.toJSON,()=>{e.toJSON=n}):k}const iu=220*Mt,au="$",cu=3;function N(t,e=iu){const n=se(Object.prototype),r=se(Array.prototype),o=[],s=new WeakMap,i=Zn(t,au,void 0,o,s),a=JSON.stringify(i);let c=a?a.length:0;if(c>e){Qn(e,"discarded",t);return}for(;o.length>0&&c<e;){const u=o.shift();let d=0;if(Array.isArray(u.source))for(let l=0;l<u.source.length;l++){const f=Zn(u.source[l],u.path,l,o,s);if(f!==void 0?c+=JSON.stringify(f).length:c+=4,c+=d,d=1,c>e){Qn(e,"truncated",t);break}u.target[l]=f}else for(const l in u.source)if(Object.prototype.hasOwnProperty.call(u.source,l)){const f=Zn(u.source[l],u.path,l,o,s);if(f!==void 0&&(c+=JSON.stringify(f).length+d+l.length+cu,d=1),c>e){Qn(e,"truncated",t);break}u.target[l]=f}}return n(),r(),i}function Zn(t,e,n,r,o){const s=du(t);if(!s||typeof s!="object")return uu(s);const i=vr(s);if(i!=="[Object]"&&i!=="[Array]"&&i!=="[Error]")return i;const a=t;if(o.has(a))return`[Reference seen at ${o.get(a)}]`;const c=n!==void 0?`${e}.${n}`:e,u=Array.isArray(s)?[]:{};return o.set(a,c),r.push({source:s,target:u,path:c}),u}function uu(t){return typeof t=="bigint"?`[BigInt] ${t.toString()}`:typeof t=="function"?`[Function] ${t.name||"unknown"}`:typeof t=="symbol"?`[Symbol] ${t.description||t.toString()}`:t}function vr(t){try{if(t instanceof Event)return lu(t);if(t instanceof RegExp)return`[RegExp] ${t.toString()}`;const n=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch(e){}return"[Unserializable]"}function lu(t){return{type:t.type,isTrusted:t.isTrusted,currentTarget:t.currentTarget?vr(t.currentTarget):null,target:t.target?vr(t.target):null}}function du(t){const e=t;if(e&&typeof e.toJSON=="function")try{return e.toJSON()}catch(n){}return t}function Qn(t,e,n){T.warn(`The data provided has been ${e} as it is over the limit of ${t} characters:`,n)}const Bs="No stack, consider using an instance of Error";function zs({originalError:t,stackTrace:e,source:n,useFallbackStack:r=!0,nonErrorPrefix:o}){const s=Dt(t);return!e&&s&&(e=Ve(t)),{source:n,type:e?e.name:void 0,message:fu(e,s,o,t),stack:e?Fe(e):r?Bs:void 0}}function An({stackTrace:t,originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:s,useFallbackStack:i=!0,source:a,handling:c}){const u=zs({originalError:e,stackTrace:t,source:a,useFallbackStack:i,nonErrorPrefix:s});return H(b({startClocks:o,handling:c,handlingStack:n,componentStack:r,originalError:e},u),{causes:Dt(e)?gu(e,a):void 0,fingerprint:pu(e),context:hu(e)})}function fu(t,e,n,r){return t!=null&&t.message&&(t!=null&&t.name)?t.message:e?"Empty message":n?`${n} ${me(N(r))}`:me(N(r))}function pu(t){return Dt(t)&&"dd_fingerprint"in t?String(t.dd_fingerprint):void 0}function hu(t){if(t!==null&&typeof t=="object"&&"dd_context"in t)return t.dd_context}function mu(t){var e;return(e=/@ (.+)/.exec(t))===null||e===void 0?void 0:e[1]}function Dt(t){return t instanceof Error||Object.prototype.toString.call(t)==="[object Error]"}function gu(t,e){const n=[];let r=t.cause;for(;r!=null&&n.length<10;){const o=zs({originalError:r,source:e,useFallbackStack:!1});n.push(o),r=Dt(r)?r.cause:void 0}return n.length?n:void 0}const et={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function _u(){return new R(t=>{const e=(o,s)=>{const i=An({stackTrace:s,originalError:o,startClocks:j(),nonErrorPrefix:"Uncaught",source:et.SOURCE,handling:"unhandled"});t.notify(i)},{stop:n}=bu(e),{stop:r}=yu(e);return()=>{n(),r()}})}function bu(t){return dt(rt(),"onerror",({parameters:[e,n,r,o,s]})=>{let i;Dt(s)||(i=eu(e,n,r,o)),t(s!=null?s:e,i)})}function yu(t){return dt(rt(),"onunhandledrejection",({parameters:[e]})=>{t(e.reason||"Empty reason")})}function $s(t){const e=b({version:"6.25.2",onReady(n){n()}},t);return Object.defineProperty(e,"_setDebug",{get(){return Ua},enumerable:!1}),e}function Gs(t,e,n){const r=t[e];r&&!r.q&&r.version&&T.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),t[e]=n,r&&r.q&&r.q.forEach(o=>os(o,"onReady callback threw an error:")())}function In(t,e){e.silentMultipleInit||T.error(`${t} is already initialized.`)}function V(t,e,n,r,o){return kt(t,e,[n],r,o)}function kt(t,e,n,r,{once:o,capture:s,passive:i}={}){const a=S(f=>{!f.isTrusted&&!f.__ddIsTrusted&&!t.allowUntrustedEvents||(o&&l(),r(f))}),c=i?{capture:s,passive:i}:s,u=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,d=Rt(u,"addEventListener");n.forEach(f=>d.call(e,f,a,c));function l(){const f=Rt(u,"removeEventListener");n.forEach(p=>f.call(e,p,a,c))}return{stop:l}}const ge={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function js(t,e){const n=[];e.includes(ge.cspViolation)&&n.push(Eu(t));const r=e.filter(o=>o!==ge.cspViolation);return r.length&&n.push(vu(r)),as(...n)}function vu(t){return new R(e=>{if(!window.ReportingObserver)return;const n=S((o,s)=>o.forEach(i=>e.notify(Su(i)))),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function Eu(t){return new R(e=>{const{stop:n}=V(t,document,"securitypolicyviolation",r=>{e.notify(Tu(r))});return n})}function Su(t){const{type:e,body:n}=t;return Hs({type:n.id,message:`${e}: ${n.message}`,originalError:t,stack:Ks(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function Tu(t){const e=`'${t.blockedURI}' blocked by '${t.effectiveDirective}' directive`;return Hs({type:t.effectiveDirective,message:`${ge.cspViolation}: ${e}`,originalError:t,csp:{disposition:t.disposition},stack:Ks(t.effectiveDirective,t.originalPolicy?`${e} of the policy "${yn(t.originalPolicy,100,"...")}"`:"no policy",t.sourceFile,t.lineNumber,t.columnNumber)})}function Hs(t){return b({startClocks:j(),source:et.REPORT,handling:"unhandled"},t)}function Ks(t,e,n,r,o){return n?Fe({name:t,message:e,stack:[{func:"?",url:n,line:r!=null?r:void 0,column:o!=null?o:void 0}]}):void 0}const wu=200;function Nr(t){const{env:e,service:n,version:r,datacenter:o,sdkVersion:s,variant:i}=t,a=[Bt("sdk_version",s!=null?s:"6.25.2")];return e&&a.push(Bt("env",e)),n&&a.push(Bt("service",n)),r&&a.push(Bt("version",r)),o&&a.push(Bt("datacenter",o)),i&&a.push(Bt("variant",i)),a}function Bt(t,e){const n=e?`${t}:${e}`:t;return(n.length>wu||Au(n))&&T.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${Rr} ${hn}/getting_started/tagging/#defining-tags`),Ws(n)}function Ws(t){return t.replace(/,/g,"_")}function Au(t){return Iu()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(t):!1}function Iu(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch(t){return!1}}function Pr(t,e){const n=ct.__ddBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}function dn(t,e,n=Cu()){if(e===void 0)return t;if(typeof e!="object"||e===null)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=e.flags||[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.sticky?"y":"",e.unicode?"u":""].join("");return new RegExp(e.source,o)}if(n.hasAlreadyBeenSeen(e))return;if(Array.isArray(e)){const o=Array.isArray(t)?t:[];for(let s=0;s<e.length;++s)o[s]=dn(o[s],e[s],n);return o}const r=Yt(t)==="object"?t:{};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=dn(r[o],e[o],n));return r}function Cn(t){return dn(void 0,t)}function it(...t){let e;for(const n of t)n!=null&&(e=dn(e,n));return e}function Cu(){if(typeof WeakSet!="undefined"){const e=new WeakSet;return{hasAlreadyBeenSeen(n){const r=e.has(n);return r||e.add(n),r}}}const t=[];return{hasAlreadyBeenSeen(e){const n=t.indexOf(e)>=0;return n||t.push(e),n}}}function qs(){var t;const e=ct.navigator;return{status:e.onLine?"connected":"not_connected",interfaces:e.connection&&e.connection.type?[e.connection.type]:void 0,effective_type:(t=e.connection)===null||t===void 0?void 0:t.effectiveType}}function Ys(t){return t>=500}function Ru(t){try{return t.clone()}catch(e){return}}const Ou=80*Mt,xu=32,Xs=20*Us,ku=Q,Js=q;function Zs(t,e,n,r,o,s){e.transportStatus===0&&e.queuedPayloads.size()===0&&e.bandwidthMonitor.canHandle(t)?ti(t,e,n,s,{onSuccess:()=>ei(0,e,n,r,o,s),onFailure:()=>{e.queuedPayloads.enqueue(t)||s.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t}),Qs(e,n,r,o,s)}}):e.queuedPayloads.enqueue(t)||s.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t})}function Qs(t,e,n,r,o){t.transportStatus===2&&W(()=>{const s=t.queuedPayloads.first();ti(s,t,e,o,{onSuccess:()=>{t.queuedPayloads.dequeue(),t.currentBackoffTime=Js,ei(1,t,e,n,r,o)},onFailure:()=>{t.currentBackoffTime=Math.min(ku,t.currentBackoffTime*2),Qs(t,e,n,r,o)}})},t.currentBackoffTime)}function ti(t,e,n,r,{onSuccess:o,onFailure:s}){e.bandwidthMonitor.add(t),n(t,i=>{e.bandwidthMonitor.remove(t),Lu(i)?(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:i.status},r.notify({type:"failure",bandwidth:e.bandwidthMonitor.stats(),payload:t}),s()):(e.transportStatus=0,r.notify({type:"success",bandwidth:e.bandwidthMonitor.stats(),payload:t}),o())})}function ei(t,e,n,r,o,s){t===0&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(o({message:`Reached max ${r} events size queued for upload: ${Xs/Us}MiB`,source:et.AGENT,startClocks:j()}),e.queueFullReported=!0);const i=e.queuedPayloads;for(e.queuedPayloads=ni();i.size()>0;)Zs(i.dequeue(),e,n,r,o,s)}function Lu(t){return t.type!=="opaque"&&(t.status===0&&!navigator.onLine||t.status===408||t.status===429||Ys(t.status))}function Nu(){return{transportStatus:0,currentBackoffTime:Js,bandwidthMonitor:Pu(),queuedPayloads:ni(),queueFullReported:!1}}function ni(){const t=[];return{bytesCount:0,enqueue(e){return this.isFull()?!1:(t.push(e),this.bytesCount+=e.bytesCount,!0)},first(){return t[0]},dequeue(){const e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size(){return t.length},isFull(){return this.bytesCount>=Xs}}}function Pu(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(t){return this.ongoingRequestCount===0||this.ongoingByteCount+t.bytesCount<=Ou&&this.ongoingRequestCount<xu},add(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}const Er=16*Mt;function Mr(t,e,n=Er){const r=new R,o=Nu();return{observable:r,send:s=>{for(const i of t)Zs(s,o,(a,c)=>{Ue(xt.AVOID_FETCH_KEEPALIVE)?fn(i,a,c):Uu(i,n,a,c)},i.trackType,e,r)},sendOnExit:s=>{for(const i of t)Mu(i,n,s)}}}function Mu(t,e,n){if(!!navigator.sendBeacon&&n.bytesCount<e)try{const o=t.build("beacon",n);if(navigator.sendBeacon(o,n.data))return}catch(o){Du(o)}fn(t,n)}let fo=!1;function Du(t){fo||(fo=!0,Ot(t))}function Uu(t,e,n,r){if(Vu()&&n.bytesCount<e){const s=t.build("fetch-keepalive",n);fetch(s,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then(S(i=>r==null?void 0:r({status:i.status,type:i.type}))).catch(S(()=>fn(t,n,r)))}else fn(t,n,r)}function fn(t,e,n){const r=t.build("fetch",e);fetch(r,{method:"POST",body:e.data,mode:"cors"}).then(S(o=>n==null?void 0:n({status:o.status,type:o.type}))).catch(S(()=>n==null?void 0:n({status:0})))}function Vu(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(t){return!1}}function be(){const t=Fu();if(t)return{getCapabilities(){var e;return JSON.parse(((e=t.getCapabilities)===null||e===void 0?void 0:e.call(t))||"[]")},getPrivacyLevel(){var e;return(e=t.getPrivacyLevel)===null||e===void 0?void 0:e.call(t)},getAllowedWebViewHosts(){return JSON.parse(t.getAllowedWebViewHosts())},send(e,n,r){const o=r?{id:r}:void 0;t.send(JSON.stringify({eventType:e,event:n,view:o}))}}}function ri(t){const e=be();return!!e&&e.getCapabilities().includes(t)}function gt(t){var e;t===void 0&&(t=(e=rt().location)===null||e===void 0?void 0:e.hostname);const n=be();return!!n&&n.getAllowedWebViewHosts().some(r=>t===r||t.endsWith(`.${r}`))}function Fu(){return rt().DatadogEventBridge}const ie={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function oi(t){return new R(e=>{const{stop:n}=kt(t,window,["visibilitychange","freeze"],o=>{o.type==="visibilitychange"&&document.visibilityState==="hidden"?e.notify({reason:ie.HIDDEN}):o.type==="freeze"&&e.notify({reason:ie.FROZEN})},{capture:!0}),r=V(t,window,"beforeunload",()=>{e.notify({reason:ie.UNLOADING})}).stop;return()=>{n(),r()}})}function Bu(t){return ln(ie).includes(t)}const po=256*Mt;function Dr({encoder:t,request:e,flushController:n}){let r={};const o=n.flushObservable.subscribe(d=>u(d));function s(d,l,f){n.notifyBeforeAddMessage(l),f!==void 0?(r[f]=d,n.notifyAfterAddMessage()):t.write(t.isEmpty?d:`
5
- ${d}`,p=>{n.notifyAfterAddMessage(p-l)})}function i(d){return d!==void 0&&r[d]!==void 0}function a(d){const l=r[d];delete r[d];const f=t.estimateEncodedBytesCount(l);n.notifyAfterRemoveMessage(f)}function c(d,l){const f=me(d),p=t.estimateEncodedBytesCount(f);if(p>=po){T.warn(`Discarded a message whose size was bigger than the maximum allowed size ${po/Mt}KiB. ${Rr} ${Pa}/#technical-limitations`);return}i(l)&&a(l),s(f,p,l)}function u(d){const l=ln(r).join(`
6
- `);r={};const f=Bu(d.reason),p=f?e.sendOnExit:e.send;if(f&&t.isAsync){const m=t.finishSync();m.outputBytesCount&&p(ho(m));const h=[m.pendingData,l].filter(Boolean).join(`
7
- `);h&&p({data:h,bytesCount:Vs(h)})}else l&&t.write(t.isEmpty?l:`
8
- ${l}`),t.finish(m=>{p(ho(m))})}return{flushController:n,add:c,upsert:c,stop:o.unsubscribe}}function ho(t){let e;return typeof t.output=="string"?e=t.output:e=new Blob([t.output],{type:"text/plain"}),{data:e,bytesCount:t.outputBytesCount,encoding:t.encoding}}const zu=30*q,$u=qt?1:50;function Ur({pageMayExitObservable:t,sessionExpireObservable:e}){const n=t.subscribe(l=>a(l.reason)),r=e.subscribe(()=>a("session_expire")),o=new R(()=>()=>{n.unsubscribe(),r.unsubscribe()});let s=0,i=0;function a(l){if(i===0)return;const f=i,p=s;i=0,s=0,d(),o.notify({reason:l,messagesCount:f,bytesCount:p})}let c;function u(){c===void 0&&(c=W(()=>{a("duration_limit")},zu))}function d(){st(c),c=void 0}return{flushObservable:o,get messagesCount(){return i},notifyBeforeAddMessage(l){s+l>=Er&&a("bytes_limit"),i+=1,s+=l,u()},notifyAfterAddMessage(l=0){s+=l,i>=$u?a("messages_limit"):s>=Er&&a("bytes_limit")},notifyAfterRemoveMessage(l){s-=l,i-=1,i===0&&d()}}}const ut="DISCARDED",K="SKIPPED";function si(){const t={};return{register(e,n){return t[e]||(t[e]=[]),t[e].push(n),{unregister:()=>{t[e]=t[e].filter(r=>r!==n)}}},triggerHook(e,n){const r=t[e]||[],o=[];for(const s of r){const i=s(n);if(i===ut)return ut;i!==K&&o.push(i)}return it(...o)}}}const Ct={LOG:"log",CONFIGURATION:"configuration",USAGE:"usage"},Gu=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],ju=1,Hu=[Nc],Ku=15;let tr;function ye(){return tr||(tr=new cs(100)),tr}function ii(t,e,n,r,o,s){const i=new R,{stop:a}=qu(e,r,o,s,i),{enabled:c,metricsEnabled:u}=Wu(t,e,n,i);return{stop:a,enabled:c,metricsEnabled:u}}function Wu(t,e,n,r,o=ju,s=Ku){const i={},a=!Hu.includes(e.site)&&wt(e.telemetrySampleRate),c={[Ct.LOG]:a,[Ct.CONFIGURATION]:a&&wt(e.telemetryConfigurationSampleRate),[Ct.USAGE]:a&&wt(e.telemetryUsageSampleRate),metric:a&&wt(o)},u=Yu(),d=ye();return d.subscribe(({rawEvent:f,metricName:p})=>{if(p&&!c.metric||!c[f.type])return;const m=p||f.status||f.type;let h=i[m];if(h||(h=i[m]=new Set),h.size>=s)return;const _=me(f);if(h.has(_))return;const E=n.triggerHook(1,{startTime:j().relative});if(E===ut)return;const D=l(E,t,f,u);r.notify(D),Pr("telemetry",D),h.add(_)}),d.unbuffer(),Da(Vr),{enabled:a,metricsEnabled:c.metric};function l(f,p,m,h){const E={type:"telemetry",date:j().timeStamp,service:p,version:"6.25.2",source:"browser",_dd:{format_version:2},telemetry:it(m,{runtime_env:h,connectivity:qs(),sdk_setup:"npm"}),ddtags:Nr(e).join(","),experimental_features:Array.from(jc())};return it(E,f)}}function qu(t,e,n,r,o){const s=[];if(gt()){const i=be(),a=o.subscribe(c=>i.send("internal_telemetry",c));s.push(a.unsubscribe)}else{const i=[t.rumEndpointBuilder];t.replica&&Xu(t)&&i.push(t.replica.rumEndpointBuilder);const a=Dr({encoder:r(4),request:Mr(i,e),flushController:Ur({pageMayExitObservable:n,sessionExpireObservable:new R})});s.push(a.stop);const c=o.subscribe(a.add);s.push(c.unsubscribe)}return{stop:()=>s.forEach(i=>i())}}function Yu(){var t;return{is_local_file:((t=ct.location)===null||t===void 0?void 0:t.protocol)==="file:",is_worker:qt}}function Xu(t){return t.site===Rs}function ve(t,e){gr(F.debug,t,e),ye().notify({rawEvent:b({type:Ct.LOG,message:t,status:"debug"},e)})}function Vr(t,e){ye().notify({rawEvent:b(b({type:Ct.LOG,status:"error"},Ju(t)),e)})}function ai(t){ye().notify({rawEvent:{type:Ct.CONFIGURATION,configuration:t}})}function Rn(t,e){ye().notify({rawEvent:b({type:Ct.LOG,message:t,status:"debug"},e),metricName:t})}function G(t){ye().notify({rawEvent:{type:Ct.USAGE,usage:t}})}function Ju(t){if(Dt(t)){const e=Ve(t);return{error:{kind:e.name,stack:Fe(Zu(e))},message:e.message}}return{error:{stack:Bs},message:`Uncaught ${me(t)}`}}function Zu(t){return t.stack=t.stack.filter(e=>!e.url||Gu.some(n=>e.url.startsWith(n))),t}function Qu(t){const e=new Set;return t.forEach(n=>e.add(n)),Array.from(e)}function ci(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function Kt(t){return Array.isArray(t)&&t.length>0}const Xe=1/0,tl=Q;let Te=null;const rn=new Set;function el(){rn.forEach(t=>t())}function Xt({expireDelay:t,maxEntries:e}){let n=[];Te||(Te=_e(()=>el(),tl));const r=()=>{const d=nt()-t;for(;n.length>0&&n[n.length-1].endTime<d;)n.pop()};rn.add(r);function o(d,l){const f={value:d,startTime:l,endTime:Xe,remove:()=>{ci(n,f)},close:p=>{f.endTime=p}};return e&&n.length>=e&&n.pop(),n.unshift(f),f}function s(d=Xe,l={returnInactive:!1}){for(const f of n)if(f.startTime<=d){if(l.returnInactive||d<=f.endTime)return f.value;break}}function i(d){const l=n[0];l&&l.endTime===Xe&&l.close(d)}function a(d=Xe,l=0){const f=Nt(d,l);return n.filter(p=>p.startTime<=f&&d<=p.endTime).map(p=>p.value)}function c(){n=[]}function u(){rn.delete(r),rn.size===0&&Te&&(mn(Te),Te=null)}return{add:o,find:s,closeActive:i,findAll:a,reset:c,stop:u}}const nl="datadog-synthetics-public-id",rl="datadog-synthetics-result-id",ol="datadog-synthetics-injects-rum";function On(){return qt?!1:!!(ct._DATADOG_SYNTHETICS_INJECTS_RUM||At(ol))}function ui(){const t=window._DATADOG_SYNTHETICS_PUBLIC_ID||At(nl);return typeof t=="string"?t:void 0}function li(){const t=window._DATADOG_SYNTHETICS_RESULT_ID||At(rl);return typeof t=="string"?t:void 0}function di(){return!!(ui()&&li())}const sl=Q,il=Pt;function fi(t,e,n,r){const o=new R,s=new R,i=Ac(t.sessionStoreStrategyType,t,e,n),a=Xt({expireDelay:il});if(i.renewObservable.subscribe(()=>{a.add(c(),nt()),o.notify()}),i.expireObservable.subscribe(()=>{s.notify(),a.closeActive(nt())}),i.expandOrRenewSession(),a.add(c(),ds().relative),Ue(xt.SHORT_SESSION_INVESTIGATION)){const u=i.getSession();u&&dl(t,u)}r.observable.subscribe(()=>{r.isGranted()?i.expandOrRenewSession():i.expire(!1)}),al(t,()=>{r.isGranted()&&i.expandOrRenewSession()}),cl(t,()=>i.expandSession()),ul(t,()=>i.restartSession());function c(){const u=i.getSession();return u?{id:u.id,trackingType:u[e],isReplayForced:!!u.forcedReplay,anonymousId:u.anonymousId}:(ll(t).catch(()=>{}),{id:"invalid",trackingType:_s,isReplayForced:!1,anonymousId:void 0})}return{findSession:(u,d)=>a.find(u,d),renewObservable:o,expireObservable:s,sessionStateUpdateObservable:i.sessionStateUpdateObservable,expire:i.expire,updateSessionState:i.updateSessionState}}function al(t,e){const{stop:n}=kt(t,window,["click","touchstart","keydown","scroll"],e,{capture:!0,passive:!0})}function cl(t,e){const n=()=>{document.visibilityState==="visible"&&e()},{stop:r}=V(t,document,"visibilitychange",n);_e(n,sl)}function ul(t,e){const{stop:n}=V(t,window,"resume",e,{capture:!0})}async function ll(t){const e=t.sessionStoreStrategyType;if(!e)return;let n,r;e.type===de.COOKIE?(n=Es(e.cookieOptions,t),r={cookie:await pi(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):n=ws(),ve("Unexpected session state",b({sessionStoreStrategyType:e.type,session:n,isSyntheticsTest:di(),createdTimestamp:n==null?void 0:n.created,expireTimestamp:n==null?void 0:n.expire},r))}function dl(t,e){if(!window.cookieStore||!e.created)return;const n=Number(e.created),r=J(),{stop:o}=V(t,cookieStore,"change",s);function s(i){const a=ms(i.changed,u=>u.name===mt);if(!a)return;const c=J()-n;if(c>14*Q)o();else{const u=Tn(a.value);if(u.id&&u.id!==e.id){o();const d=J()-r;pi().then(l=>{ve("Session cookie changed",{time:d,session_age:c,old:e,new:u,cookie:l})}).catch(Ot)}}}}async function pi(){let t;return"cookieStore"in window?t=await window.cookieStore.getAll(mt):t=document.cookie.split(/\s*;\s*/).filter(e=>e.startsWith(mt)),b({count:t.length,domain:hs()||"undefined"},t)}function Fr(){let t="",e=0;return{isAsync:!1,get isEmpty(){return!t},write(n,r){const o=Vs(n);e+=o,t+=n,r&&r(o)},finish(n){n(this.finishSync())},finishSync(){const n={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:""};return t="",e=0,n},estimateEncodedBytesCount(n){return n.length}}}class hi{constructor(){this.callbacks={}}notify(e,n){const r=this.callbacks[e];r&&r.forEach(o=>o(n))}subscribe(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(r=>n!==r)}}}}const fl=3e3;function on(t,e,n=fl){let r=0,o=!1;return{isLimitReached(){if(r===0&&W(()=>{r=0},Q),r+=1,r<=n||o)return o=!1,!1;if(r===n+1){o=!0;try{e({message:`Reached max number of ${t}s by minute: ${n}`,source:et.AGENT,startClocks:j()})}finally{o=!1}}return!0}}}function Br(t,e,n){return document.readyState===e||document.readyState==="complete"?(n(),{stop:k}):V(t,window,e==="complete"?"load":"DOMContentLoaded",n,{once:!0})}function pl(t,e){return new Promise(n=>{Br(t,e,n)})}let er;const zr=new WeakMap;function mi(t){return er||(er=hl(t)),er}function hl(t){return new R(e=>{const{stop:n}=dt(XMLHttpRequest.prototype,"open",ml),{stop:r}=dt(XMLHttpRequest.prototype,"send",s=>{gl(s,t,e)},{computeHandlingStack:!0}),{stop:o}=dt(XMLHttpRequest.prototype,"abort",_l);return()=>{n(),r(),o()}})}function ml({target:t,parameters:[e,n]}){zr.set(t,{state:"open",method:String(e).toUpperCase(),url:Or(String(n))})}function gl({target:t,parameters:[e],handlingStack:n},r,o){const s=zr.get(t);if(!s)return;const i=s;i.state="start",i.startClocks=j(),i.isAborted=!1,i.xhr=t,i.handlingStack=n,i.requestBody=e;let a=!1;const{stop:c}=dt(t,"onreadystatechange",()=>{t.readyState===XMLHttpRequest.DONE&&u()}),u=()=>{if(d(),c(),a)return;a=!0;const l=s;l.state="complete",l.duration=$(i.startClocks.timeStamp,z()),l.status=t.status,typeof t.response=="string"&&(l.responseBody=t.response),o.notify(Oe(l))},{stop:d}=V(r,t,"loadend",u);o.notify(i)}function _l({target:t}){const e=zr.get(t);e&&(e.isAborted=!0)}async function bl(t,e){const n=t.getReader(),r=[];for(;;){const o=await n.read();if(o.done)break;e.collectStreamBody&&r.push(o.value)}return n.cancel().catch(k),e.collectStreamBody?Fs(r):void 0}let nr;const gi=[];function xn({responseBodyAction:t}={}){return t&&gi.push(t),nr||(nr=yl()),nr}function yl(){return new R(t=>{if(!ct.fetch)return;const{stop:e}=dt(ct,"fetch",n=>vl(n,t),{computeHandlingStack:!0});return e})}function vl({parameters:t,onPostCall:e,handlingStack:n},r){const[o,s]=t;let i=s&&s.method;i===void 0&&o instanceof Request&&(i=o.method);const a=i!==void 0?String(i).toUpperCase():"GET",c=o instanceof Request?o.url:Or(String(o)),u=j(),d={state:"start",init:s,input:o,method:a,startClocks:u,url:c,handlingStack:n};r.notify(d),t[0]=d.input,t[1]=d.init,e(l=>{El(r,l,d).catch(Ot)})}async function El(t,e,n){var r,o;const s=n;s.state="resolve";let i;try{i=await e}catch(c){s.status=0,s.isAborted=((o=(r=s.init)===null||r===void 0?void 0:r.signal)===null||o===void 0?void 0:o.aborted)||c instanceof DOMException&&c.code===DOMException.ABORT_ERR,s.error=c,t.notify(s);return}s.response=i,s.status=i.status,s.responseType=i.type,s.isAborted=!1;const a=gi.reduce((c,u)=>Math.max(c,u(s)),0);if(a!==0){const c=Ru(i);if(c&&c.body)try{const u=await bl(c.body,{collectStreamBody:a===2});s.responseBody=u&&new TextDecoder().decode(u)}catch(u){}}t.notify(s)}function Sl(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(S(t),e);return()=>window.cancelIdleCallback(n)}return wl(t)}const Tl=50;function wl(t){const e=J(),n=W(()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,Tl-(J()-e))})},0);return()=>st(n)}const Al=q,Il=30;function Cl(){const t=[];function e(r){let o;if(r.didTimeout){const s=performance.now();o=()=>Il-(performance.now()-s)}else o=r.timeRemaining.bind(r);for(;o()>0&&t.length;)t.shift()();t.length&&n()}function n(){Sl(e,{timeout:Al})}return{push(r){t.push(r)===1&&n()},stop(){t.length=0}}}let rr={};function _i(t){const e=t.map(n=>(rr[n]||(rr[n]=Rl(n)),rr[n]));return as(...e)}function Rl(t){return new R(e=>{const n=lt[t];return lt[t]=(...r)=>{n.apply(console,r);const o=he("console error");ht(()=>{e.notify(Ol(r,t,o))})},()=>{lt[t]=n}})}function Ol(t,e,n){const r=t.map(o=>xl(o)).join(" ");if(e===F.error){const o=t.find(Dt),s=An({originalError:o,handlingStack:n,startClocks:j(),source:et.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return s.message=r,{api:e,message:r,handlingStack:n,error:s}}return{api:e,message:r,error:void 0,handlingStack:n}}function xl(t){return typeof t=="string"?N(t):Dt(t)?Ds(Ve(t)):me(N(t),void 0,2)}const kl=500;function bi(){const t=[];return{add:o=>{t.push(o)>kl&&t.splice(0,1)},remove:o=>{ci(t,o)},drain:o=>{t.forEach(s=>s(o)),t.length=0}}}function Ll(t){const e=Yt(t)==="object";return e||T.error("Unsupported context:",t),e}function or(t,e,n){const r=b({},t);for(const[o,{required:s,type:i}]of Object.entries(e))i==="string"&&!mo(r[o])&&(r[o]=String(r[o])),s&&mo(r[o])&&T.warn(`The property ${o} of ${n} is required; context will not be sent to the intake.`);return r}function mo(t){return t==null||t===""}function Be(t="",{propertiesConfig:e={}}={}){let n={};const r=new R,o={getContext:()=>Cn(n),setContext:s=>{Ll(s)?n=N(or(s,e,t)):o.clearContext(),r.notify()},setContextProperty:(s,i)=>{n=N(or(H(b({},n),{[s]:i}),e,t)),r.notify()},removeContextProperty:s=>{delete n[s],or(n,e,t),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return o}function P(t,e,n,r){return S((...o)=>(r&&G({feature:r}),t()[e][n](...o)))}function sr(t,e,n){t.changeObservable.subscribe(()=>{const r=t.getContext();n.add(o=>o[e].setContext(r))})}const Nl="_dd_c",Pl=[];function $r(t,e,n,r){const o=Ml(n,r);Pl.push(V(t,window,"storage",({key:u})=>{o===u&&i()})),e.changeObservable.subscribe(a);const s=it(c(),e.getContext());Lt(s)||e.setContext(s);function i(){e.setContext(c())}function a(){localStorage.setItem(o,JSON.stringify(e.getContext()))}function c(){const u=localStorage.getItem(o);return u?JSON.parse(u):{}}}function Ml(t,e){return`${Nl}_${t}_${e}`}function yi(t,e,n){const r=Gr();return e.storeContextsAcrossPages&&$r(e,r,n,4),t.register(0,()=>{const o=r.getContext();return Lt(o)||!o.id?K:{account:o}}),r}function Gr(){return Be("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function vi(t,e,n,r){const o=jr();return e.storeContextsAcrossPages&&$r(e,o,n,2),t.register(0,()=>{const s=o.getContext();return r?{context:s}:s}),o}function jr(){return Be("global context")}function Ei(t,e,n,r){const o=Hr();return e.storeContextsAcrossPages&&$r(e,o,r,1),t.register(0,({eventType:s,startTime:i})=>{const a=o.getContext(),c=n.findTrackedSession(i);return c&&c.anonymousId&&!a.anonymous_id&&e.trackAnonymousUser&&(a.anonymous_id=c.anonymousId),Lt(a)?K:{type:s,usr:a}}),t.register(1,({startTime:s})=>{var i;return{anonymous_id:(i=n.findTrackedSession(s))===null||i===void 0?void 0:i.anonymousId}}),o}function Hr(){return Be("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}const x={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},M={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"},X={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},Wt={FETCH:X.FETCH,XHR:X.XHR},Dl=500;function Si(t=_u){const e=new cs(Dl),n=t().subscribe(r=>{e.notify({type:0,error:r})});return{observable:e,stop:()=>{n.unsubscribe()}}}function Ul(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return}}const I={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},go={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},pt={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change",BF_CACHE:"bf_cache"},Kr={CLICK:"click",CUSTOM:"custom"},we={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"},Le={DURATION:"duration",OPERATION_STEP:"operation_step"};function Vl(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function Fl(t,e,n){function r(i){return!e.wasInPageStateDuringPeriod("frozen",i.startClocks.relative,i.duration)}function o(i){r(i)&&t.notify(12,_o(i))}function s(i,a,c,u){if(!Ue(xt.FEATURE_OPERATION_VITAL))return;const{operationKey:d,context:l,description:f}=c||{},p={name:i,type:Le.OPERATION_STEP,operationKey:d,failureReason:u,stepType:a,startClocks:j(),context:N(l),description:f};t.notify(12,_o(p))}return{addOperationStepVital:s,addDurationVital:o,startDurationVital:(i,a={})=>Ti(n,i,a),stopDurationVital:(i,a={})=>{wi(o,n,i,a)}}}function Ti({vitalsByName:t,vitalsByReference:e},n,r={}){const o=b({name:n,startClocks:j()},r),s={__dd_vital_reference:!0};return t.set(n,o),e.set(s,o),s}function wi(t,{vitalsByName:e,vitalsByReference:n},r,o={}){const s=typeof r=="string"?e.get(r):n.get(r);s&&(t(Bl(s,s.startClocks,o,j())),typeof r=="string"?e.delete(r):n.delete(r))}function Bl(t,e,n,r){var o;return{name:t.name,type:Le.DURATION,startClocks:e,duration:$(e.timeStamp,r.timeStamp),context:it(t.context,n.context),description:(o=n.description)!==null&&o!==void 0?o:t.description}}function _o(t){const{startClocks:e,type:n,name:r,description:o,context:s}=t,i=b({id:Z(),type:n,name:r,description:o},n===Le.DURATION?{duration:A(t.duration)}:{step_type:t.stepType,operation_key:t.operationKey,failure_reason:t.failureReason});return{rawRumEvent:{date:e.timeStamp,vital:i,type:I.VITAL,context:s},startTime:e.relative,duration:n===Le.DURATION?t.duration:void 0,domainContext:{}}}function Ai(t,e,n){if(t)for(const r of t){const o=r[e];o&&o(n)}}const bo=new Map;function Ii(t,e){if(e===100)return!0;if(e===0)return!1;const n=bo.get(e);if(n&&t===n.sessionId)return n.decision;let r;return window.BigInt?r=zl(BigInt(`0x${t.split("-")[4]}`),e):r=wt(e),bo.set(e,{sessionId:t,decision:r}),r}function zl(t,e){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),o=t*n%r;return Number(o)<=e/100*Number(r)}function $l(){return Ri(64)}function Ci(){return Ri(63)}function Ri(t){const e=crypto.getRandomValues(new Uint32Array(2));return t===63&&(e[e.length-1]>>>=1),{toString(n=10){let r=e[1],o=e[0],s="";do{const i=r%n*4294967296+o;r=Math.floor(r/n),o=Math.floor(i/n),s=(i%n).toString(n)+s}while(r||o);return s}}}function Zt(t){return t.toString(16).padStart(16,"0")}function Gl(t){const e=t;return Yt(e)==="object"&&ke(e.match)&&Array.isArray(e.propagatorTypes)}function jl(t){t.status===0&&!t.isAborted&&(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Hl(t,e,n,r){return{clearTracingIfNeeded:jl,traceFetch:o=>yo(t,o,e,n,r,s=>{var i;if(o.input instanceof Request&&!(!((i=o.init)===null||i===void 0)&&i.headers))o.input=new Request(o.input),Object.keys(s).forEach(a=>{o.input.headers.append(a,s[a])});else{o.init=Oe(o.init);const a=[];o.init.headers instanceof Headers?o.init.headers.forEach((c,u)=>{a.push([u,c])}):Array.isArray(o.init.headers)?o.init.headers.forEach(c=>{a.push(c)}):o.init.headers&&Object.keys(o.init.headers).forEach(c=>{a.push([c,o.init.headers[c]])}),o.init.headers=a.concat(xr(s))}}),traceXhr:(o,s)=>yo(t,o,e,n,r,i=>{Object.keys(i).forEach(a=>{s.setRequestHeader(a,i[a])})})}}function yo(t,e,n,r,o,s){const i=n.findTrackedSession();if(!i)return;const a=t.allowedTracingUrls.find(d=>wn([d.match],e.url,!0));if(!a)return;const c=Ii(i.id,t.traceSampleRate);(c||t.traceContextInjection===yr.ALL)&&(e.traceSampled=c,e.traceId=$l(),e.spanId=Ci(),s(Kl(e.traceId,e.spanId,e.traceSampled,i.id,a.propagatorTypes,r,o,t)))}function Kl(t,e,n,r,o,s,i,a){const c={};if(o.forEach(u=>{switch(u){case"datadog":{Object.assign(c,{"x-datadog-origin":"rum","x-datadog-parent-id":e.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":t.toString()});break}case"tracecontext":{Object.assign(c,{traceparent:`00-0000000000000000${Zt(t)}-${Zt(e)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(c,{b3:`${Zt(t)}-${Zt(e)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(c,{"X-B3-TraceId":Zt(t),"X-B3-SpanId":Zt(e),"X-B3-Sampled":n?"1":"0"});break}}}),a.propagateTraceBaggage){const u={"session.id":r},d=s.getContext().id;typeof d=="string"&&(u["user.id"]=d);const l=i.getContext().id;typeof l=="string"&&(u["account.id"]=l);const f=Object.entries(u).map(([p,m])=>`${p}=${encodeURIComponent(m)}`).join(",");f&&(c.baggage=f)}return c}const Oi=["tracecontext","datadog"];function Wl(t,e){var n,r,o,s,i,a,c;if(t.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(t.trackFeatureFlagsForEvents)&&T.warn("trackFeatureFlagsForEvents should be an array"),!t.applicationId){T.error("Application ID is not configured, no RUM data will be collected.");return}if(!oe(t.sessionReplaySampleRate,"Session Replay")||!oe(t.traceSampleRate,"Trace"))return;if(t.excludedActivityUrls!==void 0&&!Array.isArray(t.excludedActivityUrls)){T.error("Excluded Activity Urls should be an array");return}const u=ql(t);if(!u)return;const d=ks(t,e),l=Xl(t);if(!d)return;const f=(n=t.sessionReplaySampleRate)!==null&&n!==void 0?n:0;return b({applicationId:t.applicationId,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:f,startSessionReplayRecordingManually:t.startSessionReplayRecordingManually!==void 0?!!t.startSessionReplayRecordingManually:f===0,traceSampleRate:(r=t.traceSampleRate)!==null&&r!==void 0?r:100,rulePsr:Me(t.traceSampleRate)?t.traceSampleRate/100:void 0,allowedTracingUrls:u,excludedActivityUrls:(o=t.excludedActivityUrls)!==null&&o!==void 0?o:[],workerUrl:t.workerUrl,compressIntakeRequests:!!t.compressIntakeRequests,trackUserInteractions:!!(!((s=t.trackUserInteractions)!==null&&s!==void 0)||s),trackViewsManually:!!t.trackViewsManually,trackResources:!!(!((i=t.trackResources)!==null&&i!==void 0)||i),trackLongTasks:!!(!((a=t.trackLongTasks)!==null&&a!==void 0)||a),trackBfcacheViews:!!t.trackBfcacheViews,trackEarlyRequests:!!t.trackEarlyRequests,subdomain:t.subdomain,defaultPrivacyLevel:cn(re,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:re.MASK,enablePrivacyForActionName:!!t.enablePrivacyForActionName,traceContextInjection:cn(yr,t.traceContextInjection)?t.traceContextInjection:yr.SAMPLED,plugins:t.plugins||[],trackFeatureFlagsForEvents:t.trackFeatureFlagsForEvents||[],profilingSampleRate:(c=t.profilingSampleRate)!==null&&c!==void 0?c:0,propagateTraceBaggage:!!t.propagateTraceBaggage,allowedGraphQlUrls:l},d)}function ql(t){if(t.allowedTracingUrls===void 0)return[];if(!Array.isArray(t.allowedTracingUrls)){T.error("Allowed Tracing URLs should be an array");return}if(t.allowedTracingUrls.length!==0&&t.service===void 0){T.error("Service needs to be configured when tracing is enabled");return}const e=[];return t.allowedTracingUrls.forEach(n=>{ke(n)?e.push({match:n,propagatorTypes:Oi}):Gl(n)?e.push(n):T.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),e}function Yl(t){const e=new Set;return Kt(t.allowedTracingUrls)&&t.allowedTracingUrls.forEach(n=>{ke(n)?Oi.forEach(r=>e.add(r)):Yt(n)==="object"&&Array.isArray(n.propagatorTypes)&&n.propagatorTypes.forEach(r=>e.add(r))}),Array.from(e)}function Xl(t){if(!t.allowedGraphQlUrls)return[];if(!Array.isArray(t.allowedGraphQlUrls))return T.warn("allowedGraphQlUrls should be an array"),[];const e=[];return t.allowedGraphQlUrls.forEach(n=>{ke(n)?e.push({match:n,trackPayload:!1,trackResponseErrors:!1}):n&&typeof n=="object"&&"match"in n&&ke(n.match)&&e.push({match:n.match,trackPayload:!!n.trackPayload,trackResponseErrors:!!n.trackResponseErrors})}),e}function Jl(t){return Kt(t)&&t.some(e=>typeof e=="object"&&"trackPayload"in e?!!e.trackPayload:!1)}function Zl(t){return Kt(t)&&t.some(e=>typeof e=="object"&&"trackResponseErrors"in e?!!e.trackResponseErrors:!1)}function Ql(t){var e;const n=Ls(t);return b({session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,trace_context_injection:t.traceContextInjection,propagate_trace_baggage:t.propagateTraceBaggage,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:Kt(t.allowedTracingUrls),use_allowed_graph_ql_urls:Kt(t.allowedGraphQlUrls),use_track_graph_ql_payload:Jl(t.allowedGraphQlUrls),use_track_graph_ql_response_errors:Zl(t.allowedGraphQlUrls),selected_tracing_propagators:Yl(t),default_privacy_level:t.defaultPrivacyLevel,enable_privacy_for_action_name:t.enablePrivacyForActionName,use_excluded_activity_urls:Kt(t.excludedActivityUrls),use_worker_url:!!t.workerUrl,compress_intake_requests:t.compressIntakeRequests,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks,track_bfcache_views:t.trackBfcacheViews,track_early_requests:t.trackEarlyRequests,plugins:(e=t.plugins)===null||e===void 0?void 0:e.map(r=>{var o;return b({name:r.name},(o=r.getConfigurationTelemetry)===null||o===void 0?void 0:o.call(r))}),track_feature_flags_for_events:t.trackFeatureFlagsForEvents,remote_configuration_id:t.remoteConfigurationId,profiling_sample_rate:t.profilingSampleRate,use_remote_configuration_proxy:!!t.remoteConfigurationProxy},n)}function td(t){const e=[];let n=0,r;const o={quote:void 0,escapeSequence:void 0};let s="";for(const i of t){if(r=vo[n].find(a=>id[a](i,o)),!r)return[];if(o.escapeSequence!==void 0&&r!==12){if(!ud(o.escapeSequence))return[];s+=dd(o.escapeSequence),o.escapeSequence=void 0}ad.includes(r)?s+=i:cd.includes(r)&&s!==""?(e.push(s),s=""):r===12?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${i}`:i:r===8?o.quote=i:r===9&&(o.quote=void 0),n=r}return vo[n].includes(1)?(s!==""&&e.push(s),e):[]}const ed=/[a-zA-Z_$]/,nd=/[a-zA-Z0-9_$]/,rd=/[0-9]/,od=/[a-fA-F0-9]/,sd=`'"`,id={0:()=>!1,1:()=>!1,2:t=>ed.test(t),3:t=>nd.test(t),4:t=>t===".",5:t=>t==="[",6:t=>t==="]",7:t=>rd.test(t),8:t=>sd.includes(t),9:(t,e)=>t===e.quote,10:()=>!0,11:t=>t==="\\",12:(t,e)=>e.escapeSequence===void 0?`${e.quote}/\\bfnrtu`.includes(t):e.escapeSequence.startsWith("u")&&e.escapeSequence.length<5?od.test(t):!1},vo={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},ad=[2,3,7,10],cd=[4,5,6];function ud(t){return`"'/\\bfnrt`.includes(t)||t.startsWith("u")&&t.length===5}const ld={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:`
9
- `,r:"\r",t:" "};function dd(t){return t.startsWith("u")?String.fromCharCode(parseInt(t.slice(1),16)):ld[t]}const fd="v1",pd=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function hd(t,e){let n;const r=gd(),o=await vd(t);return o.ok?(r.increment("fetch","success"),n=md(t,o.value,e,r)):(r.increment("fetch","failure"),T.error(o.error)),Rn("remote configuration metrics",{metrics:r.get()}),n}function md(t,e,n,r){const o=b({},t);return pd.forEach(f=>{f in e&&(o[f]=s(e[f]))}),Object.keys(n).forEach(f=>{e[f]!==void 0&&i(n[f],e[f])}),o;function s(f){if(Array.isArray(f))return f.map(s);if(_d(f)){if(bd(f)){const p=f.rcSerializedType;switch(p){case"string":return f.value;case"regex":return xi(f.value);case"dynamic":return a(f);default:T.error(`Unsupported remote configuration: "rcSerializedType": "${p}"`);return}}return ss(f,s)}return f}function i(f,p){p.forEach(({key:m,value:h})=>{f.setContextProperty(m,s(h))})}function a(f){const p=f.strategy;let m;switch(p){case"cookie":m=c(f);break;case"dom":m=u(f);break;case"js":m=l(f);break;default:T.error(`Unsupported remote configuration: "strategy": "${p}"`);return}const h=f.extractor;return h!==void 0&&typeof m=="string"?yd(h,m):m}function c({name:f}){const p=Sn(f);return r.increment("cookie",p!==void 0?"success":"missing"),p}function u({selector:f,attribute:p}){let m;try{m=document.querySelector(f)}catch(_){T.error(`Invalid selector in the remote configuration: '${f}'`),r.increment("dom","failure");return}if(!m){r.increment("dom","missing");return}if(d(m,p)){T.error(`Forbidden element selected by the remote configuration: '${f}'`),r.increment("dom","failure");return}const h=p!==void 0?m.getAttribute(p):m.textContent;if(h===null){r.increment("dom","missing");return}return r.increment("dom","success"),h}function d(f,p){return f.getAttribute("type")==="password"&&p==="value"}function l({path:f}){let p=window;const m=td(f);if(m.length===0){T.error(`Invalid JSON path in the remote configuration: '${f}'`),r.increment("js","failure");return}for(const h of m){if(!(h in p)){r.increment("js","missing");return}try{p=p[h]}catch(_){T.error(`Error accessing: '${f}'`,_),r.increment("js","failure");return}}return r.increment("js","success"),p}}function gd(){const t={fetch:{}};return{get:()=>t,increment:(e,n)=>{t[e]||(t[e]={}),t[e][n]||(t[e][n]=0),t[e][n]=t[e][n]+1}}}function _d(t){return typeof t=="object"&&t!==null}function bd(t){return"rcSerializedType"in t}function xi(t){try{return new RegExp(t)}catch(e){T.error(`Invalid regex in the remote configuration: '${t}'`)}}function yd(t,e){const n=xi(t.value);if(n===void 0)return;const r=n.exec(e);if(r===null)return;const[o,s]=r;return s||o}async function vd(t){let e;try{e=await fetch(Ed(t))}catch(r){e=void 0}if(!e||!e.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const n=await e.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:new Error("No remote configuration for RUM.")}}function Ed(t){return t.remoteConfigurationProxy?t.remoteConfigurationProxy:`https://sdk-configuration.${Os("rum",t)}/${fd}/${encodeURIComponent(t.remoteConfigurationId)}.json`}function Sd({ignoreInitIfSyntheticsWillInjectRum:t=!0,startDeflateWorker:e},n,r,o){const s=bi(),i=jr();ir(i,x.globalContext,s);const a=Hr();ir(a,x.userContext,s);const c=Gr();ir(c,x.accountContext,s);let u,d,l,f;const p=n.observable.subscribe(h),m={};function h(){if(!l||!f||!n.isGranted())return;p.unsubscribe();let y;if(f.trackViewsManually){if(!u)return;s.remove(u.callback),y=u.options}const v=o(f,d,y);s.drain(v)}function _(y,v){const g=gt();if(g&&(y=Td(y)),l=y,ai(Ql(y)),f){In("DD_RUM",y);return}const O=Wl(y,v);if(O){if(!g&&!O.sessionStoreStrategyType){T.warn("No storage available for session. We will not send any data.");return}O.compressIntakeRequests&&!g&&e&&(d=e(O,"Datadog RUM",k),!d)||(f=O,xn().subscribe(k),n.tryToInit(O.trackingConsent),h())}}const E=y=>{s.add(v=>v.addDurationVital(y))};return{init(y,v,g){if(!y){T.error("Missing configuration");return}Ns(y.enableExperimentalFeatures),l=y,!(t&&On())&&(Ai(y.plugins,"onInit",{initConfiguration:y,publicApi:v}),y.remoteConfigurationId?hd(y,{user:a,context:i}).then(O=>{O&&_(O,g)}).catch(Ot):_(y,g))},get initConfiguration(){return l},getInternalContext:k,stopSession:k,addTiming(y,v=z()){s.add(g=>g.addTiming(y,v))},startView(y,v=j()){const g=O=>{O.startView(y,v)};s.add(g),u||(u={options:y,callback:g},h())},setViewName(y){s.add(v=>v.setViewName(y))},setViewContext(y){s.add(v=>v.setViewContext(y))},setViewContextProperty(y,v){s.add(g=>g.setViewContextProperty(y,v))},getViewContext:()=>m,globalContext:i,userContext:a,accountContext:c,addAction(y){s.add(v=>v.addAction(y))},addError(y){s.add(v=>v.addError(y))},addFeatureFlagEvaluation(y,v){s.add(g=>g.addFeatureFlagEvaluation(y,v))},startDurationVital(y,v){return Ti(r,y,v)},stopDurationVital(y,v){wi(E,r,y,v)},addDurationVital:E,addOperationStepVital:(y,v,g,O)=>{s.add(Ee=>Ee.addOperationStepVital(N(y),v,N(g),N(O)))}}}function Td(t){var e,n;return H(b({},t),{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(e=t.defaultPrivacyLevel)!==null&&e!==void 0?e:(n=be())===null||n===void 0?void 0:n.getPrivacyLevel()})}function ir(t,e,n){t.changeObservable.subscribe(()=>{const r=t.getContext();n.add(o=>o[e].setContext(r))})}function wd(t,e,n,r={}){const o=Cs(),s=Vl(),i=Si().observable;let a=Sd(r,o,s,(l,f,p)=>{const m=f&&r.createDeflateEncoder?_=>r.createDeflateEncoder(l,f,_):Fr,h=t(l,e,n,p,m,o,s,i,r.sdkName);return e.onRumStart(h.lifeCycle,l,h.session,h.viewHistory,f,h.telemetry),n.onRumStart(h.lifeCycle,h.hooks,l,h.session,h.viewHistory,h.longTaskContexts,m),a=Ad(a,h),Ai(l.plugins,"onRumStart",{strategy:a,addEvent:h.addEvent}),h});const c=()=>a,u=S(l=>{const f=typeof l=="object"?l:{name:l};a.startView(f),G({feature:"start-view"})}),d=$s({init:l=>{const f=new Error().stack;ht(()=>a.init(l,d,f))},setTrackingConsent:S(l=>{o.update(l),G({feature:"set-tracking-consent",tracking_consent:l})}),setViewName:S(l=>{a.setViewName(l),G({feature:"set-view-name"})}),setViewContext:S(l=>{a.setViewContext(l),G({feature:"set-view-context"})}),setViewContextProperty:S((l,f)=>{a.setViewContextProperty(l,f),G({feature:"set-view-context-property"})}),getViewContext:S(()=>(G({feature:"set-view-context-property"}),a.getViewContext())),getInternalContext:S(l=>a.getInternalContext(l)),getInitConfiguration:S(()=>Cn(a.initConfiguration)),addAction:(l,f)=>{const p=he("action");ht(()=>{a.addAction({name:N(l),context:N(f),startClocks:j(),type:Kr.CUSTOM,handlingStack:p}),G({feature:"add-action"})})},addError:(l,f)=>{const p=he("error");ht(()=>{a.addError({error:l,handlingStack:p,context:N(f),startClocks:j()}),G({feature:"add-error"})})},addTiming:S((l,f)=>{a.addTiming(N(l),f)}),setGlobalContext:P(c,x.globalContext,M.setContext,"set-global-context"),getGlobalContext:P(c,x.globalContext,M.getContext,"get-global-context"),setGlobalContextProperty:P(c,x.globalContext,M.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:P(c,x.globalContext,M.removeContextProperty,"remove-global-context-property"),clearGlobalContext:P(c,x.globalContext,M.clearContext,"clear-global-context"),setUser:P(c,x.userContext,M.setContext,"set-user"),getUser:P(c,x.userContext,M.getContext,"get-user"),setUserProperty:P(c,x.userContext,M.setContextProperty,"set-user-property"),removeUserProperty:P(c,x.userContext,M.removeContextProperty,"remove-user-property"),clearUser:P(c,x.userContext,M.clearContext,"clear-user"),setAccount:P(c,x.accountContext,M.setContext,"set-account"),getAccount:P(c,x.accountContext,M.getContext,"get-account"),setAccountProperty:P(c,x.accountContext,M.setContextProperty,"set-account-property"),removeAccountProperty:P(c,x.accountContext,M.removeContextProperty,"remove-account-property"),clearAccount:P(c,x.accountContext,M.clearContext,"clear-account"),startView:u,stopSession:S(()=>{a.stopSession(),G({feature:"stop-session"})}),addFeatureFlagEvaluation:S((l,f)=>{a.addFeatureFlagEvaluation(N(l),N(f)),G({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:S(()=>e.getSessionReplayLink()),startSessionReplayRecording:S(l=>{e.start(l),G({feature:"start-session-replay-recording",force:l&&l.force})}),stopSessionReplayRecording:S(()=>e.stop()),addDurationVital:S((l,f)=>{G({feature:"add-duration-vital"}),a.addDurationVital({name:N(l),type:Le.DURATION,startClocks:Ba(f.startTime),duration:f.duration,context:N(f&&f.context),description:N(f&&f.description)})}),startDurationVital:S((l,f)=>(G({feature:"start-duration-vital"}),a.startDurationVital(N(l),{context:N(f&&f.context),description:N(f&&f.description)}))),stopDurationVital:S((l,f)=>{G({feature:"stop-duration-vital"}),a.stopDurationVital(typeof l=="string"?N(l):l,{context:N(f&&f.context),description:N(f&&f.description)})}),startFeatureOperation:S((l,f)=>{G({feature:"add-operation-step-vital",action_type:"start"}),a.addOperationStepVital(l,"start",f)}),succeedFeatureOperation:S((l,f)=>{G({feature:"add-operation-step-vital",action_type:"succeed"}),a.addOperationStepVital(l,"end",f)}),failFeatureOperation:S((l,f,p)=>{G({feature:"add-operation-step-vital",action_type:"fail"}),a.addOperationStepVital(l,"end",p,f)})});return d}function Ad(t,e){return b({init:n=>{In("DD_RUM",n)},initConfiguration:t.initConfiguration},e)}function Id(){const t=Cd();return new R(e=>{if(!t)return;const n=new t(S(r=>e.notify(r)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Cd(){let t;const e=window;if(e.Zone&&(t=Rt(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){const n=new e.MutationObserver(k),r=Rt(n,"originalInstance");t=r&&r.constructor}return t||(t=e.MutationObserver),t}function Rd(){const t=new R,{stop:e}=dt(window,"open",()=>t.notify());return{observable:t,stop:e}}function Od(t,e,n,r,o){return{get:s=>{const i=n.findView(s),a=o.findUrl(s),c=e.findTrackedSession(s);if(c&&i&&a){const u=r.findActionId(s);return{application_id:t,session_id:c.id,user_action:u?{id:u}:void 0,view:{id:i.id,name:i.name,referrer:a.referrer,url:a.url}}}}}}const xd=hi,kd=Pt;function Ld(t){const e=Xt({expireDelay:kd});t.subscribe(1,r=>{e.add(n(r),r.startClocks.relative)}),t.subscribe(6,({endClocks:r})=>{e.closeActive(r.relative)}),t.subscribe(3,r=>{const o=e.find(r.startClocks.relative);o&&(r.name&&(o.name=r.name),r.context&&(o.context=r.context),o.sessionIsActive=r.sessionIsActive)}),t.subscribe(10,()=>{e.reset()});function n(r){return{service:r.service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks}}return{findView:r=>e.find(r),stop:()=>{e.stop()}}}const ki="initial_document",Nd=[[X.DOCUMENT,t=>ki===t],[X.XHR,t=>t==="xmlhttprequest"],[X.FETCH,t=>t==="fetch"],[X.BEACON,t=>t==="beacon"],[X.CSS,(t,e)=>/\.css$/i.test(e)],[X.JS,(t,e)=>/\.js$/i.test(e)],[X.IMAGE,(t,e)=>["image","img","icon"].includes(t)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)!==null],[X.FONT,(t,e)=>/\.(woff|eot|woff2|ttf)$/i.exec(e)!==null],[X.MEDIA,(t,e)=>["audio","video"].includes(t)||/\.(mp3|mp4)$/i.exec(e)!==null]];function Pd(t){const e=t.name;if(!Ya(e))return X.OTHER;const n=Xa(e);for(const[r,o]of Nd)if(o(t.initiatorType,n))return r;return X.OTHER}function Eo(...t){for(let e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}function Li(t){return t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch"}function Md(t){const{duration:e,startTime:n,responseEnd:r}=t;return e===0&&n<r?$(n,r):e}function Dd(t){if(!Pi(t))return;const{startTime:e,fetchStart:n,workerStart:r,redirectStart:o,redirectEnd:s,domainLookupStart:i,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:d,requestStart:l,responseStart:f,responseEnd:p}=t,m={download:Vt(e,f,p),first_byte:Vt(e,l,f)};return 0<r&&r<n&&(m.worker=Vt(e,r,n)),n<d&&(m.connect=Vt(e,c,d),c<=u&&u<=d&&(m.ssl=Vt(e,u,d))),n<a&&(m.dns=Vt(e,i,a)),e<s&&(m.redirect=Vt(e,o,s)),m}function Ni(t){return t.duration>=0}function Pi(t){const e=Eo(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd),n=Ud(t)?Eo(t.startTime,t.redirectStart,t.redirectEnd,t.fetchStart):!0;return e&&n}function Ud(t){return t.redirectEnd>t.startTime}function Vt(t,e,n){if(t<=e&&e<=n)return{duration:A($(e,n)),start:A($(t,e))}}function Vd(t){return t.nextHopProtocol===""?void 0:t.nextHopProtocol}function Fd(t){return t.deliveryType===""?"other":t.deliveryType}function Bd(t){if(t.startTime<t.responseStart){const{encodedBodySize:e,decodedBodySize:n,transferSize:r}=t;return{size:n,encoded_body_size:e,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function Wr(t){return t&&(!xs(t)||Ue(xt.TRACK_INTAKE_REQUESTS))}const zd=/data:(.+)?(;base64)?,/g,$d=24e3;function Gd(t,e=$d){if(t.length<=e||!t.startsWith("data:"))return t;const n=t.substring(0,100).match(zd);return n?`${n[0]}[...]`:t}const jd=32*Mt;function Hd(t,e){const n=Wd(t.requestBody,e.trackPayload);if(n){if(e.trackResponseErrors&&t.responseBody){const r=Kd(t.responseBody);r&&(n.error_count=r.length,n.errors=r)}return n}}function Kd(t){let e;try{e=JSON.parse(t)}catch(o){return}if(!e||typeof e!="object")return;const n=e;return Kt(n.errors)?n.errors.map(o=>{var s;return{message:o.message,path:o.path,locations:o.locations,code:(s=o.extensions)===null||s===void 0?void 0:s.code}}):void 0}function Mi(t,e){return e.allowedGraphQlUrls.find(n=>wn([n.match],t))}function Wd(t,e=!1){if(!t||typeof t!="string")return;let n;try{n=JSON.parse(t)}catch(a){return}if(!n)return;let r,o;if(n.query){const a=n.query.trim();r=qd(a),e&&(o=yn(a,jd,"..."))}const s=n.operationName;let i;return n.variables&&(i=JSON.stringify(n.variables)),{operationType:r,operationName:s,variables:i,payload:o}}function qd(t){var e;return(e=t.match(/^\s*(query|mutation|subscription)\b/i))===null||e===void 0?void 0:e[1]}let So=1;function Yd(t,e,n,r,o){const s=Hl(e,n,r,o);Xd(t,e,s),Jd(t,e,s)}function Xd(t,e,n){const r=mi(e).subscribe(o=>{const s=o;if(Wr(s.url))switch(s.state){case"start":n.traceXhr(s,s.xhr),s.requestIndex=Di(),t.notify(7,{requestIndex:s.requestIndex,url:s.url});break;case"complete":n.clearTracingIfNeeded(s),t.notify(8,{duration:s.duration,method:s.method,requestIndex:s.requestIndex,spanId:s.spanId,startClocks:s.startClocks,status:s.status,traceId:s.traceId,traceSampled:s.traceSampled,type:Wt.XHR,url:s.url,xhr:s.xhr,isAborted:s.isAborted,handlingStack:s.handlingStack,requestBody:s.requestBody,responseBody:s.responseBody});break}});return{stop:()=>r.unsubscribe()}}function Jd(t,e,n){const r=xn({responseBodyAction:o=>{var s;return!((s=Mi(o.url,e))===null||s===void 0)&&s.trackResponseErrors?2:1}}).subscribe(o=>{var s;const i=o;if(Wr(i.url))switch(i.state){case"start":n.traceFetch(i),i.requestIndex=Di(),t.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":n.clearTracingIfNeeded(i),t.notify(8,{duration:$(i.startClocks.timeStamp,z()),method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:Wt.FETCH,url:i.url,response:i.response,init:i.init,input:i.input,isAborted:i.isAborted,handlingStack:i.handlingStack,requestBody:(s=i.init)===null||s===void 0?void 0:s.body,responseBody:i.responseBody});break}});return{stop:()=>r.unsubscribe()}}function Di(){const t=So;return So+=1,t}function Ui(t){return Me(t)&&t<0?void 0:t}function Vi({lifeCycle:t,isChildEvent:e,onChange:n=k}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(13,s=>{var i;if(!(s.type==="view"||s.type==="vital"||!e(s)))switch(s.type){case I.ERROR:r.errorCount+=1,n();break;case I.ACTION:r.actionCount+=1,s.action.frustration&&(r.frustrationCount+=s.action.frustration.type.length),n();break;case I.LONG_TASK:r.longTaskCount+=1,n();break;case I.RESOURCE:!((i=s._dd)===null||i===void 0)&&i.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{o.unsubscribe()},eventCounts:r}}function Zd(t,e){const n=J();let r=!1;const{stop:o}=kt(t,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const c={entryType:"first-input",processingStart:nt(),processingEnd:nt(),startTime:a.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};a.type==="pointerdown"?s(t,c):i(c)},{passive:!0,capture:!0});return{stop:o};function s(a,c){kt(a,window,["pointerup","pointercancel"],u=>{u.type==="pointerup"&&i(c)},{once:!0})}function i(a){if(!r){r=!0,o();const c=a.processingStart-a.startTime;c>=0&&c<J()-n&&e(a)}}}var L;(function(t){t.EVENT="event",t.FIRST_INPUT="first-input",t.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",t.LAYOUT_SHIFT="layout-shift",t.LONG_TASK="longtask",t.LONG_ANIMATION_FRAME="long-animation-frame",t.NAVIGATION="navigation",t.PAINT="paint",t.RESOURCE="resource",t.VISIBILITY_STATE="visibility-state"})(L||(L={}));function _t(t,e){return new R(n=>{if(!window.PerformanceObserver)return;const r=c=>{const u=ef(c);u.length>0&&n.notify(u)};let o,s=!0;const i=new PerformanceObserver(S(c=>{s?o=W(()=>r(c.getEntries())):r(c.getEntries())}));try{i.observe(e)}catch(c){if([L.RESOURCE,L.NAVIGATION,L.LONG_TASK,L.PAINT].includes(e.type)){e.buffered&&(o=W(()=>r(performance.getEntriesByType(e.type))));try{i.observe({entryTypes:[e.type]})}catch(d){return}}}s=!1,Qd(t);let a;return!Jt(L.FIRST_INPUT)&&e.type===L.FIRST_INPUT&&({stop:a}=Zd(t,c=>{r([c])})),()=>{i.disconnect(),a&&a(),st(o)}})}let Ae;function Qd(t){return!Ae&&tf()&&"addEventListener"in performance&&(Ae=V(t,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{Ae==null||Ae.stop()}}function tf(){return window.performance!==void 0&&"getEntries"in performance}function Jt(t){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(t)}function ef(t){return t.filter(e=>!nf(e))}function nf(t){return t.entryType===L.RESOURCE&&(!Wr(t.name)||!Ni(t))}function Sr(t){return t.nodeType===Node.TEXT_NODE}function rf(t){return t.nodeType===Node.COMMENT_NODE}function bt(t){return t.nodeType===Node.ELEMENT_NODE}function Fi(t){return bt(t)&&!!t.shadowRoot}function of(t){const e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&bt(e.host)}function r_(t){return t.childNodes.length>0||Fi(t)}function o_(t,e){let n=t.firstChild;for(;n;)e(n),n=n.nextSibling;Fi(t)&&e(t.shadowRoot)}function sf(t){return of(t)?t.host:t.parentNode}const Bi=100,af=100,To="data-dd-excluded-activity-mutations";function qr(t,e,n,r,o,s){const i=uf(t,e,n,r);return cf(i,o,s)}function cf(t,e,n){let r,o=!1;const s=W(S(()=>u({hadActivity:!1})),Bi),i=n!==void 0?W(S(()=>u({hadActivity:!0,end:z()})),n):void 0,a=t.subscribe(({isBusy:d})=>{st(s),st(r);const l=z();d||(r=W(S(()=>u({hadActivity:!0,end:l})),af))}),c=()=>{o=!0,st(s),st(r),st(i),a.unsubscribe()};function u(d){o||(c(),e(d))}return{stop:c}}function uf(t,e,n,r){return new R(o=>{const s=[];let i,a=0;return s.push(e.subscribe(u=>{u.every(lf)||c()}),n.subscribe(c),_t(r,{type:L.RESOURCE}).subscribe(u=>{u.some(d=>!ar(r,d.name))&&c()}),t.subscribe(7,u=>{ar(r,u.url)||(i===void 0&&(i=u.requestIndex),a+=1,c())}),t.subscribe(8,u=>{ar(r,u.url)||i===void 0||u.requestIndex<i||(a-=1,c())})),()=>{s.forEach(u=>u.unsubscribe())};function c(){o.notify({isBusy:a>0})}})}function ar(t,e){return wn(t.excludedActivityUrls,e)}function lf(t){const e=t.type==="characterData"?t.target.parentElement:t.target;return!!(e&&bt(e)&&e.matches(`[${To}], [${To}] *`))}const kn="data-dd-action-name",zi="Masked Element",$i=[kn,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],df=[ji,pf],ff=[ji,hf,mf];function ze(t,e){if(!t.isConnected)return;let n,r=t;for(;r&&r.nodeName!=="HTML";){const o=wo(r,df,_f,e,n);if(o)return o;n=wo(r,ff,bf,e,n)||Ln(gf(r),n),r=r.parentElement}return n}function Gi(t){return/[0-9]/.test(t)}function pf(t){if(t.id&&!Gi(t.id))return`#${CSS.escape(t.id)}`}function hf(t){if(t.tagName==="BODY")return;const e=t.classList;for(let n=0;n<e.length;n+=1){const r=e[n];if(!Gi(r))return`${CSS.escape(t.tagName)}.${CSS.escape(r)}`}}function mf(t){return CSS.escape(t.tagName)}function ji(t,e){if(e){const r=n(e);if(r)return r}for(const r of $i){const o=n(r);if(o)return o}function n(r){if(t.hasAttribute(r))return`${CSS.escape(t.tagName)}[${r}="${CSS.escape(t.getAttribute(r))}"]`}}function gf(t){let e=t.parentElement.firstElementChild,n=1;for(;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;return`${CSS.escape(t.tagName)}:nth-of-type(${n})`}function wo(t,e,n,r,o){for(const s of e){const i=s(t,r);if(i&&n(t,i,o))return Ln(i,o)}}function _f(t,e,n){return t.ownerDocument.querySelectorAll(Ln(e,n)).length===1}function bf(t,e,n){let r;if(n===void 0)r=i=>i.matches(e);else{const i=Ln(`${e}:scope`,n);r=a=>a.querySelector(i)!==null}let s=t.parentElement.firstElementChild;for(;s;){if(s!==t&&r(s))return!1;s=s.nextElementSibling}return!0}function Ln(t,e){return e?`${t}>${e}`:t}const C={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:re.ALLOW,MASK:re.MASK,MASK_USER_INPUT:re.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:re.MASK_UNLESS_ALLOWLISTED},Hi="data-dd-privacy",s_="hidden",yf="dd-privacy-",cr="***",i_="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",vf={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},Ef="x";function jt(t){return`[${Hi}="${t}"], .${yf}${t}`}function Nn(t,e,n){if(n&&n.has(t))return n.get(t);const r=sf(t),o=r?Nn(r,e,n):e,s=Tf(t),i=Sf(s,o);return n&&n.set(t,i),i}function Sf(t,e){switch(e){case C.HIDDEN:case C.IGNORE:return e}switch(t){case C.ALLOW:case C.MASK:case C.MASK_USER_INPUT:case C.MASK_UNLESS_ALLOWLISTED:case C.HIDDEN:case C.IGNORE:return t;default:return e}}function Tf(t){if(bt(t)){if(t.tagName==="BASE")return C.ALLOW;if(t.tagName==="INPUT"){const e=t;if(e.type==="password"||e.type==="email"||e.type==="tel"||e.type==="hidden")return C.MASK;const n=e.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return C.MASK}if(t.matches(jt(C.HIDDEN)))return C.HIDDEN;if(t.matches(jt(C.MASK)))return C.MASK;if(t.matches(jt(C.MASK_UNLESS_ALLOWLISTED)))return C.MASK_UNLESS_ALLOWLISTED;if(t.matches(jt(C.MASK_USER_INPUT)))return C.MASK_USER_INPUT;if(t.matches(jt(C.ALLOW)))return C.ALLOW;if(Af(t))return C.IGNORE}}function Ki(t,e){switch(e){case C.MASK:case C.HIDDEN:case C.IGNORE:return!0;case C.MASK_UNLESS_ALLOWLISTED:return Sr(t)?Je(t.parentNode)?!0:!qi(t.textContent||""):Je(t);case C.MASK_USER_INPUT:return Sr(t)?Je(t.parentNode):Je(t);default:return!1}}function wf(t,e,n,r,o){if(r!==C.MASK&&r!==C.MASK_UNLESS_ALLOWLISTED||e===Hi||$i.includes(e)||e===o.actionNameAttribute)return!1;switch(e){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return!!(t==="A"&&e==="href"||t==="IFRAME"&&e==="srcdoc"||n&&e.startsWith("data-")||(t==="IMG"||t==="SOURCE")&&(e==="src"||e==="srcset"))}function Je(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;const e=t;if(e.tagName==="INPUT")switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!vf[e.tagName]}const Wi=t=>t.replace(/\S/g,Ef);function a_(t,e){var n;const r=(n=t.parentElement)===null||n===void 0?void 0:n.tagName;let o=t.textContent||"";if(r==="HEAD"&&!o.trim())return;const i=e;if(r==="SCRIPT")o=cr;else if(i===C.HIDDEN)o=cr;else if(Ki(t,i))if(r==="DATALIST"||r==="SELECT"||r==="OPTGROUP"){if(!o.trim())return}else r==="OPTION"?o=cr:i===C.MASK_UNLESS_ALLOWLISTED?o=Yi(o):o=Wi(o);return o}function Af(t){if(t.nodeName==="SCRIPT")return!0;if(t.nodeName==="LINK"){const n=e("rel");return/preload|prefetch/i.test(n)&&e("as")==="script"||n==="shortcut icon"||n==="icon"}if(t.nodeName==="META"){const n=e("name"),r=e("rel"),o=e("property");return/^msapplication-tile(image|color)$/.test(n)||n==="application-name"||r==="icon"||r==="apple-touch-icon"||r==="shortcut icon"||n==="keywords"||n==="description"||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(n)||n==="pinterest"||n==="robots"||n==="googlebot"||n==="bingbot"||t.hasAttribute("http-equiv")||n==="author"||n==="generator"||n==="framework"||n==="publisher"||n==="progid"||/^article:/.test(o)||/^product:/.test(o)||n==="google-site-verification"||n==="yandex-verification"||n==="csrf-token"||n==="p:domain_verify"||n==="verify-v1"||n==="verification"||n==="shopify-checkout-api-token"}function e(n){return(t.getAttribute(n)||"").toLowerCase()}return!1}function qi(t){var e;return!t||!t.trim()?!0:((e=window.$DD_ALLOW)===null||e===void 0?void 0:e.has(t.toLocaleLowerCase()))||!1}function Yi(t,e){return qi(t)?t:e||Wi(t)}const Xi=q,If=100;function Cf(t,e){const n=[];let r=0,o;s(t);function s(c){c.stopObservable.subscribe(i),n.push(c),st(o),o=W(a,Xi)}function i(){r===1&&n.every(c=>c.isStopped())&&(r=2,e(n))}function a(){st(o),r===0&&(r=1,i())}return{tryAppend:c=>r!==0?!1:n.length>0&&!Rf(n[n.length-1].event,c.event)?(a(),!1):(s(c),!0),stop:()=>{a()}}}function Rf(t,e){return t.target===e.target&&Of(t,e)<=If&&t.timeStamp-e.timeStamp<=Xi}function Of(t,e){return Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2))}function xf(t,e,n=C.ALLOW){const r=new Map,{actionNameAttribute:o}=e,s=Ao(t,kn)||o&&Ao(t,o);return s?{name:s,nameSource:"custom_attribute"}:n===C.MASK?{name:zi,nameSource:"mask_placeholder"}:Io(t,kf,e,r)||Io(t,Lf,e,r)||{name:"",nameSource:"blank"}}function Ao(t,e){const n=t.closest(`[${e}]`);if(!n)return;const r=n.getAttribute(e);return Zi(Ji(r.trim()))}const kf=[(t,e,n)=>{if("labels"in t&&t.labels&&t.labels.length>0)return sn(t.labels[0],e,n)},t=>{if(t.nodeName==="INPUT"){const e=t,n=e.getAttribute("type");if(n==="button"||n==="submit"||n==="reset")return{name:e.value,nameSource:"text_content"}}},(t,e,n)=>{if(t.nodeName==="BUTTON"||t.nodeName==="LABEL"||t.getAttribute("role")==="button")return sn(t,e,n)},(t,e,n)=>Ie(t,"aria-label",e,n),(t,e,n)=>{const r=t.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(o=>Pf(t,o)).filter(o=>!!o).map(o=>Qi(o,e,n)).join(" "),nameSource:"text_content"}},(t,e,n)=>Ie(t,"alt",e,n),(t,e,n)=>Ie(t,"name",e,n),(t,e,n)=>Ie(t,"title",e,n),(t,e,n)=>Ie(t,"placeholder",e,n),(t,e,n)=>{if("options"in t&&t.options.length>0)return sn(t.options[0],e,n)}],Lf=[(t,e,n)=>sn(t,e,n)],Nf=10;function Io(t,e,n,r){let o=t,s=0;for(;s<=Nf&&o&&o.nodeName!=="BODY"&&o.nodeName!=="HTML"&&o.nodeName!=="HEAD";){for(const i of e){const a=i(o,n,r);if(a){const{name:c,nameSource:u}=a,d=c&&c.trim();if(d)return{name:Zi(Ji(d)),nameSource:u}}}if(o.nodeName==="FORM")break;o=o.parentElement,s+=1}}function Ji(t){return t.replace(/\s+/g," ")}function Zi(t){return t.length>100?`${yn(t,100)} [...]`:t}function Pf(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}function Ie(t,e,n,r){const{enablePrivacyForActionName:o,defaultPrivacyLevel:s}=n;let i=t.getAttribute(e);if(i&&o){const a=Nn(t,s,r);wf(t.tagName,e,i,a,n)&&(i=Yi(i,zi))}else i||(i="");return{name:i,nameSource:"standard_attribute"}}function sn(t,e,n){return{name:Qi(t,e,n)||"",nameSource:"text_content"}}function Qi(t,e,n){if(t.isContentEditable)return;const{enablePrivacyForActionName:r,actionNameAttribute:o,defaultPrivacyLevel:s}=e;if(Ue(xt.USE_TREE_WALKER_FOR_ACTION_NAME))return Mf(t,o,r,s,n);if("innerText"in t){let i=t.innerText;const a=c=>{const u=t.querySelectorAll(c);for(let d=0;d<u.length;d+=1){const l=u[d];if("innerText"in l){const f=l.innerText;f&&f.trim().length>0&&(i=i.replace(f,""))}}};return a(`[${kn}]`),o&&a(`[${o}]`),r&&a(`${jt(C.HIDDEN)}, ${jt(C.MASK)}`),i}return t.textContent}function Mf(t,e,n,r,o){const s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,a);let i="";for(;s.nextNode();){const c=s.currentNode;if(bt(c)){(c.nodeName==="BR"||c.nodeName==="P"||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(c).display))&&(i+=" ");continue}i+=c.textContent||""}return i.replace(/\s+/g," ").trim();function a(c){const u=Nn(c,r,o);if(n&&u&&Ki(c,u))return NodeFilter.FILTER_REJECT;if(bt(c)){if(c.hasAttribute(kn)||e&&c.hasAttribute(e))return NodeFilter.FILTER_REJECT;const d=getComputedStyle(c);if(d.visibility!=="visible"||d.display==="none"||d.contentVisibility&&d.contentVisibility!=="visible")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function Df(t,{onPointerDown:e,onPointerUp:n}){let r,o={selection:!1,input:!1,scroll:!1},s;const i=[V(t,window,"pointerdown",a=>{Ro(a)&&(r=Co(),o={selection:!1,input:!1,scroll:!1},s=e(a))},{capture:!0}),V(t,window,"selectionchange",()=>{(!r||!Co())&&(o.selection=!0)},{capture:!0}),V(t,window,"scroll",()=>{o.scroll=!0},{capture:!0,passive:!0}),V(t,window,"pointerup",a=>{if(Ro(a)&&s){const c=o;n(s,a,()=>c),s=void 0}},{capture:!0}),V(t,window,"input",()=>{o.input=!0},{capture:!0})];return{stop:()=>{i.forEach(a=>a.stop())}}}function Co(){const t=window.getSelection();return!t||t.isCollapsed}function Ro(t){return t.target instanceof Element&&t.isPrimary!==!1}const Oo=3;function Uf(t,e){if(Vf(t))return e.addFrustration(we.RAGE_CLICK),t.some(xo)&&e.addFrustration(we.DEAD_CLICK),e.hasError&&e.addFrustration(we.ERROR_CLICK),{isRage:!0};const n=t.some(r=>r.getUserActivity().selection);return t.forEach(r=>{r.hasError&&r.addFrustration(we.ERROR_CLICK),xo(r)&&!n&&r.addFrustration(we.DEAD_CLICK)}),{isRage:!1}}function Vf(t){if(t.some(e=>e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let e=0;e<t.length-(Oo-1);e+=1)if(t[e+Oo-1].event.timeStamp-t[e].event.timeStamp<=q)return!0;return!1}const Ff='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function xo(t){if(t.hasPageActivity||t.getUserActivity().input||t.getUserActivity().scroll)return!1;let e=t.event.target;return e.tagName==="LABEL"&&e.hasAttribute("for")&&(e=document.getElementById(e.getAttribute("for"))),!e||!e.matches(Ff)}const ta=10*q,Re=new Map;function Bf(t){const e=Re.get(t);return Re.delete(t),e}function ea(t,e){Re.set(t,e),Re.forEach((n,r)=>{$(r,nt())>ta&&Re.delete(r)})}const zf=5*Q;function $f(t,e,n,r){const o=Xt({expireDelay:zf}),s=new R;let i;t.subscribe(10,()=>{o.reset()}),t.subscribe(5,d),t.subscribe(11,l=>{l.reason===ie.UNLOADING&&d()});const{stop:a}=Df(r,{onPointerDown:l=>Gf(r,t,e,l,n),onPointerUp:({clickActionBase:l,hadActivityOnPointerDown:f},p,m)=>{jf(r,t,e,n,o,s,u,l,p,m,f)}});return{stop:()=>{d(),s.notify(),a()},actionContexts:{findActionId:l=>o.findAll(l)}};function u(l){if(!i||!i.tryAppend(l)){const f=l.clone();i=Cf(l,p=>{Kf(p,f),i=void 0})}}function d(){i&&i.stop()}}function Gf(t,e,n,r,o){let s;if(t.enablePrivacyForActionName?s=Nn(r.target,t.defaultPrivacyLevel):s=C.ALLOW,s===C.HIDDEN)return;const i=Hf(r,s,t);let a=!1;return qr(e,n,o,t,c=>{a=c.hadActivity},Bi),{clickActionBase:i,hadActivityOnPointerDown:()=>a}}function jf(t,e,n,r,o,s,i,a,c,u,d){var l;const f=na(e,o,u,a,c);i(f);const p=(l=a==null?void 0:a.target)===null||l===void 0?void 0:l.selector;p&&ea(c.timeStamp,p);const{stop:m}=qr(e,n,r,t,E=>{E.hadActivity&&E.end<f.startClocks.timeStamp?f.discard():E.hadActivity?f.stop(E.end):d()?f.stop(f.startClocks.timeStamp):f.stop()},ta),h=e.subscribe(5,({endClocks:E})=>{f.stop(E.timeStamp)}),_=s.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{h.unsubscribe(),m(),_.unsubscribe()})}function Hf(t,e,n){const r=t.target.getBoundingClientRect(),o=ze(t.target,n.actionNameAttribute);o&&ea(t.timeStamp,o);const{name:s,nameSource:i}=xf(t.target,n,e);return{type:Kr.CLICK,target:{width:Math.round(r.width),height:Math.round(r.height),selector:o},position:{x:Math.round(t.clientX-r.left),y:Math.round(t.clientY-r.top)},name:s,nameSource:i}}function na(t,e,n,r,o){const s=Z(),i=gn(o.timeStamp),a=e.add(s,i.relative),c=Vi({lifeCycle:t,isChildEvent:m=>m.action!==void 0&&(Array.isArray(m.action.id)?m.action.id.includes(s):m.action.id===s)});let u=0,d;const l=[],f=new R;function p(m){u===0&&(d=m,u=1,d?a.close(_n(d)):a.remove(),c.stop(),f.notify())}return{event:o,stop:p,stopObservable:f,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return d!==void 0},getUserActivity:n,addFrustration:m=>{l.push(m)},startClocks:i,isStopped:()=>u===1||u===2,clone:()=>na(t,e,n,r,o),validate:m=>{if(p(),u!==1)return;const{resourceCount:h,errorCount:_,longTaskCount:E}=c.eventCounts,D=b({duration:d&&$(i.timeStamp,d),startClocks:i,id:s,frustrationTypes:l,counts:{resourceCount:h,errorCount:_,longTaskCount:E},events:m!=null?m:[o],event:o},r);t.notify(0,D),u=2},discard:()=>{p(),u=2}}}function Kf(t,e){const{isRage:n}=Uf(t,e);n?(t.forEach(r=>r.discard()),e.stop(z()),e.validate(t.map(r=>r.event))):(e.discard(),t.forEach(r=>r.validate()))}const Wf=1;function qf(t,e,n,r,o){const{unsubscribe:s}=t.subscribe(0,c=>{t.notify(12,ko(c))});e.register(0,({startTime:c,eventType:u})=>{if(u!==I.ERROR&&u!==I.RESOURCE&&u!==I.LONG_TASK)return K;const d=u===I.LONG_TASK?Nt(c,Wf):c,l=i.findActionId(d);return l?{type:u,action:{id:l}}:K}),e.register(1,({startTime:c})=>({action:{id:i.findActionId(c)}}));let i={findActionId:k},a=k;return o.trackUserInteractions&&({actionContexts:i,stop:a}=$f(t,n,r,o)),{addAction:c=>{t.notify(12,ko(c))},actionContexts:i,stop:()=>{s(),a()}}}function ko(t){const e=ur(t)?{action:{id:t.id,loading_time:Ui(A(t.duration)),frustration:{type:t.frustrationTypes},error:{count:t.counts.errorCount},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},_dd:{action:{target:t.target,position:t.position,name_source:t.nameSource}}}:{context:t.context},n=it({action:{id:Z(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:I.ACTION},e),r=ur(t)?t.duration:void 0,o=ur(t)?{events:t.events}:{handlingStack:t.handlingStack};return{rawRumEvent:n,duration:r,startTime:t.startClocks.relative,domainContext:o}}function ur(t){return t.type!==Kr.CUSTOM}function Yf(t){const e=_i([F.error]).subscribe(n=>t.notify(n.error));return{stop:()=>{e.unsubscribe()}}}function Xf(t,e){const n=js(t,[ge.cspViolation,ge.intervention]).subscribe(r=>e.notify(r));return{stop:()=>{n.unsubscribe()}}}function Jf(t,e,n){const r=new R;return n.subscribe(o=>{o.type===0&&r.notify(o.error)}),Yf(r),Xf(e,r),r.subscribe(o=>t.notify(14,{error:o})),Zf(t)}function Zf(t){return t.subscribe(14,({error:e})=>{t.notify(12,Qf(e))}),{addError:({error:e,handlingStack:n,componentStack:r,startClocks:o,context:s})=>{const i=An({originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:"Provided",source:et.CUSTOM,handling:"handled"});i.context=it(i.context,s),t.notify(14,{error:i})}}}function Qf(t){const e={date:t.startClocks.timeStamp,error:{id:Z(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,component_stack:t.componentStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser",fingerprint:t.fingerprint,csp:t.csp},type:I.ERROR,context:t.context},n={error:t.originalError,handlingStack:t.handlingStack};return{rawRumEvent:e,startTime:t.startClocks.relative,domainContext:n}}const Lo=new WeakSet;function tp(t){if(!performance||!("getEntriesByName"in performance))return;const e=performance.getEntriesByName(t.url,"resource");if(!e.length||!("toJSON"in e[0]))return;const n=e.filter(r=>!Lo.has(r)).filter(r=>Ni(r)&&Pi(r)).filter(r=>ep(r,t.startClocks.relative,ra({startTime:t.startClocks.relative,duration:t.duration})));if(n.length===1)return Lo.add(n[0]),n[0].toJSON()}function ra(t){return Nt(t.startTime,t.duration)}function ep(t,e,n){return t.startTime>=e-1&&ra(t)<=Nt(n,1)}const np=2*Q;function rp(t){const e=op(t)||sp(t);if(!(!e||e.traceTime<=J()-np))return e.traceId}function op(t){const e=t.querySelector("meta[name=dd-trace-id]"),n=t.querySelector("meta[name=dd-trace-time]");return oa(e&&e.content,n&&n.content)}function sp(t){const e=ip(t);if(e)return oa(xe(e,"trace-id"),xe(e,"trace-time"))}function oa(t,e){const n=e&&Number(e);if(!(!t||!n))return{traceId:t,traceTime:n}}function ip(t){for(let e=0;e<t.childNodes.length;e+=1){const n=No(t.childNodes[e]);if(n)return n}if(t.body)for(let e=t.body.childNodes.length-1;e>=0;e-=1){const n=t.body.childNodes[e],r=No(n);if(r)return r;if(!Sr(n))break}}function No(t){if(t&&rf(t)){const e=/^\s*DATADOG;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function sa(){if(Jt(L.NAVIGATION)){const n=performance.getEntriesByType(L.NAVIGATION)[0];if(n)return n}const t=ap(),e=b({entryType:L.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:t.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>H(b({},e),{toJSON:void 0})},t);return e}function ap(){const t={},e=performance.timing;for(const n in e)if(Me(e[n])){const r=n,o=e[r];t[r]=o===0?0:_n(o)}return t}function cp(t,e,n=sa){Br(t,"interactive",()=>{const r=n(),o=Object.assign(r.toJSON(),{entryType:L.RESOURCE,initiatorType:ki,duration:r.responseEnd,traceId:rp(document),toJSON:()=>H(b({},o),{toJSON:void 0})});e(o)})}const up=1e3;function lp(t){const e=new Set,n=t.subscribe(8,r=>{e.add(r),e.size>up&&(ve("Too many requests"),e.delete(e.values().next().value))});return{getMatchingRequest(r){let o=1/0,s;for(const i of e){const a=r.startTime-i.startClocks.relative;0<=a&&a<o&&i.url===r.name&&(o=Math.abs(a),s=i)}return s&&e.delete(s),s},stop(){n.unsubscribe()}}}function dp(t,e,n,r=Cl(),o=cp){let s;const i=e.trackEarlyRequests;i?s=lp(t):t.subscribe(8,u=>{c(()=>fp(u,e,n))});const a=_t(e,{type:L.RESOURCE,buffered:!0}).subscribe(u=>{for(const d of u)(i||!Li(d))&&c(()=>Po(d,e,n,s))});o(e,u=>{c(()=>Po(u,e,n,s))});function c(u){r.push(()=>{const d=u();d&&t.notify(12,d)})}return{stop:()=>{r.stop(),a.unsubscribe()}}}function fp(t,e,n){const r=tp(t);return ia(r,t,n,e)}function Po(t,e,n,r){const o=Li(t)&&r?r.getMatchingRequest(t):void 0;return ia(t,o,n,e)}function ia(t,e,n,r){if(!t&&!e)return;const o=e?gp(e,r):_p(t,r);if(!r.trackResources&&!o)return;const s=t?gn(t.startTime):e.startClocks,i=t?Md(t):bp(n,s,e.duration),a=e&&pp(e,r),c=it({date:s.timeStamp,resource:{id:Z(),duration:A(i),type:e?e.type===Wt.XHR?X.XHR:X.FETCH:Pd(t),method:e?e.method:void 0,status_code:e?e.status:yp(t.responseStatus),url:e?Gd(e.url):t.name,protocol:t&&Vd(t),delivery_type:t&&Fd(t),graphql:a},type:I.RESOURCE,_dd:{discarded:!r.trackResources}},o,t&&mp(t));return{startTime:s.relative,duration:i,rawRumEvent:c,domainContext:hp(t,e)}}function pp(t,e){const n=Mi(t.url,e);if(n)return Hd(t,n)}function hp(t,e){if(e){const n={performanceEntry:t,isAborted:e.isAborted,handlingStack:e.handlingStack};return e.type===Wt.XHR?b({xhr:e.xhr},n):b({requestInput:e.input,requestInit:e.init,response:e.response,error:e.error},n)}return{performanceEntry:t}}function mp(t){const{renderBlockingStatus:e}=t;return{resource:b(b({render_blocking_status:e},Bd(t)),Dd(t))}}function gp(t,e){if(t.traceSampled&&t.traceId&&t.spanId)return{_dd:{span_id:t.spanId.toString(),trace_id:t.traceId.toString(),rule_psr:e.rulePsr}}}function _p(t,e){if(t.traceId)return{_dd:{trace_id:t.traceId,span_id:Ci().toString(),rule_psr:e.rulePsr}}}function bp(t,e,n){return t.wasInPageStateDuringPeriod("frozen",e.relative,n)?void 0:n}function yp(t){return t===0?void 0:t}function vp(t,e,n){const{stop:r,eventCounts:o}=Vi({lifeCycle:t,isChildEvent:s=>s.view.id===e,onChange:n});return{stop:r,eventCounts:o}}const Ep=10*Q;function Sp(t,e,n){return{stop:_t(t,{type:L.PAINT,buffered:!0}).subscribe(o=>{const s=o.find(i=>i.name==="first-contentful-paint"&&i.startTime<e.timeStamp&&i.startTime<Ep);s&&n(s.startTime)}).unsubscribe}}function Tp(t,e){requestAnimationFrame(()=>{requestAnimationFrame(()=>{e($(t,nt()))})})}function wp(t,e,n){const r=_t(t,{type:L.FIRST_INPUT,buffered:!0}).subscribe(o=>{const s=o.find(i=>i.startTime<e.timeStamp);if(s){const i=$(s.startTime,s.processingStart);let a;s.target&&bt(s.target)&&(a=ze(s.target,t.actionNameAttribute)),n({delay:i>=0?i:0,time:s.startTime,targetSelector:a})}});return{stop:()=>{r.unsubscribe()}}}function Ap(t,e,n=sa){return Rp(t,()=>{const r=n();Cp(r)||e(Ip(r))})}function Ip(t){return{domComplete:t.domComplete,domContentLoaded:t.domContentLoadedEventEnd,domInteractive:t.domInteractive,loadEvent:t.loadEventEnd,firstByte:t.responseStart>=0&&t.responseStart<=nt()?t.responseStart:void 0}}function Cp(t){return t.loadEventEnd<=0}function Rp(t,e){let n;const{stop:r}=Br(t,"complete",()=>{n=W(()=>e())});return{stop:()=>{r(),st(n)}}}const Op=10*Q;function xp(t,e,n,r){let o=1/0;const{stop:s}=kt(t,n,["pointerdown","keydown"],c=>{o=c.timeStamp},{capture:!0,once:!0});let i=0;const a=_t(t,{type:L.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(c=>{const u=ms(c,d=>d.entryType===L.LARGEST_CONTENTFUL_PAINT&&d.startTime<o&&d.startTime<e.timeStamp&&d.startTime<Op&&d.size>i);if(u){let d;u.element&&(d=ze(u.element,t.actionNameAttribute)),r({value:u.startTime,targetSelector:d,resourceUrl:kp(u)}),i=u.size}});return{stop:()=>{s(),a.unsubscribe()}}}function kp(t){return t.url===""?void 0:t.url}function aa(t,e,n=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:k};if(Jt(L.VISIBILITY_STATE)){const s=performance.getEntriesByType(L.VISIBILITY_STATE).filter(i=>i.name==="hidden").find(i=>i.startTime>=e.relative);if(s)return{timeStamp:s.startTime,stop:k}}let r=1/0;const{stop:o}=kt(t,n,["pagehide","visibilitychange"],s=>{(s.type==="pagehide"||document.visibilityState==="hidden")&&(r=s.timeStamp,o())},{capture:!0});return{get timeStamp(){return r},stop:o}}function Lp(t,e,n,r){const o={},{stop:s}=Ap(t,l=>{n(l.loadEvent),o.navigationTimings=l,r()}),i=aa(t,e),{stop:a}=Sp(t,i,l=>{o.firstContentfulPaint=l,r()}),{stop:c}=xp(t,i,window,l=>{o.largestContentfulPaint=l,r()}),{stop:u}=wp(t,i,l=>{o.firstInput=l,r()});function d(){s(),a(),c(),u(),i.stop()}return{stop:d,initialViewMetrics:o}}const Tr=(t,e)=>t*e,Np=(t,e)=>{const n=Math.max(t.left,e.left),r=Math.max(t.top,e.top),o=Math.min(t.right,e.right),s=Math.min(t.bottom,e.bottom);return n>=o||r>=s?0:Tr(o-n,s-r)},Mo=t=>{const e=Tr(t.previousRect.width,t.previousRect.height),n=Tr(t.currentRect.width,t.currentRect.height),r=Np(t.previousRect,t.currentRect);return e+n-r};function Pp(t,e,n){if(!Fp())return{stop:k};let r=0,o;n({value:0});const s=Vp(),i=_t(t,{type:L.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var c;for(const u of a){if(u.hadRecentInput||u.startTime<e)continue;const{cumulatedValue:d,isMaxValue:l}=s.update(u);if(l){const f=Mp(u.sources);o={target:f!=null&&f.node?new WeakRef(f.node):void 0,time:$(e,u.startTime),previousRect:f==null?void 0:f.previousRect,currentRect:f==null?void 0:f.currentRect,devicePixelRatio:window.devicePixelRatio}}if(d>r){r=d;const f=(c=o==null?void 0:o.target)===null||c===void 0?void 0:c.deref();n({value:ne(r,4),targetSelector:f&&ze(f,t.actionNameAttribute),time:o==null?void 0:o.time,previousRect:o!=null&&o.previousRect?Do(o.previousRect):void 0,currentRect:o!=null&&o.currentRect?Do(o.currentRect):void 0,devicePixelRatio:o==null?void 0:o.devicePixelRatio})}}});return{stop:()=>{i.unsubscribe()}}}function Mp(t){let e;for(const n of t)if(n.node&&bt(n.node)){const r=Mo(n);(!e||Mo(e)<r)&&(e=n)}return e}function Do({x:t,y:e,width:n,height:r}){return{x:t,y:e,width:n,height:r}}const Dp=5*q,Up=q;function Vp(){let t=0,e,n,r=0;return{update:o=>{const s=e===void 0||o.startTime-n>=Up||o.startTime-e>=Dp;let i;return s?(e=n=o.startTime,r=t=o.value,i=!0):(t+=o.value,n=o.startTime,i=o.value>r,i&&(r=o.value)),{cumulatedValue:t,isMaxValue:i}}}}function Fp(){return Jt(L.LAYOUT_SHIFT)&&"WeakRef"in window}let an,ca=0,lr=1/0,dr=0;function Bp(){"interactionCount"in performance||an||(an=new window.PerformanceObserver(S(t=>{t.getEntries().forEach(e=>{const n=e;n.interactionId&&(lr=Math.min(lr,n.interactionId),dr=Math.max(dr,n.interactionId),ca=(dr-lr)/7+1)})})),an.observe({type:"event",buffered:!0,durationThreshold:0}))}const Uo=()=>an?ca:window.performance.interactionCount||0,Vo=10,zp=1*Q;function $p(t,e,n){if(!Hp())return{getInteractionToNextPaint:()=>{},setViewEnd:k,stop:k};const{getViewInteractionCount:r,stopViewInteractionCount:o}=jp(n);let s=1/0;const i=Gp(r);let a=-1,c,u;function d(p){for(const h of p)h.interactionId&&h.startTime>=e&&h.startTime<=s&&i.process(h);const m=i.estimateP98Interaction();m&&m.duration!==a&&(a=m.duration,u=$(e,m.startTime),c=Bf(m.startTime),!c&&m.target&&bt(m.target)&&(c=ze(m.target,t.actionNameAttribute)))}const l=_t(t,{type:L.FIRST_INPUT,buffered:!0}).subscribe(d),f=_t(t,{type:L.EVENT,durationThreshold:40,buffered:!0}).subscribe(d);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,zp),targetSelector:c,time:u};if(r())return{value:0}},setViewEnd:p=>{s=p,o()},stop:()=>{f.unsubscribe(),l.unsubscribe()}}}function Gp(t){const e=[];function n(){e.sort((r,o)=>o.duration-r.duration).splice(Vo)}return{process(r){const o=e.findIndex(i=>r.interactionId===i.interactionId),s=e[e.length-1];o!==-1?r.duration>e[o].duration&&(e[o]=r,n()):(e.length<Vo||r.duration>s.duration)&&(e.push(r),n())},estimateP98Interaction(){const r=Math.min(e.length-1,Math.floor(t()/50));return e[r]}}}function jp(t){Bp();const e=t===pt.INITIAL_LOAD?0:Uo();let n={stopped:!1};function r(){return Uo()-e}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function Hp(){return Jt(L.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function Kp(t,e,n,r,o,s,i){let a=o===pt.INITIAL_LOAD,c=!0;const u=[],d=aa(r,s);function l(){if(!c&&!a&&u.length>0){const p=Math.max(...u);p<d.timeStamp-s.relative&&i(p)}}const{stop:f}=qr(t,e,n,r,p=>{c&&(c=!1,p.hadActivity&&u.push($(s.timeStamp,p.end)),l())});return{stop:()=>{f(),d.stop()},setLoadEvent:p=>{a&&(a=!1,u.push(p),l())}}}function c_(){let t;const e=window.visualViewport;return e?t=e.pageLeft-e.offsetLeft:window.scrollX!==void 0?t=window.scrollX:t=window.pageXOffset||0,Math.round(t)}function Wp(){let t;const e=window.visualViewport;return e?t=e.pageTop-e.offsetTop:window.scrollY!==void 0?t=window.scrollY:t=window.pageYOffset||0,Math.round(t)}let fr;function qp(t){return fr||(fr=Yp(t)),fr}function Yp(t){return new R(e=>{const{throttled:n}=bn(()=>{e.notify(Yr())},200);return V(t,window,"resize",n,{capture:!0,passive:!0}).stop})}function Yr(){const t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const Xp=q;function Jp(t,e,n,r=Qp(t)){let o=0,s=0,i=0;const a=r.subscribe(({scrollDepth:c,scrollTop:u,scrollHeight:d})=>{let l=!1;if(c>o&&(o=c,l=!0),d>s){s=d;const f=nt();i=$(e.relative,f),l=!0}l&&n({maxDepth:Math.min(o,s),maxDepthScrollTop:u,maxScrollHeight:s,maxScrollHeightTime:i})});return{stop:()=>a.unsubscribe()}}function Zp(){const t=Wp(),{height:e}=Yr(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(e+t);return{scrollHeight:n,scrollDepth:r,scrollTop:t}}function Qp(t,e=Xp){return new R(n=>{function r(){n.notify(Zp())}if(window.ResizeObserver){const o=bn(r,e,{leading:!1,trailing:!0}),s=document.scrollingElement||document.documentElement,i=new ResizeObserver(S(o.throttled));s&&i.observe(s);const a=V(t,window,"scroll",o.throttled,{passive:!0});return()=>{o.cancel(),i.disconnect(),a.stop()}}})}function th(t,e,n,r,o,s,i){const a={},{stop:c,setLoadEvent:u}=Kp(t,e,n,r,s,i,h=>{a.loadingTime=h,o()}),{stop:d}=Jp(r,i,h=>{a.scroll=h}),{stop:l}=Pp(r,i.relative,h=>{a.cumulativeLayoutShift=h,o()}),{stop:f,getInteractionToNextPaint:p,setViewEnd:m}=$p(r,i.relative,s);return{stop:()=>{c(),l(),d()},stopINPTracking:f,setLoadEvent:u,setViewEnd:m,getCommonViewMetrics:()=>(a.interactionToNextPaint=p(),a)}}function eh(t,e){const{stop:n}=V(t,window,"pageshow",r=>{r.persisted&&e(r)},{capture:!0});return n}function nh(t,e,n){Tp(t.relative,r=>{e.firstContentfulPaint=r,e.largestContentfulPaint={value:r},n()})}const rh=3e3,oh=5*Q,sh=5*Q;function ih(t,e,n,r,o,s,i,a){const c=new Set;let u=f(pt.INITIAL_LOAD,ds(),a),d;p();let l;i&&(l=m(s),o.trackBfcacheViews&&(d=eh(o,h=>{u.end();const _=gn(h.timeStamp);u=f(pt.BF_CACHE,_,void 0)})));function f(h,_,E){const D=ah(e,n,r,o,t,h,_,E);return c.add(D),D.stopObservable.subscribe(()=>{c.delete(D)}),D}function p(){e.subscribe(10,()=>{u=f(pt.ROUTE_CHANGE,void 0,{name:u.name,service:u.service,version:u.version,context:u.contextManager.getContext()})}),e.subscribe(9,()=>{u.end({sessionIsActive:!1})})}function m(h){return h.subscribe(({oldLocation:_,newLocation:E})=>{uh(_,E)&&(u.end(),u=f(pt.ROUTE_CHANGE))})}return{addTiming:(h,_=z())=>{u.addTiming(h,_)},startView:(h,_)=>{u.end({endClocks:_}),u=f(pt.ROUTE_CHANGE,_,h)},setViewContext:h=>{u.contextManager.setContext(h)},setViewContextProperty:(h,_)=>{u.contextManager.setContextProperty(h,_)},setViewName:h=>{u.setViewName(h)},getViewContext:()=>u.contextManager.getContext(),stop:()=>{l&&l.unsubscribe(),d&&d(),u.end(),c.forEach(h=>h.stop())}}}function ah(t,e,n,r,o,s,i=j(),a){const c=Z(),u=new R,d={};let l=0,f;const p=Oe(o),m=Be();let h=!0,_=a==null?void 0:a.name;const E=(a==null?void 0:a.service)||r.service,D=(a==null?void 0:a.version)||r.version,U=a==null?void 0:a.context;U&&m.setContext(U);const y={id:c,name:_,startClocks:i,service:E,version:D,context:U};t.notify(1,y),t.notify(2,y);const{throttled:v,cancel:g}=bn(St,rh,{leading:!1}),{setLoadEvent:O,setViewEnd:Ee,stop:Vn,stopINPTracking:Fn,getCommonViewMetrics:Bn}=th(t,e,n,r,Et,s,i),{stop:zn,initialViewMetrics:Ge}=s===pt.INITIAL_LOAD?Lp(r,i,O,Et):{stop:k,initialViewMetrics:{}};s===pt.BF_CACHE&&nh(i,Ge,Et);const{stop:$n,eventCounts:Gn}=vp(t,c,Et),jn=_e(St,oh),Hn=t.subscribe(11,Y=>{Y.reason===ie.UNLOADING&&St()});St(),m.changeObservable.subscribe(Et);function je(){t.notify(3,{id:c,name:_,context:m.getContext(),startClocks:i,sessionIsActive:h})}function Et(){je(),v()}function St(){g(),je(),l+=1;const Y=f===void 0?z():f.timeStamp;t.notify(4,{customTimings:d,documentVersion:l,id:c,name:_,service:E,version:D,context:m.getContext(),loadingType:s,location:p,startClocks:i,commonViewMetrics:Bn(),initialViewMetrics:Ge,duration:$(i.timeStamp,Y),isActive:f===void 0,sessionIsActive:h,eventCounts:Gn})}return{get name(){return _},service:E,version:D,contextManager:m,stopObservable:u,end(Y={}){var ft,Ut;f||(f=(ft=Y.endClocks)!==null&&ft!==void 0?ft:j(),h=(Ut=Y.sessionIsActive)!==null&&Ut!==void 0?Ut:!0,t.notify(5,{endClocks:f}),t.notify(6,{endClocks:f}),mn(jn),Ee(f.relative),Vn(),Hn.unsubscribe(),St(),W(()=>{this.stop()},sh))},stop(){zn(),$n(),Fn(),u.notify()},addTiming(Y,ft){if(f)return;const Ut=ja(ft)?ft:$(i.timeStamp,ft);d[ch(Y)]=Ut,Et()},setViewName(Y){_=Y,St()}}}function ch(t){const e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return e!==t&&T.warn(`Invalid timing name: ${t}, sanitized to: ${e}`),e}function uh(t,e){return t.pathname!==e.pathname||!lh(e.hash)&&Fo(e.hash)!==Fo(t.hash)}function lh(t){const e=t.substring(1);return e!==""&&!!document.getElementById(e)}function Fo(t){const e=t.indexOf("?");return e<0?t:t.slice(0,e)}function dh(t,e,n,r,o,s,i,a,c,u){return t.subscribe(4,d=>t.notify(12,fh(d,n,a))),e.register(0,({startTime:d,eventType:l})=>{const f=c.findView(d);return f?{type:l,service:f.service,version:f.version,context:f.context,view:{id:f.id,name:f.name}}:ut}),e.register(1,({startTime:d})=>{var l;return{view:{id:(l=c.findView(d))===null||l===void 0?void 0:l.id}}}),ih(r,t,o,s,n,i,!n.trackViewsManually,u)}function fh(t,e,n){var r,o,s,i,a,c,u,d,l,f,p,m,h,_,E,D,U,y;const v=n.getReplayStats(t.id),g=(o=(r=t.commonViewMetrics)===null||r===void 0?void 0:r.cumulativeLayoutShift)===null||o===void 0?void 0:o.devicePixelRatio,O={_dd:{document_version:t.documentVersion,replay_stats:v,cls:g?{device_pixel_ratio:g}:void 0,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually}},date:t.startClocks.timeStamp,type:I.VIEW,view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:(s=t.commonViewMetrics.cumulativeLayoutShift)===null||s===void 0?void 0:s.value,cumulative_layout_shift_time:A((i=t.commonViewMetrics.cumulativeLayoutShift)===null||i===void 0?void 0:i.time),cumulative_layout_shift_target_selector:(a=t.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.targetSelector,first_byte:A((c=t.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.firstByte),dom_complete:A((u=t.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.domComplete),dom_content_loaded:A((d=t.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domContentLoaded),dom_interactive:A((l=t.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:A(t.initialViewMetrics.firstContentfulPaint),first_input_delay:A((f=t.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.delay),first_input_time:A((p=t.initialViewMetrics.firstInput)===null||p===void 0?void 0:p.time),first_input_target_selector:(m=t.initialViewMetrics.firstInput)===null||m===void 0?void 0:m.targetSelector,interaction_to_next_paint:A((h=t.commonViewMetrics.interactionToNextPaint)===null||h===void 0?void 0:h.value),interaction_to_next_paint_time:A((_=t.commonViewMetrics.interactionToNextPaint)===null||_===void 0?void 0:_.time),interaction_to_next_paint_target_selector:(E=t.commonViewMetrics.interactionToNextPaint)===null||E===void 0?void 0:E.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:A((D=t.initialViewMetrics.largestContentfulPaint)===null||D===void 0?void 0:D.value),largest_contentful_paint_target_selector:(U=t.initialViewMetrics.largestContentfulPaint)===null||U===void 0?void 0:U.targetSelector,load_event:A((y=t.initialViewMetrics.navigationTimings)===null||y===void 0?void 0:y.loadEvent),loading_time:Ui(A(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},performance:ph(t.commonViewMetrics,t.initialViewMetrics),resource:{count:t.eventCounts.resourceCount},time_spent:A(t.duration)},display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:t.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:A(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:e.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:Ul()}};return Lt(t.customTimings)||(O.view.custom_timings=ss(t.customTimings,A)),{rawRumEvent:O,startTime:t.startClocks.relative,duration:t.duration,domainContext:{location:t.location}}}function ph({cumulativeLayoutShift:t,interactionToNextPaint:e},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:o}){return{cls:t&&{score:t.value,timestamp:A(t.time),target_selector:t.targetSelector,previous_rect:t.previousRect,current_rect:t.currentRect},fcp:n&&{timestamp:A(n)},fid:r&&{duration:A(r.delay),timestamp:A(r.time),target_selector:r.targetSelector},inp:e&&{duration:A(e.value),timestamp:A(e.time),target_selector:e.targetSelector},lcp:o&&{timestamp:A(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl}}}const hh="rum";function mh(t,e,n){const r=fi(t,hh,o=>_h(t,o),n);return r.expireObservable.subscribe(()=>{e.notify(9)}),r.renewObservable.subscribe(()=>{e.notify(10)}),r.sessionStateUpdateObservable.subscribe(({previousState:o,newState:s})=>{if(!o.forcedReplay&&s.forcedReplay){const i=r.findSession();i&&(i.isReplayForced=!0)}}),{findTrackedSession:o=>{const s=r.findSession(o);if(!(!s||s.trackingType==="0"))return{id:s.id,sessionReplay:s.trackingType==="1"?1:s.isReplayForced?2:0,anonymousId:s.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}function gh(){const t={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:ri("records")?1:0};return{findTrackedSession:()=>t,expire:k,expireObservable:new R,setForcedReplay:k}}function _h(t,e){return bh(e)?e:wt(t.sessionSampleRate)?wt(t.sessionReplaySampleRate)?"1":"2":"0"}function bh(t){return t==="0"||t==="1"||t==="2"}function yh(t,e,n,r,o,s){const i=[t.rumEndpointBuilder];t.replica&&i.push(t.replica.rumEndpointBuilder);const a=Dr({encoder:s(2),request:Mr(i,n),flushController:Ur({pageMayExitObservable:r,sessionExpireObservable:o})});return e.subscribe(13,c=>{c.type===I.VIEW?a.upsert(c,c.view.id):a.add(c)}),a}function vh(t){const e=be();t.subscribe(13,n=>{e.send("rum",n)})}const Eh=Pt;function Sh(t,e,n,r){const o=Xt({expireDelay:Eh});let s;t.subscribe(1,({startClocks:c})=>{const u=r.href;o.add(a({url:u,referrer:s||document.referrer}),c.relative),s=u}),t.subscribe(6,({endClocks:c})=>{o.closeActive(c.relative)});const i=n.subscribe(({newLocation:c})=>{const u=o.find();if(u){const d=nt();o.closeActive(d),o.add(a({url:c.href,referrer:u.referrer}),d)}});function a({url:c,referrer:u}){return{url:c,referrer:u}}return e.register(0,({startTime:c,eventType:u})=>{const d=o.find(c);return d?{type:u,view:{url:d.url,referrer:d.referrer}}:ut}),{findUrl:c=>o.find(c),stop:()=>{i.unsubscribe(),o.stop()}}}function Th(t,e){let n=Oe(e);return new R(r=>{const{stop:o}=wh(t,i),{stop:s}=Ah(t,i);function i(){if(n.href===e.href)return;const a=Oe(e);r.notify({newLocation:a,oldLocation:n}),n=a}return()=>{o(),s()}})}function wh(t,e){const{stop:n}=dt(Bo("pushState"),"pushState",({onPostCall:s})=>{s(e)}),{stop:r}=dt(Bo("replaceState"),"replaceState",({onPostCall:s})=>{s(e)}),{stop:o}=V(t,window,"popstate",e);return{stop:()=>{n(),r(),o()}}}function Ah(t,e){return V(t,window,"hashchange",e)}function Bo(t){return Object.prototype.hasOwnProperty.call(history,t)?history:History.prototype}const Ih=Pt;function Ch(t,e,n){const r=Xt({expireDelay:Ih});return t.subscribe(1,({startClocks:o})=>{r.add({},o.relative)}),t.subscribe(6,({endClocks:o})=>{r.closeActive(o.relative)}),e.register(0,({startTime:o,eventType:s})=>{if(!n.trackFeatureFlagsForEvents.concat([I.VIEW,I.ERROR]).includes(s))return K;const a=r.find(o);return!a||Lt(a)?K:{type:s,feature_flags:a}}),{addFeatureFlagEvaluation:(o,s)=>{const i=r.find();i&&(i[o]=s)}}}const Rh=10*q;let ae,Ze;function Oh(t,e,n){t.metricsEnabled&&(ua(),Ze=!1,e.subscribe(13,()=>{Ze=!0}),n.subscribe(({bytesCount:r,messagesCount:o})=>{Ze&&(Ze=!1,ae.batchCount+=1,$o(ae.batchBytesCount,r),$o(ae.batchMessagesCount,o))}),_e(xh,Rh))}function xh(){ae.batchCount!==0&&(Rn("Customer data measures",ae),ua())}function zo(){return{min:1/0,max:0,sum:0}}function $o(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function ua(){ae={batchCount:0,batchBytesCount:zo(),batchMessagesCount:zo()}}const kh=4e3,Lh=500,Nh=Pt;function Ph(t,e,n=Lh){const r=Xt({expireDelay:Nh,maxEntries:kh});let o;Jt(L.VISIBILITY_STATE)&&performance.getEntriesByType(L.VISIBILITY_STATE).forEach(u=>{const d=u.name==="hidden"?"hidden":"active";i(d,u.startTime)}),i(la(),nt());const{stop:s}=kt(e,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],c=>{i(Dh(c),c.timeStamp)},{capture:!0});function i(c,u=nt()){c!==o&&(o=c,r.closeActive(u),r.add({state:o,startTime:u},u))}function a(c,u,d){return r.findAll(u,d).some(l=>l.state===c)}return t.register(0,({startTime:c,duration:u=0,eventType:d})=>{if(d===I.VIEW){const l=r.findAll(c,u);return{type:d,_dd:{page_states:Mh(l,c,n)}}}return d===I.ACTION||d===I.ERROR?{type:d,view:{in_foreground:a("active",c,0)}}:K}),{wasInPageStateDuringPeriod:a,addPageState:i,stop:()=>{s(),r.stop()}}}function Mh(t,e,n){if(t.length!==0)return t.slice(-n).reverse().map(({state:r,startTime:o})=>({state:r,start:A($(e,o))}))}function Dh(t){return t.type==="freeze"?"frozen":t.type==="pagehide"?t.persisted?"frozen":"terminated":la()}function la(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function Uh(t,e){let n;const r=requestAnimationFrame(S(()=>{n=Yr()})),o=qp(e).subscribe(s=>{n=s}).unsubscribe;return t.register(0,({eventType:s})=>({type:s,display:n?{viewport:n}:void 0})),{stop:()=>{o(),r&&cancelAnimationFrame(r)}}}function Vh(t,e){const n=window.cookieStore?Fh(t):zh;return new R(r=>n(e,o=>r.notify(o)))}function Fh(t){return(e,n)=>V(t,window.cookieStore,"change",o=>{const s=o.changed.find(i=>i.name===e)||o.deleted.find(i=>i.name===e);s&&n(s.value)}).stop}const Bh=q;function zh(t,e){const n=xe(document.cookie,t),r=_e(()=>{const o=xe(document.cookie,t);o!==n&&e(o)},Bh);return()=>{mn(r)}}const Go="datadog-ci-visibility-test-execution-id";function $h(t,e,n=Vh(t,Go)){var r;let o=At(Go)||((r=window.Cypress)===null||r===void 0?void 0:r.env("traceId"));const s=n.subscribe(i=>{o=i});return e.register(0,({eventType:i})=>typeof o!="string"?K:{type:i,session:{type:"ci_test"},ci_test:{test_execution_id:o}}),{stop:()=>{s.unsubscribe()}}}const Gh=Pt;function jh(t,e){const n=Xt({expireDelay:Gh}),r=Jt(L.LONG_ANIMATION_FRAME)?L.LONG_ANIMATION_FRAME:L.LONG_TASK,o=_t(e,{type:r,buffered:!0}).subscribe(i=>{for(const a of i){if(!e.trackLongTasks)break;const c=gn(a.startTime),u=Z(),d=Hh(a,c,u);t.notify(12,{rawRumEvent:d,startTime:c.relative,duration:a.duration,domainContext:{performanceEntry:a}}),n.add({id:u,startClocks:c,duration:a.duration,entryType:r},c.relative),n.closeActive(Nt(c.relative,a.duration))}});return{stop:()=>{o.unsubscribe(),n.stop()},longTaskContexts:{findLongTasks:(i,a)=>n.findAll(i,a)}}}function Hh(t,e,n){const r={date:e.timeStamp,type:I.LONG_TASK,_dd:{discarded:!1}};return t.entryType===L.LONG_TASK?H(b({},r),{long_task:{id:n,entry_type:go.LONG_TASK,duration:A(t.duration)}}):H(b({},r),{long_task:{id:n,entry_type:go.LONG_ANIMATION_FRAME,duration:A(t.duration),blocking_duration:A(t.blockingDuration),first_ui_event_timestamp:A(t.firstUIEventTimestamp),render_start:A(t.renderStart),style_and_layout_start:A(t.styleAndLayoutStart),start_time:A(t.startTime),scripts:t.scripts.map(o=>({duration:A(o.duration),pause_duration:A(o.pauseDuration),forced_style_and_layout_duration:A(o.forcedStyleAndLayoutDuration),start_time:A(o.startTime),execution_start:A(o.executionStart),source_url:o.sourceURL,source_function_name:o.sourceFunctionName,source_char_position:o.sourceCharPosition,invoker:o.invoker,invoker_type:o.invokerType,window_attribution:o.windowAttribution}))}})}function Kh(t){t.register(0,({eventType:e})=>{if(!di())return K;const n=ui(),r=li();return{type:e,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:On()}}})}function Wh(t,e,n){const r=Cn(t),o=n(r);return xr(e).forEach(([s,i])=>wr(t,r,s.split(/\.|(?=\[\])/),i)),o}function wr(t,e,n,r){const[o,...s]=n;if(o==="[]"){Array.isArray(t)&&Array.isArray(e)&&t.forEach((i,a)=>wr(i,e[a],s,r));return}if(!(!jo(t)||!jo(e))){if(s.length>0)return wr(t[o],e[o],s,r);qh(t,o,e[o],r)}}function qh(t,e,n,r){const o=Yt(n);o===r?t[e]=N(n):r==="object"&&(o==="undefined"||o==="null")&&(t[e]={})}function jo(t){return Yt(t)==="object"}const Qt={"view.name":"string","view.url":"string","view.referrer":"string"},te={context:"object"},ee={service:"string",version:"string"};let da;function Yh(t,e,n,r,o){da={[I.VIEW]:b(b(b({"view.performance.lcp.resource_url":"string"},te),Qt),ee),[I.ERROR]:b(b(b({"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string"},te),Qt),ee),[I.RESOURCE]:b(b(b({"resource.url":"string","resource.graphql.variables":"string"},te),Qt),ee),[I.ACTION]:b(b(b({"action.target.name":"string"},te),Qt),ee),[I.LONG_TASK]:b(b(b({"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string"},te),Qt),ee),[I.VITAL]:b(b(b({},te),Qt),ee)};const s={[I.ERROR]:on(I.ERROR,r,o),[I.ACTION]:on(I.ACTION,r,o),[I.VITAL]:on(I.VITAL,r,o)};e.subscribe(12,({startTime:i,duration:a,rawRumEvent:c,domainContext:u})=>{const d=n.triggerHook(0,{eventType:c.type,startTime:i,duration:a});if(d===ut)return;const l=it(d,c,{ddtags:Nr(t).join(",")});Xh(l,t.beforeSend,u,s)&&(Lt(l.context)&&delete l.context,e.notify(13,l))})}function Xh(t,e,n,r){var o;if(e){const i=Wh(t,da[t.type],a=>e(a,n));if(i===!1&&t.type!==I.VIEW)return!1;i===!1&&T.warn("Can't dismiss view events using beforeSend!")}return!((o=r[t.type])===null||o===void 0?void 0:o.isLimitReached())}function Jh(t,e,n,r){t.register(0,({eventType:o,startTime:s})=>{const i=e.findTrackedSession(s),a=r.findView(s);if(!i||!a)return ut;let c,u,d;return o===I.VIEW?(c=n.getReplayStats(a.id)?!0:void 0,u=i.sessionReplay===1,d=a.sessionIsActive?void 0:!1):c=n.isRecording()?!0:void 0,{type:o,session:{id:i.id,type:"user",has_replay:c,sampled_for_replay:u,is_active:d}}}),t.register(1,({startTime:o})=>{const s=e.findTrackedSession(o);return s?{session:{id:s.id}}:K})}function Zh(t){t.register(0,({eventType:e})=>({type:e,connectivity:qs()}))}function Qh(t,e,n){t.register(0,({eventType:r})=>{const o=e.source;return{type:r,_dd:{format_version:2,drift:$a(),configuration:{session_sample_rate:ne(e.sessionSampleRate,3),session_replay_sample_rate:ne(e.sessionReplaySampleRate,3),profiling_sample_rate:ne(e.profilingSampleRate,3),trace_sample_rate:ne(e.traceSampleRate,3),beta_encode_cookie_options:e.betaEncodeCookieOptions},browser_sdk_version:gt()?"6.25.2":void 0,sdk_name:n},application:{id:e.applicationId},date:z(),source:o}}),t.register(1,()=>({application:{id:e.applicationId}}))}function tm(t,e){t.register(1,()=>e.isGranted()?K:ut)}const em=si,nm=[I.ACTION,I.ERROR,I.LONG_TASK,I.RESOURCE,I.VITAL];function rm(t){return{addEvent:(e,n,r,o)=>{nm.includes(n.type)&&t.notify(12,{startTime:e,rawRumEvent:n,domainContext:r,duration:o})}}}function om(t,e){if(!e.metricsEnabled)return{stop:k};const{unsubscribe:n}=t.subscribe(4,({initialViewMetrics:r})=>{!r.largestContentfulPaint||!r.navigationTimings||(Rn("Initial view metrics",{metrics:sm(r.largestContentfulPaint,r.navigationTimings)}),n())});return{stop:n}}function sm(t,e){return{lcp:{value:t.value},navigation:{domComplete:e.domComplete,domContentLoaded:e.domContentLoaded,domInteractive:e.domInteractive,firstByte:e.firstByte,loadEvent:e.loadEvent}}}function im(t,e,n,r,o,s,i,a,c){const u=[],d=new xd,l=em();d.subscribe(13,v=>Pr("rum",v));const f=v=>{d.notify(14,{error:v}),ve("Error reported to customer",{"error.message":v.message})},p=oi(t),m=p.subscribe(v=>{d.notify(11,v)});u.push(()=>m.unsubscribe());const h=ii("browser-rum-sdk",t,l,f,p,o);u.push(h.stop);const _=gt()?gh():mh(t,d,s);if(gt())vh(d);else{const v=yh(t,d,f,p,_.expireObservable,o);u.push(()=>v.stop()),Oh(h,d,v.flushController.flushObservable)}tm(l,s);const{stop:E}=om(d,h);u.push(E);const y=am(d,l,t,_,e,r,i,a,c,f),{stop:D}=y,U=Ke(y,["stop"]);return u.push(D),a.unbuffer(),u.push(()=>n.stop()),H(b({},U),{lifeCycle:d,session:_,stopSession:()=>_.expire(),telemetry:h,stop:()=>{u.forEach(v=>v())},hooks:l})}function am(t,e,n,r,o,s,i,a,c,u){const d=[],l=Id(),f=Th(n,location),{observable:p,stop:m}=Rd();d.push(m),Qh(e,n,c);const h=Ph(e,n);d.push(()=>h.stop());const _=Ld(t);d.push(()=>_.stop());const E=Sh(t,e,f,location);d.push(()=>E.stop());const D=Ch(t,e,n);Jh(e,r,o,_),Zh(e);const U=vi(e,n,"rum",!0),y=Ei(e,n,r,"rum"),v=yi(e,n,"rum"),g=qf(t,e,l,p,n);d.push(g.stop);const O=rm(t),Ee=Uh(e,n);d.push(Ee.stop);const Vn=$h(n,e);d.push(Vn.stop),Kh(e),Yh(n,t,e,u);const{addTiming:Fn,startView:Bn,setViewName:zn,setViewContext:Ge,setViewContextProperty:$n,getViewContext:Gn,stop:jn}=dh(t,e,n,location,l,p,f,o,_,s);d.push(jn);const{stop:Hn}=dp(t,n,h);d.push(Hn);const{stop:je,longTaskContexts:Et}=jh(t,n);d.push(je);const{addError:St}=Jf(t,n,a);Yd(t,n,r,y,v);const Y=Fl(t,h,i),ft=Od(n.applicationId,r,_,g.actionContexts,E);return{addAction:g.addAction,addEvent:O.addEvent,addError:St,addTiming:Fn,addFeatureFlagEvaluation:D.addFeatureFlagEvaluation,startView:Bn,setViewContext:Ge,setViewContextProperty:$n,getViewContext:Gn,setViewName:zn,viewHistory:_,getInternalContext:ft.get,startDurationVital:Y.startDurationVital,stopDurationVital:Y.stopDurationVital,addDurationVital:Y.addDurationVital,addOperationStepVital:Y.addOperationStepVital,globalContext:U,userContext:y,accountContext:v,longTaskContexts:Et,stop:()=>d.forEach(Ut=>Ut())}}function cm(t,{session:e,viewContext:n,errorType:r}){const o=e?e.id:"no-session-id",s=[];r!==void 0&&s.push(`error-type=${r}`),n&&(s.push(`seed=${n.id}`),s.push(`from=${n.startClocks.timeStamp}`));const i=um(t),a=`/rum/replay/sessions/${o}`;return`${i}${a}?${s.join("&")}`}function um(t){const e=t.site,n=t.subdomain||lm(t);return`https://${n?`${n}.`:""}${e}`}function lm(t){switch(t.site){case Ht:case Lc:return"app";case Rs:return"dd";default:return}}const dm=1e3;let ot;function u_(t){return Pn(t).segments_count}function l_(t){Pn(t).segments_count+=1}function d_(t){Pn(t).records_count+=1}function f_(t,e){Pn(t).segments_total_raw_size+=e}function fm(t){return ot==null?void 0:ot.get(t)}function Pn(t){ot||(ot=new Map);let e;return ot.has(t)?e=ot.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},ot.set(t,e),ot.size>dm&&pm()),e}function pm(){if(!ot)return;const t=ot.keys().next().value;t&&ot.delete(t)}function fa(t,e,n){let r=0,o=[],s,i=!0,a=0;const c=[],{stop:u}=V(t,e,"message",({data:f})=>{if(f.type!=="wrote"||f.streamId!==n)return;const p=c[0];p&&(p.id===f.id?(c.shift(),r+=f.additionalBytesCount,o.push(f.result),s=f.trailer,p.writeCallback?p.writeCallback(f.result.byteLength):p.finishCallback&&p.finishCallback()):p.id<f.id&&u())});function d(){const f=o.length===0?new Uint8Array(0):Fs(o.concat(s)),p={rawBytesCount:r,output:f,outputBytesCount:f.byteLength,encoding:"deflate"};return r=0,o=[],p}function l(){i||(e.postMessage({action:"reset",streamId:n}),i=!0)}return{isAsync:!0,get isEmpty(){return i},write(f,p){e.postMessage({action:"write",id:a,data:f,streamId:n}),c.push({id:a,writeCallback:p,data:f}),i=!1,a+=1},finish(f){l(),c.length?(c.forEach(p=>{delete p.writeCallback}),c[c.length-1].finishCallback=()=>f(d())):f(d())},finishSync(){l();const f=c.map(p=>p.data).join("");return c.length=0,H(b({},d()),{pendingData:f})},estimateEncodedBytesCount(f){return f.length/8},stop(){u()}}}function Xr({configuredUrl:t,error:e,source:n,scriptType:r}){if(T.error(`${n} failed to start: an error occurred while initializing the ${r}:`,e),e instanceof Event||e instanceof Error&&hm(e.message)){let o;t?o=`Please make sure the ${r} URL ${t} is correct and CSP is correctly configured.`:o="Please make sure CSP is correctly configured.",T.error(`${o} See documentation at ${hn}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r==="worker"&&Vr(e)}function hm(t){return t.includes("Content Security Policy")||t.includes("requires 'TrustedScriptURL'")}const mm=30*q;function pa(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.25.2"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let B={status:0};function ha(t,e,n,r=pa){switch(B.status===0&&gm(t,e,r),B.status){case 1:return B.initializationFailureCallbacks.push(n),B.worker;case 3:return B.worker}}function Ho(){return B.status}function gm(t,e,n=pa){try{const r=n(t),{stop:o}=V(t,r,"error",a=>{pr(t,e,a)}),{stop:s}=V(t,r,"message",({data:a})=>{a.type==="errored"?pr(t,e,a.error,a.streamId):a.type==="initialized"&&bm(a.version)});r.postMessage({action:"init"}),W(()=>_m(e),mm),B={status:1,worker:r,stop:()=>{o(),s()},initializationFailureCallbacks:[]}}catch(r){pr(t,e,r)}}function _m(t){B.status===1&&(T.error(`${t} failed to start: a timeout occurred while initializing the Worker`),B.initializationFailureCallbacks.forEach(e=>e()),B={status:2})}function bm(t){B.status===1&&(B={status:3,worker:B.worker,stop:B.stop,version:t})}function pr(t,e,n,r){B.status===1||B.status===0?(Xr({configuredUrl:t.workerUrl,error:n,source:e,scriptType:"worker"}),B.status===1&&B.initializationFailureCallbacks.forEach(o=>o()),B={status:2}):Vr(n,{worker_version:B.status===3&&B.version,stream_id:r})}function ma(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function ym(t,e,n,r){const o=e.findTrackedSession(),s=vm(o,r),i=n.findView();return cm(t,{viewContext:i,errorType:s,session:o})}function vm(t,e){if(!ma())return"browser-not-supported";if(!t)return"rum-not-tracked";if(t.sessionReplay===0)return"incorrect-session-plan";if(!e)return"replay-not-started"}function Em(t,e){if(!t.metricsEnabled)return{stop:k};let n,r,o;const{unsubscribe:s}=e.subscribe(i=>{switch(i.type){case"start":n={forced:i.forced,timestamp:z()},r=void 0,o=void 0;break;case"document-ready":n&&(r=$(n.timestamp,z()));break;case"recorder-settled":n&&(o=$(n.timestamp,z()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":s(),n&&Rn("Recorder init metrics",{metrics:Sm(n.forced,o,$(n.timestamp,z()),i.type,r)});break}});return{stop:s}}function Sm(t,e,n,r,o){return{forced:t,loadRecorderModuleDuration:e,recorderInitDuration:n,result:r,waitForDocReadyDuration:o}}function Tm(t,e,n,r,o,s,i){let a=0,c;e.subscribe(9,()=>{(a===2||a===3)&&(f(),a=1)}),e.subscribe(10,()=>{a===1&&l()});const u=new R;Em(i,u);const d=async p=>{u.notify({type:"start",forced:p});const[m]=await Promise.all([Ko(u,{type:"recorder-settled"},o()),Ko(u,{type:"document-ready"},pl(t,"interactive"))]);if(a!==2){u.notify({type:"aborted"});return}if(!m){a=0,u.notify({type:"recorder-load-failed"});return}const h=s();if(!h){a=0,u.notify({type:"deflate-encoder-load-failed"});return}({stop:c}=m(e,t,n,r,h,i)),a=3,u.notify({type:"succeeded"})};function l(p){const m=n.findTrackedSession();if(wm(m,p)){a=1;return}if(Am(a))return;a=2;const h=Im(m,p)||!1;d(h).catch(Ot),h&&n.setForcedReplay()}function f(){a===3&&(c==null||c()),a=0}return{start:l,stop:f,getSessionReplayLink(){return ym(t,n,r,a!==0)},isRecording:()=>a===3}}function wm(t,e){return!t||t.sessionReplay===0&&(!e||!e.force)}function Am(t){return t===2||t===3}function Im(t,e){return e&&e.force&&t.sessionReplay===0}async function Ko(t,e,n){try{return await n}finally{t.notify(e)}}function Cm(){let t=0;return{strategy:{start(){t=1},stop(){t=2},isRecording:()=>!1,getSessionReplayLink:k},shouldStartImmediately(e){return t===1||t===0&&!e.startSessionReplayRecordingManually}}}function Rm(t,e){if(gt()&&!ri("records")||!ma())return{start:k,stop:k,getReplayStats:()=>{},onRumStart:k,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=Cm();return{start:s=>n.start(s),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:o,isRecording:()=>Ho()===3&&n.isRecording(),getReplayStats:s=>Ho()===3?fm(s):void 0};function o(s,i,a,c,u,d){let l;function f(){return l||(u!=null||(u=ha(i,"Datadog Session Replay",()=>{n.stop()},e)),u&&(l=fa(i,u,1))),l}n=Tm(i,s,a,c,t,f,d),r(i)&&n.start()}}const Om="modulepreload",xm=function(t,e){return new URL(t,e).href},Wo={},ga=function(e,n,r){let o=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(n.map(u=>{if(u=xm(u,r),u in Wo)return;Wo[u]=!0;const d=u.endsWith(".css"),l=d?'[rel="stylesheet"]':"";if(!!r)for(let m=i.length-1;m>=0;m--){const h=i[m];if(h.href===u&&(!d||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${l}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":Om,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((m,h)=>{p.addEventListener("load",m),p.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};async function km(t=Lm){try{return await t()}catch(e){Xr({error:e,source:"Recorder",scriptType:"module"})}}async function Lm(){return(await ga(()=>import("./assets/startRecording-CuFdVhxx.js"),[],import.meta.url)).startRecording}function Nm(){return rt().Profiler!==void 0}function Pm(t){let e={status:"starting"};return t.register(0,({eventType:n})=>n!==I.VIEW&&n!==I.LONG_TASK?K:{type:n,_dd:{profiling:e}}),{get:()=>e,set:n=>{e=n}}}async function Mm(t=Dm){try{return await t()}catch(e){Xr({error:e,source:"Profiler",scriptType:"module"})}}async function Dm(){return(await ga(()=>import("./assets/profiler-BRmTNL9s.js"),[],import.meta.url)).createRumProfiler}function Um(){let t;function e(n,r,o,s,i,a,c){const u=s.findTrackedSession();if(!u||!Ii(u.id,o.profilingSampleRate))return;const d=Pm(r);if(!Nm()){d.set({status:"error",error_reason:"not-supported-by-browser"});return}Mm().then(l=>{if(!l){ve("[DD_RUM] Failed to lazy load the RUM Profiler"),d.set({status:"error",error_reason:"failed-to-lazy-load"});return}t=l(o,n,s,d,a,c,i,void 0),t.start()}).catch(Ot)}return{onRumStart:e,stop:()=>{t==null||t.stop().catch(Ot)}}}const Vm=Rm(km),Fm=Um(),Ar=wd(im,Vm,Fm,{startDeflateWorker:ha,createDeflateEncoder:fa,sdkName:"rum"});Gs(rt(),"DD_RUM",Ar);function pn(t,e,n){const r=n.getHandler(),o=Array.isArray(r)?r:[r];return qo[t]>=qo[n.getLevel()]&&o.includes(e)}const w={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},qo={[w.ok]:0,[w.debug]:1,[w.info]:2,[w.notice]:4,[w.warn]:5,[w.error]:6,[w.critical]:7,[w.alert]:8,[w.emerg]:9};function Mn(t,{includeMessage:e=!1}={}){return{stack:t.stack,kind:t.type,message:e?t.message:void 0,causes:t.causes,fingerprint:t.fingerprint,handling:t.handling}}var Bm=function(t,e,n,r){var o=arguments.length,s=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};const Ne={console:"console",http:"http"},zm=Object.keys(w);class at{constructor(e,n,r=Ne.http,o=w.debug,s={}){this.handleLogStrategy=e,this.handlerType=r,this.level=o,this.contextManager=Be("logger"),this.tags=[],this.contextManager.setContext(s),n&&this.contextManager.setContextProperty("logger",{name:n})}logImplementation(e,n,r=w.info,o,s){const i=N(n);let a;if(o!=null){const c=An({originalError:o,nonErrorPrefix:"Provided",source:et.LOGGER,handling:"handled",startClocks:j()});a=it({error:Mn(c,{includeMessage:!0})},c.context,i)}else a=i;this.handleLogStrategy({message:N(e),context:a,status:r},this,s)}log(e,n,r=w.info,o){let s;pn(r,Ne.http,this)&&(s=he("log")),this.logImplementation(e,n,r,o,s)}setContext(e){this.contextManager.setContext(e)}getContext(){return this.contextManager.getContext()}setContextProperty(e,n){this.contextManager.setContextProperty(e,n)}removeContextProperty(e){this.contextManager.removeContextProperty(e)}clearContext(){this.contextManager.clearContext()}addTag(e,n){this.tags.push(Bt(e,n))}removeTagsWithKey(e){const n=Ws(e);this.tags=this.tags.filter(r=>r!==n&&!r.startsWith(`${n}:`))}getTags(){return this.tags.slice()}setHandler(e){this.handlerType=e}getHandler(){return this.handlerType}setLevel(e){this.level=e}getLevel(){return this.level}}Bm([Va],at.prototype,"logImplementation",null);at.prototype.ok=vt(w.ok);at.prototype.debug=vt(w.debug);at.prototype.info=vt(w.info);at.prototype.notice=vt(w.notice);at.prototype.warn=vt(w.warn);at.prototype.error=vt(w.error);at.prototype.critical=vt(w.critical);at.prototype.alert=vt(w.alert);at.prototype.emerg=vt(w.emerg);function vt(t){return function(e,n,r){let o;pn(t,Ne.http,this)&&(o=he("log")),this.logImplementation(e,n,t,r,o)}}function Yo(){return qt?{}:{view:{referrer:document.referrer,url:window.location.href}}}const $m=32*Mt;function Gm(t,e){t.usePciIntake===!0&&t.site&&t.site!=="datadoghq.com"&&T.warn("PCI compliance for Logs is only available for Datadog organizations in the US1 site. Default intake will be used.");const n=ks(t,e),r=Xo(t.forwardConsoleLogs,ln(F),"Forward Console Logs"),o=Xo(t.forwardReports,ln(ge),"Forward Reports");if(!(!n||!r||!o))return t.forwardErrorsToLogs&&!r.includes(F.error)&&r.push(F.error),b({forwardErrorsToLogs:t.forwardErrorsToLogs!==!1,forwardConsoleLogs:r,forwardReports:o,requestErrorResponseLengthLimit:$m},n)}function Xo(t,e,n){if(t===void 0)return[];if(!(t==="all"||Array.isArray(t)&&t.every(r=>e.includes(r)))){T.error(`${n} should be "all" or an array with allowed values "${e.join('", "')}"`);return}return t==="all"?e:Qu(t)}function jm(t){const e=Ls(t);return b({forward_errors_to_logs:t.forwardErrorsToLogs,forward_console_logs:t.forwardConsoleLogs,forward_reports:t.forwardReports,use_pci_intake:t.usePciIntake},e)}function Hm(t,e,n){const r=bi(),o=jr();sr(o,x.globalContext,r);const s=Gr();sr(s,x.accountContext,r);const i=Hr();sr(i,x.userContext,r);let a,c;const u=e.observable.subscribe(d);function d(){if(!c||!a||!e.isGranted())return;u.unsubscribe();const l=n(a,c);r.drain(l)}return{init(l,f){if(!l){T.error("Missing configuration");return}if(Ns(l.enableExperimentalFeatures),gt()&&(l=Km(l)),a=l,ai(jm(l)),c){In("DD_LOGS",l);return}const p=Gm(l,f);p&&(c=p,xn().subscribe(k),e.tryToInit(p.trackingConsent),d())},get initConfiguration(){return a},globalContext:o,accountContext:s,userContext:i,getInternalContext:k,handleLog(l,f,p,m=t(),h=z()){r.add(_=>_.handleLog(l,f,p,m,h))}}}function Km(t){return H(b({},t),{clientToken:"empty"})}function Wm(t){const e=Cs(),n=Si().observable;let r=Hm(Yo,e,(a,c)=>{const u=t(c,Yo,e,n);return r=qm(a,u),u});const o=()=>r,s={},i=new at((...a)=>r.handleLog(...a));return $s({logger:i,init:a=>{const c=new Error().stack;ht(()=>r.init(a,c))},setTrackingConsent:S(a=>{e.update(a),G({feature:"set-tracking-consent",tracking_consent:a})}),getGlobalContext:P(o,x.globalContext,M.getContext),setGlobalContext:P(o,x.globalContext,M.setContext),setGlobalContextProperty:P(o,x.globalContext,M.setContextProperty),removeGlobalContextProperty:P(o,x.globalContext,M.removeContextProperty),clearGlobalContext:P(o,x.globalContext,M.clearContext),createLogger:S((a,c={})=>(s[a]=new at((...u)=>r.handleLog(...u),N(a),c.handler,c.level,N(c.context)),s[a])),getLogger:S(a=>s[a]),getInitConfiguration:S(()=>Cn(r.initConfiguration)),getInternalContext:S(a=>r.getInternalContext(a)),setUser:P(o,x.userContext,M.setContext),getUser:P(o,x.userContext,M.getContext),setUserProperty:P(o,x.userContext,M.setContextProperty),removeUserProperty:P(o,x.userContext,M.removeContextProperty),clearUser:P(o,x.userContext,M.clearContext),setAccount:P(o,x.accountContext,M.setContext),getAccount:P(o,x.accountContext,M.getContext),setAccountProperty:P(o,x.accountContext,M.setContextProperty),removeAccountProperty:P(o,x.accountContext,M.removeContextProperty),clearAccount:P(o,x.accountContext,M.clearContext)})}function qm(t,e){return b({init:n=>{In("DD_LOGS",n)},initConfiguration:t},e)}const Ym="logs";function Xm(t,e){const n=fi(t,Ym,r=>_a(t,r),e);return{findTrackedSession:(r,o={returnInactive:!1})=>{const s=n.findSession(r,o);return s&&s.trackingType==="1"?{id:s.id,anonymousId:s.anonymousId}:void 0},expireObservable:n.expireObservable}}function Jm(t){const n=_a(t)==="1"?{}:void 0;return{findTrackedSession:()=>n,expireObservable:new R}}function _a(t,e){return Zm(e)?e:wt(t.sessionSampleRate)?"1":"0"}function Zm(t){return t==="0"||t==="1"}function Qm(t,e,n,r,o,s){const i=zm.concat(["custom"]),a={};i.forEach(c=>{a[c]=on(c,o,s)}),e.subscribe(0,({rawLogsEvent:c,messageContext:u=void 0,savedCommonContext:d=void 0,domainContext:l,ddtags:f=[]})=>{var p,m;const h=_n(c.date),_=d||r(),E=n.triggerHook(0,{startTime:h});if(E===ut)return;const D=Nr(t),U=it({view:_.view},E,c,u,{ddtags:D.concat(f).join(",")});((p=t.beforeSend)===null||p===void 0?void 0:p.call(t,U,l))===!1||U.origin!==et.AGENT&&((m=a[U.status])!==null&&m!==void 0?m:a.custom).isLimitReached()||e.notify(1,U)})}const tg={[F.log]:w.info,[F.debug]:w.debug,[F.info]:w.info,[F.warn]:w.warn,[F.error]:w.error};function eg(t,e){const n=_i(t.forwardConsoleLogs).subscribe(r=>{var o;const s={rawLogsEvent:{date:z(),message:r.message,origin:et.CONSOLE,error:r.error&&Mn(r.error),status:tg[r.api]},messageContext:(o=r.error)===null||o===void 0?void 0:o.context,domainContext:{handlingStack:r.handlingStack}};e.notify(0,s)});return{stop:()=>{n.unsubscribe()}}}function ng(t,e){const n=js(t,t.forwardReports).subscribe(r=>{let o=r.message,s;const i=r.originalError.type==="deprecation"?w.warn:w.error;i===w.error?s=Mn(r):r.stack&&(o+=` Found in ${mu(r.stack)}`),e.notify(0,{rawLogsEvent:{date:z(),message:o,origin:et.REPORT,error:s,status:i}})});return{stop:()=>{n.unsubscribe()}}}function rg(t,e){if(!t.forwardErrorsToLogs)return{stop:k};const n=(qt?new R:mi(t)).subscribe(i=>{i.state==="complete"&&s(Wt.XHR,i)}),r=xn({responseBodyAction:i=>o(i)?2:0}).subscribe(i=>{i.state==="resolve"&&s(Wt.FETCH,i)});function o(i){return!xs(i.url)&&(og(i)||Ys(i.status))}function s(i,a){if(!o(a))return;const c="error"in a&&a.error?Fe(Ve(a.error)):a.responseBody||"Failed to load",u={isAborted:a.isAborted,handlingStack:a.handlingStack};e.notify(0,{rawLogsEvent:{message:`${sg(i)} error ${a.method} ${a.url}`,date:a.startClocks.timeStamp,error:{stack:yn(c,t.requestErrorResponseLengthLimit,"..."),handling:void 0},http:{method:a.method,status_code:a.status,url:a.url},status:w.error,origin:et.NETWORK},domainContext:u})}return{stop:()=>{n.unsubscribe(),r.unsubscribe()}}}function og(t){return t.status===0&&t.responseType!=="opaque"}function sg(t){return Wt.XHR===t?"XHR":"Fetch"}function ig(t,e,n){if(!t.forwardErrorsToLogs)return{stop:k};const r=n.subscribe(o=>{if(o.type===0){const s=o.error;e.notify(0,{rawLogsEvent:{message:s.message,date:s.startClocks.timeStamp,error:Mn(s),origin:et.SOURCE,status:w.error},messageContext:s.context})}});return{stop:()=>{r.unsubscribe()}}}const ag=hi;function cg(t){function e(n,r,o,s,i){const a=it(r.getContext(),n.context);if(pn(n.status,Ne.console,r)&&lg(n,a),pn(n.status,Ne.http,r)){const c={rawLogsEvent:{date:i||z(),message:n.message,status:n.status,origin:et.LOGGER},messageContext:a,savedCommonContext:s,ddtags:r.getTags()};o&&(c.domainContext={handlingStack:o}),t.notify(0,c)}}return{handleLog:e}}const ug={[w.ok]:F.debug,[w.debug]:F.debug,[w.info]:F.info,[w.notice]:F.info,[w.warn]:F.warn,[w.error]:F.error,[w.critical]:F.error,[w.alert]:F.error,[w.emerg]:F.error};function lg({status:t,message:e},n){zt[ug[t]].call(lt,e,n)}function dg(t,e,n,r,o){const s=[t.logsEndpointBuilder];t.replica&&s.push(t.replica.logsEndpointBuilder);const i=Dr({encoder:Fr(),request:Mr(s,n),flushController:Ur({pageMayExitObservable:r,sessionExpireObservable:o.expireObservable})});return e.subscribe(1,a=>{i.add(a)}),i}function fg(t){const e=be();t.subscribe(1,n=>{e.send("log",n)})}function pg(t){return{get:e=>{const n=t.findTrackedSession(e);if(n)return{session_id:n.id}}}}function hg(t){return e=>{t.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,origin:et.AGENT,status:w.error}}),ve("Error reported to customer",{"error.message":e.message})}}const mg=si;function gg(t){const e=ct;t.register(0,({startTime:o})=>{const s=n(o);return s||K}),t.register(1,({startTime:o})=>{var s,i;const a=n(o);return a?{application:{id:a.application_id},view:{id:(s=a.view)===null||s===void 0?void 0:s.id},action:{id:(i=a.user_action)===null||i===void 0?void 0:i.id}}:K});function n(o){const i=On()?e.DD_RUM_SYNTHETICS:e.DD_RUM,a=r(o,i);if(a)return a}function r(o,s){if(s&&s.getInternalContext)return s.getInternalContext(o)}}function _g(t,e,n){t.register(0,({startTime:r})=>{const o=n.findTrackedSession(r);return n.findTrackedSession(r,{returnInactive:!0})?{service:e.service,session_id:o?o.id:void 0,session:o?{id:o.id}:void 0}:ut}),t.register(1,({startTime:r})=>{const o=n.findTrackedSession(r);return!o||!o.id?K:{session:{id:o.id}}})}function bg(t,e){function n(){return e.isGranted()?K:ut}t.register(0,n),t.register(1,n)}const hr="logs";function yg(t,e,n,r){const o=new ag,s=mg(),i=[];o.subscribe(1,_=>Pr("logs",_));const a=hg(o),c=qt?new R:oi(t),u=ii("browser-logs-sdk",t,s,a,c,Fr);i.push(u.stop);const d=t.sessionStoreStrategyType&&!gt()&&!On()?Xm(t,n):Jm(t);bg(s,n),_g(s,t,d);const l=yi(s,t,hr),f=Ei(s,t,d,hr),p=vi(s,t,hr,!1);gg(s),rg(t,o),ig(t,o,r),r.unbuffer(),eg(t,o),ng(t,o);const{handleLog:m}=cg(o);if(Qm(t,o,s,e,a),gt())fg(o);else{const{stop:_}=dg(t,o,a,c,d);i.push(()=>_())}const h=pg(d);return{handleLog:m,getInternalContext:h.get,accountContext:l,globalContext:p,userContext:f,stop:()=>{i.forEach(_=>_())}}}const Jr=Wm(yg);Gs(rt(),"DD_LOGS",Jr);var tt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ba={},ya={},va={};Object.defineProperty(va,"__esModule",{value:!0});var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});var Sa={};Object.defineProperty(Sa,"__esModule",{value:!0});var Ta={};Object.defineProperty(Ta,"__esModule",{value:!0});var wa={};Object.defineProperty(wa,"__esModule",{value:!0});var Aa={};Object.defineProperty(Aa,"__esModule",{value:!0});var Ia={};Object.defineProperty(Ia,"__esModule",{value:!0});(function(t){var e=tt&&tt.__createBinding||(Object.create?function(r,o,s,i){i===void 0&&(i=s);var a=Object.getOwnPropertyDescriptor(o,s);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(r,i,a)}:function(r,o,s,i){i===void 0&&(i=s),r[i]=o[s]}),n=tt&&tt.__exportStar||function(r,o){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&e(o,r,s)};Object.defineProperty(t,"__esModule",{value:!0}),n(va,t),n(Ea,t),n(Sa,t),n(Ta,t),n(wa,t),n(Aa,t),n(Ia,t)})(ya);var Ca={},Dn={},Un={exports:{}};function vg(t){try{return JSON.stringify(t)}catch(e){return'"[Circular]"'}}var Eg=Sg;function Sg(t,e,n){var r=n&&n.stringify||vg,o=1;if(typeof t=="object"&&t!==null){var s=e.length+o;if(s===1)return t;var i=new Array(s);i[0]=r(t);for(var a=1;a<s;a++)i[a]=r(e[a]);return i.join(" ")}if(typeof t!="string")return t;var c=e.length;if(c===0)return t;for(var u="",d=1-o,l=-1,f=t&&t.length||0,p=0;p<f;){if(t.charCodeAt(p)===37&&p+1<f){switch(l=l>-1?l:0,t.charCodeAt(p+1)){case 100:case 102:if(d>=c||e[d]==null)break;l<p&&(u+=t.slice(l,p)),u+=Number(e[d]),l=p+2,p++;break;case 105:if(d>=c||e[d]==null)break;l<p&&(u+=t.slice(l,p)),u+=Math.floor(Number(e[d])),l=p+2,p++;break;case 79:case 111:case 106:if(d>=c||e[d]===void 0)break;l<p&&(u+=t.slice(l,p));var m=typeof e[d];if(m==="string"){u+="'"+e[d]+"'",l=p+2,p++;break}if(m==="function"){u+=e[d].name||"<anonymous>",l=p+2,p++;break}u+=r(e[d]),l=p+2,p++;break;case 115:if(d>=c)break;l<p&&(u+=t.slice(l,p)),u+=String(e[d]),l=p+2,p++;break;case 37:l<p&&(u+=t.slice(l,p)),u+="%",l=p+2,p++,d--;break}++d}++p}return l===-1?t:(l<f&&(u+=t.slice(l)),u)}const Jo=Eg;Un.exports=yt;const Pe=Ug().console||{},Tg={mapHttpRequest:Qe,mapHttpResponse:Qe,wrapRequestSerializer:mr,wrapResponseSerializer:mr,wrapErrorSerializer:mr,req:Qe,res:Qe,err:Qo,errWithCause:Qo};function It(t,e){return t==="silent"?1/0:e.levels.values[t]}const Zr=Symbol("pino.logFuncs"),Ir=Symbol("pino.hierarchy"),wg={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Zo(t,e){const n={logger:e,parent:t[Ir]};e[Ir]=n}function Ag(t,e,n){const r={};e.forEach(o=>{r[o]=n[o]?n[o]:Pe[o]||Pe[wg[o]||"log"]||ce}),t[Zr]=r}function Ig(t,e){return Array.isArray(t)?t.filter(function(r){return r!=="!stdSerializers.err"}):t===!0?Object.keys(e):!1}function yt(t){t=t||{},t.browser=t.browser||{};const e=t.browser.transmit;if(e&&typeof e.send!="function")throw Error("pino: transmit option must have a send function");const n=t.browser.write||Pe;t.browser.write&&(t.browser.asObject=!0);const r=t.serializers||{},o=Ig(t.browser.serialize,r);let s=t.browser.serialize;Array.isArray(t.browser.serialize)&&t.browser.serialize.indexOf("!stdSerializers.err")>-1&&(s=!1);const i=Object.keys(t.customLevels||{}),a=["error","fatal","warn","info","debug","trace"].concat(i);typeof n=="function"&&a.forEach(function(h){n[h]=n}),(t.enabled===!1||t.browser.disabled)&&(t.level="silent");const c=t.level||"info",u=Object.create(n);u.log||(u.log=ce),Ag(u,a,n),Zo({},u),Object.defineProperty(u,"levelVal",{get:l}),Object.defineProperty(u,"level",{get:f,set:p});const d={transmit:e,serialize:o,asObject:t.browser.asObject,asObjectBindingsOnly:t.browser.asObjectBindingsOnly,formatters:t.browser.formatters,levels:a,timestamp:Pg(t),messageKey:t.messageKey||"msg",onChild:t.onChild||ce};u.levels=Cg(t),u.level=c,u.isLevelEnabled=function(h){return this.levels.values[h]?this.levels.values[h]>=this.levels.values[this.level]:!1},u.setMaxListeners=u.getMaxListeners=u.emit=u.addListener=u.on=u.prependListener=u.once=u.prependOnceListener=u.removeListener=u.removeAllListeners=u.listeners=u.listenerCount=u.eventNames=u.write=u.flush=ce,u.serializers=r,u._serialize=o,u._stdErrSerialize=s,u.child=function(...h){return m.call(this,d,...h)},e&&(u._logEvent=Cr());function l(){return It(this.level,this)}function f(){return this._level}function p(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,Ft(this,d,u,"error"),Ft(this,d,u,"fatal"),Ft(this,d,u,"warn"),Ft(this,d,u,"info"),Ft(this,d,u,"debug"),Ft(this,d,u,"trace"),i.forEach(_=>{Ft(this,d,u,_)})}function m(h,_,E){if(!_)throw new Error("missing bindings for child Pino");E=E||{},o&&_.serializers&&(E.serializers=_.serializers);const D=E.serializers;if(o&&D){var U=Object.assign({},r,D),y=t.browser.serialize===!0?Object.keys(U):o;delete _.serializers,Qr([_],y,U,this._stdErrSerialize)}function v(O){this._childLevel=(O._childLevel|0)+1,this.bindings=_,U&&(this.serializers=U,this._serialize=y),e&&(this._logEvent=Cr([].concat(O._logEvent.bindings,_)))}v.prototype=this;const g=new v(this);return Zo(this,g),g.child=function(...O){return m.call(this,h,...O)},g.level=E.level||this.level,h.onChild(g),g}return u}function Cg(t){const e=t.customLevels||{},n=Object.assign({},yt.levels.values,e),r=Object.assign({},yt.levels.labels,Rg(e));return{values:n,labels:r}}function Rg(t){const e={};return Object.keys(t).forEach(function(n){e[t[n]]=n}),e}yt.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};yt.stdSerializers=Tg;yt.stdTimeFunctions=Object.assign({},{nullTime:Ra,epochTime:Oa,unixTime:Mg,isoTime:Dg});function Og(t){const e=[];t.bindings&&e.push(t.bindings);let n=t[Ir];for(;n.parent;)n=n.parent,n.logger.bindings&&e.push(n.logger.bindings);return e.reverse()}function Ft(t,e,n,r){if(Object.defineProperty(t,r,{value:It(t.level,n)>It(r,n)?ce:n[Zr][r],writable:!0,enumerable:!0,configurable:!0}),t[r]===ce){if(!e.transmit)return;const s=e.transmit.level||t.level,i=It(s,n);if(It(r,n)<i)return}t[r]=kg(t,e,n,r);const o=Og(t);o.length!==0&&(t[r]=xg(o,t[r]))}function xg(t,e){return function(){return e.apply(this,[...t,...arguments])}}function kg(t,e,n,r){return function(o){return function(){const i=e.timestamp(),a=new Array(arguments.length),c=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Pe?Pe:this;for(var u=0;u<a.length;u++)a[u]=arguments[u];var d=!1;if(e.serialize&&(Qr(a,this._serialize,this.serializers,this._stdErrSerialize),d=!0),e.asObject||e.formatters?o.call(c,...Lg(this,r,a,i,e)):o.apply(c,a),e.transmit){const l=e.transmit.level||t._level,f=It(l,n),p=It(r,n);if(p<f)return;Ng(this,{ts:i,methodLevel:r,methodValue:p,transmitValue:n.levels.values[e.transmit.level||t._level],send:e.transmit.send,val:It(t._level,n)},a,d)}}}(t[Zr][r])}function Lg(t,e,n,r,o){const{level:s,log:i=l=>l}=o.formatters||{},a=n.slice();let c=a[0];const u={};let d=(t._childLevel|0)+1;if(d<1&&(d=1),r&&(u.time=r),s){const l=s(e,t.levels.values[e]);Object.assign(u,l)}else u.level=t.levels.values[e];if(o.asObjectBindingsOnly){if(c!==null&&typeof c=="object")for(;d--&&typeof a[0]=="object";)Object.assign(u,a.shift());return[i(u),...a]}else{if(c!==null&&typeof c=="object"){for(;d--&&typeof a[0]=="object";)Object.assign(u,a.shift());c=a.length?Jo(a.shift(),a):void 0}else typeof c=="string"&&(c=Jo(a.shift(),a));return c!==void 0&&(u[o.messageKey]=c),[i(u)]}}function Qr(t,e,n,r){for(const o in t)if(r&&t[o]instanceof Error)t[o]=yt.stdSerializers.err(t[o]);else if(typeof t[o]=="object"&&!Array.isArray(t[o])&&e)for(const s in t[o])e.indexOf(s)>-1&&s in n&&(t[o][s]=n[s](t[o][s]))}function Ng(t,e,n,r=!1){const o=e.send,s=e.ts,i=e.methodLevel,a=e.methodValue,c=e.val,u=t._logEvent.bindings;r||Qr(n,t._serialize||Object.keys(t.serializers),t.serializers,t._stdErrSerialize===void 0?!0:t._stdErrSerialize),t._logEvent.ts=s,t._logEvent.messages=n.filter(function(d){return u.indexOf(d)===-1}),t._logEvent.level.label=i,t._logEvent.level.value=a,o(i,t._logEvent,c),t._logEvent=Cr(u)}function Cr(t){return{ts:0,messages:[],bindings:t||[],level:{label:"",value:0}}}function Qo(t){const e={type:t.constructor.name,msg:t.message,stack:t.stack};for(const n in t)e[n]===void 0&&(e[n]=t[n]);return e}function Pg(t){return typeof t.timestamp=="function"?t.timestamp:t.timestamp===!1?Ra:Oa}function Qe(){return{}}function mr(t){return t}function ce(){}function Ra(){return!1}function Oa(){return Date.now()}function Mg(){return Math.round(Date.now()/1e3)}function Dg(){return new Date(Date.now()).toISOString()}function Ug(){function t(e){return typeof e!="undefined"&&e}try{return typeof globalThis!="undefined"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(e){return t(self)||t(window)||t(this)||{}}}Un.exports.default=yt;Un.exports.pino=yt;var Vg=Un.exports,Fg=tt&&tt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.createLogger=Bg;const ts=Fg(Vg);function Bg(t,e){return t&&"write"in t?(0,ts.default)({level:"info"},t):(0,ts.default)(b({level:"info"},t),e)}var to={};Object.defineProperty(to,"__esModule",{value:!0});to.createLoggerHttpMiddleware=$g;const zg=Dn;function $g(t){const{logger:e,genReqId:n,logRequest:r=!0}=t!=null?t:{};return(o,s,i)=>{const a=(e!=null?e:(0,zg.createLogger)()).child({req:{reqId:n==null?void 0:n(o),method:o.method,url:o.url,headers:o.headers,params:o.params,query:o.query}});if(o.logger=a,s.logger=a,o.startTime=Date.now(),r){const c=u=>{s.removeListener("error",c),s.removeListener("finish",c),s.removeListener("close",c),s.logger.info({err:u,duration:Date.now()-o.startTime},`Request ${o.method} ${o.url} ${u?"failed":"completed"}`)};s.on("finish",c),s.on("close",c),s.on("error",c)}i()}}(function(t){var e=tt&&tt.__createBinding||(Object.create?function(r,o,s,i){i===void 0&&(i=s);var a=Object.getOwnPropertyDescriptor(o,s);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(r,i,a)}:function(r,o,s,i){i===void 0&&(i=s),r[i]=o[s]}),n=tt&&tt.__exportStar||function(r,o){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&e(o,r,s)};Object.defineProperty(t,"__esModule",{value:!0}),n(Dn,t),n(to,t)})(Ca);(function(t){var e=tt&&tt.__createBinding||(Object.create?function(r,o,s,i){i===void 0&&(i=s);var a=Object.getOwnPropertyDescriptor(o,s);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(r,i,a)}:function(r,o,s,i){i===void 0&&(i=s),r[i]=o[s]}),n=tt&&tt.__exportStar||function(r,o){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&e(o,r,s)};Object.defineProperty(t,"__esModule",{value:!0}),n(ya,t),n(Ca,t)})(ba);Jr.init({clientToken:void 0,site:"datadoghq.com",service:"vwr-loader",env:void 0,version:void 0,forwardErrorsToLogs:!0,sessionSampleRate:100});function Gg(t){const e=t,n=e.msg||"",r=e.error instanceof Error?e.error:void 0,u=e,{msg:o,level:s,time:i,error:a}=u,c=Ke(u,["msg","level","time","error"]);return{msg:n,context:c,errorObj:r}}function tn(t,e,n){const{msg:r,context:o}=Gg(t);console[e](r,o),Jr.logger[n](r,o)}let ue=ba.createLogger({type:"browser",browser:{asObject:!0,formatters:{level(t){return{level:t}}},write:{trace:t=>tn(t,"debug","debug"),debug:t=>tn(t,"debug","debug"),info:t=>tn(t,"info","info"),warn:t=>tn(t,"warn","warn")}}}).child({service:"vwr-loader",env:void 0,platform:void 0});const es=void 0,ns=void 0;function jg(t){var e;try{if(!es||!ns)throw new Error("Datadog credentials not provided");return Ar.init({applicationId:es,clientToken:ns,site:"datadoghq.com",service:(e=t.service)!=null?e:"vwr-loader",env:t.env,version:t.version,sessionSampleRate:100,sessionReplaySampleRate:0,trackResources:!0,trackLongTasks:!0,defaultPrivacyLevel:"mask-user-input",allowFallbackToLocalStorage:!0}),Ar}catch(n){ue.error("Failed to initialize Datadog RUM:",n)}}const Hg={ENV_VARS_MISSING:"ENV_VARS_MISSING"};class $e extends Error{constructor(e,n,r={}){super(n),this.reason=e,this.message=n,this.context=r,this.name="InitializationError",Object.setPrototypeOf(this,$e.prototype)}toJSON(){var e;return H(b({name:this.name,reason:this.reason,message:this.message},this.context),{cause:(e=this.context.cause)==null?void 0:e.message,stack:this.stack})}getContext(){return H(b({},this.context),{reason:this.reason})}}function xa(t){return t instanceof Error&&t.name==="VWRInitializationError"}const Kg=void 0,Wg=void 0,qg=async t=>{const e=performance.now();try{await Yg(t),t==null||t.addAction("vwr:init:complete",{outcome:"success",duration_ms:performance.now()-e})}catch(n){t==null||t.addAction("vwr:init:complete",{outcome:"failure",duration_ms:performance.now()-e});let r="UNKNOWN_ERROR";throw(n instanceof $e||xa(n))&&(r=n.reason),t==null||t.addAction("vwr:fallback",{reason:r,error_type:n instanceof Error?n.name:"UnknownError"}),n}};async function Yg(t){throw new $e(Hg.ENV_VARS_MISSING,"[Shell] Required environment variables not injected (PLATFORM, CONFIG_URL, or CONFIG_FILE)",{configUrl:Kg,configFile:Wg})}const rs=void 0,Xg=void 0,Jg=void 0;function Zg(t){if(t instanceof $e||xa(t))ue.error({context:t.getContext(),error_type:t.name,error:t},`[Shell] FALLBACK TO HUB - ${t.message}`);else{const e=t instanceof Error?t:new Error(String(t));ue.error({reason:e.message,error_type:e.name,error:e},"[Shell] FALLBACK TO HUB - Init failed (unknown error)")}}async function Qg(){var e;ue.info("VWR loader starting init flow");const t=jg({env:"unknown",version:Jg,service:"vwr-loader"});try{await qg(t)}catch(n){try{Zg(n)}finally{let r;const o=((e=new URLSearchParams(window.location.search).get("gameControllerUrl"))==null?void 0:e.trim())||null;o?(r=new URL(o),ue.info({gameControllerUrl:o},"[Shell] Using gameControllerUrl as fallback")):(r=new URL(Xg),r.searchParams.set("volley_platform",rs),ue.info({PLATFORM:rs},"[Shell] No gameControllerUrl, redirecting to Hub")),window.location.href=r.toString()}}}Qg();export{$a as $,Kr as A,n_ as B,cr as C,Sl as D,Cd as E,S as F,sf as G,Pr as H,d_ as I,u_ as J,l_ as K,f_ as L,Bu as M,C as N,st as O,s_ as P,W as Q,I as R,q as S,Rn as T,be as U,Mr as V,gt as W,ve as X,me as Y,xr as Z,Nr as _,wf as a,Ot as a0,rt as a1,T as a2,j as a3,ds as a4,vn as b,i_ as c,Gd as d,Tf as e,Hi as f,a_ as g,r_ as h,e_ as i,of as j,o_ as k,$ as l,Yr as m,Wp as n,c_ as o,Fi as p,bn as q,Sf as r,Ki as s,z as t,kt as u,Nn as v,V as w,qp as x,k as y,dt as z};
1
+ var Hd=Object.defineProperty,Wd=Object.defineProperties;var qd=Object.getOwnPropertyDescriptors;var Ir=Object.getOwnPropertySymbols;var gs=Object.prototype.hasOwnProperty,ms=Object.prototype.propertyIsEnumerable;var hs=(e,t,r)=>t in e?Hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))gs.call(t,r)&&hs(e,r,t[r]);if(Ir)for(var r of Ir(t))ms.call(t,r)&&hs(e,r,t[r]);return e},W=(e,t)=>Wd(e,qd(t));var Or=(e,t)=>{var r={};for(var n in e)gs.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ir)for(var n of Ir(e))t.indexOf(n)<0&&ms.call(e,n)&&(r[n]=e[n]);return r};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var z=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ht=function(e){return e&&e.Math===Math&&e},K=Ht(typeof globalThis=="object"&&globalThis)||Ht(typeof window=="object"&&window)||Ht(typeof self=="object"&&self)||Ht(typeof z=="object"&&z)||Ht(typeof z=="object"&&z)||function(){return this}()||Function("return this")(),yi={},Y=function(e){try{return!!e()}catch(t){return!0}},Yd=Y,Le=!Yd(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Xd=Y,Ei=!Xd(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Jd=Ei,Ar=Function.prototype.call,ve=Jd?Ar.bind(Ar):function(){return Ar.apply(Ar,arguments)},pc={},vc={}.propertyIsEnumerable,hc=Object.getOwnPropertyDescriptor,Zd=hc&&!vc.call({1:2},1);pc.f=Zd?function(t){var r=hc(this,t);return!!r&&r.enumerable}:vc;var dn=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},gc=Ei,mc=Function.prototype,Ho=mc.call,Qd=gc&&mc.bind.bind(Ho,Ho),Z=gc?Qd:function(e){return function(){return Ho.apply(e,arguments)}},_c=Z,ef=_c({}.toString),tf=_c("".slice),lt=function(e){return tf(ef(e),8,-1)},rf=Z,nf=Y,of=lt,Yn=Object,sf=rf("".split),af=nf(function(){return!Yn("z").propertyIsEnumerable(0)})?function(e){return of(e)==="String"?sf(e,""):Yn(e)}:Yn,fn=function(e){return e==null},cf=fn,uf=TypeError,Mt=function(e){if(cf(e))throw new uf("Can't call method on "+e);return e},lf=af,df=Mt,pn=function(e){return lf(df(e))},Xn=typeof document=="object"&&document.all,X=typeof Xn=="undefined"&&Xn!==void 0?function(e){return typeof e=="function"||e===Xn}:function(e){return typeof e=="function"},ff=X,Se=function(e){return typeof e=="object"?e!==null:ff(e)},Jn=K,pf=X,vf=function(e){return pf(e)?e:void 0},vn=function(e,t){return arguments.length<2?vf(Jn[e]):Jn[e]&&Jn[e][t]},hf=Z,Si=hf({}.isPrototypeOf),gf=K,_s=gf.navigator,bs=_s&&_s.userAgent,bc=bs?String(bs):"",yc=K,Zn=bc,ys=yc.process,Es=yc.Deno,Ss=ys&&ys.versions||Es&&Es.version,Ts=Ss&&Ss.v8,he,Zr;Ts&&(he=Ts.split("."),Zr=he[0]>0&&he[0]<4?1:+(he[0]+he[1]));!Zr&&Zn&&(he=Zn.match(/Edge\/(\d+)/),(!he||he[1]>=74)&&(he=Zn.match(/Chrome\/(\d+)/),he&&(Zr=+he[1])));var Ec=Zr,ws=Ec,mf=Y,_f=K,bf=_f.String,Sc=!!Object.getOwnPropertySymbols&&!mf(function(){var e=Symbol("symbol detection");return!bf(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ws&&ws<41}),yf=Sc,Tc=yf&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ef=vn,Sf=X,Tf=Si,wf=Tc,If=Object,wc=wf?function(e){return typeof e=="symbol"}:function(e){var t=Ef("Symbol");return Sf(t)&&Tf(t.prototype,If(e))},Of=String,hn=function(e){try{return Of(e)}catch(t){return"Object"}},Af=X,Cf=hn,Rf=TypeError,Dt=function(e){if(Af(e))return e;throw new Rf(Cf(e)+" is not a function")},xf=Dt,kf=fn,fr=function(e,t){var r=e[t];return kf(r)?void 0:xf(r)},Qn=ve,eo=X,to=Se,Lf=TypeError,Nf=function(e,t){var r,n;if(t==="string"&&eo(r=e.toString)&&!to(n=Qn(r,e))||eo(r=e.valueOf)&&!to(n=Qn(r,e))||t!=="string"&&eo(r=e.toString)&&!to(n=Qn(r,e)))return n;throw new Lf("Can't convert object to primitive value")},Ic={exports:{}},Is=K,$f=Object.defineProperty,Ti=function(e,t){try{$f(Is,e,{value:t,configurable:!0,writable:!0})}catch(r){Is[e]=t}return t},Pf=K,Mf=Ti,Os="__core-js_shared__",As=Ic.exports=Pf[Os]||Mf(Os,{});(As.versions||(As.versions=[])).push({version:"3.47.0",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"});var wi=Ic.exports,Cs=wi,Ii=function(e,t){return Cs[e]||(Cs[e]=t||{})},Df=Mt,Uf=Object,Ut=function(e){return Uf(Df(e))},Ff=Z,Vf=Ut,jf=Ff({}.hasOwnProperty),Te=Object.hasOwn||function(t,r){return jf(Vf(t),r)},Bf=Z,Gf=0,zf=Math.random(),Kf=Bf(1.1.toString),Oc=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Kf(++Gf+zf,36)},Hf=K,Wf=Ii,Rs=Te,qf=Oc,Yf=Sc,Xf=Tc,yt=Hf.Symbol,ro=Wf("wks"),Jf=Xf?yt.for||yt:yt&&yt.withoutSetter||qf,oe=function(e){return Rs(ro,e)||(ro[e]=Yf&&Rs(yt,e)?yt[e]:Jf("Symbol."+e)),ro[e]},Zf=ve,xs=Se,ks=wc,Qf=fr,ep=Nf,tp=oe,rp=TypeError,np=tp("toPrimitive"),op=function(e,t){if(!xs(e)||ks(e))return e;var r=Qf(e,np),n;if(r){if(t===void 0&&(t="default"),n=Zf(r,e,t),!xs(n)||ks(n))return n;throw new rp("Can't convert object to primitive value")}return t===void 0&&(t="number"),ep(e,t)},ip=op,sp=wc,Ac=function(e){var t=ip(e,"string");return sp(t)?t:t+""},ap=K,Ls=Se,Wo=ap.document,cp=Ls(Wo)&&Ls(Wo.createElement),Cc=function(e){return cp?Wo.createElement(e):{}},up=Le,lp=Y,dp=Cc,Rc=!up&&!lp(function(){return Object.defineProperty(dp("div"),"a",{get:function(){return 7}}).a!==7}),fp=Le,pp=ve,vp=pc,hp=dn,gp=pn,mp=Ac,_p=Te,bp=Rc,Ns=Object.getOwnPropertyDescriptor;yi.f=fp?Ns:function(t,r){if(t=gp(t),r=mp(r),bp)try{return Ns(t,r)}catch(n){}if(_p(t,r))return hp(!pp(vp.f,t,r),t[r])};var He={},yp=Le,Ep=Y,xc=yp&&Ep(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Sp=Se,Tp=String,wp=TypeError,_e=function(e){if(Sp(e))return e;throw new wp(Tp(e)+" is not an object")},Ip=Le,Op=Rc,Ap=xc,Cr=_e,$s=Ac,Cp=TypeError,no=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,oo="enumerable",io="configurable",so="writable";He.f=Ip?Ap?function(t,r,n){if(Cr(t),r=$s(r),Cr(n),typeof t=="function"&&r==="prototype"&&"value"in n&&so in n&&!n[so]){var o=Rp(t,r);o&&o[so]&&(t[r]=n.value,n={configurable:io in n?n[io]:o[io],enumerable:oo in n?n[oo]:o[oo],writable:!1})}return no(t,r,n)}:no:function(t,r,n){if(Cr(t),r=$s(r),Cr(n),Op)try{return no(t,r,n)}catch(o){}if("get"in n||"set"in n)throw new Cp("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var xp=Le,kp=He,Lp=dn,kc=xp?function(e,t,r){return kp.f(e,t,Lp(1,r))}:function(e,t,r){return e[t]=r,e},Lc={exports:{}},qo=Le,Np=Te,Nc=Function.prototype,$p=qo&&Object.getOwnPropertyDescriptor,Pp=Np(Nc,"name"),Mp=Pp&&(!qo||qo&&$p(Nc,"name").configurable),Dp={CONFIGURABLE:Mp},Up=Z,Fp=X,Yo=wi,Vp=Up(Function.toString);Fp(Yo.inspectSource)||(Yo.inspectSource=function(e){return Vp(e)});var Oi=Yo.inspectSource,jp=K,Bp=X,Ps=jp.WeakMap,Gp=Bp(Ps)&&/native code/.test(String(Ps)),zp=Ii,Kp=Oc,Ms=zp("keys"),Ai=function(e){return Ms[e]||(Ms[e]=Kp(e))},Ci={},Hp=Gp,$c=K,Wp=Se,qp=kc,ao=Te,co=wi,Yp=Ai,Xp=Ci,Ds="Object already initialized",Xo=$c.TypeError,Jp=$c.WeakMap,Qr,or,en,Zp=function(e){return en(e)?or(e):Qr(e,{})},Qp=function(e){return function(t){var r;if(!Wp(t)||(r=or(t)).type!==e)throw new Xo("Incompatible receiver, "+e+" required");return r}};if(Hp||co.state){var be=co.state||(co.state=new Jp);be.get=be.get,be.has=be.has,be.set=be.set,Qr=function(e,t){if(be.has(e))throw new Xo(Ds);return t.facade=e,be.set(e,t),t},or=function(e){return be.get(e)||{}},en=function(e){return be.has(e)}}else{var ht=Yp("state");Xp[ht]=!0,Qr=function(e,t){if(ao(e,ht))throw new Xo(Ds);return t.facade=e,qp(e,ht,t),t},or=function(e){return ao(e,ht)?e[ht]:{}},en=function(e){return ao(e,ht)}}var Ri={set:Qr,get:or,has:en,enforce:Zp,getterFor:Qp},xi=Z,ev=Y,tv=X,Rr=Te,Jo=Le,rv=Dp.CONFIGURABLE,nv=Oi,Pc=Ri,ov=Pc.enforce,iv=Pc.get,Us=String,Br=Object.defineProperty,sv=xi("".slice),av=xi("".replace),cv=xi([].join),uv=Jo&&!ev(function(){return Br(function(){},"length",{value:8}).length!==8}),lv=String(String).split("String"),dv=Lc.exports=function(e,t,r){sv(Us(t),0,7)==="Symbol("&&(t="["+av(Us(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Rr(e,"name")||rv&&e.name!==t)&&(Jo?Br(e,"name",{value:t,configurable:!0}):e.name=t),uv&&r&&Rr(r,"arity")&&e.length!==r.arity&&Br(e,"length",{value:r.arity});try{r&&Rr(r,"constructor")&&r.constructor?Jo&&Br(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(o){}var n=ov(e);return Rr(n,"source")||(n.source=cv(lv,typeof t=="string"?t:"")),e};Function.prototype.toString=dv(function(){return tv(this)&&iv(this).source||nv(this)},"toString");var fv=Lc.exports,pv=X,vv=He,hv=fv,gv=Ti,ki=function(e,t,r,n){n||(n={});var o=n.enumerable,i=n.name!==void 0?n.name:t;if(pv(r)&&hv(r,i,n),n.global)o?e[t]=r:gv(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(s){}o?e[t]=r:vv.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Mc={},mv=Math.ceil,_v=Math.floor,bv=Math.trunc||function(t){var r=+t;return(r>0?_v:mv)(r)},yv=bv,Ft=function(e){var t=+e;return t!==t||t===0?0:yv(t)},Ev=Ft,Sv=Math.max,Tv=Math.min,wv=function(e,t){var r=Ev(e);return r<0?Sv(r+t,0):Tv(r,t)},Iv=Ft,Ov=Math.min,Dc=function(e){var t=Iv(e);return t>0?Ov(t,9007199254740991):0},Av=Dc,Vt=function(e){return Av(e.length)},Cv=pn,Rv=wv,xv=Vt,kv=function(e){return function(t,r,n){var o=Cv(t),i=xv(o);if(i===0)return!e&&-1;var s=Rv(n,i),a;if(e&&r!==r){for(;i>s;)if(a=o[s++],a!==a)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},Lv={indexOf:kv(!1)},Nv=Z,uo=Te,$v=pn,Pv=Lv.indexOf,Mv=Ci,Fs=Nv([].push),Uc=function(e,t){var r=$v(e),n=0,o=[],i;for(i in r)!uo(Mv,i)&&uo(r,i)&&Fs(o,i);for(;t.length>n;)uo(r,i=t[n++])&&(~Pv(o,i)||Fs(o,i));return o},Li=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Dv=Uc,Uv=Li,Fv=Uv.concat("length","prototype");Mc.f=Object.getOwnPropertyNames||function(t){return Dv(t,Fv)};var Fc={};Fc.f=Object.getOwnPropertySymbols;var Vv=vn,jv=Z,Bv=Mc,Gv=Fc,zv=_e,Kv=jv([].concat),Hv=Vv("Reflect","ownKeys")||function(t){var r=Bv.f(zv(t)),n=Gv.f;return n?Kv(r,n(t)):r},Vs=Te,Wv=Hv,qv=yi,Yv=He,Xv=function(e,t,r){for(var n=Wv(t),o=Yv.f,i=qv.f,s=0;s<n.length;s++){var a=n[s];!Vs(e,a)&&!(r&&Vs(r,a))&&o(e,a,i(t,a))}},Jv=Y,Zv=X,Qv=/#|\.prototype\./,pr=function(e,t){var r=th[eh(e)];return r===nh?!0:r===rh?!1:Zv(t)?Jv(t):!!t},eh=pr.normalize=function(e){return String(e).replace(Qv,".").toLowerCase()},th=pr.data={},rh=pr.NATIVE="N",nh=pr.POLYFILL="P",Vc=pr,xr=K,oh=yi.f,ih=kc,sh=ki,ah=Ti,ch=Xv,uh=Vc,Ne=function(e,t){var r=e.target,n=e.global,o=e.stat,i,s,a,u,c,l;if(n?s=xr:o?s=xr[r]||ah(r,{}):s=xr[r]&&xr[r].prototype,s)for(a in t){if(c=t[a],e.dontCallGetSet?(l=oh(s,a),u=l&&l.value):u=s[a],i=uh(n?a:r+(o?".":"#")+a,e.forced),!i&&u!==void 0){if(typeof c==typeof u)continue;ch(c,u)}(e.sham||u&&u.sham)&&ih(c,"sham",!0),sh(s,a,c,e)}},lh=Ne,lo=K;lh({global:!0,forced:lo.globalThis!==lo},{globalThis:lo});var dh=lt,jc=Array.isArray||function(t){return dh(t)==="Array"},fh=TypeError,ph=9007199254740991,vh=function(e){if(e>ph)throw fh("Maximum allowed index exceeded");return e},hh=lt,gh=Z,Bc=function(e){if(hh(e)==="Function")return gh(e)},js=Bc,mh=Dt,_h=Ei,bh=js(js.bind),Gc=function(e,t){return mh(e),t===void 0?e:_h?bh(e,t):function(){return e.apply(t,arguments)}},yh=jc,Eh=Vt,Sh=vh,Th=Gc,zc=function(e,t,r,n,o,i,s,a){for(var u=o,c=0,l=s?Th(s,a):!1,d,f;c<n;)c in r&&(d=l?l(r[c],c,t):r[c],i>0&&yh(d)?(f=Eh(d),u=zc(e,t,d,f,u,i-1)-1):(Sh(u+1),e[u]=d),u++),c++;return u},Kc=zc,wh=oe,Ih=wh("toStringTag"),Hc={};Hc[Ih]="z";var Oh=String(Hc)==="[object z]",Ah=Oh,Ch=X,Gr=lt,Rh=oe,xh=Rh("toStringTag"),kh=Object,Lh=Gr(function(){return arguments}())==="Arguments",Nh=function(e,t){try{return e[t]}catch(r){}},Ni=Ah?Gr:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Nh(t=kh(e),xh))=="string"?r:Lh?Gr(t):(n=Gr(t))==="Object"&&Ch(t.callee)?"Arguments":n},$h=Z,Ph=Y,Wc=X,Mh=Ni,Dh=vn,Uh=Oi,qc=function(){},Yc=Dh("Reflect","construct"),$i=/^\s*(?:class|function)\b/,Fh=$h($i.exec),Vh=!$i.test(qc),Wt=function(t){if(!Wc(t))return!1;try{return Yc(qc,[],t),!0}catch(r){return!1}},Xc=function(t){if(!Wc(t))return!1;switch(Mh(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Vh||!!Fh($i,Uh(t))}catch(r){return!0}};Xc.sham=!0;var Jc=!Yc||Ph(function(){var e;return Wt(Wt.call)||!Wt(Object)||!Wt(function(){e=!0})||e})?Xc:Wt,Bs=jc,jh=Jc,Bh=Se,Gh=oe,zh=Gh("species"),Gs=Array,Kh=function(e){var t;return Bs(e)&&(t=e.constructor,jh(t)&&(t===Gs||Bs(t.prototype))?t=void 0:Bh(t)&&(t=t[zh],t===null&&(t=void 0))),t===void 0?Gs:t},Hh=Kh,Zc=function(e,t){return new(Hh(e))(t===0?0:t)},Wh=Ne,qh=Kc,Yh=Ut,Xh=Vt,Jh=Ft,Zh=Zc;Wh({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,r=Yh(this),n=Xh(r),o=Zh(r,0);return o.length=qh(o,r,r,n,0,t===void 0?1:Jh(t)),o}});var Qh=Ne,eg=Kc,tg=Dt,rg=Ut,ng=Vt,og=Zc;Qh({target:"Array",proto:!0},{flatMap:function(t){var r=rg(this),n=ng(r),o;return tg(t),o=og(r,0),o.length=eg(o,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),o}});var Pi={},ig=oe,sg=Pi,ag=ig("iterator"),cg=Array.prototype,ug=function(e){return e!==void 0&&(sg.Array===e||cg[ag]===e)},lg=Ni,zs=fr,dg=fn,fg=Pi,pg=oe,vg=pg("iterator"),Qc=function(e){if(!dg(e))return zs(e,vg)||zs(e,"@@iterator")||fg[lg(e)]},hg=ve,gg=Dt,mg=_e,_g=hn,bg=Qc,yg=TypeError,Eg=function(e,t){var r=arguments.length<2?bg(e):t;if(gg(r))return mg(hg(r,e));throw new yg(_g(e)+" is not iterable")},Sg=ve,Ks=_e,Tg=fr,wg=function(e,t,r){var n,o;Ks(e);try{if(n=Tg(e,"return"),!n){if(t==="throw")throw r;return r}n=Sg(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return Ks(n),r},Ig=Gc,Og=ve,Ag=_e,Cg=hn,Rg=ug,xg=Vt,Hs=Si,kg=Eg,Lg=Qc,Ws=wg,Ng=TypeError,zr=function(e,t){this.stopped=e,this.result=t},qs=zr.prototype,eu=function(e,t,r){var n=r&&r.that,o=!!(r&&r.AS_ENTRIES),i=!!(r&&r.IS_RECORD),s=!!(r&&r.IS_ITERATOR),a=!!(r&&r.INTERRUPTED),u=Ig(t,n),c,l,d,f,p,v,h,m=function(S){return c&&Ws(c,"normal"),new zr(!0,S)},E=function(S){return o?(Ag(S),a?u(S[0],S[1],m):u(S[0],S[1])):a?u(S,m):u(S)};if(i)c=e.iterator;else if(s)c=e;else{if(l=Lg(e),!l)throw new Ng(Cg(e)+" is not iterable");if(Rg(l)){for(d=0,f=xg(e);f>d;d++)if(p=E(e[d]),p&&Hs(qs,p))return p;return new zr(!1)}c=kg(e,l)}for(v=i?e.next:c.next;!(h=Og(v,c)).done;){try{p=E(h.value)}catch(S){Ws(c,"throw",S)}if(typeof p=="object"&&p&&Hs(qs,p))return p}return new zr(!1)},$g=Le,Pg=He,Mg=dn,Dg=function(e,t,r){$g?Pg.f(e,t,Mg(0,r)):e[t]=r},Ug=Ne,Fg=eu,Vg=Dg;Ug({target:"Object",stat:!0},{fromEntries:function(t){var r={};return Fg(t,function(n,o){Vg(r,n,o)},{AS_ENTRIES:!0}),r}});var tu={},jg=Uc,Bg=Li,Gg=Object.keys||function(t){return jg(t,Bg)},zg=Le,Kg=xc,Hg=He,Wg=_e,qg=pn,Yg=Gg;tu.f=zg&&!Kg?Object.defineProperties:function(t,r){Wg(t);for(var n=qg(r),o=Yg(r),i=o.length,s=0,a;i>s;)Hg.f(t,a=o[s++],n[a]);return t};var Xg=vn,Jg=Xg("document","documentElement"),Zg=_e,Qg=tu,Ys=Li,em=Ci,tm=Jg,rm=Cc,nm=Ai,Xs=">",Js="<",Zo="prototype",Qo="script",ru=nm("IE_PROTO"),fo=function(){},nu=function(e){return Js+Qo+Xs+e+Js+"/"+Qo+Xs},Zs=function(e){e.write(nu("")),e.close();var t=e.parentWindow.Object;return e=null,t},om=function(){var e=rm("iframe"),t="java"+Qo+":",r;return e.style.display="none",tm.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(nu("document.F=Object")),r.close(),r.F},kr,Kr=function(){try{kr=new ActiveXObject("htmlfile")}catch(t){}Kr=typeof document!="undefined"?document.domain&&kr?Zs(kr):om():Zs(kr);for(var e=Ys.length;e--;)delete Kr[Zo][Ys[e]];return Kr()};em[ru]=!0;var Mi=Object.create||function(t,r){var n;return t!==null?(fo[Zo]=Zg(t),n=new fo,fo[Zo]=null,n[ru]=t):n=Kr(),r===void 0?n:Qg.f(n,r)},im=Y,sm=!im(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),am=Te,cm=X,um=Ut,lm=Ai,dm=sm,Qs=lm("IE_PROTO"),ei=Object,fm=ei.prototype,pm=dm?ei.getPrototypeOf:function(e){var t=um(e);if(am(t,Qs))return t[Qs];var r=t.constructor;return cm(r)&&t instanceof r?r.prototype:t instanceof ei?fm:null},vm=Y,hm=X,gm=Se,ea=pm,mm=ki,_m=oe,ti=_m("iterator"),ct,po,vo;[].keys&&(vo=[].keys(),"next"in vo&&(po=ea(ea(vo)),po!==Object.prototype&&(ct=po)));var bm=!gm(ct)||vm(function(){var e={};return ct[ti].call(e)!==e});bm&&(ct={});hm(ct[ti])||mm(ct,ti,function(){return this});var ym={IteratorPrototype:ct},Em=He.f,Sm=Te,Tm=oe,ta=Tm("toStringTag"),wm=function(e,t,r){e&&!r&&(e=e.prototype),e&&!Sm(e,ta)&&Em(e,ta,{configurable:!0,value:t})},Im=ym.IteratorPrototype,Om=Mi,Am=dn,Cm=wm,Rm=Pi,xm=function(){return this},km=function(e,t,r,n){var o=t+" Iterator";return e.prototype=Om(Im,{next:Am(+!n,r)}),Cm(e,o,!1),Rm[o]=xm,e},Lm=function(e,t){return{value:e,done:t}},Nm=Ni,$m=String,vr=function(e){if(Nm(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return $m(e)},Pm=Se,Mm=lt,Dm=oe,Um=Dm("match"),ou=function(e){var t;return Pm(e)&&((t=e[Um])!==void 0?!!t:Mm(e)==="RegExp")},Fm=K,Vm=Y,ra=Fm.RegExp,jm=!Vm(function(){var e=!0;try{ra(".","d")}catch(u){e=!1}var t={},r="",n=e?"dgimsy":"gimsy",o=function(u,c){Object.defineProperty(t,u,{get:function(){return r+=c,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};e&&(i.hasIndices="d");for(var s in i)o(s,i[s]);var a=Object.getOwnPropertyDescriptor(ra.prototype,"flags").get.call(t);return a!==n||r!==n}),Bm={correct:jm},Gm=_e,iu=function(){var e=Gm(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},zm=ve,Km=Te,Hm=Si,na=Bm,Wm=iu,qm=RegExp.prototype,su=na.correct?function(e){return e.flags}:function(e){return!na.correct&&Hm(qm,e)&&!Km(e,"flags")?zm(Wm,e):e.flags},Ym=Jc,Xm=hn,Jm=TypeError,Zm=function(e){if(Ym(e))return e;throw new Jm(Xm(e)+" is not a constructor")},oa=_e,Qm=Zm,e_=fn,t_=oe,r_=t_("species"),n_=function(e,t){var r=oa(e).constructor,n;return r===void 0||e_(n=oa(r)[r_])?t:Qm(n)},Di=Z,o_=Ft,i_=vr,s_=Mt,a_=Di("".charAt),ia=Di("".charCodeAt),c_=Di("".slice),u_=function(e){return function(t,r){var n=i_(s_(t)),o=o_(r),i=n.length,s,a;return o<0||o>=i?e?"":void 0:(s=ia(n,o),s<55296||s>56319||o+1===i||(a=ia(n,o+1))<56320||a>57343?e?a_(n,o):s:e?c_(n,o,o+2):(s-55296<<10)+(a-56320)+65536)}},l_={charAt:u_(!0)},d_=l_.charAt,f_=function(e,t,r){return t+(r?d_(e,t).length:1)},Ui=Y,p_=K,Fi=p_.RegExp,au=Ui(function(){var e=Fi("a","y");return e.lastIndex=2,e.exec("abcd")!==null});au||Ui(function(){return!Fi("a","y").sticky});var v_=au||Ui(function(){var e=Fi("^r","gy");return e.lastIndex=2,e.exec("str")!==null}),h_={BROKEN_CARET:v_},g_=Y,m_=K,__=m_.RegExp,b_=g_(function(){var e=__(".","s");return!(e.dotAll&&e.test(`
2
+ `)&&e.flags==="s")}),y_=Y,E_=K,S_=E_.RegExp,T_=y_(function(){var e=S_("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Et=ve,gn=Z,w_=vr,I_=iu,O_=h_,A_=Ii,C_=Mi,R_=Ri.get,x_=b_,k_=T_,L_=A_("native-string-replace",String.prototype.replace),tn=RegExp.prototype.exec,ri=tn,N_=gn("".charAt),$_=gn("".indexOf),P_=gn("".replace),ho=gn("".slice),ni=function(){var e=/a/,t=/b*/g;return Et(tn,e,"a"),Et(tn,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),cu=O_.BROKEN_CARET,oi=/()??/.exec("")[1]!==void 0,M_=ni||oi||cu||x_||k_;M_&&(ri=function(t){var r=this,n=R_(r),o=w_(t),i=n.raw,s,a,u,c,l,d,f;if(i)return i.lastIndex=r.lastIndex,s=Et(ri,i,o),r.lastIndex=i.lastIndex,s;var p=n.groups,v=cu&&r.sticky,h=Et(I_,r),m=r.source,E=0,S=o;if(v&&(h=P_(h,"y",""),$_(h,"g")===-1&&(h+="g"),S=ho(o,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&N_(o,r.lastIndex-1)!==`
3
+ `)&&(m="(?: "+m+")",S=" "+S,E++),a=new RegExp("^(?:"+m+")",h)),oi&&(a=new RegExp("^"+m+"$(?!\\s)",h)),ni&&(u=r.lastIndex),c=Et(tn,v?a:r,S),v?c?(c.input=ho(c.input,E),c[0]=ho(c[0],E),c.index=r.lastIndex,r.lastIndex+=c[0].length):r.lastIndex=0:ni&&c&&(r.lastIndex=r.global?c.index+c[0].length:u),oi&&c&&c.length>1&&Et(L_,c[0],a,function(){for(l=1;l<arguments.length-2;l++)arguments[l]===void 0&&(c[l]=void 0)}),c&&p)for(c.groups=d=C_(null),l=0;l<p.length;l++)f=p[l],d[f[0]]=c[f[1]];return c});var D_=ri,sa=ve,U_=_e,F_=X,V_=lt,j_=D_,B_=TypeError,G_=function(e,t){var r=e.exec;if(F_(r)){var n=sa(r,e,t);return n!==null&&U_(n),n}if(V_(e)==="RegExp")return sa(j_,e,t);throw new B_("RegExp#exec called on incompatible receiver")},z_=Ne,K_=ve,uu=Bc,H_=km,Lr=Lm,aa=Mt,lu=Dc,ir=vr,W_=_e,q_=Se,Y_=ou,du=su,X_=fr,J_=ki,Z_=Y,Q_=oe,eb=n_,tb=f_,rb=G_,fu=Ri,rn=Q_("matchAll"),pu="RegExp String",vu=pu+" Iterator",nb=fu.set,ob=fu.getterFor(vu),ca=RegExp.prototype,ib=TypeError,ii=uu("".indexOf),nn=uu("".matchAll),go=!!nn&&!Z_(function(){nn("a",/./)}),sb=H_(function(t,r,n,o){nb(this,{type:vu,regexp:t,string:r,global:n,unicode:o,done:!1})},pu,function(){var t=ob(this);if(t.done)return Lr(void 0,!0);var r=t.regexp,n=t.string,o=rb(r,n);return o===null?(t.done=!0,Lr(void 0,!0)):t.global?(ir(o[0])===""&&(r.lastIndex=tb(n,lu(r.lastIndex),t.unicode)),Lr(o,!1)):(t.done=!0,Lr(o,!1))}),ab=function(e){var t=W_(this),r=ir(e),n=eb(t,RegExp),o=ir(du(t)),i,s,a;return i=new n(n===RegExp?t.source:t,o),s=!!~ii(o,"g"),a=!!~ii(o,"u"),i.lastIndex=lu(t.lastIndex),new sb(i,r,s,a)};z_({target:"String",proto:!0,forced:go},{matchAll:function(t){var r=aa(this),n,o,i,s;if(q_(t)){if(Y_(t)&&(n=ir(aa(du(t))),!~ii(n,"g")))throw new ib("`.matchAll` does not allow non-global regexes");if(go)return nn(r,t);if(i=X_(t,rn),i)return K_(i,t,r)}else if(go)return nn(r,t);return o=ir(r),s=new RegExp(t,"g"),s[rn](o)}});rn in ca||J_(ca,rn,ab);var hu={},ua=Dt,cb=TypeError,ub=function(e){var t,r;this.promise=new e(function(n,o){if(t!==void 0||r!==void 0)throw new cb("Bad Promise constructor");t=n,r=o}),this.resolve=ua(t),this.reject=ua(r)};hu.f=function(e){return new ub(e)};var lb=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},db=K,gu=db.Promise,fb=oe,mu=fb("iterator"),_u=!1;try{var pb=0,la={next:function(){return{done:!!pb++}},return:function(){_u=!0}};la[mu]=function(){return this},Array.from(la,function(){throw 2})}catch(e){}var vb=function(e,t){try{if(!t&&!_u)return!1}catch(o){return!1}var r=!1;try{var n={};n[mu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(o){}return r},qt=K,hb=bc,gb=lt,Nr=function(e){return hb.slice(0,e.length)===e},mb=function(){return Nr("Bun/")?"BUN":Nr("Cloudflare-Workers")?"CLOUDFLARE":Nr("Deno/")?"DENO":Nr("Node.js/")?"NODE":qt.Bun&&typeof Bun.version=="string"?"BUN":qt.Deno&&typeof Deno.version=="object"?"DENO":gb(qt.process)==="process"?"NODE":qt.window&&qt.document?"BROWSER":"REST"}(),_b=K,tr=gu,bb=X,yb=Vc,Eb=Oi,Sb=oe,da=mb,mo=Ec;tr&&tr.prototype;var Tb=Sb("species"),fa=!1,wb=bb(_b.PromiseRejectionEvent),Ib=yb("Promise",function(){var e=Eb(tr),t=e!==String(tr);if(!t&&mo===66)return!0;if(!mo||mo<51||!/native code/.test(e)){var r=new tr(function(i){i(1)}),n=function(i){i(function(){},function(){})},o=r.constructor={};if(o[Tb]=n,fa=r.then(function(){})instanceof n,!fa)return!0}return!t&&(da==="BROWSER"||da==="DENO")&&!wb}),Ob={CONSTRUCTOR:Ib},Ab=gu,Cb=vb,Rb=Ob.CONSTRUCTOR,xb=Rb||!Cb(function(e){Ab.all(e).then(void 0,function(){})}),kb=Ne,Lb=ve,Nb=Dt,$b=hu,Pb=lb,Mb=eu,Db=xb;kb({target:"Promise",stat:!0,forced:Db},{allSettled:function(t){var r=this,n=$b.f(r),o=n.resolve,i=n.reject,s=Pb(function(){var a=Nb(r.resolve),u=[],c=0,l=1;Mb(t,function(d){var f=c++,p=!1;l++,Lb(a,r,d).then(function(v){p||(p=!0,u[f]={status:"fulfilled",value:v},--l||o(u))},function(v){p||(p=!0,u[f]={status:"rejected",reason:v},--l||o(u))})}),--l||o(u)});return s.error&&i(s.value),n.promise}});var Vi=Z,Ub=Ut,Fb=Math.floor,_o=Vi("".charAt),Vb=Vi("".replace),bo=Vi("".slice),jb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Bb=/\$([$&'`]|\d{1,2})/g,Gb=function(e,t,r,n,o,i){var s=r+e.length,a=n.length,u=Bb;return o!==void 0&&(o=Ub(o),u=jb),Vb(i,u,function(c,l){var d;switch(_o(l,0)){case"$":return"$";case"&":return e;case"`":return bo(t,0,r);case"'":return bo(t,s);case"<":d=o[bo(l,1,-1)];break;default:var f=+l;if(f===0)return c;if(f>a){var p=Fb(f/10);return p===0?c:p<=a?n[p-1]===void 0?_o(l,1):n[p-1]+_o(l,1):c}d=n[f-1]}return d===void 0?"":d})},zb=Ne,Kb=ve,ji=Z,pa=Mt,Hb=X,Wb=Se,qb=ou,Yt=vr,Yb=fr,Xb=su,Jb=Gb,Zb=oe,Qb=Zb("replace"),ey=TypeError,yo=ji("".indexOf);ji("".replace);var va=ji("".slice),ty=Math.max;zb({target:"String",proto:!0},{replaceAll:function(t,r){var n=pa(this),o,i,s,a,u,c,l,d,f,p,v=0,h="";if(Wb(t)){if(o=qb(t),o&&(i=Yt(pa(Xb(t))),!~yo(i,"g")))throw new ey("`.replaceAll` does not allow non-global regexes");if(s=Yb(t,Qb),s)return Kb(s,t,n,r)}for(a=Yt(n),u=Yt(t),c=Hb(r),c||(r=Yt(r)),l=u.length,d=ty(1,l),f=yo(a,u);f!==-1;)p=c?Yt(r(u,f,a)):Jb(u,a,f,[],void 0,r),h+=va(a,v,f)+p,v=f+l,f=f+d>a.length?-1:yo(a,u,f+d);return v<a.length&&(h+=va(a,v)),h}});var ry=oe,ny=Mi,oy=He.f,si=ry("unscopables"),ai=Array.prototype;ai[si]===void 0&&oy(ai,si,{configurable:!0,value:ny(null)});var iy=function(e){ai[si][e]=!0},sy=Ne,ay=Ut,cy=Vt,uy=Ft,ly=iy;sy({target:"Array",proto:!0},{at:function(t){var r=ay(this),n=cy(r),o=uy(t),i=o>=0?o:n+o;return i<0||i>=n?void 0:r[i]}});ly("at");var dy=Ne,fy=Z,py=Mt,vy=Ft,hy=vr,gy=Y,my=fy("".charAt),_y=gy(function(){return"𠮷".at(-2)!=="\uD842"});dy({target:"String",proto:!0,forced:_y},{at:function(t){var r=hy(py(this)),n=r.length,o=vy(t),i=o>=0?o:n+o;return i<0||i>=n?void 0:my(r,i)}});(function(e,t){(function(r,n){n()})(z,function(){function r(o){var i=!0,s=!1,a=null,u={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(g){return!!(g&&g!==document&&g.nodeName!=="HTML"&&g.nodeName!=="BODY"&&"classList"in g&&"contains"in g.classList)}function l(g){var b=g.type,C=g.tagName;return!!(C==="INPUT"&&u[b]&&!g.readOnly||C==="TEXTAREA"&&!g.readOnly||g.isContentEditable)}function d(g){g.classList.contains("focus-visible")||(g.classList.add("focus-visible"),g.setAttribute("data-focus-visible-added",""))}function f(g){g.hasAttribute("data-focus-visible-added")&&(g.classList.remove("focus-visible"),g.removeAttribute("data-focus-visible-added"))}function p(g){g.metaKey||g.altKey||g.ctrlKey||(c(o.activeElement)&&d(o.activeElement),i=!0)}function v(g){i=!1}function h(g){c(g.target)&&(i||l(g.target))&&d(g.target)}function m(g){c(g.target)&&(g.target.classList.contains("focus-visible")||g.target.hasAttribute("data-focus-visible-added"))&&(s=!0,window.clearTimeout(a),a=window.setTimeout(function(){s=!1},100),f(g.target))}function E(g){document.visibilityState==="hidden"&&(s&&(i=!0),S())}function S(){document.addEventListener("mousemove",_),document.addEventListener("mousedown",_),document.addEventListener("mouseup",_),document.addEventListener("pointermove",_),document.addEventListener("pointerdown",_),document.addEventListener("pointerup",_),document.addEventListener("touchmove",_),document.addEventListener("touchstart",_),document.addEventListener("touchend",_)}function D(){document.removeEventListener("mousemove",_),document.removeEventListener("mousedown",_),document.removeEventListener("mouseup",_),document.removeEventListener("pointermove",_),document.removeEventListener("pointerdown",_),document.removeEventListener("pointerup",_),document.removeEventListener("touchmove",_),document.removeEventListener("touchstart",_),document.removeEventListener("touchend",_)}function _(g){g.target.nodeName&&g.target.nodeName.toLowerCase()==="html"||(i=!1,D())}document.addEventListener("keydown",p,!0),document.addEventListener("mousedown",v,!0),document.addEventListener("pointerdown",v,!0),document.addEventListener("touchstart",v,!0),document.addEventListener("visibilitychange",E,!0),S(),o.addEventListener("focus",h,!0),o.addEventListener("blur",m,!0),o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host?o.host.setAttribute("data-js-focus-visible",""):o.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=r;var n;try{n=new CustomEvent("focus-visible-polyfill-ready")}catch(o){n=document.createEvent("CustomEvent"),n.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(n)}typeof document!="undefined"&&r(document)})})();const F={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},ye=console,rt={};Object.keys(F).forEach(e=>{rt[e]=ye[e]});const Xt="Datadog Browser SDK:",w={debug:rt.debug.bind(ye,Xt),log:rt.log.bind(ye,Xt),info:rt.info.bind(ye,Xt),warn:rt.warn.bind(ye,Xt),error:rt.error.bind(ye,Xt)},mn="https://docs.datadoghq.com",by=`${mn}/real_user_monitoring/browser/troubleshooting`,Bi="More details:";function bu(e,t){return(...r)=>{try{return e(...r)}catch(n){w.error(t,n)}}}function Ue(e){return e!==0&&Math.random()*100<=e}function St(e,t){return+e.toFixed(t)}function yy(e){return hr(e)&&e>=0&&e<=100}function hr(e){return typeof e=="number"}function sr(e){return y({},e)}function on(e,t){return Object.keys(e).some(r=>e[r]===t)}function We(e){return Object.keys(e).length===0}function yu(e,t){const r={};for(const n of Object.keys(e))r[n]=t(e[n]);return r}function ce(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}const ge=ce(),dt="WorkerGlobalScope"in ge;function Be(e,t){const r=ce();let n;return r.Zone&&typeof r.Zone.__symbol__=="function"&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}let sn,Eu=!1;function Ey(e){sn=e}function Sy(e){Eu=e}function Ty(e,t,r){const n=r.value;r.value=function(...o){return(sn?T(n):n).apply(this,o)}}function T(e){return function(...t){return Oe(e,this,t)}}function Oe(e,t,r){try{return e.apply(t,r)}catch(n){Ge(n)}}function Ge(e){if(ci(e),sn)try{sn(e)}catch(t){ci(t)}}function ci(...e){Eu&&w.error("[MONITOR]",...e)}function J(e,t){return Be(ce(),"setTimeout")(T(e),t)}function le(e){Be(ce(),"clearTimeout")(e)}function jt(e,t){return Be(ce(),"setInterval")(T(e),t)}function _n(e){Be(ce(),"clearInterval")(e)}function ha(e){var t;const r=(t=ge.queueMicrotask)===null||t===void 0?void 0:t.bind(ge);typeof r=="function"?r(T(e)):Promise.resolve().then(T(e))}class x{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(r=>r(t))}addObserver(t){this.observers.push(t),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter(r=>t!==r),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function Su(...e){return new x(t=>{const r=e.map(n=>n.subscribe(o=>t.notify(o)));return()=>r.forEach(n=>n.unsubscribe())})}class Tu extends x{constructor(t){super(),this.maxBufferSize=t,this.buffer=[]}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(t)}subscribe(t){let r=!1;const n={unsubscribe:()=>{r=!0,this.removeObserver(t)}};return ha(()=>{for(const o of this.buffer){if(r)return;t(o)}r||this.addObserver(t)}),n}unbuffer(){ha(()=>{this.maxBufferSize=this.buffer.length=0})}}const Q=1e3,ie=60*Q,wu=60*ie,wy=24*wu,Iu=365*wy;function bn(e){return{relative:e,timeStamp:Oy(e)}}function Iy(e){return{relative:yn(e),timeStamp:e}}function Oy(e){const t=re()-performance.now();return t>gr()?Math.round(qe(t,e)):Cy(e)}function Ay(){return Math.round(re()-qe(gr(),performance.now()))}function O(e){return hr(e)?St(e*1e6,0):e}function re(){return new Date().getTime()}function j(){return re()}function ae(){return performance.now()}function H(){return{relative:ae(),timeStamp:j()}}function Ou(){return{relative:0,timeStamp:gr()}}function B(e,t){return t-e}function qe(e,t){return e+t}function yn(e){return e-gr()}function Cy(e){return Math.round(qe(gr(),e))}function Ry(e){return e<Iu}let Eo;function gr(){var e,t;return Eo===void 0&&(Eo=(t=(e=performance.timing)===null||e===void 0?void 0:e.navigationStart)!==null&&t!==void 0?t:performance.timeOrigin),Eo}function En(e,t,r){const n=r&&r.leading!==void 0?r.leading:!0,o=r&&r.trailing!==void 0?r.trailing:!0;let i=!1,s,a;return{throttled:(...u)=>{if(i){s=u;return}n?e(...u):s=u,i=!0,a=J(()=>{o&&s&&e(...s),i=!1,s=void 0},t)},cancel:()=>{le(a),i=!1,s=void 0}}}function L(){}function ne(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,ne)}const Rt=/([\w-]+)\s*=\s*([^;]+)/g;function ar(e,t){for(Rt.lastIndex=0;;){const r=Rt.exec(e);if(r){if(r[1]===t)return r[2]}else break}}function xy(e){const t=new Map;for(Rt.lastIndex=0;;){const r=Rt.exec(e);if(r){const n=r[1],o=r[2];t.has(n)?t.get(n).push(o):t.set(n,[o])}else break}return t}function ky(e){const t=new Map;for(Rt.lastIndex=0;;){const r=Rt.exec(e);if(r)t.set(r[1],r[2]);else break}return t}function Sn(e,t,r=""){const n=e.charCodeAt(t-1),i=n>=55296&&n<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${r}`}function Ly(){return Au()===0}function GC(){return Au()===1}let $r;function Au(){return $r!=null?$r:$r=Ny()}function Ny(e=window){var t;const r=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(r)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(r)&&!/chrome|android/i.test(r)?1:2}function Gi(e){return Tn(e,location.href).href}function $y(e){try{return!!Tn(e)}catch(t){return!1}}function Py(e){const t=Tn(e).pathname;return t[0]==="/"?t:`/${t}`}function Tn(e,t){const{URL:r}=My();try{return t!==void 0?new r(e,t):new r(e)}catch(n){throw new Error(`Failed to construct URL: ${String(n)}`)}}let So;function My(){if(!So){let e,t;try{e=document.createElement("iframe"),e.style.display="none",document.body.appendChild(e),t=e.contentWindow}catch(r){t=ge}So={URL:t.URL},e==null||e.remove()}return So}function wn(e,t,r=0,n){const o=new Date;o.setTime(o.getTime()+r);const i=`expires=${o.toUTCString()}`,s=n&&n.crossSite?"none":"strict",a=n&&n.domain?`;domain=${n.domain}`:"",u=n&&n.secure?";secure":"",c=n&&n.partitioned?";partitioned":"";document.cookie=`${e}=${t};${i};path=/;samesite=${s}${a}${u}${c}`}function In(e){return ar(document.cookie,e)}function Dy(e){return xy(document.cookie).get(e)||[]}let To;function Fe(e){return To||(To=ky(document.cookie)),To.get(e)}function Cu(e,t){wn(e,"",0,t)}function Uy(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${ne()}`,r="test";wn(t,r,ie,e);const n=In(t)===r;return Cu(t,e),n}catch(t){return w.error(t),!1}}let wo;function Ru(e=location.hostname,t=document.referrer){if(wo===void 0){const r=Fy(e,t);if(r){const n=`dd_site_test_${ne()}`,o="test",i=r.split(".");let s=i.pop();for(;i.length&&!In(n);)s=`${i.pop()}.${s}`,wn(n,o,Q,{domain:s});Cu(n,{domain:s}),wo=s}}return wo}function Fy(e,t){try{return e||Tn(t).hostname}catch(r){}}const Ae="_dd_s";function xu(e,t){for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(t(n,r,e))return n}}function an(e){return Object.values(e)}function zi(e){return Object.entries(e)}const Ye=4*wu,ku=15*ie,Vy=Iu,Lu="0",xt={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},Nu=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Ki="&";function jy(e){return!!e&&(e.indexOf(Ki)!==-1||Nu.test(e))}const By="1";function nt(e,t){const r={isExpired:By};return t.trackAnonymousUser&&(e!=null&&e.anonymousId)&&(r.anonymousId=e==null?void 0:e.anonymousId),r}function Hr(e){return We(e)}function $u(e){return!Hr(e)}function rr(e){return e.isExpired!==void 0||!Gy(e)}function Gy(e){return(e.created===void 0||re()-Number(e.created)<Ye)&&(e.expire===void 0||re()<Number(e.expire))}function Pu(e){e.expire=String(re()+ku)}function ui(e){return zi(e).map(([t,r])=>t==="anonymousId"?`aid=${r}`:`${t}=${r}`).join(Ki)}function On(e){const t={};return jy(e)&&e.split(Ki).forEach(r=>{const n=Nu.exec(r);if(n!==null){const[,o,i]=n;o==="aid"?t.anonymousId=i:t[o]=i}}),t}const zy="_dd",Ky="_dd_r",Hy="_dd_l",Wy="rum",qy="logs";function Yy(e){if(!Fe(Ae)){const r=Fe(zy),n=Fe(Ky),o=Fe(Hy),i={};r&&(i.id=r),o&&/^[01]$/.test(o)&&(i[qy]=o),n&&/^[012]$/.test(n)&&(i[Wy]=n),$u(i)&&(Pu(i),e.persistSession(i))}}const Xy=0;function ga(e){const t=Zy(e);return t&&Uy(t)?{type:xt.COOKIE,cookieOptions:t}:void 0}function Jy(e,t){const r={isLockEnabled:Ly(),persistSession:n=>ma(t,e,n,ku),retrieveSession:()=>Mu(t,e),expireSession:n=>ma(t,e,nt(n,e),Ye)};return Yy(r),r}function ma(e,t,r,n){let o=ui(r);t.betaEncodeCookieOptions&&(o=ui(y(y({},r),We(r)?{}:{c:Du(e)}))),wn(Ae,o,t.trackAnonymousUser?Vy:n,e)}function Mu(e,t){if(t.betaEncodeCookieOptions)return Qy(e);const r=In(Ae);return On(r)}function Zy(e){const t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){const r=Ru();if(!r)return;t.domain=r}return t}function Du(e){const t=e.domain?e.domain.split(".").length-1:0;let r=0;return r|=Xy<<5,r|=t<<1,r|=e.crossSite?1:0,r.toString(16)}function Qy(e){const t=Dy(Ae),r=Du(e);let n;for(const o of t.reverse())if(n=On(o),n.c===r)break;return n==null||delete n.c,n!=null?n:{}}const eE="_dd_test_";function _a(){try{const e=ne(),t=`${eE}${e}`;localStorage.setItem(t,e);const r=localStorage.getItem(t);return localStorage.removeItem(t),e===r?{type:xt.LOCAL_STORAGE}:void 0}catch(e){return}}function tE(e){return{isLockEnabled:!1,persistSession:Uu,retrieveSession:Fu,expireSession:t=>rE(t,e)}}function Uu(e){localStorage.setItem(Ae,ui(e))}function Fu(){const e=localStorage.getItem(Ae);return On(e)}function rE(e,t){Uu(nt(e,t))}const nE=10,oE=100,iE=Q,Vu="--",ju=[];let Wr;function ot(e,t,r=0){var n;const{isLockEnabled:o,persistSession:i,expireSession:s}=t,a=f=>i(W(y({},f),{lock:c})),u=()=>{const v=t.retrieveSession(),{lock:f}=v;return{session:Or(v,["lock"]),lock:f&&!aE(f)?f:void 0}};if(Wr||(Wr=e),e!==Wr){ju.push(e);return}if(o&&r>=oE){ba(t);return}let c,l=u();if(o){if(l.lock){Pr(e,t,r);return}if(c=sE(),a(l.session),l=u(),l.lock!==c){Pr(e,t,r);return}}let d=e.process(l.session);if(o&&(l=u(),l.lock!==c)){Pr(e,t,r);return}if(d&&(rr(d)?s(d):(Pu(d),o?a(d):i(d))),o&&!(d&&rr(d))){if(l=u(),l.lock!==c){Pr(e,t,r);return}i(l.session),d=l.session}(n=e.after)===null||n===void 0||n.call(e,d||l.session),ba(t)}function Pr(e,t,r){J(()=>{ot(e,t,r+1)},nE)}function ba(e){Wr=void 0;const t=ju.shift();t&&ot(t,e)}function sE(){return ne()+Vu+j()}function aE(e){const[,t]=e.split(Vu);return!t||B(Number(t),j())>iE}const ya=Q;function cE(e){switch(e.sessionPersistence){case xt.COOKIE:return ga(e);case xt.LOCAL_STORAGE:return _a();case void 0:{let t=ga(e);return!t&&e.allowFallbackToLocalStorage&&(t=_a()),t}default:w.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function uE(e,t){return e.type===xt.COOKIE?Jy(t,e.cookieOptions):tE(t)}function lE(e,t,r,n,o=uE(e,t)){const i=new x,s=new x,a=new x,u=jt(p,ya);let c;h();const{throttled:l,cancel:d}=En(()=>{ot({process:b=>{if(Hr(b))return;const C=v(b);return m(C),C},after:b=>{$u(b)&&!E()&&_(b),c=b}},o)},ya);function f(){ot({process:b=>E()?v(b):void 0},o)}function p(){const b=o.retrieveSession();rr(b)?ot({process:C=>rr(C)?nt(C,t):void 0,after:v},o):v(b)}function v(b){return rr(b)&&(b=nt(b,t)),E()&&(S(b)?D():(a.notify({previousState:c,newState:b}),c=b)),b}function h(){ot({process:b=>{if(Hr(b))return b.anonymousId=ne(),nt(b,t)},after:b=>{c=b}},o)}function m(b){if(Hr(b))return!1;const C=n(b[r]);b[r]=C,delete b.isExpired,C!==Lu&&!b.id&&(b.id=ne(),b.created=String(re()))}function E(){return(c==null?void 0:c[r])!==void 0}function S(b){return c.id!==b.id||c[r]!==b[r]}function D(){c=nt(c,t),s.notify()}function _(b){c=b,i.notify()}function g(b){ot({process:C=>y(y({},C),b),after:v},o)}return{expandOrRenewSession:l,expandSession:f,getSession:()=>c,renewObservable:i,expireObservable:s,sessionStateUpdateObservable:a,restartSession:h,expire:b=>{d(),b===!1&&c&&delete c.anonymousId,o.expireSession(c),v(nt(c,t))},stop:()=>{_n(u)},updateSessionState:g}}const li={GRANTED:"granted",NOT_GRANTED:"not-granted"};function Bu(e){const t=new x;return{tryToInit(r){e||(e=r)},update(r){e=r,t.notify()},isGranted(){return e===li.GRANTED},observable:t}}function ft(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function cr(e){const t=ft(e);return t==="string"||t==="function"||e instanceof RegExp}function An(e,t,r=!1){return e.some(n=>{try{if(typeof n=="function")return n(t);if(n instanceof RegExp)return n.test(t);if(typeof n=="string")return r?t.startsWith(n):n===t}catch(o){w.error(o)}return!1})}const dE=["chrome-extension://","moz-extension://"];function Ea(e){return dE.some(t=>e.includes(t))}function fE(e,t=""){if(Ea(e))return!1;const n=t.split(`
4
+ `).filter(o=>{const i=o.trim();return i.length&&/^at\s+|@/.test(i)})[1]||"";return Ea(n)}const pE="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",vE="SDK initialized on a non-allowed domain.";function hE(e,t,r=typeof location!="undefined"?location.origin:""){const n=e.allowedTrackingOrigins;if(!n)return fE(r,t)?(w.error(pE),!1):!0;const o=An(n,r);return o||w.error(vE),o}const Gu="datad0g.com",gE="dd0g-gov.com",st="datadoghq.com",mE="datadoghq.eu",_E="ddog-gov.com",bE="pci.browser-intake-datadoghq.com",yE=["ddsource","dd-api-key","dd-request-id"];function De(e,t,r){const n=EE(e,t);return{build(o,i){const s=SE(e,t,o,i,r);return n(s)},trackType:t}}function EE(e,t){const r=`/api/v2/${t}`,n=e.proxy;if(typeof n=="string"){const i=Gi(n);return s=>`${i}?ddforward=${encodeURIComponent(`${r}?${s}`)}`}if(typeof n=="function")return i=>n({path:r,parameters:i});const o=zu(t,e);return i=>`https://${o}${r}?${i}`}function zu(e,t){const{site:r=st,internalAnalyticsSubdomain:n}=t;if(e==="logs"&&t.usePciIntake&&r===st)return bE;if(n&&r===st)return`${n}.${st}`;if(r===gE)return`http-intake.logs.${r}`;const o=r.split("."),i=o.pop();return`browser-intake-${o.join("-")}.${i}`}function SE({clientToken:e,internalAnalyticsSubdomain:t,source:r="browser"},n,o,{retry:i,encoding:s},a=[]){const u=[`ddsource=${r}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.25.2")}`,"dd-evp-origin=browser",`dd-request-id=${ne()}`].concat(a);return s&&u.push(`dd-evp-encoding=${s}`),n==="rum"&&(u.push(`batch_time=${j()}`,`_dd.api=${o}`),i&&u.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`)),t&&u.reverse(),u.join("&")}function TE(e){const t=e.site||st,r=wE(e.source),n=IE(W(y({},e),{site:t,source:r})),o=OE(W(y({},e),{site:t,source:r}));return y({replica:o,site:t,source:r},n)}function wE(e){return e==="flutter"||e==="unity"?e:"browser"}function IE(e){return{logsEndpointBuilder:De(e,"logs"),rumEndpointBuilder:De(e,"rum"),profilingEndpointBuilder:De(e,"profile"),sessionReplayEndpointBuilder:De(e,"replay"),exposuresEndpointBuilder:De(e,"exposures"),flagEvaluationEndpointBuilder:De(e,"flagevaluation")}}function OE(e){if(!e.replica)return;const t=W(y({},e),{site:st,clientToken:e.replica.clientToken});return{logsEndpointBuilder:De(t,"logs"),rumEndpointBuilder:De(t,"rum",[`application.id=${e.replica.applicationId}`])}}function Ku(e){return yE.every(t=>e.includes(t))}const Tt={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},di={ALL:"all",SAMPLED:"sampled"};function Io(e,t){return e!=null&&typeof e!="string"?(w.error(`${t} must be defined as a string`),!1):!0}function AE(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(w.error(`Site should be a valid Datadog site. ${Bi} ${mn}/getting_started/site/.`),!1):!0}function wt(e,t){return e!==void 0&&!yy(e)?(w.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function Hu(e,t){var r,n,o,i,s,a,u,c,l,d;if(!e||!e.clientToken){w.error("Client Token is not configured, we will not send any data.");return}if(e.allowedTrackingOrigins!==void 0&&!Array.isArray(e.allowedTrackingOrigins)){w.error("Allowed Tracking Origins must be an array");return}if(!(!AE(e.site)||!wt(e.sessionSampleRate,"Session")||!wt(e.telemetrySampleRate,"Telemetry")||!wt(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!wt(e.telemetryUsageSampleRate,"Telemetry Usage")||!Io(e.version,"Version")||!Io(e.env,"Env")||!Io(e.service,"Service")||!hE(e,t!=null?t:""))){if(e.trackingConsent!==void 0&&!on(li,e.trackingConsent)){w.error('Tracking Consent should be either "granted" or "not-granted"');return}return y({beforeSend:e.beforeSend&&bu(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:dt?void 0:cE(e),sessionSampleRate:(r=e.sessionSampleRate)!==null&&r!==void 0?r:100,telemetrySampleRate:(n=e.telemetrySampleRate)!==null&&n!==void 0?n:20,telemetryConfigurationSampleRate:(o=e.telemetryConfigurationSampleRate)!==null&&o!==void 0?o:5,telemetryUsageSampleRate:(i=e.telemetryUsageSampleRate)!==null&&i!==void 0?i:5,service:(s=e.service)!==null&&s!==void 0?s:void 0,env:(a=e.env)!==null&&a!==void 0?a:void 0,version:(u=e.version)!==null&&u!==void 0?u:void 0,datacenter:(c=e.datacenter)!==null&&c!==void 0?c:void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(l=e.trackingConsent)!==null&&l!==void 0?l:li.GRANTED,trackAnonymousUser:(d=e.trackAnonymousUser)!==null&&d!==void 0?d:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,betaEncodeCookieOptions:!!e.betaEncodeCookieOptions,variant:e.variant,sdkVersion:e.sdkVersion},TE(e))}}function Wu(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),beta_encode_cookie_options:e.betaEncodeCookieOptions,source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}var ze;(function(e){e.TRACK_INTAKE_REQUESTS="track_intake_requests",e.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",e.FEATURE_OPERATION_VITAL="feature_operation_vital",e.SHORT_SESSION_INVESTIGATION="short_session_investigation",e.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive"})(ze||(ze={}));const Hi=new Set;function qu(e){Array.isArray(e)&&CE(e.filter(t=>on(ze,t)))}function CE(e){e.forEach(t=>{Hi.add(t)})}function mr(e){return Hi.has(e)}function RE(){return Hi}const kt="?";function _r(e){var t,r;const n=[];let o=Oo(e,"stack");const i=String(e);if(o&&o.startsWith(i)&&(o=o.slice(i.length)),o&&o.split(`
5
+ `).forEach(s=>{const a=LE(s)||$E(s)||ME(s)||FE(s);a&&(!a.func&&a.line&&(a.func=kt),n.push(a))}),n.length>0&&GE()&&e instanceof Error){const s=[];let a=e;for(;(a=Object.getPrototypeOf(a))&&Xu(a);){const u=((t=a.constructor)===null||t===void 0?void 0:t.name)||kt;s.push(u)}for(let u=s.length-1;u>=0&&((r=n[0])===null||r===void 0?void 0:r.func)===s[u];u--)n.shift()}return{message:Oo(e,"message"),name:Oo(e,"name"),stack:n}}const Yu="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Lt="(?::(\\d+))",xE=new RegExp(`^\\s*at (.*?) ?\\(${Yu}${Lt}?${Lt}?\\)?\\s*$`,"i"),kE=new RegExp(`\\((\\S*)${Lt}${Lt}\\)`);function LE(e){const t=xE.exec(e);if(!t)return;const r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=kE.exec(t[2]);return n&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||kt,line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}const NE=new RegExp(`^\\s*at ?${Yu}${Lt}?${Lt}??\\s*$`,"i");function $E(e){const t=NE.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:kt,line:t[2]?+t[2]:void 0,url:t[1]}}const PE=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function ME(e){const t=PE.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||kt,line:+t[3],url:t[2]}}const DE=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,UE=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function FE(e){const t=DE.exec(e);if(!t)return;const r=t[3]&&t[3].indexOf(" > eval")>-1,n=UE.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||kt,line:t[4]?+t[4]:void 0,url:t[3]}}function Oo(e,t){if(typeof e!="object"||!e||!(t in e))return;const r=e[t];return typeof r=="string"?r:void 0}function VE(e,t,r,n){if(t===void 0)return;const{name:o,message:i}=BE(e);return{name:o,message:i,stack:[{url:t,column:n,line:r}]}}const jE=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function BE(e){let t,r;return{}.toString.call(e)==="[object String]"&&([,t,r]=jE.exec(e)),{name:t,message:r}}function Xu(e){return String(e.constructor).startsWith("class ")}let Mr;function GE(){if(Mr!==void 0)return Mr;class e extends Error{constructor(){super(),this.name="Error"}}const[t,r]=[e,Error].map(n=>new n);return Mr=Xu(Object.getPrototypeOf(t))&&r.stack!==t.stack,Mr}function Nt(e){const r=new Error(e);r.name="HandlingStack";let n;return Oe(()=>{const o=_r(r);o.stack=o.stack.slice(2),n=br(o)}),n}function br(e){let t=Ju(e);return e.stack.forEach(r=>{const n=r.func==="?"?"<anonymous>":r.func,o=r.args&&r.args.length>0?`(${r.args.join(", ")})`:"",i=r.line?`:${r.line}`:"",s=r.line&&r.column?`:${r.column}`:"";t+=`
6
+ at ${n}${o} @ ${r.url}${i}${s}`}),t}function Ju(e){return`${e.name||"Error"}: ${e.message}`}function Ee(e,t,r,{computeHandlingStack:n}={}){let o=e[t];if(typeof o!="function")if(t in e&&typeof t=="string"&&t.startsWith("on"))o=L;else return{stop:L};let i=!1;const s=function(){if(i)return o.apply(this,arguments);const a=Array.from(arguments);let u;Oe(r,null,[{target:this,parameters:a,onPostCall:l=>{u=l},handlingStack:n?Nt("instrumented method"):void 0}]);const c=o.apply(this,a);return u&&Oe(u,null,[c]),c};return e[t]=s,{stop:()=>{i=!0,e[t]===s&&(e[t]=o)}}}function zC(e,t,r){const n=Object.getOwnPropertyDescriptor(e,t);if(!n||!n.set||!n.configurable)return{stop:L};const o=L;let i=(a,u)=>{J(()=>{i!==o&&r(a,u)},0)};const s=function(a){n.set.call(this,a),i(this,a)};return Object.defineProperty(e,t,{set:s}),{stop:()=>{var a;((a=Object.getOwnPropertyDescriptor(e,t))===null||a===void 0?void 0:a.set)===s&&Object.defineProperty(e,t,n),i=o}}}const Xe=1024,Zu=1024*Xe,zE=/[^\u0000-\u007F]/;function Qu(e){return zE.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function el(e){if(e.length===1)return e[0];const t=e.reduce((o,i)=>o+i.length,0),r=new Uint8Array(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return r}function $t(e,t,r){if(typeof e!="object"||e===null)return JSON.stringify(e);const n=It(Object.prototype),o=It(Array.prototype),i=It(Object.getPrototypeOf(e)),s=It(e);try{return JSON.stringify(e,t,r)}catch(a){return"<error: unable to serialize object>"}finally{n(),o(),i(),s()}}function It(e){const t=e,r=t.toJSON;return r?(delete t.toJSON,()=>{t.toJSON=r}):L}const KE=220*Xe,HE="$",WE=3;function $(e,t=KE){const r=It(Object.prototype),n=It(Array.prototype),o=[],i=new WeakMap,s=Ao(e,HE,void 0,o,i),a=JSON.stringify(s);let u=a?a.length:0;if(u>t){Co(t,"discarded",e);return}for(;o.length>0&&u<t;){const c=o.shift();let l=0;if(Array.isArray(c.source))for(let d=0;d<c.source.length;d++){const f=Ao(c.source[d],c.path,d,o,i);if(f!==void 0?u+=JSON.stringify(f).length:u+=4,u+=l,l=1,u>t){Co(t,"truncated",e);break}c.target[d]=f}else for(const d in c.source)if(Object.prototype.hasOwnProperty.call(c.source,d)){const f=Ao(c.source[d],c.path,d,o,i);if(f!==void 0&&(u+=JSON.stringify(f).length+l+d.length+WE,l=1),u>t){Co(t,"truncated",e);break}c.target[d]=f}}return r(),n(),s}function Ao(e,t,r,n,o){const i=XE(e);if(!i||typeof i!="object")return qE(i);const s=fi(i);if(s!=="[Object]"&&s!=="[Array]"&&s!=="[Error]")return s;const a=e;if(o.has(a))return`[Reference seen at ${o.get(a)}]`;const u=r!==void 0?`${t}.${r}`:t,c=Array.isArray(i)?[]:{};return o.set(a,u),n.push({source:i,target:c,path:u}),c}function qE(e){return typeof e=="bigint"?`[BigInt] ${e.toString()}`:typeof e=="function"?`[Function] ${e.name||"unknown"}`:typeof e=="symbol"?`[Symbol] ${e.description||e.toString()}`:e}function fi(e){try{if(e instanceof Event)return YE(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const r=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(r&&r[1])return`[${r[1]}]`}catch(t){}return"[Unserializable]"}function YE(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?fi(e.currentTarget):null,target:e.target?fi(e.target):null}}function XE(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch(r){}return e}function Co(e,t,r){w.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,r)}const tl="No stack, consider using an instance of Error";function rl({originalError:e,stackTrace:t,source:r,useFallbackStack:n=!0,nonErrorPrefix:o}){const i=Je(e);return!t&&i&&(t=_r(e)),{source:r,type:t?t.name:void 0,message:JE(t,i,o,e),stack:t?br(t):n?tl:void 0}}function Cn({stackTrace:e,originalError:t,handlingStack:r,componentStack:n,startClocks:o,nonErrorPrefix:i,useFallbackStack:s=!0,source:a,handling:u}){const c=rl({originalError:t,stackTrace:e,source:a,useFallbackStack:s,nonErrorPrefix:i});return W(y({startClocks:o,handling:u,handlingStack:r,componentStack:n,originalError:t},c),{causes:Je(t)?tS(t,a):void 0,fingerprint:ZE(t),context:QE(t)})}function JE(e,t,r,n){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":r?`${r} ${$t($(n))}`:$t($(n))}function ZE(e){return Je(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function QE(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function eS(e){var t;return(t=/@ (.+)/.exec(e))===null||t===void 0?void 0:t[1]}function Je(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function tS(e,t){const r=[];let n=e.cause;for(;n!=null&&r.length<10;){const o=rl({originalError:n,source:t,useFallbackStack:!1});r.push(o),n=Je(n)?n.cause:void 0}return r.length?r:void 0}const se={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function rS(){return new x(e=>{const t=(o,i)=>{const s=Cn({stackTrace:i,originalError:o,startClocks:H(),nonErrorPrefix:"Uncaught",source:se.SOURCE,handling:"unhandled"});e.notify(s)},{stop:r}=nS(t),{stop:n}=oS(t);return()=>{r(),n()}})}function nS(e){return Ee(ce(),"onerror",({parameters:[t,r,n,o,i]})=>{let s;Je(i)||(s=VE(t,r,n,o)),e(i!=null?i:t,s)})}function oS(e){return Ee(ce(),"onunhandledrejection",({parameters:[t]})=>{e(t.reason||"Empty reason")})}function nl(e){const t=y({version:"6.25.2",onReady(r){r()}},e);return Object.defineProperty(t,"_setDebug",{get(){return Sy},enumerable:!1}),t}function ol(e,t,r){const n=e[t];n&&!n.q&&n.version&&w.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=r,n&&n.q&&n.q.forEach(o=>bu(o,"onReady callback threw an error:")())}function Rn(e,t){t.silentMultipleInit||w.error(`${e} is already initialized.`)}function U(e,t,r,n,o){return Ke(e,t,[r],n,o)}function Ke(e,t,r,n,{once:o,capture:i,passive:s}={}){const a=T(f=>{!f.isTrusted&&!f.__ddIsTrusted&&!e.allowUntrustedEvents||(o&&d(),n(f))}),u=s?{capture:i,passive:s}:i,c=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,l=Be(c,"addEventListener");r.forEach(f=>l.call(t,f,a,u));function d(){const f=Be(c,"removeEventListener");r.forEach(p=>f.call(t,p,a,u))}return{stop:d}}const Pt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function il(e,t){const r=[];t.includes(Pt.cspViolation)&&r.push(sS(e));const n=t.filter(o=>o!==Pt.cspViolation);return n.length&&r.push(iS(n)),Su(...r)}function iS(e){return new x(t=>{if(!window.ReportingObserver)return;const r=T((o,i)=>o.forEach(s=>t.notify(aS(s)))),n=new window.ReportingObserver(r,{types:e,buffered:!0});return n.observe(),()=>{n.disconnect()}})}function sS(e){return new x(t=>{const{stop:r}=U(e,document,"securitypolicyviolation",n=>{t.notify(cS(n))});return r})}function aS(e){const{type:t,body:r}=e;return sl({type:r.id,message:`${t}: ${r.message}`,originalError:e,stack:al(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)})}function cS(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return sl({type:e.effectiveDirective,message:`${Pt.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:al(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Sn(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function sl(e){return y({startClocks:H(),source:se.REPORT,handling:"unhandled"},e)}function al(e,t,r,n,o){return r?br({name:e,message:t,stack:[{func:"?",url:r,line:n!=null?n:void 0,column:o!=null?o:void 0}]}):void 0}const uS=200;function Wi(e){const{env:t,service:r,version:n,datacenter:o,sdkVersion:i,variant:s}=e,a=[tt("sdk_version",i!=null?i:"6.25.2")];return t&&a.push(tt("env",t)),r&&a.push(tt("service",r)),n&&a.push(tt("version",n)),o&&a.push(tt("datacenter",o)),s&&a.push(tt("variant",s)),a}function tt(e,t){const r=t?`${e}:${t}`:e;return(r.length>uS||lS(r))&&w.warn(`Tag ${r} doesn't meet tag requirements and will be sanitized. ${Bi} ${mn}/getting_started/tagging/#defining-tags`),cl(r)}function cl(e){return e.replace(/,/g,"_")}function lS(e){return dS()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function dS(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch(e){return!1}}function qi(e,t){const r=ge.__ddBrowserSdkExtensionCallback;r&&r({type:e,payload:t})}function cn(e,t,r=fS()){if(t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const o=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,o)}if(r.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const o=Array.isArray(e)?e:[];for(let i=0;i<t.length;++i)o[i]=cn(o[i],t[i],r);return o}const n=ft(e)==="object"?e:{};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=cn(n[o],t[o],r));return n}function xn(e){return cn(void 0,e)}function fe(...e){let t;for(const r of e)r!=null&&(t=cn(t,r));return t}function fS(){if(typeof WeakSet!="undefined"){const t=new WeakSet;return{hasAlreadyBeenSeen(r){const n=t.has(r);return n||t.add(r),n}}}const e=[];return{hasAlreadyBeenSeen(t){const r=e.indexOf(t)>=0;return r||e.push(t),r}}}function ul(){var e;const t=ge.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:(e=t.connection)===null||e===void 0?void 0:e.effectiveType}}function ll(e){return e>=500}function pS(e){try{return e.clone()}catch(t){return}}const vS=80*Xe,hS=32,dl=20*Zu,gS=ie,fl=Q;function pl(e,t,r,n,o,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?hl(e,t,r,i,{onSuccess:()=>gl(0,t,r,n,o,i),onFailure:()=>{t.queuedPayloads.enqueue(e)||i.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e}),vl(t,r,n,o,i)}}):t.queuedPayloads.enqueue(e)||i.notify({type:"queue-full",bandwidth:t.bandwidthMonitor.stats(),payload:e})}function vl(e,t,r,n,o){e.transportStatus===2&&J(()=>{const i=e.queuedPayloads.first();hl(i,e,t,o,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=fl,gl(1,e,t,r,n,o)},onFailure:()=>{e.currentBackoffTime=Math.min(gS,e.currentBackoffTime*2),vl(e,t,r,n,o)}})},e.currentBackoffTime)}function hl(e,t,r,n,{onSuccess:o,onFailure:i}){t.bandwidthMonitor.add(e),r(e,s=>{t.bandwidthMonitor.remove(e),mS(s)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:s.status},n.notify({type:"failure",bandwidth:t.bandwidthMonitor.stats(),payload:e}),i()):(t.transportStatus=0,n.notify({type:"success",bandwidth:t.bandwidthMonitor.stats(),payload:e}),o())})}function gl(e,t,r,n,o,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(o({message:`Reached max ${n} events size queued for upload: ${dl/Zu}MiB`,source:se.AGENT,startClocks:H()}),t.queueFullReported=!0);const s=t.queuedPayloads;for(t.queuedPayloads=ml();s.size()>0;)pl(s.dequeue(),t,r,n,o,i)}function mS(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||ll(e.status))}function _S(){return{transportStatus:0,currentBackoffTime:fl,bandwidthMonitor:bS(),queuedPayloads:ml(),queueFullReported:!1}}function ml(){const e=[];return{bytesCount:0,enqueue(t){return this.isFull()?!1:(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=dl}}}function bS(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=vS&&this.ongoingRequestCount<hS},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}const pi=16*Xe;function Yi(e,t,r=pi){const n=new x,o=_S();return{observable:n,send:i=>{for(const s of e)pl(i,o,(a,u)=>{mr(ze.AVOID_FETCH_KEEPALIVE)?un(s,a,u):SS(s,r,a,u)},s.trackType,t,n)},sendOnExit:i=>{for(const s of e)yS(s,r,i)}}}function yS(e,t,r){if(!!navigator.sendBeacon&&r.bytesCount<t)try{const o=e.build("beacon",r);if(navigator.sendBeacon(o,r.data))return}catch(o){ES(o)}un(e,r)}let Sa=!1;function ES(e){Sa||(Sa=!0,Ge(e))}function SS(e,t,r,n){if(TS()&&r.bytesCount<t){const i=e.build("fetch-keepalive",r);fetch(i,{method:"POST",body:r.data,keepalive:!0,mode:"cors"}).then(T(s=>n==null?void 0:n({status:s.status,type:s.type}))).catch(T(()=>un(e,r,n)))}else un(e,r,n)}function un(e,t,r){const n=e.build("fetch",t);fetch(n,{method:"POST",body:t.data,mode:"cors"}).then(T(o=>r==null?void 0:r({status:o.status,type:o.type}))).catch(T(()=>r==null?void 0:r({status:0})))}function TS(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(e){return!1}}function Bt(){const e=wS();if(e)return{getCapabilities(){var t;return JSON.parse(((t=e.getCapabilities)===null||t===void 0?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return(t=e.getPrivacyLevel)===null||t===void 0?void 0:t.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,r,n){const o=n?{id:n}:void 0;e.send(JSON.stringify({eventType:t,event:r,view:o}))}}}function _l(e){const t=Bt();return!!t&&t.getCapabilities().includes(e)}function Ce(e){var t;e===void 0&&(e=(t=ce().location)===null||t===void 0?void 0:t.hostname);const r=Bt();return!!r&&r.getAllowedWebViewHosts().some(n=>e===n||e.endsWith(`.${n}`))}function wS(){return ce().DatadogEventBridge}const Ot={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function bl(e){return new x(t=>{const{stop:r}=Ke(e,window,["visibilitychange","freeze"],o=>{o.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:Ot.HIDDEN}):o.type==="freeze"&&t.notify({reason:Ot.FROZEN})},{capture:!0}),n=U(e,window,"beforeunload",()=>{t.notify({reason:Ot.UNLOADING})}).stop;return()=>{r(),n()}})}function IS(e){return an(Ot).includes(e)}const Ta=256*Xe;function Xi({encoder:e,request:t,flushController:r}){let n={};const o=r.flushObservable.subscribe(l=>c(l));function i(l,d,f){r.notifyBeforeAddMessage(d),f!==void 0?(n[f]=l,r.notifyAfterAddMessage()):e.write(e.isEmpty?l:`
7
+ ${l}`,p=>{r.notifyAfterAddMessage(p-d)})}function s(l){return l!==void 0&&n[l]!==void 0}function a(l){const d=n[l];delete n[l];const f=e.estimateEncodedBytesCount(d);r.notifyAfterRemoveMessage(f)}function u(l,d){const f=$t(l),p=e.estimateEncodedBytesCount(f);if(p>=Ta){w.warn(`Discarded a message whose size was bigger than the maximum allowed size ${Ta/Xe}KiB. ${Bi} ${by}/#technical-limitations`);return}s(d)&&a(d),i(f,p,d)}function c(l){const d=an(n).join(`
8
+ `);n={};const f=IS(l.reason),p=f?t.sendOnExit:t.send;if(f&&e.isAsync){const v=e.finishSync();v.outputBytesCount&&p(wa(v));const h=[v.pendingData,d].filter(Boolean).join(`
9
+ `);h&&p({data:h,bytesCount:Qu(h)})}else d&&e.write(e.isEmpty?d:`
10
+ ${d}`),e.finish(v=>{p(wa(v))})}return{flushController:r,add:u,upsert:u,stop:o.unsubscribe}}function wa(e){let t;return typeof e.output=="string"?t=e.output:t=new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}const OS=30*Q,AS=dt?1:50;function Ji({pageMayExitObservable:e,sessionExpireObservable:t}){const r=e.subscribe(d=>a(d.reason)),n=t.subscribe(()=>a("session_expire")),o=new x(()=>()=>{r.unsubscribe(),n.unsubscribe()});let i=0,s=0;function a(d){if(s===0)return;const f=s,p=i;s=0,i=0,l(),o.notify({reason:d,messagesCount:f,bytesCount:p})}let u;function c(){u===void 0&&(u=J(()=>{a("duration_limit")},OS))}function l(){le(u),u=void 0}return{flushObservable:o,get messagesCount(){return s},notifyBeforeAddMessage(d){i+d>=pi&&a("bytes_limit"),s+=1,i+=d,c()},notifyAfterAddMessage(d=0){i+=d,s>=AS?a("messages_limit"):i>=pi&&a("bytes_limit")},notifyAfterRemoveMessage(d){i-=d,s-=1,s===0&&l()}}}const me="DISCARDED",q="SKIPPED";function yl(){const e={};return{register(t,r){return e[t]||(e[t]=[]),e[t].push(r),{unregister:()=>{e[t]=e[t].filter(n=>n!==r)}}},triggerHook(t,r){const n=e[t]||[],o=[];for(const i of n){const s=i(r);if(s===me)return me;s!==q&&o.push(s)}return fe(...o)}}}const je={LOG:"log",CONFIGURATION:"configuration",USAGE:"usage"},CS=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],RS=1,xS=[_E],kS=15;let Ro;function Gt(){return Ro||(Ro=new Tu(100)),Ro}function El(e,t,r,n,o,i){const s=new x,{stop:a}=NS(t,n,o,i,s),{enabled:u,metricsEnabled:c}=LS(e,t,r,s);return{stop:a,enabled:u,metricsEnabled:c}}function LS(e,t,r,n,o=RS,i=kS){const s={},a=!xS.includes(t.site)&&Ue(t.telemetrySampleRate),u={[je.LOG]:a,[je.CONFIGURATION]:a&&Ue(t.telemetryConfigurationSampleRate),[je.USAGE]:a&&Ue(t.telemetryUsageSampleRate),metric:a&&Ue(o)},c=$S(),l=Gt();return l.subscribe(({rawEvent:f,metricName:p})=>{if(p&&!u.metric||!u[f.type])return;const v=p||f.status||f.type;let h=s[v];if(h||(h=s[v]=new Set),h.size>=i)return;const m=$t(f);if(h.has(m))return;const E=r.triggerHook(1,{startTime:H().relative});if(E===me)return;const S=d(E,e,f,c);n.notify(S),qi("telemetry",S),h.add(m)}),l.unbuffer(),Ey(Zi),{enabled:a,metricsEnabled:u.metric};function d(f,p,v,h){const E={type:"telemetry",date:H().timeStamp,service:p,version:"6.25.2",source:"browser",_dd:{format_version:2},telemetry:fe(v,{runtime_env:h,connectivity:ul(),sdk_setup:"npm"}),ddtags:Wi(t).join(","),experimental_features:Array.from(RE())};return fe(E,f)}}function NS(e,t,r,n,o){const i=[];if(Ce()){const s=Bt(),a=o.subscribe(u=>s.send("internal_telemetry",u));i.push(a.unsubscribe)}else{const s=[e.rumEndpointBuilder];e.replica&&PS(e)&&s.push(e.replica.rumEndpointBuilder);const a=Xi({encoder:n(4),request:Yi(s,t),flushController:Ji({pageMayExitObservable:r,sessionExpireObservable:new x})});i.push(a.stop);const u=o.subscribe(a.add);i.push(u.unsubscribe)}return{stop:()=>i.forEach(s=>s())}}function $S(){var e;return{is_local_file:((e=ge.location)===null||e===void 0?void 0:e.protocol)==="file:",is_worker:dt}}function PS(e){return e.site===Gu}function zt(e,t){ci(F.debug,e,t),Gt().notify({rawEvent:y({type:je.LOG,message:e,status:"debug"},t)})}function Zi(e,t){Gt().notify({rawEvent:y(y({type:je.LOG,status:"error"},MS(e)),t)})}function Sl(e){Gt().notify({rawEvent:{type:je.CONFIGURATION,configuration:e}})}function kn(e,t){Gt().notify({rawEvent:y({type:je.LOG,message:e,status:"debug"},t),metricName:e})}function G(e){Gt().notify({rawEvent:{type:je.USAGE,usage:e}})}function MS(e){if(Je(e)){const t=_r(e);return{error:{kind:t.name,stack:br(DS(t))},message:t.message}}return{error:{stack:tl},message:`Uncaught ${$t(e)}`}}function DS(e){return e.stack=e.stack.filter(t=>!t.url||CS.some(r=>t.url.startsWith(r))),e}function US(e){const t=new Set;return e.forEach(r=>t.add(r)),Array.from(t)}function Tl(e,t){const r=e.indexOf(t);r>=0&&e.splice(r,1)}function at(e){return Array.isArray(e)&&e.length>0}const Dr=1/0,FS=ie;let Jt=null;const qr=new Set;function VS(){qr.forEach(e=>e())}function pt({expireDelay:e,maxEntries:t}){let r=[];Jt||(Jt=jt(()=>VS(),FS));const n=()=>{const l=ae()-e;for(;r.length>0&&r[r.length-1].endTime<l;)r.pop()};qr.add(n);function o(l,d){const f={value:l,startTime:d,endTime:Dr,remove:()=>{Tl(r,f)},close:p=>{f.endTime=p}};return t&&r.length>=t&&r.pop(),r.unshift(f),f}function i(l=Dr,d={returnInactive:!1}){for(const f of r)if(f.startTime<=l){if(d.returnInactive||l<=f.endTime)return f.value;break}}function s(l){const d=r[0];d&&d.endTime===Dr&&d.close(l)}function a(l=Dr,d=0){const f=qe(l,d);return r.filter(p=>p.startTime<=f&&l<=p.endTime).map(p=>p.value)}function u(){r=[]}function c(){qr.delete(n),qr.size===0&&Jt&&(_n(Jt),Jt=null)}return{add:o,find:i,closeActive:s,findAll:a,reset:u,stop:c}}const jS="datadog-synthetics-public-id",BS="datadog-synthetics-result-id",GS="datadog-synthetics-injects-rum";function Ln(){return dt?!1:!!(ge._DATADOG_SYNTHETICS_INJECTS_RUM||Fe(GS))}function wl(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Fe(jS);return typeof e=="string"?e:void 0}function Il(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||Fe(BS);return typeof e=="string"?e:void 0}function Ol(){return!!(wl()&&Il())}const zS=ie,KS=Ye;function Al(e,t,r,n){const o=new x,i=new x,s=lE(e.sessionStoreStrategyType,e,t,r),a=pt({expireDelay:KS});if(s.renewObservable.subscribe(()=>{a.add(u(),ae()),o.notify()}),s.expireObservable.subscribe(()=>{i.notify(),a.closeActive(ae())}),s.expandOrRenewSession(),a.add(u(),Ou().relative),mr(ze.SHORT_SESSION_INVESTIGATION)){const c=s.getSession();c&&XS(e,c)}n.observable.subscribe(()=>{n.isGranted()?s.expandOrRenewSession():s.expire(!1)}),HS(e,()=>{n.isGranted()&&s.expandOrRenewSession()}),WS(e,()=>s.expandSession()),qS(e,()=>s.restartSession());function u(){const c=s.getSession();return c?{id:c.id,trackingType:c[t],isReplayForced:!!c.forcedReplay,anonymousId:c.anonymousId}:(YS(e).catch(()=>{}),{id:"invalid",trackingType:Lu,isReplayForced:!1,anonymousId:void 0})}return{findSession:(c,l)=>a.find(c,l),renewObservable:o,expireObservable:i,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}function HS(e,t){const{stop:r}=Ke(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function WS(e,t){const r=()=>{document.visibilityState==="visible"&&t()},{stop:n}=U(e,document,"visibilitychange",r);jt(r,zS)}function qS(e,t){const{stop:r}=U(e,window,"resume",t,{capture:!0})}async function YS(e){const t=e.sessionStoreStrategyType;if(!t)return;let r,n;t.type===xt.COOKIE?(r=Mu(t.cookieOptions,e),n={cookie:await Cl(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):r=Fu(),zt("Unexpected session state",y({sessionStoreStrategyType:t.type,session:r,isSyntheticsTest:Ol(),createdTimestamp:r==null?void 0:r.created,expireTimestamp:r==null?void 0:r.expire},n))}function XS(e,t){if(!window.cookieStore||!t.created)return;const r=Number(t.created),n=re(),{stop:o}=U(e,cookieStore,"change",i);function i(s){const a=xu(s.changed,c=>c.name===Ae);if(!a)return;const u=re()-r;if(u>14*ie)o();else{const c=On(a.value);if(c.id&&c.id!==t.id){o();const l=re()-n;Cl().then(d=>{zt("Session cookie changed",{time:l,session_age:u,old:t,new:c,cookie:d})}).catch(Ge)}}}}async function Cl(){let e;return"cookieStore"in window?e=await window.cookieStore.getAll(Ae):e=document.cookie.split(/\s*;\s*/).filter(t=>t.startsWith(Ae)),y({count:e.length,domain:Ru()||"undefined"},e)}function Qi(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(r,n){const o=Qu(r);t+=o,e+=r,n&&n(o)},finish(r){r(this.finishSync())},finishSync(){const r={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,r},estimateEncodedBytesCount(r){return r.length}}}class Rl{constructor(){this.callbacks={}}notify(t,r){const n=this.callbacks[t];n&&n.forEach(o=>o(r))}subscribe(t,r){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(r),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(n=>r!==n)}}}}const JS=3e3;function Yr(e,t,r=JS){let n=0,o=!1;return{isLimitReached(){if(n===0&&J(()=>{n=0},ie),n+=1,n<=r||o)return o=!1,!1;if(n===r+1){o=!0;try{t({message:`Reached max number of ${e}s by minute: ${r}`,source:se.AGENT,startClocks:H()})}finally{o=!1}}return!0}}}function es(e,t,r){return document.readyState===t||document.readyState==="complete"?(r(),{stop:L}):U(e,window,t==="complete"?"load":"DOMContentLoaded",r,{once:!0})}function ZS(e,t){return new Promise(r=>{es(e,t,r)})}let xo;const ts=new WeakMap;function xl(e){return xo||(xo=QS(e)),xo}function QS(e){return new x(t=>{const{stop:r}=Ee(XMLHttpRequest.prototype,"open",eT),{stop:n}=Ee(XMLHttpRequest.prototype,"send",i=>{tT(i,e,t)},{computeHandlingStack:!0}),{stop:o}=Ee(XMLHttpRequest.prototype,"abort",rT);return()=>{r(),n(),o()}})}function eT({target:e,parameters:[t,r]}){ts.set(e,{state:"open",method:String(t).toUpperCase(),url:Gi(String(r))})}function tT({target:e,parameters:[t],handlingStack:r},n,o){const i=ts.get(e);if(!i)return;const s=i;s.state="start",s.startClocks=H(),s.isAborted=!1,s.xhr=e,s.handlingStack=r,s.requestBody=t;let a=!1;const{stop:u}=Ee(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),u(),a)return;a=!0;const d=i;d.state="complete",d.duration=B(s.startClocks.timeStamp,j()),d.status=e.status,typeof e.response=="string"&&(d.responseBody=e.response),o.notify(sr(d))},{stop:l}=U(n,e,"loadend",c);o.notify(s)}function rT({target:e}){const t=ts.get(e);t&&(t.isAborted=!0)}async function nT(e,t){const r=e.getReader(),n=[];for(;;){const o=await r.read();if(o.done)break;t.collectStreamBody&&n.push(o.value)}return r.cancel().catch(L),t.collectStreamBody?el(n):void 0}let ko;const kl=[];function Nn({responseBodyAction:e}={}){return e&&kl.push(e),ko||(ko=oT()),ko}function oT(){return new x(e=>{if(!ge.fetch)return;const{stop:t}=Ee(ge,"fetch",r=>iT(r,e),{computeHandlingStack:!0});return t})}function iT({parameters:e,onPostCall:t,handlingStack:r},n){const[o,i]=e;let s=i&&i.method;s===void 0&&o instanceof Request&&(s=o.method);const a=s!==void 0?String(s).toUpperCase():"GET",u=o instanceof Request?o.url:Gi(String(o)),c=H(),l={state:"start",init:i,input:o,method:a,startClocks:c,url:u,handlingStack:r};n.notify(l),e[0]=l.input,e[1]=l.init,t(d=>{sT(n,d,l).catch(Ge)})}async function sT(e,t,r){var n,o;const i=r;i.state="resolve";let s;try{s=await t}catch(u){i.status=0,i.isAborted=((o=(n=i.init)===null||n===void 0?void 0:n.signal)===null||o===void 0?void 0:o.aborted)||u instanceof DOMException&&u.code===DOMException.ABORT_ERR,i.error=u,e.notify(i);return}i.response=s,i.status=s.status,i.responseType=s.type,i.isAborted=!1;const a=kl.reduce((u,c)=>Math.max(u,c(i)),0);if(a!==0){const u=pS(s);if(u&&u.body)try{const c=await nT(u.body,{collectStreamBody:a===2});i.responseBody=c&&new TextDecoder().decode(c)}catch(c){}}e.notify(i)}function aT(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const r=window.requestIdleCallback(T(e),t);return()=>window.cancelIdleCallback(r)}return uT(e)}const cT=50;function uT(e){const t=re(),r=J(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,cT-(re()-t))})},0);return()=>le(r)}const lT=Q,dT=30;function fT(){const e=[];function t(n){let o;if(n.didTimeout){const i=performance.now();o=()=>dT-(performance.now()-i)}else o=n.timeRemaining.bind(n);for(;o()>0&&e.length;)e.shift()();e.length&&r()}function r(){aT(t,{timeout:lT})}return{push(n){e.push(n)===1&&r()},stop(){e.length=0}}}let Lo={};function Ll(e){const t=e.map(r=>(Lo[r]||(Lo[r]=pT(r)),Lo[r]));return Su(...t)}function pT(e){return new x(t=>{const r=ye[e];return ye[e]=(...n)=>{r.apply(console,n);const o=Nt("console error");Oe(()=>{t.notify(vT(n,e,o))})},()=>{ye[e]=r}})}function vT(e,t,r){const n=e.map(o=>hT(o)).join(" ");if(t===F.error){const o=e.find(Je),i=Cn({originalError:o,handlingStack:r,startClocks:H(),source:se.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return i.message=n,{api:t,message:n,handlingStack:r,error:i}}return{api:t,message:n,error:void 0,handlingStack:r}}function hT(e){return typeof e=="string"?$(e):Je(e)?Ju(_r(e)):$t($(e),void 0,2)}const gT=500;function Nl(){const e=[];return{add:o=>{e.push(o)>gT&&e.splice(0,1)},remove:o=>{Tl(e,o)},drain:o=>{e.forEach(i=>i(o)),e.length=0}}}function mT(e){const t=ft(e)==="object";return t||w.error("Unsupported context:",e),t}function No(e,t,r){const n=y({},e);for(const[o,{required:i,type:s}]of Object.entries(t))s==="string"&&!Ia(n[o])&&(n[o]=String(n[o])),i&&Ia(n[o])&&w.warn(`The property ${o} of ${r} is required; context will not be sent to the intake.`);return n}function Ia(e){return e==null||e===""}function yr(e="",{propertiesConfig:t={}}={}){let r={};const n=new x,o={getContext:()=>xn(r),setContext:i=>{mT(i)?r=$(No(i,t,e)):o.clearContext(),n.notify()},setContextProperty:(i,s)=>{r=$(No(W(y({},r),{[i]:s}),t,e)),n.notify()},removeContextProperty:i=>{delete r[i],No(r,t,e),n.notify()},clearContext:()=>{r={},n.notify()},changeObservable:n};return o}function P(e,t,r,n){return T((...o)=>(n&&G({feature:n}),e()[t][r](...o)))}function $o(e,t,r){e.changeObservable.subscribe(()=>{const n=e.getContext();r.add(o=>o[t].setContext(n))})}const _T="_dd_c",bT=[];function rs(e,t,r,n){const o=yT(r,n);bT.push(U(e,window,"storage",({key:c})=>{o===c&&s()})),t.changeObservable.subscribe(a);const i=fe(u(),t.getContext());We(i)||t.setContext(i);function s(){t.setContext(u())}function a(){localStorage.setItem(o,JSON.stringify(t.getContext()))}function u(){const c=localStorage.getItem(o);return c?JSON.parse(c):{}}}function yT(e,t){return`${_T}_${e}_${t}`}function $l(e,t,r){const n=ns();return t.storeContextsAcrossPages&&rs(t,n,r,4),e.register(0,()=>{const o=n.getContext();return We(o)||!o.id?q:{account:o}}),n}function ns(){return yr("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function Pl(e,t,r,n){const o=os();return t.storeContextsAcrossPages&&rs(t,o,r,2),e.register(0,()=>{const i=o.getContext();return n?{context:i}:i}),o}function os(){return yr("global context")}function Ml(e,t,r,n){const o=is();return t.storeContextsAcrossPages&&rs(t,o,n,1),e.register(0,({eventType:i,startTime:s})=>{const a=o.getContext(),u=r.findTrackedSession(s);return u&&u.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=u.anonymousId),We(a)?q:{type:i,usr:a}}),e.register(1,({startTime:i})=>{var s;return{anonymous_id:(s=r.findTrackedSession(i))===null||s===void 0?void 0:s.anonymousId}}),o}function is(){return yr("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}const k={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},M={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"},te={DOCUMENT:"document",XHR:"xhr",BEACON:"beacon",FETCH:"fetch",CSS:"css",JS:"js",IMAGE:"image",FONT:"font",MEDIA:"media",OTHER:"other"},ut={FETCH:te.FETCH,XHR:te.XHR},ET=500;function Dl(e=rS){const t=new Tu(ET),r=e().subscribe(n=>{t.notify({type:0,error:n})});return{observable:t,stop:()=>{r.unsubscribe()}}}function ST(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}const A={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},Oa={LONG_TASK:"long-task",LONG_ANIMATION_FRAME:"long-animation-frame"},Ie={INITIAL_LOAD:"initial_load",ROUTE_CHANGE:"route_change",BF_CACHE:"bf_cache"},ss={CLICK:"click",CUSTOM:"custom"},Zt={RAGE_CLICK:"rage_click",ERROR_CLICK:"error_click",DEAD_CLICK:"dead_click"},ur={DURATION:"duration",OPERATION_STEP:"operation_step"};function TT(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function wT(e,t,r){function n(s){return!t.wasInPageStateDuringPeriod("frozen",s.startClocks.relative,s.duration)}function o(s){n(s)&&e.notify(12,Aa(s))}function i(s,a,u,c){if(!mr(ze.FEATURE_OPERATION_VITAL))return;const{operationKey:l,context:d,description:f}=u||{},p={name:s,type:ur.OPERATION_STEP,operationKey:l,failureReason:c,stepType:a,startClocks:H(),context:$(d),description:f};e.notify(12,Aa(p))}return{addOperationStepVital:i,addDurationVital:o,startDurationVital:(s,a={})=>Ul(r,s,a),stopDurationVital:(s,a={})=>{Fl(o,r,s,a)}}}function Ul({vitalsByName:e,vitalsByReference:t},r,n={}){const o=y({name:r,startClocks:H()},n),i={__dd_vital_reference:!0};return e.set(r,o),t.set(i,o),i}function Fl(e,{vitalsByName:t,vitalsByReference:r},n,o={}){const i=typeof n=="string"?t.get(n):r.get(n);i&&(e(IT(i,i.startClocks,o,H())),typeof n=="string"?t.delete(n):r.delete(n))}function IT(e,t,r,n){var o;return{name:e.name,type:ur.DURATION,startClocks:t,duration:B(t.timeStamp,n.timeStamp),context:fe(e.context,r.context),description:(o=r.description)!==null&&o!==void 0?o:e.description}}function Aa(e){const{startClocks:t,type:r,name:n,description:o,context:i}=e,s=y({id:ne(),type:r,name:n,description:o},r===ur.DURATION?{duration:O(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason});return{rawRumEvent:{date:t.timeStamp,vital:s,type:A.VITAL,context:i},startTime:t.relative,duration:r===ur.DURATION?e.duration:void 0,domainContext:{}}}function Vl(e,t,r){if(e)for(const n of e){const o=n[t];o&&o(r)}}const Ca=new Map;function jl(e,t){if(t===100)return!0;if(t===0)return!1;const r=Ca.get(t);if(r&&e===r.sessionId)return r.decision;let n;return window.BigInt?n=OT(BigInt(`0x${e.split("-")[4]}`),t):n=Ue(t),Ca.set(t,{sessionId:e,decision:n}),n}function OT(e,t){const r=BigInt("1111111111111111111"),n=BigInt("0x10000000000000000"),o=e*r%n;return Number(o)<=t/100*Number(n)}function AT(){return Gl(64)}function Bl(){return Gl(63)}function Gl(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(r=10){let n=t[1],o=t[0],i="";do{const s=n%r*4294967296+o;n=Math.floor(n/r),o=Math.floor(s/r),i=(s%r).toString(r)+i}while(n||o);return i}}}function gt(e){return e.toString(16).padStart(16,"0")}function CT(e){const t=e;return ft(t)==="object"&&cr(t.match)&&Array.isArray(t.propagatorTypes)}function RT(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function xT(e,t,r,n){return{clearTracingIfNeeded:RT,traceFetch:o=>Ra(e,o,t,r,n,i=>{var s;if(o.input instanceof Request&&!(!((s=o.init)===null||s===void 0)&&s.headers))o.input=new Request(o.input),Object.keys(i).forEach(a=>{o.input.headers.append(a,i[a])});else{o.init=sr(o.init);const a=[];o.init.headers instanceof Headers?o.init.headers.forEach((u,c)=>{a.push([c,u])}):Array.isArray(o.init.headers)?o.init.headers.forEach(u=>{a.push(u)}):o.init.headers&&Object.keys(o.init.headers).forEach(u=>{a.push([u,o.init.headers[u]])}),o.init.headers=a.concat(zi(i))}}),traceXhr:(o,i)=>Ra(e,o,t,r,n,s=>{Object.keys(s).forEach(a=>{i.setRequestHeader(a,s[a])})})}}function Ra(e,t,r,n,o,i){const s=r.findTrackedSession();if(!s)return;const a=e.allowedTracingUrls.find(l=>An([l.match],t.url,!0));if(!a)return;const u=jl(s.id,e.traceSampleRate);(u||e.traceContextInjection===di.ALL)&&(t.traceSampled=u,t.traceId=AT(),t.spanId=Bl(),i(kT(t.traceId,t.spanId,t.traceSampled,s.id,a.propagatorTypes,n,o,e)))}function kT(e,t,r,n,o,i,s,a){const u={};if(o.forEach(c=>{switch(c){case"datadog":{Object.assign(u,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":r?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(u,{traceparent:`00-0000000000000000${gt(e)}-${gt(t)}-0${r?"1":"0"}`,tracestate:`dd=s:${r?"1":"0"};o:rum`});break}case"b3":{Object.assign(u,{b3:`${gt(e)}-${gt(t)}-${r?"1":"0"}`});break}case"b3multi":{Object.assign(u,{"X-B3-TraceId":gt(e),"X-B3-SpanId":gt(t),"X-B3-Sampled":r?"1":"0"});break}}}),a.propagateTraceBaggage){const c={"session.id":n},l=i.getContext().id;typeof l=="string"&&(c["user.id"]=l);const d=s.getContext().id;typeof d=="string"&&(c["account.id"]=d);const f=Object.entries(c).map(([p,v])=>`${p}=${encodeURIComponent(v)}`).join(",");f&&(u.baggage=f)}return u}const zl=["tracecontext","datadog"];function LT(e,t){var r,n,o,i,s,a,u;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&w.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){w.error("Application ID is not configured, no RUM data will be collected.");return}if(!wt(e.sessionReplaySampleRate,"Session Replay")||!wt(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){w.error("Excluded Activity Urls should be an array");return}const c=NT(e);if(!c)return;const l=Hu(e,t),d=PT(e);if(!l)return;const f=(r=e.sessionReplaySampleRate)!==null&&r!==void 0?r:0;return y({applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:f,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:f===0,traceSampleRate:(n=e.traceSampleRate)!==null&&n!==void 0?n:100,rulePsr:hr(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:(o=e.excludedActivityUrls)!==null&&o!==void 0?o:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((i=e.trackUserInteractions)!==null&&i!==void 0)||i),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((s=e.trackResources)!==null&&s!==void 0)||s),trackLongTasks:!!(!((a=e.trackLongTasks)!==null&&a!==void 0)||a),trackBfcacheViews:!!e.trackBfcacheViews,trackEarlyRequests:!!e.trackEarlyRequests,subdomain:e.subdomain,defaultPrivacyLevel:on(Tt,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Tt.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,traceContextInjection:on(di,e.traceContextInjection)?e.traceContextInjection:di.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:(u=e.profilingSampleRate)!==null&&u!==void 0?u:0,propagateTraceBaggage:!!e.propagateTraceBaggage,allowedGraphQlUrls:d},l)}function NT(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){w.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){w.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(r=>{cr(r)?t.push({match:r,propagatorTypes:zl}):CT(r)?t.push(r):w.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",r)}),t}function $T(e){const t=new Set;return at(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(r=>{cr(r)?zl.forEach(n=>t.add(n)):ft(r)==="object"&&Array.isArray(r.propagatorTypes)&&r.propagatorTypes.forEach(n=>t.add(n))}),Array.from(t)}function PT(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return w.warn("allowedGraphQlUrls should be an array"),[];const t=[];return e.allowedGraphQlUrls.forEach(r=>{cr(r)?t.push({match:r,trackPayload:!1,trackResponseErrors:!1}):r&&typeof r=="object"&&"match"in r&&cr(r.match)&&t.push({match:r.match,trackPayload:!!r.trackPayload,trackResponseErrors:!!r.trackResponseErrors})}),t}function MT(e){return at(e)&&e.some(t=>typeof t=="object"&&"trackPayload"in t?!!t.trackPayload:!1)}function DT(e){return at(e)&&e.some(t=>typeof t=="object"&&"trackResponseErrors"in t?!!t.trackResponseErrors:!1)}function UT(e){var t;const r=Wu(e);return y({session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:at(e.allowedTracingUrls),use_allowed_graph_ql_urls:at(e.allowedGraphQlUrls),use_track_graph_ql_payload:MT(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:DT(e.allowedGraphQlUrls),selected_tracing_propagators:$T(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:at(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,track_bfcache_views:e.trackBfcacheViews,track_early_requests:e.trackEarlyRequests,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(n=>{var o;return y({name:n.name},(o=n.getConfigurationTelemetry)===null||o===void 0?void 0:o.call(n))}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:e.remoteConfigurationId,profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy},r)}function FT(e){const t=[];let r=0,n;const o={quote:void 0,escapeSequence:void 0};let i="";for(const s of e){if(n=xa[r].find(a=>KT[a](s,o)),!n)return[];if(o.escapeSequence!==void 0&&n!==12){if(!qT(o.escapeSequence))return[];i+=XT(o.escapeSequence),o.escapeSequence=void 0}HT.includes(n)?i+=s:WT.includes(n)&&i!==""?(t.push(i),i=""):n===12?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${s}`:s:n===8?o.quote=s:n===9&&(o.quote=void 0),r=n}return xa[r].includes(1)?(i!==""&&t.push(i),t):[]}const VT=/[a-zA-Z_$]/,jT=/[a-zA-Z0-9_$]/,BT=/[0-9]/,GT=/[a-fA-F0-9]/,zT=`'"`,KT={0:()=>!1,1:()=>!1,2:e=>VT.test(e),3:e=>jT.test(e),4:e=>e===".",5:e=>e==="[",6:e=>e==="]",7:e=>BT.test(e),8:e=>zT.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e==="\\",12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith("u")&&t.escapeSequence.length<5?GT.test(e):!1},xa={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},HT=[2,3,7,10],WT=[4,5,6];function qT(e){return`"'/\\bfnrt`.includes(e)||e.startsWith("u")&&e.length===5}const YT={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:`
11
+ `,r:"\r",t:" "};function XT(e){return e.startsWith("u")?String.fromCharCode(parseInt(e.slice(1),16)):YT[e]}const JT="v1",ZT=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];async function QT(e,t){let r;const n=tw(),o=await iw(e);return o.ok?(n.increment("fetch","success"),r=ew(e,o.value,t,n)):(n.increment("fetch","failure"),w.error(o.error)),kn("remote configuration metrics",{metrics:n.get()}),r}function ew(e,t,r,n){const o=y({},e);return ZT.forEach(f=>{f in t&&(o[f]=i(t[f]))}),Object.keys(r).forEach(f=>{t[f]!==void 0&&s(r[f],t[f])}),o;function i(f){if(Array.isArray(f))return f.map(i);if(rw(f)){if(nw(f)){const p=f.rcSerializedType;switch(p){case"string":return f.value;case"regex":return Kl(f.value);case"dynamic":return a(f);default:w.error(`Unsupported remote configuration: "rcSerializedType": "${p}"`);return}}return yu(f,i)}return f}function s(f,p){p.forEach(({key:v,value:h})=>{f.setContextProperty(v,i(h))})}function a(f){const p=f.strategy;let v;switch(p){case"cookie":v=u(f);break;case"dom":v=c(f);break;case"js":v=d(f);break;default:w.error(`Unsupported remote configuration: "strategy": "${p}"`);return}const h=f.extractor;return h!==void 0&&typeof v=="string"?ow(h,v):v}function u({name:f}){const p=In(f);return n.increment("cookie",p!==void 0?"success":"missing"),p}function c({selector:f,attribute:p}){let v;try{v=document.querySelector(f)}catch(m){w.error(`Invalid selector in the remote configuration: '${f}'`),n.increment("dom","failure");return}if(!v){n.increment("dom","missing");return}if(l(v,p)){w.error(`Forbidden element selected by the remote configuration: '${f}'`),n.increment("dom","failure");return}const h=p!==void 0?v.getAttribute(p):v.textContent;if(h===null){n.increment("dom","missing");return}return n.increment("dom","success"),h}function l(f,p){return f.getAttribute("type")==="password"&&p==="value"}function d({path:f}){let p=window;const v=FT(f);if(v.length===0){w.error(`Invalid JSON path in the remote configuration: '${f}'`),n.increment("js","failure");return}for(const h of v){if(!(h in p)){n.increment("js","missing");return}try{p=p[h]}catch(m){w.error(`Error accessing: '${f}'`,m),n.increment("js","failure");return}}return n.increment("js","success"),p}}function tw(){const e={fetch:{}};return{get:()=>e,increment:(t,r)=>{e[t]||(e[t]={}),e[t][r]||(e[t][r]=0),e[t][r]=e[t][r]+1}}}function rw(e){return typeof e=="object"&&e!==null}function nw(e){return"rcSerializedType"in e}function Kl(e){try{return new RegExp(e)}catch(t){w.error(`Invalid regex in the remote configuration: '${e}'`)}}function ow(e,t){const r=Kl(e.value);if(r===void 0)return;const n=r.exec(t);if(n===null)return;const[o,i]=n;return i||o}async function iw(e){let t;try{t=await fetch(sw(e))}catch(n){t=void 0}if(!t||!t.ok)return{ok:!1,error:new Error("Error fetching the remote configuration.")};const r=await t.json();return r.rum?{ok:!0,value:r.rum}:{ok:!1,error:new Error("No remote configuration for RUM.")}}function sw(e){return e.remoteConfigurationProxy?e.remoteConfigurationProxy:`https://sdk-configuration.${zu("rum",e)}/${JT}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function aw({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},r,n,o){const i=Nl(),s=os();Po(s,k.globalContext,i);const a=is();Po(a,k.userContext,i);const u=ns();Po(u,k.accountContext,i);let c,l,d,f;const p=r.observable.subscribe(h),v={};function h(){if(!d||!f||!r.isGranted())return;p.unsubscribe();let _;if(f.trackViewsManually){if(!c)return;i.remove(c.callback),_=c.options}const g=o(f,l,_);i.drain(g)}function m(_,g){const b=Ce();if(b&&(_=cw(_)),d=_,Sl(UT(_)),f){Rn("DD_RUM",_);return}const C=LT(_,g);if(C){if(!b&&!C.sessionStoreStrategyType){w.warn("No storage available for session. We will not send any data.");return}C.compressIntakeRequests&&!b&&t&&(l=t(C,"Datadog RUM",L),!l)||(f=C,Nn().subscribe(L),r.tryToInit(C.trackingConsent),h())}}const E=_=>{i.add(g=>g.addDurationVital(_))};return{init(_,g,b){if(!_){w.error("Missing configuration");return}qu(_.enableExperimentalFeatures),d=_,!(e&&Ln())&&(Vl(_.plugins,"onInit",{initConfiguration:_,publicApi:g}),_.remoteConfigurationId?QT(_,{user:a,context:s}).then(C=>{C&&m(C,b)}).catch(Ge):m(_,b))},get initConfiguration(){return d},getInternalContext:L,stopSession:L,addTiming(_,g=j()){i.add(b=>b.addTiming(_,g))},startView(_,g=H()){const b=C=>{C.startView(_,g)};i.add(b),c||(c={options:_,callback:b},h())},setViewName(_){i.add(g=>g.setViewName(_))},setViewContext(_){i.add(g=>g.setViewContext(_))},setViewContextProperty(_,g){i.add(b=>b.setViewContextProperty(_,g))},getViewContext:()=>v,globalContext:s,userContext:a,accountContext:u,addAction(_){i.add(g=>g.addAction(_))},addError(_){i.add(g=>g.addError(_))},addFeatureFlagEvaluation(_,g){i.add(b=>b.addFeatureFlagEvaluation(_,g))},startDurationVital(_,g){return Ul(n,_,g)},stopDurationVital(_,g){Fl(E,n,_,g)},addDurationVital:E,addOperationStepVital:(_,g,b,C)=>{i.add(Kt=>Kt.addOperationStepVital($(_),g,$(b),$(C)))}}}function cw(e){var t,r;return W(y({},e),{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(r=Bt())===null||r===void 0?void 0:r.getPrivacyLevel()})}function Po(e,t,r){e.changeObservable.subscribe(()=>{const n=e.getContext();r.add(o=>o[t].setContext(n))})}function uw(e,t,r,n={}){const o=Bu(),i=TT(),s=Dl().observable;let a=aw(n,o,i,(d,f,p)=>{const v=f&&n.createDeflateEncoder?m=>n.createDeflateEncoder(d,f,m):Qi,h=e(d,t,r,p,v,o,i,s,n.sdkName);return t.onRumStart(h.lifeCycle,d,h.session,h.viewHistory,f,h.telemetry),r.onRumStart(h.lifeCycle,h.hooks,d,h.session,h.viewHistory,h.longTaskContexts,v),a=lw(a,h),Vl(d.plugins,"onRumStart",{strategy:a,addEvent:h.addEvent}),h});const u=()=>a,c=T(d=>{const f=typeof d=="object"?d:{name:d};a.startView(f),G({feature:"start-view"})}),l=nl({init:d=>{const f=new Error().stack;Oe(()=>a.init(d,l,f))},setTrackingConsent:T(d=>{o.update(d),G({feature:"set-tracking-consent",tracking_consent:d})}),setViewName:T(d=>{a.setViewName(d),G({feature:"set-view-name"})}),setViewContext:T(d=>{a.setViewContext(d),G({feature:"set-view-context"})}),setViewContextProperty:T((d,f)=>{a.setViewContextProperty(d,f),G({feature:"set-view-context-property"})}),getViewContext:T(()=>(G({feature:"set-view-context-property"}),a.getViewContext())),getInternalContext:T(d=>a.getInternalContext(d)),getInitConfiguration:T(()=>xn(a.initConfiguration)),addAction:(d,f)=>{const p=Nt("action");Oe(()=>{a.addAction({name:$(d),context:$(f),startClocks:H(),type:ss.CUSTOM,handlingStack:p}),G({feature:"add-action"})})},addError:(d,f)=>{const p=Nt("error");Oe(()=>{a.addError({error:d,handlingStack:p,context:$(f),startClocks:H()}),G({feature:"add-error"})})},addTiming:T((d,f)=>{a.addTiming($(d),f)}),setGlobalContext:P(u,k.globalContext,M.setContext,"set-global-context"),getGlobalContext:P(u,k.globalContext,M.getContext,"get-global-context"),setGlobalContextProperty:P(u,k.globalContext,M.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:P(u,k.globalContext,M.removeContextProperty,"remove-global-context-property"),clearGlobalContext:P(u,k.globalContext,M.clearContext,"clear-global-context"),setUser:P(u,k.userContext,M.setContext,"set-user"),getUser:P(u,k.userContext,M.getContext,"get-user"),setUserProperty:P(u,k.userContext,M.setContextProperty,"set-user-property"),removeUserProperty:P(u,k.userContext,M.removeContextProperty,"remove-user-property"),clearUser:P(u,k.userContext,M.clearContext,"clear-user"),setAccount:P(u,k.accountContext,M.setContext,"set-account"),getAccount:P(u,k.accountContext,M.getContext,"get-account"),setAccountProperty:P(u,k.accountContext,M.setContextProperty,"set-account-property"),removeAccountProperty:P(u,k.accountContext,M.removeContextProperty,"remove-account-property"),clearAccount:P(u,k.accountContext,M.clearContext,"clear-account"),startView:c,stopSession:T(()=>{a.stopSession(),G({feature:"stop-session"})}),addFeatureFlagEvaluation:T((d,f)=>{a.addFeatureFlagEvaluation($(d),$(f)),G({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:T(()=>t.getSessionReplayLink()),startSessionReplayRecording:T(d=>{t.start(d),G({feature:"start-session-replay-recording",force:d&&d.force})}),stopSessionReplayRecording:T(()=>t.stop()),addDurationVital:T((d,f)=>{G({feature:"add-duration-vital"}),a.addDurationVital({name:$(d),type:ur.DURATION,startClocks:Iy(f.startTime),duration:f.duration,context:$(f&&f.context),description:$(f&&f.description)})}),startDurationVital:T((d,f)=>(G({feature:"start-duration-vital"}),a.startDurationVital($(d),{context:$(f&&f.context),description:$(f&&f.description)}))),stopDurationVital:T((d,f)=>{G({feature:"stop-duration-vital"}),a.stopDurationVital(typeof d=="string"?$(d):d,{context:$(f&&f.context),description:$(f&&f.description)})}),startFeatureOperation:T((d,f)=>{G({feature:"add-operation-step-vital",action_type:"start"}),a.addOperationStepVital(d,"start",f)}),succeedFeatureOperation:T((d,f)=>{G({feature:"add-operation-step-vital",action_type:"succeed"}),a.addOperationStepVital(d,"end",f)}),failFeatureOperation:T((d,f,p)=>{G({feature:"add-operation-step-vital",action_type:"fail"}),a.addOperationStepVital(d,"end",p,f)})});return l}function lw(e,t){return y({init:r=>{Rn("DD_RUM",r)},initConfiguration:e.initConfiguration},t)}function dw(){const e=fw();return new x(t=>{if(!e)return;const r=new e(T(n=>t.notify(n)));return r.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>r.disconnect()})}function fw(){let e;const t=window;if(t.Zone&&(e=Be(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const r=new t.MutationObserver(L),n=Be(r,"originalInstance");e=n&&n.constructor}return e||(e=t.MutationObserver),e}function pw(){const e=new x,{stop:t}=Ee(window,"open",()=>e.notify());return{observable:e,stop:t}}function vw(e,t,r,n,o){return{get:i=>{const s=r.findView(i),a=o.findUrl(i),u=t.findTrackedSession(i);if(u&&s&&a){const c=n.findActionId(i);return{application_id:e,session_id:u.id,user_action:c?{id:c}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}const hw=Rl,gw=Ye;function mw(e){const t=pt({expireDelay:gw});e.subscribe(1,n=>{t.add(r(n),n.startClocks.relative)}),e.subscribe(6,({endClocks:n})=>{t.closeActive(n.relative)}),e.subscribe(3,n=>{const o=t.find(n.startClocks.relative);o&&(n.name&&(o.name=n.name),n.context&&(o.context=n.context),o.sessionIsActive=n.sessionIsActive)}),e.subscribe(10,()=>{t.reset()});function r(n){return{service:n.service,version:n.version,context:n.context,id:n.id,name:n.name,startClocks:n.startClocks}}return{findView:n=>t.find(n),stop:()=>{t.stop()}}}const Hl="initial_document",_w=[[te.DOCUMENT,e=>Hl===e],[te.XHR,e=>e==="xmlhttprequest"],[te.FETCH,e=>e==="fetch"],[te.BEACON,e=>e==="beacon"],[te.CSS,(e,t)=>/\.css$/i.test(t)],[te.JS,(e,t)=>/\.js$/i.test(t)],[te.IMAGE,(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[te.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[te.MEDIA,(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function bw(e){const t=e.name;if(!$y(t))return te.OTHER;const r=Py(t);for(const[n,o]of _w)if(o(e.initiatorType,r))return n;return te.OTHER}function ka(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Wl(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function yw(e){const{duration:t,startTime:r,responseEnd:n}=e;return t===0&&r<n?B(r,n):t}function Ew(e){if(!Yl(e))return;const{startTime:t,fetchStart:r,workerStart:n,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:u,secureConnectionStart:c,connectEnd:l,requestStart:d,responseStart:f,responseEnd:p}=e,v={download:Qe(t,f,p),first_byte:Qe(t,d,f)};return 0<n&&n<r&&(v.worker=Qe(t,n,r)),r<l&&(v.connect=Qe(t,u,l),u<=c&&c<=l&&(v.ssl=Qe(t,c,l))),r<a&&(v.dns=Qe(t,s,a)),t<i&&(v.redirect=Qe(t,o,i)),v}function ql(e){return e.duration>=0}function Yl(e){const t=ka(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),r=Sw(e)?ka(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&r}function Sw(e){return e.redirectEnd>e.startTime}function Qe(e,t,r){if(e<=t&&t<=r)return{duration:O(B(t,r)),start:O(B(e,t))}}function Tw(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function ww(e){return e.deliveryType===""?"other":e.deliveryType}function Iw(e){if(e.startTime<e.responseStart){const{encodedBodySize:t,decodedBodySize:r,transferSize:n}=e;return{size:r,encoded_body_size:t,decoded_body_size:r,transfer_size:n}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function as(e){return e&&(!Ku(e)||mr(ze.TRACK_INTAKE_REQUESTS))}const Ow=/data:(.+)?(;base64)?,/g,Aw=24e3;function Cw(e,t=Aw){if(e.length<=t||!e.startsWith("data:"))return e;const r=e.substring(0,100).match(Ow);return r?`${r[0]}[...]`:e}const Rw=32*Xe;function xw(e,t){const r=Lw(e.requestBody,t.trackPayload);if(r){if(t.trackResponseErrors&&e.responseBody){const n=kw(e.responseBody);n&&(r.error_count=n.length,r.errors=n)}return r}}function kw(e){let t;try{t=JSON.parse(e)}catch(o){return}if(!t||typeof t!="object")return;const r=t;return at(r.errors)?r.errors.map(o=>{var i;return{message:o.message,path:o.path,locations:o.locations,code:(i=o.extensions)===null||i===void 0?void 0:i.code}}):void 0}function Xl(e,t){return t.allowedGraphQlUrls.find(r=>An([r.match],e))}function Lw(e,t=!1){if(!e||typeof e!="string")return;let r;try{r=JSON.parse(e)}catch(a){return}if(!r)return;let n,o;if(r.query){const a=r.query.trim();n=Nw(a),t&&(o=Sn(a,Rw,"..."))}const i=r.operationName;let s;return r.variables&&(s=JSON.stringify(r.variables)),{operationType:n,operationName:i,variables:s,payload:o}}function Nw(e){var t;return(t=e.match(/^\s*(query|mutation|subscription)\b/i))===null||t===void 0?void 0:t[1]}let La=1;function $w(e,t,r,n,o){const i=xT(t,r,n,o);Pw(e,t,i),Mw(e,t,i)}function Pw(e,t,r){const n=xl(t).subscribe(o=>{const i=o;if(as(i.url))switch(i.state){case"start":r.traceXhr(i,i.xhr),i.requestIndex=Jl(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"complete":r.clearTracingIfNeeded(i),e.notify(8,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:ut.XHR,url:i.url,xhr:i.xhr,isAborted:i.isAborted,handlingStack:i.handlingStack,requestBody:i.requestBody,responseBody:i.responseBody});break}});return{stop:()=>n.unsubscribe()}}function Mw(e,t,r){const n=Nn({responseBodyAction:o=>{var i;return!((i=Xl(o.url,t))===null||i===void 0)&&i.trackResponseErrors?2:1}}).subscribe(o=>{var i;const s=o;if(as(s.url))switch(s.state){case"start":r.traceFetch(s),s.requestIndex=Jl(),e.notify(7,{requestIndex:s.requestIndex,url:s.url});break;case"resolve":r.clearTracingIfNeeded(s),e.notify(8,{duration:B(s.startClocks.timeStamp,j()),method:s.method,requestIndex:s.requestIndex,responseType:s.responseType,spanId:s.spanId,startClocks:s.startClocks,status:s.status,traceId:s.traceId,traceSampled:s.traceSampled,type:ut.FETCH,url:s.url,response:s.response,init:s.init,input:s.input,isAborted:s.isAborted,handlingStack:s.handlingStack,requestBody:(i=s.init)===null||i===void 0?void 0:i.body,responseBody:s.responseBody});break}});return{stop:()=>n.unsubscribe()}}function Jl(){const e=La;return La+=1,e}function Zl(e){return hr(e)&&e<0?void 0:e}function Ql({lifeCycle:e,isChildEvent:t,onChange:r=L}){const n={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=e.subscribe(13,i=>{var s;if(!(i.type==="view"||i.type==="vital"||!t(i)))switch(i.type){case A.ERROR:n.errorCount+=1,r();break;case A.ACTION:n.actionCount+=1,i.action.frustration&&(n.frustrationCount+=i.action.frustration.type.length),r();break;case A.LONG_TASK:n.longTaskCount+=1,r();break;case A.RESOURCE:!((s=i._dd)===null||s===void 0)&&s.discarded||(n.resourceCount+=1,r());break}});return{stop:()=>{o.unsubscribe()},eventCounts:n}}function Dw(e,t){const r=re();let n=!1;const{stop:o}=Ke(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const u={entryType:"first-input",processingStart:ae(),processingEnd:ae(),startTime:a.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};a.type==="pointerdown"?i(e,u):s(u)},{passive:!0,capture:!0});return{stop:o};function i(a,u){Ke(a,window,["pointerup","pointercancel"],c=>{c.type==="pointerup"&&s(u)},{once:!0})}function s(a){if(!n){n=!0,o();const u=a.processingStart-a.startTime;u>=0&&u<re()-r&&t(a)}}}var N;(function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"})(N||(N={}));function Re(e,t){return new x(r=>{if(!window.PerformanceObserver)return;const n=u=>{const c=Vw(u);c.length>0&&r.notify(c)};let o,i=!0;const s=new PerformanceObserver(T(u=>{i?o=J(()=>n(u.getEntries())):n(u.getEntries())}));try{s.observe(t)}catch(u){if([N.RESOURCE,N.NAVIGATION,N.LONG_TASK,N.PAINT].includes(t.type)){t.buffered&&(o=J(()=>n(performance.getEntriesByType(t.type))));try{s.observe({entryTypes:[t.type]})}catch(l){return}}}i=!1,Uw(e);let a;return!vt(N.FIRST_INPUT)&&t.type===N.FIRST_INPUT&&({stop:a}=Dw(e,u=>{n([u])})),()=>{s.disconnect(),a&&a(),le(o)}})}let Qt;function Uw(e){return!Qt&&Fw()&&"addEventListener"in performance&&(Qt=U(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{Qt==null||Qt.stop()}}function Fw(){return window.performance!==void 0&&"getEntries"in performance}function vt(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function Vw(e){return e.filter(t=>!jw(t))}function jw(e){return e.entryType===N.RESOURCE&&(!as(e.name)||!ql(e))}function vi(e){return e.nodeType===Node.TEXT_NODE}function Bw(e){return e.nodeType===Node.COMMENT_NODE}function xe(e){return e.nodeType===Node.ELEMENT_NODE}function ed(e){return xe(e)&&!!e.shadowRoot}function Gw(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&xe(t.host)}function KC(e){return e.childNodes.length>0||ed(e)}function HC(e,t){let r=e.firstChild;for(;r;)t(r),r=r.nextSibling;ed(e)&&t(e.shadowRoot)}function zw(e){return Gw(e)?e.host:e.parentNode}const td=100,Kw=100,Na="data-dd-excluded-activity-mutations";function cs(e,t,r,n,o,i){const s=Ww(e,t,r,n);return Hw(s,o,i)}function Hw(e,t,r){let n,o=!1;const i=J(T(()=>c({hadActivity:!1})),td),s=r!==void 0?J(T(()=>c({hadActivity:!0,end:j()})),r):void 0,a=e.subscribe(({isBusy:l})=>{le(i),le(n);const d=j();l||(n=J(T(()=>c({hadActivity:!0,end:d})),Kw))}),u=()=>{o=!0,le(i),le(n),le(s),a.unsubscribe()};function c(l){o||(u(),t(l))}return{stop:u}}function Ww(e,t,r,n){return new x(o=>{const i=[];let s,a=0;return i.push(t.subscribe(c=>{c.every(qw)||u()}),r.subscribe(u),Re(n,{type:N.RESOURCE}).subscribe(c=>{c.some(l=>!Mo(n,l.name))&&u()}),e.subscribe(7,c=>{Mo(n,c.url)||(s===void 0&&(s=c.requestIndex),a+=1,u())}),e.subscribe(8,c=>{Mo(n,c.url)||s===void 0||c.requestIndex<s||(a-=1,u())})),()=>{i.forEach(c=>c.unsubscribe())};function u(){o.notify({isBusy:a>0})}})}function Mo(e,t){return An(e.excludedActivityUrls,t)}function qw(e){const t=e.type==="characterData"?e.target.parentElement:e.target;return!!(t&&xe(t)&&t.matches(`[${Na}], [${Na}] *`))}const $n="data-dd-action-name",rd="Masked Element",nd=[$n,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Yw=[id,Jw],Xw=[id,Zw,Qw];function Er(e,t){if(!e.isConnected)return;let r,n=e;for(;n&&n.nodeName!=="HTML";){const o=$a(n,Yw,t0,t,r);if(o)return o;r=$a(n,Xw,r0,t,r)||Pn(e0(n),r),n=n.parentElement}return r}function od(e){return/[0-9]/.test(e)}function Jw(e){if(e.id&&!od(e.id))return`#${CSS.escape(e.id)}`}function Zw(e){if(e.tagName==="BODY")return;const t=e.classList;for(let r=0;r<t.length;r+=1){const n=t[r];if(!od(n))return`${CSS.escape(e.tagName)}.${CSS.escape(n)}`}}function Qw(e){return CSS.escape(e.tagName)}function id(e,t){if(t){const n=r(t);if(n)return n}for(const n of nd){const o=r(n);if(o)return o}function r(n){if(e.hasAttribute(n))return`${CSS.escape(e.tagName)}[${n}="${CSS.escape(e.getAttribute(n))}"]`}}function e0(e){let t=e.parentElement.firstElementChild,r=1;for(;t&&t!==e;)t.tagName===e.tagName&&(r+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${r})`}function $a(e,t,r,n,o){for(const i of t){const s=i(e,n);if(s&&r(e,s,o))return Pn(s,o)}}function t0(e,t,r){return e.ownerDocument.querySelectorAll(Pn(t,r)).length===1}function r0(e,t,r){let n;if(r===void 0)n=s=>s.matches(t);else{const s=Pn(`${t}:scope`,r);n=a=>a.querySelector(s)!==null}let i=e.parentElement.firstElementChild;for(;i;){if(i!==e&&n(i))return!1;i=i.nextElementSibling}return!0}function Pn(e,t){return t?`${e}>${t}`:e}const R={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Tt.ALLOW,MASK:Tt.MASK,MASK_USER_INPUT:Tt.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:Tt.MASK_UNLESS_ALLOWLISTED},sd="data-dd-privacy",WC="hidden",n0="dd-privacy-",Do="***",qC="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",o0={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},i0="x";function it(e){return`[${sd}="${e}"], .${n0}${e}`}function Mn(e,t,r){if(r&&r.has(e))return r.get(e);const n=zw(e),o=n?Mn(n,t,r):t,i=a0(e),s=s0(i,o);return r&&r.set(e,s),s}function s0(e,t){switch(t){case R.HIDDEN:case R.IGNORE:return t}switch(e){case R.ALLOW:case R.MASK:case R.MASK_USER_INPUT:case R.MASK_UNLESS_ALLOWLISTED:case R.HIDDEN:case R.IGNORE:return e;default:return t}}function a0(e){if(xe(e)){if(e.tagName==="BASE")return R.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return R.MASK;const r=t.getAttribute("autocomplete");if(r&&(r.startsWith("cc-")||r.endsWith("-password")))return R.MASK}if(e.matches(it(R.HIDDEN)))return R.HIDDEN;if(e.matches(it(R.MASK)))return R.MASK;if(e.matches(it(R.MASK_UNLESS_ALLOWLISTED)))return R.MASK_UNLESS_ALLOWLISTED;if(e.matches(it(R.MASK_USER_INPUT)))return R.MASK_USER_INPUT;if(e.matches(it(R.ALLOW)))return R.ALLOW;if(u0(e))return R.IGNORE}}function ad(e,t){switch(t){case R.MASK:case R.HIDDEN:case R.IGNORE:return!0;case R.MASK_UNLESS_ALLOWLISTED:return vi(e)?Ur(e.parentNode)?!0:!ud(e.textContent||""):Ur(e);case R.MASK_USER_INPUT:return vi(e)?Ur(e.parentNode):Ur(e);default:return!1}}function c0(e,t,r,n,o){if(n!==R.MASK&&n!==R.MASK_UNLESS_ALLOWLISTED||t===sd||nd.includes(t)||t===o.actionNameAttribute)return!1;switch(t){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return!!(e==="A"&&t==="href"||e==="IFRAME"&&t==="srcdoc"||r&&t.startsWith("data-")||(e==="IMG"||e==="SOURCE")&&(t==="src"||t==="srcset"))}function Ur(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!o0[t.tagName]}const cd=e=>e.replace(/\S/g,i0);function YC(e,t){var r;const n=(r=e.parentElement)===null||r===void 0?void 0:r.tagName;let o=e.textContent||"";if(n==="HEAD"&&!o.trim())return;const s=t;if(n==="SCRIPT")o=Do;else if(s===R.HIDDEN)o=Do;else if(ad(e,s))if(n==="DATALIST"||n==="SELECT"||n==="OPTGROUP"){if(!o.trim())return}else n==="OPTION"?o=Do:s===R.MASK_UNLESS_ALLOWLISTED?o=ld(o):o=cd(o);return o}function u0(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const r=t("rel");return/preload|prefetch/i.test(r)&&t("as")==="script"||r==="shortcut icon"||r==="icon"}if(e.nodeName==="META"){const r=t("name"),n=t("rel"),o=t("property");return/^msapplication-tile(image|color)$/.test(r)||r==="application-name"||n==="icon"||n==="apple-touch-icon"||n==="shortcut icon"||r==="keywords"||r==="description"||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(r)||r==="pinterest"||r==="robots"||r==="googlebot"||r==="bingbot"||e.hasAttribute("http-equiv")||r==="author"||r==="generator"||r==="framework"||r==="publisher"||r==="progid"||/^article:/.test(o)||/^product:/.test(o)||r==="google-site-verification"||r==="yandex-verification"||r==="csrf-token"||r==="p:domain_verify"||r==="verify-v1"||r==="verification"||r==="shopify-checkout-api-token"}function t(r){return(e.getAttribute(r)||"").toLowerCase()}return!1}function ud(e){var t;return!e||!e.trim()?!0:((t=window.$DD_ALLOW)===null||t===void 0?void 0:t.has(e.toLocaleLowerCase()))||!1}function ld(e,t){return ud(e)?e:t||cd(e)}const dd=Q,l0=100;function d0(e,t){const r=[];let n=0,o;i(e);function i(u){u.stopObservable.subscribe(s),r.push(u),le(o),o=J(a,dd)}function s(){n===1&&r.every(u=>u.isStopped())&&(n=2,t(r))}function a(){le(o),n===0&&(n=1,s())}return{tryAppend:u=>n!==0?!1:r.length>0&&!f0(r[r.length-1].event,u.event)?(a(),!1):(i(u),!0),stop:()=>{a()}}}function f0(e,t){return e.target===t.target&&p0(e,t)<=l0&&e.timeStamp-t.timeStamp<=dd}function p0(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function v0(e,t,r=R.ALLOW){const n=new Map,{actionNameAttribute:o}=t,i=Pa(e,$n)||o&&Pa(e,o);return i?{name:i,nameSource:"custom_attribute"}:r===R.MASK?{name:rd,nameSource:"mask_placeholder"}:Ma(e,h0,t,n)||Ma(e,g0,t,n)||{name:"",nameSource:"blank"}}function Pa(e,t){const r=e.closest(`[${t}]`);if(!r)return;const n=r.getAttribute(t);return pd(fd(n.trim()))}const h0=[(e,t,r)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Xr(e.labels[0],t,r)},e=>{if(e.nodeName==="INPUT"){const t=e,r=t.getAttribute("type");if(r==="button"||r==="submit"||r==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t,r)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return Xr(e,t,r)},(e,t,r)=>er(e,"aria-label",t,r),(e,t,r)=>{const n=e.getAttribute("aria-labelledby");if(n)return{name:n.split(/\s+/).map(o=>_0(e,o)).filter(o=>!!o).map(o=>vd(o,t,r)).join(" "),nameSource:"text_content"}},(e,t,r)=>er(e,"alt",t,r),(e,t,r)=>er(e,"name",t,r),(e,t,r)=>er(e,"title",t,r),(e,t,r)=>er(e,"placeholder",t,r),(e,t,r)=>{if("options"in e&&e.options.length>0)return Xr(e.options[0],t,r)}],g0=[(e,t,r)=>Xr(e,t,r)],m0=10;function Ma(e,t,r,n){let o=e,i=0;for(;i<=m0&&o&&o.nodeName!=="BODY"&&o.nodeName!=="HTML"&&o.nodeName!=="HEAD";){for(const s of t){const a=s(o,r,n);if(a){const{name:u,nameSource:c}=a,l=u&&u.trim();if(l)return{name:pd(fd(l)),nameSource:c}}}if(o.nodeName==="FORM")break;o=o.parentElement,i+=1}}function fd(e){return e.replace(/\s+/g," ")}function pd(e){return e.length>100?`${Sn(e,100)} [...]`:e}function _0(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function er(e,t,r,n){const{enablePrivacyForActionName:o,defaultPrivacyLevel:i}=r;let s=e.getAttribute(t);if(s&&o){const a=Mn(e,i,n);c0(e.tagName,t,s,a,r)&&(s=ld(s,rd))}else s||(s="");return{name:s,nameSource:"standard_attribute"}}function Xr(e,t,r){return{name:vd(e,t,r)||"",nameSource:"text_content"}}function vd(e,t,r){if(e.isContentEditable)return;const{enablePrivacyForActionName:n,actionNameAttribute:o,defaultPrivacyLevel:i}=t;if(mr(ze.USE_TREE_WALKER_FOR_ACTION_NAME))return b0(e,o,n,i,r);if("innerText"in e){let s=e.innerText;const a=u=>{const c=e.querySelectorAll(u);for(let l=0;l<c.length;l+=1){const d=c[l];if("innerText"in d){const f=d.innerText;f&&f.trim().length>0&&(s=s.replace(f,""))}}};return a(`[${$n}]`),o&&a(`[${o}]`),n&&a(`${it(R.HIDDEN)}, ${it(R.MASK)}`),s}return e.textContent}function b0(e,t,r,n,o){const i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,a);let s="";for(;i.nextNode();){const u=i.currentNode;if(xe(u)){(u.nodeName==="BR"||u.nodeName==="P"||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(u).display))&&(s+=" ");continue}s+=u.textContent||""}return s.replace(/\s+/g," ").trim();function a(u){const c=Mn(u,n,o);if(r&&c&&ad(u,c))return NodeFilter.FILTER_REJECT;if(xe(u)){if(u.hasAttribute($n)||t&&u.hasAttribute(t))return NodeFilter.FILTER_REJECT;const l=getComputedStyle(u);if(l.visibility!=="visible"||l.display==="none"||l.contentVisibility&&l.contentVisibility!=="visible")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function y0(e,{onPointerDown:t,onPointerUp:r}){let n,o={selection:!1,input:!1,scroll:!1},i;const s=[U(e,window,"pointerdown",a=>{Ua(a)&&(n=Da(),o={selection:!1,input:!1,scroll:!1},i=t(a))},{capture:!0}),U(e,window,"selectionchange",()=>{(!n||!Da())&&(o.selection=!0)},{capture:!0}),U(e,window,"scroll",()=>{o.scroll=!0},{capture:!0,passive:!0}),U(e,window,"pointerup",a=>{if(Ua(a)&&i){const u=o;r(i,a,()=>u),i=void 0}},{capture:!0}),U(e,window,"input",()=>{o.input=!0},{capture:!0})];return{stop:()=>{s.forEach(a=>a.stop())}}}function Da(){const e=window.getSelection();return!e||e.isCollapsed}function Ua(e){return e.target instanceof Element&&e.isPrimary!==!1}const Fa=3;function E0(e,t){if(S0(e))return t.addFrustration(Zt.RAGE_CLICK),e.some(Va)&&t.addFrustration(Zt.DEAD_CLICK),t.hasError&&t.addFrustration(Zt.ERROR_CLICK),{isRage:!0};const r=e.some(n=>n.getUserActivity().selection);return e.forEach(n=>{n.hasError&&n.addFrustration(Zt.ERROR_CLICK),Va(n)&&!r&&n.addFrustration(Zt.DEAD_CLICK)}),{isRage:!1}}function S0(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(Fa-1);t+=1)if(e[t+Fa-1].event.timeStamp-e[t].event.timeStamp<=Q)return!0;return!1}const T0='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function Va(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName==="LABEL"&&t.hasAttribute("for")&&(t=document.getElementById(t.getAttribute("for"))),!t||!t.matches(T0)}const hd=10*Q,nr=new Map;function w0(e){const t=nr.get(e);return nr.delete(e),t}function gd(e,t){nr.set(e,t),nr.forEach((r,n)=>{B(n,ae())>hd&&nr.delete(n)})}const I0=5*ie;function O0(e,t,r,n){const o=pt({expireDelay:I0}),i=new x;let s;e.subscribe(10,()=>{o.reset()}),e.subscribe(5,l),e.subscribe(11,d=>{d.reason===Ot.UNLOADING&&l()});const{stop:a}=y0(n,{onPointerDown:d=>A0(n,e,t,d,r),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:f},p,v)=>{C0(n,e,t,r,o,i,c,d,p,v,f)}});return{stop:()=>{l(),i.notify(),a()},actionContexts:{findActionId:d=>o.findAll(d)}};function c(d){if(!s||!s.tryAppend(d)){const f=d.clone();s=d0(d,p=>{x0(p,f),s=void 0})}}function l(){s&&s.stop()}}function A0(e,t,r,n,o){let i;if(e.enablePrivacyForActionName?i=Mn(n.target,e.defaultPrivacyLevel):i=R.ALLOW,i===R.HIDDEN)return;const s=R0(n,i,e);let a=!1;return cs(t,r,o,e,u=>{a=u.hadActivity},td),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}function C0(e,t,r,n,o,i,s,a,u,c,l){var d;const f=md(t,o,c,a,u);s(f);const p=(d=a==null?void 0:a.target)===null||d===void 0?void 0:d.selector;p&&gd(u.timeStamp,p);const{stop:v}=cs(t,r,n,e,E=>{E.hadActivity&&E.end<f.startClocks.timeStamp?f.discard():E.hadActivity?f.stop(E.end):l()?f.stop(f.startClocks.timeStamp):f.stop()},hd),h=t.subscribe(5,({endClocks:E})=>{f.stop(E.timeStamp)}),m=i.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{h.unsubscribe(),v(),m.unsubscribe()})}function R0(e,t,r){const n=e.target.getBoundingClientRect(),o=Er(e.target,r.actionNameAttribute);o&&gd(e.timeStamp,o);const{name:i,nameSource:s}=v0(e.target,r,t);return{type:ss.CLICK,target:{width:Math.round(n.width),height:Math.round(n.height),selector:o},position:{x:Math.round(e.clientX-n.left),y:Math.round(e.clientY-n.top)},name:i,nameSource:s}}function md(e,t,r,n,o){const i=ne(),s=bn(o.timeStamp),a=t.add(i,s.relative),u=Ql({lifeCycle:e,isChildEvent:v=>v.action!==void 0&&(Array.isArray(v.action.id)?v.action.id.includes(i):v.action.id===i)});let c=0,l;const d=[],f=new x;function p(v){c===0&&(l=v,c=1,l?a.close(yn(l)):a.remove(),u.stop(),f.notify())}return{event:o,stop:p,stopObservable:f,get hasError(){return u.eventCounts.errorCount>0},get hasPageActivity(){return l!==void 0},getUserActivity:r,addFrustration:v=>{d.push(v)},startClocks:s,isStopped:()=>c===1||c===2,clone:()=>md(e,t,r,n,o),validate:v=>{if(p(),c!==1)return;const{resourceCount:h,errorCount:m,longTaskCount:E}=u.eventCounts,S=y({duration:l&&B(s.timeStamp,l),startClocks:s,id:i,frustrationTypes:d,counts:{resourceCount:h,errorCount:m,longTaskCount:E},events:v!=null?v:[o],event:o},n);e.notify(0,S),c=2},discard:()=>{p(),c=2}}}function x0(e,t){const{isRage:r}=E0(e,t);r?(e.forEach(n=>n.discard()),t.stop(j()),t.validate(e.map(n=>n.event))):(t.discard(),e.forEach(n=>n.validate()))}const k0=1;function L0(e,t,r,n,o){const{unsubscribe:i}=e.subscribe(0,u=>{e.notify(12,ja(u))});t.register(0,({startTime:u,eventType:c})=>{if(c!==A.ERROR&&c!==A.RESOURCE&&c!==A.LONG_TASK)return q;const l=c===A.LONG_TASK?qe(u,k0):u,d=s.findActionId(l);return d?{type:c,action:{id:d}}:q}),t.register(1,({startTime:u})=>({action:{id:s.findActionId(u)}}));let s={findActionId:L},a=L;return o.trackUserInteractions&&({actionContexts:s,stop:a}=O0(e,r,n,o)),{addAction:u=>{e.notify(12,ja(u))},actionContexts:s,stop:()=>{i(),a()}}}function ja(e){const t=Uo(e)?{action:{id:e.id,loading_time:Zl(O(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:{context:e.context},r=fe({action:{id:ne(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:A.ACTION},t),n=Uo(e)?e.duration:void 0,o=Uo(e)?{events:e.events}:{handlingStack:e.handlingStack};return{rawRumEvent:r,duration:n,startTime:e.startClocks.relative,domainContext:o}}function Uo(e){return e.type!==ss.CUSTOM}function N0(e){const t=Ll([F.error]).subscribe(r=>e.notify(r.error));return{stop:()=>{t.unsubscribe()}}}function $0(e,t){const r=il(e,[Pt.cspViolation,Pt.intervention]).subscribe(n=>t.notify(n));return{stop:()=>{r.unsubscribe()}}}function P0(e,t,r){const n=new x;return r.subscribe(o=>{o.type===0&&n.notify(o.error)}),N0(n),$0(t,n),n.subscribe(o=>e.notify(14,{error:o})),M0(e)}function M0(e){return e.subscribe(14,({error:t})=>{e.notify(12,D0(t))}),{addError:({error:t,handlingStack:r,componentStack:n,startClocks:o,context:i})=>{const s=Cn({originalError:t,handlingStack:r,componentStack:n,startClocks:o,nonErrorPrefix:"Provided",source:se.CUSTOM,handling:"handled"});s.context=fe(s.context,i),e.notify(14,{error:s})}}}function D0(e){const t={date:e.startClocks.timeStamp,error:{id:ne(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:A.ERROR,context:e.context},r={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:r}}const Ba=new WeakSet;function U0(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const r=t.filter(n=>!Ba.has(n)).filter(n=>ql(n)&&Yl(n)).filter(n=>F0(n,e.startClocks.relative,_d({startTime:e.startClocks.relative,duration:e.duration})));if(r.length===1)return Ba.add(r[0]),r[0].toJSON()}function _d(e){return qe(e.startTime,e.duration)}function F0(e,t,r){return e.startTime>=t-1&&_d(e)<=qe(r,1)}const V0=2*ie;function j0(e){const t=B0(e)||G0(e);if(!(!t||t.traceTime<=re()-V0))return t.traceId}function B0(e){const t=e.querySelector("meta[name=dd-trace-id]"),r=e.querySelector("meta[name=dd-trace-time]");return bd(t&&t.content,r&&r.content)}function G0(e){const t=z0(e);if(t)return bd(ar(t,"trace-id"),ar(t,"trace-time"))}function bd(e,t){const r=t&&Number(t);if(!(!e||!r))return{traceId:e,traceTime:r}}function z0(e){for(let t=0;t<e.childNodes.length;t+=1){const r=Ga(e.childNodes[t]);if(r)return r}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){const r=e.body.childNodes[t],n=Ga(r);if(n)return n;if(!vi(r))break}}function Ga(e){if(e&&Bw(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function yd(){if(vt(N.NAVIGATION)){const r=performance.getEntriesByType(N.NAVIGATION)[0];if(r)return r}const e=K0(),t=y({entryType:N.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>W(y({},t),{toJSON:void 0})},e);return t}function K0(){const e={},t=performance.timing;for(const r in t)if(hr(t[r])){const n=r,o=t[n];e[n]=o===0?0:yn(o)}return e}function H0(e,t,r=yd){es(e,"interactive",()=>{const n=r(),o=Object.assign(n.toJSON(),{entryType:N.RESOURCE,initiatorType:Hl,duration:n.responseEnd,traceId:j0(document),toJSON:()=>W(y({},o),{toJSON:void 0})});t(o)})}const W0=1e3;function q0(e){const t=new Set,r=e.subscribe(8,n=>{t.add(n),t.size>W0&&(zt("Too many requests"),t.delete(t.values().next().value))});return{getMatchingRequest(n){let o=1/0,i;for(const s of t){const a=n.startTime-s.startClocks.relative;0<=a&&a<o&&s.url===n.name&&(o=Math.abs(a),i=s)}return i&&t.delete(i),i},stop(){r.unsubscribe()}}}function Y0(e,t,r,n=fT(),o=H0){let i;const s=t.trackEarlyRequests;s?i=q0(e):e.subscribe(8,c=>{u(()=>X0(c,t,r))});const a=Re(t,{type:N.RESOURCE,buffered:!0}).subscribe(c=>{for(const l of c)(s||!Wl(l))&&u(()=>za(l,t,r,i))});o(t,c=>{u(()=>za(c,t,r,i))});function u(c){n.push(()=>{const l=c();l&&e.notify(12,l)})}return{stop:()=>{n.stop(),a.unsubscribe()}}}function X0(e,t,r){const n=U0(e);return Ed(n,e,r,t)}function za(e,t,r,n){const o=Wl(e)&&n?n.getMatchingRequest(e):void 0;return Ed(e,o,r,t)}function Ed(e,t,r,n){if(!e&&!t)return;const o=t?eI(t,n):tI(e,n);if(!n.trackResources&&!o)return;const i=e?bn(e.startTime):t.startClocks,s=e?yw(e):rI(r,i,t.duration),a=t&&J0(t,n),u=fe({date:i.timeStamp,resource:{id:ne(),duration:O(s),type:t?t.type===ut.XHR?te.XHR:te.FETCH:bw(e),method:t?t.method:void 0,status_code:t?t.status:nI(e.responseStatus),url:t?Cw(t.url):e.name,protocol:e&&Tw(e),delivery_type:e&&ww(e),graphql:a},type:A.RESOURCE,_dd:{discarded:!n.trackResources}},o,e&&Q0(e));return{startTime:i.relative,duration:s,rawRumEvent:u,domainContext:Z0(e,t)}}function J0(e,t){const r=Xl(e.url,t);if(r)return xw(e,r)}function Z0(e,t){if(t){const r={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return t.type===ut.XHR?y({xhr:t.xhr},r):y({requestInput:t.input,requestInit:t.init,response:t.response,error:t.error},r)}return{performanceEntry:e}}function Q0(e){const{renderBlockingStatus:t}=e;return{resource:y(y({render_blocking_status:t},Iw(e)),Ew(e))}}function eI(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function tI(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Bl().toString(),rule_psr:t.rulePsr}}}function rI(e,t,r){return e.wasInPageStateDuringPeriod("frozen",t.relative,r)?void 0:r}function nI(e){return e===0?void 0:e}function oI(e,t,r){const{stop:n,eventCounts:o}=Ql({lifeCycle:e,isChildEvent:i=>i.view.id===t,onChange:r});return{stop:n,eventCounts:o}}const iI=10*ie;function sI(e,t,r){return{stop:Re(e,{type:N.PAINT,buffered:!0}).subscribe(o=>{const i=o.find(s=>s.name==="first-contentful-paint"&&s.startTime<t.timeStamp&&s.startTime<iI);i&&r(i.startTime)}).unsubscribe}}function aI(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(B(e,ae()))})})}function cI(e,t,r){const n=Re(e,{type:N.FIRST_INPUT,buffered:!0}).subscribe(o=>{const i=o.find(s=>s.startTime<t.timeStamp);if(i){const s=B(i.startTime,i.processingStart);let a;i.target&&xe(i.target)&&(a=Er(i.target,e.actionNameAttribute)),r({delay:s>=0?s:0,time:i.startTime,targetSelector:a})}});return{stop:()=>{n.unsubscribe()}}}function uI(e,t,r=yd){return fI(e,()=>{const n=r();dI(n)||t(lI(n))})}function lI(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=ae()?e.responseStart:void 0}}function dI(e){return e.loadEventEnd<=0}function fI(e,t){let r;const{stop:n}=es(e,"complete",()=>{r=J(()=>t())});return{stop:()=>{n(),le(r)}}}const pI=10*ie;function vI(e,t,r,n){let o=1/0;const{stop:i}=Ke(e,r,["pointerdown","keydown"],u=>{o=u.timeStamp},{capture:!0,once:!0});let s=0;const a=Re(e,{type:N.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(u=>{const c=xu(u,l=>l.entryType===N.LARGEST_CONTENTFUL_PAINT&&l.startTime<o&&l.startTime<t.timeStamp&&l.startTime<pI&&l.size>s);if(c){let l;c.element&&(l=Er(c.element,e.actionNameAttribute)),n({value:c.startTime,targetSelector:l,resourceUrl:hI(c)}),s=c.size}});return{stop:()=>{i(),a.unsubscribe()}}}function hI(e){return e.url===""?void 0:e.url}function Sd(e,t,r=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:L};if(vt(N.VISIBILITY_STATE)){const i=performance.getEntriesByType(N.VISIBILITY_STATE).filter(s=>s.name==="hidden").find(s=>s.startTime>=t.relative);if(i)return{timeStamp:i.startTime,stop:L}}let n=1/0;const{stop:o}=Ke(e,r,["pagehide","visibilitychange"],i=>{(i.type==="pagehide"||document.visibilityState==="hidden")&&(n=i.timeStamp,o())},{capture:!0});return{get timeStamp(){return n},stop:o}}function gI(e,t,r,n){const o={},{stop:i}=uI(e,d=>{r(d.loadEvent),o.navigationTimings=d,n()}),s=Sd(e,t),{stop:a}=sI(e,s,d=>{o.firstContentfulPaint=d,n()}),{stop:u}=vI(e,s,window,d=>{o.largestContentfulPaint=d,n()}),{stop:c}=cI(e,s,d=>{o.firstInput=d,n()});function l(){i(),a(),u(),c(),s.stop()}return{stop:l,initialViewMetrics:o}}const hi=(e,t)=>e*t,mI=(e,t)=>{const r=Math.max(e.left,t.left),n=Math.max(e.top,t.top),o=Math.min(e.right,t.right),i=Math.min(e.bottom,t.bottom);return r>=o||n>=i?0:hi(o-r,i-n)},Ka=e=>{const t=hi(e.previousRect.width,e.previousRect.height),r=hi(e.currentRect.width,e.currentRect.height),n=mI(e.previousRect,e.currentRect);return t+r-n};function _I(e,t,r){if(!TI())return{stop:L};let n=0,o;r({value:0});const i=SI(),s=Re(e,{type:N.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var u;for(const c of a){if(c.hadRecentInput||c.startTime<t)continue;const{cumulatedValue:l,isMaxValue:d}=i.update(c);if(d){const f=bI(c.sources);o={target:f!=null&&f.node?new WeakRef(f.node):void 0,time:B(t,c.startTime),previousRect:f==null?void 0:f.previousRect,currentRect:f==null?void 0:f.currentRect,devicePixelRatio:window.devicePixelRatio}}if(l>n){n=l;const f=(u=o==null?void 0:o.target)===null||u===void 0?void 0:u.deref();r({value:St(n,4),targetSelector:f&&Er(f,e.actionNameAttribute),time:o==null?void 0:o.time,previousRect:o!=null&&o.previousRect?Ha(o.previousRect):void 0,currentRect:o!=null&&o.currentRect?Ha(o.currentRect):void 0,devicePixelRatio:o==null?void 0:o.devicePixelRatio})}}});return{stop:()=>{s.unsubscribe()}}}function bI(e){let t;for(const r of e)if(r.node&&xe(r.node)){const n=Ka(r);(!t||Ka(t)<n)&&(t=r)}return t}function Ha({x:e,y:t,width:r,height:n}){return{x:e,y:t,width:r,height:n}}const yI=5*Q,EI=Q;function SI(){let e=0,t,r,n=0;return{update:o=>{const i=t===void 0||o.startTime-r>=EI||o.startTime-t>=yI;let s;return i?(t=r=o.startTime,n=e=o.value,s=!0):(e+=o.value,r=o.startTime,s=o.value>n,s&&(n=o.value)),{cumulatedValue:e,isMaxValue:s}}}}function TI(){return vt(N.LAYOUT_SHIFT)&&"WeakRef"in window}let Jr,Td=0,Fo=1/0,Vo=0;function wI(){"interactionCount"in performance||Jr||(Jr=new window.PerformanceObserver(T(e=>{e.getEntries().forEach(t=>{const r=t;r.interactionId&&(Fo=Math.min(Fo,r.interactionId),Vo=Math.max(Vo,r.interactionId),Td=(Vo-Fo)/7+1)})})),Jr.observe({type:"event",buffered:!0,durationThreshold:0}))}const Wa=()=>Jr?Td:window.performance.interactionCount||0,qa=10,II=1*ie;function OI(e,t,r){if(!RI())return{getInteractionToNextPaint:()=>{},setViewEnd:L,stop:L};const{getViewInteractionCount:n,stopViewInteractionCount:o}=CI(r);let i=1/0;const s=AI(n);let a=-1,u,c;function l(p){for(const h of p)h.interactionId&&h.startTime>=t&&h.startTime<=i&&s.process(h);const v=s.estimateP98Interaction();v&&v.duration!==a&&(a=v.duration,c=B(t,v.startTime),u=w0(v.startTime),!u&&v.target&&xe(v.target)&&(u=Er(v.target,e.actionNameAttribute)))}const d=Re(e,{type:N.FIRST_INPUT,buffered:!0}).subscribe(l),f=Re(e,{type:N.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,II),targetSelector:u,time:c};if(n())return{value:0}},setViewEnd:p=>{i=p,o()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function AI(e){const t=[];function r(){t.sort((n,o)=>o.duration-n.duration).splice(qa)}return{process(n){const o=t.findIndex(s=>n.interactionId===s.interactionId),i=t[t.length-1];o!==-1?n.duration>t[o].duration&&(t[o]=n,r()):(t.length<qa||n.duration>i.duration)&&(t.push(n),r())},estimateP98Interaction(){const n=Math.min(t.length-1,Math.floor(e()/50));return t[n]}}}function CI(e){wI();const t=e===Ie.INITIAL_LOAD?0:Wa();let r={stopped:!1};function n(){return Wa()-t}return{getViewInteractionCount:()=>r.stopped?r.interactionCount:n(),stopViewInteractionCount:()=>{r={stopped:!0,interactionCount:n()}}}}function RI(){return vt(N.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function xI(e,t,r,n,o,i,s){let a=o===Ie.INITIAL_LOAD,u=!0;const c=[],l=Sd(n,i);function d(){if(!u&&!a&&c.length>0){const p=Math.max(...c);p<l.timeStamp-i.relative&&s(p)}}const{stop:f}=cs(e,t,r,n,p=>{u&&(u=!1,p.hadActivity&&c.push(B(i.timeStamp,p.end)),d())});return{stop:()=>{f(),l.stop()},setLoadEvent:p=>{a&&(a=!1,c.push(p),d())}}}function XC(){let e;const t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function kI(){let e;const t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}let jo;function LI(e){return jo||(jo=NI(e)),jo}function NI(e){return new x(t=>{const{throttled:r}=En(()=>{t.notify(us())},200);return U(e,window,"resize",r,{capture:!0,passive:!0}).stop})}function us(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const $I=Q;function PI(e,t,r,n=DI(e)){let o=0,i=0,s=0;const a=n.subscribe(({scrollDepth:u,scrollTop:c,scrollHeight:l})=>{let d=!1;if(u>o&&(o=u,d=!0),l>i){i=l;const f=ae();s=B(t.relative,f),d=!0}d&&r({maxDepth:Math.min(o,i),maxDepthScrollTop:c,maxScrollHeight:i,maxScrollHeightTime:s})});return{stop:()=>a.unsubscribe()}}function MI(){const e=kI(),{height:t}=us(),r=Math.round((document.scrollingElement||document.documentElement).scrollHeight),n=Math.round(t+e);return{scrollHeight:r,scrollDepth:n,scrollTop:e}}function DI(e,t=$I){return new x(r=>{function n(){r.notify(MI())}if(window.ResizeObserver){const o=En(n,t,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,s=new ResizeObserver(T(o.throttled));i&&s.observe(i);const a=U(e,window,"scroll",o.throttled,{passive:!0});return()=>{o.cancel(),s.disconnect(),a.stop()}}})}function UI(e,t,r,n,o,i,s){const a={},{stop:u,setLoadEvent:c}=xI(e,t,r,n,i,s,h=>{a.loadingTime=h,o()}),{stop:l}=PI(n,s,h=>{a.scroll=h}),{stop:d}=_I(n,s.relative,h=>{a.cumulativeLayoutShift=h,o()}),{stop:f,getInteractionToNextPaint:p,setViewEnd:v}=OI(n,s.relative,i);return{stop:()=>{u(),d(),l()},stopINPTracking:f,setLoadEvent:c,setViewEnd:v,getCommonViewMetrics:()=>(a.interactionToNextPaint=p(),a)}}function FI(e,t){const{stop:r}=U(e,window,"pageshow",n=>{n.persisted&&t(n)},{capture:!0});return r}function VI(e,t,r){aI(e.relative,n=>{t.firstContentfulPaint=n,t.largestContentfulPaint={value:n},r()})}const jI=3e3,BI=5*ie,GI=5*ie;function zI(e,t,r,n,o,i,s,a){const u=new Set;let c=f(Ie.INITIAL_LOAD,Ou(),a),l;p();let d;s&&(d=v(i),o.trackBfcacheViews&&(l=FI(o,h=>{c.end();const m=bn(h.timeStamp);c=f(Ie.BF_CACHE,m,void 0)})));function f(h,m,E){const S=KI(t,r,n,o,e,h,m,E);return u.add(S),S.stopObservable.subscribe(()=>{u.delete(S)}),S}function p(){t.subscribe(10,()=>{c=f(Ie.ROUTE_CHANGE,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),t.subscribe(9,()=>{c.end({sessionIsActive:!1})})}function v(h){return h.subscribe(({oldLocation:m,newLocation:E})=>{WI(m,E)&&(c.end(),c=f(Ie.ROUTE_CHANGE))})}return{addTiming:(h,m=j())=>{c.addTiming(h,m)},startView:(h,m)=>{c.end({endClocks:m}),c=f(Ie.ROUTE_CHANGE,m,h)},setViewContext:h=>{c.contextManager.setContext(h)},setViewContextProperty:(h,m)=>{c.contextManager.setContextProperty(h,m)},setViewName:h=>{c.setViewName(h)},getViewContext:()=>c.contextManager.getContext(),stop:()=>{d&&d.unsubscribe(),l&&l(),c.end(),u.forEach(h=>h.stop())}}}function KI(e,t,r,n,o,i,s=H(),a){const u=ne(),c=new x,l={};let d=0,f;const p=sr(o),v=yr();let h=!0,m=a==null?void 0:a.name;const E=(a==null?void 0:a.service)||n.service,S=(a==null?void 0:a.version)||n.version,D=a==null?void 0:a.context;D&&v.setContext(D);const _={id:u,name:m,startClocks:s,service:E,version:S,context:D};e.notify(1,_),e.notify(2,_);const{throttled:g,cancel:b}=En(Me,jI,{leading:!1}),{setLoadEvent:C,setViewEnd:Kt,stop:jn,stopINPTracking:Bn,getCommonViewMetrics:Gn}=UI(e,t,r,n,Pe,i,s),{stop:zn,initialViewMetrics:Tr}=i===Ie.INITIAL_LOAD?gI(n,s,C,Pe):{stop:L,initialViewMetrics:{}};i===Ie.BF_CACHE&&VI(s,Tr,Pe);const{stop:Kn,eventCounts:Hn}=oI(e,u,Pe),Wn=jt(Me,BI),qn=e.subscribe(11,ee=>{ee.reason===Ot.UNLOADING&&Me()});Me(),v.changeObservable.subscribe(Pe);function wr(){e.notify(3,{id:u,name:m,context:v.getContext(),startClocks:s,sessionIsActive:h})}function Pe(){wr(),g()}function Me(){b(),wr(),d+=1;const ee=f===void 0?j():f.timeStamp;e.notify(4,{customTimings:l,documentVersion:d,id:u,name:m,service:E,version:S,context:v.getContext(),loadingType:i,location:p,startClocks:s,commonViewMetrics:Gn(),initialViewMetrics:Tr,duration:B(s.timeStamp,ee),isActive:f===void 0,sessionIsActive:h,eventCounts:Hn})}return{get name(){return m},service:E,version:S,contextManager:v,stopObservable:c,end(ee={}){var we,Ze;f||(f=(we=ee.endClocks)!==null&&we!==void 0?we:H(),h=(Ze=ee.sessionIsActive)!==null&&Ze!==void 0?Ze:!0,e.notify(5,{endClocks:f}),e.notify(6,{endClocks:f}),_n(Wn),Kt(f.relative),jn(),qn.unsubscribe(),Me(),J(()=>{this.stop()},GI))},stop(){zn(),Kn(),Bn(),c.notify()},addTiming(ee,we){if(f)return;const Ze=Ry(we)?we:B(s.timeStamp,we);l[HI(ee)]=Ze,Pe()},setViewName(ee){m=ee,Me()}}}function HI(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&w.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function WI(e,t){return e.pathname!==t.pathname||!qI(t.hash)&&Ya(t.hash)!==Ya(e.hash)}function qI(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function Ya(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function YI(e,t,r,n,o,i,s,a,u,c){return e.subscribe(4,l=>e.notify(12,XI(l,r,a))),t.register(0,({startTime:l,eventType:d})=>{const f=u.findView(l);return f?{type:d,service:f.service,version:f.version,context:f.context,view:{id:f.id,name:f.name}}:me}),t.register(1,({startTime:l})=>{var d;return{view:{id:(d=u.findView(l))===null||d===void 0?void 0:d.id}}}),zI(n,e,o,i,r,s,!r.trackViewsManually,c)}function XI(e,t,r){var n,o,i,s,a,u,c,l,d,f,p,v,h,m,E,S,D,_;const g=r.getReplayStats(e.id),b=(o=(n=e.commonViewMetrics)===null||n===void 0?void 0:n.cumulativeLayoutShift)===null||o===void 0?void 0:o.devicePixelRatio,C={_dd:{document_version:e.documentVersion,replay_stats:g,cls:b?{device_pixel_ratio:b}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:A.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(i=e.commonViewMetrics.cumulativeLayoutShift)===null||i===void 0?void 0:i.value,cumulative_layout_shift_time:O((s=e.commonViewMetrics.cumulativeLayoutShift)===null||s===void 0?void 0:s.time),cumulative_layout_shift_target_selector:(a=e.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.targetSelector,first_byte:O((u=e.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.firstByte),dom_complete:O((c=e.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.domComplete),dom_content_loaded:O((l=e.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domContentLoaded),dom_interactive:O((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:O(e.initialViewMetrics.firstContentfulPaint),first_input_delay:O((f=e.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.delay),first_input_time:O((p=e.initialViewMetrics.firstInput)===null||p===void 0?void 0:p.time),first_input_target_selector:(v=e.initialViewMetrics.firstInput)===null||v===void 0?void 0:v.targetSelector,interaction_to_next_paint:O((h=e.commonViewMetrics.interactionToNextPaint)===null||h===void 0?void 0:h.value),interaction_to_next_paint_time:O((m=e.commonViewMetrics.interactionToNextPaint)===null||m===void 0?void 0:m.time),interaction_to_next_paint_target_selector:(E=e.commonViewMetrics.interactionToNextPaint)===null||E===void 0?void 0:E.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:O((S=e.initialViewMetrics.largestContentfulPaint)===null||S===void 0?void 0:S.value),largest_contentful_paint_target_selector:(D=e.initialViewMetrics.largestContentfulPaint)===null||D===void 0?void 0:D.targetSelector,load_event:O((_=e.initialViewMetrics.navigationTimings)===null||_===void 0?void 0:_.loadEvent),loading_time:Zl(O(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:JI(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:O(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:O(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:ST()}};return We(e.customTimings)||(C.view.custom_timings=yu(e.customTimings,O)),{rawRumEvent:C,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function JI({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:r,firstInput:n,largestContentfulPaint:o}){return{cls:e&&{score:e.value,timestamp:O(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:r&&{timestamp:O(r)},fid:n&&{duration:O(n.delay),timestamp:O(n.time),target_selector:n.targetSelector},inp:t&&{duration:O(t.value),timestamp:O(t.time),target_selector:t.targetSelector},lcp:o&&{timestamp:O(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl}}}const ZI="rum";function QI(e,t,r){const n=Al(e,ZI,o=>tO(e,o),r);return n.expireObservable.subscribe(()=>{t.notify(9)}),n.renewObservable.subscribe(()=>{t.notify(10)}),n.sessionStateUpdateObservable.subscribe(({previousState:o,newState:i})=>{if(!o.forcedReplay&&i.forcedReplay){const s=n.findSession();s&&(s.isReplayForced=!0)}}),{findTrackedSession:o=>{const i=n.findSession(o);if(!(!i||i.trackingType==="0"))return{id:i.id,sessionReplay:i.trackingType==="1"?1:i.isReplayForced?2:0,anonymousId:i.anonymousId}},expire:n.expire,expireObservable:n.expireObservable,setForcedReplay:()=>n.updateSessionState({forcedReplay:"1"})}}function eO(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:_l("records")?1:0};return{findTrackedSession:()=>e,expire:L,expireObservable:new x,setForcedReplay:L}}function tO(e,t){return rO(t)?t:Ue(e.sessionSampleRate)?Ue(e.sessionReplaySampleRate)?"1":"2":"0"}function rO(e){return e==="0"||e==="1"||e==="2"}function nO(e,t,r,n,o,i){const s=[e.rumEndpointBuilder];e.replica&&s.push(e.replica.rumEndpointBuilder);const a=Xi({encoder:i(2),request:Yi(s,r),flushController:Ji({pageMayExitObservable:n,sessionExpireObservable:o})});return t.subscribe(13,u=>{u.type===A.VIEW?a.upsert(u,u.view.id):a.add(u)}),a}function oO(e){const t=Bt();e.subscribe(13,r=>{t.send("rum",r)})}const iO=Ye;function sO(e,t,r,n){const o=pt({expireDelay:iO});let i;e.subscribe(1,({startClocks:u})=>{const c=n.href;o.add(a({url:c,referrer:i||document.referrer}),u.relative),i=c}),e.subscribe(6,({endClocks:u})=>{o.closeActive(u.relative)});const s=r.subscribe(({newLocation:u})=>{const c=o.find();if(c){const l=ae();o.closeActive(l),o.add(a({url:u.href,referrer:c.referrer}),l)}});function a({url:u,referrer:c}){return{url:u,referrer:c}}return t.register(0,({startTime:u,eventType:c})=>{const l=o.find(u);return l?{type:c,view:{url:l.url,referrer:l.referrer}}:me}),{findUrl:u=>o.find(u),stop:()=>{s.unsubscribe(),o.stop()}}}function aO(e,t){let r=sr(t);return new x(n=>{const{stop:o}=cO(e,s),{stop:i}=uO(e,s);function s(){if(r.href===t.href)return;const a=sr(t);n.notify({newLocation:a,oldLocation:r}),r=a}return()=>{o(),i()}})}function cO(e,t){const{stop:r}=Ee(Xa("pushState"),"pushState",({onPostCall:i})=>{i(t)}),{stop:n}=Ee(Xa("replaceState"),"replaceState",({onPostCall:i})=>{i(t)}),{stop:o}=U(e,window,"popstate",t);return{stop:()=>{r(),n(),o()}}}function uO(e,t){return U(e,window,"hashchange",t)}function Xa(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const lO=Ye;function dO(e,t,r){const n=pt({expireDelay:lO});return e.subscribe(1,({startClocks:o})=>{n.add({},o.relative)}),e.subscribe(6,({endClocks:o})=>{n.closeActive(o.relative)}),t.register(0,({startTime:o,eventType:i})=>{if(!r.trackFeatureFlagsForEvents.concat([A.VIEW,A.ERROR]).includes(i))return q;const a=n.find(o);return!a||We(a)?q:{type:i,feature_flags:a}}),{addFeatureFlagEvaluation:(o,i)=>{const s=n.find();s&&(s[o]=i)}}}const fO=10*Q;let At,Fr;function pO(e,t,r){e.metricsEnabled&&(wd(),Fr=!1,t.subscribe(13,()=>{Fr=!0}),r.subscribe(({bytesCount:n,messagesCount:o})=>{Fr&&(Fr=!1,At.batchCount+=1,Za(At.batchBytesCount,n),Za(At.batchMessagesCount,o))}),jt(vO,fO))}function vO(){At.batchCount!==0&&(kn("Customer data measures",At),wd())}function Ja(){return{min:1/0,max:0,sum:0}}function Za(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function wd(){At={batchCount:0,batchBytesCount:Ja(),batchMessagesCount:Ja()}}const hO=4e3,gO=500,mO=Ye;function _O(e,t,r=gO){const n=pt({expireDelay:mO,maxEntries:hO});let o;vt(N.VISIBILITY_STATE)&&performance.getEntriesByType(N.VISIBILITY_STATE).forEach(c=>{const l=c.name==="hidden"?"hidden":"active";s(l,c.startTime)}),s(Id(),ae());const{stop:i}=Ke(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],u=>{s(yO(u),u.timeStamp)},{capture:!0});function s(u,c=ae()){u!==o&&(o=u,n.closeActive(c),n.add({state:o,startTime:c},c))}function a(u,c,l){return n.findAll(c,l).some(d=>d.state===u)}return e.register(0,({startTime:u,duration:c=0,eventType:l})=>{if(l===A.VIEW){const d=n.findAll(u,c);return{type:l,_dd:{page_states:bO(d,u,r)}}}return l===A.ACTION||l===A.ERROR?{type:l,view:{in_foreground:a("active",u,0)}}:q}),{wasInPageStateDuringPeriod:a,addPageState:s,stop:()=>{i(),n.stop()}}}function bO(e,t,r){if(e.length!==0)return e.slice(-r).reverse().map(({state:n,startTime:o})=>({state:n,start:O(B(t,o))}))}function yO(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":Id()}function Id(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function EO(e,t){let r;const n=requestAnimationFrame(T(()=>{r=us()})),o=LI(t).subscribe(i=>{r=i}).unsubscribe;return e.register(0,({eventType:i})=>({type:i,display:r?{viewport:r}:void 0})),{stop:()=>{o(),n&&cancelAnimationFrame(n)}}}function SO(e,t){const r=window.cookieStore?TO(e):IO;return new x(n=>r(t,o=>n.notify(o)))}function TO(e){return(t,r)=>U(e,window.cookieStore,"change",o=>{const i=o.changed.find(s=>s.name===t)||o.deleted.find(s=>s.name===t);i&&r(i.value)}).stop}const wO=Q;function IO(e,t){const r=ar(document.cookie,e),n=jt(()=>{const o=ar(document.cookie,e);o!==r&&t(o)},wO);return()=>{_n(n)}}const Qa="datadog-ci-visibility-test-execution-id";function OO(e,t,r=SO(e,Qa)){var n;let o=Fe(Qa)||((n=window.Cypress)===null||n===void 0?void 0:n.env("traceId"));const i=r.subscribe(s=>{o=s});return t.register(0,({eventType:s})=>typeof o!="string"?q:{type:s,session:{type:"ci_test"},ci_test:{test_execution_id:o}}),{stop:()=>{i.unsubscribe()}}}const AO=Ye;function CO(e,t){const r=pt({expireDelay:AO}),n=vt(N.LONG_ANIMATION_FRAME)?N.LONG_ANIMATION_FRAME:N.LONG_TASK,o=Re(t,{type:n,buffered:!0}).subscribe(s=>{for(const a of s){if(!t.trackLongTasks)break;const u=bn(a.startTime),c=ne(),l=RO(a,u,c);e.notify(12,{rawRumEvent:l,startTime:u.relative,duration:a.duration,domainContext:{performanceEntry:a}}),r.add({id:c,startClocks:u,duration:a.duration,entryType:n},u.relative),r.closeActive(qe(u.relative,a.duration))}});return{stop:()=>{o.unsubscribe(),r.stop()},longTaskContexts:{findLongTasks:(s,a)=>r.findAll(s,a)}}}function RO(e,t,r){const n={date:t.timeStamp,type:A.LONG_TASK,_dd:{discarded:!1}};return e.entryType===N.LONG_TASK?W(y({},n),{long_task:{id:r,entry_type:Oa.LONG_TASK,duration:O(e.duration)}}):W(y({},n),{long_task:{id:r,entry_type:Oa.LONG_ANIMATION_FRAME,duration:O(e.duration),blocking_duration:O(e.blockingDuration),first_ui_event_timestamp:O(e.firstUIEventTimestamp),render_start:O(e.renderStart),style_and_layout_start:O(e.styleAndLayoutStart),start_time:O(e.startTime),scripts:e.scripts.map(o=>({duration:O(o.duration),pause_duration:O(o.pauseDuration),forced_style_and_layout_duration:O(o.forcedStyleAndLayoutDuration),start_time:O(o.startTime),execution_start:O(o.executionStart),source_url:o.sourceURL,source_function_name:o.sourceFunctionName,source_char_position:o.sourceCharPosition,invoker:o.invoker,invoker_type:o.invokerType,window_attribution:o.windowAttribution}))}})}function xO(e){e.register(0,({eventType:t})=>{if(!Ol())return q;const r=wl(),n=Il();return{type:t,session:{type:"synthetics"},synthetics:{test_id:r,result_id:n,injected:Ln()}}})}function kO(e,t,r){const n=xn(e),o=r(n);return zi(t).forEach(([i,s])=>gi(e,n,i.split(/\.|(?=\[\])/),s)),o}function gi(e,t,r,n){const[o,...i]=r;if(o==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((s,a)=>gi(s,t[a],i,n));return}if(!(!ec(e)||!ec(t))){if(i.length>0)return gi(e[o],t[o],i,n);LO(e,o,t[o],n)}}function LO(e,t,r,n){const o=ft(r);o===n?e[t]=$(r):n==="object"&&(o==="undefined"||o==="null")&&(e[t]={})}function ec(e){return ft(e)==="object"}const mt={"view.name":"string","view.url":"string","view.referrer":"string"},_t={context:"object"},bt={service:"string",version:"string"};let Od;function NO(e,t,r,n,o){Od={[A.VIEW]:y(y(y({"view.performance.lcp.resource_url":"string"},_t),mt),bt),[A.ERROR]:y(y(y({"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string"},_t),mt),bt),[A.RESOURCE]:y(y(y({"resource.url":"string","resource.graphql.variables":"string"},_t),mt),bt),[A.ACTION]:y(y(y({"action.target.name":"string"},_t),mt),bt),[A.LONG_TASK]:y(y(y({"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string"},_t),mt),bt),[A.VITAL]:y(y(y({},_t),mt),bt)};const i={[A.ERROR]:Yr(A.ERROR,n,o),[A.ACTION]:Yr(A.ACTION,n,o),[A.VITAL]:Yr(A.VITAL,n,o)};t.subscribe(12,({startTime:s,duration:a,rawRumEvent:u,domainContext:c})=>{const l=r.triggerHook(0,{eventType:u.type,startTime:s,duration:a});if(l===me)return;const d=fe(l,u,{ddtags:Wi(e).join(",")});$O(d,e.beforeSend,c,i)&&(We(d.context)&&delete d.context,t.notify(13,d))})}function $O(e,t,r,n){var o;if(t){const s=kO(e,Od[e.type],a=>t(a,r));if(s===!1&&e.type!==A.VIEW)return!1;s===!1&&w.warn("Can't dismiss view events using beforeSend!")}return!((o=n[e.type])===null||o===void 0?void 0:o.isLimitReached())}function PO(e,t,r,n){e.register(0,({eventType:o,startTime:i})=>{const s=t.findTrackedSession(i),a=n.findView(i);if(!s||!a)return me;let u,c,l;return o===A.VIEW?(u=r.getReplayStats(a.id)?!0:void 0,c=s.sessionReplay===1,l=a.sessionIsActive?void 0:!1):u=r.isRecording()?!0:void 0,{type:o,session:{id:s.id,type:"user",has_replay:u,sampled_for_replay:c,is_active:l}}}),e.register(1,({startTime:o})=>{const i=t.findTrackedSession(o);return i?{session:{id:i.id}}:q})}function MO(e){e.register(0,({eventType:t})=>({type:t,connectivity:ul()}))}function DO(e,t,r){e.register(0,({eventType:n})=>{const o=t.source;return{type:n,_dd:{format_version:2,drift:Ay(),configuration:{session_sample_rate:St(t.sessionSampleRate,3),session_replay_sample_rate:St(t.sessionReplaySampleRate,3),profiling_sample_rate:St(t.profilingSampleRate,3),trace_sample_rate:St(t.traceSampleRate,3),beta_encode_cookie_options:t.betaEncodeCookieOptions},browser_sdk_version:Ce()?"6.25.2":void 0,sdk_name:r},application:{id:t.applicationId},date:j(),source:o}}),e.register(1,()=>({application:{id:t.applicationId}}))}function UO(e,t){e.register(1,()=>t.isGranted()?q:me)}const FO=yl,VO=[A.ACTION,A.ERROR,A.LONG_TASK,A.RESOURCE,A.VITAL];function jO(e){return{addEvent:(t,r,n,o)=>{VO.includes(r.type)&&e.notify(12,{startTime:t,rawRumEvent:r,domainContext:n,duration:o})}}}function BO(e,t){if(!t.metricsEnabled)return{stop:L};const{unsubscribe:r}=e.subscribe(4,({initialViewMetrics:n})=>{!n.largestContentfulPaint||!n.navigationTimings||(kn("Initial view metrics",{metrics:GO(n.largestContentfulPaint,n.navigationTimings)}),r())});return{stop:r}}function GO(e,t){return{lcp:{value:e.value},navigation:{domComplete:t.domComplete,domContentLoaded:t.domContentLoaded,domInteractive:t.domInteractive,firstByte:t.firstByte,loadEvent:t.loadEvent}}}function zO(e,t,r,n,o,i,s,a,u){const c=[],l=new hw,d=FO();l.subscribe(13,g=>qi("rum",g));const f=g=>{l.notify(14,{error:g}),zt("Error reported to customer",{"error.message":g.message})},p=bl(e),v=p.subscribe(g=>{l.notify(11,g)});c.push(()=>v.unsubscribe());const h=El("browser-rum-sdk",e,d,f,p,o);c.push(h.stop);const m=Ce()?eO():QI(e,l,i);if(Ce())oO(l);else{const g=nO(e,l,f,p,m.expireObservable,o);c.push(()=>g.stop()),pO(h,l,g.flushController.flushObservable)}UO(d,i);const{stop:E}=BO(l,h);c.push(E);const _=KO(l,d,e,m,t,n,s,a,u,f),{stop:S}=_,D=Or(_,["stop"]);return c.push(S),a.unbuffer(),c.push(()=>r.stop()),W(y({},D),{lifeCycle:l,session:m,stopSession:()=>m.expire(),telemetry:h,stop:()=>{c.forEach(g=>g())},hooks:d})}function KO(e,t,r,n,o,i,s,a,u,c){const l=[],d=dw(),f=aO(r,location),{observable:p,stop:v}=pw();l.push(v),DO(t,r,u);const h=_O(t,r);l.push(()=>h.stop());const m=mw(e);l.push(()=>m.stop());const E=sO(e,t,f,location);l.push(()=>E.stop());const S=dO(e,t,r);PO(t,n,o,m),MO(t);const D=Pl(t,r,"rum",!0),_=Ml(t,r,n,"rum"),g=$l(t,r,"rum"),b=L0(e,t,d,p,r);l.push(b.stop);const C=jO(e),Kt=EO(t,r);l.push(Kt.stop);const jn=OO(r,t);l.push(jn.stop),xO(t),NO(r,e,t,c);const{addTiming:Bn,startView:Gn,setViewName:zn,setViewContext:Tr,setViewContextProperty:Kn,getViewContext:Hn,stop:Wn}=YI(e,t,r,location,d,p,f,o,m,i);l.push(Wn);const{stop:qn}=Y0(e,r,h);l.push(qn);const{stop:wr,longTaskContexts:Pe}=CO(e,r);l.push(wr);const{addError:Me}=P0(e,r,a);$w(e,r,n,_,g);const ee=wT(e,h,s),we=vw(r.applicationId,n,m,b.actionContexts,E);return{addAction:b.addAction,addEvent:C.addEvent,addError:Me,addTiming:Bn,addFeatureFlagEvaluation:S.addFeatureFlagEvaluation,startView:Gn,setViewContext:Tr,setViewContextProperty:Kn,getViewContext:Hn,setViewName:zn,viewHistory:m,getInternalContext:we.get,startDurationVital:ee.startDurationVital,stopDurationVital:ee.stopDurationVital,addDurationVital:ee.addDurationVital,addOperationStepVital:ee.addOperationStepVital,globalContext:D,userContext:_,accountContext:g,longTaskContexts:Pe,stop:()=>l.forEach(Ze=>Ze())}}function HO(e,{session:t,viewContext:r,errorType:n}){const o=t?t.id:"no-session-id",i=[];n!==void 0&&i.push(`error-type=${n}`),r&&(i.push(`seed=${r.id}`),i.push(`from=${r.startClocks.timeStamp}`));const s=WO(e),a=`/rum/replay/sessions/${o}`;return`${s}${a}?${i.join("&")}`}function WO(e){const t=e.site,r=e.subdomain||qO(e);return`https://${r?`${r}.`:""}${t}`}function qO(e){switch(e.site){case st:case mE:return"app";case Gu:return"dd";default:return}}const YO=1e3;let ue;function JC(e){return Dn(e).segments_count}function ZC(e){Dn(e).segments_count+=1}function QC(e){Dn(e).records_count+=1}function eR(e,t){Dn(e).segments_total_raw_size+=t}function XO(e){return ue==null?void 0:ue.get(e)}function Dn(e){ue||(ue=new Map);let t;return ue.has(e)?t=ue.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},ue.set(e,t),ue.size>YO&&JO()),t}function JO(){if(!ue)return;const e=ue.keys().next().value;e&&ue.delete(e)}function Ad(e,t,r){let n=0,o=[],i,s=!0,a=0;const u=[],{stop:c}=U(e,t,"message",({data:f})=>{if(f.type!=="wrote"||f.streamId!==r)return;const p=u[0];p&&(p.id===f.id?(u.shift(),n+=f.additionalBytesCount,o.push(f.result),i=f.trailer,p.writeCallback?p.writeCallback(f.result.byteLength):p.finishCallback&&p.finishCallback()):p.id<f.id&&c())});function l(){const f=o.length===0?new Uint8Array(0):el(o.concat(i)),p={rawBytesCount:n,output:f,outputBytesCount:f.byteLength,encoding:"deflate"};return n=0,o=[],p}function d(){s||(t.postMessage({action:"reset",streamId:r}),s=!0)}return{isAsync:!0,get isEmpty(){return s},write(f,p){t.postMessage({action:"write",id:a,data:f,streamId:r}),u.push({id:a,writeCallback:p,data:f}),s=!1,a+=1},finish(f){d(),u.length?(u.forEach(p=>{delete p.writeCallback}),u[u.length-1].finishCallback=()=>f(l())):f(l())},finishSync(){d();const f=u.map(p=>p.data).join("");return u.length=0,W(y({},l()),{pendingData:f})},estimateEncodedBytesCount(f){return f.length/8},stop(){c()}}}function ls({configuredUrl:e,error:t,source:r,scriptType:n}){if(w.error(`${r} failed to start: an error occurred while initializing the ${n}:`,t),t instanceof Event||t instanceof Error&&ZO(t.message)){let o;e?o=`Please make sure the ${n} URL ${e} is correct and CSP is correctly configured.`:o="Please make sure CSP is correctly configured.",w.error(`${o} See documentation at ${mn}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else n==="worker"&&Zi(t)}function ZO(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const QO=30*Q;function Cd(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.25.2"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let V={status:0};function Rd(e,t,r,n=Cd){switch(V.status===0&&eA(e,t,n),V.status){case 1:return V.initializationFailureCallbacks.push(r),V.worker;case 3:return V.worker}}function tc(){return V.status}function eA(e,t,r=Cd){try{const n=r(e),{stop:o}=U(e,n,"error",a=>{Bo(e,t,a)}),{stop:i}=U(e,n,"message",({data:a})=>{a.type==="errored"?Bo(e,t,a.error,a.streamId):a.type==="initialized"&&rA(a.version)});n.postMessage({action:"init"}),J(()=>tA(t),QO),V={status:1,worker:n,stop:()=>{o(),i()},initializationFailureCallbacks:[]}}catch(n){Bo(e,t,n)}}function tA(e){V.status===1&&(w.error(`${e} failed to start: a timeout occurred while initializing the Worker`),V.initializationFailureCallbacks.forEach(t=>t()),V={status:2})}function rA(e){V.status===1&&(V={status:3,worker:V.worker,stop:V.stop,version:e})}function Bo(e,t,r,n){V.status===1||V.status===0?(ls({configuredUrl:e.workerUrl,error:r,source:t,scriptType:"worker"}),V.status===1&&V.initializationFailureCallbacks.forEach(o=>o()),V={status:2}):Zi(r,{worker_version:V.status===3&&V.version,stream_id:n})}function xd(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function nA(e,t,r,n){const o=t.findTrackedSession(),i=oA(o,n),s=r.findView();return HO(e,{viewContext:s,errorType:i,session:o})}function oA(e,t){if(!xd())return"browser-not-supported";if(!e)return"rum-not-tracked";if(e.sessionReplay===0)return"incorrect-session-plan";if(!t)return"replay-not-started"}function iA(e,t){if(!e.metricsEnabled)return{stop:L};let r,n,o;const{unsubscribe:i}=t.subscribe(s=>{switch(s.type){case"start":r={forced:s.forced,timestamp:j()},n=void 0,o=void 0;break;case"document-ready":r&&(n=B(r.timestamp,j()));break;case"recorder-settled":r&&(o=B(r.timestamp,j()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),r&&kn("Recorder init metrics",{metrics:sA(r.forced,o,B(r.timestamp,j()),s.type,n)});break}});return{stop:i}}function sA(e,t,r,n,o){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:r,result:n,waitForDocReadyDuration:o}}function aA(e,t,r,n,o,i,s){let a=0,u;t.subscribe(9,()=>{(a===2||a===3)&&(f(),a=1)}),t.subscribe(10,()=>{a===1&&d()});const c=new x;iA(s,c);const l=async p=>{c.notify({type:"start",forced:p});const[v]=await Promise.all([rc(c,{type:"recorder-settled"},o()),rc(c,{type:"document-ready"},ZS(e,"interactive"))]);if(a!==2){c.notify({type:"aborted"});return}if(!v){a=0,c.notify({type:"recorder-load-failed"});return}const h=i();if(!h){a=0,c.notify({type:"deflate-encoder-load-failed"});return}({stop:u}=v(t,e,r,n,h,s)),a=3,c.notify({type:"succeeded"})};function d(p){const v=r.findTrackedSession();if(cA(v,p)){a=1;return}if(uA(a))return;a=2;const h=lA(v,p)||!1;l(h).catch(Ge),h&&r.setForcedReplay()}function f(){a===3&&(u==null||u()),a=0}return{start:d,stop:f,getSessionReplayLink(){return nA(e,r,n,a!==0)},isRecording:()=>a===3}}function cA(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function uA(e){return e===2||e===3}function lA(e,t){return t&&t.force&&e.sessionReplay===0}async function rc(e,t,r){try{return await r}finally{e.notify(t)}}function dA(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:L},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function fA(e,t){if(Ce()&&!_l("records")||!xd())return{start:L,stop:L,getReplayStats:()=>{},onRumStart:L,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:r,shouldStartImmediately:n}=dA();return{start:i=>r.start(i),stop:()=>r.stop(),getSessionReplayLink:()=>r.getSessionReplayLink(),onRumStart:o,isRecording:()=>tc()===3&&r.isRecording(),getReplayStats:i=>tc()===3?XO(i):void 0};function o(i,s,a,u,c,l){let d;function f(){return d||(c!=null||(c=Rd(s,"Datadog Session Replay",()=>{r.stop()},t)),c&&(d=Ad(s,c,1))),d}r=aA(s,i,a,u,e,f,l),n(s)&&r.start()}}const pA="modulepreload",vA=function(e,t){return new URL(e,t).href},nc={},kd=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){const s=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),u=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(r.map(c=>{if(c=vA(c,n),c in nc)return;nc[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(!!n)for(let v=s.length-1;v>=0;v--){const h=s[v];if(h.href===c&&(!l||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${d}`))return;const p=document.createElement("link");if(p.rel=l?"stylesheet":pA,l||(p.as="script"),p.crossOrigin="",p.href=c,u&&p.setAttribute("nonce",u),document.head.appendChild(p),l)return new Promise((v,h)=>{p.addEventListener("load",v),p.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};async function hA(e=gA){try{return await e()}catch(t){ls({error:t,source:"Recorder",scriptType:"module"})}}async function gA(){return(await kd(()=>import("./assets/startRecording-CuFdVhxx.js"),[],import.meta.url)).startRecording}function mA(){return ce().Profiler!==void 0}function _A(e){let t={status:"starting"};return e.register(0,({eventType:r})=>r!==A.VIEW&&r!==A.LONG_TASK?q:{type:r,_dd:{profiling:t}}),{get:()=>t,set:r=>{t=r}}}async function bA(e=yA){try{return await e()}catch(t){ls({error:t,source:"Profiler",scriptType:"module"})}}async function yA(){return(await kd(()=>import("./assets/profiler-BRmTNL9s.js"),[],import.meta.url)).createRumProfiler}function EA(){let e;function t(r,n,o,i,s,a,u){const c=i.findTrackedSession();if(!c||!jl(c.id,o.profilingSampleRate))return;const l=_A(n);if(!mA()){l.set({status:"error",error_reason:"not-supported-by-browser"});return}bA().then(d=>{if(!d){zt("[DD_RUM] Failed to lazy load the RUM Profiler"),l.set({status:"error",error_reason:"failed-to-lazy-load"});return}e=d(o,r,i,l,a,u,s,void 0),e.start()}).catch(Ge)}return{onRumStart:t,stop:()=>{e==null||e.stop().catch(Ge)}}}const SA=fA(hA),TA=EA(),mi=uw(zO,SA,TA,{startDeflateWorker:Rd,createDeflateEncoder:Ad,sdkName:"rum"});ol(ce(),"DD_RUM",mi);function ln(e,t,r){const n=r.getHandler(),o=Array.isArray(n)?n:[n];return oc[e]>=oc[r.getLevel()]&&o.includes(t)}const I={ok:"ok",debug:"debug",info:"info",notice:"notice",warn:"warn",error:"error",critical:"critical",alert:"alert",emerg:"emerg"},oc={[I.ok]:0,[I.debug]:1,[I.info]:2,[I.notice]:4,[I.warn]:5,[I.error]:6,[I.critical]:7,[I.alert]:8,[I.emerg]:9};function Un(e,{includeMessage:t=!1}={}){return{stack:e.stack,kind:e.type,message:t?e.message:void 0,causes:e.causes,fingerprint:e.fingerprint,handling:e.handling}}var wA=function(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i};const lr={console:"console",http:"http"},IA=Object.keys(I);class pe{constructor(t,r,n=lr.http,o=I.debug,i={}){this.handleLogStrategy=t,this.handlerType=n,this.level=o,this.contextManager=yr("logger"),this.tags=[],this.contextManager.setContext(i),r&&this.contextManager.setContextProperty("logger",{name:r})}logImplementation(t,r,n=I.info,o,i){const s=$(r);let a;if(o!=null){const u=Cn({originalError:o,nonErrorPrefix:"Provided",source:se.LOGGER,handling:"handled",startClocks:H()});a=fe({error:Un(u,{includeMessage:!0})},u.context,s)}else a=s;this.handleLogStrategy({message:$(t),context:a,status:n},this,i)}log(t,r,n=I.info,o){let i;ln(n,lr.http,this)&&(i=Nt("log")),this.logImplementation(t,r,n,o,i)}setContext(t){this.contextManager.setContext(t)}getContext(){return this.contextManager.getContext()}setContextProperty(t,r){this.contextManager.setContextProperty(t,r)}removeContextProperty(t){this.contextManager.removeContextProperty(t)}clearContext(){this.contextManager.clearContext()}addTag(t,r){this.tags.push(tt(t,r))}removeTagsWithKey(t){const r=cl(t);this.tags=this.tags.filter(n=>n!==r&&!n.startsWith(`${r}:`))}getTags(){return this.tags.slice()}setHandler(t){this.handlerType=t}getHandler(){return this.handlerType}setLevel(t){this.level=t}getLevel(){return this.level}}wA([Ty],pe.prototype,"logImplementation",null);pe.prototype.ok=$e(I.ok);pe.prototype.debug=$e(I.debug);pe.prototype.info=$e(I.info);pe.prototype.notice=$e(I.notice);pe.prototype.warn=$e(I.warn);pe.prototype.error=$e(I.error);pe.prototype.critical=$e(I.critical);pe.prototype.alert=$e(I.alert);pe.prototype.emerg=$e(I.emerg);function $e(e){return function(t,r,n){let o;ln(e,lr.http,this)&&(o=Nt("log")),this.logImplementation(t,r,e,n,o)}}function ic(){return dt?{}:{view:{referrer:document.referrer,url:window.location.href}}}const OA=32*Xe;function AA(e,t){e.usePciIntake===!0&&e.site&&e.site!=="datadoghq.com"&&w.warn("PCI compliance for Logs is only available for Datadog organizations in the US1 site. Default intake will be used.");const r=Hu(e,t),n=sc(e.forwardConsoleLogs,an(F),"Forward Console Logs"),o=sc(e.forwardReports,an(Pt),"Forward Reports");if(!(!r||!n||!o))return e.forwardErrorsToLogs&&!n.includes(F.error)&&n.push(F.error),y({forwardErrorsToLogs:e.forwardErrorsToLogs!==!1,forwardConsoleLogs:n,forwardReports:o,requestErrorResponseLengthLimit:OA},r)}function sc(e,t,r){if(e===void 0)return[];if(!(e==="all"||Array.isArray(e)&&e.every(n=>t.includes(n)))){w.error(`${r} should be "all" or an array with allowed values "${t.join('", "')}"`);return}return e==="all"?t:US(e)}function CA(e){const t=Wu(e);return y({forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports,use_pci_intake:e.usePciIntake},t)}function RA(e,t,r){const n=Nl(),o=os();$o(o,k.globalContext,n);const i=ns();$o(i,k.accountContext,n);const s=is();$o(s,k.userContext,n);let a,u;const c=t.observable.subscribe(l);function l(){if(!u||!a||!t.isGranted())return;c.unsubscribe();const d=r(a,u);n.drain(d)}return{init(d,f){if(!d){w.error("Missing configuration");return}if(qu(d.enableExperimentalFeatures),Ce()&&(d=xA(d)),a=d,Sl(CA(d)),u){Rn("DD_LOGS",d);return}const p=AA(d,f);p&&(u=p,Nn().subscribe(L),t.tryToInit(p.trackingConsent),l())},get initConfiguration(){return a},globalContext:o,accountContext:i,userContext:s,getInternalContext:L,handleLog(d,f,p,v=e(),h=j()){n.add(m=>m.handleLog(d,f,p,v,h))}}}function xA(e){return W(y({},e),{clientToken:"empty"})}function kA(e){const t=Bu(),r=Dl().observable;let n=RA(ic,t,(a,u)=>{const c=e(u,ic,t,r);return n=LA(a,c),c});const o=()=>n,i={},s=new pe((...a)=>n.handleLog(...a));return nl({logger:s,init:a=>{const u=new Error().stack;Oe(()=>n.init(a,u))},setTrackingConsent:T(a=>{t.update(a),G({feature:"set-tracking-consent",tracking_consent:a})}),getGlobalContext:P(o,k.globalContext,M.getContext),setGlobalContext:P(o,k.globalContext,M.setContext),setGlobalContextProperty:P(o,k.globalContext,M.setContextProperty),removeGlobalContextProperty:P(o,k.globalContext,M.removeContextProperty),clearGlobalContext:P(o,k.globalContext,M.clearContext),createLogger:T((a,u={})=>(i[a]=new pe((...c)=>n.handleLog(...c),$(a),u.handler,u.level,$(u.context)),i[a])),getLogger:T(a=>i[a]),getInitConfiguration:T(()=>xn(n.initConfiguration)),getInternalContext:T(a=>n.getInternalContext(a)),setUser:P(o,k.userContext,M.setContext),getUser:P(o,k.userContext,M.getContext),setUserProperty:P(o,k.userContext,M.setContextProperty),removeUserProperty:P(o,k.userContext,M.removeContextProperty),clearUser:P(o,k.userContext,M.clearContext),setAccount:P(o,k.accountContext,M.setContext),getAccount:P(o,k.accountContext,M.getContext),setAccountProperty:P(o,k.accountContext,M.setContextProperty),removeAccountProperty:P(o,k.accountContext,M.removeContextProperty),clearAccount:P(o,k.accountContext,M.clearContext)})}function LA(e,t){return y({init:r=>{Rn("DD_LOGS",r)},initConfiguration:e},t)}const NA="logs";function $A(e,t){const r=Al(e,NA,n=>Ld(e,n),t);return{findTrackedSession:(n,o={returnInactive:!1})=>{const i=r.findSession(n,o);return i&&i.trackingType==="1"?{id:i.id,anonymousId:i.anonymousId}:void 0},expireObservable:r.expireObservable}}function PA(e){const r=Ld(e)==="1"?{}:void 0;return{findTrackedSession:()=>r,expireObservable:new x}}function Ld(e,t){return MA(t)?t:Ue(e.sessionSampleRate)?"1":"0"}function MA(e){return e==="0"||e==="1"}function DA(e,t,r,n,o,i){const s=IA.concat(["custom"]),a={};s.forEach(u=>{a[u]=Yr(u,o,i)}),t.subscribe(0,({rawLogsEvent:u,messageContext:c=void 0,savedCommonContext:l=void 0,domainContext:d,ddtags:f=[]})=>{var p,v;const h=yn(u.date),m=l||n(),E=r.triggerHook(0,{startTime:h});if(E===me)return;const S=Wi(e),D=fe({view:m.view},E,u,c,{ddtags:S.concat(f).join(",")});((p=e.beforeSend)===null||p===void 0?void 0:p.call(e,D,d))===!1||D.origin!==se.AGENT&&((v=a[D.status])!==null&&v!==void 0?v:a.custom).isLimitReached()||t.notify(1,D)})}const UA={[F.log]:I.info,[F.debug]:I.debug,[F.info]:I.info,[F.warn]:I.warn,[F.error]:I.error};function FA(e,t){const r=Ll(e.forwardConsoleLogs).subscribe(n=>{var o;const i={rawLogsEvent:{date:j(),message:n.message,origin:se.CONSOLE,error:n.error&&Un(n.error),status:UA[n.api]},messageContext:(o=n.error)===null||o===void 0?void 0:o.context,domainContext:{handlingStack:n.handlingStack}};t.notify(0,i)});return{stop:()=>{r.unsubscribe()}}}function VA(e,t){const r=il(e,e.forwardReports).subscribe(n=>{let o=n.message,i;const s=n.originalError.type==="deprecation"?I.warn:I.error;s===I.error?i=Un(n):n.stack&&(o+=` Found in ${eS(n.stack)}`),t.notify(0,{rawLogsEvent:{date:j(),message:o,origin:se.REPORT,error:i,status:s}})});return{stop:()=>{r.unsubscribe()}}}function jA(e,t){if(!e.forwardErrorsToLogs)return{stop:L};const r=(dt?new x:xl(e)).subscribe(s=>{s.state==="complete"&&i(ut.XHR,s)}),n=Nn({responseBodyAction:s=>o(s)?2:0}).subscribe(s=>{s.state==="resolve"&&i(ut.FETCH,s)});function o(s){return!Ku(s.url)&&(BA(s)||ll(s.status))}function i(s,a){if(!o(a))return;const u="error"in a&&a.error?br(_r(a.error)):a.responseBody||"Failed to load",c={isAborted:a.isAborted,handlingStack:a.handlingStack};t.notify(0,{rawLogsEvent:{message:`${GA(s)} error ${a.method} ${a.url}`,date:a.startClocks.timeStamp,error:{stack:Sn(u,e.requestErrorResponseLengthLimit,"..."),handling:void 0},http:{method:a.method,status_code:a.status,url:a.url},status:I.error,origin:se.NETWORK},domainContext:c})}return{stop:()=>{r.unsubscribe(),n.unsubscribe()}}}function BA(e){return e.status===0&&e.responseType!=="opaque"}function GA(e){return ut.XHR===e?"XHR":"Fetch"}function zA(e,t,r){if(!e.forwardErrorsToLogs)return{stop:L};const n=r.subscribe(o=>{if(o.type===0){const i=o.error;t.notify(0,{rawLogsEvent:{message:i.message,date:i.startClocks.timeStamp,error:Un(i),origin:se.SOURCE,status:I.error},messageContext:i.context})}});return{stop:()=>{n.unsubscribe()}}}const KA=Rl;function HA(e){function t(r,n,o,i,s){const a=fe(n.getContext(),r.context);if(ln(r.status,lr.console,n)&&qA(r,a),ln(r.status,lr.http,n)){const u={rawLogsEvent:{date:s||j(),message:r.message,status:r.status,origin:se.LOGGER},messageContext:a,savedCommonContext:i,ddtags:n.getTags()};o&&(u.domainContext={handlingStack:o}),e.notify(0,u)}}return{handleLog:t}}const WA={[I.ok]:F.debug,[I.debug]:F.debug,[I.info]:F.info,[I.notice]:F.info,[I.warn]:F.warn,[I.error]:F.error,[I.critical]:F.error,[I.alert]:F.error,[I.emerg]:F.error};function qA({status:e,message:t},r){rt[WA[e]].call(ye,t,r)}function YA(e,t,r,n,o){const i=[e.logsEndpointBuilder];e.replica&&i.push(e.replica.logsEndpointBuilder);const s=Xi({encoder:Qi(),request:Yi(i,r),flushController:Ji({pageMayExitObservable:n,sessionExpireObservable:o.expireObservable})});return t.subscribe(1,a=>{s.add(a)}),s}function XA(e){const t=Bt();e.subscribe(1,r=>{t.send("log",r)})}function JA(e){return{get:t=>{const r=e.findTrackedSession(t);if(r)return{session_id:r.id}}}}function ZA(e){return t=>{e.notify(0,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:se.AGENT,status:I.error}}),zt("Error reported to customer",{"error.message":t.message})}}const QA=yl;function eC(e){const t=ge;e.register(0,({startTime:o})=>{const i=r(o);return i||q}),e.register(1,({startTime:o})=>{var i,s;const a=r(o);return a?{application:{id:a.application_id},view:{id:(i=a.view)===null||i===void 0?void 0:i.id},action:{id:(s=a.user_action)===null||s===void 0?void 0:s.id}}:q});function r(o){const s=Ln()?t.DD_RUM_SYNTHETICS:t.DD_RUM,a=n(o,s);if(a)return a}function n(o,i){if(i&&i.getInternalContext)return i.getInternalContext(o)}}function tC(e,t,r){e.register(0,({startTime:n})=>{const o=r.findTrackedSession(n);return r.findTrackedSession(n,{returnInactive:!0})?{service:t.service,session_id:o?o.id:void 0,session:o?{id:o.id}:void 0}:me}),e.register(1,({startTime:n})=>{const o=r.findTrackedSession(n);return!o||!o.id?q:{session:{id:o.id}}})}function rC(e,t){function r(){return t.isGranted()?q:me}e.register(0,r),e.register(1,r)}const Go="logs";function nC(e,t,r,n){const o=new KA,i=QA(),s=[];o.subscribe(1,m=>qi("logs",m));const a=ZA(o),u=dt?new x:bl(e),c=El("browser-logs-sdk",e,i,a,u,Qi);s.push(c.stop);const l=e.sessionStoreStrategyType&&!Ce()&&!Ln()?$A(e,r):PA(e);rC(i,r),tC(i,e,l);const d=$l(i,e,Go),f=Ml(i,e,l,Go),p=Pl(i,e,Go,!1);eC(i),jA(e,o),zA(e,o,n),n.unbuffer(),FA(e,o),VA(e,o);const{handleLog:v}=HA(o);if(DA(e,o,i,t,a),Ce())XA(o);else{const{stop:m}=YA(e,o,a,u,l);s.push(()=>m())}const h=JA(l);return{handleLog:v,getInternalContext:h.get,accountContext:d,globalContext:p,userContext:f,stop:()=>{s.forEach(m=>m())}}}const ds=kA(nC);ol(ce(),"DD_LOGS",ds);var Nd={},$d={},Pd={};Object.defineProperty(Pd,"__esModule",{value:!0});var Md={};Object.defineProperty(Md,"__esModule",{value:!0});var Dd={};Object.defineProperty(Dd,"__esModule",{value:!0});var Ud={};Object.defineProperty(Ud,"__esModule",{value:!0});var Fd={};Object.defineProperty(Fd,"__esModule",{value:!0});var Vd={};Object.defineProperty(Vd,"__esModule",{value:!0});var jd={};Object.defineProperty(jd,"__esModule",{value:!0});(function(e){var t=z&&z.__createBinding||(Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]}),r=z&&z.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Pd,e),r(Md,e),r(Dd,e),r(Ud,e),r(Fd,e),r(Vd,e),r(jd,e)})($d);var Bd={},Fn={},Vn={exports:{}};function oC(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}var iC=sC;function sC(e,t,r){var n=r&&r.stringify||oC,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var s=new Array(i);s[0]=n(e);for(var a=1;a<i;a++)s[a]=n(t[a]);return s.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",l=1-o,d=-1,f=e&&e.length||0,p=0;p<f;){if(e.charCodeAt(p)===37&&p+1<f){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(l>=u||t[l]==null)break;d<p&&(c+=e.slice(d,p)),c+=Number(t[l]),d=p+2,p++;break;case 105:if(l>=u||t[l]==null)break;d<p&&(c+=e.slice(d,p)),c+=Math.floor(Number(t[l])),d=p+2,p++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;d<p&&(c+=e.slice(d,p));var v=typeof t[l];if(v==="string"){c+="'"+t[l]+"'",d=p+2,p++;break}if(v==="function"){c+=t[l].name||"<anonymous>",d=p+2,p++;break}c+=n(t[l]),d=p+2,p++;break;case 115:if(l>=u)break;d<p&&(c+=e.slice(d,p)),c+=String(t[l]),d=p+2,p++;break;case 37:d<p&&(c+=e.slice(d,p)),c+="%",d=p+2,p++,l--;break}++l}++p}return d===-1?e:(d<f&&(c+=e.slice(d)),c)}const ac=iC;Vn.exports=ke;const dr=EC().console||{},aC={mapHttpRequest:Vr,mapHttpResponse:Vr,wrapRequestSerializer:zo,wrapResponseSerializer:zo,wrapErrorSerializer:zo,req:Vr,res:Vr,err:uc,errWithCause:uc};function Ve(e,t){return e==="silent"?1/0:t.levels.values[e]}const fs=Symbol("pino.logFuncs"),_i=Symbol("pino.hierarchy"),cC={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function cc(e,t){const r={logger:t,parent:e[_i]};t[_i]=r}function uC(e,t,r){const n={};t.forEach(o=>{n[o]=r[o]?r[o]:dr[o]||dr[cC[o]||"log"]||Ct}),e[fs]=n}function lC(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function ke(e){e=e||{},e.browser=e.browser||{};const t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||dr;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=lC(e.browser.serialize,n);let i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);const s=Object.keys(e.customLevels||{}),a=["error","fatal","warn","info","debug","trace"].concat(s);typeof r=="function"&&a.forEach(function(h){r[h]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");const u=e.level||"info",c=Object.create(r);c.log||(c.log=Ct),uC(c,a,r),cc({},c),Object.defineProperty(c,"levelVal",{get:d}),Object.defineProperty(c,"level",{get:f,set:p});const l={transmit:t,serialize:o,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:a,timestamp:_C(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Ct};c.levels=dC(e),c.level=u,c.isLevelEnabled=function(h){return this.levels.values[h]?this.levels.values[h]>=this.levels.values[this.level]:!1},c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=Ct,c.serializers=n,c._serialize=o,c._stdErrSerialize=i,c.child=function(...h){return v.call(this,l,...h)},t&&(c._logEvent=bi());function d(){return Ve(this.level,this)}function f(){return this._level}function p(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,et(this,l,c,"error"),et(this,l,c,"fatal"),et(this,l,c,"warn"),et(this,l,c,"info"),et(this,l,c,"debug"),et(this,l,c,"trace"),s.forEach(m=>{et(this,l,c,m)})}function v(h,m,E){if(!m)throw new Error("missing bindings for child Pino");E=E||{},o&&m.serializers&&(E.serializers=m.serializers);const S=E.serializers;if(o&&S){var D=Object.assign({},n,S),_=e.browser.serialize===!0?Object.keys(D):o;delete m.serializers,ps([m],_,D,this._stdErrSerialize)}function g(C){this._childLevel=(C._childLevel|0)+1,this.bindings=m,D&&(this.serializers=D,this._serialize=_),t&&(this._logEvent=bi([].concat(C._logEvent.bindings,m)))}g.prototype=this;const b=new g(this);return cc(this,b),b.child=function(...C){return v.call(this,h,...C)},b.level=E.level||this.level,h.onChild(b),b}return c}function dC(e){const t=e.customLevels||{},r=Object.assign({},ke.levels.values,t),n=Object.assign({},ke.levels.labels,fC(t));return{values:r,labels:n}}function fC(e){const t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}ke.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};ke.stdSerializers=aC;ke.stdTimeFunctions=Object.assign({},{nullTime:Gd,epochTime:zd,unixTime:bC,isoTime:yC});function pC(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[_i];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function et(e,t,r,n){if(Object.defineProperty(e,n,{value:Ve(e.level,r)>Ve(n,r)?Ct:r[fs][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Ct){if(!t.transmit)return;const i=t.transmit.level||e.level,s=Ve(i,r);if(Ve(n,r)<s)return}e[n]=hC(e,t,r,n);const o=pC(e);o.length!==0&&(e[n]=vC(o,e[n]))}function vC(e,t){return function(){return t.apply(this,[...e,...arguments])}}function hC(e,t,r,n){return function(o){return function(){const s=t.timestamp(),a=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===dr?dr:this;for(var c=0;c<a.length;c++)a[c]=arguments[c];var l=!1;if(t.serialize&&(ps(a,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?o.call(u,...gC(this,n,a,s,t)):o.apply(u,a),t.transmit){const d=t.transmit.level||e._level,f=Ve(d,r),p=Ve(n,r);if(p<f)return;mC(this,{ts:s,methodLevel:n,methodValue:p,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Ve(e._level,r)},a,l)}}}(e[fs][n])}function gC(e,t,r,n,o){const{level:i,log:s=d=>d}=o.formatters||{},a=r.slice();let u=a[0];const c={};let l=(e._childLevel|0)+1;if(l<1&&(l=1),n&&(c.time=n),i){const d=i(t,e.levels.values[t]);Object.assign(c,d)}else c.level=e.levels.values[t];if(o.asObjectBindingsOnly){if(u!==null&&typeof u=="object")for(;l--&&typeof a[0]=="object";)Object.assign(c,a.shift());return[s(c),...a]}else{if(u!==null&&typeof u=="object"){for(;l--&&typeof a[0]=="object";)Object.assign(c,a.shift());u=a.length?ac(a.shift(),a):void 0}else typeof u=="string"&&(u=ac(a.shift(),a));return u!==void 0&&(c[o.messageKey]=u),[s(c)]}}function ps(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=ke.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(const i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function mC(e,t,r,n=!1){const o=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,u=t.val,c=e._logEvent.bindings;n||ps(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(l){return c.indexOf(l)===-1}),e._logEvent.level.label=s,e._logEvent.level.value=a,o(s,e._logEvent,u),e._logEvent=bi(c)}function bi(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function uc(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)t[r]===void 0&&(t[r]=e[r]);return t}function _C(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Gd:zd}function Vr(){return{}}function zo(e){return e}function Ct(){}function Gd(){return!1}function zd(){return Date.now()}function bC(){return Math.round(Date.now()/1e3)}function yC(){return new Date(Date.now()).toISOString()}function EC(){function e(t){return typeof t!="undefined"&&t}try{return typeof globalThis!="undefined"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}Vn.exports.default=ke;Vn.exports.pino=ke;var SC=Vn.exports,TC=z&&z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.createLogger=wC;const lc=TC(SC);function wC(e,t){return e&&"write"in e?(0,lc.default)({level:"info"},e):(0,lc.default)(y({level:"info"},e),t)}var vs={};Object.defineProperty(vs,"__esModule",{value:!0});vs.createLoggerHttpMiddleware=OC;const IC=Fn;function OC(e){const{logger:t,genReqId:r,logRequest:n=!0}=e!=null?e:{};return(o,i,s)=>{const a=(t!=null?t:(0,IC.createLogger)()).child({req:{reqId:r==null?void 0:r(o),method:o.method,url:o.url,headers:o.headers,params:o.params,query:o.query}});if(o.logger=a,i.logger=a,o.startTime=Date.now(),n){const u=c=>{i.removeListener("error",u),i.removeListener("finish",u),i.removeListener("close",u),i.logger.info({err:c,duration:Date.now()-o.startTime},`Request ${o.method} ${o.url} ${c?"failed":"completed"}`)};i.on("finish",u),i.on("close",u),i.on("error",u)}s()}}(function(e){var t=z&&z.__createBinding||(Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]}),r=z&&z.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Fn,e),r(vs,e)})(Bd);(function(e){var t=z&&z.__createBinding||(Object.create?function(n,o,i,s){s===void 0&&(s=i);var a=Object.getOwnPropertyDescriptor(o,i);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,s,a)}:function(n,o,i,s){s===void 0&&(s=i),n[s]=o[i]}),r=z&&z.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r($d,e),r(Bd,e)})(Nd);ds.init({clientToken:void 0,site:"datadoghq.com",service:"vwr-loader",env:void 0,version:void 0,forwardErrorsToLogs:!0,sessionSampleRate:100});function AC(e){const t=e,r=t.msg||"",n=t.error instanceof Error?t.error:void 0,c=t,{msg:o,level:i,time:s,error:a}=c,u=Or(c,["msg","level","time","error"]);return{msg:r,context:u,errorObj:n}}function jr(e,t,r){const{msg:n,context:o}=AC(e);console[t](n,o),ds.logger[r](n,o)}let de=Nd.createLogger({type:"browser",browser:{asObject:!0,formatters:{level(e){return{level:e}}},write:{trace:e=>jr(e,"debug","debug"),debug:e=>jr(e,"debug","debug"),info:e=>jr(e,"info","info"),warn:e=>jr(e,"warn","warn")}}}).child({service:"vwr-loader",env:void 0,platform:void 0});const dc=void 0,fc=void 0;function CC(e){var t;try{if(!dc||!fc)throw new Error("Datadog credentials not provided");return mi.init({applicationId:dc,clientToken:fc,site:"datadoghq.com",service:(t=e.service)!=null?t:"vwr-loader",env:e.env,version:e.version,sessionSampleRate:100,sessionReplaySampleRate:0,trackResources:!0,trackLongTasks:!0,defaultPrivacyLevel:"mask-user-input",allowFallbackToLocalStorage:!0}),mi}catch(r){de.error("Failed to initialize Datadog RUM:",r)}}const RC={ENV_VARS_MISSING:"ENV_VARS_MISSING"};class Sr extends Error{constructor(t,r,n={}){super(r),this.reason=t,this.message=r,this.context=n,this.name="InitializationError",Object.setPrototypeOf(this,Sr.prototype)}toJSON(){var t;return W(y({name:this.name,reason:this.reason,message:this.message},this.context),{cause:(t=this.context.cause)==null?void 0:t.message,stack:this.stack})}getContext(){return W(y({},this.context),{reason:this.reason})}}function Kd(e){return e instanceof Error&&e.name==="VWRInitializationError"}function xC(e){try{const r=performance.getEntriesByType("navigation")[0];(r==null?void 0:r.type)==="back_forward"&&(de.info({platform:e,navigationType:r.type},"[Shell] Back navigation detected, exiting app"),kC(e))}catch(t){de.warn({error:t},"[Shell] Could not check navigation type")}}function kC(e){switch(e){case"SAMSUNG_TV":LC();break;case"LG_TV":NC();break;default:de.info({platform:e},"[Shell] No platform-specific exit")}}function LC(){var e,t;try{(t=(e=window.tizen)==null?void 0:e.application)!=null&&t.getCurrentApplication?window.tizen.application.getCurrentApplication().exit():de.warn("[Shell] Tizen exit API not available")}catch(r){de.error({error:r},"[Shell] Failed to exit Samsung app")}}function NC(){try{window.close()}catch(e){de.error({error:e},"[Shell] Failed to exit LG app")}}const $C=void 0,PC=void 0,MC=async e=>{const t=performance.now();try{await DC(e),e==null||e.addAction("vwr:init:complete",{outcome:"success",duration_ms:performance.now()-t})}catch(r){e==null||e.addAction("vwr:init:complete",{outcome:"failure",duration_ms:performance.now()-t});let n="UNKNOWN_ERROR";throw(r instanceof Sr||Kd(r))&&(n=r.reason),e==null||e.addAction("vwr:fallback",{reason:n,error_type:r instanceof Error?r.name:"UnknownError"}),r}};async function DC(e){throw new Sr(RC.ENV_VARS_MISSING,"[Shell] Required environment variables not injected (PLATFORM, CONFIG_URL, or CONFIG_FILE)",{configUrl:$C,configFile:PC})}const Ko=void 0,UC=void 0,FC=void 0;function VC(e){if(e instanceof Sr||Kd(e))de.error({context:e.getContext(),error_type:e.name,error:e},`[Shell] FALLBACK TO HUB - ${e.message}`);else{const t=e instanceof Error?e:new Error(String(e));de.error({reason:t.message,error_type:t.name,error:t},"[Shell] FALLBACK TO HUB - Init failed (unknown error)")}}async function jC(){var r;xC(Ko),de.info("VWR loader starting init flow");const e=CC({env:"unknown",version:FC,service:"vwr-loader"});let t;try{await MC(e),t==null||t()}catch(n){try{VC(n)}finally{let o;const i=((r=new URLSearchParams(window.location.search).get("gameControllerUrl"))==null?void 0:r.trim())||null;i?(o=new URL(i),de.info({gameControllerUrl:i},"[Shell] Using gameControllerUrl as fallback")):(o=new URL(UC),o.searchParams.set("volley_platform",Ko),o.searchParams.set("version","unknown"),de.info({PLATFORM:Ko},"[Shell] No gameControllerUrl, redirecting to Hub")),window.location.href=o.toString()}}}jC();export{Ay as $,ss as A,zC as B,Do as C,aT as D,fw as E,T as F,zw as G,qi as H,QC as I,JC as J,ZC as K,eR as L,IS as M,R as N,le as O,WC as P,J as Q,A as R,Q as S,kn as T,Bt as U,Yi as V,Ce as W,zt as X,$t as Y,zi as Z,Wi as _,c0 as a,Ge as a0,ce as a1,w as a2,H as a3,Ou as a4,Tn as b,qC as c,Cw as d,a0 as e,sd as f,YC as g,KC as h,GC as i,Gw as j,HC as k,B as l,us as m,kI as n,XC as o,ed as p,En as q,s0 as r,ad as s,j as t,Ke as u,Mn as v,U as w,LI as x,L as y,Ee as z};
10
12
  //# sourceMappingURL=main.js.map