PageSourceSearch

https://app.bookli.ai/assets/esm-D6z1aH1v.js

js bookli.ai collected 2026-10-05 11:51:33 UTC 137,836 bytes, 6 lines download raw bytes

1var e={log:`log`,debug:`debug`,info:`info`,warn:`warn`,error:`error`},t=console,n={};Object.keys(e).forEach(e=>{n[e]=t[e]});var r=`Datadog Browser SDK:`,i={debug:n.debug.bind(t,r),log:n.log.bind(t,r),info:n.info.bind(t,r),warn:n.warn.bind(t,r),error:n.error.bind(t,r)},a=`https://docs.datadoghq.com`,o=`${a}/real_user_monitoring/browser/troubleshooting`,s=`More details:`;function c(e,t){return(...n)=>{try{return e(...n)}catch(e){i.error(t,e)}}}function l(e){return e!==0&&Math.random()*100<=e}function u(e,t){return+e.toFixed(t)}function d(e){return f(e)&&e>=0&&e<=100}function f(e){return typeof e==`number`}function p(e){try{return JSON.parse(e)}catch{}}function m(e){return{...e}}function h(e,t){return Object.keys(e).some(n=>e[n]===t)}function g(e){return Object.keys(e).length===0}function _(e,t){let n={};for(let r of Object.keys(e))n[r]=t(e[r]);return n}function v(){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`&&(e=typeof self==`object`?self:typeof window==`object`?window:{}),e}var y=v(),b=`WorkerGlobalScope`in y;function x(e,t){let n=v(),r;return n.Zone&&typeof n.Zone.__symbol__==`function`&&(r=e[n.Zone.__symbol__(t)]),r||=e[t],r}var ee,te=!1;function ne(e){ee=e}function re(e){te=e}function S(e){return function(...t){return C(e,this,t)}}function C(e,t,n){try{return e.apply(t,n)}catch(e){ie(e)}}function ie(e){if(ae(e),ee)try{ee(e)}catch(e){ae(e)}}function ae(...e){te&&i.error(`[MONITOR]`,...e)}function w(e,t){return x(v(),`setTimeout`)(S(e),t)}function T(e){x(v(),`clearTimeout`)(e)}function oe(e,t){return x(v(),`setInterval`)(S(e),t)}function se(e){x(v(),`clearInterval`)(e)}function ce(e){let t=y.queueMicrotask;typeof t==`function`?t(S(e)):Promise.resolve().then(S(e))}var E=class{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}notify(e){this.observers.forEach(t=>t(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(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}};function le(...e){return new E(t=>{let n=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>n.forEach(e=>e.unsubscribe())})}var ue=class extends E{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 t=!1;return ce(()=>{for(let n of this.buffer){if(t)return;e(n)}t||this.addObserver(e)}),{unsubscribe:()=>{t=!0,this.removeObserver(e)}}}unbuffer(){ce(()=>{this.maxBufferSize=this.buffer.length=0})}},D=1e3,O=60*D,de=60*O,fe=24*de*365;function k(e){return{relative:e,timeStamp:me(e)}}function pe(e){return{relative:ve(e),timeStamp:e}}function me(e){let t=j()-performance.now();return t>Se()?Math.round(_e(t,e)):ye(e)}function he(){return Math.round(j()-_e(Se(),performance.now()))}function A(e){return f(e)?u(e*1e6,0):e}function j(){return new Date().getTime()}function M(){return j()}function N(){return performance.now()}function P(){return{relative:N(),timeStamp:M()}}function ge(){return{relative:0,timeStamp:Se()}}function F(e,t){return t-e}function _e(e,t){return e+t}function ve(e){return e-Se()}function ye(e){return Math.round(_e(Se(),e))}function be(e){return e<fe}var xe;function Se(){return xe===void 0&&(xe=performance.timing?.navigationStart??performance.timeOrigin),xe}function Ce(e,t,n){let r=n&&n.leading!==void 0?n.leading:!0,i=n&&n.trailing!==void 0?n.trailing:!0,a=!1,o,s;return{throttled:(...n)=>{if(a){o=n;return}r?e(...n):o=n,a=!0,s=w(()=>{i&&o&&e(...o),a=!1,o=void 0},t)},cancel:()=>{T(s),a=!1,o=void 0}}}function I(){}function L(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,L)}var we=/(\S+?)\s*=\s*(.+?)(?:;|$)/g;function Te(e,t){for(we.lastIndex=0;;){let n=we.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function Ee(e){let t=new Map;for(we.lastIndex=0;;){let n=we.exec(e);if(n){let e=n[1],r=n[2];t.has(e)?t.get(e).push(r):t.set(e,[r])}else break}return t}function De(e){let t=new Map;for(we.lastIndex=0;;){let n=we.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function Oe(e,t,n=``){let r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}function ke(){return Me()===0}function Ae(){return Me()===1}var je;function Me(){return je??=Ne()}function Ne(e=window){let t=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(t)?0:e.navigator.vendor?.indexOf(`Apple`)===0||/safari/i.test(t)&&!/chrome|android/i.test(t)?1:2}function Pe(e){return Le(e,location.href).href}function Fe(e){try{return!!Le(e)}catch{return!1}}function Ie(e){let t=Le(e).pathname;return t[0]===`/`?t:`/${t}`}function Le(e,t){let{URL:n}=ze();try{return t===void 0?new n(e):new n(e,t)}catch(e){throw Error(`Failed to construct URL: ${String(e)}`)}}var Re;function ze(){if(!Re){let e,t;try{e=document.createElement(`iframe`),e.style.display=`none`,document.body.appendChild(e),t=e.contentWindow??y}catch{t=y}Re={URL:t.URL},e?.remove()}return Re}function Be(e,t,n=0,r){let i=new Date;i.setTime(i.getTime()+n);let a=`expires=${i.toUTCString()}`,o=r&&r.crossSite?`none`:`strict`,s=r&&r.domain?`;domain=${r.domain}`:``,c=r&&r.secure?`;secure`:``,l=r&&r.partitioned?`;partitioned`:``;document.cookie=`${e}=${t};${a};path=/;samesite=${o}${s}${c}${l}`}function Ve(e){return Te(document.cookie,e)}function He(e){return Ee(document.cookie).get(e)||[]}var Ue;function We(e){return Ue||=De(document.cookie),Ue.get(e)}function Ge(e,t){Be(e,``,0,t)}function Ke(e){if(document.cookie===void 0||document.cookie===null)return!1;try{let t=`dd_cookie_test_${L()}`,n=`test`;Be(t,n,O,e);let r=Ve(t)===n;return Ge(t,e),r}catch(e){return i.error(e),!1}}var qe;function Je(e=location.hostname,t=document.referrer){if(qe===void 0){let n=Ye(e,t);if(n){let e=`dd_site_test_${L()}`,t=n.split(`.`),r=t.pop();for(;t.length&&!Ve(e);)r=`${t.pop()}.${r}`,Be(e,`test`,D,{domain:r});Ge(e,{domain:r}),qe=r}}return qe}function Ye(e,t){try{return e||Le(t).hostname}catch{}}var Xe=`_dd_s`;function Ze(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(t(r,n,e))return r}}function Qe(e){return Object.values(e)}function $e(e){return Object.entries(e)}var et=4*de,tt=15*O,nt=fe,R={COOKIE:`cookie`,MEMORY:`memory`,LOCAL_STORAGE:`local-storage`},rt=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function it(e){return!!e&&(e.indexOf(`&`)!==-1||rt.test(e))}function at(e,t){let n={isExpired:`1`};
1return t.trackAnonymousUser&&e?.anonymousId&&(n.anonymousId=e?.anonymousId),n}function ot(e){return g(e)}function st(e){return!ot(e)}function ct(e){return e.isExpired!==void 0||!lt(e)}function lt(e){return(e.created===void 0||j()-Number(e.created)<et)&&(e.expire===void 0||j()<Number(e.expire))}function ut(e){e.expire=String(j()+tt)}function dt(e){return $e(e).map(([e,t])=>e===`anonymousId`?`aid=${t}`:`${e}=${t}`).join(`&`)}function ft(e){let t={};return it(e)&&e.split(`&`).forEach(e=>{let n=rt.exec(e);if(n!==null){let[,e,r]=n;e===`aid`?t.anonymousId=r:t[e]=r}}),t}var pt=`_dd_r`,mt=`_dd_l`,ht=`logs`;function gt(e){if(!We(`_dd_s`)){let t=We(`_dd`),n=We(pt),r=We(mt),i={};t&&(i.id=t),r&&/^[01]$/.test(r)&&(i[ht]=r),n&&/^[012]$/.test(n)&&(i.rum=n),st(i)&&(ut(i),e.persistSession(i))}}var _t=0;function vt(e){let t=St(e);return t&&Ke(t)?{type:R.COOKIE,cookieOptions:t}:void 0}function yt(e,t){let n={isLockEnabled:ke(),persistSession:n=>bt(t,e,n,tt),retrieveSession:()=>xt(t,e),expireSession:n=>bt(t,e,at(n,e),et)};return gt(n),n}function bt(e,t,n,r){let i=dt(n);t.betaEncodeCookieOptions&&(i=dt({...n,...g(n)?{}:{c:Ct(e)}})),Be(Xe,i,t.trackAnonymousUser?nt:r,e)}function xt(e,t){return t.betaEncodeCookieOptions?wt(e):ft(Ve(Xe))}function St(e){let t={};if(t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){let e=Je();if(!e)return;t.domain=e}return t}function Ct(e){let t=e.domain?e.domain.split(`.`).length-1:0,n=0;return n|=_t<<5,n|=t<<1,n|=+!!e.crossSite,n.toString(16)}function wt(e){let t=He(Xe),n=Ct(e),r;for(let e of t.reverse())if(r=ft(e),r.c===n)break;return r==null||delete r.c,r??{}}var Tt=`_dd_test_`;function Et(){try{let e=L(),t=`${Tt}${e}`;localStorage.setItem(t,e);let n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:R.LOCAL_STORAGE}:void 0}catch{return}}function Dt(e){return{isLockEnabled:!1,persistSession:Ot,retrieveSession:kt,expireSession:t=>At(t,e)}}function Ot(e){localStorage.setItem(Xe,dt(e))}function kt(){return ft(localStorage.getItem(Xe))}function At(e,t){Ot(at(e,t))}var jt=D,Mt=`--`,Nt=[],Pt;function Ft(e,t,n=0){var r;let{isLockEnabled:i,persistSession:a,expireSession:o}=t,s=e=>a({...e,lock:l}),c=()=>{let{lock:e,...n}=t.retrieveSession();return{session:n,lock:e&&!zt(e)?e:void 0}};if(Pt||=e,e!==Pt){Nt.push(e);return}if(i&&n>=100){Lt(t);return}let l,u=c();if(i){if(u.lock){It(e,t,n);return}if(l=Rt(),s(u.session),u=c(),u.lock!==l){It(e,t,n);return}}let d=e.process(u.session);if(i&&(u=c(),u.lock!==l)){It(e,t,n);return}if(d&&(ct(d)?o(d):(ut(d),i?s(d):a(d))),i&&!(d&&ct(d))){if(u=c(),u.lock!==l){It(e,t,n);return}a(u.session),d=u.session}(r=e.after)==null||r.call(e,d||u.session),Lt(t)}function It(e,t,n){w(()=>{Ft(e,t,n+1)},10)}function Lt(e){Pt=void 0;let t=Nt.shift();t&&Ft(t,e)}function Rt(){return L()+Mt+M()}function zt(e){let[,t]=e.split(Mt);return!t||F(Number(t),M())>jt}var Bt=`_DD_SESSION`;function Vt(){return{type:R.MEMORY}}function Ht(e){return{expireSession:t=>Gt(t,e),isLockEnabled:!1,persistSession:Wt,retrieveSession:Ut}}function Ut(){let e=v();return e._DD_SESSION||(e[Bt]={}),m(e[Bt])}function Wt(e){let t=v();t[Bt]=m(e)}function Gt(e,t){Wt(at(e,t))}var Kt=D;function qt(e){let{sessionPersistence:t}=e,n=Jt(t,e);for(let t of n){let n=Yt(t,e);if(n!==void 0)return n}}function Jt(e,t){return Array.isArray(e)?e:e===void 0?t.allowFallbackToLocalStorage?[R.COOKIE,R.LOCAL_STORAGE]:[R.COOKIE]:[e]}function Yt(e,t){switch(e){case R.COOKIE:return vt(t);case R.LOCAL_STORAGE:return Et();case R.MEMORY:return Vt();default:i.error(`Invalid session persistence '${String(e)}'`);return}}function Xt(e,t){return e.type===R.COOKIE?yt(t,e.cookieOptions):e.type===R.LOCAL_STORAGE?Dt(t):Ht(t)}function Zt(e,t,n,r,i=Xt(e,t)){let a=new E,o=new E,s=new E,c=oe(p,Kt),l;h();let{throttled:u,cancel:d}=Ce(()=>{Ft({process:e=>{if(ot(e))return;let t=m(e);return g(t),t},after:e=>{st(e)&&!_()&&b(e),l=e}},i)},Kt);function f(){Ft({process:e=>_()?m(e):void 0},i)}function p(){let e=i.retrieveSession();ct(e)?Ft({process:e=>ct(e)?at(e,t):void 0,after:m},i):m(e)}function m(e){return ct(e)&&(e=at(e,t)),_()&&(v(e)?y():(s.notify({previousState:l,newState:e}),l=e)),e}function h(){Ft({process:e=>{if(ot(e))return e.anonymousId=L(),at(e,t)},after:e=>{l=e}},i)}function g(e){if(ot(e))return!1;let i=r(e[n]);e[n]=i,delete e.isExpired,i!==`0`&&!e.id&&(e.id=L(),e.created=String(j())),t.trackA
1nonymousUser&&!e.anonymousId&&(e.anonymousId=L())}function _(){return l?.[n]!==void 0}function v(e){return l.id!==e.id||l[n]!==e[n]}function y(){l=at(l,t),o.notify()}function b(e){l=e,a.notify()}function x(e){Ft({process:t=>({...t,...e}),after:m},i)}return{expandOrRenewSession:u,expandSession:f,getSession:()=>l,renewObservable:a,expireObservable:o,sessionStateUpdateObservable:s,restartSession:h,expire:e=>{d(),e===!1&&l&&delete l.anonymousId,i.expireSession(l),m(at(l,t))},stop:()=>{se(c)},updateSessionState:x}}var Qt={GRANTED:`granted`,NOT_GRANTED:`not-granted`};function $t(e){let t=new E;return{tryToInit(t){e||=t},update(n){e=n,t.notify()},isGranted(){return e===Qt.GRANTED},observable:t}}function en(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function tn(e){return en(e)===`object`}function nn(e){let t=en(e);return t===`string`||t===`function`||e instanceof RegExp}function rn(e,t,n=!1){return e.some(e=>{try{if(typeof e==`function`)return e(t);if(e instanceof RegExp)return e.test(t);if(typeof e==`string`)return n?t.startsWith(e):e===t}catch(e){i.error(e)}return!1})}function z(e){return e}var an=[`chrome-extension://`,`moz-extension://`];function on(e){return an.some(t=>e.includes(t))}function sn(e,t=``){return on(e)?!1:on(t.split(`
2`).filter(e=>{let t=e.trim();return t.length&&/^at\s+|@/.test(t)})[1]||``)}var cn="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",ln=`SDK initialized on a non-allowed domain.`;function un(e,t){let n=z(v().location),r=n?n.origin:``,a=e.allowedTrackingOrigins;if(!a)return sn(r,t)?(i.error(cn),!1):!0;let o=rn(a,r);return o||i.error(ln),o}var dn=`datad0g.com`,fn=`datadoghq.com`,pn=`datadoghq.eu`,mn=`ddog-gov.com`,hn=`pci.browser-intake-datadoghq.com`,gn=[`ddsource`,`dd-api-key`,`dd-request-id`];function _n(e,t,n){let r=vn(e,t);return{build(i,a){return r(bn(e,t,i,a,n))},trackType:t}}function vn(e,t){let n=`/api/v2/${t}`,r=e.proxy;if(typeof r==`string`){let e=Pe(r);return t=>`${e}?ddforward=${encodeURIComponent(`${n}?${t}`)}`}if(typeof r==`function`)return e=>r({path:n,parameters:e});let i=yn(t,e);return e=>`https://${i}${n}?${e}`}function yn(e,t){let{site:n=fn,internalAnalyticsSubdomain:r}=t;if(e===`logs`&&t.usePciIntake&&n===`datadoghq.com`)return hn;if(r&&n===`datadoghq.com`)return`${r}.${fn}`;if(n===`dd0g-gov.com`)return`http-intake.logs.${n}`;let i=n.split(`.`),a=i.pop();return`browser-intake-${i.join(`-`)}.${a}`}function bn({clientToken:e,internalAnalyticsSubdomain:t,source:n=`browser`},r,i,{retry:a,encoding:o},s=[]){let c=[`ddsource=${n}`,`dd-api-key=${e}`,`dd-evp-origin-version=6.32.0`,`dd-evp-origin=browser`,`dd-request-id=${L()}`].concat(s);return o&&c.push(`dd-evp-encoding=${o}`),r===`rum`&&(c.push(`batch_time=${M()}`,`_dd.api=${i}`),a&&c.push(`_dd.retry_count=${a.count}`,`_dd.retry_after=${a.lastFailureStatus}`)),t&&c.reverse(),c.join(`&`)}function xn(e){let t=e.site||`datadoghq.com`,n=Sn(e.source),r=Cn({...e,site:t,source:n});return{replica:wn({...e,site:t,source:n}),site:t,source:n,...r}}function Sn(e){return e===`flutter`||e===`unity`?e:`browser`}function Cn(e){return{logsEndpointBuilder:_n(e,`logs`),rumEndpointBuilder:_n(e,`rum`),profilingEndpointBuilder:_n(e,`profile`),sessionReplayEndpointBuilder:_n(e,`replay`),exposuresEndpointBuilder:_n(e,`exposures`),flagEvaluationEndpointBuilder:_n(e,`flagevaluation`)}}function wn(e){if(!e.replica)return;let t={...e,site:fn,clientToken:e.replica.clientToken};return{logsEndpointBuilder:_n(t,`logs`),rumEndpointBuilder:_n(t,`rum`,[`application.id=${e.replica.applicationId}`])}}function Tn(e){return gn.every(t=>e.includes(t))}var En={ALLOW:`allow`,MASK:`mask`,MASK_USER_INPUT:`mask-user-input`,MASK_UNLESS_ALLOWLISTED:`mask-unless-allowlisted`},Dn={ALL:`all`,SAMPLED:`sampled`};function On(e,t){return e!=null&&typeof e!=`string`?(i.error(`${t} must be defined as a string`),!1):!0}function kn(e){return e&&typeof e==`string`&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(i.error(`Site should be a valid Datadog site. ${s} ${a}/getting_started/site/.`),!1):!0}function An(e,t){return e!==void 0&&!d(e)?(i.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function jn(e,t){if(!e||!e.clientToken){i.error(`Client Token is not configured, we will not send any data.`);return}if(e.allowedTrackingOrigins!==void 0&&!Array.isArray(e.allowedTrackingOrigins)){i.error(`Allowed Tracking Origins must be an array`);return}if(!(!kn(e.site)||!An(e.sessionSampleRate,`Session`)||!An(e.telemetrySampleRate,`Telemetry`)||!An(e.telemetryConfigurationSampleRate,`Telemetry Configuration`)||!An(e.telemetryUsageSampleRate,`Telemetry Usage`)||!On(e.version,`Version`)||!On(e.env,`Env`)||!On(e.service,`Service`)||!un(e,t??``))){if(e.trackingConsent!==void 0&&!h(Qt,e.trackingConsent)){i.error(`Tracking Consent should be either "granted" or "not-granted"`);return}return{beforeSend:e.beforeSend&&c(e.beforeSend,`beforeSend threw an error:`),sessionStoreStrategyType:b?void 0:qt(e),sessionSampleRate:e.sessionSampleRate??100,telemetrySampleRate:e.telemetrySampleRate??20,telemetryConfigurationSampleRate:e.telemetryConfigurationSampleRate??5,telemetryUsageSampleRate:e.telemetryUsageSampleRate??5,service:e.service??void 0,env:e.env??void 0,version:e.version??void 0,datacenter:e.datacenter??void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:e.trackingConsent??Qt.GRANTED,trackAnonymousUser:e.trackA
2nonymousUser??!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,betaEncodeCookieOptions:!!e.betaEncodeCookieOptions,variant:e.variant,sdkVersion:e.sdkVersion,...xn(e)}}}function Mn(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:Array.isArray(e.sessionPersistence)?e.sessionPersistence[0]: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 B;(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.START_STOP_ACTION=`start_stop_action`,e.START_STOP_RESOURCE=`start_stop_resource`,e.USE_CHANGE_RECORDS=`use_change_records`,e.USE_INCREMENTAL_CHANGE_RECORDS=`use_incremental_change_records`,e.INP_SUBPARTS=`inp_subparts`,e.TOO_MANY_REQUESTS_INVESTIGATION=`too_many_requests_investigation`,e.COMPOSED_PATH_SELECTOR=`composed_path_selector`})(B||={});var Nn=new Set;function Pn(e){Array.isArray(e)&&Fn(e.filter(e=>h(B,e)))}function Fn(e){e.forEach(e=>{Nn.add(e)})}function V(e){return Nn.has(e)}function In(){return Nn}var Ln=`?`;function Rn(e){let t=[],n=Zn(e,`stack`),r=String(e);if(n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
3`).forEach(e=>{let n=Un(e)||Gn(e)||qn(e)||Xn(e);n&&(!n.func&&n.line&&(n.func=Ln),t.push(n))}),t.length>0&&rr()&&e instanceof Error){let n=[],r=e;for(;(r=Object.getPrototypeOf(r))&&tr(r);){let e=r.constructor?.name||Ln;n.push(e)}for(let e=n.length-1;e>=0&&t[0]?.func===n[e];e--)t.shift()}return{message:Zn(e,`message`),name:Zn(e,`name`),stack:t}}var zn=`((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)`,Bn=`(?::(\\d+))`,Vn=RegExp(`^\\s*at (.*?) ?\\(${zn}${Bn}?${Bn}?\\)?\\s*$`,`i`),Hn=RegExp(`\\((\\S*)${Bn}${Bn}\\)`);function Un(e){let t=Vn.exec(e);if(!t)return;let n=t[2]&&t[2].indexOf(`native`)===0,r=t[2]&&t[2].indexOf(`eval`)===0,i=Hn.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Ln,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}var Wn=RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${zn}${Bn}?${Bn}??\\s*$`,`i`);function Gn(e){let t=Wn.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Ln,line:t[3]?+t[3]:void 0,url:t[2]}}var Kn=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function qn(e){let t=Kn.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Ln,line:+t[3],url:t[2]}}var Jn=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,Yn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Xn(e){let t=Jn.exec(e);if(!t)return;let n=t[3]&&t[3].indexOf(` > eval`)>-1,r=Yn.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(`,`):[],column:t[5]?+t[5]:void 0,func:t[1]||Ln,line:t[4]?+t[4]:void 0,url:t[3]}}function Zn(e,t){return tn(e)&&typeof e[t]==`string`?e[t]:void 0}function Qn(e,t,n,r){if(t===void 0)return;let{name:i,message:a}=er(e);return{name:i,message:a,stack:[{url:t,column:r,line:n}]}}var $n=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function er(e){let t,n;return{}.toString.call(e)===`[object String]`&&([,t,n]=$n.exec(e)),{name:t,message:n}}function tr(e){return String(e.constructor).startsWith(`class `)}var nr;
3function rr(){if(nr!==void 0)return nr;class e extends Error{constructor(){super(),this.name=`Error`}}let[t,n]=[e,Error].map(e=>new e);return nr=tr(Object.getPrototypeOf(t))&&n.stack!==t.stack,nr}function ir(e){let t=Error(e);t.name=`HandlingStack`;let n;return C(()=>{let e=Rn(t);e.stack=e.stack.slice(2),n=ar(e)}),n}function ar(e){let t=or(e);return e.stack.forEach(e=>{let n=e.func===`?`?`<anonymous>`:e.func,r=e.args&&e.args.length>0?`(${e.args.join(`, `)})`:``,i=e.line?`:${e.line}`:``,a=e.line&&e.column?`:${e.column}`:``;t+=`\n  at ${n}${r} @ ${e.url}${i}${a}`}),t}function or(e){return`${e.name||`Error`}: ${e.message}`}function H(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`)if(t in e&&typeof t==`string`&&t.startsWith(`on`))i=I;else return{stop:I};let a=!1,o=function(){if(a)return i.apply(this,arguments);let e=Array.from(arguments),t;C(n,null,[{target:this,parameters:e,onPostCall:e=>{t=e},handlingStack:r?ir(`instrumented method`):void 0}]);let o=i.apply(this,e);return t&&C(t,null,[o]),o};return e[t]=o,{stop:()=>{a=!0,e[t]===o&&(e[t]=i)}}}function sr(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:I};let i=I,a=(e,t)=>{w(()=>{a!==i&&n(e,t)},0)},o=function(e){r.set.call(this,e),a(this,e)};return Object.defineProperty(e,t,{set:o}),{stop:()=>{Object.getOwnPropertyDescriptor(e,t)?.set===o&&Object.defineProperty(e,t,r),a=i}}}var cr=1024,lr=1024*cr,ur=/[^\u0000-\u007F]/;function dr(e){return ur.test(e)?window.TextEncoder===void 0?new Blob([e]).size:new TextEncoder().encode(e).length:e.length}function fr(e){if(e.length===1)return e[0];let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function pr(e,t,n){if(typeof e!=`object`||!e)return JSON.stringify(e);let r=mr(Object.prototype),i=mr(Array.prototype),a=mr(Object.getPrototypeOf(e)),o=mr(e);try{return JSON.stringify(e,t,n)}catch{return`<error: unable to serialize object>`}finally{r(),i(),a(),o()}}function mr(e){let t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):I}var hr=220*cr,gr=`$`,_r=3;function U(e,t=hr){let n=mr(Object.prototype),r=mr(Array.prototype),i=[],a=new WeakMap,o=vr(e,gr,void 0,i,a),s=JSON.stringify(o),c=s?s.length:0;if(c>t){Cr(t,`discarded`,e);return}for(;i.length>0&&c<t;){let n=i.shift(),r=0;if(Array.isArray(n.source))for(let o=0;o<n.source.length;o++){let s=vr(n.source[o],n.path,o,i,a);if(s===void 0?c+=4:c+=JSON.stringify(s).length,c+=r,r=1,c>t){Cr(t,`truncated`,e);break}n.target[o]=s}else for(let o in n.source)if(Object.prototype.hasOwnProperty.call(n.source,o)){let s=vr(n.source[o],n.path,o,i,a);if(s!==void 0&&(c+=JSON.stringify(s).length+r+o.length+_r,r=1),c>t){Cr(t,`truncated`,e);break}n.target[o]=s}}return n(),r(),o}function vr(e,t,n,r,i){let a=Sr(e);if(!a||typeof a!=`object`)return yr(a);let o=br(a);if(o!==`[Object]`&&o!==`[Array]`&&o!==`[Error]`)return o;let s=e;if(i.has(s))return`[Reference seen at ${i.get(s)}]`;let c=n===void 0?t:`${t}.${n}`,l=Array.isArray(a)?[]:{};return i.set(s,c),r.push({source:a,target:l,path:c}),l}function yr(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 br(e){try{if(e instanceof Event)return xr(e);
3if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;let t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return`[${t[1]}]`}catch{}return`[Unserializable]`}function xr(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?br(e.currentTarget):null,target:e.target?br(e.target):null}}function Sr(e){let t=e;if(t&&typeof t.toJSON==`function`)try{return t.toJSON()}catch{}return e}function Cr(e,t,n){i.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}var wr=`No stack, consider using an instance of Error`;function Tr({originalError:e,stackTrace:t,source:n,useFallbackStack:r=!0,nonErrorPrefix:i}){let a=Ar(e);return!t&&a&&(t=Rn(e)),{source:n,type:t?t.name:void 0,message:Dr(t,a,i,e),stack:t?ar(t):r?wr:void 0}}function Er({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:a,useFallbackStack:o=!0,source:s,handling:c}){return{startClocks:i,handling:c,handlingStack:n,componentStack:r,originalError:t,...Tr({originalError:t,stackTrace:e,source:s,useFallbackStack:o,nonErrorPrefix:a}),causes:Ar(t)?jr(t,s):void 0,fingerprint:Or(t),context:kr(t)}}function Dr(e,t,n,r){return e?.message&&e?.name?e.message:t?`Empty message`:n?`${n} ${pr(U(r))}`:pr(U(r))}function Or(e){return Ar(e)&&`dd_fingerprint`in e?String(e.dd_fingerprint):void 0}function kr(e){if(tn(e))return e.dd_context}function Ar(e){return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}function jr(e,t){let n=[],r=e.cause;for(;r!=null&&n.length<10;){let e=Tr({originalError:r,source:t,useFallbackStack:!1});n.push(e),r=Ar(r)?r.cause:void 0}return n.length?n:void 0}var Mr={AGENT:`agent`,CONSOLE:`console`,CUSTOM:`custom`,LOGGER:`logger`,NETWORK:`network`,SOURCE:`source`,REPORT:`report`};function Nr(){return new E(e=>{let t=(t,n)=>{let r=Er({stackTrace:n,originalError:t,startClocks:P(),nonErrorPrefix:`Uncaught`,source:Mr.SOURCE,handling:`unhandled`});e.notify(r)},{stop:n}=Pr(t),{stop:r}=Fr(t);return()=>{n(),r()}})}function Pr(e){return H(v(),`onerror`,({parameters:[t,n,r,i,a]})=>{let o;Ar(a)||(o=Qn(t,n,r,i)),e(a??t,o)})}function Fr(e){return H(v(),`onunhandledrejection`,({parameters:[t]})=>{e(t.reason||`Empty reason`)})}function Ir(e){let t={version:`6.32.0`,onReady(e){e()},...e};return Object.defineProperty(t,`_setDebug`,{get(){return re},enumerable:!1}),t}function Lr(e,t,n){let r=e[t];r&&!r.q&&r.version&&i.warn(`SDK is loaded more than once. This is unsupported and might have unexpected behavior.`),e[t]=n,r&&r.q&&r.q.forEach(e=>c(e,`onReady callback threw an error:`)())}function Rr(e,t){t.silentMultipleInit||i.error(`${e} is already initialized.`)}function W(e,t,n,r,i){return zr(e,t,[n],r,i)}function zr(e,t,n,r,{once:i,capture:a,passive:o}={}){let s=S(t=>{!t.isTrusted&&!t.__ddIsTrusted&&!e.allowUntrustedEvents||(i&&d(),r(t))}),c=o?{capture:a,passive:o}:a,l=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,u=x(l,`addEventListener`);n.forEach(e=>u.call(t,e,s,c));function d(){let e=x(l,`removeEventListener`);n.forEach(n=>e.call(t,n,s,c))}return{stop:d}}var Br={intervention:`intervention`,deprecation:`deprecation`,cspViolation:`csp_violation`};function Vr(e,t){let n=[];t.includes(Br.cspViolation)&&n.push(Ur(e));let r=t.filter(e=>e!==Br.cspViolation);return r.length&&n.push(Hr(r)),le(...n)}function Hr(e){return new E(t=>{if(!window.ReportingObserver)return;let n=S((e,n)=>e.forEach(e=>t.notify(Wr(e)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function Ur(e){return new E(t=>{let{stop:n}=W(e,document,`securitypolicyviolation`,e=>{t.notify(Gr(e))});return n})}function Wr(e){let{type:t,body:n}=e;return Kr({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:qr(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function Gr(e){let t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return Kr({type:e.effectiveDirective,message:`${Br.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:qr(e.effectiveDirective,e.originalPolicy?`${t}
3 of the policy "${Oe(e.originalPolicy,100,`...`)}"`:`no policy`,e.sourceFile,e.lineNumber,e.columnNumber)})}function Kr(e){return{startClocks:P(),source:Mr.REPORT,handling:`unhandled`,...e}}function qr(e,t,n,r,i){return n?ar({name:e,message:t,stack:[{func:`?`,url:n,line:r??void 0,column:i??void 0}]}):void 0}function Jr(e){let{env:t,service:n,version:r,datacenter:i,sdkVersion:a,variant:o}=e,s=[Yr(`sdk_version`,a??`6.32.0`)];return t&&s.push(Yr(`env`,t)),n&&s.push(Yr(`service`,n)),r&&s.push(Yr(`version`,r)),i&&s.push(Yr(`datacenter`,i)),o&&s.push(Yr(`variant`,o)),s}function Yr(e,t){let n=t?`${e}:${t}`:e;return(n.length>200||Zr(n))&&i.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${s} ${a}/getting_started/tagging/#defining-tags`),Xr(n)}function Xr(e){return e.replace(/,/g,`_`)}function Zr(e){return Qr()?RegExp(`[^\\p{Ll}\\p{Lo}0-9_:./-]`,`u`).test(e):!1}function Qr(){try{return!0}catch{return!1}}function $r(e,t){let n=y.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function ei(e,t,n=ri()){if(t===void 0)return e;if(typeof t!=`object`||!t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let e=t.flags||[t.global?`g`:``,t.ignoreCase?`i`:``,t.multiline?`m`:``,t.sticky?`y`:``,t.unicode?`u`:``].join(``);return new RegExp(t.source,e)}if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){let r=Array.isArray(e)?e:[];for(let e=0;e<t.length;++e)r[e]=ei(r[e],t[e],n);return r}let r=en(e)===`object`?e:{};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=ei(r[e],t[e],n));return r}function ti(e){return ei(void 0,e)}function ni(...e){let t;for(let n of e)n!=null&&(t=ei(t,n));return t}function ri(){if(typeof WeakSet<`u`){let e=new WeakSet;return{hasAlreadyBeenSeen(t){let n=e.has(t);return n||e.add(t),n}}}let e=[];return{hasAlreadyBeenSeen(t){let n=e.indexOf(t)>=0;return n||e.push(t),n}}}function ii(){let e=y.navigator;return{status:e.onLine?`connected`:`not_connected`,interfaces:e.connection&&e.connection.type?[e.connection.type]:void 0,effective_type:e.connection?.effectiveType}}function ai(e,t){return x(v(),`fetch`)(e,t)}function oi(e){return e>=500}function si(e){try{return e.clone()}catch{return}}var ci=80*cr,li=20*lr,ui=O,di=D;function fi(e,t,n,r,i,a){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?mi(e,t,n,a,{onSuccess:()=>hi(0,t,n,r,i,a),onFailure:()=>{t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),pi(t,n,r,i,a)}}):t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e})}function pi(e,t,n,r,i){e.transportStatus===2&&w(()=>{mi(e.queuedPayloads.first(),e,t,i,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=di,hi(1,e,t,n,r,i)},onFailure:()=>{e.currentBackoffTime=Math.min(ui,e.currentBackoffTime*2),pi(e,t,n,r,i)}})},e.currentBackoffTime)}function mi(e,t,n,r,{onSuccess:i,onFailure:a}){t.bandwidthMonitor.add(e),n(e,n=>{t.bandwidthMonitor.remove(e),gi(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:`failure`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),a()):(t.transportStatus=0,r.notify({type:`success`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function hi(e,t,n,r,i,a){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${r} events size queued for upload: ${li/lr}MiB`,source:Mr.AGENT,startClocks:P()}),t.queueFullReported=!0);let o=t.queuedPayloads;for(t.queuedPayloads=vi();o.size()>0;)fi(o.dequeue(),t,n,r,i,a)}function gi(e){return e.type!==`opaque`&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||oi(e.status))}function _i(){return{transportStatus:0,currentBackoffTime:di,bandwidthMonitor:yi(),queuedPayloads:vi(),queueFullReported:!1}}function vi(){let e=[];return{bytesCount:0,enqueue(t){return this.isFull()?!1:(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){let t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=li}}}function yi(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=ci&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){--this.ongoingRequestCount,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}var bi=16*cr;function xi(e,t,n=bi){let r=new E,i=_i();return{observable:r,send:n=>{for(let a of e)fi(n,i,(e,t)=>{Ti(a,e,t)},a.trackType,t,r)},sendOnExit:t=>{for(let r of e)Si(r,n,t)}}}function Si(e,t,n){if(navigator.sendBeacon&&n.bytesCount<t)try{let t=e.build(`beacon`,n);if(navigator.sendBeacon(t,n.data))return}catch(e){wi(e)}Ti(e,n)}var Ci=!1;function wi(e){Ci||(Ci=!0,ie(e))}
3function Ti(e,t,n){ai(e.build(`fetch`,t),{method:`POST`,body:t.data,mode:`cors`}).then(S(e=>n?.({status:e.status,type:e.type}))).catch(S(()=>n?.({status:0})))}function Ei(){let e=ki();if(e)return{getCapabilities(){return JSON.parse(e.getCapabilities?.call(e)||`[]`)},getPrivacyLevel(){return e.getPrivacyLevel?.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){let i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function Di(e){let t=Ei();return!!t&&t.getCapabilities().includes(e)}function Oi(e){e===void 0&&(e=v().location?.hostname);let t=Ei();return!!t&&t.getAllowedWebViewHosts().some(t=>e===t||e.endsWith(`.${t}`))}function ki(){return v().DatadogEventBridge}var Ai={HIDDEN:`visibility_hidden`,UNLOADING:`before_unload`,PAGEHIDE:`page_hide`,FROZEN:`page_frozen`};function ji(e){return new E(t=>{if(b)return;let{stop:n}=zr(e,window,[`visibilitychange`,`freeze`],e=>{e.type===`visibilitychange`&&document.visibilityState===`hidden`?t.notify({reason:Ai.HIDDEN}):e.type===`freeze`&&t.notify({reason:Ai.FROZEN})},{capture:!0}),r=W(e,window,`beforeunload`,()=>{t.notify({reason:Ai.UNLOADING})}).stop;return()=>{n(),r()}})}function Mi(e){return Qe(Ai).includes(e)}var Ni=256*cr;function Pi({encoder:e,request:t,flushController:n}){let r={},a=n.flushObservable.subscribe(e=>f(e));function c(t,i,a){n.notifyBeforeAddMessage(i),a===void 0?e.write(e.isEmpty?t:`\n${t}`,e=>{n.notifyAfterAddMessage(e-i)}):(r[a]=t,n.notifyAfterAddMessage())}function l(e){return e!==void 0&&r[e]!==void 0}function u(t){let i=r[t];delete r[t];let a=e.estimateEncodedBytesCount(i);n.notifyAfterRemoveMessage(a)}function d(t,n){let r=pr(t),a=e.estimateEncodedBytesCount(r);if(a>=Ni){i.warn(`Discarded a message whose size was bigger than the maximum allowed size ${Ni/cr}KiB. ${s} ${o}/#technical-limitations`);return}l(n)&&u(n),c(r,a,n)}function f(n){let i=Qe(r).join(`
4`);r={};let a=Mi(n.reason),o=a?t.sendOnExit:t.send;if(a&&e.isAsync){let t=e.finishSync();t.outputBytesCount&&o(Fi(t));let n=[t.pendingData,i].filter(Boolean).join(`
5`);n&&o({data:n,bytesCount:dr(n)})}else i&&e.write(e.isEmpty?i:`\n${i}`),e.finish(e=>{o(Fi(e))})}return{flushController:n,add:d,upsert:d,stop:a.unsubscribe}}function Fi(e){let t;return t=typeof e.output==`string`?e.output:new Blob([e.output],{type:`text/plain`}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}var Ii=30*D,Li=b?1:50;function Ri({pageMayExitObservable:e,sessionExpireObservable:t}){let n=e.subscribe(e=>s(e.reason)),r=t.subscribe(()=>s(`session_expire`)),i=new E(()=>()=>{n.unsubscribe(),r.unsubscribe()}),a=0,o=0;function s(e){if(o===0)return;let t=o,n=a;o=0,a=0,u(),i.notify({reason:e,messagesCount:t,bytesCount:n})}let c;function l(){c===void 0&&(c=w(()=>{s(`duration_limit`)},Ii))}function u(){T(c),c=void 0}return{flushObservable:i,get messagesCount(){return o},notifyBeforeAddMessage(e){a+e>=bi&&s(`bytes_limit`),o+=1,a+=e,l()},notifyAfterAddMessage(e=0){a+=e,o>=Li?s(`messages_limit`):a>=bi&&s(`bytes_limit`)},notifyAfterRemoveMessage(e){a-=e,--o,o===0&&u()}}}function zi(){let e=``,t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){let i=dr(n);t+=i,e+=n,r&&r(i)},finish(e){e(this.finishSync())},finishSync(){let n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:``};return e=``,t=0,n},estimateEncodedBytesCount(e){return e.length}}}var Bi=`DISCARDED`,G=`SKIPPED`;function Vi(){let e={};return{register(t,n){return e[t]||(e[t]=[]),e[t].push(n),{unregister:()=>{e[t]=e[t].filter(e=>e!==n)}}},triggerHook(t,n){let r=e[t]||[],i=[];for(let e of r){let t=e(n);if(t===`DISCARDED`)return Bi;t!==`SKIPPED`&&i.push(t)}return ni(...i)}}}var Hi={LOG:`log`,CONFIGURATION:`configuration`,USAGE:`usage`},Ui=[`https://www.datadoghq-browser-agent.com`,`https://www.datad0g-browser-agent.com`,`https://d3uc069fcn7uxw.cloudfront.net`,`https://d20xtzwzcl0ceb.cloudfront.net`,`http://localhost`,`<anonymous>`],Wi=1,Gi=[mn],Ki=15,qi;function Ji(){return qi||=new ue(100),qi}function Yi(e,t,n){let r=new E,{enabled:i,metricsEnabled:a}=Xi(e,t,n,r),{stop:o}=Zi(t,r);return{stop:o,enabled:i,metricsEnabled:a}}function Xi(e,t,n,r,i=Wi,a=Ki){let o={},s=!Gi.includes(t.site)&&l(t.telemetrySampleRate),c={[Hi.LOG]:s,[Hi.CONFIGURATION]:s&&l(t.telemetryConfigurationSampleRate),[Hi.USAGE]:s&&l(t.telemetryUsageSampleRate),metric:s&&l(i)},u=Qi(),d=Ji();return d.subscribe(({rawEvent:t,metricName:i})=>{if(i&&!c.metric||!c[t.type])return;let s=i||t.status||t.type,l=o[s];if(l||=o[s]=new Set,l.size>=a)return;let d=pr(t);if(l.has(d))return;
5let p=n.triggerHook(1,{startTime:P().relative});if(p===`DISCARDED`)return;let m=f(p,e,t,u);r.notify(m),$r(`telemetry`,m),l.add(d)}),d.unbuffer(),ne(ta),{enabled:s,metricsEnabled:c.metric};function f(e,n,r,i){return ni({type:`telemetry`,date:P().timeStamp,service:n,version:`6.32.0`,source:`browser`,_dd:{format_version:2},telemetry:ni(r,{runtime_env:i,connectivity:ii(),sdk_setup:`npm`}),ddtags:Jr(t).join(`,`),experimental_features:Array.from(In())},e)}}function Zi(e,t){let n=[];if(Oi()){let e=Ei(),r=t.subscribe(t=>e.send(`internal_telemetry`,t));n.push(r.unsubscribe)}else{let r=[e.rumEndpointBuilder];e.replica&&$i(e)&&r.push(e.replica.rumEndpointBuilder);let i=Pi({encoder:zi(),request:xi(r,I),flushController:Ri({pageMayExitObservable:ji(e),sessionExpireObservable:new E})});n.push(i.stop);let a=t.subscribe(i.add);n.push(a.unsubscribe)}return{stop:()=>n.forEach(e=>e())}}function Qi(){return{is_local_file:y.location?.protocol===`file:`,is_worker:b}}function $i(e){return e.site===dn}function ea(t,n){ae(e.debug,t,n),Ji().notify({rawEvent:{type:Hi.LOG,message:t,status:`debug`,...n}})}function ta(e,t){Ji().notify({rawEvent:{type:Hi.LOG,status:`error`,...ia(e),...t}})}function na(e){Ji().notify({rawEvent:{type:Hi.CONFIGURATION,configuration:e}})}function ra(e,t){Ji().notify({rawEvent:{type:Hi.LOG,message:e,status:`debug`,...t},metricName:e})}function K(e){Ji().notify({rawEvent:{type:Hi.USAGE,usage:e}})}function ia(e){if(Ar(e)){let t=Rn(e);return{error:{kind:t.name,stack:ar(aa(t))},message:t.message}}return{error:{stack:wr},message:`Uncaught ${pr(e)}`}}function aa(e){return e.stack=e.stack.filter(e=>!e.url||Ui.some(t=>e.url.startsWith(t))),e}function oa(e,t){let n=e.indexOf(t);n>=0&&e.splice(n,1)}function sa(e){return Array.isArray(e)&&e.length>0}var ca=1/0,la=O,ua,da=new Set;function fa(){da.forEach(e=>e())}function pa({expireDelay:e,maxEntries:t}){let n=[];ua||=oe(()=>fa(),la);let r=()=>{let t=N()-e;for(;n.length>0&&n[n.length-1].endTime<t;)n.pop()};da.add(r);function i(e,r){let i={value:e,startTime:r,endTime:ca,remove:()=>{oa(n,i)},close:e=>{i.endTime=e}};return t&&n.length>=t&&n.pop(),n.unshift(i),i}function a(e=ca,t={returnInactive:!1}){for(let r of n)if(r.startTime<=e){if(t.returnInactive||e<=r.endTime)return r.value;break}}function o(e){let t=n[0];t&&t.endTime===ca&&t.close(e)}function s(e=ca,t=0){let r=_e(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime).map(e=>e.value)}function c(e){return n.filter(t=>t.startTime===e)}function l(){n=[]}function u(){da.delete(r),da.size===0&&ua&&(se(ua),ua=void 0)}return{add:i,find:a,closeActive:o,findAll:s,getEntries:c,reset:l,stop:u}}var ma=`datadog-synthetics-`,ha=`${ma}public-id`,ga=`${ma}result-id`,_a=`${ma}injects-rum`,va=`${ma}rum-context`;function ya(){return b?!1:!!(y._DATADOG_SYNTHETICS_INJECTS_RUM||We(_a))}function ba(){let e=Sa();return Ca(e)?e:void 0}function xa(){return!!ba()}function Sa(){let e=y._DATADOG_SYNTHETICS_RUM_CONTEXT;if(e)return e;let t=We(va);return t?p(decodeURIComponent(t)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||We(ha),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||We(ga)}}function Ca(e){return typeof e==`object`&&!!e&&typeof e.test_id==`string`&&typeof e.result_id==`string`}var wa=O,Ta=et,Ea=[];function Da(e,t,n,r){let i=new E,a=new E,o=Zt(e.sessionStoreStrategyType,e,t,n);Ea.push(()=>o.stop());let s=pa({expireDelay:Ta});if(Ea.push(()=>s.stop()),o.renewObservable.subscribe(()=>{s.add(c(),N()),i.notify()}),o.expireObservable.subscribe(()=>{a.notify(),s.closeActive(N())}),o.expandOrRenewSession(),s.add(c(),ge().relative),V(B.SHORT_SESSION_INVESTIGATION)){let t=o.getSession();t&&Ma(e,t)}r.observable.subscribe(()=>{r.isGranted()?o.expandOrRenewSession():o.expire(!1)}),Oa(e,()=>{r.isGranted()&&o.expandOrRenewSession()}),ka(e,()=>o.expandSession()),Aa(e,()=>o.restartSession());function c(){let n=o.getSession();return n?{id:n.id,trackingType:n[t],isReplayForced:!!n.forcedReplay,anonymousId:n.anonymousId}:(ja(e).catch(()=>void 0),{id:`invalid`,trackingType:`0`,isReplayForced:!1,anonymousId:void 0})}return{findSession:(e,t)=>s.find(e,t),renewObservable:i,expireObservable:a,sessionStateUpdateOb
5servable:o.sessionStateUpdateObservable,expire:o.expire,updateSessionState:o.updateSessionState}}function Oa(e,t){let{stop:n}=zr(e,window,[`click`,`touchstart`,`keydown`,`scroll`],t,{capture:!0,passive:!0});Ea.push(n)}function ka(e,t){let n=()=>{document.visibilityState===`visible`&&t()},{stop:r}=W(e,document,`visibilitychange`,n);Ea.push(r);let i=oe(n,wa);Ea.push(()=>{se(i)})}function Aa(e,t){let{stop:n}=W(e,window,`resume`,t,{capture:!0});Ea.push(n)}async function ja(e){let t=e.sessionStoreStrategyType;if(!t)return;let n,r;t.type===R.COOKIE?(n=xt(t.cookieOptions,e),r={cookie:await Na(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):n=kt(),ea(`Unexpected session state`,{sessionStoreStrategyType:t.type,session:n,isSyntheticsTest:xa(),createdTimestamp:n?.created,expireTimestamp:n?.expire,...r})}function Ma(e,t){if(!window.cookieStore||!t.created)return;let n=Number(t.created),r=j(),{stop:i}=W(e,cookieStore,`change`,a);Ea.push(i);function a(e){let a=Ze(e.changed,e=>e.name===Xe);if(!a)return;let o=j()-n;if(o>14*6e4)i();else{let e=ft(a.value);if(e.id&&e.id!==t.id){i();let n=j()-r;Na().then(r=>{ea(`Session cookie changed`,{time:n,session_age:o,old:t,new:e,cookie:r})}).catch(ie)}}}}async function Na(){let e;return e=`cookieStore`in window?await window.cookieStore.getAll(Xe):document.cookie.split(/\s*;\s*/).filter(e=>e.startsWith(Xe)),{count:e.length,domain:Je()||`undefined`,...e}}var Pa=class{constructor(){this.callbacks={}}notify(e,t){let n=this.callbacks[e];n&&n.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}},Fa=3e3;function Ia(e,t,n=Fa){let r=0,i=!1;return{isLimitReached(){if(r===0&&w(()=>{r=0},O),r+=1,r<=n||i)return i=!1,!1;if(r===n+1){i=!0;try{t({message:`Reached max number of ${e}s by minute: ${n}`,source:Mr.AGENT,startClocks:P()})}finally{i=!1}}return!0}}}function La(e,t,n){return document.readyState===t||document.readyState===`complete`?(n(),{stop:I}):W(e,window,t===`complete`?`load`:`DOMContentLoaded`,n,{once:!0})}function Ra(e,t){return new Promise(n=>{La(e,t,n)})}var za,Ba=new WeakMap;function Va(e){return za||=Ha(e),za}function Ha(e){return new E(t=>{let{stop:n}=H(XMLHttpRequest.prototype,`open`,Ua),{stop:r}=H(XMLHttpRequest.prototype,`send`,n=>{Wa(n,e,t)},{computeHandlingStack:!0}),{stop:i}=H(XMLHttpRequest.prototype,`abort`,Ga);return()=>{n(),r(),i()}})}function Ua({target:e,parameters:[t,n]}){Ba.set(e,{state:`open`,method:String(t).toUpperCase(),url:Pe(String(n))})}function Wa({target:e,parameters:[t],handlingStack:n},r,i){let a=Ba.get(e);if(!a)return;let o=a;o.state=`start`,o.startClocks=P(),o.isAborted=!1,o.xhr=e,o.handlingStack=n,o.requestBody=t;let s=!1,{stop:c}=H(e,`onreadystatechange`,()=>{e.readyState===XMLHttpRequest.DONE&&l()}),l=()=>{if(u(),c(),s)return;s=!0;let t=a;t.state=`complete`,t.duration=F(o.startClocks.timeStamp,M()),t.status=e.status,typeof e.response==`string`&&(t.responseBody=e.response),i.notify(m(t))},{stop:u}=W(r,e,`loadend`,l);i.notify(o)}function Ga({target:e}){let t=Ba.get(e);t&&(t.isAborted=!0)}async function Ka(e,t){let n=e.getReader(),r=[];for(;;){let e=await n.read();if(e.done)break;t.collectStreamBody&&r.push(e.value)}return n.cancel().catch(I),t.collectStreamBody?fr(r):void 0}var qa,Ja=[];function Ya({responseBodyAction:e}={}){return e&&Ja.push(e),qa||=Xa(),qa}function Xa(){return new E(e=>{if(!y.fetch)return;let{stop:t}=H(y,`fetch`,t=>Za(t,e),{computeHandlingStack:!0});return t})}function Za({parameters:e,onPostCall:t,handlingStack:n},r){let[i,a]=e,o=a&&a.method;o===void 0&&i instanceof Request&&(o=i.method);let s=o===void 0?`GET`:String(o).toUpperCase(),c=i instanceof Request?i.url:Pe(String(i)),l={state:`start`,init:a,input:i,method:s,startClocks:P(),url:c,handlingStack:n,isAbortedOnStart:i instanceof Request&&i.signal?.aborted||a?.signal?.aborted||!1};r.notify(l),e[0]=l.input,e[1]=l.init,t(e=>{Qa(r,e,l).catch(ie)})}async function Qa(e,t,n){let r=n;r.state=`resolve`;let i;try{i=await t}catch(t){r.status=0,r.isAborted=r.init?.signal?.aborted||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,r.error=t,e.notify(r);return}r.response=i,r.status=i.status,r.responseType=i.type,r.isAborted=!1;let a=Ja.reduce((e,t)=>
5Math.max(e,t(r)),0);if(a!==0){let e=si(i);if(e&&e.body)try{let t=await Ka(e.body,{collectStreamBody:a===2});r.responseBody=t&&new TextDecoder().decode(t)}catch{}}e.notify(r)}function $a(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){let n=window.requestIdleCallback(S(e),t);return()=>window.cancelIdleCallback(n)}return eo(e)}function eo(e){let t=j(),n=w(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(j()-t))})},0);return()=>T(n)}var to=D;function no(){let e=[];function t(t){let r;if(t.didTimeout){let e=performance.now();r=()=>30-(performance.now()-e)}else r=t.timeRemaining.bind(t);for(;r()>0&&e.length;)e.shift()();e.length&&n()}function n(){$a(t,{timeout:to})}return{push(t){e.push(t)===1&&n()},stop(){e.length=0}}}var ro={};function io(e){return le(...e.map(e=>(ro[e]||(ro[e]=ao(e)),ro[e])))}function ao(e){return new E(n=>{let r=t[e];return t[e]=(...t)=>{r.apply(console,t);let i=ir(`console error`);C(()=>{n.notify(oo(t,e,i))})},()=>{t[e]=r}})}function oo(t,n,r){let i=t.map(e=>so(e)).join(` `);if(n===e.error){let e=Er({originalError:t.find(Ar),handlingStack:r,startClocks:P(),source:Mr.CONSOLE,handling:`handled`,nonErrorPrefix:`Provided`,useFallbackStack:!1});return e.message=i,{api:n,message:i,handlingStack:r,error:e}}return{api:n,message:i,error:void 0,handlingStack:r}}function so(e){return typeof e==`string`?U(e):Ar(e)?or(Rn(e)):pr(U(e),void 0,2)}var co=500;function lo(){let e=[];return{add:t=>{e.push(t)>co&&e.splice(0,1)},remove:t=>{oa(e,t)},drain:t=>{e.forEach(e=>e(t)),e.length=0}}}function uo(e){let t=en(e)===`object`;return t||i.error(`Unsupported context:`,e),t}function fo(e,t,n){let r={...e};for(let[e,{required:a,type:o}]of Object.entries(t))o===`string`&&!po(r[e])&&(r[e]=String(r[e])),a&&po(r[e])&&i.warn(`The property ${e} of ${n} is required; context will not be sent to the intake.`);return r}function po(e){return e==null||e===``}function mo(e=``,{propertiesConfig:t={}}={}){let n={},r=new E,i={getContext:()=>ti(n),setContext:a=>{uo(a)?n=U(fo(a,t,e)):i.clearContext(),r.notify()},setContextProperty:(i,a)=>{n=U(fo({...n,[i]:a},t,e)),r.notify()},removeContextProperty:i=>{delete n[i],fo(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function q(e,t,n,r){return S((...i)=>(r&&K({feature:r}),e()[t][n](...i)))}var ho=`_dd_c`,go=[];function _o(e,t,n,r){let i=vo(n,r);go.push(W(e,window,`storage`,({key:e})=>{i===e&&o()})),t.changeObservable.subscribe(s);let a=ni(c(),t.getContext());g(a)||t.setContext(a);function o(){t.setContext(c())}function s(){localStorage.setItem(i,JSON.stringify(t.getContext()))}function c(){let e=localStorage.getItem(i);return e?JSON.parse(e):{}}}function vo(e,t){return`${ho}_${e}_${t}`}function yo(e,t,n){let r=bo();return t.storeContextsAcrossPages&&_o(t,r,n,4),e.register(0,()=>{let e=r.getContext();return g(e)||!e.id?G:{account:e}}),r}function bo(){return mo(`account`,{propertiesConfig:{id:{type:`string`,required:!0},name:{type:`string`}}})}function xo(e,t,n,r){let i=So();return t.storeContextsAcrossPages&&_o(t,i,n,2),e.register(0,()=>{let e=i.getContext();return r?{context:e}:e}),i}function So(){return mo(`global context`)}function Co(e,t,n,r){let i=wo();return t.storeContextsAcrossPages&&_o(t,i,r,1),e.register(0,({eventType:e,startTime:r})=>{let a=i.getContext(),o=n.findTrackedSession(r);return o&&o.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=o.anonymousId),g(a)?G:{type:e,usr:a}}),e.register(1,({startTime:e})=>({anonymous_id:n.findTrackedSession(e)?.anonymousId})),i}function wo(){return mo(`user`,{propertiesConfig:{id:{type:`string`},name:{type:`string`},email:{type:`string`}}})}var J={userContext:`userContext`,globalContext:`globalContext`,accountContext:`accountContext`},Y={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`},To={FETCH:X.FETCH,XHR:X.XHR},Eo=500;function Do(){let e=new ue(Eo),t=z(Nr)().subscribe(t=>{e.notify({type:0,error:t})});return{observable:e,stop:()=>{t.unsubscribe()}}}function Oo(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}var Z={ACTION:`action`,ERROR:`error`,LONG_TASK:`long_task`,VIEW:`view`,RESOURCE:`resource`,VITAL:`vital`},ko={LONG_TASK:`long-task`,LONG_ANIMATION_FRAME:`long-animation-frame`},Ao={INITIAL_LOAD:`initial_load`,ROUTE_CHANGE:`route_change`,BF_CACHE:`bf_cache`},jo={CLICK:`click`,CUSTOM:`custom`,TAP:`tap`,SCROLL:`scroll`,SWIPE:`swipe`,APPLICATION_START:`application_start`,BACK:`back`},Mo={RAGE_CLICK:`rage_click`,ERROR_CLICK:`error_click`,DEAD_CLICK:`dead_click`}
5,No={DURATION:`duration`,OPERATION_STEP:`operation_step`};function Po(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function Fo(e,t,n){function r(e){return!t.wasInPageStateDuringPeriod(`frozen`,e.startClocks.relative,e.duration)}function i(t){r(t)&&e.notify(12,zo(t))}function a(t,n,r,i){if(!V(B.FEATURE_OPERATION_VITAL))return;let{operationKey:a,context:o,description:s,handlingStack:c}=r||{},l={name:t,type:No.OPERATION_STEP,operationKey:a,failureReason:i,stepType:n,startClocks:P(),context:U(o),description:s,handlingStack:c};e.notify(12,zo(l))}return{addOperationStepVital:a,addDurationVital:i,startDurationVital:(t,r={})=>{let i=Io(n,t,r),a=n.vitalsByReference.get(i);return a&&e.notify(16,a),i},stopDurationVital:(e,t={})=>{Lo(i,n,e,t)}}}function Io({vitalsByName:e,vitalsByReference:t},n,r={}){let i={id:L(),name:n,startClocks:P(),...r},a={__dd_vital_reference:!0};return e.set(n,i),t.set(a,i),a}function Lo(e,{vitalsByName:t,vitalsByReference:n},r,i={}){let a=typeof r==`string`?t.get(r):n.get(r);a&&(e(Ro(a,a.startClocks,i,P())),typeof r==`string`?t.delete(r):n.delete(r))}function Ro(e,t,n,r){return{id:e.id,name:e.name,type:No.DURATION,startClocks:t,duration:F(t.timeStamp,r.timeStamp),context:ni(e.context,n.context),description:n.description??e.description,handlingStack:e.handlingStack}}function zo(e){let{startClocks:t,type:n,name:r,description:i,context:a,handlingStack:o}=e,s={id:(e.type===No.DURATION?e.id:void 0)??L(),type:n,name:r,description:i,...n===No.DURATION?{duration:A(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:s,type:Z.VITAL,context:a},startClocks:t,duration:n===No.DURATION?e.duration:void 0,domainContext:o?{handlingStack:o}:{}}}function Bo(e,t,n){if(e)for(let r of e){let e=r[t];e&&e(n)}}var Vo=Vi,Ho=[`tracecontext`,`datadog`];function Uo(e,t){if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&i.warn(`trackFeatureFlagsForEvents should be an array`),!e.applicationId){i.error(`Application ID is not configured, no RUM data will be collected.`);return}if(!An(e.sessionReplaySampleRate,`Session Replay`)||!An(e.traceSampleRate,`Trace`))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){i.error(`Excluded Activity Urls should be an array`);return}let n=Wo(e);if(!n)return;let r=jn(e,t),a=qo(e);if(!r)return;let o=e.sessionReplaySampleRate??0;return{applicationId:e.applicationId,actionNameAttribute:e.actionNameAttribute,betaTrackActionsInShadowDom:!!e.betaTrackActionsInShadowDom,sessionReplaySampleRate:o,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually===void 0?o===0:!!e.startSessionReplayRecordingManually,traceSampleRate:e.traceSampleRate??100,rulePsr:f(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:n,excludedActivityUrls:e.excludedActivityUrls??[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(e.trackUserInteractions??!0),trackViewsManually:!!e.trackViewsManually,trackResources:!!(e.trackResources??!0),trackLongTasks:!!(e.trackLongTasks??!0),trackBfcacheViews:!!e.trackBfcacheViews,trackEarlyRequests:!!e.trackEarlyRequests,subdomain:e.subdomain,defaultPrivacyLevel:h(En,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:En.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,traceContextInjection:h(Dn,e.traceContextInjection)?e.traceContextInjection:Dn.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:e.profilingSampleRate??0,propagateTraceBaggage:!!e.propagateTraceBaggage,allowedGraphQlUrls:a,...r}}function Wo(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){i.error(`Allowed Tracing URLs should be an array`);return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){i.error(`Service needs to be configured when tracing is enabled`);return}let t=[];return e.allowedTracingUrls.forEach(e=>{let n=Ko(e);n?t.push(n):i.warn(`Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter`,e)}),t}function Go(e){let t=new Set;
5return sa(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(e=>{var n;(n=Ko(e))==null||n.propagatorTypes.forEach(e=>t.add(e))}),Array.from(t)}function Ko(e){if(nn(e))return{match:e,propagatorTypes:Ho};if(tn(e)&&nn(e.match)&&(e.propagatorTypes===null||e.propagatorTypes===void 0||Array.isArray(e.propagatorTypes)))return{match:e.match,propagatorTypes:e.propagatorTypes||Ho}}function qo(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return i.warn(`allowedGraphQlUrls should be an array`),[];let t=[];return e.allowedGraphQlUrls.forEach(e=>{nn(e)?t.push({match:e,trackPayload:!1,trackResponseErrors:!1}):tn(e)&&nn(e.match)&&t.push({match:e.match,trackPayload:!!e.trackPayload,trackResponseErrors:!!e.trackResponseErrors})}),t}function Jo(e){return sa(e)&&e.some(e=>tn(e)&&e.trackPayload)}function Yo(e){return sa(e)&&e.some(e=>tn(e)&&e.trackResponseErrors)}function Xo(e){let t=Mn(e);return{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:sa(e.allowedTracingUrls),use_allowed_graph_ql_urls:sa(e.allowedGraphQlUrls),use_track_graph_ql_payload:Jo(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:Yo(e.allowedGraphQlUrls),selected_tracing_propagators:Go(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:sa(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:e.plugins?.map(e=>({name:e.name,...e.getConfigurationTelemetry?.call(e)})),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:e.remoteConfigurationId,profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,...t}}function Zo(e){let t=[],n=0,r,i={quote:void 0,escapeSequence:void 0},a=``;for(let o of e){if(r=is[n].find(e=>rs[e](o,i)),!r)return[];if(i.escapeSequence!==void 0&&r!==12){if(!ss(i.escapeSequence))return[];a+=ls(i.escapeSequence),i.escapeSequence=void 0}as.includes(r)?a+=o:os.includes(r)&&a!==``?(t.push(a),a=``):r===12?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${o}`:o:r===8?i.quote=o:r===9&&(i.quote=void 0),n=r}return is[n].includes(1)?(a!==``&&t.push(a),t):[]}var Qo=/[a-zA-Z_$]/,$o=/[a-zA-Z0-9_$]/,es=/[0-9]/,ts=/[a-fA-F0-9]/,ns=`'"`,rs={0:()=>!1,1:()=>!1,2:e=>Qo.test(e),3:e=>$o.test(e),4:e=>e===`.`,5:e=>e===`[`,6:e=>e===`]`,7:e=>es.test(e),8:e=>ns.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?ts.test(e):!1},is={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]},as=[2,3,7,10],os=[4,5,6];function ss(e){return`"'/\\bfnrt`.includes(e)||e.startsWith(`u`)&&e.length===5}var cs={'"':`"`,"'":`'`,"/":`/`,"\\":`\\`,b:`\b`,f:`\f`,n:`
6`,r:`\r`,t:`	`};function ls(e){return e.startsWith(`u`)?String.fromCharCode(parseInt(e.slice(1),16)):cs[e]}var us=`v1`,ds=[`applicationId`,`service`,`env`,`version`,`sessionSampleRate`,`sessionReplaySampleRate`,`defaultPrivacyLevel`,`enablePrivacyForActionName`,`traceSampleRate`,`trackSessionAcrossSubdomains`,`allowedTracingUrls`,`allowedTrackingOrigins`];async function fs(e,t){let n,r=ms(),a=await vs(e);return a.ok?(r.increment(`fetch`,`success`),n=ps(e,a.value,t,r)):(r.increment(`fetch`,`failure`),i.error(a.error)),ra(`remote configuration metrics`,{metrics:r.get()}),n}function ps(e,t,n,r){let a={...e};return ds.forEach(e=>{e in t&&(a[e]=o(t[e]))}
6),Object.keys(n).forEach(e=>{t[e]!==void 0&&s(n[e],t[e])}),a;function o(e){if(Array.isArray(e))return e.map(o);if(tn(e)){if(hs(e)){let t=e.rcSerializedType;switch(t){case`string`:return e.value;case`regex`:return gs(e.value);case`dynamic`:return c(e);default:i.error(`Unsupported remote configuration: "rcSerializedType": "${t}"`);return}}return _(e,o)}return e}function s(e,t){t.forEach(({key:t,value:n})=>{e.setContextProperty(t,o(n))})}function c(e){let t=e.strategy,n;switch(t){case`cookie`:n=l(e);break;case`dom`:n=d(e);break;case`js`:n=p(e);break;case`localStorage`:n=u(e);break;default:i.error(`Unsupported remote configuration: "strategy": "${t}"`);return}let r=e.extractor;return r!==void 0&&typeof n==`string`?_s(r,n):n}function l({name:e}){let t=Ve(e);return r.increment(`cookie`,t===void 0?`missing`:`success`),t}function u({key:e}){let t;try{t=localStorage.getItem(e)}catch{r.increment(`localStorage`,`failure`);return}return r.increment(`localStorage`,t===null?`missing`:`success`),t??void 0}function d({selector:e,attribute:t}){let n;try{n=document.querySelector(e)}catch{i.error(`Invalid selector in the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}if(!n){r.increment(`dom`,`missing`);return}if(f(n,t)){i.error(`Forbidden element selected by the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}let a=t===void 0?n.textContent:n.getAttribute(t);if(a===null){r.increment(`dom`,`missing`);return}return r.increment(`dom`,`success`),a}function f(e,t){return e.getAttribute(`type`)===`password`&&t===`value`}function p({path:e}){let t=window,n=Zo(e);if(n.length===0){i.error(`Invalid JSON path in the remote configuration: '${e}'`),r.increment(`js`,`failure`);return}for(let a of n){if(!(a in t)){r.increment(`js`,`missing`);return}try{t=t[a]}catch(t){i.error(`Error accessing: '${e}'`,t),r.increment(`js`,`failure`);return}}return r.increment(`js`,`success`),t}}function ms(){let e={fetch:{}};return{get:()=>e,increment:(t,n)=>{e[t]||(e[t]={}),e[t][n]||(e[t][n]=0),e[t][n]=e[t][n]+1}}}function hs(e){return`rcSerializedType`in e}function gs(e){try{return new RegExp(e)}catch{i.error(`Invalid regex in the remote configuration: '${e}'`)}}function _s(e,t){let n=gs(e.value);if(n===void 0)return;let r=n.exec(t);if(r===null)return;let[i,a]=r;return a||i}async function vs(e){let t;try{t=await ai(ys(e))}catch{t=void 0}if(!t||!t.ok)return{ok:!1,error:Error(`Error fetching the remote configuration.`)};let n=await t.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:Error(`No remote configuration for RUM.`)}}function ys(e){return e.remoteConfigurationProxy?e.remoteConfigurationProxy:`https://sdk-configuration.${yn(`rum`,e)}/${us}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function bs({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t},n,r,a){let o=lo(),s=So();Ss(s,J.globalContext,o);let c=wo();Ss(c,J.userContext,o);let l=bo();Ss(l,J.accountContext,o);let u,d,f,p,m,h=Vo(),g=n.observable.subscribe(v),_={};function v(){if(!f||!p||!n.isGranted())return;m||=z(Yi)(`browser-rum-sdk`,p,h),g.unsubscribe();let e;if(p.trackViewsManually){if(!u)return;o.remove(u.callback),e=u.options}
6let t=a(p,d,e,m,h);o.drain(t)}function y(e,r){let a=Oi();if(a&&(e=xs(e)),f=e,na(Xo(e)),p){Rr(`DD_RUM`,e);return}let o=Uo(e,r);if(o){if(!a&&!o.sessionStoreStrategyType){i.warn(`No storage available for session. We will not send any data.`);return}o.compressIntakeRequests&&!a&&t&&(d=t(o,`Datadog RUM`,I),!d)||(p=o,Ya().subscribe(I),n.tryToInit(o.trackingConsent),v())}}let b=e=>{o.add(t=>t.addDurationVital(e))};return{init(t,n,r){if(!t){i.error(`Missing configuration`);return}Pn(t.enableExperimentalFeatures),f=t,!(e&&ya())&&(Bo(t.plugins,`onInit`,{initConfiguration:t,publicApi:n}),t.remoteConfigurationId?fs(t,{user:c,context:s}).then(e=>{e&&y(e,r)}).catch(ie):y(t,r))},get initConfiguration(){return f},getInternalContext:I,stopSession:I,addTiming(e,t=M()){o.add(n=>n.addTiming(e,t))},setLoadingTime:(e=>{o.add(t=>t.setLoadingTime(e))}),startView(e,t=P()){let n=n=>{n.startView(e,t)};o.add(n),u||(u={options:e,callback:n},v())},setViewName(e){o.add(t=>t.setViewName(e))},setViewContext(e){o.add(t=>t.setViewContext(e))},setViewContextProperty(e,t){o.add(n=>n.setViewContextProperty(e,t))},getViewContext:()=>_,globalContext:s,userContext:c,accountContext:l,addAction(e){o.add(t=>t.addAction(e))},startAction(e,t){let n=P();o.add(r=>r.startAction(e,t,n))},stopAction(e,t){let n=P();o.add(r=>r.stopAction(e,t,n))},startResource(e,t){let n=P();o.add(r=>r.startResource(e,t,n))},stopResource(e,t){let n=P();o.add(r=>r.stopResource(e,t,n))},addError(e){o.add(t=>t.addError(e))},addFeatureFlagEvaluation(e,t){o.add(n=>n.addFeatureFlagEvaluation(e,t))},startDurationVital(e,t){return Io(r,e,t)},stopDurationVital(e,t){Lo(b,r,e,t)},addDurationVital:b,addOperationStepVital:(e,t,n,r)=>{o.add(i=>i.addOperationStepVital(U(e),t,U(n),U(r)))}}}function xs(e){return{...e,applicationId:`00000000-aaaa-0000-aaaa-000000000000`,clientToken:`empty`,sessionSampleRate:100,defaultPrivacyLevel:e.defaultPrivacyLevel??Ei()?.getPrivacyLevel()}}function Ss(e,t,n){e.changeObservable.subscribe(()=>{let r=e.getContext();n.add(e=>e[t].setContext(r))})}function Cs(){let e=ws();return new E(t=>{if(!e)return;let n=new e(S(e=>t.notify(e)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function ws(){let e,t=window;if(t.Zone&&(e=x(t,`MutationObserver`),t.MutationObserver&&e===t.MutationObserver)){let n=x(new t.MutationObserver(I),`originalInstance`);e=n&&n.constructor}return e||=t.MutationObserver,e}function Ts(){let e=new E,{stop:t}=H(window,`open`,()=>e.notify());return{observable:e,stop:t}}function Es(e,t,n,r,i){return{get:a=>{let o=n.findView(a),s=i.findUrl(a),c=t.findTrackedSession(a);if(c&&o&&s){let t=r.findActionId(a);return{application_id:e,session_id:c.id,user_action:t?{id:t}:void 0,view:{id:o.id,name:o.name,referrer:s.referrer,url:s.url}}}}}}var Ds=Pa,Os=et;function ks(e){let t=pa({expireDelay:Os});e.subscribe(1,e=>{t.add(n(e),e.startClocks.relative)}),e.subscribe(6,({endClocks:e})=>{t.closeActive(e.relative)}),e.subscribe(3,e=>{let n=t.find(e.startClocks.relative);n&&(e.name&&(n.name=e.name),e.context&&(n.context=e.context),n.sessionIsActive=e.sessionIsActive)}),e.subscribe(10,()=>{t.reset()});function n(e){return{service:e.service,version:e.version,context:e.context,id:e.id,name:e.name,startClocks:e.startClocks}}return{findView:e=>t.find(e),stop:()=>{t.stop()}}}var As=`initial_document`,js=[[X.DOCUMENT,e=>As===e],[X.XHR,e=>e===`xmlhttprequest`],[X.FETCH,e=>e===`fetch`],[X.BEACON,e=>e===`beacon`],[X.CSS,(e,t)=>/\.css$/i.test(t)],[X.JS,(e,t)=>/\.js$/i.test(t)],[X.IMAGE,(e,t)=>[`image`,`img`,`icon`].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[X.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[X.MEDIA,(e,t)=>[`audio`,`video`].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function Ms(e){let t=e.name;if(!Fe(t))return X.OTHER;let n=Ie(t);for(let[t,r]of js)if(r(e.initiatorType,n))return t;return X.OTHER}function Ns(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Ps(e){return e.initiatorType===`xmlhttprequest`||e.initiatorType===`fetch`}function Fs(e){let{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n<r?F(n,r):t}function Is(e){if(!Rs(e))return;let{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:a,domainLookupStart:o,domainLookupEnd:s,connectStart:c,secureConnectionStart:l,connectEnd:u,requestStart:d,responseStart:f,responseEnd:p}=e,m={download:Bs(t,f,p),first_byte:Bs(t,d,f)};return 0<r&&r<n&&(m.worker=Bs(t,r,n)),n<u&&(m.connect=Bs(t,c,u),c<=l&&l<=u&&(m.ssl=Bs(t,l,u))),n<s&&(m.dns=Bs(t,o,s)),t<a&&(m.redirect=Bs(t,i,a)),m}function Ls(e){return e.duration>=0}function Rs(e){let t=Ns(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=zs(e)?Ns(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function zs(e){return e.redirectEnd>e.startTime}function Bs(e,t,n){if(e<=t&&t<=n)return{duration:A(F(t,n)),start:A(F(e,t))}}function Vs(e){return e.nextHopProtocol===``?void 0:e.nextHopProtocol}function Hs(e){return e.deliveryType===``?`other`:e.deliveryType}function Us(e){if(e.startTime<e.responseStart){let{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,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 Ws(e){return e&&(!Tn(e)||V(B.TRACK_INTAKE_REQUESTS))}var Gs=/data:(.+)?(;base64)?,/g,Ks=24e3;function qs(e,t=Ks){if(e.length<=t||!e.startsWith(`data:`))return e;let n=e.substring(0,100).match(Gs);return n?`${n[0]}[...]`:e}var Js=new Map;function Ys(e,t){if(t===100)return!0;
6if(t===0)return!1;let n=Js.get(t);if(n&&e===n.sessionId)return n.decision;let r;return r=window.BigInt?Xs(BigInt(`0x${e.split(`-`)[4]}`),t):l(t),Js.set(t,{sessionId:e,decision:r}),r}function Xs(e,t){let n=BigInt(`1111111111111111111`),r=BigInt(`0x10000000000000000`),i=e*n%r;return Number(i)<=t/100*Number(r)}function Zs(){return $s(64)}function Qs(){return $s(63)}function $s(e){let t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(e=10){let n=t[1],r=t[0],i=``;do{let t=n%e*4294967296+r;n=Math.floor(n/e),r=Math.floor(t/e),i=(t%e).toString(e)+i}while(n||r);return i}}}function ec(e){return e.toString(16).padStart(16,`0`)}function tc(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function nc(e,t,n,r){return{clearTracingIfNeeded:tc,traceFetch:i=>rc(e,i,t,n,r,e=>{if(i.input instanceof Request&&!i.init?.headers)i.input=new Request(i.input),Object.keys(e).forEach(t=>{i.input.headers.append(t,e[t])});else{i.init=m(i.init);let t=[];i.init.headers instanceof Headers?i.init.headers.forEach((e,n)=>{t.push([n,e])}):Array.isArray(i.init.headers)?i.init.headers.forEach(e=>{t.push(e)}):i.init.headers&&Object.keys(i.init.headers).forEach(e=>{t.push([e,i.init.headers[e]])}),i.init.headers=t.concat($e(e))}}),traceXhr:(i,a)=>rc(e,i,t,n,r,e=>{Object.keys(e).forEach(t=>{a.setRequestHeader(t,e[t])})})}}function rc(e,t,n,r,i,a){let o=n.findTrackedSession();if(!o)return;let s=e.allowedTracingUrls.find(e=>rn([e.match],t.url,!0));if(!s)return;let c=Ys(o.id,e.traceSampleRate);(c||e.traceContextInjection===Dn.ALL)&&(t.traceSampled=c,t.traceId=Zs(),t.spanId=Qs(),a(ic(t.traceId,t.spanId,t.traceSampled,o.id,s.propagatorTypes,r,i,e)))}function ic(e,t,n,r,i,a,o,s){let c={};if(i.forEach(r=>{switch(r){case`datadog`:Object.assign(c,{"x-datadog-origin":`rum`,"x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?`1`:`0`,"x-datadog-trace-id":e.toString()});break;case`tracecontext`:Object.assign(c,{traceparent:`00-0000000000000000${ec(e)}-${ec(t)}-0${n?`1`:`0`}`,tracestate:`dd=s:${n?`1`:`0`};o:rum`});break;case`b3`:Object.assign(c,{b3:`${ec(e)}-${ec(t)}-${n?`1`:`0`}`});break;case`b3multi`:Object.assign(c,{"X-B3-TraceId":ec(e),"X-B3-SpanId":ec(t),"X-B3-Sampled":n?`1`:`0`});break}}),s.propagateTraceBaggage){let e={"session.id":r},t=a.getContext().id;typeof t==`string`&&(e[`user.id`]=t);let n=o.getContext().id;typeof n==`string`&&(e[`account.id`]=n);let i=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join(`,`);i&&(c.baggage=i)}return c}var ac=32*cr;function oc(e,t){let n=lc(e,t.trackPayload);if(n){if(t.trackResponseErrors&&e.responseBody){let t=sc(e.responseBody);t&&(n.error_count=t.length,n.errors=t)}return n}}function sc(e){let t=p(e);if(!t||typeof t!=`object`)return;let n=t;if(sa(n.errors))return n.errors.map(e=>({message:e.message,path:e.path,locations:e.locations,code:e.extensions?.code}))}function cc(e,t){return t.allowedGraphQlUrls.find(t=>rn([t.match],e))}function lc(e,t=!1){let n;if(e.method===`POST`?n=uc(e.requestBody):e.method===`GET`&&(n=dc(e.url)),n)return fc(n,t)}function uc(e){if(!e||typeof e!=`string`)return;let t=p(e);if(t)return{query:t.query,operationName:t.operationName,variables:t.variables?JSON.stringify(t.variables):void 0}}function dc(e){let t=Le(e).searchParams,n=t.get(`variables`),r=n&&p(n)!==void 0?n:void 0;return{query:t.get(`query`)||void 0,operationName:t.get(`operationName`)||void 0,variables:r}}function fc(e,t){let n,r,i;if(e.query){let i=e.query.trim();n=pc(i),t&&(r=Oe(i,ac,`...`))}return e.variables&&(i=e.variables),{operationType:n,operationName:e.operationName,variables:i,payload:r}}function pc(e){return e.match(/^\s*(query|mutation|subscription)\b/i)?.[1]}var mc=1;function hc(e,t,n,r,i){let a=nc(t,n,r,i);gc(e,t,a),_c(e,t,a)}function gc(e,t,n){let r=Va(t).subscribe(t=>{let r=t;if(Ws(r.url))switch(r.state){case`start`:n.traceXhr(r,r.xhr),r.requestIndex=vc(),e.notify(7,{requestIndex:r.requestIndex,url:r.url});break;case`complete`:n.clearTracingIfNeeded(r),e.notify(8,{...r,type:To.XHR,isAbortedOnStart:!1});break}});return{stop:()=>r.unsubscribe()}}function _c(e,t,n){let r=Ya({responseBodyAction:e=>cc(e.url,t)?.trackResponseErrors?2:1}).subscribe(t=>{let r=t;if(Ws(r.url))switch(r.state){case`start`:n.traceFetch(r),r.requestIndex=vc(),e.notify(7,{requestIndex:r.requestIndex,url:r.url});break;case`resolve`:n.clearTracingIfNeeded(r),e.notify(8,{...r,duration:F(r.startClocks.timeStamp,M()),type:To.FETCH,requestBody:r.init?.body});break}});return{stop:()=>r.unsubscribe()}}function vc(){let e=mc;return mc+=1,e}function yc(e){return f(e)&&e<0?void 0:e}
6function bc(e){return e.nodeType===Node.TEXT_NODE}function xc(e){return e.nodeType===Node.COMMENT_NODE}function Sc(e){return e.nodeType===Node.ELEMENT_NODE}function Cc(e){return Sc(e)&&!!e.shadowRoot}function wc(e){let t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Sc(t.host)}function Tc(e){return e.childNodes.length>0||Cc(e)}function Ec(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;Cc(e)&&t(e.shadowRoot)}function Dc(e){return wc(e)?e.host:e.parentNode}function Oc(e){if(e.parentElement)return e.parentElement;let t=e.parentNode;return t&&wc(t)?t.host:null}function kc(e,t){let n=j(),r=!1,{stop:i}=zr(e,window,[`click`,`mousedown`,`keydown`,`touchstart`,`pointerdown`],t=>{if(!t.cancelable)return;let n={entryType:`first-input`,processingStart:N(),processingEnd:N(),startTime:t.timeStamp,duration:0,name:``,cancelable:!1,target:null,toJSON:()=>({})};t.type===`pointerdown`?a(e,n):o(n)},{passive:!0,capture:!0});return{stop:i};function a(e,t){zr(e,window,[`pointerup`,`pointercancel`],e=>{e.type===`pointerup`&&o(t)},{once:!0})}function o(e){if(!r){r=!0,i();let a=e.processingStart-e.startTime;a>=0&&a<j()-n&&t(e)}}}var Q;(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`})(Q||={});function Ac(e,t){return new E(n=>{if(!window.PerformanceObserver)return;let r=e=>{let t=Fc(e);t.length>0&&n.notify(t)},i,a=!0,o=new PerformanceObserver(S(e=>{a?i=w(()=>r(e.getEntries())):r(e.getEntries())}));try{o.observe(t)}catch{if([Q.RESOURCE,Q.NAVIGATION,Q.LONG_TASK,Q.PAINT].includes(t.type)){t.buffered&&(i=w(()=>r(performance.getEntriesByType(t.type))));try{o.observe({entryTypes:[t.type]})}catch{return}}}a=!1,Mc(e);let s;return!Pc(Q.FIRST_INPUT)&&t.type===Q.FIRST_INPUT&&({stop:s}=kc(e,e=>{r([e])})),()=>{o.disconnect(),s&&s(),T(i)}})}var jc;function Mc(e){return!jc&&Nc()&&`addEventListener`in performance&&(jc=W(e,performance,`resourcetimingbufferfull`,()=>{performance.clearResourceTimings()})),()=>{jc?.stop()}}function Nc(){return window.performance!==void 0&&`getEntries`in performance}function Pc(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function Fc(e){return e.filter(e=>!Ic(e))}function Ic(e){return e.entryType===Q.RESOURCE&&(!Ws(e.name)||!Ls(e))}function Lc(e,t,n,r,i,a){let o=z(Rc)(e,t,n,r),s,c=!1,l=w(S(()=>p({hadActivity:!1})),100),u=a===void 0?void 0:w(S(()=>p({hadActivity:!0,end:M()})),a),d=o.subscribe(({isBusy:e})=>{T(l),T(s);let t=M();e||(s=w(S(()=>p({hadActivity:!0,end:t})),100))}),f=()=>{c=!0,T(l),T(s),T(u),d.unsubscribe()};function p(e){c||(f(),i(e))}return{stop:f}}function Rc(e,t,n,r){return new E(i=>{let a=[],o,s=0;return a.push(t.subscribe(e=>{e.every(Bc)||c()}),n.subscribe(c),Ac(r,{type:Q.RESOURCE}).subscribe(e=>{e.some(e=>!zc(r,e.name))&&c()}),e.subscribe(7,e=>{zc(r,e.url)||(o===void 0&&(o=e.requestIndex),s+=1,c())}),e.subscribe(8,e=>{zc(r,e.url)||o===void 0||e.requestIndex<o||(--s,c())})),()=>{a.forEach(e=>e.unsubscribe())};function c(){i.notify({isBusy:s>0})}})}function zc(e,t){return rn(e.excludedActivityUrls,t)}function Bc(e){let t=e.type===`characterData`?e.target.parentElement:e.target;return!!(t&&Sc(t)&&t.matches(`[data-dd-excluded-activity-mutations], [data-dd-excluded-activity-mutations] *`))}var Vc=`data-dd-action-name`,Hc=`Masked Element`,Uc=`::shadow `,Wc=[Vc,`data-testid`,`data-test`,`data-qa`,`data-cy`,`data-test-id`,`data-qa-id`,`data-testing`,`data-component`,`data-element`,`data-source-file`],Gc=[el,Zc],Kc=[el,Qc,$c];function qc(e,t){if(!e.isConnected)return;let n=Jc(e),r=[];for(let{rootNode:e,target:i}of n){let n=Yc(i,e,t);if(!n)return;r.push(n)}return r.join(Uc)}function Jc(e){let t=[],n=e;for(;n;){let e=n.getRootNode();if(t.push({rootNode:e,target:n}),wc(e))n=e.host;else break}return t.reverse()}function Yc(e,t,n){let r,i=e;for(;i&&i.nodeName!==`HTML`;){let e=il(i,t,Gc,al,n,r);if(e)return sl(e,r);r=sl(il(i,t,Kc,ol,n,r)||nl(i),r),i=i.parentElement}return r}function Xc(e){return/[0-9]/.test(e)}function Zc(e){if(e.id&&!Xc(e.id))return`#${CSS.escape(e.id)}`}function Qc(e){if(e.tagName===`BODY`)return;let t=e.classList;for(let n=0;n<t.length;n+=1){let r=t[n];if(!Xc(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function $c(e){return CSS.escape(e.tagName)}function el(e,t){if(t){let e=n(t);if(e)return e}for(let e of Wc){let t=n(e);if(t)return t}function n(t){if(e.hasAttribute(t))return`${CSS.escape(e.tagName)}${tl(t,e.getAttribute(t))}`}}function tl(e,t){return`[${e}="${CSS.escape(t)}"]`}function nl(e){let t=rl(e);return`${CSS.escape(e.tagName)}:nth-of-type(${t})`}function rl(e){let t=e.parentNode.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return n}function il(e,t,n,r,i,a){for(let o of n){let n=o(e,i);if(n&&r(e,t,n,a))return n}}function al(e,t,n,r){return t.querySelectorAll(sl(n,r)).length===1}function ol(e,t,n,r){let i;if(r===void 0)i=e=>e.matches(n);else{let e=sl(`${n}:scope`,r);i=t=>t.querySelector(e)!==null}let a=e.previousElementSibling;for(;a;){if(i(a))return!1;a=a.previousElementSibling}for(a=e.nextElementSibling;a;){if(i(a))return!1;a=a.nextElementSibling}return!0}function sl(e,t){return t?`${e}>${t}`:e}var $={IGNORE:`ignore`,HIDDEN:`hidden`,ALLOW:En.ALLOW,MASK:En.MASK,MASK_USER_INPUT:En.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:En.MASK_UNLESS_ALLOWLISTED},cl=`data-dd-privacy`,ll=`hidden`,ul=`dd-privacy-`,dl=`data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`,fl={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function pl(e){return`[${cl}="${e}"], .${ul}${e}`}function ml(e,t,n){if(n&&n.has(e))return n.get(e);let r=Dc(e),i=r?ml(r,t,n):t,a=hl(gl(e),i);return n&&n.set(e,a),a}function hl(e,t){switch(t){case $.HIDDEN:case $.IGNORE:return t}switch(e){case $.ALLOW:case $.MASK:case $.MASK_USER_INPUT:case $.MASK_UNLESS_ALLOWLISTED:case $.HIDDEN:case $.IGNORE:return e;default:return t}}function gl(e){if(Sc(e)){if(e.tagName===`BASE`)return $.ALLOW;if(e.tagName===`INPUT`){let t=e;if(t.type===`password`||t.type===`email`||t.type===`tel`||t.type===`hidden`)return $.MASK;let n=t.getAttribute(`autocomplete`);if(n&&(n.startsWith(`cc-`)||n.endsWith(`-password`)))return $.MASK}if(e.matches(pl($.HIDDEN)))return $.HIDDEN;if(e.matches(pl($.MASK)))return $.MASK;if(e.matches(pl($.MASK_UNLESS_ALLOWLISTED)))return $.MASK_UNLESS_ALLOWLISTED;if(e.matches(pl($.MASK_USER_INPUT)))return $.MASK_USER_INPUT;if(e.matches(pl($.ALLOW)))return $.ALLOW;if(Sl(e))return $.IGNORE}}function _l(e,t){switch(t){case $.MASK:case $.HIDDEN:case $.IGNORE:return!0;case $.MASK_UNLESS_ALLOWLISTED:return bc(e)?yl(e.parentNode)?!0:!Cl(e.textContent||``):yl(e);case $.MASK_USER_INPUT:return bc(e)?yl(e.parentNode):yl(e);default:return!1}}function vl(e,t,n,r,i){if(r!==$.MASK&&r!==$.MASK_UNLESS_ALLOWLISTED||t===`data-dd-privacy`||Wc.includes(t)||t===i.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`||n&&t.startsWith(`data-`)||(e===`IMG`||e===`SOURCE`)&&(t===`src`||t===`srcset`))}function yl(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;let t=e;if(t.tagName===`INPUT`)switch(t.type){case`button`:case`color`:case`reset`:case`submit`:return!1}return!!fl[t.tagName]}var bl=e=>e.replace(/\S/g,`x`);function xl(e,t){let n=e.parentElement?.tagName,r=e.textContent||``;if(n===`HEAD`&&!r.trim())return;let i=t;if(n===`SCRIPT`)r=`***`;else if(i===$.HIDDEN)r=`***`;else if(_l(e,i))if(n===`DATALIST`||n===`SELECT`||n===`OPTGROUP`){if(!r.trim())return}else r=n===`OPTION`?`***`:i===$.MASK_UNLESS_ALLOWLISTED?wl(r):bl(r);return r}function Sl(e){if(e.nodeName===`SCRIPT`)return!0;
6if(e.nodeName===`LINK`){let e=t(`rel`);return/preload|prefetch/i.test(e)&&t(`as`)===`script`||e===`shortcut icon`||e===`icon`}if(e.nodeName===`META`){let n=t(`name`),r=t(`rel`),i=t(`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(i)||/^(og|twitter):/.test(n)||n===`pinterest`||n===`robots`||n===`googlebot`||n===`bingbot`||e.hasAttribute(`http-equiv`)||n===`author`||n===`generator`||n===`framework`||n===`publisher`||n===`progid`||/^article:/.test(i)||/^product:/.test(i)||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 t(t){return(e.getAttribute(t)||``).toLowerCase()}return!1}function Cl(e){return!e||!e.trim()?!0:window.$DD_ALLOW?.has(e.toLocaleLowerCase())||!1}function wl(e,t){return Cl(e)?e:t||bl(e)}function Tl({lifeCycle:e,isChildEvent:t,onChange:n=I}){let r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(13,e=>{if(!(e.type===`view`||e.type===`vital`||!t(e)))switch(e.type){case Z.ERROR:r.errorCount+=1,n();break;case Z.ACTION:r.actionCount+=1,e.action.frustration&&(r.frustrationCount+=e.action.frustration.type.length),n();break;case Z.LONG_TASK:r.longTaskCount+=1,n();break;case Z.RESOURCE:e._dd?.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}var El=5*O;function Dl(e){let t=pa({expireDelay:El}),n=new Map;function r(e){var t;n.delete(e.key),(t=e.eventCounts)==null||t.stop()}function i(){n.forEach(e=>{r(e)}),t.reset()}let a=e.subscribe(10,i);function o(i,a,o,s){let c=L(),l=t.add(c,a.relative),u=n.get(i);u&&r(u);let d={id:c,key:i,startClocks:a,data:o,historyEntry:l,eventCounts:s?.isChildEvent?Tl({lifeCycle:e,isChildEvent:s.isChildEvent(c)}):void 0};return n.set(i,d),d}function s(e,t,i){let a=n.get(e);if(!a)return;let o=i?ni(a.data,i):a.data;a.historyEntry.close(t.relative);let s=F(a.startClocks.timeStamp,t.timeStamp),c=a.eventCounts?.eventCounts;return r(a),{...o,id:a.id,startClocks:a.startClocks,duration:s,counts:c}}function c(e){let t=n.get(e);if(!t)return;let i=t.eventCounts?.eventCounts;return r(t),t.historyEntry.remove(),{...t.data,id:t.id,startClocks:t.startClocks,counts:i}}function l(e){return t.findAll(e)}function u(e){return n.get(e)?.eventCounts?.eventCounts}function d(){a.unsubscribe(),i(),t.stop()}return{start:o,stop:s,discard:c,getCounts:u,findId:l,stopAll:d}}var Ol=[`HTML`,`BODY`],kl=2*cr,Al=Wc.concat([`role`,`type`,`disabled`,`readonly`,`tabindex`,`draggable`,`target`,`rel`,`download`,`method`,`action`,`enctype`,`autocomplete`]);function jl(e,t){let n=e.filter(e=>e instanceof Element&&!Ol.includes(e.tagName));if(n.length===0)return``;let r=t?[t].concat(Al):Al,i=``;for(let e of n){let t=Ml(e,r);if(i+=t,i.length>=kl)return Oe(i,kl)}return i}function Ml(e,t){let n=$c(e),r=Zc(e),i=Nl(e),a=Fl(e,t),o=Pl(e);return`${n}${r||``}${a}${i}${o};`}function Nl(e){return Array.from(e.classList).filter(e=>!Xc(e)).sort().map(e=>`.${CSS.escape(e)}`).join(``)}function Pl(e){let t=Array.from(e.parentNode.children);if(t.length<=1)return``;let n=t.filter(t=>t.tagName===e.tagName),r=t.indexOf(e),i=rl(e);return`:nth-child(${r+1})${n.length>1?`:nth-of-type(${i})`:``}`}function Fl(e,t){let n=[],r=Array.from(e.attributes);for(let e of r)t.includes(e.name)&&n.push(tl(e.name,e.value));return n.sort().join(``)}var Il=D;function Ll(e,t){let n=[],r=0,i;a(e);function a(e){e.stopObservable.subscribe(o),n.push(e),T(i),i=w(s,Il)}function o(){r===1&&n.every(e=>e.isStopped())&&(r=2,t(n))}function s(){T(i),r===0&&(r=1,o())}return{tryAppend:e=>r===0?n.length>0&&!Rl(n[n.length-1].event,e.event)?(s(),!1):(a(e),!0):!1,stop:()=>{s()}}}function Rl(e,t){return e.target===t.target&&zl(e,t)<=100&&e.timeStamp-t.timeStamp<=Il}function zl(e,t){return Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2)}function Bl(e,t,n=$.ALLOW){let r=new Map,{actionNameAttribute:i}=t,a=Vl(e,`data-dd-action-name`)||i&&Vl(e,i);return a?{name:a,nameSource:`custom_attribute`}:n===$.MASK?{name:Hc,nameSource:`mask_placeholder`}:Kl(e,Ul,t,r)||Kl(e,Wl,t,r)||{name:``,nameSource:`blank`}}function Vl(e,t){let n=Hl(e,`[${t}]`);
6if(n)return Jl(ql(n.getAttribute(t).trim()))}function Hl(e,t){let n=e;for(;n;){if(n.matches(t))return n;n=Oc(n)}return null}var Ul=[(e,t,n)=>{if(`labels`in e&&e.labels&&e.labels.length>0)return Zl(e.labels[0],t,n)},e=>{if(e.nodeName===`INPUT`){let t=e,n=t.getAttribute(`type`);if(n===`button`||n===`submit`||n===`reset`)return{name:t.value,nameSource:`text_content`}}},(e,t,n)=>{if(e.nodeName===`BUTTON`||e.nodeName===`LABEL`||e.getAttribute(`role`)===`button`)return Zl(e,t,n)},(e,t,n)=>Xl(e,`aria-label`,t,n),(e,t,n)=>{let r=e.getAttribute(`aria-labelledby`);if(r)return{name:r.split(/\s+/).map(t=>Yl(e,t)).filter(e=>!!e).map(e=>Ql(e,t,n)).join(` `),nameSource:`text_content`}},(e,t,n)=>Xl(e,`alt`,t,n),(e,t,n)=>Xl(e,`name`,t,n),(e,t,n)=>Xl(e,`title`,t,n),(e,t,n)=>Xl(e,`placeholder`,t,n),(e,t,n)=>{if(`options`in e&&e.options.length>0)return Zl(e.options[0],t,n)}],Wl=[(e,t,n)=>Zl(e,t,n)],Gl=10;function Kl(e,t,n,r){let i=e,a=0;for(;a<=Gl&&i&&i.nodeName!==`BODY`&&i.nodeName!==`HTML`&&i.nodeName!==`HEAD`;){for(let e of t){let t=e(i,n,r);if(t){let{name:e,nameSource:n}=t,r=e&&e.trim();if(r)return{name:Jl(ql(r)),nameSource:n}}}if(i.nodeName===`FORM`)break;i=Oc(i),a+=1}}function ql(e){return e.replace(/\s+/g,` `)}function Jl(e){return e.length>100?`${Oe(e,100)} [...]`:e}function Yl(e,t){let n=e.getRootNode();if(n instanceof ShadowRoot){let e=n.getElementById(t);if(e)return e}return e.ownerDocument?e.ownerDocument.getElementById(t):null}function Xl(e,t,n,r){let{enablePrivacyForActionName:i,defaultPrivacyLevel:a}=n,o=e.getAttribute(t);if(o&&i){let i=ml(e,a,r);vl(e.tagName,t,o,i,n)&&(o=wl(o,Hc))}else o||=``;return{name:o,nameSource:`standard_attribute`}}function Zl(e,t,n){return{name:Ql(e,t,n)||``,nameSource:`text_content`}}function Ql(e,t,n){if(e.isContentEditable)return;let{enablePrivacyForActionName:r,actionNameAttribute:i,defaultPrivacyLevel:a}=t;if(V(B.USE_TREE_WALKER_FOR_ACTION_NAME))return $l(e,i,r,a,n);if(`innerText`in e){let t=e.innerText,n=n=>{let r=e.querySelectorAll(n);for(let e=0;e<r.length;e+=1){let n=r[e];if(`innerText`in n){let e=n.innerText;e&&e.trim().length>0&&(t=t.replace(e,``))}}};return n(`[${Vc}]`),i&&n(`[${i}]`),r&&n(`${pl($.HIDDEN)}, ${pl($.MASK)}`),t}return e.textContent}function $l(e,t,n,r,i){let a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,s),o=``;for(;a.nextNode();){let e=a.currentNode;if(Sc(e)){(e.nodeName===`BR`||e.nodeName===`P`||[`block`,`flex`,`grid`,`list-item`,`table`,`table-caption`].includes(getComputedStyle(e).display))&&(o+=` `);continue}o+=e.textContent||``}return o.replace(/\s+/g,` `).trim();function s(e){let a=ml(e,r,i);if(n&&a&&_l(e,a))return NodeFilter.FILTER_REJECT;if(Sc(e)){if(e.hasAttribute(`data-dd-action-name`)||t&&e.hasAttribute(t))return NodeFilter.FILTER_REJECT;let n=getComputedStyle(e);if(n.visibility!==`visible`||n.display===`none`||n.contentVisibility&&n.contentVisibility!==`visible`)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function eu(e,{onPointerDown:t,onPointerUp:n}){let r,i={selection:!1,input:!1,scroll:!1},a,o=[W(e,window,`pointerdown`,e=>{nu(e)&&(r=tu(),i={selection:!1,input:!1,scroll:!1},a=t(e))},{capture:!0}),W(e,window,`selectionchange`,()=>{(!r||!tu())&&(i.selection=!0)},{capture:!0}),W(e,window,`scroll`,()=>{i.scroll=!0},{capture:!0,passive:!0}),W(e,window,`pointerup`,e=>{if(nu(e)&&a){let t=i;n(a,e,()=>t),a=void 0}},{capture:!0}),W(e,window,`input`,()=>{i.input=!0},{capture:!0})];return{stop:()=>{o.forEach(e=>e.stop())}}}function tu(){let e=window.getSelection();return!e||e.isCollapsed}function nu(e){return e.target instanceof Element&&e.isPrimary!==!1}var ru=3;function iu(e,t){if(au(e))return t.addFrustration(Mo.RAGE_CLICK),e.some(su)&&t.addFrustration(Mo.DEAD_CLICK),t.hasError&&t.addFrustration(Mo.ERROR_CLICK),{isRage:!0};let n=e.some(e=>e.getUserActivity().selection);return e.forEach(e=>{e.hasError&&e.addFrustration(Mo.ERROR_CLICK),su(e)&&!n&&e.addFrustration(Mo.DEAD_CLICK)}),{isRage:!1}}function au(e){if(e.some(e=>e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(ru-1);t+=1)if(e[t+ru-1].event.timeStamp-e[t].event.timeStamp<=1e3)return!0;return!1}var ou=`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 su(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(ou)}var cu=10*D,lu=new Map;function uu(e){let t=lu.get(e);return lu.delete(e),t}function du(e,t){lu.set(e,t),lu.forEach((e,t)=>{F(t,N())>cu&&lu.delete(t)})}function fu(e){return t=>t.action!==void 0&&t.action.id!==void 0&&t.action.id.includes(e)}function pu(e,t,n,r){let i=Dl(e),a=new E,o;
6e.subscribe(5,l),e.subscribe(11,l);let{stop:s}=eu(r,{onPointerDown:i=>mu(r,e,t,i,n),onPointerUp:({clickActionBase:o,hadActivityOnPointerDown:s},l,u)=>{hu(r,e,t,n,i,a,c,o,l,u,s)}});return{stop:()=>{l(),a.notify(),s(),i.stopAll()},findActionId:i.findId};function c(e){if(!o||!o.tryAppend(e)){let t=e.clone();o=Ll(e,e=>{yu(e,t),o=void 0})}}function l(){o&&o.stop()}}function mu(e,t,n,r,i){let a=e.betaTrackActionsInShadowDom?_u(r):r.target,o;if(o=e.enablePrivacyForActionName?ml(a,e.defaultPrivacyLevel):$.ALLOW,o===$.HIDDEN)return;let s=gu(r,o,e),c=!1;return Lc(t,n,i,e,e=>{c=e.hadActivity},100),{clickActionBase:s,hadActivityOnPointerDown:()=>c}}function hu(e,t,n,r,i,a,o,s,c,l,u){let d=vu(t,i,l,s,c);o(d);let f=s?.target?.selector;f&&du(c.timeStamp,f);let{stop:p}=Lc(t,n,r,e,e=>{e.hadActivity&&e.end<d.startClocks.timeStamp?d.discard():e.hadActivity?d.stop(e.end):u()?d.stop(d.startClocks.timeStamp):d.stop()},cu),m=t.subscribe(5,({endClocks:e})=>{d.stop(e.timeStamp)}),h=t.subscribe(11,()=>{d.stop(M())}),g=a.subscribe(()=>{d.stop()});d.stopObservable.subscribe(()=>{h.unsubscribe(),m.unsubscribe(),p(),g.unsubscribe()})}function gu(e,t,n){let r=n.betaTrackActionsInShadowDom?_u(e):e.target,i=r.getBoundingClientRect(),a=qc(r,n.actionNameAttribute),o=V(B.COMPOSED_PATH_SELECTOR)&&typeof e.composedPath==`function`?jl(e.composedPath(),n.actionNameAttribute):void 0;a&&du(e.timeStamp,a);let{name:s,nameSource:c}=Bl(r,n,t);return{type:jo.CLICK,target:{width:Math.round(i.width),height:Math.round(i.height),selector:a,composedPathSelector:o||void 0},position:{x:Math.round(e.clientX-i.left),y:Math.round(e.clientY-i.top)},name:s,nameSource:c}}function _u(e){if(e.composed&&Cc(e.target)&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0&&t[0]instanceof Element)return t[0]}return e.target}function vu(e,t,n,r,i){let a=L(),o=k(i.timeStamp),s=t.start(a,o,r,{isChildEvent:fu});e.notify(15,s);let c=0,l,u=[],d=new E;function f(e){c===0&&(c=1,l=e?t.stop(a,pe(e)):t.discard(a),d.notify())}return{event:i,stop:f,stopObservable:d,get hasError(){let e=l?.counts??t.getCounts(a);return e?e.errorCount>0:!1},get hasPageActivity(){return l&&`duration`in l},getUserActivity:n,addFrustration:e=>{u.push(e)},get startClocks(){return o},isStopped:()=>c===1||c===2,clone:()=>vu(e,t,n,r,i),validate:t=>{if(f(),c!==1||!l)return;let n={frustrationTypes:u,events:t??[i],event:i,...l,counts:l.counts};e.notify(0,n),c=2},discard:()=>{f(),c=2}}}function yu(e,t){let{isRage:n}=iu(e,t);n?(e.forEach(e=>e.discard()),t.stop(M()),t.validate(e.map(e=>e.event))):(t.discard(),e.forEach(e=>e.validate()))}function bu(e,t){let n=Dl(e);function r(t,r={},i=P()){let a=r.actionKey??t,o=n.start(a,i,{name:t,...r},{isChildEvent:fu});e.notify(15,o)}function i(e,r={},i=P()){let a=r.actionKey??e,o=n.stop(a,i,r);if(!o)return;let s=[];o.counts&&o.counts.errorCount>0&&s.push(Mo.ERROR_CLICK),t({...o,type:o.type||jo.CUSTOM,frustrationTypes:s})}function a(e){t({id:L(),frustrationTypes:[],...e})}return{addAction:a,startAction:r,stopAction:i,findActionId:n.findId,stop:n.stopAll}}function xu(e,t,n,r,i){let{unsubscribe:a}=e.subscribe(0,t=>{e.notify(12,Su(t))}),o=I,s;i.trackUserInteractions&&(s=pu(e,n,r,i));let c=bu(e,t=>{e.notify(12,Su(t))}),l={findActionId:e=>{let t=c.findActionId(e),n=s?.findActionId(e)??[];return t.concat(n)}};return t.register(0,({startTime:e,eventType:t})=>{if(t!==Z.ERROR&&t!==Z.RESOURCE&&t!==Z.LONG_TASK)return G;let n=t===Z.LONG_TASK?_e(e,1):e,r=l.findActionId(n);return r.length?{type:t,action:{id:r}}:G}),t.register(1,({startTime:e})=>({action:{id:l.findActionId(e)}})),{addAction:c.addAction,startAction:c.startAction,stopAction:c.stopAction,actionContexts:l,stop:()=>{a(),o(),c.stop(),s?.stop()}}}function Su(e){let t=Cu(e),n=yc(A(e.duration));return{rawRumEvent:{type:Z.ACTION,date:e.startClocks.timeStamp,action:{id:e.id,target:{name:e.name},type:e.type,...n!==void 0&&{loading_time:n},...e.counts&&{error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},frustration:{type:e.frustrationTypes}},...t?{_dd:{action:{target:{selector:e.target?.selector||void 0,width:e.target?.width||void 0,height:e.target?.height||void 0,composed_path_selector:e.target?.composedPathSelector},position:e.position,name_source:e.nameSource}}}:{context:e.context}},duration:e.duration,startClocks:e.startClocks,domainContext:t?{events:e.events}:{handlingStack:e.handlingStack}}}function Cu(e){return`events`in e}function wu(t){let n=io([e.error]).subscribe(e=>t.notify(e.error));return{stop:()=>{n.unsubscribe()}}}function Tu(e,t){let n=Vr(e,[Br.cspViolation,Br.intervention]).subscribe(e=>t.notify(e));return{stop:()=>{n.unsubscribe()}}}function Eu(e,t,n){let r=new E;return n.subscribe(e=>{e.type===0&&r.notify(e.error)}),wu(r),Tu(t,r),r.subscribe(t=>e.notify(14,{error:t})),Du(e)}function Du(e){return e.subscribe(14,({error:t})=>{e.notify(12,Ou(t))}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:a})=>{let o=Er({originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:`Provided`,source:Mr.CUSTOM,handling:`handled`});o.context=ni(o.context,a),e.notify(14,{error:o})}}}function Ou(e){let t={date:e.startClocks.timeStamp,error:{id:L(),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:Z.ERROR,context:e.context},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startClocks:e.startClocks,domainContext:n}}var ku=new WeakSet;function Au(e){if(!performance||!(`getEntriesByName`in performance))return;let t=performance.getEntriesByName(e.url,`resource`);if(!t.length||!(`toJSON`in t[0]))return;let n=t.filter(e=>!ku.has(e)).filter(e=>Ls(e)&&Rs(e)).filter(t=>
6Mu(t,e.startClocks.relative,ju({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return ku.add(n[0]),n[0].toJSON()}function ju(e){return _e(e.startTime,e.duration)}function Mu(e,t,n){return e.startTime>=t-1&&ju(e)<=_e(n,1)}var Nu=2*O;function Pu(e){let t=Fu(e)||Iu(e);if(!(!t||t.traceTime<=j()-Nu))return t.traceId}function Fu(e){let t=e.querySelector(`meta[name=dd-trace-id]`),n=e.querySelector(`meta[name=dd-trace-time]`);return Lu(t&&t.content,n&&n.content)}function Iu(e){let t=Ru(e);if(t)return Lu(Te(t,`trace-id`),Te(t,`trace-time`))}function Lu(e,t){let n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function Ru(e){for(let t=0;t<e.childNodes.length;t+=1){let n=zu(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;--t){let n=e.body.childNodes[t],r=zu(n);if(r)return r;if(!bc(n))break}}function zu(e){if(e&&xc(e)){let t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Bu(){if(Pc(Q.NAVIGATION)){let e=performance.getEntriesByType(Q.NAVIGATION)[0];if(e)return e}let e=Vu(),t={entryType:Q.NAVIGATION,initiatorType:`navigation`,name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function Vu(){let e={},t=performance.timing;for(let n in t)if(f(t[n])){let r=n,i=t[r];e[r]=i===0?0:ve(i)}return e}function Hu(e){return e.responseStart>=0&&e.responseStart<=N()?e.responseStart:void 0}
6function Uu(){if(Pc(Q.RESOURCE))return performance.getEntriesByType(Q.RESOURCE)}function Wu(e,t){let n=Uu();if(n)return Ze(n,n=>n.name===e&&n.startTime<=t)}function Gu(e,t){La(e,`interactive`,()=>{let e=z(Bu)(),n=Object.assign(e.toJSON(),{entryType:Q.RESOURCE,initiatorType:As,duration:e.responseEnd,traceId:Pu(document),toJSON:()=>({...n,toJSON:void 0})});t(n)})}function Ku(e){let t=new Set,n=!1,r=e.subscribe(8,e=>{if(t.add(e),t.size>1e3){let e=t.values().next().value;if(!n){n=!0;let r;if(V(B.TOO_MANY_REQUESTS_INVESTIGATION)){let n=0,i=0,a=0,o=0;for(let e of t)e.isAborted&&n++,e.isAbortedOnStart&&i++,e.type===To.XHR&&a++,performance.getEntriesByName(e.url,`resource`).some(t=>t.startTime>=e.startClocks.relative)||o++;let s=M()-e.startClocks.timeStamp;r={abortedCount:n,abortedOnStartCount:i,xhrCount:a,fetchCount:t.size-a,oldestRequestAge:s,oldestRequestEndAge:s-e.duration,withoutMatchingEntryCount:o}}ea(`Too many requests`,r)}t.delete(e)}});return{getMatchingRequest(e){let n=1/0,r;for(let i of t){let t=e.startTime-i.startClocks.relative;0<=t&&t<n&&i.url===e.name&&(n=Math.abs(t),r=i)}return r&&t.delete(r),r},stop(){r.unsubscribe()}}}function qu(e,t){function n(e,n={},r=P()){let i=n.resourceKey??e;t.start(i,r,{url:e,...n})}function r(n,r={},i=P()){let a=r.resourceKey??n,o=t.stop(a,i,{context:r.context,type:r.type});if(!o)return;let s=F(o.startClocks.relative,i.relative),c={date:o.startClocks.timeStamp,type:Z.RESOURCE,resource:{id:o.id,type:o.type||X.OTHER,url:qs(o.url),duration:A(s),method:o.method,status_code:r.statusCode,size:r.size},_dd:{},context:o.context};e.notify(12,{rawRumEvent:c,startClocks:o.startClocks,duration:s,domainContext:{isManual:!0}})}return{startResource:n,stopResource:r}}function Ju(e,t,n){let r=z(no)(),i,a=t.trackEarlyRequests;a?i=Ku(e):e.subscribe(8,e=>{s(()=>Yu(e,t,n))});let o=Ac(t,{type:Q.RESOURCE,buffered:!0}).subscribe(e=>{for(let r of e)(a||!Ps(r))&&s(()=>Xu(r,t,n,i))});z(Gu)(t,e=>{s(()=>Xu(e,t,n,i))});function s(t){r.push(()=>{let n=t();n&&e.notify(12,n)})}let c=Dl(e),l=qu(e,c);return{startResource:l.startResource,stopResource:l.stopResource,stop:()=>{r.stop(),o.unsubscribe(),c.stopAll()}}}function Yu(e,t,n){return Zu(Au(e),e,n,t)}function Xu(e,t,n,r){return Zu(e,Ps(e)&&r?r.getMatchingRequest(e):void 0,n,t)}function Zu(e,t,n,r){if(!e&&!t)return;let i=t?nd(t,r):rd(e,r);if(!r.trackResources&&!i)return;let a=e?k(e.startTime):t.startClocks,o=e?Fs(e):id(n,a,t.duration),s=t&&Qu(t,r),c=e&&$u(e);return{startClocks:a,duration:o,rawRumEvent:ni({date:a.timeStamp,resource:{id:L(),duration:A(o),type:t?t.type===To.XHR?X.XHR:X.FETCH:Ms(e),method:t?t.method:void 0,status_code:t?t.status:ad(e.responseStatus),url:t?qs(t.url):e.name,protocol:e&&Vs(e),delivery_type:e&&Hs(e),graphql:s,response:c},type:Z.RESOURCE,_dd:{discarded:!r.trackResources}},i,e&&td(e)),domainContext:ed(e,t)}}function Qu(e,t){let n=cc(e.url,t);if(n)return oc(e,n)}function $u(e){let t=e.contentType;if(t)return{headers:{"content-type":t}}}function ed(e,t){if(t){let n={performanceEntry:e,isAborted:t.isAborted,handlingStack:t.handlingStack};return t.type===To.XHR?{xhr:t.xhr,...n}:{requestInput:t.input,requestInit:t.init,response:t.response,error:t.error,...n}}return{performanceEntry:e}}function td(e){let{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...Us(e),...Is(e)}}}function nd(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 rd(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Qs().toString(),rule_psr:t.rulePsr}}}function id(e,t,n){return e.wasInPageStateDuringPeriod(`frozen`,t.relative,n)?void 0:n}function ad(e){return e===0?void 0:e}function od(e,t,n){let{stop:r,eventCounts:i}=Tl({lifeCycle:e,isChildEvent:e=>e.view.id===t,onChange:n});return{stop:r,eventCounts:i}}var sd=10*O;function cd(e,t,n){return{stop:Ac(e,{type:Q.PAINT,buffered:!0}).subscribe(e=>{let r=e.find(e=>e.name===`first-contentful-paint`&&e.startTime<t.timeStamp&&e.startTime<sd);r&&n(r.startTime)}).unsubscribe}}function ld(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>
6{t(F(e,N()))})})}function ud(e,t,n){let r=Ac(e,{type:Q.FIRST_INPUT,buffered:!0}).subscribe(r=>{let i=r.find(e=>e.startTime<t.timeStamp);if(i){let t=F(i.startTime,i.processingStart),r;i.target&&Sc(i.target)&&(r=qc(i.target,e.actionNameAttribute)),n({delay:t>=0?t:0,time:i.startTime,targetSelector:r})}});return{stop:()=>{r.unsubscribe()}}}function dd(e,t){return md(e,()=>{let e=z(Bu)();pd(e)||t(fd(e))})}function fd(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:Hu(e)}}function pd(e){return e.loadEventEnd<=0}function md(e,t){let n,{stop:r}=La(e,`complete`,()=>{n=w(()=>t())});return{stop:()=>{r(),T(n)}}}var hd=10*O;function gd(e,t,n,r){let i=1/0,{stop:a}=zr(e,n,[`pointerdown`,`keydown`],e=>{i=e.timeStamp},{capture:!0,once:!0}),o=0,s=Ac(e,{type:Q.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(n=>{let a=Ze(n,e=>e.entryType===Q.LARGEST_CONTENTFUL_PAINT&&e.startTime<i&&e.startTime<t.timeStamp&&e.startTime<hd&&e.size>o);if(a){let t;a.element&&(t=qc(a.element,e.actionNameAttribute));let n=_d(a),i=a.startTime,s=vd(n,i);r({value:i,targetSelector:t,resourceUrl:n,subParts:s}),o=a.size}});return{stop:()=>{a(),s.unsubscribe()}}}function _d(e){return e.url===``?void 0:e.url}function vd(e,t){let n=Hu(Bu());if(n===void 0)return;let r=e?Wu(e,t):void 0,i=r?Math.max(n,r.requestStart||r.startTime):n,a=Math.min(t,Math.max(i,r?.responseEnd||0));return{loadDelay:i-n,loadTime:a-i,renderDelay:t-a}}function yd(e,t,n=window){if(document.visibilityState===`hidden`)return{timeStamp:0,stop:I};if(Pc(Q.VISIBILITY_STATE)){let e=performance.getEntriesByType(Q.VISIBILITY_STATE).filter(e=>e.name===`hidden`).find(e=>e.startTime>=t.relative);if(e)return{timeStamp:e.startTime,stop:I}}let r=1/0,{stop:i}=zr(e,n,[`pagehide`,`visibilitychange`],e=>{(e.type===`pagehide`||document.visibilityState===`hidden`)&&(r=e.timeStamp,i())},{capture:!0});return{get timeStamp(){return r},stop:i}}function bd(e,t,n,r){let i={},{stop:a}=dd(e,e=>{n(e.loadEvent),i.navigationTimings=e,r()}),o=yd(e,t),{stop:s}=cd(e,o,e=>{i.firstContentfulPaint=e,r()}),{stop:c}=gd(e,o,window,e=>{i.largestContentfulPaint=e,r()}),{stop:l}=ud(e,o,e=>{i.firstInput=e,r()});function u(){a(),s(),c(),l(),o.stop()}return{stop:u,initialViewMetrics:i}}var xd=(e,t)=>e*t,Sd=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return n>=i||r>=a?0:xd(i-n,a-r)},Cd=e=>{let t=xd(e.previousRect.width,e.previousRect.height),n=xd(e.currentRect.width,e.currentRect.height),r=Sd(e.previousRect,e.currentRect);return t+n-r};function wd(e,t,n){if(!Ad())return{stop:I};let r=0,i;n({value:0});let a=kd(),o=Ac(e,{type:Q.LAYOUT_SHIFT,buffered:!0}).subscribe(o=>{for(let s of o){if(s.hadRecentInput||s.startTime<t)continue;let{cumulatedValue:o,isMaxValue:c}=a.update(s);if(c){let e=Td(s.sources);i={target:e?.node?new WeakRef(e.node):void 0,time:F(t,s.startTime),previousRect:e?.previousRect,currentRect:e?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(o>r){r=o;let t=(i?.target)?.deref();n({value:u(r,4),targetSelector:t&&qc(t,e.actionNameAttribute),time:i?.time,previousRect:i?.previousRect?Ed(i.previousRect):void 0,currentRect:i?.currentRect?Ed(i.currentRect):void 0,devicePixelRatio:i?.devicePixelRatio})}}});return{stop:()=>{o.unsubscribe()}}}function Td(e){let t;for(let n of e)if(n.node&&Sc(n.node)){let e=Cd(n);(!t||Cd(t)<e)&&(t=n)}return t}function Ed({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}var Dd=5*D,Od=D;function kd(){let e=0,t,n,r=0;return{update:i=>{let a=t===void 0||i.startTime-n>=Od||i.startTime-t>=Dd,o;return a?(t=n=i.startTime,r=e=i.value,o=!0):(e+=i.value,n=i.startTime,o=i.value>r,o&&(r=i.value)),{cumulatedValue:e,isMaxValue:o}}}}function Ad(){return Pc(Q.LAYOUT_SHIFT)&&`WeakRef`in window}var jd,Md=0,Nd=1/0,Pd=0;function Fd(){`interactionCount`in performance||jd||(jd=new window.PerformanceObserver(S(e=>{e.getEntries().forEach(e=>{let t=e;t.interactionId&&(Nd=Math.min(Nd,t.interactionId),Pd=Math.max(Pd,t.interactionId),Md=(Pd-Nd)/7+1)})})),jd.observe({type:`event`,buffered:!0,durationThreshold:0}))}var Id=()=>jd?Md:window.performance.interactionCount||0,Ld=10,Rd=1*O,zd=8;
6function Bd(e,t,n){if(!Wd())return{getInteractionToNextPaint:()=>void 0,setViewEnd:I,stop:I};let r=1/0,i,{getViewInteractionCount:a,stopViewInteractionCount:o}=Hd(n),s=Vd(a),c=V(B.INP_SUBPARTS)?Ud(s):null,l=Ac(e,{type:Q.FIRST_INPUT,buffered:!0}).subscribe(d),u=Ac(e,{type:Q.EVENT,durationThreshold:40,buffered:!0}).subscribe(d);function d(e){for(let n of e)n.interactionId&&n.startTime>=t&&n.startTime<=r&&(s.process(n),c?.process(n));c?.pruneUntracked();let n=s.estimateP98Interaction();n&&f(n)}function f(n){let r=F(t,n.startTime);if(!i||n.duration!==i.duration||r!==i.startTime){let t=uu(n.startTime);!t&&n.target&&Sc(n.target)&&(t=qc(n.target,e.actionNameAttribute)),i={duration:n.duration,startTime:r,targetSelector:t}}c&&(i.subParts=c.computeSubParts(n,Gd(i.duration)))}return{getInteractionToNextPaint:()=>{if(i)return{value:Gd(i.duration),targetSelector:i.targetSelector,time:i.startTime,subParts:i.subParts};if(a())return{value:0}},setViewEnd:e=>{r=e,o()},stop:()=>{u.unsubscribe(),l.unsubscribe(),c?.stop()}}}function Vd(e){let t=[];function n(){t.sort((e,t)=>t.duration-e.duration).splice(Ld)}return{process(e){let r=t.findIndex(t=>e.interactionId===t.interactionId),i=t[t.length-1];r===-1?(t.length<Ld||e.duration>i.duration)&&(t.push(e),n()):e.duration>t[r].duration&&(t[r]=e,n())},estimateP98Interaction(){return t[Math.min(t.length-1,Math.floor(e()/50))]},isTracked(e){return t.some(t=>t.interactionId===e)}}}function Hd(e){Fd();let t=e===Ao.INITIAL_LOAD?0:Id(),n={stopped:!1};function r(){return Id()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function Ud(e){let t=new Map;function n(e,t){e.startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd)}return{process(e){if(e.interactionId===void 0||!e.processingStart||!e.processingEnd)return;let r=e.startTime+e.duration,i=t.get(e.interactionId);if(i){n(i,e);return}for(let[,i]of t.entries())if(Math.abs(r-i.referenceRenderTime)<=zd){n(i,e),t.set(e.interactionId,i);return}t.set(e.interactionId,{startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,referenceRenderTime:r})},pruneUntracked(){for(let[n]of t)e.isTracked(n)||t.delete(n)},computeSubParts(e,n){if(!e.processingStart||!e.processingEnd||e.interactionId===void 0)return;let r=t.get(e.interactionId);if(!r)return;let i=Math.max(r.startTime+n,r.processingStart),a=Math.min(r.processingEnd,i);return{inputDelay:F(r.startTime,r.processingStart),processingDuration:F(r.processingStart,a),presentationDelay:F(a,i)}},stop(){t.clear()}}}function Wd(){return Pc(Q.EVENT)&&window.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype}function Gd(e){return Math.min(e,Rd)}function Kd(e,t,n,r,i,a,o){let s=i===Ao.INITIAL_LOAD,c=!0,l=[],u=yd(r,a);function d(){if(!c&&!s&&l.length>0){let e=Math.max(...l);e<u.timeStamp-a.relative&&o(e)}}let{stop:f}=Lc(e,t,n,r,e=>{c&&(c=!1,e.hadActivity&&l.push(F(a.timeStamp,e.end)),d())});return{stop:()=>{f(),u.stop()},setLoadEvent:e=>{s&&(s=!1,l.push(e),d())}}}function qd(){let e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:window.scrollX===void 0?window.pageXOffset||0:window.scrollX,Math.round(e)}function Jd(){let e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:window.scrollY===void 0?window.pageYOffset||0:window.scrollY,Math.round(e)}var Yd;function Xd(e){return Yd||=Zd(e),Yd}function Zd(e){return new E(t=>{let{throttled:n}=Ce(()=>{t.notify(Qd())},200);return W(e,window,`resize`,n,{capture:!0,passive:!0}).stop})}function Qd(){let 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)}}var $d=D;function ef(e,t,n,r=nf(e)){let i=0,a=0,o=0,s=r.subscribe(({scrollDepth:e,scrollTop:r,scrollHeight:s})=>{let c=!1;if(e>i&&(i=e,c=!0),s>a){a=s;let e=N();o=F(t.relative,e),c=!0}c&&n({maxDepth:Math.min(i,a),maxDepthScrollTop:r,maxScrollHeight:a,maxScrollHeightTime:o})});return{stop:()=>s.unsubscribe()}}function tf(){let e=Jd(),{height:t}=Qd();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}
6function nf(e,t=$d){return new E(n=>{function r(){n.notify(tf())}if(window.ResizeObserver){let n=Ce(r,t,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,a=new ResizeObserver(S(n.throttled));i&&a.observe(i);let o=W(e,window,`scroll`,n.throttled,{passive:!0});return()=>{n.cancel(),a.disconnect(),o.stop()}}})}function rf(e,t,n,r,i,a,o){let s={},c=!1,l=!1,{stop:u,setLoadEvent:d}=Kd(e,t,n,r,a,o,e=>{c||(s.loadingTime=e,i())}),{stop:f}=ef(r,o,e=>{s.scroll=e}),{stop:p}=wd(r,o.relative,e=>{s.cumulativeLayoutShift=e,i()}),{stop:m,getInteractionToNextPaint:h,setViewEnd:g}=Bd(r,o.relative,a);return{stop:()=>{u(),p(),f()},stopINPTracking:m,setLoadEvent:d,setViewEnd:e=>{l=!0,g(e)},getCommonViewMetrics:()=>(s.interactionToNextPaint=h(),s),setLoadingTime:e=>{if(l)return;let t=F(o.timeStamp,e??M());c||u(),c=!0,s.loadingTime=t,i()}}}function af(e,t){let{stop:n}=W(e,window,`pageshow`,e=>{e.persisted&&t(e)},{capture:!0});return n}function of(e,t,n){ld(e.relative,e=>{t.firstContentfulPaint=e,t.largestContentfulPaint={value:e},n()})}var sf=3e3,cf=5*O,lf=5*O;function uf(e,t,n,r,i,a,o){let s=new Set,c=d(Ao.INITIAL_LOAD,ge(),o),l;f();let u;a&&(u=p(i),r.trackBfcacheViews&&(l=af(r,e=>{c.end();let t=k(e.timeStamp);c=d(Ao.BF_CACHE,t,void 0)})));function d(i,a,o){let c=df(e,t,n,r,i,a,o);return s.add(c),c.stopObservable.subscribe(()=>{s.delete(c)}),c}function f(){e.subscribe(10,()=>{c=d(Ao.ROUTE_CHANGE,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),e.subscribe(9,()=>{c.end({sessionIsActive:!1})})}function p(e){return e.subscribe(({oldLocation:e,newLocation:t})=>{pf(e,t)&&(c.end(),c=d(Ao.ROUTE_CHANGE))})}return{addTiming:(e,t=M())=>{c.addTiming(e,t)},setLoadingTime:e=>c.setLoadingTime(e),startView:(e,t)=>{c.end({endClocks:t}),c=d(Ao.ROUTE_CHANGE,t,e)},setViewContext:e=>{c.contextManager.setContext(e)},setViewContextProperty:(e,t)=>{c.contextManager.setContextProperty(e,t)},setViewName:e=>{c.setViewName(e)},getViewContext:()=>c.contextManager.getContext(),stop:()=>
6{u&&u.unsubscribe(),l&&l(),c.end(),s.forEach(e=>e.stop())}}}function df(e,t,n,r,i,a=P(),o){let s=L(),c=new E,l={},u=0,d,f=m(z(window.location)),p=mo(),h=!0,g=o?.name,_=o?.service||r.service,v=o?.version||r.version,y=o?.context,b=o?.handlingStack;y&&p.setContext(y);let x={id:s,name:g,startClocks:a,service:_,version:v,context:y,url:o?.url};e.notify(1,x),e.notify(2,x);let{throttled:ee,cancel:te}=Ce(k,sf,{leading:!1}),{setLoadEvent:ne,setViewEnd:re,stop:S,stopINPTracking:C,getCommonViewMetrics:ie,setLoadingTime:ae}=rf(e,t,n,r,fe,i,a),{stop:T,initialViewMetrics:ce}=i===Ao.INITIAL_LOAD?bd(r,a,ne,fe):{stop:I,initialViewMetrics:{}};i===Ao.BF_CACHE&&of(a,ce,fe);let{stop:le,eventCounts:ue}=od(e,s,fe),D=oe(k,cf),O=e.subscribe(11,e=>{e.reason===Ai.UNLOADING&&k()});k(),p.changeObservable.subscribe(fe);function de(){e.notify(3,{id:s,name:g,context:p.getContext(),startClocks:a,sessionIsActive:h})}function fe(){de(),ee()}function k(){te(),de(),u+=1;let t=d===void 0?M():d.timeStamp;e.notify(4,{customTimings:l,documentVersion:u,id:s,name:g,service:_,version:v,context:p.getContext(),loadingType:i,location:f,handlingStack:b,startClocks:a,commonViewMetrics:ie(),initialViewMetrics:ce,duration:F(a.timeStamp,t),isActive:d===void 0,sessionIsActive:h,eventCounts:ue})}return{get name(){return g},service:_,version:v,contextManager:p,stopObservable:c,end(t={}){d||(d=t.endClocks??P(),h=t.sessionIsActive??!0,e.notify(5,{endClocks:d}),e.notify(6,{endClocks:d}),se(D),re(d.relative),S(),O.unsubscribe(),k(),w(()=>{this.stop()},lf))},stop(){T(),le(),C(),c.notify()},addTiming(e,t){if(d)return;let n=be(t)?t:F(a.timeStamp,t);l[ff(e)]=n,fe()},setLoadingTime:ae,setViewName(e){g=e,k()}}}function ff(e){let t=e.replace(/[^a-zA-Z0-9-_.@$]/g,`_`);return t!==e&&i.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function pf(e,t){return e.pathname!==t.pathname||!mf(t.hash)&&hf(t.hash)!==hf(e.hash)}function mf(e){let t=e.substring(1);return t!==``&&!!document.getElementById(t)}function hf(e){let t=e.indexOf(`?`);return t<0?e:e.slice(0,t)}function gf(e,t,n,r,i,a,o,s,c){return e.subscribe(4,t=>e.notify(12,_f(t,n,o))),t.register(0,({startTime:e,eventType:t})=>{let n=s.findView(e);return n?{type:t,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:Bi}),t.register(1,({startTime:e})=>({view:{id:s.findView(e)?.id}})),uf(e,r,i,n,a,!n.trackViewsManually,c)}function _f(e,t,n){let r=n.getReplayStats(e.id),i=e.commonViewMetrics?.cumulativeLayoutShift?.devicePixelRatio,a={_dd:{document_version:e.documentVersion,replay_stats:r,cls:i?{device_pixel_ratio:i}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:Z.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_time:A(e.commonViewMetrics.cumulativeLayoutShift?.time),cumulative_layout_shift_target_selector:e.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:A(e.initialViewMetrics.navigationTimings?.firstByte),dom_complete:A(e.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:A(e.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:A(e.initialViewMetrics.navigationTimings?.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:A(e.initialViewMetrics.firstContentfulPaint),first_input_delay:A(e.initialViewMetrics.firstInput?.delay),first_input_time:A(e.initialViewMetrics.firstInput?.time),first_input_target_selector:e.initialViewMetrics.firstInput?.targetSelector,interaction_to_next_paint:A(e.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_time:A(e.commonViewMetrics.interactionToNextPaint?.time),interaction_to_next_paint_target_selector:e.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:A(e.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:e.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:A(e.initialViewMetrics.navigationTimings?.loadEvent),loading_time:yc(A(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:vf(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:A(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:A(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:Oo()}};return g(e.customTimings)||(a.view.custom_timings=_(e.customTimings,A)),{rawRumEvent:a,startClocks:e.startClocks,duration:e.duration,domainContext:{location:e.location,handlingStack:e.handlingStack}}}function vf({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:i}){return{cls:e&&{score:e.value,timestamp:A(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:A(n)},fid:r&&{duration:A(r.delay),timestamp:A(r.time),target_selector:r.targetSelector},inp:t&&{duration:A(t.value),timestamp:A(t.time),target_selector:t.targetSelector,sub_parts:t.subParts?{input_delay:A(t.subParts.inputDelay),processing_duration:A(t.subParts.processingDuration),presentation_delay:A(t.subParts.presentationDelay)}:void 0},lcp:i&&{timestamp:A(i.value),target_selector:i.targetSelector,resource_url:i.resourceUrl,sub_parts:i.subParts?{load_delay:A(i.subParts.loadDelay),load_time:A(i.subParts.loadTime),render_delay:A(i.subParts.renderDelay)}:void 0}}}function yf(e,t,n){let r=Da(e,`rum`,t=>xf(e,t),n);return r.expireObservable.subscribe(()=>{t.notify(9)}
6),r.renewObservable.subscribe(()=>{t.notify(10)}),r.sessionStateUpdateObservable.subscribe(({previousState:e,newState:t})=>{if(!e.forcedReplay&&t.forcedReplay){let e=r.findSession();e&&(e.isReplayForced=!0)}}),{findTrackedSession:e=>{let t=r.findSession(e);if(!(!t||t.trackingType===`0`))return{id:t.id,sessionReplay:t.trackingType===`1`?1:t.isReplayForced?2:0,anonymousId:t.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:`1`})}}function bf(){let e={id:`00000000-aaaa-0000-aaaa-000000000000`,sessionReplay:+!!Di(`records`)};return{findTrackedSession:()=>e,expire:I,expireObservable:new E,setForcedReplay:I}}function xf(e,t){return Sf(t)?t:l(e.sessionSampleRate)?l(e.sessionReplaySampleRate)?`1`:`2`:`0`}function Sf(e){return e===`0`||e===`1`||e===`2`}function Cf(e,t,n,r,i,a){let o=[e.rumEndpointBuilder];e.replica&&o.push(e.replica.rumEndpointBuilder);let s=Pi({encoder:a(2),request:xi(o,n),flushController:Ri({pageMayExitObservable:r,sessionExpireObservable:i})});return t.subscribe(13,e=>{e.type===Z.VIEW?s.upsert(e,e.view.id):s.add(e)}),s}function wf(e){let t=Ei();e.subscribe(13,e=>{t.send(`rum`,e)})}var Tf=et;function Ef(e,t,n){let r=pa({expireDelay:Tf}),i;e.subscribe(1,({startClocks:e,url:t})=>{let n=z(location).href,a=t===void 0?n:Le(t,n).href;r.add(o({url:a,referrer:i||document.referrer}),e.relative),i=a}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)});let a=n.subscribe(({newLocation:e})=>{let t=r.find();if(t){let n=N();r.closeActive(n),r.add(o({url:e.href,referrer:t.referrer}),n)}});function o({url:e,referrer:t}){return{url:e,referrer:t}}return t.register(0,({startTime:e,eventType:t})=>{let n=r.find(e);return n?{type:t,view:{url:n.url,referrer:n.referrer}}:Bi}),{findUrl:e=>r.find(e),stop:()=>{a.unsubscribe(),r.stop()}}}function Df(e){let t=m(location);return new E(n=>{let{stop:r}=Of(e,a),{stop:i}=kf(e,a);function a(){if(t.href===location.href)return;let e=m(location);n.notify({newLocation:e,oldLocation:t}),t=e}return()=>{r(),i()}})}function Of(e,t){let{stop:n}=H(Af(`pushState`),`pushState`,({onPostCall:e})=>{e(t)}),{stop:r}=H(Af(`replaceState`),`replaceState`,({onPostCall:e})=>{e(t)}),{stop:i}=W(e,window,`popstate`,t);return{stop:()=>{n(),r(),i()}}}function kf(e,t){return W(e,window,`hashchange`,t)}function Af(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}var jf=et;function Mf(e,t,n){let r=pa({expireDelay:jf});return e.subscribe(1,({startClocks:e})=>{r.add({},e.relative)}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)}),t.register(0,({startTime:e,eventType:t})=>{if(!n.trackFeatureFlagsForEvents.concat([Z.VIEW,Z.ERROR]).includes(t))return G;let i=r.find(e);return!i||g(i)?G:{type:t,feature_flags:i}}),{addFeatureFlagEvaluation:(e,t)=>{let n=r.find();n&&(n[e]=t)}}}var Nf=10*D,Pf,Ff;function If(e,t,n){e.metricsEnabled&&(Bf(),Ff=!1,t.subscribe(13,()=>{Ff=!0}),n.subscribe(({bytesCount:e,messagesCount:t})=>{Ff&&(Ff=!1,Pf.batchCount+=1,zf(Pf.batchBytesCount,e),zf(Pf.batchMessagesCount,t))}),oe(Lf,Nf))}function Lf(){Pf.batchCount!==0&&(ra(`Customer data measures`,Pf),Bf())}function Rf(){return{min:1/0,max:0,sum:0}}function zf(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function Bf(){Pf={batchCount:0,batchBytesCount:Rf(),batchMessagesCount:Rf()}}var Vf=4e3,Hf=et;function Uf(e,t,n=500){let r=pa({expireDelay:Hf,maxEntries:Vf}),i;Pc(Q.VISIBILITY_STATE)&&performance.getEntriesByType(Q.VISIBILITY_STATE).forEach(e=>{o(e.name===`hidden`?`hidden`:`active`,e.startTime)}),o(Kf(),N());let{stop:a}=zr(t,window,[`pageshow`,`focus`,`blur`,`visibilitychange`,`resume`,`freeze`,`pagehide`],e=>{o(Gf(e),e.timeStamp)},{capture:!0});function o(e,t=N()){e!==i&&(i=e,r.closeActive(t),r.add({state:i,startTime:t},t))}function s(e,t,n){return r.findAll(t,n).some(t=>t.state===e)}return e.register(0,({startTime:e,duration:t=0,eventType:i})=>i===Z.VIEW?{type:i,_dd:{page_states:Wf(r.findAll(e,t),e,n)}}:i===Z.ACTION||i===Z.ERROR?{type:i,view:{in_foreground:s(`active`,e,0)}}:G),{wasInPageStateDuringPeriod:s,addPageState:o,stop:()=>{a(),r.stop()}}}function Wf(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:e,startTime:n})=>({state:e,start:A(F(t,n))}
6))}function Gf(e){return e.type===`freeze`?`frozen`:e.type===`pagehide`?e.persisted?`frozen`:`terminated`:Kf()}function Kf(){return document.visibilityState===`hidden`?`hidden`:document.hasFocus()?`active`:`passive`}function qf(e,t){let n,r=requestAnimationFrame(S(()=>{n=Qd()})),i=Xd(t).subscribe(e=>{n=e}).unsubscribe;return e.register(0,({eventType:e})=>({type:e,display:n?{viewport:n}:void 0})),{stop:()=>{i(),r&&cancelAnimationFrame(r)}}}function Jf(e,t){let n=window.cookieStore?Yf(e):Zf;return new E(e=>n(t,t=>e.notify(t)))}function Yf(e){return(t,n)=>W(e,window.cookieStore,`change`,e=>{let r=e.changed.find(e=>e.name===t)||e.deleted.find(e=>e.name===t);r&&n(r.value)}).stop}var Xf=D;function Zf(e,t){let n=Te(document.cookie,e),r=oe(()=>{let r=Te(document.cookie,e);r!==n&&(n=r,t(r))},Xf);return()=>{se(r)}}var Qf=`datadog-ci-visibility-test-execution-id`;function $f(e,t,n=Jf(e,Qf)){let r=We(`datadog-ci-visibility-test-execution-id`)||window.Cypress?.env(`traceId`),i=n.subscribe(e=>{r=e});return t.register(0,({eventType:e})=>typeof r==`string`?{type:e,session:{type:`ci_test`},ci_test:{test_execution_id:r}}:G),{stop:()=>{i.unsubscribe()}}}function ep(e,t){let n=Ac(t,{type:Pc(Q.LONG_ANIMATION_FRAME)?Q.LONG_ANIMATION_FRAME:Q.LONG_TASK,buffered:!0}).subscribe(n=>{for(let r of n){if(!t.trackLongTasks)break;let n=k(r.startTime),i=tp(r,n);e.notify(12,{rawRumEvent:i,startClocks:n,duration:r.duration,domainContext:{performanceEntry:r}})}});return{stop:()=>n.unsubscribe()}}function tp(e,t){let n=L(),r=A(e.duration),i={date:t.timeStamp,type:Z.LONG_TASK,_dd:{discarded:!1}};return e.entryType===Q.LONG_TASK?{...i,long_task:{id:n,entry_type:ko.LONG_TASK,duration:r}}:{...i,long_task:{id:n,entry_type:ko.LONG_ANIMATION_FRAME,duration:r,blocking_duration:A(e.blockingDuration),first_ui_event_timestamp:A(e.firstUIEventTimestamp),render_start:A(e.renderStart),style_and_layout_start:A(e.styleAndLayoutStart),start_time:A(e.startTime),scripts:e.scripts.map(e=>({duration:A(e.duration),pause_duration:A(e.pauseDuration),forced_style_and_layout_duration:A(e.forcedStyleAndLayoutDuration),start_time:A(e.startTime),execution_start:A(e.executionStart),source_url:e.sourceURL,source_function_name:e.sourceFunctionName,source_char_position:e.sourceCharPosition,invoker:e.invoker,invoker_type:e.invokerType,window_attribution:e.windowAttribution}))}}}function np(e){e.register(0,({eventType:e})=>xa()?{type:e,session:{type:`synthetics`},synthetics:{...ba(),injected:ya()}}:G)}function rp(e,t,n){let r=ti(e),i=n(r);return $e(t).forEach(([t,n])=>ip(e,r,t.split(/\.|(?=\[\])/),n)),i}function ip(e,t,n,r){let[i,...a]=n;if(i===`[]`){Array.isArray(e)&&Array.isArray(t)&&e.forEach((e,n)=>ip(e,t[n],a,r));return}if(!(!op(e)||!op(t))){if(a.length>0)return ip(e[i],t[i],a,r);ap(e,i,t[i],r)}}function ap(e,t,n,r){if(e[t]===n)return;let i=en(n);i===r?e[t]=U(n):r===`object`&&(i===`undefined`||i===`null`)&&(e[t]={})}function op(e){return en(e)===`object`}var sp={"view.name":`string`,"view.url":`string`,"view.referrer":`string`},cp={context:`object`},lp={service:`string`,version:`string`},up;function dp(e,t,n,r,i){up={[Z.VIEW]:{"view.performance.lcp.resource_url":`string`,...cp,...sp,...lp},[Z.ERROR]:{"error.message":`string`,"error.stack":`string`,"error.handling_stack":`string`,"error.resource.url":`string`,"error.fingerprint":`string`,...cp,...sp,...lp},[Z.RESOURCE]:{"resource.url":`string`,"resource.graphql.variables":`string`,...cp,...sp,...lp},[Z.ACTION]:{"action.target.name":`string`,...cp,...sp,...lp},[Z.LONG_TASK]:{"long_task.scripts[].source_url":`string`,"long_task.scripts[].invoker":`string`,...cp,...sp,...lp},[Z.VITAL]:{...cp,...sp,...lp}};let a={[Z.ERROR]:Ia(Z.ERROR,r,i),[Z.ACTION]:Ia(Z.ACTION,r,i),[Z.VITAL]:Ia(Z.VITAL,r,i)};t.subscribe(12,({startClocks:r,duration:i,rawRumEvent:o,domainContext:s})=>{let c=n.triggerHook(0,{eventType:o.type,rawRumEvent:o,domainContext:s,startTime:r.relative,duration:i});if(c===`DISCARDED`)return;let l=ni(c,o,{ddtags:Jr(e).join(`,`)});fp(l,e.beforeSend,s,a)&&(g(l.context)&&delete l.context,t.notify(13,l))})}function fp(e,t,n,r){if(t){let r=rp(e,up[e.type],e=>t(e,n));if(r===!1&&e.type!==Z.VIEW)return!1;r===!1&&i.warn(`Can't dismiss view events using beforeSend!`)}return!r[e.type]?.isLimitReached()}function pp(e,t,n,r){e.register(0,({eventType:e,startTime:i})=>{let a=t.findTrackedSession(i),o=r.findView(i);if(!a||!o)return Bi;let s,c,l;return e===Z.VIEW?(s=n.getReplayStats(o.id)?!0:void 0,c=a.sessionReplay===1,l=o.sessionIsActive?void 0:!1):s=n.isRecording()?!0:void 0,{type:e,session:{id:a.id,type:`user`,has_replay:s,sampled_for_replay:c,is_active:l}}}),e.register(1,({startTime:e})=>{let n=t.findTrackedSession(e);return n?{session:{id:n.id}}:G})}function mp(e){e.register(0,({eventType:e})=>({type:e,connectivity:ii()}))}function hp(e,t,n){e.register(0,({eventType:e})=>{let r=t.source;return{type:e,_dd:{format_version:2,drift:he(),configuration:{session_sample_rate:u(t.sessionSampleRate,3),session_replay_sample_rate:u(t.sessionReplaySampleRate,3),profiling_sample_rate:u(t.profilingSampleRate,3),trace_sample_rate:u(t.traceSampleRate,3),beta_encode_cookie_options:t.betaEncodeCookieOptions},browser_sdk_version:Oi()?`6.32.0`:void 0,sdk_name:n},application:{id:t.applicationId},date:M(),source:r}}),e.register(1,()=>({application:{id:t.applicationId}}))}function gp(e,t){e.register(1,()=>t.isGranted()?G:Bi)}var _p=[Z.ACTION,Z.ERROR,Z.LONG_TASK,Z.RESOURCE,Z.VITAL];function vp(e){return{addEvent:(t,n,r,i)=>
6{_p.includes(n.type)&&e.notify(12,{startClocks:k(t),rawRumEvent:n,domainContext:r,duration:i})}}}function yp(e,t){if(!t.metricsEnabled)return{stop:I};let{unsubscribe:n}=e.subscribe(4,({initialViewMetrics:e})=>{!e.largestContentfulPaint||!e.navigationTimings||(ra(`Initial view metrics`,{metrics:bp(e.largestContentfulPaint,e.navigationTimings)}),n())});return{stop:n}}function bp(e,t){return{lcp:{value:e.value},navigation:{domComplete:t.domComplete,domContentLoaded:t.domContentLoaded,domInteractive:t.domInteractive,firstByte:t.firstByte,loadEvent:t.loadEvent}}}function xp(e){let t=window,n=new Map;function r(){t.DD_SOURCE_CODE_CONTEXT&&=($e(t.DD_SOURCE_CODE_CONTEXT).forEach(([e,t])=>{let r=Rn({stack:e}).stack[0];if(!r.url){ta(`Source code context: missing frame url`,{stack:e});return}n.has(r.url)||n.set(r.url,t)}),{})}r(),e.register(0,({domainContext:e,rawRumEvent:t})=>{if(r(),n.size===0)return G;let i=Sp(e,t),a=i&&n.get(i);return a?{type:t.type,service:a.service,version:a.version}:G})}function Sp(e,t){if(t.type===`long_task`&&t.long_task.entry_type===`long-animation-frame`)return t.long_task.scripts[0]?.source_url;let n;return`handlingStack`in e&&(n=e.handlingStack),t.type===`error`&&t.error.stack&&(n=t.error.stack),Rn({stack:n}).stack[0]?.url}function Cp(e,t,n,r,i,a,o,s,c,l,u){let d=[],f=new Ds;f.subscribe(13,e=>$r(`rum`,e));let p=e=>{f.notify(14,{error:e}),ea(`Error reported to customer`,{"error.message":e.message})},m=ji(e),h=m.subscribe(e=>{f.notify(11,e)});d.push(()=>h.unsubscribe());let g=Oi()?bf():yf(e,f,a);if(Oi())wf(f);else{let t=Cf(e,f,p,m,g.expireObservable,i);d.push(()=>t.stop()),If(c,f,t.flushController.flushObservable)}gp(l,a);let{stop:_}=yp(f,c);d.push(_);let{stop:v,...y}=wp(f,l,e,g,t,r,o,s,u,p);return d.push(v),s.unbuffer(),d.push(()=>n.stop()),{...y,lifeCycle:f,session:g,stopSession:()=>g.expire(),telemetry:c,stop:()=>{d.forEach(e=>e())},hooks:l}}function wp(e,t,n,r,i,a,o,s,c,l){let u=[],d=Cs(),f=Df(n),{observable:p,stop:m}=Ts();u.push(m),hp(t,n,c);let h=Uf(t,n);u.push(()=>h.stop());let g=ks(e);u.push(()=>g.stop());let _=Ef(e,t,f);u.push(()=>_.stop());let v=Mf(e,t,n);pp(t,r,i,g),mp(t);let y=xo(t,n,`rum`,!0),b=Co(t,n,r,`rum`),x=yo(t,n,`rum`),ee=xu(e,t,d,p,n);u.push(ee.stop);let te=vp(e),ne=qf(t,n);u.push(ne.stop);let re=$f(n,t);u.push(re.stop),np(t),dp(n,e,t,l);let{addTiming:S,setLoadingTime:C,startView:ie,setViewName:ae,setViewContext:w,setViewContextProperty:T,getViewContext:oe,stop:se}=gf(e,t,n,d,p,f,i,g,a);xp(t),u.push(se);let ce=Ju(e,n,h);u.push(ce.stop);let{stop:E}=ep(e,n);u.push(E);let{addError:le}=Eu(e,n,s);hc(e,n,r,b,x);let ue=Fo(e,h,o),D=Es(n.applicationId,r,g,ee.actionContexts,_);return{addAction:ee.addAction,startAction:ee.startAction,stopAction:ee.stopAction,startResource:ce.startResource,stopResource:ce.stopResource,addEvent:te.addEvent,addError:le,addTiming:S,setLoadingTime:C,addFeatureFlagEvaluation:v.addFeatureFlagEvaluation,startView:ie,setViewContext:w,setViewContextProperty:T,getViewContext:oe,setViewName:ae,viewHistory:g,getInternalContext:D.get,startDurationVital:ue.startDurationVital,stopDurationVital:ue.stopDurationVital,addDurationVital:ue.addDurationVital,addOperationStepVital:ue.addOperationStepVital,globalContext:y,userContext:b,accountContext:x,stop:()=>u.forEach(e=>e())}}function Tp(e,t,n={}){let r=$t(),i=Po(),a=Do().observable,o=bs(n,r,i,(s,c,l,u,d)=>{let f=c&&n.createDeflateEncoder?e=>n.createDeflateEncoder(s,c,e):zi,p=z(Cp)(s,e,t,l,f,r,i,a,u,d,n.sdkName);return e.onRumStart(p.lifeCycle,s,p.session,p.viewHistory,c,p.telemetry),t.onRumStart(p.lifeCycle,p.hooks,s,p.session,p.viewHistory,f),o=Ep(o,p),Bo(s.plugins,`onRumStart`,{strategy:o,addEvent:p.addEvent,addError:p.addError}),p}),s=()=>o,c=Ir({init:e=>{let t=Error().stack;C(()=>o.init(e,c,t))},setTrackingConsent:S(e=>{r.update(e),K({feature:`set-tracking-consent`,tracking_consent:e})}),setViewName:S(e=>{o.setViewName(e),K({feature:`set-view-name`})}),setViewContext:S(e=>{o.setViewContext(e),K({feature:`set-view-context`})}),setViewContextProperty:S((e,t)=>{o.setViewContextProperty(e,t),K({feature:`set-view-context-property`})}),getViewContext:S(()=>(K({feature:`set-view-context-property`}),o.getViewContext())),getInternalContext:S(e=>o.getInternalContext(e)),getInitConfiguration:S(()=>ti(o.initConfiguration)),addAction:(e,t)=>{let n=ir(`action`);C(()=>{o.addAction({name:U(e),context:U(t),startClocks:P(),type:jo.CUSTOM,handlingStack:n}),K({feature:`add-action`})})},startAction:S((e,t)=>{o.initConfiguration&&!V(B.START_STOP_ACTION)||o.startAction(U(e),{type:U(t&&t.type),context:U(t&&t.context),actionKey:t&&t.actionKey})}),stopAction:S((e,t)=>{o.initConfiguration&&!V(B.START_STOP_ACTION)||o.stopAction(U(e),{type:U(t&&t.type),context:U(t&&t.context),actionKey:t&&t.actionKey})}),startResource:S((e,t)=>{o.initConfiguration&&!V(B.START_STOP_RESOURCE)||o.startResource(U(e),{type:U(t&&t.type),method:U(t&&t.method),context:U(t&&t.context),resourceKey:t&&t.resourceKey})}),stopResource:S((e,t)=>{o.initConfiguration&&!V(B.START_STOP_RESOURCE)||o.stopResource(U(e),{type:U(t&&t.type),statusCode:t&&t.statusCode,size:t&&t.size,context:U(t&&t.context),resourceKey:t&&t.resourceKey})}),addError:(e,t)=>
6{let n=ir(`error`);C(()=>{o.addError({error:e,handlingStack:n,context:U(t),startClocks:P()}),K({feature:`add-error`})})},addTiming:S((e,t)=>{o.addTiming(U(e),t)}),setViewLoadingTime:S(()=>{let e=M();o.setLoadingTime(e),K({feature:`addViewLoadingTime`})}),setGlobalContext:q(s,J.globalContext,Y.setContext,`set-global-context`),getGlobalContext:q(s,J.globalContext,Y.getContext,`get-global-context`),setGlobalContextProperty:q(s,J.globalContext,Y.setContextProperty,`set-global-context-property`),removeGlobalContextProperty:q(s,J.globalContext,Y.removeContextProperty,`remove-global-context-property`),clearGlobalContext:q(s,J.globalContext,Y.clearContext,`clear-global-context`),setUser:q(s,J.userContext,Y.setContext,`set-user`),getUser:q(s,J.userContext,Y.getContext,`get-user`),setUserProperty:q(s,J.userContext,Y.setContextProperty,`set-user-property`),removeUserProperty:q(s,J.userContext,Y.removeContextProperty,`remove-user-property`),clearUser:q(s,J.userContext,Y.clearContext,`clear-user`),setAccount:q(s,J.accountContext,Y.setContext,`set-account`),getAccount:q(s,J.accountContext,Y.getContext,`get-account`),setAccountProperty:q(s,J.accountContext,Y.setContextProperty,`set-account-property`),removeAccountProperty:q(s,J.accountContext,Y.removeContextProperty,`remove-account-property`),clearAccount:q(s,J.accountContext,Y.clearContext,`clear-account`),startView:e=>{let t=ir(`view`);C(()=>{let n=typeof e==`object`?e:{name:e};o.startView({...n,handlingStack:t}),K({feature:`start-view`})})},stopSession:S(()=>{o.stopSession(),K({feature:`stop-session`})}),addFeatureFlagEvaluation:S((e,t)=>{o.addFeatureFlagEvaluation(U(e),U(t)),K({feature:`add-feature-flag-evaluation`})}),getSessionReplayLink:S(()=>e.getSessionReplayLink()),startSessionReplayRecording:S(t=>{e.start(t),K({feature:`start-session-replay-recording`,force:t&&t.force})}),stopSessionReplayRecording:S(()=>e.stop()),addDurationVital:(e,t)=>{let n=ir(`vital`);C(()=>{K({feature:`add-duration-vital`}),o.addDurationVital({id:L(),name:U(e),type:No.DURATION,startClocks:pe(t.startTime),duration:t.duration,context:U(t&&t.context),description:U(t&&t.description),handlingStack:n})})},startDurationVital:(e,t)=>{let n=ir(`vital`);return C(()=>(K({feature:`start-duration-vital`}),o.startDurationVital(U(e),{context:U(t&&t.context),description:U(t&&t.description),handlingStack:n})))},stopDurationVital:S((e,t)=>{K({feature:`stop-duration-vital`}),o.stopDurationVital(typeof e==`string`?U(e):e,{context:U(t&&t.context),description:U(t&&t.description)})}),startFeatureOperation:(e,t)=>{let n=ir(`vital`);C(()=>{K({feature:`add-operation-step-vital`,action_type:`start`}),o.addOperationStepVital(e,`start`,{...t,handlingStack:n})})},succeedFeatureOperation:S((e,t)=>{K({feature:`add-operation-step-vital`,action_type:`succeed`}),o.addOperationStepVital(e,`end`,t)}),failFeatureOperation:S((e,t,n)=>{K({feature:`add-operation-step-vital`,action_type:`fail`}),o.addOperationStepVital(e,`end`,n,t)})});return c}function Ep(e,t){return{init:e=>{Rr(`DD_RUM`,e)},initConfiguration:e.initConfiguration,...t}}function Dp(e,{session:t,viewContext:n,errorType:r}){let i=t?t.id:`no-session-id`,a=[];return r!==void 0&&a.push(`error-type=${r}`),n&&(a.push(`seed=${n.id}`),a.push(`from=${n.startClocks.timeStamp}`)),`${Op(e)}${`/rum/replay/sessions/${i}`}?${a.join(`&`)}`}function Op(e){let t=e.site,n=e.subdomain||kp(e);return`https://${n?`${n}.`:``}${t}`}function kp(e){switch(e.site){case fn:case pn:return`app`;case dn:return`dd`;default:return}}function Ap(e,t,n,r){let i=xi([e.profilingEndpointBuilder],e=>{t.notify(14,{error:e}),ea(`Error reported to customer`,{"error.message":e.message})}),a=n(r);return{async send({event:e,...t}){let n=new FormData,r=pr(e);if(!r)throw Error(`Failed to serialize event`);n.append(`event`,new Blob([r],{type:`application/json`}),`event.json`);let o=r.length;for(let[e,r]of $e(t)){let t=pr(r);if(!t)throw Error(`Failed to serialize attachment`);let i=await jp(a,t);o+=i.outputBytesCount,n.append(e,new Blob([i.output]),e)}i.send({data:n,bytesCount:o})}}}function jp(e,t){return new Promise(n=>{e.write(t),e.finish(e=>{n(e)})})}export{z as $,$a as A,Ei as B,Cc as C,ws as D,qs as E,ra as F,zr as G,$r as H,G as I,H as J,Lr as K,Mi as L,pa as M,ea as N,Z as O,ta as P,V as Q,Di as R,Sc as S,Ys as T,Jr as U,xi as V,W,ir as X,sr as Y,B as Z,ll as _,ie as _t,Xd as a,D as at,Dc as b,i as bt,ml as c,ge as ct,hl as d,M as dt,et,vl as f,E as ft,cl as g,S as gt,$ as h,C as ht,Qd as i,
6Ce as it,Ra as j,ko as k,gl as l,he as lt,dl as m,w as mt,Dp as n,Ae as nt,qd as o,_e as ot,_l as p,T as pt,fr as q,Tp as r,I as rt,Jd as s,P as st,Ap as t,Le as tt,xl as u,F as ut,Q as v,v as vt,wc as w,Tc as x,Ec as y,a as yt,Oi as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.