clarity-js 0.6.37 → 0.6.38

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.js CHANGED
@@ -115,7 +115,7 @@ function stop$B() {
115
115
  startTime = 0;
116
116
  }
117
117
 
118
- var version$1 = "0.6.37";
118
+ var version$1 = "0.6.38";
119
119
 
120
120
  // tslint:disable: no-bitwise
121
121
  function hash (input) {
@@ -604,6 +604,12 @@ function compute$8() {
604
604
  compute$4();
605
605
  }
606
606
 
607
+ // Regular expressions using unicode property escapes
608
+ // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes
609
+ var digitRegex = /\p{N}/gu;
610
+ var letterRegex = /\p{L}/gu;
611
+ var currencyRegex = /\p{Sc}/u;
612
+ var catchallRegex = /\S/gi;
607
613
  function scrub (value, hint, privacy, mangle) {
608
614
  if (mangle === void 0) { mangle = false; }
609
615
  if (value) {
@@ -615,9 +621,9 @@ function scrub (value, hint, privacy, mangle) {
615
621
  case "*T" /* Layout.Constant.TextTag */:
616
622
  case "value":
617
623
  case "placeholder":
618
- return redact(value);
624
+ case "click":
619
625
  case "input":
620
- return mangleToken(value);
626
+ return redact(value);
621
627
  }
622
628
  return value;
623
629
  case 2 /* Privacy.Text */:
@@ -654,7 +660,7 @@ function mangleText(value) {
654
660
  return value;
655
661
  }
656
662
  function mask(value) {
657
- return value.replace(/\S/gi, "\u2022" /* Data.Constant.Mask */);
663
+ return value.replace(catchallRegex, "\u2022" /* Data.Constant.Mask */);
658
664
  }
659
665
  function mangleToken(value) {
660
666
  var length = ((Math.floor(value.length / 5 /* Data.Setting.WordLength */) + 1) * 5 /* Data.Setting.WordLength */);
@@ -666,6 +672,7 @@ function mangleToken(value) {
666
672
  }
667
673
  function redact(value) {
668
674
  var spaceIndex = -1;
675
+ var gap = 0;
669
676
  var hasDigit = false;
670
677
  var hasEmail = false;
671
678
  var hasWhitespace = false;
@@ -682,7 +689,19 @@ function redact(value) {
682
689
  if (array === null) {
683
690
  array = value.split("" /* Data.Constant.Empty */);
684
691
  }
685
- mutate(array, spaceIndex, hasWhitespace ? i : i + 1);
692
+ // Work on a token at a time so we don't have to apply regex to a larger string
693
+ var token = value.substring(spaceIndex + 1, hasWhitespace ? i : i + 1);
694
+ // Check if unicode regex is supported, otherwise fallback to calling mask function on this token
695
+ if (currencyRegex.unicode) {
696
+ // Do not redact information if the token contains a currency symbol
697
+ token = token.match(currencyRegex) ? token : token.replace(letterRegex, "\u2022" /* Data.Constant.Letter */).replace(digitRegex, "\u2022" /* Data.Constant.Digit */);
698
+ }
699
+ else {
700
+ token = mask(token);
701
+ }
702
+ // Merge token back into array at the right place
703
+ array.splice(spaceIndex + 1 - gap, token.length, token);
704
+ gap += token.length - 1;
686
705
  }
687
706
  // Reset digit and email flags after every word boundary, except the beginning of string
688
707
  if (hasWhitespace) {
@@ -693,11 +712,6 @@ function redact(value) {
693
712
  }
694
713
  }
695
714
  return array ? array.join("" /* Data.Constant.Empty */) : value;
696
- }
697
- function mutate(array, start, end) {
698
- for (var i = start + 1; i < end; i++) {
699
- array[i] = "\u2022" /* Data.Constant.Mask */;
700
- }
701
715
  }
702
716
 
703
717
  var history$5 = [];
@@ -1389,7 +1403,7 @@ function observe$8(root) {
1389
1403
  bind(root, "mousedown", mouse.bind(this, 13 /* Event.MouseDown */, root), true);
1390
1404
  bind(root, "mouseup", mouse.bind(this, 14 /* Event.MouseUp */, root), true);
1391
1405
  bind(root, "mousemove", mouse.bind(this, 12 /* Event.MouseMove */, root), true);
1392
- bind(root, "mousewheel", mouse.bind(this, 15 /* Event.MouseWheel */, root), true);
1406
+ bind(root, "wheel", mouse.bind(this, 15 /* Event.MouseWheel */, root), true);
1393
1407
  bind(root, "dblclick", mouse.bind(this, 16 /* Event.DoubleClick */, root), true);
1394
1408
  bind(root, "touchstart", touch.bind(this, 17 /* Event.TouchStart */, root), true);
1395
1409
  bind(root, "touchend", touch.bind(this, 18 /* Event.TouchEnd */, root), true);
@@ -2323,6 +2337,7 @@ var override = [];
2323
2337
  var unmask = [];
2324
2338
  var updatedFragments = {};
2325
2339
  var maskText = [];
2340
+ var maskInput = [];
2326
2341
  var maskDisable = [];
2327
2342
  // The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced
2328
2343
  var idMap = null; // Maps node => id.
@@ -2344,7 +2359,8 @@ function reset$7() {
2344
2359
  hashMap = {};
2345
2360
  override = [];
2346
2361
  unmask = [];
2347
- maskText = "password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip" /* Mask.Text */.split("," /* Constant.Comma */);
2362
+ maskText = "address,password,contact" /* Mask.Text */.split("," /* Constant.Comma */);
2363
+ maskInput = "password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip" /* Mask.Input */.split("," /* Constant.Comma */);
2348
2364
  maskDisable = "radio,checkbox,range,button,reset,submit" /* Mask.Disable */.split("," /* Constant.Comma */);
2349
2365
  idMap = new WeakMap();
2350
2366
  iframeMap = new WeakMap();
@@ -2533,29 +2549,28 @@ function privacy(node, value, parent) {
2533
2549
  break;
2534
2550
  case "type" /* Constant.Type */ in attributes:
2535
2551
  // If this node has an explicit type assigned to it, go through masking rules to determine right privacy setting
2536
- metadata.privacy = inspect(attributes["type" /* Constant.Type */], metadata);
2552
+ metadata.privacy = inspect(attributes["type" /* Constant.Type */], maskInput, metadata);
2537
2553
  break;
2538
2554
  case tag === "INPUT" /* Constant.InputTag */ && current === 0 /* Privacy.None */:
2539
2555
  // If even default privacy setting is to not mask, we still scan through input fields for any sensitive information
2540
2556
  var field_1 = "" /* Constant.Empty */;
2541
2557
  Object.keys(attributes).forEach(function (x) { return field_1 += attributes[x].toLowerCase(); });
2542
- metadata.privacy = inspect(field_1, metadata);
2558
+ metadata.privacy = inspect(field_1, maskInput, metadata);
2543
2559
  break;
2544
2560
  case current === 1 /* Privacy.Sensitive */ && tag === "INPUT" /* Constant.InputTag */:
2561
+ // Look through class names to aggressively mask content
2562
+ metadata.privacy = inspect(attributes["class" /* Constant.Class */], maskText, metadata);
2545
2563
  // If it's a button or an input option, make an exception to disable masking
2546
2564
  metadata.privacy = maskDisable.indexOf(attributes["type" /* Constant.Type */]) >= 0 ? 0 /* Privacy.None */ : current;
2547
2565
  break;
2548
2566
  case current === 1 /* Privacy.Sensitive */:
2549
2567
  // In a mode where we mask sensitive information by default, look through class names to aggressively mask content
2550
- metadata.privacy = inspect(attributes["class" /* Constant.Class */], metadata);
2551
- break;
2552
- default:
2553
- metadata.privacy = parent ? parent.metadata.privacy : metadata.privacy;
2568
+ metadata.privacy = inspect(attributes["class" /* Constant.Class */], maskText, metadata);
2554
2569
  break;
2555
2570
  }
2556
2571
  }
2557
- function inspect(input, metadata) {
2558
- if (input && maskText.some(function (x) { return input.indexOf(x) >= 0; })) {
2572
+ function inspect(input, lookup, metadata) {
2573
+ if (input && lookup.some(function (x) { return input.indexOf(x) >= 0; })) {
2559
2574
  return 2 /* Privacy.Text */;
2560
2575
  }
2561
2576
  return metadata.privacy;
@@ -1 +1 @@
1
- !function(){"use strict";var t=Object.freeze({__proto__:null,get start(){return yn},get stop(){return wn},get parse(){return En},get getId(){return On},get add(){return Mn},get update(){return Sn},get sameorigin(){return Nn},get iframe(){return _n},get getNode(){return In},get getValue(){return Cn},get get(){return jn},get lookup(){return zn},get has(){return Ln},get updates(){return An}}),e=Object.freeze({__proto__:null,get track(){return sa},get start(){return pa},get queue(){return va},get stop(){return ga}}),n=Object.freeze({__proto__:null,get data(){return Ta},get keys(){return Da},get fragments(){return ja},get start(){return za},get clone(){return La},get compute(){return Aa},get reset(){return Ha},get update(){return Ra},get stop(){return Ya}}),a=Object.freeze({__proto__:null,get data(){return xa},get start(){return Ua},get check(){return Ba},get trigger(){return Va},get compute(){return Fa},get stop(){return Ja}}),r=Object.freeze({__proto__:null,get data(){return Ga},get updates(){return Za},get start(){return Ka},get stop(){return Qa},get log(){return $a},get compute(){return tr},get reset(){return er}}),i=Object.freeze({__proto__:null,get data(){return nr},get callbacks(){return ar},get start(){return ir},get stop(){return or},get metadata(){return ur},get id(){return cr},get consent(){return sr},get clear(){return lr},get save(){return dr}}),o=Object.freeze({__proto__:null,get data(){return wr},get start(){return kr},get stop(){return Er},get envelope(){return Or}}),u={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,mask:[],unmask:[],regions:[],extract:[],cookies:[],fraud:[],report:null,upload:null,fallback:null,upgrade:null};function c(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var s=0;function l(t){return void 0===t&&(t=null),t=t||performance.now(),Math.max(Math.round(t-s),0)}var d="0.6.37";function f(t){for(var e=5381,n=e,a=0;a<t.length;a+=2){if(e=(e<<5)+e^t.charCodeAt(a),a+1<t.length)n=(n<<5)+n^t.charCodeAt(a+1)}return Math.abs(e+11579*n).toString(36)}var h=null,p=null,v=!1;function g(){v&&(h={time:l(),event:4,data:{visible:p.visible,docWidth:p.docWidth,docHeight:p.docHeight,screenWidth:p.screenWidth,screenHeight:p.screenHeight,scrollX:p.scrollX,scrollY:p.scrollY,pointerX:p.pointerX,pointerY:p.pointerY,activityTime:p.activityTime}}),p=p||{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:p.docWidth=e,p.docHeight=n;break;case 11:p.screenWidth=e,p.screenHeight=n;break;case 10:p.scrollX=e,p.scrollY=n;break;default:p.pointerX=e,p.pointerY=n}v=!0}function b(t){p.activityTime=t}function y(t,e){p.visible="visible"===e?1:0,p.visible||b(t),v=!0}function w(){v&&Pa(4)}var k=Object.freeze({__proto__:null,get state(){return h},start:function(){v=!1,g()},reset:g,track:m,activity:b,visibility:y,compute:w,stop:function(){g()}}),E=null;function O(t,e){Xr()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(E={key:t,value:e},Pa(24))}var M,S=null,N=null;function _(t){t in S||(S[t]=0),t in N||(N[t]=0),S[t]++,N[t]++}function x(t,e){null!==e&&(t in S||(S[t]=0),t in N||(N[t]=0),S[t]+=e,N[t]+=e)}function T(t,e){null!==e&&!1===isNaN(e)&&(t in S||(S[t]=0),(e>S[t]||0===S[t])&&(N[t]=e,S[t]=e))}function D(t,e,n){return window.setTimeout(Nr(t),e,n)}function I(t){return window.clearTimeout(t)}var C=0,j=0,z=null;function L(){z&&I(z),z=D(A,j),C=l()}function A(){var t=l();M={gap:t-C},Pa(25),M.gap<3e5?z=D(A,j):Rr&&(O("clarity","suspend"),ai(),["mousemove","touchstart"].forEach((function(t){return xr(document,t,Pr)})),["resize","scroll","pageshow"].forEach((function(t){return xr(window,t,Pr)})))}var H=Object.freeze({__proto__:null,get data(){return M},start:function(){j=6e4,C=0},reset:L,stop:function(){I(z),C=0,j=0}}),R=null;function Y(t,e){if(t in R){var n=R[t],a=n[n.length-1];e-a[0]>100?R[t].push([e,0]):a[1]=e-a[0]}else R[t]=[[e,0]]}function W(){Pa(36)}function X(){R={}}var q=Object.freeze({__proto__:null,get data(){return R},start:function(){R={}},stop:function(){R={}},track:Y,compute:W,reset:X}),P=null;function U(t){Xr()&&u.lean&&(u.lean=!1,P={key:t},dr(),u.upgrade&&u.upgrade(t),Pa(3))}var B=Object.freeze({__proto__:null,get data(){return P},start:function(){!u.lean&&u.upgrade&&u.upgrade("Config"),P=null},upgrade:U,stop:function(){P=null}}),V=null;function F(t,e){G(t,"string"==typeof e?[e]:e)}function J(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),G("userId",[t]),G("sessionId",[e]),G("pageId",[n])}function G(t,e){if(Xr()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in V?V[t]:[]),a=0;a<e.length;a++)"string"==typeof e[a]&&e[a].length<255&&n.push(e[a]);V[t]=n}}function Z(){Pa(34)}function K(){V={}}function Q(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 $(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(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(r=2&i[0]?a.return:i[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,i[1])).done)return r;switch(a=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,a=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){o.label=i[1];break}if(6===i[0]&&o.label<r[1]){o.label=r[1],r=i;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(i);break}r[2]&&o.ops.pop(),o.trys.pop();continue}i=e.call(t,o)}catch(t){i=[6,t],a=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var tt="CompressionStream"in window;function et(t){return Q(this,void 0,void 0,(function(){var e,n;return $(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),tt?(e=new ReadableStream({start:function(e){return Q(this,void 0,void 0,(function(){return $(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,nt(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 nt(t){return Q(this,void 0,void 0,(function(){var e,n,a,r,i;return $(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 at=[k,r,Object.freeze({__proto__:null,get data(){return V},start:function(){K()},set:F,identify:J,compute:Z,reset:K,stop:function(){K()}}),a,q,i,o,e,H,B,n];function rt(){S={},N={},_(5),at.forEach((function(t){return Nr(t.start)()}))}function it(){at.slice().reverse().forEach((function(t){return Nr(t.stop)()})),S={},N={}}function ot(){Z(),w(),tr(),Pa(0),W(),Fa(),Aa()}function ut(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":return function(t){for(var e=-1,n=!1,a=!1,r=!1,i=null,o=0;o<t.length;o++){var u=t.charCodeAt(o);n=n||u>=48&&u<=57,a=a||64===u,r=9===u||10===u||13===u||32===u,(0===o||o===t.length-1||r)&&((n||a)&&(null===i&&(i=t.split("")),lt(i,e,r?o:o+1)),r&&(n=!1,a=!1,e=o))}return i?i.join(""):t}(t);case"input":return st(t)}return t;case 2:case 3:switch(e){case"*T":return a?function(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}(t):ct(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":return st(t);case"placeholder":return ct(t)}}return t}function ct(t){return t.replace(/\S/gi,"•")}function st(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 lt(t,e,n){for(var a=e+1;a<n;a++)t[a]="•"}var dt,ft=[];function ht(t,e,n){null!==t&&n&&n.length>=5&&(dt={id:t,target:e,hash:f(n)},ft.indexOf(dt.hash)<0&&(ft.push(dt.hash),Ma(41)))}var pt=["DIV","TR","P","LI","UL","A","BUTTON"];function vt(t,e){void 0===e&&(e=!1);var n=t.attributes,a=t.prefix?t.prefix[e?1:0]:null,r=e||n&&!("class"in n)||pt.indexOf(t.tag)>=0?":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,">"),t.tag=0===t.tag.indexOf("svg:")?t.tag.substr("svg:".length):t.tag;var i="".concat(a).concat(t.tag).concat(r),o="class"in n&&n.class.length>0?n.class.trim().split(/\s+/):null;if(e){var u="id"in n&&n.id.length>0?n.id:null;i=(o="BODY"!==t.tag&&o?o.filter((function(t){return!gt(t)})):[]).length>0?"".concat(a).concat(t.tag,".").concat(o.join(".")).concat(r):i,i=u&&!1===gt(u)?"".concat(function(t){var e=t.lastIndexOf("*S"),n=t.lastIndexOf("".concat("iframe:").concat("HTML")),a=Math.max(e,n);if(a<0)return"";var r=t.indexOf(">",a)+1;return t.substr(0,r)}(a),"#").concat(u):i}else i=o?"".concat(a).concat(t.tag,".").concat(o.join(".")).concat(r):i;return i}}function gt(t){for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n>=48&&n<=57)return!0}return!1}var mt={},bt=[],yt=null,wt=null,kt=null;function Et(){mt={},bt=[],yt=null,wt=null}function Ot(t,e){return void 0===e&&(e=0),Q(this,void 0,void 0,(function(){var n,a,r;return $(this,(function(i){for(n=0,a=bt;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){bt[1===e?"unshift":"push"]({task:t,resolve:n,id:cr()})})),null===yt&&null===wt&&Mt(),[2,r]}))}))}function Mt(){var t=bt.shift();t&&(yt=t,t.task().then((function(){t.id===cr()&&(t.resolve(),yt=null,Mt())})).catch((function(e){t.id===cr()&&(e&&_a(0,1,e.name,e.message,e.stack),yt=null,Mt())})))}function St(t){var e=Tt(t);return e in mt?performance.now()-mt[e].start>mt[e].yield?0:1:2}function Nt(t){mt[Tt(t)]={start:performance.now(),calls:0,yield:30}}function _t(t){var e=performance.now(),n=Tt(t),a=e-mt[n].start;x(t.cost,a),_(5),mt[n].calls>0&&x(4,a)}function xt(t){return Q(this,void 0,void 0,(function(){var e,n;return $(this,(function(a){switch(a.label){case 0:return(e=Tt(t))in mt?(_t(t),n=mt[e],[4,Dt()]):[3,2];case 1:n.yield=a.sent().timeRemaining(),function(t){var e=Tt(t);if(mt&&mt[e]){var n=mt[e].calls,a=mt[e].yield;Nt(t),mt[e].calls=n+1,mt[e].yield=a}}(t),a.label=2;case 2:return[2,e in mt?1:2]}}))}))}function Tt(t){return"".concat(t.id,".").concat(t.cost)}function Dt(){return Q(this,void 0,void 0,(function(){return $(this,(function(t){switch(t.label){case 0:return wt?[4,wt]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t){Ct(t,{timeout:5e3})}))]}}))}))}var It,Ct=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 jt(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),Q(this,void 0,void 0,(function(){var a,r,i,o,c,s,d,f,h,p,v,g,y,w,k,E,O,M,S,N,_,x;return $(this,(function(T){switch(T.label){case 0:switch(a=n||l(),r=[a,t],t){case 8:return[3,1];case 7:return[3,2];case 5:case 6:return[3,3]}return[3,10];case 1:return i=It,r.push(i.width),r.push(i.height),m(t,i.width,i.height),va(r),[3,10];case 2:for(o=0,c=Yn;o<c.length;o++)s=c[o],(r=[s.time,7]).push(s.data.id),r.push(s.data.interaction),r.push(s.data.visibility),r.push(s.data.name),va(r);return Kn(),[3,10];case 3:if(2===St(e))return[3,10];if(!((d=An()).length>0))return[3,9];f=0,h=d,T.label=4;case 4:return f<h.length?(p=h[f],0!==(v=St(e))?[3,6]:[4,xt(e)]):[3,8];case 5:v=T.sent(),T.label=6;case 6:if(2===v)return[3,8];for(g=p.data,y=p.metadata.active,w=p.metadata.suspend,k=p.metadata.privacy,E=function(t){var e=t.metadata.privacy;return"*T"===t.data.tag&&!(0===e||1===e)}(p),O=0,M=y?["tag","attributes","value"]:["tag"];O<M.length;O++)if(g[S=M[O]])switch(S){case"tag":N=zt(p),_=E?-1:1,r.push(p.id*_),p.parent&&y&&r.push(p.parent),p.previous&&y&&r.push(p.previous),r.push(w?"*M":g[S]),N&&2===N.length&&r.push("".concat("#").concat(Lt(N[0]),".").concat(Lt(N[1])));break;case"attributes":for(x in g[S])void 0!==g[S][x]&&r.push(At(x,g[S][x],k));break;case"value":ht(p.metadata.fraud,p.id,g[S]),r.push(ut(g[S],g.tag,k,E))}T.label=7;case 7:return f++,[3,4];case 8:6===t&&b(a),va(function(t){for(var e=[],n={},a=0,r=null,i=0;i<t.length;i++)if("string"==typeof t[i]){var o=t[i],u=n[o]||-1;u>=0?r?r.push(u):(r=[u],e.push(r),a++):(r=null,e.push(o),n[o]=a++)}else r=null,e.push(t[i]),a++;return e}(r),!u.lean),T.label=9;case 9:return[3,10];case 10:return[2]}}))}))}function zt(t){if(null!==t.metadata.size&&0===t.metadata.size.length){var e=In(t.id);if(e)return[Math.floor(100*e.offsetWidth),Math.floor(100*e.offsetHeight)]}return t.metadata.size}function Lt(t){return t.toString(36)}function At(t,e,n){return"".concat(t,"=").concat(ut(e,t,n))}function Ht(){It=null}function Rt(){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!==It&&c===It.width&&v===It.height||null===c||null===v||(It={width:c,height:v},jt(8))}function Yt(t){var e={x:0,y:0};if(t&&t.offsetParent)do{var n=t.offsetParent,a=null===n?_n(t.ownerDocument):null;e.x+=t.offsetLeft,e.y+=t.offsetTop,t=a||n}while(t);return e}var Wt=["input","textarea","radio","button","canvas"],Xt=[];function qt(t){xr(t,"click",Pt.bind(this,9,t),!0)}function Pt(t,e,n){var a=_n(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=Yt(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}var c=Qn(n),s=function(t){for(;t&&t!==document;){if(t.nodeType===Node.ELEMENT_NODE){var e=t;if("A"===e.tagName)return e}t=t.parentNode}return null}(c),d=function(t){var e=null,n=document.documentElement;if("function"==typeof t.getBoundingClientRect){var a=t.getBoundingClientRect();a&&a.width>0&&a.height>0&&(e={x:Math.floor(a.left+("pageXOffset"in window?window.pageXOffset:n.scrollLeft)),y:Math.floor(a.top+("pageYOffset"in window?window.pageYOffset:n.scrollTop)),w:Math.floor(a.width),h:Math.floor(a.height)})}return e}(c);0===n.detail&&d&&(i=Math.round(d.x+d.w/2),o=Math.round(d.y+d.h/2));var f=d?Math.max(Math.floor((i-d.x)/d.w*32767),0):0,h=d?Math.max(Math.floor((o-d.y)/d.h*32767),0):0;null!==i&&null!==o&&(Xt.push({time:l(),event:t,data:{target:c,x:i,y:o,eX:f,eY:h,button:n.button,reaction:Bt(c),context:Vt(s),text:Ut(c),link:s?s.href:null,hash:null,trust:n.isTrusted?1:0}}),Ot(ta.bind(this,t)))}function Ut(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 Bt(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(Wt.indexOf(e)>=0)return 0}return 1}function Vt(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 Ft(){Xt=[]}var Jt=[];function Gt(t,e){Jt.push({time:l(),event:38,data:{target:Qn(e),action:t}}),Ot(ta.bind(this,38))}function Zt(){Jt=[]}var Kt=null,Qt=[];function $t(t){var e=Qn(t),n=jn(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};Qt.length>0&&Qt[Qt.length-1].data.target===r.target&&Qt.pop(),Qt.push({time:l(),event:27,data:r}),I(Kt),Kt=D(te,500,27)}}function te(t){Ot(ta.bind(this,t))}function ee(){Qt=[]}var ne,ae=[],re=null;function ie(t,e,n){var a=_n(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=Yt(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}null!==i&&null!==o&&ue({time:l(),event:t,data:{target:Qn(n),x:i,y:o}})}function oe(t,e,n){var a=_n(e),r=a?a.contentDocument.documentElement:document.documentElement,i=n.changedTouches,o=l();if(i)for(var u=0;u<i.length;u++){var c=i[u],s="clientX"in c?Math.round(c.clientX+r.scrollLeft):null,d="clientY"in c?Math.round(c.clientY+r.scrollTop):null;s=s&&a?s+Math.round(a.offsetLeft):s,d=d&&a?d+Math.round(a.offsetTop):d,null!==s&&null!==d&&ue({time:o,event:t,data:{target:Qn(n),x:s,y:d}})}}function ue(t){switch(t.event){case 12:case 15:case 19:var e=ae.length,n=e>1?ae[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)&&ae.pop(),ae.push(t),I(re),re=D(ce,500,t.event);break;default:ae.push(t),ce(t.event)}}function ce(t){Ot(ta.bind(this,t))}function se(){ae=[]}function le(){var t=document.documentElement;ne={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},ta(11)}function de(){ne=null}var fe=[],he=null;function pe(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?Qn(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){var r=_n(a);e=r?r.contentWindow:e,a=n=a.documentElement}var i=a===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(a.scrollLeft),o=a===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(a.scrollTop),u={time:l(),event:10,data:{target:a,x:i,y:o}};if((null!==t||0!==i||0!==o)&&null!==i&&null!==o){var c=fe.length,s=c>1?fe[c-2]:null;s&&function(t,e){var n=t.data.x-e.data.x,a=t.data.y-e.data.y;return n*n+a*a<400&&e.time-t.time<25}(s,u)&&fe.pop(),fe.push(u),I(he),he=D(ve,500,10)}}function ve(t){Ot(ta.bind(this,t))}var ge=null,me=null,be=null;function ye(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=ge.start?ge.start:null;null!==me&&null!==ge.start&&n!==e.anchorNode&&(I(be),we(21)),ge={start:e.anchorNode,startOffset:e.anchorOffset,end:e.focusNode,endOffset:e.focusOffset},me=e,I(be),be=D(we,500,21)}}function we(t){Ot(ta.bind(this,t))}function ke(){me=null,ge={start:0,startOffset:0,end:0,endOffset:0}}var Ee,Oe,Me=[];function Se(t){Me.push({time:l(),event:39,data:{target:Qn(t)}}),Ot(ta.bind(this,39))}function Ne(){Me=[]}function _e(t){Ee={name:t.type},ta(26),ai()}function xe(){Ee=null}function Te(){Oe={visible:"visibilityState"in document?document.visibilityState:"default"},ta(28)}function De(){Oe=null}function Ie(t){!function(t){var e=_n(t);xr(e?e.contentWindow:t===document?window:t,"scroll",pe,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(qt(t),function(t){xr(t,"cut",Gt.bind(this,0),!0),xr(t,"copy",Gt.bind(this,1),!0),xr(t,"paste",Gt.bind(this,2),!0)}(t),function(t){xr(t,"mousedown",ie.bind(this,13,t),!0),xr(t,"mouseup",ie.bind(this,14,t),!0),xr(t,"mousemove",ie.bind(this,12,t),!0),xr(t,"mousewheel",ie.bind(this,15,t),!0),xr(t,"dblclick",ie.bind(this,16,t),!0),xr(t,"touchstart",oe.bind(this,17,t),!0),xr(t,"touchend",oe.bind(this,18,t),!0),xr(t,"touchmove",oe.bind(this,19,t),!0),xr(t,"touchcancel",oe.bind(this,20,t),!0)}(t),function(t){xr(t,"input",$t,!0)}(t),function(t){xr(t,"selectstart",ye.bind(this,t),!0),xr(t,"selectionchange",ye.bind(this,t),!0)}(t),function(t){xr(t,"submit",Se,!0)}(t))}var Ce=Object.freeze({__proto__:null,start:function(){ea=[],aa(),Ft(),Zt(),se(),ee(),xr(window,"resize",le),le(),xr(document,"visibilitychange",Te),Te(),fe=[],pe(),ke(),Ne(),xr(window,"pagehide",_e)},stop:function(){ea=[],aa(),Ft(),Zt(),I(re),ae.length>0&&ce(ae[ae.length-1].event),I(Kt),ee(),de(),De(),I(he),fe=[],ke(),I(be),Ne(),xe()},observe:Ie}),je=/[^0-9\.]/g;function ze(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":$a(5,t[a]),$a(8,t.creator),$a(18,t.headline);break;case"product":$a(5,t[a]),$a(10,t.name),$a(12,t.sku),t.brand&&$a(6,t.brand.name);break;case"aggregaterating":t.ratingValue&&(T(11,Le(t.ratingValue,100)),T(18,Le(t.bestRating)),T(19,Le(t.worstRating))),T(12,Le(t.ratingCount)),T(17,Le(t.reviewCount));break;case"person":$a(8,t.name);break;case"offer":$a(7,t.availability),$a(14,t.itemCondition),$a(13,t.priceCurrency),$a(12,t.sku),T(13,Le(t.price));break;case"brand":$a(6,t.name)}null!==r&&"object"==typeof r&&ze(r)}}function Le(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(je,""))*e)}return null}var Ae=["title","alt","onload","onfocus","onerror","data-drupal-form-submit-last"],He=/[\r\n]+/g;function Re(e,n){var a=null;if(2===n&&!1===Ln(e))return a;0!==n&&e.nodeType===Node.TEXT_NODE&&e.parentElement&&"STYLE"===e.parentElement.tagName&&(e=e.parentNode);var r=!1===Ln(e)?"add":"update",i=e.parentElement?e.parentElement:null,o=e.ownerDocument!==document;switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:i=o&&e.parentNode?_n(e.parentNode):i;var u=e,c={tag:(o?"iframe:":"")+"*D",attributes:{name:u.name,publicId:u.publicId,systemId:u.systemId}};t[r](e,i,c,n);break;case Node.DOCUMENT_NODE:e===document&&En(document),Ye(e);break;case Node.DOCUMENT_FRAGMENT_NODE:var s=e;if(s.host)if(En(s),"function"===typeof s.constructor&&s.constructor.toString().indexOf("[native code]")>=0){Ye(s);for(var l="",d=0,f=("adoptedStyleSheets"in s?s.adoptedStyleSheets:[]);d<f.length;d++){l+=Xe(f[d])}var h={tag:"*S",attributes:{style:l}};t[r](e,s.host,h,n)}else t[r](e,s.host,{tag:"*P",attributes:{}},n);break;case Node.TEXT_NODE:if(i=i||e.parentNode,"update"===r||i&&Ln(i)&&"STYLE"!==i.tagName){var p={tag:"*T",value:e.nodeValue};t[r](e,i,p,n)}break;case Node.ELEMENT_NODE:var v=e,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;Ae.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=e.parentElement?e.parentElement:e.parentNode?e.parentNode:null,"http://www.w3.org/2000/svg"===v.namespaceURI&&(g="svg:"+g),g){case"HTML":i=o&&i?_n(i):null;var b={tag:(o?"iframe:":"")+g,attributes:m};t[r](e,i,b,n);break;case"SCRIPT":if("type"in m&&"application/ld+json"===m.type)try{ze(JSON.parse(v.text.replace(He,"")))}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":$a(20,w);break;case"og:type":$a(19,w);break;case"generator":$a(21,w)}}break;case"HEAD":var k={tag:g,attributes:m};location&&(k.attributes["*B"]=location.protocol+"//"+location.hostname),t[r](e,i,k,n);break;case"STYLE":var E={tag:g,attributes:m,value:We(v)};t[r](e,i,E,n);break;case"IFRAME":var O=e,M={tag:g,attributes:m};Nn(O)&&(!function(t){!1===Ln(t)&&xr(t,"load",an.bind(this,t,"childList"),!0)}(O),M.attributes["*O"]="true",O.contentDocument&&O.contentWindow&&"loading"!==O.contentDocument.readyState&&(a=O.contentDocument)),t[r](e,i,M,n);break;default:var S={tag:g,attributes:m};v.shadowRoot&&(a=v.shadowRoot),t[r](e,i,S,n)}}return a}function Ye(t){Ln(t)||(!function(t){try{var e=c("MutationObserver"),n=e in window?new window[e](Nr(Qe)):null;n&&(n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),Pe.push(n))}catch(t){_a(2,0,t?t.name:null)}}(t),Ie(t))}function We(t){var e=t.textContent?t.textContent.trim():"",n=t.dataset?Object.keys(t.dataset).length:0;return(0===e.length||n>0)&&(e=Xe(t.sheet)),e}function Xe(t){var e="",n=null;try{n=t?t.cssRules:[]}catch(t){if(_a(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 qe(t,e,n){return Q(this,void 0,void 0,(function(){var a,r,i,o,u;return $(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=St(e))?[3,3]:[4,xt(e)];case 2:o=c.sent(),c.label=3;case 3:return 2===o?[3,4]:((u=Re(r,n))&&a.push(u),[3,1]);case 4:return[2]}}))}))}var Pe=[],Ue=[],Be=null,Ve=null,Fe=null,Je=[],Ge=null,Ze=null,Ke={};function Qe(t){var e=l();Y(6,e),Ue.push({time:e,mutations:t}),Ot($e,1).then((function(){D(Rt),Nr(Fn)()}))}function $e(){return Q(this,void 0,void 0,(function(){var t,e,n,a,r,i,o,u,c;return $(this,(function(s){switch(s.label){case 0:Nt(t={id:cr(),cost:3}),s.label=1;case 1:if(!(Ue.length>0))return[3,8];e=Ue.shift(),n=0,a=e.mutations,s.label=2;case 2:return n<a.length?(r=a[n],0!==(i=St(t))?[3,4]:[4,xt(t)]):[3,6];case 3:i=s.sent(),s.label=4;case 4:if(2===i)return[3,6];switch(o=r.target,u=function(t,e){var n=t.target?jn(t.target.parentNode):null;if(n&&"HTML"!==n.data.tag){var a=l()>Ze,r=jn(t.target),i=r&&r.selector?r.selector.join():t.target.nodeName,o=[n.selector?n.selector.join():"",i,t.attributeName,tn(t.addedNodes),tn(t.removedNodes)].join();Ke[o]=o in Ke?Ke[o]:[0];var u=Ke[o];if(!1===a&&u[0]>=10&&en(u[1],2,e),u[0]=a?u[0]+1:1,10===u[0])return u[1]=t.removedNodes,"suspend";if(u[0]>10)return""}return t.type}(r,t),u&&o&&o.ownerDocument&&En(o.ownerDocument),u&&o&&o.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&o.host&&En(o),u){case"attributes":Re(o,3);break;case"characterData":Re(o,4);break;case"childList":en(r.addedNodes,1,t),en(r.removedNodes,2,t);break;case"suspend":(c=jn(o))&&(c.metadata.suspend=!0)}s.label=5;case 5:return n++,[3,2];case 6:return[4,jt(6,t,e.time)];case 7:return s.sent(),[3,1];case 8:return _t(t),[2]}}))}))}function tn(t){for(var e=[],n=0;t&&n<t.length;n++)e.push(t[n].nodeName);return e.join()}function en(t,e,n){return Q(this,void 0,void 0,(function(){var a,r,i;return $(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]:(qe(t[r],n,e),[3,5]):[3,6];case 2:return 0!==(i=St(n))?[3,4]:[4,xt(n)];case 3:i=o.sent(),o.label=4;case 4:if(2===i)return[3,6];Re(t[r],e),o.label=5;case 5:return r++,[3,1];case 6:return[2]}}))}))}function nn(t,e){return void 0===e&&(e=!1),Je.indexOf(t)<0&&Je.push(t),Ge&&I(Ge),Ge=D((function(){!function(t){for(var e=0,n=Je;e<n.length;e++){var a=n[e];if(a){var r=a.nodeType===Node.DOCUMENT_FRAGMENT_NODE;if(r&&Ln(a))continue;an(a,r||t?"childList":"characterData")}}Je=[]}(e)}),33),t}function an(t,e){Nr(Qe)([{addedNodes:[t],attributeName:null,attributeNamespace:null,nextSibling:null,oldValue:null,previousSibling:null,removedNodes:[],target:t,type:e}])}var rn=1,on=[],un=[],cn=[],sn={},ln=[],dn=[],fn={},hn=[],pn=[],vn=null,gn=null,mn=null,bn=null;function yn(){kn(),En(document,!0)}function wn(){kn()}function kn(){rn=1,on=[],un=[],cn=[],sn={},ln=[],dn=[],hn="password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip".split(","),pn="radio,checkbox,range,button,reset,submit".split(","),vn=new WeakMap,gn=new WeakMap,mn=new WeakMap,bn=new WeakMap}function En(t,e){void 0===e&&(e=!1);try{e&&u.unmask.forEach((function(t){return t.indexOf("!")<0?dn.push(t):ln.push(t.substr(1))})),"querySelectorAll"in t&&(u.regions.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return Bn(t,"".concat(e[0]))}))})),u.mask.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return mn.set(t,3)}))})),u.fraud.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return bn.set(t,e[0])}))})),dn.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return mn.set(t,0)}))})))}catch(t){_a(5,1,t?t.name:null)}}function On(t,e){if(void 0===e&&(e=!1),null===t)return null;var n=vn.get(t);return!n&&e&&(n=rn++,vn.set(t,n)),n||null}function Mn(t,e,n,a){var r,i=On(t,!0),o=e?On(e):null,c=Hn(t),s=null,l=Vn(t)?i:null,d=null,f=bn.has(t)?bn.get(t):null,h=u.content?1:2;o>=0&&un[o]&&((s=un[o]).children.push(i),l=null===l?s.region:l,d=s.fragment,f=null===f?s.metadata.fraud:f,h=s.metadata.privacy),n.attributes&&"data-clarity-region"in n.attributes&&(Bn(t,n.attributes["data-clarity-region"]),l=i),on[i]=t,un[i]={id:i,parent:o,previous:c,children:[],data:n,selector:null,hash:null,region:l,metadata:{active:!0,suspend:!1,privacy:h,position:null,fraud:f,size:null},fragment:d},function(t,e,n){var a=e.data,r=e.metadata,i=r.privacy,o=a.attributes||{},u=a.tag.toUpperCase();switch(!0){case"data-clarity-mask"in o:r.privacy=3;break;case"data-clarity-unmask"in o:r.privacy=0;break;case mn.has(t):r.privacy=mn.get(t);break;case bn.has(t):r.privacy=2;break;case"*T"===u:var c=n&&n.data?n.data.tag:"",s=n&&n.selector?n.selector[0]:"";r.privacy="STYLE"===c||"TITLE"===c||ln.some((function(t){return s.indexOf(t)>=0}))?0:i;break;case"type"in o:r.privacy=xn(o.type,r);break;case"INPUT"===u&&0===i:var l="";Object.keys(o).forEach((function(t){return l+=o[t].toLowerCase()})),r.privacy=xn(l,r);break;case 1===i&&"INPUT"===u:r.privacy=pn.indexOf(o.type)>=0?0:i;break;case 1===i:r.privacy=xn(o.class,r);break;default:r.privacy=n?n.metadata.privacy:r.privacy}}(t,un[i],s),Dn(un[i]),"IMG"===(r=un[i]).data.tag&&3===r.metadata.privacy&&(r.metadata.size=[]),Rn(i,a,un[i].fragment)}function Sn(t,e,n,a){var r=On(t),i=e?On(e):null,o=Hn(t),u=!1,c=!1;if(r in un){var s=un[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:un[i].children.indexOf(o)+1;un[i].children.splice(d,0,r),s.region=Vn(t)?r:un[i].region}else!function(t,e){if(t in un){var n=un[t];n.metadata.active=!1,n.parent=null,Rn(t,e)}}(r,a);if(null!==l&&l>=0){var f=un[l].children.indexOf(r);f>=0&&un[l].children.splice(f,1)}c=!0}for(var h in n)Tn(s.data,n,h)&&(u=!0,s.data[h]=n[h]);s.fragment&&fn[s.fragment]&&(u=!0),Dn(s),Rn(r,a,un[r].fragment,u,c)}}function Nn(t){var e=!1;if(t.nodeType===Node.ELEMENT_NODE&&"IFRAME"===t.tagName){var n=t;try{n.contentDocument&&(gn.set(n.contentDocument,n),e=!0)}catch(t){}}return e}function _n(t){var e=t.nodeType===Node.DOCUMENT_NODE?t:null;return e&&gn.has(e)?gn.get(e):null}function xn(t,e){return t&&hn.some((function(e){return t.indexOf(e)>=0}))?2:e.privacy}function Tn(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 Dn(t){var e=t.parent&&t.parent in un?un[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=un[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={tag:a.tag,prefix:n,position:r,attributes:a.attributes};t.selector=[vt(i),vt(i,!0)],t.hash=t.selector.map((function(t){return t?f(t):null})),t.hash.forEach((function(e){return sn[e]=t.id})),t.hash.some((function(t){return-1!==ja.indexOf(t)}))&&(t.fragment=t.id)}function In(t){return t in on?on[t]:null}function Cn(t){return t in un?un[t]:null}function jn(t){var e=On(t);return e in un?un[e]:null}function zn(t){return t in sn?sn[t]:null}function Ln(t){return On(t)in on}function An(){for(var t=[],e=0,n=cn;e<n.length;e++){(a=n[e])in un&&t.push(un[a])}for(var a in cn=[],fn)Ra(fn[a],a,!0);return fn={},t}function Hn(t){for(var e=null;null===e&&t.previousSibling;)e=On(t.previousSibling),t=t.previousSibling;return e}function Rn(t,e,n,a,r){if(void 0===n&&(n=null),void 0===a&&(a=!0),void 0===r&&(r=!1),n&&!fn[n]){var i=In(n),o=Cn(n);i&&o&&(nn(i,!0),o.hash.forEach((function(t){-1!==ja.indexOf(t)&&(fn[n]=t)})))}var u=cn.indexOf(t);u>=0&&1===e&&r?(cn.splice(u,1),cn.push(t)):-1===u&&a&&cn.push(t)}var Yn=[],Wn=null,Xn={},qn=[],Pn=!1,Un=null;function Bn(t,e){!1===Wn.has(t)&&(Wn.set(t,e),(Un=null===Un&&Pn?new IntersectionObserver(Jn,{threshold:[0,.2,.4,.6,.8,1]}):Un)&&t&&t.nodeType===Node.ELEMENT_NODE&&Un.observe(t))}function Vn(t){return Wn&&Wn.has(t)}function Fn(){for(var t=[],e=0,n=qn;e<n.length;e++){var a=n[e],r=On(a.node);r in Xn||(r?(a.data.id=r,Xn[r]=a.data,Yn.push(Zn(a.data))):t.push(a))}qn=t,Yn.length>0&&jt(7)}function Jn(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(Wn.has(r)&&i.width+i.height>0&&u.width>0&&u.height>0){var c=r?On(r):null,s=c in Xn?Xn[c]:{id:c,name:Wn.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;Gn(r,s,s.interaction,d?13:l?10:0),s.visibility>=13&&Un&&Un.unobserve(r)}}Yn.length>0&&jt(7)}function Gn(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 Xn&&r||!(e.id in Xn))&&(Xn[e.id]=e,Yn.push(Zn(e))):qn.push({node:t,data:e})}function Zn(t){return{time:l(),data:{id:t.id,interaction:t.interaction,visibility:t.visibility,name:t.name}}}function Kn(){Yn=[]}function Qn(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return Ze=l()+3e3,n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function $n(t,e,n){void 0===n&&(n=null);var a={id:0,hash:null,privacy:2,node:t};if(t){var r=jn(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=In(t),a=t in Xn?Xn[t]:{id:t,visibility:0,interaction:16,name:Wn.get(n)},r=16;switch(e){case 9:r=20;break;case 27:r=30}Gn(n,a,r,a.visibility)}(r.region,e),i.fraud&&ht(i.fraud,r.id,n||r.data.value)}}return a}function ta(t){return Q(this,void 0,void 0,(function(){var e,n,a,r,i,o,u,c,s,d,f,h,p,v,g,b,w,k,E,O,M,S,N,_,x,T,D,I,C;return $(this,(function(j){switch(e=l(),n=[e,t],t){case 13:case 14:case 12:case 15:case 16:case 17:case 18:case 19:case 20:for(a=0,r=ae;a<r.length;a++)I=r[a],(i=$n(I.data.target,I.event)).id>0&&((n=[I.time,I.event]).push(i.id),n.push(I.data.x),n.push(I.data.y),va(n),m(I.event,I.data.x,I.data.y));se();break;case 9:for(o=0,u=Xt;o<u.length;o++)I=u[o],c=$n(I.data.target,I.event,I.data.text),n=[I.time,I.event],s=c.hash.join("."),n.push(c.id),n.push(I.data.x),n.push(I.data.y),n.push(I.data.eX),n.push(I.data.eY),n.push(I.data.button),n.push(I.data.reaction),n.push(I.data.context),n.push(ut(I.data.text,"click",c.privacy)),n.push(I.data.link),n.push(s),n.push(I.data.trust),va(n),ra(I.time,I.event,s,I.data.x,I.data.y,I.data.reaction,I.data.context);Ft();break;case 38:for(d=0,f=Jt;d<f.length;d++)I=f[d],n=[I.time,I.event],(x=$n(I.data.target,I.event)).id>0&&(n.push(x.id),n.push(I.data.action),va(n));Zt();break;case 11:h=ne,n.push(h.width),n.push(h.height),m(t,h.width,h.height),de(),va(n);break;case 26:p=Ee,n.push(p.name),xe(),va(n);break;case 27:for(v=0,g=Qt;v<g.length;v++)I=g[v],b=$n(I.data.target,I.event,I.data.value),(n=[I.time,I.event]).push(b.id),n.push(ut(I.data.value,"input",b.privacy)),va(n);ee();break;case 21:(w=ge)&&(k=$n(w.start,t),E=$n(w.end,t),n.push(k.id),n.push(w.startOffset),n.push(E.id),n.push(w.endOffset),ke(),va(n));break;case 10:for(O=0,M=fe;O<M.length;O++)I=M[O],(S=$n(I.data.target,I.event)).id>0&&((n=[I.time,I.event]).push(S.id),n.push(I.data.x),n.push(I.data.y),va(n),m(I.event,I.data.x,I.data.y));fe=[];break;case 39:for(N=0,_=Me;N<_.length;N++)I=_[N],n=[I.time,I.event],(x=$n(I.data.target,I.event)).id>0&&(n.push(x.id),va(n));Ne();break;case 22:for(T=0,D=na;T<D.length;T++)I=D[T],(n=[I.time,I.event]).push(I.data.type),n.push(I.data.hash),n.push(I.data.x),n.push(I.data.y),n.push(I.data.reaction),n.push(I.data.context),va(n,!1);aa();break;case 28:C=Oe,n.push(C.visible),va(n),y(e,C.visible),De()}return[2]}))}))}var ea=[],na=[];function aa(){na=[]}function ra(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),ea.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),m(e,a,r)}var ia,oa,ua,ca,sa,la=0,da=0,fa=null,ha=0;function pa(){ca=!0,la=0,da=0,ha=0,ia=[],oa=[],ua={},sa=null}function va(t,e){if(void 0===e&&(e=!0),ca){var n=l(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:la+=r.length;case 37:case 6:da+=r.length,ia.push(r);break;default:oa.push(r)}_(25);var i=function(){var t=!1===u.lean&&la>0?100:wr.sequence*u.delay;return"string"==typeof u.upload?Math.max(Math.min(t,3e4),100):u.delay}();n-ha>2*i&&(I(fa),fa=null),e&&null===fa&&(25!==a&&L(),fa=D(ma,i),ha=n,Ba(da))}}function ga(){I(fa),ma(!0),la=0,da=0,ha=0,ia=[],oa=[],ua={},sa=null,ca=!1}function ma(t){return void 0===t&&(t=!1),Q(this,void 0,void 0,(function(){var e,n,a,r,i,o,c,s;return $(this,(function(l){switch(l.label){case 0:return fa=null,(e=!1===u.lean&&da>0&&(da<1048576||wr.sequence>0))&&T(1,1),Fn(),function(){var t=[];na=[];for(var e=wr.start+wr.duration,n=Math.max(e-2e3,0),a=0,r=ea;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&na.push(i),t.push(i))}ea=t,ta(22)}(),ot(),n=!0===t,a=JSON.stringify(Or(n)),r="[".concat(oa.join(),"]"),i=e?"[".concat(ia.join(),"]"):"",o=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:a,a:r,p:i}),n?(s=null,[3,3]):[3,1];case 1:return[4,et(o)];case 2:s=l.sent(),l.label=3;case 3:return x(2,(c=s)?c.length:o.length),ba(o,c,wr.sequence,n),oa=[],e&&(ia=[],da=0,la=0),[2]}}))}))}function ba(t,e,n,a){if(void 0===a&&(a=!1),"string"==typeof u.upload){var r=u.upload,i=!1;if(a&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(r,t))&&wa(n)}catch(t){}if(!1===i){n in ua?ua[n].attempts++:ua[n]={data:t,attempts:1};var o=new XMLHttpRequest;o.open("POST",r),null!==n&&(o.onreadystatechange=function(){Nr(ya)(o,n)}),o.withCredentials=!0,e?(o.setRequestHeader("Accept","application/x-clarity-gzip"),o.send(e)):o.send(t)}}else if(u.upload){(0,u.upload)(t),wa(n)}}function ya(t,e){var n=ua[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?Va(6):(0===t.status&&(u.upload=u.fallback?u.fallback:u.upload),ba(n.data,null,e)):(sa={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&Pa(2),200===t.status&&t.responseText&&function(t){switch(t&&t.length>0?t.split(" ")[0]:""){case"END":Va(6);break;case"UPGRADE":U("Auto")}}(t.responseText),0===t.status&&(ba(n.data,null,e,!0),Va(3)),t.status>=200&&t.status<=208&&wa(e),delete ua[e]))}function wa(t){1===t&&dr()}var ka,Ea={};function Oa(t){var e=t.error||t;return e.message in Ea||(Ea[e.message]=0),Ea[e.message]++>=5||e&&e.message&&(ka={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},Ma(31)),!0}function Ma(t){return Q(this,void 0,void 0,(function(){var e;return $(this,(function(n){switch(e=[l(),t],t){case 31:e.push(ka.message),e.push(ka.line),e.push(ka.column),e.push(ka.stack),e.push(ka.source),va(e);break;case 33:Sa&&(e.push(Sa.code),e.push(Sa.name),e.push(Sa.message),e.push(Sa.stack),e.push(Sa.severity),va(e,!1));break;case 41:dt&&(e.push(dt.id),e.push(dt.target),e.push(dt.hash),va(e,!1))}return[2]}))}))}var Sa,Na={};function _a(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 Na&&Na[t].indexOf(i)>=0||(Sa={code:t,name:n,message:a,stack:r,severity:e},t in Na?Na[t].push(i):Na[t]=[i],Ma(33))}var xa,Ta={},Da=[],Ia={},Ca={},ja=[];function za(){try{var t=u.extract;if(!t)return;for(var e=0;e<t.length;e+=3){var n=t[e],a=t[e+1];switch(n){case 0:var r=t[e+2];Ia[a]=Wa(r);break;case 1:break;case 2:var i=t[e+2];Ca[a]=i;break;case 3:ja=t[e+2]}}}catch(t){_a(8,1,t?t.name:null)}}function La(t){return JSON.parse(JSON.stringify(t))}function Aa(){try{for(var t in Ia){var e=(r=Xa(La(Ia[t])))?JSON.stringify(r).substring(0,1e4):r;e&&Ra(t,e)}for(var n in Ca){var a=document.querySelector(Ca[n]);a&&Ra(n,a.innerText)}}catch(t){_a(5,1,t?t.name:null)}var r;Pa(40)}function Ha(){Da=[]}function Ra(t,e,n){void 0===n&&(n=!1),(!(t in Ta)||t in Ta&&Ta[t]!==e||n)&&(Ta[t]=e,Da.push(t))}function Ya(){Ta={},Da=[],Ia={},Ca={}}function Wa(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 Xa(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=Xa(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=Xa(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 Pa(t){var e=[l(),t];switch(t){case 4:var n=h;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),va(e,!1)),g();break;case 25:e.push(M.gap),va(e);break;case 35:e.push(xa.check),va(e,!1);break;case 3:e.push(P.key),va(e);break;case 2:e.push(sa.sequence),e.push(sa.attempts),e.push(sa.status),va(e,!1);break;case 24:e.push(E.key),e.push(E.value),va(e);break;case 34:var a=Object.keys(V);if(a.length>0){for(var r=0,i=a;r<i.length;r++){var o=i[r];e.push(o),e.push(V[o])}K(),va(e,!1)}break;case 0:var u=Object.keys(N);if(u.length>0){for(var c=0,s=u;c<s.length;c++){var d=s[c],f=parseInt(d,10);e.push(f),e.push(Math.round(N[d]))}N={},va(e,!1)}break;case 1:var p=Object.keys(Za);if(p.length>0){for(var v=0,m=p;v<m.length;v++){var b=m[v];f=parseInt(b,10);e.push(f),e.push(Za[b])}er(),va(e,!1)}break;case 36:var y=Object.keys(R);if(y.length>0){for(var w=0,k=y;w<k.length;w++){var O=k[w];f=parseInt(O,10);e.push(f),e.push([].concat.apply([],R[O]))}X(),va(e,!1)}break;case 40:for(var S=0,_=Da;S<_.length;S++){O=_[S];e.push(O),e.push(Ta[O])}Ha(),va(e,!1)}}function Ua(){xa={check:0}}function Ba(t){if(0===xa.check){var e=xa.check;e=wr.sequence>=128?1:e,e=l()>72e5?2:e,(e=t>10485760?2:e)!==xa.check&&Va(e)}}function Va(t){xa.check=t,lr(),ai()}function Fa(){0!==xa.check&&Pa(35)}function Ja(){xa=null}var Ga=null,Za=null;function Ka(){Ga={},Za={}}function Qa(){Ga={},Za={}}function $a(t,e){e&&(e="".concat(e),t in Ga||(Ga[t]=[]),Ga[t].indexOf(e)<0&&(Ga[t].push(e),t in Za||(Za[t]=[]),Za[t].push(e),Ga[t].length>128&&Va(5)))}function tr(){Pa(1)}function er(){Za={}}var nr=null,ar=[],rr=null;function ir(){rr=null;var t=navigator&&"userAgent"in navigator?navigator.userAgent:"",e=document&&document.title?document.title:"",n=function(){var t={session:pr(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=mr("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-vr(n[1])<18e5&&(t.session=n[0],t.count=vr(n[2])+1,t.upgrade=vr(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),a=gr();nr={projectId:u.projectId||f(location.host),userId:a.id,sessionId:n.session,pageNum:n.count},u.lean=u.track&&null!==n.upgrade?0===n.upgrade:u.lean,u.upload=u.track&&"string"==typeof u.upload&&n.upload&&n.upload.length>"https://".length?n.upload:u.upload,$a(0,t),$a(3,e),$a(1,location.href),$a(2,document.referrer),$a(15,function(){var t=pr();if(u.track&&fr(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),$a(16,document.documentElement.lang),$a(17,document.dir),navigator&&($a(9,navigator.userLanguage||navigator.language),navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;$a(22,t.platform),$a(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){$a(24,t.name+"~"+t.version)})),$a(25,t.model),T(27,t.mobile?1:0)}))),T(0,n.ts),T(1,0),screen&&(T(14,Math.round(screen.width)),T(15,Math.round(screen.height)),T(16,Math.round(screen.colorDepth)));for(var r=0,i=u.cookies;r<i.length;r++){var o=i[r],c=mr(o);c&&F(o,c)}hr(a)}function or(){rr=null,nr=null}function ur(t,e){void 0===e&&(e=!0),nr&&!1===e&&t(nr,!u.lean),ar.push({callback:t,wait:e})}function cr(){return nr?[nr.userId,nr.sessionId,nr.pageNum].join("."):""}function sr(){Xr()&&(u.track=!0,hr(gr(),1))}function lr(){br("_clsk","",0)}function dr(){var t=Math.round(Date.now()),e=u.upload&&"string"==typeof u.upload?u.upload.replace("https://",""):"",n=u.lean?0:1;!function(t){ar.length>0&&ar.forEach((function(e){!e.callback||e.wait&&!t||e.callback(nr,!u.lean)}))}(n),br("_clsk",[nr.sessionId,t,nr.pageNum,n,e].join("|"),1)}function fr(t,e){try{return!!t[e]}catch(t){return!1}}function hr(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)&&br("_clck",[nr.userId,1,n.toString(36),e].join("|"),365)}function pr(){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 vr(t,e){return void 0===e&&(e=10),parseInt(t,e)}function gr(){var t={id:pr(),expiry:null,consent:0},e=mr("_clck");if(e&&e.length>0){for(var n=e.split("|"),a=0,r=0,i=document.cookie.split(";");r<i.length;r++){a+="_clck"===i[r].split("=")[0].trim()?1:0}if(1===n.length||a>1){var o="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(o),document.cookie="".concat("_clsk","=").concat(o)}n.length>2&&(t.expiry=vr(n[2],36)),n.length>3&&1===vr(n[3])&&(t.consent=1),u.track=u.track||1===t.consent,t.id=u.track?n[0]:t.id}return t}function mr(t){if(fr(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 br(t,e,n){if(u.track&&(navigator&&navigator.cookieEnabled||fr(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===rr){for(var o=location.hostname?location.hostname.split("."):[],c=o.length-1;c>=0;c--)if(rr=".".concat(o[c]).concat(rr||""),c<o.length-1&&(document.cookie="".concat(i).concat(";").concat("domain=").concat(rr),mr(t)===e))return;rr=""}}catch(t){rr=""}document.cookie=rr?"".concat(i).concat(";").concat("domain=").concat(rr):i}}var yr,wr=null;function kr(){var t=nr;wr={version:d,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function Er(){wr=null}function Or(t){return wr.start=wr.start+wr.duration,wr.duration=l()-wr.start,wr.sequence++,wr.upload=t&&"sendBeacon"in navigator?1:0,wr.end=t?1:0,[wr.version,wr.sequence,wr.start,wr.duration,wr.projectId,wr.userId,wr.sessionId,wr.pageNum,wr.upload,wr.end]}function Mr(){yr=[]}function Sr(t){if(yr&&-1===yr.indexOf(t.message)){var e=u.report;if(e&&e.length>0){var n={v:wr.version,p:wr.projectId,u:wr.userId,s:wr.sessionId,n:wr.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e),a.send(JSON.stringify(n)),yr.push(t.message)}}return t}function Nr(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw Sr(t)}var n=performance.now()-e;x(4,n),n>30&&(_(7),T(6,n))}}var _r=[];function xr(t,e,n,a){void 0===a&&(a=!1),n=Nr(n);try{t[c("addEventListener")](e,n,a),_r.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function Tr(){for(var t=0,e=_r;t<e.length;t++){var n=e[t];try{n.target[c("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}_r=[]}var Dr=null,Ir=null,Cr=null,jr=0;function zr(){return!(jr++>20)||(_a(4,0),!1)}function Lr(){jr=0,Cr!==Hr()&&(ai(),window.setTimeout(Ar,250))}function Ar(){ni(),T(29,1)}function Hr(){return location.href?location.href.replace(location.hash,""):location.href}var Rr=!1;function Yr(){Rr=!0,s=performance.now(),Et(),Tr(),Mr(),Cr=Hr(),jr=0,xr(window,"popstate",Lr),null===Dr&&(Dr=history.pushState,history.pushState=function(){Dr.apply(this,arguments),Xr()&&zr()&&Lr()}),null===Ir&&(Ir=history.replaceState,history.replaceState=function(){Ir.apply(this,arguments),Xr()&&zr()&&Lr()})}function Wr(){Cr=null,jr=0,Mr(),Tr(),Et(),s=0,Rr=!1}function Xr(){return Rr}function qr(t){if(null===t||Rr)return!1;for(var e in t)e in u&&(u[e]=t[e]);return!0}function Pr(){ni(),O("clarity","restart")}var Ur=Object.freeze({__proto__:null,start:function(){ft=[],T(26,navigator.webdriver?1:0),xr(window,"error",Oa),Ea={},Na={}},stop:function(){Na={}}});function Br(){return Q(this,void 0,void 0,(function(){var t,e;return $(this,(function(n){switch(n.label){case 0:return t=l(),Nt(e={id:cr(),cost:3}),[4,qe(document,e,0)];case 1:return n.sent(),[4,jt(5,e,t)];case 2:return n.sent(),_t(e),[2]}}))}))}var Vr=Object.freeze({__proto__:null,start:function(){Ht(),Rt(),Kn(),Un=null,Wn=new WeakMap,Xn={},qn=[],Pn=!!window.IntersectionObserver,yn(),function(){if(Pe=[],Je=[],Ge=null,Ze=0,Ke={},null===Be&&(Be=CSSStyleSheet.prototype.insertRule,CSSStyleSheet.prototype.insertRule=function(){return Xr()&&nn(this.ownerNode),Be.apply(this,arguments)}),null===Ve&&(Ve=CSSStyleSheet.prototype.deleteRule,CSSStyleSheet.prototype.deleteRule=function(){return Xr()&&nn(this.ownerNode),Ve.apply(this,arguments)}),null===Fe){Fe=Element.prototype.attachShadow;try{Element.prototype.attachShadow=function(){return Xr()?nn(Fe.apply(this,arguments)):Fe.apply(this,arguments)}}catch(t){Fe=null}}}(),Ot(Br,1).then((function(){Nr(Rt)(),Nr(Fn)()}))},stop:function(){Kn(),Wn=null,Xn={},qn=[],Un&&(Un.disconnect(),Un=null),Pn=!1,wn(),function(){for(var t=0,e=Pe;t<e.length;t++){var n=e[t];n&&n.disconnect()}Pe=[],Ke={},Ue=[],Je=[],Ze=0,Ge=null}(),Ht()}});var Fr,Jr=null;function Gr(){Jr=null}function Zr(t){Jr={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){Q(this,void 0,void 0,(function(){var e,n;return $(this,(function(a){return e=l(),n=[e,t],29===t&&(n.push(Jr.fetchStart),n.push(Jr.connectStart),n.push(Jr.connectEnd),n.push(Jr.requestStart),n.push(Jr.responseStart),n.push(Jr.responseEnd),n.push(Jr.domInteractive),n.push(Jr.domComplete),n.push(Jr.loadEventStart),n.push(Jr.loadEventEnd),n.push(Jr.redirectCount),n.push(Jr.size),n.push(Jr.type),n.push(Jr.protocol),n.push(Jr.encodedSize),n.push(Jr.decodedSize),Gr(),va(n,!1)),[2]}))}))}(29)}var Kr=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint"];function Qr(){try{Fr&&Fr.disconnect(),Fr=new PerformanceObserver(Nr($r));for(var t=0,e=Kr;t<e.length;t++){var n=e[t];PerformanceObserver.supportedEntryTypes.indexOf(n)>=0&&("layout-shift"===n&&x(9,0),Fr.observe({type:n,buffered:!0}))}}catch(t){_a(3,1)}}function $r(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":Zr(a);break;case"resource":var r=a.name;$a(4,ti(r)),r!==u.upload&&r!==u.fallback||T(28,a.duration);break;case"longtask":_(7);break;case"first-input":e&&T(10,a.processingStart-a.startTime);break;case"layout-shift":e&&!a.hadRecentInput&&x(9,1e3*a.value);break;case"largest-contentful-paint":e&&T(8,a.startTime)}}performance&&"memory"in performance&&performance.memory.usedJSHeapSize&&T(30,Math.abs(performance.memory.usedJSHeapSize/1048576))}(t.getEntries())}function ti(t){var e=document.createElement("a");return e.href=t,e.hostname}var ei=[Ur,Vr,Ce,Object.freeze({__proto__:null,start:function(){Gr(),function(){window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?"complete"!==document.readyState?xr(window,"load",D.bind(this,Qr,0)):Qr():_a(3,0)}()},stop:function(){Fr&&Fr.disconnect(),Fr=null,Gr()}})];function ni(t){void 0===t&&(t=null),function(){try{return!1===Rr&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(qr(t),Yr(),rt(),ei.forEach((function(t){return Nr(t.start)()})))}function ai(){Xr()&&(ei.slice().reverse().forEach((function(t){return Nr(t.stop)()})),it(),Wr())}var ri=Object.freeze({__proto__:null,version:d,start:ni,pause:function(){Xr()&&(O("clarity","pause"),null===wt&&(wt=new Promise((function(t){kt=t}))))},resume:function(){Xr()&&(wt&&(kt(),wt=null,null===yt&&Mt()),O("clarity","resume"))},stop:ai,consent:sr,event:O,identify:J,set:F,upgrade:U,metadata:ur});!function(){if("undefined"!=typeof window){var t=window,e="clarity";if(t[e]&&t[e].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var n=t[e]&&t[e].q||[];for(t[e]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return ri[t].apply(ri,e)},t[e].v=d;n.length>0;)t[e].apply(t,n.shift())}}()}();
1
+ !function(){"use strict";var t=Object.freeze({__proto__:null,get start(){return En},get stop(){return On},get parse(){return Sn},get getId(){return Nn},get add(){return _n},get update(){return xn},get sameorigin(){return Tn},get iframe(){return Dn},get getNode(){return zn},get getValue(){return Ln},get get(){return An},get lookup(){return Hn},get has(){return Rn},get updates(){return Yn}}),e=Object.freeze({__proto__:null,get track(){return fa},get start(){return ma},get queue(){return ba},get stop(){return ya}}),n=Object.freeze({__proto__:null,get data(){return Ca},get keys(){return ja},get fragments(){return Aa},get start(){return Ha},get clone(){return Ra},get compute(){return Ya},get reset(){return Wa},get update(){return Xa},get stop(){return qa}}),a=Object.freeze({__proto__:null,get data(){return Ia},get start(){return Fa},get check(){return Ja},get trigger(){return Ga},get compute(){return Za},get stop(){return Ka}}),r=Object.freeze({__proto__:null,get data(){return Qa},get updates(){return $a},get start(){return tr},get stop(){return er},get log(){return nr},get compute(){return ar},get reset(){return rr}}),i=Object.freeze({__proto__:null,get data(){return ir},get callbacks(){return or},get start(){return cr},get stop(){return sr},get metadata(){return lr},get id(){return dr},get consent(){return fr},get clear(){return hr},get save(){return pr}}),o=Object.freeze({__proto__:null,get data(){return Or},get start(){return Mr},get stop(){return Sr},get envelope(){return Nr}}),u={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,mask:[],unmask:[],regions:[],extract:[],cookies:[],fraud:[],report:null,upload:null,fallback:null,upgrade:null};function c(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var s=0;function l(t){return void 0===t&&(t=null),t=t||performance.now(),Math.max(Math.round(t-s),0)}var d="0.6.38";function f(t){for(var e=5381,n=e,a=0;a<t.length;a+=2){if(e=(e<<5)+e^t.charCodeAt(a),a+1<t.length)n=(n<<5)+n^t.charCodeAt(a+1)}return Math.abs(e+11579*n).toString(36)}var h=null,p=null,v=!1;function g(){v&&(h={time:l(),event:4,data:{visible:p.visible,docWidth:p.docWidth,docHeight:p.docHeight,screenWidth:p.screenWidth,screenHeight:p.screenHeight,scrollX:p.scrollX,scrollY:p.scrollY,pointerX:p.pointerX,pointerY:p.pointerY,activityTime:p.activityTime}}),p=p||{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:p.docWidth=e,p.docHeight=n;break;case 11:p.screenWidth=e,p.screenHeight=n;break;case 10:p.scrollX=e,p.scrollY=n;break;default:p.pointerX=e,p.pointerY=n}v=!0}function b(t){p.activityTime=t}function y(t,e){p.visible="visible"===e?1:0,p.visible||b(t),v=!0}function w(){v&&Va(4)}var k=Object.freeze({__proto__:null,get state(){return h},start:function(){v=!1,g()},reset:g,track:m,activity:b,visibility:y,compute:w,stop:function(){g()}}),E=null;function O(t,e){Ur()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(E={key:t,value:e},Va(24))}var M,S=null,N=null;function _(t){t in S||(S[t]=0),t in N||(N[t]=0),S[t]++,N[t]++}function x(t,e){null!==e&&(t in S||(S[t]=0),t in N||(N[t]=0),S[t]+=e,N[t]+=e)}function T(t,e){null!==e&&!1===isNaN(e)&&(t in S||(S[t]=0),(e>S[t]||0===S[t])&&(N[t]=e,S[t]=e))}function D(t,e,n){return window.setTimeout(Tr(t),e,n)}function I(t){return window.clearTimeout(t)}var C=0,j=0,z=null;function L(){z&&I(z),z=D(A,j),C=l()}function A(){var t=l();M={gap:t-C},Va(25),M.gap<3e5?z=D(A,j):Xr&&(O("clarity","suspend"),oi(),["mousemove","touchstart"].forEach((function(t){return Ir(document,t,Vr)})),["resize","scroll","pageshow"].forEach((function(t){return Ir(window,t,Vr)})))}var H=Object.freeze({__proto__:null,get data(){return M},start:function(){j=6e4,C=0},reset:L,stop:function(){I(z),C=0,j=0}}),R=null;function Y(t,e){if(t in R){var n=R[t],a=n[n.length-1];e-a[0]>100?R[t].push([e,0]):a[1]=e-a[0]}else R[t]=[[e,0]]}function W(){Va(36)}function X(){R={}}var q=Object.freeze({__proto__:null,get data(){return R},start:function(){R={}},stop:function(){R={}},track:Y,compute:W,reset:X}),P=null;function U(t){Ur()&&u.lean&&(u.lean=!1,P={key:t},pr(),u.upgrade&&u.upgrade(t),Va(3))}var B=Object.freeze({__proto__:null,get data(){return P},start:function(){!u.lean&&u.upgrade&&u.upgrade("Config"),P=null},upgrade:U,stop:function(){P=null}}),V=null;function F(t,e){G(t,"string"==typeof e?[e]:e)}function J(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),G("userId",[t]),G("sessionId",[e]),G("pageId",[n])}function G(t,e){if(Ur()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in V?V[t]:[]),a=0;a<e.length;a++)"string"==typeof e[a]&&e[a].length<255&&n.push(e[a]);V[t]=n}}function Z(){Va(34)}function K(){V={}}function Q(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 $(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(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(r=2&i[0]?a.return:i[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,i[1])).done)return r;switch(a=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,a=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){o.label=i[1];break}if(6===i[0]&&o.label<r[1]){o.label=r[1],r=i;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(i);break}r[2]&&o.ops.pop(),o.trys.pop();continue}i=e.call(t,o)}catch(t){i=[6,t],a=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var tt="CompressionStream"in window;function et(t){return Q(this,void 0,void 0,(function(){var e,n;return $(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),tt?(e=new ReadableStream({start:function(e){return Q(this,void 0,void 0,(function(){return $(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,nt(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 nt(t){return Q(this,void 0,void 0,(function(){var e,n,a,r,i;return $(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 at=[k,r,Object.freeze({__proto__:null,get data(){return V},start:function(){K()},set:F,identify:J,compute:Z,reset:K,stop:function(){K()}}),a,q,i,o,e,H,B,n];function rt(){S={},N={},_(5),at.forEach((function(t){return Tr(t.start)()}))}function it(){at.slice().reverse().forEach((function(t){return Tr(t.stop)()})),S={},N={}}function ot(){Z(),w(),ar(),Va(0),W(),Za(),Ya()}var ut=/\p{N}/gu,ct=/\p{L}/gu,st=/\p{Sc}/u,lt=/\S/gi;function dt(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":case"input":return function(t){for(var e=-1,n=0,a=!1,r=!1,i=!1,o=null,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=st.unicode?s.match(st)?s:s.replace(ct,"•").replace(ut,"•"):ft(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)}return t;case 2:case 3:switch(e){case"*T":return a?function(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}(t):ft(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":return function(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}(t);case"placeholder":return ft(t)}}return t}function ft(t){return t.replace(lt,"•")}var ht,pt=[];function vt(t,e,n){null!==t&&n&&n.length>=5&&(ht={id:t,target:e,hash:f(n)},pt.indexOf(ht.hash)<0&&(pt.push(ht.hash),_a(41)))}var gt=["DIV","TR","P","LI","UL","A","BUTTON"];function mt(t,e){void 0===e&&(e=!1);var n=t.attributes,a=t.prefix?t.prefix[e?1:0]:null,r=e||n&&!("class"in n)||gt.indexOf(t.tag)>=0?":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,">"),t.tag=0===t.tag.indexOf("svg:")?t.tag.substr("svg:".length):t.tag;var i="".concat(a).concat(t.tag).concat(r),o="class"in n&&n.class.length>0?n.class.trim().split(/\s+/):null;if(e){var u="id"in n&&n.id.length>0?n.id:null;i=(o="BODY"!==t.tag&&o?o.filter((function(t){return!bt(t)})):[]).length>0?"".concat(a).concat(t.tag,".").concat(o.join(".")).concat(r):i,i=u&&!1===bt(u)?"".concat(function(t){var e=t.lastIndexOf("*S"),n=t.lastIndexOf("".concat("iframe:").concat("HTML")),a=Math.max(e,n);if(a<0)return"";var r=t.indexOf(">",a)+1;return t.substr(0,r)}(a),"#").concat(u):i}else i=o?"".concat(a).concat(t.tag,".").concat(o.join(".")).concat(r):i;return i}}function bt(t){for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n>=48&&n<=57)return!0}return!1}var yt={},wt=[],kt=null,Et=null,Ot=null;function Mt(){yt={},wt=[],kt=null,Et=null}function St(t,e){return void 0===e&&(e=0),Q(this,void 0,void 0,(function(){var n,a,r;return $(this,(function(i){for(n=0,a=wt;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){wt[1===e?"unshift":"push"]({task:t,resolve:n,id:dr()})})),null===kt&&null===Et&&Nt(),[2,r]}))}))}function Nt(){var t=wt.shift();t&&(kt=t,t.task().then((function(){t.id===dr()&&(t.resolve(),kt=null,Nt())})).catch((function(e){t.id===dr()&&(e&&Da(0,1,e.name,e.message,e.stack),kt=null,Nt())})))}function _t(t){var e=It(t);return e in yt?performance.now()-yt[e].start>yt[e].yield?0:1:2}function xt(t){yt[It(t)]={start:performance.now(),calls:0,yield:30}}function Tt(t){var e=performance.now(),n=It(t),a=e-yt[n].start;x(t.cost,a),_(5),yt[n].calls>0&&x(4,a)}function Dt(t){return Q(this,void 0,void 0,(function(){var e,n;return $(this,(function(a){switch(a.label){case 0:return(e=It(t))in yt?(Tt(t),n=yt[e],[4,Ct()]):[3,2];case 1:n.yield=a.sent().timeRemaining(),function(t){var e=It(t);if(yt&&yt[e]){var n=yt[e].calls,a=yt[e].yield;xt(t),yt[e].calls=n+1,yt[e].yield=a}}(t),a.label=2;case 2:return[2,e in yt?1:2]}}))}))}function It(t){return"".concat(t.id,".").concat(t.cost)}function Ct(){return Q(this,void 0,void 0,(function(){return $(this,(function(t){switch(t.label){case 0:return Et?[4,Et]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t){zt(t,{timeout:5e3})}))]}}))}))}var jt,zt=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 Lt(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),Q(this,void 0,void 0,(function(){var a,r,i,o,c,s,d,f,h,p,v,g,y,w,k,E,O,M,S,N,_,x;return $(this,(function(T){switch(T.label){case 0:switch(a=n||l(),r=[a,t],t){case 8:return[3,1];case 7:return[3,2];case 5:case 6:return[3,3]}return[3,10];case 1:return i=jt,r.push(i.width),r.push(i.height),m(t,i.width,i.height),ba(r),[3,10];case 2:for(o=0,c=qn;o<c.length;o++)s=c[o],(r=[s.time,7]).push(s.data.id),r.push(s.data.interaction),r.push(s.data.visibility),r.push(s.data.name),ba(r);return ta(),[3,10];case 3:if(2===_t(e))return[3,10];if(!((d=Yn()).length>0))return[3,9];f=0,h=d,T.label=4;case 4:return f<h.length?(p=h[f],0!==(v=_t(e))?[3,6]:[4,Dt(e)]):[3,8];case 5:v=T.sent(),T.label=6;case 6:if(2===v)return[3,8];for(g=p.data,y=p.metadata.active,w=p.metadata.suspend,k=p.metadata.privacy,E=function(t){var e=t.metadata.privacy;return"*T"===t.data.tag&&!(0===e||1===e)}(p),O=0,M=y?["tag","attributes","value"]:["tag"];O<M.length;O++)if(g[S=M[O]])switch(S){case"tag":N=At(p),_=E?-1:1,r.push(p.id*_),p.parent&&y&&r.push(p.parent),p.previous&&y&&r.push(p.previous),r.push(w?"*M":g[S]),N&&2===N.length&&r.push("".concat("#").concat(Ht(N[0]),".").concat(Ht(N[1])));break;case"attributes":for(x in g[S])void 0!==g[S][x]&&r.push(Rt(x,g[S][x],k));break;case"value":vt(p.metadata.fraud,p.id,g[S]),r.push(dt(g[S],g.tag,k,E))}T.label=7;case 7:return f++,[3,4];case 8:6===t&&b(a),ba(function(t){for(var e=[],n={},a=0,r=null,i=0;i<t.length;i++)if("string"==typeof t[i]){var o=t[i],u=n[o]||-1;u>=0?r?r.push(u):(r=[u],e.push(r),a++):(r=null,e.push(o),n[o]=a++)}else r=null,e.push(t[i]),a++;return e}(r),!u.lean),T.label=9;case 9:return[3,10];case 10:return[2]}}))}))}function At(t){if(null!==t.metadata.size&&0===t.metadata.size.length){var e=zn(t.id);if(e)return[Math.floor(100*e.offsetWidth),Math.floor(100*e.offsetHeight)]}return t.metadata.size}function Ht(t){return t.toString(36)}function Rt(t,e,n){return"".concat(t,"=").concat(dt(e,t,n))}function Yt(){jt=null}function Wt(){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!==jt&&c===jt.width&&v===jt.height||null===c||null===v||(jt={width:c,height:v},Lt(8))}function Xt(t){var e={x:0,y:0};if(t&&t.offsetParent)do{var n=t.offsetParent,a=null===n?Dn(t.ownerDocument):null;e.x+=t.offsetLeft,e.y+=t.offsetTop,t=a||n}while(t);return e}var qt=["input","textarea","radio","button","canvas"],Pt=[];function Ut(t){Ir(t,"click",Bt.bind(this,9,t),!0)}function Bt(t,e,n){var a=Dn(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=Xt(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}var c=ea(n),s=function(t){for(;t&&t!==document;){if(t.nodeType===Node.ELEMENT_NODE){var e=t;if("A"===e.tagName)return e}t=t.parentNode}return null}(c),d=function(t){var e=null,n=document.documentElement;if("function"==typeof t.getBoundingClientRect){var a=t.getBoundingClientRect();a&&a.width>0&&a.height>0&&(e={x:Math.floor(a.left+("pageXOffset"in window?window.pageXOffset:n.scrollLeft)),y:Math.floor(a.top+("pageYOffset"in window?window.pageYOffset:n.scrollTop)),w:Math.floor(a.width),h:Math.floor(a.height)})}return e}(c);0===n.detail&&d&&(i=Math.round(d.x+d.w/2),o=Math.round(d.y+d.h/2));var f=d?Math.max(Math.floor((i-d.x)/d.w*32767),0):0,h=d?Math.max(Math.floor((o-d.y)/d.h*32767),0):0;null!==i&&null!==o&&(Pt.push({time:l(),event:t,data:{target:c,x:i,y:o,eX:f,eY:h,button:n.button,reaction:Ft(c),context:Jt(s),text:Vt(c),link:s?s.href:null,hash:null,trust:n.isTrusted?1:0}}),St(aa.bind(this,t)))}function Vt(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 Ft(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(qt.indexOf(e)>=0)return 0}return 1}function Jt(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 Gt(){Pt=[]}var Zt=[];function Kt(t,e){Zt.push({time:l(),event:38,data:{target:ea(e),action:t}}),St(aa.bind(this,38))}function Qt(){Zt=[]}var $t=null,te=[];function ee(t){var e=ea(t),n=An(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};te.length>0&&te[te.length-1].data.target===r.target&&te.pop(),te.push({time:l(),event:27,data:r}),I($t),$t=D(ne,500,27)}}function ne(t){St(aa.bind(this,t))}function ae(){te=[]}var re,ie=[],oe=null;function ue(t,e,n){var a=Dn(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=Xt(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}null!==i&&null!==o&&se({time:l(),event:t,data:{target:ea(n),x:i,y:o}})}function ce(t,e,n){var a=Dn(e),r=a?a.contentDocument.documentElement:document.documentElement,i=n.changedTouches,o=l();if(i)for(var u=0;u<i.length;u++){var c=i[u],s="clientX"in c?Math.round(c.clientX+r.scrollLeft):null,d="clientY"in c?Math.round(c.clientY+r.scrollTop):null;s=s&&a?s+Math.round(a.offsetLeft):s,d=d&&a?d+Math.round(a.offsetTop):d,null!==s&&null!==d&&se({time:o,event:t,data:{target:ea(n),x:s,y:d}})}}function se(t){switch(t.event){case 12:case 15:case 19:var e=ie.length,n=e>1?ie[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)&&ie.pop(),ie.push(t),I(oe),oe=D(le,500,t.event);break;default:ie.push(t),le(t.event)}}function le(t){St(aa.bind(this,t))}function de(){ie=[]}function fe(){var t=document.documentElement;re={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},aa(11)}function he(){re=null}var pe=[],ve=null;function ge(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?ea(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){var r=Dn(a);e=r?r.contentWindow:e,a=n=a.documentElement}var i=a===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(a.scrollLeft),o=a===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(a.scrollTop),u={time:l(),event:10,data:{target:a,x:i,y:o}};if((null!==t||0!==i||0!==o)&&null!==i&&null!==o){var c=pe.length,s=c>1?pe[c-2]:null;s&&function(t,e){var n=t.data.x-e.data.x,a=t.data.y-e.data.y;return n*n+a*a<400&&e.time-t.time<25}(s,u)&&pe.pop(),pe.push(u),I(ve),ve=D(me,500,10)}}function me(t){St(aa.bind(this,t))}var be=null,ye=null,we=null;function ke(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=be.start?be.start:null;null!==ye&&null!==be.start&&n!==e.anchorNode&&(I(we),Ee(21)),be={start:e.anchorNode,startOffset:e.anchorOffset,end:e.focusNode,endOffset:e.focusOffset},ye=e,I(we),we=D(Ee,500,21)}}function Ee(t){St(aa.bind(this,t))}function Oe(){ye=null,be={start:0,startOffset:0,end:0,endOffset:0}}var Me,Se,Ne=[];function _e(t){Ne.push({time:l(),event:39,data:{target:ea(t)}}),St(aa.bind(this,39))}function xe(){Ne=[]}function Te(t){Me={name:t.type},aa(26),oi()}function De(){Me=null}function Ie(){Se={visible:"visibilityState"in document?document.visibilityState:"default"},aa(28)}function Ce(){Se=null}function je(t){!function(t){var e=Dn(t);Ir(e?e.contentWindow:t===document?window:t,"scroll",ge,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Ut(t),function(t){Ir(t,"cut",Kt.bind(this,0),!0),Ir(t,"copy",Kt.bind(this,1),!0),Ir(t,"paste",Kt.bind(this,2),!0)}(t),function(t){Ir(t,"mousedown",ue.bind(this,13,t),!0),Ir(t,"mouseup",ue.bind(this,14,t),!0),Ir(t,"mousemove",ue.bind(this,12,t),!0),Ir(t,"wheel",ue.bind(this,15,t),!0),Ir(t,"dblclick",ue.bind(this,16,t),!0),Ir(t,"touchstart",ce.bind(this,17,t),!0),Ir(t,"touchend",ce.bind(this,18,t),!0),Ir(t,"touchmove",ce.bind(this,19,t),!0),Ir(t,"touchcancel",ce.bind(this,20,t),!0)}(t),function(t){Ir(t,"input",ee,!0)}(t),function(t){Ir(t,"selectstart",ke.bind(this,t),!0),Ir(t,"selectionchange",ke.bind(this,t),!0)}(t),function(t){Ir(t,"submit",_e,!0)}(t))}var ze=Object.freeze({__proto__:null,start:function(){ra=[],oa(),Gt(),Qt(),de(),ae(),Ir(window,"resize",fe),fe(),Ir(document,"visibilitychange",Ie),Ie(),pe=[],ge(),Oe(),xe(),Ir(window,"pagehide",Te)},stop:function(){ra=[],oa(),Gt(),Qt(),I(oe),ie.length>0&&le(ie[ie.length-1].event),I($t),ae(),he(),Ce(),I(ve),pe=[],Oe(),I(we),xe(),De()},observe:je}),Le=/[^0-9\.]/g;function Ae(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":nr(5,t[a]),nr(8,t.creator),nr(18,t.headline);break;case"product":nr(5,t[a]),nr(10,t.name),nr(12,t.sku),t.brand&&nr(6,t.brand.name);break;case"aggregaterating":t.ratingValue&&(T(11,He(t.ratingValue,100)),T(18,He(t.bestRating)),T(19,He(t.worstRating))),T(12,He(t.ratingCount)),T(17,He(t.reviewCount));break;case"person":nr(8,t.name);break;case"offer":nr(7,t.availability),nr(14,t.itemCondition),nr(13,t.priceCurrency),nr(12,t.sku),T(13,He(t.price));break;case"brand":nr(6,t.name)}null!==r&&"object"==typeof r&&Ae(r)}}function He(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(Le,""))*e)}return null}var Re=["title","alt","onload","onfocus","onerror","data-drupal-form-submit-last"],Ye=/[\r\n]+/g;function We(e,n){var a=null;if(2===n&&!1===Rn(e))return a;0!==n&&e.nodeType===Node.TEXT_NODE&&e.parentElement&&"STYLE"===e.parentElement.tagName&&(e=e.parentNode);var r=!1===Rn(e)?"add":"update",i=e.parentElement?e.parentElement:null,o=e.ownerDocument!==document;switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:i=o&&e.parentNode?Dn(e.parentNode):i;var u=e,c={tag:(o?"iframe:":"")+"*D",attributes:{name:u.name,publicId:u.publicId,systemId:u.systemId}};t[r](e,i,c,n);break;case Node.DOCUMENT_NODE:e===document&&Sn(document),Xe(e);break;case Node.DOCUMENT_FRAGMENT_NODE:var s=e;if(s.host)if(Sn(s),"function"===typeof s.constructor&&s.constructor.toString().indexOf("[native code]")>=0){Xe(s);for(var l="",d=0,f=("adoptedStyleSheets"in s?s.adoptedStyleSheets:[]);d<f.length;d++){l+=Pe(f[d])}var h={tag:"*S",attributes:{style:l}};t[r](e,s.host,h,n)}else t[r](e,s.host,{tag:"*P",attributes:{}},n);break;case Node.TEXT_NODE:if(i=i||e.parentNode,"update"===r||i&&Rn(i)&&"STYLE"!==i.tagName){var p={tag:"*T",value:e.nodeValue};t[r](e,i,p,n)}break;case Node.ELEMENT_NODE:var v=e,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;Re.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=e.parentElement?e.parentElement:e.parentNode?e.parentNode:null,"http://www.w3.org/2000/svg"===v.namespaceURI&&(g="svg:"+g),g){case"HTML":i=o&&i?Dn(i):null;var b={tag:(o?"iframe:":"")+g,attributes:m};t[r](e,i,b,n);break;case"SCRIPT":if("type"in m&&"application/ld+json"===m.type)try{Ae(JSON.parse(v.text.replace(Ye,"")))}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":nr(20,w);break;case"og:type":nr(19,w);break;case"generator":nr(21,w)}}break;case"HEAD":var k={tag:g,attributes:m};location&&(k.attributes["*B"]=location.protocol+"//"+location.hostname),t[r](e,i,k,n);break;case"STYLE":var E={tag:g,attributes:m,value:qe(v)};t[r](e,i,E,n);break;case"IFRAME":var O=e,M={tag:g,attributes:m};Tn(O)&&(!function(t){!1===Rn(t)&&Ir(t,"load",on.bind(this,t,"childList"),!0)}(O),M.attributes["*O"]="true",O.contentDocument&&O.contentWindow&&"loading"!==O.contentDocument.readyState&&(a=O.contentDocument)),t[r](e,i,M,n);break;default:var S={tag:g,attributes:m};v.shadowRoot&&(a=v.shadowRoot),t[r](e,i,S,n)}}return a}function Xe(t){Rn(t)||(!function(t){try{var e=c("MutationObserver"),n=e in window?new window[e](Tr(tn)):null;n&&(n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),Be.push(n))}catch(t){Da(2,0,t?t.name:null)}}(t),je(t))}function qe(t){var e=t.textContent?t.textContent.trim():"",n=t.dataset?Object.keys(t.dataset).length:0;return(0===e.length||n>0)&&(e=Pe(t.sheet)),e}function Pe(t){var e="",n=null;try{n=t?t.cssRules:[]}catch(t){if(Da(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 Ue(t,e,n){return Q(this,void 0,void 0,(function(){var a,r,i,o,u;return $(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=_t(e))?[3,3]:[4,Dt(e)];case 2:o=c.sent(),c.label=3;case 3:return 2===o?[3,4]:((u=We(r,n))&&a.push(u),[3,1]);case 4:return[2]}}))}))}var Be=[],Ve=[],Fe=null,Je=null,Ge=null,Ze=[],Ke=null,Qe=null,$e={};function tn(t){var e=l();Y(6,e),Ve.push({time:e,mutations:t}),St(en,1).then((function(){D(Wt),Tr(Zn)()}))}function en(){return Q(this,void 0,void 0,(function(){var t,e,n,a,r,i,o,u,c;return $(this,(function(s){switch(s.label){case 0:xt(t={id:dr(),cost:3}),s.label=1;case 1:if(!(Ve.length>0))return[3,8];e=Ve.shift(),n=0,a=e.mutations,s.label=2;case 2:return n<a.length?(r=a[n],0!==(i=_t(t))?[3,4]:[4,Dt(t)]):[3,6];case 3:i=s.sent(),s.label=4;case 4:if(2===i)return[3,6];switch(o=r.target,u=function(t,e){var n=t.target?An(t.target.parentNode):null;if(n&&"HTML"!==n.data.tag){var a=l()>Qe,r=An(t.target),i=r&&r.selector?r.selector.join():t.target.nodeName,o=[n.selector?n.selector.join():"",i,t.attributeName,nn(t.addedNodes),nn(t.removedNodes)].join();$e[o]=o in $e?$e[o]:[0];var u=$e[o];if(!1===a&&u[0]>=10&&an(u[1],2,e),u[0]=a?u[0]+1:1,10===u[0])return u[1]=t.removedNodes,"suspend";if(u[0]>10)return""}return t.type}(r,t),u&&o&&o.ownerDocument&&Sn(o.ownerDocument),u&&o&&o.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&o.host&&Sn(o),u){case"attributes":We(o,3);break;case"characterData":We(o,4);break;case"childList":an(r.addedNodes,1,t),an(r.removedNodes,2,t);break;case"suspend":(c=An(o))&&(c.metadata.suspend=!0)}s.label=5;case 5:return n++,[3,2];case 6:return[4,Lt(6,t,e.time)];case 7:return s.sent(),[3,1];case 8:return Tt(t),[2]}}))}))}function nn(t){for(var e=[],n=0;t&&n<t.length;n++)e.push(t[n].nodeName);return e.join()}function an(t,e,n){return Q(this,void 0,void 0,(function(){var a,r,i;return $(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]:(Ue(t[r],n,e),[3,5]):[3,6];case 2:return 0!==(i=_t(n))?[3,4]:[4,Dt(n)];case 3:i=o.sent(),o.label=4;case 4:if(2===i)return[3,6];We(t[r],e),o.label=5;case 5:return r++,[3,1];case 6:return[2]}}))}))}function rn(t,e){return void 0===e&&(e=!1),Ze.indexOf(t)<0&&Ze.push(t),Ke&&I(Ke),Ke=D((function(){!function(t){for(var e=0,n=Ze;e<n.length;e++){var a=n[e];if(a){var r=a.nodeType===Node.DOCUMENT_FRAGMENT_NODE;if(r&&Rn(a))continue;on(a,r||t?"childList":"characterData")}}Ze=[]}(e)}),33),t}function on(t,e){Tr(tn)([{addedNodes:[t],attributeName:null,attributeNamespace:null,nextSibling:null,oldValue:null,previousSibling:null,removedNodes:[],target:t,type:e}])}var un=1,cn=[],sn=[],ln=[],dn={},fn=[],hn=[],pn={},vn=[],gn=[],mn=[],bn=null,yn=null,wn=null,kn=null;function En(){Mn(),Sn(document,!0)}function On(){Mn()}function Mn(){un=1,cn=[],sn=[],ln=[],dn={},fn=[],hn=[],vn="address,password,contact".split(","),gn="password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip".split(","),mn="radio,checkbox,range,button,reset,submit".split(","),bn=new WeakMap,yn=new WeakMap,wn=new WeakMap,kn=new WeakMap}function Sn(t,e){void 0===e&&(e=!1);try{e&&u.unmask.forEach((function(t){return t.indexOf("!")<0?hn.push(t):fn.push(t.substr(1))})),"querySelectorAll"in t&&(u.regions.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return Jn(t,"".concat(e[0]))}))})),u.mask.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return wn.set(t,3)}))})),u.fraud.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return kn.set(t,e[0])}))})),hn.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return wn.set(t,0)}))})))}catch(t){Da(5,1,t?t.name:null)}}function Nn(t,e){if(void 0===e&&(e=!1),null===t)return null;var n=bn.get(t);return!n&&e&&(n=un++,bn.set(t,n)),n||null}function _n(t,e,n,a){var r,i=Nn(t,!0),o=e?Nn(e):null,c=Wn(t),s=null,l=Gn(t)?i:null,d=null,f=kn.has(t)?kn.get(t):null,h=u.content?1:2;o>=0&&sn[o]&&((s=sn[o]).children.push(i),l=null===l?s.region:l,d=s.fragment,f=null===f?s.metadata.fraud:f,h=s.metadata.privacy),n.attributes&&"data-clarity-region"in n.attributes&&(Jn(t,n.attributes["data-clarity-region"]),l=i),cn[i]=t,sn[i]={id:i,parent:o,previous:c,children:[],data:n,selector:null,hash:null,region:l,metadata:{active:!0,suspend:!1,privacy:h,position:null,fraud:f,size:null},fragment:d},function(t,e,n){var a=e.data,r=e.metadata,i=r.privacy,o=a.attributes||{},u=a.tag.toUpperCase();switch(!0){case"data-clarity-mask"in o:r.privacy=3;break;case"data-clarity-unmask"in o:r.privacy=0;break;case wn.has(t):r.privacy=wn.get(t);break;case kn.has(t):r.privacy=2;break;case"*T"===u:var c=n&&n.data?n.data.tag:"",s=n&&n.selector?n.selector[0]:"";r.privacy="STYLE"===c||"TITLE"===c||fn.some((function(t){return s.indexOf(t)>=0}))?0:i;break;case"type"in o:r.privacy=In(o.type,gn,r);break;case"INPUT"===u&&0===i:var l="";Object.keys(o).forEach((function(t){return l+=o[t].toLowerCase()})),r.privacy=In(l,gn,r);break;case 1===i&&"INPUT"===u:r.privacy=In(o.class,vn,r),r.privacy=mn.indexOf(o.type)>=0?0:i;break;case 1===i:r.privacy=In(o.class,vn,r)}}(t,sn[i],s),jn(sn[i]),"IMG"===(r=sn[i]).data.tag&&3===r.metadata.privacy&&(r.metadata.size=[]),Xn(i,a,sn[i].fragment)}function xn(t,e,n,a){var r=Nn(t),i=e?Nn(e):null,o=Wn(t),u=!1,c=!1;if(r in sn){var s=sn[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:sn[i].children.indexOf(o)+1;sn[i].children.splice(d,0,r),s.region=Gn(t)?r:sn[i].region}else!function(t,e){if(t in sn){var n=sn[t];n.metadata.active=!1,n.parent=null,Xn(t,e)}}(r,a);if(null!==l&&l>=0){var f=sn[l].children.indexOf(r);f>=0&&sn[l].children.splice(f,1)}c=!0}for(var h in n)Cn(s.data,n,h)&&(u=!0,s.data[h]=n[h]);s.fragment&&pn[s.fragment]&&(u=!0),jn(s),Xn(r,a,sn[r].fragment,u,c)}}function Tn(t){var e=!1;if(t.nodeType===Node.ELEMENT_NODE&&"IFRAME"===t.tagName){var n=t;try{n.contentDocument&&(yn.set(n.contentDocument,n),e=!0)}catch(t){}}return e}function Dn(t){var e=t.nodeType===Node.DOCUMENT_NODE?t:null;return e&&yn.has(e)?yn.get(e):null}function In(t,e,n){return t&&e.some((function(e){return t.indexOf(e)>=0}))?2:n.privacy}function Cn(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 jn(t){var e=t.parent&&t.parent in sn?sn[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=sn[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={tag:a.tag,prefix:n,position:r,attributes:a.attributes};t.selector=[mt(i),mt(i,!0)],t.hash=t.selector.map((function(t){return t?f(t):null})),t.hash.forEach((function(e){return dn[e]=t.id})),t.hash.some((function(t){return-1!==Aa.indexOf(t)}))&&(t.fragment=t.id)}function zn(t){return t in cn?cn[t]:null}function Ln(t){return t in sn?sn[t]:null}function An(t){var e=Nn(t);return e in sn?sn[e]:null}function Hn(t){return t in dn?dn[t]:null}function Rn(t){return Nn(t)in cn}function Yn(){for(var t=[],e=0,n=ln;e<n.length;e++){(a=n[e])in sn&&t.push(sn[a])}for(var a in ln=[],pn)Xa(pn[a],a,!0);return pn={},t}function Wn(t){for(var e=null;null===e&&t.previousSibling;)e=Nn(t.previousSibling),t=t.previousSibling;return e}function Xn(t,e,n,a,r){if(void 0===n&&(n=null),void 0===a&&(a=!0),void 0===r&&(r=!1),n&&!pn[n]){var i=zn(n),o=Ln(n);i&&o&&(rn(i,!0),o.hash.forEach((function(t){-1!==Aa.indexOf(t)&&(pn[n]=t)})))}var u=ln.indexOf(t);u>=0&&1===e&&r?(ln.splice(u,1),ln.push(t)):-1===u&&a&&ln.push(t)}var qn=[],Pn=null,Un={},Bn=[],Vn=!1,Fn=null;function Jn(t,e){!1===Pn.has(t)&&(Pn.set(t,e),(Fn=null===Fn&&Vn?new IntersectionObserver(Kn,{threshold:[0,.2,.4,.6,.8,1]}):Fn)&&t&&t.nodeType===Node.ELEMENT_NODE&&Fn.observe(t))}function Gn(t){return Pn&&Pn.has(t)}function Zn(){for(var t=[],e=0,n=Bn;e<n.length;e++){var a=n[e],r=Nn(a.node);r in Un||(r?(a.data.id=r,Un[r]=a.data,qn.push($n(a.data))):t.push(a))}Bn=t,qn.length>0&&Lt(7)}function Kn(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(Pn.has(r)&&i.width+i.height>0&&u.width>0&&u.height>0){var c=r?Nn(r):null,s=c in Un?Un[c]:{id:c,name:Pn.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;Qn(r,s,s.interaction,d?13:l?10:0),s.visibility>=13&&Fn&&Fn.unobserve(r)}}qn.length>0&&Lt(7)}function Qn(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 Un&&r||!(e.id in Un))&&(Un[e.id]=e,qn.push($n(e))):Bn.push({node:t,data:e})}function $n(t){return{time:l(),data:{id:t.id,interaction:t.interaction,visibility:t.visibility,name:t.name}}}function ta(){qn=[]}function ea(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return Qe=l()+3e3,n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function na(t,e,n){void 0===n&&(n=null);var a={id:0,hash:null,privacy:2,node:t};if(t){var r=An(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=zn(t),a=t in Un?Un[t]:{id:t,visibility:0,interaction:16,name:Pn.get(n)},r=16;switch(e){case 9:r=20;break;case 27:r=30}Qn(n,a,r,a.visibility)}(r.region,e),i.fraud&&vt(i.fraud,r.id,n||r.data.value)}}return a}function aa(t){return Q(this,void 0,void 0,(function(){var e,n,a,r,i,o,u,c,s,d,f,h,p,v,g,b,w,k,E,O,M,S,N,_,x,T,D,I,C;return $(this,(function(j){switch(e=l(),n=[e,t],t){case 13:case 14:case 12:case 15:case 16:case 17:case 18:case 19:case 20:for(a=0,r=ie;a<r.length;a++)I=r[a],(i=na(I.data.target,I.event)).id>0&&((n=[I.time,I.event]).push(i.id),n.push(I.data.x),n.push(I.data.y),ba(n),m(I.event,I.data.x,I.data.y));de();break;case 9:for(o=0,u=Pt;o<u.length;o++)I=u[o],c=na(I.data.target,I.event,I.data.text),n=[I.time,I.event],s=c.hash.join("."),n.push(c.id),n.push(I.data.x),n.push(I.data.y),n.push(I.data.eX),n.push(I.data.eY),n.push(I.data.button),n.push(I.data.reaction),n.push(I.data.context),n.push(dt(I.data.text,"click",c.privacy)),n.push(I.data.link),n.push(s),n.push(I.data.trust),ba(n),ua(I.time,I.event,s,I.data.x,I.data.y,I.data.reaction,I.data.context);Gt();break;case 38:for(d=0,f=Zt;d<f.length;d++)I=f[d],n=[I.time,I.event],(x=na(I.data.target,I.event)).id>0&&(n.push(x.id),n.push(I.data.action),ba(n));Qt();break;case 11:h=re,n.push(h.width),n.push(h.height),m(t,h.width,h.height),he(),ba(n);break;case 26:p=Me,n.push(p.name),De(),ba(n);break;case 27:for(v=0,g=te;v<g.length;v++)I=g[v],b=na(I.data.target,I.event,I.data.value),(n=[I.time,I.event]).push(b.id),n.push(dt(I.data.value,"input",b.privacy)),ba(n);ae();break;case 21:(w=be)&&(k=na(w.start,t),E=na(w.end,t),n.push(k.id),n.push(w.startOffset),n.push(E.id),n.push(w.endOffset),Oe(),ba(n));break;case 10:for(O=0,M=pe;O<M.length;O++)I=M[O],(S=na(I.data.target,I.event)).id>0&&((n=[I.time,I.event]).push(S.id),n.push(I.data.x),n.push(I.data.y),ba(n),m(I.event,I.data.x,I.data.y));pe=[];break;case 39:for(N=0,_=Ne;N<_.length;N++)I=_[N],n=[I.time,I.event],(x=na(I.data.target,I.event)).id>0&&(n.push(x.id),ba(n));xe();break;case 22:for(T=0,D=ia;T<D.length;T++)I=D[T],(n=[I.time,I.event]).push(I.data.type),n.push(I.data.hash),n.push(I.data.x),n.push(I.data.y),n.push(I.data.reaction),n.push(I.data.context),ba(n,!1);oa();break;case 28:C=Se,n.push(C.visible),ba(n),y(e,C.visible),Ce()}return[2]}))}))}var ra=[],ia=[];function oa(){ia=[]}function ua(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),ra.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),m(e,a,r)}var ca,sa,la,da,fa,ha=0,pa=0,va=null,ga=0;function ma(){da=!0,ha=0,pa=0,ga=0,ca=[],sa=[],la={},fa=null}function ba(t,e){if(void 0===e&&(e=!0),da){var n=l(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:ha+=r.length;case 37:case 6:pa+=r.length,ca.push(r);break;default:sa.push(r)}_(25);var i=function(){var t=!1===u.lean&&ha>0?100:Or.sequence*u.delay;return"string"==typeof u.upload?Math.max(Math.min(t,3e4),100):u.delay}();n-ga>2*i&&(I(va),va=null),e&&null===va&&(25!==a&&L(),va=D(wa,i),ga=n,Ja(pa))}}function ya(){I(va),wa(!0),ha=0,pa=0,ga=0,ca=[],sa=[],la={},fa=null,da=!1}function wa(t){return void 0===t&&(t=!1),Q(this,void 0,void 0,(function(){var e,n,a,r,i,o,c,s;return $(this,(function(l){switch(l.label){case 0:return va=null,(e=!1===u.lean&&pa>0&&(pa<1048576||Or.sequence>0))&&T(1,1),Zn(),function(){var t=[];ia=[];for(var e=Or.start+Or.duration,n=Math.max(e-2e3,0),a=0,r=ra;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&ia.push(i),t.push(i))}ra=t,aa(22)}(),ot(),n=!0===t,a=JSON.stringify(Nr(n)),r="[".concat(sa.join(),"]"),i=e?"[".concat(ca.join(),"]"):"",o=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:a,a:r,p:i}),n?(s=null,[3,3]):[3,1];case 1:return[4,et(o)];case 2:s=l.sent(),l.label=3;case 3:return x(2,(c=s)?c.length:o.length),ka(o,c,Or.sequence,n),sa=[],e&&(ca=[],pa=0,ha=0),[2]}}))}))}function ka(t,e,n,a){if(void 0===a&&(a=!1),"string"==typeof u.upload){var r=u.upload,i=!1;if(a&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(r,t))&&Oa(n)}catch(t){}if(!1===i){n in la?la[n].attempts++:la[n]={data:t,attempts:1};var o=new XMLHttpRequest;o.open("POST",r),null!==n&&(o.onreadystatechange=function(){Tr(Ea)(o,n)}),o.withCredentials=!0,e?(o.setRequestHeader("Accept","application/x-clarity-gzip"),o.send(e)):o.send(t)}}else if(u.upload){(0,u.upload)(t),Oa(n)}}function Ea(t,e){var n=la[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?Ga(6):(0===t.status&&(u.upload=u.fallback?u.fallback:u.upload),ka(n.data,null,e)):(fa={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&Va(2),200===t.status&&t.responseText&&function(t){switch(t&&t.length>0?t.split(" ")[0]:""){case"END":Ga(6);break;case"UPGRADE":U("Auto")}}(t.responseText),0===t.status&&(ka(n.data,null,e,!0),Ga(3)),t.status>=200&&t.status<=208&&Oa(e),delete la[e]))}function Oa(t){1===t&&pr()}var Ma,Sa={};function Na(t){var e=t.error||t;return e.message in Sa||(Sa[e.message]=0),Sa[e.message]++>=5||e&&e.message&&(Ma={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},_a(31)),!0}function _a(t){return Q(this,void 0,void 0,(function(){var e;return $(this,(function(n){switch(e=[l(),t],t){case 31:e.push(Ma.message),e.push(Ma.line),e.push(Ma.column),e.push(Ma.stack),e.push(Ma.source),ba(e);break;case 33:xa&&(e.push(xa.code),e.push(xa.name),e.push(xa.message),e.push(xa.stack),e.push(xa.severity),ba(e,!1));break;case 41:ht&&(e.push(ht.id),e.push(ht.target),e.push(ht.hash),ba(e,!1))}return[2]}))}))}var xa,Ta={};function Da(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 Ta&&Ta[t].indexOf(i)>=0||(xa={code:t,name:n,message:a,stack:r,severity:e},t in Ta?Ta[t].push(i):Ta[t]=[i],_a(33))}var Ia,Ca={},ja=[],za={},La={},Aa=[];function Ha(){try{var t=u.extract;if(!t)return;for(var e=0;e<t.length;e+=3){var n=t[e],a=t[e+1];switch(n){case 0:var r=t[e+2];za[a]=Pa(r);break;case 1:break;case 2:var i=t[e+2];La[a]=i;break;case 3:Aa=t[e+2]}}}catch(t){Da(8,1,t?t.name:null)}}function Ra(t){return JSON.parse(JSON.stringify(t))}function Ya(){try{for(var t in za){var e=(r=Ua(Ra(za[t])))?JSON.stringify(r).substring(0,1e4):r;e&&Xa(t,e)}for(var n in La){var a=document.querySelector(La[n]);a&&Xa(n,a.innerText)}}catch(t){Da(5,1,t?t.name:null)}var r;Va(40)}function Wa(){ja=[]}function Xa(t,e,n){void 0===n&&(n=!1),(!(t in Ca)||t in Ca&&Ca[t]!==e||n)&&(Ca[t]=e,ja.push(t))}function qa(){Ca={},ja=[],za={},La={}}function Pa(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 Ua(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&&Ba(r,a.condition))n=Ua(t,r);else if(Array.isArray(r)){for(var i=[],o=0,u=r;o<u.length;o++){var c=u[o];if(Ba(c,a.condition)){var s=Ua(t,c);s&&i.push(s)}}n=i}return n}return null}function Ba(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function Va(t){var e=[l(),t];switch(t){case 4:var n=h;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),ba(e,!1)),g();break;case 25:e.push(M.gap),ba(e);break;case 35:e.push(Ia.check),ba(e,!1);break;case 3:e.push(P.key),ba(e);break;case 2:e.push(fa.sequence),e.push(fa.attempts),e.push(fa.status),ba(e,!1);break;case 24:e.push(E.key),e.push(E.value),ba(e);break;case 34:var a=Object.keys(V);if(a.length>0){for(var r=0,i=a;r<i.length;r++){var o=i[r];e.push(o),e.push(V[o])}K(),ba(e,!1)}break;case 0:var u=Object.keys(N);if(u.length>0){for(var c=0,s=u;c<s.length;c++){var d=s[c],f=parseInt(d,10);e.push(f),e.push(Math.round(N[d]))}N={},ba(e,!1)}break;case 1:var p=Object.keys($a);if(p.length>0){for(var v=0,m=p;v<m.length;v++){var b=m[v];f=parseInt(b,10);e.push(f),e.push($a[b])}rr(),ba(e,!1)}break;case 36:var y=Object.keys(R);if(y.length>0){for(var w=0,k=y;w<k.length;w++){var O=k[w];f=parseInt(O,10);e.push(f),e.push([].concat.apply([],R[O]))}X(),ba(e,!1)}break;case 40:for(var S=0,_=ja;S<_.length;S++){O=_[S];e.push(O),e.push(Ca[O])}Wa(),ba(e,!1)}}function Fa(){Ia={check:0}}function Ja(t){if(0===Ia.check){var e=Ia.check;e=Or.sequence>=128?1:e,e=l()>72e5?2:e,(e=t>10485760?2:e)!==Ia.check&&Ga(e)}}function Ga(t){Ia.check=t,hr(),oi()}function Za(){0!==Ia.check&&Va(35)}function Ka(){Ia=null}var Qa=null,$a=null;function tr(){Qa={},$a={}}function er(){Qa={},$a={}}function nr(t,e){e&&(e="".concat(e),t in Qa||(Qa[t]=[]),Qa[t].indexOf(e)<0&&(Qa[t].push(e),t in $a||($a[t]=[]),$a[t].push(e),Qa[t].length>128&&Ga(5)))}function ar(){Va(1)}function rr(){$a={}}var ir=null,or=[],ur=null;function cr(){ur=null;var t=navigator&&"userAgent"in navigator?navigator.userAgent:"",e=document&&document.title?document.title:"",n=function(){var t={session:mr(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=wr("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-br(n[1])<18e5&&(t.session=n[0],t.count=br(n[2])+1,t.upgrade=br(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),a=yr();ir={projectId:u.projectId||f(location.host),userId:a.id,sessionId:n.session,pageNum:n.count},u.lean=u.track&&null!==n.upgrade?0===n.upgrade:u.lean,u.upload=u.track&&"string"==typeof u.upload&&n.upload&&n.upload.length>"https://".length?n.upload:u.upload,nr(0,t),nr(3,e),nr(1,location.href),nr(2,document.referrer),nr(15,function(){var t=mr();if(u.track&&vr(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),nr(16,document.documentElement.lang),nr(17,document.dir),navigator&&(nr(9,navigator.userLanguage||navigator.language),navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;nr(22,t.platform),nr(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){nr(24,t.name+"~"+t.version)})),nr(25,t.model),T(27,t.mobile?1:0)}))),T(0,n.ts),T(1,0),screen&&(T(14,Math.round(screen.width)),T(15,Math.round(screen.height)),T(16,Math.round(screen.colorDepth)));for(var r=0,i=u.cookies;r<i.length;r++){var o=i[r],c=wr(o);c&&F(o,c)}gr(a)}function sr(){ur=null,ir=null}function lr(t,e){void 0===e&&(e=!0),ir&&!1===e&&t(ir,!u.lean),or.push({callback:t,wait:e})}function dr(){return ir?[ir.userId,ir.sessionId,ir.pageNum].join("."):""}function fr(){Ur()&&(u.track=!0,gr(yr(),1))}function hr(){kr("_clsk","",0)}function pr(){var t=Math.round(Date.now()),e=u.upload&&"string"==typeof u.upload?u.upload.replace("https://",""):"",n=u.lean?0:1;!function(t){or.length>0&&or.forEach((function(e){!e.callback||e.wait&&!t||e.callback(ir,!u.lean)}))}(n),kr("_clsk",[ir.sessionId,t,ir.pageNum,n,e].join("|"),1)}function vr(t,e){try{return!!t[e]}catch(t){return!1}}function gr(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)&&kr("_clck",[ir.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 br(t,e){return void 0===e&&(e=10),parseInt(t,e)}function yr(){var t={id:mr(),expiry:null,consent:0},e=wr("_clck");if(e&&e.length>0){for(var n=e.split("|"),a=0,r=0,i=document.cookie.split(";");r<i.length;r++){a+="_clck"===i[r].split("=")[0].trim()?1:0}if(1===n.length||a>1){var o="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(o),document.cookie="".concat("_clsk","=").concat(o)}n.length>2&&(t.expiry=br(n[2],36)),n.length>3&&1===br(n[3])&&(t.consent=1),u.track=u.track||1===t.consent,t.id=u.track?n[0]:t.id}return t}function wr(t){if(vr(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 kr(t,e,n){if(u.track&&(navigator&&navigator.cookieEnabled||vr(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===ur){for(var o=location.hostname?location.hostname.split("."):[],c=o.length-1;c>=0;c--)if(ur=".".concat(o[c]).concat(ur||""),c<o.length-1&&(document.cookie="".concat(i).concat(";").concat("domain=").concat(ur),wr(t)===e))return;ur=""}}catch(t){ur=""}document.cookie=ur?"".concat(i).concat(";").concat("domain=").concat(ur):i}}var Er,Or=null;function Mr(){var t=ir;Or={version:d,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function Sr(){Or=null}function Nr(t){return Or.start=Or.start+Or.duration,Or.duration=l()-Or.start,Or.sequence++,Or.upload=t&&"sendBeacon"in navigator?1:0,Or.end=t?1:0,[Or.version,Or.sequence,Or.start,Or.duration,Or.projectId,Or.userId,Or.sessionId,Or.pageNum,Or.upload,Or.end]}function _r(){Er=[]}function xr(t){if(Er&&-1===Er.indexOf(t.message)){var e=u.report;if(e&&e.length>0){var n={v:Or.version,p:Or.projectId,u:Or.userId,s:Or.sessionId,n:Or.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e),a.send(JSON.stringify(n)),Er.push(t.message)}}return t}function Tr(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw xr(t)}var n=performance.now()-e;x(4,n),n>30&&(_(7),T(6,n))}}var Dr=[];function Ir(t,e,n,a){void 0===a&&(a=!1),n=Tr(n);try{t[c("addEventListener")](e,n,a),Dr.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function Cr(){for(var t=0,e=Dr;t<e.length;t++){var n=e[t];try{n.target[c("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}Dr=[]}var jr=null,zr=null,Lr=null,Ar=0;function Hr(){return!(Ar++>20)||(Da(4,0),!1)}function Rr(){Ar=0,Lr!==Wr()&&(oi(),window.setTimeout(Yr,250))}function Yr(){ii(),T(29,1)}function Wr(){return location.href?location.href.replace(location.hash,""):location.href}var Xr=!1;function qr(){Xr=!0,s=performance.now(),Mt(),Cr(),_r(),Lr=Wr(),Ar=0,Ir(window,"popstate",Rr),null===jr&&(jr=history.pushState,history.pushState=function(){jr.apply(this,arguments),Ur()&&Hr()&&Rr()}),null===zr&&(zr=history.replaceState,history.replaceState=function(){zr.apply(this,arguments),Ur()&&Hr()&&Rr()})}function Pr(){Lr=null,Ar=0,_r(),Cr(),Mt(),s=0,Xr=!1}function Ur(){return Xr}function Br(t){if(null===t||Xr)return!1;for(var e in t)e in u&&(u[e]=t[e]);return!0}function Vr(){ii(),O("clarity","restart")}var Fr=Object.freeze({__proto__:null,start:function(){pt=[],T(26,navigator.webdriver?1:0),Ir(window,"error",Na),Sa={},Ta={}},stop:function(){Ta={}}});function Jr(){return Q(this,void 0,void 0,(function(){var t,e;return $(this,(function(n){switch(n.label){case 0:return t=l(),xt(e={id:dr(),cost:3}),[4,Ue(document,e,0)];case 1:return n.sent(),[4,Lt(5,e,t)];case 2:return n.sent(),Tt(e),[2]}}))}))}var Gr=Object.freeze({__proto__:null,start:function(){Yt(),Wt(),ta(),Fn=null,Pn=new WeakMap,Un={},Bn=[],Vn=!!window.IntersectionObserver,En(),function(){if(Be=[],Ze=[],Ke=null,Qe=0,$e={},null===Fe&&(Fe=CSSStyleSheet.prototype.insertRule,CSSStyleSheet.prototype.insertRule=function(){return Ur()&&rn(this.ownerNode),Fe.apply(this,arguments)}),null===Je&&(Je=CSSStyleSheet.prototype.deleteRule,CSSStyleSheet.prototype.deleteRule=function(){return Ur()&&rn(this.ownerNode),Je.apply(this,arguments)}),null===Ge){Ge=Element.prototype.attachShadow;try{Element.prototype.attachShadow=function(){return Ur()?rn(Ge.apply(this,arguments)):Ge.apply(this,arguments)}}catch(t){Ge=null}}}(),St(Jr,1).then((function(){Tr(Wt)(),Tr(Zn)()}))},stop:function(){ta(),Pn=null,Un={},Bn=[],Fn&&(Fn.disconnect(),Fn=null),Vn=!1,On(),function(){for(var t=0,e=Be;t<e.length;t++){var n=e[t];n&&n.disconnect()}Be=[],$e={},Ve=[],Ze=[],Qe=0,Ke=null}(),Yt()}});var Zr,Kr=null;function Qr(){Kr=null}function $r(t){Kr={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){Q(this,void 0,void 0,(function(){var e,n;return $(this,(function(a){return e=l(),n=[e,t],29===t&&(n.push(Kr.fetchStart),n.push(Kr.connectStart),n.push(Kr.connectEnd),n.push(Kr.requestStart),n.push(Kr.responseStart),n.push(Kr.responseEnd),n.push(Kr.domInteractive),n.push(Kr.domComplete),n.push(Kr.loadEventStart),n.push(Kr.loadEventEnd),n.push(Kr.redirectCount),n.push(Kr.size),n.push(Kr.type),n.push(Kr.protocol),n.push(Kr.encodedSize),n.push(Kr.decodedSize),Qr(),ba(n,!1)),[2]}))}))}(29)}var ti=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint"];function ei(){try{Zr&&Zr.disconnect(),Zr=new PerformanceObserver(Tr(ni));for(var t=0,e=ti;t<e.length;t++){var n=e[t];PerformanceObserver.supportedEntryTypes.indexOf(n)>=0&&("layout-shift"===n&&x(9,0),Zr.observe({type:n,buffered:!0}))}}catch(t){Da(3,1)}}function ni(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":$r(a);break;case"resource":var r=a.name;nr(4,ai(r)),r!==u.upload&&r!==u.fallback||T(28,a.duration);break;case"longtask":_(7);break;case"first-input":e&&T(10,a.processingStart-a.startTime);break;case"layout-shift":e&&!a.hadRecentInput&&x(9,1e3*a.value);break;case"largest-contentful-paint":e&&T(8,a.startTime)}}performance&&"memory"in performance&&performance.memory.usedJSHeapSize&&T(30,Math.abs(performance.memory.usedJSHeapSize/1048576))}(t.getEntries())}function ai(t){var e=document.createElement("a");return e.href=t,e.hostname}var ri=[Fr,Gr,ze,Object.freeze({__proto__:null,start:function(){Qr(),function(){window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?"complete"!==document.readyState?Ir(window,"load",D.bind(this,ei,0)):ei():Da(3,0)}()},stop:function(){Zr&&Zr.disconnect(),Zr=null,Qr()}})];function ii(t){void 0===t&&(t=null),function(){try{return!1===Xr&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(Br(t),qr(),rt(),ri.forEach((function(t){return Tr(t.start)()})))}function oi(){Ur()&&(ri.slice().reverse().forEach((function(t){return Tr(t.stop)()})),it(),Pr())}var ui=Object.freeze({__proto__:null,version:d,start:ii,pause:function(){Ur()&&(O("clarity","pause"),null===Et&&(Et=new Promise((function(t){Ot=t}))))},resume:function(){Ur()&&(Et&&(Ot(),Et=null,null===kt&&Nt()),O("clarity","resume"))},stop:oi,consent:fr,event:O,identify:J,set:F,upgrade:U,metadata:lr});!function(){if("undefined"!=typeof window){var t=window,e="clarity";if(t[e]&&t[e].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var n=t[e]&&t[e].q||[];for(t[e]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return ui[t].apply(ui,e)},t[e].v=d;n.length>0;)t[e].apply(t,n.shift())}}()}();
@@ -111,7 +111,7 @@ function stop$B() {
111
111
  startTime = 0;
112
112
  }
113
113
 
114
- var version$1 = "0.6.37";
114
+ var version$1 = "0.6.38";
115
115
 
116
116
  // tslint:disable: no-bitwise
117
117
  function hash (input) {
@@ -600,6 +600,12 @@ function compute$8() {
600
600
  compute$4();
601
601
  }
602
602
 
603
+ // Regular expressions using unicode property escapes
604
+ // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes
605
+ var digitRegex = /\p{N}/gu;
606
+ var letterRegex = /\p{L}/gu;
607
+ var currencyRegex = /\p{Sc}/u;
608
+ var catchallRegex = /\S/gi;
603
609
  function scrub (value, hint, privacy, mangle) {
604
610
  if (mangle === void 0) { mangle = false; }
605
611
  if (value) {
@@ -611,9 +617,9 @@ function scrub (value, hint, privacy, mangle) {
611
617
  case "*T" /* Layout.Constant.TextTag */:
612
618
  case "value":
613
619
  case "placeholder":
614
- return redact(value);
620
+ case "click":
615
621
  case "input":
616
- return mangleToken(value);
622
+ return redact(value);
617
623
  }
618
624
  return value;
619
625
  case 2 /* Privacy.Text */:
@@ -650,7 +656,7 @@ function mangleText(value) {
650
656
  return value;
651
657
  }
652
658
  function mask(value) {
653
- return value.replace(/\S/gi, "\u2022" /* Data.Constant.Mask */);
659
+ return value.replace(catchallRegex, "\u2022" /* Data.Constant.Mask */);
654
660
  }
655
661
  function mangleToken(value) {
656
662
  var length = ((Math.floor(value.length / 5 /* Data.Setting.WordLength */) + 1) * 5 /* Data.Setting.WordLength */);
@@ -662,6 +668,7 @@ function mangleToken(value) {
662
668
  }
663
669
  function redact(value) {
664
670
  var spaceIndex = -1;
671
+ var gap = 0;
665
672
  var hasDigit = false;
666
673
  var hasEmail = false;
667
674
  var hasWhitespace = false;
@@ -678,7 +685,19 @@ function redact(value) {
678
685
  if (array === null) {
679
686
  array = value.split("" /* Data.Constant.Empty */);
680
687
  }
681
- mutate(array, spaceIndex, hasWhitespace ? i : i + 1);
688
+ // Work on a token at a time so we don't have to apply regex to a larger string
689
+ var token = value.substring(spaceIndex + 1, hasWhitespace ? i : i + 1);
690
+ // Check if unicode regex is supported, otherwise fallback to calling mask function on this token
691
+ if (currencyRegex.unicode) {
692
+ // Do not redact information if the token contains a currency symbol
693
+ token = token.match(currencyRegex) ? token : token.replace(letterRegex, "\u2022" /* Data.Constant.Letter */).replace(digitRegex, "\u2022" /* Data.Constant.Digit */);
694
+ }
695
+ else {
696
+ token = mask(token);
697
+ }
698
+ // Merge token back into array at the right place
699
+ array.splice(spaceIndex + 1 - gap, token.length, token);
700
+ gap += token.length - 1;
682
701
  }
683
702
  // Reset digit and email flags after every word boundary, except the beginning of string
684
703
  if (hasWhitespace) {
@@ -689,11 +708,6 @@ function redact(value) {
689
708
  }
690
709
  }
691
710
  return array ? array.join("" /* Data.Constant.Empty */) : value;
692
- }
693
- function mutate(array, start, end) {
694
- for (var i = start + 1; i < end; i++) {
695
- array[i] = "\u2022" /* Data.Constant.Mask */;
696
- }
697
711
  }
698
712
 
699
713
  var history$5 = [];
@@ -1385,7 +1399,7 @@ function observe$8(root) {
1385
1399
  bind(root, "mousedown", mouse.bind(this, 13 /* Event.MouseDown */, root), true);
1386
1400
  bind(root, "mouseup", mouse.bind(this, 14 /* Event.MouseUp */, root), true);
1387
1401
  bind(root, "mousemove", mouse.bind(this, 12 /* Event.MouseMove */, root), true);
1388
- bind(root, "mousewheel", mouse.bind(this, 15 /* Event.MouseWheel */, root), true);
1402
+ bind(root, "wheel", mouse.bind(this, 15 /* Event.MouseWheel */, root), true);
1389
1403
  bind(root, "dblclick", mouse.bind(this, 16 /* Event.DoubleClick */, root), true);
1390
1404
  bind(root, "touchstart", touch.bind(this, 17 /* Event.TouchStart */, root), true);
1391
1405
  bind(root, "touchend", touch.bind(this, 18 /* Event.TouchEnd */, root), true);
@@ -2319,6 +2333,7 @@ var override = [];
2319
2333
  var unmask = [];
2320
2334
  var updatedFragments = {};
2321
2335
  var maskText = [];
2336
+ var maskInput = [];
2322
2337
  var maskDisable = [];
2323
2338
  // The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced
2324
2339
  var idMap = null; // Maps node => id.
@@ -2340,7 +2355,8 @@ function reset$7() {
2340
2355
  hashMap = {};
2341
2356
  override = [];
2342
2357
  unmask = [];
2343
- maskText = "password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip" /* Mask.Text */.split("," /* Constant.Comma */);
2358
+ maskText = "address,password,contact" /* Mask.Text */.split("," /* Constant.Comma */);
2359
+ maskInput = "password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip" /* Mask.Input */.split("," /* Constant.Comma */);
2344
2360
  maskDisable = "radio,checkbox,range,button,reset,submit" /* Mask.Disable */.split("," /* Constant.Comma */);
2345
2361
  idMap = new WeakMap();
2346
2362
  iframeMap = new WeakMap();
@@ -2529,29 +2545,28 @@ function privacy(node, value, parent) {
2529
2545
  break;
2530
2546
  case "type" /* Constant.Type */ in attributes:
2531
2547
  // If this node has an explicit type assigned to it, go through masking rules to determine right privacy setting
2532
- metadata.privacy = inspect(attributes["type" /* Constant.Type */], metadata);
2548
+ metadata.privacy = inspect(attributes["type" /* Constant.Type */], maskInput, metadata);
2533
2549
  break;
2534
2550
  case tag === "INPUT" /* Constant.InputTag */ && current === 0 /* Privacy.None */:
2535
2551
  // If even default privacy setting is to not mask, we still scan through input fields for any sensitive information
2536
2552
  var field_1 = "" /* Constant.Empty */;
2537
2553
  Object.keys(attributes).forEach(function (x) { return field_1 += attributes[x].toLowerCase(); });
2538
- metadata.privacy = inspect(field_1, metadata);
2554
+ metadata.privacy = inspect(field_1, maskInput, metadata);
2539
2555
  break;
2540
2556
  case current === 1 /* Privacy.Sensitive */ && tag === "INPUT" /* Constant.InputTag */:
2557
+ // Look through class names to aggressively mask content
2558
+ metadata.privacy = inspect(attributes["class" /* Constant.Class */], maskText, metadata);
2541
2559
  // If it's a button or an input option, make an exception to disable masking
2542
2560
  metadata.privacy = maskDisable.indexOf(attributes["type" /* Constant.Type */]) >= 0 ? 0 /* Privacy.None */ : current;
2543
2561
  break;
2544
2562
  case current === 1 /* Privacy.Sensitive */:
2545
2563
  // In a mode where we mask sensitive information by default, look through class names to aggressively mask content
2546
- metadata.privacy = inspect(attributes["class" /* Constant.Class */], metadata);
2547
- break;
2548
- default:
2549
- metadata.privacy = parent ? parent.metadata.privacy : metadata.privacy;
2564
+ metadata.privacy = inspect(attributes["class" /* Constant.Class */], maskText, metadata);
2550
2565
  break;
2551
2566
  }
2552
2567
  }
2553
- function inspect(input, metadata) {
2554
- if (input && maskText.some(function (x) { return input.indexOf(x) >= 0; })) {
2568
+ function inspect(input, lookup, metadata) {
2569
+ if (input && lookup.some(function (x) { return input.indexOf(x) >= 0; })) {
2555
2570
  return 2 /* Privacy.Text */;
2556
2571
  }
2557
2572
  return metadata.privacy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-js",
3
- "version": "0.6.37",
3
+ "version": "0.6.38",
4
4
  "description": "An analytics library that uses web page interactions to generate aggregated insights",
5
5
  "author": "Microsoft Corp.",
6
6
  "license": "MIT",
package/src/core/scrub.ts CHANGED
@@ -2,6 +2,13 @@ import { Privacy } from "@clarity-types/core";
2
2
  import * as Data from "@clarity-types/data";
3
3
  import * as Layout from "@clarity-types/layout";
4
4
 
5
+ // Regular expressions using unicode property escapes
6
+ // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes
7
+ const digitRegex = /\p{N}/gu;
8
+ const letterRegex = /\p{L}/gu;
9
+ const currencyRegex = /\p{Sc}/u;
10
+ const catchallRegex = /\S/gi;
11
+
5
12
  export default function(value: string, hint: string, privacy: Privacy, mangle: boolean = false): string {
6
13
  if (value) {
7
14
  switch (privacy) {
@@ -12,9 +19,9 @@ export default function(value: string, hint: string, privacy: Privacy, mangle: b
12
19
  case Layout.Constant.TextTag:
13
20
  case "value":
14
21
  case "placeholder":
15
- return redact(value);
22
+ case "click":
16
23
  case "input":
17
- return mangleToken(value);
24
+ return redact(value);
18
25
  }
19
26
  return value;
20
27
  case Privacy.Text:
@@ -53,7 +60,7 @@ function mangleText(value: string): string {
53
60
  }
54
61
 
55
62
  function mask(value: string): string {
56
- return value.replace(/\S/gi, Data.Constant.Mask);
63
+ return value.replace(catchallRegex, Data.Constant.Mask);
57
64
  }
58
65
 
59
66
  function mangleToken(value: string): string {
@@ -67,6 +74,7 @@ function mangleToken(value: string): string {
67
74
 
68
75
  function redact(value: string): string {
69
76
  let spaceIndex = -1;
77
+ let gap = 0;
70
78
  let hasDigit = false;
71
79
  let hasEmail = false;
72
80
  let hasWhitespace = false;
@@ -82,7 +90,18 @@ function redact(value: string): string {
82
90
  // Performance optimization: Lazy load string -> array conversion only when required
83
91
  if (hasDigit || hasEmail) {
84
92
  if (array === null) { array = value.split(Data.Constant.Empty); }
85
- mutate(array, spaceIndex, hasWhitespace ? i : i + 1);
93
+ // Work on a token at a time so we don't have to apply regex to a larger string
94
+ let token = value.substring(spaceIndex + 1, hasWhitespace ? i : i + 1);
95
+ // Check if unicode regex is supported, otherwise fallback to calling mask function on this token
96
+ if (currencyRegex.unicode) {
97
+ // Do not redact information if the token contains a currency symbol
98
+ token = token.match(currencyRegex) ? token : token.replace(letterRegex, Data.Constant.Letter).replace(digitRegex, Data.Constant.Digit);
99
+ } else {
100
+ token = mask(token);
101
+ }
102
+ // Merge token back into array at the right place
103
+ array.splice(spaceIndex + 1 - gap, token.length, token);
104
+ gap += token.length - 1;
86
105
  }
87
106
  // Reset digit and email flags after every word boundary, except the beginning of string
88
107
  if (hasWhitespace) {
@@ -94,9 +113,3 @@ function redact(value: string): string {
94
113
  }
95
114
  return array ? array.join(Data.Constant.Empty) : value;
96
115
  }
97
-
98
- function mutate(array: string[], start: number, end: number): void {
99
- for (let i = start + 1; i < end; i++) {
100
- array[i] = Data.Constant.Mask;
101
- }
102
- }
@@ -1,2 +1,2 @@
1
- let version = "0.6.37";
1
+ let version = "0.6.38";
2
2
  export default version;
@@ -20,7 +20,7 @@ export function observe(root: Node): void {
20
20
  bind(root, "mousedown", mouse.bind(this, Event.MouseDown, root), true);
21
21
  bind(root, "mouseup", mouse.bind(this, Event.MouseUp, root), true);
22
22
  bind(root, "mousemove", mouse.bind(this, Event.MouseMove, root), true);
23
- bind(root, "mousewheel", mouse.bind(this, Event.MouseWheel, root), true);
23
+ bind(root, "wheel", mouse.bind(this, Event.MouseWheel, root), true);
24
24
  bind(root, "dblclick", mouse.bind(this, Event.DoubleClick, root), true);
25
25
  bind(root, "touchstart", touch.bind(this, Event.TouchStart, root), true);
26
26
  bind(root, "touchend", touch.bind(this, Event.TouchEnd, root), true);
package/src/layout/dom.ts CHANGED
@@ -17,6 +17,7 @@ let override = [];
17
17
  let unmask = [];
18
18
  let updatedFragments: { [fragment: number]: string } = {};
19
19
  let maskText = [];
20
+ let maskInput = [];
20
21
  let maskDisable = [];
21
22
 
22
23
  // The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced
@@ -43,6 +44,7 @@ function reset(): void {
43
44
  override = [];
44
45
  unmask = [];
45
46
  maskText = Mask.Text.split(Constant.Comma);
47
+ maskInput = Mask.Input.split(Constant.Comma);
46
48
  maskDisable = Mask.Disable.split(Constant.Comma);
47
49
  idMap = new WeakMap();
48
50
  iframeMap = new WeakMap();
@@ -241,30 +243,29 @@ function privacy(node: Node, value: NodeValue, parent: NodeValue): void {
241
243
  break;
242
244
  case Constant.Type in attributes:
243
245
  // If this node has an explicit type assigned to it, go through masking rules to determine right privacy setting
244
- metadata.privacy = inspect(attributes[Constant.Type], metadata);
246
+ metadata.privacy = inspect(attributes[Constant.Type], maskInput, metadata);
245
247
  break;
246
248
  case tag === Constant.InputTag && current === Privacy.None:
247
249
  // If even default privacy setting is to not mask, we still scan through input fields for any sensitive information
248
250
  let field: string = Constant.Empty;
249
251
  Object.keys(attributes).forEach(x => field += attributes[x].toLowerCase());
250
- metadata.privacy = inspect(field, metadata);
252
+ metadata.privacy = inspect(field, maskInput, metadata);
251
253
  break;
252
254
  case current === Privacy.Sensitive && tag === Constant.InputTag:
255
+ // Look through class names to aggressively mask content
256
+ metadata.privacy = inspect(attributes[Constant.Class], maskText, metadata);
253
257
  // If it's a button or an input option, make an exception to disable masking
254
258
  metadata.privacy = maskDisable.indexOf(attributes[Constant.Type]) >= 0 ? Privacy.None : current;
255
259
  break;
256
260
  case current === Privacy.Sensitive:
257
261
  // In a mode where we mask sensitive information by default, look through class names to aggressively mask content
258
- metadata.privacy = inspect(attributes[Constant.Class], metadata);
259
- break;
260
- default:
261
- metadata.privacy = parent ? parent.metadata.privacy : metadata.privacy;
262
+ metadata.privacy = inspect(attributes[Constant.Class], maskText, metadata);
262
263
  break;
263
264
  }
264
265
  }
265
266
 
266
- function inspect(input: string, metadata: NodeMeta): Privacy {
267
- if (input && maskText.some(x => input.indexOf(x) >= 0)) {
267
+ function inspect(input: string, lookup: string[], metadata: NodeMeta): Privacy {
268
+ if (input && lookup.some(x => input.indexOf(x) >= 0)) {
268
269
  return Privacy.Text;
269
270
  }
270
271
  return metadata.privacy;
package/test/core.test.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { assert } from 'chai';
2
2
  import { Browser, Page } from 'playwright';
3
- import { launch, markup, node, text } from './helper';
3
+ import { clicks, inputs, launch, markup, node, text } from './helper';
4
4
  import { Data, decode } from "clarity-decode";
5
5
 
6
6
  let browser: Browser;
@@ -33,15 +33,21 @@ describe('Core Tests', () => {
33
33
  let email = node(decoded, "attributes.id", "eml");
34
34
  let password = node(decoded, "attributes.id", "pwd");
35
35
  let search = node(decoded, "attributes.id", "search");
36
+ let click = clicks(decoded)[0];
37
+ let input = inputs(decoded)[0];
36
38
 
37
39
  // Non-sensitive fields continue to pass through with sensitive bits masked off
38
- assert.equal(heading, "Thanks for your order •••••••••");
40
+ assert.equal(heading, "Thanks for your order #••••••••");
39
41
 
40
42
  // Sensitive fields, including input fields, are randomized and masked
41
43
  assert.equal(address, "•••••• ••••• ••••• ••••• ••••• •••••");
42
44
  assert.equal(email.attributes.value, "••••• •••• •••• ••••");
43
45
  assert.equal(password.attributes.value, "••••• ••••");
44
46
  assert.equal(search.attributes.value, "hello •••••");
47
+
48
+ // Clicked text and input value should be consistent with uber masking configuration
49
+ assert.equal(click.data.text, "Hello •••••");
50
+ assert.equal(input.data.value, "query with •••••••");
45
51
  });
46
52
 
47
53
  it('should mask all text in strict mode', async () => {
@@ -52,6 +58,8 @@ describe('Core Tests', () => {
52
58
  let email = node(decoded, "attributes.id", "eml");
53
59
  let password = node(decoded, "attributes.id", "pwd");
54
60
  let search = node(decoded, "attributes.id", "search");
61
+ let click = clicks(decoded)[0];
62
+ let input = inputs(decoded)[0];
55
63
 
56
64
  // All fields are randomized and masked
57
65
  assert.equal(heading, "• ••••• ••••• ••••• ••••• •••••");
@@ -59,6 +67,10 @@ describe('Core Tests', () => {
59
67
  assert.equal(email.attributes.value, "••••• •••• •••• ••••");
60
68
  assert.equal(password.attributes.value, "••••• ••••");
61
69
  assert.equal(search.attributes.value, "••••• •••• ••••");
70
+
71
+ // Clicked text and input value should also be masked in strict mode
72
+ assert.equal(click.data.text, "••••• •••• ••••");
73
+ assert.equal(input.data.value, "••••• •••• •••• ••••");
62
74
  });
63
75
 
64
76
  it('should unmask all text in relaxed mode', async () => {
@@ -69,6 +81,8 @@ describe('Core Tests', () => {
69
81
  let email = node(decoded, "attributes.id", "eml");
70
82
  let password = node(decoded, "attributes.id", "pwd");
71
83
  let search = node(decoded, "attributes.id", "search");
84
+ let click = clicks(decoded)[0];
85
+ let input = inputs(decoded)[0];
72
86
 
73
87
  // Text flows through unmasked for non-sensitive fields, including input fields
74
88
  assert.equal(heading, "Thanks for your order #2AB700GH");
@@ -78,14 +92,24 @@ describe('Core Tests', () => {
78
92
  // Sensitive fields are still masked
79
93
  assert.equal(email.attributes.value, "••••• •••• •••• ••••");
80
94
  assert.equal(password.attributes.value, "••••• ••••");
95
+
96
+ // Clicked text and input value (non-sensitive) both come through without masking in relaxed mode
97
+ assert.equal(click.data.text, "Hello Wor1d");
98
+ assert.equal(input.data.value, "query with numb3rs");
81
99
  });
82
100
 
83
101
  it('should respect mask config even in relaxed mode', async () => {
84
102
  let encoded: string[] = await markup(page, "core.html", { mask: ["#mask"], unmask: ["body"] });
85
103
  let decoded = encoded.map(x => decode(x));
86
104
  let subtree = text(decoded, "child");
105
+ let click = clicks(decoded)[0];
106
+ let input = inputs(decoded)[0];
87
107
 
88
108
  // Masked sub-trees continue to stay masked
89
109
  assert.equal(subtree, "••••• •••••");
110
+
111
+ // Clicked text is masked due to masked configuration while input value is not masked in relaxed mode
112
+ assert.equal(click.data.text, "••••• •••• ••••");
113
+ assert.equal(input.data.value, "query with numb3rs");
90
114
  });
91
115
  });
package/test/helper.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Core, Data, Layout } from "clarity-decode";
1
+ import { Core, Data, decode, Interaction, Layout } from "clarity-decode";
2
2
  import * as fs from 'fs';
3
3
  import * as url from 'url';
4
4
  import * as path from 'path';
@@ -25,10 +25,38 @@ export async function markup(page: Page, file: string, override: Core.Config = n
25
25
  </body>
26
26
  `));
27
27
  await page.hover("#two");
28
- await page.waitForFunction("payloads && payloads.length > 1");
28
+ await page.click("#child");
29
+ await page.locator('#search').fill('query with numb3rs');
30
+ await page.waitForFunction("payloads && payloads.length > 2");
29
31
  return await page.evaluate('payloads');
30
32
  }
31
33
 
34
+ export function clicks(decoded: Data.DecodedPayload[]): Interaction.ClickEvent[] {
35
+ let output: Interaction.ClickEvent[] = [];
36
+ for (let i = decoded.length - 1; i >= 0; i--) {
37
+ if (decoded[i].click) {
38
+ for (let j = 0; j < decoded[i].click.length;j++)
39
+ {
40
+ output.push(decoded[i].click[j]);
41
+ }
42
+ }
43
+ }
44
+ return output;
45
+ }
46
+
47
+ export function inputs(decoded: Data.DecodedPayload[]): Interaction.InputEvent[] {
48
+ let output: Interaction.InputEvent[] = [];
49
+ for (let i = decoded.length - 1; i >= 0; i--) {
50
+ if (decoded[i].input) {
51
+ for (let j = 0; j < decoded[i].input.length;j++)
52
+ {
53
+ output.push(decoded[i].input[j]);
54
+ }
55
+ }
56
+ }
57
+ return output;
58
+ }
59
+
32
60
  export function node(decoded: Data.DecodedPayload[], key: string, value: string | number, tag: string = null): Layout.DomData {
33
61
  let sub = null;
34
62
 
@@ -9,7 +9,7 @@
9
9
  <p id="two" class="address-details">1 Microsoft Way, Redmond, WA - 98052</p>
10
10
  </div>
11
11
  <div id="mask">
12
- <span id="child">Hello World</span>
12
+ <span id="child">Hello Wor1d</span>
13
13
  </div>
14
14
  <form name="login">
15
15
  <input type="email" id="eml" title="Email" value="random@email.test">
package/types/data.d.ts CHANGED
@@ -247,7 +247,9 @@ export const enum Constant {
247
247
  UserId = "userId",
248
248
  SessionId = "sessionId",
249
249
  PageId = "pageId",
250
- Mask = "•",
250
+ Mask = "•", // Placeholder character for explicitly masked content
251
+ Digit = "•", // Placeholder character for digits
252
+ Letter = "•", // Placeholder character for letters
251
253
  SessionStorage = "sessionStorage",
252
254
  Cookie = "cookie",
253
255
  Navigation = "navigation",
package/types/layout.d.ts CHANGED
@@ -29,7 +29,8 @@ export const enum RegionVisibility {
29
29
  }
30
30
 
31
31
  export const enum Mask {
32
- Text = "password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip",
32
+ Text = "address,password,contact",
33
+ Input = "password,secret,pass,social,ssn,name,code,dob,cell,mob,contact,hidden,account,cvv,ccv,email,tel,phone,address,addr,card,zip",
33
34
  Disable = "radio,checkbox,range,button,reset,submit"
34
35
  }
35
36