import{T as Kc}from"./scheduler.CGo6JWbE.js";import{p as jc}from"./stores.CqruPkYV.js";import{g as Zc}from"./entry.B8PNKyfd.js";import{g as Ii}from"./currentUser.CSR2dvDc.js";import{A as Xc}from"./index.D8CqX5rI.js";import{e as No,a as Wc}from"./env.Bn3hLBzE.js";import{a as nr}from"./me.B1-c7Aj3.js";import{g as Jc}from"./_commonjsHelpers.Cpj98o6Y.js";import{D as ht}from"./module.D7FN3UBB.js";function Qc(){let e=sessionStorage.getItem("bunch-session-id");return e||(e=crypto.randomUUID(),sessionStorage.setItem("bunch-session-id",e)),e}class Mr{bunchSessionId=Qc()}var Ut={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},U=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Object.prototype.hasOwnProperty.call(Ut,e)||(e=Ut.log),U[e].apply(U,t)};U.debug=console.debug.bind(console);U.log=console.log.bind(console);U.info=console.info.bind(console);U.warn=console.warn.bind(console);U.error=console.error.bind(console);function ir(e){return e!==0&&Math.random()*100<=e}function Lo(e,t){return+e.toFixed(t)}function Qt(e){return fr(e)&&e>=0&&e<=100}function fr(e){return typeof e=="number"}var Ce=1e3,Te=60*Ce,Do=60*Te,ef=24*Do,tf=365*ef;function Ci(e){return{relative:e,timeStamp:rf(e)}}function rf(e){var t=Ye()-performance.now();return t>Ur()?Math.round(Gt(t,e)):af(e)}function nf(){return Math.round(Ye()-Gt(Ur(),performance.now()))}function te(e){return fr(e)?Lo(e*1e6,0):e}function Ye(){return new Date().getTime()}function ue(){return Ye()}function Pe(){return performance.now()}function Se(){return{relative:Pe(),timeStamp:ue()}}function Mo(){return{relative:0,timeStamp:Ur()}}function we(e,t){return t-e}function Gt(e,t){return e+t}function Uo(e){return e-Ur()}function af(e){return Math.round(Gt(Ur(),e))}function of(e){return e<tf}var Zn;function Ur(){return Zn===void 0&&(Zn=performance.timing.navigationStart),Zn}function ke(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,ke)}function _i(e,t){var r=new RegExp("(?:^|;)\\s*".concat(t,"\\s*=\\s*([^;]+)")),n=r.exec(e);return n?n[1]:void 0}function Po(e,t,r){r===void 0&&(r="");var n=e.charCodeAt(t-1),i=n>=55296&&n<=56319,o=i?t+1:t;return e.length<=o?e:"".concat(e.slice(0,o)).concat(r)}var Fa=Ce;function wn(e,t,r,n){var i=new Date;i.setTime(i.getTime()+r);var o="expires=".concat(i.toUTCString()),s=n&&n.crossSite?"none":"strict",u=n&&n.domain?";domain=".concat(n.domain):"",c=n&&n.secure?";secure":"";document.cookie="".concat(e,"=").concat(t,";").concat(o,";path=/;samesite=").concat(s).concat(u).concat(c)}function Ge(e){return _i(document.cookie,e)}function Oi(e,t){wn(e,"",0,t)}function sf(e){if(document.cookie===void 0||document.cookie===null)return!1;try{var t="dd_cookie_test_".concat(ke()),r="test";wn(t,r,Te,e);var n=Ge(t)===r;return Oi(t,e),n}catch(i){return U.error(i),!1}}var Xn;function uf(){if(Xn===void 0){for(var e="dd_site_test_".concat(ke()),t="test",r=window.location.hostname.split("."),n=r.pop();r.length&&!Ge(e);)n="".concat(r.pop(),".").concat(n),wn(e,t,Ce,{domain:n});Oi(e,{domain:n}),Xn=n}return Xn}function Fo(e,t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{return e.apply(void 0,r)}catch(i){U.error(t,i)}}}var Pt;(function(e){e.PAGEHIDE="pagehide",e.FEATURE_FLAGS="feature_flags",e.RESOURCE_PAGE_STATES="resource_page_states",e.COLLECT_FLUSH_REASON="collect_flush_reason"})(Pt||(Pt={}));var Ri=new Set;function cf(e){e.forEach(function(t){Ri.add(t)})}function Tn(e){return Ri.has(e)}function ff(){return Ri}var Ft=1024,Bo=1024*Ft,lf=/[^\u0000-\u007F]/;function ln(e){return lf.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function tt(e,t){return e.indexOf(t)!==-1}function zo(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach(function(n){return t.push(n)});else for(var r=0;r<e.length;r++)t.push(e[r]);return t}function Pr(e,t){for(var r=0;r<e.length;r+=1){var n=e[r];if(t(n,r))return n}}function df(e,t){for(var r=e.length-1;r>=0;r-=1){var n=e[r];if(t(n,r,e))return n}}function pf(e,t){Array.prototype.forEach.call(e,t)}function kn(e){return Object.keys(e).map(function(t){return e[t]})}function qo(e){return Object.keys(e).map(function(t){return[t,e[t]]})}function An(e,t){return e.slice(0,t.length)===t}function hf(e,t){return e.slice(-t.length)===t}function vf(e,t){return e.matches?e.matches(t):e.msMatchesSelector?e.msMatchesSelector(t):!1}function Ni(e){return window.CSS&&window.CSS.escape?window.CSS.escape(e):e.replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,r){return r?t==="\0"?"�":"".concat(t.slice(0,-1),"\\").concat(t.charCodeAt(t.length-1).toString(16)," "):"\\".concat(t)})}function V(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.forEach(function(n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}),e}function Nr(e){return V({},e)}function Ho(e,t){return Object.keys(e).some(function(r){return e[r]===t})}function Je(e){return Object.keys(e).length===0}function _f(e,t){for(var r={},n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];r[o]=t(e[o])}return r}function lr(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}function yt(e,t){var r=lr(),n;return r.Zone&&typeof r.Zone.__symbol__=="function"&&(n=e[r.Zone.__symbol__(t)]),n||(n=e[t]),n}var gf=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))},gi,Vo=!1;function mf(e){gi=e}function yf(e){Vo=e}function D(e){return function(){return bt(e,this,arguments)}}function bt(e,t,r){try{return e.apply(t,r)}catch(n){if(mi(Ut.error,n),gi)try{gi(n)}catch(i){mi(Ut.error,i)}}}function mi(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Vo&&U.apply(void 0,gf([e,"[MONITOR]"],t,!1))}function pe(e,t){return yt(lr(),"setTimeout")(D(e),t)}function Ve(e){yt(lr(),"clearTimeout")(e)}function Fr(e,t){return yt(window,"setInterval")(D(e),t)}function Li(e){yt(window,"clearInterval")(e)}function St(e,t,r){var n=r&&r.leading!==void 0?r.leading:!0,i=r&&r.trailing!==void 0?r.trailing:!0,o=!1,s,u;return{throttled:function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];if(o){s=c;return}n?e.apply(void 0,c):s=c,o=!0,u=pe(function(){i&&s&&e.apply(void 0,s),o=!1,s=void 0},t)},cancel:function(){Ve(u),o=!1,s=void 0}}}function re(){}function $t(e,t,r){if(typeof e!="object"||e===null)return JSON.stringify(e);var n=Wt(Object.prototype),i=Wt(Array.prototype),o=Wt(Object.getPrototypeOf(e)),s=Wt(e);try{return JSON.stringify(e,t,r)}catch{return"<error: unable to serialize object>"}finally{n(),i(),o(),s()}}function Wt(e){var t=e,r=t.toJSON;return r?(delete t.toJSON,function(){t.toJSON=r}):re}function dn(e){return Br(e,wf()).href}function bf(e){try{return!!Br(e)}catch{return!1}}function Ba(e){return Go(Br(e))}function Ef(e){var t=Br(e).pathname;return t[0]==="/"?t:"/".concat(t)}function Br(e,t){var r=Sf();if(r)try{return t!==void 0?new r(e,t):new r(e)}catch(s){throw new Error("Failed to construct URL: ".concat(String(s)," ").concat($t({url:e,base:t})))}if(t===void 0&&!/:/.test(e))throw new Error("Invalid URL: '".concat(e,"'"));var n=document,i=n.createElement("a");if(t!==void 0){n=document.implementation.createHTMLDocument("");var o=n.createElement("base");o.href=t,n.head.appendChild(o),n.body.appendChild(i)}return i.href=e,i}var za=URL,tn;function Sf(){if(tn===void 0)try{var e=new za("http://test/path");tn=e.href==="http://test/path"}catch{tn=!1}return tn?za:void 0}function wf(){return Go(window.location)}function Go(e){if(e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return"".concat(e.protocol,"//").concat(t)}var $o="datad0g.com",er="datadoghq.com",Tf="datadoghq.eu",kf="ap1.datadoghq.com",Af="ddog-gov.com",xf={logs:"logs",rum:"rum",sessionReplay:"session-replay"},If={logs:"logs",rum:"rum",sessionReplay:"replay"};function Ir(e,t,r){var n=Cf(e,t);return{build:function(i,o,s){var u=Rf(e,t,r,i,o,s);return n(u)},urlPrefix:n(""),endpointType:t}}function Cf(e,t){var r="/api/v2/".concat(If[t]),n=e.proxy,i=e.proxyUrl;if(n){var o=dn(n);return function(c){return"".concat(o,"?ddforward=").concat(encodeURIComponent("".concat(r,"?").concat(c)))}}var s=Of(e,t);if(n===void 0&&i){var u=dn(i);return function(c){return"".concat(u,"?ddforward=").concat(encodeURIComponent("https://".concat(s).concat(r,"?").concat(c)))}}return function(c){return"https://".concat(s).concat(r,"?").concat(c)}}function Of(e,t){var r=e.site,n=r===void 0?er:r,i=e.internalAnalyticsSubdomain;if(i&&n===er)return"".concat(i,".").concat(er);var o=n.split("."),s=o.pop(),u=n!==kf?"".concat(xf[t],"."):"";return"".concat(u,"browser-intake-").concat(o.join("-"),".").concat(s)}function Rf(e,t,r,n,i,o){var s=e.clientToken,u=e.internalAnalyticsSubdomain,c=["sdk_version:".concat("4.41.0"),"api:".concat(n)].concat(r);i&&Tn(Pt.COLLECT_FLUSH_REASON)&&c.push("flush_reason:".concat(i)),o&&c.push("retry_count:".concat(o.count),"retry_after:".concat(o.lastFailureStatus));var d=["ddsource=browser","ddtags=".concat(encodeURIComponent(c.join(","))),"dd-api-key=".concat(s),"dd-evp-origin-version=".concat(encodeURIComponent("4.41.0")),"dd-evp-origin=browser","dd-request-id=".concat(ke())];return t==="rum"&&d.push("batch_time=".concat(ue())),u&&d.reverse(),d.join("&")}var Nf=200;function Lf(e){var t=e.env,r=e.service,n=e.version,i=e.datacenter,o=[];return t&&o.push(rn("env",t)),r&&o.push(rn("service",r)),n&&o.push(rn("version",n)),i&&o.push(rn("datacenter",i)),o}var Df=/[^a-z0-9_:./-]/;function rn(e,t){var r=Nf-e.length-1;(t.length>r||Df.test(t))&&U.warn("".concat(e," value doesn't meet tag requirements and will be sanitized"));var n=t.replace(/,/g,"_");return"".concat(e,":").concat(n)}function Mf(e){var t=Lf(e),r=Uf(e,t),n=kn(r).map(function(o){return o.urlPrefix}),i=Pf(e,n,t);return V({isIntakeUrl:function(o){return n.some(function(s){return o.indexOf(s)===0})},replica:i,site:e.site||er},r)}function Uf(e,t){return{logsEndpointBuilder:Ir(e,"logs",t),rumEndpointBuilder:Ir(e,"rum",t),sessionReplayEndpointBuilder:Ir(e,"sessionReplay",t)}}function Pf(e,t,r){if(e.replica){var n=V({},e,{site:er,clientToken:e.replica.clientToken}),i={logsEndpointBuilder:Ir(n,"logs",r),rumEndpointBuilder:Ir(n,"rum",r)};return t.push.apply(t,kn(i).map(function(o){return o.urlPrefix})),V({applicationId:e.replica.applicationId},i)}}var Cr={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function Ff(e){var t,r,n;if(!e||!e.clientToken){U.error("Client Token is not configured, we will not send any data.");return}var i=(t=e.sessionSampleRate)!==null&&t!==void 0?t:e.sampleRate;if(i!==void 0&&!Qt(i)){U.error("Session Sample Rate should be a number between 0 and 100");return}if(e.telemetrySampleRate!==void 0&&!Qt(e.telemetrySampleRate)){U.error("Telemetry Sample Rate should be a number between 0 and 100");return}if(e.telemetryConfigurationSampleRate!==void 0&&!Qt(e.telemetryConfigurationSampleRate)){U.error("Telemetry Configuration Sample Rate should be a number between 0 and 100");return}return Array.isArray(e.enableExperimentalFeatures)&&cf(e.enableExperimentalFeatures.filter(function(o){return Ho(Pt,o)})),V({beforeSend:e.beforeSend&&Fo(e.beforeSend,"beforeSend threw an error:"),cookieOptions:Yo(e),sessionSampleRate:i??100,telemetrySampleRate:(r=e.telemetrySampleRate)!==null&&r!==void 0?r:20,telemetryConfigurationSampleRate:(n=e.telemetryConfigurationSampleRate)!==null&&n!==void 0?n:5,service:e.service,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16*Ft,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*Ce,batchMessagesLimit:50,messageBytesLimit:256*Ft},Mf(e))}function Yo(e){var t={};return t.secure=Bf(e),t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=uf()),t}function Bf(e){return!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie}function zf(e){var t,r,n=(t=e.proxy)!==null&&t!==void 0?t:e.proxyUrl;return{session_sample_rate:(r=e.sessionSampleRate)!==null&&r!==void 0?r:e.sampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,use_before_send:!!e.beforeSend,use_cross_site_session_cookie:e.useCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:n!==void 0?!!n:void 0,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_resources:e.trackResources,track_long_task:e.trackLongTasks}}var zr="?";function wt(e){var t=[],r=Wn(e,"stack"),n=String(e);return r&&An(r,n)&&(r=r.slice(n.length)),r&&r.split(`
`).forEach(function(i){var o=Vf(i)||$f(i)||Kf(i)||Xf(i);o&&(!o.func&&o.line&&(o.func=zr),t.push(o))}),{message:Wn(e,"message"),name:Wn(e,"name"),stack:t}}var Ko="((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",ar="(?::(\\d+))",qf=new RegExp("^\\s*at (.*?) ?\\(".concat(Ko).concat(ar,"?").concat(ar,"?\\)?\\s*$"),"i"),Hf=new RegExp("\\((\\S*)".concat(ar).concat(ar,"\\)"));function Vf(e){var t=qf.exec(e);if(t){var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Hf.exec(t[2]);return n&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||zr,line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}}var Gf=new RegExp("^\\s*at ?".concat(Ko).concat(ar,"?").concat(ar,"??\\s*$"),"i");function $f(e){var t=Gf.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:zr,line:t[2]?+t[2]:void 0,url:t[1]}}var Yf=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Kf(e){var t=Yf.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||zr,line:+t[3],url:t[2]}}var jf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Zf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Xf(e){var t=jf.exec(e);if(t){var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Zf.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||zr,line:t[4]?+t[4]:void 0,url:t[3]}}}function Wn(e,t){if(!(typeof e!="object"||!e||!(t in e))){var r=e[t];return typeof r=="string"?r:void 0}}function jo(e,t,r){var n=e[t],i=r(n),o=function(){if(typeof i=="function")return i.apply(this,arguments)};return e[t]=o,{stop:function(){e[t]===o?e[t]=n:i=n}}}function be(e,t,r){var n=r.before,i=r.after;return jo(e,t,function(o){return function(){var s=arguments,u;return n&&bt(n,this,s),typeof o=="function"&&(u=o.apply(this,s)),i&&bt(i,this,s),u}})}function wr(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(!n||!n.set||!n.configurable)return{stop:re};var i=function(s,u){pe(function(){r(s,u)},0)},o=function(s){n.set.call(this,s),i(this,s)};return Object.defineProperty(e,t,{set:o}),{stop:function(){var s;((s=Object.getOwnPropertyDescriptor(e,t))===null||s===void 0?void 0:s.set)===o?Object.defineProperty(e,t,n):i=re}}}var Wf=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Jf(e){var t=Qf(e).stop,r=el(e).stop;return{stop:function(){t(),r()}}}function Qf(e){return be(window,"onerror",{before:function(t,r,n,i,o){var s;if(o)s=wt(o),e(s,o);else{var u={url:r,column:i,line:n},c,d=t;if({}.toString.call(t)==="[object String]"){var h=Wf.exec(d);h&&(c=h[1],d=h[2])}s={name:c,message:typeof d=="string"?d:void 0,stack:[u]},e(s,t)}}})}function el(e){return be(window,"onunhandledrejection",{before:function(t){var r=t.reason||"Empty reason",n=wt(r);e(n,r)}})}var tl=220*Ft,rl="$",nl=3;function xe(e,t){var r;t===void 0&&(t=tl);var n=Wt(Object.prototype),i=Wt(Array.prototype),o=[],s=new WeakMap,u=Jn(e,rl,void 0,o,s),c=((r=JSON.stringify(u))===null||r===void 0?void 0:r.length)||0;if(c>t){Qn(t,"discarded",e);return}for(;o.length>0&&c<t;){var d=o.shift(),h=0;if(Array.isArray(d.source))for(var _=0;_<d.source.length;_++){var v=Jn(d.source[_],d.path,_,o,s);if(v!==void 0?c+=JSON.stringify(v).length:c+=4,c+=h,h=1,c>t){Qn(t,"truncated",e);break}d.target[_]=v}else for(var _ in d.source)if(Object.prototype.hasOwnProperty.call(d.source,_)){var v=Jn(d.source[_],d.path,_,o,s);if(v!==void 0&&(c+=JSON.stringify(v).length+h+_.length+nl,h=1),c>t){Qn(t,"truncated",e);break}d.target[_]=v}}return n(),i(),u}function Jn(e,t,r,n,i){var o=ol(e);if(!o||typeof o!="object")return il(o);var s=al(o);if(s!=="[Object]"&&s!=="[Array]")return s;var u=e;if(i.has(u))return"[Reference seen at ".concat(i.get(u),"]");var c=r!==void 0?"".concat(t,".").concat(r):t,d=Array.isArray(o)?[]:{};return i.set(u,c),n.push({source:o,target:d,path:c}),d}function il(e){return typeof e=="bigint"?"[BigInt] ".concat(e.toString()):typeof e=="function"?"[Function] ".concat(e.name||"unknown"):typeof e=="symbol"?"[Symbol] ".concat(e.description||e.toString()):e}function al(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e),r=t.match(/\[object (.*)\]/);if(r&&r[1])return"[".concat(r[1],"]")}catch{}return"[Unserializable]"}function ol(e){var t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function Qn(e,t,r){U.warn("The data provided has been ".concat(t," as it is over the limit of ").concat(e," characters:"),r)}var Zo="No stack, consider using an instance of Error";function Xo(e){var t=e.stackTrace,r=e.originalError,n=e.handlingStack,i=e.startClocks,o=e.nonErrorPrefix,s=e.source,u=e.handling;return!t||t.message===void 0&&!(r instanceof Error)?{startClocks:i,source:s,handling:u,originalError:r,message:"".concat(o," ").concat($t(xe(r))),stack:Zo,handlingStack:n,type:t&&t.name}:{startClocks:i,source:s,handling:u,originalError:r,message:t.message||"Empty message",stack:dr(t),handlingStack:n,type:t.name,causes:sl(r,s)}}function dr(e){var t=Wo(e);return e.stack.forEach(function(r){var n=r.func==="?"?"<anonymous>":r.func,i=r.args&&r.args.length>0?"(".concat(r.args.join(", "),")"):"",o=r.line?":".concat(r.line):"",s=r.line&&r.column?":".concat(r.column):"";t+=`
  at `.concat(n).concat(i," @ ").concat(r.url).concat(o).concat(s)}),t}function Wo(e){return"".concat(e.name||"Error",": ").concat(e.message)}function Jo(){var e=2,t=new Error,r;if(!t.stack)try{throw t}catch{}return bt(function(){var n=wt(t);n.stack=n.stack.slice(e),r=dr(n)}),r}function sl(e,t){for(var r=e,n=[];(r==null?void 0:r.cause)instanceof Error&&n.length<10;){var i=wt(r.cause);n.push({message:r.cause.message,source:t,type:i==null?void 0:i.name,stack:i&&dr(i)}),r=r.cause}return n.length?n:void 0}var pr={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function ul(e){return Jf(function(t,r){e.notify(Xo({stackTrace:t,originalError:r,startClocks:Se(),nonErrorPrefix:"Uncaught",source:pr.SOURCE,handling:"unhandled"}))})}function cl(e){var t=V({version:"4.41.0",onReady:function(r){r()}},e);return Object.defineProperty(t,"_setDebug",{get:function(){return yf},enumerable:!1}),t}function fl(e,t,r){var n=e[t];e[t]=r,n&&n.q&&n.q.forEach(function(i){return Fo(i,"onReady callback threw an error:")()})}var se=function(){function e(t){this.onFirstSubscribe=t,this.observers=[]}return e.prototype.subscribe=function(t){var r=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(t),{unsubscribe:function(){r.observers=r.observers.filter(function(n){return t!==n}),!r.observers.length&&r.onLastUnsubscribe&&r.onLastUnsubscribe()}}},e.prototype.notify=function(t){this.observers.forEach(function(r){return r(t)})},e}();function Qo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new se(function(){var n=e.map(function(i){return i.subscribe(function(o){return r.notify(o)})});return function(){return n.forEach(function(i){return i.unsubscribe()})}});return r}function ie(e,t,r,n){return ge(e,[t],r,n)}function ge(e,t,r,n){var i=n===void 0?{}:n,o=i.once,s=i.capture,u=i.passive,c=D(o?function(v){_(),r(v)}:r),d=u?{capture:s,passive:u}:s,h=yt(e,"addEventListener");t.forEach(function(v){return h.call(e,v,c,d)});function _(){var v=yt(e,"removeEventListener");t.forEach(function(y){return v.call(e,y,c,d)})}return{stop:_}}var or={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function ll(e){var t=[];tt(e,or.cspViolation)&&t.push(pl());var r=e.filter(function(n){return n!==or.cspViolation});return r.length&&t.push(dl(r)),Qo.apply(void 0,t)}function dl(e){var t=new se(function(){if(window.ReportingObserver){var r=D(function(i){return i.forEach(function(o){t.notify(hl(o))})}),n=new window.ReportingObserver(r,{types:e,buffered:!0});return n.observe(),function(){n.disconnect()}}});return t}function pl(){var e=new se(function(){var t=ie(document,"securitypolicyviolation",function(r){e.notify(vl(r))}).stop;return t});return e}function hl(e){var t=e.type,r=e.body;return{type:t,subtype:r.id,message:"".concat(t,": ").concat(r.message),stack:es(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)}}function vl(e){var t=or.cspViolation,r="'".concat(e.blockedURI,"' blocked by '").concat(e.effectiveDirective,"' directive");return{type:or.cspViolation,subtype:e.effectiveDirective,message:"".concat(t,": ").concat(r),stack:es(e.effectiveDirective,e.originalPolicy?"".concat(r,' of the policy "').concat(Po(e.originalPolicy,100,"..."),'"'):"no policy",e.sourceFile,e.lineNumber,e.columnNumber)}}function es(e,t,r,n,i){return r&&dr({name:e,message:t,stack:[{func:"?",url:r,line:n,column:i}]})}function pn(e,t){var r=window.__ddBrowserSdkExtensionCallback;r&&r({type:e,payload:t})}function Bt(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function hn(e,t,r){if(r===void 0&&(r=_l()),t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var n=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,n)}if(!r.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var i=Array.isArray(e)?e:[],o=0;o<t.length;++o)i[o]=hn(i[o],t[o],r);return i}var s=Bt(e)==="object"?e:{};for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(s[u]=hn(s[u],t[u],r));return s}}function Di(e){return hn(void 0,e)}function zt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n=0,i=e;n<i.length;n++){var o=i[n];o!=null&&(r=hn(r,o))}return r}function _l(){if(typeof WeakSet<"u"){var e=new WeakSet;return{hasAlreadyBeenSeen:function(r){var n=e.has(r);return n||e.add(r),n}}}var t=[];return{hasAlreadyBeenSeen:function(r){var n=t.indexOf(r)>=0;return n||t.push(r),n}}}var Mi={log:"log",configuration:"configuration"},gl=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","http://localhost","<anonymous>"],ml=[Af],qe={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1},yi;function yl(e,t){var r,n=new se;qe.telemetryEnabled=!tt(ml,t.site)&&ir(t.telemetrySampleRate),qe.telemetryConfigurationEnabled=qe.telemetryEnabled&&ir(t.telemetryConfigurationSampleRate),yi=function(o){if(qe.telemetryEnabled){var s=i(e,o);n.notify(s),pn("telemetry",s)}},mf(vn),V(qe,{maxEventsPerPage:t.maxTelemetryEventsPerPage,sentEventCount:0});function i(o,s){return zt({type:"telemetry",date:ue(),service:o,version:"4.41.0",source:"browser",_dd:{format_version:2},telemetry:s,experimental_features:zo(ff())},r!==void 0?r():{})}return{setContextProvider:function(o){r=o},observable:n,enabled:qe.telemetryEnabled}}function bl(e){return e.site===$o}function xn(e,t){mi(Ut.debug,e,t),Ui(V({type:Mi.log,message:e,status:"debug"},t))}function vn(e){Ui(V({type:Mi.log,status:"error"},Sl(e)))}function El(e){qe.telemetryConfigurationEnabled&&Ui({type:Mi.configuration,configuration:e})}function Ui(e){yi&&qe.sentEventCount<qe.maxEventsPerPage&&(qe.sentEventCount+=1,yi(e))}function Sl(e){if(e instanceof Error){var t=wt(e);return{error:{kind:t.name,stack:dr(wl(t))},message:t.message}}return{error:{stack:Zo},message:"".concat("Uncaught"," ").concat($t(e))}}function wl(e){return e.stack=e.stack.filter(function(t){return!t.url||gl.some(function(r){return An(t.url,r)})}),e}var nn=1/0,Tl=Te,qr=function(){function e(t){var r=this;this.expireDelay=t,this.entries=[],this.clearOldValuesInterval=Fr(function(){return r.clearOldValues()},Tl)}return e.prototype.add=function(t,r){var n=this,i={value:t,startTime:r,endTime:nn,remove:function(){var o=n.entries.indexOf(i);o>=0&&n.entries.splice(o,1)},close:function(o){i.endTime=o}};return this.entries.unshift(i),i},e.prototype.find=function(t){t===void 0&&(t=nn);for(var r=0,n=this.entries;r<n.length;r++){var i=n[r];if(i.startTime<=t){if(t<=i.endTime)return i.value;break}}},e.prototype.closeActive=function(t){var r=this.entries[0];r&&r.endTime===nn&&r.close(t)},e.prototype.findAll=function(t){return t===void 0&&(t=nn),this.entries.filter(function(r){return r.startTime<=t&&t<=r.endTime}).map(function(r){return r.value})},e.prototype.reset=function(){this.entries=[]},e.prototype.stop=function(){Li(this.clearOldValuesInterval)},e.prototype.clearOldValues=function(){for(var t=Pe()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<t;)this.entries.pop()},e}();function kl(){return!!document.documentMode}function Al(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}var Hr=4*Do,ts=15*Te,rs=/^([a-z]+)=([a-z0-9-]+)$/,Pi="&",In="_dd_s",xl=10,Il=100,ns=[],fn;function Or(e,t){var r;if(t===void 0&&(t=0),fn||(fn=e),e!==fn){ns.push(e);return}if(t>=Il){qa();return}var n,i=xr();if(ei()){if(i.lock){an(e,t);return}if(n=ke(),i.lock=n,bi(i,e.options),i=xr(),i.lock!==n){an(e,t);return}}var o=e.process(i);if(ei()&&(i=xr(),i.lock!==n)){an(e,t);return}if(o&&is(o,e.options),ei()&&!(o&&os(o))){if(i=xr(),i.lock!==n){an(e,t);return}delete i.lock,bi(i,e.options),o=i}(r=e.after)===null||r===void 0||r.call(e,o||i),qa()}function ei(){return Al()}function an(e,t){pe(function(){Or(e,t+1)},xl)}function qa(){fn=void 0;var e=ns.shift();e&&Or(e)}function is(e,t){if(os(e)){as(t);return}e.expire=String(Ye()+ts),bi(e,t)}function bi(e,t){wn(In,Cl(e),ts,t)}function Cl(e){return qo(e).map(function(t){var r=t[0],n=t[1];return"".concat(r,"=").concat(n)}).join(Pi)}function xr(){var e=Ge(In),t={};return Ol(e)&&e.split(Pi).forEach(function(r){var n=rs.exec(r);if(n!==null){var i=n[1],o=n[2];t[i]=o}}),t}function as(e){Oi(In,e)}function Ol(e){return e!==void 0&&(e.indexOf(Pi)!==-1||rs.test(e))}function os(e){return Je(e)}var Rl="_dd",Nl="_dd_r",Ll="_dd_l",Dl="rum",Ml="logs";function Ul(e){var t=Ge(In),r=Ge(Rl),n=Ge(Nl),i=Ge(Ll);if(!t){var o={};r&&(o.id=r),i&&/^[01]$/.test(i)&&(o[Ml]=i),n&&/^[012]$/.test(n)&&(o[Dl]=n),is(o,e)}}function Pl(e,t,r){var n=new se,i=new se,o=Fr(d,Fa),s=I();function u(){var k;Or({options:e,process:function(L){var Z=h(L);return k=_(Z),Z},after:function(L){k&&!v()&&T(L),s=L}})}function c(){Or({options:e,process:function(k){return v()?h(k):void 0}})}function d(){Or({options:e,process:function(k){return R(k)?void 0:{}},after:h})}function h(k){return R(k)||(k={}),v()&&(y(k)?b():s=k),k}function _(k){var L=r(k[t]),Z=L.trackingType,F=L.isTracked;return k[t]=Z,F&&!k.id&&(k.id=ke(),k.created=String(Ye())),F}function v(){return s[t]!==void 0}function y(k){return s.id!==k.id||s[t]!==k[t]}function b(){s={},i.notify()}function T(k){s=k,n.notify()}function I(){var k=xr();return R(k)?k:{}}function R(k){return(k.created===void 0||Ye()-Number(k.created)<Hr)&&(k.expire===void 0||Ye()<Number(k.expire))}return{expandOrRenewSession:St(u,Fa).throttled,expandSession:c,getSession:function(){return s},renewObservable:n,expireObservable:i,expire:function(){as(e),h({})},stop:function(){Li(o)}}}var Fl=Te,Bl=Hr;function zl(e,t,r){Ul(e);var n=Pl(e,t,r),i=new qr(Bl);n.renewObservable.subscribe(function(){i.add(o(),Pe())}),n.expireObservable.subscribe(function(){i.closeActive(Pe())}),n.expandOrRenewSession(),i.add(o(),Mo().relative),ql(function(){return n.expandOrRenewSession()}),Hl(function(){return n.expandSession()});function o(){return{id:n.getSession().id,trackingType:n.getSession()[t]}}return{findActiveSession:function(s){return i.find(s)},renewObservable:n.renewObservable,expireObservable:n.expireObservable,expire:n.expire}}function ql(e){ge(window,["click","touchstart","keydown","scroll"],e,{capture:!0,passive:!0}).stop}function Hl(e){var t=function(){document.visibilityState==="visible"&&e()};ie(document,"visibilitychange",t).stop,Fr(t,Fl)}function Vl(e){return e>=500}function Gl(e){try{return e.clone()}catch{return}}var $l=80*Ft,Yl=32,ss=3*Bo,Kl=Te,us=Ce;function cs(e,t,r,n,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?ls(e,t,r,{onSuccess:function(){return ds(0,t,r,n,i)},onFailure:function(){t.queuedPayloads.enqueue(e),fs(t,r,n,i)}}):t.queuedPayloads.enqueue(e)}function fs(e,t,r,n){e.transportStatus===2&&pe(function(){var i=e.queuedPayloads.first();ls(i,e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=us,ds(1,e,t,r,n)},onFailure:function(){e.currentBackoffTime=Math.min(Kl,e.currentBackoffTime*2),fs(e,t,r,n)}})},e.currentBackoffTime)}function ls(e,t,r,n){var i=n.onSuccess,o=n.onFailure;t.bandwidthMonitor.add(e),r(e,function(s){t.bandwidthMonitor.remove(e),jl(s)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:s.status},o()):(t.transportStatus=0,i())})}function ds(e,t,r,n,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:"Reached max ".concat(n," events size queued for upload: ").concat(ss/Bo,"MiB"),source:pr.AGENT,startClocks:Se()}),t.queueFullReported=!0);var o=t.queuedPayloads;for(t.queuedPayloads=ps();o.size()>0;)cs(o.dequeue(),t,r,n,i)}function jl(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||Vl(e.status))}function Zl(){return{transportStatus:0,currentBackoffTime:us,bandwidthMonitor:Xl(),queuedPayloads:ps(),queueFullReported:!1}}function ps(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=ss}}}function Xl(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=$l&&this.ongoingRequestCount<Yl},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}}}function hs(e,t,r){var n=Zl(),i=function(o,s){return Ql(e,t,o,s)};return{send:function(o){cs(o,n,i,e.endpointType,r)},sendOnExit:function(o){Wl(e,t,o)}}}function Wl(e,t,r){var n=r.data,i=r.bytesCount,o=r.flushReason,s=!!navigator.sendBeacon&&i<t;if(s)try{var u=e.build("beacon",o),c=navigator.sendBeacon(u,n);if(c)return}catch(h){Jl(h)}var d=e.build("xhr",o);Ei(d,n)}var Ha=!1;function Jl(e){Ha||(Ha=!0,vn(e))}function Ql(e,t,r,n){var i=r.data,o=r.bytesCount,s=r.flushReason,u=r.retry,c=ed()&&o<t;if(c){var d=e.build("fetch",s,u);fetch(d,{method:"POST",body:i,keepalive:!0,mode:"cors"}).then(D(function(_){return n==null?void 0:n({status:_.status,type:_.type})}),D(function(){var _=e.build("xhr",s,u);Ei(_,i,n)}))}else{var h=e.build("xhr",s,u);Ei(h,i,n)}}function ed(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function Ei(e,t,r){var n=new XMLHttpRequest;n.open("POST",e,!0),ie(n,"loadend",function(){r==null||r({status:n.status})},{once:!0}),n.send(t)}var Dt={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function td(){var e=new se(function(){var t=Tn(Pt.PAGEHIDE),r=ge(window,["visibilitychange","freeze","pagehide"],function(i){i.type==="pagehide"&&t?e.notify({reason:Dt.PAGEHIDE}):i.type==="visibilitychange"&&document.visibilityState==="hidden"?e.notify({reason:Dt.HIDDEN}):i.type==="freeze"&&e.notify({reason:Dt.FROZEN})},{capture:!0}).stop,n=re;return t||(n=ie(window,"beforeunload",function(){e.notify({reason:Dt.UNLOADING})}).stop),function(){r(),n()}});return e}function vs(e){return tt(kn(Dt),e)}var rd=function(){function e(t,r,n){var i=this;this.request=t,this.flushController=r,this.messageBytesLimit=n,this.pushOnlyBuffer=[],this.upsertBuffer={},this.flushController.flushObservable.subscribe(function(o){return i.flush(o)})}return e.prototype.add=function(t){this.addOrUpdate(t)},e.prototype.upsert=function(t,r){this.addOrUpdate(t,r)},e.prototype.flush=function(t){var r=this.pushOnlyBuffer.concat(kn(this.upsertBuffer));this.pushOnlyBuffer=[],this.upsertBuffer={};var n={data:r.join(`
`),bytesCount:t.bytesCount,flushReason:t.reason};vs(t.reason)?this.request.sendOnExit(n):this.request.send(n)},e.prototype.addOrUpdate=function(t,r){var n=this.process(t),i=n.processedMessage,o=n.messageBytesCount;if(o>=this.messageBytesLimit){U.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB."));return}this.hasMessageFor(r)&&this.remove(r),this.push(i,o,r)},e.prototype.process=function(t){var r=$t(t),n=ln(r);return{processedMessage:r,messageBytesCount:n}},e.prototype.push=function(t,r,n){var i=this.flushController.messagesCount>0?1:0;this.flushController.notifyBeforeAddMessage(r+i),n!==void 0?this.upsertBuffer[n]=t:this.pushOnlyBuffer.push(t),this.flushController.notifyAfterAddMessage()},e.prototype.remove=function(t){var r=this.upsertBuffer[t];delete this.upsertBuffer[t];var n=ln(r),i=this.flushController.messagesCount>1?1:0;this.flushController.notifyAfterRemoveMessage(n+i)},e.prototype.hasMessageFor=function(t){return t!==void 0&&this.upsertBuffer[t]!==void 0},e}();function Fi(){var e=nd();if(e)return{getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,r){e.send(JSON.stringify({eventType:t,event:r}))}}}function sr(e){var t;e===void 0&&(e=(t=lr().location)===null||t===void 0?void 0:t.hostname);var r=Fi();return!!r&&r.getAllowedWebViewHosts().some(function(n){return e===n||hf(e,".".concat(n))})}function nd(){return lr().DatadogEventBridge}function id(e){var t=e.messagesLimit,r=e.bytesLimit,n=e.durationLimit,i=e.pageExitObservable,o=e.sessionExpireObservable,s=new se;i.subscribe(function(y){return d(y.reason)}),o.subscribe(function(){return d("session_expire")});var u=0,c=0;function d(y){if(c!==0){var b=c,T=u;c=0,u=0,v(),s.notify({reason:y,messagesCount:b,bytesCount:T})}}var h;function _(){h===void 0&&(h=pe(function(){d("duration_limit")},n))}function v(){Ve(h),h=void 0}return{flushObservable:s,get messagesCount(){return c},notifyBeforeAddMessage:function(y){u+y>=r&&d("bytes_limit"),c+=1,u+=y,_()},notifyAfterAddMessage:function(){c>=t?d("messages_limit"):u>=r&&d("bytes_limit")},notifyAfterRemoveMessage:function(y){u-=y,c-=1,c===0&&v()}}}var ad=function(){function e(){this.callbacks={}}return e.prototype.notify=function(t,r){var n=this.callbacks[t];n&&n.forEach(function(i){return i(r)})},e.prototype.subscribe=function(t,r){var n=this;return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(r),{unsubscribe:function(){n.callbacks[t]=n.callbacks[t].filter(function(i){return r!==i})}}},e}();function Va(e,t,r){var n=0,i=!1;return{isLimitReached:function(){if(n===0&&pe(function(){n=0},Te),n+=1,n<=t||i)return i=!1,!1;if(n===t+1){i=!0;try{r({message:"Reached max number of ".concat(e,"s by minute: ").concat(t),source:pr.AGENT,startClocks:Se()})}finally{i=!1}}return!0}}}function Bi(e,t){if(document.readyState===e||document.readyState==="complete")t();else{var r=e==="complete"?"load":"DOMContentLoaded";ie(window,r,t,{once:!0})}}var ti,zi=new WeakMap;function od(){return ti||(ti=sd()),ti}function sd(){var e=new se(function(){var t=be(XMLHttpRequest.prototype,"open",{before:ud}).stop,r=be(XMLHttpRequest.prototype,"send",{before:function(){cd.call(this,e)}}).stop,n=be(XMLHttpRequest.prototype,"abort",{before:fd}).stop;return function(){t(),r(),n()}});return e}function ud(e,t){zi.set(this,{state:"open",method:e,url:dn(String(t))})}function cd(e){var t=this,r=zi.get(this);if(r){var n=r;n.state="start",n.startTime=Pe(),n.startClocks=Se(),n.isAborted=!1,n.xhr=this;var i=!1,o=be(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&s()}}).stop,s=function(){if(u(),o(),!i){i=!0;var c=r;c.state="complete",c.duration=we(n.startClocks.timeStamp,ue()),c.status=t.status,e.notify(Nr(c))}},u=ie(this,"loadend",s).stop;e.notify(n)}}function fd(){var e=zi.get(this);e&&(e.isAborted=!0)}var ri;function ld(){return ri||(ri=dd()),ri}function dd(){var e=new se(function(){if(window.fetch){var t=jo(window,"fetch",function(r){return function(n,i){var o,s=bt(pd,null,[e,n,i]);return s?(o=r.call(this,s.input,s.init),bt(hd,null,[e,o,s])):o=r.call(this,n,i),o}}).stop;return t}});return e}function pd(e,t,r){var n=r&&r.method||t instanceof Request&&t.method||"GET",i=t instanceof Request?t.url:dn(String(t)),o=Se(),s={state:"start",init:r,input:t,method:n,startClocks:o,url:i};return e.notify(s),s}function hd(e,t,r){var n=function(i){var o=r;o.state="resolve","stack"in i||i instanceof Error?(o.status=0,o.isAborted=i instanceof DOMException&&i.code===DOMException.ABORT_ERR,o.error=i):"status"in i&&(o.response=i,o.responseType=i.type,o.status=i.status,o.isAborted=!1),e.notify(o)};t.then(D(n),D(n))}var ni={};function vd(e){var t=e.map(function(r){return ni[r]||(ni[r]=_d(r)),ni[r]});return Qo.apply(void 0,t)}function _d(e){var t=new se(function(){var r=console[e];return console[e]=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];r.apply(console,n);var o=Jo();bt(function(){t.notify(gd(n,e,o))})},function(){console[e]=r}});return t}function gd(e,t,r){var n=e.map(function(s){return md(s)}).join(" "),i;if(t===Ut.error){var o=Pr(e,function(s){return s instanceof Error});i=o?dr(wt(o)):void 0,n="console error: ".concat(n)}return{api:t,message:n,stack:i,handlingStack:r}}function md(e){return typeof e=="string"?xe(e):e instanceof Error?Wo(wt(e)):$t(xe(e),void 0,2)}var yd=500,Ga=function(){function e(){this.buffer=[]}return e.prototype.add=function(t){var r=this.buffer.push(t);r>yd&&this.buffer.splice(0,1)},e.prototype.drain=function(){this.buffer.forEach(function(t){return t()}),this.buffer.length=0},e}(),$a=3*Ft;function _s(e,t){return e>$a?(U.warn("The ".concat(t," data is over ").concat($a/Ft,"KiB. On low connectivity, the SDK has the potential to exhaust the user's upload bandwidth.")),!0):!1}var bd=200;function Ya(e,t){t===void 0&&(t=ln);var r={},n,i=!1,o=St(function(s){n=t($t(s)),i||(i=_s(n,e))},bd).throttled;return{getBytesCount:function(){return n},get:function(){return r},add:function(s,u){r[s]=u,o(r)},remove:function(s){delete r[s],o(r)},set:function(s){r=s,o(r)},getContext:function(){return Di(r)},setContext:function(s){r=xe(s),o(r)},setContextProperty:function(s,u){r[s]=xe(u),o(r)},removeContextProperty:function(s){delete r[s],o(r)},clearContext:function(){r={},n=0}}}function Ed(e,t,r){var n=e.getReader(),i=0;o();function o(){n.read().then(D(function(u){if(u.done){s();return}i+=u.value.length,i>r.bytesLimit?s():o()}),D(function(u){return t(u)}))}function s(){n.cancel().catch(re);var u,c;t(void 0,u,c)}}var Sd="datadog-synthetics-public-id",wd="datadog-synthetics-result-id",Td="datadog-synthetics-injects-rum";function gs(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||Ge(Td))}function kd(){var e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Ge(Sd);return typeof e=="string"?e:void 0}function Ad(){var e=window._DATADOG_SYNTHETICS_RESULT_ID||Ge(wd);return typeof e=="string"?e:void 0}function Ka(e){var t=V({},e),r=["id","name","email"];return r.forEach(function(n){n in t&&(t[n]=String(t[n]))}),t}function xd(e){var t=Bt(e)==="object";return t||U.error("Unsupported user:",e),t}function qi(e){var t=Bt(e);return t==="string"||t==="function"||e instanceof RegExp}function ms(e,t,r){return r===void 0&&(r=!1),e.some(function(n){try{if(typeof n=="function")return n(t);if(n instanceof RegExp)return n.test(t);if(typeof n=="string")return r?An(t,n):n===t}catch(i){U.error(i)}return!1})}function Id(e){var t=e;return Bt(t)==="object"&&qi(t.match)&&Array.isArray(t.propagatorTypes)}function Cd(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function Od(e,t){return{clearTracingIfNeeded:Cd,traceFetch:function(r){return ja(e,r,t,function(n){var i;if(r.input instanceof Request&&!(!((i=r.init)===null||i===void 0)&&i.headers))r.input=new Request(r.input),Object.keys(n).forEach(function(s){r.input.headers.append(s,n[s])});else{r.init=Nr(r.init);var o=[];r.init.headers instanceof Headers?r.init.headers.forEach(function(s,u){o.push([u,s])}):Array.isArray(r.init.headers)?r.init.headers.forEach(function(s){o.push(s)}):r.init.headers&&Object.keys(r.init.headers).forEach(function(s){o.push([s,r.init.headers[s]])}),r.init.headers=o.concat(qo(n))}})},traceXhr:function(r,n){return ja(e,r,t,function(i){Object.keys(i).forEach(function(o){n.setRequestHeader(o,i[o])})})}}}function ja(e,t,r,n){if(!(!Rd()||!r.findTrackedSession())){var i=Pr(e.allowedTracingUrls,function(o){return ms([o.match],t.url,!0)});i&&(t.traceId=new Za,t.spanId=new Za,t.traceSampled=!fr(e.traceSampleRate)||ir(e.traceSampleRate),n(Nd(t.traceId,t.spanId,t.traceSampled,i.propagatorTypes)))}}function Rd(){return ys()!==void 0}function ys(){return window.crypto||window.msCrypto}function Nd(e,t,r,n){var i={};return n.forEach(function(o){switch(o){case"datadog":{V(i,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toDecimalString(),"x-datadog-sampling-priority":r?"1":"0","x-datadog-trace-id":e.toDecimalString()});break}case"tracecontext":{V(i,{traceparent:"00-0000000000000000".concat(e.toPaddedHexadecimalString(),"-").concat(t.toPaddedHexadecimalString(),"-0").concat(r?"1":"0")});break}case"b3":{V(i,{b3:"".concat(e.toPaddedHexadecimalString(),"-").concat(t.toPaddedHexadecimalString(),"-").concat(r?"1":"0")});break}case"b3multi":{V(i,{"X-B3-TraceId":e.toPaddedHexadecimalString(),"X-B3-SpanId":t.toPaddedHexadecimalString(),"X-B3-Sampled":r?"1":"0"});break}}}),i}var Za=function(){function e(){this.buffer=new Uint8Array(8),ys().getRandomValues(this.buffer),this.buffer[0]=this.buffer[0]&127}return e.prototype.toString=function(t){var r=this.readInt32(0),n=this.readInt32(4),i="";do{var o=r%t*4294967296+n;r=Math.floor(r/t),n=Math.floor(o/t),i=(o%t).toString(t)+i}while(r||n);return i},e.prototype.toDecimalString=function(){return this.toString(10)},e.prototype.toPaddedHexadecimalString=function(){var t=this.toString(16);return Array(17-t.length).join("0")+t},e.prototype.readInt32=function(t){return this.buffer[t]*16777216+(this.buffer[t+1]<<16)+(this.buffer[t+2]<<8)+this.buffer[t+3]},e}();function Ld(e){var t,r,n,i,o,s;if(!e.applicationId){U.error("Application ID is not configured, no RUM data will be collected.");return}if(e.sessionReplaySampleRate!==void 0&&!Qt(e.sessionReplaySampleRate)){U.error("Session Replay Sample Rate should be a number between 0 and 100");return}var u=(t=e.premiumSampleRate)!==null&&t!==void 0?t:e.replaySampleRate;if(u!==void 0&&e.sessionReplaySampleRate!==void 0&&(U.warn("Ignoring Premium Sample Rate because Session Replay Sample Rate is set"),u=void 0),u!==void 0&&!Qt(u)){U.error("Premium Sample Rate should be a number between 0 and 100");return}var c=(r=e.traceSampleRate)!==null&&r!==void 0?r:e.tracingSampleRate;if(c!==void 0&&!Qt(c)){U.error("Trace Sample Rate should be a number between 0 and 100");return}if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){U.error("Excluded Activity Urls should be an array");return}var d=Dd(e);if(d){var h=Ff(e);if(h){var _=!!((n=e.trackUserInteractions)!==null&&n!==void 0?n:e.trackInteractions),v=!!e.trackFrustrations;return V({applicationId:e.applicationId,version:e.version,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:(o=(i=e.sessionReplaySampleRate)!==null&&i!==void 0?i:u)!==null&&o!==void 0?o:100,oldPlansBehavior:e.sessionReplaySampleRate===void 0,traceSampleRate:c,allowedTracingUrls:d,excludedActivityUrls:(s=e.excludedActivityUrls)!==null&&s!==void 0?s:[],trackUserInteractions:_||v,trackFrustrations:v,trackViewsManually:!!e.trackViewsManually,trackResources:e.trackResources,trackLongTasks:e.trackLongTasks,subdomain:e.subdomain,defaultPrivacyLevel:Ho(Cr,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Cr.MASK_USER_INPUT,customerDataTelemetrySampleRate:1},h)}}}function Dd(e){if(e.allowedTracingUrls!==void 0&&e.allowedTracingOrigins!==void 0&&U.warn("Both allowedTracingUrls and allowedTracingOrigins (deprecated) have been defined. The parameter allowedTracingUrls will override allowedTracingOrigins."),e.allowedTracingUrls!==void 0){if(!Array.isArray(e.allowedTracingUrls)){U.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){U.error("Service needs to be configured when tracing is enabled");return}var t=[];return e.allowedTracingUrls.forEach(function(n){qi(n)?t.push({match:n,propagatorTypes:["datadog"]}):Id(n)?t.push(n):U.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}if(e.allowedTracingOrigins!==void 0){if(!Array.isArray(e.allowedTracingOrigins)){U.error("Allowed Tracing Origins should be an array");return}if(e.allowedTracingOrigins.length!==0&&e.service===void 0){U.error("Service needs to be configured when tracing is enabled");return}var r=[];return e.allowedTracingOrigins.forEach(function(n){var i=Md(n);i&&r.push(i)}),r}return[]}function Md(e){var t;if(typeof e=="string"?t=e:e instanceof RegExp?t=function(r){return e.test(Ba(r))}:typeof e=="function"&&(t=function(r){return e(Ba(r))}),t===void 0){U.warn("Allowed Tracing Origins parameters should be a string, RegExp or function. Ignoring parameter",e);return}return{match:t,propagatorTypes:["datadog"]}}function Ud(e){var t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(function(r){qi(r)?t.add("datadog"):Bt(r)==="object"&&Array.isArray(r.propagatorTypes)&&r.propagatorTypes.forEach(function(n){return t.add(n)})}),Array.isArray(e.allowedTracingOrigins)&&e.allowedTracingOrigins.length>0&&t.add("datadog"),zo(t)}function Pd(e){var t,r,n=zf(e);return V({premium_sample_rate:e.premiumSampleRate,replay_sample_rate:e.replaySampleRate,session_replay_sample_rate:e.sessionReplaySampleRate,trace_sample_rate:(t=e.traceSampleRate)!==null&&t!==void 0?t:e.tracingSampleRate,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_origins:Array.isArray(e.allowedTracingOrigins)&&e.allowedTracingOrigins.length>0,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:Ud(e),default_privacy_level:e.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(e.allowedTracingOrigins)&&e.allowedTracingOrigins.length>0,track_frustrations:e.trackFrustrations,track_views_manually:e.trackViewsManually,track_user_interactions:(r=e.trackUserInteractions)!==null&&r!==void 0?r:e.trackInteractions},n)}function Si(e,t,r){return{context:e.getContext(),user:t.getContext(),hasReplay:r.isRecording()?!0:void 0}}function Fd(e,t,r){var n={},i=n.ignoreInitIfSyntheticsWillInjectRum,o=i===void 0?!0:i,s=!1,u=Ya("global context"),c=Ya("user"),d=function(){},h=function(){},_=re,v=function(){},y=new Ga,b=function(C,N){N===void 0&&(N=ue()),y.add(function(){return b(C,N)})},T=function(C,N){N===void 0&&(N=Se()),y.add(function(){return T(C,N)})},I=function(C,N){N===void 0&&(N=Si(u,c,t)),y.add(function(){return I(C,N)})},R=function(C,N){N===void 0&&(N=Si(u,c,t)),y.add(function(){return R(C,N)})},k=function(C,N){y.add(function(){return k(C,N)})};function L(C){if(h=function(){return Di(C)},!(o&&gs())){if(sr())C=ee(C);else if(!ae(C))return;if(W(C)){var N=Ld(C);if(N){if(!N.trackViewsManually)Z(C,N);else{var me=y;y=new Ga,T=function($){Z(C,N,$)},me.drain()}s=!0}}}}function Z(C,N,me){var $=e(C,N,t,u,c,me);v=function(){return t.getSessionReplayLink(N,$.session,$.viewContexts)},T=$.startView,I=$.addAction,R=$.addError,b=$.addTiming,k=$.addFeatureFlagEvaluation,d=$.getInternalContext,_=$.stopSession,y.drain(),t.onRumStart($.lifeCycle,N,$.session,$.viewContexts)}var F=D(function(C){var N=typeof C=="object"?C:{name:C};T(N)}),Y=cl({init:D(L),addRumGlobalContext:D(u.add),setGlobalContextProperty:D(u.setContextProperty),removeRumGlobalContext:D(u.remove),removeGlobalContextProperty:D(u.removeContextProperty),getRumGlobalContext:D(u.get),getGlobalContext:D(u.getContext),setRumGlobalContext:D(u.set),setGlobalContext:D(u.setContext),clearGlobalContext:D(u.clearContext),getInternalContext:D(function(C){return d(C)}),getInitConfiguration:D(function(){return h()}),addAction:D(function(C,N){I({name:xe(C),context:xe(N),startClocks:Se(),type:"custom"})}),addError:function(C,N){var me=Jo();bt(function(){R({error:C,handlingStack:me,context:xe(N),startClocks:Se()})})},addTiming:D(function(C,N){b(xe(C),N)}),setUser:D(function(C){xd(C)&&c.setContext(Ka(C))}),getUser:D(c.getContext),setUserProperty:D(function(C,N){var me,$=Ka((me={},me[C]=N,me))[C];c.setContextProperty(C,$)}),removeUserProperty:D(c.removeContextProperty),removeUser:D(c.clearContext),clearUser:D(c.clearContext),startView:F,stopSession:D(function(){_()}),startSessionReplayRecording:D(t.start),stopSessionReplayRecording:D(t.stop),addFeatureFlagEvaluation:D(function(C,N){k(xe(C),xe(N))}),getSessionReplayLink:D(function(){return v()})});return Y;function ae(C){return sf(Yo(C))?Oe()?(U.error("Execution is not allowed in the current context."),!1):!0:(U.warn("Cookies are not authorized, we will not send any data."),!1)}function W(C){return s?(C.silentMultipleInit||U.error("DD_RUM is already initialized."),!1):!0}function ee(C){return V({},C,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100})}function Oe(){return window.location.protocol==="file:"}}function Bd(){var e=bs(),t=new se(function(){if(e){var r=new e(D(function(){return t.notify()}));return r.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return r.disconnect()}}});return t}function bs(){var e,t=window;if(t.Zone&&(e=yt(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){var r=new t.MutationObserver(re),n=yt(r,"originalInstance");e=n&&n.constructor}return e||(e=t.MutationObserver),e}var Es="initial_document",zd=[["document",function(e){return Es===e}],["xhr",function(e){return e==="xmlhttprequest"}],["fetch",function(e){return e==="fetch"}],["beacon",function(e){return e==="beacon"}],["css",function(e,t){return/\.css$/i.test(t)}],["js",function(e,t){return/\.js$/i.test(t)}],["image",function(e,t){return tt(["image","img","icon"],e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null}],["font",function(e,t){return/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null}],["media",function(e,t){return tt(["audio","video"],e)||/\.(mp3|mp4)$/i.exec(t)!==null}]];function qd(e){var t=e.name;if(!bf(t))return xn('Failed to construct URL for "'.concat(e.name,'"')),"other";for(var r=Ef(t),n=0,i=zd;n<i.length;n++){var o=i[n],s=o[0],u=o[1];if(u(e.initiatorType,r))return s}return"other"}function wi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=1;r<e.length;r+=1)if(e[r-1]>e[r])return!1;return!0}function Hd(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function Vd(e){var t=e.duration,r=e.startTime,n=e.responseEnd;return t===0&&r<n?te(we(r,n)):te(t)}function Gd(e){var t=Ss(e);if(t){var r=t.startTime,n=t.fetchStart,i=t.redirectStart,o=t.redirectEnd,s=t.domainLookupStart,u=t.domainLookupEnd,c=t.connectStart,d=t.secureConnectionStart,h=t.connectEnd,_=t.requestStart,v=t.responseStart,y=t.responseEnd,b={download:Zt(r,v,y),first_byte:Zt(r,_,v)};return h!==n&&(b.connect=Zt(r,c,h),wi(c,d,h)&&(b.ssl=Zt(r,d,h))),u!==n&&(b.dns=Zt(r,s,u)),ws(e)&&(b.redirect=Zt(r,i,o)),b}}function Ss(e){if(wi(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd)){if(!ws(e))return e;var t=e.redirectStart,r=e.redirectEnd;if(t<e.startTime&&(t=e.startTime),r<e.startTime&&(r=e.fetchStart),!!wi(e.startTime,t,r,e.fetchStart))return V({},e,{redirectEnd:r,redirectStart:t})}}function ws(e){return e.fetchStart!==e.startTime}function Zt(e,t,r){return{duration:te(we(t,r)),start:te(we(e,t))}}function $d(e){if(e.startTime<e.responseStart)return e.decodedBodySize}function Hi(e,t){return t&&!e.isIntakeUrl(t)}function Ts(e){return e.nodeType===Node.TEXT_NODE}function Yd(e){return e.nodeType===Node.COMMENT_NODE}function Vi(e){return e.nodeType===Node.ELEMENT_NODE}function Cn(e){return Vi(e)&&!!e.shadowRoot}function Gi(e){var t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Vi(t.host)}function Kd(e){return Cn(e)?e.shadowRoot.childNodes:e.childNodes}function On(e){return Gi(e)?e.host:e.parentNode}var jd=2*Te;function Zd(e){var t=Xd(e)||Wd(e);if(!(!t||t.traceTime<=Ye()-jd))return t.traceId}function Xd(e){var t=e.querySelector("meta[name=dd-trace-id]"),r=e.querySelector("meta[name=dd-trace-time]");return ks(t&&t.content,r&&r.content)}function Wd(e){var t=Jd(e);if(t)return ks(_i(t,"trace-id"),_i(t,"trace-time"))}function ks(e,t){var r=t&&Number(t);if(!(!e||!r))return{traceId:e,traceTime:r}}function Jd(e){for(var t=0;t<e.childNodes.length;t+=1){var r=Xa(e.childNodes[t]);if(r)return r}if(e.body)for(var t=e.body.childNodes.length-1;t>=0;t-=1){var n=e.body.childNodes[t],r=Xa(n);if(r)return r;if(!Ts(n))break}}function Xa(e){if(e&&Yd(e)){var t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Wa(){return window.performance!==void 0&&"getEntries"in performance}function _n(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function Qd(e,t){if(ep(function(u){Tr(e,t,[u])}),Wa()){var r=performance.getEntries();pe(function(){return Tr(e,t,r)})}if(window.PerformanceObserver){var n=D(function(u){return Tr(e,t,u.getEntries())}),i=["resource","navigation","longtask","paint"],o=["largest-contentful-paint","first-input","layout-shift"];try{o.forEach(function(u){var c=new PerformanceObserver(n);c.observe({type:u,buffered:!0})})}catch{i.push.apply(i,o)}var s=new PerformanceObserver(n);s.observe({entryTypes:i}),Wa()&&"addEventListener"in performance&&ie(performance,"resourcetimingbufferfull",function(){performance.clearResourceTimings()})}_n("navigation")||tp(function(u){Tr(e,t,[u])}),_n("first-input")||rp(function(u){Tr(e,t,[u])})}function ep(e){Bi("interactive",function(){var t,r={entryType:"resource",initiatorType:Es,traceId:Zd(document)};if(_n("navigation")&&performance.getEntriesByType("navigation").length>0){var n=performance.getEntriesByType("navigation")[0];t=V(n.toJSON(),r)}else{var i=As();t=V(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},r)}e(t)})}function tp(e){function t(){e(V(As(),{entryType:"navigation"}))}Bi("complete",function(){pe(t)})}function rp(e){var t=Ye(),r=!1,n=ge(window,["click","mousedown","keydown","touchstart","pointerdown"],function(s){if(s.cancelable){var u={entryType:"first-input",processingStart:Pe(),startTime:s.timeStamp};s.type==="pointerdown"?i(u):o(u)}},{passive:!0,capture:!0}).stop;function i(s){ge(window,["pointerup","pointercancel"],function(u){u.type==="pointerup"&&o(s)},{once:!0})}function o(s){if(!r){r=!0,n();var u=s.processingStart-s.startTime;u>=0&&u<Ye()-t&&e(s)}}}function As(){var e={},t=performance.timing;for(var r in t)if(fr(t[r])){var n=r,i=t[n];e[n]=i===0?0:Uo(i)}return e}function Tr(e,t,r){var n=r.filter(function(o){return o.entryType==="resource"||o.entryType==="navigation"||o.entryType==="paint"||o.entryType==="longtask"||o.entryType==="largest-contentful-paint"||o.entryType==="first-input"||o.entryType==="layout-shift"}),i=n.filter(function(o){return!np(o)&&!ip(t,o)});i.length&&e.notify(0,i)}function np(e){return e.entryType==="navigation"&&e.loadEventEnd<=0}function ip(e,t){return t.entryType==="resource"&&!Hi(e,t.name)}function ap(){var e=kd(),t=Ad();if(e&&t)return{test_id:e,result_id:t,injected:gs()}}function op(){var e,t=(e=window.Cypress)===null||e===void 0?void 0:e.env("traceId");if(typeof t=="string")return{test_execution_id:t}}var ii;function xs(){return ii||(ii=sp()),ii}function sp(){var e=new se(function(){var t=St(function(){e.notify($i())},200).throttled;return ie(window,"resize",t,{capture:!0,passive:!0}).stop});return e}function $i(){var e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var on;function up(){return on||(on=$i(),xs().subscribe(function(e){on=e}).unsubscribe),{viewport:on}}function cp(e,t,r){var n=Di(e),i=r(n);return t.forEach(function(o){var s=Ja(e,o),u=Ja(n,o),c=Bt(s),d=Bt(u);d===c?Qa(e,o,xe(u)):c==="object"&&(d==="undefined"||d==="null")&&Qa(e,o,{})}),i}function Ja(e,t){for(var r=e,n=0,i=t.split(".");n<i.length;n++){var o=i[n];if(!Is(r,o))return;r=r[o]}return r}function Qa(e,t,r){for(var n=e,i=t.split("."),o=0;o<i.length;o+=1){var s=i[o];if(!Is(n,s))return;o!==i.length-1?n=n[s]:n[s]=r}}function Is(e,t){return typeof e=="object"&&e!==null&&Object.prototype.hasOwnProperty.call(e,t)}var Cs=["view.url","view.referrer","action.target.name","error.message","error.stack","error.resource.url","resource.url"],fp=Cs.concat(["context"]);function lp(e,t,r,n,i,o,s,u){var c,d=(c={},c.error=Va("error",e.eventRateLimiterThreshold,u),c.action=Va("action",e.eventRateLimiterThreshold,u),c),h=ap(),_=op();t.subscribe(10,function(v){var y=v.startTime,b=v.rawRumEvent,T=v.domainContext,I=v.savedCommonContext,R=v.customerContext,k=n.findView(y),L=i.findUrl(y),Z=r.findTrackedSession(y);if(Z&&k&&L){var F=I||s(),Y=o.findActionId(y),ae={_dd:{format_version:2,drift:nf(),session:{plan:Z.plan},browser_sdk_version:sr()?"4.41.0":void 0},application:{id:e.applicationId},date:ue(),service:k.service||e.service,version:k.version||e.version,source:"browser",session:{id:Z.id,type:h?"synthetics":_?"ci_test":"user"},view:{id:k.id,name:k.name,url:L.url,referrer:L.referrer},action:pp(b)&&Y?{id:Y}:void 0,synthetics:h,ci_test:_,display:up()},W=zt(ae,b);W.context=zt(F.context,R),"has_replay"in W.session||(W.session.has_replay=F.hasReplay),Je(F.user)||(W.usr=F.user),dp(W,e.beforeSend,T,d)&&(Je(W.context)&&delete W.context,t.notify(11,W))}})}function dp(e,t,r,n){var i;if(t){var o=cp(e,e.type==="view"?Cs:fp,function(u){return t(u,r)});if(o===!1&&e.type!=="view")return!1;o===!1&&U.warn("Can't dismiss view events using beforeSend!")}var s=(i=n[e.type])===null||i===void 0?void 0:i.isLimitReached();return!s}function pp(e){return["error","resource","long_task"].indexOf(e.type)!==-1}var hp=500,vp=2500,Ee=[];function _p(){document.hasFocus()&&eo();var e=mp(eo).stop,t=yp(gp).stop;return{isInForegroundAt:bp,selectInForegroundPeriodsFor:Ep,stop:function(){Ee=[],e(),t()}}}function eo(){if(!(Ee.length>vp)){var e=Ee[Ee.length-1],t=Pe();e!==void 0&&e.end===void 0||Ee.push({start:t})}}function gp(){if(Ee.length!==0){var e=Ee[Ee.length-1],t=Pe();e.end===void 0&&(e.end=t)}}function mp(e){return ie(window,"focus",function(t){t.isTrusted&&e()})}function yp(e){return ie(window,"blur",function(t){t.isTrusted&&e()})}function bp(e){for(var t=Ee.length-1;t>=0;t--){var r=Ee[t];if(r.end!==void 0&&e>r.end)break;if(e>r.start&&(r.end===void 0||e<r.end))return!0}return!1}function Ep(e,t){for(var r=Gt(e,t),n=[],i=Math.max(0,Ee.length-hp),o=Ee.length-1;o>=i;o--){var s=Ee[o];if(s.end!==void 0&&e>s.end)break;if(!(r<s.start)){var u=e>s.start?e:s.start,c=we(e,u),d=s.end===void 0||r<s.end?r:s.end,h=we(u,d);n.unshift({start:te(c),duration:te(h)})}}return n}function Sp(e,t,r,n,i){return{get:function(o){var s=r.findView(o),u=i.findUrl(o),c=t.findTrackedSession(o);if(c&&s&&u){var d=n.findActionId(o);return{application_id:e,session_id:c.id,user_action:d?{id:d}:void 0,view:{id:s.id,name:s.name,referrer:u.referrer,url:u.url}}}}}}var wp=ad,Tp=Hr;function kp(e){var t=new qr(Tp);e.subscribe(2,function(n){t.add(r(n),n.startClocks.relative)}),e.subscribe(4,function(n){var i=n.endClocks;t.closeActive(i.relative)}),e.subscribe(8,function(){t.reset()});function r(n){return{service:n.service,version:n.version,id:n.id,name:n.name,startClocks:n.startClocks}}return{findView:function(n){return t.find(n)},stop:function(){t.stop()}}}var to=1;function Ap(e,t,r){var n=Od(t,r);xp(e,t,n),Ip(e,t,n)}function xp(e,t,r){var n=od().subscribe(function(i){var o=i;if(Hi(t,o.url))switch(o.state){case"start":r.traceXhr(o,o.xhr),o.requestIndex=Os(),e.notify(5,{requestIndex:o.requestIndex,url:o.url});break;case"complete":r.clearTracingIfNeeded(o),e.notify(6,{duration:o.duration,method:o.method,requestIndex:o.requestIndex,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:"xhr",url:o.url,xhr:o.xhr});break}});return{stop:function(){return n.unsubscribe()}}}function Ip(e,t,r){var n=ld().subscribe(function(i){var o=i;if(Hi(t,o.url))switch(o.state){case"start":r.traceFetch(o),o.requestIndex=Os(),e.notify(5,{requestIndex:o.requestIndex,url:o.url});break;case"resolve":Cp(o,function(s){r.clearTracingIfNeeded(o),e.notify(6,{duration:s,method:o.method,requestIndex:o.requestIndex,responseType:o.responseType,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:"fetch",url:o.url,response:o.response,init:o.init,input:o.input})});break}});return{stop:function(){return n.unsubscribe()}}}function Os(){var e=to;return to+=1,e}function Cp(e,t){var r=e.response&&Gl(e.response);!r||!r.body?t(we(e.startClocks.timeStamp,ue())):Ed(r.body,function(){t(we(e.startClocks.timeStamp,ue()))},{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1})}function Rs(e){var t=e.lifeCycle,r=e.isChildEvent,n=e.onChange,i=n===void 0?re:n,o={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},s=t.subscribe(11,function(u){if(!(u.type==="view"||!r(u)))switch(u.type){case"error":o.errorCount+=1,i();break;case"action":o.actionCount+=1,u.action.frustration&&(o.frustrationCount+=u.action.frustration.type.length),i();break;case"long_task":o.longTaskCount+=1,i();break;case"resource":o.resourceCount+=1,i();break}});return{stop:function(){s.unsubscribe()},eventCounts:o}}var Ns=100,Op=100;function Yi(e,t,r,n,i){var o=Np(e,t,r);return Rp(o,n,i)}function Rp(e,t,r){var n,i=!1,o=pe(D(function(){return d({hadActivity:!1})}),Ns),s=r!==void 0?pe(D(function(){return d({hadActivity:!0,end:ue()})}),r):void 0,u=e.subscribe(function(h){var _=h.isBusy;Ve(o),Ve(n);var v=ue();_||(n=pe(D(function(){return d({hadActivity:!0,end:v})}),Op))}),c=function(){i=!0,Ve(o),Ve(n),Ve(s),u.unsubscribe()};function d(h){i||(c(),t(h))}return{stop:c}}function Np(e,t,r){var n=new se(function(){var i=[],o,s=0;i.push(t.subscribe(c),e.subscribe(0,function(d){d.some(function(h){return h.entryType==="resource"&&!ai(r,h.name)})&&c()}),e.subscribe(5,function(d){ai(r,d.url)||(o===void 0&&(o=d.requestIndex),s+=1,c())}),e.subscribe(6,function(d){ai(r,d.url)||o===void 0||d.requestIndex<o||(s-=1,c())}));var u=Lp(c).stop;return function(){u(),i.forEach(function(d){return d.unsubscribe()})};function c(){n.notify({isBusy:s>0})}});return n}function ai(e,t){return ms(e.excludedActivityUrls,t)}function Lp(e){return be(window,"open",{before:e})}var Ls=Ce,Dp=100;function Mp(e,t){var r=[],n=0,i;o(e);function o(c){c.stopObservable.subscribe(s),r.push(c),Ve(i),i=pe(u,Ls)}function s(){n===1&&r.every(function(c){return c.isStopped()})&&(n=2,t(r))}function u(){Ve(i),n===0&&(n=1,s())}return{tryAppend:function(c){return n!==0?!1:r.length>0&&!Up(r[r.length-1].event,c.event)?(u(),!1):(o(c),!0)},stop:function(){u()}}}function Up(e,t){return e.target===t.target&&Pp(e,t)<=Dp&&e.timeStamp-t.timeStamp<=Ls}function Pp(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}var Ki="data-dd-action-name";function Fp(e,t){return ro(e,Ki)||t&&ro(e,t)||no(e,t,Bp)||no(e,t,zp)||""}function ro(e,t){var r;if($p())r=e.closest("[".concat(t,"]"));else for(var n=e;n;){if(n.hasAttribute(t)){r=n;break}n=n.parentElement}if(r){var i=r.getAttribute(t);return Ms(Ds(i.trim()))}}var Bp=[function(e,t){if(Gp()){if("labels"in e&&e.labels&&e.labels.length>0)return Xt(e.labels[0],t)}else if(e.id){var r=e.ownerDocument&&Pr(e.ownerDocument.querySelectorAll("label"),function(n){return n.htmlFor===e.id});return r&&Xt(r,t)}},function(e){if(e.nodeName==="INPUT"){var t=e,r=t.getAttribute("type");if(r==="button"||r==="submit"||r==="reset")return t.value}},function(e,t){if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return Xt(e,t)},function(e){return e.getAttribute("aria-label")},function(e,t){var r=e.getAttribute("aria-labelledby");if(r)return r.split(/\s+/).map(function(n){return Hp(e,n)}).filter(function(n){return!!n}).map(function(n){return Xt(n,t)}).join(" ")},function(e){return e.getAttribute("alt")},function(e){return e.getAttribute("name")},function(e){return e.getAttribute("title")},function(e){return e.getAttribute("placeholder")},function(e,t){if("options"in e&&e.options.length>0)return Xt(e.options[0],t)}],zp=[function(e,t){return Xt(e,t)}],qp=10;function no(e,t,r){for(var n=e,i=0;i<=qp&&n&&n.nodeName!=="BODY"&&n.nodeName!=="HTML"&&n.nodeName!=="HEAD";){for(var o=0,s=r;o<s.length;o++){var u=s[o],c=u(n,t);if(typeof c=="string"){var d=c.trim();if(d)return Ms(Ds(d))}}if(n.nodeName==="FORM")break;n=n.parentElement,i+=1}}function Ds(e){return e.replace(/\s+/g," ")}function Ms(e){return e.length>100?"".concat(Po(e,100)," [...]"):e}function Hp(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function Xt(e,t){if(!e.isContentEditable){if("innerText"in e){var r=e.innerText,n=function(i){for(var o=e.querySelectorAll(i),s=0;s<o.length;s+=1){var u=o[s];if("innerText"in u){var c=u.innerText;c&&c.trim().length>0&&(r=r.replace(c,""))}}};return Vp()||n("script, style"),n("[".concat(Ki,"]")),t&&n("[".concat(t,"]")),r}return e.textContent}}function Vp(){return!kl()}var oi;function Gp(){return oi===void 0&&(oi="labels"in HTMLInputElement.prototype),oi}var si;function $p(){return si===void 0&&(si="closest"in HTMLElement.prototype),si}var Us=[Ki,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Yp=[Fs,Zp],Kp=[Fs,Xp,Wp];function jp(e,t){for(var r="",n=e;n&&n.nodeName!=="HTML";){var i=io(n,Yp,Qp,t,r);if(i)return i;var o=io(n,Kp,eh,t,r);r=o||ji(Jp(n),r),n=n.parentElement}return r}function Ps(e){return/[0-9]/.test(e)}function Zp(e){if(e.id&&!Ps(e.id))return"#".concat(Ni(e.id))}function Xp(e){if(e.tagName!=="BODY"&&e.classList.length>0)for(var t=0;t<e.classList.length;t+=1){var r=e.classList[t];if(!Ps(r))return"".concat(e.tagName,".").concat(Ni(r))}}function Wp(e){return e.tagName}function Fs(e,t){if(t){var r=s(t);if(r)return r}for(var n=0,i=Us;n<i.length;n++){var o=i[n],r=s(o);if(r)return r}function s(u){if(e.hasAttribute(u))return"".concat(e.tagName,"[").concat(u,'="').concat(Ni(e.getAttribute(u)),'"]')}}function Jp(e){for(var t=e.parentElement.firstElementChild,r=1;t&&t!==e;)t.tagName===e.tagName&&(r+=1),t=t.nextElementSibling;return"".concat(e.tagName,":nth-of-type(").concat(r,")")}function io(e,t,r,n,i){for(var o=0,s=t;o<s.length;o++){var u=s[o],c=u(e,n);if(c){var d=ji(c,i);if(r(e,d))return d}}}function Qp(e,t){return e.ownerDocument.querySelectorAll(t).length===1}function eh(e,t){return e.parentElement.querySelectorAll(th()?ji(":scope",t):t).length===1}function ji(e,t){return t?"".concat(e,">").concat(t):e}var sn;function th(){if(sn===void 0)try{document.querySelector(":scope"),sn=!0}catch{sn=!1}return sn}function rh(e){var t=e.onPointerDown,r=e.onPointerUp,n,i={selection:!1,input:!1},o,s=[ie(window,"pointerdown",function(u){oo(u)&&(n=ao(),i={selection:!1,input:!1},o=t(u))},{capture:!0}),ie(window,"selectionchange",function(){(!n||!ao())&&(i.selection=!0)},{capture:!0}),ie(window,"pointerup",function(u){if(oo(u)&&o){var c=i;r(o,u,function(){return c}),o=void 0}},{capture:!0}),ie(window,"input",function(){i.input=!0},{capture:!0})];return{stop:function(){s.forEach(function(u){return u.stop()})}}}function ao(){var e=window.getSelection();return!e||e.isCollapsed}function oo(e){return e.target instanceof Element&&e.isPrimary!==!1}var so=3;function nh(e,t){if(ih(e))return t.addFrustration("rage_click"),e.some(uo)&&t.addFrustration("dead_click"),t.hasError&&t.addFrustration("error_click"),{isRage:!0};var r=e.some(function(n){return n.getUserActivity().selection});return e.forEach(function(n){n.hasError&&n.addFrustration("error_click"),uo(n)&&!r&&n.addFrustration("dead_click")}),{isRage:!1}}function ih(e){if(e.some(function(r){return r.getUserActivity().selection}))return!1;for(var t=0;t<e.length-(so-1);t+=1)if(e[t+so-1].event.timeStamp-e[t].event.timeStamp<=Ce)return!0;return!1}var ah='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 uo(e){return e.hasPageActivity||e.getUserActivity().input?!1:!vf(e.event.target,ah)}var oh=10*Ce,sh=5*Te;function uh(e,t,r){var n=new qr(sh),i=new se,o;e.subscribe(8,function(){n.reset()}),e.subscribe(4,d);var s=rh({onPointerDown:function(h){return ch(r,e,t,n,h)},onPointerUp:function(h,_,v){var y=h.clickActionBase,b=h.hadActivityOnPointerDown;return fh(r,e,t,n,i,c,y,_,v,b)}}).stop,u={findActionId:function(h){return r.trackFrustrations?n.findAll(h):n.find(h)}};return{stop:function(){d(),i.notify(),s()},actionContexts:u};function c(h){if(!o||!o.tryAppend(h)){var _=h.clone();o=Mp(h,function(v){dh(v,_)})}}function d(){o&&o.stop()}}function ch(e,t,r,n,i){if(!(!e.trackFrustrations&&n.find())){var o=lh(i,e.actionNameAttribute);if(!(!e.trackFrustrations&&!o.name)){var s=!1;return Yi(t,r,e,function(u){s=u.hadActivity},Ns),{clickActionBase:o,hadActivityOnPointerDown:function(){return s}}}}}function fh(e,t,r,n,i,o,s,u,c,d){var h=Bs(t,n,c,s,u);e.trackFrustrations&&o(h);var _=Yi(t,r,e,function(b){b.hadActivity&&b.end<h.startClocks.timeStamp?h.discard():(b.hadActivity?h.stop(b.end):d()?h.stop(h.startClocks.timeStamp):h.stop(),e.trackFrustrations||(b.hadActivity?h.validate():h.discard()))},oh).stop,v=t.subscribe(4,function(b){var T=b.endClocks;h.stop(T.timeStamp)}),y=i.subscribe(function(){h.stop()});h.stopObservable.subscribe(function(){v.unsubscribe(),_(),y.unsubscribe()})}function lh(e,t){var r=e.target.getBoundingClientRect();return{type:"click",target:{width:Math.round(r.width),height:Math.round(r.height),selector:jp(e.target,t)},position:{x:Math.round(e.clientX-r.left),y:Math.round(e.clientY-r.top)},name:Fp(e.target,t)}}function Bs(e,t,r,n,i){var o=ke(),s=Se(),u=t.add(o,s.relative),c=Rs({lifeCycle:e,isChildEvent:function(b){return b.action!==void 0&&(Array.isArray(b.action.id)?tt(b.action.id,o):b.action.id===o)}}),d=0,h,_=[],v=new se;function y(b){d===0&&(h=b,d=1,h?u.close(Uo(h)):u.remove(),c.stop(),v.notify())}return{event:i,stop:y,stopObservable:v,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return h!==void 0},getUserActivity:r,addFrustration:function(b){_.push(b)},startClocks:s,isStopped:function(){return d===1||d===2},clone:function(){return Bs(e,t,r,n,i)},validate:function(b){if(y(),d===1){var T=c.eventCounts,I=T.resourceCount,R=T.errorCount,k=T.longTaskCount,L=V({type:"click",duration:h&&we(s.timeStamp,h),startClocks:s,id:o,frustrationTypes:_,counts:{resourceCount:I,errorCount:R,longTaskCount:k},events:b??[i],event:i},n);e.notify(1,L),d=2}},discard:function(){y(),d=2}}}function dh(e,t){var r=nh(e,t).isRage;r?(e.forEach(function(n){return n.discard()}),t.stop(ue()),t.validate(e.map(function(n){return n.event}))):(t.discard(),e.forEach(function(n){return n.validate()}))}function ph(e,t,r,n){e.subscribe(1,function(o){return e.notify(10,co(o,n))});var i={findActionId:re};return r.trackUserInteractions&&(i=uh(e,t,r).actionContexts),{addAction:function(o,s){e.notify(10,V({savedCommonContext:s},co(o,n)))},actionContexts:i}}function co(e,t){var r=ui(e)?{action:{id:e.id,loading_time:te(e.duration),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position}}}:void 0,n=ui(e)?void 0:e.context,i=zt({action:{id:ke(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action"},r),o=t.isInForegroundAt(e.startClocks.relative);return o!==void 0&&(i.view={in_foreground:o}),{customerContext:n,rawRumEvent:i,startTime:e.startClocks.relative,domainContext:ui(e)?{event:e.event,events:e.events}:{}}}function ui(e){return e.type!=="custom"}function hh(e){var t=vd([Ut.error]).subscribe(function(r){return e.notify({startClocks:Se(),message:r.message,stack:r.stack,source:pr.CONSOLE,handling:"handled",handlingStack:r.handlingStack})});return{stop:function(){t.unsubscribe()}}}function vh(e){var t=ll([or.cspViolation,or.intervention]).subscribe(function(r){return e.notify({startClocks:Se(),message:r.message,stack:r.stack,type:r.subtype,source:pr.REPORT,handling:"unhandled"})});return{stop:function(){t.unsubscribe()}}}function _h(e,t,r){var n=new se;return hh(n),ul(n),vh(n),n.subscribe(function(i){return e.notify(12,{error:i})}),gh(e,t,r)}function gh(e,t,r){return e.subscribe(12,function(n){var i=n.error,o=n.customerContext,s=n.savedCommonContext;e.notify(10,V({customerContext:o,savedCommonContext:s},mh(i,t,r)))}),{addError:function(n,i){var o=n.error,s=n.handlingStack,u=n.startClocks,c=n.context,d=o instanceof Error?wt(o):void 0,h=Xo({stackTrace:d,originalError:o,handlingStack:s,startClocks:u,nonErrorPrefix:"Provided",source:pr.CUSTOM,handling:"handled"});e.notify(12,{customerContext:c,savedCommonContext:i,error:h})}}}function mh(e,t,r){var n={date:e.startClocks.timeStamp,error:{id:ke(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser"},type:"error"},i=t.isInForegroundAt(e.startClocks.relative);i&&(n.view={in_foreground:i});var o=r.findFeatureFlagEvaluations(e.startClocks.relative);return o&&!Je(o)&&(n.feature_flags=o),{rawRumEvent:n,startTime:e.startClocks.relative,domainContext:{error:e.originalError}}}function yh(e,t){e.subscribe(0,function(r){for(var n=0,i=r;n<i.length;n++){var o=i[n];if(o.entryType!=="longtask")break;var s=t.findTrackedSession(o.startTime);if(!s||!s.longTaskAllowed)break;var u=Ci(o.startTime),c={date:u.timeStamp,long_task:{id:ke(),duration:te(o.duration)},type:"long_task",_dd:{discarded:!1}};e.notify(10,{rawRumEvent:c,startTime:u.relative,domainContext:{performanceEntry:o.toJSON()}})}})}function bh(e){if(!(!performance||!("getEntriesByName"in performance))){var t=performance.getEntriesByName(e.url,"resource");if(!(!t.length||!("toJSON"in t[0]))){var r=t.map(function(n){return n.toJSON()}).filter(Ss).filter(function(n){return Eh(n,e.startClocks.relative,zs({startTime:e.startClocks.relative,duration:e.duration}))});if(r.length===1)return r[0]}}}function zs(e){return Gt(e.startTime,e.duration)}function Eh(e,t,r){var n=1;return e.startTime>=t-n&&zs(e)<=Gt(r,n)}function Sh(e,t,r,n){e.subscribe(6,function(i){e.notify(10,wh(i,t,r,n))}),e.subscribe(0,function(i){for(var o=0,s=i;o<s.length;o++){var u=s[o];u.entryType==="resource"&&!Hd(u)&&e.notify(10,Th(u,t,r,n))}})}function wh(e,t,r,n){var i,o=e.type==="xhr"?"xhr":"fetch",s=bh(e),u=s?Ci(s.startTime):e.startClocks,c=s?qs(s):void 0,d=kh(e,t),h=Vs(r,u),_=te(e.duration),v=Gs(n,u,(i=s==null?void 0:s.duration)!==null&&i!==void 0?i:e.duration),y=zt({date:u.timeStamp,resource:{id:ke(),type:o,duration:_,method:e.method,status_code:e.status,url:e.url},type:"resource"},d,c,h,v);return{startTime:u.relative,rawRumEvent:y,domainContext:{performanceEntry:s&&s,xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error}}}function Th(e,t,r,n){var i=qd(e),o=qs(e),s=Ci(e.startTime),u=Ah(e,t),c=Vs(r,s),d=Gs(n,s,e.duration),h=zt({date:s.timeStamp,resource:{id:ke(),type:i,url:e.name},type:"resource"},u,o,c,d);return{startTime:s.relative,rawRumEvent:h,domainContext:{performanceEntry:e}}}function qs(e){return{resource:V({duration:Vd(e),size:$d(e)},Gd(e))}}function kh(e,t){var r=e.traceSampled&&e.traceId&&e.spanId;if(r)return{_dd:{span_id:e.spanId.toDecimalString(),trace_id:e.traceId.toDecimalString(),rule_psr:Hs(t)}}}function Ah(e,t){var r=e.traceId;if(r)return{_dd:{trace_id:e.traceId,rule_psr:Hs(t)}}}function Hs(e){return fr(e.traceSampleRate)?e.traceSampleRate/100:void 0}function Vs(e,t){var r=e.findTrackedSession(t.relative);return{_dd:{discarded:!r||!r.resourceAllowed}}}function Gs(e,t,r){if(Tn(Pt.RESOURCE_PAGE_STATES))return{_dd:{page_states:e.findAll(t.relative,r),page_was_discarded:String(document.wasDiscarded)}}}var kr,fo;function Zi(e){return e===void 0&&(e=window),kr||(document.visibilityState==="hidden"?kr={timeStamp:0}:(kr={timeStamp:1/0},fo=ge(e,["pagehide","visibilitychange"],function(t){(t.type==="pagehide"||document.visibilityState==="hidden")&&(kr.timeStamp=t.timeStamp,fo())},{capture:!0}).stop)),kr}var $s=10*Te,xh=5*Te;function Ih(e,t,r){var n={};function i(h){V(n,h),r()}var o=Ch(e,function(h){t(h.loadEvent),i(h)}).stop,s=Oh(e,function(h){return i({firstContentfulPaint:h})}).stop,u=Rh(e,window,function(h){i({largestContentfulPaint:h})}).stop,c=Nh(e,function(h){var _=h.firstInputDelay,v=h.firstInputTime;i({firstInputDelay:_,firstInputTime:v})}).stop;function d(){o(),s(),u(),c()}return{stop:d,timings:n,scheduleStop:function(){pe(d,xh)}}}function Ch(e,t){var r=e.subscribe(0,function(n){for(var i=0,o=n;i<o.length;i++){var s=o[i];s.entryType==="navigation"&&t({domComplete:s.domComplete,domContentLoaded:s.domContentLoadedEventEnd,domInteractive:s.domInteractive,loadEvent:s.loadEventEnd,firstByte:s.responseStart>=0&&s.responseStart<=Pe()?s.responseStart:void 0})}}).unsubscribe;return{stop:r}}function Oh(e,t){var r=Zi(),n=e.subscribe(0,function(i){var o=Pr(i,function(s){return s.entryType==="paint"&&s.name==="first-contentful-paint"&&s.startTime<r.timeStamp&&s.startTime<$s});o&&t(o.startTime)}).unsubscribe;return{stop:n}}function Rh(e,t,r){var n=Zi(),i=1/0,o=ge(t,["pointerdown","keydown"],function(u){i=u.timeStamp},{capture:!0,once:!0}).stop,s=e.subscribe(0,function(u){var c=df(u,function(d){return d.entryType==="largest-contentful-paint"&&d.startTime<i&&d.startTime<n.timeStamp&&d.startTime<$s});c&&r(c.startTime)}).unsubscribe;return{stop:function(){o(),s()}}}function Nh(e,t){var r=Zi(),n=e.subscribe(0,function(i){var o=Pr(i,function(u){return u.entryType==="first-input"&&u.startTime<r.timeStamp});if(o){var s=we(o.startTime,o.processingStart);t({firstInputDelay:s>=0?s:0,firstInputTime:o.startTime})}}).unsubscribe;return{stop:n}}function Lh(e,t,r,n,i,o){var s={},u=Dh(e,t,r,i,o,function(_){s.loadingTime=_,n()}),c=u.stop,d=u.setLoadEvent,h;return Ph()?(s.cumulativeLayoutShift=0,h=Mh(e,function(_){s.cumulativeLayoutShift=_,n()}).stop):h=re,{stop:function(){c(),h()},setLoadEvent:d,viewMetrics:s}}function Dh(e,t,r,n,i,o){var s=n==="initial_load",u=!0,c=[];function d(){!u&&!s&&c.length>0&&o(Math.max.apply(Math,c))}var h=Yi(e,t,r,function(_){u&&(u=!1,_.hadActivity&&c.push(we(i.timeStamp,_.end)),d())}).stop;return{stop:h,setLoadEvent:function(_){s&&(s=!1,c.push(_),d())}}}function Mh(e,t){var r=0,n=Uh(),i=e.subscribe(0,function(o){for(var s=0,u=o;s<u.length;s++){var c=u[s];c.entryType==="layout-shift"&&!c.hadRecentInput&&(n.update(c),n.value()>r&&(r=n.value(),t(Lo(r,4))))}}).unsubscribe;return{stop:i}}function Uh(){var e=0,t,r;return{update:function(n){var i=t===void 0||n.startTime-r>=Ce||n.startTime-t>=5*Ce;i?(t=r=n.startTime,e=n.value):(e+=n.value,r=n.startTime)},value:function(){return e}}}function Ph(){return _n("layout-shift")}var Fh=5*Te;function Bh(e,t,r){var n=Rs({lifeCycle:e,isChildEvent:function(s){return s.view.id===t},onChange:r}),i=n.stop,o=n.eventCounts;return{scheduleStop:function(){pe(i,Fh)},eventCounts:o}}var zh=3e3,qh=5*Te;function Hh(e,t,r,n,i,o,s){var u=d("initial_load",Mo(),s);h();var c;o&&(c=_(i));function d(v,y,b){return Vh(t,r,n,e,v,y,b)}function h(){t.subscribe(8,function(){u=d("route_change",void 0,{name:u.name,service:u.service,version:u.version})}),t.subscribe(7,function(){u.end({sessionIsActive:!1})}),t.subscribe(9,function(v){(v.reason===Dt.UNLOADING||v.reason===Dt.PAGEHIDE)&&u.end()})}function _(v){return v.subscribe(function(y){var b=y.oldLocation,T=y.newLocation;$h(b,T)&&(u.end(),u=d("route_change"))})}return{addTiming:function(v,y){y===void 0&&(y=ue()),u.addTiming(v,y)},startView:function(v,y){u.end({endClocks:y}),u=d("route_change",y,v)},stop:function(){c==null||c.unsubscribe(),u.end()}}}function Vh(e,t,r,n,i,o,s){o===void 0&&(o=Se());var u=ke(),c={},d=0,h,_=Nr(n),v=!0,y,b,T;s&&(y=s.name,b=s.service,T=s.version),e.notify(2,{id:u,name:y,startClocks:o,service:b,version:T});var I=St($,zh,{leading:!1}),R=I.throttled,k=I.cancel,L=Lh(e,t,r,R,i,o),Z=L.setLoadEvent,F=L.stop,Y=L.viewMetrics,ae=i==="initial_load"?Ih(e,Z,R):{scheduleStop:re,timings:{}},W=ae.scheduleStop,ee=ae.timings,Oe=Bh(e,u,R),C=Oe.scheduleStop,N=Oe.eventCounts,me=Fr($,qh);$();function $(){k(),d+=1;var he=h===void 0?ue():h.timeStamp;e.notify(3,V({customTimings:c,documentVersion:d,id:u,name:y,service:b,version:T,loadingType:i,location:_,startClocks:o,timings:ee,duration:we(o.timeStamp,he),isActive:h===void 0,sessionIsActive:v,eventCounts:N},Y))}return{name:y,service:b,version:T,end:function(he){var ye,Re;he===void 0&&(he={}),!h&&(h=(ye=he.endClocks)!==null&&ye!==void 0?ye:Se(),v=(Re=he.sessionIsActive)!==null&&Re!==void 0?Re:!0,e.notify(4,{endClocks:h}),Li(me),F(),W(),C(),$())},addTiming:function(he,ye){if(!h){var Re=of(ye)?ye:we(o.timeStamp,ye);c[Gh(he)]=Re,R()}}}}function Gh(e){var t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&U.warn("Invalid timing name: ".concat(e,", sanitized to: ").concat(t)),t}function $h(e,t){return e.pathname!==t.pathname||!Yh(t.hash)&&lo(t.hash)!==lo(e.hash)}function Yh(e){var t=e.substr(1);return!!document.getElementById(t)}function lo(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}function Kh(e,t,r,n,i,o,s,u,c){return e.subscribe(3,function(d){return e.notify(10,jh(d,o,s,u))}),Hh(r,e,n,t,i,!t.trackViewsManually,c)}function jh(e,t,r,n){var i=n.getReplayStats(e.id),o=r.findFeatureFlagEvaluations(e.startClocks.relative),s={_dd:{document_version:e.documentVersion,replay_stats:i},date:e.startClocks.timeStamp,type:"view",view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.cumulativeLayoutShift,first_byte:te(e.timings.firstByte),dom_complete:te(e.timings.domComplete),dom_content_loaded:te(e.timings.domContentLoaded),dom_interactive:te(e.timings.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:te(e.timings.firstContentfulPaint),first_input_delay:te(e.timings.firstInputDelay),first_input_time:te(e.timings.firstInputTime),is_active:e.isActive,name:e.name,largest_contentful_paint:te(e.timings.largestContentfulPaint),load_event:te(e.timings.loadEvent),loading_time:Zh(te(e.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},resource:{count:e.eventCounts.resourceCount},time_spent:te(e.duration),in_foreground_periods:t.selectInForegroundPeriodsFor(e.startClocks.relative,e.duration)},feature_flags:o&&!Je(o)?o:void 0,session:{has_replay:i?!0:void 0,is_active:e.sessionIsActive?void 0:!1}};return Je(e.customTimings)||(s.view.custom_timings=_f(e.customTimings,te)),{rawRumEvent:s,startTime:e.startClocks.relative,domainContext:{location:e.location}}}function Zh(e){return fr(e)&&e<0?void 0:e}var Xh="rum";function Wh(e,t){var r=zl(e.cookieOptions,Xh,function(n){return Qh(e,n)});return r.expireObservable.subscribe(function(){t.notify(7)}),r.renewObservable.subscribe(function(){t.notify(8)}),{findTrackedSession:function(n){var i=r.findActiveSession(n);if(!(!i||!Ys(i.trackingType))){var o=i.trackingType==="1"?2:1;return{id:i.id,plan:o,sessionReplayAllowed:o===2,longTaskAllowed:e.trackLongTasks!==void 0?e.trackLongTasks:e.oldPlansBehavior&&o===2,resourceAllowed:e.trackResources!==void 0?e.trackResources:e.oldPlansBehavior&&o===2}}},expire:r.expire,expireObservable:r.expireObservable}}function Jh(){var e={id:"00000000-aaaa-0000-aaaa-000000000000",plan:1,sessionReplayAllowed:!1,longTaskAllowed:!0,resourceAllowed:!0};return{findTrackedSession:function(){return e},expire:re,expireObservable:new se}}function Qh(e,t){var r;return ev(t)?r=t:ir(e.sessionSampleRate)?ir(e.sessionReplaySampleRate)?r="1":r="2":r="0",{trackingType:r,isTracked:Ys(r)}}function ev(e){return e==="0"||e==="1"||e==="2"}function Ys(e){return e==="2"||e==="1"}function tv(e,t,r,n,i,o){var s=rv(e,n,i,o);return t.subscribe(11,function(u){u.type==="view"?s.upsert(u,u.view.id):s.add(u)}),r.subscribe(function(u){return s.add(u,bl(e))}),s}function rv(e,t,r,n){var i=d(e.rumEndpointBuilder),o=i.batch,s=i.flushController,u,c=e.replica;c!==void 0&&(u=d(c.rumEndpointBuilder).batch);function d(_){var v=id({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:r,sessionExpireObservable:n}),y=new rd(hs(_,e.batchBytesLimit,t),v,e.messageBytesLimit);return{batch:y,flushController:v}}function h(_){return zt(_,{application:{id:c.applicationId}})}return{flushObservable:s.flushObservable,add:function(_,v){v===void 0&&(v=!0),o.add(_),u&&v&&u.add(h(_))},upsert:function(_,v){o.upsert(_,v),u&&u.upsert(h(_),v)}}}function nv(e){var t=Fi();e.subscribe(11,function(r){t.send("rum",r)})}var iv=Hr;function av(e,t,r){var n=new qr(iv),i;e.subscribe(4,function(u){var c=u.endClocks;n.closeActive(c.relative)}),e.subscribe(2,function(u){var c=u.startClocks,d=r.href;n.add(s({url:d,referrer:i||document.referrer}),c.relative),i=d});var o=t.subscribe(function(u){var c=u.newLocation,d=n.find();if(d){var h=Pe();n.closeActive(h),n.add(s({url:c.href,referrer:d.referrer}),h)}});function s(u){var c=u.url,d=u.referrer;return{url:c,referrer:d}}return{findUrl:function(u){return n.find(u)},stop:function(){o.unsubscribe(),n.stop()}}}function ov(e){var t=Nr(e),r=new se(function(){var i=sv(n).stop,o=uv(n).stop;return function(){i(),o()}});function n(){if(t.href!==e.href){var i=Nr(e);r.notify({newLocation:i,oldLocation:t}),t=i}}return r}function sv(e){var t=be(history,"pushState",{after:e}).stop,r=be(history,"replaceState",{after:e}).stop,n=ie(window,"popstate",e).stop;return{stop:function(){t(),r(),n()}}}function uv(e){return ie(window,"hashchange",e)}var cv=Hr,fv=200;function lv(e,t){if(t===void 0&&(t=ln),!Tn(Pt.FEATURE_FLAGS))return{findFeatureFlagEvaluations:function(){},getFeatureFlagBytesCount:function(){return 0},addFeatureFlagEvaluation:re,stop:re};var r=new qr(cv),n=0,i=!1;e.subscribe(4,function(c){var d=c.endClocks;r.closeActive(d.relative)}),e.subscribe(2,function(c){var d=c.startClocks;r.add({},d.relative),n=0});var o=St(function(c){n=t($t(c)),i||(i=_s(n,"feature flag evaluation"))},fv),s=o.throttled,u=o.cancel;return{findFeatureFlagEvaluations:function(c){return r.find(c)},getFeatureFlagBytesCount:function(){var c=r.find();return c?n:0},addFeatureFlagEvaluation:function(c,d){var h=r.find();h&&(h[c]=d,s(h))},stop:u}}var dv=10*Ce,Xe,Nt,Ti;function pv(e,t,r,n,i,o,s){var u=t.enabled&&ir(e.customerDataTelemetrySampleRate);u&&(Ks(),po(),r.subscribe(11,function(c){Ti=!0,Ar(Nt.globalContextBytes,Je(n.get())?0:n.getBytesCount()),Ar(Nt.userContextBytes,Je(i.get())?0:i.getBytesCount());var d=o.findFeatureFlagEvaluations(),h=tt(["view","error"],c.type)&&d&&!Je(d);Ar(Nt.featureFlagBytes,h?o.getFeatureFlagBytesCount():0)}),s.subscribe(function(c){var d=c.bytesCount,h=c.messagesCount;Ti&&(Xe.batchCount+=1,Ar(Xe.batchBytesCount,d),Ar(Xe.batchMessagesCount,h),ci(Xe.globalContextBytes,Nt.globalContextBytes),ci(Xe.userContextBytes,Nt.userContextBytes),ci(Xe.featureFlagBytes,Nt.featureFlagBytes),po())}),Fr(hv,dv))}function hv(){Xe.batchCount!==0&&(xn("Customer data measures",Xe),Ks())}function _t(){return{min:1/0,max:0,sum:0}}function Ar(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function ci(e,t){e.sum+=t.sum,e.min=Math.min(e.min,t.min),e.max=Math.max(e.max,t.max)}function Ks(){Xe={batchCount:0,batchBytesCount:_t(),batchMessagesCount:_t(),globalContextBytes:_t(),userContextBytes:_t(),featureFlagBytes:_t()}}function po(){Ti=!1,Nt={globalContextBytes:_t(),userContextBytes:_t(),featureFlagBytes:_t()}}var vv=500,tr=[],fi;function _v(){un(ho());var e=ge(window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],function(t){t.isTrusted&&(t.type==="freeze"?un("frozen"):t.type==="pagehide"?un(t.persisted?"frozen":"terminated"):un(ho()))},{capture:!0}).stop;return{findAll:function(t,r){for(var n=[],i=Gt(t,r),o=tr.length-1;o>=0;o--){var s=tr[o].startTime;if(!(s>=i)&&(n.unshift(tr[o]),s<t))break}return n.length?n:void 0},stop:e}}function ho(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function un(e,t){t===void 0&&(t=vv),e!==fi&&(fi=e,tr.length===t&&tr.shift(),tr.push({state:fi,startTime:Pe()}))}function gv(e,t,r,n,i,o){var s=new wp;s.subscribe(11,function(C){return pn("rum",C)});var u=mv(t);u.setContextProvider(function(){var C,N;return{application:{id:t.applicationId},session:{id:(C=h.findTrackedSession())===null||C===void 0?void 0:C.id},view:{id:(N=I.findView())===null||N===void 0?void 0:N.id},action:{id:L.findActionId()}}});var c=function(C){s.notify(12,{error:C})},d=lv(s),h=sr()?Jh():Wh(t,s);if(sr())nv(s);else{var _=td();_.subscribe(function(C){s.notify(9,C)});var v=tv(t,s,u.observable,c,_,h.expireObservable);pv(t,u,s,n,i,d,v.flushObservable)}var y=Bd(),b=ov(location),T=yv(s,t,location,h,b,y,function(){return Si(n,i,r)},c),I=T.viewContexts,R=T.foregroundContexts,k=T.urlContexts,L=T.actionContexts,Z=T.addAction;El(Pd(e)),yh(s,h);var F=_v();Sh(s,t,h,F);var Y=Kh(s,t,location,y,b,R,d,r,o),ae=Y.addTiming,W=Y.startView,ee=_h(s,R,d).addError;Ap(s,t,h),Qd(s,t);var Oe=Sp(t.applicationId,h,I,L,k);return{addAction:Z,addError:ee,addTiming:ae,addFeatureFlagEvaluation:d.addFeatureFlagEvaluation,startView:W,lifeCycle:s,viewContexts:I,session:h,stopSession:function(){return h.expire()},getInternalContext:Oe.get}}function mv(e){var t=yl("browser-rum-sdk",e);if(sr()){var r=Fi();t.observable.subscribe(function(n){return r.send("internal_telemetry",n)})}return t}function yv(e,t,r,n,i,o,s,u){var c=kp(e),d=av(e,i,r),h=_p(),_=ph(e,o,t,h),v=_.addAction,y=_.actionContexts;return lp(t,e,n,c,d,y,s,u),{viewContexts:c,foregroundContexts:h,urlContexts:d,addAction:v,actionContexts:y,stop:function(){c.stop(),h.stop()}}}function bv(e,t){var r=t.session,n=t.viewContext,i=t.errorType,o=r?r.id:"no-session-id",s=[];i!==void 0&&s.push("error-type=".concat(i)),n&&(s.push("seed=".concat(n.id)),s.push("from=".concat(n.startClocks.timeStamp)));var u=Ev(e),c="/rum/replay/sessions/".concat(o);return"".concat(u).concat(c,"?").concat(s.join("&"))}function Ev(e){var t=e.site,r=e.subdomain||Sv(e);return"https://".concat(r?"".concat(r,"."):"").concat(t)}function Sv(e){switch(e.site){case er:case Tf:return"app";case $o:return"dd";default:return}}var Me={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},qt={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},We={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},De={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},vo={Play:0,Pause:1};function vt(e,t){return{data:V({source:e},t),type:Me.IncrementalSnapshot,timestamp:ue()}}var B={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Cr.ALLOW,MASK:Cr.MASK,MASK_USER_INPUT:Cr.MASK_USER_INPUT},Xi="data-dd-privacy",wv="allow",Tv="mask",kv="mask-user-input",js="hidden",Av="dd-privacy-allow",xv="dd-privacy-mask",Iv="dd-privacy-mask-user-input",Cv="dd-privacy-hidden",Mt="***",Ov="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",Rv={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},Nv=1e5,Lv="x";function rt(e,t){var r=On(e),n=r?rt(r,t):t,i=Xs(e);return Zs(i,n)}function Zs(e,t){switch(t){case B.HIDDEN:case B.IGNORE:return t}switch(e){case B.ALLOW:case B.MASK:case B.MASK_USER_INPUT:case B.HIDDEN:case B.IGNORE:return e;default:return t}}function Xs(e){if(Vi(e)){var t=e.getAttribute(Xi);if(e.tagName==="BASE")return B.ALLOW;if(e.tagName==="INPUT"){var r=e;if(r.type==="password"||r.type==="email"||r.type==="tel"||r.type==="hidden")return B.MASK;var n=r.getAttribute("autocomplete");if(n&&n.indexOf("cc-")===0)return B.MASK}if(t===js||e.classList.contains(Cv))return B.HIDDEN;if(t===Tv||e.classList.contains(xv))return B.MASK;if(t===kv||e.classList.contains(Iv))return B.MASK_USER_INPUT;if(t===wv||e.classList.contains(Av))return B.ALLOW;if(Mv(e))return B.IGNORE}}function Rn(e,t){switch(t){case B.MASK:case B.HIDDEN:case B.IGNORE:return!0;case B.MASK_USER_INPUT:return Ts(e)?_o(e.parentNode):_o(e);default:return!1}}function _o(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;var t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!Rv[t.tagName]}var Dv=function(e){return e.replace(/\S/g,Lv)};function Ws(e,t,r){var n,i=(n=e.parentElement)===null||n===void 0?void 0:n.tagName,o=e.textContent||"";if(!(t&&!o.trim())){var s=r,u=i==="STYLE"?!0:void 0,c=i==="SCRIPT";if(c)o=Mt;else if(s===B.HIDDEN)o=Mt;else if(Rn(e,s)&&!u)if(i==="DATALIST"||i==="SELECT"||i==="OPTGROUP"){if(!o.trim())return}else i==="OPTION"?o=Mt:o=Dv(o);return o}}function Mv(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){var t=i("rel");return/preload|prefetch/i.test(t)&&i("as")==="script"||t==="shortcut icon"||t==="icon"}if(e.nodeName==="META"){var r=i("name"),t=i("rel"),n=i("property");return/^msapplication-tile(image|color)$/.test(r)||r==="application-name"||t==="icon"||t==="apple-touch-icon"||t==="shortcut icon"||r==="keywords"||r==="description"||/^(og|twitter|fb):/.test(n)||/^(og|twitter):/.test(r)||r==="pinterest"||r==="robots"||r==="googlebot"||r==="bingbot"||e.hasAttribute("http-equiv")||r==="author"||r==="generator"||r==="framework"||r==="publisher"||r==="progid"||/^article:/.test(n)||/^product:/.test(n)||r==="google-site-verification"||r==="yandex-verification"||r==="csrf-token"||r==="p:domain_verify"||r==="verify-v1"||r==="verification"||r==="shopify-checkout-api-token"}function i(o){return(e.getAttribute(o)||"").toLowerCase()}return!1}var Wi=new WeakMap;function Ke(e){return Wi.has(e)}function Uv(e){for(var t=e;t;){if(!Ke(t)&&!Gi(t))return!1;t=On(t)}return!0}function _e(e){return Wi.get(e)}function Pv(e,t){Wi.set(e,t)}function Ji(e,t){var r=e.tagName,n=e.value;if(Rn(e,t)){var i=e.type;return r==="INPUT"&&(i==="button"||i==="submit"||i==="reset")?n:!n||r==="OPTION"?void 0:Mt}if(r==="OPTION"||r==="SELECT")return e.value;if(!(r!=="INPUT"&&r!=="TEXTAREA"))return n}var Fv=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,Bv=/^[A-Za-z]+:|^\/\//,zv=/^data:.*,/i;function qv(e,t){return e.replace(Fv,function(r,n,i,o,s,u){var c=i||s||u;if(!t||!c||Bv.test(c)||zv.test(c))return r;var d=n||o||"";return"url(".concat(d).concat(Hv(c,t)).concat(d,")")})}function Hv(e,t){try{return Br(e,t).href}catch{return e}}var Vv=/[^a-z1-6-_]/;function Js(e){var t=e.toLowerCase().trim();return Vv.test(t)?"div":t}function Qs(e){if(!(e===void 0||e.length===0))return e.map(function(t){var r=t.cssRules||t.rules,n=Array.from(r,function(o){return o.cssText}),i={cssRules:n,disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0};return i})}function eu(e,t,r,n){if(t===B.HIDDEN)return null;var i=e.getAttribute(r);if(t===B.MASK&&r!==Xi&&!Us.includes(r)&&r!==n.actionNameAttribute){var o=e.tagName;switch(r){case"title":case"alt":case"placeholder":return Mt}if((o==="IMG"||o==="SOURCE")&&(r==="src"||r==="srcset"))return Ov;if(o==="A"&&r==="href"||i&&An(r,"data-"))return Mt}return!i||typeof i!="string"?i:i.length>Nv&&i.slice(0,5)==="data:"?"data:truncated":i}function Gv(e,t,r){var n;if(t===B.HIDDEN)return{};for(var i={},o=Js(e.tagName),s=e.ownerDocument,u=0;u<e.attributes.length;u+=1){var c=e.attributes.item(u),d=c.name,h=eu(e,t,d,r.configuration);h!==null&&(i[d]=h)}if(e.value&&(o==="textarea"||o==="select"||o==="option"||o==="input")){var _=Ji(e,t);_!==void 0&&(i.value=_)}if(o==="option"&&t===B.ALLOW){var v=e;v.selected&&(i.selected=v.selected)}if(o==="link"){var y=Array.from(s.styleSheets).find(function(Z){return Z.href===e.href}),b=ki(y);b&&y&&(i._cssText=b)}if(o==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var b=ki(e.sheet);b&&(i._cssText=b)}var T=e;if(o==="input"&&(T.type==="radio"||T.type==="checkbox")&&(t===B.ALLOW?i.checked=!!T.checked:Rn(T,t)&&delete i.checked),o==="audio"||o==="video"){var I=e;i.rr_mediaState=I.paused?"paused":"played"}var R,k,L=r.serializationContext;switch(L.status){case 0:R=Math.round(e.scrollTop),k=Math.round(e.scrollLeft),(R||k)&&L.elementsScrollPositions.set(e,{scrollTop:R,scrollLeft:k});break;case 1:L.elementsScrollPositions.has(e)&&(n=L.elementsScrollPositions.get(e),R=n.scrollTop,k=n.scrollLeft);break}return k&&(i.rr_scrollLeft=k),R&&(i.rr_scrollTop=R),i}function ki(e){if(!e)return null;var t;try{t=e.rules||e.cssRules}catch{}if(!t)return null;var r=Array.from(t,$v).join("");return qv(r,e.href)}function $v(e){return Yv(e)?ki(e.styleSheet)||"":e.cssText}function Yv(e){return"styleSheet"in e}function Nn(e,t){var r=Zv(e,t);if(!r)return null;var n=_e(e)||jv(),i=r;return i.id=n,Pv(e,n),t.serializedNodeIds&&t.serializedNodeIds.add(n),i}var Kv=1;function jv(){return Kv++}function Qi(e,t){var r=[];return e.childNodes.forEach(function(n){var i=Nn(n,t);i&&r.push(i)}),r}function Zv(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return Xv(e,t);case e.DOCUMENT_FRAGMENT_NODE:return Wv(e,t);case e.DOCUMENT_TYPE_NODE:return Jv(e);case e.ELEMENT_NODE:return Qv(e,t);case e.TEXT_NODE:return t_(e,t);case e.CDATA_SECTION_NODE:return r_()}}function Xv(e,t){return{type:qt.Document,childNodes:Qi(e,t),adoptedStyleSheets:Qs(e.adoptedStyleSheets)}}function Wv(e,t){var r=[];e.childNodes.length&&(r=Qi(e,t));var n=Gi(e);return n&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:qt.DocumentFragment,childNodes:r,isShadowRoot:n,adoptedStyleSheets:n?Qs(e.adoptedStyleSheets):void 0}}function Jv(e){return{type:qt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId}}function Qv(e,t){var r,n=Js(e.tagName),i=e_(e)||void 0,o=Zs(Xs(e),t.parentNodePrivacyLevel);if(o===B.HIDDEN){var s=e.getBoundingClientRect(),u=s.width,c=s.height;return{type:qt.Element,tagName:n,attributes:(r={rr_width:"".concat(u,"px"),rr_height:"".concat(c,"px")},r[Xi]=js,r),childNodes:[],isSVG:i}}if(o!==B.IGNORE){var d=Gv(e,o,t),h=[];if(e.childNodes.length){var _=void 0;t.parentNodePrivacyLevel===o&&t.ignoreWhiteSpace===(n==="head")?_=t:_=V({},t,{parentNodePrivacyLevel:o,ignoreWhiteSpace:n==="head"}),h=Qi(e,_)}if(Cn(e)){var v=Nn(e.shadowRoot,t);v!==null&&h.push(v)}return{type:qt.Element,tagName:n,attributes:d,childNodes:h,isSVG:i}}}function e_(e){return e.tagName==="svg"||e instanceof SVGElement}function t_(e,t){var r,n=(r=e.parentElement)===null||r===void 0?void 0:r.tagName,i=Ws(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(i)return{type:qt.Text,textContent:i,isStyle:n==="STYLE"?!0:void 0}}function r_(){return{type:qt.CDATA,textContent:""}}function n_(e,t,r){return Nn(e,{serializationContext:r,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function tu(e){return!!e.changedTouches}function Vr(e){return e.composed===!0&&Cn(e.target)?e.composedPath()[0]:e.target}var go=25;function i_(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>go||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>go}var a_=function(e,t){var r=window.visualViewport,n={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(r)i_(r)?(n.layoutViewportX=Math.round(e+r.offsetLeft),n.layoutViewportY=Math.round(t+r.offsetTop)):(n.visualViewportX=Math.round(e-r.offsetLeft),n.visualViewportY=Math.round(t-r.offsetTop));else return n;return n},ru=function(e){return{scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width}};function nu(){var e,t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function iu(){var e,t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}var o_=50;function s_(e){var t=St(function(r){var n=Vr(r);if(Ke(n)){var i=au(r);if(!i)return;var o={id:_e(n),timeOffset:0,x:i.x,y:i.y};e([o],tu(r)?We.TouchMove:We.MouseMove)}},o_,{trailing:!1}).throttled;return ge(document,["mousemove","touchmove"],t,{capture:!0,passive:!0}).stop}function au(e){var t=tu(e)?e.changedTouches[0]:e,r=t.clientX,n=t.clientY;if(window.visualViewport){var i=a_(r,n),o=i.visualViewportX,s=i.visualViewportY;r=o,n=s}if(!Number.isFinite(r)||!Number.isFinite(n)){e.isTrusted&&xn("mouse/touch event without x/y");return}return{x:r,y:n}}var u_=100;function c_(e,t,r){var n=St(function(i){var o=Vr(i);if(!(!o||rt(o,t)===B.HIDDEN||!Ke(o))){var s=_e(o),u=o===document?{scrollTop:iu(),scrollLeft:nu()}:{scrollTop:Math.round(o.scrollTop),scrollLeft:Math.round(o.scrollLeft)};r.set(o,u),e({id:s,x:u.scrollLeft,y:u.scrollTop})}},u_).throttled;return ie(document,"scroll",n,{capture:!0,passive:!0}).stop}var Le,mo=(Le={},Le.pointerup=De.MouseUp,Le.mousedown=De.MouseDown,Le.click=De.Click,Le.contextmenu=De.ContextMenu,Le.dblclick=De.DblClick,Le.focus=De.Focus,Le.blur=De.Blur,Le.touchstart=De.TouchStart,Le.touchend=De.TouchEnd,Le);function f_(e,t,r){var n=function(i){var o=Vr(i);if(!(rt(o,t)===B.HIDDEN||!Ke(o))){var s=_e(o),u=mo[i.type],c;if(u!==De.Blur&&u!==De.Focus){var d=au(i);if(!d)return;c={id:s,type:u,x:d.x,y:d.y}}else c={id:s,type:u};var h=V({id:r.getIdForEvent(i)},vt(We.MouseInteraction,c));e(h)}};return ge(document,Object.keys(mo),n,{capture:!0,passive:!0}).stop}function ou(e,t,r){var n=r===void 0?{}:r,i=n.domEvents,o=i===void 0?["input","change"]:i,s=n.target,u=s===void 0?document:s,c=new WeakMap;function d(y){var b=rt(y,t);if(b!==B.HIDDEN){var T=y.type,I;if(T==="radio"||T==="checkbox"){if(Rn(y,b))return;I={isChecked:y.checked}}else{var R=Ji(y,b);if(R===void 0)return;I={text:R}}h(y,I);var k=y.name;T==="radio"&&k&&y.checked&&pf(document.querySelectorAll('input[type="radio"][name="'.concat(k,'"]')),function(L){L!==y&&h(L,{isChecked:!1})})}}function h(y,b){if(Ke(y)){var T=c.get(y);(!T||T.text!==b.text||T.isChecked!==b.isChecked)&&(c.set(y,b),e(V({id:_e(y)},b)))}}var _=ge(u,o,function(y){var b=Vr(y);(b instanceof HTMLInputElement||b instanceof HTMLTextAreaElement||b instanceof HTMLSelectElement)&&d(b)},{capture:!0,passive:!0}).stop,v=[wr(HTMLInputElement.prototype,"value",d),wr(HTMLInputElement.prototype,"checked",d),wr(HTMLSelectElement.prototype,"value",d),wr(HTMLTextAreaElement.prototype,"value",d),wr(HTMLSelectElement.prototype,"selectedIndex",d)];return function(){v.forEach(function(y){return y.stop()}),_()}}function l_(e){function t(i,o){i&&Ke(i.ownerNode)&&o(_e(i.ownerNode))}var r=[be(CSSStyleSheet.prototype,"insertRule",{before:function(i,o){t(this,function(s){return e({id:s,adds:[{rule:i,index:o}]})})}}),be(CSSStyleSheet.prototype,"deleteRule",{before:function(i){t(this,function(o){return e({id:o,removes:[{index:i}]})})}})];typeof CSSGroupingRule<"u"?n(CSSGroupingRule):(n(CSSMediaRule),n(CSSSupportsRule));function n(i){r.push(be(i.prototype,"insertRule",{before:function(o,s){var u=this;t(this.parentStyleSheet,function(c){var d=yo(u);d&&(d.push(s||0),e({id:c,adds:[{rule:o,index:d}]}))})}}),be(i.prototype,"deleteRule",{before:function(o){var s=this;t(this.parentStyleSheet,function(u){var c=yo(s);c&&(c.push(o),e({id:u,removes:[{index:c}]}))})}}))}return function(){return r.forEach(function(i){return i.stop()})}}function yo(e){for(var t=[],r=e;r.parentRule;){var n=Array.from(r.parentRule.cssRules),i=n.indexOf(r);t.unshift(i),r=r.parentRule}if(r.parentStyleSheet){var o=Array.from(r.parentStyleSheet.cssRules),s=o.indexOf(r);return t.unshift(s),t}}function d_(e,t){var r=function(n){var i=Vr(n);!i||rt(i,t)===B.HIDDEN||!Ke(i)||e({id:_e(i),type:n.type==="play"?vo.Play:vo.Pause})};return ge(document,["play","pause"],r,{capture:!0,passive:!0}).stop}function p_(e,t,r){return e.subscribe(10,function(n){var i,o,s;n.rawRumEvent.type==="action"&&n.rawRumEvent.action.type==="click"&&(!((o=(i=n.rawRumEvent.action.frustration)===null||i===void 0?void 0:i.type)===null||o===void 0)&&o.length)&&"events"in n.domainContext&&(!((s=n.domainContext.events)===null||s===void 0)&&s.length)&&t({timestamp:n.rawRumEvent.date,type:Me.FrustrationRecord,data:{frustrationTypes:n.rawRumEvent.action.frustration.type,recordIds:n.domainContext.events.map(function(u){return r.getIdForEvent(u)})}})}).unsubscribe}var h_=200;function v_(e){return xs().subscribe(e).unsubscribe}function __(e){var t=window.visualViewport;if(!t)return re;var r=St(function(){e(ru(t))},h_,{trailing:!1}),n=r.throttled,i=r.cancel,o=ge(t,["resize","scroll"],n,{capture:!0,passive:!0}).stop;return function(){o(),i()}}var g_=100;function m_(e){var t=re,r=[];function n(){t(),e(r),r=[]}return{addMutations:function(i){r.length===0&&(t=y_(n,{timeout:g_})),r.push.apply(r,i)},flush:n,stop:function(){t()}}}function y_(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){var r=window.requestIdleCallback(D(e),t);return function(){return window.cancelIdleCallback(r)}}var n=window.requestAnimationFrame(D(e));return function(){return window.cancelAnimationFrame(n)}}function su(e,t,r,n){var i=bs();if(!i)return{stop:re,flush:re};var o=m_(function(u){b_(u.concat(s.takeRecords()),e,t,r,n)}),s=new i(D(o.addMutations));return s.observe(n,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:function(){s.disconnect(),o.stop()},flush:function(){o.flush()}}}function b_(e,t,r,n,i){e.filter(function(v){return v.type==="childList"}).forEach(function(v){v.removedNodes.forEach(function(y){uu(y,n.removeShadowRoot)})});var o=e.filter(function(v){return i.contains(v.target)&&Uv(v.target)&&rt(v.target,r.defaultPrivacyLevel)!==B.HIDDEN}),s=E_(o.filter(function(v){return v.type==="childList"}),r,n),u=s.adds,c=s.removes,d=s.hasBeenSerialized,h=S_(o.filter(function(v){return v.type==="characterData"&&!d(v.target)}),r),_=w_(o.filter(function(v){return v.type==="attributes"&&!d(v.target)}),r);!h.length&&!_.length&&!c.length&&!u.length||t({adds:u,removes:c,texts:h,attributes:_})}function E_(e,t,r){for(var n=new Set,i=new Map,o=function(F){F.addedNodes.forEach(function(Y){n.add(Y)}),F.removedNodes.forEach(function(Y){n.has(Y)||i.set(Y,F.target),n.delete(Y)})},s=0,u=e;s<u.length;s++){var c=u[s];o(c)}var d=Array.from(n);T_(d);for(var h=new Set,_=[],v=0,y=d;v<y.length;v++){var b=y[v];if(!L(b)){var T=rt(b.parentNode,t.defaultPrivacyLevel);if(!(T===B.HIDDEN||T===B.IGNORE)){var I=Nn(b,{serializedNodeIds:h,parentNodePrivacyLevel:T,serializationContext:{status:2,shadowRootsController:r},configuration:t});if(I){var R=On(b);_.push({nextId:Z(b),parentId:_e(R),node:I})}}}}var k=[];return i.forEach(function(F,Y){Ke(Y)&&k.push({parentId:_e(F),id:_e(Y)})}),{adds:_,removes:k,hasBeenSerialized:L};function L(F){return Ke(F)&&h.has(_e(F))}function Z(F){for(var Y=F.nextSibling;Y;){if(Ke(Y))return _e(Y);Y=Y.nextSibling}return null}}function S_(e,t){for(var r,n=[],i=new Set,o=e.filter(function(_){return i.has(_.target)?!1:(i.add(_.target),!0)}),s=0,u=o;s<u.length;s++){var c=u[s],d=c.target.textContent;if(d!==c.oldValue){var h=rt(On(c.target),t.defaultPrivacyLevel);h===B.HIDDEN||h===B.IGNORE||n.push({id:_e(c.target),value:(r=Ws(c.target,!1,h))!==null&&r!==void 0?r:null})}}return n}function w_(e,t){for(var r=[],n=new Map,i=e.filter(function(T){var I=n.get(T.target);return I!=null&&I.has(T.attributeName)?!1:(I?I.add(T.attributeName):n.set(T.target,new Set([T.attributeName])),!0)}),o=new Map,s=0,u=i;s<u.length;s++){var c=u[s],d=c.target.getAttribute(c.attributeName);if(d!==c.oldValue){var h=rt(c.target,t.defaultPrivacyLevel),_=eu(c.target,h,c.attributeName,t),v=void 0;if(c.attributeName==="value"){var y=Ji(c.target,h);if(y===void 0)continue;v=y}else typeof _=="string"?v=_:v=null;var b=o.get(c.target);b||(b={id:_e(c.target),attributes:{}},r.push(b),o.set(c.target,b)),b.attributes[c.attributeName]=v}}return r}function T_(e){e.sort(function(t,r){var n=t.compareDocumentPosition(r);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function uu(e,t){Cn(e)&&t(e.shadowRoot),Kd(e).forEach(function(r){return uu(r,t)})}function k_(e){return ge(window,["focus","blur"],function(){e({has_focus:document.hasFocus()})}).stop}function A_(){var e=new WeakMap,t=1;return{getIdForEvent:function(r){return e.has(r)||e.set(r,t++),e.get(r)}}}function x_(e){var t=A_(),r=su(e.mutationCb,e.configuration,e.shadowRootsController,document),n=s_(e.mousemoveCb),i=f_(e.mouseInteractionCb,e.configuration.defaultPrivacyLevel,t),o=c_(e.scrollCb,e.configuration.defaultPrivacyLevel,e.elementsScrollPositions),s=v_(e.viewportResizeCb),u=ou(e.inputCb,e.configuration.defaultPrivacyLevel),c=d_(e.mediaInteractionCb,e.configuration.defaultPrivacyLevel),d=l_(e.styleSheetCb),h=k_(e.focusCb),_=__(e.visualViewportResizeCb),v=p_(e.lifeCycle,e.frustrationCb,t);return{flush:function(){r.flush()},stop:function(){r.stop(),n(),i(),o(),s(),u(),c(),d(),h(),_(),v()}}}function I_(){var e=new WeakMap;return{set:function(t,r){t===document&&!document.scrollingElement||e.set(t===document?document.scrollingElement:t,r)},get:function(t){return e.get(t)},has:function(t){return e.has(t)}}}var C_=function(e,t){var r=t.mutationCb,n=t.inputCb,i=new Map,o={addShadowRoot:function(s){var u=su(r,e,o,s),c=u.stop,d=u.flush,h=ou(n,e.defaultPrivacyLevel,{target:s,domEvents:["change"]});i.set(s,{flush:d,stop:function(){c(),h()}})},removeShadowRoot:function(s){var u=i.get(s);u&&(u.stop(),i.delete(s))},stop:function(){i.forEach(function(s){var u=s.stop;return u()})},flush:function(){i.forEach(function(s){var u=s.flush;return u()})}};return o};function O_(e){var t=e.emit;if(!t)throw new Error("emit function is required");var r=I_(),n=function(_){t(vt(We.Mutation,_))},i=function(_){return t(vt(We.Input,_))},o=C_(e.configuration,{mutationCb:n,inputCb:i}),s=function(_,v){_===void 0&&(_=ue()),v===void 0&&(v={status:0,elementsScrollPositions:r,shadowRootsController:o});var y=$i(),b=y.width,T=y.height;t({data:{height:T,href:window.location.href,width:b},type:Me.Meta,timestamp:_}),t({data:{has_focus:document.hasFocus()},type:Me.Focus,timestamp:_}),t({data:{node:n_(document,e.configuration,v),initialOffset:{left:nu(),top:iu()}},type:Me.FullSnapshot,timestamp:_}),window.visualViewport&&t({data:ru(window.visualViewport),type:Me.VisualViewport,timestamp:_})};s();var u=x_({lifeCycle:e.lifeCycle,configuration:e.configuration,elementsScrollPositions:r,inputCb:i,mediaInteractionCb:function(_){return t(vt(We.MediaInteraction,_))},mouseInteractionCb:function(_){return t(_)},mousemoveCb:function(_,v){return t(vt(v,{positions:_}))},mutationCb:n,scrollCb:function(_){return t(vt(We.Scroll,_))},styleSheetCb:function(_){return t(vt(We.StyleSheetRule,_))},viewportResizeCb:function(_){return t(vt(We.ViewportResize,_))},frustrationCb:function(_){return t(_)},focusCb:function(_){return t({data:_,type:Me.Focus,timestamp:ue()})},visualViewportResizeCb:function(_){t({data:_,type:Me.VisualViewport,timestamp:ue()})},shadowRootsController:o}),c=u.stop,d=u.flush;function h(){o.flush(),d()}return{stop:function(){o.stop(),c()},takeSubsequentFullSnapshot:function(_){h(),s(_,{shadowRootsController:o,status:1,elementsScrollPositions:r})},flushMutations:h,shadowRootsController:o}}function R_(e,t,r){var n=new FormData;n.append("segment",new Blob([e],{type:"application/octet-stream"}),"".concat(t.session.id,"-").concat(t.start));var i=V({raw_segment_size:r,compressed_segment_size:e.byteLength},t),o=JSON.stringify(i);return n.append("event",new Blob([o],{type:"application/json"})),{data:n,bytesCount:e.byteLength}}var N_=10,de;function L_(e){return Ln(e).segments_count}function D_(e){Ln(e).segments_count+=1}function bo(e){Ln(e).records_count+=1}function M_(e,t){Ln(e).segments_total_raw_size+=t}function U_(e){return de==null?void 0:de.get(e)}function Ln(e){de||(de=new Map);var t;return de.has(e)?t=de.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},de.set(e,t),de.size>N_&&P_()),t}function P_(){if(de)if(de.keys)de.delete(de.keys().next().value);else{var e=!0;de.forEach(function(t,r){e&&(de.delete(r),e=!1)})}}var F_=0,B_=function(){function e(t,r,n,i,o,s){var u=this;this.worker=t,this.id=F_++;var c=r.view.id;this.metadata=V({start:i.timestamp,end:i.timestamp,creation_reason:n,records_count:1,has_full_snapshot:i.type===Me.FullSnapshot,index_in_view:L_(c),source:"browser"},r),D_(c),bo(c);var d=ie(t,"message",function(h){var _=h.data;_.type==="errored"||_.type==="initialized"||(_.id===u.id?(M_(c,_.additionalBytesCount),_.type==="flushed"?(s(_.result,_.rawBytesCount),d()):o(_.compressedBytesCount)):_.id>u.id&&(d(),xn("Segment did not receive a 'flush' response before being replaced.")))}).stop;pn("record",{record:i,segment:this.metadata}),this.worker.postMessage({data:'{"records":['.concat(JSON.stringify(i)),id:this.id,action:"write"})}return e.prototype.addRecord=function(t){var r;this.metadata.start=Math.min(this.metadata.start,t.timestamp),this.metadata.end=Math.max(this.metadata.end,t.timestamp),this.metadata.records_count+=1,bo(this.metadata.view.id),(r=this.metadata).has_full_snapshot||(r.has_full_snapshot=t.type===Me.FullSnapshot),pn("record",{record:t,segment:this.metadata}),this.worker.postMessage({data:",".concat(JSON.stringify(t)),id:this.id,action:"write"})},e.prototype.flush=function(t){this.worker.postMessage({data:"],".concat(JSON.stringify(this.metadata).slice(1),`
`),id:this.id,action:"flush"}),this.flushReason=t},e}(),z_=30*Ce,cu=6e4;function q_(e,t,r,n,i,o){return H_(e,function(){return V_(t,r,n)},i,o)}function H_(e,t,r,n){var i={status:0,nextSegmentCreationReason:"init"},o=e.subscribe(2,function(){u("view_change")}).unsubscribe,s=e.subscribe(9,function(d){u(d.reason)}).unsubscribe;function u(d){i.status===1&&(i.segment.flush(d),Ve(i.expirationTimeoutId)),d!=="stop"?i={status:0,nextSegmentCreationReason:d}:i={status:2}}function c(d,h){var _=t();if(_){var v=new B_(n,_,d,h,function(y){!v.flushReason&&y>cu&&u("segment_bytes_limit")},function(y,b){var T=R_(y,v.metadata,b);vs(v.flushReason)?r.sendOnExit(T):r.send(T)});i={status:1,segment:v,expirationTimeoutId:pe(function(){u("segment_duration_limit")},z_)}}}return{addRecord:function(d){switch(i.status){case 0:c(i.nextSegmentCreationReason,d);break;case 1:i.segment.addRecord(d);break}},stop:function(){u("stop"),o(),s()}}}function V_(e,t,r){var n=t.findTrackedSession(),i=r.findView();if(!(!n||!i))return{application:{id:e},session:{id:n.id},view:{id:i.id}}}var li;function fu(){return li||(li=URL.createObjectURL(new Blob(["(".concat(G_,")(self)")]))),new Worker(li)}function G_(){e(function(){var r=t(),n=r.Deflate,i=r.constants,o=r.string2buf,s=new n,u=0;self.addEventListener("message",e(function(d){var h=d.data;switch(h.action){case"init":self.postMessage({type:"initialized"});break;case"write":{var _=c(h.data);self.postMessage({type:"wrote",id:h.id,compressedBytesCount:s.chunks.reduce(function(v,y){return v+y.length},0),additionalBytesCount:_});break}case"flush":{var _=h.data?c(h.data):0;s.push("",i.Z_FINISH),self.postMessage({type:"flushed",id:h.id,result:s.result,additionalBytesCount:_,rawBytesCount:u}),s=new n,u=0;break}}}));function c(d){var h=o(d);return s.push(h,i.Z_SYNC_FLUSH),u+=h.length,h.length}})();function e(r){return function(){try{return r.apply(this,arguments)}catch(n){try{self.postMessage({type:"errored",error:n})}catch{self.postMessage({type:"errored",error:"".concat(n)})}}}}function t(){var r=4,n=0,i=1,o=2;function s(w){for(var a=w.length;--a>=0;)w[a]=0}var u=0,c=1,d=2,h=3,_=258,v=29,y=256,b=y+1+v,T=30,I=19,R=2*b+1,k=15,L=16,Z=7,F=256,Y=16,ae=17,W=18,ee=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]),Oe=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]),C=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),me=512,$=new Array((b+2)*2);s($);var he=new Array(T*2);s(he);var ye=new Array(me);s(ye);var Re=new Array(_-h+1);s(Re);var Fn=new Array(v);s(Fn);var $r=new Array(T);s($r);function Bn(w,a,p,m,g){this.static_tree=w,this.extra_bits=a,this.extra_base=p,this.elems=m,this.max_length=g,this.has_stree=w&&w.length}var va,_a,ga;function zn(w,a){this.dyn_tree=w,this.max_code=0,this.stat_desc=a}var ma=function(a){return a<256?ye[a]:ye[256+(a>>>7)]},_r=function(a,p){a.pending_buf[a.pending++]=p&255,a.pending_buf[a.pending++]=p>>>8&255},ve=function(a,p,m){a.bi_valid>L-m?(a.bi_buf|=p<<a.bi_valid&65535,_r(a,a.bi_buf),a.bi_buf=p>>L-a.bi_valid,a.bi_valid+=m-L):(a.bi_buf|=p<<a.bi_valid&65535,a.bi_valid+=m)},Fe=function(a,p,m){ve(a,m[p*2],m[p*2+1])},ya=function(a,p){var m=0;do m|=a&1,a>>>=1,m<<=1;while(--p>0);return m>>>1},Tu=function(a){a.bi_valid===16?(_r(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=a.bi_buf&255,a.bi_buf>>=8,a.bi_valid-=8)},ku=function(a,p){var m=p.dyn_tree,g=p.max_code,l=p.stat_desc.static_tree,A=p.stat_desc.has_stree,S=p.stat_desc.extra_bits,x=p.stat_desc.extra_base,H=p.stat_desc.max_length,O,le,pt,J,Ot,jt,en=0;for(J=0;J<=k;J++)a.bl_count[J]=0;for(m[a.heap[a.heap_max]*2+1]=0,O=a.heap_max+1;O<R;O++)le=a.heap[O],J=m[m[le*2+1]*2+1]+1,J>H&&(J=H,en++),m[le*2+1]=J,!(le>g)&&(a.bl_count[J]++,Ot=0,le>=x&&(Ot=S[le-x]),jt=m[le*2],a.opt_len+=jt*(J+Ot),A&&(a.static_len+=jt*(l[le*2+1]+Ot)));if(en!==0){do{for(J=H-1;a.bl_count[J]===0;)J--;a.bl_count[J]--,a.bl_count[J+1]+=2,a.bl_count[H]--,en-=2}while(en>0);for(J=H;J!==0;J--)for(le=a.bl_count[J];le!==0;)pt=a.heap[--O],!(pt>g)&&(m[pt*2+1]!==J&&(a.opt_len+=(J-m[pt*2+1])*m[pt*2],m[pt*2+1]=J),le--)}},ba=function(a,p,m){var g=new Array(k+1),l=0,A,S;for(A=1;A<=k;A++)g[A]=l=l+m[A-1]<<1;for(S=0;S<=p;S++){var x=a[S*2+1];x!==0&&(a[S*2]=ya(g[x]++,x))}},Au=function(){var a,p,m,g,l,A=new Array(k+1);for(m=0,g=0;g<v-1;g++)for(Fn[g]=m,a=0;a<1<<ee[g];a++)Re[m++]=g;for(Re[m-1]=g,l=0,g=0;g<16;g++)for($r[g]=l,a=0;a<1<<Oe[g];a++)ye[l++]=g;for(l>>=7;g<T;g++)for($r[g]=l<<7,a=0;a<1<<Oe[g]-7;a++)ye[256+l++]=g;for(p=0;p<=k;p++)A[p]=0;for(a=0;a<=143;)$[a*2+1]=8,a++,A[8]++;for(;a<=255;)$[a*2+1]=9,a++,A[9]++;for(;a<=279;)$[a*2+1]=7,a++,A[7]++;for(;a<=287;)$[a*2+1]=8,a++,A[8]++;for(ba($,b+1,A),a=0;a<T;a++)he[a*2+1]=5,he[a*2]=ya(a,5);va=new Bn($,ee,y+1,b,k),_a=new Bn(he,Oe,0,T,k),ga=new Bn(new Array(0),C,0,I,Z)},Ea=function(a){var p;for(p=0;p<b;p++)a.dyn_ltree[p*2]=0;for(p=0;p<T;p++)a.dyn_dtree[p*2]=0;for(p=0;p<I;p++)a.bl_tree[p*2]=0;a.dyn_ltree[F*2]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0},Sa=function(a){a.bi_valid>8?_r(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0},xu=function(a,p,m,g){Sa(a),_r(a,m),_r(a,~m),a.pending_buf.set(a.window.subarray(p,p+m),a.pending),a.pending+=m},wa=function(a,p,m,g){var l=p*2,A=m*2;return a[l]<a[A]||a[l]===a[A]&&g[p]<=g[m]},qn=function(a,p,m){for(var g=a.heap[m],l=m<<1;l<=a.heap_len&&(l<a.heap_len&&wa(p,a.heap[l+1],a.heap[l],a.depth)&&l++,!wa(p,g,a.heap[l],a.depth));)a.heap[m]=a.heap[l],m=l,l<<=1;a.heap[m]=g},Ta=function(a,p,m){var g,l,A=0,S,x;if(a.last_lit!==0)do g=a.pending_buf[a.d_buf+A*2]<<8|a.pending_buf[a.d_buf+A*2+1],l=a.pending_buf[a.l_buf+A],A++,g===0?Fe(a,l,p):(S=Re[l],Fe(a,S+y+1,p),x=ee[S],x!==0&&(l-=Fn[S],ve(a,l,x)),g--,S=ma(g),Fe(a,S,m),x=Oe[S],x!==0&&(g-=$r[S],ve(a,g,x)));while(A<a.last_lit);Fe(a,F,p)},Hn=function(a,p){var m=p.dyn_tree,g=p.stat_desc.static_tree,l=p.stat_desc.has_stree,A=p.stat_desc.elems,S,x,H=-1,O;for(a.heap_len=0,a.heap_max=R,S=0;S<A;S++)m[S*2]!==0?(a.heap[++a.heap_len]=H=S,a.depth[S]=0):m[S*2+1]=0;for(;a.heap_len<2;)O=a.heap[++a.heap_len]=H<2?++H:0,m[O*2]=1,a.depth[O]=0,a.opt_len--,l&&(a.static_len-=g[O*2+1]);for(p.max_code=H,S=a.heap_len>>1;S>=1;S--)qn(a,m,S);O=A;do S=a.heap[1],a.heap[1]=a.heap[a.heap_len--],qn(a,m,1),x=a.heap[1],a.heap[--a.heap_max]=S,a.heap[--a.heap_max]=x,m[O*2]=m[S*2]+m[x*2],a.depth[O]=(a.depth[S]>=a.depth[x]?a.depth[S]:a.depth[x])+1,m[S*2+1]=m[x*2+1]=O,a.heap[1]=O++,qn(a,m,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],ku(a,p),ba(m,H,a.bl_count)},ka=function(a,p,m){var g,l=-1,A,S=p[0*2+1],x=0,H=7,O=4;for(S===0&&(H=138,O=3),p[(m+1)*2+1]=65535,g=0;g<=m;g++)A=S,S=p[(g+1)*2+1],!(++x<H&&A===S)&&(x<O?a.bl_tree[A*2]+=x:A!==0?(A!==l&&a.bl_tree[A*2]++,a.bl_tree[Y*2]++):x<=10?a.bl_tree[ae*2]++:a.bl_tree[W*2]++,x=0,l=A,S===0?(H=138,O=3):A===S?(H=6,O=3):(H=7,O=4))},Aa=function(a,p,m){var g,l=-1,A,S=p[0*2+1],x=0,H=7,O=4;for(S===0&&(H=138,O=3),g=0;g<=m;g++)if(A=S,S=p[(g+1)*2+1],!(++x<H&&A===S)){if(x<O)do Fe(a,A,a.bl_tree);while(--x!==0);else A!==0?(A!==l&&(Fe(a,A,a.bl_tree),x--),Fe(a,Y,a.bl_tree),ve(a,x-3,2)):x<=10?(Fe(a,ae,a.bl_tree),ve(a,x-3,3)):(Fe(a,W,a.bl_tree),ve(a,x-11,7));x=0,l=A,S===0?(H=138,O=3):A===S?(H=6,O=3):(H=7,O=4)}},Iu=function(a){var p;for(ka(a,a.dyn_ltree,a.l_desc.max_code),ka(a,a.dyn_dtree,a.d_desc.max_code),Hn(a,a.bl_desc),p=I-1;p>=3&&a.bl_tree[N[p]*2+1]===0;p--);return a.opt_len+=3*(p+1)+5+5+4,p},Cu=function(a,p,m,g){var l;for(ve(a,p-257,5),ve(a,m-1,5),ve(a,g-4,4),l=0;l<g;l++)ve(a,a.bl_tree[N[l]*2+1],3);Aa(a,a.dyn_ltree,p-1),Aa(a,a.dyn_dtree,m-1)},Ou=function(a){var p=4093624447,m;for(m=0;m<=31;m++,p>>>=1)if(p&1&&a.dyn_ltree[m*2]!==0)return n;if(a.dyn_ltree[9*2]!==0||a.dyn_ltree[10*2]!==0||a.dyn_ltree[13*2]!==0)return i;for(m=32;m<y;m++)if(a.dyn_ltree[m*2]!==0)return i;return n},xa=!1,Ru=function(a){xa||(Au(),xa=!0),a.l_desc=new zn(a.dyn_ltree,va),a.d_desc=new zn(a.dyn_dtree,_a),a.bl_desc=new zn(a.bl_tree,ga),a.bi_buf=0,a.bi_valid=0,Ea(a)},Ia=function(a,p,m,g){ve(a,(u<<1)+(g?1:0),3),xu(a,p,m)},Nu=function(a){ve(a,c<<1,3),Fe(a,F,$),Tu(a)},Lu=function(a,p,m,g){var l,A,S=0;a.level>0?(a.strm.data_type===o&&(a.strm.data_type=Ou(a)),Hn(a,a.l_desc),Hn(a,a.d_desc),S=Iu(a),l=a.opt_len+3+7>>>3,A=a.static_len+3+7>>>3,A<=l&&(l=A)):l=A=m+5,m+4<=l&&p!==-1?Ia(a,p,m,g):a.strategy===r||A===l?(ve(a,(c<<1)+(g?1:0),3),Ta(a,$,he)):(ve(a,(d<<1)+(g?1:0),3),Cu(a,a.l_desc.max_code+1,a.d_desc.max_code+1,S+1),Ta(a,a.dyn_ltree,a.dyn_dtree)),Ea(a),g&&Sa(a)},Du=function(a,p,m){return a.pending_buf[a.d_buf+a.last_lit*2]=p>>>8&255,a.pending_buf[a.d_buf+a.last_lit*2+1]=p&255,a.pending_buf[a.l_buf+a.last_lit]=m&255,a.last_lit++,p===0?a.dyn_ltree[m*2]++:(a.matches++,p--,a.dyn_ltree[(Re[m]+y+1)*2]++,a.dyn_dtree[ma(p)*2]++),a.last_lit===a.lit_bufsize-1},Mu=Ru,Uu=Ia,Pu=Lu,Fu=Du,Bu=Nu,gr={_tr_init:Mu,_tr_stored_block:Uu,_tr_flush_block:Pu,_tr_tally:Fu,_tr_align:Bu},zu=function(a,p,m,g){for(var l=a&65535|0,A=a>>>16&65535|0,S=0;m!==0;){S=m>2e3?2e3:m,m-=S;do l=l+p[g++]|0,A=A+l|0;while(--S);l%=65521,A%=65521}return l|A<<16|0},Ca=zu,qu=function(){for(var a,p=[],m=0;m<256;m++){a=m;for(var g=0;g<8;g++)a=a&1?3988292384^a>>>1:a>>>1;p[m]=a}return p},Hu=new Uint32Array(qu()),Vu=function(a,p,m,g){var l=Hu,A=g+m;a^=-1;for(var S=g;S<A;S++)a=a>>>8^l[(a^p[S])&255];return a^-1},it=Vu,Vn={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"},j={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},Gu=gr._tr_init,$u=gr._tr_stored_block,Yu=gr._tr_flush_block,at=gr._tr_tally,Ku=gr._tr_align,At=j.Z_NO_FLUSH,ju=j.Z_PARTIAL_FLUSH,Zu=j.Z_FULL_FLUSH,ot=j.Z_FINISH,Oa=j.Z_BLOCK,Be=j.Z_OK,Ra=j.Z_STREAM_END,Ae=j.Z_STREAM_ERROR,Xu=j.Z_DATA_ERROR,Gn=j.Z_BUF_ERROR,Wu=j.Z_DEFAULT_COMPRESSION,Ju=j.Z_FILTERED,Yr=j.Z_HUFFMAN_ONLY,Qu=j.Z_RLE,ec=j.Z_FIXED,tc=j.Z_DEFAULT_STRATEGY,rc=j.Z_UNKNOWN,Kr=j.Z_DEFLATED,nc=9,ic=15,ac=8,oc=29,sc=256,$n=sc+1+oc,uc=30,cc=19,fc=2*$n+1,lc=15,q=3,st=258,Ne=st+q+1,dc=32,jr=42,Yn=69,Zr=73,Xr=91,Wr=103,xt=113,mr=666,oe=1,yr=2,It=3,Yt=4,pc=3,ut=function(a,p){return a.msg=Vn[p],p},Na=function(a){return(a<<1)-(a>4?9:0)},ct=function(a){for(var p=a.length;--p>=0;)a[p]=0},hc=function(a,p,m){return(p<<a.hash_shift^m)&a.hash_mask},ft=hc,lt=function(a){var p=a.state,m=p.pending;m>a.avail_out&&(m=a.avail_out),m!==0&&(a.output.set(p.pending_buf.subarray(p.pending_out,p.pending_out+m),a.next_out),a.next_out+=m,p.pending_out+=m,a.total_out+=m,a.avail_out-=m,p.pending-=m,p.pending===0&&(p.pending_out=0))},ce=function(a,p){Yu(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,p),a.block_start=a.strstart,lt(a.strm)},G=function(a,p){a.pending_buf[a.pending++]=p},br=function(a,p){a.pending_buf[a.pending++]=p>>>8&255,a.pending_buf[a.pending++]=p&255},vc=function(a,p,m,g){var l=a.avail_in;return l>g&&(l=g),l===0?0:(a.avail_in-=l,p.set(a.input.subarray(a.next_in,a.next_in+l),m),a.state.wrap===1?a.adler=Ca(a.adler,p,l,m):a.state.wrap===2&&(a.adler=it(a.adler,p,l,m)),a.next_in+=l,a.total_in+=l,l)},La=function(a,p){var m=a.max_chain_length,g=a.strstart,l,A,S=a.prev_length,x=a.nice_match,H=a.strstart>a.w_size-Ne?a.strstart-(a.w_size-Ne):0,O=a.window,le=a.w_mask,pt=a.prev,J=a.strstart+st,Ot=O[g+S-1],jt=O[g+S];a.prev_length>=a.good_match&&(m>>=2),x>a.lookahead&&(x=a.lookahead);do if(l=p,!(O[l+S]!==jt||O[l+S-1]!==Ot||O[l]!==O[g]||O[++l]!==O[g+1])){g+=2,l++;do;while(O[++g]===O[++l]&&O[++g]===O[++l]&&O[++g]===O[++l]&&O[++g]===O[++l]&&O[++g]===O[++l]&&O[++g]===O[++l]&&O[++g]===O[++l]&&O[++g]===O[++l]&&g<J);if(A=st-(J-g),g=J-st,A>S){if(a.match_start=p,S=A,A>=x)break;Ot=O[g+S-1],jt=O[g+S]}}while((p=pt[p&le])>H&&--m!==0);return S<=a.lookahead?S:a.lookahead},Ct=function(a){var p=a.w_size,m,g,l,A,S;do{if(A=a.window_size-a.lookahead-a.strstart,a.strstart>=p+(p-Ne)){a.window.set(a.window.subarray(p,p+p),0),a.match_start-=p,a.strstart-=p,a.block_start-=p,g=a.hash_size,m=g;do l=a.head[--m],a.head[m]=l>=p?l-p:0;while(--g);g=p,m=g;do l=a.prev[--m],a.prev[m]=l>=p?l-p:0;while(--g);A+=p}if(a.strm.avail_in===0)break;if(g=vc(a.strm,a.window,a.strstart+a.lookahead,A),a.lookahead+=g,a.lookahead+a.insert>=q)for(S=a.strstart-a.insert,a.ins_h=a.window[S],a.ins_h=ft(a,a.ins_h,a.window[S+1]);a.insert&&(a.ins_h=ft(a,a.ins_h,a.window[S+q-1]),a.prev[S&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=S,S++,a.insert--,!(a.lookahead+a.insert<q)););}while(a.lookahead<Ne&&a.strm.avail_in!==0)},_c=function(a,p){var m=65535;for(m>a.pending_buf_size-5&&(m=a.pending_buf_size-5);;){if(a.lookahead<=1){if(Ct(a),a.lookahead===0&&p===At)return oe;if(a.lookahead===0)break}a.strstart+=a.lookahead,a.lookahead=0;var g=a.block_start+m;if((a.strstart===0||a.strstart>=g)&&(a.lookahead=a.strstart-g,a.strstart=g,ce(a,!1),a.strm.avail_out===0)||a.strstart-a.block_start>=a.w_size-Ne&&(ce(a,!1),a.strm.avail_out===0))return oe}return a.insert=0,p===ot?(ce(a,!0),a.strm.avail_out===0?It:Yt):(a.strstart>a.block_start&&(ce(a,!1),a.strm.avail_out===0),oe)},Kn=function(a,p){for(var m,g;;){if(a.lookahead<Ne){if(Ct(a),a.lookahead<Ne&&p===At)return oe;if(a.lookahead===0)break}if(m=0,a.lookahead>=q&&(a.ins_h=ft(a,a.ins_h,a.window[a.strstart+q-1]),m=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),m!==0&&a.strstart-m<=a.w_size-Ne&&(a.match_length=La(a,m)),a.match_length>=q)if(g=at(a,a.strstart-a.match_start,a.match_length-q),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=q){a.match_length--;do a.strstart++,a.ins_h=ft(a,a.ins_h,a.window[a.strstart+q-1]),m=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(--a.match_length!==0);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=ft(a,a.ins_h,a.window[a.strstart+1]);else g=at(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(g&&(ce(a,!1),a.strm.avail_out===0))return oe}return a.insert=a.strstart<q-1?a.strstart:q-1,p===ot?(ce(a,!0),a.strm.avail_out===0?It:Yt):a.last_lit&&(ce(a,!1),a.strm.avail_out===0)?oe:yr},Kt=function(a,p){for(var m,g,l;;){if(a.lookahead<Ne){if(Ct(a),a.lookahead<Ne&&p===At)return oe;if(a.lookahead===0)break}if(m=0,a.lookahead>=q&&(a.ins_h=ft(a,a.ins_h,a.window[a.strstart+q-1]),m=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=q-1,m!==0&&a.prev_length<a.max_lazy_match&&a.strstart-m<=a.w_size-Ne&&(a.match_length=La(a,m),a.match_length<=5&&(a.strategy===Ju||a.match_length===q&&a.strstart-a.match_start>4096)&&(a.match_length=q-1)),a.prev_length>=q&&a.match_length<=a.prev_length){l=a.strstart+a.lookahead-q,g=at(a,a.strstart-1-a.prev_match,a.prev_length-q),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=l&&(a.ins_h=ft(a,a.ins_h,a.window[a.strstart+q-1]),m=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(--a.prev_length!==0);if(a.match_available=0,a.match_length=q-1,a.strstart++,g&&(ce(a,!1),a.strm.avail_out===0))return oe}else if(a.match_available){if(g=at(a,0,a.window[a.strstart-1]),g&&ce(a,!1),a.strstart++,a.lookahead--,a.strm.avail_out===0)return oe}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(g=at(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<q-1?a.strstart:q-1,p===ot?(ce(a,!0),a.strm.avail_out===0?It:Yt):a.last_lit&&(ce(a,!1),a.strm.avail_out===0)?oe:yr},gc=function(a,p){for(var m,g,l,A,S=a.window;;){if(a.lookahead<=st){if(Ct(a),a.lookahead<=st&&p===At)return oe;if(a.lookahead===0)break}if(a.match_length=0,a.lookahead>=q&&a.strstart>0&&(l=a.strstart-1,g=S[l],g===S[++l]&&g===S[++l]&&g===S[++l])){A=a.strstart+st;do;while(g===S[++l]&&g===S[++l]&&g===S[++l]&&g===S[++l]&&g===S[++l]&&g===S[++l]&&g===S[++l]&&g===S[++l]&&l<A);a.match_length=st-(A-l),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=q?(m=at(a,1,a.match_length-q),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(m=at(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),m&&(ce(a,!1),a.strm.avail_out===0))return oe}return a.insert=0,p===ot?(ce(a,!0),a.strm.avail_out===0?It:Yt):a.last_lit&&(ce(a,!1),a.strm.avail_out===0)?oe:yr},mc=function(a,p){for(var m;;){if(a.lookahead===0&&(Ct(a),a.lookahead===0)){if(p===At)return oe;break}if(a.match_length=0,m=at(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,m&&(ce(a,!1),a.strm.avail_out===0))return oe}return a.insert=0,p===ot?(ce(a,!0),a.strm.avail_out===0?It:Yt):a.last_lit&&(ce(a,!1),a.strm.avail_out===0)?oe:yr};function ze(w,a,p,m,g){this.good_length=w,this.max_lazy=a,this.nice_length=p,this.max_chain=m,this.func=g}var Er=[new ze(0,0,0,0,_c),new ze(4,4,8,4,Kn),new ze(4,5,16,8,Kn),new ze(4,6,32,32,Kn),new ze(4,4,16,16,Kt),new ze(8,16,32,32,Kt),new ze(8,16,128,128,Kt),new ze(8,32,128,256,Kt),new ze(32,128,258,1024,Kt),new ze(32,258,258,4096,Kt)],yc=function(a){a.window_size=2*a.w_size,ct(a.head),a.max_lazy_match=Er[a.level].max_lazy,a.good_match=Er[a.level].good_length,a.nice_match=Er[a.level].nice_length,a.max_chain_length=Er[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=q-1,a.match_available=0,a.ins_h=0};function bc(){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=Kr,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(fc*2),this.dyn_dtree=new Uint16Array((2*uc+1)*2),this.bl_tree=new Uint16Array((2*cc+1)*2),ct(this.dyn_ltree),ct(this.dyn_dtree),ct(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(lc+1),this.heap=new Uint16Array(2*$n+1),ct(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*$n+1),ct(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}var Da=function(a){if(!a||!a.state)return ut(a,Ae);a.total_in=a.total_out=0,a.data_type=rc;var p=a.state;return p.pending=0,p.pending_out=0,p.wrap<0&&(p.wrap=-p.wrap),p.status=p.wrap?jr:xt,a.adler=p.wrap===2?0:1,p.last_flush=At,Gu(p),Be},Ma=function(a){var p=Da(a);return p===Be&&yc(a.state),p},Ec=function(a,p){return!a||!a.state||a.state.wrap!==2?Ae:(a.state.gzhead=p,Be)},Ua=function(a,p,m,g,l,A){if(!a)return Ae;var S=1;if(p===Wu&&(p=6),g<0?(S=0,g=-g):g>15&&(S=2,g-=16),l<1||l>nc||m!==Kr||g<8||g>15||p<0||p>9||A<0||A>ec)return ut(a,Ae);g===8&&(g=9);var x=new bc;return a.state=x,x.strm=a,x.wrap=S,x.gzhead=null,x.w_bits=g,x.w_size=1<<x.w_bits,x.w_mask=x.w_size-1,x.hash_bits=l+7,x.hash_size=1<<x.hash_bits,x.hash_mask=x.hash_size-1,x.hash_shift=~~((x.hash_bits+q-1)/q),x.window=new Uint8Array(x.w_size*2),x.head=new Uint16Array(x.hash_size),x.prev=new Uint16Array(x.w_size),x.lit_bufsize=1<<l+6,x.pending_buf_size=x.lit_bufsize*4,x.pending_buf=new Uint8Array(x.pending_buf_size),x.d_buf=1*x.lit_bufsize,x.l_buf=3*x.lit_bufsize,x.level=p,x.strategy=A,x.method=m,Ma(a)},Sc=function(a,p){return Ua(a,p,Kr,ic,ac,tc)},wc=function(a,p){var m,g;if(!a||!a.state||p>Oa||p<0)return a?ut(a,Ae):Ae;var l=a.state;if(!a.output||!a.input&&a.avail_in!==0||l.status===mr&&p!==ot)return ut(a,a.avail_out===0?Gn:Ae);l.strm=a;var A=l.last_flush;if(l.last_flush=p,l.status===jr)if(l.wrap===2)a.adler=0,G(l,31),G(l,139),G(l,8),l.gzhead?(G(l,(l.gzhead.text?1:0)+(l.gzhead.hcrc?2:0)+(l.gzhead.extra?4:0)+(l.gzhead.name?8:0)+(l.gzhead.comment?16:0)),G(l,l.gzhead.time&255),G(l,l.gzhead.time>>8&255),G(l,l.gzhead.time>>16&255),G(l,l.gzhead.time>>24&255),G(l,l.level===9?2:l.strategy>=Yr||l.level<2?4:0),G(l,l.gzhead.os&255),l.gzhead.extra&&l.gzhead.extra.length&&(G(l,l.gzhead.extra.length&255),G(l,l.gzhead.extra.length>>8&255)),l.gzhead.hcrc&&(a.adler=it(a.adler,l.pending_buf,l.pending,0)),l.gzindex=0,l.status=Yn):(G(l,0),G(l,0),G(l,0),G(l,0),G(l,0),G(l,l.level===9?2:l.strategy>=Yr||l.level<2?4:0),G(l,pc),l.status=xt);else{var S=Kr+(l.w_bits-8<<4)<<8,x=-1;l.strategy>=Yr||l.level<2?x=0:l.level<6?x=1:l.level===6?x=2:x=3,S|=x<<6,l.strstart!==0&&(S|=dc),S+=31-S%31,l.status=xt,br(l,S),l.strstart!==0&&(br(l,a.adler>>>16),br(l,a.adler&65535)),a.adler=1}if(l.status===Yn)if(l.gzhead.extra){for(m=l.pending;l.gzindex<(l.gzhead.extra.length&65535)&&!(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>m&&(a.adler=it(a.adler,l.pending_buf,l.pending-m,m)),lt(a),m=l.pending,l.pending===l.pending_buf_size));)G(l,l.gzhead.extra[l.gzindex]&255),l.gzindex++;l.gzhead.hcrc&&l.pending>m&&(a.adler=it(a.adler,l.pending_buf,l.pending-m,m)),l.gzindex===l.gzhead.extra.length&&(l.gzindex=0,l.status=Zr)}else l.status=Zr;if(l.status===Zr)if(l.gzhead.name){m=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>m&&(a.adler=it(a.adler,l.pending_buf,l.pending-m,m)),lt(a),m=l.pending,l.pending===l.pending_buf_size)){g=1;break}l.gzindex<l.gzhead.name.length?g=l.gzhead.name.charCodeAt(l.gzindex++)&255:g=0,G(l,g)}while(g!==0);l.gzhead.hcrc&&l.pending>m&&(a.adler=it(a.adler,l.pending_buf,l.pending-m,m)),g===0&&(l.gzindex=0,l.status=Xr)}else l.status=Xr;if(l.status===Xr)if(l.gzhead.comment){m=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>m&&(a.adler=it(a.adler,l.pending_buf,l.pending-m,m)),lt(a),m=l.pending,l.pending===l.pending_buf_size)){g=1;break}l.gzindex<l.gzhead.comment.length?g=l.gzhead.comment.charCodeAt(l.gzindex++)&255:g=0,G(l,g)}while(g!==0);l.gzhead.hcrc&&l.pending>m&&(a.adler=it(a.adler,l.pending_buf,l.pending-m,m)),g===0&&(l.status=Wr)}else l.status=Wr;if(l.status===Wr&&(l.gzhead.hcrc?(l.pending+2>l.pending_buf_size&&lt(a),l.pending+2<=l.pending_buf_size&&(G(l,a.adler&255),G(l,a.adler>>8&255),a.adler=0,l.status=xt)):l.status=xt),l.pending!==0){if(lt(a),a.avail_out===0)return l.last_flush=-1,Be}else if(a.avail_in===0&&Na(p)<=Na(A)&&p!==ot)return ut(a,Gn);if(l.status===mr&&a.avail_in!==0)return ut(a,Gn);if(a.avail_in!==0||l.lookahead!==0||p!==At&&l.status!==mr){var H=l.strategy===Yr?mc(l,p):l.strategy===Qu?gc(l,p):Er[l.level].func(l,p);if((H===It||H===Yt)&&(l.status=mr),H===oe||H===It)return a.avail_out===0&&(l.last_flush=-1),Be;if(H===yr&&(p===ju?Ku(l):p!==Oa&&($u(l,0,0,!1),p===Zu&&(ct(l.head),l.lookahead===0&&(l.strstart=0,l.block_start=0,l.insert=0))),lt(a),a.avail_out===0))return l.last_flush=-1,Be}return p!==ot?Be:l.wrap<=0?Ra:(l.wrap===2?(G(l,a.adler&255),G(l,a.adler>>8&255),G(l,a.adler>>16&255),G(l,a.adler>>24&255),G(l,a.total_in&255),G(l,a.total_in>>8&255),G(l,a.total_in>>16&255),G(l,a.total_in>>24&255)):(br(l,a.adler>>>16),br(l,a.adler&65535)),lt(a),l.wrap>0&&(l.wrap=-l.wrap),l.pending!==0?Be:Ra)},Tc=function(a){if(!a||!a.state)return Ae;var p=a.state.status;return p!==jr&&p!==Yn&&p!==Zr&&p!==Xr&&p!==Wr&&p!==xt&&p!==mr?ut(a,Ae):(a.state=null,p===xt?ut(a,Xu):Be)},kc=function(a,p){var m=p.length;if(!a||!a.state)return Ae;var g=a.state,l=g.wrap;if(l===2||l===1&&g.status!==jr||g.lookahead)return Ae;if(l===1&&(a.adler=Ca(a.adler,p,m,0)),g.wrap=0,m>=g.w_size){l===0&&(ct(g.head),g.strstart=0,g.block_start=0,g.insert=0);var A=new Uint8Array(g.w_size);A.set(p.subarray(m-g.w_size,m),0),p=A,m=g.w_size}var S=a.avail_in,x=a.next_in,H=a.input;for(a.avail_in=m,a.next_in=0,a.input=p,Ct(g);g.lookahead>=q;){var O=g.strstart,le=g.lookahead-(q-1);do g.ins_h=ft(g,g.ins_h,g.window[O+q-1]),g.prev[O&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=O,O++;while(--le);g.strstart=O,g.lookahead=q-1,Ct(g)}return g.strstart+=g.lookahead,g.block_start=g.strstart,g.insert=g.lookahead,g.lookahead=0,g.match_length=g.prev_length=q-1,g.match_available=0,a.next_in=x,a.input=H,a.avail_in=S,g.wrap=l,Be},Ac=Sc,xc=Ua,Ic=Ma,Cc=Da,Oc=Ec,Rc=wc,Nc=Tc,Lc=kc,Dc="pako deflate (from Nodeca project)",Sr={deflateInit:Ac,deflateInit2:xc,deflateReset:Ic,deflateResetKeep:Cc,deflateSetHeader:Oc,deflate:Rc,deflateEnd:Nc,deflateSetDictionary:Lc,deflateInfo:Dc};function Mc(w){for(var a=0,p=0,m=w.length;p<m;p++)a+=w[p].length;for(var g=new Uint8Array(a),l=0,A=0,S=w.length;l<S;l++){var x=w[l];g.set(x,A),A+=x.length}return g}for(var jn=new Uint8Array(256),dt=0;dt<256;dt++)jn[dt]=dt>=252?6:dt>=248?5:dt>=240?4:dt>=224?3:dt>=192?2:1;jn[254]=jn[254]=1;function Uc(){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}var Pc=Uc,Pa=Object.prototype.toString,Fc=j.Z_NO_FLUSH,Bc=j.Z_SYNC_FLUSH,zc=j.Z_FULL_FLUSH,qc=j.Z_FINISH,Jr=j.Z_OK,Hc=j.Z_STREAM_END,Vc=j.Z_DEFAULT_COMPRESSION,Gc=j.Z_DEFAULT_STRATEGY,$c=j.Z_DEFLATED;function Qr(){this.options={level:Vc,method:$c,chunkSize:16384,windowBits:15,memLevel:8,strategy:Gc};var w=this.options;w.raw&&w.windowBits>0?w.windowBits=-w.windowBits:w.gzip&&w.windowBits>0&&w.windowBits<16&&(w.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Pc,this.strm.avail_out=0;var a=Sr.deflateInit2(this.strm,w.level,w.method,w.windowBits,w.memLevel,w.strategy);if(a!==Jr)throw new Error(Vn[a]);if(w.header&&Sr.deflateSetHeader(this.strm,w.header),w.dictionary){var p;if(Pa.call(w.dictionary)==="[object ArrayBuffer]"?p=new Uint8Array(w.dictionary):p=w.dictionary,a=Sr.deflateSetDictionary(this.strm,p),a!==Jr)throw new Error(Vn[a]);this._dict_set=!0}}Qr.prototype.push=function(w,a){var p=this.strm,m=this.options.chunkSize,g,l;if(this.ended)return!1;for(a===~~a?l=a:l=a===!0?qc:Fc,Pa.call(w)==="[object ArrayBuffer]"?p.input=new Uint8Array(w):p.input=w,p.next_in=0,p.avail_in=p.input.length;;){if(p.avail_out===0&&(p.output=new Uint8Array(m),p.next_out=0,p.avail_out=m),(l===Bc||l===zc)&&p.avail_out<=6){this.onData(p.output.subarray(0,p.next_out)),p.avail_out=0;continue}if(g=Sr.deflate(p,l),g===Hc)return p.next_out>0&&this.onData(p.output.subarray(0,p.next_out)),g=Sr.deflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===Jr;if(p.avail_out===0){this.onData(p.output);continue}if(l>0&&p.next_out>0){this.onData(p.output.subarray(0,p.next_out)),p.avail_out=0;continue}if(p.avail_in===0)break}return!0},Qr.prototype.onData=function(w){this.chunks.push(w)},Qr.prototype.onEnd=function(w){w===Jr&&(this.result=Mc(this.chunks)),this.chunks=[],this.err=w,this.msg=this.strm.msg};function Yc(w){if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(w);var a,p,m,g,l,A=w.length,S=0;for(g=0;g<A;g++)p=w.charCodeAt(g),(p&64512)===55296&&g+1<A&&(m=w.charCodeAt(g+1),(m&64512)===56320&&(p=65536+(p-55296<<10)+(m-56320),g++)),S+=p<128?1:p<2048?2:p<65536?3:4;for(a=new Uint8Array(S),l=0,g=0;l<S;g++)p=w.charCodeAt(g),(p&64512)===55296&&g+1<A&&(m=w.charCodeAt(g+1),(m&64512)===56320&&(p=65536+(p-55296<<10)+(m-56320),g++)),p<128?a[l++]=p:p<2048?(a[l++]=192|p>>>6,a[l++]=128|p&63):p<65536?(a[l++]=224|p>>>12,a[l++]=128|p>>>6&63,a[l++]=128|p&63):(a[l++]=240|p>>>18,a[l++]=128|p>>>12&63,a[l++]=128|p>>>6&63,a[l++]=128|p&63);return a}return{Deflate:Qr,constants:j,string2buf:Yc}}}var $e={status:0};function $_(e,t){switch(t===void 0&&(t=fu),$e.status){case 0:$e={status:1,callbacks:[e]},Y_(t);break;case 1:$e.callbacks.push(e);break;case 2:e();break;case 3:e($e.worker);break}}function Y_(e){e===void 0&&(e=fu);try{var t=e();return ie(t,"error",di),ie(t,"message",function(r){var n=r.data;n.type==="errored"?di(n.error):n.type==="initialized"&&K_(t)}),t.postMessage({action:"init"}),t}catch(r){di(r)}}function K_(e){$e.status===1&&($e.callbacks.forEach(function(t){return t(e)}),$e={status:3,worker:e})}function di(e){$e.status===1?(U.error("Session Replay recording failed to start: an error occurred while creating the Worker:",e),e instanceof Event||e instanceof Error&&j_(e.message)?U.error("Please make sure CSP is correctly configured https://docs.datadoghq.com/real_user_monitoring/faq/content_security_policy"):vn(e),$e.callbacks.forEach(function(t){return t()}),$e={status:2}):vn(e)}function j_(e){return tt(e,"Content Security Policy")||tt(e,"requires 'TrustedScriptURL'")}function Z_(e,t,r,n,i,o){var s=function(R){e.notify(12,{error:R})},u=o||hs(t.sessionReplayEndpointBuilder,cu,s),c=q_(e,t.applicationId,r,n,u,i),d=c.addRecord,h=c.stop,_=O_({emit:d,configuration:t,lifeCycle:e}),v=_.stop,y=_.takeSubsequentFullSnapshot,b=_.flushMutations,T=e.subscribe(4,function(){b(),d({timestamp:ue(),type:Me.ViewEnd})}).unsubscribe,I=e.subscribe(2,function(R){y(R.startClocks.timeStamp)}).unsubscribe;return{stop:function(){T(),I(),v(),h()}}}function lu(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function X_(e,t,r,n){var i=t.findTrackedSession(),o=W_(i,n),s=r.findView();return bv(e,{viewContext:s,errorType:o,session:i})}function W_(e,t){if(!lu())return"browser-not-supported";if(!e)return"rum-not-tracked";if(!e.sessionReplayAllowed)return"incorrect-session-plan";if(!t)return"replay-not-started"}function J_(e,t){if(t===void 0&&(t=$_),sr()||!lu())return{start:re,stop:re,getReplayStats:function(){},onRumStart:re,isRecording:function(){return!1},getSessionReplayLink:function(){}};var r={status:0},n=function(){r={status:1}},i=function(){r={status:0}};return{start:function(){return n()},stop:function(){return i()},getReplayStats:U_,getSessionReplayLink:function(o,s,u){return X_(o,s,u,r.status!==0)},onRumStart:function(o,s,u,c){o.subscribe(7,function(){(r.status===2||r.status===3)&&(i(),r={status:1})}),o.subscribe(8,function(){r.status===1&&n()}),n=function(){var d=u.findTrackedSession();if(!d||!d.sessionReplayAllowed){r={status:1};return}r.status===2||r.status===3||(r={status:2},Bi("interactive",function(){r.status===2&&t(function(h){if(r.status===2){if(!h){r={status:0};return}var _=e(o,s,u,c,h).stop;r={status:3,stopRecording:_}}})}))},i=function(){r.status!==0&&(r.status===3&&r.stopRecording(),r={status:0})},r.status===1&&n()},isRecording:function(){return r.status===3}}}var Q_=J_(Z_),Lt=Fd(gv,Q_);fl(lr(),"DD_RUM",Lt);class eg extends Mr{constructor(){super(),Lt.init({applicationId:"ac9a32b2-79ff-4b18-b4db-426e5b1e0ff2",clientToken:"pubca539654d20f17c59f3d6390848135a0",env:No,allowedTracingUrls:[origin,Wc],version:"2.0.0",service:"front-end-app",site:"datadoghq.eu",sampleRate:100,sessionReplaySampleRate:20,trackResources:!0,trackLongTasks:!0,trackFrustrations:!0,trackInteractions:!0,trackUserInteractions:!0,defaultPrivacyLevel:"mask-user-input"}),Lt.setGlobalContextProperty("bunchSessionId",this.bunchSessionId),Lt.startSessionReplayRecording()}trackNewUser(t){if(!t)return;const{userId:r,personId:n,groups:i,impersonator:o}=t;Lt.setUser({userId:r,personId:n,groups:i,impersonatorId:o==null?void 0:o.id,internal:(o==null?void 0:o.group)===nr.Admin||i.includes(nr.Admin)})}trackError(t,r){Lt.addError(t||"unexpected error",r)}setGlobalProperty(t,r){Lt.setGlobalContextProperty(t,r)}}const Eo=e=>({user_id:e==null?void 0:e.personId,user_hash:e==null?void 0:e.intercomHash,email:e==null?void 0:e.email,name:e&&`${e.firstName} ${e.lastName}`,impersonationId:e==null?void 0:e.userId});class tg extends Mr{constructor(){super(),this.trackNewUser()}trackNewUser(t){window.Intercom("shutdown"),window.Intercom("boot",{api_base:"https://api-iam.eu.intercom.io",app_id:window.intercomAppId,...Eo(t)})}updateCurrentUserData(t){window.Intercom("update",Eo(t))}}var Qe={DEBUG:!1,LIB_VERSION:"2.49.0"},z;if(typeof window>"u"){var So={hostname:""};z={navigator:{userAgent:""},document:{location:So,referrer:""},screen:{width:0,height:0},location:So}}else z=window;var Dn=Array.prototype,rg=Function.prototype,du=Object.prototype,gt=Dn.slice,Gr=du.toString,Mn=du.hasOwnProperty,ne=z.console,mt=z.navigator,X=z.document,cn=z.opera,gn=z.screen,He=mt.userAgent,pi=rg.bind,wo=Dn.forEach,To=Dn.indexOf,ko=Dn.map,ng=Array.isArray,Ai={},f={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},K={log:function(){if(Qe.DEBUG&&!f.isUndefined(ne)&&ne)try{ne.log.apply(ne,arguments)}catch{f.each(arguments,function(t){ne.log(t)})}},warn:function(){if(Qe.DEBUG&&!f.isUndefined(ne)&&ne){var e=["Mixpanel warning:"].concat(f.toArray(arguments));try{ne.warn.apply(ne,e)}catch{f.each(e,function(r){ne.warn(r)})}}},error:function(){if(Qe.DEBUG&&!f.isUndefined(ne)&&ne){var e=["Mixpanel error:"].concat(f.toArray(arguments));try{ne.error.apply(ne,e)}catch{f.each(e,function(r){ne.error(r)})}}},critical:function(){if(!f.isUndefined(ne)&&ne){var e=["Mixpanel error:"].concat(f.toArray(arguments));try{ne.error.apply(ne,e)}catch{f.each(e,function(r){ne.error(r)})}}}},hi=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(K,arguments)}},ea=function(e){return{log:hi(K.log,e),error:hi(K.error,e),critical:hi(K.critical,e)}};f.bind=function(e,t){var r,n;if(pi&&e.bind===pi)return pi.apply(e,gt.call(arguments,1));if(!f.isFunction(e))throw new TypeError;return r=gt.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,r.concat(gt.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var s=e.apply(o,r.concat(gt.call(arguments)));return Object(s)===s?s:o},n};f.each=function(e,t,r){if(e!=null){if(wo&&e.forEach===wo)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,i=e.length;n<i;n++)if(n in e&&t.call(r,e[n],n,e)===Ai)return}else for(var o in e)if(Mn.call(e,o)&&t.call(r,e[o],o,e)===Ai)return}};f.extend=function(e){return f.each(gt.call(arguments,1),function(t){for(var r in t)t[r]!==void 0&&(e[r]=t[r])}),e};f.isArray=ng||function(e){return Gr.call(e)==="[object Array]"};f.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch{return!1}};f.isArguments=function(e){return!!(e&&Mn.call(e,"callee"))};f.toArray=function(e){return e?e.toArray?e.toArray():f.isArray(e)||f.isArguments(e)?gt.call(e):f.values(e):[]};f.map=function(e,t,r){if(ko&&e.map===ko)return e.map(t,r);var n=[];return f.each(e,function(i){n.push(t.call(r,i))}),n};f.keys=function(e){var t=[];return e===null||f.each(e,function(r,n){t[t.length]=n}),t};f.values=function(e){var t=[];return e===null||f.each(e,function(r){t[t.length]=r}),t};f.include=function(e,t){var r=!1;return e===null?r:To&&e.indexOf===To?e.indexOf(t)!=-1:(f.each(e,function(n){if(r||(r=n===t))return Ai}),r)};f.includes=function(e,t){return e.indexOf(t)!==-1};f.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e};f.isObject=function(e){return e===Object(e)&&!f.isArray(e)};f.isEmptyObject=function(e){if(f.isObject(e)){for(var t in e)if(Mn.call(e,t))return!1;return!0}return!1};f.isUndefined=function(e){return e===void 0};f.isString=function(e){return Gr.call(e)=="[object String]"};f.isDate=function(e){return Gr.call(e)=="[object Date]"};f.isNumber=function(e){return Gr.call(e)=="[object Number]"};f.isElement=function(e){return!!(e&&e.nodeType===1)};f.encodeDates=function(e){return f.each(e,function(t,r){f.isDate(t)?e[r]=f.formatDate(t):f.isObject(t)&&(e[r]=f.encodeDates(t))}),e};f.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()};f.formatDate=function(e){function t(r){return r<10?"0"+r:r}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())};f.strip_empty_properties=function(e){var t={};return f.each(e,function(r,n){f.isString(r)&&r.length>0&&(t[n]=r)}),t};f.truncate=function(e,t){var r;return typeof e=="string"?r=e.slice(0,t):f.isArray(e)?(r=[],f.each(e,function(n){r.push(f.truncate(n,t))})):f.isObject(e)?(r={},f.each(e,function(n,i){r[i]=f.truncate(n,t)})):r=e,r};f.JSONEncode=function(){return function(e){var t=e,r=function(i){var o=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return o.lastIndex=0,o.test(i)?'"'+i.replace(o,function(u){var c=s[u];return typeof c=="string"?c:"\\u"+("0000"+u.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'},n=function(i,o){var s="",u="    ",c=0,d="",h="",_=0,v=s,y=[],b=o[i];switch(b&&typeof b=="object"&&typeof b.toJSON=="function"&&(b=b.toJSON(i)),typeof b){case"string":return r(b);case"number":return isFinite(b)?String(b):"null";case"boolean":case"null":return String(b);case"object":if(!b)return"null";if(s+=u,y=[],Gr.apply(b)==="[object Array]"){for(_=b.length,c=0;c<_;c+=1)y[c]=n(c,b)||"null";return h=y.length===0?"[]":s?`[
`+s+y.join(`,
`+s)+`
`+v+"]":"["+y.join(",")+"]",s=v,h}for(d in b)Mn.call(b,d)&&(h=n(d,b),h&&y.push(r(d)+(s?": ":":")+h));return h=y.length===0?"{}":s?"{"+y.join(",")+v+"}":"{"+y.join(",")+"}",s=v,h}};return n("",{"":t})}}();f.JSONDecode=function(){var e,t,r={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
`,r:"\r",t:"	"},n,i=function(y){var b=new SyntaxError(y);throw b.at=e,b.text=n,b},o=function(y){return y&&y!==t&&i("Expected '"+y+"' instead of '"+t+"'"),t=n.charAt(e),e+=1,t},s=function(){var y,b="";for(t==="-"&&(b="-",o("-"));t>="0"&&t<="9";)b+=t,o();if(t===".")for(b+=".";o()&&t>="0"&&t<="9";)b+=t;if(t==="e"||t==="E")for(b+=t,o(),(t==="-"||t==="+")&&(b+=t,o());t>="0"&&t<="9";)b+=t,o();if(y=+b,!isFinite(y))i("Bad number");else return y},u=function(){var y,b,T="",I;if(t==='"')for(;o();){if(t==='"')return o(),T;if(t==="\\")if(o(),t==="u"){for(I=0,b=0;b<4&&(y=parseInt(o(),16),!!isFinite(y));b+=1)I=I*16+y;T+=String.fromCharCode(I)}else if(typeof r[t]=="string")T+=r[t];else break;else T+=t}i("Bad string")},c=function(){for(;t&&t<=" ";)o()},d=function(){switch(t){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}i('Unexpected "'+t+'"')},h,_=function(){var y=[];if(t==="["){if(o("["),c(),t==="]")return o("]"),y;for(;t;){if(y.push(h()),c(),t==="]")return o("]"),y;o(","),c()}}i("Bad array")},v=function(){var y,b={};if(t==="{"){if(o("{"),c(),t==="}")return o("}"),b;for(;t;){if(y=u(),c(),o(":"),Object.hasOwnProperty.call(b,y)&&i('Duplicate key "'+y+'"'),b[y]=h(),c(),t==="}")return o("}"),b;o(","),c()}}i("Bad object")};return h=function(){switch(c(),t){case"{":return v();case"[":return _();case'"':return u();case"-":return s();default:return t>="0"&&t<="9"?s():d()}},function(y){var b;return n=y,e=0,t=" ",b=h(),c(),t&&i("Syntax error"),b}}();f.base64Encode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,n,i,o,s,u,c,d,h=0,_=0,v="",y=[];if(!e)return e;e=f.utf8Encode(e);do r=e.charCodeAt(h++),n=e.charCodeAt(h++),i=e.charCodeAt(h++),d=r<<16|n<<8|i,o=d>>18&63,s=d>>12&63,u=d>>6&63,c=d&63,y[_++]=t.charAt(o)+t.charAt(s)+t.charAt(u)+t.charAt(c);while(h<e.length);switch(v=y.join(""),e.length%3){case 1:v=v.slice(0,-2)+"==";break;case 2:v=v.slice(0,-1)+"=";break}return v};f.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,`
`).replace(/\r/g,`
`);var t="",r,n,i=0,o;for(r=n=0,i=e.length,o=0;o<i;o++){var s=e.charCodeAt(o),u=null;s<128?n++:s>127&&s<2048?u=String.fromCharCode(s>>6|192,s&63|128):u=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),u!==null&&(n>r&&(t+=e.substring(r,n)),t+=u,r=n=o+1)}return n>r&&(t+=e.substring(r,e.length)),t};f.UUID=function(){var e=function(){var n=1*new Date,i;if(z.performance&&z.performance.now)i=z.performance.now();else for(i=0;n==1*new Date;)i++;return n.toString(16)+Math.floor(i).toString(16)},t=function(){return Math.random().toString(16).replace(".","")},r=function(){var n=He,i,o,s=[],u=0;function c(d,h){var _,v=0;for(_=0;_<h.length;_++)v|=s[_]<<_*8;return d^v}for(i=0;i<n.length;i++)o=n.charCodeAt(i),s.unshift(o&255),s.length>=4&&(u=c(u,s),s=[]);return s.length>0&&(u=c(u,s)),u.toString(16)};return function(){var n=(gn.height*gn.width).toString(16);return e()+"-"+t()+"-"+r()+"-"+n+"-"+e()}}();var Ao=["ahrefsbot","ahrefssiteaudit","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];f.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<Ao.length;t++)if(e.indexOf(Ao[t])!==-1)return!0;return!1};f.HTTPBuildQuery=function(e,t){var r,n,i=[];return f.isUndefined(t)&&(t="&"),f.each(e,function(o,s){r=encodeURIComponent(o.toString()),n=encodeURIComponent(s),i[i.length]=n+"="+r}),i.join(t)};f.getQueryParam=function(e,t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var r="[\\?&]"+t+"=([^&#]*)",n=new RegExp(r),i=n.exec(e);if(i===null||i&&typeof i[1]!="string"&&i[1].length)return"";var o=i[1];try{o=decodeURIComponent(o)}catch{K.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")};f.cookie={get:function(e){for(var t=e+"=",r=X.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}return null},parse:function(e){var t;try{t=f.JSONDecode(f.cookie.get(e))||{}}catch{}return t},set_seconds:function(e,t,r,n,i,o,s){var u="",c="",d="";if(s)u="; domain="+s;else if(n){var h=xo(X.location.hostname);u=h?"; domain=."+h:""}if(r){var _=new Date;_.setTime(_.getTime()+r*1e3),c="; expires="+_.toGMTString()}o&&(i=!0,d="; SameSite=None"),i&&(d+="; secure"),X.cookie=e+"="+encodeURIComponent(t)+c+"; path=/"+u+d},set:function(e,t,r,n,i,o,s){var u="",c="",d="";if(s)u="; domain="+s;else if(n){var h=xo(X.location.hostname);u=h?"; domain=."+h:""}if(r){var _=new Date;_.setTime(_.getTime()+r*24*60*60*1e3),c="; expires="+_.toGMTString()}o&&(i=!0,d="; SameSite=None"),i&&(d+="; secure");var v=e+"="+encodeURIComponent(t)+c+"; path=/"+u+d;return X.cookie=v,v},remove:function(e,t,r){f.cookie.set(e,"",-1,t,!1,!1,r)}};var vi=null,mn=function(e,t){if(vi!==null&&!t)return vi;var r=!0;try{e=e||window.localStorage;var n="__mplss_"+ta(8),i="xyz";e.setItem(n,i),e.getItem(n)!==i&&(r=!1),e.removeItem(n)}catch{r=!1}return vi=r,r};f.localStorage={is_supported:function(e){var t=mn(null,e);return t||K.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){K.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(t){f.localStorage.error(t)}return null},parse:function(e){try{return f.JSONDecode(f.localStorage.get(e))||{}}catch{}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(r){f.localStorage.error(r)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(t){f.localStorage.error(t)}}};f.register_event=function(){var e=function(n,i,o,s,u){if(!n){K.error("No valid element provided to register_event");return}if(n.addEventListener&&!s)n.addEventListener(i,o,!!u);else{var c="on"+i,d=n[c];n[c]=t(n,o,d)}};function t(n,i,o){var s=function(u){if(u=u||r(window.event),!!u){var c=!0,d,h;return f.isFunction(o)&&(d=o(u)),h=i.call(n,u),(d===!1||h===!1)&&(c=!1),c}};return s}function r(n){return n&&(n.preventDefault=r.preventDefault,n.stopPropagation=r.stopPropagation),n}return r.preventDefault=function(){this.returnValue=!1},r.stopPropagation=function(){this.cancelBubble=!0},e}();var ig=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');f.dom_query=function(){function e(i){return i.all?i.all:i.getElementsByTagName("*")}var t=/[\t\r\n]/g;function r(i,o){var s=" "+o+" ";return(" "+i.className+" ").replace(t," ").indexOf(s)>=0}function n(i){if(!X.getElementsByTagName)return[];var o=i.split(" "),s,u,c,d,h,_,v,y,b,T,I=[X];for(_=0;_<o.length;_++){if(s=o[_].replace(/^\s+/,"").replace(/\s+$/,""),s.indexOf("#")>-1){u=s.split("#"),c=u[0];var R=u[1],k=X.getElementById(R);if(!k||c&&k.nodeName.toLowerCase()!=c)return[];I=[k];continue}if(s.indexOf(".")>-1){u=s.split("."),c=u[0];var L=u[1];for(c||(c="*"),d=[],h=0,v=0;v<I.length;v++)for(c=="*"?b=e(I[v]):b=I[v].getElementsByTagName(c),y=0;y<b.length;y++)d[h++]=b[y];for(I=[],T=0,v=0;v<d.length;v++)d[v].className&&f.isString(d[v].className)&&r(d[v],L)&&(I[T++]=d[v]);continue}var Z=s.match(ig);if(Z){c=Z[1];var F=Z[2],Y=Z[3],ae=Z[4];for(c||(c="*"),d=[],h=0,v=0;v<I.length;v++)for(c=="*"?b=e(I[v]):b=I[v].getElementsByTagName(c),y=0;y<b.length;y++)d[h++]=b[y];I=[],T=0;var W;switch(Y){case"=":W=function(ee){return ee.getAttribute(F)==ae};break;case"~":W=function(ee){return ee.getAttribute(F).match(new RegExp("\\b"+ae+"\\b"))};break;case"|":W=function(ee){return ee.getAttribute(F).match(new RegExp("^"+ae+"-?"))};break;case"^":W=function(ee){return ee.getAttribute(F).indexOf(ae)===0};break;case"$":W=function(ee){return ee.getAttribute(F).lastIndexOf(ae)==ee.getAttribute(F).length-ae.length};break;case"*":W=function(ee){return ee.getAttribute(F).indexOf(ae)>-1};break;default:W=function(ee){return ee.getAttribute(F)}}for(I=[],T=0,v=0;v<d.length;v++)W(d[v])&&(I[T++]=d[v]);continue}for(c=s,d=[],h=0,v=0;v<I.length;v++)for(b=I[v].getElementsByTagName(c),y=0;y<b.length;y++)d[h++]=b[y];I=d}return I}return function(i){return f.isElement(i)?[i]:f.isObject(i)&&!f.isUndefined(i.length)?i:n.call(this,i)}}();var ag=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],og=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","ttclid","twclid","wbraid"];f.info={campaignParams:function(e){var t="",r={};return f.each(ag,function(n){t=f.getQueryParam(X.URL,n),t.length?r[n]=t:e!==void 0&&(r[n]=e)}),r},clickParams:function(){var e="",t={};return f.each(og,function(r){e=f.getQueryParam(X.URL,r),e.length&&(t[r]=e)}),t},marketingParams:function(){return f.extend(f.info.campaignParams(),f.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var t=f.info.searchEngine(e),r=t!="yahoo"?"q":"p",n={};if(t!==null){n.$search_engine=t;var i=f.getQueryParam(e,r);i.length&&(n.mp_keyword=i)}return n},browser:function(e,t,r){return t=t||"",r||f.includes(e," OPR/")?f.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":f.includes(e,"IEMobile")||f.includes(e,"WPDesktop")?"Internet Explorer Mobile":f.includes(e,"SamsungBrowser/")?"Samsung Internet":f.includes(e,"Edge")||f.includes(e,"Edg/")?"Microsoft Edge":f.includes(e,"FBIOS")?"Facebook Mobile":f.includes(e,"Chrome")?"Chrome":f.includes(e,"CriOS")?"Chrome iOS":f.includes(e,"UCWEB")||f.includes(e,"UCBrowser")?"UC Browser":f.includes(e,"FxiOS")?"Firefox iOS":f.includes(t,"Apple")?f.includes(e,"Mobile")?"Mobile Safari":"Safari":f.includes(e,"Android")?"Android Mobile":f.includes(e,"Konqueror")?"Konqueror":f.includes(e,"Firefox")?"Firefox":f.includes(e,"MSIE")||f.includes(e,"Trident/")?"Internet Explorer":f.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,r){var n=f.info.browser(e,t,r),i={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},o=i[n];if(o===void 0)return null;var s=e.match(o);return s?parseFloat(s[s.length-2]):null},os:function(){var e=He;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return z.location.href},properties:function(e){return typeof e!="object"&&(e={}),f.extend(f.strip_empty_properties({$os:f.info.os(),$browser:f.info.browser(He,mt.vendor,cn),$referrer:X.referrer,$referring_domain:f.info.referringDomain(X.referrer),$device:f.info.device(He)}),{$current_url:f.info.currentUrl(),$browser_version:f.info.browserVersion(He,mt.vendor,cn),$screen_height:gn.height,$screen_width:gn.width,mp_lib:"web",$lib_version:Qe.LIB_VERSION,$insert_id:ta(),time:f.timestamp()/1e3},f.strip_empty_properties(e))},people_properties:function(){return f.extend(f.strip_empty_properties({$os:f.info.os(),$browser:f.info.browser(He,mt.vendor,cn)}),{$browser_version:f.info.browserVersion(He,mt.vendor,cn)})},mpPageViewProperties:function(){return f.strip_empty_properties({current_page_title:X.title,current_domain:z.location.hostname,current_url_path:z.location.pathname,current_url_protocol:z.location.protocol,current_url_search:z.location.search})}};var ta=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},sg=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,ug=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,xo=function(e){var t=ug,r=e.split("."),n=r[r.length-1];(n.length>4||n==="com"||n==="org")&&(t=sg);var i=e.match(t);return i?i[0]:""},yn=null,bn=null;typeof JSON<"u"&&(yn=JSON.stringify,bn=JSON.parse);yn=yn||f.JSONEncode;bn=bn||f.JSONDecode;f.toArray=f.toArray;f.isObject=f.isObject;f.JSONEncode=f.JSONEncode;f.JSONDecode=f.JSONDecode;f.isBlockedUA=f.isBlockedUA;f.isEmptyObject=f.isEmptyObject;f.info=f.info;f.info.device=f.info.device;f.info.browser=f.info.browser;f.info.browserVersion=f.info.browserVersion;f.info.properties=f.info.properties;var nt=function(){};nt.prototype.create_properties=function(){};nt.prototype.event_handler=function(){};nt.prototype.after_track_handler=function(){};nt.prototype.init=function(e){return this.mp=e,this};nt.prototype.track=function(e,t,r,n){var i=this,o=f.dom_query(e);if(o.length===0){K.error("The DOM query ("+e+") returned 0 elements");return}return f.each(o,function(s){f.register_event(s,this.override_event,function(u){var c={},d=i.create_properties(r,this),h=i.mp.get_config("track_links_timeout");i.event_handler(u,this,c),window.setTimeout(i.track_callback(n,d,c,!0),h),i.mp.track(t,d,i.track_callback(n,d,c))})},this),!0};nt.prototype.track_callback=function(e,t,r,n){n=n||!1;var i=this;return function(){r.callback_fired||(r.callback_fired=!0,!(e&&e(n,t)===!1)&&i.after_track_handler(t,r,n))}};nt.prototype.create_properties=function(e,t){var r;return typeof e=="function"?r=e(t):r=f.extend({},e),r};var ur=function(){this.override_event="click"};f.inherit(ur,nt);ur.prototype.create_properties=function(e,t){var r=ur.superclass.create_properties.apply(this,arguments);return t.href&&(r.url=t.href),r};ur.prototype.event_handler=function(e,t,r){r.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target==="_blank",r.href=t.href,r.new_tab||e.preventDefault()};ur.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var Un=function(){this.override_event="submit"};f.inherit(Un,nt);Un.prototype.event_handler=function(e,t,r){r.element=t,e.preventDefault()};Un.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var cg=ea("lock"),pu=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};pu.prototype.withLock=function(e,t,r){!r&&typeof t!="function"&&(r=t,t=null);var n=r||new Date().getTime()+"|"+Math.random(),i=new Date().getTime(),o=this.storageKey,s=this.pollIntervalMS,u=this.timeoutMS,c=this.storage,d=o+":X",h=o+":Y",_=o+":Z",v=function(k){t&&t(k)},y=function(k){if(new Date().getTime()-i>u){cg.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+n+"]"),c.removeItem(_),c.removeItem(h),I();return}setTimeout(function(){try{k()}catch(L){v(L)}},s*(Math.random()+.1))},b=function(k,L){k()?L():y(function(){b(k,L)})},T=function(){var k=c.getItem(h);if(k&&k!==n)return!1;if(c.setItem(h,n),c.getItem(h)===n)return!0;if(!mn(c,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},I=function(){c.setItem(d,n),b(T,function(){if(c.getItem(d)===n){R();return}y(function(){if(c.getItem(h)!==n){I();return}b(function(){return!c.getItem(_)},R)})})},R=function(){c.setItem(_,"1");try{e()}finally{c.removeItem(_),c.getItem(h)===n&&c.removeItem(h),c.getItem(d)===n&&c.removeItem(d)}};try{if(mn(c,!0))I();else throw new Error("localStorage support check failed")}catch(k){v(k)}};var Io=ea("batch"),Tt=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||f.bind(Io.error,Io),this.lock=new pu(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};Tt.prototype.enqueue=function(e,t,r){var n={id:ta(),flushAfter:new Date().getTime()+t*2,payload:e};this.lock.withLock(f.bind(function(){var o;try{var s=this.readFromStorage();s.push(n),o=this.saveToStorage(s),o&&this.memQueue.push(n)}catch{this.reportError("Error enqueueing item",e),o=!1}r&&r(o)},this),f.bind(function(o){this.reportError("Error acquiring storage lock",o),r&&r(!1)},this),this.pid)};Tt.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.length<e){var r=this.readFromStorage();if(r.length){var n={};f.each(t,function(s){n[s.id]=!0});for(var i=0;i<r.length;i++){var o=r[i];if(new Date().getTime()>o.flushAfter&&!n[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}}return t};var Co=function(e,t){var r=[];return f.each(e,function(n){n.id&&!t[n.id]&&r.push(n)}),r};Tt.prototype.removeItemsByID=function(e,t){var r={};f.each(e,function(i){r[i]=!0}),this.memQueue=Co(this.memQueue,r);var n=f.bind(function(){var i;try{var o=this.readFromStorage();if(o=Co(o,r),i=this.saveToStorage(o),i){o=this.readFromStorage();for(var s=0;s<o.length;s++){var u=o[s];if(u.id&&r[u.id])return this.reportError("Item not removed from storage"),!1}}}catch{this.reportError("Error removing items",e),i=!1}return i},this);this.lock.withLock(function(){var o=n();t&&t(o)},f.bind(function(o){var s=!1;if(this.reportError("Error acquiring storage lock",o),!mn(this.storage,!0)&&(s=n(),!s))try{this.storage.removeItem(this.storageKey)}catch(u){this.reportError("Error clearing queue",u)}t&&t(s)},this),this.pid)};var Oo=function(e,t){var r=[];return f.each(e,function(n){var i=n.id;if(i in t){var o=t[i];o!==null&&(n.payload=o,r.push(n))}else r.push(n)}),r};Tt.prototype.updatePayloads=function(e,t){this.memQueue=Oo(this.memQueue,e),this.lock.withLock(f.bind(function(){var n;try{var i=this.readFromStorage();i=Oo(i,e),n=this.saveToStorage(i)}catch{this.reportError("Error updating items",e),n=!1}t&&t(n)},this),f.bind(function(n){this.reportError("Error acquiring storage lock",n),t&&t(!1)},this),this.pid)};Tt.prototype.readFromStorage=function(){var e;try{e=this.storage.getItem(this.storageKey),e&&(e=bn(e),f.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null))}catch(t){this.reportError("Error retrieving queue",t),e=null}return e||[]};Tt.prototype.saveToStorage=function(e){try{return this.storage.setItem(this.storageKey,yn(e)),!0}catch(t){return this.reportError("Error saving queue",t),!1}};Tt.prototype.clear=function(){this.memQueue=[],this.storage.removeItem(this.storageKey)};var fg=10*60*1e3,Rr=ea("batch"),Ze=function(e,t){this.errorReporter=t.errorReporter,this.queue=new Tt(e,{errorReporter:f.bind(this.reportError,this),storage:t.storage}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={}};Ze.prototype.enqueue=function(e,t){this.queue.enqueue(e,this.flushInterval,t)};Ze.prototype.start=function(){this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()};Ze.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)};Ze.prototype.clear=function(){this.queue.clear()};Ze.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size};Ze.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)};Ze.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(f.bind(this.flush,this),this.flushInterval))};Ze.prototype.flush=function(e){try{if(this.requestInProgress){Rr.log("Flush: Request already in progress");return}e=e||{};var t=this.libConfig.batch_request_timeout_ms,r=new Date().getTime(),n=this.batchSize,i=this.queue.fillBatch(n),o=[],s={};if(f.each(i,function(d){var h=d.payload;if(this.beforeSendHook&&!d.orphaned&&(h=this.beforeSendHook(h)),h){h.event&&h.properties&&(h.properties=f.extend({},h.properties,{mp_sent_by_lib_version:Qe.LIB_VERSION}));var _=!0,v=d.id;v?(this.itemIdsSentSuccessfully[v]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:d,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[v]}),_=!1):this.reportError("[dupe] found item with no ID",{item:d}),_&&o.push(h)}s[d.id]=h},this),o.length<1){this.resetFlush();return}this.requestInProgress=!0;var u=f.bind(function(d){this.requestInProgress=!1;try{var h=!1;if(e.unloading)this.queue.updatePayloads(s);else if(f.isObject(d)&&d.error==="timeout"&&new Date().getTime()-r>=t)this.reportError("Network timeout; retrying"),this.flush();else if(f.isObject(d)&&d.xhr_req&&(d.xhr_req.status>=500||d.xhr_req.status===429||d.error==="timeout")){var _=this.flushInterval*2,v=d.xhr_req.responseHeaders;if(v){var y=v["Retry-After"];y&&(_=parseInt(y,10)*1e3||_)}_=Math.min(fg,_),this.reportError("Error; retry in "+_+" ms"),this.scheduleFlush(_)}else if(f.isObject(d)&&d.xhr_req&&d.xhr_req.status===413)if(i.length>1){var b=Math.max(1,Math.floor(n/2));this.batchSize=Math.min(this.batchSize,b,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),h=!0;else h=!0;h&&(this.queue.removeItemsByID(f.map(i,function(T){return T.id}),f.bind(function(T){T?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())},this)),f.each(i,f.bind(function(T){var I=T.id;I?(this.itemIdsSentSuccessfully[I]=this.itemIdsSentSuccessfully[I]||0,this.itemIdsSentSuccessfully[I]++,this.itemIdsSentSuccessfully[I]>5&&this.reportError("[dupe] item ID sent too many times",{item:T,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[I]})):this.reportError("[dupe] found item with no ID while removing",{item:T})},this)))}catch(T){this.reportError("Error handling API response",T),this.resetFlush()}},this),c={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(c.transport="sendBeacon"),Rr.log("MIXPANEL REQUEST:",o),this.sendRequest(o,c,u)}catch(d){this.reportError("Error flushing request queue",d),this.resetFlush()}};Ze.prototype.reportError=function(e,t){if(Rr.error.apply(Rr.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(r){Rr.error(r)}};var lg="__mp_opt_in_out_";function dg(e,t){_u(!0,e,t)}function pg(e,t){_u(!1,e,t)}function hg(e,t){return vu(e,t)==="1"}function hu(e,t){if(_g(t))return K.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r=vu(e,t)==="0";return r&&K.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function hr(e){return ia(e,function(t){return this.get_config(t)})}function kt(e){return ia(e,function(t){return this._get_config(t)})}function vr(e){return ia(e,function(t){return this._get_config(t)})}function vg(e,t){t=t||{},ra(t).remove(na(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function ra(e){return e=e||{},e.persistenceType==="localStorage"?f.localStorage:f.cookie}function na(e,t){return t=t||{},(t.persistencePrefix||lg)+e}function vu(e,t){return ra(t).get(na(e,t))}function _g(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||z,r=t.navigator||{},n=!1;return f.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(i){f.includes([!0,1,"1","yes"],i)&&(n=!0)}),n}function _u(e,t,r){if(!f.isString(t)||!t.length){K.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}r=r||{},ra(r).set(na(t,r),e?1:0,f.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})}function ia(e,t){return function(){var r=!1;try{var n=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),u=t.call(this,"window");n&&(r=hu(n,{ignoreDnt:i,persistenceType:o,persistencePrefix:s,window:u}))}catch(d){K.error("Unexpected error when checking tracking opt-out status: "+d)}if(!r)return e.apply(this,arguments);var c=arguments[arguments.length-1];typeof c=="function"&&c(0)}}var Et="$set",cr="$set_once",Ue="$unset",Ht="$add",je="$append",Vt="$union",et="$remove",gg="$delete",gu={set_action:function(e,t){var r={},n={};return f.isObject(e)?f.each(e,function(i,o){this._is_reserved_property(o)||(n[o]=i)},this):n[e]=t,r[Et]=n,r},unset_action:function(e){var t={},r=[];return f.isArray(e)||(e=[e]),f.each(e,function(n){this._is_reserved_property(n)||r.push(n)},this),t[Ue]=r,t},set_once_action:function(e,t){var r={},n={};return f.isObject(e)?f.each(e,function(i,o){this._is_reserved_property(o)||(n[o]=i)},this):n[e]=t,r[cr]=n,r},union_action:function(e,t){var r={},n={};return f.isObject(e)?f.each(e,function(i,o){this._is_reserved_property(o)||(n[o]=f.isArray(i)?i:[i])},this):n[e]=f.isArray(t)?t:[t],r[Vt]=n,r},append_action:function(e,t){var r={},n={};return f.isObject(e)?f.each(e,function(i,o){this._is_reserved_property(o)||(n[o]=i)},this):n[e]=t,r[je]=n,r},remove_action:function(e,t){var r={},n={};return f.isObject(e)?f.each(e,function(i,o){this._is_reserved_property(o)||(n[o]=i)},this):n[e]=t,r[et]=n,r},delete_action:function(){var e={};return e[gg]="",e}},Q=function(){};f.extend(Q.prototype,gu);Q.prototype._init=function(e,t,r){this._mixpanel=e,this._group_key=t,this._group_id=r};Q.prototype.set=vr(function(e,t,r){var n=this.set_action(e,t);return f.isObject(e)&&(r=t),this._send_request(n,r)});Q.prototype.set_once=vr(function(e,t,r){var n=this.set_once_action(e,t);return f.isObject(e)&&(r=t),this._send_request(n,r)});Q.prototype.unset=vr(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});Q.prototype.union=vr(function(e,t,r){f.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)});Q.prototype.delete=vr(function(e){var t=this.delete_action();return this._send_request(t,e)});Q.prototype.remove=vr(function(e,t,r){var n=this.remove_action(e,t);return this._send_request(n,r)});Q.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var r=f.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:r,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)};Q.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};Q.prototype._get_config=function(e){return this._mixpanel.get_config(e)};Q.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};Q.prototype.remove=Q.prototype.remove;Q.prototype.set=Q.prototype.set;Q.prototype.set_once=Q.prototype.set_once;Q.prototype.union=Q.prototype.union;Q.prototype.unset=Q.prototype.unset;Q.prototype.toString=Q.prototype.toString;var M=function(){};f.extend(M.prototype,gu);M.prototype._init=function(e){this._mixpanel=e};M.prototype.set=kt(function(e,t,r){var n=this.set_action(e,t);return f.isObject(e)&&(r=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),n[Et]=f.extend({},f.info.people_properties(),n[Et]),this._send_request(n,r)});M.prototype.set_once=kt(function(e,t,r){var n=this.set_once_action(e,t);return f.isObject(e)&&(r=t),this._send_request(n,r)});M.prototype.unset=kt(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});M.prototype.increment=kt(function(e,t,r){var n={},i={};return f.isObject(e)?(f.each(e,function(o,s){if(!this._is_reserved_property(s))if(isNaN(parseFloat(o))){K.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else i[s]=o},this),r=t):(f.isUndefined(t)&&(t=1),i[e]=t),n[Ht]=i,this._send_request(n,r)});M.prototype.append=kt(function(e,t,r){f.isObject(e)&&(r=t);var n=this.append_action(e,t);return this._send_request(n,r)});M.prototype.remove=kt(function(e,t,r){f.isObject(e)&&(r=t);var n=this.remove_action(e,t);return this._send_request(n,r)});M.prototype.union=kt(function(e,t,r){f.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)});M.prototype.track_charge=kt(function(e,t,r){if(!f.isNumber(e)&&(e=parseFloat(e),isNaN(e))){K.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",f.extend({$amount:e},t),r)});M.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};M.prototype.delete_user=function(){if(!this._identify_called()){K.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};M.prototype.toString=function(){return this._mixpanel.toString()+".people"};M.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var r=this._mixpanel.get_property("$device_id"),n=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");r&&(e.$device_id=r),n&&(e.$user_id=n),i&&(e.$had_persisted_distinct_id=i);var o=f.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),f.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),f.truncate(o,255))};M.prototype._get_config=function(e){return this._mixpanel.get_config(e)};M.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};M.prototype._enqueue=function(e){Et in e?this._mixpanel.persistence._add_to_people_queue(Et,e):cr in e?this._mixpanel.persistence._add_to_people_queue(cr,e):Ue in e?this._mixpanel.persistence._add_to_people_queue(Ue,e):Ht in e?this._mixpanel.persistence._add_to_people_queue(Ht,e):je in e?this._mixpanel.persistence._add_to_people_queue(je,e):et in e?this._mixpanel.persistence._add_to_people_queue(et,e):Vt in e?this._mixpanel.persistence._add_to_people_queue(Vt,e):K.error("Invalid call to _enqueue():",e)};M.prototype._flush_one_queue=function(e,t,r,n){var i=this,o=f.extend({},this._mixpanel.persistence.load_queue(e)),s=o;!f.isUndefined(o)&&f.isObject(o)&&!f.isEmptyObject(o)&&(i._mixpanel.persistence._pop_from_people_queue(e,o),i._mixpanel.persistence.save(),n&&(s=n(o)),t.call(i,s,function(u,c){u===0&&i._mixpanel.persistence._add_to_people_queue(e,o),f.isUndefined(r)||r(u,c)}))};M.prototype._flush=function(e,t,r,n,i,o,s){var u=this;this._flush_one_queue(Et,this.set,e),this._flush_one_queue(cr,this.set_once,n),this._flush_one_queue(Ue,this.unset,o,function(I){return f.keys(I)}),this._flush_one_queue(Ht,this.increment,t),this._flush_one_queue(Vt,this.union,i);var c=this._mixpanel.persistence.load_queue(je);if(!f.isUndefined(c)&&f.isArray(c)&&c.length)for(var d,h=function(I,R){I===0&&u._mixpanel.persistence._add_to_people_queue(je,d),f.isUndefined(r)||r(I,R)},_=c.length-1;_>=0;_--)c=this._mixpanel.persistence.load_queue(je),d=c.pop(),u._mixpanel.persistence.save(),f.isEmptyObject(d)||u.append(d,h);var v=this._mixpanel.persistence.load_queue(et);if(!f.isUndefined(v)&&f.isArray(v)&&v.length)for(var y,b=function(I,R){I===0&&u._mixpanel.persistence._add_to_people_queue(et,y),f.isUndefined(s)||s(I,R)},T=v.length-1;T>=0;T--)v=this._mixpanel.persistence.load_queue(et),y=v.pop(),u._mixpanel.persistence.save(),f.isEmptyObject(y)||u.remove(y,b)};M.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};M.prototype.set=M.prototype.set;M.prototype.set_once=M.prototype.set_once;M.prototype.unset=M.prototype.unset;M.prototype.increment=M.prototype.increment;M.prototype.append=M.prototype.append;M.prototype.remove=M.prototype.remove;M.prototype.union=M.prototype.union;M.prototype.track_charge=M.prototype.track_charge;M.prototype.clear_charges=M.prototype.clear_charges;M.prototype.delete_user=M.prototype.delete_user;M.prototype.toString=M.prototype.toString;var aa="__mps",oa="__mpso",sa="__mpus",ua="__mpa",ca="__mpap",fa="__mpr",la="__mpu",mu="$people_distinct_id",En="__alias",Lr="__timers",mg=[aa,oa,sa,ua,ca,fa,la,mu,En,Lr],P=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;t!=="cookie"&&t!=="localStorage"&&(K.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),t==="localStorage"&&f.localStorage.is_supported()?this.storage=f.localStorage:this.storage=f.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};P.prototype.properties=function(){var e={};return this.load(),f.each(this.props,function(t,r){f.include(mg,r)||(e[r]=t)}),e};P.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=f.extend({},e))}};P.prototype.upgrade=function(e){var t=e.upgrade,r,n;t&&(r="mp_super_properties",typeof t=="string"&&(r=t),n=this.storage.parse(r),this.storage.remove(r),this.storage.remove(r,!0),n&&(this.props=f.extend(this.props,n.all,n.events))),!e.cookie_name&&e.name!=="mixpanel"&&(r="mp_"+e.token+"_"+e.name,n=this.storage.parse(r),n&&(this.storage.remove(r),this.storage.remove(r,!0),this.register_once(n))),this.storage===f.localStorage&&(n=f.cookie.parse(this.name),f.cookie.remove(this.name),f.cookie.remove(this.name,!0),n&&this.register_once(n))};P.prototype.save=function(){this.disabled||this.storage.set(this.name,f.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};P.prototype.load_prop=function(e){return this.load(),this.props[e]};P.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};P.prototype.clear=function(){this.remove(),this.props={}};P.prototype.register_once=function(e,t,r){return f.isObject(e)?(typeof t>"u"&&(t="None"),this.expire_days=typeof r>"u"?this.default_expiry:r,this.load(),f.each(e,function(n,i){(!this.props.hasOwnProperty(i)||this.props[i]===t)&&(this.props[i]=n)},this),this.save(),!0):!1};P.prototype.register=function(e,t){return f.isObject(e)?(this.expire_days=typeof t>"u"?this.default_expiry:t,this.load(),f.extend(this.props,e),this.save(),!0):!1};P.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())};P.prototype.update_search_keyword=function(e){this.register(f.info.searchInfo(e))};P.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:f.info.referringDomain(e)||"$direct"},"")};P.prototype.get_referrer_info=function(){return f.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};P.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};P.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};P.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};P.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};P.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};P.prototype.get_cross_subdomain=function(){return this.cross_subdomain};P.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};P.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),n=t[e],i=this._get_or_create_queue(Et),o=this._get_or_create_queue(cr),s=this._get_or_create_queue(Ue),u=this._get_or_create_queue(Ht),c=this._get_or_create_queue(Vt),d=this._get_or_create_queue(et,[]),h=this._get_or_create_queue(je,[]);r===aa?(f.extend(i,n),this._pop_from_people_queue(Ht,n),this._pop_from_people_queue(Vt,n),this._pop_from_people_queue(Ue,n)):r===oa?(f.each(n,function(_,v){v in o||(o[v]=_)}),this._pop_from_people_queue(Ue,n)):r===sa?f.each(n,function(_){f.each([i,o,u,c],function(v){_ in v&&delete v[_]}),f.each(h,function(v){_ in v&&delete v[_]}),s[_]=!0}):r===ua?(f.each(n,function(_,v){v in i?i[v]+=_:(v in u||(u[v]=0),u[v]+=_)},this),this._pop_from_people_queue(Ue,n)):r===la?(f.each(n,function(_,v){f.isArray(_)&&(v in c||(c[v]=[]),c[v]=c[v].concat(_))}),this._pop_from_people_queue(Ue,n)):r===fa?(d.push(n),this._pop_from_people_queue(je,n)):r===ca&&(h.push(n),this._pop_from_people_queue(Ue,n)),K.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),K.log(t),this.save()};P.prototype._pop_from_people_queue=function(e,t){var r=this.props[this._get_queue_key(e)];f.isUndefined(r)||f.each(t,function(n,i){e===je||e===et?f.each(r,function(o){o[i]===n&&delete o[i]}):delete r[i]},this)};P.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))};P.prototype._get_queue_key=function(e){if(e===Et)return aa;if(e===cr)return oa;if(e===Ue)return sa;if(e===Ht)return ua;if(e===je)return ca;if(e===et)return fa;if(e===Vt)return la;K.error("Invalid queue:",e)};P.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=f.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)};P.prototype.set_event_timer=function(e,t){var r=this.load_prop(Lr)||{};r[e]=t,this.props[Lr]=r,this.save()};P.prototype.remove_event_timer=function(e){var t=this.load_prop(Lr)||{},r=t[e];return f.isUndefined(r)||(delete this.props[Lr][e],this.save()),r};var da,fe,yu=0,yg=1,bg=function(e){return e},Dr=function(){},Ie="mixpanel",bu="base64",Eg="json",pa="$device:",rr=z.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Eu=!rr&&He.indexOf("MSIE")===-1&&He.indexOf("Mozilla")===-1,Sn=null;mt.sendBeacon&&(Sn=function(){return mt.sendBeacon.apply(mt,arguments)});var Su={track:"track/",engage:"engage/",groups:"groups/"},Ro={api_host:"https://api-js.mixpanel.com",api_routes:Su,api_method:"POST",api_transport:"XHR",api_payload_format:bu,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Dr,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Dr,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},wu=!1,E=function(){},xi=function(e,t,r){var n,i=r===Ie?fe:fe[r];if(i&&da===yu)n=i;else{if(i&&!f.isArray(i)){K.error("You have already initialized "+r);return}n=new E}if(n._cached_groups={},n._init(e,t,r),n.people=new M,n.people._init(n),!n.get_config("skip_first_touch_marketing")){var o=f.info.campaignParams(null),s={},u=!1;f.each(o,function(c,d){s["initial_"+d]=c,c&&(u=!0)}),u&&n.people.set_once(s)}return Qe.DEBUG=Qe.DEBUG||n.get_config("debug"),!f.isUndefined(i)&&f.isArray(i)&&(n._execute_array.call(n.people,i.people),n._execute_array(i)),n};E.prototype.init=function(e,t,r){if(f.isUndefined(r)){this.report_error("You must name your new library: init(token, config, name)");return}if(r===Ie){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var n=xi(e,t,r);return fe[r]=n,n._loaded(),n};E.prototype._init=function(e,t,r){t=t||{},this.__loaded=!0,this.config={};var n={};if(!("api_payload_format"in t)){var i=t.api_host||Ro.api_host;i.match(/\.mixpanel\.com/)&&(n.api_payload_format=Eg)}if(this.set_config(f.extend({},Ro,n,t,{name:r,token:e,callback_fn:(r===Ie?r:Ie+"."+r)+"._jsc"})),this._jsc=Dr,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!f.localStorage.is_supported(!0)||!rr)this._batch_requests=!1,K.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),f.each(this.get_batcher_configs(),function(c){K.log("Clearing batch queue "+c.queue_key),f.localStorage.remove(c.queue_key)});else if(this.init_batchers(),Sn&&z.addEventListener){var o=f.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);z.addEventListener("pagehide",function(c){c.persisted&&o()}),z.addEventListener("visibilitychange",function(){X.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new P(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=f.UUID();this.get_distinct_id()||this.register_once({distinct_id:pa+s,$device_id:s},"");var u=this.get_config("track_pageview");u&&this._init_url_change_tracking(u)};E.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=f.info.campaignParams(null);f.each(e,(function(t,r){this.unregister(r)}).bind(this))}};E.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(X.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(f.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(X.referrer)};E.prototype._dom_loaded=function(){f.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||f.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};E.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!wu)return this.__dom_loaded_queue.push([e,t]),!1;var r=new e().init(this);return r.track.apply(r,t)};E.prototype._init_url_change_tracking=function(e){var t="",r=this.track_pageview();if(r&&(t=f.info.currentUrl()),f.include(["full-url","url-with-path-and-query-string","url-with-path"],e)){z.addEventListener("popstate",function(){z.dispatchEvent(new Event("mp_locationchange"))}),z.addEventListener("hashchange",function(){z.dispatchEvent(new Event("mp_locationchange"))});var n=z.history.pushState;typeof n=="function"&&(z.history.pushState=function(o,s,u){n.call(z.history,o,s,u),z.dispatchEvent(new Event("mp_locationchange"))});var i=z.history.replaceState;typeof i=="function"&&(z.history.replaceState=function(o,s,u){i.call(z.history,o,s,u),z.dispatchEvent(new Event("mp_locationchange"))}),z.addEventListener("mp_locationchange",(function(){var o=f.info.currentUrl(),s=!1;if(e==="full-url"?s=o!==t:e==="url-with-path-and-query-string"?s=o.split("#")[0]!==t.split("#")[0]:e==="url-with-path"&&(s=o.split("#")[0].split("?")[0]!==t.split("#")[0].split("?")[0]),s){var u=this.track_pageview();u&&(t=o)}}).bind(this))}};E.prototype._prepare_callback=function(e,t){if(f.isUndefined(e))return null;if(rr){var r=function(s){e(s,t)};return r}else{var n=this._jsc,i=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+i+"]";return n[i]=function(s){delete n[i],e(s,t)},o}};E.prototype._send_request=function(e,t,r,n){var i=!0;if(Eu)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!n&&(f.isFunction(r)||typeof r=="string")&&(n=r,r=null),r=f.extend(o,r||{}),rr||(r.method="GET");var u=r.method==="POST",c=Sn&&u&&r.transport.toLowerCase()==="sendbeacon",d=r.verbose;t.verbose&&(d=!0),this.get_config("test")&&(t.test=1),d&&(t.verbose=1),this.get_config("img")&&(t.img=1),rr||(n?t.callback=n:(d||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),u&&(s="data="+encodeURIComponent(t.data),delete t.data),e+="?"+f.HTTPBuildQuery(t);var h=this;if("img"in t){var _=X.createElement("img");_.src=e,X.body.appendChild(_)}else if(c){try{i=Sn(e,s)}catch(R){h.report_error(R),i=!1}try{n&&n(i?1:0)}catch(R){h.report_error(R)}}else if(rr)try{var v=new XMLHttpRequest;v.open(r.method,e,!0);var y=this.get_config("xhr_headers");if(u&&(y["Content-Type"]="application/x-www-form-urlencoded"),f.each(y,function(R,k){v.setRequestHeader(k,R)}),r.timeout_ms&&typeof v.timeout<"u"){v.timeout=r.timeout_ms;var b=new Date().getTime()}v.withCredentials=!0,v.onreadystatechange=function(){if(v.readyState===4)if(v.status===200){if(n)if(d){var R;try{R=f.JSONDecode(v.responseText)}catch(L){if(h.report_error(L),r.ignore_json_errors)R=v.responseText;else return}n(R)}else n(Number(v.responseText))}else{var k;v.timeout&&!v.status&&new Date().getTime()-b>=v.timeout?k="timeout":k="Bad HTTP status: "+v.status+" "+v.statusText,h.report_error(k),n&&n(d?{status:0,error:k,xhr_req:v}:0)}},v.send(s)}catch(R){h.report_error(R),i=!1}else{var T=X.createElement("script");T.type="text/javascript",T.async=!0,T.defer=!0,T.src=e;var I=X.getElementsByTagName("script")[0];I.parentNode.insertBefore(T,I)}return i};E.prototype._execute_array=function(e){var t,r=[],n=[],i=[];f.each(e,function(s){s&&(t=s[0],f.isArray(t)?i.push(s):typeof s=="function"?s.call(this):f.isArray(s)&&t==="alias"?r.push(s):f.isArray(s)&&t.indexOf("track")!==-1&&typeof this[t]=="function"?i.push(s):n.push(s))},this);var o=function(s,u){f.each(s,function(c){if(f.isArray(c[0])){var d=u;f.each(c,function(h){d=d[h[0]].apply(d,h.slice(1))})}else this[c[0]].apply(this,c.slice(1))},u)};o(r,this),o(n,this),o(i,this)};E.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};E.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token"),t=this.get_config("api_routes");return this._batcher_configs=this._batcher_configs||{events:{type:"events",endpoint:"/"+t.track,queue_key:e+"_ev"},people:{type:"people",endpoint:"/"+t.engage,queue_key:e+"_pp"},groups:{type:"groups",endpoint:"/"+t.groups,queue_key:e+"_gr"}},this._batcher_configs};E.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=f.bind(function(r){return new Ze(r.queue_key,{libConfig:this.config,sendRequestFunc:f.bind(function(n,i,o){this._send_request(this.get_config("api_host")+r.endpoint,this._encode_data_for_request(n),i,this._prepare_callback(o,n))},this),beforeSendHook:f.bind(function(n){return this._run_hook("before_send_"+r.type,n)},this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:f.bind(this.stop_batch_senders,this)})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()};E.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,f.each(this.request_batchers,function(e){e.start()}))};E.prototype.stop_batch_senders=function(){this._batch_requests=!1,f.each(this.request_batchers,function(e){e.stop(),e.clear()})};E.prototype.push=function(e){this._execute_array([e])};E.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};E.prototype._encode_data_for_request=function(e){var t=f.JSONEncode(e);return this.get_config("api_payload_format")===bu&&(t=f.base64Encode(t)),{data:t}};E.prototype._track_or_batch=function(e,t){var r=f.truncate(e.data,255),n=e.endpoint,i=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};t=t||Dr;var u=!0,c=f.bind(function(){return s.skip_hooks||(r=this._run_hook("before_send_"+e.type,r)),r?(K.log("MIXPANEL REQUEST:"),K.log(r),this._send_request(n,this._encode_data_for_request(r),s,this._prepare_callback(t,r))):null},this);return this._batch_requests&&!o?i.enqueue(r,function(d){d?t(1,r):c()}):u=c(),u&&r};E.prototype.track=hr(function(e,t,r,n){!n&&typeof r=="function"&&(n=r,r=null),r=r||{};var i=r.transport;i&&(r.transport=i);var o=r.send_immediately;if(typeof n!="function"&&(n=Dr),f.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){n(0);return}t=f.extend({},t),t.token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!f.isUndefined(s)){var u=new Date().getTime()-s;t.$duration=parseFloat((u/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?f.info.marketingParams():{};t=f.extend({},f.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,t);var d=this.get_config("property_blacklist");f.isArray(d)?f.each(d,function(v){delete t[v]}):this.report_error("Invalid value for property_blacklist config: "+d);var h={event:e,properties:t},_=this._track_or_batch({type:"events",data:h,endpoint:this.get_config("api_host")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:r},n);return _});E.prototype.set_group=hr(function(e,t,r){f.isArray(t)||(t=[t]);var n={};return n[e]=t,this.register(n),this.people.set(e,t,r)});E.prototype.add_group=hr(function(e,t,r){var n=this.get_property(e),i={};return n===void 0?(i[e]=[t],this.register(i)):n.indexOf(t)===-1&&(n.push(t),i[e]=n,this.register(i)),this.people.union(e,t,r)});E.prototype.remove_group=hr(function(e,t,r){var n=this.get_property(e);if(n!==void 0){var i=n.indexOf(t);i>-1&&(n.splice(i,1),this.register({group_key:n})),n.length===0&&this.unregister(e)}return this.people.remove(e,t,r)});E.prototype.track_with_groups=hr(function(e,t,r,n){var i=f.extend({},t||{});return f.each(r,function(o,s){o!=null&&(i[s]=o)}),this.track(e,i,n)});E.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)};E.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]};E.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),n=this._cached_groups[r];return(n===void 0||n._group_key!==e||n._group_id!==t)&&(n=new Q,n._init(this,e,t),this._cached_groups[r]=n),n};E.prototype.track_pageview=hr(function(e,t){typeof e!="object"&&(e={}),t=t||{};var r=t.event_name||"$mp_web_page_view",n=f.extend(f.info.mpPageViewProperties(),f.info.campaignParams(),f.info.clickParams()),i=f.extend({},n,e);return this.track(r,i)});E.prototype.track_links=function(){return this._track_dom.call(this,ur,arguments)};E.prototype.track_forms=function(){return this._track_dom.call(this,Un,arguments)};E.prototype.time_event=function(e){if(f.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var Sg={persistent:!0},ha=function(e){var t;return f.isObject(e)?t=e:f.isUndefined(e)?t={}:t={days:e},f.extend({},Sg,t)};E.prototype.register=function(e,t){var r=ha(t);r.persistent?this.persistence.register(e,r.days):f.extend(this.unpersisted_superprops,e)};E.prototype.register_once=function(e,t,r){var n=ha(r);n.persistent?this.persistence.register_once(e,t,n.days):(typeof t>"u"&&(t="None"),f.each(e,function(i,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===t)&&(this.unpersisted_superprops[o]=i)},this))};E.prototype.unregister=function(e,t){t=ha(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]};E.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)};E.prototype.identify=function(e,t,r,n,i,o,s,u){var c=this.get_distinct_id();if(e&&c!==e){if(typeof e=="string"&&e.indexOf(pa)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var d=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:d},"")}e!==c&&e!==this.get_property(En)&&(this.unregister(En),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,n,i,o,s,u),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0})};E.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=f.UUID();this.register_once({distinct_id:pa+e,$device_id:e},"")};E.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};E.prototype.alias=function(e,t){if(e===this.get_property(mu))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return f.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(En,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){r.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};E.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};E.prototype.set_config=function(e){if(f.isObject(e)){f.extend(this.config,e);var t=e.batch_size;t&&f.each(this.request_batchers,function(r){r.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Qe.DEBUG=Qe.DEBUG||this.get_config("debug")}};E.prototype.get_config=function(e){return this.config[e]};E.prototype._run_hook=function(e){var t=(this.config.hooks[e]||bg).apply(this,gt.call(arguments,1));return typeof t>"u"&&(this.report_error(e+" hook did not return a value"),t=null),t};E.prototype.get_property=function(e){return this.persistence.load_prop([e])};E.prototype.toString=function(){var e=this.get_config("name");return e!==Ie&&(e=Ie+"."+e),e};E.prototype._event_is_disabled=function(e){return f.isBlockedUA(He)||this._flags.disable_all_events||f.include(this.__disabled_events,e)};E.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&f.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||f.cookie.get("mp_optout"))&&(f.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};E.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t?this.stop_batch_senders():this._batchers_were_started&&this.start_batch_senders()};E.prototype._gdpr_call_func=function(e,t){return t=f.extend({track:f.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),f.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})};E.prototype.opt_in_tracking=function(e){e=f.extend({enable_persistence:!0},e),this._gdpr_call_func(dg,e),this._gdpr_update_persistence(e)};E.prototype.opt_out_tracking=function(e){e=f.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(pg,e),this._gdpr_update_persistence(e)};E.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(hg,e)};E.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(hu,e)};E.prototype.clear_opt_in_out_tracking=function(e){e=f.extend({enable_persistence:!0},e),this._gdpr_call_func(vg,e),this._gdpr_update_persistence(e)};E.prototype.report_error=function(e,t){K.error.apply(K.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(r){K.error(r)}};E.prototype.init=E.prototype.init;E.prototype.reset=E.prototype.reset;E.prototype.disable=E.prototype.disable;E.prototype.time_event=E.prototype.time_event;E.prototype.track=E.prototype.track;E.prototype.track_links=E.prototype.track_links;E.prototype.track_forms=E.prototype.track_forms;E.prototype.track_pageview=E.prototype.track_pageview;E.prototype.register=E.prototype.register;E.prototype.register_once=E.prototype.register_once;E.prototype.unregister=E.prototype.unregister;E.prototype.identify=E.prototype.identify;E.prototype.alias=E.prototype.alias;E.prototype.name_tag=E.prototype.name_tag;E.prototype.set_config=E.prototype.set_config;E.prototype.get_config=E.prototype.get_config;E.prototype.get_property=E.prototype.get_property;E.prototype.get_distinct_id=E.prototype.get_distinct_id;E.prototype.toString=E.prototype.toString;E.prototype.opt_out_tracking=E.prototype.opt_out_tracking;E.prototype.opt_in_tracking=E.prototype.opt_in_tracking;E.prototype.has_opted_out_tracking=E.prototype.has_opted_out_tracking;E.prototype.has_opted_in_tracking=E.prototype.has_opted_in_tracking;E.prototype.clear_opt_in_out_tracking=E.prototype.clear_opt_in_out_tracking;E.prototype.get_group=E.prototype.get_group;E.prototype.set_group=E.prototype.set_group;E.prototype.add_group=E.prototype.add_group;E.prototype.remove_group=E.prototype.remove_group;E.prototype.track_with_groups=E.prototype.track_with_groups;E.prototype.start_batch_senders=E.prototype.start_batch_senders;E.prototype.stop_batch_senders=E.prototype.stop_batch_senders;E.prototype.DEFAULT_API_ROUTES=Su;P.prototype.properties=P.prototype.properties;P.prototype.update_search_keyword=P.prototype.update_search_keyword;P.prototype.update_referrer_info=P.prototype.update_referrer_info;P.prototype.get_cross_subdomain=P.prototype.get_cross_subdomain;P.prototype.clear=P.prototype.clear;var Jt={},wg=function(){f.each(Jt,function(e,t){t!==Ie&&(fe[t]=e)}),fe._=f},Tg=function(){fe.init=function(e,t,r){if(r)return fe[r]||(fe[r]=Jt[r]=xi(e,t,r),fe[r]._loaded()),fe[r];var n=fe;Jt[Ie]?n=Jt[Ie]:e&&(n=xi(e,t,Ie),n._loaded(),Jt[Ie]=n),fe=n,da===yg&&(z[Ie]=fe),wg()}},kg=function(){function e(){e.done||(e.done=!0,wu=!0,Eu=!1,f.each(Jt,function(n){n._dom_loaded()}))}function t(){try{X.documentElement.doScroll("left")}catch{setTimeout(t,1);return}e()}if(X.addEventListener)X.readyState==="complete"?e():X.addEventListener("DOMContentLoaded",e,!1);else if(X.attachEvent){X.attachEvent("onreadystatechange",e);var r=!1;try{r=z.frameElement===null}catch{}X.documentElement.doScroll&&r&&t()}f.register_event(z,"load",e,!0)};function Ag(){return da=yu,fe=new E,Tg(),fe.init(),kg(),fe}var xg=Ag(),Ig=xg;const Rt=Jc(Ig);class Cg extends Mr{constructor(){super(),Rt.init("6c2e3a0cfa098d08e538e4c27100218a",{debug:No==="development",track_pageview:"full-url",persistence:"localStorage",api_host:"https://api-eu.mixpanel.com"})}trackNewUser(t){if(!t){Rt.reset();return}const{userId:r,firstName:n,lastName:i,email:o,personId:s,groups:u,impersonator:c}=t;Rt.identify(r.toString()),Rt.people.set({$name:`${n} ${i}`,firstName:n,lastName:i,email:o,userId:r,personId:s,groups:u,internal:u.includes(nr.Admin),bunchSessionId:this.bunchSessionId}),c&&Rt.track("impersonation",{impersonatorUserId:c.id,impersonatorIsAdmin:c.group===nr.Admin})}trackPageView(){Rt.track_pageview()}trackEvent(t,r){Rt.track(t,r)}}class Og extends Mr{constructor(){super(),ht.init("phc_sfVEtbkp6u29dhaTybRHnX7zzEuAPfJAfx5GPQC89PJ",{api_host:"https://ph.bunch.capital",capture_pageview:!1,capture_pageleave:!1})}trackNewUser(t){if(!t){ht.reset();return}const{userId:r,firstName:n,lastName:i,email:o,personId:s,groups:u,impersonator:c}=t;ht.identify(r.toString(),{firstName:n,lastName:i,email:o,userId:r,personId:s,groups:u,internal:u.includes(nr.Admin),bunchSessionId:this.bunchSessionId}),c&&ht.capture("impersonation",{impersonatorUserId:c.id,impersonatorIsAdmin:c.group===nr.Admin})}trackPageLeave(){ht.capture("$pageleave")}trackPageView(){ht.capture("$pageview"),ht.reloadFeatureFlags()}trackEvent(t,r){ht.capture(t,r)}}class Rg extends Mr{clients=[];constructor(t){super(),t.forEach(r=>this.clients.push(new r))}trackNewUser(t){this.clients.forEach(r=>r.trackNewUser(t))}updateCurrentUserData(t){this.clients.forEach(r=>{var n;return(n=r.updateCurrentUserData)==null?void 0:n.call(r,t)})}trackPageLeave(){this.clients.forEach(t=>{var r;return(r=t.trackPageLeave)==null?void 0:r.call(t)})}trackPageView(){this.clients.forEach(t=>{var r;return(r=t.trackPageView)==null?void 0:r.call(t)})}trackError(t,r){this.clients.forEach(n=>{var i;return(i=n.trackError)==null?void 0:i.call(n,t,r)})}trackEvent(t,r){this.clients.forEach(n=>{var i;return(i=n.trackEvent)==null?void 0:i.call(n,t,r)})}setGlobalProperty(t,r){this.clients.forEach(n=>{var i;return(i=n.setGlobalProperty)==null?void 0:i.call(n,t,r)})}}const Pn=[tg];Pn.push(eg);Pn.push(Cg);Pn.push(Og);const Ng=new Rg(Pn),Lg=async(e=!0)=>{Ii.clear(),await Xc.logout(),Ng.trackNewUser();const t=Kc(jc).url.searchParams.get("redirectUrl");let r="/v2/auth";if(t||e&&!location.href.match(r)){const n=new URLSearchParams;n.append("redirectUrl",t??location.href),r=[r,n.toString()].join("?")}Zc(r)},Dg=async e=>{Ii.set(e)},Mg=async()=>{Ii.clear()},$g={endImpersonation:Mg,impersonateUserById:Dg,logOut:Lg};export{$g as C,Ng as a};
