clarity-js 0.7.6 → 0.7.7
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/build/clarity.insight.js +1 -1
- package/build/clarity.js +80 -33
- package/build/clarity.min.js +1 -1
- package/build/clarity.module.js +80 -33
- package/package.json +1 -1
- package/src/core/version.ts +1 -1
- package/src/data/encode.ts +10 -3
- package/src/data/extract.ts +69 -27
- package/src/data/metadata.ts +7 -2
- package/src/queue.ts +2 -0
- package/types/core.d.ts +2 -1
- package/types/data.d.ts +3 -2
package/build/clarity.insight.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return Se},get start(){return Ne},get stop(){return Ie},get track(){return xe}}),e=Object.freeze({__proto__:null,get clone(){return Ge},get compute(){return Fe},get data(){return Le},get keys(){return Ue},get reset(){return Ke},get start(){return Be},get stop(){return $e},get trigger(){return Ze},get update(){return Qe}}),n=Object.freeze({__proto__:null,get check(){return on},get compute(){return cn},get data(){return Pe},get start(){return rn},get stop(){return sn},get trigger(){return un}}),a=Object.freeze({__proto__:null,get compute(){return gn},get data(){return ln},get log(){return pn},get reset(){return vn},get start(){return fn},get stop(){return dn},get updates(){return hn}}),r=Object.freeze({__proto__:null,get callbacks(){return yn},get clear(){return En},get consent(){return On},get data(){return mn},get id(){return xn},get metadata(){return _n},get save(){return Mn},get start(){return bn},get stop(){return kn}}),o=Object.freeze({__proto__:null,get data(){return An},get envelope(){return Yn},get start(){return Wn},get stop(){return Xn}}),i={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null};function u(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function s(t){void 0===t&&(t=null);var e=t&&t.timeStamp>0?t.timeStamp:performance.now();return Math.max(Math.round(e-c),0)}var l="0.7.6";var h=/\S/gi,f=!0,d=null,p=null,g=null;function v(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,o=!1,i=null;k();for(var u=0;u<t.length;u++){var c=t.charCodeAt(u);if(a=a||c>=48&&c<=57,r=r||64===c,o=9===c||10===c||13===c||32===c,0===u||u===t.length-1||o){if(a||r){null===i&&(i=t.split(""));var s=t.substring(e+1,o?u:u+1);s=f&&null!==g?s.match(g)?s:s.replace(p,"▪").replace(d,"▫"):w(s),i.splice(e+1-n,s.length,s),n+=s.length-1}o&&(a=!1,r=!1,e=u)}}return i?i.join(""):t}(t);case"input":case"change":return b(t)}return t;case 2:case 3:switch(e){case"*T":case"data-":return a?y(t):w(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":case"change":return b(t);case"placeholder":return w(t)}break;case 4:switch(e){case"*T":case"data-":return a?y(t):w(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}break;case 5:switch(e){case"*T":case"data-":return function(t){return k(),t.replace(p,"▪").replace(d,"▫")}(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":case"src":case"srcset":case"alt":case"title":return""}}return t}function m(t){var e=i.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 y(t){var e=t.trim();if(e.length>0){var n=e[0],a=t.indexOf(n),r=t.substr(0,a),o=t.substr(a+e.length);return"".concat(r).concat(e.length.toString(36)).concat(o)}return t}function w(t){return t.replace(h,"•")}function b(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}function k(){if(f&&null===d)try{d=new RegExp("\\p{N}","gu"),p=new RegExp("\\p{L}","gu"),g=new RegExp("\\p{Sc}","gu")}catch(t){f=!1}}var _=null,x=null,O=!1;function E(){O&&(_={time:s(),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}O=!0}function T(t){x.activityTime=t}function N(t,e){x.visible="visible"===e?1:0,x.visible||T(t),O=!0}function S(){O&&an(4)}var I=Object.freeze({__proto__:null,activity:T,compute:S,reset:E,start:function(){O=!1,E()},get state(){return _},stop:function(){E()},track:M,visibility:N}),j=null;function C(t,e){na()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(j={key:t,value:e},an(24))}var D,H=null,A=null;function W(t){t in H||(H[t]=0),t in A||(A[t]=0),H[t]++,A[t]++}function X(t,e){null!==e&&(t in H||(H[t]=0),t in A||(A[t]=0),H[t]+=e,A[t]+=e)}function Y(t,e){null!==e&&!1===isNaN(e)&&(t in H||(H[t]=0),(e>H[t]||0===H[t])&&(A[t]=e,H[t]=e))}function z(t,e,n){return window.setTimeout(Rn(t),e,n)}function q(t){return window.clearTimeout(t)}var R=0,P=0,L=null;function U(){L&&q(L),L=z(V,P),R=s()}function V(){var t=s();D={gap:t-R},an(25),D.gap<3e5?L=z(V,P):$n&&(C("clarity","suspend"),ua(),["mousemove","touchstart"].forEach((function(t){return Ln(document,t,ra)})),["resize","scroll","pageshow"].forEach((function(t){return Ln(window,t,ra)})))}var J=Object.freeze({__proto__:null,get data(){return D},reset:U,start:function(){P=6e4,R=0},stop:function(){q(L),R=0,P=0}}),B=null;function Z(){an(36)}function G(){B={}}var F=Object.freeze({__proto__:null,compute:Z,get data(){return B},reset:G,start:function(){B={}},stop:function(){B={}},track:function(t,e){if(t in B){var n=B[t],a=n[n.length-1];e-a[0]>100?B[t].push([e,0]):a[1]=e-a[0]}else B[t]=[[e,0]]}}),K=null;function Q(t){na()&&i.lean&&(i.lean=!1,K={key:t},Mn(),i.upgrade&&i.upgrade(t),an(3))}var $=Object.freeze({__proto__:null,get data(){return K},start:function(){!i.lean&&i.upgrade&&i.upgrade("Config"),K=null},stop:function(){K=null},upgrade:Q}),tt=null;function et(t,e){at(t,"string"==typeof e?[e]:e)}function nt(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),at("userId",[t]),at("sessionId",[e]),at("pageId",[n])}function at(t,e){if(na()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in tt?tt[t]:[]),a=0;a<e.length;a++)"string"==typeof e[a]&&e[a].length<255&&n.push(e[a]);tt[t]=n}}function rt(){an(34)}function ot(){tt={}}function it(t,e,n,a){return new(n||(n=Promise))((function(r,o){function i(t){try{c(a.next(t))}catch(t){o(t)}}function u(t){try{c(a.throw(t))}catch(t){o(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(i,u)}c((a=a.apply(t,e||[])).next())}))}function ut(t,e){var n,a,r,o,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)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 i.label++,{value:u[1],done:!1};case 5:i.label++,a=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){i.label=u[1];break}if(6===u[0]&&i.label<r[1]){i.label=r[1],r=u;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(u);break}r[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}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 ct="CompressionStream"in window;function st(t){return it(this,void 0,void 0,(function(){var e,n;return ut(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),ct?(e=new ReadableStream({start:function(e){return it(this,void 0,void 0,(function(){return ut(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,lt(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 lt(t){return it(this,void 0,void 0,(function(){var e,n,a,r,o;return ut(this,(function(i){switch(i.label){case 0:e=t.getReader(),n=[],a=!1,r=[],i.label=1;case 1:return a?[3,3]:[4,e.read()];case 2:return o=i.sent(),a=o.done,r=o.value,a?[2,n]:(n.push.apply(n,r),[3,1]);case 3:return[2,n]}}))}))}var ht,ft=[I,a,Object.freeze({__proto__:null,compute:rt,get data(){return tt},identify:nt,reset:ot,set:et,start:function(){ot()},stop:function(){ot()}}),n,F,r,o,t,J,$,e];function dt(){H={},A={},W(5),ft.forEach((function(t){return Rn(t.start)()}))}function pt(){ft.slice().reverse().forEach((function(t){return Rn(t.stop)()})),H={},A={}}function gt(){rt(),S(),gn(),an(0),Z(),cn(),Fe()}function vt(t){return it(this,void 0,void 0,(function(){var e,n,a,r,o,i,u,c,l,h,f,d,p;return ut(this,(function(g){switch(e=s(),n=[e,t],t){case 8:a=ht,n.push(a.width),n.push(a.height),M(t,a.width,a.height),Se(n);break;case 43:if((r=ne).length>0){for(o=0,i=r;o<i.length;o++)for(u=i[o],c=u.metadata.privacy,l=u.data,h=0,f=["tag","attributes","value"];h<f.length;h++)if(l[d=f[h]])switch(d){case"tag":n.push(u.id),u.parent&&n.push(u.parent),u.previous&&n.push(u.previous),n.push(l[d]);break;case"attributes":for(p in l[d])void 0!==l[d][p]&&n.push(mt(p,l[d][p],c));break;case"value":n.push(v(l[d],l.tag,c))}Se(function(t){for(var e=[],n={},a=0,r=null,o=0;o<t.length;o++)if("string"==typeof t[o]){var i=t[o],u=n[i]||-1;u>=0?r?r.push(u):(r=[u],e.push(r),a++):(r=null,e.push(i),n[i]=a++)}else r=null,e.push(t[o]),a++;return e}(n),!0)}}return[2]}))}))}function mt(t,e,n){return"".concat(t,"=").concat(v(e,0===t.indexOf("data-")?"data-":t,n))}function yt(){ht=null}function wt(){var t,e,n,a,r,o,i,u,c,s,l,h,f,d,p,g;yt(),t=document.body,e=document.documentElement,n=t?t.clientWidth:null,a=t?t.scrollWidth:null,r=t?t.offsetWidth:null,o=e?e.clientWidth:null,i=e?e.scrollWidth:null,u=e?e.offsetWidth:null,c=Math.max(n,a,r,o,i,u),s=t?t.clientHeight:null,l=t?t.scrollHeight:null,h=t?t.offsetHeight:null,f=e?e.clientHeight:null,d=e?e.scrollHeight:null,p=e?e.offsetHeight:null,g=Math.max(s,l,h,f,d,p),null!==ht&&c===ht.width&&g===ht.height||null===c||null===g||(ht={width:c,height:g},vt(8))}var bt=[],kt=null;var _t=Object.freeze({__proto__:null,compute:function(){},data:kt,log:function(){},observe:function(){},reset:function(){},start:function(){},state:bt,stop:function(){}}),xt=[],Ot=null,Et=null,Mt=null;function Tt(){xt=[],Ot=null,Et=null}function Nt(t,e){return void 0===e&&(e=0),it(this,void 0,void 0,(function(){var n,a,r;return ut(this,(function(o){for(n=0,a=xt;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){xt[1===e?"unshift":"push"]({task:t,resolve:n,id:xn()})})),null===Ot&&null===Et&&St(),[2,r]}))}))}function St(){var t=xt.shift();t&&(Ot=t,t.task().then((function(){t.id===xn()&&(t.resolve(),Ot=null,St())})).catch((function(e){t.id===xn()&&(e&&Re(0,1,e.name,e.message,e.stack),Ot=null,St())})))}var It,jt=["input","textarea","radio","button","canvas"],Ct=[];function Dt(t){Ln(t,"click",Ht.bind(this,9,t),!0)}function Ht(t,e,n){var a=document.documentElement,r="pageX"in n?Math.round(n.pageX):"clientX"in n?Math.round(n.clientX+a.scrollLeft):null,o="pageY"in n?Math.round(n.pageY):"clientY"in n?Math.round(n.clientY+a.scrollTop):null,i=ue(n),u=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}(i),c=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}(i);0===n.detail&&c&&(r=Math.round(c.x+c.w/2),o=Math.round(c.y+c.h/2));var l=c?Math.max(Math.floor((r-c.x)/c.w*32767),0):0,h=c?Math.max(Math.floor((o-c.y)/c.h*32767),0):0;null!==r&&null!==o&&(Ct.push({time:s(n),event:t,data:{target:i,x:r,y:o,eX:l,eY:h,button:n.button,reaction:Wt(i),context:Xt(u),text:At(i),link:u?u.href:null,hash:null,trust:n.isTrusted?1:0}}),Nt(pe.bind(this,t)))}function At(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 Wt(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(jt.indexOf(e)>=0)return 0}return 1}function Xt(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 Yt(){Ct=[]}function zt(){var t=document.documentElement;It={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},pe(11)}function qt(){It=null}var Rt=[],Pt=null;function Lt(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?ue(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){a=n=a.documentElement}var r=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),i={time:s(t),event:10,data:{target:a,x:r,y:o}};if((null!==t||0!==r||0!==o)&&null!==r&&null!==o){var u=Rt.length,c=u>1?Rt[u-2]:null;c&&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}(c,i)&&Rt.pop(),Rt.push(i),q(Pt),Pt=z(Ut,500,10)}}function Ut(t){Nt(pe.bind(this,t))}var Vt,Jt,Bt=[];function Zt(t){Bt.push({time:s(t),event:39,data:{target:ue(t)}}),Nt(pe.bind(this,39))}function Gt(){Bt=[]}function Ft(t){Vt={name:t.type},pe(26,s(t)),ua()}function Kt(){Vt=null}function Qt(t){void 0===t&&(t=null),Jt={visible:"visibilityState"in document?document.visibilityState:"default"},pe(28,s(t))}function $t(){Jt=null}function te(t){!function(t){Ln(t===document?window:t,"scroll",Lt,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Dt(t),function(t){Ln(t,"submit",Zt,!0)}(t))}var ee=Object.freeze({__proto__:null,observe:te,start:function(){ge=[],me(),Yt(),Ln(window,"resize",zt),zt(),Ln(document,"visibilitychange",Qt),Qt(),Rt=[],Lt(),Gt(),Ln(window,"pagehide",Ft)},stop:function(){ge=[],me(),Yt(),qt(),$t(),q(Pt),Rt=[],Gt(),Kt()}}),ne=[],ae=1,re=null;function oe(){return!1}function ie(){}function ue(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function ce(t){var e={id:0,hash:null,privacy:5,node:t};return t&&(e.id=re.has(t)?re.get(t):he(t)),e}function se(){re=new WeakMap}function le(t){var e={},n=t.attributes;if(n&&n.length>0)for(var a=0;a<n.length;a++)e[n[a].name]=n[a].value;return e}function he(t){return null===t?null:re.has(t)?re.get(t):(re.set(t,ae),ae++)}function fe(t,e,n){if(t&&n&&n.tag){var a=he(t),r=e?re.get(e):null,o=t.previousSibling?re.get(t.previousSibling):null;ne.push({id:a,parent:r,previous:o,children:[],data:n,selector:null,hash:null,region:null,metadata:{active:!0,suspend:!1,privacy:5,position:null,fraud:null,size:null}})}}var de=Object.freeze({__proto__:null,compute:function(){},hashText:ie,iframe:oe,metadata:ce,offset:function(){return{x:0,y:0}},snapshot:function(){ne=[],function(t){var e=[t];for(;e.length>0;){for(var n=null,a=null,r=null,o=e.shift(),i=o.firstChild,u=o.parentElement?o.parentElement:o.parentNode?o.parentNode:null;i;)e.push(i),i=i.nextSibling;switch(o.nodeType){case Node.DOCUMENT_TYPE_NODE:var c=o;a="*D",n={name:c.name,publicId:c.publicId,systemId:c.systemId};break;case Node.TEXT_NODE:r=o.nodeValue,a=re.get(u)?"*T":a;break;case Node.ELEMENT_NODE:var s=o;n=le(s),a=["NOSCRIPT","SCRIPT","STYLE"].indexOf(s.tagName)<0?s.tagName:a}fe(o,u,{tag:a,attributes:n,value:r})}}(document),vt(43)},start:function(){se(),wt(),he(document.documentElement),te(document)},stop:function(){se(),yt()},target:ue,get values(){return ne}});function pe(t,e){return void 0===e&&(e=null),it(this,void 0,void 0,(function(){var n,a,r,o,i,u,c,l,h,f,d,p,g,y,w,b,k,_,x,O,E,T,S,I,j,C,D,H,A,W,X;return ut(this,(function(Y){switch(n=e||s(),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,o=bt;r<o.length;r++)W=o[r],(i=ce(W.data.target,W.event)).id>0&&((a=[W.time,W.event]).push(i.id),a.push(W.data.x),a.push(W.data.y),Se(a),M(W.event,W.data.x,W.data.y));break;case 9:for(u=0,c=Ct;u<c.length;u++)W=c[u],l=ce(W.data.target,W.event,W.data.text),a=[W.time,W.event],h=l.hash?l.hash.join("."):"",a.push(l.id),a.push(W.data.x),a.push(W.data.y),a.push(W.data.eX),a.push(W.data.eY),a.push(W.data.button),a.push(W.data.reaction),a.push(W.data.context),a.push(v(W.data.text,"click",l.privacy)),a.push(m(W.data.link)),a.push(h),a.push(W.data.trust),Se(a),ye(W.time,W.event,h,W.data.x,W.data.y,W.data.reaction,W.data.context);Yt();break;case 38:for(f=0,d=bt;f<d.length;f++)W=d[f],a=[W.time,W.event],(D=ce(W.data.target,W.event)).id>0&&(a.push(D.id),a.push(W.data.action),Se(a));break;case 11:p=It,a.push(p.width),a.push(p.height),M(t,p.width,p.height),qt(),Se(a);break;case 26:g=Vt,a.push(g.name),Kt(),Se(a);break;case 27:for(y=0,w=bt;y<w.length;y++)W=w[y],b=ce(W.data.target,W.event,W.data.value),(a=[W.time,W.event]).push(b.id),a.push(v(W.data.value,"input",b.privacy)),Se(a);break;case 21:(k=kt)&&(_=ce(k.start),x=ce(k.end),a.push(_.id),a.push(k.startOffset),a.push(x.id),a.push(k.endOffset),Se(a));break;case 10:for(O=0,E=Rt;O<E.length;O++)W=E[O],(T=ce(W.data.target,W.event)).id>0&&((a=[W.time,W.event]).push(T.id),a.push(W.data.x),a.push(W.data.y),Se(a),M(W.event,W.data.x,W.data.y));Rt=[];break;case 42:for(S=0,I=bt;S<I.length;S++)W=I[S],a=[W.time,W.event],(D=ce(W.data.target,W.event)).id>0&&((a=[W.time,W.event]).push(D.id),a.push(W.data.type),a.push(v(W.data.value,"change",D.privacy)),a.push(v(W.data.checksum,"checksum",D.privacy)),Se(a));break;case 39:for(j=0,C=Bt;j<C.length;j++)W=C[j],a=[W.time,W.event],(D=ce(W.data.target,W.event)).id>0&&(a.push(D.id),Se(a));Gt();break;case 22:for(H=0,A=ve;H<A.length;H++)W=A[H],(a=[W.time,W.event]).push(W.data.type),a.push(W.data.hash),a.push(W.data.x),a.push(W.data.y),a.push(W.data.reaction),a.push(W.data.context),Se(a,!1);me();break;case 28:X=Jt,a.push(X.visible),Se(a),N(n,X.visible),$t()}return[2]}))}))}var ge=[],ve=[];function me(){ve=[]}function ye(t,e,n,a,r,o,i){void 0===o&&(o=1),void 0===i&&(i=0),ge.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:o,context:i}}),M(e,a,r)}var we,be,ke,_e,xe,Oe=0,Ee=0,Me=null,Te=0;function Ne(){_e=!0,Oe=0,Ee=0,Te=0,we=[],be=[],ke={},xe=null}function Se(t,e){if(void 0===e&&(e=!0),_e){var n=s(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:Oe+=r.length;case 37:case 6:case 43:Ee+=r.length,we.push(r);break;default:be.push(r)}W(25);var o=function(){var t=!1===i.lean&&Oe>0?100:An.sequence*i.delay;return"string"==typeof i.upload?Math.max(Math.min(t,3e4),100):i.delay}();n-Te>2*o&&(q(Me),Me=null),e&&null===Me&&(25!==a&&U(),Me=z(je,o),Te=n,on(Ee))}}function Ie(){q(Me),je(!0),Oe=0,Ee=0,Te=0,we=[],be=[],ke={},xe=null,_e=!1}function je(t){return void 0===t&&(t=!1),it(this,void 0,void 0,(function(){var e,n,a,r,o,u,c,s;return ut(this,(function(l){switch(l.label){case 0:return Me=null,(e=!1===i.lean&&Ee>0&&(Ee<1048576||An.sequence>0))&&Y(1,1),function(){var t=[];ve=[];for(var e=An.start+An.duration,n=Math.max(e-2e3,0),a=0,r=ge;a<r.length;a++){var o=r[a];o.time>=n&&(o.time<=e&&ve.push(o),t.push(o))}ge=t,pe(22)}(),gt(),n=!0===t,a=JSON.stringify(Yn(n)),r="[".concat(be.join(),"]"),o=e?"[".concat(we.join(),"]"):"",u=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:o}),n?(s=null,[3,3]):[3,1];case 1:return[4,st(u)];case 2:s=l.sent(),l.label=3;case 3:return X(2,(c=s)?c.length:u.length),Ce(u,c,An.sequence,n),be=[],e&&(we=[],Ee=0,Oe=0),[2]}}))}))}function Ce(t,e,n,a){if(void 0===a&&(a=!1),"string"==typeof i.upload){var r=i.upload,o=!1;if(a&&"sendBeacon"in navigator)try{(o=navigator.sendBeacon.bind(navigator)(r,t))&&He(n)}catch(t){}if(!1===o){n in ke?ke[n].attempts++:ke[n]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",r,!0),u.timeout=15e3,u.ontimeout=function(){qn(new Error("".concat("Timeout"," : ").concat(r)))},null!==n&&(u.onreadystatechange=function(){Rn(De)(u,n)}),u.withCredentials=!0,e?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(e)):u.send(t)}}else if(i.upload){(0,i.upload)(t),He(n)}}function De(t,e){var n=ke[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?un(6):(0===t.status&&(i.upload=i.fallback?i.fallback:i.upload),Ce(n.data,null,e)):(xe={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&an(2),200===t.status&&t.responseText&&function(t){for(var e=t&&t.length>0?t.split("\n"):[],n=0,a=e;n<a.length;n++){var r=a[n],o=r&&r.length>0?r.split(/ (.*)/):[""];switch(o[0]){case"END":un(6);break;case"UPGRADE":Q("Auto");break;case"ACTION":i.action&&o.length>1&&i.action(o[1]);break;case"EXTRACT":o.length>1&&Ze(o[1])}}}(t.responseText),0===t.status&&(Ce(n.data,null,e,!0),un(3)),t.status>=200&&t.status<=208&&He(e),delete ke[e]))}function He(t){1===t&&Mn()}var Ae,We={};function Xe(t){var e=t.error||t;return e.message in We||(We[e.message]=0),We[e.message]++>=5||e&&e.message&&(Ae={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},Ye(31)),!0}function Ye(t){return it(this,void 0,void 0,(function(){var e;return ut(this,(function(n){switch(e=[s(),t],t){case 31:e.push(Ae.message),e.push(Ae.line),e.push(Ae.column),e.push(Ae.stack),e.push(m(Ae.source)),Se(e);break;case 33:ze&&(e.push(ze.code),e.push(ze.name),e.push(ze.message),e.push(ze.stack),e.push(ze.severity),Se(e,!1))}return[2]}))}))}var ze,qe={};function Re(t,e,n,a,r){void 0===n&&(n=null),void 0===a&&(a=null),void 0===r&&(r=null);var o=n?"".concat(n,"|").concat(a):"";t in qe&&qe[t].indexOf(o)>=0||(ze={code:t,name:n,message:a,stack:r,severity:e},t in qe?qe[t].push(o):qe[t]=[o],Ye(33))}var Pe,Le={},Ue=[],Ve={},Je={};function Be(){Ke()}function Ze(t){try{var e=t&&t.length>0?t.split(/ (.*)/):[""],n=parseInt(e[0]),a=e.length>1?JSON.parse(e[1]):{};for(var r in Ve[n]={},Je[n]={},a){var o=parseInt(r),i=a[r];switch(i.startsWith("~")?0:2){case 0:var u=i.substring(1,i.length);Ve[n][o]=tn(u);break;case 2:Je[n][o]=i}}}catch(t){Re(8,1,t?t.name:null)}}function Ge(t){return JSON.parse(JSON.stringify(t))}function Fe(){try{for(var t in Ve){var e=parseInt(t);if(!(e in Ue)){var n=Ve[e];for(var a in n){var r=parseInt(a),o=(l=en(Ge(n[r])))?JSON.stringify(l).substring(0,1e4):l;o&&Qe(e,r,o)}var i=Je[e];for(var u in i){var c=parseInt(u),s=document.querySelectorAll(i[c]);if(s)Qe(e,c,Array.from(s).map((function(t){return t.innerText})).join("<SEP>").substring(0,1e4))}}}}catch(t){Re(5,1,t?t.name:null)}var l;an(40)}function Ke(){Le={},Ue=[],Ve={},Je={}}function Qe(t,e,n){t in Le||(Le[t]=[],Ue.push(t)),Le[t].push([e,n])}function $e(){Ke()}function tn(t){for(var e=[],n=t.split(".");n.length>0;){var a=n.shift(),r=a.indexOf("["),o=a.indexOf("{"),i=a.indexOf("}");e.push({name:r>0?a.substring(0,r):o>0?a.substring(0,o):a,type:r>0?1:o>0?2:3,condition:o>0?a.substring(o+1,i):null})}return e}function en(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&&nn(r,a.condition))n=en(t,r);else if(Array.isArray(r)){for(var o=[],i=0,u=r;i<u.length;i++){var c=u[i];if(nn(c,a.condition)){var s=en(t,c);s&&o.push(s)}}n=o}return n}return null}function nn(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function an(t){var e=[s(),t];switch(t){case 4:var n=_;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),Se(e,!1)),E();break;case 25:e.push(D.gap),Se(e);break;case 35:e.push(Pe.check),Se(e,!1);break;case 3:e.push(K.key),Se(e);break;case 2:e.push(xe.sequence),e.push(xe.attempts),e.push(xe.status),Se(e,!1);break;case 24:e.push(j.key),e.push(j.value),Se(e);break;case 34:var a=Object.keys(tt);if(a.length>0){for(var r=0,o=a;r<o.length;r++){var i=o[r];e.push(i),e.push(tt[i])}ot(),Se(e,!1)}break;case 0:var u=Object.keys(A);if(u.length>0){for(var c=0,l=u;c<l.length;c++){var h=l[c],f=parseInt(h,10);e.push(f),e.push(Math.round(A[h]))}A={},Se(e,!1)}break;case 1:var d=Object.keys(hn);if(d.length>0){for(var p=0,g=d;p<g.length;p++){var v=g[p];f=parseInt(v,10);e.push(f),e.push(hn[v])}vn(),Se(e,!1)}break;case 36:var m=Object.keys(B);if(m.length>0){for(var y=0,w=m;y<w.length;y++){var b=w[y];f=parseInt(b,10);e.push(f),e.push([].concat.apply([],B[b]))}G(),Se(e,!1)}break;case 40:for(var k=0,x=Ue;k<x.length;k++){b=x[k];e.push(b),e.push([].concat.apply([],Le[b]))}Ke(),Se(e,!1)}}function rn(){Pe={check:0}}function on(t){if(0===Pe.check){var e=Pe.check;e=An.sequence>=128?1:e,e=s()>72e5?2:e,(e=t>10485760?2:e)!==Pe.check&&un(e)}}function un(t){Pe.check=t,En(),ua()}function cn(){0!==Pe.check&&an(35)}function sn(){Pe=null}var ln=null,hn=null;function fn(){ln={},hn={}}function dn(){ln={},hn={}}function pn(t,e){e&&(e="".concat(e),t in ln||(ln[t]=[]),ln[t].indexOf(e)<0&&(ln[t].push(e),t in hn||(hn[t]=[]),hn[t].push(e),ln[t].length>128&&un(5)))}function gn(){an(1)}function vn(){hn={}}var mn=null,yn=[],wn=null;function bn(){wn=null;var t,e=navigator&&"userAgent"in navigator?navigator.userAgent:"",n=document&&document.title?document.title:"",a=function(){var t={session:Sn(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=Cn("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-In(n[1])<18e5&&(t.session=n[0],t.count=In(n[2])+1,t.upgrade=In(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),r=jn(),o=i.projectId||function(t,e){void 0===e&&(e=null);for(var n,a=5381,r=a,o=0;o<t.length;o+=2)a=(a<<5)+a^t.charCodeAt(o),o+1<t.length&&(r=(r<<5)+r^t.charCodeAt(o+1));return n=Math.abs(a+11579*r),(e?n%Math.pow(2,e):n).toString(36)}(location.host);mn={projectId:o,userId:r.id,sessionId:a.session,pageNum:a.count},i.lean=i.track&&null!==a.upgrade?0===a.upgrade:i.lean,i.upload=i.track&&"string"==typeof i.upload&&a.upload&&a.upload.length>"https://".length?a.upload:i.upload,pn(0,e),pn(3,n),pn(1,m(location.href)),pn(2,document.referrer),pn(15,function(){var t=Sn();if(i.track&&Tn(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),pn(16,document.documentElement.lang),pn(17,document.dir),pn(26,"".concat(window.devicePixelRatio)),Y(0,a.ts),Y(1,0),navigator&&(pn(9,navigator.language),Y(33,navigator.hardwareConcurrency),Y(32,navigator.maxTouchPoints),Y(34,Math.round(navigator.deviceMemory)),(t=navigator.userAgentData)&&t.getHighEntropyValues?t.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;pn(22,t.platform),pn(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){pn(24,t.name+"~"+t.version)})),pn(25,t.model),Y(27,t.mobile?1:0)})):pn(22,navigator.platform)),screen&&(Y(14,Math.round(screen.width)),Y(15,Math.round(screen.height)),Y(16,Math.round(screen.colorDepth)));for(var u=0,c=i.cookies;u<c.length;u++){var s=c[u],l=Cn(s);l&&et(s,l)}Nn(r)}function kn(){wn=null,mn=null}function _n(t,e){void 0===e&&(e=!0),mn&&!1===e&&t(mn,!i.lean),yn.push({callback:t,wait:e})}function xn(){return mn?[mn.userId,mn.sessionId,mn.pageNum].join("."):""}function On(){na()&&(i.track=!0,Nn(jn(),1))}function En(){Dn("_clsk","",0)}function Mn(){var t=Math.round(Date.now()),e=i.upload&&"string"==typeof i.upload?i.upload.replace("https://",""):"",n=i.lean?0:1;!function(t){yn.length>0&&yn.forEach((function(e){!e.callback||e.wait&&!t||e.callback(mn,!i.lean)}))}(n),Dn("_clsk",[mn.sessionId,t,mn.pageNum,n,e].join("|"),1)}function Tn(t,e){try{return!!t[e]}catch(t){return!1}}function Nn(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)&&Dn("_clck",[mn.userId,1,n.toString(36),e].join("|"),365)}function Sn(){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 In(t,e){return void 0===e&&(e=10),parseInt(t,e)}function jn(){var t={id:Sn(),expiry:null,consent:0},e=Cn("_clck");if(e&&e.length>0){for(var n=e.split("|"),a=0,r=0,o=document.cookie.split(";");r<o.length;r++){a+="_clck"===o[r].split("=")[0].trim()?1:0}if(1===n.length||a>1){var u="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(u),document.cookie="".concat("_clsk","=").concat(u)}n.length>2&&(t.expiry=In(n[2],36)),n.length>3&&1===In(n[3])&&(t.consent=1),i.track=i.track||1===t.consent,t.id=i.track?n[0]:t.id}return t}function Cn(t){if(Tn(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 Dn(t,e,n){if(i.track&&(navigator&&navigator.cookieEnabled||Tn(document,"cookie"))){var a=new Date;a.setDate(a.getDate()+n);var r=a?"expires="+a.toUTCString():"",o="".concat(t,"=").concat(e).concat(";").concat(r).concat(";path=/");try{if(null===wn){for(var u=location.hostname?location.hostname.split("."):[],c=u.length-1;c>=0;c--)if(wn=".".concat(u[c]).concat(wn||""),c<u.length-1&&(document.cookie="".concat(o).concat(";").concat("domain=").concat(wn),Cn(t)===e))return;wn=""}}catch(t){wn=""}document.cookie=wn?"".concat(o).concat(";").concat("domain=").concat(wn):o}}var Hn,An=null;function Wn(){var t=mn;An={version:l,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function Xn(){An=null}function Yn(t){return An.start=An.start+An.duration,An.duration=s()-An.start,An.sequence++,An.upload=t&&"sendBeacon"in navigator?1:0,An.end=t?1:0,[An.version,An.sequence,An.start,An.duration,An.projectId,An.userId,An.sessionId,An.pageNum,An.upload,An.end]}function zn(){Hn=[]}function qn(t){if(Hn&&-1===Hn.indexOf(t.message)){var e=i.report;if(e&&e.length>0){var n={v:An.version,p:An.projectId,u:An.userId,s:An.sessionId,n:An.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e,!0),a.send(JSON.stringify(n)),Hn.push(t.message)}}return t}function Rn(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw qn(t)}var n=performance.now()-e;X(4,n),n>30&&(W(7),Y(6,n))}}var Pn=[];function Ln(t,e,n,a){void 0===a&&(a=!1),n=Rn(n);try{t[u("addEventListener")](e,n,a),Pn.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function Un(){for(var t=0,e=Pn;t<e.length;t++){var n=e[t];try{n.target[u("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}Pn=[]}var Vn=null,Jn=null,Bn=null,Zn=0;function Gn(){return!(Zn++>20)||(Re(4,0),!1)}function Fn(){Zn=0,Bn!==Qn()&&(ua(),window.setTimeout(Kn,250))}function Kn(){ia(),Y(29,1)}function Qn(){return location.href?location.href.replace(location.hash,""):location.href}var $n=!1;function ta(){$n=!0,c=performance.now(),Tt(),Un(),zn(),Bn=Qn(),Zn=0,Ln(window,"popstate",Fn),null===Vn&&(Vn=history.pushState,history.pushState=function(){Vn.apply(this,arguments),na()&&Gn()&&Fn()}),null===Jn&&(Jn=history.replaceState,history.replaceState=function(){Jn.apply(this,arguments),na()&&Gn()&&Fn()})}function ea(){Bn=null,Zn=0,zn(),Un(),Tt(),c=0,$n=!1}function na(){return $n}function aa(t){if(null===t||$n)return!1;for(var e in t)e in i&&(i[e]=t[e]);return!0}function ra(){ia(),C("clarity","restart")}var oa=[Object.freeze({__proto__:null,start:function(){!function(){Y(26,navigator.webdriver?1:0);try{Y(31,window.top==window.self?1:2)}catch(t){Y(31,0)}}(),Ln(window,"error",Xe),We={},qe={}},stop:function(){qe={}}}),de,ee,_t];function ia(t){void 0===t&&(t=null),function(){try{return!1===$n&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(aa(t),ta(),dt(),oa.forEach((function(t){return Rn(t.start)()})),null===t&&ha())}function ua(){na()&&(oa.slice().reverse().forEach((function(t){return Rn(t.stop)()})),pt(),ea(),void 0!==sa&&(sa[la]=function(){(sa[la].q=sa[la].q||[]).push(arguments)}))}var ca=Object.freeze({__proto__:null,consent:On,event:C,hashText:ie,identify:nt,metadata:_n,pause:function(){na()&&(C("clarity","pause"),null===Et&&(Et=new Promise((function(t){Mt=t}))))},resume:function(){na()&&(Et&&(Mt(),Et=null,null===Ot&&St()),C("clarity","resume"))},set:et,start:ia,stop:ua,upgrade:Q,version:l}),sa=window,la="clarity";function ha(){if(void 0!==sa){if(sa[la]&&sa[la].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=sa[la]&&sa[la].q||[];for(sa[la]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return ca[t].apply(ca,e)},sa[la].v=l;t.length>0;)sa[la].apply(sa,t.shift())}}ha()}();
|
|
1
|
+
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return Ie},get start(){return Ne},get stop(){return Se},get track(){return xe}}),e=Object.freeze({__proto__:null,get clone(){return Fe},get compute(){return Ke},get data(){return Le},get keys(){return Ue},get reset(){return Qe},get start(){return Ze},get stop(){return tn},get trigger(){return Ge},get update(){return $e}}),n=Object.freeze({__proto__:null,get check(){return un},get compute(){return sn},get data(){return Pe},get start(){return on},get stop(){return ln},get trigger(){return cn}}),a=Object.freeze({__proto__:null,get compute(){return vn},get data(){return hn},get log(){return gn},get reset(){return mn},get start(){return dn},get stop(){return pn},get updates(){return fn}}),r=Object.freeze({__proto__:null,get callbacks(){return bn},get clear(){return Mn},get consent(){return En},get data(){return yn},get id(){return On},get metadata(){return xn},get save(){return Tn},get start(){return kn},get stop(){return _n}}),i=Object.freeze({__proto__:null,get data(){return An},get envelope(){return Yn},get start(){return Xn},get stop(){return zn}}),o={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null};function u(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function s(t){void 0===t&&(t=null);var e=t&&t.timeStamp>0?t.timeStamp:performance.now();return Math.max(Math.round(e-c),0)}var l="0.7.7";var h=/\S/gi,f=!0,d=null,p=null,g=null;function v(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;k();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=f&&null!==g?s.match(g)?s:s.replace(p,"▪").replace(d,"▫"):b(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 w(t)}return t;case 2:case 3:switch(e){case"*T":case"data-":return a?y(t):b(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":case"change":return w(t);case"placeholder":return b(t)}break;case 4:switch(e){case"*T":case"data-":return a?y(t):b(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}break;case 5:switch(e){case"*T":case"data-":return function(t){return k(),t.replace(p,"▪").replace(d,"▫")}(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":case"src":case"srcset":case"alt":case"title":return""}}return t}function m(t){var e=o.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 y(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 b(t){return t.replace(h,"•")}function w(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}function k(){if(f&&null===d)try{d=new RegExp("\\p{N}","gu"),p=new RegExp("\\p{L}","gu"),g=new RegExp("\\p{Sc}","gu")}catch(t){f=!1}}var _=null,x=null,O=!1;function E(){O&&(_={time:s(),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}O=!0}function T(t){x.activityTime=t}function N(t,e){x.visible="visible"===e?1:0,x.visible||T(t),O=!0}function I(){O&&rn(4)}var S=Object.freeze({__proto__:null,activity:T,compute:I,reset:E,start:function(){O=!1,E()},get state(){return _},stop:function(){E()},track:M,visibility:N}),j=null;function C(t,e){aa()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(j={key:t,value:e},rn(24))}var D,H=null,W=null;function A(t){t in H||(H[t]=0),t in W||(W[t]=0),H[t]++,W[t]++}function X(t,e){null!==e&&(t in H||(H[t]=0),t in W||(W[t]=0),H[t]+=e,W[t]+=e)}function z(t,e){null!==e&&!1===isNaN(e)&&(t in H||(H[t]=0),(e>H[t]||0===H[t])&&(W[t]=e,H[t]=e))}function Y(t,e,n){return window.setTimeout(Pn(t),e,n)}function q(t){return window.clearTimeout(t)}var R=0,P=0,L=null;function U(){L&&q(L),L=Y(V,P),R=s()}function V(){var t=s();D={gap:t-R},rn(25),D.gap<3e5?L=Y(V,P):ta&&(C("clarity","suspend"),ca(),["mousemove","touchstart"].forEach((function(t){return Un(document,t,ia)})),["resize","scroll","pageshow"].forEach((function(t){return Un(window,t,ia)})))}var J=Object.freeze({__proto__:null,get data(){return D},reset:U,start:function(){P=6e4,R=0},stop:function(){q(L),R=0,P=0}}),B=null;function Z(){rn(36)}function G(){B={}}var F=Object.freeze({__proto__:null,compute:Z,get data(){return B},reset:G,start:function(){B={}},stop:function(){B={}},track:function(t,e){if(t in B){var n=B[t],a=n[n.length-1];e-a[0]>100?B[t].push([e,0]):a[1]=e-a[0]}else B[t]=[[e,0]]}}),K=null;function Q(t){aa()&&o.lean&&(o.lean=!1,K={key:t},Tn(),o.upgrade&&o.upgrade(t),rn(3))}var $=Object.freeze({__proto__:null,get data(){return K},start:function(){!o.lean&&o.upgrade&&o.upgrade("Config"),K=null},stop:function(){K=null},upgrade:Q}),tt=null;function et(t,e){at(t,"string"==typeof e?[e]:e)}function nt(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),at("userId",[t]),at("sessionId",[e]),at("pageId",[n])}function at(t,e){if(aa()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in tt?tt[t]:[]),a=0;a<e.length;a++)"string"==typeof e[a]&&e[a].length<255&&n.push(e[a]);tt[t]=n}}function rt(){rn(34)}function it(){tt={}}function ot(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 ut(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 ct="CompressionStream"in window;function st(t){return ot(this,void 0,void 0,(function(){var e,n;return ut(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),ct?(e=new ReadableStream({start:function(e){return ot(this,void 0,void 0,(function(){return ut(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,lt(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 lt(t){return ot(this,void 0,void 0,(function(){var e,n,a,r,i;return ut(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,ft=[S,a,Object.freeze({__proto__:null,compute:rt,get data(){return tt},identify:nt,reset:it,set:et,start:function(){it()},stop:function(){it()}}),n,F,r,i,t,J,$,e];function dt(){H={},W={},A(5),ft.forEach((function(t){return Pn(t.start)()}))}function pt(){ft.slice().reverse().forEach((function(t){return Pn(t.stop)()})),H={},W={}}function gt(){rt(),I(),vn(),rn(0),Z(),sn(),Ke()}function vt(t){return ot(this,void 0,void 0,(function(){var e,n,a,r,i,o,u,c,l,h,f,d,p;return ut(this,(function(g){switch(e=s(),n=[e,t],t){case 8:a=ht,n.push(a.width),n.push(a.height),M(t,a.width,a.height),Ie(n);break;case 43:if((r=ne).length>0){for(i=0,o=r;i<o.length;i++)for(u=o[i],c=u.metadata.privacy,l=u.data,h=0,f=["tag","attributes","value"];h<f.length;h++)if(l[d=f[h]])switch(d){case"tag":n.push(u.id),u.parent&&n.push(u.parent),u.previous&&n.push(u.previous),n.push(l[d]);break;case"attributes":for(p in l[d])void 0!==l[d][p]&&n.push(mt(p,l[d][p],c));break;case"value":n.push(v(l[d],l.tag,c))}Ie(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}(n),!0)}}return[2]}))}))}function mt(t,e,n){return"".concat(t,"=").concat(v(e,0===t.indexOf("data-")?"data-":t,n))}function yt(){ht=null}function bt(){var t,e,n,a,r,i,o,u,c,s,l,h,f,d,p,g;yt(),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,h=t?t.offsetHeight:null,f=e?e.clientHeight:null,d=e?e.scrollHeight:null,p=e?e.offsetHeight:null,g=Math.max(s,l,h,f,d,p),null!==ht&&c===ht.width&&g===ht.height||null===c||null===g||(ht={width:c,height:g},vt(8))}var wt=[],kt=null;var _t=Object.freeze({__proto__:null,compute:function(){},data:kt,log:function(){},observe:function(){},reset:function(){},start:function(){},state:wt,stop:function(){}}),xt=[],Ot=null,Et=null,Mt=null;function Tt(){xt=[],Ot=null,Et=null}function Nt(t,e){return void 0===e&&(e=0),ot(this,void 0,void 0,(function(){var n,a,r;return ut(this,(function(i){for(n=0,a=xt;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){xt[1===e?"unshift":"push"]({task:t,resolve:n,id:On()})})),null===Ot&&null===Et&&It(),[2,r]}))}))}function It(){var t=xt.shift();t&&(Ot=t,t.task().then((function(){t.id===On()&&(t.resolve(),Ot=null,It())})).catch((function(e){t.id===On()&&(e&&Re(0,1,e.name,e.message,e.stack),Ot=null,It())})))}var St,jt=["input","textarea","radio","button","canvas"],Ct=[];function Dt(t){Un(t,"click",Ht.bind(this,9,t),!0)}function Ht(t,e,n){var a=document.documentElement,r="pageX"in n?Math.round(n.pageX):"clientX"in n?Math.round(n.clientX+a.scrollLeft):null,i="pageY"in n?Math.round(n.pageY):"clientY"in n?Math.round(n.clientY+a.scrollTop):null,o=ue(n),u=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}(o),c=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}(o);0===n.detail&&c&&(r=Math.round(c.x+c.w/2),i=Math.round(c.y+c.h/2));var l=c?Math.max(Math.floor((r-c.x)/c.w*32767),0):0,h=c?Math.max(Math.floor((i-c.y)/c.h*32767),0):0;null!==r&&null!==i&&(Ct.push({time:s(n),event:t,data:{target:o,x:r,y:i,eX:l,eY:h,button:n.button,reaction:At(o),context:Xt(u),text:Wt(o),link:u?u.href:null,hash:null,trust:n.isTrusted?1:0}}),Nt(pe.bind(this,t)))}function Wt(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 At(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(jt.indexOf(e)>=0)return 0}return 1}function Xt(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 zt(){Ct=[]}function Yt(){var t=document.documentElement;St={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},pe(11)}function qt(){St=null}var Rt=[],Pt=null;function Lt(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?ue(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){a=n=a.documentElement}var r=a===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(a.scrollLeft),i=a===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(a.scrollTop),o={time:s(t),event:10,data:{target:a,x:r,y:i}};if((null!==t||0!==r||0!==i)&&null!==r&&null!==i){var u=Rt.length,c=u>1?Rt[u-2]:null;c&&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}(c,o)&&Rt.pop(),Rt.push(o),q(Pt),Pt=Y(Ut,500,10)}}function Ut(t){Nt(pe.bind(this,t))}var Vt,Jt,Bt=[];function Zt(t){Bt.push({time:s(t),event:39,data:{target:ue(t)}}),Nt(pe.bind(this,39))}function Gt(){Bt=[]}function Ft(t){Vt={name:t.type},pe(26,s(t)),ca()}function Kt(){Vt=null}function Qt(t){void 0===t&&(t=null),Jt={visible:"visibilityState"in document?document.visibilityState:"default"},pe(28,s(t))}function $t(){Jt=null}function te(t){!function(t){Un(t===document?window:t,"scroll",Lt,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Dt(t),function(t){Un(t,"submit",Zt,!0)}(t))}var ee=Object.freeze({__proto__:null,observe:te,start:function(){ge=[],me(),zt(),Un(window,"resize",Yt),Yt(),Un(document,"visibilitychange",Qt),Qt(),Rt=[],Lt(),Gt(),Un(window,"pagehide",Ft)},stop:function(){ge=[],me(),zt(),qt(),$t(),q(Pt),Rt=[],Gt(),Kt()}}),ne=[],ae=1,re=null;function ie(){return!1}function oe(){}function ue(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function ce(t){var e={id:0,hash:null,privacy:5,node:t};return t&&(e.id=re.has(t)?re.get(t):he(t)),e}function se(){re=new WeakMap}function le(t){var e={},n=t.attributes;if(n&&n.length>0)for(var a=0;a<n.length;a++)e[n[a].name]=n[a].value;return e}function he(t){return null===t?null:re.has(t)?re.get(t):(re.set(t,ae),ae++)}function fe(t,e,n){if(t&&n&&n.tag){var a=he(t),r=e?re.get(e):null,i=t.previousSibling?re.get(t.previousSibling):null;ne.push({id:a,parent:r,previous:i,children:[],data:n,selector:null,hash:null,region:null,metadata:{active:!0,suspend:!1,privacy:5,position:null,fraud:null,size:null}})}}var de=Object.freeze({__proto__:null,compute:function(){},hashText:oe,iframe:ie,metadata:ce,offset:function(){return{x:0,y:0}},snapshot:function(){ne=[],function(t){var e=[t];for(;e.length>0;){for(var n=null,a=null,r=null,i=e.shift(),o=i.firstChild,u=i.parentElement?i.parentElement:i.parentNode?i.parentNode:null;o;)e.push(o),o=o.nextSibling;switch(i.nodeType){case Node.DOCUMENT_TYPE_NODE:var c=i;a="*D",n={name:c.name,publicId:c.publicId,systemId:c.systemId};break;case Node.TEXT_NODE:r=i.nodeValue,a=re.get(u)?"*T":a;break;case Node.ELEMENT_NODE:var s=i;n=le(s),a=["NOSCRIPT","SCRIPT","STYLE"].indexOf(s.tagName)<0?s.tagName:a}fe(i,u,{tag:a,attributes:n,value:r})}}(document),vt(43)},start:function(){se(),bt(),he(document.documentElement),te(document)},stop:function(){se(),yt()},target:ue,get values(){return ne}});function pe(t,e){return void 0===e&&(e=null),ot(this,void 0,void 0,(function(){var n,a,r,i,o,u,c,l,h,f,d,p,g,y,b,w,k,_,x,O,E,T,I,S,j,C,D,H,W,A,X;return ut(this,(function(z){switch(n=e||s(),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=wt;r<i.length;r++)A=i[r],(o=ce(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(o.id),a.push(A.data.x),a.push(A.data.y),Ie(a),M(A.event,A.data.x,A.data.y));break;case 9:for(u=0,c=Ct;u<c.length;u++)A=c[u],l=ce(A.data.target,A.event,A.data.text),a=[A.time,A.event],h=l.hash?l.hash.join("."):"",a.push(l.id),a.push(A.data.x),a.push(A.data.y),a.push(A.data.eX),a.push(A.data.eY),a.push(A.data.button),a.push(A.data.reaction),a.push(A.data.context),a.push(v(A.data.text,"click",l.privacy)),a.push(m(A.data.link)),a.push(h),a.push(A.data.trust),Ie(a),ye(A.time,A.event,h,A.data.x,A.data.y,A.data.reaction,A.data.context);zt();break;case 38:for(f=0,d=wt;f<d.length;f++)A=d[f],a=[A.time,A.event],(D=ce(A.data.target,A.event)).id>0&&(a.push(D.id),a.push(A.data.action),Ie(a));break;case 11:p=St,a.push(p.width),a.push(p.height),M(t,p.width,p.height),qt(),Ie(a);break;case 26:g=Vt,a.push(g.name),Kt(),Ie(a);break;case 27:for(y=0,b=wt;y<b.length;y++)A=b[y],w=ce(A.data.target,A.event,A.data.value),(a=[A.time,A.event]).push(w.id),a.push(v(A.data.value,"input",w.privacy)),Ie(a);break;case 21:(k=kt)&&(_=ce(k.start),x=ce(k.end),a.push(_.id),a.push(k.startOffset),a.push(x.id),a.push(k.endOffset),Ie(a));break;case 10:for(O=0,E=Rt;O<E.length;O++)A=E[O],(T=ce(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(T.id),a.push(A.data.x),a.push(A.data.y),Ie(a),M(A.event,A.data.x,A.data.y));Rt=[];break;case 42:for(I=0,S=wt;I<S.length;I++)A=S[I],a=[A.time,A.event],(D=ce(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(D.id),a.push(A.data.type),a.push(v(A.data.value,"change",D.privacy)),a.push(v(A.data.checksum,"checksum",D.privacy)),Ie(a));break;case 39:for(j=0,C=Bt;j<C.length;j++)A=C[j],a=[A.time,A.event],(D=ce(A.data.target,A.event)).id>0&&(a.push(D.id),Ie(a));Gt();break;case 22:for(H=0,W=ve;H<W.length;H++)A=W[H],(a=[A.time,A.event]).push(A.data.type),a.push(A.data.hash),a.push(A.data.x),a.push(A.data.y),a.push(A.data.reaction),a.push(A.data.context),Ie(a,!1);me();break;case 28:X=Jt,a.push(X.visible),Ie(a),N(n,X.visible),$t()}return[2]}))}))}var ge=[],ve=[];function me(){ve=[]}function ye(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),ge.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),M(e,a,r)}var be,we,ke,_e,xe,Oe=0,Ee=0,Me=null,Te=0;function Ne(){_e=!0,Oe=0,Ee=0,Te=0,be=[],we=[],ke={},xe=null}function Ie(t,e){if(void 0===e&&(e=!0),_e){var n=s(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:Oe+=r.length;case 37:case 6:case 43:Ee+=r.length,be.push(r);break;default:we.push(r)}A(25);var i=function(){var t=!1===o.lean&&Oe>0?100:An.sequence*o.delay;return"string"==typeof o.upload?Math.max(Math.min(t,3e4),100):o.delay}();n-Te>2*i&&(q(Me),Me=null),e&&null===Me&&(25!==a&&U(),Me=Y(je,i),Te=n,un(Ee))}}function Se(){q(Me),je(!0),Oe=0,Ee=0,Te=0,be=[],we=[],ke={},xe=null,_e=!1}function je(t){return void 0===t&&(t=!1),ot(this,void 0,void 0,(function(){var e,n,a,r,i,u,c,s;return ut(this,(function(l){switch(l.label){case 0:return Me=null,(e=!1===o.lean&&Ee>0&&(Ee<1048576||An.sequence>0))&&z(1,1),function(){var t=[];ve=[];for(var e=An.start+An.duration,n=Math.max(e-2e3,0),a=0,r=ge;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&ve.push(i),t.push(i))}ge=t,pe(22)}(),gt(),n=!0===t,a=JSON.stringify(Yn(n)),r="[".concat(we.join(),"]"),i=e?"[".concat(be.join(),"]"):"",u=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,st(u)];case 2:s=l.sent(),l.label=3;case 3:return X(2,(c=s)?c.length:u.length),Ce(u,c,An.sequence,n),we=[],e&&(be=[],Ee=0,Oe=0),[2]}}))}))}function Ce(t,e,n,a){if(void 0===a&&(a=!1),"string"==typeof o.upload){var r=o.upload,i=!1;if(a&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(r,t))&&He(n)}catch(t){}if(!1===i){n in ke?ke[n].attempts++:ke[n]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",r,!0),u.timeout=15e3,u.ontimeout=function(){Rn(new Error("".concat("Timeout"," : ").concat(r)))},null!==n&&(u.onreadystatechange=function(){Pn(De)(u,n)}),u.withCredentials=!0,e?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(e)):u.send(t)}}else if(o.upload){(0,o.upload)(t),He(n)}}function De(t,e){var n=ke[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?cn(6):(0===t.status&&(o.upload=o.fallback?o.fallback:o.upload),Ce(n.data,null,e)):(xe={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&rn(2),200===t.status&&t.responseText&&function(t){for(var e=t&&t.length>0?t.split("\n"):[],n=0,a=e;n<a.length;n++){var r=a[n],i=r&&r.length>0?r.split(/ (.*)/):[""];switch(i[0]){case"END":cn(6);break;case"UPGRADE":Q("Auto");break;case"ACTION":o.action&&i.length>1&&o.action(i[1]);break;case"EXTRACT":i.length>1&&Ge(i[1])}}}(t.responseText),0===t.status&&(Ce(n.data,null,e,!0),cn(3)),t.status>=200&&t.status<=208&&He(e),delete ke[e]))}function He(t){1===t&&Tn()}var We,Ae={};function Xe(t){var e=t.error||t;return e.message in Ae||(Ae[e.message]=0),Ae[e.message]++>=5||e&&e.message&&(We={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},ze(31)),!0}function ze(t){return ot(this,void 0,void 0,(function(){var e;return ut(this,(function(n){switch(e=[s(),t],t){case 31:e.push(We.message),e.push(We.line),e.push(We.column),e.push(We.stack),e.push(m(We.source)),Ie(e);break;case 33:Ye&&(e.push(Ye.code),e.push(Ye.name),e.push(Ye.message),e.push(Ye.stack),e.push(Ye.severity),Ie(e,!1))}return[2]}))}))}var Ye,qe={};function Re(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 qe&&qe[t].indexOf(i)>=0||(Ye={code:t,name:n,message:a,stack:r,severity:e},t in qe?qe[t].push(i):qe[t]=[i],ze(33))}var Pe,Le={},Ue=new Set,Ve={},Je={},Be={};function Ze(){Qe()}function Ge(t){try{var e=t&&t.length>0?t.split(/ (.*)/):[""],n=parseInt(e[0]),a=e.length>1?JSON.parse(e[1]):{};for(var r in Ve[n]={},Je[n]={},Be[n]={},a){var i=parseInt(r),o=a[r],u=2;switch(o.startsWith("~")?u=0:o.startsWith("!")&&(u=4),u){case 0:var c=o.substring(1,o.length);Ve[n][i]=en(c);break;case 2:Je[n][i]=o;break;case 4:var s=o.substring(1,o.length);Be[n][i]=s}}}catch(t){Re(8,1,t?t.name:null)}}function Fe(t){return JSON.parse(JSON.stringify(t))}function Ke(){try{for(var t in Ve){var e=parseInt(t),n=Ve[e];for(var a in n){var r=parseInt(a),i=(d=nn(Fe(n[r])))?JSON.stringify(d).substring(0,1e4):d;i&&$e(e,r,i)}var o=Je[e];for(var u in o){var c=parseInt(u),s=document.querySelectorAll(o[c]);if(s)$e(e,c,Array.from(s).map((function(t){return t.innerText})).join("<SEP>").substring(0,1e4))}var l=Be[e];for(var h in l){var f=parseInt(h);$e(e,f,(void l[f]).trim().substring(0,1e4))}}Ue.size>0&&rn(40)}catch(t){Re(5,1,t?t.name:null)}var d}function Qe(){Ue.clear()}function $e(t,e,n){var a,r=!1;t in Le||(Le[t]={},r=!0),a=Be[t],0==Object.keys(a).length||e in Le[t]&&Le[t][e]==n||(r=!0),Le[t][e]=n,r&&Ue.add(t)}function tn(){Qe()}function en(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 nn(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&&an(r,a.condition))n=nn(t,r);else if(Array.isArray(r)){for(var i=[],o=0,u=r;o<u.length;o++){var c=u[o];if(an(c,a.condition)){var s=nn(t,c);s&&i.push(s)}}n=i}return n}return null}function an(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function rn(t){var e=[s(),t];switch(t){case 4:var n=_;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),Ie(e,!1)),E();break;case 25:e.push(D.gap),Ie(e);break;case 35:e.push(Pe.check),Ie(e,!1);break;case 3:e.push(K.key),Ie(e);break;case 2:e.push(xe.sequence),e.push(xe.attempts),e.push(xe.status),Ie(e,!1);break;case 24:e.push(j.key),e.push(j.value),Ie(e);break;case 34:var a=Object.keys(tt);if(a.length>0){for(var r=0,i=a;r<i.length;r++){var o=i[r];e.push(o),e.push(tt[o])}it(),Ie(e,!1)}break;case 0:var u=Object.keys(W);if(u.length>0){for(var c=0,l=u;c<l.length;c++){var h=l[c],f=parseInt(h,10);e.push(f),e.push(Math.round(W[h]))}W={},Ie(e,!1)}break;case 1:var d=Object.keys(fn);if(d.length>0){for(var p=0,g=d;p<g.length;p++){var v=g[p];f=parseInt(v,10);e.push(f),e.push(fn[v])}mn(),Ie(e,!1)}break;case 36:var m=Object.keys(B);if(m.length>0){for(var y=0,b=m;y<b.length;y++){var w=b[y];f=parseInt(w,10);e.push(f),e.push([].concat.apply([],B[w]))}G(),Ie(e,!1)}break;case 40:Ue.forEach((function(t){e.push(t);var n=[];for(var a in Le[t]){var r=parseInt(a,10);n.push(r),n.push(Le[t][a])}e.push(n)})),Qe(),Ie(e,!1)}}function on(){Pe={check:0}}function un(t){if(0===Pe.check){var e=Pe.check;e=An.sequence>=128?1:e,e=s()>72e5?2:e,(e=t>10485760?2:e)!==Pe.check&&cn(e)}}function cn(t){Pe.check=t,Mn(),ca()}function sn(){0!==Pe.check&&rn(35)}function ln(){Pe=null}var hn=null,fn=null;function dn(){hn={},fn={}}function pn(){hn={},fn={}}function gn(t,e){e&&(e="".concat(e),t in hn||(hn[t]=[]),hn[t].indexOf(e)<0&&(hn[t].push(e),t in fn||(fn[t]=[]),fn[t].push(e),hn[t].length>128&&cn(5)))}function vn(){rn(1)}function mn(){fn={}}var yn=null,bn=[],wn=null;function kn(){wn=null;var t,e=navigator&&"userAgent"in navigator?navigator.userAgent:"",n=document&&document.title?document.title:"",a=function(){var t={session:Sn(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=Dn("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-jn(n[1])<18e5&&(t.session=n[0],t.count=jn(n[2])+1,t.upgrade=jn(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),r=Cn(),i=o.projectId||function(t,e){void 0===e&&(e=null);for(var n,a=5381,r=a,i=0;i<t.length;i+=2)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)}(location.host);yn={projectId:i,userId:r.id,sessionId:a.session,pageNum:a.count},o.lean=o.track&&null!==a.upgrade?0===a.upgrade:o.lean,o.upload=o.track&&"string"==typeof o.upload&&a.upload&&a.upload.length>"https://".length?a.upload:o.upload,gn(0,e),gn(3,n),gn(1,m(location.href)),gn(2,document.referrer),gn(15,function(){var t=Sn();if(o.track&&Nn(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),gn(16,document.documentElement.lang),gn(17,document.dir),gn(26,"".concat(window.devicePixelRatio)),z(0,a.ts),z(1,0),navigator&&(gn(9,navigator.language),z(33,navigator.hardwareConcurrency),z(32,navigator.maxTouchPoints),z(34,Math.round(navigator.deviceMemory)),(t=navigator.userAgentData)&&t.getHighEntropyValues?t.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;gn(22,t.platform),gn(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){gn(24,t.name+"~"+t.version)})),gn(25,t.model),z(27,t.mobile?1:0)})):gn(22,navigator.platform)),screen&&(z(14,Math.round(screen.width)),z(15,Math.round(screen.height)),z(16,Math.round(screen.colorDepth)));for(var u=0,c=o.cookies;u<c.length;u++){var s=c[u],l=Dn(s);l&&et(s,l)}In(r)}function _n(){wn=null,yn=null}function xn(t,e){void 0===e&&(e=!0);var n=o.lean?0:1;yn&&(n||!1===e)?t(yn,!o.lean):bn.push({callback:t,wait:e})}function On(){return yn?[yn.userId,yn.sessionId,yn.pageNum].join("."):""}function En(){aa()&&(o.track=!0,In(Cn(),1))}function Mn(){Hn("_clsk","",0)}function Tn(){var t=Math.round(Date.now()),e=o.upload&&"string"==typeof o.upload?o.upload.replace("https://",""):"",n=o.lean?0:1;!function(t){bn.length>0&&bn.forEach((function(e){!e.callback||e.wait&&!t||e.callback(yn,!o.lean)}))}(n),Hn("_clsk",[yn.sessionId,t,yn.pageNum,n,e].join("|"),1)}function Nn(t,e){try{return!!t[e]}catch(t){return!1}}function In(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)&&Hn("_clck",[yn.userId,1,n.toString(36),e].join("|"),365)}function Sn(){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 jn(t,e){return void 0===e&&(e=10),parseInt(t,e)}function Cn(){var t={id:Sn(),expiry:null,consent:0},e=Dn("_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 u="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(u),document.cookie="".concat("_clsk","=").concat(u)}n.length>2&&(t.expiry=jn(n[2],36)),n.length>3&&1===jn(n[3])&&(t.consent=1),o.track=o.track||1===t.consent,t.id=o.track?n[0]:t.id}return t}function Dn(t){if(Nn(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 Hn(t,e,n){if(o.track&&(navigator&&navigator.cookieEnabled||Nn(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===wn){for(var u=location.hostname?location.hostname.split("."):[],c=u.length-1;c>=0;c--)if(wn=".".concat(u[c]).concat(wn||""),c<u.length-1&&(document.cookie="".concat(i).concat(";").concat("domain=").concat(wn),Dn(t)===e))return;wn=""}}catch(t){wn=""}document.cookie=wn?"".concat(i).concat(";").concat("domain=").concat(wn):i}}var Wn,An=null;function Xn(){var t=yn;An={version:l,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function zn(){An=null}function Yn(t){return An.start=An.start+An.duration,An.duration=s()-An.start,An.sequence++,An.upload=t&&"sendBeacon"in navigator?1:0,An.end=t?1:0,[An.version,An.sequence,An.start,An.duration,An.projectId,An.userId,An.sessionId,An.pageNum,An.upload,An.end]}function qn(){Wn=[]}function Rn(t){if(Wn&&-1===Wn.indexOf(t.message)){var e=o.report;if(e&&e.length>0){var n={v:An.version,p:An.projectId,u:An.userId,s:An.sessionId,n:An.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e,!0),a.send(JSON.stringify(n)),Wn.push(t.message)}}return t}function Pn(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw Rn(t)}var n=performance.now()-e;X(4,n),n>30&&(A(7),z(6,n))}}var Ln=[];function Un(t,e,n,a){void 0===a&&(a=!1),n=Pn(n);try{t[u("addEventListener")](e,n,a),Ln.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function Vn(){for(var t=0,e=Ln;t<e.length;t++){var n=e[t];try{n.target[u("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}Ln=[]}var Jn=null,Bn=null,Zn=null,Gn=0;function Fn(){return!(Gn++>20)||(Re(4,0),!1)}function Kn(){Gn=0,Zn!==$n()&&(ca(),window.setTimeout(Qn,250))}function Qn(){ua(),z(29,1)}function $n(){return location.href?location.href.replace(location.hash,""):location.href}var ta=!1;function ea(){ta=!0,c=performance.now(),Tt(),Vn(),qn(),Zn=$n(),Gn=0,Un(window,"popstate",Kn),null===Jn&&(Jn=history.pushState,history.pushState=function(){Jn.apply(this,arguments),aa()&&Fn()&&Kn()}),null===Bn&&(Bn=history.replaceState,history.replaceState=function(){Bn.apply(this,arguments),aa()&&Fn()&&Kn()})}function na(){Zn=null,Gn=0,qn(),Vn(),Tt(),c=0,ta=!1}function aa(){return ta}function ra(t){if(null===t||ta)return!1;for(var e in t)e in o&&(o[e]=t[e]);return!0}function ia(){ua(),C("clarity","restart")}var oa=[Object.freeze({__proto__:null,start:function(){!function(){z(26,navigator.webdriver?1:0);try{z(31,window.top==window.self?1:2)}catch(t){z(31,0)}}(),Un(window,"error",Xe),Ae={},qe={}},stop:function(){qe={}}}),de,ee,_t];function ua(t){void 0===t&&(t=null),function(){try{return!1===ta&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(ra(t),ea(),dt(),oa.forEach((function(t){return Pn(t.start)()})),null===t&&fa())}function ca(){aa()&&(oa.slice().reverse().forEach((function(t){return Pn(t.stop)()})),pt(),na(),void 0!==la&&(la[ha]=function(){(la[ha].q=la[ha].q||[]).push(arguments),"start"===arguments[0]&&la[ha].q.unshift(la[ha].q.pop())&&fa()}))}var sa=Object.freeze({__proto__:null,consent:En,event:C,hashText:oe,identify:nt,metadata:xn,pause:function(){aa()&&(C("clarity","pause"),null===Et&&(Et=new Promise((function(t){Mt=t}))))},resume:function(){aa()&&(Et&&(Mt(),Et=null,null===Ot&&It()),C("clarity","resume"))},set:et,start:ua,stop:ca,upgrade:Q,version:l}),la=window,ha="clarity";function fa(){if(void 0!==la){if(la[ha]&&la[ha].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=la[ha]&&la[ha].q||[];for(la[ha]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return sa[t].apply(sa,e)},la[ha].v=l;t.length>0;)la[ha].apply(la,t.shift())}}fa()}();
|
package/build/clarity.js
CHANGED
|
@@ -80,6 +80,8 @@ function setup() {
|
|
|
80
80
|
if (typeof w !== "undefined") {
|
|
81
81
|
w[c] = function () {
|
|
82
82
|
(w[c].q = w[c].q || []).push(arguments);
|
|
83
|
+
// if the start function was called, don't queue it and instead process the queue
|
|
84
|
+
arguments[0] === "start" && w[c].q.unshift(w[c].q.pop()) && process$7();
|
|
83
85
|
};
|
|
84
86
|
}
|
|
85
87
|
}
|
|
@@ -149,7 +151,7 @@ function stop$D() {
|
|
|
149
151
|
startTime = 0;
|
|
150
152
|
}
|
|
151
153
|
|
|
152
|
-
var version$1 = "0.7.
|
|
154
|
+
var version$1 = "0.7.7";
|
|
153
155
|
|
|
154
156
|
// tslint:disable: no-bitwise
|
|
155
157
|
function hash (input, precision) {
|
|
@@ -3659,12 +3661,18 @@ function stop$c() {
|
|
|
3659
3661
|
}
|
|
3660
3662
|
|
|
3661
3663
|
var data$5 = {};
|
|
3662
|
-
var keys =
|
|
3664
|
+
var keys = new Set();
|
|
3663
3665
|
var variables = {};
|
|
3664
3666
|
var selectors = {};
|
|
3667
|
+
var hashes = {};
|
|
3665
3668
|
function start$c() {
|
|
3666
3669
|
reset$4();
|
|
3667
3670
|
}
|
|
3671
|
+
// Input string is of the following form:
|
|
3672
|
+
// EXTRACT 101 { "1": ".class1", "2": "~window.a.b", "3": "!abc"}
|
|
3673
|
+
// Which will set up event 101 to grab the contents of the class1 selector into component 1,
|
|
3674
|
+
// the javascript evaluated contents of window.a.b into component 2,
|
|
3675
|
+
// and the contents of Clarity's hash abc into component 3
|
|
3668
3676
|
function trigger$1(input) {
|
|
3669
3677
|
try {
|
|
3670
3678
|
var parts = input && input.length > 0 ? input.split(/ (.*)/) : ["" /* Constant.Empty */];
|
|
@@ -3672,10 +3680,19 @@ function trigger$1(input) {
|
|
|
3672
3680
|
var values = parts.length > 1 ? JSON.parse(parts[1]) : {};
|
|
3673
3681
|
variables[key] = {};
|
|
3674
3682
|
selectors[key] = {};
|
|
3683
|
+
hashes[key] = {};
|
|
3675
3684
|
for (var v in values) {
|
|
3685
|
+
// values is a set of strings for proper JSON parsing, but it's more efficient
|
|
3686
|
+
// to interact with them as numbers
|
|
3676
3687
|
var id = parseInt(v);
|
|
3677
3688
|
var value = values[v];
|
|
3678
|
-
var source =
|
|
3689
|
+
var source = 2 /* ExtractSource.Text */;
|
|
3690
|
+
if (value.startsWith("~" /* Constant.Tilde */)) {
|
|
3691
|
+
source = 0 /* ExtractSource.Javascript */;
|
|
3692
|
+
}
|
|
3693
|
+
else if (value.startsWith("!" /* Constant.Bang */)) {
|
|
3694
|
+
source = 4 /* ExtractSource.Hash */;
|
|
3695
|
+
}
|
|
3679
3696
|
switch (source) {
|
|
3680
3697
|
case 0 /* ExtractSource.Javascript */:
|
|
3681
3698
|
var variable = value.substring(1, value.length);
|
|
@@ -3684,6 +3701,10 @@ function trigger$1(input) {
|
|
|
3684
3701
|
case 2 /* ExtractSource.Text */:
|
|
3685
3702
|
selectors[key][id] = value;
|
|
3686
3703
|
break;
|
|
3704
|
+
case 4 /* ExtractSource.Hash */:
|
|
3705
|
+
var hash = value.substring(1, value.length);
|
|
3706
|
+
hashes[key][id] = hash;
|
|
3707
|
+
break;
|
|
3687
3708
|
}
|
|
3688
3709
|
}
|
|
3689
3710
|
}
|
|
@@ -3698,44 +3719,56 @@ function compute$4() {
|
|
|
3698
3719
|
try {
|
|
3699
3720
|
for (var v in variables) {
|
|
3700
3721
|
var key = parseInt(v);
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
update(key, variableKey, value);
|
|
3708
|
-
}
|
|
3722
|
+
var variableData = variables[key];
|
|
3723
|
+
for (var v_1 in variableData) {
|
|
3724
|
+
var variableKey = parseInt(v_1);
|
|
3725
|
+
var value = str(evaluate(clone(variableData[variableKey])));
|
|
3726
|
+
if (value) {
|
|
3727
|
+
update(key, variableKey, value);
|
|
3709
3728
|
}
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3729
|
+
}
|
|
3730
|
+
var selectorData = selectors[key];
|
|
3731
|
+
for (var s in selectorData) {
|
|
3732
|
+
var selectorKey = parseInt(s);
|
|
3733
|
+
var nodes = document.querySelectorAll(selectorData[selectorKey]);
|
|
3734
|
+
if (nodes) {
|
|
3735
|
+
var text = Array.from(nodes).map(function (e) { return e.innerText; });
|
|
3736
|
+
update(key, selectorKey, text.join("<SEP>" /* Constant.Seperator */).substring(0, 10000 /* Setting.ExtractLimit */));
|
|
3718
3737
|
}
|
|
3719
3738
|
}
|
|
3739
|
+
var hashData = hashes[key];
|
|
3740
|
+
for (var h in hashData) {
|
|
3741
|
+
var hashKey = parseInt(h);
|
|
3742
|
+
var content = hashText(hashData[hashKey]).trim().substring(0, 10000 /* Setting.ExtractLimit */);
|
|
3743
|
+
update(key, hashKey, content);
|
|
3744
|
+
}
|
|
3745
|
+
}
|
|
3746
|
+
if (keys.size > 0) {
|
|
3747
|
+
encode$1(40 /* Event.Extract */);
|
|
3720
3748
|
}
|
|
3721
3749
|
}
|
|
3722
3750
|
catch (e) {
|
|
3723
3751
|
log$1(5 /* Code.Selector */, 1 /* Severity.Warning */, e ? e.name : null);
|
|
3724
3752
|
}
|
|
3725
|
-
encode$1(40 /* Event.Extract */);
|
|
3726
3753
|
}
|
|
3727
3754
|
function reset$4() {
|
|
3728
|
-
|
|
3729
|
-
keys = [];
|
|
3730
|
-
variables = {};
|
|
3731
|
-
selectors = {};
|
|
3755
|
+
keys.clear();
|
|
3732
3756
|
}
|
|
3733
3757
|
function update(key, subkey, value) {
|
|
3758
|
+
var update = false;
|
|
3734
3759
|
if (!(key in data$5)) {
|
|
3735
|
-
data$5[key] =
|
|
3736
|
-
|
|
3760
|
+
data$5[key] = {};
|
|
3761
|
+
update = true;
|
|
3737
3762
|
}
|
|
3738
|
-
|
|
3763
|
+
if (!isEmpty(hashes[key])
|
|
3764
|
+
&& (!(subkey in data$5[key]) || data$5[key][subkey] != value)) {
|
|
3765
|
+
update = true;
|
|
3766
|
+
}
|
|
3767
|
+
data$5[key][subkey] = value;
|
|
3768
|
+
if (update) {
|
|
3769
|
+
keys.add(key);
|
|
3770
|
+
}
|
|
3771
|
+
return;
|
|
3739
3772
|
}
|
|
3740
3773
|
function stop$b() {
|
|
3741
3774
|
reset$4();
|
|
@@ -3798,6 +3831,9 @@ function match(base, condition) {
|
|
|
3798
3831
|
return prop.length > 1 ? base[prop[0]] == prop[1] : base[prop[0]];
|
|
3799
3832
|
}
|
|
3800
3833
|
return true;
|
|
3834
|
+
}
|
|
3835
|
+
function isEmpty(obj) {
|
|
3836
|
+
return Object.keys(obj).length == 0;
|
|
3801
3837
|
}
|
|
3802
3838
|
|
|
3803
3839
|
function encode$1 (event) {
|
|
@@ -3900,11 +3936,16 @@ function encode$1 (event) {
|
|
|
3900
3936
|
break;
|
|
3901
3937
|
case 40 /* Event.Extract */:
|
|
3902
3938
|
var extractKeys = keys;
|
|
3903
|
-
|
|
3904
|
-
var e = extractKeys_1[_d];
|
|
3939
|
+
extractKeys.forEach((function (e) {
|
|
3905
3940
|
tokens.push(e);
|
|
3906
|
-
|
|
3907
|
-
|
|
3941
|
+
var token = [];
|
|
3942
|
+
for (var d in data$5[e]) {
|
|
3943
|
+
var key = parseInt(d, 10);
|
|
3944
|
+
token.push(key);
|
|
3945
|
+
token.push(data$5[e][d]);
|
|
3946
|
+
}
|
|
3947
|
+
tokens.push(token);
|
|
3948
|
+
}));
|
|
3908
3949
|
reset$4();
|
|
3909
3950
|
queue(tokens, false);
|
|
3910
3951
|
}
|
|
@@ -4052,11 +4093,17 @@ function stop$8() {
|
|
|
4052
4093
|
}
|
|
4053
4094
|
function metadata(cb, wait) {
|
|
4054
4095
|
if (wait === void 0) { wait = true; }
|
|
4055
|
-
|
|
4096
|
+
var upgraded = config$1.lean ? 0 /* BooleanFlag.False */ : 1 /* BooleanFlag.True */;
|
|
4097
|
+
// if caller hasn't specified that they want to skip waiting for upgrade but we've already upgraded, we need to
|
|
4098
|
+
// directly execute the callback rather than adding to our list as we only process callbacks at the moment
|
|
4099
|
+
// we go through the upgrading flow.
|
|
4100
|
+
if (data$2 && (upgraded || wait === false)) {
|
|
4056
4101
|
// Immediately invoke the callback if the caller explicitly doesn't want to wait for the upgrade confirmation
|
|
4057
4102
|
cb(data$2, !config$1.lean);
|
|
4058
4103
|
}
|
|
4059
|
-
|
|
4104
|
+
else {
|
|
4105
|
+
callbacks.push({ callback: cb, wait: wait });
|
|
4106
|
+
}
|
|
4060
4107
|
}
|
|
4061
4108
|
function id() {
|
|
4062
4109
|
return data$2 ? [data$2.userId, data$2.sessionId, data$2.pageNum].join("." /* Constant.Dot */) : "" /* Constant.Empty */;
|
package/build/clarity.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return Ma},get start(){return xa},get stop(){return Sa},get track(){return ya}}),e=Object.freeze({__proto__:null,get clone(){return Ba},get compute(){return Va},get data(){return Ya},get keys(){return Wa},get reset(){return Fa},get start(){return Pa},get stop(){return Ga},get trigger(){return Ua},get update(){return Ja}}),n=Object.freeze({__proto__:null,get check(){return er},get compute(){return ar},get data(){return Ha},get start(){return tr},get stop(){return rr},get trigger(){return nr}}),a=Object.freeze({__proto__:null,get compute(){return lr},get data(){return ir},get log(){return sr},get reset(){return dr},get start(){return ur},get stop(){return cr},get updates(){return or}}),r=Object.freeze({__proto__:null,get callbacks(){return hr},get clear(){return wr},get consent(){return yr},get data(){return fr},get id(){return br},get metadata(){return mr},get save(){return kr},get start(){return vr},get stop(){return gr}}),i=Object.freeze({__proto__:null,get data(){return Ir},get envelope(){return jr},get start(){return Dr},get stop(){return Cr}}),o={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null};function u(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function s(t){void 0===t&&(t=null);var e=t&&t.timeStamp>0?t.timeStamp:performance.now();return Math.max(Math.round(e-c),0)}var l="0.7.6";function d(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 f=/\S/gi,h=!0,p=null,v=null,g=null;function m(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;E();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=h&&null!==g?s.match(g)?s:s.replace(v,"▪").replace(p,"▫"):w(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 k(t)}return t;case 2:case 3:switch(e){case"*T":case"data-":return a?y(t):w(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":case"change":return k(t);case"placeholder":return w(t)}break;case 4:switch(e){case"*T":case"data-":return a?y(t):w(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}break;case 5:switch(e){case"*T":case"data-":return function(t){return E(),t.replace(v,"▪").replace(p,"▫")}(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":case"src":case"srcset":case"alt":case"title":return""}}return t}function b(t){var e=o.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 y(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 w(t){return t.replace(f,"•")}function k(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}function E(){if(h&&null===p)try{p=new RegExp("\\p{N}","gu"),v=new RegExp("\\p{L}","gu"),g=new RegExp("\\p{Sc}","gu")}catch(t){h=!1}}var O=null,x=null,M=!1;function S(){M&&(O={time:s(),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 N(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}M=!0}function T(t){x.activityTime=t}function _(t,e){x.visible="visible"===e?1:0,x.visible||T(t),M=!0}function I(){M&&$a(4)}var D=Object.freeze({__proto__:null,activity:T,compute:I,reset:S,start:function(){M=!1,S()},get state(){return O},stop:function(){S()},track:N,visibility:_}),C=null;function j(t,e){Kr()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(C={key:t,value:e},$a(24))}var A,L=null,R=null;function z(t){t in L||(L[t]=0),t in R||(R[t]=0),L[t]++,R[t]++}function H(t,e){null!==e&&(t in L||(L[t]=0),t in R||(R[t]=0),L[t]+=e,R[t]+=e)}function Y(t,e){null!==e&&!1===isNaN(e)&&(t in L||(L[t]=0),(e>L[t]||0===L[t])&&(R[t]=e,L[t]=e))}function W(t,e,n){return window.setTimeout(Rr(t),e,n)}function X(t){return window.clearTimeout(t)}var q=0,P=0,U=null;function B(){U&&X(U),U=W(V,P),q=s()}function V(){var t=s();A={gap:t-q},$a(25),A.gap<3e5?U=W(V,P):Jr&&(j("clarity","suspend"),hi(),["mousemove","touchstart"].forEach((function(t){return Hr(document,t,$r)})),["resize","scroll","pageshow"].forEach((function(t){return Hr(window,t,$r)})))}var F=Object.freeze({__proto__:null,get data(){return A},reset:B,start:function(){P=6e4,q=0},stop:function(){X(U),q=0,P=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(){$a(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){Kr()&&o.lean&&(o.lean=!1,$={key:t},kr(),o.upgrade&&o.upgrade(t),$a(3))}var et=Object.freeze({__proto__:null,get data(){return $},start:function(){!o.lean&&o.upgrade&&o.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(Kr()&&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(){$a(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=[D,a,Object.freeze({__proto__:null,compute:ot,get data(){return nt},identify:rt,reset:ut,set:at,start:function(){ut()},stop:function(){ut()}}),n,Q,r,i,t,F,et,e];function pt(){L={},R={},z(5),ht.forEach((function(t){return Rr(t.start)()}))}function vt(){ht.slice().reverse().forEach((function(t){return Rr(t.stop)()})),L={},R={}}function gt(){ot(),I(),lr(),$a(0),Z(),ar(),Va()}var mt,bt=[];function yt(t,e,n){o.fraud&&null!==t&&n&&n.length>=5&&(mt={id:t,target:e,checksum:d(n,24)},bt.indexOf(mt.checksum)<0&&(bt.push(mt.checksum),Aa(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=1,Mt=[],St=[],Nt=[],Tt={},_t=[],It=[],Dt=[],Ct=[],jt=[],At=[],Lt=null,Rt=null,zt=null,Ht=null;function Yt(){Xt(),qt(document,!0)}function Wt(){Xt()}function Xt(){xt=1,Mt=[],St=[],Nt=[],Tt={},_t=[],It=[],Dt="address,password,contact".split(","),Ct="password,secret,pass,social,ssn,code,hidden".split(","),jt="radio,checkbox,range,button,reset,submit".split(","),At="INPUT,SELECT,TEXTAREA".split(","),Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Ht=new WeakMap,kt={}}function qt(t,e){void 0===e&&(e=!1);try{e&&o.unmask.forEach((function(t){return t.indexOf("!")<0?It.push(t):_t.push(t.substr(1))})),"querySelectorAll"in t&&(o.regions.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return Ce(t,"".concat(e[0]))}))})),o.mask.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return zt.set(t,3)}))})),o.checksum.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return Ht.set(t,e[0])}))})),It.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return zt.set(t,0)}))})))}catch(t){za(5,1,t?t.name:null)}}function Pt(t,e){if(void 0===e&&(e=!1),null===t)return null;var n=Lt.get(t);return!n&&e&&(n=xt++,Lt.set(t,n)),n||null}function Ut(t){var e=!1;if(t.nodeType===Node.ELEMENT_NODE&&"IFRAME"===t.tagName){var n=t;try{n.contentDocument&&(Rt.set(n.contentDocument,n),e=!0)}catch(t){}}return e}function Bt(t){var e=t.nodeType===Node.DOCUMENT_NODE?t:null;return e&&Rt.has(e)?Rt.get(e):null}function Vt(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 Ft(t){var e=t.parent&&t.parent in St?St[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=St[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?d(t):null})),t.hash.forEach((function(e){return Tt[e]=t.id}))}function Jt(t){var e=Gt(Kt(t));return null!==e&&null!==e.textContent?e.textContent.substr(0,25):""}function Gt(t){return t in Mt?Mt[t]:null}function Zt(t){var e=Pt(t);return e in St?St[e]:null}function Kt(t){return t in Tt?Tt[t]:null}function Qt(t){return Pt(t)in Mt}function $t(){for(var t=[],e=0,n=Nt;e<n.length;e++){var a=n[e];a in St&&t.push(St[a])}return Nt=[],t}function te(t){for(var e=null;null===e&&t.previousSibling;)e=Pt(t.previousSibling),t=t.previousSibling;return e}function ee(t,e,n,a){void 0===n&&(n=!0),void 0===a&&(a=!1);var r=Nt.indexOf(t);r>=0&&1===e&&a?(Nt.splice(r,1),Nt.push(t)):-1===r&&n&&Nt.push(t)}var ne=Object.freeze({__proto__:null,add:function(t,e,n,a){var r,i=Pt(t,!0),u=e?Pt(e):null,c=te(t),s=null,l=je(t)?i:null,d=Ht.has(t)?Ht.get(t):null,f=o.content?1:3;u>=0&&St[u]&&((s=St[u]).children.push(i),l=null===l?s.region:l,d=null===d?s.metadata.fraud:d,f=s.metadata.privacy),n.attributes&&"data-clarity-region"in n.attributes&&(Ce(t,n.attributes["data-clarity-region"]),l=i),Mt[i]=t,St[i]={id:i,parent:u,previous:c,children:[],data:n,selector:null,hash:null,region:l,metadata:{active:!0,suspend:!1,privacy:f,position:null,fraud:d,size:null}},function(t,e,n){var a=e.data,r=e.metadata,i=r.privacy,o=a.attributes||{},u=a.tag.toUpperCase();switch(!0){case At.indexOf(u)>=0:var c=o.type,s="";Object.keys(o).forEach((function(t){return s+=o[t].toLowerCase()}));var l=Ct.some((function(t){return s.indexOf(t)>=0}));r.privacy="INPUT"===u&&jt.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 zt.has(t):r.privacy=zt.get(t);break;case Ht.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)||_t.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,Dt,r)}}(t,St[i],s),Ft(St[i]),"IMG"===(r=St[i]).data.tag&&3===r.metadata.privacy&&(r.metadata.size=[]),ee(i,a)},get:Zt,getId:Pt,getNode:Gt,getValue:function(t){return t in St?St[t]:null},has:Qt,hashText:Jt,iframe:Bt,lookup:Kt,parse:qt,sameorigin:Ut,start:Yt,stop:Wt,update:function(t,e,n,a){var r=Pt(t),i=e?Pt(e):null,o=te(t),u=!1,c=!1;if(r in St){var s=St[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:St[i].children.indexOf(o)+1;St[i].children.splice(d,0,r),s.region=je(t)?r:St[i].region}else!function(t,e){if(t in St){var n=St[t];n.metadata.active=!1,n.parent=null,ee(t,e)}}(r,a);if(null!==l&&l>=0){var f=St[l].children.indexOf(r);f>=0&&St[l].children.splice(f,1)}c=!0}for(var h in n)Vt(s.data,n,h)&&(u=!0,s.data[h]=n[h]);Ft(s),ee(r,a,u,c)}},updates:$t}),ae=5e3,re={},ie=[],oe=null,ue=null,ce=null;function se(){re={},ie=[],oe=null,ue=null}function le(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=ie;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){ie[1===e?"unshift":"push"]({task:t,resolve:n,id:br()})})),null===oe&&null===ue&&de(),[2,r]}))}))}function de(){var t=ie.shift();t&&(oe=t,t.task().then((function(){t.id===br()&&(t.resolve(),oe=null,de())})).catch((function(e){t.id===br()&&(e&&za(0,1,e.name,e.message,e.stack),oe=null,de())})))}function fe(t){var e=ge(t);return e in re?performance.now()-re[e].start>re[e].yield?0:1:2}function he(t){re[ge(t)]={start:performance.now(),calls:0,yield:30}}function pe(t){var e=performance.now(),n=ge(t),a=e-re[n].start;H(t.cost,a),z(5),re[n].calls>0&&H(4,a)}function ve(t){return ct(this,void 0,void 0,(function(){var e,n;return st(this,(function(a){switch(a.label){case 0:return(e=ge(t))in re?(pe(t),n=re[e],[4,me()]):[3,2];case 1:n.yield=a.sent().timeRemaining(),function(t){var e=ge(t);if(re&&re[e]){var n=re[e].calls,a=re[e].yield;he(t),re[e].calls=n+1,re[e].yield=a}}(t),a.label=2;case 2:return[2,e in re?1:2]}}))}))}function ge(t){return"".concat(t.id,".").concat(t.cost)}function me(){return ct(this,void 0,void 0,(function(){return st(this,(function(t){switch(t.label){case 0:return ue?[4,ue]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t){ye(t,{timeout:ae})}))]}}))}))}var be,ye=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 we(){be=null}function ke(){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!==be&&c===be.width&&v===be.height||null===c||null===v||(be={width:c,height:v},Ee(8))}function Ee(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,u,c,l,d,f,h,p,v,g,b,y,w,k,E,O,x,M,S,_;return st(this,(function(I){switch(I.label){case 0:switch(a=n||s(),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=be,r.push(i.width),r.push(i.height),N(t,i.width,i.height),Ma(r),[3,10];case 2:for(u=0,c=Se;u<c.length;u++)l=c[u],(r=[l.time,7]).push(l.data.id),r.push(l.data.interaction),r.push(l.data.visibility),r.push(l.data.name),Ma(r);return He(),[3,10];case 3:if(2===fe(e))return[3,10];if(!((d=$t()).length>0))return[3,9];f=0,h=d,I.label=4;case 4:return f<h.length?(p=h[f],0!==(v=fe(e))?[3,6]:[4,ve(e)]):[3,8];case 5:v=I.sent(),I.label=6;case 6:if(2===v)return[3,8];for(g=p.data,b=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=b?["tag","attributes","value"]:["tag"];E<O.length;E++)if(g[x=O[E]])switch(x){case"tag":M=Oe(p),S=k?-1:1,r.push(p.id*S),p.parent&&b&&r.push(p.parent),p.previous&&b&&r.push(p.previous),r.push(y?"*M":g[x]),M&&2===M.length&&r.push("".concat("#").concat(xe(M[0]),".").concat(xe(M[1])));break;case"attributes":for(_ in g[x])void 0!==g[x][_]&&r.push(Me(_,g[x][_],w));break;case"value":yt(p.metadata.fraud,p.id,g[x]),r.push(m(g[x],g.tag,w,k))}I.label=7;case 7:return f++,[3,4];case 8:6===t&&T(a),Ma(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),!o.lean),I.label=9;case 9:return[3,10];case 10:return[2]}}))}))}function Oe(t){if(null!==t.metadata.size&&0===t.metadata.size.length){var e=Gt(t.id);if(e)return[Math.floor(100*e.offsetWidth),Math.floor(100*e.offsetHeight)]}return t.metadata.size}function xe(t){return t.toString(36)}function Me(t,e,n){return"".concat(t,"=").concat(m(e,0===t.indexOf("data-")?"data-":t,n))}var Se=[],Ne=null,Te={},_e=[],Ie=!1,De=null;function Ce(t,e){!1===Ne.has(t)&&(Ne.set(t,e),(De=null===De&&Ie?new IntersectionObserver(Le,{threshold:[0,.2,.4,.6,.8,1]}):De)&&t&&t.nodeType===Node.ELEMENT_NODE&&De.observe(t))}function je(t){return Ne&&Ne.has(t)}function Ae(){for(var t=[],e=0,n=_e;e<n.length;e++){var a=n[e],r=Pt(a.node);r in Te||(r?(a.data.id=r,Te[r]=a.data,Se.push(ze(a.data))):t.push(a))}_e=t,Se.length>0&&Ee(7)}function Le(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(Ne.has(r)&&i.width+i.height>0&&u.width>0&&u.height>0){var c=r?Pt(r):null,s=c in Te?Te[c]:{id:c,name:Ne.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;Re(r,s,s.interaction,d?13:l?10:0),s.visibility>=13&&De&&De.unobserve(r)}}Se.length>0&&Ee(7)}function Re(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 Te&&r||!(e.id in Te))&&(Te[e.id]=e,Se.push(ze(e))):_e.push({node:t,data:e})}function ze(t){return{time:s(),data:{id:t.id,interaction:t.interaction,visibility:t.visibility,name:t.name}}}function He(){Se=[]}var Ye=[];function We(t){var e=ca(t);if(e){var n=e.value,a=n&&n.length>=5&&o.fraud?d(n,24):"";Ye.push({time:s(t),event:42,data:{target:ca(t),type:e.type,value:n,checksum:a}}),le(la.bind(this,42))}}function Xe(){Ye=[]}function qe(t){var e={x:0,y:0};if(t&&t.offsetParent)do{var n=t.offsetParent,a=null===n?Bt(t.ownerDocument):null;e.x+=t.offsetLeft,e.y+=t.offsetTop,t=a||n}while(t);return e}var Pe=["input","textarea","radio","button","canvas"],Ue=[];function Be(t){Hr(t,"click",Ve.bind(this,9,t),!0)}function Ve(t,e,n){var a=Bt(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=qe(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}var c=ca(n),l=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&&(Ue.push({time:s(n),event:t,data:{target:c,x:i,y:o,eX:f,eY:h,button:n.button,reaction:Je(c),context:Ge(l),text:Fe(c),link:l?l.href:null,hash:null,trust:n.isTrusted?1:0}}),le(la.bind(this,t)))}function Fe(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 Je(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(Pe.indexOf(e)>=0)return 0}return 1}function Ge(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 Ze(){Ue=[]}var Ke=[];function Qe(t,e){Ke.push({time:s(e),event:38,data:{target:ca(e),action:t}}),le(la.bind(this,38))}function $e(){Ke=[]}var tn=null,en=[];function nn(t){var e=ca(t),n=Zt(e);if(e&&e.type&&n){var a=e.value;switch(e.type){case"radio":case"checkbox":a=e.checked?"true":"false"}var r={target:e,value:a};en.length>0&&en[en.length-1].data.target===r.target&&en.pop(),en.push({time:s(t),event:27,data:r}),X(tn),tn=W(an,1e3,27)}}function an(t){le(la.bind(this,t))}function rn(){en=[]}var on,un=[],cn=null;function sn(t,e,n){var a=Bt(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=qe(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}null!==i&&null!==o&&dn({time:s(n),event:t,data:{target:ca(n),x:i,y:o}})}function ln(t,e,n){var a=Bt(e),r=a?a.contentDocument.documentElement:document.documentElement,i=n.changedTouches,o=s(n);if(i)for(var u=0;u<i.length;u++){var c=i[u],l="clientX"in c?Math.round(c.clientX+r.scrollLeft):null,d="clientY"in c?Math.round(c.clientY+r.scrollTop):null;l=l&&a?l+Math.round(a.offsetLeft):l,d=d&&a?d+Math.round(a.offsetTop):d,null!==l&&null!==d&&dn({time:o,event:t,data:{target:ca(n),x:l,y:d}})}}function dn(t){switch(t.event){case 12:case 15:case 19:var e=un.length,n=e>1?un[e-2]:null;n&&function(t,e){var n=t.data.x-e.data.x,a=t.data.y-e.data.y,r=Math.sqrt(n*n+a*a),i=e.time-t.time,o=e.data.target===t.data.target;return e.event===t.event&&o&&r<20&&i<25}(n,t)&&un.pop(),un.push(t),X(cn),cn=W(fn,500,t.event);break;default:un.push(t),fn(t.event)}}function fn(t){le(la.bind(this,t))}function hn(){un=[]}function pn(){var t=document.documentElement;on={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},la(11)}function vn(){on=null}var gn=[],mn=null;function bn(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?ca(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){var r=Bt(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:s(t),event:10,data:{target:a,x:i,y:o}};if((null!==t||0!==i||0!==o)&&null!==i&&null!==o){var c=gn.length,l=c>1?gn[c-2]:null;l&&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}(l,u)&&gn.pop(),gn.push(u),X(mn),mn=W(yn,500,10)}}function yn(t){le(la.bind(this,t))}var wn=null,kn=null,En=null;function On(t){var e=(t.nodeType===Node.DOCUMENT_NODE?t:document).getSelection();if(null!==e&&!(null===e.anchorNode&&null===e.focusNode||e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset)){var n=wn.start?wn.start:null;null!==kn&&null!==wn.start&&n!==e.anchorNode&&(X(En),xn(21)),wn={start:e.anchorNode,startOffset:e.anchorOffset,end:e.focusNode,endOffset:e.focusOffset},kn=e,X(En),En=W(xn,500,21)}}function xn(t){le(la.bind(this,t))}function Mn(){kn=null,wn={start:0,startOffset:0,end:0,endOffset:0}}var Sn,Nn,Tn=[];function _n(t){Tn.push({time:s(t),event:39,data:{target:ca(t)}}),le(la.bind(this,39))}function In(){Tn=[]}function Dn(t){Sn={name:t.type},la(26,s(t)),hi()}function Cn(){Sn=null}function jn(t){void 0===t&&(t=null),Nn={visible:"visibilityState"in document?document.visibilityState:"default"},la(28,s(t))}function An(){Nn=null}function Ln(t){!function(t){var e=Bt(t);Hr(e?e.contentWindow:t===document?window:t,"scroll",bn,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Be(t),function(t){Hr(t,"cut",Qe.bind(this,0),!0),Hr(t,"copy",Qe.bind(this,1),!0),Hr(t,"paste",Qe.bind(this,2),!0)}(t),function(t){Hr(t,"mousedown",sn.bind(this,13,t),!0),Hr(t,"mouseup",sn.bind(this,14,t),!0),Hr(t,"mousemove",sn.bind(this,12,t),!0),Hr(t,"wheel",sn.bind(this,15,t),!0),Hr(t,"dblclick",sn.bind(this,16,t),!0),Hr(t,"touchstart",ln.bind(this,17,t),!0),Hr(t,"touchend",ln.bind(this,18,t),!0),Hr(t,"touchmove",ln.bind(this,19,t),!0),Hr(t,"touchcancel",ln.bind(this,20,t),!0)}(t),function(t){Hr(t,"input",nn,!0)}(t),function(t){Hr(t,"selectstart",On.bind(this,t),!0),Hr(t,"selectionchange",On.bind(this,t),!0)}(t),function(t){Hr(t,"change",We,!0)}(t),function(t){Hr(t,"submit",_n,!0)}(t))}var Rn=Object.freeze({__proto__:null,observe:Ln,start:function(){da=[],ha(),Ze(),$e(),hn(),rn(),Hr(window,"resize",pn),pn(),Hr(document,"visibilitychange",jn),jn(),gn=[],bn(),Mn(),Xe(),In(),Hr(window,"pagehide",Dn)},stop:function(){da=[],ha(),Ze(),$e(),X(cn),un.length>0&&fn(un[un.length-1].event),X(tn),rn(),vn(),An(),X(mn),gn=[],Mn(),X(En),Xe(),In(),Cn()}}),zn=/[^0-9\.]/g;function Hn(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":sr(5,t[a]),sr(8,t.creator),sr(18,t.headline);break;case"product":sr(5,t[a]),sr(10,t.name),sr(12,t.sku),t.brand&&sr(6,t.brand.name);break;case"aggregaterating":t.ratingValue&&(Y(11,Yn(t.ratingValue,100)),Y(18,Yn(t.bestRating)),Y(19,Yn(t.worstRating))),Y(12,Yn(t.ratingCount)),Y(17,Yn(t.reviewCount));break;case"person":sr(8,t.name);break;case"offer":sr(7,t.availability),sr(14,t.itemCondition),sr(13,t.priceCurrency),sr(12,t.sku),Y(13,Yn(t.price));break;case"brand":sr(6,t.name)}null!==r&&"object"==typeof r&&Hn(r)}}function Yn(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(zn,""))*e)}return null}var Wn=["title","alt","onload","onfocus","onerror","data-drupal-form-submit-last"],Xn=/[\r\n]+/g;function qn(t,e){var n,a=null;if(2===e&&!1===Qt(t))return a;0!==e&&t.nodeType===Node.TEXT_NODE&&t.parentElement&&"STYLE"===t.parentElement.tagName&&(t=t.parentNode);var r=!1===Qt(t)?"add":"update",i=t.parentElement?t.parentElement:null,o=t.ownerDocument!==document;switch(t.nodeType){case Node.DOCUMENT_TYPE_NODE:i=o&&t.parentNode?Bt(t.parentNode):i;var u=t,c={tag:(o?"iframe:":"")+"*D",attributes:{name:u.name,publicId:u.publicId,systemId:u.systemId}};ne[r](t,i,c,e);break;case Node.DOCUMENT_NODE:t===document&&qt(document),Pn(t);break;case Node.DOCUMENT_FRAGMENT_NODE:var s=t;if(s.host)if(qt(s),"function"===typeof s.constructor&&s.constructor.toString().indexOf("[native code]")>=0){Pn(s);for(var l="",d=0,f=("adoptedStyleSheets"in s?s.adoptedStyleSheets:[]);d<f.length;d++){l+=Bn(f[d])}var h={tag:"*S",attributes:{style:l}};ne[r](t,s.host,h,e)}else ne[r](t,s.host,{tag:"*P",attributes:{}},e);break;case Node.TEXT_NODE:if(i=i||t.parentNode,"update"===r||i&&Qt(i)&&"STYLE"!==i.tagName){var p={tag:"*T",value:t.nodeValue};ne[r](t,i,p,e)}break;case Node.ELEMENT_NODE:var v=t,g=v.tagName,m=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;Wn.indexOf(r)<0&&(e[r]=n[a].value)}"INPUT"===t.tagName&&!("value"in e)&&t.value&&(e.value=t.value);return e}(v);switch(i=t.parentElement?t.parentElement:t.parentNode?t.parentNode:null,"http://www.w3.org/2000/svg"===v.namespaceURI&&(g="svg:"+g),g){case"HTML":i=o&&i?Bt(i):null;var b={tag:(o?"iframe:":"")+g,attributes:m};ne[r](t,i,b,e);break;case"SCRIPT":if("type"in m&&"application/ld+json"===m.type)try{Hn(JSON.parse(v.text.replace(Xn,"")))}catch(t){}break;case"NOSCRIPT":break;case"META":var y="property"in m?"property":"name"in m?"name":null;if(y&&"content"in m){var w=m.content;switch(m[y]){case"og:title":sr(20,w);break;case"og:type":sr(19,w);break;case"generator":sr(21,w)}}break;case"HEAD":var k={tag:g,attributes:m},E=o&&(null===(n=t.ownerDocument)||void 0===n?void 0:n.location)?t.ownerDocument.location:location;k.attributes["*B"]=E.protocol+"//"+E.host+E.pathname,ne[r](t,i,k,e);break;case"BASE":var O=Zt(t.parentElement);if(O){var x=document.createElement("a");x.href=m.href,O.data.attributes["*B"]=x.protocol+"//"+x.host+x.pathname}break;case"STYLE":var M={tag:g,attributes:m,value:Un(v)};ne[r](t,i,M,e);break;case"IFRAME":var S=t,N={tag:g,attributes:m};Ut(S)&&(!function(t){!1===Qt(t)&&Hr(t,"load",ua.bind(this,t,"childList"),!0)}(S),N.attributes["*O"]="true",S.contentDocument&&S.contentWindow&&"loading"!==S.contentDocument.readyState&&(a=S.contentDocument)),ne[r](t,i,N,e);break;default:var T={tag:g,attributes:m};v.shadowRoot&&(a=v.shadowRoot),ne[r](t,i,T,e)}}return a}function Pn(t){Qt(t)||(!function(t){try{var e=u("MutationObserver"),n=e in window?new window[e](Rr(na)):null;n&&(n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),Fn.push(n))}catch(t){za(2,0,t?t.name:null)}}(t),Ln(t))}function Un(t){var e=t.textContent?t.textContent.trim():"",n=t.dataset?Object.keys(t.dataset).length:0;return(0===e.length||n>0)&&(e=Bn(t.sheet)),e}function Bn(t){var e="",n=null;try{n=t?t.cssRules:[]}catch(t){if(za(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 Vn(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=fe(e))?[3,3]:[4,ve(e)];case 2:o=c.sent(),c.label=3;case 3:return 2===o?[3,4]:((u=qn(r,n))&&a.push(u),[3,1]);case 4:return[2]}}))}))}var Fn=[],Jn=[],Gn=null,Zn=null,Kn=null,Qn=[],$n=null,ta=null,ea={};function na(t){var e=s();G(6,e),Jn.push({time:e,mutations:t}),le(aa,1).then((function(){W(ke),Rr(Ae)()}))}function aa(){return ct(this,void 0,void 0,(function(){var t,e,n,a,r,i,o,u,c,l;return st(this,(function(d){switch(d.label){case 0:he(t={id:br(),cost:3}),d.label=1;case 1:if(!(Jn.length>0))return[3,8];e=Jn.shift(),n=s(),a=0,r=e.mutations,d.label=2;case 2:return a<r.length?(i=r[a],0!==(o=fe(t))?[3,4]:[4,ve(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?Zt(t.target.parentNode):null;if(a&&"HTML"!==a.data.tag){var r=s()>ta,i=Zt(t.target),o=i&&i.selector?i.selector.join():t.target.nodeName,u=[a.selector?a.selector.join():"",o,t.attributeName,ra(t.addedNodes),ra(t.removedNodes)].join();ea[u]=u in ea?ea[u]:[0,n];var c=ea[u];if(!1===r&&c[0]>=10&&ia(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&&qt(u.ownerDocument),c&&u&&u.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&u.host&&qt(u),c){case"attributes":qn(u,3);break;case"characterData":qn(u,4);break;case"childList":ia(i.addedNodes,1,t),ia(i.removedNodes,2,t);break;case"suspend":(l=Zt(u))&&(l.metadata.suspend=!0)}d.label=5;case 5:return a++,[3,2];case 6:return[4,Ee(6,t,e.time)];case 7:return d.sent(),[3,1];case 8:return pe(t),[2]}}))}))}function ra(t){for(var e=[],n=0;t&&n<t.length;n++)e.push(t[n].nodeName);return e.join()}function ia(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]:(Vn(t[r],n,e),[3,5]):[3,6];case 2:return 0!==(i=fe(n))?[3,4]:[4,ve(n)];case 3:i=o.sent(),o.label=4;case 4:if(2===i)return[3,6];qn(t[r],e),o.label=5;case 5:return r++,[3,1];case 6:return[2]}}))}))}function oa(t){return Qn.indexOf(t)<0&&Qn.push(t),$n&&X($n),$n=W((function(){!function(){for(var t=0,e=Qn;t<e.length;t++){var n=e[t];if(n){var a=n.nodeType===Node.DOCUMENT_FRAGMENT_NODE;if(a&&Qt(n))continue;ua(n,a?"childList":"characterData")}}Qn=[]}()}),33),t}function ua(t,e){Rr(na)([{addedNodes:[t],attributeName:null,attributeNamespace:null,nextSibling:null,oldValue:null,previousSibling:null,removedNodes:[],target:t,type:e}])}function ca(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return ta=s()+3e3,n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function sa(t,e,n){void 0===n&&(n=null);var a={id:0,hash:null,privacy:2,node:t};if(t){var r=Zt(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=Gt(t),a=t in Te?Te[t]:{id:t,visibility:0,interaction:16,name:Ne.get(n)},r=16;switch(e){case 9:r=20;break;case 27:r=30}Re(n,a,r,a.visibility)}(r.region,e),i.fraud&&yt(i.fraud,r.id,n||r.data.value)}}return a}function la(t,e){return void 0===e&&(e=null),ct(this,void 0,void 0,(function(){var n,a,r,i,o,u,c,l,d,f,h,p,v,g,y,w,k,E,O,x,M,S,T,I,D,C,j,A,L,R,z;return st(this,(function(H){switch(n=e||s(),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=un;r<i.length;r++)R=i[r],(o=sa(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),Ma(a),N(R.event,R.data.x,R.data.y));hn();break;case 9:for(u=0,c=Ue;u<c.length;u++)R=c[u],l=sa(R.data.target,R.event,R.data.text),a=[R.time,R.event],d=l.hash?l.hash.join("."):"",a.push(l.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(m(R.data.text,"click",l.privacy)),a.push(b(R.data.link)),a.push(d),a.push(R.data.trust),Ma(a),pa(R.time,R.event,d,R.data.x,R.data.y,R.data.reaction,R.data.context);Ze();break;case 38:for(f=0,h=Ke;f<h.length;f++)R=h[f],a=[R.time,R.event],(j=sa(R.data.target,R.event)).id>0&&(a.push(j.id),a.push(R.data.action),Ma(a));$e();break;case 11:p=on,a.push(p.width),a.push(p.height),N(t,p.width,p.height),vn(),Ma(a);break;case 26:v=Sn,a.push(v.name),Cn(),Ma(a);break;case 27:for(g=0,y=en;g<y.length;g++)R=y[g],w=sa(R.data.target,R.event,R.data.value),(a=[R.time,R.event]).push(w.id),a.push(m(R.data.value,"input",w.privacy)),Ma(a);rn();break;case 21:(k=wn)&&(E=sa(k.start,t),O=sa(k.end,t),a.push(E.id),a.push(k.startOffset),a.push(O.id),a.push(k.endOffset),Mn(),Ma(a));break;case 10:for(x=0,M=gn;x<M.length;x++)R=M[x],(S=sa(R.data.target,R.event)).id>0&&((a=[R.time,R.event]).push(S.id),a.push(R.data.x),a.push(R.data.y),Ma(a),N(R.event,R.data.x,R.data.y));gn=[];break;case 42:for(T=0,I=Ye;T<I.length;T++)R=I[T],a=[R.time,R.event],(j=sa(R.data.target,R.event)).id>0&&((a=[R.time,R.event]).push(j.id),a.push(R.data.type),a.push(m(R.data.value,"change",j.privacy)),a.push(m(R.data.checksum,"checksum",j.privacy)),Ma(a));Xe();break;case 39:for(D=0,C=Tn;D<C.length;D++)R=C[D],a=[R.time,R.event],(j=sa(R.data.target,R.event)).id>0&&(a.push(j.id),Ma(a));In();break;case 22:for(A=0,L=fa;A<L.length;A++)R=L[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),Ma(a,!1);ha();break;case 28:z=Nn,a.push(z.visible),Ma(a),_(n,z.visible),An()}return[2]}))}))}var da=[],fa=[];function ha(){fa=[]}function pa(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),da.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),N(e,a,r)}var va,ga,ma,ba,ya,wa=0,ka=0,Ea=null,Oa=0;function xa(){ba=!0,wa=0,ka=0,Oa=0,va=[],ga=[],ma={},ya=null}function Ma(t,e){if(void 0===e&&(e=!0),ba){var n=s(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:wa+=r.length;case 37:case 6:case 43:ka+=r.length,va.push(r);break;default:ga.push(r)}z(25);var i=function(){var t=!1===o.lean&&wa>0?100:Ir.sequence*o.delay;return"string"==typeof o.upload?Math.max(Math.min(t,3e4),100):o.delay}();n-Oa>2*i&&(X(Ea),Ea=null),e&&null===Ea&&(25!==a&&B(),Ea=W(Na,i),Oa=n,er(ka))}}function Sa(){X(Ea),Na(!0),wa=0,ka=0,Oa=0,va=[],ga=[],ma={},ya=null,ba=!1}function Na(t){return void 0===t&&(t=!1),ct(this,void 0,void 0,(function(){var e,n,a,r,i,u,c,s;return st(this,(function(l){switch(l.label){case 0:return Ea=null,(e=!1===o.lean&&ka>0&&(ka<1048576||Ir.sequence>0))&&Y(1,1),Ae(),function(){var t=[];fa=[];for(var e=Ir.start+Ir.duration,n=Math.max(e-2e3,0),a=0,r=da;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&fa.push(i),t.push(i))}da=t,la(22)}(),gt(),n=!0===t,a=JSON.stringify(jr(n)),r="[".concat(ga.join(),"]"),i=e?"[".concat(va.join(),"]"):"",u=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(u)];case 2:s=l.sent(),l.label=3;case 3:return H(2,(c=s)?c.length:u.length),Ta(u,c,Ir.sequence,n),ga=[],e&&(va=[],ka=0,wa=0),[2]}}))}))}function Ta(t,e,n,a){if(void 0===a&&(a=!1),"string"==typeof o.upload){var r=o.upload,i=!1;if(a&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(r,t))&&Ia(n)}catch(t){}if(!1===i){n in ma?ma[n].attempts++:ma[n]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",r,!0),u.timeout=15e3,u.ontimeout=function(){Lr(new Error("".concat("Timeout"," : ").concat(r)))},null!==n&&(u.onreadystatechange=function(){Rr(_a)(u,n)}),u.withCredentials=!0,e?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(e)):u.send(t)}}else if(o.upload){(0,o.upload)(t),Ia(n)}}function _a(t,e){var n=ma[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?nr(6):(0===t.status&&(o.upload=o.fallback?o.fallback:o.upload),Ta(n.data,null,e)):(ya={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&$a(2),200===t.status&&t.responseText&&function(t){for(var e=t&&t.length>0?t.split("\n"):[],n=0,a=e;n<a.length;n++){var r=a[n],i=r&&r.length>0?r.split(/ (.*)/):[""];switch(i[0]){case"END":nr(6);break;case"UPGRADE":tt("Auto");break;case"ACTION":o.action&&i.length>1&&o.action(i[1]);break;case"EXTRACT":i.length>1&&Ua(i[1])}}}(t.responseText),0===t.status&&(Ta(n.data,null,e,!0),nr(3)),t.status>=200&&t.status<=208&&Ia(e),delete ma[e]))}function Ia(t){1===t&&kr()}var Da,Ca={};function ja(t){var e=t.error||t;return e.message in Ca||(Ca[e.message]=0),Ca[e.message]++>=5||e&&e.message&&(Da={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},Aa(31)),!0}function Aa(t){return ct(this,void 0,void 0,(function(){var e;return st(this,(function(n){switch(e=[s(),t],t){case 31:e.push(Da.message),e.push(Da.line),e.push(Da.column),e.push(Da.stack),e.push(b(Da.source)),Ma(e);break;case 33:La&&(e.push(La.code),e.push(La.name),e.push(La.message),e.push(La.stack),e.push(La.severity),Ma(e,!1));break;case 41:mt&&(e.push(mt.id),e.push(mt.target),e.push(mt.checksum),Ma(e,!1))}return[2]}))}))}var La,Ra={};function za(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 Ra&&Ra[t].indexOf(i)>=0||(La={code:t,name:n,message:a,stack:r,severity:e},t in Ra?Ra[t].push(i):Ra[t]=[i],Aa(33))}var Ha,Ya={},Wa=[],Xa={},qa={};function Pa(){Fa()}function Ua(t){try{var e=t&&t.length>0?t.split(/ (.*)/):[""],n=parseInt(e[0]),a=e.length>1?JSON.parse(e[1]):{};for(var r in Xa[n]={},qa[n]={},a){var i=parseInt(r),o=a[r];switch(o.startsWith("~")?0:2){case 0:var u=o.substring(1,o.length);Xa[n][i]=Za(u);break;case 2:qa[n][i]=o}}}catch(t){za(8,1,t?t.name:null)}}function Ba(t){return JSON.parse(JSON.stringify(t))}function Va(){try{for(var t in Xa){var e=parseInt(t);if(!(e in Wa)){var n=Xa[e];for(var a in n){var r=parseInt(a),i=(l=Ka(Ba(n[r])))?JSON.stringify(l).substring(0,1e4):l;i&&Ja(e,r,i)}var o=qa[e];for(var u in o){var c=parseInt(u),s=document.querySelectorAll(o[c]);if(s)Ja(e,c,Array.from(s).map((function(t){return t.innerText})).join("<SEP>").substring(0,1e4))}}}}catch(t){za(5,1,t?t.name:null)}var l;$a(40)}function Fa(){Ya={},Wa=[],Xa={},qa={}}function Ja(t,e,n){t in Ya||(Ya[t]=[],Wa.push(t)),Ya[t].push([e,n])}function Ga(){Fa()}function Za(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 Ka(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&&Qa(r,a.condition))n=Ka(t,r);else if(Array.isArray(r)){for(var i=[],o=0,u=r;o<u.length;o++){var c=u[o];if(Qa(c,a.condition)){var s=Ka(t,c);s&&i.push(s)}}n=i}return n}return null}function Qa(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function $a(t){var e=[s(),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),Ma(e,!1)),S();break;case 25:e.push(A.gap),Ma(e);break;case 35:e.push(Ha.check),Ma(e,!1);break;case 3:e.push($.key),Ma(e);break;case 2:e.push(ya.sequence),e.push(ya.attempts),e.push(ya.status),Ma(e,!1);break;case 24:e.push(C.key),e.push(C.value),Ma(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(),Ma(e,!1)}break;case 0:var u=Object.keys(R);if(u.length>0){for(var c=0,l=u;c<l.length;c++){var d=l[c],f=parseInt(d,10);e.push(f),e.push(Math.round(R[d]))}R={},Ma(e,!1)}break;case 1:var h=Object.keys(or);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(or[g])}dr(),Ma(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(),Ma(e,!1)}break;case 40:for(var k=0,E=Wa;k<E.length;k++){w=E[k];e.push(w),e.push([].concat.apply([],Ya[w]))}Fa(),Ma(e,!1)}}function tr(){Ha={check:0}}function er(t){if(0===Ha.check){var e=Ha.check;e=Ir.sequence>=128?1:e,e=s()>72e5?2:e,(e=t>10485760?2:e)!==Ha.check&&nr(e)}}function nr(t){Ha.check=t,wr(),hi()}function ar(){0!==Ha.check&&$a(35)}function rr(){Ha=null}var ir=null,or=null;function ur(){ir={},or={}}function cr(){ir={},or={}}function sr(t,e){e&&(e="".concat(e),t in ir||(ir[t]=[]),ir[t].indexOf(e)<0&&(ir[t].push(e),t in or||(or[t]=[]),or[t].push(e),ir[t].length>128&&nr(5)))}function lr(){$a(1)}function dr(){or={}}var fr=null,hr=[],pr=null;function vr(){pr=null;var t,e=navigator&&"userAgent"in navigator?navigator.userAgent:"",n=document&&document.title?document.title:"",a=function(){var t={session:xr(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=Nr("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-Mr(n[1])<18e5&&(t.session=n[0],t.count=Mr(n[2])+1,t.upgrade=Mr(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),r=Sr(),i=o.projectId||d(location.host);fr={projectId:i,userId:r.id,sessionId:a.session,pageNum:a.count},o.lean=o.track&&null!==a.upgrade?0===a.upgrade:o.lean,o.upload=o.track&&"string"==typeof o.upload&&a.upload&&a.upload.length>"https://".length?a.upload:o.upload,sr(0,e),sr(3,n),sr(1,b(location.href)),sr(2,document.referrer),sr(15,function(){var t=xr();if(o.track&&Er(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),sr(16,document.documentElement.lang),sr(17,document.dir),sr(26,"".concat(window.devicePixelRatio)),Y(0,a.ts),Y(1,0),navigator&&(sr(9,navigator.language),Y(33,navigator.hardwareConcurrency),Y(32,navigator.maxTouchPoints),Y(34,Math.round(navigator.deviceMemory)),(t=navigator.userAgentData)&&t.getHighEntropyValues?t.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;sr(22,t.platform),sr(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){sr(24,t.name+"~"+t.version)})),sr(25,t.model),Y(27,t.mobile?1:0)})):sr(22,navigator.platform)),screen&&(Y(14,Math.round(screen.width)),Y(15,Math.round(screen.height)),Y(16,Math.round(screen.colorDepth)));for(var u=0,c=o.cookies;u<c.length;u++){var s=c[u],l=Nr(s);l&&at(s,l)}Or(r)}function gr(){pr=null,fr=null}function mr(t,e){void 0===e&&(e=!0),fr&&!1===e&&t(fr,!o.lean),hr.push({callback:t,wait:e})}function br(){return fr?[fr.userId,fr.sessionId,fr.pageNum].join("."):""}function yr(){Kr()&&(o.track=!0,Or(Sr(),1))}function wr(){Tr("_clsk","",0)}function kr(){var t=Math.round(Date.now()),e=o.upload&&"string"==typeof o.upload?o.upload.replace("https://",""):"",n=o.lean?0:1;!function(t){hr.length>0&&hr.forEach((function(e){!e.callback||e.wait&&!t||e.callback(fr,!o.lean)}))}(n),Tr("_clsk",[fr.sessionId,t,fr.pageNum,n,e].join("|"),1)}function Er(t,e){try{return!!t[e]}catch(t){return!1}}function Or(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)&&Tr("_clck",[fr.userId,1,n.toString(36),e].join("|"),365)}function xr(){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 Mr(t,e){return void 0===e&&(e=10),parseInt(t,e)}function Sr(){var t={id:xr(),expiry:null,consent:0},e=Nr("_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 u="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(u),document.cookie="".concat("_clsk","=").concat(u)}n.length>2&&(t.expiry=Mr(n[2],36)),n.length>3&&1===Mr(n[3])&&(t.consent=1),o.track=o.track||1===t.consent,t.id=o.track?n[0]:t.id}return t}function Nr(t){if(Er(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 Tr(t,e,n){if(o.track&&(navigator&&navigator.cookieEnabled||Er(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===pr){for(var u=location.hostname?location.hostname.split("."):[],c=u.length-1;c>=0;c--)if(pr=".".concat(u[c]).concat(pr||""),c<u.length-1&&(document.cookie="".concat(i).concat(";").concat("domain=").concat(pr),Nr(t)===e))return;pr=""}}catch(t){pr=""}document.cookie=pr?"".concat(i).concat(";").concat("domain=").concat(pr):i}}var _r,Ir=null;function Dr(){var t=fr;Ir={version:l,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function Cr(){Ir=null}function jr(t){return Ir.start=Ir.start+Ir.duration,Ir.duration=s()-Ir.start,Ir.sequence++,Ir.upload=t&&"sendBeacon"in navigator?1:0,Ir.end=t?1:0,[Ir.version,Ir.sequence,Ir.start,Ir.duration,Ir.projectId,Ir.userId,Ir.sessionId,Ir.pageNum,Ir.upload,Ir.end]}function Ar(){_r=[]}function Lr(t){if(_r&&-1===_r.indexOf(t.message)){var e=o.report;if(e&&e.length>0){var n={v:Ir.version,p:Ir.projectId,u:Ir.userId,s:Ir.sessionId,n:Ir.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e,!0),a.send(JSON.stringify(n)),_r.push(t.message)}}return t}function Rr(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw Lr(t)}var n=performance.now()-e;H(4,n),n>30&&(z(7),Y(6,n))}}var zr=[];function Hr(t,e,n,a){void 0===a&&(a=!1),n=Rr(n);try{t[u("addEventListener")](e,n,a),zr.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function Yr(){for(var t=0,e=zr;t<e.length;t++){var n=e[t];try{n.target[u("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}zr=[]}var Wr=null,Xr=null,qr=null,Pr=0;function Ur(){return!(Pr++>20)||(za(4,0),!1)}function Br(){Pr=0,qr!==Fr()&&(hi(),window.setTimeout(Vr,250))}function Vr(){fi(),Y(29,1)}function Fr(){return location.href?location.href.replace(location.hash,""):location.href}var Jr=!1;function Gr(){Jr=!0,c=performance.now(),se(),Yr(),Ar(),qr=Fr(),Pr=0,Hr(window,"popstate",Br),null===Wr&&(Wr=history.pushState,history.pushState=function(){Wr.apply(this,arguments),Kr()&&Ur()&&Br()}),null===Xr&&(Xr=history.replaceState,history.replaceState=function(){Xr.apply(this,arguments),Kr()&&Ur()&&Br()})}function Zr(){qr=null,Pr=0,Ar(),Yr(),se(),c=0,Jr=!1}function Kr(){return Jr}function Qr(t){if(null===t||Jr)return!1;for(var e in t)e in o&&(o[e]=t[e]);return!0}function $r(){fi(),j("clarity","restart")}var ti=Object.freeze({__proto__:null,start:function(){!function(){bt=[],Y(26,navigator.webdriver?1:0);try{Y(31,window.top==window.self?1:2)}catch(t){Y(31,0)}}(),Hr(window,"error",ja),Ca={},Ra={}},stop:function(){Ra={}}});function ei(){return ct(this,void 0,void 0,(function(){var t,e;return st(this,(function(n){switch(n.label){case 0:return t=s(),he(e={id:br(),cost:3}),[4,Vn(document,e,0)];case 1:return n.sent(),[4,Ee(5,e,t)];case 2:return n.sent(),pe(e),[2]}}))}))}var ni=Object.freeze({__proto__:null,hashText:Jt,start:function(){we(),ke(),He(),De=null,Ne=new WeakMap,Te={},_e=[],Ie=!!window.IntersectionObserver,Yt(),function(){if(Fn=[],Qn=[],$n=null,ta=0,ea={},null===Gn&&(Gn=CSSStyleSheet.prototype.insertRule,CSSStyleSheet.prototype.insertRule=function(){return Kr()&&oa(this.ownerNode),Gn.apply(this,arguments)}),null===Zn&&(Zn=CSSStyleSheet.prototype.deleteRule,CSSStyleSheet.prototype.deleteRule=function(){return Kr()&&oa(this.ownerNode),Zn.apply(this,arguments)}),null===Kn){Kn=Element.prototype.attachShadow;try{Element.prototype.attachShadow=function(){return Kr()?oa(Kn.apply(this,arguments)):Kn.apply(this,arguments)}}catch(t){Kn=null}}}(),le(ei,1).then((function(){Rr(ke)(),Rr(Ae)()}))},stop:function(){He(),Ne=null,Te={},_e=[],De&&(De.disconnect(),De=null),Ie=!1,Wt(),function(){for(var t=0,e=Fn;t<e.length;t++){var n=e[t];n&&n.disconnect()}Fn=[],ea={},Jn=[],Qn=[],ta=0,$n=null}(),we()}});var ai,ri=null;function ii(){ri=null}function oi(t){ri={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=s(),n=[e,t],29===t&&(n.push(ri.fetchStart),n.push(ri.connectStart),n.push(ri.connectEnd),n.push(ri.requestStart),n.push(ri.responseStart),n.push(ri.responseEnd),n.push(ri.domInteractive),n.push(ri.domComplete),n.push(ri.loadEventStart),n.push(ri.loadEventEnd),n.push(ri.redirectCount),n.push(ri.size),n.push(ri.type),n.push(ri.protocol),n.push(ri.encodedSize),n.push(ri.decodedSize),ii(),Ma(n,!1)),[2]}))}))}(29)}var ui=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint"];function ci(){try{ai&&ai.disconnect(),ai=new PerformanceObserver(Rr(si));for(var t=0,e=ui;t<e.length;t++){var n=e[t];PerformanceObserver.supportedEntryTypes.indexOf(n)>=0&&("layout-shift"===n&&H(9,0),ai.observe({type:n,buffered:!0}))}}catch(t){za(3,1)}}function si(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":oi(a);break;case"resource":var r=a.name;sr(4,li(r)),r!==o.upload&&r!==o.fallback||Y(28,a.duration);break;case"longtask":z(7);break;case"first-input":e&&Y(10,a.processingStart-a.startTime);break;case"layout-shift":e&&!a.hadRecentInput&&H(9,1e3*a.value);break;case"largest-contentful-paint":e&&Y(8,a.startTime)}}}(t.getEntries())}function li(t){var e=document.createElement("a");return e.href=t,e.host}var di=[ti,ni,Rn,Object.freeze({__proto__:null,start:function(){ii(),function(){navigator&&"connection"in navigator&&sr(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?"complete"!==document.readyState?Hr(window,"load",W.bind(this,ci,0)):ci():za(3,0)}()},stop:function(){ai&&ai.disconnect(),ai=null,ii()}})];function fi(t){void 0===t&&(t=null),function(){try{return!1===Jr&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(Qr(t),Gr(),pt(),di.forEach((function(t){return Rr(t.start)()})),null===t&&mi())}function hi(){Kr()&&(di.slice().reverse().forEach((function(t){return Rr(t.stop)()})),vt(),Zr(),void 0!==vi&&(vi[gi]=function(){(vi[gi].q=vi[gi].q||[]).push(arguments)}))}var pi=Object.freeze({__proto__:null,consent:yr,event:j,hashText:Jt,identify:rt,metadata:mr,pause:function(){Kr()&&(j("clarity","pause"),null===ue&&(ue=new Promise((function(t){ce=t}))))},resume:function(){Kr()&&(ue&&(ce(),ue=null,null===oe&&de()),j("clarity","resume"))},set:at,start:fi,stop:hi,upgrade:tt,version:l}),vi=window,gi="clarity";function mi(){if(void 0!==vi){if(vi[gi]&&vi[gi].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=vi[gi]&&vi[gi].q||[];for(vi[gi]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return pi[t].apply(pi,e)},vi[gi].v=l;t.length>0;)vi[gi].apply(vi,t.shift())}}mi()}();
|
|
1
|
+
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return Ma},get start(){return xa},get stop(){return Sa},get track(){return ya}}),e=Object.freeze({__proto__:null,get clone(){return Va},get compute(){return Fa},get data(){return Wa},get keys(){return Ya},get reset(){return Ja},get start(){return Ua},get stop(){return Za},get trigger(){return Ba},get update(){return Ga}}),n=Object.freeze({__proto__:null,get check(){return nr},get compute(){return rr},get data(){return Ha},get start(){return er},get stop(){return ir},get trigger(){return ar}}),a=Object.freeze({__proto__:null,get compute(){return dr},get data(){return or},get log(){return lr},get reset(){return fr},get start(){return cr},get stop(){return sr},get updates(){return ur}}),r=Object.freeze({__proto__:null,get callbacks(){return pr},get clear(){return kr},get consent(){return wr},get data(){return hr},get id(){return yr},get metadata(){return br},get save(){return Er},get start(){return gr},get stop(){return mr}}),i=Object.freeze({__proto__:null,get data(){return Dr},get envelope(){return Ar},get start(){return Cr},get stop(){return jr}}),o={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null};function u(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function s(t){void 0===t&&(t=null);var e=t&&t.timeStamp>0?t.timeStamp:performance.now();return Math.max(Math.round(e-c),0)}var l="0.7.7";function d(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 f=/\S/gi,h=!0,p=null,v=null,g=null;function m(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;E();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=h&&null!==g?s.match(g)?s:s.replace(v,"▪").replace(p,"▫"):w(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 k(t)}return t;case 2:case 3:switch(e){case"*T":case"data-":return a?y(t):w(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":case"change":return k(t);case"placeholder":return w(t)}break;case 4:switch(e){case"*T":case"data-":return a?y(t):w(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}break;case 5:switch(e){case"*T":case"data-":return function(t){return E(),t.replace(v,"▪").replace(p,"▫")}(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":case"src":case"srcset":case"alt":case"title":return""}}return t}function b(t){var e=o.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 y(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 w(t){return t.replace(f,"•")}function k(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}function E(){if(h&&null===p)try{p=new RegExp("\\p{N}","gu"),v=new RegExp("\\p{L}","gu"),g=new RegExp("\\p{Sc}","gu")}catch(t){h=!1}}var O=null,x=null,M=!1;function S(){M&&(O={time:s(),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 N(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}M=!0}function T(t){x.activityTime=t}function _(t,e){x.visible="visible"===e?1:0,x.visible||T(t),M=!0}function I(){M&&tr(4)}var D=Object.freeze({__proto__:null,activity:T,compute:I,reset:S,start:function(){M=!1,S()},get state(){return O},stop:function(){S()},track:N,visibility:_}),C=null;function j(t,e){Qr()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(C={key:t,value:e},tr(24))}var A,L=null,z=null;function R(t){t in L||(L[t]=0),t in z||(z[t]=0),L[t]++,z[t]++}function H(t,e){null!==e&&(t in L||(L[t]=0),t in z||(z[t]=0),L[t]+=e,z[t]+=e)}function W(t,e){null!==e&&!1===isNaN(e)&&(t in L||(L[t]=0),(e>L[t]||0===L[t])&&(z[t]=e,L[t]=e))}function Y(t,e,n){return window.setTimeout(Rr(t),e,n)}function q(t){return window.clearTimeout(t)}var X=0,P=0,U=null;function B(){U&&q(U),U=Y(V,P),X=s()}function V(){var t=s();A={gap:t-X},tr(25),A.gap<3e5?U=Y(V,P):Gr&&(j("clarity","suspend"),pi(),["mousemove","touchstart"].forEach((function(t){return Wr(document,t,ti)})),["resize","scroll","pageshow"].forEach((function(t){return Wr(window,t,ti)})))}var F=Object.freeze({__proto__:null,get data(){return A},reset:B,start:function(){P=6e4,X=0},stop:function(){q(U),X=0,P=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(){tr(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){Qr()&&o.lean&&(o.lean=!1,$={key:t},Er(),o.upgrade&&o.upgrade(t),tr(3))}var et=Object.freeze({__proto__:null,get data(){return $},start:function(){!o.lean&&o.upgrade&&o.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(Qr()&&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(){tr(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=[D,a,Object.freeze({__proto__:null,compute:ot,get data(){return nt},identify:rt,reset:ut,set:at,start:function(){ut()},stop:function(){ut()}}),n,Q,r,i,t,F,et,e];function pt(){L={},z={},R(5),ht.forEach((function(t){return Rr(t.start)()}))}function vt(){ht.slice().reverse().forEach((function(t){return Rr(t.stop)()})),L={},z={}}function gt(){ot(),I(),dr(),tr(0),Z(),rr(),Fa()}var mt,bt=[];function yt(t,e,n){o.fraud&&null!==t&&n&&n.length>=5&&(mt={id:t,target:e,checksum:d(n,24)},bt.indexOf(mt.checksum)<0&&(bt.push(mt.checksum),Aa(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=1,Mt=[],St=[],Nt=[],Tt={},_t=[],It=[],Dt=[],Ct=[],jt=[],At=[],Lt=null,zt=null,Rt=null,Ht=null;function Wt(){qt(),Xt(document,!0)}function Yt(){qt()}function qt(){xt=1,Mt=[],St=[],Nt=[],Tt={},_t=[],It=[],Dt="address,password,contact".split(","),Ct="password,secret,pass,social,ssn,code,hidden".split(","),jt="radio,checkbox,range,button,reset,submit".split(","),At="INPUT,SELECT,TEXTAREA".split(","),Lt=new WeakMap,zt=new WeakMap,Rt=new WeakMap,Ht=new WeakMap,kt={}}function Xt(t,e){void 0===e&&(e=!1);try{e&&o.unmask.forEach((function(t){return t.indexOf("!")<0?It.push(t):_t.push(t.substr(1))})),"querySelectorAll"in t&&(o.regions.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return Ce(t,"".concat(e[0]))}))})),o.mask.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return Rt.set(t,3)}))})),o.checksum.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return Ht.set(t,e[0])}))})),It.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return Rt.set(t,0)}))})))}catch(t){Ra(5,1,t?t.name:null)}}function Pt(t,e){if(void 0===e&&(e=!1),null===t)return null;var n=Lt.get(t);return!n&&e&&(n=xt++,Lt.set(t,n)),n||null}function Ut(t){var e=!1;if(t.nodeType===Node.ELEMENT_NODE&&"IFRAME"===t.tagName){var n=t;try{n.contentDocument&&(zt.set(n.contentDocument,n),e=!0)}catch(t){}}return e}function Bt(t){var e=t.nodeType===Node.DOCUMENT_NODE?t:null;return e&&zt.has(e)?zt.get(e):null}function Vt(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 Ft(t){var e=t.parent&&t.parent in St?St[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=St[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?d(t):null})),t.hash.forEach((function(e){return Tt[e]=t.id}))}function Jt(t){var e=Gt(Kt(t));return null!==e&&null!==e.textContent?e.textContent.substr(0,25):""}function Gt(t){return t in Mt?Mt[t]:null}function Zt(t){var e=Pt(t);return e in St?St[e]:null}function Kt(t){return t in Tt?Tt[t]:null}function Qt(t){return Pt(t)in Mt}function $t(){for(var t=[],e=0,n=Nt;e<n.length;e++){var a=n[e];a in St&&t.push(St[a])}return Nt=[],t}function te(t){for(var e=null;null===e&&t.previousSibling;)e=Pt(t.previousSibling),t=t.previousSibling;return e}function ee(t,e,n,a){void 0===n&&(n=!0),void 0===a&&(a=!1);var r=Nt.indexOf(t);r>=0&&1===e&&a?(Nt.splice(r,1),Nt.push(t)):-1===r&&n&&Nt.push(t)}var ne=Object.freeze({__proto__:null,add:function(t,e,n,a){var r,i=Pt(t,!0),u=e?Pt(e):null,c=te(t),s=null,l=je(t)?i:null,d=Ht.has(t)?Ht.get(t):null,f=o.content?1:3;u>=0&&St[u]&&((s=St[u]).children.push(i),l=null===l?s.region:l,d=null===d?s.metadata.fraud:d,f=s.metadata.privacy),n.attributes&&"data-clarity-region"in n.attributes&&(Ce(t,n.attributes["data-clarity-region"]),l=i),Mt[i]=t,St[i]={id:i,parent:u,previous:c,children:[],data:n,selector:null,hash:null,region:l,metadata:{active:!0,suspend:!1,privacy:f,position:null,fraud:d,size:null}},function(t,e,n){var a=e.data,r=e.metadata,i=r.privacy,o=a.attributes||{},u=a.tag.toUpperCase();switch(!0){case At.indexOf(u)>=0:var c=o.type,s="";Object.keys(o).forEach((function(t){return s+=o[t].toLowerCase()}));var l=Ct.some((function(t){return s.indexOf(t)>=0}));r.privacy="INPUT"===u&&jt.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 Rt.has(t):r.privacy=Rt.get(t);break;case Ht.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)||_t.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,Dt,r)}}(t,St[i],s),Ft(St[i]),"IMG"===(r=St[i]).data.tag&&3===r.metadata.privacy&&(r.metadata.size=[]),ee(i,a)},get:Zt,getId:Pt,getNode:Gt,getValue:function(t){return t in St?St[t]:null},has:Qt,hashText:Jt,iframe:Bt,lookup:Kt,parse:Xt,sameorigin:Ut,start:Wt,stop:Yt,update:function(t,e,n,a){var r=Pt(t),i=e?Pt(e):null,o=te(t),u=!1,c=!1;if(r in St){var s=St[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:St[i].children.indexOf(o)+1;St[i].children.splice(d,0,r),s.region=je(t)?r:St[i].region}else!function(t,e){if(t in St){var n=St[t];n.metadata.active=!1,n.parent=null,ee(t,e)}}(r,a);if(null!==l&&l>=0){var f=St[l].children.indexOf(r);f>=0&&St[l].children.splice(f,1)}c=!0}for(var h in n)Vt(s.data,n,h)&&(u=!0,s.data[h]=n[h]);Ft(s),ee(r,a,u,c)}},updates:$t}),ae=5e3,re={},ie=[],oe=null,ue=null,ce=null;function se(){re={},ie=[],oe=null,ue=null}function le(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=ie;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){ie[1===e?"unshift":"push"]({task:t,resolve:n,id:yr()})})),null===oe&&null===ue&&de(),[2,r]}))}))}function de(){var t=ie.shift();t&&(oe=t,t.task().then((function(){t.id===yr()&&(t.resolve(),oe=null,de())})).catch((function(e){t.id===yr()&&(e&&Ra(0,1,e.name,e.message,e.stack),oe=null,de())})))}function fe(t){var e=ge(t);return e in re?performance.now()-re[e].start>re[e].yield?0:1:2}function he(t){re[ge(t)]={start:performance.now(),calls:0,yield:30}}function pe(t){var e=performance.now(),n=ge(t),a=e-re[n].start;H(t.cost,a),R(5),re[n].calls>0&&H(4,a)}function ve(t){return ct(this,void 0,void 0,(function(){var e,n;return st(this,(function(a){switch(a.label){case 0:return(e=ge(t))in re?(pe(t),n=re[e],[4,me()]):[3,2];case 1:n.yield=a.sent().timeRemaining(),function(t){var e=ge(t);if(re&&re[e]){var n=re[e].calls,a=re[e].yield;he(t),re[e].calls=n+1,re[e].yield=a}}(t),a.label=2;case 2:return[2,e in re?1:2]}}))}))}function ge(t){return"".concat(t.id,".").concat(t.cost)}function me(){return ct(this,void 0,void 0,(function(){return st(this,(function(t){switch(t.label){case 0:return ue?[4,ue]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t){ye(t,{timeout:ae})}))]}}))}))}var be,ye=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 we(){be=null}function ke(){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!==be&&c===be.width&&v===be.height||null===c||null===v||(be={width:c,height:v},Ee(8))}function Ee(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,u,c,l,d,f,h,p,v,g,b,y,w,k,E,O,x,M,S,_;return st(this,(function(I){switch(I.label){case 0:switch(a=n||s(),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=be,r.push(i.width),r.push(i.height),N(t,i.width,i.height),Ma(r),[3,10];case 2:for(u=0,c=Se;u<c.length;u++)l=c[u],(r=[l.time,7]).push(l.data.id),r.push(l.data.interaction),r.push(l.data.visibility),r.push(l.data.name),Ma(r);return He(),[3,10];case 3:if(2===fe(e))return[3,10];if(!((d=$t()).length>0))return[3,9];f=0,h=d,I.label=4;case 4:return f<h.length?(p=h[f],0!==(v=fe(e))?[3,6]:[4,ve(e)]):[3,8];case 5:v=I.sent(),I.label=6;case 6:if(2===v)return[3,8];for(g=p.data,b=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=b?["tag","attributes","value"]:["tag"];E<O.length;E++)if(g[x=O[E]])switch(x){case"tag":M=Oe(p),S=k?-1:1,r.push(p.id*S),p.parent&&b&&r.push(p.parent),p.previous&&b&&r.push(p.previous),r.push(y?"*M":g[x]),M&&2===M.length&&r.push("".concat("#").concat(xe(M[0]),".").concat(xe(M[1])));break;case"attributes":for(_ in g[x])void 0!==g[x][_]&&r.push(Me(_,g[x][_],w));break;case"value":yt(p.metadata.fraud,p.id,g[x]),r.push(m(g[x],g.tag,w,k))}I.label=7;case 7:return f++,[3,4];case 8:6===t&&T(a),Ma(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),!o.lean),I.label=9;case 9:return[3,10];case 10:return[2]}}))}))}function Oe(t){if(null!==t.metadata.size&&0===t.metadata.size.length){var e=Gt(t.id);if(e)return[Math.floor(100*e.offsetWidth),Math.floor(100*e.offsetHeight)]}return t.metadata.size}function xe(t){return t.toString(36)}function Me(t,e,n){return"".concat(t,"=").concat(m(e,0===t.indexOf("data-")?"data-":t,n))}var Se=[],Ne=null,Te={},_e=[],Ie=!1,De=null;function Ce(t,e){!1===Ne.has(t)&&(Ne.set(t,e),(De=null===De&&Ie?new IntersectionObserver(Le,{threshold:[0,.2,.4,.6,.8,1]}):De)&&t&&t.nodeType===Node.ELEMENT_NODE&&De.observe(t))}function je(t){return Ne&&Ne.has(t)}function Ae(){for(var t=[],e=0,n=_e;e<n.length;e++){var a=n[e],r=Pt(a.node);r in Te||(r?(a.data.id=r,Te[r]=a.data,Se.push(Re(a.data))):t.push(a))}_e=t,Se.length>0&&Ee(7)}function Le(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(Ne.has(r)&&i.width+i.height>0&&u.width>0&&u.height>0){var c=r?Pt(r):null,s=c in Te?Te[c]:{id:c,name:Ne.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;ze(r,s,s.interaction,d?13:l?10:0),s.visibility>=13&&De&&De.unobserve(r)}}Se.length>0&&Ee(7)}function ze(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 Te&&r||!(e.id in Te))&&(Te[e.id]=e,Se.push(Re(e))):_e.push({node:t,data:e})}function Re(t){return{time:s(),data:{id:t.id,interaction:t.interaction,visibility:t.visibility,name:t.name}}}function He(){Se=[]}var We=[];function Ye(t){var e=ca(t);if(e){var n=e.value,a=n&&n.length>=5&&o.fraud?d(n,24):"";We.push({time:s(t),event:42,data:{target:ca(t),type:e.type,value:n,checksum:a}}),le(la.bind(this,42))}}function qe(){We=[]}function Xe(t){var e={x:0,y:0};if(t&&t.offsetParent)do{var n=t.offsetParent,a=null===n?Bt(t.ownerDocument):null;e.x+=t.offsetLeft,e.y+=t.offsetTop,t=a||n}while(t);return e}var Pe=["input","textarea","radio","button","canvas"],Ue=[];function Be(t){Wr(t,"click",Ve.bind(this,9,t),!0)}function Ve(t,e,n){var a=Bt(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=Xe(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}var c=ca(n),l=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&&(Ue.push({time:s(n),event:t,data:{target:c,x:i,y:o,eX:f,eY:h,button:n.button,reaction:Je(c),context:Ge(l),text:Fe(c),link:l?l.href:null,hash:null,trust:n.isTrusted?1:0}}),le(la.bind(this,t)))}function Fe(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 Je(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(Pe.indexOf(e)>=0)return 0}return 1}function Ge(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 Ze(){Ue=[]}var Ke=[];function Qe(t,e){Ke.push({time:s(e),event:38,data:{target:ca(e),action:t}}),le(la.bind(this,38))}function $e(){Ke=[]}var tn=null,en=[];function nn(t){var e=ca(t),n=Zt(e);if(e&&e.type&&n){var a=e.value;switch(e.type){case"radio":case"checkbox":a=e.checked?"true":"false"}var r={target:e,value:a};en.length>0&&en[en.length-1].data.target===r.target&&en.pop(),en.push({time:s(t),event:27,data:r}),q(tn),tn=Y(an,1e3,27)}}function an(t){le(la.bind(this,t))}function rn(){en=[]}var on,un=[],cn=null;function sn(t,e,n){var a=Bt(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=Xe(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}null!==i&&null!==o&&dn({time:s(n),event:t,data:{target:ca(n),x:i,y:o}})}function ln(t,e,n){var a=Bt(e),r=a?a.contentDocument.documentElement:document.documentElement,i=n.changedTouches,o=s(n);if(i)for(var u=0;u<i.length;u++){var c=i[u],l="clientX"in c?Math.round(c.clientX+r.scrollLeft):null,d="clientY"in c?Math.round(c.clientY+r.scrollTop):null;l=l&&a?l+Math.round(a.offsetLeft):l,d=d&&a?d+Math.round(a.offsetTop):d,null!==l&&null!==d&&dn({time:o,event:t,data:{target:ca(n),x:l,y:d}})}}function dn(t){switch(t.event){case 12:case 15:case 19:var e=un.length,n=e>1?un[e-2]:null;n&&function(t,e){var n=t.data.x-e.data.x,a=t.data.y-e.data.y,r=Math.sqrt(n*n+a*a),i=e.time-t.time,o=e.data.target===t.data.target;return e.event===t.event&&o&&r<20&&i<25}(n,t)&&un.pop(),un.push(t),q(cn),cn=Y(fn,500,t.event);break;default:un.push(t),fn(t.event)}}function fn(t){le(la.bind(this,t))}function hn(){un=[]}function pn(){var t=document.documentElement;on={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},la(11)}function vn(){on=null}var gn=[],mn=null;function bn(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?ca(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){var r=Bt(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:s(t),event:10,data:{target:a,x:i,y:o}};if((null!==t||0!==i||0!==o)&&null!==i&&null!==o){var c=gn.length,l=c>1?gn[c-2]:null;l&&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}(l,u)&&gn.pop(),gn.push(u),q(mn),mn=Y(yn,500,10)}}function yn(t){le(la.bind(this,t))}var wn=null,kn=null,En=null;function On(t){var e=(t.nodeType===Node.DOCUMENT_NODE?t:document).getSelection();if(null!==e&&!(null===e.anchorNode&&null===e.focusNode||e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset)){var n=wn.start?wn.start:null;null!==kn&&null!==wn.start&&n!==e.anchorNode&&(q(En),xn(21)),wn={start:e.anchorNode,startOffset:e.anchorOffset,end:e.focusNode,endOffset:e.focusOffset},kn=e,q(En),En=Y(xn,500,21)}}function xn(t){le(la.bind(this,t))}function Mn(){kn=null,wn={start:0,startOffset:0,end:0,endOffset:0}}var Sn,Nn,Tn=[];function _n(t){Tn.push({time:s(t),event:39,data:{target:ca(t)}}),le(la.bind(this,39))}function In(){Tn=[]}function Dn(t){Sn={name:t.type},la(26,s(t)),pi()}function Cn(){Sn=null}function jn(t){void 0===t&&(t=null),Nn={visible:"visibilityState"in document?document.visibilityState:"default"},la(28,s(t))}function An(){Nn=null}function Ln(t){!function(t){var e=Bt(t);Wr(e?e.contentWindow:t===document?window:t,"scroll",bn,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Be(t),function(t){Wr(t,"cut",Qe.bind(this,0),!0),Wr(t,"copy",Qe.bind(this,1),!0),Wr(t,"paste",Qe.bind(this,2),!0)}(t),function(t){Wr(t,"mousedown",sn.bind(this,13,t),!0),Wr(t,"mouseup",sn.bind(this,14,t),!0),Wr(t,"mousemove",sn.bind(this,12,t),!0),Wr(t,"wheel",sn.bind(this,15,t),!0),Wr(t,"dblclick",sn.bind(this,16,t),!0),Wr(t,"touchstart",ln.bind(this,17,t),!0),Wr(t,"touchend",ln.bind(this,18,t),!0),Wr(t,"touchmove",ln.bind(this,19,t),!0),Wr(t,"touchcancel",ln.bind(this,20,t),!0)}(t),function(t){Wr(t,"input",nn,!0)}(t),function(t){Wr(t,"selectstart",On.bind(this,t),!0),Wr(t,"selectionchange",On.bind(this,t),!0)}(t),function(t){Wr(t,"change",Ye,!0)}(t),function(t){Wr(t,"submit",_n,!0)}(t))}var zn=Object.freeze({__proto__:null,observe:Ln,start:function(){da=[],ha(),Ze(),$e(),hn(),rn(),Wr(window,"resize",pn),pn(),Wr(document,"visibilitychange",jn),jn(),gn=[],bn(),Mn(),qe(),In(),Wr(window,"pagehide",Dn)},stop:function(){da=[],ha(),Ze(),$e(),q(cn),un.length>0&&fn(un[un.length-1].event),q(tn),rn(),vn(),An(),q(mn),gn=[],Mn(),q(En),qe(),In(),Cn()}}),Rn=/[^0-9\.]/g;function Hn(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":lr(5,t[a]),lr(8,t.creator),lr(18,t.headline);break;case"product":lr(5,t[a]),lr(10,t.name),lr(12,t.sku),t.brand&&lr(6,t.brand.name);break;case"aggregaterating":t.ratingValue&&(W(11,Wn(t.ratingValue,100)),W(18,Wn(t.bestRating)),W(19,Wn(t.worstRating))),W(12,Wn(t.ratingCount)),W(17,Wn(t.reviewCount));break;case"person":lr(8,t.name);break;case"offer":lr(7,t.availability),lr(14,t.itemCondition),lr(13,t.priceCurrency),lr(12,t.sku),W(13,Wn(t.price));break;case"brand":lr(6,t.name)}null!==r&&"object"==typeof r&&Hn(r)}}function Wn(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(Rn,""))*e)}return null}var Yn=["title","alt","onload","onfocus","onerror","data-drupal-form-submit-last"],qn=/[\r\n]+/g;function Xn(t,e){var n,a=null;if(2===e&&!1===Qt(t))return a;0!==e&&t.nodeType===Node.TEXT_NODE&&t.parentElement&&"STYLE"===t.parentElement.tagName&&(t=t.parentNode);var r=!1===Qt(t)?"add":"update",i=t.parentElement?t.parentElement:null,o=t.ownerDocument!==document;switch(t.nodeType){case Node.DOCUMENT_TYPE_NODE:i=o&&t.parentNode?Bt(t.parentNode):i;var u=t,c={tag:(o?"iframe:":"")+"*D",attributes:{name:u.name,publicId:u.publicId,systemId:u.systemId}};ne[r](t,i,c,e);break;case Node.DOCUMENT_NODE:t===document&&Xt(document),Pn(t);break;case Node.DOCUMENT_FRAGMENT_NODE:var s=t;if(s.host)if(Xt(s),"function"===typeof s.constructor&&s.constructor.toString().indexOf("[native code]")>=0){Pn(s);for(var l="",d=0,f=("adoptedStyleSheets"in s?s.adoptedStyleSheets:[]);d<f.length;d++){l+=Bn(f[d])}var h={tag:"*S",attributes:{style:l}};ne[r](t,s.host,h,e)}else ne[r](t,s.host,{tag:"*P",attributes:{}},e);break;case Node.TEXT_NODE:if(i=i||t.parentNode,"update"===r||i&&Qt(i)&&"STYLE"!==i.tagName){var p={tag:"*T",value:t.nodeValue};ne[r](t,i,p,e)}break;case Node.ELEMENT_NODE:var v=t,g=v.tagName,m=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;Yn.indexOf(r)<0&&(e[r]=n[a].value)}"INPUT"===t.tagName&&!("value"in e)&&t.value&&(e.value=t.value);return e}(v);switch(i=t.parentElement?t.parentElement:t.parentNode?t.parentNode:null,"http://www.w3.org/2000/svg"===v.namespaceURI&&(g="svg:"+g),g){case"HTML":i=o&&i?Bt(i):null;var b={tag:(o?"iframe:":"")+g,attributes:m};ne[r](t,i,b,e);break;case"SCRIPT":if("type"in m&&"application/ld+json"===m.type)try{Hn(JSON.parse(v.text.replace(qn,"")))}catch(t){}break;case"NOSCRIPT":break;case"META":var y="property"in m?"property":"name"in m?"name":null;if(y&&"content"in m){var w=m.content;switch(m[y]){case"og:title":lr(20,w);break;case"og:type":lr(19,w);break;case"generator":lr(21,w)}}break;case"HEAD":var k={tag:g,attributes:m},E=o&&(null===(n=t.ownerDocument)||void 0===n?void 0:n.location)?t.ownerDocument.location:location;k.attributes["*B"]=E.protocol+"//"+E.host+E.pathname,ne[r](t,i,k,e);break;case"BASE":var O=Zt(t.parentElement);if(O){var x=document.createElement("a");x.href=m.href,O.data.attributes["*B"]=x.protocol+"//"+x.host+x.pathname}break;case"STYLE":var M={tag:g,attributes:m,value:Un(v)};ne[r](t,i,M,e);break;case"IFRAME":var S=t,N={tag:g,attributes:m};Ut(S)&&(!function(t){!1===Qt(t)&&Wr(t,"load",ua.bind(this,t,"childList"),!0)}(S),N.attributes["*O"]="true",S.contentDocument&&S.contentWindow&&"loading"!==S.contentDocument.readyState&&(a=S.contentDocument)),ne[r](t,i,N,e);break;default:var T={tag:g,attributes:m};v.shadowRoot&&(a=v.shadowRoot),ne[r](t,i,T,e)}}return a}function Pn(t){Qt(t)||(!function(t){try{var e=u("MutationObserver"),n=e in window?new window[e](Rr(na)):null;n&&(n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),Fn.push(n))}catch(t){Ra(2,0,t?t.name:null)}}(t),Ln(t))}function Un(t){var e=t.textContent?t.textContent.trim():"",n=t.dataset?Object.keys(t.dataset).length:0;return(0===e.length||n>0)&&(e=Bn(t.sheet)),e}function Bn(t){var e="",n=null;try{n=t?t.cssRules:[]}catch(t){if(Ra(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 Vn(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=fe(e))?[3,3]:[4,ve(e)];case 2:o=c.sent(),c.label=3;case 3:return 2===o?[3,4]:((u=Xn(r,n))&&a.push(u),[3,1]);case 4:return[2]}}))}))}var Fn=[],Jn=[],Gn=null,Zn=null,Kn=null,Qn=[],$n=null,ta=null,ea={};function na(t){var e=s();G(6,e),Jn.push({time:e,mutations:t}),le(aa,1).then((function(){Y(ke),Rr(Ae)()}))}function aa(){return ct(this,void 0,void 0,(function(){var t,e,n,a,r,i,o,u,c,l;return st(this,(function(d){switch(d.label){case 0:he(t={id:yr(),cost:3}),d.label=1;case 1:if(!(Jn.length>0))return[3,8];e=Jn.shift(),n=s(),a=0,r=e.mutations,d.label=2;case 2:return a<r.length?(i=r[a],0!==(o=fe(t))?[3,4]:[4,ve(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?Zt(t.target.parentNode):null;if(a&&"HTML"!==a.data.tag){var r=s()>ta,i=Zt(t.target),o=i&&i.selector?i.selector.join():t.target.nodeName,u=[a.selector?a.selector.join():"",o,t.attributeName,ra(t.addedNodes),ra(t.removedNodes)].join();ea[u]=u in ea?ea[u]:[0,n];var c=ea[u];if(!1===r&&c[0]>=10&&ia(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&&Xt(u.ownerDocument),c&&u&&u.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&u.host&&Xt(u),c){case"attributes":Xn(u,3);break;case"characterData":Xn(u,4);break;case"childList":ia(i.addedNodes,1,t),ia(i.removedNodes,2,t);break;case"suspend":(l=Zt(u))&&(l.metadata.suspend=!0)}d.label=5;case 5:return a++,[3,2];case 6:return[4,Ee(6,t,e.time)];case 7:return d.sent(),[3,1];case 8:return pe(t),[2]}}))}))}function ra(t){for(var e=[],n=0;t&&n<t.length;n++)e.push(t[n].nodeName);return e.join()}function ia(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]:(Vn(t[r],n,e),[3,5]):[3,6];case 2:return 0!==(i=fe(n))?[3,4]:[4,ve(n)];case 3:i=o.sent(),o.label=4;case 4:if(2===i)return[3,6];Xn(t[r],e),o.label=5;case 5:return r++,[3,1];case 6:return[2]}}))}))}function oa(t){return Qn.indexOf(t)<0&&Qn.push(t),$n&&q($n),$n=Y((function(){!function(){for(var t=0,e=Qn;t<e.length;t++){var n=e[t];if(n){var a=n.nodeType===Node.DOCUMENT_FRAGMENT_NODE;if(a&&Qt(n))continue;ua(n,a?"childList":"characterData")}}Qn=[]}()}),33),t}function ua(t,e){Rr(na)([{addedNodes:[t],attributeName:null,attributeNamespace:null,nextSibling:null,oldValue:null,previousSibling:null,removedNodes:[],target:t,type:e}])}function ca(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return ta=s()+3e3,n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function sa(t,e,n){void 0===n&&(n=null);var a={id:0,hash:null,privacy:2,node:t};if(t){var r=Zt(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=Gt(t),a=t in Te?Te[t]:{id:t,visibility:0,interaction:16,name:Ne.get(n)},r=16;switch(e){case 9:r=20;break;case 27:r=30}ze(n,a,r,a.visibility)}(r.region,e),i.fraud&&yt(i.fraud,r.id,n||r.data.value)}}return a}function la(t,e){return void 0===e&&(e=null),ct(this,void 0,void 0,(function(){var n,a,r,i,o,u,c,l,d,f,h,p,v,g,y,w,k,E,O,x,M,S,T,I,D,C,j,A,L,z,R;return st(this,(function(H){switch(n=e||s(),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=un;r<i.length;r++)z=i[r],(o=sa(z.data.target,z.event)).id>0&&((a=[z.time,z.event]).push(o.id),a.push(z.data.x),a.push(z.data.y),Ma(a),N(z.event,z.data.x,z.data.y));hn();break;case 9:for(u=0,c=Ue;u<c.length;u++)z=c[u],l=sa(z.data.target,z.event,z.data.text),a=[z.time,z.event],d=l.hash?l.hash.join("."):"",a.push(l.id),a.push(z.data.x),a.push(z.data.y),a.push(z.data.eX),a.push(z.data.eY),a.push(z.data.button),a.push(z.data.reaction),a.push(z.data.context),a.push(m(z.data.text,"click",l.privacy)),a.push(b(z.data.link)),a.push(d),a.push(z.data.trust),Ma(a),pa(z.time,z.event,d,z.data.x,z.data.y,z.data.reaction,z.data.context);Ze();break;case 38:for(f=0,h=Ke;f<h.length;f++)z=h[f],a=[z.time,z.event],(j=sa(z.data.target,z.event)).id>0&&(a.push(j.id),a.push(z.data.action),Ma(a));$e();break;case 11:p=on,a.push(p.width),a.push(p.height),N(t,p.width,p.height),vn(),Ma(a);break;case 26:v=Sn,a.push(v.name),Cn(),Ma(a);break;case 27:for(g=0,y=en;g<y.length;g++)z=y[g],w=sa(z.data.target,z.event,z.data.value),(a=[z.time,z.event]).push(w.id),a.push(m(z.data.value,"input",w.privacy)),Ma(a);rn();break;case 21:(k=wn)&&(E=sa(k.start,t),O=sa(k.end,t),a.push(E.id),a.push(k.startOffset),a.push(O.id),a.push(k.endOffset),Mn(),Ma(a));break;case 10:for(x=0,M=gn;x<M.length;x++)z=M[x],(S=sa(z.data.target,z.event)).id>0&&((a=[z.time,z.event]).push(S.id),a.push(z.data.x),a.push(z.data.y),Ma(a),N(z.event,z.data.x,z.data.y));gn=[];break;case 42:for(T=0,I=We;T<I.length;T++)z=I[T],a=[z.time,z.event],(j=sa(z.data.target,z.event)).id>0&&((a=[z.time,z.event]).push(j.id),a.push(z.data.type),a.push(m(z.data.value,"change",j.privacy)),a.push(m(z.data.checksum,"checksum",j.privacy)),Ma(a));qe();break;case 39:for(D=0,C=Tn;D<C.length;D++)z=C[D],a=[z.time,z.event],(j=sa(z.data.target,z.event)).id>0&&(a.push(j.id),Ma(a));In();break;case 22:for(A=0,L=fa;A<L.length;A++)z=L[A],(a=[z.time,z.event]).push(z.data.type),a.push(z.data.hash),a.push(z.data.x),a.push(z.data.y),a.push(z.data.reaction),a.push(z.data.context),Ma(a,!1);ha();break;case 28:R=Nn,a.push(R.visible),Ma(a),_(n,R.visible),An()}return[2]}))}))}var da=[],fa=[];function ha(){fa=[]}function pa(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),da.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),N(e,a,r)}var va,ga,ma,ba,ya,wa=0,ka=0,Ea=null,Oa=0;function xa(){ba=!0,wa=0,ka=0,Oa=0,va=[],ga=[],ma={},ya=null}function Ma(t,e){if(void 0===e&&(e=!0),ba){var n=s(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:wa+=r.length;case 37:case 6:case 43:ka+=r.length,va.push(r);break;default:ga.push(r)}R(25);var i=function(){var t=!1===o.lean&&wa>0?100:Dr.sequence*o.delay;return"string"==typeof o.upload?Math.max(Math.min(t,3e4),100):o.delay}();n-Oa>2*i&&(q(Ea),Ea=null),e&&null===Ea&&(25!==a&&B(),Ea=Y(Na,i),Oa=n,nr(ka))}}function Sa(){q(Ea),Na(!0),wa=0,ka=0,Oa=0,va=[],ga=[],ma={},ya=null,ba=!1}function Na(t){return void 0===t&&(t=!1),ct(this,void 0,void 0,(function(){var e,n,a,r,i,u,c,s;return st(this,(function(l){switch(l.label){case 0:return Ea=null,(e=!1===o.lean&&ka>0&&(ka<1048576||Dr.sequence>0))&&W(1,1),Ae(),function(){var t=[];fa=[];for(var e=Dr.start+Dr.duration,n=Math.max(e-2e3,0),a=0,r=da;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&fa.push(i),t.push(i))}da=t,la(22)}(),gt(),n=!0===t,a=JSON.stringify(Ar(n)),r="[".concat(ga.join(),"]"),i=e?"[".concat(va.join(),"]"):"",u=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(u)];case 2:s=l.sent(),l.label=3;case 3:return H(2,(c=s)?c.length:u.length),Ta(u,c,Dr.sequence,n),ga=[],e&&(va=[],ka=0,wa=0),[2]}}))}))}function Ta(t,e,n,a){if(void 0===a&&(a=!1),"string"==typeof o.upload){var r=o.upload,i=!1;if(a&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(r,t))&&Ia(n)}catch(t){}if(!1===i){n in ma?ma[n].attempts++:ma[n]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",r,!0),u.timeout=15e3,u.ontimeout=function(){zr(new Error("".concat("Timeout"," : ").concat(r)))},null!==n&&(u.onreadystatechange=function(){Rr(_a)(u,n)}),u.withCredentials=!0,e?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(e)):u.send(t)}}else if(o.upload){(0,o.upload)(t),Ia(n)}}function _a(t,e){var n=ma[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?ar(6):(0===t.status&&(o.upload=o.fallback?o.fallback:o.upload),Ta(n.data,null,e)):(ya={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&tr(2),200===t.status&&t.responseText&&function(t){for(var e=t&&t.length>0?t.split("\n"):[],n=0,a=e;n<a.length;n++){var r=a[n],i=r&&r.length>0?r.split(/ (.*)/):[""];switch(i[0]){case"END":ar(6);break;case"UPGRADE":tt("Auto");break;case"ACTION":o.action&&i.length>1&&o.action(i[1]);break;case"EXTRACT":i.length>1&&Ba(i[1])}}}(t.responseText),0===t.status&&(Ta(n.data,null,e,!0),ar(3)),t.status>=200&&t.status<=208&&Ia(e),delete ma[e]))}function Ia(t){1===t&&Er()}var Da,Ca={};function ja(t){var e=t.error||t;return e.message in Ca||(Ca[e.message]=0),Ca[e.message]++>=5||e&&e.message&&(Da={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},Aa(31)),!0}function Aa(t){return ct(this,void 0,void 0,(function(){var e;return st(this,(function(n){switch(e=[s(),t],t){case 31:e.push(Da.message),e.push(Da.line),e.push(Da.column),e.push(Da.stack),e.push(b(Da.source)),Ma(e);break;case 33:La&&(e.push(La.code),e.push(La.name),e.push(La.message),e.push(La.stack),e.push(La.severity),Ma(e,!1));break;case 41:mt&&(e.push(mt.id),e.push(mt.target),e.push(mt.checksum),Ma(e,!1))}return[2]}))}))}var La,za={};function Ra(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 za&&za[t].indexOf(i)>=0||(La={code:t,name:n,message:a,stack:r,severity:e},t in za?za[t].push(i):za[t]=[i],Aa(33))}var Ha,Wa={},Ya=new Set,qa={},Xa={},Pa={};function Ua(){Ja()}function Ba(t){try{var e=t&&t.length>0?t.split(/ (.*)/):[""],n=parseInt(e[0]),a=e.length>1?JSON.parse(e[1]):{};for(var r in qa[n]={},Xa[n]={},Pa[n]={},a){var i=parseInt(r),o=a[r],u=2;switch(o.startsWith("~")?u=0:o.startsWith("!")&&(u=4),u){case 0:var c=o.substring(1,o.length);qa[n][i]=Ka(c);break;case 2:Xa[n][i]=o;break;case 4:var s=o.substring(1,o.length);Pa[n][i]=s}}}catch(t){Ra(8,1,t?t.name:null)}}function Va(t){return JSON.parse(JSON.stringify(t))}function Fa(){try{for(var t in qa){var e=parseInt(t),n=qa[e];for(var a in n){var r=parseInt(a),i=(h=Qa(Va(n[r])))?JSON.stringify(h).substring(0,1e4):h;i&&Ga(e,r,i)}var o=Xa[e];for(var u in o){var c=parseInt(u),s=document.querySelectorAll(o[c]);if(s)Ga(e,c,Array.from(s).map((function(t){return t.innerText})).join("<SEP>").substring(0,1e4))}var l=Pa[e];for(var d in l){var f=parseInt(d);Ga(e,f,Jt(l[f]).trim().substring(0,1e4))}}Ya.size>0&&tr(40)}catch(t){Ra(5,1,t?t.name:null)}var h}function Ja(){Ya.clear()}function Ga(t,e,n){var a,r=!1;t in Wa||(Wa[t]={},r=!0),a=Pa[t],0==Object.keys(a).length||e in Wa[t]&&Wa[t][e]==n||(r=!0),Wa[t][e]=n,r&&Ya.add(t)}function Za(){Ja()}function Ka(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 Qa(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&&$a(r,a.condition))n=Qa(t,r);else if(Array.isArray(r)){for(var i=[],o=0,u=r;o<u.length;o++){var c=u[o];if($a(c,a.condition)){var s=Qa(t,c);s&&i.push(s)}}n=i}return n}return null}function $a(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function tr(t){var e=[s(),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),Ma(e,!1)),S();break;case 25:e.push(A.gap),Ma(e);break;case 35:e.push(Ha.check),Ma(e,!1);break;case 3:e.push($.key),Ma(e);break;case 2:e.push(ya.sequence),e.push(ya.attempts),e.push(ya.status),Ma(e,!1);break;case 24:e.push(C.key),e.push(C.value),Ma(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(),Ma(e,!1)}break;case 0:var u=Object.keys(z);if(u.length>0){for(var c=0,l=u;c<l.length;c++){var d=l[c],f=parseInt(d,10);e.push(f),e.push(Math.round(z[d]))}z={},Ma(e,!1)}break;case 1:var h=Object.keys(ur);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(ur[g])}fr(),Ma(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(),Ma(e,!1)}break;case 40:Ya.forEach((function(t){e.push(t);var n=[];for(var a in Wa[t]){var r=parseInt(a,10);n.push(r),n.push(Wa[t][a])}e.push(n)})),Ja(),Ma(e,!1)}}function er(){Ha={check:0}}function nr(t){if(0===Ha.check){var e=Ha.check;e=Dr.sequence>=128?1:e,e=s()>72e5?2:e,(e=t>10485760?2:e)!==Ha.check&&ar(e)}}function ar(t){Ha.check=t,kr(),pi()}function rr(){0!==Ha.check&&tr(35)}function ir(){Ha=null}var or=null,ur=null;function cr(){or={},ur={}}function sr(){or={},ur={}}function lr(t,e){e&&(e="".concat(e),t in or||(or[t]=[]),or[t].indexOf(e)<0&&(or[t].push(e),t in ur||(ur[t]=[]),ur[t].push(e),or[t].length>128&&ar(5)))}function dr(){tr(1)}function fr(){ur={}}var hr=null,pr=[],vr=null;function gr(){vr=null;var t,e=navigator&&"userAgent"in navigator?navigator.userAgent:"",n=document&&document.title?document.title:"",a=function(){var t={session:Mr(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=Tr("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-Sr(n[1])<18e5&&(t.session=n[0],t.count=Sr(n[2])+1,t.upgrade=Sr(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),r=Nr(),i=o.projectId||d(location.host);hr={projectId:i,userId:r.id,sessionId:a.session,pageNum:a.count},o.lean=o.track&&null!==a.upgrade?0===a.upgrade:o.lean,o.upload=o.track&&"string"==typeof o.upload&&a.upload&&a.upload.length>"https://".length?a.upload:o.upload,lr(0,e),lr(3,n),lr(1,b(location.href)),lr(2,document.referrer),lr(15,function(){var t=Mr();if(o.track&&Or(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),lr(16,document.documentElement.lang),lr(17,document.dir),lr(26,"".concat(window.devicePixelRatio)),W(0,a.ts),W(1,0),navigator&&(lr(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;lr(22,t.platform),lr(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){lr(24,t.name+"~"+t.version)})),lr(25,t.model),W(27,t.mobile?1:0)})):lr(22,navigator.platform)),screen&&(W(14,Math.round(screen.width)),W(15,Math.round(screen.height)),W(16,Math.round(screen.colorDepth)));for(var u=0,c=o.cookies;u<c.length;u++){var s=c[u],l=Tr(s);l&&at(s,l)}xr(r)}function mr(){vr=null,hr=null}function br(t,e){void 0===e&&(e=!0);var n=o.lean?0:1;hr&&(n||!1===e)?t(hr,!o.lean):pr.push({callback:t,wait:e})}function yr(){return hr?[hr.userId,hr.sessionId,hr.pageNum].join("."):""}function wr(){Qr()&&(o.track=!0,xr(Nr(),1))}function kr(){_r("_clsk","",0)}function Er(){var t=Math.round(Date.now()),e=o.upload&&"string"==typeof o.upload?o.upload.replace("https://",""):"",n=o.lean?0:1;!function(t){pr.length>0&&pr.forEach((function(e){!e.callback||e.wait&&!t||e.callback(hr,!o.lean)}))}(n),_r("_clsk",[hr.sessionId,t,hr.pageNum,n,e].join("|"),1)}function Or(t,e){try{return!!t[e]}catch(t){return!1}}function xr(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)&&_r("_clck",[hr.userId,1,n.toString(36),e].join("|"),365)}function Mr(){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 Sr(t,e){return void 0===e&&(e=10),parseInt(t,e)}function Nr(){var t={id:Mr(),expiry:null,consent:0},e=Tr("_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 u="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(u),document.cookie="".concat("_clsk","=").concat(u)}n.length>2&&(t.expiry=Sr(n[2],36)),n.length>3&&1===Sr(n[3])&&(t.consent=1),o.track=o.track||1===t.consent,t.id=o.track?n[0]:t.id}return t}function Tr(t){if(Or(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 _r(t,e,n){if(o.track&&(navigator&&navigator.cookieEnabled||Or(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===vr){for(var u=location.hostname?location.hostname.split("."):[],c=u.length-1;c>=0;c--)if(vr=".".concat(u[c]).concat(vr||""),c<u.length-1&&(document.cookie="".concat(i).concat(";").concat("domain=").concat(vr),Tr(t)===e))return;vr=""}}catch(t){vr=""}document.cookie=vr?"".concat(i).concat(";").concat("domain=").concat(vr):i}}var Ir,Dr=null;function Cr(){var t=hr;Dr={version:l,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function jr(){Dr=null}function Ar(t){return Dr.start=Dr.start+Dr.duration,Dr.duration=s()-Dr.start,Dr.sequence++,Dr.upload=t&&"sendBeacon"in navigator?1:0,Dr.end=t?1:0,[Dr.version,Dr.sequence,Dr.start,Dr.duration,Dr.projectId,Dr.userId,Dr.sessionId,Dr.pageNum,Dr.upload,Dr.end]}function Lr(){Ir=[]}function zr(t){if(Ir&&-1===Ir.indexOf(t.message)){var e=o.report;if(e&&e.length>0){var n={v:Dr.version,p:Dr.projectId,u:Dr.userId,s:Dr.sessionId,n:Dr.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e,!0),a.send(JSON.stringify(n)),Ir.push(t.message)}}return t}function Rr(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw zr(t)}var n=performance.now()-e;H(4,n),n>30&&(R(7),W(6,n))}}var Hr=[];function Wr(t,e,n,a){void 0===a&&(a=!1),n=Rr(n);try{t[u("addEventListener")](e,n,a),Hr.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function Yr(){for(var t=0,e=Hr;t<e.length;t++){var n=e[t];try{n.target[u("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}Hr=[]}var qr=null,Xr=null,Pr=null,Ur=0;function Br(){return!(Ur++>20)||(Ra(4,0),!1)}function Vr(){Ur=0,Pr!==Jr()&&(pi(),window.setTimeout(Fr,250))}function Fr(){hi(),W(29,1)}function Jr(){return location.href?location.href.replace(location.hash,""):location.href}var Gr=!1;function Zr(){Gr=!0,c=performance.now(),se(),Yr(),Lr(),Pr=Jr(),Ur=0,Wr(window,"popstate",Vr),null===qr&&(qr=history.pushState,history.pushState=function(){qr.apply(this,arguments),Qr()&&Br()&&Vr()}),null===Xr&&(Xr=history.replaceState,history.replaceState=function(){Xr.apply(this,arguments),Qr()&&Br()&&Vr()})}function Kr(){Pr=null,Ur=0,Lr(),Yr(),se(),c=0,Gr=!1}function Qr(){return Gr}function $r(t){if(null===t||Gr)return!1;for(var e in t)e in o&&(o[e]=t[e]);return!0}function ti(){hi(),j("clarity","restart")}var ei=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)}}(),Wr(window,"error",ja),Ca={},za={}},stop:function(){za={}}});function ni(){return ct(this,void 0,void 0,(function(){var t,e;return st(this,(function(n){switch(n.label){case 0:return t=s(),he(e={id:yr(),cost:3}),[4,Vn(document,e,0)];case 1:return n.sent(),[4,Ee(5,e,t)];case 2:return n.sent(),pe(e),[2]}}))}))}var ai=Object.freeze({__proto__:null,hashText:Jt,start:function(){we(),ke(),He(),De=null,Ne=new WeakMap,Te={},_e=[],Ie=!!window.IntersectionObserver,Wt(),function(){if(Fn=[],Qn=[],$n=null,ta=0,ea={},null===Gn&&(Gn=CSSStyleSheet.prototype.insertRule,CSSStyleSheet.prototype.insertRule=function(){return Qr()&&oa(this.ownerNode),Gn.apply(this,arguments)}),null===Zn&&(Zn=CSSStyleSheet.prototype.deleteRule,CSSStyleSheet.prototype.deleteRule=function(){return Qr()&&oa(this.ownerNode),Zn.apply(this,arguments)}),null===Kn){Kn=Element.prototype.attachShadow;try{Element.prototype.attachShadow=function(){return Qr()?oa(Kn.apply(this,arguments)):Kn.apply(this,arguments)}}catch(t){Kn=null}}}(),le(ni,1).then((function(){Rr(ke)(),Rr(Ae)()}))},stop:function(){He(),Ne=null,Te={},_e=[],De&&(De.disconnect(),De=null),Ie=!1,Yt(),function(){for(var t=0,e=Fn;t<e.length;t++){var n=e[t];n&&n.disconnect()}Fn=[],ea={},Jn=[],Qn=[],ta=0,$n=null}(),we()}});var ri,ii=null;function oi(){ii=null}function ui(t){ii={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=s(),n=[e,t],29===t&&(n.push(ii.fetchStart),n.push(ii.connectStart),n.push(ii.connectEnd),n.push(ii.requestStart),n.push(ii.responseStart),n.push(ii.responseEnd),n.push(ii.domInteractive),n.push(ii.domComplete),n.push(ii.loadEventStart),n.push(ii.loadEventEnd),n.push(ii.redirectCount),n.push(ii.size),n.push(ii.type),n.push(ii.protocol),n.push(ii.encodedSize),n.push(ii.decodedSize),oi(),Ma(n,!1)),[2]}))}))}(29)}var ci=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint"];function si(){try{ri&&ri.disconnect(),ri=new PerformanceObserver(Rr(li));for(var t=0,e=ci;t<e.length;t++){var n=e[t];PerformanceObserver.supportedEntryTypes.indexOf(n)>=0&&("layout-shift"===n&&H(9,0),ri.observe({type:n,buffered:!0}))}}catch(t){Ra(3,1)}}function li(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":ui(a);break;case"resource":var r=a.name;lr(4,di(r)),r!==o.upload&&r!==o.fallback||W(28,a.duration);break;case"longtask":R(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 di(t){var e=document.createElement("a");return e.href=t,e.host}var fi=[ei,ai,zn,Object.freeze({__proto__:null,start:function(){oi(),function(){navigator&&"connection"in navigator&&lr(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?"complete"!==document.readyState?Wr(window,"load",Y.bind(this,si,0)):si():Ra(3,0)}()},stop:function(){ri&&ri.disconnect(),ri=null,oi()}})];function hi(t){void 0===t&&(t=null),function(){try{return!1===Gr&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&($r(t),Zr(),pt(),fi.forEach((function(t){return Rr(t.start)()})),null===t&&bi())}function pi(){Qr()&&(fi.slice().reverse().forEach((function(t){return Rr(t.stop)()})),vt(),Kr(),void 0!==gi&&(gi[mi]=function(){(gi[mi].q=gi[mi].q||[]).push(arguments),"start"===arguments[0]&&gi[mi].q.unshift(gi[mi].q.pop())&&bi()}))}var vi=Object.freeze({__proto__:null,consent:wr,event:j,hashText:Jt,identify:rt,metadata:br,pause:function(){Qr()&&(j("clarity","pause"),null===ue&&(ue=new Promise((function(t){ce=t}))))},resume:function(){Qr()&&(ue&&(ce(),ue=null,null===oe&&de()),j("clarity","resume"))},set:at,start:hi,stop:pi,upgrade:tt,version:l}),gi=window,mi="clarity";function bi(){if(void 0!==gi){if(gi[mi]&&gi[mi].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=gi[mi]&&gi[mi].q||[];for(gi[mi]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return vi[t].apply(vi,e)},gi[mi].v=l;t.length>0;)gi[mi].apply(gi,t.shift())}}bi()}();
|
package/build/clarity.module.js
CHANGED
|
@@ -78,6 +78,8 @@ function setup() {
|
|
|
78
78
|
if (typeof w !== "undefined") {
|
|
79
79
|
w[c] = function () {
|
|
80
80
|
(w[c].q = w[c].q || []).push(arguments);
|
|
81
|
+
// if the start function was called, don't queue it and instead process the queue
|
|
82
|
+
arguments[0] === "start" && w[c].q.unshift(w[c].q.pop()) && process$7();
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
85
|
}
|
|
@@ -147,7 +149,7 @@ function stop$D() {
|
|
|
147
149
|
startTime = 0;
|
|
148
150
|
}
|
|
149
151
|
|
|
150
|
-
var version$1 = "0.7.
|
|
152
|
+
var version$1 = "0.7.7";
|
|
151
153
|
|
|
152
154
|
// tslint:disable: no-bitwise
|
|
153
155
|
function hash (input, precision) {
|
|
@@ -3657,12 +3659,18 @@ function stop$c() {
|
|
|
3657
3659
|
}
|
|
3658
3660
|
|
|
3659
3661
|
var data$5 = {};
|
|
3660
|
-
var keys =
|
|
3662
|
+
var keys = new Set();
|
|
3661
3663
|
var variables = {};
|
|
3662
3664
|
var selectors = {};
|
|
3665
|
+
var hashes = {};
|
|
3663
3666
|
function start$c() {
|
|
3664
3667
|
reset$4();
|
|
3665
3668
|
}
|
|
3669
|
+
// Input string is of the following form:
|
|
3670
|
+
// EXTRACT 101 { "1": ".class1", "2": "~window.a.b", "3": "!abc"}
|
|
3671
|
+
// Which will set up event 101 to grab the contents of the class1 selector into component 1,
|
|
3672
|
+
// the javascript evaluated contents of window.a.b into component 2,
|
|
3673
|
+
// and the contents of Clarity's hash abc into component 3
|
|
3666
3674
|
function trigger$1(input) {
|
|
3667
3675
|
try {
|
|
3668
3676
|
var parts = input && input.length > 0 ? input.split(/ (.*)/) : ["" /* Constant.Empty */];
|
|
@@ -3670,10 +3678,19 @@ function trigger$1(input) {
|
|
|
3670
3678
|
var values = parts.length > 1 ? JSON.parse(parts[1]) : {};
|
|
3671
3679
|
variables[key] = {};
|
|
3672
3680
|
selectors[key] = {};
|
|
3681
|
+
hashes[key] = {};
|
|
3673
3682
|
for (var v in values) {
|
|
3683
|
+
// values is a set of strings for proper JSON parsing, but it's more efficient
|
|
3684
|
+
// to interact with them as numbers
|
|
3674
3685
|
var id = parseInt(v);
|
|
3675
3686
|
var value = values[v];
|
|
3676
|
-
var source =
|
|
3687
|
+
var source = 2 /* ExtractSource.Text */;
|
|
3688
|
+
if (value.startsWith("~" /* Constant.Tilde */)) {
|
|
3689
|
+
source = 0 /* ExtractSource.Javascript */;
|
|
3690
|
+
}
|
|
3691
|
+
else if (value.startsWith("!" /* Constant.Bang */)) {
|
|
3692
|
+
source = 4 /* ExtractSource.Hash */;
|
|
3693
|
+
}
|
|
3677
3694
|
switch (source) {
|
|
3678
3695
|
case 0 /* ExtractSource.Javascript */:
|
|
3679
3696
|
var variable = value.substring(1, value.length);
|
|
@@ -3682,6 +3699,10 @@ function trigger$1(input) {
|
|
|
3682
3699
|
case 2 /* ExtractSource.Text */:
|
|
3683
3700
|
selectors[key][id] = value;
|
|
3684
3701
|
break;
|
|
3702
|
+
case 4 /* ExtractSource.Hash */:
|
|
3703
|
+
var hash = value.substring(1, value.length);
|
|
3704
|
+
hashes[key][id] = hash;
|
|
3705
|
+
break;
|
|
3685
3706
|
}
|
|
3686
3707
|
}
|
|
3687
3708
|
}
|
|
@@ -3696,44 +3717,56 @@ function compute$4() {
|
|
|
3696
3717
|
try {
|
|
3697
3718
|
for (var v in variables) {
|
|
3698
3719
|
var key = parseInt(v);
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
update(key, variableKey, value);
|
|
3706
|
-
}
|
|
3720
|
+
var variableData = variables[key];
|
|
3721
|
+
for (var v_1 in variableData) {
|
|
3722
|
+
var variableKey = parseInt(v_1);
|
|
3723
|
+
var value = str(evaluate(clone(variableData[variableKey])));
|
|
3724
|
+
if (value) {
|
|
3725
|
+
update(key, variableKey, value);
|
|
3707
3726
|
}
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3727
|
+
}
|
|
3728
|
+
var selectorData = selectors[key];
|
|
3729
|
+
for (var s in selectorData) {
|
|
3730
|
+
var selectorKey = parseInt(s);
|
|
3731
|
+
var nodes = document.querySelectorAll(selectorData[selectorKey]);
|
|
3732
|
+
if (nodes) {
|
|
3733
|
+
var text = Array.from(nodes).map(function (e) { return e.innerText; });
|
|
3734
|
+
update(key, selectorKey, text.join("<SEP>" /* Constant.Seperator */).substring(0, 10000 /* Setting.ExtractLimit */));
|
|
3716
3735
|
}
|
|
3717
3736
|
}
|
|
3737
|
+
var hashData = hashes[key];
|
|
3738
|
+
for (var h in hashData) {
|
|
3739
|
+
var hashKey = parseInt(h);
|
|
3740
|
+
var content = hashText(hashData[hashKey]).trim().substring(0, 10000 /* Setting.ExtractLimit */);
|
|
3741
|
+
update(key, hashKey, content);
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
if (keys.size > 0) {
|
|
3745
|
+
encode$1(40 /* Event.Extract */);
|
|
3718
3746
|
}
|
|
3719
3747
|
}
|
|
3720
3748
|
catch (e) {
|
|
3721
3749
|
log$1(5 /* Code.Selector */, 1 /* Severity.Warning */, e ? e.name : null);
|
|
3722
3750
|
}
|
|
3723
|
-
encode$1(40 /* Event.Extract */);
|
|
3724
3751
|
}
|
|
3725
3752
|
function reset$4() {
|
|
3726
|
-
|
|
3727
|
-
keys = [];
|
|
3728
|
-
variables = {};
|
|
3729
|
-
selectors = {};
|
|
3753
|
+
keys.clear();
|
|
3730
3754
|
}
|
|
3731
3755
|
function update(key, subkey, value) {
|
|
3756
|
+
var update = false;
|
|
3732
3757
|
if (!(key in data$5)) {
|
|
3733
|
-
data$5[key] =
|
|
3734
|
-
|
|
3758
|
+
data$5[key] = {};
|
|
3759
|
+
update = true;
|
|
3735
3760
|
}
|
|
3736
|
-
|
|
3761
|
+
if (!isEmpty(hashes[key])
|
|
3762
|
+
&& (!(subkey in data$5[key]) || data$5[key][subkey] != value)) {
|
|
3763
|
+
update = true;
|
|
3764
|
+
}
|
|
3765
|
+
data$5[key][subkey] = value;
|
|
3766
|
+
if (update) {
|
|
3767
|
+
keys.add(key);
|
|
3768
|
+
}
|
|
3769
|
+
return;
|
|
3737
3770
|
}
|
|
3738
3771
|
function stop$b() {
|
|
3739
3772
|
reset$4();
|
|
@@ -3796,6 +3829,9 @@ function match(base, condition) {
|
|
|
3796
3829
|
return prop.length > 1 ? base[prop[0]] == prop[1] : base[prop[0]];
|
|
3797
3830
|
}
|
|
3798
3831
|
return true;
|
|
3832
|
+
}
|
|
3833
|
+
function isEmpty(obj) {
|
|
3834
|
+
return Object.keys(obj).length == 0;
|
|
3799
3835
|
}
|
|
3800
3836
|
|
|
3801
3837
|
function encode$1 (event) {
|
|
@@ -3898,11 +3934,16 @@ function encode$1 (event) {
|
|
|
3898
3934
|
break;
|
|
3899
3935
|
case 40 /* Event.Extract */:
|
|
3900
3936
|
var extractKeys = keys;
|
|
3901
|
-
|
|
3902
|
-
var e = extractKeys_1[_d];
|
|
3937
|
+
extractKeys.forEach((function (e) {
|
|
3903
3938
|
tokens.push(e);
|
|
3904
|
-
|
|
3905
|
-
|
|
3939
|
+
var token = [];
|
|
3940
|
+
for (var d in data$5[e]) {
|
|
3941
|
+
var key = parseInt(d, 10);
|
|
3942
|
+
token.push(key);
|
|
3943
|
+
token.push(data$5[e][d]);
|
|
3944
|
+
}
|
|
3945
|
+
tokens.push(token);
|
|
3946
|
+
}));
|
|
3906
3947
|
reset$4();
|
|
3907
3948
|
queue(tokens, false);
|
|
3908
3949
|
}
|
|
@@ -4050,11 +4091,17 @@ function stop$8() {
|
|
|
4050
4091
|
}
|
|
4051
4092
|
function metadata(cb, wait) {
|
|
4052
4093
|
if (wait === void 0) { wait = true; }
|
|
4053
|
-
|
|
4094
|
+
var upgraded = config$1.lean ? 0 /* BooleanFlag.False */ : 1 /* BooleanFlag.True */;
|
|
4095
|
+
// if caller hasn't specified that they want to skip waiting for upgrade but we've already upgraded, we need to
|
|
4096
|
+
// directly execute the callback rather than adding to our list as we only process callbacks at the moment
|
|
4097
|
+
// we go through the upgrading flow.
|
|
4098
|
+
if (data$2 && (upgraded || wait === false)) {
|
|
4054
4099
|
// Immediately invoke the callback if the caller explicitly doesn't want to wait for the upgrade confirmation
|
|
4055
4100
|
cb(data$2, !config$1.lean);
|
|
4056
4101
|
}
|
|
4057
|
-
|
|
4102
|
+
else {
|
|
4103
|
+
callbacks.push({ callback: cb, wait: wait });
|
|
4104
|
+
}
|
|
4058
4105
|
}
|
|
4059
4106
|
function id() {
|
|
4060
4107
|
return data$2 ? [data$2.userId, data$2.sessionId, data$2.pageNum].join("." /* Constant.Dot */) : "" /* Constant.Empty */;
|
package/package.json
CHANGED
package/src/core/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let version = "0.7.
|
|
1
|
+
let version = "0.7.7";
|
|
2
2
|
export default version;
|
package/src/data/encode.ts
CHANGED
|
@@ -108,10 +108,17 @@ export default function(event: Event): void {
|
|
|
108
108
|
break;
|
|
109
109
|
case Event.Extract:
|
|
110
110
|
let extractKeys = extract.keys;
|
|
111
|
-
|
|
111
|
+
extractKeys.forEach((e => {
|
|
112
112
|
tokens.push(e);
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
let token = []
|
|
114
|
+
for (let d in extract.data[e]) {
|
|
115
|
+
let key = parseInt(d, 10);
|
|
116
|
+
token.push(key);
|
|
117
|
+
token.push(extract.data[e][d]);
|
|
118
|
+
}
|
|
119
|
+
tokens.push(token);
|
|
120
|
+
}));
|
|
121
|
+
|
|
115
122
|
extract.reset();
|
|
116
123
|
queue(tokens, false);
|
|
117
124
|
}
|
package/src/data/extract.ts
CHANGED
|
@@ -3,16 +3,23 @@ import { Event, Setting, ExtractData } from "@clarity-types/data";
|
|
|
3
3
|
import encode from "./encode";
|
|
4
4
|
import * as internal from "@src/diagnostic/internal";
|
|
5
5
|
import { Code, Constant, Severity } from "@clarity-types/data";
|
|
6
|
+
import { hashText } from "@src/clarity";
|
|
6
7
|
|
|
7
8
|
export let data: ExtractData = {};
|
|
8
|
-
export let keys: number
|
|
9
|
+
export let keys: Set<number> = new Set();
|
|
9
10
|
|
|
10
11
|
let variables : { [key: number]: { [key: number]: Syntax[] }} = {};
|
|
11
12
|
let selectors : { [key: number]: { [key: number]: string }} = {};
|
|
13
|
+
let hashes : { [key: number]: { [key: number]: string }} = {};
|
|
12
14
|
export function start(): void {
|
|
13
15
|
reset();
|
|
14
16
|
}
|
|
15
17
|
|
|
18
|
+
// Input string is of the following form:
|
|
19
|
+
// EXTRACT 101 { "1": ".class1", "2": "~window.a.b", "3": "!abc"}
|
|
20
|
+
// Which will set up event 101 to grab the contents of the class1 selector into component 1,
|
|
21
|
+
// the javascript evaluated contents of window.a.b into component 2,
|
|
22
|
+
// and the contents of Clarity's hash abc into component 3
|
|
16
23
|
export function trigger(input: string): void {
|
|
17
24
|
try {
|
|
18
25
|
var parts = input && input.length > 0 ? input.split(/ (.*)/) : [Constant.Empty];
|
|
@@ -20,10 +27,18 @@ export function trigger(input: string): void {
|
|
|
20
27
|
var values = parts.length > 1 ? JSON.parse(parts[1]) : {};
|
|
21
28
|
variables[key] = {};
|
|
22
29
|
selectors[key] = {};
|
|
30
|
+
hashes[key] = {};
|
|
23
31
|
for (var v in values) {
|
|
32
|
+
// values is a set of strings for proper JSON parsing, but it's more efficient
|
|
33
|
+
// to interact with them as numbers
|
|
24
34
|
let id = parseInt(v);
|
|
25
35
|
let value = values[v] as string;
|
|
26
|
-
let source =
|
|
36
|
+
let source = ExtractSource.Text;
|
|
37
|
+
if (value.startsWith(Constant.Tilde)) {
|
|
38
|
+
source = ExtractSource.Javascript
|
|
39
|
+
} else if (value.startsWith(Constant.Bang)) {
|
|
40
|
+
source = ExtractSource.Hash
|
|
41
|
+
}
|
|
27
42
|
switch (source) {
|
|
28
43
|
case ExtractSource.Javascript:
|
|
29
44
|
let variable = value.substring(1, value.length);
|
|
@@ -32,6 +47,10 @@ export function trigger(input: string): void {
|
|
|
32
47
|
case ExtractSource.Text:
|
|
33
48
|
selectors[key][id] = value;
|
|
34
49
|
break;
|
|
50
|
+
case ExtractSource.Hash:
|
|
51
|
+
let hash = value.substring(1, value.length);
|
|
52
|
+
hashes[key][id] = hash;
|
|
53
|
+
break;
|
|
35
54
|
}
|
|
36
55
|
}
|
|
37
56
|
}
|
|
@@ -48,44 +67,63 @@ export function compute(): void {
|
|
|
48
67
|
try {
|
|
49
68
|
for (let v in variables) {
|
|
50
69
|
let key = parseInt(v);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
70
|
+
let variableData = variables[key];
|
|
71
|
+
for (let v in variableData) {
|
|
72
|
+
let variableKey = parseInt(v);
|
|
73
|
+
let value = str(evaluate(clone(variableData[variableKey])));
|
|
74
|
+
if (value) {
|
|
75
|
+
update(key, variableKey, value);
|
|
57
76
|
}
|
|
77
|
+
}
|
|
58
78
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
79
|
+
let selectorData = selectors[key];
|
|
80
|
+
for (let s in selectorData) {
|
|
81
|
+
let selectorKey = parseInt(s);
|
|
82
|
+
let nodes = document.querySelectorAll(selectorData[selectorKey]) as NodeListOf<HTMLElement>;
|
|
83
|
+
if (nodes) {
|
|
84
|
+
let text = Array.from(nodes).map(e => e.innerText)
|
|
85
|
+
update(key, selectorKey, text.join(Constant.Seperator).substring(0, Setting.ExtractLimit));
|
|
67
86
|
}
|
|
68
87
|
}
|
|
88
|
+
|
|
89
|
+
let hashData = hashes[key];
|
|
90
|
+
for (let h in hashData) {
|
|
91
|
+
let hashKey = parseInt(h);
|
|
92
|
+
let content = hashText(hashData[hashKey]).trim().substring(0, Setting.ExtractLimit);
|
|
93
|
+
update(key, hashKey, content);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (keys.size > 0) {
|
|
98
|
+
encode(Event.Extract);
|
|
69
99
|
}
|
|
70
100
|
}
|
|
71
101
|
catch (e) { internal.log(Code.Selector, Severity.Warning, e ? e.name : null); }
|
|
72
|
-
|
|
73
|
-
encode(Event.Extract);
|
|
74
102
|
}
|
|
75
103
|
|
|
76
104
|
export function reset(): void {
|
|
77
|
-
|
|
78
|
-
keys = [];
|
|
79
|
-
variables = {};
|
|
80
|
-
selectors = {};
|
|
105
|
+
keys.clear();
|
|
81
106
|
}
|
|
82
107
|
|
|
83
|
-
export function update(key: number, subkey: number,
|
|
108
|
+
export function update(key: number, subkey: number, value: string): void {
|
|
109
|
+
var update = false;
|
|
84
110
|
if (!(key in data)) {
|
|
85
|
-
data[key] =
|
|
86
|
-
|
|
111
|
+
data[key] = {};
|
|
112
|
+
update = true;
|
|
87
113
|
}
|
|
88
|
-
|
|
114
|
+
|
|
115
|
+
if (!isEmpty(hashes[key])
|
|
116
|
+
&& (!(subkey in data[key]) || data[key][subkey] != value))
|
|
117
|
+
{
|
|
118
|
+
update = true;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
data[key][subkey] = value;
|
|
122
|
+
if (update) {
|
|
123
|
+
keys.add(key);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return;
|
|
89
127
|
}
|
|
90
128
|
|
|
91
129
|
export function stop(): void {
|
|
@@ -151,4 +189,8 @@ function match(base: Object, condition: string): boolean {
|
|
|
151
189
|
}
|
|
152
190
|
|
|
153
191
|
return true;
|
|
154
|
-
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function isEmpty(obj: Object): boolean {
|
|
195
|
+
return Object.keys(obj).length == 0;
|
|
196
|
+
}
|
package/src/data/metadata.ts
CHANGED
|
@@ -85,11 +85,16 @@ export function stop(): void {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
export function metadata(cb: MetadataCallback, wait: boolean = true): void {
|
|
88
|
-
|
|
88
|
+
let upgraded = config.lean ? BooleanFlag.False : BooleanFlag.True;
|
|
89
|
+
// if caller hasn't specified that they want to skip waiting for upgrade but we've already upgraded, we need to
|
|
90
|
+
// directly execute the callback rather than adding to our list as we only process callbacks at the moment
|
|
91
|
+
// we go through the upgrading flow.
|
|
92
|
+
if (data && (upgraded || wait === false)) {
|
|
89
93
|
// Immediately invoke the callback if the caller explicitly doesn't want to wait for the upgrade confirmation
|
|
90
94
|
cb(data, !config.lean);
|
|
95
|
+
} else {
|
|
96
|
+
callbacks.push({callback: cb, wait: wait });
|
|
91
97
|
}
|
|
92
|
-
callbacks.push({callback: cb, wait: wait });
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
export function id(): string {
|
package/src/queue.ts
CHANGED
|
@@ -9,6 +9,8 @@ export function setup() {
|
|
|
9
9
|
if (typeof w !== "undefined") {
|
|
10
10
|
w[c] = function() {
|
|
11
11
|
(w[c].q = w[c].q || []).push(arguments);
|
|
12
|
+
// if the start function was called, don't queue it and instead process the queue
|
|
13
|
+
arguments[0] === "start" && w[c].q.unshift(w[c].q.pop()) && process();
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
16
|
}
|
package/types/core.d.ts
CHANGED
package/types/data.d.ts
CHANGED
|
@@ -289,7 +289,8 @@ export const enum Constant {
|
|
|
289
289
|
ConditionStart = "{",
|
|
290
290
|
ConditionEnd = "}",
|
|
291
291
|
Seperator = "<SEP>",
|
|
292
|
-
Timeout = "Timeout"
|
|
292
|
+
Timeout = "Timeout",
|
|
293
|
+
Bang = "!"
|
|
293
294
|
}
|
|
294
295
|
|
|
295
296
|
export const enum XMLReadyState {
|
|
@@ -409,7 +410,7 @@ export interface UpgradeData {
|
|
|
409
410
|
}
|
|
410
411
|
|
|
411
412
|
export interface ExtractData {
|
|
412
|
-
[key: number]: [number
|
|
413
|
+
[key: number]: { [subkey : number]: string }; // Array of { subkey: number } representing the extracted data
|
|
413
414
|
}
|
|
414
415
|
|
|
415
416
|
export interface UploadData {
|