@launchdarkly/session-replay 1.1.16 → 1.1.18
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/CHANGELOG.md +18 -0
- package/dist/{LDObserve-CqZ7819o.js → LDObserve-3CAXCPoj.js} +2 -2
- package/dist/{LDObserve-CqZ7819o.js.map → LDObserve-3CAXCPoj.js.map} +1 -1
- package/dist/{index-r_2eByqm.js → index-CWrGp5MY.js} +3 -3
- package/dist/{index-r_2eByqm.js.map → index-CWrGp5MY.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
package/dist/index.umd.js
CHANGED
|
@@ -275,7 +275,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):m
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
${Gr}
|
|
278
|
-
`,uu=(e,t,s,i)=>e();function du(e,t=uu){return{PushPayload(s,i){return t(n=>e.request(su,s,j(j({},i),n)),"PushPayload","mutation",s)},PushSessionEvents(s,i){return t(n=>e.request(Rr,s,j(j({},i),n)),"PushSessionEvents","mutation",s)},identifySession(s,i){return t(n=>e.request(iu,s,j(j({},i),n)),"identifySession","mutation",s)},addSessionProperties(s,i){return t(n=>e.request(nu,s,j(j({},i),n)),"addSessionProperties","mutation",s)},pushMetrics(s,i){return t(n=>e.request(ru,s,j(j({},i),n)),"pushMetrics","mutation",s)},addSessionFeedback(s,i){return t(n=>e.request(ou,s,j(j({},i),n)),"addSessionFeedback","mutation",s)},initializeSession(s,i){return t(n=>e.request(lu,s,j(j({},i),n)),"initializeSession","mutation",s)},Ignore(s,i){return t(n=>e.request(au,s,j(j({},i),n)),"Ignore","query",s)},GetSamplingConfig(s,i){return t(n=>e.request(cu,s,j(j({},i),n)),"GetSamplingConfig","query",s)}}}function hu(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function pu(){return hu()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const mu="telemetry.sdk.name",fu="telemetry.sdk.version",vr=1e3,bu=1e3*2,yu=4*60*60*1e3,ri=15*60*1e3,Wr={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},gu=100,kr="app.highlight.io",Zu="https://app.launchdarkly.com",Su={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},Iu="/projects/default",Vu=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function ss(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)i!=="__proto__"&&(e[i]=s[i])}return e}var Xu={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function oi(e,t){function s(n,l,m){if(typeof document<"u"){m=ss({},t,m),typeof m.expires=="number"&&(m.expires=new Date(Date.now()+m.expires*864e5)),m.expires&&(m.expires=m.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var u in m)m[u]&&(d+="; "+u,m[u]!==!0&&(d+="="+m[u].split(";")[0]));return document.cookie=n+"="+e.write(l,n)+d}}function i(n){if(!(typeof document>"u"||arguments.length&&!n)){for(var l=document.cookie?document.cookie.split("; "):[],m={},d=0;d<l.length;d++){var u=l[d].split("="),o=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(h in m||(m[h]=e.read(o,h)),n===h)break}catch{}}return n?m[n]:m}}return Object.create({set:s,get:i,remove:function(n,l){s(n,"",ss({},l,{expires:-1}))},withAttributes:function(n){return oi(this.converter,ss({},this.attributes,n))},withConverter:function(n){return oi(ss({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var is=oi(Xu,{path:"/"}),li=(e=>(e.CLIENT_ID="highlightClientID",e))(li||{});let ns="localStorage",ai=!0,Gu=class{constructor(){Gt(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var s;return(s=Object.keys(this.storage)[t])!=null?s:null}getItem(t){var s;return(s=this.storage[t])!=null?s:""}setItem(t,s){this.storage[t]=s}removeItem(t){delete this.storage[t]}},Ru=class{getItem(t){var s;return(s=is.get(t))!=null?s:""}setItem(t,s){if(!ai)return;const i=new Date;i.setTime(i.getTime()+ri),is.set(t,s,{expires:i})}removeItem(t){ai&&is.remove(t)}keys(){var t;return Object.keys((t=is.get())!=null?t:{})}};const dt=new Gu,ht=new Ru,rs=()=>{let e=null;if(typeof window>"u")return dt;try{switch(ns){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(rt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${ns}; using global storage`),e=dt)}catch(t){rt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=dt}return e},vu=e=>{ns=e},wr=e=>{ai=e},Ge=e=>{try{return rs().getItem(e)}catch(t){return rt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),dt.getItem(e)}},Ee=(e,t)=>{ht.setItem(e,t);try{return rs().setItem(e,t)}catch(s){return rt("storage","setItem","debug",`failed to set item ${e}; using global storage`,s),dt.setItem(e,t)}},os=e=>{ht.removeItem(e);try{return rs().removeItem(e)}catch(t){return rt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),dt.removeItem(e)}},Wu=e=>{if(ns==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}if(typeof window>"u"){console.warn("highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[s,i]=arguments;e({keyName:s,keyValue:i}),t.apply(this,[s,i])}};var be=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(be||{});const ls=e=>`${be.SESSION_DATA}_${e}`,ku=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Cr()},wu=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Cr=()=>{var e;return(e=Ge(be.SESSION_ID))!=null?e:""},kt=e=>{Ee(be.SESSION_ID,e)},Cu=e=>{const t=ls(e);return JSON.parse(Ge(t)||"{}")},as=e=>{e||(e=Cr());let t=Cu(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<ri)return t;os(ls(e))},qe=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;wu(t);const s=ls(t);Ee(s,JSON.stringify(e)),Tu(s)},xu=function(){const e=ht.getItem(be.SESSION_ID);kt(e);const t=ls(e),s=ht.getItem(t);try{qe(JSON.parse(s))}catch{}};function Tu(e){var t;const s=`${be.SESSION_DATA}_`,i=new Set,n=rs();for(let l=n.length-1;l>=0;l--){const m=n.key(l);m&&m.startsWith(s)&&m!==e&&i.add(m)}for(const l of ht.keys())l.startsWith(s)&&l!==e&&i.add(l);for(const l of i){let m=!0;try{const d=Ge(l)||ht.getItem(l)||"{}",u=JSON.parse(d),o=(t=u.lastPushTime)!=null?t:u.sessionStartTime;m=o===void 0||Date.now()-o>=ri}catch{}m&&(rt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${l}`),os(l))}}var xr=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(xr||{});const Lu=3,Nu=1e3,Ju=500,Yu=[xr.BillingQuotaExceeded.toString()],Uu=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(s=>Yu.includes(s.message)))===void 0},Fu=()=>{const e=(t,s,i,n,l=0)=>ot(void 0,null,function*(){try{return yield t()}catch(m){if(m instanceof ct&&!Uu(m))throw m;if(l<Lu)return yield new Promise(d=>setTimeout(d,Nu+Ju*Math.pow(2,l))),yield e(t,s,i,n,l+1);throw console.error(`highlight.io: data request failed after ${l} retries`),m}});return e},Tr="feature_flag",Lr="launchdarkly",Mu=`${Tr}.set.id`,Ku=`${Tr}.provider.name`,Ou=`${Lr}.application.id`,Eu=`${Lr}.application.version`,zu="$ld:telemetry:session:init",Nr="$ld:telemetry:track";function Jr(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Yr(e){return e.kind==="multi"}function Ur(e){return Yr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Jr(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Jr(e.key)}`:e.key}function Hu(e){return Yr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,s)=>j(j({},t),s),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Pu=class{constructor(t,s){Gt(this,"client"),Gt(this,"metadata"),this.client=t,this.metadata=s}getHooks(t){return[]}init(t){this.client.track(zu,{sessionID:t})}recordGauge(t,s){}identify(t,s,i={},n){}error(t,s){}track(t,s){const i=s.event;this.client.track(i?`${Nr}:${i}`:Nr,Dt(j({},s),{sessionID:t}))}},Du=class extends zs{constructor(t,s){super(),Gt(this,"client"),this.client=new Pu(t,s)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(s,i,n)=>(this.load(this.client),i)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,s){return this._bufferCall("recordGauge",[t,s])}identify(t,s,i={},n){return this._bufferCall("identify",[t,s,i,n])}error(t,s){return this._bufferCall("error",[t,s])}track(t,s){return this._bufferCall("track",[t,s])}};const Bu=e=>{e(window.location.href);const t=history.pushState;history.pushState=(l=>function(){var m=l.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),m})(history.pushState);const s=history.replaceState;history.replaceState=(l=>function(){var m=l.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),m})(history.replaceState);const i=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",i);const n=function(){e(window.location.href)};return window.addEventListener("locationchange",n),()=>{window.removeEventListener("popstate",i),window.removeEventListener("locationchange",n),history.pushState=t,history.replaceState=s}},Qu="10.5.0",ju={version:Qu},Au=ju.version;function Fr(e,t){return $u(e)}function _u(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const s of e.classList)t.push(`.${s}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const $u=e=>{let t="";const s=e.getAttribute("class"),i=e.getAttribute("id");return i&&(t=t.concat(Mr(i,"#"))),s&&(t=t.concat(Mr(s,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},Mr=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,qu=e=>{let t;const s=()=>{clearTimeout(t),t=setTimeout(()=>{var i,n;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(n=(i=window.screen.orientation)==null?void 0:i.angle)!=null?n:0})},500)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)};var Kr={exports:{}};/**
|
|
278
|
+
`,uu=(e,t,s,i)=>e();function du(e,t=uu){return{PushPayload(s,i){return t(n=>e.request(su,s,j(j({},i),n)),"PushPayload","mutation",s)},PushSessionEvents(s,i){return t(n=>e.request(Rr,s,j(j({},i),n)),"PushSessionEvents","mutation",s)},identifySession(s,i){return t(n=>e.request(iu,s,j(j({},i),n)),"identifySession","mutation",s)},addSessionProperties(s,i){return t(n=>e.request(nu,s,j(j({},i),n)),"addSessionProperties","mutation",s)},pushMetrics(s,i){return t(n=>e.request(ru,s,j(j({},i),n)),"pushMetrics","mutation",s)},addSessionFeedback(s,i){return t(n=>e.request(ou,s,j(j({},i),n)),"addSessionFeedback","mutation",s)},initializeSession(s,i){return t(n=>e.request(lu,s,j(j({},i),n)),"initializeSession","mutation",s)},Ignore(s,i){return t(n=>e.request(au,s,j(j({},i),n)),"Ignore","query",s)},GetSamplingConfig(s,i){return t(n=>e.request(cu,s,j(j({},i),n)),"GetSamplingConfig","query",s)}}}function hu(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function pu(){return hu()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const mu="telemetry.sdk.name",fu="telemetry.sdk.version",vr=1e3,bu=1e3*2,yu=4*60*60*1e3,ri=15*60*1e3,Wr={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},gu=100,kr="app.highlight.io",Zu="https://app.launchdarkly.com",Su={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},Iu="/projects/default",Vu=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function ss(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)i!=="__proto__"&&(e[i]=s[i])}return e}var Xu={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function oi(e,t){function s(n,l,m){if(typeof document<"u"){m=ss({},t,m),typeof m.expires=="number"&&(m.expires=new Date(Date.now()+m.expires*864e5)),m.expires&&(m.expires=m.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var u in m)m[u]&&(d+="; "+u,m[u]!==!0&&(d+="="+m[u].split(";")[0]));return document.cookie=n+"="+e.write(l,n)+d}}function i(n){if(!(typeof document>"u"||arguments.length&&!n)){for(var l=document.cookie?document.cookie.split("; "):[],m={},d=0;d<l.length;d++){var u=l[d].split("="),o=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(h in m||(m[h]=e.read(o,h)),n===h)break}catch{}}return n?m[n]:m}}return Object.create({set:s,get:i,remove:function(n,l){s(n,"",ss({},l,{expires:-1}))},withAttributes:function(n){return oi(this.converter,ss({},this.attributes,n))},withConverter:function(n){return oi(ss({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var is=oi(Xu,{path:"/"}),li=(e=>(e.CLIENT_ID="highlightClientID",e))(li||{});let ns="localStorage",ai=!0,Gu=class{constructor(){Gt(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var s;return(s=Object.keys(this.storage)[t])!=null?s:null}getItem(t){var s;return(s=this.storage[t])!=null?s:""}setItem(t,s){this.storage[t]=s}removeItem(t){delete this.storage[t]}},Ru=class{getItem(t){var s;return(s=is.get(t))!=null?s:""}setItem(t,s){if(!ai)return;const i=new Date;i.setTime(i.getTime()+ri),is.set(t,s,{expires:i})}removeItem(t){ai&&is.remove(t)}keys(){var t;return Object.keys((t=is.get())!=null?t:{})}};const dt=new Gu,ht=new Ru,rs=()=>{let e=null;if(typeof window>"u")return dt;try{switch(ns){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(rt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${ns}; using global storage`),e=dt)}catch(t){rt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=dt}return e},vu=e=>{ns=e},wr=e=>{ai=e},Ge=e=>{try{return rs().getItem(e)}catch(t){return rt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),dt.getItem(e)}},Ee=(e,t)=>{ht.setItem(e,t);try{return rs().setItem(e,t)}catch(s){return rt("storage","setItem","debug",`failed to set item ${e}; using global storage`,s),dt.setItem(e,t)}},os=e=>{ht.removeItem(e);try{return rs().removeItem(e)}catch(t){return rt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),dt.removeItem(e)}},Wu=e=>{if(ns==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}if(typeof window>"u"){console.warn("highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[s,i]=arguments;e({keyName:s,keyValue:i}),t.apply(this,[s,i])}};var be=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(be||{});const ls=e=>`${be.SESSION_DATA}_${e}`,ku=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Cr()},wu=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Cr=()=>{var e;return(e=Ge(be.SESSION_ID))!=null?e:""},kt=e=>{Ee(be.SESSION_ID,e)},Cu=e=>{const t=ls(e);return JSON.parse(Ge(t)||"{}")},as=e=>{e||(e=Cr());let t=Cu(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<ri)return t;os(ls(e))},qe=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;wu(t);const s=ls(t);Ee(s,JSON.stringify(e)),Tu(s)},xu=function(){const e=ht.getItem(be.SESSION_ID);kt(e);const t=ls(e),s=ht.getItem(t);try{qe(JSON.parse(s))}catch{}};function Tu(e){var t;const s=`${be.SESSION_DATA}_`,i=new Set,n=rs();for(let l=n.length-1;l>=0;l--){const m=n.key(l);m&&m.startsWith(s)&&m!==e&&i.add(m)}for(const l of ht.keys())l.startsWith(s)&&l!==e&&i.add(l);for(const l of i){let m=!0;try{const d=Ge(l)||ht.getItem(l)||"{}",u=JSON.parse(d),o=(t=u.lastPushTime)!=null?t:u.sessionStartTime;m=o===void 0||Date.now()-o>=ri}catch{}m&&(rt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${l}`),os(l))}}var xr=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(xr||{});const Lu=3,Nu=1e3,Ju=500,Yu=[xr.BillingQuotaExceeded.toString()],Uu=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(s=>Yu.includes(s.message)))===void 0},Fu=()=>{const e=(t,s,i,n,l=0)=>ot(void 0,null,function*(){try{return yield t()}catch(m){if(m instanceof ct&&!Uu(m))throw m;if(l<Lu)return yield new Promise(d=>setTimeout(d,Nu+Ju*Math.pow(2,l))),yield e(t,s,i,n,l+1);throw console.error(`highlight.io: data request failed after ${l} retries`),m}});return e},Tr="feature_flag",Lr="launchdarkly",Mu=`${Tr}.set.id`,Ku=`${Tr}.provider.name`,Ou=`${Lr}.application.id`,Eu=`${Lr}.application.version`,zu="$ld:telemetry:session:init",Nr="$ld:telemetry:track";function Jr(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Yr(e){return e.kind==="multi"}function Ur(e){return Yr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Jr(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Jr(e.key)}`:e.key}function Hu(e){return Yr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,s)=>j(j({},t),s),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Pu=class{constructor(t,s){Gt(this,"client"),Gt(this,"metadata"),this.client=t,this.metadata=s}getHooks(t){return[]}init(t){this.client.track(zu,{sessionID:t})}recordGauge(t,s){}identify(t,s,i={},n){}error(t,s){}track(t,s){const i=s.event;this.client.track(i?`${Nr}:${i}`:Nr,Dt(j({},s),{sessionID:t}))}},Du=class extends zs{constructor(t,s){super(),Gt(this,"client"),this.client=new Pu(t,s)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(s,i,n)=>(this.load(this.client),i)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,s){return this._bufferCall("recordGauge",[t,s])}identify(t,s,i={},n){return this._bufferCall("identify",[t,s,i,n])}error(t,s){return this._bufferCall("error",[t,s])}track(t,s){return this._bufferCall("track",[t,s])}};const Bu=e=>{e(window.location.href);const t=history.pushState;history.pushState=(l=>function(){var m=l.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),m})(history.pushState);const s=history.replaceState;history.replaceState=(l=>function(){var m=l.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),m})(history.replaceState);const i=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",i);const n=function(){e(window.location.href)};return window.addEventListener("locationchange",n),()=>{window.removeEventListener("popstate",i),window.removeEventListener("locationchange",n),history.pushState=t,history.replaceState=s}},Qu="10.7.0",ju={version:Qu},Au=ju.version;function Fr(e,t){return $u(e)}function _u(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const s of e.classList)t.push(`.${s}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const $u=e=>{let t="";const s=e.getAttribute("class"),i=e.getAttribute("id");return i&&(t=t.concat(Mr(i,"#"))),s&&(t=t.concat(Mr(s,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},Mr=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,qu=e=>{let t;const s=()=>{clearTimeout(t),t=setTimeout(()=>{var i,n;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(n=(i=window.screen.orientation)==null?void 0:i.angle)!=null?n:0})},500)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)};var Kr={exports:{}};/**
|
|
279
279
|
* @preserve
|
|
280
280
|
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
281
281
|
*
|