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