@launchdarkly/observability 1.0.1 → 1.0.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
- `,Gl=(t,e,r,n)=>t();function Hl(t,e=Gl){return{PushPayload(r,n){return e(i=>t.request(Ml,r,C(C({},n),i)),"PushPayload","mutation",r)},PushSessionEvents(r,n){return e(i=>t.request(kl,r,C(C({},n),i)),"PushSessionEvents","mutation",r)},identifySession(r,n){return e(i=>t.request(Dl,r,C(C({},n),i)),"identifySession","mutation",r)},addSessionProperties(r,n){return e(i=>t.request(Ul,r,C(C({},n),i)),"addSessionProperties","mutation",r)},pushMetrics(r,n){return e(i=>t.request(jl,r,C(C({},n),i)),"pushMetrics","mutation",r)},addSessionFeedback(r,n){return e(i=>t.request(Bl,r,C(C({},n),i)),"addSessionFeedback","mutation",r)},initializeSession(r,n){return e(i=>t.request($l,r,C(C({},n),i)),"initializeSession","mutation",r)},Ignore(r,n){return e(i=>t.request(Fl,r,C(C({},n),i)),"Ignore","query",r)},GetSamplingConfig(r,n){return e(i=>t.request(Vl,r,C(C({},n),i)),"GetSamplingConfig","query",r)}}}function zl(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 Xl(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]=Xl(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 ql(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const _n="exception.message",Kl="exception.stacktrace",gn="exception.type",Wl="http.response.status_code",Yl="server.address",Jl="service.name",Ql="service.version",Zl="telemetry.sdk.name",tp="telemetry.sdk.version",pr="url.full",Bo="url.path",ep="url.query",rp="user_agent.original",En=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function fr(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 np={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=fr({},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,"",fr({},o,{expires:-1}))},withAttributes:function(i){return Tn(this.converter,fr({},this.attributes,i))},withConverter:function(i){return Tn(fr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var bn=Tn(np,{path:"/"});let On="localStorage",Sn=!0,ip=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]}},op=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 ip,hr=new op,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},ap=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)=>{hr.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=>{hr.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 dr=t=>`${ee.SESSION_DATA}_${t}`,Ot=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Go()},sp=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)},up=t=>{const e=dr(t);return JSON.parse(wn(e)||"{}")},cp=t=>{t||(t=Go());let e=up(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<En)return e;Vo(dr(t))},zo=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;sp(e);const r=dr(e);Fo(r,JSON.stringify(t)),pp(r)},lp=function(){const t=hr.getItem(ee.SESSION_ID);Ho(t);const e=dr(t),r=hr.getItem(e);try{zo(JSON.parse(r))}catch{}};function pp(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,fp=[Xo.BillingQuotaExceeded.toString()],hp=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(r=>fp.includes(r.message)))===void 0},dp=()=>{const t=(e,r,n,i,o=0)=>Yt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof Io&&!hp(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",vp="evaluation",yp=`${J}.set.id`,mp=`${J}.key`,_p=`${J}.contextKeys`,gp=`${J}.context.id`,Ep=`${J}.result.value`,Tp=`${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`},bp=`${J}.result.variationIndex`,Op=`${qo}.application.id`,Sp=`${qo}.application.version`,wp="$ld:telemetry:session:init",Wo="$ld:telemetry:track",Ap="document_load",Lp="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}}let Rp=class{constructor(e,r){ge(this,"client"),ge(this,"metadata"),this.client=e,this.metadata=r}getHooks(e){return[]}init(e){this.client.track(wp,{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}))}},Np=class extends fo{constructor(e,r){super(),ge(this,"client"),this.client=new Rp(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 Cp="9.26.1",xp={version:Cp},Pp=xp.version;function Ip(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 Mp=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
+ `,Gl=(t,e,r,n)=>t();function Hl(t,e=Gl){return{PushPayload(r,n){return e(i=>t.request(Ml,r,C(C({},n),i)),"PushPayload","mutation",r)},PushSessionEvents(r,n){return e(i=>t.request(kl,r,C(C({},n),i)),"PushSessionEvents","mutation",r)},identifySession(r,n){return e(i=>t.request(Dl,r,C(C({},n),i)),"identifySession","mutation",r)},addSessionProperties(r,n){return e(i=>t.request(Ul,r,C(C({},n),i)),"addSessionProperties","mutation",r)},pushMetrics(r,n){return e(i=>t.request(jl,r,C(C({},n),i)),"pushMetrics","mutation",r)},addSessionFeedback(r,n){return e(i=>t.request(Bl,r,C(C({},n),i)),"addSessionFeedback","mutation",r)},initializeSession(r,n){return e(i=>t.request($l,r,C(C({},n),i)),"initializeSession","mutation",r)},Ignore(r,n){return e(i=>t.request(Fl,r,C(C({},n),i)),"Ignore","query",r)},GetSamplingConfig(r,n){return e(i=>t.request(Vl,r,C(C({},n),i)),"GetSamplingConfig","query",r)}}}function zl(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 Xl(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]=Xl(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 ql(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const _n="exception.message",Kl="exception.stacktrace",gn="exception.type",Wl="http.response.status_code",Yl="server.address",Jl="service.name",Ql="service.version",Zl="telemetry.sdk.name",tp="telemetry.sdk.version",pr="url.full",Bo="url.path",ep="url.query",rp="user_agent.original",En=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function fr(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 np={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=fr({},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,"",fr({},o,{expires:-1}))},withAttributes:function(i){return Tn(this.converter,fr({},this.attributes,i))},withConverter:function(i){return Tn(fr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var bn=Tn(np,{path:"/"});let On="localStorage",Sn=!0,ip=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]}},op=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 ip,hr=new op,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},ap=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)=>{hr.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=>{hr.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 dr=t=>`${ee.SESSION_DATA}_${t}`,Ot=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Go()},sp=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)},up=t=>{const e=dr(t);return JSON.parse(wn(e)||"{}")},cp=t=>{t||(t=Go());let e=up(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<En)return e;Vo(dr(t))},zo=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;sp(e);const r=dr(e);Fo(r,JSON.stringify(t)),pp(r)},lp=function(){const t=hr.getItem(ee.SESSION_ID);Ho(t);const e=dr(t),r=hr.getItem(e);try{zo(JSON.parse(r))}catch{}};function pp(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,fp=[Xo.BillingQuotaExceeded.toString()],hp=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(r=>fp.includes(r.message)))===void 0},dp=()=>{const t=(e,r,n,i,o=0)=>Yt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof Io&&!hp(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",vp="evaluation",yp=`${J}.set.id`,mp=`${J}.key`,_p=`${J}.contextKeys`,gp=`${J}.context.id`,Ep=`${J}.result.value`,Tp=`${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`},bp=`${J}.result.variationIndex`,Op=`${qo}.application.id`,Sp=`${qo}.application.version`,wp="$ld:telemetry:session:init",Wo="$ld:telemetry:track",Ap="document_load",Lp="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}}let Rp=class{constructor(e,r){ge(this,"client"),ge(this,"metadata"),this.client=e,this.metadata=r}getHooks(e){return[]}init(e){this.client.track(wp,{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}))}},Np=class extends fo{constructor(e,r){super(),ge(this,"client"),this.client=new Rp(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 Cp="9.27.0",xp={version:Cp},Pp=xp.version;function Ip(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 Mp=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
  *