clarity-js 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/clarity.js CHANGED
@@ -77,6 +77,57 @@ var envelope$1 = /*#__PURE__*/Object.freeze({
77
77
  get stop () { return stop$7; },
78
78
  get envelope () { return envelope; }
79
79
  });
80
+ var clarity = /*#__PURE__*/Object.freeze({
81
+ __proto__: null,
82
+ get version () { return version$1; },
83
+ get start () { return start; },
84
+ get pause () { return pause; },
85
+ get resume () { return resume; },
86
+ get stop () { return stop; },
87
+ get consent () { return consent; },
88
+ get event () { return event; },
89
+ get identify () { return identify; },
90
+ get set () { return set; },
91
+ get upgrade () { return upgrade; },
92
+ get metadata () { return metadata; },
93
+ get hashText () { return hashText; }
94
+ });
95
+
96
+ var w = window;
97
+ var c = "clarity" /* Constant.Clarity */;
98
+ function setup() {
99
+ // Start queuing up calls while Clarity is inactive and we are in a browser enviornment
100
+ if (typeof w !== "undefined") {
101
+ w[c] = function () {
102
+ (w[c].q = w[c].q || []).push(arguments);
103
+ };
104
+ }
105
+ }
106
+ function process$7() {
107
+ if (typeof w !== "undefined") {
108
+ // Do not execute or reset global "clarity" variable if a version of Clarity is already running on the page
109
+ if (w[c] && w[c].v) {
110
+ return console.warn("Error CL001: Multiple Clarity tags detected.");
111
+ }
112
+ // Expose clarity in a browser environment
113
+ // To be efficient about queuing up operations while Clarity is wiring up, we expose clarity.*(args) => clarity(*, args);
114
+ // This allows us to reprocess any calls that we missed once Clarity is available on the page
115
+ // Once Clarity script bundle is loaded on the page, we also initialize a "v" property that holds current version
116
+ // We use the presence or absence of "v" to determine if we are attempting to run a duplicate instance
117
+ var queue = w[c] ? (w[c].q || []) : [];
118
+ w[c] = function (method) {
119
+ var args = [];
120
+ for (var _i = 1; _i < arguments.length; _i++) {
121
+ args[_i - 1] = arguments[_i];
122
+ }
123
+ return clarity[method].apply(clarity, args);
124
+ };
125
+ w[c].v = version$1;
126
+ while (queue.length > 0) {
127
+ w[c].apply(w, queue.shift());
128
+ }
129
+ }
130
+ }
80
131
 
81
132
  var config$1 = {
82
133
  projectId: null,
@@ -119,7 +170,7 @@ function stop$C() {
119
170
  startTime = 0;
120
171
  }
121
172
 
122
- var version$1 = "0.7.0";
173
+ var version$1 = "0.7.2";
123
174
 
124
175
  // tslint:disable: no-bitwise
125
176
  function hash (input, precision) {
@@ -186,6 +237,8 @@ function text$1(value, hint, privacy, mangle) {
186
237
  break;
187
238
  case 4 /* Privacy.Exclude */:
188
239
  switch (hint) {
240
+ case "*T" /* Layout.Constant.TextTag */:
241
+ return mangle ? mangleText(value) : mask(value);
189
242
  case "value":
190
243
  case "input":
191
244
  case "click":
@@ -2256,7 +2309,7 @@ function handle$1(m) {
2256
2309
  }
2257
2310
  function process$2() {
2258
2311
  return __awaiter(this, void 0, void 0, function () {
2259
- var timer, record, _i, _a, mutation, state, target, type, value;
2312
+ var timer, record, instance, _i, _a, mutation, state, target, type, value;
2260
2313
  return __generator(this, function (_b) {
2261
2314
  switch (_b.label) {
2262
2315
  case 0:
@@ -2266,6 +2319,7 @@ function process$2() {
2266
2319
  case 1:
2267
2320
  if (!(mutations.length > 0)) return [3 /*break*/, 8];
2268
2321
  record = mutations.shift();
2322
+ instance = time();
2269
2323
  _i = 0, _a = record.mutations;
2270
2324
  _b.label = 2;
2271
2325
  case 2:
@@ -2282,7 +2336,7 @@ function process$2() {
2282
2336
  return [3 /*break*/, 6];
2283
2337
  }
2284
2338
  target = mutation.target;
2285
- type = track$5(mutation, timer);
2339
+ type = track$5(mutation, timer, instance);
2286
2340
  if (type && target && target.ownerDocument) {
2287
2341
  parse$1(target.ownerDocument);
2288
2342
  }
@@ -2322,7 +2376,7 @@ function process$2() {
2322
2376
  });
2323
2377
  });
2324
2378
  }
2325
- function track$5(m, timer) {
2379
+ function track$5(m, timer, instance) {
2326
2380
  var value = m.target ? get(m.target.parentNode) : null;
2327
2381
  // Check if the parent is already discovered and that the parent is not the document root
2328
2382
  if (value && value.data.tag !== "HTML" /* Constant.HTML */) {
@@ -2335,19 +2389,20 @@ function track$5(m, timer) {
2335
2389
  // In those cases, IDs will change however the selector (which is relative to DOM xPath) remains the same
2336
2390
  var key = [parent_1, element, m.attributeName, names(m.addedNodes), names(m.removedNodes)].join();
2337
2391
  // Initialize an entry if it doesn't already exist
2338
- history$4[key] = key in history$4 ? history$4[key] : [0];
2392
+ history$4[key] = key in history$4 ? history$4[key] : [0, instance];
2339
2393
  var h = history$4[key];
2340
2394
  // Lookup any pending nodes queued up for removal, and process them now if we suspended a mutation before
2341
2395
  if (inactive === false && h[0] >= 10 /* Setting.MutationSuspendThreshold */) {
2342
- processNodeList(h[1], 2 /* Source.ChildListRemove */, timer);
2396
+ processNodeList(h[2], 2 /* Source.ChildListRemove */, timer);
2343
2397
  }
2344
2398
  // Update the counter
2345
- h[0] = inactive ? h[0] + 1 : 1;
2399
+ h[0] = inactive ? (h[1] === instance ? h[0] : h[0] + 1) : 1;
2400
+ h[1] = instance;
2346
2401
  // Return updated mutation type based on if we have already hit the threshold or not
2347
2402
  if (h[0] === 10 /* Setting.MutationSuspendThreshold */) {
2348
2403
  // Store a reference to removedNodes so we can process them later
2349
2404
  // when we resume mutations again on user interactions
2350
- h[1] = m.removedNodes;
2405
+ h[2] = m.removedNodes;
2351
2406
  return "suspend" /* Constant.Suspend */;
2352
2407
  }
2353
2408
  else if (h[0] > 10 /* Setting.MutationSuspendThreshold */) {
@@ -4655,6 +4710,11 @@ function start(config$1) {
4655
4710
  start$6();
4656
4711
  start$z();
4657
4712
  modules.forEach(function (x) { return measure(x.start)(); });
4713
+ // If it's an internal call to start, without explicit configuration,
4714
+ // re-process any newly accumulated items in the queue
4715
+ if (config$1 === null) {
4716
+ process$7();
4717
+ }
4658
4718
  }
4659
4719
  }
4660
4720
  // By default Clarity is asynchronous and will yield by looking for requestIdleCallback.
@@ -4677,29 +4737,14 @@ function resume() {
4677
4737
  }
4678
4738
  function stop() {
4679
4739
  if (active()) {
4680
- // Stop modules in the reverse order of their initialization
4740
+ // Stop modules in the reverse order of their initialization and start queuing up items again
4681
4741
  modules.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
4682
4742
  stop$v();
4683
4743
  stop$5();
4744
+ setup();
4684
4745
  }
4685
4746
  }
4686
4747
 
4687
- var clarity = /*#__PURE__*/Object.freeze({
4688
- __proto__: null,
4689
- version: version$1,
4690
- start: start,
4691
- pause: pause,
4692
- resume: resume,
4693
- stop: stop,
4694
- consent: consent,
4695
- event: event,
4696
- identify: identify,
4697
- set: set,
4698
- upgrade: upgrade,
4699
- metadata: metadata,
4700
- hashText: hashText
4701
- });
4702
-
4703
4748
  var helper = { hash: hash, selector: selector, get: get, getNode: getNode, lookup: lookup };
4704
4749
  var version = version$1;
4705
4750
 
@@ -1 +1 @@
1
- !function(){"use strict";var t=Object.freeze({__proto__:null,get start(){return Dn},get stop(){return Cn},get parse(){return jn},get getId(){return zn},get add(){return Ln},get update(){return An},get sameorigin(){return Rn},get iframe(){return Hn},get hashText(){return Xn},get getNode(){return qn},get getValue(){return Pn},get get(){return Un},get lookup(){return Bn},get has(){return Vn},get updates(){return Fn}}),e=Object.freeze({__proto__:null,get track(){return wa},get start(){return Ma},get queue(){return Sa},get stop(){return Na}}),n=Object.freeze({__proto__:null,get data(){return Wa},get keys(){return Xa},get fragments(){return Ua},get start(){return Ba},get clone(){return Va},get compute(){return Fa},get reset(){return Ja},get update(){return Ga},get stop(){return Za}}),a=Object.freeze({__proto__:null,get data(){return Ya},get start(){return er},get check(){return nr},get trigger(){return ar},get compute(){return rr},get stop(){return ir}}),r=Object.freeze({__proto__:null,get data(){return or},get updates(){return ur},get start(){return cr},get stop(){return sr},get log(){return lr},get compute(){return dr},get reset(){return fr}}),i=Object.freeze({__proto__:null,get data(){return hr},get callbacks(){return pr},get start(){return gr},get stop(){return mr},get metadata(){return br},get id(){return yr},get consent(){return wr},get clear(){return kr},get save(){return Er}}),o=Object.freeze({__proto__:null,get data(){return Cr},get start(){return Ir},get stop(){return jr},get envelope(){return zr}}),u={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],extract:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null};function c(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var s=0;function l(t){void 0===t&&(t=null);var e=t&&t.timeStamp>0?t.timeStamp:performance.now();return Math.max(Math.round(e-s),0)}var d="0.7.0";function f(t,e){void 0===e&&(e=null);for(var n,a=5381,r=a,i=0;i<t.length;i+=2){if(a=(a<<5)+a^t.charCodeAt(i),i+1<t.length)r=(r<<5)+r^t.charCodeAt(i+1)}return n=Math.abs(a+11579*r),(e?n%Math.pow(2,e):n).toString(36)}var h=/\S/gi,p=!0,v=null,g=null,m=null;function b(t,e,n,a){if(void 0===a&&(a=!1),t)switch(n){case 0:return t;case 1:switch(e){case"*T":case"value":case"placeholder":case"click":return function(t){var e=-1,n=0,a=!1,r=!1,i=!1,o=null;if(p&&null===v)try{v=new RegExp("\\p{N}","gu"),g=new RegExp("\\p{L}","gu"),m=new RegExp("\\p{Sc}","gu")}catch(t){p=!1}for(var u=0;u<t.length;u++){var c=t.charCodeAt(u);if(a=a||c>=48&&c<=57,r=r||64===c,i=9===c||10===c||13===c||32===c,0===u||u===t.length-1||i){if(a||r){null===o&&(o=t.split(""));var s=t.substring(e+1,i?u:u+1);s=p&&null!==m?s.match(m)?s:s.replace(g,"▪").replace(v,"▫"):w(s),o.splice(e+1-n,s.length,s),n+=s.length-1}i&&(a=!1,r=!1,e=u)}}return o?o.join(""):t}(t);case"input":case"change":return k(t)}return t;case 2:case 3:switch(e){case"*T":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):w(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":case"change":return k(t);case"placeholder":return w(t)}break;case 4:switch(e){case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}}return t}function y(t){var e=u.drop;if(e&&e.length>0&&t&&t.indexOf("?")>0){var n=t.split("?"),a=n[0],r=n[1];return a+"?"+r.split("&").map((function(t){return e.some((function(e){return 0===t.indexOf("".concat(e,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}return t}function w(t){return t.replace(h,"•")}function k(t){for(var e=5*(Math.floor(t.length/5)+1),n="",a=0;a<e;a++)n+=a>0&&a%5==0?" ":"•";return n}var E=null,O=null,x=!1;function M(){x&&(E={time:l(),event:4,data:{visible:O.visible,docWidth:O.docWidth,docHeight:O.docHeight,screenWidth:O.screenWidth,screenHeight:O.screenHeight,scrollX:O.scrollX,scrollY:O.scrollY,pointerX:O.pointerX,pointerY:O.pointerY,activityTime:O.activityTime}}),O=O||{visible:1,docWidth:0,docHeight:0,screenWidth:0,screenHeight:0,scrollX:0,scrollY:0,pointerX:0,pointerY:0,activityTime:0}}function S(t,e,n){switch(t){case 8:O.docWidth=e,O.docHeight=n;break;case 11:O.screenWidth=e,O.screenHeight=n;break;case 10:O.scrollX=e,O.scrollY=n;break;default:O.pointerX=e,O.pointerY=n}x=!0}function N(t){O.activityTime=t}function _(t,e){O.visible="visible"===e?1:0,O.visible||N(t),x=!0}function T(){x&&tr(4)}var D=Object.freeze({__proto__:null,get state(){return E},start:function(){x=!1,M()},reset:M,track:S,activity:N,visibility:_,compute:T,stop:function(){M()}}),C=null;function I(t,e){Qr()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(C={key:t,value:e},tr(24))}var j,z=null,L=null;function A(t){t in z||(z[t]=0),t in L||(L[t]=0),z[t]++,L[t]++}function R(t,e){null!==e&&(t in z||(z[t]=0),t in L||(L[t]=0),z[t]+=e,L[t]+=e)}function H(t,e){null!==e&&!1===isNaN(e)&&(t in z||(z[t]=0),(e>z[t]||0===z[t])&&(L[t]=e,z[t]=e))}function Y(t,e,n){return window.setTimeout(Rr(t),e,n)}function W(t){return window.clearTimeout(t)}var X=0,q=0,P=null;function U(){P&&W(P),P=Y(B,q),X=l()}function B(){var t=l();j={gap:t-X},tr(25),j.gap<3e5?P=Y(B,q):Gr&&(I("clarity","suspend"),pi(),["mousemove","touchstart"].forEach((function(t){return Yr(document,t,ti)})),["resize","scroll","pageshow"].forEach((function(t){return Yr(window,t,ti)})))}var V=Object.freeze({__proto__:null,get data(){return j},start:function(){q=6e4,X=0},reset:U,stop:function(){W(P),X=0,q=0}}),F=null;function J(t,e){if(t in F){var n=F[t],a=n[n.length-1];e-a[0]>100?F[t].push([e,0]):a[1]=e-a[0]}else F[t]=[[e,0]]}function G(){tr(36)}function Z(){F={}}var K=Object.freeze({__proto__:null,get data(){return F},start:function(){F={}},stop:function(){F={}},track:J,compute:G,reset:Z}),Q=null;function $(t){Qr()&&u.lean&&(u.lean=!1,Q={key:t},Er(),u.upgrade&&u.upgrade(t),tr(3))}var tt=Object.freeze({__proto__:null,get data(){return Q},start:function(){!u.lean&&u.upgrade&&u.upgrade("Config"),Q=null},upgrade:$,stop:function(){Q=null}}),et=null;function nt(t,e){rt(t,"string"==typeof e?[e]:e)}function at(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),rt("userId",[t]),rt("sessionId",[e]),rt("pageId",[n])}function rt(t,e){if(Qr()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in et?et[t]:[]),a=0;a<e.length;a++)"string"==typeof e[a]&&e[a].length<255&&n.push(e[a]);et[t]=n}}function it(){tr(34)}function ot(){et={}}function ut(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 ct(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 st="CompressionStream"in window;function lt(t){return ut(this,void 0,void 0,(function(){var e,n;return ct(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),st?(e=new ReadableStream({start:function(e){return ut(this,void 0,void 0,(function(){return ct(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,dt(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 dt(t){return ut(this,void 0,void 0,(function(){var e,n,a,r,i;return ct(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 ft=[D,r,Object.freeze({__proto__:null,get data(){return et},start:function(){ot()},set:nt,identify:at,compute:it,reset:ot,stop:function(){ot()}}),a,K,i,o,e,V,tt,n];function ht(){z={},L={},A(5),ft.forEach((function(t){return Rr(t.start)()}))}function pt(){ft.slice().reverse().forEach((function(t){return Rr(t.stop)()})),z={},L={}}function vt(){it(),T(),dr(),tr(0),G(),rr(),Fa()}var gt,mt=[];function bt(t,e,n){u.fraud&&null!==t&&n&&n.length>=5&&(gt={id:t,target:e,checksum:f(n,24)},mt.indexOf(gt.checksum)<0&&(mt.push(gt.checksum),La(41)))}var yt="load,active,fixed,visible,focus,show,collaps,animat".split(","),wt={};function kt(t,e){var n=t.attributes,a=t.prefix?t.prefix[e]:null,r=0===e?"".concat("~").concat(t.position-1):":nth-of-type(".concat(t.position,")");switch(t.tag){case"STYLE":case"TITLE":case"LINK":case"META":case"*T":case"*D":return"";case"HTML":return"HTML";default:if(null===a)return"";a="".concat(a).concat(">"),t.tag=0===t.tag.indexOf("svg:")?t.tag.substr("svg:".length):t.tag;var i="".concat(a).concat(t.tag).concat(r),o="id"in n&&n.id.length>0?n.id:null,u="BODY"!==t.tag&&"class"in n&&n.class.length>0?n.class.trim().split(/\s+/).filter((function(t){return Et(t)})).join("."):null;if(u&&u.length>0)if(0===e){var c="".concat(function(t){for(var e=t.split(">"),n=0;n<e.length;n++){var a=e[n].indexOf("~"),r=e[n].indexOf(".");e[n]=e[n].substring(0,r>0?r:a>0?a:e[n].length)}return e.join(">")}(a)).concat(t.tag).concat(".").concat(u);c in wt||(wt[c]=[]),wt[c].indexOf(t.id)<0&&wt[c].push(t.id),i="".concat(c).concat("~").concat(wt[c].indexOf(t.id))}else i="".concat(a).concat(t.tag,".").concat(u).concat(r);return i=o&&Et(o)?"".concat(function(t){var e=t.lastIndexOf("*S"),n=t.lastIndexOf("".concat("iframe:").concat("HTML")),a=Math.max(e,n);if(a<0)return"";return t.substring(0,t.indexOf(">",a)+1)}(a)).concat("#").concat(o):i,i}}function Et(t){if(!t)return!1;if(yt.some((function(e){return t.toLowerCase().indexOf(e)>=0})))return!1;for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n>=48&&n<=57)return!1}return!0}var Ot={},xt=[],Mt=null,St=null,Nt=null;function _t(){Ot={},xt=[],Mt=null,St=null}function Tt(t,e){return void 0===e&&(e=0),ut(this,void 0,void 0,(function(){var n,a,r;return ct(this,(function(i){for(n=0,a=xt;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){xt[1===e?"unshift":"push"]({task:t,resolve:n,id:yr()})})),null===Mt&&null===St&&Dt(),[2,r]}))}))}function Dt(){var t=xt.shift();t&&(Mt=t,t.task().then((function(){t.id===yr()&&(t.resolve(),Mt=null,Dt())})).catch((function(e){t.id===yr()&&(e&&Ha(0,1,e.name,e.message,e.stack),Mt=null,Dt())})))}function Ct(t){var e=Lt(t);return e in Ot?performance.now()-Ot[e].start>Ot[e].yield?0:1:2}function It(t){Ot[Lt(t)]={start:performance.now(),calls:0,yield:30}}function jt(t){var e=performance.now(),n=Lt(t),a=e-Ot[n].start;R(t.cost,a),A(5),Ot[n].calls>0&&R(4,a)}function zt(t){return ut(this,void 0,void 0,(function(){var e,n;return ct(this,(function(a){switch(a.label){case 0:return(e=Lt(t))in Ot?(jt(t),n=Ot[e],[4,At()]):[3,2];case 1:n.yield=a.sent().timeRemaining(),function(t){var e=Lt(t);if(Ot&&Ot[e]){var n=Ot[e].calls,a=Ot[e].yield;It(t),Ot[e].calls=n+1,Ot[e].yield=a}}(t),a.label=2;case 2:return[2,e in Ot?1:2]}}))}))}function Lt(t){return"".concat(t.id,".").concat(t.cost)}function At(){return ut(this,void 0,void 0,(function(){return ct(this,(function(t){switch(t.label){case 0:return St?[4,St]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t){Ht(t,{timeout:5e3})}))]}}))}))}var Rt,Ht=window.requestIdleCallback||function(t,e){var n=performance.now(),a=new MessageChannel,r=a.port1,i=a.port2;r.onmessage=function(a){var r=performance.now(),o=r-n,u=r-a.data;if(u>30&&o<e.timeout)requestAnimationFrame((function(){i.postMessage(r)}));else{var c=o>e.timeout;t({didTimeout:c,timeRemaining:function(){return c?30:Math.max(0,30-u)}})}},requestAnimationFrame((function(){i.postMessage(performance.now())}))};function Yt(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),ut(this,void 0,void 0,(function(){var a,r,i,o,c,s,d,f,h,p,v,g,m,y,w,k,E,O,x,M,_,T;return ct(this,(function(D){switch(D.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=Rt,r.push(i.width),r.push(i.height),S(t,i.width,i.height),Sa(r),[3,10];case 2:for(o=0,c=Zn;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),Sa(r);return ca(),[3,10];case 3:if(2===Ct(e))return[3,10];if(!((d=Fn()).length>0))return[3,9];f=0,h=d,D.label=4;case 4:return f<h.length?(p=h[f],0!==(v=Ct(e))?[3,6]:[4,zt(e)]):[3,8];case 5:v=D.sent(),D.label=6;case 6:if(2===v)return[3,8];for(g=p.data,m=p.metadata.active,y=p.metadata.suspend,w=p.metadata.privacy,k=function(t){var e=t.metadata.privacy;return"*T"===t.data.tag&&!(0===e||1===e)}(p),E=0,O=m?["tag","attributes","value"]:["tag"];E<O.length;E++)if(g[x=O[E]])switch(x){case"tag":M=Wt(p),_=k?-1:1,r.push(p.id*_),p.parent&&m&&r.push(p.parent),p.previous&&m&&r.push(p.previous),r.push(y?"*M":g[x]),M&&2===M.length&&r.push("".concat("#").concat(Xt(M[0]),".").concat(Xt(M[1])));break;case"attributes":for(T in g[x])void 0!==g[x][T]&&r.push(qt(T,g[x][T],w));break;case"value":bt(p.metadata.fraud,p.id,g[x]),r.push(b(g[x],g.tag,w,k))}D.label=7;case 7:return f++,[3,4];case 8:6===t&&N(a),Sa(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),D.label=9;case 9:return[3,10];case 10:return[2]}}))}))}function Wt(t){if(null!==t.metadata.size&&0===t.metadata.size.length){var e=qn(t.id);if(e)return[Math.floor(100*e.offsetWidth),Math.floor(100*e.offsetHeight)]}return t.metadata.size}function Xt(t){return t.toString(36)}function qt(t,e,n){return"".concat(t,"=").concat(b(e,t,n))}function Pt(){Rt=null}function Ut(){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!==Rt&&c===Rt.width&&v===Rt.height||null===c||null===v||(Rt={width:c,height:v},Yt(8))}var Bt=[];function Vt(t){var e=sa(t);if(e){var n=e.value,a=n&&n.length>=5&&u.fraud?f(n,24):"";Bt.push({time:l(t),event:42,data:{target:sa(t),type:e.type,value:n,checksum:a}}),Tt(da.bind(this,42))}}function Ft(){Bt=[]}function Jt(t){var e={x:0,y:0};if(t&&t.offsetParent)do{var n=t.offsetParent,a=null===n?Hn(t.ownerDocument):null;e.x+=t.offsetLeft,e.y+=t.offsetTop,t=a||n}while(t);return e}var Gt=["input","textarea","radio","button","canvas"],Zt=[];function Kt(t){Yr(t,"click",Qt.bind(this,9,t),!0)}function Qt(t,e,n){var a=Hn(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=Jt(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}var c=sa(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&&(Zt.push({time:l(n),event:t,data:{target:c,x:i,y:o,eX:f,eY:h,button:n.button,reaction:te(c),context:ee(s),text:$t(c),link:s?s.href:null,hash:null,trust:n.isTrusted?1:0}}),Tt(da.bind(this,t)))}function $t(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 te(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(Gt.indexOf(e)>=0)return 0}return 1}function ee(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 ne(){Zt=[]}var ae=[];function re(t,e){ae.push({time:l(e),event:38,data:{target:sa(e),action:t}}),Tt(da.bind(this,38))}function ie(){ae=[]}var oe=null,ue=[];function ce(t){var e=sa(t),n=Un(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};ue.length>0&&ue[ue.length-1].data.target===r.target&&ue.pop(),ue.push({time:l(t),event:27,data:r}),W(oe),oe=Y(se,1e3,27)}}function se(t){Tt(da.bind(this,t))}function le(){ue=[]}var de,fe=[],he=null;function pe(t,e,n){var a=Hn(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=Jt(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}null!==i&&null!==o&&ge({time:l(n),event:t,data:{target:sa(n),x:i,y:o}})}function ve(t,e,n){var a=Hn(e),r=a?a.contentDocument.documentElement:document.documentElement,i=n.changedTouches,o=l(n);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&&ge({time:o,event:t,data:{target:sa(n),x:s,y:d}})}}function ge(t){switch(t.event){case 12:case 15:case 19:var e=fe.length,n=e>1?fe[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)&&fe.pop(),fe.push(t),W(he),he=Y(me,500,t.event);break;default:fe.push(t),me(t.event)}}function me(t){Tt(da.bind(this,t))}function be(){fe=[]}function ye(){var t=document.documentElement;de={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},da(11)}function we(){de=null}var ke=[],Ee=null;function Oe(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?sa(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){var r=Hn(a);e=r?r.contentWindow:e,a=n=a.documentElement}var i=a===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(a.scrollLeft),o=a===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(a.scrollTop),u={time:l(t),event:10,data:{target:a,x:i,y:o}};if((null!==t||0!==i||0!==o)&&null!==i&&null!==o){var c=ke.length,s=c>1?ke[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)&&ke.pop(),ke.push(u),W(Ee),Ee=Y(xe,500,10)}}function xe(t){Tt(da.bind(this,t))}var Me=null,Se=null,Ne=null;function _e(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=Me.start?Me.start:null;null!==Se&&null!==Me.start&&n!==e.anchorNode&&(W(Ne),Te(21)),Me={start:e.anchorNode,startOffset:e.anchorOffset,end:e.focusNode,endOffset:e.focusOffset},Se=e,W(Ne),Ne=Y(Te,500,21)}}function Te(t){Tt(da.bind(this,t))}function De(){Se=null,Me={start:0,startOffset:0,end:0,endOffset:0}}var Ce,Ie,je=[];function ze(t){je.push({time:l(t),event:39,data:{target:sa(t)}}),Tt(da.bind(this,39))}function Le(){je=[]}function Ae(t){Ce={name:t.type},da(26,l(t)),pi()}function Re(){Ce=null}function He(t){void 0===t&&(t=null),Ie={visible:"visibilityState"in document?document.visibilityState:"default"},da(28,l(t))}function Ye(){Ie=null}function We(t){!function(t){var e=Hn(t);Yr(e?e.contentWindow:t===document?window:t,"scroll",Oe,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Kt(t),function(t){Yr(t,"cut",re.bind(this,0),!0),Yr(t,"copy",re.bind(this,1),!0),Yr(t,"paste",re.bind(this,2),!0)}(t),function(t){Yr(t,"mousedown",pe.bind(this,13,t),!0),Yr(t,"mouseup",pe.bind(this,14,t),!0),Yr(t,"mousemove",pe.bind(this,12,t),!0),Yr(t,"wheel",pe.bind(this,15,t),!0),Yr(t,"dblclick",pe.bind(this,16,t),!0),Yr(t,"touchstart",ve.bind(this,17,t),!0),Yr(t,"touchend",ve.bind(this,18,t),!0),Yr(t,"touchmove",ve.bind(this,19,t),!0),Yr(t,"touchcancel",ve.bind(this,20,t),!0)}(t),function(t){Yr(t,"input",ce,!0)}(t),function(t){Yr(t,"selectstart",_e.bind(this,t),!0),Yr(t,"selectionchange",_e.bind(this,t),!0)}(t),function(t){Yr(t,"change",Vt,!0)}(t),function(t){Yr(t,"submit",ze,!0)}(t))}var Xe=Object.freeze({__proto__:null,start:function(){fa=[],pa(),ne(),ie(),be(),le(),Yr(window,"resize",ye),ye(),Yr(document,"visibilitychange",He),He(),ke=[],Oe(),De(),Ft(),Le(),Yr(window,"pagehide",Ae)},stop:function(){fa=[],pa(),ne(),ie(),W(he),fe.length>0&&me(fe[fe.length-1].event),W(oe),le(),we(),Ye(),W(Ee),ke=[],De(),W(Ne),Ft(),Le(),Re()},observe:We}),qe=/[^0-9\.]/g;function Pe(t){for(var e=0,n=Object.keys(t);e<n.length;e++){var a=n[e],r=t[a];if("@type"===a&&"string"==typeof r)switch(r=(r=r.toLowerCase()).indexOf("article")>=0||r.indexOf("posting")>=0?"article":r){case"article":case"recipe":lr(5,t[a]),lr(8,t.creator),lr(18,t.headline);break;case"product":lr(5,t[a]),lr(10,t.name),lr(12,t.sku),t.brand&&lr(6,t.brand.name);break;case"aggregaterating":t.ratingValue&&(H(11,Ue(t.ratingValue,100)),H(18,Ue(t.bestRating)),H(19,Ue(t.worstRating))),H(12,Ue(t.ratingCount)),H(17,Ue(t.reviewCount));break;case"person":lr(8,t.name);break;case"offer":lr(7,t.availability),lr(14,t.itemCondition),lr(13,t.priceCurrency),lr(12,t.sku),H(13,Ue(t.price));break;case"brand":lr(6,t.name)}null!==r&&"object"==typeof r&&Pe(r)}}function Ue(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(qe,""))*e)}return null}var Be=["title","alt","onload","onfocus","onerror","data-drupal-form-submit-last"],Ve=/[\r\n]+/g;function Fe(e,n){var a,r=null;if(2===n&&!1===Vn(e))return r;0!==n&&e.nodeType===Node.TEXT_NODE&&e.parentElement&&"STYLE"===e.parentElement.tagName&&(e=e.parentNode);var i=!1===Vn(e)?"add":"update",o=e.parentElement?e.parentElement:null,u=e.ownerDocument!==document;switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:o=u&&e.parentNode?Hn(e.parentNode):o;var c=e,s={tag:(u?"iframe:":"")+"*D",attributes:{name:c.name,publicId:c.publicId,systemId:c.systemId}};t[i](e,o,s,n);break;case Node.DOCUMENT_NODE:e===document&&jn(document),Je(e);break;case Node.DOCUMENT_FRAGMENT_NODE:var l=e;if(l.host)if(jn(l),"function"===typeof l.constructor&&l.constructor.toString().indexOf("[native code]")>=0){Je(l);for(var d="",f=0,h=("adoptedStyleSheets"in l?l.adoptedStyleSheets:[]);f<h.length;f++){d+=Ze(h[f])}var p={tag:"*S",attributes:{style:d}};t[i](e,l.host,p,n)}else t[i](e,l.host,{tag:"*P",attributes:{}},n);break;case Node.TEXT_NODE:if(o=o||e.parentNode,"update"===i||o&&Vn(o)&&"STYLE"!==o.tagName){var v={tag:"*T",value:e.nodeValue};t[i](e,o,v,n)}break;case Node.ELEMENT_NODE:var g=e,m=g.tagName,b=function(t){var e={},n=t.attributes;if(n&&n.length>0)for(var a=0;a<n.length;a++){var r=n[a].name;Be.indexOf(r)<0&&(e[r]=n[a].value)}"INPUT"===t.tagName&&!("value"in e)&&t.value&&(e.value=t.value);return e}(g);switch(o=e.parentElement?e.parentElement:e.parentNode?e.parentNode:null,"http://www.w3.org/2000/svg"===g.namespaceURI&&(m="svg:"+m),m){case"HTML":o=u&&o?Hn(o):null;var y={tag:(u?"iframe:":"")+m,attributes:b};t[i](e,o,y,n);break;case"SCRIPT":if("type"in b&&"application/ld+json"===b.type)try{Pe(JSON.parse(g.text.replace(Ve,"")))}catch(t){}break;case"NOSCRIPT":break;case"META":var w="property"in b?"property":"name"in b?"name":null;if(w&&"content"in b){var k=b.content;switch(b[w]){case"og:title":lr(20,k);break;case"og:type":lr(19,k);break;case"generator":lr(21,k)}}break;case"HEAD":var E={tag:m,attributes:b},O=u&&(null===(a=e.ownerDocument)||void 0===a?void 0:a.location)?e.ownerDocument.location:location;E.attributes["*B"]=O.protocol+"//"+O.hostname+O.pathname,t[i](e,o,E,n);break;case"BASE":var x=Un(e.parentElement);if(x){var M=document.createElement("a");M.href=b.href,x.data.attributes["*B"]=M.protocol+"//"+M.hostname+M.pathname}break;case"STYLE":var S={tag:m,attributes:b,value:Ge(g)};t[i](e,o,S,n);break;case"IFRAME":var N=e,_={tag:m,attributes:b};Rn(N)&&(!function(t){!1===Vn(t)&&Yr(t,"load",hn.bind(this,t,"childList"),!0)}(N),_.attributes["*O"]="true",N.contentDocument&&N.contentWindow&&"loading"!==N.contentDocument.readyState&&(r=N.contentDocument)),t[i](e,o,_,n);break;default:var T={tag:m,attributes:b};g.shadowRoot&&(r=g.shadowRoot),t[i](e,o,T,n)}}return r}function Je(t){Vn(t)||(!function(t){try{var e=c("MutationObserver"),n=e in window?new window[e](Rr(cn)):null;n&&(n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),Qe.push(n))}catch(t){Ha(2,0,t?t.name:null)}}(t),We(t))}function Ge(t){var e=t.textContent?t.textContent.trim():"",n=t.dataset?Object.keys(t.dataset).length:0;return(0===e.length||n>0)&&(e=Ze(t.sheet)),e}function Ze(t){var e="",n=null;try{n=t?t.cssRules:[]}catch(t){if(Ha(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 Ke(t,e,n){return ut(this,void 0,void 0,(function(){var a,r,i,o,u;return ct(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=Ct(e))?[3,3]:[4,zt(e)];case 2:o=c.sent(),c.label=3;case 3:return 2===o?[3,4]:((u=Fe(r,n))&&a.push(u),[3,1]);case 4:return[2]}}))}))}var Qe=[],$e=[],tn=null,en=null,nn=null,an=[],rn=null,on=null,un={};function cn(t){var e=l();J(6,e),$e.push({time:e,mutations:t}),Tt(sn,1).then((function(){Y(Ut),Rr(ra)()}))}function sn(){return ut(this,void 0,void 0,(function(){var t,e,n,a,r,i,o,u,c;return ct(this,(function(s){switch(s.label){case 0:It(t={id:yr(),cost:3}),s.label=1;case 1:if(!($e.length>0))return[3,8];e=$e.shift(),n=0,a=e.mutations,s.label=2;case 2:return n<a.length?(r=a[n],0!==(i=Ct(t))?[3,4]:[4,zt(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?Un(t.target.parentNode):null;if(n&&"HTML"!==n.data.tag){var a=l()>on,r=Un(t.target),i=r&&r.selector?r.selector.join():t.target.nodeName,o=[n.selector?n.selector.join():"",i,t.attributeName,ln(t.addedNodes),ln(t.removedNodes)].join();un[o]=o in un?un[o]:[0];var u=un[o];if(!1===a&&u[0]>=10&&dn(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&&jn(o.ownerDocument),u&&o&&o.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&o.host&&jn(o),u){case"attributes":Fe(o,3);break;case"characterData":Fe(o,4);break;case"childList":dn(r.addedNodes,1,t),dn(r.removedNodes,2,t);break;case"suspend":(c=Un(o))&&(c.metadata.suspend=!0)}s.label=5;case 5:return n++,[3,2];case 6:return[4,Yt(6,t,e.time)];case 7:return s.sent(),[3,1];case 8:return jt(t),[2]}}))}))}function ln(t){for(var e=[],n=0;t&&n<t.length;n++)e.push(t[n].nodeName);return e.join()}function dn(t,e,n){return ut(this,void 0,void 0,(function(){var a,r,i;return ct(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]:(Ke(t[r],n,e),[3,5]):[3,6];case 2:return 0!==(i=Ct(n))?[3,4]:[4,zt(n)];case 3:i=o.sent(),o.label=4;case 4:if(2===i)return[3,6];Fe(t[r],e),o.label=5;case 5:return r++,[3,1];case 6:return[2]}}))}))}function fn(t,e){return void 0===e&&(e=!1),an.indexOf(t)<0&&an.push(t),rn&&W(rn),rn=Y((function(){!function(t){for(var e=0,n=an;e<n.length;e++){var a=n[e];if(a){var r=a.nodeType===Node.DOCUMENT_FRAGMENT_NODE;if(r&&Vn(a))continue;hn(a,r||t?"childList":"characterData")}}an=[]}(e)}),33),t}function hn(t,e){Rr(cn)([{addedNodes:[t],attributeName:null,attributeNamespace:null,nextSibling:null,oldValue:null,previousSibling:null,removedNodes:[],target:t,type:e}])}var pn=1,vn=[],gn=[],mn=[],bn={},yn=[],wn=[],kn={},En=[],On=[],xn=[],Mn=[],Sn=null,Nn=null,_n=null,Tn=null;function Dn(){In(),jn(document,!0)}function Cn(){In()}function In(){pn=1,vn=[],gn=[],mn=[],bn={},yn=[],wn=[],En="address,password,contact".split(","),On="password,secret,pass,social,ssn,code,hidden".split(","),xn="radio,checkbox,range,button,reset,submit".split(","),Mn="INPUT,SELECT,TEXTAREA".split(","),Sn=new WeakMap,Nn=new WeakMap,_n=new WeakMap,Tn=new WeakMap,wt={}}function jn(t,e){void 0===e&&(e=!1);try{e&&u.unmask.forEach((function(t){return t.indexOf("!")<0?wn.push(t):yn.push(t.substr(1))})),"querySelectorAll"in t&&(u.regions.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return na(t,"".concat(e[0]))}))})),u.mask.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return _n.set(t,3)}))})),u.checksum.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return Tn.set(t,e[0])}))})),wn.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return _n.set(t,0)}))})))}catch(t){Ha(5,1,t?t.name:null)}}function zn(t,e){if(void 0===e&&(e=!1),null===t)return null;var n=Sn.get(t);return!n&&e&&(n=pn++,Sn.set(t,n)),n||null}function Ln(t,e,n,a){var r,i=zn(t,!0),o=e?zn(e):null,c=Jn(t),s=null,l=aa(t)?i:null,d=null,f=Tn.has(t)?Tn.get(t):null,h=u.content?1:3;o>=0&&gn[o]&&((s=gn[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&&(na(t,n.attributes["data-clarity-region"]),l=i),vn[i]=t,gn[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 Mn.indexOf(u)>=0:var c=o.type,s="";Object.keys(o).forEach((function(t){return s+=o[t].toLowerCase()}));var l=On.some((function(t){return s.indexOf(t)>=0}));r.privacy="INPUT"===u&&xn.indexOf(c)>=0?i:l?4:2;break;case"data-clarity-mask"in o:r.privacy=3;break;case"data-clarity-unmask"in o:r.privacy=0;break;case _n.has(t):r.privacy=_n.get(t);break;case Tn.has(t):r.privacy=2;break;case"*T"===u:var d=n&&n.data?n.data.tag:"",f=n&&n.selector?n.selector[1]:"",h=["STYLE","TITLE","svg:style"];r.privacy=h.includes(d)||yn.some((function(t){return f.indexOf(t)>=0}))?0:i;break;case 1===i:r.privacy=function(t,e,n){if(t&&e.some((function(e){return t.indexOf(e)>=0})))return 2;return n.privacy}(o.class,En,r)}}(t,gn[i],s),Wn(gn[i]),"IMG"===(r=gn[i]).data.tag&&3===r.metadata.privacy&&(r.metadata.size=[]),Gn(i,a,gn[i].fragment)}function An(t,e,n,a){var r=zn(t),i=e?zn(e):null,o=Jn(t),u=!1,c=!1;if(r in gn){var s=gn[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:gn[i].children.indexOf(o)+1;gn[i].children.splice(d,0,r),s.region=aa(t)?r:gn[i].region}else!function(t,e){if(t in gn){var n=gn[t];n.metadata.active=!1,n.parent=null,Gn(t,e)}}(r,a);if(null!==l&&l>=0){var f=gn[l].children.indexOf(r);f>=0&&gn[l].children.splice(f,1)}c=!0}for(var h in n)Yn(s.data,n,h)&&(u=!0,s.data[h]=n[h]);s.fragment&&kn[s.fragment]&&(u=!0),Wn(s),Gn(r,a,gn[r].fragment,u,c)}}function Rn(t){var e=!1;if(t.nodeType===Node.ELEMENT_NODE&&"IFRAME"===t.tagName){var n=t;try{n.contentDocument&&(Nn.set(n.contentDocument,n),e=!0)}catch(t){}}return e}function Hn(t){var e=t.nodeType===Node.DOCUMENT_NODE?t:null;return e&&Nn.has(e)?Nn.get(e):null}function Yn(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 Wn(t){var e=t.parent&&t.parent in gn?gn[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=gn[t.children[n]];if(e.data.tag===a.data.tag){e.metadata.position=a.metadata.position+1;break}}return e.metadata.position}(e,t),i={id:t.id,tag:a.tag,prefix:n,position:r,attributes:a.attributes};t.selector=[kt(i,0),kt(i,1)],t.hash=t.selector.map((function(t){return t?f(t):null})),t.hash.forEach((function(e){return bn[e]=t.id})),t.hash.some((function(t){return-1!==Ua.indexOf(t)}))&&(t.fragment=t.id)}function Xn(t){var e=qn(Bn(t));return null!==e&&null!==e.textContent?e.textContent.substr(0,25):""}function qn(t){return t in vn?vn[t]:null}function Pn(t){return t in gn?gn[t]:null}function Un(t){var e=zn(t);return e in gn?gn[e]:null}function Bn(t){return t in bn?bn[t]:null}function Vn(t){return zn(t)in vn}function Fn(){for(var t=[],e=0,n=mn;e<n.length;e++){(a=n[e])in gn&&t.push(gn[a])}for(var a in mn=[],kn)Ga(kn[a],a,!0);return kn={},t}function Jn(t){for(var e=null;null===e&&t.previousSibling;)e=zn(t.previousSibling),t=t.previousSibling;return e}function Gn(t,e,n,a,r){if(void 0===n&&(n=null),void 0===a&&(a=!0),void 0===r&&(r=!1),n&&!kn[n]){var i=qn(n),o=Pn(n);i&&o&&(fn(i,!0),o.hash.forEach((function(t){-1!==Ua.indexOf(t)&&(kn[n]=t)})))}var u=mn.indexOf(t);u>=0&&1===e&&r?(mn.splice(u,1),mn.push(t)):-1===u&&a&&mn.push(t)}var Zn=[],Kn=null,Qn={},$n=[],ta=!1,ea=null;function na(t,e){!1===Kn.has(t)&&(Kn.set(t,e),(ea=null===ea&&ta?new IntersectionObserver(ia,{threshold:[0,.2,.4,.6,.8,1]}):ea)&&t&&t.nodeType===Node.ELEMENT_NODE&&ea.observe(t))}function aa(t){return Kn&&Kn.has(t)}function ra(){for(var t=[],e=0,n=$n;e<n.length;e++){var a=n[e],r=zn(a.node);r in Qn||(r?(a.data.id=r,Qn[r]=a.data,Zn.push(ua(a.data))):t.push(a))}$n=t,Zn.length>0&&Yt(7)}function ia(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(Kn.has(r)&&i.width+i.height>0&&u.width>0&&u.height>0){var c=r?zn(r):null,s=c in Qn?Qn[c]:{id:c,name:Kn.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;oa(r,s,s.interaction,d?13:l?10:0),s.visibility>=13&&ea&&ea.unobserve(r)}}Zn.length>0&&Yt(7)}function oa(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 Qn&&r||!(e.id in Qn))&&(Qn[e.id]=e,Zn.push(ua(e))):$n.push({node:t,data:e})}function ua(t){return{time:l(),data:{id:t.id,interaction:t.interaction,visibility:t.visibility,name:t.name}}}function ca(){Zn=[]}function sa(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return on=l()+3e3,n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function la(t,e,n){void 0===n&&(n=null);var a={id:0,hash:null,privacy:2,node:t};if(t){var r=Un(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=qn(t),a=t in Qn?Qn[t]:{id:t,visibility:0,interaction:16,name:Kn.get(n)},r=16;switch(e){case 9:r=20;break;case 27:r=30}oa(n,a,r,a.visibility)}(r.region,e),i.fraud&&bt(i.fraud,r.id,n||r.data.value)}}return a}function da(t,e){return void 0===e&&(e=null),ut(this,void 0,void 0,(function(){var n,a,r,i,o,u,c,s,d,f,h,p,v,g,m,w,k,E,O,x,M,N,T,D,C,I,j,z,L,A,R;return ct(this,(function(H){switch(n=e||l(),a=[n,t],t){case 13:case 14:case 12:case 15:case 16:case 17:case 18:case 19:case 20:for(r=0,i=fe;r<i.length;r++)A=i[r],(o=la(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(o.id),a.push(A.data.x),a.push(A.data.y),Sa(a),S(A.event,A.data.x,A.data.y));be();break;case 9:for(u=0,c=Zt;u<c.length;u++)A=c[u],s=la(A.data.target,A.event,A.data.text),a=[A.time,A.event],d=s.hash.join("."),a.push(s.id),a.push(A.data.x),a.push(A.data.y),a.push(A.data.eX),a.push(A.data.eY),a.push(A.data.button),a.push(A.data.reaction),a.push(A.data.context),a.push(b(A.data.text,"click",s.privacy)),a.push(y(A.data.link)),a.push(d),a.push(A.data.trust),Sa(a),va(A.time,A.event,d,A.data.x,A.data.y,A.data.reaction,A.data.context);ne();break;case 38:for(f=0,h=ae;f<h.length;f++)A=h[f],a=[A.time,A.event],(j=la(A.data.target,A.event)).id>0&&(a.push(j.id),a.push(A.data.action),Sa(a));ie();break;case 11:p=de,a.push(p.width),a.push(p.height),S(t,p.width,p.height),we(),Sa(a);break;case 26:v=Ce,a.push(v.name),Re(),Sa(a);break;case 27:for(g=0,m=ue;g<m.length;g++)A=m[g],w=la(A.data.target,A.event,A.data.value),(a=[A.time,A.event]).push(w.id),a.push(b(A.data.value,"input",w.privacy)),Sa(a);le();break;case 21:(k=Me)&&(E=la(k.start,t),O=la(k.end,t),a.push(E.id),a.push(k.startOffset),a.push(O.id),a.push(k.endOffset),De(),Sa(a));break;case 10:for(x=0,M=ke;x<M.length;x++)A=M[x],(N=la(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(N.id),a.push(A.data.x),a.push(A.data.y),Sa(a),S(A.event,A.data.x,A.data.y));ke=[];break;case 42:for(T=0,D=Bt;T<D.length;T++)A=D[T],a=[A.time,A.event],(j=la(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(j.id),a.push(A.data.type),a.push(b(A.data.value,"change",j.privacy)),a.push(b(A.data.checksum,"checksum",j.privacy)),Sa(a));Ft();break;case 39:for(C=0,I=je;C<I.length;C++)A=I[C],a=[A.time,A.event],(j=la(A.data.target,A.event)).id>0&&(a.push(j.id),Sa(a));Le();break;case 22:for(z=0,L=ha;z<L.length;z++)A=L[z],(a=[A.time,A.event]).push(A.data.type),a.push(A.data.hash),a.push(A.data.x),a.push(A.data.y),a.push(A.data.reaction),a.push(A.data.context),Sa(a,!1);pa();break;case 28:R=Ie,a.push(R.visible),Sa(a),_(n,R.visible),Ye()}return[2]}))}))}var fa=[],ha=[];function pa(){ha=[]}function va(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),fa.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),S(e,a,r)}var ga,ma,ba,ya,wa,ka=0,Ea=0,Oa=null,xa=0;function Ma(){ya=!0,ka=0,Ea=0,xa=0,ga=[],ma=[],ba={},wa=null}function Sa(t,e){if(void 0===e&&(e=!0),ya){var n=l(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:ka+=r.length;case 37:case 6:Ea+=r.length,ga.push(r);break;default:ma.push(r)}A(25);var i=function(){var t=!1===u.lean&&ka>0?100:Cr.sequence*u.delay;return"string"==typeof u.upload?Math.max(Math.min(t,3e4),100):u.delay}();n-xa>2*i&&(W(Oa),Oa=null),e&&null===Oa&&(25!==a&&U(),Oa=Y(_a,i),xa=n,nr(Ea))}}function Na(){W(Oa),_a(!0),ka=0,Ea=0,xa=0,ga=[],ma=[],ba={},wa=null,ya=!1}function _a(t){return void 0===t&&(t=!1),ut(this,void 0,void 0,(function(){var e,n,a,r,i,o,c,s;return ct(this,(function(l){switch(l.label){case 0:return Oa=null,(e=!1===u.lean&&Ea>0&&(Ea<1048576||Cr.sequence>0))&&H(1,1),ra(),function(){var t=[];ha=[];for(var e=Cr.start+Cr.duration,n=Math.max(e-2e3,0),a=0,r=fa;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&ha.push(i),t.push(i))}fa=t,da(22)}(),vt(),n=!0===t,a=JSON.stringify(zr(n)),r="[".concat(ma.join(),"]"),i=e?"[".concat(ga.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,lt(o)];case 2:s=l.sent(),l.label=3;case 3:return R(2,(c=s)?c.length:o.length),Ta(o,c,Cr.sequence,n),ma=[],e&&(ga=[],Ea=0,ka=0),[2]}}))}))}function Ta(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))&&Ca(n)}catch(t){}if(!1===i){n in ba?ba[n].attempts++:ba[n]={data:t,attempts:1};var o=new XMLHttpRequest;o.open("POST",r),null!==n&&(o.onreadystatechange=function(){Rr(Da)(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),Ca(n)}}function Da(t,e){var n=ba[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?ar(6):(0===t.status&&(u.upload=u.fallback?u.fallback:u.upload),Ta(n.data,null,e)):(wa={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&tr(2),200===t.status&&t.responseText&&function(t){var e=t&&t.length>0?t.split(" "):[""];switch(e[0]){case"END":ar(6);break;case"UPGRADE":$("Auto");break;case"ACTION":u.action&&e.length>1&&u.action(e[1])}}(t.responseText),0===t.status&&(Ta(n.data,null,e,!0),ar(3)),t.status>=200&&t.status<=208&&Ca(e),delete ba[e]))}function Ca(t){1===t&&Er()}var Ia,ja={};function za(t){var e=t.error||t;return e.message in ja||(ja[e.message]=0),ja[e.message]++>=5||e&&e.message&&(Ia={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},La(31)),!0}function La(t){return ut(this,void 0,void 0,(function(){var e;return ct(this,(function(n){switch(e=[l(),t],t){case 31:e.push(Ia.message),e.push(Ia.line),e.push(Ia.column),e.push(Ia.stack),e.push(y(Ia.source)),Sa(e);break;case 33:Aa&&(e.push(Aa.code),e.push(Aa.name),e.push(Aa.message),e.push(Aa.stack),e.push(Aa.severity),Sa(e,!1));break;case 41:gt&&(e.push(gt.id),e.push(gt.target),e.push(gt.checksum),Sa(e,!1))}return[2]}))}))}var Aa,Ra={};function Ha(t,e,n,a,r){void 0===n&&(n=null),void 0===a&&(a=null),void 0===r&&(r=null);var i=n?"".concat(n,"|").concat(a):"";t in Ra&&Ra[t].indexOf(i)>=0||(Aa={code:t,name:n,message:a,stack:r,severity:e},t in Ra?Ra[t].push(i):Ra[t]=[i],La(33))}var Ya,Wa={},Xa=[],qa={},Pa={},Ua=[];function Ba(){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];qa[a]=Ka(r);break;case 1:break;case 2:var i=t[e+2];Pa[a]=i;break;case 3:Ua=t[e+2]}}}catch(t){Ha(8,1,t?t.name:null)}}function Va(t){return JSON.parse(JSON.stringify(t))}function Fa(){try{for(var t in qa){var e=(r=Qa(Va(qa[t])))?JSON.stringify(r).substring(0,1e4):r;e&&Ga(t,e)}for(var n in Pa){var a=document.querySelector(Pa[n]);a&&Ga(n,a.innerText)}}catch(t){Ha(5,1,t?t.name:null)}var r;tr(40)}function Ja(){Xa=[]}function Ga(t,e,n){void 0===n&&(n=!1),(!(t in Wa)||t in Wa&&Wa[t]!==e||n)&&(Wa[t]=e,Xa.push(t))}function Za(){Wa={},Xa=[],qa={},Pa={}}function Ka(t){for(var e=[],n=t.split(".");n.length>0;){var a=n.shift(),r=a.indexOf("["),i=a.indexOf("{"),o=a.indexOf("}");e.push({name:r>0?a.substring(0,r):i>0?a.substring(0,i):a,type:r>0?1:i>0?2:3,condition:i>0?a.substring(i+1,o):null})}return e}function Qa(t,e){if(void 0===e&&(e=window),0==t.length)return e;var n,a=t.shift();if(e&&e[a.name]){var r=e[a.name];if(1!==a.type&&$a(r,a.condition))n=Qa(t,r);else if(Array.isArray(r)){for(var i=[],o=0,u=r;o<u.length;o++){var c=u[o];if($a(c,a.condition)){var s=Qa(t,c);s&&i.push(s)}}n=i}return n}return null}function $a(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function tr(t){var e=[l(),t];switch(t){case 4:var n=E;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),Sa(e,!1)),M();break;case 25:e.push(j.gap),Sa(e);break;case 35:e.push(Ya.check),Sa(e,!1);break;case 3:e.push(Q.key),Sa(e);break;case 2:e.push(wa.sequence),e.push(wa.attempts),e.push(wa.status),Sa(e,!1);break;case 24:e.push(C.key),e.push(C.value),Sa(e);break;case 34:var a=Object.keys(et);if(a.length>0){for(var r=0,i=a;r<i.length;r++){var o=i[r];e.push(o),e.push(et[o])}ot(),Sa(e,!1)}break;case 0:var u=Object.keys(L);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(L[d]))}L={},Sa(e,!1)}break;case 1:var h=Object.keys(ur);if(h.length>0){for(var p=0,v=h;p<v.length;p++){var g=v[p];f=parseInt(g,10);e.push(f),e.push(ur[g])}fr(),Sa(e,!1)}break;case 36:var m=Object.keys(F);if(m.length>0){for(var b=0,y=m;b<y.length;b++){var w=y[b];f=parseInt(w,10);e.push(f),e.push([].concat.apply([],F[w]))}Z(),Sa(e,!1)}break;case 40:for(var k=0,O=Xa;k<O.length;k++){w=O[k];e.push(w),e.push(Wa[w])}Ja(),Sa(e,!1)}}function er(){Ya={check:0}}function nr(t){if(0===Ya.check){var e=Ya.check;e=Cr.sequence>=128?1:e,e=l()>72e5?2:e,(e=t>10485760?2:e)!==Ya.check&&ar(e)}}function ar(t){Ya.check=t,kr(),pi()}function rr(){0!==Ya.check&&tr(35)}function ir(){Ya=null}var or=null,ur=null;function cr(){or={},ur={}}function sr(){or={},ur={}}function lr(t,e){e&&(e="".concat(e),t in or||(or[t]=[]),or[t].indexOf(e)<0&&(or[t].push(e),t in ur||(ur[t]=[]),ur[t].push(e),or[t].length>128&&ar(5)))}function dr(){tr(1)}function fr(){ur={}}var hr=null,pr=[],vr=null;function gr(){vr=null;var t,e=navigator&&"userAgent"in navigator?navigator.userAgent:"",n=document&&document.title?document.title:"",a=function(){var t={session:Mr(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=_r("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-Sr(n[1])<18e5&&(t.session=n[0],t.count=Sr(n[2])+1,t.upgrade=Sr(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),r=Nr(),i=u.projectId||f(location.host);hr={projectId:i,userId:r.id,sessionId:a.session,pageNum:a.count},u.lean=u.track&&null!==a.upgrade?0===a.upgrade:u.lean,u.upload=u.track&&"string"==typeof u.upload&&a.upload&&a.upload.length>"https://".length?a.upload:u.upload,lr(0,e),lr(3,n),lr(1,y(location.href)),lr(2,document.referrer),lr(15,function(){var t=Mr();if(u.track&&Or(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),lr(16,document.documentElement.lang),lr(17,document.dir),lr(26,"".concat(window.devicePixelRatio)),H(0,a.ts),H(1,0),navigator&&(lr(9,navigator.language),H(33,navigator.hardwareConcurrency),H(32,navigator.maxTouchPoints),H(34,Math.round(navigator.deviceMemory)),(t=navigator.userAgentData)&&t.getHighEntropyValues?t.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;lr(22,t.platform),lr(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){lr(24,t.name+"~"+t.version)})),lr(25,t.model),H(27,t.mobile?1:0)})):lr(22,navigator.platform)),screen&&(H(14,Math.round(screen.width)),H(15,Math.round(screen.height)),H(16,Math.round(screen.colorDepth)));for(var o=0,c=u.cookies;o<c.length;o++){var s=c[o],l=_r(s);l&&nt(s,l)}xr(r)}function mr(){vr=null,hr=null}function br(t,e){void 0===e&&(e=!0),hr&&!1===e&&t(hr,!u.lean),pr.push({callback:t,wait:e})}function yr(){return hr?[hr.userId,hr.sessionId,hr.pageNum].join("."):""}function wr(){Qr()&&(u.track=!0,xr(Nr(),1))}function kr(){Tr("_clsk","",0)}function Er(){var t=Math.round(Date.now()),e=u.upload&&"string"==typeof u.upload?u.upload.replace("https://",""):"",n=u.lean?0:1;!function(t){pr.length>0&&pr.forEach((function(e){!e.callback||e.wait&&!t||e.callback(hr,!u.lean)}))}(n),Tr("_clsk",[hr.sessionId,t,hr.pageNum,n,e].join("|"),1)}function Or(t,e){try{return!!t[e]}catch(t){return!1}}function xr(t,e){void 0===e&&(e=null),e=null===e?t.consent:e;var n=Math.ceil((Date.now()+31536e6)/864e5);(null===t.expiry||Math.abs(n-t.expiry)>=1||t.consent!==e)&&Tr("_clck",[hr.userId,1,n.toString(36),e].join("|"),365)}function Mr(){var t=Math.floor(Math.random()*Math.pow(2,32));return window&&window.crypto&&window.crypto.getRandomValues&&Uint32Array&&(t=window.crypto.getRandomValues(new Uint32Array(1))[0]),t.toString(36)}function Sr(t,e){return void 0===e&&(e=10),parseInt(t,e)}function Nr(){var t={id:Mr(),expiry:null,consent:0},e=_r("_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=Sr(n[2],36)),n.length>3&&1===Sr(n[3])&&(t.consent=1),u.track=u.track||1===t.consent,t.id=u.track?n[0]:t.id}return t}function _r(t){if(Or(document,"cookie")){var e=document.cookie.split(";");if(e)for(var n=0;n<e.length;n++){var a=e[n].split("=");if(a.length>1&&a[0]&&a[0].trim()===t)return a[1]}}return null}function Tr(t,e,n){if(u.track&&(navigator&&navigator.cookieEnabled||Or(document,"cookie"))){var a=new Date;a.setDate(a.getDate()+n);var r=a?"expires="+a.toUTCString():"",i="".concat(t,"=").concat(e).concat(";").concat(r).concat(";path=/");try{if(null===vr){for(var o=location.hostname?location.hostname.split("."):[],c=o.length-1;c>=0;c--)if(vr=".".concat(o[c]).concat(vr||""),c<o.length-1&&(document.cookie="".concat(i).concat(";").concat("domain=").concat(vr),_r(t)===e))return;vr=""}}catch(t){vr=""}document.cookie=vr?"".concat(i).concat(";").concat("domain=").concat(vr):i}}var Dr,Cr=null;function Ir(){var t=hr;Cr={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 jr(){Cr=null}function zr(t){return Cr.start=Cr.start+Cr.duration,Cr.duration=l()-Cr.start,Cr.sequence++,Cr.upload=t&&"sendBeacon"in navigator?1:0,Cr.end=t?1:0,[Cr.version,Cr.sequence,Cr.start,Cr.duration,Cr.projectId,Cr.userId,Cr.sessionId,Cr.pageNum,Cr.upload,Cr.end]}function Lr(){Dr=[]}function Ar(t){if(Dr&&-1===Dr.indexOf(t.message)){var e=u.report;if(e&&e.length>0){var n={v:Cr.version,p:Cr.projectId,u:Cr.userId,s:Cr.sessionId,n:Cr.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)),Dr.push(t.message)}}return t}function Rr(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw Ar(t)}var n=performance.now()-e;R(4,n),n>30&&(A(7),H(6,n))}}var Hr=[];function Yr(t,e,n,a){void 0===a&&(a=!1),n=Rr(n);try{t[c("addEventListener")](e,n,a),Hr.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function Wr(){for(var t=0,e=Hr;t<e.length;t++){var n=e[t];try{n.target[c("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}Hr=[]}var Xr=null,qr=null,Pr=null,Ur=0;function Br(){return!(Ur++>20)||(Ha(4,0),!1)}function Vr(){Ur=0,Pr!==Jr()&&(pi(),window.setTimeout(Fr,250))}function Fr(){hi(),H(29,1)}function Jr(){return location.href?location.href.replace(location.hash,""):location.href}var Gr=!1;function Zr(){Gr=!0,s=performance.now(),_t(),Wr(),Lr(),Pr=Jr(),Ur=0,Yr(window,"popstate",Vr),null===Xr&&(Xr=history.pushState,history.pushState=function(){Xr.apply(this,arguments),Qr()&&Br()&&Vr()}),null===qr&&(qr=history.replaceState,history.replaceState=function(){qr.apply(this,arguments),Qr()&&Br()&&Vr()})}function Kr(){Pr=null,Ur=0,Lr(),Wr(),_t(),s=0,Gr=!1}function Qr(){return Gr}function $r(t){if(null===t||Gr)return!1;for(var e in t)e in u&&(u[e]=t[e]);return!0}function ti(){hi(),I("clarity","restart")}var ei=Object.freeze({__proto__:null,start:function(){!function(){mt=[],H(26,navigator.webdriver?1:0);try{H(31,window.top==window.self?1:2)}catch(t){H(31,0)}}(),Yr(window,"error",za),ja={},Ra={}},stop:function(){Ra={}}});function ni(){return ut(this,void 0,void 0,(function(){var t,e;return ct(this,(function(n){switch(n.label){case 0:return t=l(),It(e={id:yr(),cost:3}),[4,Ke(document,e,0)];case 1:return n.sent(),[4,Yt(5,e,t)];case 2:return n.sent(),jt(e),[2]}}))}))}var ai=Object.freeze({__proto__:null,start:function(){Pt(),Ut(),ca(),ea=null,Kn=new WeakMap,Qn={},$n=[],ta=!!window.IntersectionObserver,Dn(),function(){if(Qe=[],an=[],rn=null,on=0,un={},null===tn&&(tn=CSSStyleSheet.prototype.insertRule,CSSStyleSheet.prototype.insertRule=function(){return Qr()&&fn(this.ownerNode),tn.apply(this,arguments)}),null===en&&(en=CSSStyleSheet.prototype.deleteRule,CSSStyleSheet.prototype.deleteRule=function(){return Qr()&&fn(this.ownerNode),en.apply(this,arguments)}),null===nn){nn=Element.prototype.attachShadow;try{Element.prototype.attachShadow=function(){return Qr()?fn(nn.apply(this,arguments)):nn.apply(this,arguments)}}catch(t){nn=null}}}(),Tt(ni,1).then((function(){Rr(Ut)(),Rr(ra)()}))},stop:function(){ca(),Kn=null,Qn={},$n=[],ea&&(ea.disconnect(),ea=null),ta=!1,Cn(),function(){for(var t=0,e=Qe;t<e.length;t++){var n=e[t];n&&n.disconnect()}Qe=[],un={},$e=[],an=[],on=0,rn=null}(),Pt()},hashText:Xn});var ri,ii=null;function oi(){ii=null}function ui(t){ii={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){ut(this,void 0,void 0,(function(){var e,n;return ct(this,(function(a){return e=l(),n=[e,t],29===t&&(n.push(ii.fetchStart),n.push(ii.connectStart),n.push(ii.connectEnd),n.push(ii.requestStart),n.push(ii.responseStart),n.push(ii.responseEnd),n.push(ii.domInteractive),n.push(ii.domComplete),n.push(ii.loadEventStart),n.push(ii.loadEventEnd),n.push(ii.redirectCount),n.push(ii.size),n.push(ii.type),n.push(ii.protocol),n.push(ii.encodedSize),n.push(ii.decodedSize),oi(),Sa(n,!1)),[2]}))}))}(29)}var ci=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint"];function si(){try{ri&&ri.disconnect(),ri=new PerformanceObserver(Rr(li));for(var t=0,e=ci;t<e.length;t++){var n=e[t];PerformanceObserver.supportedEntryTypes.indexOf(n)>=0&&("layout-shift"===n&&R(9,0),ri.observe({type:n,buffered:!0}))}}catch(t){Ha(3,1)}}function li(t){!function(t){for(var e=(!("visibilityState"in document)||"visible"===document.visibilityState),n=0;n<t.length;n++){var a=t[n];switch(a.entryType){case"navigation":ui(a);break;case"resource":var r=a.name;lr(4,di(r)),r!==u.upload&&r!==u.fallback||H(28,a.duration);break;case"longtask":A(7);break;case"first-input":e&&H(10,a.processingStart-a.startTime);break;case"layout-shift":e&&!a.hadRecentInput&&R(9,1e3*a.value);break;case"largest-contentful-paint":e&&H(8,a.startTime)}}performance&&"memory"in performance&&performance.memory.usedJSHeapSize&&H(30,Math.abs(performance.memory.usedJSHeapSize/1048576))}(t.getEntries())}function di(t){var e=document.createElement("a");return e.href=t,e.hostname}var fi=[ei,ai,Xe,Object.freeze({__proto__:null,start:function(){oi(),function(){navigator&&"connection"in navigator&&lr(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?"complete"!==document.readyState?Yr(window,"load",Y.bind(this,si,0)):si():Ha(3,0)}()},stop:function(){ri&&ri.disconnect(),ri=null,oi()}})];function hi(t){void 0===t&&(t=null),function(){try{return!1===Gr&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&($r(t),Zr(),ht(),fi.forEach((function(t){return Rr(t.start)()})))}function pi(){Qr()&&(fi.slice().reverse().forEach((function(t){return Rr(t.stop)()})),pt(),Kr())}var vi=Object.freeze({__proto__:null,version:d,start:hi,pause:function(){Qr()&&(I("clarity","pause"),null===St&&(St=new Promise((function(t){Nt=t}))))},resume:function(){Qr()&&(St&&(Nt(),St=null,null===Mt&&Dt()),I("clarity","resume"))},stop:pi,consent:wr,event:I,identify:at,set:nt,upgrade:$,metadata:br,hashText:Xn});!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 vi[t].apply(vi,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 Cn},get stop(){return In},get parse(){return zn},get getId(){return Ln},get add(){return An},get update(){return Rn},get sameorigin(){return Hn},get iframe(){return Yn},get hashText(){return qn},get getNode(){return Pn},get getValue(){return Un},get get(){return Bn},get lookup(){return Vn},get has(){return Fn},get updates(){return Jn}}),e=Object.freeze({__proto__:null,get track(){return ka},get start(){return Sa},get queue(){return Na},get stop(){return _a}}),n=Object.freeze({__proto__:null,get data(){return Xa},get keys(){return qa},get fragments(){return Ba},get start(){return Va},get clone(){return Fa},get compute(){return Ja},get reset(){return Ga},get update(){return Za},get stop(){return Ka}}),a=Object.freeze({__proto__:null,get data(){return Wa},get start(){return nr},get check(){return ar},get trigger(){return rr},get compute(){return ir},get stop(){return or}}),r=Object.freeze({__proto__:null,get data(){return ur},get updates(){return cr},get start(){return sr},get stop(){return lr},get log(){return dr},get compute(){return fr},get reset(){return hr}}),i=Object.freeze({__proto__:null,get data(){return pr},get callbacks(){return vr},get start(){return mr},get stop(){return br},get metadata(){return yr},get id(){return wr},get consent(){return kr},get clear(){return Er},get save(){return Or}}),o=Object.freeze({__proto__:null,get data(){return Ir},get start(){return jr},get stop(){return zr},get envelope(){return Lr}}),u={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],extract:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null};function c(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var s=0;function l(t){void 0===t&&(t=null);var e=t&&t.timeStamp>0?t.timeStamp:performance.now();return Math.max(Math.round(e-s),0)}var d="0.7.2";function f(t,e){void 0===e&&(e=null);for(var n,a=5381,r=a,i=0;i<t.length;i+=2){if(a=(a<<5)+a^t.charCodeAt(i),i+1<t.length)r=(r<<5)+r^t.charCodeAt(i+1)}return n=Math.abs(a+11579*r),(e?n%Math.pow(2,e):n).toString(36)}var h=/\S/gi,p=!0,v=null,g=null,m=null;function b(t,e,n,a){if(void 0===a&&(a=!1),t)switch(n){case 0:return t;case 1:switch(e){case"*T":case"value":case"placeholder":case"click":return function(t){var e=-1,n=0,a=!1,r=!1,i=!1,o=null;if(p&&null===v)try{v=new RegExp("\\p{N}","gu"),g=new RegExp("\\p{L}","gu"),m=new RegExp("\\p{Sc}","gu")}catch(t){p=!1}for(var u=0;u<t.length;u++){var c=t.charCodeAt(u);if(a=a||c>=48&&c<=57,r=r||64===c,i=9===c||10===c||13===c||32===c,0===u||u===t.length-1||i){if(a||r){null===o&&(o=t.split(""));var s=t.substring(e+1,i?u:u+1);s=p&&null!==m?s.match(m)?s:s.replace(g,"▪").replace(v,"▫"):k(s),o.splice(e+1-n,s.length,s),n+=s.length-1}i&&(a=!1,r=!1,e=u)}}return o?o.join(""):t}(t);case"input":case"change":return E(t)}return t;case 2:case 3:switch(e){case"*T":return a?w(t):k(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":case"change":return E(t);case"placeholder":return k(t)}break;case 4:switch(e){case"*T":return a?w(t):k(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}}return t}function y(t){var e=u.drop;if(e&&e.length>0&&t&&t.indexOf("?")>0){var n=t.split("?"),a=n[0],r=n[1];return a+"?"+r.split("&").map((function(t){return e.some((function(e){return 0===t.indexOf("".concat(e,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}return t}function w(t){var e=t.trim();if(e.length>0){var n=e[0],a=t.indexOf(n),r=t.substr(0,a),i=t.substr(a+e.length);return"".concat(r).concat(e.length.toString(36)).concat(i)}return t}function k(t){return t.replace(h,"•")}function E(t){for(var e=5*(Math.floor(t.length/5)+1),n="",a=0;a<e;a++)n+=a>0&&a%5==0?" ":"•";return n}var O=null,x=null,M=!1;function S(){M&&(O={time:l(),event:4,data:{visible:x.visible,docWidth:x.docWidth,docHeight:x.docHeight,screenWidth:x.screenWidth,screenHeight:x.screenHeight,scrollX:x.scrollX,scrollY:x.scrollY,pointerX:x.pointerX,pointerY:x.pointerY,activityTime:x.activityTime}}),x=x||{visible:1,docWidth:0,docHeight:0,screenWidth:0,screenHeight:0,scrollX:0,scrollY:0,pointerX:0,pointerY:0,activityTime:0}}function N(t,e,n){switch(t){case 8:x.docWidth=e,x.docHeight=n;break;case 11:x.screenWidth=e,x.screenHeight=n;break;case 10:x.scrollX=e,x.scrollY=n;break;default:x.pointerX=e,x.pointerY=n}M=!0}function _(t){x.activityTime=t}function T(t,e){x.visible="visible"===e?1:0,x.visible||_(t),M=!0}function D(){M&&er(4)}var C=Object.freeze({__proto__:null,get state(){return O},start:function(){M=!1,S()},reset:S,track:N,activity:_,visibility:T,compute:D,stop:function(){S()}}),I=null;function j(t,e){$r()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(I={key:t,value:e},er(24))}var z,L=null,A=null;function R(t){t in L||(L[t]=0),t in A||(A[t]=0),L[t]++,A[t]++}function H(t,e){null!==e&&(t in L||(L[t]=0),t in A||(A[t]=0),L[t]+=e,A[t]+=e)}function Y(t,e){null!==e&&!1===isNaN(e)&&(t in L||(L[t]=0),(e>L[t]||0===L[t])&&(A[t]=e,L[t]=e))}function W(t,e,n){return window.setTimeout(Hr(t),e,n)}function X(t){return window.clearTimeout(t)}var q=0,P=0,U=null;function B(){U&&X(U),U=W(V,P),q=l()}function V(){var t=l();z={gap:t-q},er(25),z.gap<3e5?U=W(V,P):Zr&&(j("clarity","suspend"),vi(),["mousemove","touchstart"].forEach((function(t){return Wr(document,t,ei)})),["resize","scroll","pageshow"].forEach((function(t){return Wr(window,t,ei)})))}var F=Object.freeze({__proto__:null,get data(){return z},start:function(){P=6e4,q=0},reset:B,stop:function(){X(U),q=0,P=0}}),J=null;function G(t,e){if(t in J){var n=J[t],a=n[n.length-1];e-a[0]>100?J[t].push([e,0]):a[1]=e-a[0]}else J[t]=[[e,0]]}function Z(){er(36)}function K(){J={}}var Q=Object.freeze({__proto__:null,get data(){return J},start:function(){J={}},stop:function(){J={}},track:G,compute:Z,reset:K}),$=null;function tt(t){$r()&&u.lean&&(u.lean=!1,$={key:t},Or(),u.upgrade&&u.upgrade(t),er(3))}var et=Object.freeze({__proto__:null,get data(){return $},start:function(){!u.lean&&u.upgrade&&u.upgrade("Config"),$=null},upgrade:tt,stop:function(){$=null}}),nt=null;function at(t,e){it(t,"string"==typeof e?[e]:e)}function rt(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),it("userId",[t]),it("sessionId",[e]),it("pageId",[n])}function it(t,e){if($r()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in nt?nt[t]:[]),a=0;a<e.length;a++)"string"==typeof e[a]&&e[a].length<255&&n.push(e[a]);nt[t]=n}}function ot(){er(34)}function ut(){nt={}}function ct(t,e,n,a){return new(n||(n=Promise))((function(r,i){function o(t){try{c(a.next(t))}catch(t){i(t)}}function u(t){try{c(a.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((a=a.apply(t,e||[])).next())}))}function st(t,e){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(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 lt="CompressionStream"in window;function dt(t){return ct(this,void 0,void 0,(function(){var e,n;return st(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),lt?(e=new ReadableStream({start:function(e){return ct(this,void 0,void 0,(function(){return st(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,ft(e)]):[3,2];case 1:return[2,new(n.apply(Uint8Array,[void 0,a.sent()]))];case 2:return[3,4];case 3:return a.sent(),[3,4];case 4:return[2,null]}}))}))}function ft(t){return ct(this,void 0,void 0,(function(){var e,n,a,r,i;return st(this,(function(o){switch(o.label){case 0:e=t.getReader(),n=[],a=!1,r=[],o.label=1;case 1:return a?[3,3]:[4,e.read()];case 2:return i=o.sent(),a=i.done,r=i.value,a?[2,n]:(n.push.apply(n,r),[3,1]);case 3:return[2,n]}}))}))}var ht=[C,r,Object.freeze({__proto__:null,get data(){return nt},start:function(){ut()},set:at,identify:rt,compute:ot,reset:ut,stop:function(){ut()}}),a,Q,i,o,e,F,et,n];function pt(){L={},A={},R(5),ht.forEach((function(t){return Hr(t.start)()}))}function vt(){ht.slice().reverse().forEach((function(t){return Hr(t.stop)()})),L={},A={}}function gt(){ot(),D(),fr(),er(0),Z(),ir(),Ja()}var mt,bt=[];function yt(t,e,n){u.fraud&&null!==t&&n&&n.length>=5&&(mt={id:t,target:e,checksum:f(n,24)},bt.indexOf(mt.checksum)<0&&(bt.push(mt.checksum),Aa(41)))}var wt="load,active,fixed,visible,focus,show,collaps,animat".split(","),kt={};function Et(t,e){var n=t.attributes,a=t.prefix?t.prefix[e]:null,r=0===e?"".concat("~").concat(t.position-1):":nth-of-type(".concat(t.position,")");switch(t.tag){case"STYLE":case"TITLE":case"LINK":case"META":case"*T":case"*D":return"";case"HTML":return"HTML";default:if(null===a)return"";a="".concat(a).concat(">"),t.tag=0===t.tag.indexOf("svg:")?t.tag.substr("svg:".length):t.tag;var i="".concat(a).concat(t.tag).concat(r),o="id"in n&&n.id.length>0?n.id:null,u="BODY"!==t.tag&&"class"in n&&n.class.length>0?n.class.trim().split(/\s+/).filter((function(t){return Ot(t)})).join("."):null;if(u&&u.length>0)if(0===e){var c="".concat(function(t){for(var e=t.split(">"),n=0;n<e.length;n++){var a=e[n].indexOf("~"),r=e[n].indexOf(".");e[n]=e[n].substring(0,r>0?r:a>0?a:e[n].length)}return e.join(">")}(a)).concat(t.tag).concat(".").concat(u);c in kt||(kt[c]=[]),kt[c].indexOf(t.id)<0&&kt[c].push(t.id),i="".concat(c).concat("~").concat(kt[c].indexOf(t.id))}else i="".concat(a).concat(t.tag,".").concat(u).concat(r);return i=o&&Ot(o)?"".concat(function(t){var e=t.lastIndexOf("*S"),n=t.lastIndexOf("".concat("iframe:").concat("HTML")),a=Math.max(e,n);if(a<0)return"";return t.substring(0,t.indexOf(">",a)+1)}(a)).concat("#").concat(o):i,i}}function Ot(t){if(!t)return!1;if(wt.some((function(e){return t.toLowerCase().indexOf(e)>=0})))return!1;for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n>=48&&n<=57)return!1}return!0}var xt={},Mt=[],St=null,Nt=null,_t=null;function Tt(){xt={},Mt=[],St=null,Nt=null}function Dt(t,e){return void 0===e&&(e=0),ct(this,void 0,void 0,(function(){var n,a,r;return st(this,(function(i){for(n=0,a=Mt;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){Mt[1===e?"unshift":"push"]({task:t,resolve:n,id:wr()})})),null===St&&null===Nt&&Ct(),[2,r]}))}))}function Ct(){var t=Mt.shift();t&&(St=t,t.task().then((function(){t.id===wr()&&(t.resolve(),St=null,Ct())})).catch((function(e){t.id===wr()&&(e&&Ya(0,1,e.name,e.message,e.stack),St=null,Ct())})))}function It(t){var e=At(t);return e in xt?performance.now()-xt[e].start>xt[e].yield?0:1:2}function jt(t){xt[At(t)]={start:performance.now(),calls:0,yield:30}}function zt(t){var e=performance.now(),n=At(t),a=e-xt[n].start;H(t.cost,a),R(5),xt[n].calls>0&&H(4,a)}function Lt(t){return ct(this,void 0,void 0,(function(){var e,n;return st(this,(function(a){switch(a.label){case 0:return(e=At(t))in xt?(zt(t),n=xt[e],[4,Rt()]):[3,2];case 1:n.yield=a.sent().timeRemaining(),function(t){var e=At(t);if(xt&&xt[e]){var n=xt[e].calls,a=xt[e].yield;jt(t),xt[e].calls=n+1,xt[e].yield=a}}(t),a.label=2;case 2:return[2,e in xt?1:2]}}))}))}function At(t){return"".concat(t.id,".").concat(t.cost)}function Rt(){return ct(this,void 0,void 0,(function(){return st(this,(function(t){switch(t.label){case 0:return Nt?[4,Nt]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t){Yt(t,{timeout:5e3})}))]}}))}))}var Ht,Yt=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 Wt(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),ct(this,void 0,void 0,(function(){var a,r,i,o,c,s,d,f,h,p,v,g,m,y,w,k,E,O,x,M,S,T;return st(this,(function(D){switch(D.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=Ht,r.push(i.width),r.push(i.height),N(t,i.width,i.height),Na(r),[3,10];case 2:for(o=0,c=Kn;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),Na(r);return sa(),[3,10];case 3:if(2===It(e))return[3,10];if(!((d=Jn()).length>0))return[3,9];f=0,h=d,D.label=4;case 4:return f<h.length?(p=h[f],0!==(v=It(e))?[3,6]:[4,Lt(e)]):[3,8];case 5:v=D.sent(),D.label=6;case 6:if(2===v)return[3,8];for(g=p.data,m=p.metadata.active,y=p.metadata.suspend,w=p.metadata.privacy,k=function(t){var e=t.metadata.privacy;return"*T"===t.data.tag&&!(0===e||1===e)}(p),E=0,O=m?["tag","attributes","value"]:["tag"];E<O.length;E++)if(g[x=O[E]])switch(x){case"tag":M=Xt(p),S=k?-1:1,r.push(p.id*S),p.parent&&m&&r.push(p.parent),p.previous&&m&&r.push(p.previous),r.push(y?"*M":g[x]),M&&2===M.length&&r.push("".concat("#").concat(qt(M[0]),".").concat(qt(M[1])));break;case"attributes":for(T in g[x])void 0!==g[x][T]&&r.push(Pt(T,g[x][T],w));break;case"value":yt(p.metadata.fraud,p.id,g[x]),r.push(b(g[x],g.tag,w,k))}D.label=7;case 7:return f++,[3,4];case 8:6===t&&_(a),Na(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),D.label=9;case 9:return[3,10];case 10:return[2]}}))}))}function Xt(t){if(null!==t.metadata.size&&0===t.metadata.size.length){var e=Pn(t.id);if(e)return[Math.floor(100*e.offsetWidth),Math.floor(100*e.offsetHeight)]}return t.metadata.size}function qt(t){return t.toString(36)}function Pt(t,e,n){return"".concat(t,"=").concat(b(e,t,n))}function Ut(){Ht=null}function Bt(){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!==Ht&&c===Ht.width&&v===Ht.height||null===c||null===v||(Ht={width:c,height:v},Wt(8))}var Vt=[];function Ft(t){var e=la(t);if(e){var n=e.value,a=n&&n.length>=5&&u.fraud?f(n,24):"";Vt.push({time:l(t),event:42,data:{target:la(t),type:e.type,value:n,checksum:a}}),Dt(fa.bind(this,42))}}function Jt(){Vt=[]}function Gt(t){var e={x:0,y:0};if(t&&t.offsetParent)do{var n=t.offsetParent,a=null===n?Yn(t.ownerDocument):null;e.x+=t.offsetLeft,e.y+=t.offsetTop,t=a||n}while(t);return e}var Zt=["input","textarea","radio","button","canvas"],Kt=[];function Qt(t){Wr(t,"click",$t.bind(this,9,t),!0)}function $t(t,e,n){var a=Yn(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=Gt(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}var c=la(n),s=function(t){for(;t&&t!==document;){if(t.nodeType===Node.ELEMENT_NODE){var e=t;if("A"===e.tagName)return e}t=t.parentNode}return null}(c),d=function(t){var e=null,n=document.documentElement;if("function"==typeof t.getBoundingClientRect){var a=t.getBoundingClientRect();a&&a.width>0&&a.height>0&&(e={x:Math.floor(a.left+("pageXOffset"in window?window.pageXOffset:n.scrollLeft)),y:Math.floor(a.top+("pageYOffset"in window?window.pageYOffset:n.scrollTop)),w:Math.floor(a.width),h:Math.floor(a.height)})}return e}(c);0===n.detail&&d&&(i=Math.round(d.x+d.w/2),o=Math.round(d.y+d.h/2));var f=d?Math.max(Math.floor((i-d.x)/d.w*32767),0):0,h=d?Math.max(Math.floor((o-d.y)/d.h*32767),0):0;null!==i&&null!==o&&(Kt.push({time:l(n),event:t,data:{target:c,x:i,y:o,eX:f,eY:h,button:n.button,reaction:ee(c),context:ne(s),text:te(c),link:s?s.href:null,hash:null,trust:n.isTrusted?1:0}}),Dt(fa.bind(this,t)))}function te(t){var e=null;if(t){var n=t.textContent||t.value||t.alt;n&&(e=n.trim().replace(/\s+/g," ").substr(0,25))}return e}function ee(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(Zt.indexOf(e)>=0)return 0}return 1}function ne(t){if(t&&t.hasAttribute("target"))switch(t.getAttribute("target")){case"_blank":return 1;case"_parent":return 2;case"_top":return 3}return 0}function ae(){Kt=[]}var re=[];function ie(t,e){re.push({time:l(e),event:38,data:{target:la(e),action:t}}),Dt(fa.bind(this,38))}function oe(){re=[]}var ue=null,ce=[];function se(t){var e=la(t),n=Bn(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};ce.length>0&&ce[ce.length-1].data.target===r.target&&ce.pop(),ce.push({time:l(t),event:27,data:r}),X(ue),ue=W(le,1e3,27)}}function le(t){Dt(fa.bind(this,t))}function de(){ce=[]}var fe,he=[],pe=null;function ve(t,e,n){var a=Yn(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=Gt(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}null!==i&&null!==o&&me({time:l(n),event:t,data:{target:la(n),x:i,y:o}})}function ge(t,e,n){var a=Yn(e),r=a?a.contentDocument.documentElement:document.documentElement,i=n.changedTouches,o=l(n);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&&me({time:o,event:t,data:{target:la(n),x:s,y:d}})}}function me(t){switch(t.event){case 12:case 15:case 19:var e=he.length,n=e>1?he[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)&&he.pop(),he.push(t),X(pe),pe=W(be,500,t.event);break;default:he.push(t),be(t.event)}}function be(t){Dt(fa.bind(this,t))}function ye(){he=[]}function we(){var t=document.documentElement;fe={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},fa(11)}function ke(){fe=null}var Ee=[],Oe=null;function xe(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?la(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){var r=Yn(a);e=r?r.contentWindow:e,a=n=a.documentElement}var i=a===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(a.scrollLeft),o=a===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(a.scrollTop),u={time:l(t),event:10,data:{target:a,x:i,y:o}};if((null!==t||0!==i||0!==o)&&null!==i&&null!==o){var c=Ee.length,s=c>1?Ee[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)&&Ee.pop(),Ee.push(u),X(Oe),Oe=W(Me,500,10)}}function Me(t){Dt(fa.bind(this,t))}var Se=null,Ne=null,_e=null;function Te(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=Se.start?Se.start:null;null!==Ne&&null!==Se.start&&n!==e.anchorNode&&(X(_e),De(21)),Se={start:e.anchorNode,startOffset:e.anchorOffset,end:e.focusNode,endOffset:e.focusOffset},Ne=e,X(_e),_e=W(De,500,21)}}function De(t){Dt(fa.bind(this,t))}function Ce(){Ne=null,Se={start:0,startOffset:0,end:0,endOffset:0}}var Ie,je,ze=[];function Le(t){ze.push({time:l(t),event:39,data:{target:la(t)}}),Dt(fa.bind(this,39))}function Ae(){ze=[]}function Re(t){Ie={name:t.type},fa(26,l(t)),vi()}function He(){Ie=null}function Ye(t){void 0===t&&(t=null),je={visible:"visibilityState"in document?document.visibilityState:"default"},fa(28,l(t))}function We(){je=null}function Xe(t){!function(t){var e=Yn(t);Wr(e?e.contentWindow:t===document?window:t,"scroll",xe,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Qt(t),function(t){Wr(t,"cut",ie.bind(this,0),!0),Wr(t,"copy",ie.bind(this,1),!0),Wr(t,"paste",ie.bind(this,2),!0)}(t),function(t){Wr(t,"mousedown",ve.bind(this,13,t),!0),Wr(t,"mouseup",ve.bind(this,14,t),!0),Wr(t,"mousemove",ve.bind(this,12,t),!0),Wr(t,"wheel",ve.bind(this,15,t),!0),Wr(t,"dblclick",ve.bind(this,16,t),!0),Wr(t,"touchstart",ge.bind(this,17,t),!0),Wr(t,"touchend",ge.bind(this,18,t),!0),Wr(t,"touchmove",ge.bind(this,19,t),!0),Wr(t,"touchcancel",ge.bind(this,20,t),!0)}(t),function(t){Wr(t,"input",se,!0)}(t),function(t){Wr(t,"selectstart",Te.bind(this,t),!0),Wr(t,"selectionchange",Te.bind(this,t),!0)}(t),function(t){Wr(t,"change",Ft,!0)}(t),function(t){Wr(t,"submit",Le,!0)}(t))}var qe=Object.freeze({__proto__:null,start:function(){ha=[],va(),ae(),oe(),ye(),de(),Wr(window,"resize",we),we(),Wr(document,"visibilitychange",Ye),Ye(),Ee=[],xe(),Ce(),Jt(),Ae(),Wr(window,"pagehide",Re)},stop:function(){ha=[],va(),ae(),oe(),X(pe),he.length>0&&be(he[he.length-1].event),X(ue),de(),ke(),We(),X(Oe),Ee=[],Ce(),X(_e),Jt(),Ae(),He()},observe:Xe}),Pe=/[^0-9\.]/g;function Ue(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":dr(5,t[a]),dr(8,t.creator),dr(18,t.headline);break;case"product":dr(5,t[a]),dr(10,t.name),dr(12,t.sku),t.brand&&dr(6,t.brand.name);break;case"aggregaterating":t.ratingValue&&(Y(11,Be(t.ratingValue,100)),Y(18,Be(t.bestRating)),Y(19,Be(t.worstRating))),Y(12,Be(t.ratingCount)),Y(17,Be(t.reviewCount));break;case"person":dr(8,t.name);break;case"offer":dr(7,t.availability),dr(14,t.itemCondition),dr(13,t.priceCurrency),dr(12,t.sku),Y(13,Be(t.price));break;case"brand":dr(6,t.name)}null!==r&&"object"==typeof r&&Ue(r)}}function Be(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(Pe,""))*e)}return null}var Ve=["title","alt","onload","onfocus","onerror","data-drupal-form-submit-last"],Fe=/[\r\n]+/g;function Je(e,n){var a,r=null;if(2===n&&!1===Fn(e))return r;0!==n&&e.nodeType===Node.TEXT_NODE&&e.parentElement&&"STYLE"===e.parentElement.tagName&&(e=e.parentNode);var i=!1===Fn(e)?"add":"update",o=e.parentElement?e.parentElement:null,u=e.ownerDocument!==document;switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:o=u&&e.parentNode?Yn(e.parentNode):o;var c=e,s={tag:(u?"iframe:":"")+"*D",attributes:{name:c.name,publicId:c.publicId,systemId:c.systemId}};t[i](e,o,s,n);break;case Node.DOCUMENT_NODE:e===document&&zn(document),Ge(e);break;case Node.DOCUMENT_FRAGMENT_NODE:var l=e;if(l.host)if(zn(l),"function"===typeof l.constructor&&l.constructor.toString().indexOf("[native code]")>=0){Ge(l);for(var d="",f=0,h=("adoptedStyleSheets"in l?l.adoptedStyleSheets:[]);f<h.length;f++){d+=Ke(h[f])}var p={tag:"*S",attributes:{style:d}};t[i](e,l.host,p,n)}else t[i](e,l.host,{tag:"*P",attributes:{}},n);break;case Node.TEXT_NODE:if(o=o||e.parentNode,"update"===i||o&&Fn(o)&&"STYLE"!==o.tagName){var v={tag:"*T",value:e.nodeValue};t[i](e,o,v,n)}break;case Node.ELEMENT_NODE:var g=e,m=g.tagName,b=function(t){var e={},n=t.attributes;if(n&&n.length>0)for(var a=0;a<n.length;a++){var r=n[a].name;Ve.indexOf(r)<0&&(e[r]=n[a].value)}"INPUT"===t.tagName&&!("value"in e)&&t.value&&(e.value=t.value);return e}(g);switch(o=e.parentElement?e.parentElement:e.parentNode?e.parentNode:null,"http://www.w3.org/2000/svg"===g.namespaceURI&&(m="svg:"+m),m){case"HTML":o=u&&o?Yn(o):null;var y={tag:(u?"iframe:":"")+m,attributes:b};t[i](e,o,y,n);break;case"SCRIPT":if("type"in b&&"application/ld+json"===b.type)try{Ue(JSON.parse(g.text.replace(Fe,"")))}catch(t){}break;case"NOSCRIPT":break;case"META":var w="property"in b?"property":"name"in b?"name":null;if(w&&"content"in b){var k=b.content;switch(b[w]){case"og:title":dr(20,k);break;case"og:type":dr(19,k);break;case"generator":dr(21,k)}}break;case"HEAD":var E={tag:m,attributes:b},O=u&&(null===(a=e.ownerDocument)||void 0===a?void 0:a.location)?e.ownerDocument.location:location;E.attributes["*B"]=O.protocol+"//"+O.hostname+O.pathname,t[i](e,o,E,n);break;case"BASE":var x=Bn(e.parentElement);if(x){var M=document.createElement("a");M.href=b.href,x.data.attributes["*B"]=M.protocol+"//"+M.hostname+M.pathname}break;case"STYLE":var S={tag:m,attributes:b,value:Ze(g)};t[i](e,o,S,n);break;case"IFRAME":var N=e,_={tag:m,attributes:b};Hn(N)&&(!function(t){!1===Fn(t)&&Wr(t,"load",pn.bind(this,t,"childList"),!0)}(N),_.attributes["*O"]="true",N.contentDocument&&N.contentWindow&&"loading"!==N.contentDocument.readyState&&(r=N.contentDocument)),t[i](e,o,_,n);break;default:var T={tag:m,attributes:b};g.shadowRoot&&(r=g.shadowRoot),t[i](e,o,T,n)}}return r}function Ge(t){Fn(t)||(!function(t){try{var e=c("MutationObserver"),n=e in window?new window[e](Hr(sn)):null;n&&(n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),$e.push(n))}catch(t){Ya(2,0,t?t.name:null)}}(t),Xe(t))}function Ze(t){var e=t.textContent?t.textContent.trim():"",n=t.dataset?Object.keys(t.dataset).length:0;return(0===e.length||n>0)&&(e=Ke(t.sheet)),e}function Ke(t){var e="",n=null;try{n=t?t.cssRules:[]}catch(t){if(Ya(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 ct(this,void 0,void 0,(function(){var a,r,i,o,u;return st(this,(function(c){switch(c.label){case 0:a=[t],c.label=1;case 1:if(!(a.length>0))return[3,4];for(r=a.shift(),i=r.firstChild;i;)a.push(i),i=i.nextSibling;return 0!==(o=It(e))?[3,3]:[4,Lt(e)];case 2:o=c.sent(),c.label=3;case 3:return 2===o?[3,4]:((u=Je(r,n))&&a.push(u),[3,1]);case 4:return[2]}}))}))}var $e=[],tn=[],en=null,nn=null,an=null,rn=[],on=null,un=null,cn={};function sn(t){var e=l();G(6,e),tn.push({time:e,mutations:t}),Dt(ln,1).then((function(){W(Bt),Hr(ia)()}))}function ln(){return ct(this,void 0,void 0,(function(){var t,e,n,a,r,i,o,u,c,s;return st(this,(function(d){switch(d.label){case 0:jt(t={id:wr(),cost:3}),d.label=1;case 1:if(!(tn.length>0))return[3,8];e=tn.shift(),n=l(),a=0,r=e.mutations,d.label=2;case 2:return a<r.length?(i=r[a],0!==(o=It(t))?[3,4]:[4,Lt(t)]):[3,6];case 3:o=d.sent(),d.label=4;case 4:if(2===o)return[3,6];switch(u=i.target,c=function(t,e,n){var a=t.target?Bn(t.target.parentNode):null;if(a&&"HTML"!==a.data.tag){var r=l()>un,i=Bn(t.target),o=i&&i.selector?i.selector.join():t.target.nodeName,u=[a.selector?a.selector.join():"",o,t.attributeName,dn(t.addedNodes),dn(t.removedNodes)].join();cn[u]=u in cn?cn[u]:[0,n];var c=cn[u];if(!1===r&&c[0]>=10&&fn(c[2],2,e),c[0]=r?c[1]===n?c[0]:c[0]+1:1,c[1]=n,10===c[0])return c[2]=t.removedNodes,"suspend";if(c[0]>10)return""}return t.type}(i,t,n),c&&u&&u.ownerDocument&&zn(u.ownerDocument),c&&u&&u.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&u.host&&zn(u),c){case"attributes":Je(u,3);break;case"characterData":Je(u,4);break;case"childList":fn(i.addedNodes,1,t),fn(i.removedNodes,2,t);break;case"suspend":(s=Bn(u))&&(s.metadata.suspend=!0)}d.label=5;case 5:return a++,[3,2];case 6:return[4,Wt(6,t,e.time)];case 7:return d.sent(),[3,1];case 8:return zt(t),[2]}}))}))}function dn(t){for(var e=[],n=0;t&&n<t.length;n++)e.push(t[n].nodeName);return e.join()}function fn(t,e,n){return ct(this,void 0,void 0,(function(){var a,r,i;return st(this,(function(o){switch(o.label){case 0:a=t?t.length:0,r=0,o.label=1;case 1:return r<a?1!==e?[3,2]:(Qe(t[r],n,e),[3,5]):[3,6];case 2:return 0!==(i=It(n))?[3,4]:[4,Lt(n)];case 3:i=o.sent(),o.label=4;case 4:if(2===i)return[3,6];Je(t[r],e),o.label=5;case 5:return r++,[3,1];case 6:return[2]}}))}))}function hn(t,e){return void 0===e&&(e=!1),rn.indexOf(t)<0&&rn.push(t),on&&X(on),on=W((function(){!function(t){for(var e=0,n=rn;e<n.length;e++){var a=n[e];if(a){var r=a.nodeType===Node.DOCUMENT_FRAGMENT_NODE;if(r&&Fn(a))continue;pn(a,r||t?"childList":"characterData")}}rn=[]}(e)}),33),t}function pn(t,e){Hr(sn)([{addedNodes:[t],attributeName:null,attributeNamespace:null,nextSibling:null,oldValue:null,previousSibling:null,removedNodes:[],target:t,type:e}])}var vn=1,gn=[],mn=[],bn=[],yn={},wn=[],kn=[],En={},On=[],xn=[],Mn=[],Sn=[],Nn=null,_n=null,Tn=null,Dn=null;function Cn(){jn(),zn(document,!0)}function In(){jn()}function jn(){vn=1,gn=[],mn=[],bn=[],yn={},wn=[],kn=[],On="address,password,contact".split(","),xn="password,secret,pass,social,ssn,code,hidden".split(","),Mn="radio,checkbox,range,button,reset,submit".split(","),Sn="INPUT,SELECT,TEXTAREA".split(","),Nn=new WeakMap,_n=new WeakMap,Tn=new WeakMap,Dn=new WeakMap,kt={}}function zn(t,e){void 0===e&&(e=!1);try{e&&u.unmask.forEach((function(t){return t.indexOf("!")<0?kn.push(t):wn.push(t.substr(1))})),"querySelectorAll"in t&&(u.regions.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return aa(t,"".concat(e[0]))}))})),u.mask.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return Tn.set(t,3)}))})),u.checksum.forEach((function(e){return t.querySelectorAll(e[1]).forEach((function(t){return Dn.set(t,e[0])}))})),kn.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return Tn.set(t,0)}))})))}catch(t){Ya(5,1,t?t.name:null)}}function Ln(t,e){if(void 0===e&&(e=!1),null===t)return null;var n=Nn.get(t);return!n&&e&&(n=vn++,Nn.set(t,n)),n||null}function An(t,e,n,a){var r,i=Ln(t,!0),o=e?Ln(e):null,c=Gn(t),s=null,l=ra(t)?i:null,d=null,f=Dn.has(t)?Dn.get(t):null,h=u.content?1:3;o>=0&&mn[o]&&((s=mn[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&&(aa(t,n.attributes["data-clarity-region"]),l=i),gn[i]=t,mn[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 Sn.indexOf(u)>=0:var c=o.type,s="";Object.keys(o).forEach((function(t){return s+=o[t].toLowerCase()}));var l=xn.some((function(t){return s.indexOf(t)>=0}));r.privacy="INPUT"===u&&Mn.indexOf(c)>=0?i:l?4:2;break;case"data-clarity-mask"in o:r.privacy=3;break;case"data-clarity-unmask"in o:r.privacy=0;break;case Tn.has(t):r.privacy=Tn.get(t);break;case Dn.has(t):r.privacy=2;break;case"*T"===u:var d=n&&n.data?n.data.tag:"",f=n&&n.selector?n.selector[1]:"",h=["STYLE","TITLE","svg:style"];r.privacy=h.includes(d)||wn.some((function(t){return f.indexOf(t)>=0}))?0:i;break;case 1===i:r.privacy=function(t,e,n){if(t&&e.some((function(e){return t.indexOf(e)>=0})))return 2;return n.privacy}(o.class,On,r)}}(t,mn[i],s),Xn(mn[i]),"IMG"===(r=mn[i]).data.tag&&3===r.metadata.privacy&&(r.metadata.size=[]),Zn(i,a,mn[i].fragment)}function Rn(t,e,n,a){var r=Ln(t),i=e?Ln(e):null,o=Gn(t),u=!1,c=!1;if(r in mn){var s=mn[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:mn[i].children.indexOf(o)+1;mn[i].children.splice(d,0,r),s.region=ra(t)?r:mn[i].region}else!function(t,e){if(t in mn){var n=mn[t];n.metadata.active=!1,n.parent=null,Zn(t,e)}}(r,a);if(null!==l&&l>=0){var f=mn[l].children.indexOf(r);f>=0&&mn[l].children.splice(f,1)}c=!0}for(var h in n)Wn(s.data,n,h)&&(u=!0,s.data[h]=n[h]);s.fragment&&En[s.fragment]&&(u=!0),Xn(s),Zn(r,a,mn[r].fragment,u,c)}}function Hn(t){var e=!1;if(t.nodeType===Node.ELEMENT_NODE&&"IFRAME"===t.tagName){var n=t;try{n.contentDocument&&(_n.set(n.contentDocument,n),e=!0)}catch(t){}}return e}function Yn(t){var e=t.nodeType===Node.DOCUMENT_NODE?t:null;return e&&_n.has(e)?_n.get(e):null}function Wn(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 Xn(t){var e=t.parent&&t.parent in mn?mn[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=mn[t.children[n]];if(e.data.tag===a.data.tag){e.metadata.position=a.metadata.position+1;break}}return e.metadata.position}(e,t),i={id:t.id,tag:a.tag,prefix:n,position:r,attributes:a.attributes};t.selector=[Et(i,0),Et(i,1)],t.hash=t.selector.map((function(t){return t?f(t):null})),t.hash.forEach((function(e){return yn[e]=t.id})),t.hash.some((function(t){return-1!==Ba.indexOf(t)}))&&(t.fragment=t.id)}function qn(t){var e=Pn(Vn(t));return null!==e&&null!==e.textContent?e.textContent.substr(0,25):""}function Pn(t){return t in gn?gn[t]:null}function Un(t){return t in mn?mn[t]:null}function Bn(t){var e=Ln(t);return e in mn?mn[e]:null}function Vn(t){return t in yn?yn[t]:null}function Fn(t){return Ln(t)in gn}function Jn(){for(var t=[],e=0,n=bn;e<n.length;e++){(a=n[e])in mn&&t.push(mn[a])}for(var a in bn=[],En)Za(En[a],a,!0);return En={},t}function Gn(t){for(var e=null;null===e&&t.previousSibling;)e=Ln(t.previousSibling),t=t.previousSibling;return e}function Zn(t,e,n,a,r){if(void 0===n&&(n=null),void 0===a&&(a=!0),void 0===r&&(r=!1),n&&!En[n]){var i=Pn(n),o=Un(n);i&&o&&(hn(i,!0),o.hash.forEach((function(t){-1!==Ba.indexOf(t)&&(En[n]=t)})))}var u=bn.indexOf(t);u>=0&&1===e&&r?(bn.splice(u,1),bn.push(t)):-1===u&&a&&bn.push(t)}var Kn=[],Qn=null,$n={},ta=[],ea=!1,na=null;function aa(t,e){!1===Qn.has(t)&&(Qn.set(t,e),(na=null===na&&ea?new IntersectionObserver(oa,{threshold:[0,.2,.4,.6,.8,1]}):na)&&t&&t.nodeType===Node.ELEMENT_NODE&&na.observe(t))}function ra(t){return Qn&&Qn.has(t)}function ia(){for(var t=[],e=0,n=ta;e<n.length;e++){var a=n[e],r=Ln(a.node);r in $n||(r?(a.data.id=r,$n[r]=a.data,Kn.push(ca(a.data))):t.push(a))}ta=t,Kn.length>0&&Wt(7)}function oa(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(Qn.has(r)&&i.width+i.height>0&&u.width>0&&u.height>0){var c=r?Ln(r):null,s=c in $n?$n[c]:{id:c,name:Qn.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;ua(r,s,s.interaction,d?13:l?10:0),s.visibility>=13&&na&&na.unobserve(r)}}Kn.length>0&&Wt(7)}function ua(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 $n&&r||!(e.id in $n))&&($n[e.id]=e,Kn.push(ca(e))):ta.push({node:t,data:e})}function ca(t){return{time:l(),data:{id:t.id,interaction:t.interaction,visibility:t.visibility,name:t.name}}}function sa(){Kn=[]}function la(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return un=l()+3e3,n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function da(t,e,n){void 0===n&&(n=null);var a={id:0,hash:null,privacy:2,node:t};if(t){var r=Bn(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=Pn(t),a=t in $n?$n[t]:{id:t,visibility:0,interaction:16,name:Qn.get(n)},r=16;switch(e){case 9:r=20;break;case 27:r=30}ua(n,a,r,a.visibility)}(r.region,e),i.fraud&&yt(i.fraud,r.id,n||r.data.value)}}return a}function fa(t,e){return void 0===e&&(e=null),ct(this,void 0,void 0,(function(){var n,a,r,i,o,u,c,s,d,f,h,p,v,g,m,w,k,E,O,x,M,S,_,D,C,I,j,z,L,A,R;return st(this,(function(H){switch(n=e||l(),a=[n,t],t){case 13:case 14:case 12:case 15:case 16:case 17:case 18:case 19:case 20:for(r=0,i=he;r<i.length;r++)A=i[r],(o=da(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(o.id),a.push(A.data.x),a.push(A.data.y),Na(a),N(A.event,A.data.x,A.data.y));ye();break;case 9:for(u=0,c=Kt;u<c.length;u++)A=c[u],s=da(A.data.target,A.event,A.data.text),a=[A.time,A.event],d=s.hash.join("."),a.push(s.id),a.push(A.data.x),a.push(A.data.y),a.push(A.data.eX),a.push(A.data.eY),a.push(A.data.button),a.push(A.data.reaction),a.push(A.data.context),a.push(b(A.data.text,"click",s.privacy)),a.push(y(A.data.link)),a.push(d),a.push(A.data.trust),Na(a),ga(A.time,A.event,d,A.data.x,A.data.y,A.data.reaction,A.data.context);ae();break;case 38:for(f=0,h=re;f<h.length;f++)A=h[f],a=[A.time,A.event],(j=da(A.data.target,A.event)).id>0&&(a.push(j.id),a.push(A.data.action),Na(a));oe();break;case 11:p=fe,a.push(p.width),a.push(p.height),N(t,p.width,p.height),ke(),Na(a);break;case 26:v=Ie,a.push(v.name),He(),Na(a);break;case 27:for(g=0,m=ce;g<m.length;g++)A=m[g],w=da(A.data.target,A.event,A.data.value),(a=[A.time,A.event]).push(w.id),a.push(b(A.data.value,"input",w.privacy)),Na(a);de();break;case 21:(k=Se)&&(E=da(k.start,t),O=da(k.end,t),a.push(E.id),a.push(k.startOffset),a.push(O.id),a.push(k.endOffset),Ce(),Na(a));break;case 10:for(x=0,M=Ee;x<M.length;x++)A=M[x],(S=da(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(S.id),a.push(A.data.x),a.push(A.data.y),Na(a),N(A.event,A.data.x,A.data.y));Ee=[];break;case 42:for(_=0,D=Vt;_<D.length;_++)A=D[_],a=[A.time,A.event],(j=da(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(j.id),a.push(A.data.type),a.push(b(A.data.value,"change",j.privacy)),a.push(b(A.data.checksum,"checksum",j.privacy)),Na(a));Jt();break;case 39:for(C=0,I=ze;C<I.length;C++)A=I[C],a=[A.time,A.event],(j=da(A.data.target,A.event)).id>0&&(a.push(j.id),Na(a));Ae();break;case 22:for(z=0,L=pa;z<L.length;z++)A=L[z],(a=[A.time,A.event]).push(A.data.type),a.push(A.data.hash),a.push(A.data.x),a.push(A.data.y),a.push(A.data.reaction),a.push(A.data.context),Na(a,!1);va();break;case 28:R=je,a.push(R.visible),Na(a),T(n,R.visible),We()}return[2]}))}))}var ha=[],pa=[];function va(){pa=[]}function ga(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),ha.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),N(e,a,r)}var ma,ba,ya,wa,ka,Ea=0,Oa=0,xa=null,Ma=0;function Sa(){wa=!0,Ea=0,Oa=0,Ma=0,ma=[],ba=[],ya={},ka=null}function Na(t,e){if(void 0===e&&(e=!0),wa){var n=l(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:Ea+=r.length;case 37:case 6:Oa+=r.length,ma.push(r);break;default:ba.push(r)}R(25);var i=function(){var t=!1===u.lean&&Ea>0?100:Ir.sequence*u.delay;return"string"==typeof u.upload?Math.max(Math.min(t,3e4),100):u.delay}();n-Ma>2*i&&(X(xa),xa=null),e&&null===xa&&(25!==a&&B(),xa=W(Ta,i),Ma=n,ar(Oa))}}function _a(){X(xa),Ta(!0),Ea=0,Oa=0,Ma=0,ma=[],ba=[],ya={},ka=null,wa=!1}function Ta(t){return void 0===t&&(t=!1),ct(this,void 0,void 0,(function(){var e,n,a,r,i,o,c,s;return st(this,(function(l){switch(l.label){case 0:return xa=null,(e=!1===u.lean&&Oa>0&&(Oa<1048576||Ir.sequence>0))&&Y(1,1),ia(),function(){var t=[];pa=[];for(var e=Ir.start+Ir.duration,n=Math.max(e-2e3,0),a=0,r=ha;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&pa.push(i),t.push(i))}ha=t,fa(22)}(),gt(),n=!0===t,a=JSON.stringify(Lr(n)),r="[".concat(ba.join(),"]"),i=e?"[".concat(ma.join(),"]"):"",o=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:a,a:r,p:i}),n?(s=null,[3,3]):[3,1];case 1:return[4,dt(o)];case 2:s=l.sent(),l.label=3;case 3:return H(2,(c=s)?c.length:o.length),Da(o,c,Ir.sequence,n),ba=[],e&&(ma=[],Oa=0,Ea=0),[2]}}))}))}function Da(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))&&Ia(n)}catch(t){}if(!1===i){n in ya?ya[n].attempts++:ya[n]={data:t,attempts:1};var o=new XMLHttpRequest;o.open("POST",r),null!==n&&(o.onreadystatechange=function(){Hr(Ca)(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),Ia(n)}}function Ca(t,e){var n=ya[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?rr(6):(0===t.status&&(u.upload=u.fallback?u.fallback:u.upload),Da(n.data,null,e)):(ka={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&er(2),200===t.status&&t.responseText&&function(t){var e=t&&t.length>0?t.split(" "):[""];switch(e[0]){case"END":rr(6);break;case"UPGRADE":tt("Auto");break;case"ACTION":u.action&&e.length>1&&u.action(e[1])}}(t.responseText),0===t.status&&(Da(n.data,null,e,!0),rr(3)),t.status>=200&&t.status<=208&&Ia(e),delete ya[e]))}function Ia(t){1===t&&Or()}var ja,za={};function La(t){var e=t.error||t;return e.message in za||(za[e.message]=0),za[e.message]++>=5||e&&e.message&&(ja={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},Aa(31)),!0}function Aa(t){return ct(this,void 0,void 0,(function(){var e;return st(this,(function(n){switch(e=[l(),t],t){case 31:e.push(ja.message),e.push(ja.line),e.push(ja.column),e.push(ja.stack),e.push(y(ja.source)),Na(e);break;case 33:Ra&&(e.push(Ra.code),e.push(Ra.name),e.push(Ra.message),e.push(Ra.stack),e.push(Ra.severity),Na(e,!1));break;case 41:mt&&(e.push(mt.id),e.push(mt.target),e.push(mt.checksum),Na(e,!1))}return[2]}))}))}var Ra,Ha={};function Ya(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 Ha&&Ha[t].indexOf(i)>=0||(Ra={code:t,name:n,message:a,stack:r,severity:e},t in Ha?Ha[t].push(i):Ha[t]=[i],Aa(33))}var Wa,Xa={},qa=[],Pa={},Ua={},Ba=[];function Va(){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];Pa[a]=Qa(r);break;case 1:break;case 2:var i=t[e+2];Ua[a]=i;break;case 3:Ba=t[e+2]}}}catch(t){Ya(8,1,t?t.name:null)}}function Fa(t){return JSON.parse(JSON.stringify(t))}function Ja(){try{for(var t in Pa){var e=(r=$a(Fa(Pa[t])))?JSON.stringify(r).substring(0,1e4):r;e&&Za(t,e)}for(var n in Ua){var a=document.querySelector(Ua[n]);a&&Za(n,a.innerText)}}catch(t){Ya(5,1,t?t.name:null)}var r;er(40)}function Ga(){qa=[]}function Za(t,e,n){void 0===n&&(n=!1),(!(t in Xa)||t in Xa&&Xa[t]!==e||n)&&(Xa[t]=e,qa.push(t))}function Ka(){Xa={},qa=[],Pa={},Ua={}}function Qa(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 $a(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&&tr(r,a.condition))n=$a(t,r);else if(Array.isArray(r)){for(var i=[],o=0,u=r;o<u.length;o++){var c=u[o];if(tr(c,a.condition)){var s=$a(t,c);s&&i.push(s)}}n=i}return n}return null}function tr(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function er(t){var e=[l(),t];switch(t){case 4:var n=O;n&&((e=[n.time,n.event]).push(n.data.visible),e.push(n.data.docWidth),e.push(n.data.docHeight),e.push(n.data.screenWidth),e.push(n.data.screenHeight),e.push(n.data.scrollX),e.push(n.data.scrollY),e.push(n.data.pointerX),e.push(n.data.pointerY),e.push(n.data.activityTime),Na(e,!1)),S();break;case 25:e.push(z.gap),Na(e);break;case 35:e.push(Wa.check),Na(e,!1);break;case 3:e.push($.key),Na(e);break;case 2:e.push(ka.sequence),e.push(ka.attempts),e.push(ka.status),Na(e,!1);break;case 24:e.push(I.key),e.push(I.value),Na(e);break;case 34:var a=Object.keys(nt);if(a.length>0){for(var r=0,i=a;r<i.length;r++){var o=i[r];e.push(o),e.push(nt[o])}ut(),Na(e,!1)}break;case 0:var u=Object.keys(A);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(A[d]))}A={},Na(e,!1)}break;case 1:var h=Object.keys(cr);if(h.length>0){for(var p=0,v=h;p<v.length;p++){var g=v[p];f=parseInt(g,10);e.push(f),e.push(cr[g])}hr(),Na(e,!1)}break;case 36:var m=Object.keys(J);if(m.length>0){for(var b=0,y=m;b<y.length;b++){var w=y[b];f=parseInt(w,10);e.push(f),e.push([].concat.apply([],J[w]))}K(),Na(e,!1)}break;case 40:for(var k=0,E=qa;k<E.length;k++){w=E[k];e.push(w),e.push(Xa[w])}Ga(),Na(e,!1)}}function nr(){Wa={check:0}}function ar(t){if(0===Wa.check){var e=Wa.check;e=Ir.sequence>=128?1:e,e=l()>72e5?2:e,(e=t>10485760?2:e)!==Wa.check&&rr(e)}}function rr(t){Wa.check=t,Er(),vi()}function ir(){0!==Wa.check&&er(35)}function or(){Wa=null}var ur=null,cr=null;function sr(){ur={},cr={}}function lr(){ur={},cr={}}function dr(t,e){e&&(e="".concat(e),t in ur||(ur[t]=[]),ur[t].indexOf(e)<0&&(ur[t].push(e),t in cr||(cr[t]=[]),cr[t].push(e),ur[t].length>128&&rr(5)))}function fr(){er(1)}function hr(){cr={}}var pr=null,vr=[],gr=null;function mr(){gr=null;var t,e=navigator&&"userAgent"in navigator?navigator.userAgent:"",n=document&&document.title?document.title:"",a=function(){var t={session:Sr(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=Tr("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-Nr(n[1])<18e5&&(t.session=n[0],t.count=Nr(n[2])+1,t.upgrade=Nr(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),r=_r(),i=u.projectId||f(location.host);pr={projectId:i,userId:r.id,sessionId:a.session,pageNum:a.count},u.lean=u.track&&null!==a.upgrade?0===a.upgrade:u.lean,u.upload=u.track&&"string"==typeof u.upload&&a.upload&&a.upload.length>"https://".length?a.upload:u.upload,dr(0,e),dr(3,n),dr(1,y(location.href)),dr(2,document.referrer),dr(15,function(){var t=Sr();if(u.track&&xr(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),dr(16,document.documentElement.lang),dr(17,document.dir),dr(26,"".concat(window.devicePixelRatio)),Y(0,a.ts),Y(1,0),navigator&&(dr(9,navigator.language),Y(33,navigator.hardwareConcurrency),Y(32,navigator.maxTouchPoints),Y(34,Math.round(navigator.deviceMemory)),(t=navigator.userAgentData)&&t.getHighEntropyValues?t.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;dr(22,t.platform),dr(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){dr(24,t.name+"~"+t.version)})),dr(25,t.model),Y(27,t.mobile?1:0)})):dr(22,navigator.platform)),screen&&(Y(14,Math.round(screen.width)),Y(15,Math.round(screen.height)),Y(16,Math.round(screen.colorDepth)));for(var o=0,c=u.cookies;o<c.length;o++){var s=c[o],l=Tr(s);l&&at(s,l)}Mr(r)}function br(){gr=null,pr=null}function yr(t,e){void 0===e&&(e=!0),pr&&!1===e&&t(pr,!u.lean),vr.push({callback:t,wait:e})}function wr(){return pr?[pr.userId,pr.sessionId,pr.pageNum].join("."):""}function kr(){$r()&&(u.track=!0,Mr(_r(),1))}function Er(){Dr("_clsk","",0)}function Or(){var t=Math.round(Date.now()),e=u.upload&&"string"==typeof u.upload?u.upload.replace("https://",""):"",n=u.lean?0:1;!function(t){vr.length>0&&vr.forEach((function(e){!e.callback||e.wait&&!t||e.callback(pr,!u.lean)}))}(n),Dr("_clsk",[pr.sessionId,t,pr.pageNum,n,e].join("|"),1)}function xr(t,e){try{return!!t[e]}catch(t){return!1}}function Mr(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)&&Dr("_clck",[pr.userId,1,n.toString(36),e].join("|"),365)}function Sr(){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 Nr(t,e){return void 0===e&&(e=10),parseInt(t,e)}function _r(){var t={id:Sr(),expiry:null,consent:0},e=Tr("_clck");if(e&&e.length>0){for(var n=e.split("|"),a=0,r=0,i=document.cookie.split(";");r<i.length;r++){a+="_clck"===i[r].split("=")[0].trim()?1:0}if(1===n.length||a>1){var 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=Nr(n[2],36)),n.length>3&&1===Nr(n[3])&&(t.consent=1),u.track=u.track||1===t.consent,t.id=u.track?n[0]:t.id}return t}function Tr(t){if(xr(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 Dr(t,e,n){if(u.track&&(navigator&&navigator.cookieEnabled||xr(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===gr){for(var o=location.hostname?location.hostname.split("."):[],c=o.length-1;c>=0;c--)if(gr=".".concat(o[c]).concat(gr||""),c<o.length-1&&(document.cookie="".concat(i).concat(";").concat("domain=").concat(gr),Tr(t)===e))return;gr=""}}catch(t){gr=""}document.cookie=gr?"".concat(i).concat(";").concat("domain=").concat(gr):i}}var Cr,Ir=null;function jr(){var t=pr;Ir={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 zr(){Ir=null}function Lr(t){return Ir.start=Ir.start+Ir.duration,Ir.duration=l()-Ir.start,Ir.sequence++,Ir.upload=t&&"sendBeacon"in navigator?1:0,Ir.end=t?1:0,[Ir.version,Ir.sequence,Ir.start,Ir.duration,Ir.projectId,Ir.userId,Ir.sessionId,Ir.pageNum,Ir.upload,Ir.end]}function Ar(){Cr=[]}function Rr(t){if(Cr&&-1===Cr.indexOf(t.message)){var e=u.report;if(e&&e.length>0){var n={v:Ir.version,p:Ir.projectId,u:Ir.userId,s:Ir.sessionId,n:Ir.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e),a.send(JSON.stringify(n)),Cr.push(t.message)}}return t}function Hr(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw Rr(t)}var n=performance.now()-e;H(4,n),n>30&&(R(7),Y(6,n))}}var Yr=[];function Wr(t,e,n,a){void 0===a&&(a=!1),n=Hr(n);try{t[c("addEventListener")](e,n,a),Yr.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function Xr(){for(var t=0,e=Yr;t<e.length;t++){var n=e[t];try{n.target[c("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}Yr=[]}var qr=null,Pr=null,Ur=null,Br=0;function Vr(){return!(Br++>20)||(Ya(4,0),!1)}function Fr(){Br=0,Ur!==Gr()&&(vi(),window.setTimeout(Jr,250))}function Jr(){pi(),Y(29,1)}function Gr(){return location.href?location.href.replace(location.hash,""):location.href}var Zr=!1;function Kr(){Zr=!0,s=performance.now(),Tt(),Xr(),Ar(),Ur=Gr(),Br=0,Wr(window,"popstate",Fr),null===qr&&(qr=history.pushState,history.pushState=function(){qr.apply(this,arguments),$r()&&Vr()&&Fr()}),null===Pr&&(Pr=history.replaceState,history.replaceState=function(){Pr.apply(this,arguments),$r()&&Vr()&&Fr()})}function Qr(){Ur=null,Br=0,Ar(),Xr(),Tt(),s=0,Zr=!1}function $r(){return Zr}function ti(t){if(null===t||Zr)return!1;for(var e in t)e in u&&(u[e]=t[e]);return!0}function ei(){pi(),j("clarity","restart")}var ni=Object.freeze({__proto__:null,start:function(){!function(){bt=[],Y(26,navigator.webdriver?1:0);try{Y(31,window.top==window.self?1:2)}catch(t){Y(31,0)}}(),Wr(window,"error",La),za={},Ha={}},stop:function(){Ha={}}});function ai(){return ct(this,void 0,void 0,(function(){var t,e;return st(this,(function(n){switch(n.label){case 0:return t=l(),jt(e={id:wr(),cost:3}),[4,Qe(document,e,0)];case 1:return n.sent(),[4,Wt(5,e,t)];case 2:return n.sent(),zt(e),[2]}}))}))}var ri=Object.freeze({__proto__:null,start:function(){Ut(),Bt(),sa(),na=null,Qn=new WeakMap,$n={},ta=[],ea=!!window.IntersectionObserver,Cn(),function(){if($e=[],rn=[],on=null,un=0,cn={},null===en&&(en=CSSStyleSheet.prototype.insertRule,CSSStyleSheet.prototype.insertRule=function(){return $r()&&hn(this.ownerNode),en.apply(this,arguments)}),null===nn&&(nn=CSSStyleSheet.prototype.deleteRule,CSSStyleSheet.prototype.deleteRule=function(){return $r()&&hn(this.ownerNode),nn.apply(this,arguments)}),null===an){an=Element.prototype.attachShadow;try{Element.prototype.attachShadow=function(){return $r()?hn(an.apply(this,arguments)):an.apply(this,arguments)}}catch(t){an=null}}}(),Dt(ai,1).then((function(){Hr(Bt)(),Hr(ia)()}))},stop:function(){sa(),Qn=null,$n={},ta=[],na&&(na.disconnect(),na=null),ea=!1,In(),function(){for(var t=0,e=$e;t<e.length;t++){var n=e[t];n&&n.disconnect()}$e=[],cn={},tn=[],rn=[],un=0,on=null}(),Ut()},hashText:qn});var ii,oi=null;function ui(){oi=null}function ci(t){oi={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){ct(this,void 0,void 0,(function(){var e,n;return st(this,(function(a){return e=l(),n=[e,t],29===t&&(n.push(oi.fetchStart),n.push(oi.connectStart),n.push(oi.connectEnd),n.push(oi.requestStart),n.push(oi.responseStart),n.push(oi.responseEnd),n.push(oi.domInteractive),n.push(oi.domComplete),n.push(oi.loadEventStart),n.push(oi.loadEventEnd),n.push(oi.redirectCount),n.push(oi.size),n.push(oi.type),n.push(oi.protocol),n.push(oi.encodedSize),n.push(oi.decodedSize),ui(),Na(n,!1)),[2]}))}))}(29)}var si=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint"];function li(){try{ii&&ii.disconnect(),ii=new PerformanceObserver(Hr(di));for(var t=0,e=si;t<e.length;t++){var n=e[t];PerformanceObserver.supportedEntryTypes.indexOf(n)>=0&&("layout-shift"===n&&H(9,0),ii.observe({type:n,buffered:!0}))}}catch(t){Ya(3,1)}}function di(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":ci(a);break;case"resource":var r=a.name;dr(4,fi(r)),r!==u.upload&&r!==u.fallback||Y(28,a.duration);break;case"longtask":R(7);break;case"first-input":e&&Y(10,a.processingStart-a.startTime);break;case"layout-shift":e&&!a.hadRecentInput&&H(9,1e3*a.value);break;case"largest-contentful-paint":e&&Y(8,a.startTime)}}performance&&"memory"in performance&&performance.memory.usedJSHeapSize&&Y(30,Math.abs(performance.memory.usedJSHeapSize/1048576))}(t.getEntries())}function fi(t){var e=document.createElement("a");return e.href=t,e.hostname}var hi=[ni,ri,qe,Object.freeze({__proto__:null,start:function(){ui(),function(){navigator&&"connection"in navigator&&dr(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?"complete"!==document.readyState?Wr(window,"load",W.bind(this,li,0)):li():Ya(3,0)}()},stop:function(){ii&&ii.disconnect(),ii=null,ui()}})];function pi(t){void 0===t&&(t=null),function(){try{return!1===Zr&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(ti(t),Kr(),pt(),hi.forEach((function(t){return Hr(t.start)()})),null===t&&yi())}function vi(){$r()&&(hi.slice().reverse().forEach((function(t){return Hr(t.stop)()})),vt(),Qr(),void 0!==mi&&(mi[bi]=function(){(mi[bi].q=mi[bi].q||[]).push(arguments)}))}var gi=Object.freeze({__proto__:null,version:d,start:pi,pause:function(){$r()&&(j("clarity","pause"),null===Nt&&(Nt=new Promise((function(t){_t=t}))))},resume:function(){$r()&&(Nt&&(_t(),Nt=null,null===St&&Ct()),j("clarity","resume"))},stop:vi,consent:kr,event:j,identify:rt,set:at,upgrade:tt,metadata:yr,hashText:qn}),mi=window,bi="clarity";function yi(){if(void 0!==mi){if(mi[bi]&&mi[bi].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=mi[bi]&&mi[bi].q||[];for(mi[bi]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return gi[t].apply(gi,e)},mi[bi].v=d;t.length>0;)mi[bi].apply(mi,t.shift())}}yi()}();
@@ -73,6 +73,57 @@ var envelope$1 = /*#__PURE__*/Object.freeze({
73
73
  get stop () { return stop$7; },
74
74
  get envelope () { return envelope; }
75
75
  });
76
+ var clarity = /*#__PURE__*/Object.freeze({
77
+ __proto__: null,
78
+ get version () { return version$1; },
79
+ get start () { return start; },
80
+ get pause () { return pause; },
81
+ get resume () { return resume; },
82
+ get stop () { return stop; },
83
+ get consent () { return consent; },
84
+ get event () { return event; },
85
+ get identify () { return identify; },
86
+ get set () { return set; },
87
+ get upgrade () { return upgrade; },
88
+ get metadata () { return metadata; },
89
+ get hashText () { return hashText; }
90
+ });
91
+
92
+ var w = window;
93
+ var c = "clarity" /* Constant.Clarity */;
94
+ function setup() {
95
+ // Start queuing up calls while Clarity is inactive and we are in a browser enviornment
96
+ if (typeof w !== "undefined") {
97
+ w[c] = function () {
98
+ (w[c].q = w[c].q || []).push(arguments);
99
+ };
100
+ }
101
+ }
102
+ function process$7() {
103
+ if (typeof w !== "undefined") {
104
+ // Do not execute or reset global "clarity" variable if a version of Clarity is already running on the page
105
+ if (w[c] && w[c].v) {
106
+ return console.warn("Error CL001: Multiple Clarity tags detected.");
107
+ }
108
+ // Expose clarity in a browser environment
109
+ // To be efficient about queuing up operations while Clarity is wiring up, we expose clarity.*(args) => clarity(*, args);
110
+ // This allows us to reprocess any calls that we missed once Clarity is available on the page
111
+ // Once Clarity script bundle is loaded on the page, we also initialize a "v" property that holds current version
112
+ // We use the presence or absence of "v" to determine if we are attempting to run a duplicate instance
113
+ var queue = w[c] ? (w[c].q || []) : [];
114
+ w[c] = function (method) {
115
+ var args = [];
116
+ for (var _i = 1; _i < arguments.length; _i++) {
117
+ args[_i - 1] = arguments[_i];
118
+ }
119
+ return clarity[method].apply(clarity, args);
120
+ };
121
+ w[c].v = version$1;
122
+ while (queue.length > 0) {
123
+ w[c].apply(w, queue.shift());
124
+ }
125
+ }
126
+ }
76
127
 
77
128
  var config$1 = {
78
129
  projectId: null,
@@ -115,7 +166,7 @@ function stop$C() {
115
166
  startTime = 0;
116
167
  }
117
168
 
118
- var version$1 = "0.7.0";
169
+ var version$1 = "0.7.2";
119
170
 
120
171
  // tslint:disable: no-bitwise
121
172
  function hash (input, precision) {
@@ -182,6 +233,8 @@ function text$1(value, hint, privacy, mangle) {
182
233
  break;
183
234
  case 4 /* Privacy.Exclude */:
184
235
  switch (hint) {
236
+ case "*T" /* Layout.Constant.TextTag */:
237
+ return mangle ? mangleText(value) : mask(value);
185
238
  case "value":
186
239
  case "input":
187
240
  case "click":
@@ -2252,7 +2305,7 @@ function handle$1(m) {
2252
2305
  }
2253
2306
  function process$2() {
2254
2307
  return __awaiter(this, void 0, void 0, function () {
2255
- var timer, record, _i, _a, mutation, state, target, type, value;
2308
+ var timer, record, instance, _i, _a, mutation, state, target, type, value;
2256
2309
  return __generator(this, function (_b) {
2257
2310
  switch (_b.label) {
2258
2311
  case 0:
@@ -2262,6 +2315,7 @@ function process$2() {
2262
2315
  case 1:
2263
2316
  if (!(mutations.length > 0)) return [3 /*break*/, 8];
2264
2317
  record = mutations.shift();
2318
+ instance = time();
2265
2319
  _i = 0, _a = record.mutations;
2266
2320
  _b.label = 2;
2267
2321
  case 2:
@@ -2278,7 +2332,7 @@ function process$2() {
2278
2332
  return [3 /*break*/, 6];
2279
2333
  }
2280
2334
  target = mutation.target;
2281
- type = track$5(mutation, timer);
2335
+ type = track$5(mutation, timer, instance);
2282
2336
  if (type && target && target.ownerDocument) {
2283
2337
  parse$1(target.ownerDocument);
2284
2338
  }
@@ -2318,7 +2372,7 @@ function process$2() {
2318
2372
  });
2319
2373
  });
2320
2374
  }
2321
- function track$5(m, timer) {
2375
+ function track$5(m, timer, instance) {
2322
2376
  var value = m.target ? get(m.target.parentNode) : null;
2323
2377
  // Check if the parent is already discovered and that the parent is not the document root
2324
2378
  if (value && value.data.tag !== "HTML" /* Constant.HTML */) {
@@ -2331,19 +2385,20 @@ function track$5(m, timer) {
2331
2385
  // In those cases, IDs will change however the selector (which is relative to DOM xPath) remains the same
2332
2386
  var key = [parent_1, element, m.attributeName, names(m.addedNodes), names(m.removedNodes)].join();
2333
2387
  // Initialize an entry if it doesn't already exist
2334
- history$4[key] = key in history$4 ? history$4[key] : [0];
2388
+ history$4[key] = key in history$4 ? history$4[key] : [0, instance];
2335
2389
  var h = history$4[key];
2336
2390
  // Lookup any pending nodes queued up for removal, and process them now if we suspended a mutation before
2337
2391
  if (inactive === false && h[0] >= 10 /* Setting.MutationSuspendThreshold */) {
2338
- processNodeList(h[1], 2 /* Source.ChildListRemove */, timer);
2392
+ processNodeList(h[2], 2 /* Source.ChildListRemove */, timer);
2339
2393
  }
2340
2394
  // Update the counter
2341
- h[0] = inactive ? h[0] + 1 : 1;
2395
+ h[0] = inactive ? (h[1] === instance ? h[0] : h[0] + 1) : 1;
2396
+ h[1] = instance;
2342
2397
  // Return updated mutation type based on if we have already hit the threshold or not
2343
2398
  if (h[0] === 10 /* Setting.MutationSuspendThreshold */) {
2344
2399
  // Store a reference to removedNodes so we can process them later
2345
2400
  // when we resume mutations again on user interactions
2346
- h[1] = m.removedNodes;
2401
+ h[2] = m.removedNodes;
2347
2402
  return "suspend" /* Constant.Suspend */;
2348
2403
  }
2349
2404
  else if (h[0] > 10 /* Setting.MutationSuspendThreshold */) {
@@ -4651,6 +4706,11 @@ function start(config$1) {
4651
4706
  start$6();
4652
4707
  start$z();
4653
4708
  modules.forEach(function (x) { return measure(x.start)(); });
4709
+ // If it's an internal call to start, without explicit configuration,
4710
+ // re-process any newly accumulated items in the queue
4711
+ if (config$1 === null) {
4712
+ process$7();
4713
+ }
4654
4714
  }
4655
4715
  }
4656
4716
  // By default Clarity is asynchronous and will yield by looking for requestIdleCallback.
@@ -4673,29 +4733,14 @@ function resume() {
4673
4733
  }
4674
4734
  function stop() {
4675
4735
  if (active()) {
4676
- // Stop modules in the reverse order of their initialization
4736
+ // Stop modules in the reverse order of their initialization and start queuing up items again
4677
4737
  modules.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
4678
4738
  stop$v();
4679
4739
  stop$5();
4740
+ setup();
4680
4741
  }
4681
4742
  }
4682
4743
 
4683
- var clarity = /*#__PURE__*/Object.freeze({
4684
- __proto__: null,
4685
- version: version$1,
4686
- start: start,
4687
- pause: pause,
4688
- resume: resume,
4689
- stop: stop,
4690
- consent: consent,
4691
- event: event,
4692
- identify: identify,
4693
- set: set,
4694
- upgrade: upgrade,
4695
- metadata: metadata,
4696
- hashText: hashText
4697
- });
4698
-
4699
4744
  var helper = { hash: hash, selector: selector, get: get, getNode: getNode, lookup: lookup };
4700
4745
  var version = version$1;
4701
4746
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-js",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
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/clarity.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Config, Module } from "@clarity-types/core";
2
2
  import { Constant } from "@clarity-types/data";
3
+ import * as queue from "@src/queue";
3
4
  import * as core from "@src/core";
4
5
  import measure from "@src/core/measure";
5
6
  import * as task from "@src/core/task";
@@ -22,6 +23,10 @@ export function start(config: Config = null): void {
22
23
  core.start();
23
24
  data.start();
24
25
  modules.forEach(x => measure(x.start)());
26
+
27
+ // If it's an internal call to start, without explicit configuration,
28
+ // re-process any newly accumulated items in the queue
29
+ if (config === null) { queue.process(); }
25
30
  }
26
31
  }
27
32
 
@@ -47,9 +52,10 @@ export function resume(): void {
47
52
 
48
53
  export function stop(): void {
49
54
  if (core.active()) {
50
- // Stop modules in the reverse order of their initialization
55
+ // Stop modules in the reverse order of their initialization and start queuing up items again
51
56
  modules.slice().reverse().forEach(x => measure(x.stop)());
52
57
  data.stop();
53
58
  core.stop();
59
+ queue.setup();
54
60
  }
55
61
  }
package/src/core/scrub.ts CHANGED
@@ -47,6 +47,8 @@ export function text(value: string, hint: string, privacy: Privacy, mangle: bool
47
47
  break;
48
48
  case Privacy.Exclude:
49
49
  switch (hint) {
50
+ case Layout.Constant.TextTag:
51
+ return mangle ? mangleText(value) : mask(value);
50
52
  case "value":
51
53
  case "input":
52
54
  case "click":
@@ -1,2 +1,2 @@
1
- let version = "0.7.0";
1
+ let version = "0.7.2";
2
2
  export default version;
package/src/global.ts CHANGED
@@ -1,22 +1,6 @@
1
- import * as clarity from "@src/clarity";
1
+ import * as queue from "@src/queue";
2
2
 
3
- // Expose clarity in a browser environment
4
- // To be efficient about queuing up operations while Clarity is wiring up, we expose clarity.*(args) => clarity(*, args);
5
- // This allows us to reprocess any calls that we missed once Clarity is available on the page
6
- // Once Clarity script bundle is loaded on the page, we also initialize a "v" property that holds current version
7
- // We use the presence or absence of "v" to determine if we are attempting to run a duplicate instance
3
+ // Process anything that was queued up before the script loaded
8
4
  (function(): void {
9
- if (typeof window !== "undefined") {
10
- const w = window as any;
11
- const c = 'clarity';
12
-
13
- // Do not execute or reset global "clarity" variable if a version of Clarity is already running on the page
14
- if (w[c] && w[c].v) { return console.warn("Error CL001: Multiple Clarity tags detected."); }
15
-
16
- // Re-wire global "clarity" variable to map it to current instance of Clarity
17
- const queue = w[c] ? (w[c].q || []) : [];
18
- w[c] = function(method: string, ...args: any[]): void { return clarity[method](...args); }
19
- w[c].v = clarity.version;
20
- while (queue.length > 0) { w[c](...queue.shift()); }
21
- }
5
+ queue.process();
22
6
  })();
@@ -124,12 +124,13 @@ async function process(): Promise<void> {
124
124
  task.start(timer);
125
125
  while (mutations.length > 0) {
126
126
  let record = mutations.shift();
127
+ let instance = time();
127
128
  for (let mutation of record.mutations) {
128
129
  let state = task.state(timer);
129
130
  if (state === Task.Wait) { state = await task.suspend(timer); }
130
131
  if (state === Task.Stop) { break; }
131
132
  let target = mutation.target;
132
- let type = track(mutation, timer);
133
+ let type = track(mutation, timer, instance);
133
134
  if (type && target && target.ownerDocument) { dom.parse(target.ownerDocument); }
134
135
  if (type && target && target.nodeType == Node.DOCUMENT_FRAGMENT_NODE && (target as ShadowRoot).host) { dom.parse(target as ShadowRoot); }
135
136
  switch (type) {
@@ -156,7 +157,7 @@ async function process(): Promise<void> {
156
157
  task.stop(timer);
157
158
  }
158
159
 
159
- function track(m: MutationRecord, timer: Timer): string {
160
+ function track(m: MutationRecord, timer: Timer, instance: number): string {
160
161
  let value = m.target ? dom.get(m.target.parentNode) : null;
161
162
  // Check if the parent is already discovered and that the parent is not the document root
162
163
  if (value && value.data.tag !== Constant.HTML) {
@@ -169,19 +170,22 @@ function track(m: MutationRecord, timer: Timer): string {
169
170
  // In those cases, IDs will change however the selector (which is relative to DOM xPath) remains the same
170
171
  let key = [parent, element, m.attributeName, names(m.addedNodes), names(m.removedNodes)].join();
171
172
  // Initialize an entry if it doesn't already exist
172
- history[key] = key in history ? history[key] : [0];
173
+ history[key] = key in history ? history[key] : [0, instance];
173
174
  let h = history[key];
174
175
  // Lookup any pending nodes queued up for removal, and process them now if we suspended a mutation before
175
- if (inactive === false && h[0] >= Setting.MutationSuspendThreshold) { processNodeList(h[1], Source.ChildListRemove, timer); }
176
+ if (inactive === false && h[0] >= Setting.MutationSuspendThreshold) { processNodeList(h[2], Source.ChildListRemove, timer); }
176
177
  // Update the counter
177
- h[0] = inactive ? h[0] + 1 : 1;
178
+ h[0] = inactive ? (h[1] === instance ? h[0] : h[0] + 1) : 1;
179
+ h[1] = instance;
178
180
  // Return updated mutation type based on if we have already hit the threshold or not
179
181
  if (h[0] === Setting.MutationSuspendThreshold) {
180
182
  // Store a reference to removedNodes so we can process them later
181
183
  // when we resume mutations again on user interactions
182
- h[1] = m.removedNodes;
184
+ h[2] = m.removedNodes;
183
185
  return Constant.Suspend;
184
- } else if (h[0] > Setting.MutationSuspendThreshold) { return Constant.Empty; }
186
+ } else if (h[0] > Setting.MutationSuspendThreshold) {
187
+ return Constant.Empty;
188
+ }
185
189
  }
186
190
  return m.type;
187
191
  }
package/src/queue.ts ADDED
@@ -0,0 +1,31 @@
1
+ import { Constant } from "@clarity-types/data";
2
+ import * as clarity from "@src/clarity";
3
+
4
+ const w = window;
5
+ const c = Constant.Clarity;
6
+
7
+ export function setup() {
8
+ // Start queuing up calls while Clarity is inactive and we are in a browser enviornment
9
+ if (typeof w !== "undefined") {
10
+ w[c] = function() {
11
+ (w[c].q = w[c].q || []).push(arguments);
12
+ };
13
+ }
14
+ }
15
+
16
+ export function process() {
17
+ if (typeof w !== "undefined") {
18
+ // Do not execute or reset global "clarity" variable if a version of Clarity is already running on the page
19
+ if (w[c] && w[c].v) { return console.warn("Error CL001: Multiple Clarity tags detected."); }
20
+
21
+ // Expose clarity in a browser environment
22
+ // To be efficient about queuing up operations while Clarity is wiring up, we expose clarity.*(args) => clarity(*, args);
23
+ // This allows us to reprocess any calls that we missed once Clarity is available on the page
24
+ // Once Clarity script bundle is loaded on the page, we also initialize a "v" property that holds current version
25
+ // We use the presence or absence of "v" to determine if we are attempting to run a duplicate instance
26
+ let queue = w[c] ? (w[c].q || []) : [];
27
+ w[c] = function(method: string, ...args: any[]): void { return clarity[method](...args); }
28
+ w[c].v = clarity.version;
29
+ while (queue.length > 0) { w[c](...queue.shift()); }
30
+ }
31
+ }
package/test/core.test.ts CHANGED
@@ -34,6 +34,7 @@ describe('Core Tests', () => {
34
34
  let password = node(decoded, "attributes.id", "pwd");
35
35
  let search = node(decoded, "attributes.id", "search");
36
36
  let card = node(decoded, "attributes.id", "cardnum");
37
+ let option = text(decoded, "option1");
37
38
  let textarea = text(decoded, "textarea");
38
39
  let click = clicks(decoded)[0];
39
40
  let input = inputs(decoded)[0];
@@ -49,6 +50,7 @@ describe('Core Tests', () => {
49
50
  assert.equal(search.attributes.value, "••••• •••• ••••");
50
51
  assert.equal(card.attributes.value, "•••••");
51
52
  assert.equal(textarea, "••••• •••••");
53
+ assert.equal(option, "• •••••");
52
54
 
53
55
  // Clicked text and input value should be consistent with uber masking configuration
54
56
  assert.equal(click.data.text, "Hello ▪▪▪▫▪");
@@ -75,6 +77,7 @@ describe('Core Tests', () => {
75
77
  let card = node(decoded, "attributes.id", "cardnum");
76
78
  let click = clicks(decoded)[0];
77
79
  let input = inputs(decoded)[0];
80
+ let option = text(decoded, "option1");
78
81
 
79
82
  // All fields are randomized and masked
80
83
  assert.equal(heading, "• ••••• ••••• ••••• ••••• •••••");
@@ -83,6 +86,7 @@ describe('Core Tests', () => {
83
86
  assert.equal(password.attributes.value, "••••");
84
87
  assert.equal(search.attributes.value, "••••• •••• ••••");
85
88
  assert.equal(card.attributes.value, "•••••");
89
+ assert.equal(option, "• •••••");
86
90
 
87
91
  // Clicked text and input value should also be masked in strict mode
88
92
  assert.equal(click.data.text, "••••• •••• ••••");
@@ -100,11 +104,13 @@ describe('Core Tests', () => {
100
104
  let card = node(decoded, "attributes.id", "cardnum");
101
105
  let click = clicks(decoded)[0];
102
106
  let input = inputs(decoded)[0];
107
+ let option = text(decoded, "option1");
103
108
 
104
109
  // Text flows through unmasked for non-sensitive fields, with exception of input fields
105
110
  assert.equal(heading, "Thanks for your order #2AB700GH");
106
111
  assert.equal(address, "1 Microsoft Way, Redmond, WA - 98052");
107
112
  assert.equal(search.attributes.value, "••••• •••• ••••");
113
+ assert.equal(option, "• •••••");
108
114
 
109
115
  // Sensitive fields are still masked
110
116
  assert.equal(email.attributes.value, "••••• •••• •••• ••••");
@@ -18,6 +18,10 @@
18
18
  <input type="search" id="search" title="Search" value="hello w0rld">
19
19
  <input type="text" id="cardnum" title="CC" value="1234">
20
20
  <textarea id="textarea" autocapitalize="off" role="combobox" rows="5" placeholder="" spellcheck="false">Hell0 World</textarea>
21
+ <select id="select" ng-options="origin.code" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
22
+ <option id="option1" label="Halifax" value="string:YHZ">Halifax</option>
23
+ <option id="option2" label="Montréal" value="string:YUL" selected="selected">Montréal</option>
24
+ </select>
21
25
  </form>
22
26
  </body>
23
27
  </html>
package/types/layout.d.ts CHANGED
@@ -186,7 +186,7 @@ export interface MutationQueue {
186
186
  }
187
187
 
188
188
  export interface MutationHistory {
189
- [key: string]: [/* Count */ number, /* Remove Nodes Buffer */ NodeList?];
189
+ [key: string]: [/* Count */ number, /* Instance */ number, /* Remove Nodes Buffer */ NodeList?];
190
190
  }
191
191
 
192
192
  export interface RegionQueue {