clarity-js 0.7.1 → 0.7.3

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.
@@ -0,0 +1 @@
1
+ !function(){"use strict";var t=Object.freeze({__proto__:null,get add(){return pn},get get(){return On},get getId(){return hn},get getNode(){return kn},get getValue(){return En},get has(){return Sn},get hashText(){return wn},get iframe(){return mn},get lookup(){return xn},get parse(){return fn},get sameorigin(){return gn},get start(){return sn},get stop(){return ln},get update(){return vn},get updates(){return _n}}),e=Object.freeze({__proto__:null,get queue(){return ia},get start(){return ra},get stop(){return oa},get track(){return $n}}),n=Object.freeze({__proto__:null,get clone(){return Sa},get compute(){return _a},get data(){return ya},get fragments(){return Oa},get keys(){return wa},get reset(){return Ma},get start(){return xa},get stop(){return Ta},get update(){return Na}}),a=Object.freeze({__proto__:null,get check(){return za},get compute(){return La},get data(){return ba},get start(){return Aa},get stop(){return Ha},get trigger(){return Ra}}),r=Object.freeze({__proto__:null,get compute(){return Ua},get data(){return Wa},get log(){return Xa},get reset(){return Ba},get start(){return Ya},get stop(){return Pa},get updates(){return qa}}),i=Object.freeze({__proto__:null,get callbacks(){return Fa},get clear(){return tr},get consent(){return $a},get data(){return Va},get id(){return Qa},get metadata(){return Ka},get save(){return er},get start(){return Ga},get stop(){return Za}}),o=Object.freeze({__proto__:null,get data(){return lr},get envelope(){return hr},get start(){return dr},get stop(){return fr}}),u={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],extract:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null};function c(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var s=0;function l(t){void 0===t&&(t=null);var e=t&&t.timeStamp>0?t.timeStamp:performance.now();return Math.max(Math.round(e-s),0)}var d="0.7.3";function f(t,e){void 0===e&&(e=null);for(var n,a=5381,r=a,i=0;i<t.length;i+=2){if(a=(a<<5)+a^t.charCodeAt(i),i+1<t.length)r=(r<<5)+r^t.charCodeAt(i+1)}return n=Math.abs(a+11579*r),(e?n%Math.pow(2,e):n).toString(36)}var h=/\S/gi,p=!0,v=null,g=null,m=null;function b(t,e,n,a){if(void 0===a&&(a=!1),t)switch(n){case 0:return t;case 1:switch(e){case"*T":case"value":case"placeholder":case"click":return function(t){var e=-1,n=0,a=!1,r=!1,i=!1,o=null;if(p&&null===v)try{v=new RegExp("\\p{N}","gu"),g=new RegExp("\\p{L}","gu"),m=new RegExp("\\p{Sc}","gu")}catch(t){p=!1}for(var u=0;u<t.length;u++){var c=t.charCodeAt(u);if(a=a||c>=48&&c<=57,r=r||64===c,i=9===c||10===c||13===c||32===c,0===u||u===t.length-1||i){if(a||r){null===o&&(o=t.split(""));var s=t.substring(e+1,i?u:u+1);s=p&&null!==m?s.match(m)?s:s.replace(g,"▪").replace(v,"▫"):k(s),o.splice(e+1-n,s.length,s),n+=s.length-1}i&&(a=!1,r=!1,e=u)}}return o?o.join(""):t}(t);case"input":case"change":return E(t)}return t;case 2:case 3:switch(e){case"*T":return a?w(t):k(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":case"change":return E(t);case"placeholder":return k(t)}break;case 4:switch(e){case"*T":return a?w(t):k(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}}return t}function y(t){var e=u.drop;if(e&&e.length>0&&t&&t.indexOf("?")>0){var n=t.split("?"),a=n[0],r=n[1];return a+"?"+r.split("&").map((function(t){return e.some((function(e){return 0===t.indexOf("".concat(e,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}return t}function w(t){var e=t.trim();if(e.length>0){var n=e[0],a=t.indexOf(n),r=t.substr(0,a),i=t.substr(a+e.length);return"".concat(r).concat(e.length.toString(36)).concat(i)}return t}function k(t){return t.replace(h,"•")}function E(t){for(var e=5*(Math.floor(t.length/5)+1),n="",a=0;a<e;a++)n+=a>0&&a%5==0?" ":"•";return n}var O=null,x=null,S=!1;function _(){S&&(O={time:l(),event:4,data:{visible:x.visible,docWidth:x.docWidth,docHeight:x.docHeight,screenWidth:x.screenWidth,screenHeight:x.screenHeight,scrollX:x.scrollX,scrollY:x.scrollY,pointerX:x.pointerX,pointerY:x.pointerY,activityTime:x.activityTime}}),x=x||{visible:1,docWidth:0,docHeight:0,screenWidth:0,screenHeight:0,scrollX:0,scrollY:0,pointerX:0,pointerY:0,activityTime:0}}function M(t,e,n){switch(t){case 8:x.docWidth=e,x.docHeight=n;break;case 11:x.screenWidth=e,x.screenHeight=n;break;case 10:x.scrollX=e,x.scrollY=n;break;default:x.pointerX=e,x.pointerY=n}S=!0}function N(t){x.activityTime=t}function T(t,e){x.visible="visible"===e?1:0,x.visible||N(t),S=!0}function I(){S&&ja(4)}var C=Object.freeze({__proto__:null,activity:N,compute:I,reset:_,start:function(){S=!1,_()},get state(){return O},stop:function(){_()},track:M,visibility:T}),D=null;function j(t,e){Ir()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(D={key:t,value:e},ja(24))}var A,z=null,R=null;function L(t){t in z||(z[t]=0),t in R||(R[t]=0),z[t]++,R[t]++}function H(t,e){null!==e&&(t in z||(z[t]=0),t in R||(R[t]=0),z[t]+=e,R[t]+=e)}function W(t,e){null!==e&&!1===isNaN(e)&&(t in z||(z[t]=0),(e>z[t]||0===z[t])&&(R[t]=e,z[t]=e))}function q(t,e,n){return window.setTimeout(vr(t),e,n)}function Y(t){return window.clearTimeout(t)}var P=0,X=0,U=null;function B(){U&&Y(U),U=q(V,X),P=l()}function V(){var t=l();A={gap:t-P},ja(25),A.gap<3e5?U=q(V,X):Mr&&(j("clarity","suspend"),Vr(),["mousemove","touchstart"].forEach((function(t){return mr(document,t,Dr)})),["resize","scroll","pageshow"].forEach((function(t){return mr(window,t,Dr)})))}var F=Object.freeze({__proto__:null,get data(){return A},reset:B,start:function(){X=6e4,P=0},stop:function(){Y(U),P=0,X=0}}),J=null;function G(t,e){if(t in J){var n=J[t],a=n[n.length-1];e-a[0]>100?J[t].push([e,0]):a[1]=e-a[0]}else J[t]=[[e,0]]}function Z(){ja(36)}function K(){J={}}var Q=Object.freeze({__proto__:null,compute:Z,get data(){return J},reset:K,start:function(){J={}},stop:function(){J={}},track:G}),$=null;function tt(t){Ir()&&u.lean&&(u.lean=!1,$={key:t},er(),u.upgrade&&u.upgrade(t),ja(3))}var et=Object.freeze({__proto__:null,get data(){return $},start:function(){!u.lean&&u.upgrade&&u.upgrade("Config"),$=null},stop:function(){$=null},upgrade:tt}),nt=null;function at(t,e){it(t,"string"==typeof e?[e]:e)}function rt(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),it("userId",[t]),it("sessionId",[e]),it("pageId",[n])}function it(t,e){if(Ir()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in nt?nt[t]:[]),a=0;a<e.length;a++)"string"==typeof e[a]&&e[a].length<255&&n.push(e[a]);nt[t]=n}}function ot(){ja(34)}function ut(){nt={}}function ct(t,e,n,a){return new(n||(n=Promise))((function(r,i){function o(t){try{c(a.next(t))}catch(t){i(t)}}function u(t){try{c(a.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((a=a.apply(t,e||[])).next())}))}function st(t,e){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,a&&(r=2&u[0]?a.return:u[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,u[1])).done)return r;switch(a=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,a=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){o.label=u[1];break}if(6===u[0]&&o.label<r[1]){o.label=r[1],r=u;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(u);break}r[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(t){u=[6,t],a=0}finally{n=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}var lt="CompressionStream"in window;function dt(t){return ct(this,void 0,void 0,(function(){var e,n;return st(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),lt?(e=new ReadableStream({start:function(e){return ct(this,void 0,void 0,(function(){return st(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,ft(e)]):[3,2];case 1:return[2,new(n.apply(Uint8Array,[void 0,a.sent()]))];case 2:return[3,4];case 3:return a.sent(),[3,4];case 4:return[2,null]}}))}))}function ft(t){return ct(this,void 0,void 0,(function(){var e,n,a,r,i;return st(this,(function(o){switch(o.label){case 0:e=t.getReader(),n=[],a=!1,r=[],o.label=1;case 1:return a?[3,3]:[4,e.read()];case 2:return i=o.sent(),a=i.done,r=i.value,a?[2,n]:(n.push.apply(n,r),[3,1]);case 3:return[2,n]}}))}))}var ht=[C,r,Object.freeze({__proto__:null,compute:ot,get data(){return nt},identify:rt,reset:ut,set:at,start:function(){ut()},stop:function(){ut()}}),a,Q,i,o,e,F,et,n];function pt(){z={},R={},L(5),ht.forEach((function(t){return vr(t.start)()}))}function vt(){ht.slice().reverse().forEach((function(t){return vr(t.stop)()})),z={},R={}}function gt(){ot(),I(),Ua(),ja(0),Z(),La(),_a()}var mt,bt=[];function yt(t,e,n){u.fraud&&null!==t&&n&&n.length>=5&&(mt={id:t,target:e,checksum:f(n,24)},bt.indexOf(mt.checksum)<0&&(bt.push(mt.checksum),pa(41)))}var wt="load,active,fixed,visible,focus,show,collaps,animat".split(","),kt={};function Et(t,e){var n=t.attributes,a=t.prefix?t.prefix[e]:null,r=0===e?"".concat("~").concat(t.position-1):":nth-of-type(".concat(t.position,")");switch(t.tag){case"STYLE":case"TITLE":case"LINK":case"META":case"*T":case"*D":return"";case"HTML":return"HTML";default:if(null===a)return"";a="".concat(a).concat(">"),t.tag=0===t.tag.indexOf("svg:")?t.tag.substr("svg:".length):t.tag;var i="".concat(a).concat(t.tag).concat(r),o="id"in n&&n.id.length>0?n.id:null,u="BODY"!==t.tag&&"class"in n&&n.class.length>0?n.class.trim().split(/\s+/).filter((function(t){return Ot(t)})).join("."):null;if(u&&u.length>0)if(0===e){var c="".concat(function(t){for(var e=t.split(">"),n=0;n<e.length;n++){var a=e[n].indexOf("~"),r=e[n].indexOf(".");e[n]=e[n].substring(0,r>0?r:a>0?a:e[n].length)}return e.join(">")}(a)).concat(t.tag).concat(".").concat(u);c in kt||(kt[c]=[]),kt[c].indexOf(t.id)<0&&kt[c].push(t.id),i="".concat(c).concat("~").concat(kt[c].indexOf(t.id))}else i="".concat(a).concat(t.tag,".").concat(u).concat(r);return i=o&&Ot(o)?"".concat(function(t){var e=t.lastIndexOf("*S"),n=t.lastIndexOf("".concat("iframe:").concat("HTML")),a=Math.max(e,n);if(a<0)return"";return t.substring(0,t.indexOf(">",a)+1)}(a)).concat("#").concat(o):i,i}}function Ot(t){if(!t)return!1;if(wt.some((function(e){return t.toLowerCase().indexOf(e)>=0})))return!1;for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n>=48&&n<=57)return!1}return!0}var xt=5e3,St={},_t=[],Mt=null,Nt=null,Tt=null;function It(){St={},_t=[],Mt=null,Nt=null}function Ct(t,e){return void 0===e&&(e=0),ct(this,void 0,void 0,(function(){var n,a,r;return st(this,(function(i){for(n=0,a=_t;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){_t[1===e?"unshift":"push"]({task:t,resolve:n,id:Qa()})})),null===Mt&&null===Nt&&Dt(),[2,r]}))}))}function Dt(){var t=_t.shift();t&&(Mt=t,t.task().then((function(){t.id===Qa()&&(t.resolve(),Mt=null,Dt())})).catch((function(e){t.id===Qa()&&(e&&ma(0,1,e.name,e.message,e.stack),Mt=null,Dt())})))}function jt(t){var e=Lt(t);return e in St?performance.now()-St[e].start>St[e].yield?0:1:2}function At(t){St[Lt(t)]={start:performance.now(),calls:0,yield:30}}function zt(t){var e=performance.now(),n=Lt(t),a=e-St[n].start;H(t.cost,a),L(5),St[n].calls>0&&H(4,a)}function Rt(t){return ct(this,void 0,void 0,(function(){var e,n;return st(this,(function(a){switch(a.label){case 0:return(e=Lt(t))in St?(zt(t),n=St[e],[4,Ht()]):[3,2];case 1:n.yield=a.sent().timeRemaining(),function(t){var e=Lt(t);if(St&&St[e]){var n=St[e].calls,a=St[e].yield;At(t),St[e].calls=n+1,St[e].yield=a}}(t),a.label=2;case 2:return[2,e in St?1:2]}}))}))}function Lt(t){return"".concat(t.id,".").concat(t.cost)}function Ht(){return ct(this,void 0,void 0,(function(){return st(this,(function(t){switch(t.label){case 0:return Nt?[4,Nt]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t){qt(t,{timeout:xt})}))]}}))}))}var Wt,qt=window.requestIdleCallback||function(t,e){var n=performance.now(),a=new MessageChannel,r=a.port1,i=a.port2;r.onmessage=function(a){var r=performance.now(),o=r-n,u=r-a.data;if(u>30&&o<e.timeout)requestAnimationFrame((function(){i.postMessage(r)}));else{var c=o>e.timeout;t({didTimeout:c,timeRemaining:function(){return c?30:Math.max(0,30-u)}})}},requestAnimationFrame((function(){i.postMessage(performance.now())}))};function Yt(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),ct(this,void 0,void 0,(function(){var a,r,i,o,c,s,d,f,h,p,v,g,m,y,w,k,E,O,x,S,_,T;return st(this,(function(I){switch(I.label){case 0:switch(a=n||l(),r=[a,t],t){case 8:return[3,1];case 7:return[3,2];case 5:case 6:return[3,3]}return[3,10];case 1:return i=Wt,r.push(i.width),r.push(i.height),M(t,i.width,i.height),ia(r),[3,10];case 2:for(o=0,c=Tn;o<c.length;o++)s=c[o],(r=[s.time,7]).push(s.data.id),r.push(s.data.interaction),r.push(s.data.visibility),r.push(s.data.name),ia(r);return Yn(),[3,10];case 3:if(2===jt(e))return[3,10];if(!((d=_n()).length>0))return[3,9];f=0,h=d,I.label=4;case 4:return f<h.length?(p=h[f],0!==(v=jt(e))?[3,6]:[4,Rt(e)]):[3,8];case 5:v=I.sent(),I.label=6;case 6:if(2===v)return[3,8];for(g=p.data,m=p.metadata.active,y=p.metadata.suspend,w=p.metadata.privacy,k=function(t){var e=t.metadata.privacy;return"*T"===t.data.tag&&!(0===e||1===e)}(p),E=0,O=m?["tag","attributes","value"]:["tag"];E<O.length;E++)if(g[x=O[E]])switch(x){case"tag":S=Pt(p),_=k?-1:1,r.push(p.id*_),p.parent&&m&&r.push(p.parent),p.previous&&m&&r.push(p.previous),r.push(y?"*M":g[x]),S&&2===S.length&&r.push("".concat("#").concat(Xt(S[0]),".").concat(Xt(S[1])));break;case"attributes":for(T in g[x])void 0!==g[x][T]&&r.push(Ut(T,g[x][T],w));break;case"value":yt(p.metadata.fraud,p.id,g[x]),r.push(b(g[x],g.tag,w,k))}I.label=7;case 7:return f++,[3,4];case 8:6===t&&N(a),ia(function(t){for(var e=[],n={},a=0,r=null,i=0;i<t.length;i++)if("string"==typeof t[i]){var o=t[i],u=n[o]||-1;u>=0?r?r.push(u):(r=[u],e.push(r),a++):(r=null,e.push(o),n[o]=a++)}else r=null,e.push(t[i]),a++;return e}(r),!u.lean),I.label=9;case 9:return[3,10];case 10:return[2]}}))}))}function Pt(t){if(null!==t.metadata.size&&0===t.metadata.size.length){var e=kn(t.id);if(e)return[Math.floor(100*e.offsetWidth),Math.floor(100*e.offsetHeight)]}return t.metadata.size}function Xt(t){return t.toString(36)}function Ut(t,e,n){return"".concat(t,"=").concat(b(e,t,n))}function Bt(){Wt=null}function Vt(){var t=document.body,e=document.documentElement,n=t?t.clientWidth:null,a=t?t.scrollWidth:null,r=t?t.offsetWidth:null,i=e?e.clientWidth:null,o=e?e.scrollWidth:null,u=e?e.offsetWidth:null,c=Math.max(n,a,r,i,o,u),s=t?t.clientHeight:null,l=t?t.scrollHeight:null,d=t?t.offsetHeight:null,f=e?e.clientHeight:null,h=e?e.scrollHeight:null,p=e?e.offsetHeight:null,v=Math.max(s,l,d,f,h,p);null!==Wt&&c===Wt.width&&v===Wt.height||null===c||null===v||(Wt={width:c,height:v},Yt(8))}var Ft=[],Jt=null;var Gt,Zt=["input","textarea","radio","button","canvas"],Kt=[];function Qt(t){mr(t,"click",$t.bind(this,9,t),!0)}function $t(t,e,n){var a=mn(e),r=a?a.contentDocument.documentElement:document.documentElement,i="pageX"in n?Math.round(n.pageX):"clientX"in n?Math.round(n.clientX+r.scrollLeft):null,o="pageY"in n?Math.round(n.pageY):"clientY"in n?Math.round(n.clientY+r.scrollTop):null;if(a){var u=function(t){var e={x:0,y:0};if(t&&t.offsetParent)do{var n=t.offsetParent,a=null===n?mn(t.ownerDocument):null;e.x+=t.offsetLeft,e.y+=t.offsetTop,t=a||n}while(t);return e}(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}var c=Pn(n),s=function(t){for(;t&&t!==document;){if(t.nodeType===Node.ELEMENT_NODE){var e=t;if("A"===e.tagName)return e}t=t.parentNode}return null}(c),d=function(t){var e=null,n=document.documentElement;if("function"==typeof t.getBoundingClientRect){var a=t.getBoundingClientRect();a&&a.width>0&&a.height>0&&(e={x:Math.floor(a.left+("pageXOffset"in window?window.pageXOffset:n.scrollLeft)),y:Math.floor(a.top+("pageYOffset"in window?window.pageYOffset:n.scrollTop)),w:Math.floor(a.width),h:Math.floor(a.height)})}return e}(c);0===n.detail&&d&&(i=Math.round(d.x+d.w/2),o=Math.round(d.y+d.h/2));var f=d?Math.max(Math.floor((i-d.x)/d.w*32767),0):0,h=d?Math.max(Math.floor((o-d.y)/d.h*32767),0):0;null!==i&&null!==o&&(Kt.push({time:l(n),event:t,data:{target:c,x:i,y:o,eX:f,eY:h,button:n.button,reaction:ee(c),context:ne(s),text:te(c),link:s?s.href:null,hash:null,trust:n.isTrusted?1:0}}),Ct(Un.bind(this,t)))}function te(t){var e=null;if(t){var n=t.textContent||t.value||t.alt;n&&(e=n.trim().replace(/\s+/g," ").substr(0,25))}return e}function ee(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(Zt.indexOf(e)>=0)return 0}return 1}function ne(t){if(t&&t.hasAttribute("target"))switch(t.getAttribute("target")){case"_blank":return 1;case"_parent":return 2;case"_top":return 3}return 0}function ae(){Kt=[]}function re(){var t=document.documentElement;Gt={width:t&&"clientWidth"in t?Math.min(t.clientWidth,window.innerWidth):window.innerWidth,height:t&&"clientHeight"in t?Math.min(t.clientHeight,window.innerHeight):window.innerHeight},Un(11)}function ie(){Gt=null}var oe=[],ue=null;function ce(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?Pn(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){var r=mn(a);e=r?r.contentWindow:e,a=n=a.documentElement}var i=a===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(a.scrollLeft),o=a===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(a.scrollTop),u={time:l(t),event:10,data:{target:a,x:i,y:o}};if((null!==t||0!==i||0!==o)&&null!==i&&null!==o){var c=oe.length,s=c>1?oe[c-2]:null;s&&function(t,e){var n=t.data.x-e.data.x,a=t.data.y-e.data.y;return n*n+a*a<400&&e.time-t.time<25}(s,u)&&oe.pop(),oe.push(u),Y(ue),ue=q(se,500,10)}}function se(t){Ct(Un.bind(this,t))}var le,de,fe=[];function he(t){fe.push({time:l(t),event:39,data:{target:Pn(t)}}),Ct(Un.bind(this,39))}function pe(){fe=[]}function ve(t){le={name:t.type},Un(26,l(t)),Vr()}function ge(){le=null}function me(t){void 0===t&&(t=null),de={visible:"visibilityState"in document?document.visibilityState:"default"},Un(28,l(t))}function be(){de=null}function ye(t){!function(t){var e=mn(t);mr(e?e.contentWindow:t===document?window:t,"scroll",ce,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Qt(t),function(t){mr(t,"submit",he,!0)}(t))}var we=Object.freeze({__proto__:null,observe:ye,start:function(){Bn=[],Fn(),ae(),mr(window,"resize",re),re(),mr(document,"visibilitychange",me),me(),oe=[],ce(),pe(),mr(window,"pagehide",ve)},stop:function(){Bn=[],Fn(),ae(),ie(),be(),Y(ue),oe=[],pe(),ge()}}),ke=/[^0-9\.]/g;function Ee(t){for(var e=0,n=Object.keys(t);e<n.length;e++){var a=n[e],r=t[a];if("@type"===a&&"string"==typeof r)switch(r=(r=r.toLowerCase()).indexOf("article")>=0||r.indexOf("posting")>=0?"article":r){case"article":case"recipe":Xa(5,t[a]),Xa(8,t.creator),Xa(18,t.headline);break;case"product":Xa(5,t[a]),Xa(10,t.name),Xa(12,t.sku),t.brand&&Xa(6,t.brand.name);break;case"aggregaterating":t.ratingValue&&(W(11,Oe(t.ratingValue,100)),W(18,Oe(t.bestRating)),W(19,Oe(t.worstRating))),W(12,Oe(t.ratingCount)),W(17,Oe(t.reviewCount));break;case"person":Xa(8,t.name);break;case"offer":Xa(7,t.availability),Xa(14,t.itemCondition),Xa(13,t.priceCurrency),Xa(12,t.sku),W(13,Oe(t.price));break;case"brand":Xa(6,t.name)}null!==r&&"object"==typeof r&&Ee(r)}}function Oe(t,e){if(void 0===e&&(e=1),null!==t)switch(typeof t){case"number":return Math.round(t*e);case"string":return Math.round(parseFloat(t.replace(ke,""))*e)}return null}var xe=["title","alt","onload","onfocus","onerror","data-drupal-form-submit-last"],Se=/[\r\n]+/g;function _e(e,n){var a,r=null;if(2===n&&!1===Sn(e))return r;0!==n&&e.nodeType===Node.TEXT_NODE&&e.parentElement&&"STYLE"===e.parentElement.tagName&&(e=e.parentNode);var i=!1===Sn(e)?"add":"update",o=e.parentElement?e.parentElement:null,u=e.ownerDocument!==document;switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:o=u&&e.parentNode?mn(e.parentNode):o;var c=e,s={tag:(u?"iframe:":"")+"*D",attributes:{name:c.name,publicId:c.publicId,systemId:c.systemId}};t[i](e,o,s,n);break;case Node.DOCUMENT_NODE:e===document&&fn(document),Me(e);break;case Node.DOCUMENT_FRAGMENT_NODE:var l=e;if(l.host)if(fn(l),"function"===typeof l.constructor&&l.constructor.toString().indexOf("[native code]")>=0){Me(l);for(var d="",f=0,h=("adoptedStyleSheets"in l?l.adoptedStyleSheets:[]);f<h.length;f++){d+=Te(h[f])}var p={tag:"*S",attributes:{style:d}};t[i](e,l.host,p,n)}else t[i](e,l.host,{tag:"*P",attributes:{}},n);break;case Node.TEXT_NODE:if(o=o||e.parentNode,"update"===i||o&&Sn(o)&&"STYLE"!==o.tagName){var v={tag:"*T",value:e.nodeValue};t[i](e,o,v,n)}break;case Node.ELEMENT_NODE:var g=e,m=g.tagName,b=function(t){var e={},n=t.attributes;if(n&&n.length>0)for(var a=0;a<n.length;a++){var r=n[a].name;xe.indexOf(r)<0&&(e[r]=n[a].value)}"INPUT"===t.tagName&&!("value"in e)&&t.value&&(e.value=t.value);return e}(g);switch(o=e.parentElement?e.parentElement:e.parentNode?e.parentNode:null,"http://www.w3.org/2000/svg"===g.namespaceURI&&(m="svg:"+m),m){case"HTML":o=u&&o?mn(o):null;var y={tag:(u?"iframe:":"")+m,attributes:b};t[i](e,o,y,n);break;case"SCRIPT":if("type"in b&&"application/ld+json"===b.type)try{Ee(JSON.parse(g.text.replace(Se,"")))}catch(t){}break;case"NOSCRIPT":break;case"META":var w="property"in b?"property":"name"in b?"name":null;if(w&&"content"in b){var k=b.content;switch(b[w]){case"og:title":Xa(20,k);break;case"og:type":Xa(19,k);break;case"generator":Xa(21,k)}}break;case"HEAD":var E={tag:m,attributes:b},O=u&&(null===(a=e.ownerDocument)||void 0===a?void 0:a.location)?e.ownerDocument.location:location;E.attributes["*B"]=O.protocol+"//"+O.hostname+O.pathname,t[i](e,o,E,n);break;case"BASE":var x=On(e.parentElement);if(x){var S=document.createElement("a");S.href=b.href,x.data.attributes["*B"]=S.protocol+"//"+S.hostname+S.pathname}break;case"STYLE":var _={tag:m,attributes:b,value:Ne(g)};t[i](e,o,_,n);break;case"IFRAME":var M=e,N={tag:m,attributes:b};gn(M)&&(!function(t){!1===Sn(t)&&mr(t,"load",Be.bind(this,t,"childList"),!0)}(M),N.attributes["*O"]="true",M.contentDocument&&M.contentWindow&&"loading"!==M.contentDocument.readyState&&(r=M.contentDocument)),t[i](e,o,N,n);break;default:var T={tag:m,attributes:b};g.shadowRoot&&(r=g.shadowRoot),t[i](e,o,T,n)}}return r}function Me(t){Sn(t)||(!function(t){try{var e=c("MutationObserver"),n=e in window?new window[e](vr(qe)):null;n&&(n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),Ce.push(n))}catch(t){ma(2,0,t?t.name:null)}}(t),ye(t))}function Ne(t){var e=t.textContent?t.textContent.trim():"",n=t.dataset?Object.keys(t.dataset).length:0;return(0===e.length||n>0)&&(e=Te(t.sheet)),e}function Te(t){var e="",n=null;try{n=t?t.cssRules:[]}catch(t){if(ma(1,1,t?t.name:null),t&&"SecurityError"!==t.name)throw t}if(null!==n)for(var a=0;a<n.length;a++)e+=n[a].cssText;return e}function Ie(t,e,n){return ct(this,void 0,void 0,(function(){var a,r,i,o,u;return st(this,(function(c){switch(c.label){case 0:a=[t],c.label=1;case 1:if(!(a.length>0))return[3,4];for(r=a.shift(),i=r.firstChild;i;)a.push(i),i=i.nextSibling;return 0!==(o=jt(e))?[3,3]:[4,Rt(e)];case 2:o=c.sent(),c.label=3;case 3:return 2===o?[3,4]:((u=_e(r,n))&&a.push(u),[3,1]);case 4:return[2]}}))}))}var Ce=[],De=[],je=null,Ae=null,ze=null,Re=[],Le=null,He=null,We={};function qe(t){var e=l();G(6,e),De.push({time:e,mutations:t}),Ct(Ye,1).then((function(){q(Vt),vr(Ln)()}))}function Ye(){return ct(this,void 0,void 0,(function(){var t,e,n,a,r,i,o,u,c,s;return st(this,(function(d){switch(d.label){case 0:At(t={id:Qa(),cost:3}),d.label=1;case 1:if(!(De.length>0))return[3,8];e=De.shift(),n=l(),a=0,r=e.mutations,d.label=2;case 2:return a<r.length?(i=r[a],0!==(o=jt(t))?[3,4]:[4,Rt(t)]):[3,6];case 3:o=d.sent(),d.label=4;case 4:if(2===o)return[3,6];switch(u=i.target,c=function(t,e,n){var a=t.target?On(t.target.parentNode):null;if(a&&"HTML"!==a.data.tag){var r=l()>He,i=On(t.target),o=i&&i.selector?i.selector.join():t.target.nodeName,u=[a.selector?a.selector.join():"",o,t.attributeName,Pe(t.addedNodes),Pe(t.removedNodes)].join();We[u]=u in We?We[u]:[0,n];var c=We[u];if(!1===r&&c[0]>=10&&Xe(c[2],2,e),c[0]=r?c[1]===n?c[0]:c[0]+1:1,c[1]=n,10===c[0])return c[2]=t.removedNodes,"suspend";if(c[0]>10)return""}return t.type}(i,t,n),c&&u&&u.ownerDocument&&fn(u.ownerDocument),c&&u&&u.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&u.host&&fn(u),c){case"attributes":_e(u,3);break;case"characterData":_e(u,4);break;case"childList":Xe(i.addedNodes,1,t),Xe(i.removedNodes,2,t);break;case"suspend":(s=On(u))&&(s.metadata.suspend=!0)}d.label=5;case 5:return a++,[3,2];case 6:return[4,Yt(6,t,e.time)];case 7:return d.sent(),[3,1];case 8:return zt(t),[2]}}))}))}function Pe(t){for(var e=[],n=0;t&&n<t.length;n++)e.push(t[n].nodeName);return e.join()}function Xe(t,e,n){return ct(this,void 0,void 0,(function(){var a,r,i;return st(this,(function(o){switch(o.label){case 0:a=t?t.length:0,r=0,o.label=1;case 1:return r<a?1!==e?[3,2]:(Ie(t[r],n,e),[3,5]):[3,6];case 2:return 0!==(i=jt(n))?[3,4]:[4,Rt(n)];case 3:i=o.sent(),o.label=4;case 4:if(2===i)return[3,6];_e(t[r],e),o.label=5;case 5:return r++,[3,1];case 6:return[2]}}))}))}function Ue(t,e){return void 0===e&&(e=!1),Re.indexOf(t)<0&&Re.push(t),Le&&Y(Le),Le=q((function(){!function(t){for(var e=0,n=Re;e<n.length;e++){var a=n[e];if(a){var r=a.nodeType===Node.DOCUMENT_FRAGMENT_NODE;if(r&&Sn(a))continue;Be(a,r||t?"childList":"characterData")}}Re=[]}(e)}),33),t}function Be(t,e){vr(qe)([{addedNodes:[t],attributeName:null,attributeNamespace:null,nextSibling:null,oldValue:null,previousSibling:null,removedNodes:[],target:t,type:e}])}var Ve=1,Fe=[],Je=[],Ge=[],Ze={},Ke=[],Qe=[],$e={},tn=[],en=[],nn=[],an=[],rn=null,on=null,un=null,cn=null;function sn(){dn(),fn(document,!0)}function ln(){dn()}function dn(){Ve=1,Fe=[],Je=[],Ge=[],Ze={},Ke=[],Qe=[],tn="address,password,contact".split(","),en="password,secret,pass,social,ssn,code,hidden".split(","),nn="radio,checkbox,range,button,reset,submit".split(","),an="INPUT,SELECT,TEXTAREA".split(","),rn=new WeakMap,on=new WeakMap,un=new WeakMap,cn=new WeakMap,kt={}}function fn(t,e){void 0===e&&(e=!1);try{e&&u.unmask.forEach((function(t){return t.indexOf("!")<0?Qe.push(t):Ke.push(t.substr(1))})),"querySelectorAll"in t&&(u.regions.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return zn(t,"".concat(e[0]))}))})),u.mask.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return un.set(t,3)}))})),u.checksum.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return cn.set(t,e[0])}))})),Qe.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return un.set(t,0)}))})))}catch(t){ma(5,1,t?t.name:null)}}function hn(t,e){if(void 0===e&&(e=!1),null===t)return null;var n=rn.get(t);return!n&&e&&(n=Ve++,rn.set(t,n)),n||null}function pn(t,e,n,a){var r,i=hn(t,!0),o=e?hn(e):null,c=Mn(t),s=null,l=Rn(t)?i:null,d=null,f=cn.has(t)?cn.get(t):null,h=u.content?1:3;o>=0&&Je[o]&&((s=Je[o]).children.push(i),l=null===l?s.region:l,d=s.fragment,f=null===f?s.metadata.fraud:f,h=s.metadata.privacy),n.attributes&&"data-clarity-region"in n.attributes&&(zn(t,n.attributes["data-clarity-region"]),l=i),Fe[i]=t,Je[i]={id:i,parent:o,previous:c,children:[],data:n,selector:null,hash:null,region:l,metadata:{active:!0,suspend:!1,privacy:h,position:null,fraud:f,size:null},fragment:d},function(t,e,n){var a=e.data,r=e.metadata,i=r.privacy,o=a.attributes||{},u=a.tag.toUpperCase();switch(!0){case an.indexOf(u)>=0:var c=o.type,s="";Object.keys(o).forEach((function(t){return s+=o[t].toLowerCase()}));var l=en.some((function(t){return s.indexOf(t)>=0}));r.privacy="INPUT"===u&&nn.indexOf(c)>=0?i:l?4:2;break;case"data-clarity-mask"in o:r.privacy=3;break;case"data-clarity-unmask"in o:r.privacy=0;break;case un.has(t):r.privacy=un.get(t);break;case cn.has(t):r.privacy=2;break;case"*T"===u:var d=n&&n.data?n.data.tag:"",f=n&&n.selector?n.selector[1]:"",h=["STYLE","TITLE","svg:style"];r.privacy=h.includes(d)||Ke.some((function(t){return f.indexOf(t)>=0}))?0:i;break;case 1===i:r.privacy=function(t,e,n){if(t&&e.some((function(e){return t.indexOf(e)>=0})))return 2;return n.privacy}(o.class,tn,r)}}(t,Je[i],s),yn(Je[i]),"IMG"===(r=Je[i]).data.tag&&3===r.metadata.privacy&&(r.metadata.size=[]),Nn(i,a,Je[i].fragment)}function vn(t,e,n,a){var r=hn(t),i=e?hn(e):null,o=Mn(t),u=!1,c=!1;if(r in Je){var s=Je[r];if(s.metadata.active=!0,s.previous!==o&&(u=!0,s.previous=o),s.parent!==i){u=!0;var l=s.parent;if(s.parent=i,null!==i&&i>=0){var d=null===o?0:Je[i].children.indexOf(o)+1;Je[i].children.splice(d,0,r),s.region=Rn(t)?r:Je[i].region}else!function(t,e){if(t in Je){var n=Je[t];n.metadata.active=!1,n.parent=null,Nn(t,e)}}(r,a);if(null!==l&&l>=0){var f=Je[l].children.indexOf(r);f>=0&&Je[l].children.splice(f,1)}c=!0}for(var h in n)bn(s.data,n,h)&&(u=!0,s.data[h]=n[h]);s.fragment&&$e[s.fragment]&&(u=!0),yn(s),Nn(r,a,Je[r].fragment,u,c)}}function gn(t){var e=!1;if(t.nodeType===Node.ELEMENT_NODE&&"IFRAME"===t.tagName){var n=t;try{n.contentDocument&&(on.set(n.contentDocument,n),e=!0)}catch(t){}}return e}function mn(t){var e=t.nodeType===Node.DOCUMENT_NODE?t:null;return e&&on.has(e)?on.get(e):null}function bn(t,e,n){if("object"==typeof t[n]&&"object"==typeof e[n]){for(var a in t[n])if(t[n][a]!==e[n][a])return!0;for(var a in e[n])if(e[n][a]!==t[n][a])return!0;return!1}return t[n]!==e[n]}function yn(t){var e=t.parent&&t.parent in Je?Je[t.parent]:null,n=e?e.selector:null,a=t.data,r=function(t,e){e.metadata.position=1;for(var n=t?t.children.indexOf(e.id):-1;n-- >0;){var a=Je[t.children[n]];if(e.data.tag===a.data.tag){e.metadata.position=a.metadata.position+1;break}}return e.metadata.position}(e,t),i={id:t.id,tag:a.tag,prefix:n,position:r,attributes:a.attributes};t.selector=[Et(i,0),Et(i,1)],t.hash=t.selector.map((function(t){return t?f(t):null})),t.hash.forEach((function(e){return Ze[e]=t.id})),t.hash.some((function(t){return-1!==Oa.indexOf(t)}))&&(t.fragment=t.id)}function wn(t){var e=kn(xn(t));return null!==e&&null!==e.textContent?e.textContent.substr(0,25):""}function kn(t){return t in Fe?Fe[t]:null}function En(t){return t in Je?Je[t]:null}function On(t){var e=hn(t);return e in Je?Je[e]:null}function xn(t){return t in Ze?Ze[t]:null}function Sn(t){return hn(t)in Fe}function _n(){for(var t=[],e=0,n=Ge;e<n.length;e++){(a=n[e])in Je&&t.push(Je[a])}for(var a in Ge=[],$e)Na($e[a],a,!0);return $e={},t}function Mn(t){for(var e=null;null===e&&t.previousSibling;)e=hn(t.previousSibling),t=t.previousSibling;return e}function Nn(t,e,n,a,r){if(void 0===n&&(n=null),void 0===a&&(a=!0),void 0===r&&(r=!1),n&&!$e[n]){var i=kn(n),o=En(n);i&&o&&(Ue(i,!0),o.hash.forEach((function(t){-1!==Oa.indexOf(t)&&($e[n]=t)})))}var u=Ge.indexOf(t);u>=0&&1===e&&r?(Ge.splice(u,1),Ge.push(t)):-1===u&&a&&Ge.push(t)}var Tn=[],In=null,Cn={},Dn=[],jn=!1,An=null;function zn(t,e){!1===In.has(t)&&(In.set(t,e),(An=null===An&&jn?new IntersectionObserver(Hn,{threshold:[0,.2,.4,.6,.8,1]}):An)&&t&&t.nodeType===Node.ELEMENT_NODE&&An.observe(t))}function Rn(t){return In&&In.has(t)}function Ln(){for(var t=[],e=0,n=Dn;e<n.length;e++){var a=n[e],r=hn(a.node);r in Cn||(r?(a.data.id=r,Cn[r]=a.data,Tn.push(qn(a.data))):t.push(a))}Dn=t,Tn.length>0&&Yt(7)}function Hn(t){for(var e=0,n=t;e<n.length;e++){var a=n[e],r=a.target,i=a.boundingClientRect,o=a.intersectionRect,u=a.rootBounds;if(In.has(r)&&i.width+i.height>0&&u.width>0&&u.height>0){var c=r?hn(r):null,s=c in Cn?Cn[c]:{id:c,name:In.get(r),interaction:16,visibility:0},l=(o?o.width*o.height*1/(u.width*u.height):0)>.05||a.intersectionRatio>.8,d=(l||10==s.visibility)&&Math.abs(i.top)+u.height>i.height;Wn(r,s,s.interaction,d?13:l?10:0),s.visibility>=13&&An&&An.unobserve(r)}}Tn.length>0&&Yt(7)}function Wn(t,e,n,a){var r=n>e.interaction||a>e.visibility;e.interaction=n>e.interaction?n:e.interaction,e.visibility=a>e.visibility?a:e.visibility,e.id?(e.id in Cn&&r||!(e.id in Cn))&&(Cn[e.id]=e,Tn.push(qn(e))):Dn.push({node:t,data:e})}function qn(t){return{time:l(),data:{id:t.id,interaction:t.interaction,visibility:t.visibility,name:t.name}}}function Yn(){Tn=[]}function Pn(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return He=l()+3e3,n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function Xn(t,e,n){void 0===n&&(n=null);var a={id:0,hash:null,privacy:2,node:t};if(t){var r=On(t);if(null!==r){var i=r.metadata;a.id=r.id,a.hash=r.hash,a.privacy=i.privacy,r.region&&function(t,e){var n=kn(t),a=t in Cn?Cn[t]:{id:t,visibility:0,interaction:16,name:In.get(n)},r=16;switch(e){case 9:r=20;break;case 27:r=30}Wn(n,a,r,a.visibility)}(r.region,e),i.fraud&&yt(i.fraud,r.id,n||r.data.value)}}return a}function Un(t,e){return void 0===e&&(e=null),ct(this,void 0,void 0,(function(){var n,a,r,i,o,u,c,s,d,f,h,p,v,g,m,w,k,E,O,x,S,_,N,I,C,D,j,A,z,R,L;return st(this,(function(H){switch(n=e||l(),a=[n,t],t){case 13:case 14:case 12:case 15:case 16:case 17:case 18:case 19:case 20:for(r=0,i=Ft;r<i.length;r++)R=i[r],(o=Xn(R.data.target,R.event)).id>0&&((a=[R.time,R.event]).push(o.id),a.push(R.data.x),a.push(R.data.y),ia(a),M(R.event,R.data.x,R.data.y));break;case 9:for(u=0,c=Kt;u<c.length;u++)R=c[u],s=Xn(R.data.target,R.event,R.data.text),a=[R.time,R.event],d=s.hash.join("."),a.push(s.id),a.push(R.data.x),a.push(R.data.y),a.push(R.data.eX),a.push(R.data.eY),a.push(R.data.button),a.push(R.data.reaction),a.push(R.data.context),a.push(b(R.data.text,"click",s.privacy)),a.push(y(R.data.link)),a.push(d),a.push(R.data.trust),ia(a),Jn(R.time,R.event,d,R.data.x,R.data.y,R.data.reaction,R.data.context);ae();break;case 38:for(f=0,h=Ft;f<h.length;f++)R=h[f],a=[R.time,R.event],(j=Xn(R.data.target,R.event)).id>0&&(a.push(j.id),a.push(R.data.action),ia(a));break;case 11:p=Gt,a.push(p.width),a.push(p.height),M(t,p.width,p.height),ie(),ia(a);break;case 26:v=le,a.push(v.name),ge(),ia(a);break;case 27:for(g=0,m=Ft;g<m.length;g++)R=m[g],w=Xn(R.data.target,R.event,R.data.value),(a=[R.time,R.event]).push(w.id),a.push(b(R.data.value,"input",w.privacy)),ia(a);break;case 21:(k=Jt)&&(E=Xn(k.start,t),O=Xn(k.end,t),a.push(E.id),a.push(k.startOffset),a.push(O.id),a.push(k.endOffset),ia(a));break;case 10:for(x=0,S=oe;x<S.length;x++)R=S[x],(_=Xn(R.data.target,R.event)).id>0&&((a=[R.time,R.event]).push(_.id),a.push(R.data.x),a.push(R.data.y),ia(a),M(R.event,R.data.x,R.data.y));oe=[];break;case 42:for(N=0,I=Ft;N<I.length;N++)R=I[N],a=[R.time,R.event],(j=Xn(R.data.target,R.event)).id>0&&((a=[R.time,R.event]).push(j.id),a.push(R.data.type),a.push(b(R.data.value,"change",j.privacy)),a.push(b(R.data.checksum,"checksum",j.privacy)),ia(a));break;case 39:for(C=0,D=fe;C<D.length;C++)R=D[C],a=[R.time,R.event],(j=Xn(R.data.target,R.event)).id>0&&(a.push(j.id),ia(a));pe();break;case 22:for(A=0,z=Vn;A<z.length;A++)R=z[A],(a=[R.time,R.event]).push(R.data.type),a.push(R.data.hash),a.push(R.data.x),a.push(R.data.y),a.push(R.data.reaction),a.push(R.data.context),ia(a,!1);Fn();break;case 28:L=de,a.push(L.visible),ia(a),T(n,L.visible),be()}return[2]}))}))}var Bn=[],Vn=[];function Fn(){Vn=[]}function Jn(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),Bn.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),M(e,a,r)}var Gn,Zn,Kn,Qn,$n,ta=0,ea=0,na=null,aa=0;function ra(){Qn=!0,ta=0,ea=0,aa=0,Gn=[],Zn=[],Kn={},$n=null}function ia(t,e){if(void 0===e&&(e=!0),Qn){var n=l(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:ta+=r.length;case 37:case 6:ea+=r.length,Gn.push(r);break;default:Zn.push(r)}L(25);var i=function(){var t=!1===u.lean&&ta>0?100:lr.sequence*u.delay;return"string"==typeof u.upload?Math.max(Math.min(t,3e4),100):u.delay}();n-aa>2*i&&(Y(na),na=null),e&&null===na&&(25!==a&&B(),na=q(ua,i),aa=n,za(ea))}}function oa(){Y(na),ua(!0),ta=0,ea=0,aa=0,Gn=[],Zn=[],Kn={},$n=null,Qn=!1}function ua(t){return void 0===t&&(t=!1),ct(this,void 0,void 0,(function(){var e,n,a,r,i,o,c,s;return st(this,(function(l){switch(l.label){case 0:return na=null,(e=!1===u.lean&&ea>0&&(ea<1048576||lr.sequence>0))&&W(1,1),Ln(),function(){var t=[];Vn=[];for(var e=lr.start+lr.duration,n=Math.max(e-2e3,0),a=0,r=Bn;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&Vn.push(i),t.push(i))}Bn=t,Un(22)}(),gt(),n=!0===t,a=JSON.stringify(hr(n)),r="[".concat(Zn.join(),"]"),i=e?"[".concat(Gn.join(),"]"):"",o=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:a,a:r,p:i}),n?(s=null,[3,3]):[3,1];case 1:return[4,dt(o)];case 2:s=l.sent(),l.label=3;case 3:return H(2,(c=s)?c.length:o.length),ca(o,c,lr.sequence,n),Zn=[],e&&(Gn=[],ea=0,ta=0),[2]}}))}))}function ca(t,e,n,a){if(void 0===a&&(a=!1),"string"==typeof u.upload){var r=u.upload,i=!1;if(a&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(r,t))&&la(n)}catch(t){}if(!1===i){n in Kn?Kn[n].attempts++:Kn[n]={data:t,attempts:1};var o=new XMLHttpRequest;o.open("POST",r),null!==n&&(o.onreadystatechange=function(){vr(sa)(o,n)}),o.withCredentials=!0,e?(o.setRequestHeader("Accept","application/x-clarity-gzip"),o.send(e)):o.send(t)}}else if(u.upload){(0,u.upload)(t),la(n)}}function sa(t,e){var n=Kn[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?Ra(6):(0===t.status&&(u.upload=u.fallback?u.fallback:u.upload),ca(n.data,null,e)):($n={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&ja(2),200===t.status&&t.responseText&&function(t){var e=t&&t.length>0?t.split(" "):[""];switch(e[0]){case"END":Ra(6);break;case"UPGRADE":tt("Auto");break;case"ACTION":u.action&&e.length>1&&u.action(e[1])}}(t.responseText),0===t.status&&(ca(n.data,null,e,!0),Ra(3)),t.status>=200&&t.status<=208&&la(e),delete Kn[e]))}function la(t){1===t&&er()}var da,fa={};function ha(t){var e=t.error||t;return e.message in fa||(fa[e.message]=0),fa[e.message]++>=5||e&&e.message&&(da={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},pa(31)),!0}function pa(t){return ct(this,void 0,void 0,(function(){var e;return st(this,(function(n){switch(e=[l(),t],t){case 31:e.push(da.message),e.push(da.line),e.push(da.column),e.push(da.stack),e.push(y(da.source)),ia(e);break;case 33:va&&(e.push(va.code),e.push(va.name),e.push(va.message),e.push(va.stack),e.push(va.severity),ia(e,!1));break;case 41:mt&&(e.push(mt.id),e.push(mt.target),e.push(mt.checksum),ia(e,!1))}return[2]}))}))}var va,ga={};function ma(t,e,n,a,r){void 0===n&&(n=null),void 0===a&&(a=null),void 0===r&&(r=null);var i=n?"".concat(n,"|").concat(a):"";t in ga&&ga[t].indexOf(i)>=0||(va={code:t,name:n,message:a,stack:r,severity:e},t in ga?ga[t].push(i):ga[t]=[i],pa(33))}var ba,ya={},wa=[],ka={},Ea={},Oa=[];function xa(){try{var t=u.extract;if(!t)return;for(var e=0;e<t.length;e+=3){var n=t[e],a=t[e+1];switch(n){case 0:var r=t[e+2];ka[a]=Ia(r);break;case 1:break;case 2:var i=t[e+2];Ea[a]=i;break;case 3:Oa=t[e+2]}}}catch(t){ma(8,1,t?t.name:null)}}function Sa(t){return JSON.parse(JSON.stringify(t))}function _a(){try{for(var t in ka){var e=(r=Ca(Sa(ka[t])))?JSON.stringify(r).substring(0,1e4):r;e&&Na(t,e)}for(var n in Ea){var a=document.querySelector(Ea[n]);a&&Na(n,a.innerText)}}catch(t){ma(5,1,t?t.name:null)}var r;ja(40)}function Ma(){wa=[]}function Na(t,e,n){void 0===n&&(n=!1),(!(t in ya)||t in ya&&ya[t]!==e||n)&&(ya[t]=e,wa.push(t))}function Ta(){ya={},wa=[],ka={},Ea={}}function Ia(t){for(var e=[],n=t.split(".");n.length>0;){var a=n.shift(),r=a.indexOf("["),i=a.indexOf("{"),o=a.indexOf("}");e.push({name:r>0?a.substring(0,r):i>0?a.substring(0,i):a,type:r>0?1:i>0?2:3,condition:i>0?a.substring(i+1,o):null})}return e}function Ca(t,e){if(void 0===e&&(e=window),0==t.length)return e;var n,a=t.shift();if(e&&e[a.name]){var r=e[a.name];if(1!==a.type&&Da(r,a.condition))n=Ca(t,r);else if(Array.isArray(r)){for(var i=[],o=0,u=r;o<u.length;o++){var c=u[o];if(Da(c,a.condition)){var s=Ca(t,c);s&&i.push(s)}}n=i}return n}return null}function Da(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function ja(t){var e=[l(),t];switch(t){case 4:var n=O;n&&((e=[n.time,n.event]).push(n.data.visible),e.push(n.data.docWidth),e.push(n.data.docHeight),e.push(n.data.screenWidth),e.push(n.data.screenHeight),e.push(n.data.scrollX),e.push(n.data.scrollY),e.push(n.data.pointerX),e.push(n.data.pointerY),e.push(n.data.activityTime),ia(e,!1)),_();break;case 25:e.push(A.gap),ia(e);break;case 35:e.push(ba.check),ia(e,!1);break;case 3:e.push($.key),ia(e);break;case 2:e.push($n.sequence),e.push($n.attempts),e.push($n.status),ia(e,!1);break;case 24:e.push(D.key),e.push(D.value),ia(e);break;case 34:var a=Object.keys(nt);if(a.length>0){for(var r=0,i=a;r<i.length;r++){var o=i[r];e.push(o),e.push(nt[o])}ut(),ia(e,!1)}break;case 0:var u=Object.keys(R);if(u.length>0){for(var c=0,s=u;c<s.length;c++){var d=s[c],f=parseInt(d,10);e.push(f),e.push(Math.round(R[d]))}R={},ia(e,!1)}break;case 1:var h=Object.keys(qa);if(h.length>0){for(var p=0,v=h;p<v.length;p++){var g=v[p];f=parseInt(g,10);e.push(f),e.push(qa[g])}Ba(),ia(e,!1)}break;case 36:var m=Object.keys(J);if(m.length>0){for(var b=0,y=m;b<y.length;b++){var w=y[b];f=parseInt(w,10);e.push(f),e.push([].concat.apply([],J[w]))}K(),ia(e,!1)}break;case 40:for(var k=0,E=wa;k<E.length;k++){w=E[k];e.push(w),e.push(ya[w])}Ma(),ia(e,!1)}}function Aa(){ba={check:0}}function za(t){if(0===ba.check){var e=ba.check;e=lr.sequence>=128?1:e,e=l()>72e5?2:e,(e=t>10485760?2:e)!==ba.check&&Ra(e)}}function Ra(t){ba.check=t,tr(),Vr()}function La(){0!==ba.check&&ja(35)}function Ha(){ba=null}var Wa=null,qa=null;function Ya(){Wa={},qa={}}function Pa(){Wa={},qa={}}function Xa(t,e){e&&(e="".concat(e),t in Wa||(Wa[t]=[]),Wa[t].indexOf(e)<0&&(Wa[t].push(e),t in qa||(qa[t]=[]),qa[t].push(e),Wa[t].length>128&&Ra(5)))}function Ua(){ja(1)}function Ba(){qa={}}var Va=null,Fa=[],Ja=null;function Ga(){Ja=null;var t,e=navigator&&"userAgent"in navigator?navigator.userAgent:"",n=document&&document.title?document.title:"",a=function(){var t={session:rr(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=ur("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-ir(n[1])<18e5&&(t.session=n[0],t.count=ir(n[2])+1,t.upgrade=ir(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),r=or(),i=u.projectId||f(location.host);Va={projectId:i,userId:r.id,sessionId:a.session,pageNum:a.count},u.lean=u.track&&null!==a.upgrade?0===a.upgrade:u.lean,u.upload=u.track&&"string"==typeof u.upload&&a.upload&&a.upload.length>"https://".length?a.upload:u.upload,Xa(0,e),Xa(3,n),Xa(1,y(location.href)),Xa(2,document.referrer),Xa(15,function(){var t=rr();if(u.track&&nr(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),Xa(16,document.documentElement.lang),Xa(17,document.dir),Xa(26,"".concat(window.devicePixelRatio)),W(0,a.ts),W(1,0),navigator&&(Xa(9,navigator.language),W(33,navigator.hardwareConcurrency),W(32,navigator.maxTouchPoints),W(34,Math.round(navigator.deviceMemory)),(t=navigator.userAgentData)&&t.getHighEntropyValues?t.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;Xa(22,t.platform),Xa(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){Xa(24,t.name+"~"+t.version)})),Xa(25,t.model),W(27,t.mobile?1:0)})):Xa(22,navigator.platform)),screen&&(W(14,Math.round(screen.width)),W(15,Math.round(screen.height)),W(16,Math.round(screen.colorDepth)));for(var o=0,c=u.cookies;o<c.length;o++){var s=c[o],l=ur(s);l&&at(s,l)}ar(r)}function Za(){Ja=null,Va=null}function Ka(t,e){void 0===e&&(e=!0),Va&&!1===e&&t(Va,!u.lean),Fa.push({callback:t,wait:e})}function Qa(){return Va?[Va.userId,Va.sessionId,Va.pageNum].join("."):""}function $a(){Ir()&&(u.track=!0,ar(or(),1))}function tr(){cr("_clsk","",0)}function er(){var t=Math.round(Date.now()),e=u.upload&&"string"==typeof u.upload?u.upload.replace("https://",""):"",n=u.lean?0:1;!function(t){Fa.length>0&&Fa.forEach((function(e){!e.callback||e.wait&&!t||e.callback(Va,!u.lean)}))}(n),cr("_clsk",[Va.sessionId,t,Va.pageNum,n,e].join("|"),1)}function nr(t,e){try{return!!t[e]}catch(t){return!1}}function ar(t,e){void 0===e&&(e=null),e=null===e?t.consent:e;var n=Math.ceil((Date.now()+31536e6)/864e5);(null===t.expiry||Math.abs(n-t.expiry)>=1||t.consent!==e)&&cr("_clck",[Va.userId,1,n.toString(36),e].join("|"),365)}function rr(){var t=Math.floor(Math.random()*Math.pow(2,32));return window&&window.crypto&&window.crypto.getRandomValues&&Uint32Array&&(t=window.crypto.getRandomValues(new Uint32Array(1))[0]),t.toString(36)}function ir(t,e){return void 0===e&&(e=10),parseInt(t,e)}function or(){var t={id:rr(),expiry:null,consent:0},e=ur("_clck");if(e&&e.length>0){for(var n=e.split("|"),a=0,r=0,i=document.cookie.split(";");r<i.length;r++){a+="_clck"===i[r].split("=")[0].trim()?1:0}if(1===n.length||a>1){var o="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(o),document.cookie="".concat("_clsk","=").concat(o)}n.length>2&&(t.expiry=ir(n[2],36)),n.length>3&&1===ir(n[3])&&(t.consent=1),u.track=u.track||1===t.consent,t.id=u.track?n[0]:t.id}return t}function ur(t){if(nr(document,"cookie")){var e=document.cookie.split(";");if(e)for(var n=0;n<e.length;n++){var a=e[n].split("=");if(a.length>1&&a[0]&&a[0].trim()===t)return a[1]}}return null}function cr(t,e,n){if(u.track&&(navigator&&navigator.cookieEnabled||nr(document,"cookie"))){var a=new Date;a.setDate(a.getDate()+n);var r=a?"expires="+a.toUTCString():"",i="".concat(t,"=").concat(e).concat(";").concat(r).concat(";path=/");try{if(null===Ja){for(var o=location.hostname?location.hostname.split("."):[],c=o.length-1;c>=0;c--)if(Ja=".".concat(o[c]).concat(Ja||""),c<o.length-1&&(document.cookie="".concat(i).concat(";").concat("domain=").concat(Ja),ur(t)===e))return;Ja=""}}catch(t){Ja=""}document.cookie=Ja?"".concat(i).concat(";").concat("domain=").concat(Ja):i}}var sr,lr=null;function dr(){var t=Va;lr={version:d,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function fr(){lr=null}function hr(t){return lr.start=lr.start+lr.duration,lr.duration=l()-lr.start,lr.sequence++,lr.upload=t&&"sendBeacon"in navigator?1:0,lr.end=t?1:0,[lr.version,lr.sequence,lr.start,lr.duration,lr.projectId,lr.userId,lr.sessionId,lr.pageNum,lr.upload,lr.end]}function pr(){sr=[]}function vr(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw function(t){if(sr&&-1===sr.indexOf(t.message)){var e=u.report;if(e&&e.length>0){var n={v:lr.version,p:lr.projectId,u:lr.userId,s:lr.sessionId,n:lr.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e),a.send(JSON.stringify(n)),sr.push(t.message)}}return t}(t)}var n=performance.now()-e;H(4,n),n>30&&(L(7),W(6,n))}}var gr=[];function mr(t,e,n,a){void 0===a&&(a=!1),n=vr(n);try{t[c("addEventListener")](e,n,a),gr.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function br(){for(var t=0,e=gr;t<e.length;t++){var n=e[t];try{n.target[c("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}gr=[]}var yr=null,wr=null,kr=null,Er=0;function Or(){return!(Er++>20)||(ma(4,0),!1)}function xr(){Er=0,kr!==_r()&&(Vr(),window.setTimeout(Sr,250))}function Sr(){Br(),W(29,1)}function _r(){return location.href?location.href.replace(location.hash,""):location.href}var Mr=!1;function Nr(){Mr=!0,s=performance.now(),It(),br(),pr(),kr=_r(),Er=0,mr(window,"popstate",xr),null===yr&&(yr=history.pushState,history.pushState=function(){yr.apply(this,arguments),Ir()&&Or()&&xr()}),null===wr&&(wr=history.replaceState,history.replaceState=function(){wr.apply(this,arguments),Ir()&&Or()&&xr()})}function Tr(){kr=null,Er=0,pr(),br(),It(),s=0,Mr=!1}function Ir(){return Mr}function Cr(t){if(null===t||Mr)return!1;for(var e in t)e in u&&(u[e]=t[e]);return!0}function Dr(){Br(),j("clarity","restart")}var jr=Object.freeze({__proto__:null,start:function(){!function(){bt=[],W(26,navigator.webdriver?1:0);try{W(31,window.top==window.self?1:2)}catch(t){W(31,0)}}(),mr(window,"error",ha),fa={},ga={}},stop:function(){ga={}}});function Ar(){return ct(this,void 0,void 0,(function(){var t,e;return st(this,(function(n){switch(n.label){case 0:return t=l(),At(e={id:Qa(),cost:3}),[4,Ie(document,e,0)];case 1:return n.sent(),[4,Yt(5,e,t)];case 2:return n.sent(),zt(e),[2]}}))}))}var zr=Object.freeze({__proto__:null,hashText:wn,start:function(){Bt(),Vt(),Yn(),An=null,In=new WeakMap,Cn={},Dn=[],jn=!!window.IntersectionObserver,sn(),function(){if(Ce=[],Re=[],Le=null,He=0,We={},null===je&&(je=CSSStyleSheet.prototype.insertRule,CSSStyleSheet.prototype.insertRule=function(){return Ir()&&Ue(this.ownerNode),je.apply(this,arguments)}),null===Ae&&(Ae=CSSStyleSheet.prototype.deleteRule,CSSStyleSheet.prototype.deleteRule=function(){return Ir()&&Ue(this.ownerNode),Ae.apply(this,arguments)}),null===ze){ze=Element.prototype.attachShadow;try{Element.prototype.attachShadow=function(){return Ir()?Ue(ze.apply(this,arguments)):ze.apply(this,arguments)}}catch(t){ze=null}}}(),Ct(Ar,1).then((function(){vr(Vt)(),vr(Ln)()}))},stop:function(){Yn(),In=null,Cn={},Dn=[],An&&(An.disconnect(),An=null),jn=!1,ln(),function(){for(var t=0,e=Ce;t<e.length;t++){var n=e[t];n&&n.disconnect()}Ce=[],We={},De=[],Re=[],He=0,Le=null}(),Bt()}});var Rr,Lr=null;function Hr(){Lr=null}function Wr(t){Lr={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){ct(this,void 0,void 0,(function(){var e,n;return st(this,(function(a){return e=l(),n=[e,t],29===t&&(n.push(Lr.fetchStart),n.push(Lr.connectStart),n.push(Lr.connectEnd),n.push(Lr.requestStart),n.push(Lr.responseStart),n.push(Lr.responseEnd),n.push(Lr.domInteractive),n.push(Lr.domComplete),n.push(Lr.loadEventStart),n.push(Lr.loadEventEnd),n.push(Lr.redirectCount),n.push(Lr.size),n.push(Lr.type),n.push(Lr.protocol),n.push(Lr.encodedSize),n.push(Lr.decodedSize),Hr(),ia(n,!1)),[2]}))}))}(29)}var qr=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint"];function Yr(){try{Rr&&Rr.disconnect(),Rr=new PerformanceObserver(vr(Pr));for(var t=0,e=qr;t<e.length;t++){var n=e[t];PerformanceObserver.supportedEntryTypes.indexOf(n)>=0&&("layout-shift"===n&&H(9,0),Rr.observe({type:n,buffered:!0}))}}catch(t){ma(3,1)}}function Pr(t){!function(t){for(var e=(!("visibilityState"in document)||"visible"===document.visibilityState),n=0;n<t.length;n++){var a=t[n];switch(a.entryType){case"navigation":Wr(a);break;case"resource":var r=a.name;Xa(4,Xr(r)),r!==u.upload&&r!==u.fallback||W(28,a.duration);break;case"longtask":L(7);break;case"first-input":e&&W(10,a.processingStart-a.startTime);break;case"layout-shift":e&&!a.hadRecentInput&&H(9,1e3*a.value);break;case"largest-contentful-paint":e&&W(8,a.startTime)}}}(t.getEntries())}function Xr(t){var e=document.createElement("a");return e.href=t,e.hostname}var Ur=[jr,zr,we,Object.freeze({__proto__:null,start:function(){Hr(),function(){navigator&&"connection"in navigator&&Xa(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?"complete"!==document.readyState?mr(window,"load",q.bind(this,Yr,0)):Yr():ma(3,0)}()},stop:function(){Rr&&Rr.disconnect(),Rr=null,Hr()}})];function Br(t){void 0===t&&(t=null),function(){try{return!1===Mr&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(Cr(t),Nr(),pt(),Ur.forEach((function(t){return vr(t.start)()})),null===t&&Zr())}function Vr(){Ir()&&(Ur.slice().reverse().forEach((function(t){return vr(t.stop)()})),vt(),Tr(),void 0!==Jr&&(Jr[Gr]=function(){(Jr[Gr].q=Jr[Gr].q||[]).push(arguments)}))}var Fr=Object.freeze({__proto__:null,consent:$a,event:j,hashText:wn,identify:rt,metadata:Ka,pause:function(){Ir()&&(j("clarity","pause"),null===Nt&&(Nt=new Promise((function(t){Tt=t}))))},resume:function(){Ir()&&(Nt&&(Tt(),Nt=null,null===Mt&&Dt()),j("clarity","resume"))},set:at,start:Br,stop:Vr,upgrade:tt,version:d}),Jr=window,Gr="clarity";function Zr(){if(void 0!==Jr){if(Jr[Gr]&&Jr[Gr].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=Jr[Gr]&&Jr[Gr].q||[];for(Jr[Gr]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return Fr[t].apply(Fr,e)},Jr[Gr].v=d;t.length>0;)Jr[Gr].apply(Jr,t.shift())}}Zr()}();
package/build/clarity.js CHANGED
@@ -1,83 +1,132 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var dom = /*#__PURE__*/Object.freeze({
6
4
  __proto__: null,
7
- get start () { return start$i; },
8
- get stop () { return stop$g; },
9
- get parse () { return parse$1; },
10
- get getId () { return getId; },
11
5
  get add () { return add; },
12
- get update () { return update$1; },
13
- get sameorigin () { return sameorigin; },
14
- get iframe () { return iframe; },
15
- get hashText () { return hashText; },
6
+ get get () { return get; },
7
+ get getId () { return getId; },
16
8
  get getNode () { return getNode; },
17
9
  get getValue () { return getValue; },
18
- get get () { return get; },
19
- get lookup () { return lookup; },
20
10
  get has () { return has; },
11
+ get hashText () { return hashText; },
12
+ get iframe () { return iframe; },
13
+ get lookup () { return lookup; },
14
+ get parse () { return parse$1; },
15
+ get sameorigin () { return sameorigin; },
16
+ get start () { return start$i; },
17
+ get stop () { return stop$g; },
18
+ get update () { return update$1; },
21
19
  get updates () { return updates$2; }
22
20
  });
23
21
  var upload$1 = /*#__PURE__*/Object.freeze({
24
22
  __proto__: null,
25
- get track () { return track$1; },
26
- get start () { return start$f; },
27
23
  get queue () { return queue; },
28
- get stop () { return stop$d; }
24
+ get start () { return start$f; },
25
+ get stop () { return stop$d; },
26
+ get track () { return track$1; }
29
27
  });
30
28
  var extract = /*#__PURE__*/Object.freeze({
31
29
  __proto__: null,
32
- get data () { return data$5; },
33
- get keys () { return keys; },
34
- get fragments () { return fragments; },
35
- get start () { return start$c; },
36
30
  get clone () { return clone; },
37
31
  get compute () { return compute$4; },
32
+ get data () { return data$5; },
33
+ get fragments () { return fragments; },
34
+ get keys () { return keys; },
38
35
  get reset () { return reset$4; },
39
- get update () { return update; },
40
- get stop () { return stop$b; }
36
+ get start () { return start$c; },
37
+ get stop () { return stop$b; },
38
+ get update () { return update; }
41
39
  });
42
40
  var limit = /*#__PURE__*/Object.freeze({
43
41
  __proto__: null,
44
- get data () { return data$4; },
45
- get start () { return start$b; },
46
42
  get check () { return check$2; },
47
- get trigger () { return trigger; },
48
43
  get compute () { return compute$3; },
49
- get stop () { return stop$a; }
44
+ get data () { return data$4; },
45
+ get start () { return start$b; },
46
+ get stop () { return stop$a; },
47
+ get trigger () { return trigger; }
50
48
  });
51
49
  var dimension = /*#__PURE__*/Object.freeze({
52
50
  __proto__: null,
51
+ get compute () { return compute$2; },
53
52
  get data () { return data$3; },
54
- get updates () { return updates; },
53
+ get log () { return log; },
54
+ get reset () { return reset$3; },
55
55
  get start () { return start$a; },
56
56
  get stop () { return stop$9; },
57
- get log () { return log; },
58
- get compute () { return compute$2; },
59
- get reset () { return reset$3; }
57
+ get updates () { return updates; }
60
58
  });
61
59
  var metadata$1 = /*#__PURE__*/Object.freeze({
62
60
  __proto__: null,
63
- get data () { return data$2; },
64
61
  get callbacks () { return callbacks; },
65
- get start () { return start$9; },
66
- get stop () { return stop$8; },
67
- get metadata () { return metadata; },
68
- get id () { return id; },
69
- get consent () { return consent; },
70
62
  get clear () { return clear; },
71
- get save () { return save; }
63
+ get consent () { return consent; },
64
+ get data () { return data$2; },
65
+ get id () { return id; },
66
+ get metadata () { return metadata; },
67
+ get save () { return save; },
68
+ get start () { return start$9; },
69
+ get stop () { return stop$8; }
72
70
  });
73
71
  var envelope$1 = /*#__PURE__*/Object.freeze({
74
72
  __proto__: null,
75
73
  get data () { return data$1; },
74
+ get envelope () { return envelope; },
76
75
  get start () { return start$8; },
77
- get stop () { return stop$7; },
78
- get envelope () { return envelope; }
76
+ get stop () { return stop$7; }
77
+ });
78
+ var clarity = /*#__PURE__*/Object.freeze({
79
+ __proto__: null,
80
+ get consent () { return consent; },
81
+ get event () { return event; },
82
+ get hashText () { return hashText; },
83
+ get identify () { return identify; },
84
+ get metadata () { return metadata; },
85
+ get pause () { return pause; },
86
+ get resume () { return resume; },
87
+ get set () { return set; },
88
+ get start () { return start; },
89
+ get stop () { return stop; },
90
+ get upgrade () { return upgrade; },
91
+ get version () { return version$1; }
79
92
  });
80
93
 
94
+ var w = window;
95
+ var c = "clarity" /* Constant.Clarity */;
96
+ function setup() {
97
+ // Start queuing up calls while Clarity is inactive and we are in a browser enviornment
98
+ if (typeof w !== "undefined") {
99
+ w[c] = function () {
100
+ (w[c].q = w[c].q || []).push(arguments);
101
+ };
102
+ }
103
+ }
104
+ function process$7() {
105
+ if (typeof w !== "undefined") {
106
+ // Do not execute or reset global "clarity" variable if a version of Clarity is already running on the page
107
+ if (w[c] && w[c].v) {
108
+ return console.warn("Error CL001: Multiple Clarity tags detected.");
109
+ }
110
+ // Expose clarity in a browser environment
111
+ // To be efficient about queuing up operations while Clarity is wiring up, we expose clarity.*(args) => clarity(*, args);
112
+ // This allows us to reprocess any calls that we missed once Clarity is available on the page
113
+ // Once Clarity script bundle is loaded on the page, we also initialize a "v" property that holds current version
114
+ // We use the presence or absence of "v" to determine if we are attempting to run a duplicate instance
115
+ var queue = w[c] ? (w[c].q || []) : [];
116
+ w[c] = function (method) {
117
+ var args = [];
118
+ for (var _i = 1; _i < arguments.length; _i++) {
119
+ args[_i - 1] = arguments[_i];
120
+ }
121
+ return clarity[method].apply(clarity, args);
122
+ };
123
+ w[c].v = version$1;
124
+ while (queue.length > 0) {
125
+ w[c].apply(w, queue.shift());
126
+ }
127
+ }
128
+ }
129
+
81
130
  var config$1 = {
82
131
  projectId: null,
83
132
  delay: 1 * 1000 /* Time.Second */,
@@ -119,7 +168,7 @@ function stop$C() {
119
168
  startTime = 0;
120
169
  }
121
170
 
122
- var version$1 = "0.7.1";
171
+ var version$1 = "0.7.3";
123
172
 
124
173
  // tslint:disable: no-bitwise
125
174
  function hash (input, precision) {
@@ -367,14 +416,14 @@ function stop$B() {
367
416
 
368
417
  var baseline = /*#__PURE__*/Object.freeze({
369
418
  __proto__: null,
370
- get state () { return state$a; },
371
- start: start$F,
372
- reset: reset$q,
373
- track: track$7,
374
419
  activity: activity,
375
- visibility: visibility,
376
420
  compute: compute$c,
377
- stop: stop$B
421
+ reset: reset$q,
422
+ start: start$F,
423
+ get state () { return state$a; },
424
+ stop: stop$B,
425
+ track: track$7,
426
+ visibility: visibility
378
427
  });
379
428
 
380
429
  var data$j = null;
@@ -485,8 +534,8 @@ function stop$z() {
485
534
  var ping$1 = /*#__PURE__*/Object.freeze({
486
535
  __proto__: null,
487
536
  get data () { return data$h; },
488
- start: start$D,
489
537
  reset: reset$o,
538
+ start: start$D,
490
539
  stop: stop$z
491
540
  });
492
541
 
@@ -523,12 +572,12 @@ function reset$n() {
523
572
 
524
573
  var summary = /*#__PURE__*/Object.freeze({
525
574
  __proto__: null,
575
+ compute: compute$a,
526
576
  get data () { return data$g; },
577
+ reset: reset$n,
527
578
  start: start$C,
528
579
  stop: stop$y,
529
- track: track$6,
530
- compute: compute$a,
531
- reset: reset$n
580
+ track: track$6
532
581
  });
533
582
 
534
583
  var data$f = null;
@@ -564,8 +613,8 @@ var upgrade$1 = /*#__PURE__*/Object.freeze({
564
613
  __proto__: null,
565
614
  get data () { return data$f; },
566
615
  start: start$B,
567
- upgrade: upgrade,
568
- stop: stop$x
616
+ stop: stop$x,
617
+ upgrade: upgrade
569
618
  });
570
619
 
571
620
  var data$e = null;
@@ -610,12 +659,12 @@ function stop$w() {
610
659
 
611
660
  var variable = /*#__PURE__*/Object.freeze({
612
661
  __proto__: null,
662
+ compute: compute$9,
613
663
  get data () { return data$e; },
614
- start: start$A,
615
- set: set,
616
664
  identify: identify,
617
- compute: compute$9,
618
665
  reset: reset$m,
666
+ set: set,
667
+ start: start$A,
619
668
  stop: stop$w
620
669
  });
621
670
 
@@ -650,7 +699,7 @@ function __generator(thisArg, body) {
650
699
  function verb(n) { return function (v) { return step([n, v]); }; }
651
700
  function step(op) {
652
701
  if (f) throw new TypeError("Generator is already executing.");
653
- while (_) try {
702
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
654
703
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
655
704
  if (y = 0, t) op = [op[0] & 2, t.value];
656
705
  switch (op[0]) {
@@ -868,8 +917,8 @@ function filter(value) {
868
917
 
869
918
  var selector = /*#__PURE__*/Object.freeze({
870
919
  __proto__: null,
871
- reset: reset$l,
872
- get: get$1
920
+ get: get$1,
921
+ reset: reset$l
873
922
  });
874
923
 
875
924
  // Track the start time to be able to compute duration at the end of the task
@@ -1816,9 +1865,9 @@ function observe$4(root) {
1816
1865
 
1817
1866
  var interaction = /*#__PURE__*/Object.freeze({
1818
1867
  __proto__: null,
1868
+ observe: observe$4,
1819
1869
  start: start$k,
1820
- stop: stop$i,
1821
- observe: observe$4
1870
+ stop: stop$i
1822
1871
  });
1823
1872
 
1824
1873
  var digitsRegex = /[^0-9\.]/g;
@@ -2258,7 +2307,7 @@ function handle$1(m) {
2258
2307
  }
2259
2308
  function process$2() {
2260
2309
  return __awaiter(this, void 0, void 0, function () {
2261
- var timer, record, _i, _a, mutation, state, target, type, value;
2310
+ var timer, record, instance, _i, _a, mutation, state, target, type, value;
2262
2311
  return __generator(this, function (_b) {
2263
2312
  switch (_b.label) {
2264
2313
  case 0:
@@ -2268,6 +2317,7 @@ function process$2() {
2268
2317
  case 1:
2269
2318
  if (!(mutations.length > 0)) return [3 /*break*/, 8];
2270
2319
  record = mutations.shift();
2320
+ instance = time();
2271
2321
  _i = 0, _a = record.mutations;
2272
2322
  _b.label = 2;
2273
2323
  case 2:
@@ -2284,7 +2334,7 @@ function process$2() {
2284
2334
  return [3 /*break*/, 6];
2285
2335
  }
2286
2336
  target = mutation.target;
2287
- type = track$5(mutation, timer);
2337
+ type = track$5(mutation, timer, instance);
2288
2338
  if (type && target && target.ownerDocument) {
2289
2339
  parse$1(target.ownerDocument);
2290
2340
  }
@@ -2324,7 +2374,7 @@ function process$2() {
2324
2374
  });
2325
2375
  });
2326
2376
  }
2327
- function track$5(m, timer) {
2377
+ function track$5(m, timer, instance) {
2328
2378
  var value = m.target ? get(m.target.parentNode) : null;
2329
2379
  // Check if the parent is already discovered and that the parent is not the document root
2330
2380
  if (value && value.data.tag !== "HTML" /* Constant.HTML */) {
@@ -2337,19 +2387,20 @@ function track$5(m, timer) {
2337
2387
  // In those cases, IDs will change however the selector (which is relative to DOM xPath) remains the same
2338
2388
  var key = [parent_1, element, m.attributeName, names(m.addedNodes), names(m.removedNodes)].join();
2339
2389
  // Initialize an entry if it doesn't already exist
2340
- history$4[key] = key in history$4 ? history$4[key] : [0];
2390
+ history$4[key] = key in history$4 ? history$4[key] : [0, instance];
2341
2391
  var h = history$4[key];
2342
2392
  // Lookup any pending nodes queued up for removal, and process them now if we suspended a mutation before
2343
2393
  if (inactive === false && h[0] >= 10 /* Setting.MutationSuspendThreshold */) {
2344
- processNodeList(h[1], 2 /* Source.ChildListRemove */, timer);
2394
+ processNodeList(h[2], 2 /* Source.ChildListRemove */, timer);
2345
2395
  }
2346
2396
  // Update the counter
2347
- h[0] = inactive ? h[0] + 1 : 1;
2397
+ h[0] = inactive ? (h[1] === instance ? h[0] : h[0] + 1) : 1;
2398
+ h[1] = instance;
2348
2399
  // Return updated mutation type based on if we have already hit the threshold or not
2349
2400
  if (h[0] === 10 /* Setting.MutationSuspendThreshold */) {
2350
2401
  // Store a reference to removedNodes so we can process them later
2351
2402
  // when we resume mutations again on user interactions
2352
- h[1] = m.removedNodes;
2403
+ h[2] = m.removedNodes;
2353
2404
  return "suspend" /* Constant.Suspend */;
2354
2405
  }
2355
2406
  else if (h[0] > 10 /* Setting.MutationSuspendThreshold */) {
@@ -4461,9 +4512,9 @@ function stop$3() {
4461
4512
 
4462
4513
  var layout = /*#__PURE__*/Object.freeze({
4463
4514
  __proto__: null,
4515
+ hashText: hashText,
4464
4516
  start: start$3,
4465
- stop: stop$3,
4466
- hashText: hashText
4517
+ stop: stop$3
4467
4518
  });
4468
4519
 
4469
4520
  function encode (type) {
@@ -4615,11 +4666,6 @@ function process(entries) {
4615
4666
  break;
4616
4667
  }
4617
4668
  }
4618
- if (performance && "memory" /* Constant.Memory */ in performance && performance["memory" /* Constant.Memory */].usedJSHeapSize) {
4619
- // Track consumed memory (MBs) where "memory" API is available
4620
- // Reference: https://developer.mozilla.org/en-US/docs/Web/API/Performance/memory
4621
- max(30 /* Metric.UsedMemory */, Math.abs(performance["memory" /* Constant.Memory */].usedJSHeapSize / 1048576 /* Setting.MegaByte */));
4622
- }
4623
4669
  }
4624
4670
  function stop$2() {
4625
4671
  if (observer) {
@@ -4657,6 +4703,11 @@ function start(config$1) {
4657
4703
  start$6();
4658
4704
  start$z();
4659
4705
  modules.forEach(function (x) { return measure(x.start)(); });
4706
+ // If it's an internal call to start, without explicit configuration,
4707
+ // re-process any newly accumulated items in the queue
4708
+ if (config$1 === null) {
4709
+ process$7();
4710
+ }
4660
4711
  }
4661
4712
  }
4662
4713
  // By default Clarity is asynchronous and will yield by looking for requestIdleCallback.
@@ -4679,29 +4730,14 @@ function resume() {
4679
4730
  }
4680
4731
  function stop() {
4681
4732
  if (active()) {
4682
- // Stop modules in the reverse order of their initialization
4733
+ // Stop modules in the reverse order of their initialization and start queuing up items again
4683
4734
  modules.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
4684
4735
  stop$v();
4685
4736
  stop$5();
4737
+ setup();
4686
4738
  }
4687
4739
  }
4688
4740
 
4689
- var clarity = /*#__PURE__*/Object.freeze({
4690
- __proto__: null,
4691
- version: version$1,
4692
- start: start,
4693
- pause: pause,
4694
- resume: resume,
4695
- stop: stop,
4696
- consent: consent,
4697
- event: event,
4698
- identify: identify,
4699
- set: set,
4700
- upgrade: upgrade,
4701
- metadata: metadata,
4702
- hashText: hashText
4703
- });
4704
-
4705
4741
  var helper = { hash: hash, selector: selector, get: get, getNode: getNode, lookup: lookup };
4706
4742
  var version = version$1;
4707
4743