@launchdarkly/observability 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -275,7 +275,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
275
275
  }
276
276
  }
277
277
  ${Uo}
278
- `,Hl=(t,e,r,n)=>t();function zl(t,e=Hl){return{PushPayload(r,n){return e(i=>t.request(kl,r,C(C({},n),i)),"PushPayload","mutation",r)},PushSessionEvents(r,n){return e(i=>t.request(Dl,r,C(C({},n),i)),"PushSessionEvents","mutation",r)},identifySession(r,n){return e(i=>t.request(Ul,r,C(C({},n),i)),"identifySession","mutation",r)},addSessionProperties(r,n){return e(i=>t.request(jl,r,C(C({},n),i)),"addSessionProperties","mutation",r)},pushMetrics(r,n){return e(i=>t.request(Bl,r,C(C({},n),i)),"pushMetrics","mutation",r)},addSessionFeedback(r,n){return e(i=>t.request($l,r,C(C({},n),i)),"addSessionFeedback","mutation",r)},initializeSession(r,n){return e(i=>t.request(Fl,r,C(C({},n),i)),"initializeSession","mutation",r)},Ignore(r,n){return e(i=>t.request(Vl,r,C(C({},n),i)),"Ignore","query",r)},GetSamplingConfig(r,n){return e(i=>t.request(Gl,r,C(C({},n),i)),"GetSamplingConfig","query",r)}}}function Xl(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}function ql(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let r=t.localName;if(!r)break;r=r.toLowerCase();let n=t.parentElement,i=[];if(n.children&&n.children.length>0)for(let o=0;o<n.children.length;o++){let a=n.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&i.push(a)}i.length>1&&(r+=":eq("+i.indexOf(t)+")"),e=r+(e?">"+e:""),t=n}return e}function yn(t){return Object.prototype.toString.call(t)==="[object Object]"}function jo(t,e){if(e===0)return!0;const r=Object.keys(t);for(const n of r)if(yn(t[n])&&jo(t[n],e-1))return!0;return!1}function mn(t,e){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);const n=[],i=[];return JSON.stringify(t,function(u,c){if(n.length>0){const s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?i.splice(s,1/0,u):i.push(u),~n.indexOf(c)&&(n[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,n.indexOf(c)).join(".")+"]")}else n.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=ql(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return yn(u)&&Object.keys(u).length>r.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(yn(u)&&jo(u,r.depthOfLimit))}function a(u){let c=u.toString();return r.stringLengthLimit&&c.length>r.stringLengthLimit&&(c=`${c.slice(0,r.stringLengthLimit)}...`),c}}function Kl(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const _n="exception.message",Wl="exception.stacktrace",gn="exception.type",Yl="http.response.status_code",Jl="server.address",Ql="service.name",Zl="service.version",tp="telemetry.sdk.name",ep="telemetry.sdk.version",fr="url.full",Bo="url.path",rp="url.query",np="user_agent.original",En=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}var ip={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Tn(t,e){function r(i,o,a){if(typeof document<"u"){a=hr({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+u}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=t.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",hr({},o,{expires:-1}))},withAttributes:function(i){return Tn(this.converter,hr({},this.attributes,i))},withConverter:function(i){return Tn(hr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var bn=Tn(ip,{path:"/"});let On="localStorage",Sn=!0,op=class{constructor(){ge(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(e){var r;return(r=Object.keys(this.storage)[e])!=null?r:null}getItem(e){var r;return(r=this.storage[e])!=null?r:""}setItem(e,r){this.storage[e]=r}removeItem(e){delete this.storage[e]}},ap=class{getItem(e){var r;return(r=bn.get(e))!=null?r:""}setItem(e,r){if(!Sn)return;const n=new Date;n.setTime(n.getTime()+En),bn.set(e,r,{expires:n})}removeItem(e){Sn&&bn.remove(e)}};const te=new op,dr=new ap,Se=()=>{let t=null;if(typeof window>"u")return te;try{switch(On){case"localStorage":t=window.localStorage;break;case"sessionStorage":t=window.sessionStorage;break}t||(bt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${On}; using global storage`),t=te)}catch(e){bt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",e),t=te}return t},sp=t=>{On=t},$o=t=>{Sn=t},wn=t=>{try{return Se().getItem(t)}catch(e){return bt("storage","getItem","debug",`failed to get item ${t}; using global storage`,e),te.getItem(t)}},Fo=(t,e)=>{dr.setItem(t,e);try{return Se().setItem(t,e)}catch(r){return bt("storage","setItem","debug",`failed to set item ${t}; using global storage`,r),te.setItem(t,e)}},Vo=t=>{dr.removeItem(t);try{return Se().removeItem(t)}catch(e){return bt("storage","removeItem","debug",`failed to remove item ${t}; using global storage`,e),te.removeItem(t)}};var ee=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(ee||{});const vr=t=>`${ee.SESSION_DATA}_${t}`,Ot=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Go()},up=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Go=()=>{var t;return(t=wn(ee.SESSION_ID))!=null?t:""},Ho=t=>{Fo(ee.SESSION_ID,t)},cp=t=>{const e=vr(t);return JSON.parse(wn(e)||"{}")},lp=t=>{t||(t=Go());let e=cp(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<En)return e;Vo(vr(t))},zo=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;up(e);const r=vr(e);Fo(r,JSON.stringify(t)),fp(r)},pp=function(){const t=dr.getItem(ee.SESSION_ID);Ho(t);const e=vr(t),r=dr.getItem(e);try{zo(JSON.parse(r))}catch{}};function fp(t){const e=`${ee.SESSION_DATA}_`;for(let r=Se().length-1;r>=0;r--){const n=Se().key(r);if(n&&n.startsWith(e)&&n!==t)try{const i=JSON.parse(wn(n)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=En&&(bt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${n}`),Vo(n))}catch(i){bt("highlightSession","pruneSessionData","error",`failed to parse session data for key ${n}`,i)}}}var Xo=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Xo||{});const An=3,Ln=1e3,Rn=500,hp=[Xo.BillingQuotaExceeded.toString()],dp=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(r=>hp.includes(r.message)))===void 0},vp=()=>{const t=(e,r,n,i,o=0)=>Yt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof Io&&!dp(a))throw a;if(o<An)return yield new Promise(u=>setTimeout(u,Ln+Rn*Math.pow(2,o))),yield t(e,r,n,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return t},J="feature_flag",qo="launchdarkly",yp="evaluation",mp=`${J}.set.id`,_p=`${J}.key`,gp=`${J}.contextKeys`,Ep=`${J}.context.id`,Tp=`${J}.result.value`,bp=`${J}.provider.name`,Ko={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},Op=`${J}.result.variationIndex`,Sp=`${qo}.application.id`,wp=`${qo}.application.version`,Ap="$ld:telemetry:session:init",Wo="$ld:telemetry:track",Lp="document_load",Rp="result.status";function Yo(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Jo(t){return t.kind==="multi"}function Nn(t){return Jo(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Yo(t[e].key)}`).join(":"):"kind"in t&&t.kind==="user"?t.key:"kind"in t?`${t.kind}:${Yo(t.key)}`:t.key}function Qo(t){return Jo(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:t[e].key})).reduce((e,r)=>C(C({},e),r),{}):"kind"in t?{[t.kind]:t.key}:{user:t.key}}class Np{constructor(e,r){ge(this,"client"),ge(this,"metadata"),this.client=e,this.metadata=r}getHooks(e){return[]}init(e){this.client.track(Ap,{sessionID:e})}recordGauge(e,r){}identify(e,r,n={},i){}error(e,r){}track(e,r){const n=r.event;this.client.track(n?`${Wo}:${n}`:Wo,tr(C({},r),{sessionID:e}))}}let Cp=class extends fo{constructor(e,r){super(),ge(this,"client"),this.client=new Np(e,r)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(r,n,i)=>(this.load(this.client),n)}]}init(e){return this._bufferCall("init",[e])}recordGauge(e,r){return this._bufferCall("recordGauge",[e,r])}identify(e,r,n={},i){return this._bufferCall("identify",[e,r,n,i])}error(e,r){return this._bufferCall("error",[e,r])}track(e,r){return this._bufferCall("track",[e,r])}};const xp="9.25.1",Pp={version:xp},Ip=Pp.version;function Mp(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(const r of t.classList)e.push(`.${r}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}const kp=t=>{let e;const r=()=>{clearTimeout(e),e=setTimeout(()=>{var n,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(n=window.screen.orientation)==null?void 0:n.angle)!=null?i:0})},500)};return window.addEventListener("resize",r),r(),()=>window.removeEventListener("resize",r)};var Zo={exports:{}};/**
278
+ `,Hl=(t,e,r,n)=>t();function zl(t,e=Hl){return{PushPayload(r,n){return e(i=>t.request(kl,r,C(C({},n),i)),"PushPayload","mutation",r)},PushSessionEvents(r,n){return e(i=>t.request(Dl,r,C(C({},n),i)),"PushSessionEvents","mutation",r)},identifySession(r,n){return e(i=>t.request(Ul,r,C(C({},n),i)),"identifySession","mutation",r)},addSessionProperties(r,n){return e(i=>t.request(jl,r,C(C({},n),i)),"addSessionProperties","mutation",r)},pushMetrics(r,n){return e(i=>t.request(Bl,r,C(C({},n),i)),"pushMetrics","mutation",r)},addSessionFeedback(r,n){return e(i=>t.request($l,r,C(C({},n),i)),"addSessionFeedback","mutation",r)},initializeSession(r,n){return e(i=>t.request(Fl,r,C(C({},n),i)),"initializeSession","mutation",r)},Ignore(r,n){return e(i=>t.request(Vl,r,C(C({},n),i)),"Ignore","query",r)},GetSamplingConfig(r,n){return e(i=>t.request(Gl,r,C(C({},n),i)),"GetSamplingConfig","query",r)}}}function Xl(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}function ql(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let r=t.localName;if(!r)break;r=r.toLowerCase();let n=t.parentElement,i=[];if(n.children&&n.children.length>0)for(let o=0;o<n.children.length;o++){let a=n.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&i.push(a)}i.length>1&&(r+=":eq("+i.indexOf(t)+")"),e=r+(e?">"+e:""),t=n}return e}function yn(t){return Object.prototype.toString.call(t)==="[object Object]"}function jo(t,e){if(e===0)return!0;const r=Object.keys(t);for(const n of r)if(yn(t[n])&&jo(t[n],e-1))return!0;return!1}function mn(t,e){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);const n=[],i=[];return JSON.stringify(t,function(u,c){if(n.length>0){const s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?i.splice(s,1/0,u):i.push(u),~n.indexOf(c)&&(n[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,n.indexOf(c)).join(".")+"]")}else n.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=ql(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return yn(u)&&Object.keys(u).length>r.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(yn(u)&&jo(u,r.depthOfLimit))}function a(u){let c=u.toString();return r.stringLengthLimit&&c.length>r.stringLengthLimit&&(c=`${c.slice(0,r.stringLengthLimit)}...`),c}}function Kl(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const _n="exception.message",Wl="exception.stacktrace",gn="exception.type",Yl="http.response.status_code",Jl="server.address",Ql="service.name",Zl="service.version",tp="telemetry.sdk.name",ep="telemetry.sdk.version",fr="url.full",Bo="url.path",rp="url.query",np="user_agent.original",En=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}var ip={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Tn(t,e){function r(i,o,a){if(typeof document<"u"){a=hr({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+u}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=t.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",hr({},o,{expires:-1}))},withAttributes:function(i){return Tn(this.converter,hr({},this.attributes,i))},withConverter:function(i){return Tn(hr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var bn=Tn(ip,{path:"/"});let On="localStorage",Sn=!0,op=class{constructor(){ge(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(e){var r;return(r=Object.keys(this.storage)[e])!=null?r:null}getItem(e){var r;return(r=this.storage[e])!=null?r:""}setItem(e,r){this.storage[e]=r}removeItem(e){delete this.storage[e]}},ap=class{getItem(e){var r;return(r=bn.get(e))!=null?r:""}setItem(e,r){if(!Sn)return;const n=new Date;n.setTime(n.getTime()+En),bn.set(e,r,{expires:n})}removeItem(e){Sn&&bn.remove(e)}};const te=new op,dr=new ap,Se=()=>{let t=null;if(typeof window>"u")return te;try{switch(On){case"localStorage":t=window.localStorage;break;case"sessionStorage":t=window.sessionStorage;break}t||(bt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${On}; using global storage`),t=te)}catch(e){bt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",e),t=te}return t},sp=t=>{On=t},$o=t=>{Sn=t},wn=t=>{try{return Se().getItem(t)}catch(e){return bt("storage","getItem","debug",`failed to get item ${t}; using global storage`,e),te.getItem(t)}},Fo=(t,e)=>{dr.setItem(t,e);try{return Se().setItem(t,e)}catch(r){return bt("storage","setItem","debug",`failed to set item ${t}; using global storage`,r),te.setItem(t,e)}},Vo=t=>{dr.removeItem(t);try{return Se().removeItem(t)}catch(e){return bt("storage","removeItem","debug",`failed to remove item ${t}; using global storage`,e),te.removeItem(t)}};var ee=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(ee||{});const vr=t=>`${ee.SESSION_DATA}_${t}`,Ot=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Go()},up=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Go=()=>{var t;return(t=wn(ee.SESSION_ID))!=null?t:""},Ho=t=>{Fo(ee.SESSION_ID,t)},cp=t=>{const e=vr(t);return JSON.parse(wn(e)||"{}")},lp=t=>{t||(t=Go());let e=cp(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<En)return e;Vo(vr(t))},zo=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;up(e);const r=vr(e);Fo(r,JSON.stringify(t)),fp(r)},pp=function(){const t=dr.getItem(ee.SESSION_ID);Ho(t);const e=vr(t),r=dr.getItem(e);try{zo(JSON.parse(r))}catch{}};function fp(t){const e=`${ee.SESSION_DATA}_`;for(let r=Se().length-1;r>=0;r--){const n=Se().key(r);if(n&&n.startsWith(e)&&n!==t)try{const i=JSON.parse(wn(n)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=En&&(bt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${n}`),Vo(n))}catch(i){bt("highlightSession","pruneSessionData","error",`failed to parse session data for key ${n}`,i)}}}var Xo=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Xo||{});const An=3,Ln=1e3,Rn=500,hp=[Xo.BillingQuotaExceeded.toString()],dp=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(r=>hp.includes(r.message)))===void 0},vp=()=>{const t=(e,r,n,i,o=0)=>Yt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof Io&&!dp(a))throw a;if(o<An)return yield new Promise(u=>setTimeout(u,Ln+Rn*Math.pow(2,o))),yield t(e,r,n,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return t},J="feature_flag",qo="launchdarkly",yp="evaluation",mp=`${J}.set.id`,_p=`${J}.key`,gp=`${J}.contextKeys`,Ep=`${J}.context.id`,Tp=`${J}.result.value`,bp=`${J}.provider.name`,Ko={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},Op=`${J}.result.variationIndex`,Sp=`${qo}.application.id`,wp=`${qo}.application.version`,Ap="$ld:telemetry:session:init",Wo="$ld:telemetry:track",Lp="document_load",Rp="result.status";function Yo(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Jo(t){return t.kind==="multi"}function Nn(t){return Jo(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Yo(t[e].key)}`).join(":"):"kind"in t&&t.kind==="user"?t.key:"kind"in t?`${t.kind}:${Yo(t.key)}`:t.key}function Qo(t){return Jo(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:t[e].key})).reduce((e,r)=>C(C({},e),r),{}):"kind"in t?{[t.kind]:t.key}:{user:t.key}}class Np{constructor(e,r){ge(this,"client"),ge(this,"metadata"),this.client=e,this.metadata=r}getHooks(e){return[]}init(e){this.client.track(Ap,{sessionID:e})}recordGauge(e,r){}identify(e,r,n={},i){}error(e,r){}track(e,r){const n=r.event;this.client.track(n?`${Wo}:${n}`:Wo,tr(C({},r),{sessionID:e}))}}let Cp=class extends fo{constructor(e,r){super(),ge(this,"client"),this.client=new Np(e,r)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(r,n,i)=>(this.load(this.client),n)}]}init(e){return this._bufferCall("init",[e])}recordGauge(e,r){return this._bufferCall("recordGauge",[e,r])}identify(e,r,n={},i){return this._bufferCall("identify",[e,r,n,i])}error(e,r){return this._bufferCall("error",[e,r])}track(e,r){return this._bufferCall("track",[e,r])}};const xp="9.26.0",Pp={version:xp},Ip=Pp.version;function Mp(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(const r of t.classList)e.push(`.${r}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}const kp=t=>{let e;const r=()=>{clearTimeout(e),e=setTimeout(()=>{var n,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(n=window.screen.orientation)==null?void 0:n.angle)!=null?i:0})},500)};return window.addEventListener("resize",r),r(),()=>window.removeEventListener("resize",r)};var Zo={exports:{}};/**
279
279
  * @preserve
280
280
  * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
281
281
  *