clarity-js 0.7.24 → 0.7.26

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.
@@ -140,7 +140,7 @@ function api(method) {
140
140
  }
141
141
 
142
142
  var startTime = 0;
143
- function start$H() {
143
+ function start$I() {
144
144
  startTime = performance.now();
145
145
  }
146
146
  function time(event) {
@@ -148,11 +148,11 @@ function time(event) {
148
148
  var ts = event && event.timeStamp > 0 ? event.timeStamp : performance.now();
149
149
  return Math.max(Math.round(ts - startTime), 0);
150
150
  }
151
- function stop$E() {
151
+ function stop$F() {
152
152
  startTime = 0;
153
153
  }
154
154
 
155
- var version$1 = "0.7.24";
155
+ var version$1 = "0.7.26";
156
156
 
157
157
  // tslint:disable: no-bitwise
158
158
  function hash (input, precision) {
@@ -356,11 +356,11 @@ function redact$1(value) {
356
356
  var state$c = null;
357
357
  var buffer = null;
358
358
  var update$2 = false;
359
- function start$G() {
359
+ function start$H() {
360
360
  update$2 = false;
361
- reset$r();
361
+ reset$s();
362
362
  }
363
- function reset$r() {
363
+ function reset$s() {
364
364
  // Baseline state holds the previous values - if it is updated in the current payload,
365
365
  // reset the state to current value after sending the previous state
366
366
  if (update$2) {
@@ -422,23 +422,23 @@ function visibility(t, visible) {
422
422
  }
423
423
  update$2 = true;
424
424
  }
425
- function compute$c() {
425
+ function compute$d() {
426
426
  if (update$2) {
427
427
  encode$1(4 /* Event.Baseline */);
428
428
  }
429
429
  }
430
- function stop$D() {
431
- reset$r();
430
+ function stop$E() {
431
+ reset$s();
432
432
  }
433
433
 
434
434
  var baseline = /*#__PURE__*/Object.freeze({
435
435
  __proto__: null,
436
436
  activity: activity,
437
- compute: compute$c,
438
- reset: reset$r,
439
- start: start$G,
437
+ compute: compute$d,
438
+ reset: reset$s,
439
+ start: start$H,
440
440
  get state () { return state$c; },
441
- stop: stop$D,
441
+ stop: stop$E,
442
442
  track: track$8,
443
443
  visibility: visibility
444
444
  });
@@ -463,12 +463,12 @@ function event(a, b) {
463
463
 
464
464
  var data$i = null;
465
465
  var updates$3 = null;
466
- function start$F() {
466
+ function start$G() {
467
467
  data$i = {};
468
468
  updates$3 = {};
469
469
  count$1(5 /* Metric.InvokeCount */);
470
470
  }
471
- function stop$C() {
471
+ function stop$D() {
472
472
  data$i = {};
473
473
  updates$3 = {};
474
474
  }
@@ -506,10 +506,10 @@ function max(metric, value) {
506
506
  }
507
507
  }
508
508
  }
509
- function compute$b() {
509
+ function compute$c() {
510
510
  encode$1(0 /* Event.Metric */);
511
511
  }
512
- function reset$q() {
512
+ function reset$r() {
513
513
  updates$3 = {};
514
514
  }
515
515
 
@@ -524,11 +524,11 @@ var data$h;
524
524
  var last = 0;
525
525
  var interval = 0;
526
526
  var timeout$6 = null;
527
- function start$E() {
527
+ function start$F() {
528
528
  interval = 60000 /* Setting.PingInterval */;
529
529
  last = 0;
530
530
  }
531
- function reset$p() {
531
+ function reset$q() {
532
532
  if (timeout$6) {
533
533
  clearTimeout(timeout$6);
534
534
  }
@@ -546,7 +546,7 @@ function ping() {
546
546
  suspend();
547
547
  }
548
548
  }
549
- function stop$B() {
549
+ function stop$C() {
550
550
  clearTimeout(timeout$6);
551
551
  last = 0;
552
552
  interval = 0;
@@ -555,16 +555,16 @@ function stop$B() {
555
555
  var ping$1 = /*#__PURE__*/Object.freeze({
556
556
  __proto__: null,
557
557
  get data () { return data$h; },
558
- reset: reset$p,
559
- start: start$E,
560
- stop: stop$B
558
+ reset: reset$q,
559
+ start: start$F,
560
+ stop: stop$C
561
561
  });
562
562
 
563
563
  var data$g = null;
564
- function start$D() {
564
+ function start$E() {
565
565
  data$g = {};
566
566
  }
567
- function stop$A() {
567
+ function stop$B() {
568
568
  data$g = {};
569
569
  }
570
570
  function track$7(event, time) {
@@ -584,25 +584,25 @@ function track$7(event, time) {
584
584
  }
585
585
  }
586
586
  }
587
- function compute$a() {
587
+ function compute$b() {
588
588
  encode$1(36 /* Event.Summary */);
589
589
  }
590
- function reset$o() {
590
+ function reset$p() {
591
591
  data$g = {};
592
592
  }
593
593
 
594
594
  var summary = /*#__PURE__*/Object.freeze({
595
595
  __proto__: null,
596
- compute: compute$a,
596
+ compute: compute$b,
597
597
  get data () { return data$g; },
598
- reset: reset$o,
599
- start: start$D,
600
- stop: stop$A,
598
+ reset: reset$p,
599
+ start: start$E,
600
+ stop: stop$B,
601
601
  track: track$7
602
602
  });
603
603
 
604
604
  var data$f = null;
605
- function start$C() {
605
+ function start$D() {
606
606
  if (!config$1.lean && config$1.upgrade) {
607
607
  config$1.upgrade("Config" /* Constant.Config */);
608
608
  }
@@ -626,15 +626,15 @@ function upgrade(key) {
626
626
  encode$1(3 /* Event.Upgrade */);
627
627
  }
628
628
  }
629
- function stop$z() {
629
+ function stop$A() {
630
630
  data$f = null;
631
631
  }
632
632
 
633
633
  var upgrade$1 = /*#__PURE__*/Object.freeze({
634
634
  __proto__: null,
635
635
  get data () { return data$f; },
636
- start: start$C,
637
- stop: stop$z,
636
+ start: start$D,
637
+ stop: stop$A,
638
638
  upgrade: upgrade
639
639
  });
640
640
 
@@ -692,8 +692,8 @@ function __generator(thisArg, body) {
692
692
  }
693
693
 
694
694
  var data$e = null;
695
- function start$B() {
696
- reset$n();
695
+ function start$C() {
696
+ reset$o();
697
697
  }
698
698
  function set(variable, value) {
699
699
  var values = typeof value === "string" /* Constant.String */ ? [value] : value;
@@ -748,14 +748,14 @@ function log$2(variable, value) {
748
748
  data$e[variable] = validValues;
749
749
  }
750
750
  }
751
- function compute$9() {
751
+ function compute$a() {
752
752
  encode$1(34 /* Event.Variable */);
753
753
  }
754
- function reset$n() {
754
+ function reset$o() {
755
755
  data$e = {};
756
756
  }
757
- function stop$y() {
758
- reset$n();
757
+ function stop$z() {
758
+ reset$o();
759
759
  }
760
760
  function redact(input) {
761
761
  return input && input.length >= 5 /* Setting.WordLength */ ?
@@ -789,13 +789,13 @@ function detect(input) {
789
789
 
790
790
  var variable = /*#__PURE__*/Object.freeze({
791
791
  __proto__: null,
792
- compute: compute$9,
792
+ compute: compute$a,
793
793
  get data () { return data$e; },
794
794
  identify: identify,
795
- reset: reset$n,
795
+ reset: reset$o,
796
796
  set: set,
797
- start: start$B,
798
- stop: stop$y
797
+ start: start$C,
798
+ stop: stop$z
799
799
  });
800
800
 
801
801
  var supported$1 = "CompressionStream" /* Constant.CompressionStream */ in window;
@@ -857,32 +857,32 @@ function read(stream) {
857
857
  }
858
858
 
859
859
  var modules$1 = [baseline, dimension, variable, limit, summary, metadata$1, envelope$1, upload$1, ping$1, upgrade$1, extract];
860
- function start$A() {
860
+ function start$B() {
861
861
  // Metric needs to be initialized before we can start measuring. so metric is not wrapped in measure
862
- start$F();
862
+ start$G();
863
863
  modules$1.forEach(function (x) { return measure(x.start)(); });
864
864
  }
865
- function stop$x() {
865
+ function stop$y() {
866
866
  // Stop modules in the reverse order of their initialization
867
867
  // The ordering below should respect inter-module dependency.
868
868
  // E.g. if upgrade depends on upload, then upgrade needs to end before upload.
869
869
  // Similarly, if upload depends on metadata, upload needs to end before metadata.
870
870
  modules$1.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
871
- stop$C();
871
+ stop$D();
872
872
  }
873
- function compute$8() {
874
- compute$9();
875
- compute$c();
873
+ function compute$9() {
874
+ compute$a();
875
+ compute$d();
876
876
  compute$2();
877
+ compute$c();
877
878
  compute$b();
878
- compute$a();
879
879
  compute$3();
880
880
  compute$4();
881
881
  }
882
882
 
883
883
  var history$5 = [];
884
884
  var data$d;
885
- function start$z() {
885
+ function start$A() {
886
886
  history$5 = [];
887
887
  max(26 /* Metric.Automation */, navigator.webdriver ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */);
888
888
  try {
@@ -906,7 +906,7 @@ function check$4(id, target, input) {
906
906
 
907
907
  var excludeClassNames = "load,active,fixed,visible,focus,show,collaps,animat" /* Constant.ExcludeClassNames */.split("," /* Constant.Comma */);
908
908
  var selectorMap = {};
909
- function reset$m() {
909
+ function reset$n() {
910
910
  selectorMap = {};
911
911
  }
912
912
  function get$1(input, type) {
@@ -995,7 +995,7 @@ function filter(value) {
995
995
  var selector = /*#__PURE__*/Object.freeze({
996
996
  __proto__: null,
997
997
  get: get$1,
998
- reset: reset$m
998
+ reset: reset$n
999
999
  });
1000
1000
 
1001
1001
  var index = 1;
@@ -1014,14 +1014,14 @@ var idMap = null; // Maps node => id.
1014
1014
  var iframeMap = null; // Maps iframe's contentDocument => parent iframe element
1015
1015
  var privacyMap = null; // Maps node => Privacy (enum)
1016
1016
  var fraudMap = null; // Maps node => FraudId (number)
1017
- function start$y() {
1018
- reset$l();
1017
+ function start$z() {
1018
+ reset$m();
1019
1019
  parse$1(document, true);
1020
1020
  }
1021
- function stop$w() {
1022
- reset$l();
1021
+ function stop$x() {
1022
+ reset$m();
1023
1023
  }
1024
- function reset$l() {
1024
+ function reset$m() {
1025
1025
  index = 1;
1026
1026
  values = [];
1027
1027
  updateMap = [];
@@ -1037,7 +1037,7 @@ function reset$l() {
1037
1037
  iframeMap = new WeakMap();
1038
1038
  privacyMap = new WeakMap();
1039
1039
  fraudMap = new WeakMap();
1040
- reset$m();
1040
+ reset$n();
1041
1041
  }
1042
1042
  // We parse new root nodes for any regions or masked nodes in the beginning (document) and
1043
1043
  // later whenever there are new additions or modifications to DOM (mutations)
@@ -1373,8 +1373,8 @@ var dom = /*#__PURE__*/Object.freeze({
1373
1373
  lookup: lookup,
1374
1374
  parse: parse$1,
1375
1375
  sameorigin: sameorigin,
1376
- start: start$y,
1377
- stop: stop$w,
1376
+ start: start$z,
1377
+ stop: stop$x,
1378
1378
  update: update$1,
1379
1379
  updates: updates$2
1380
1380
  });
@@ -1402,7 +1402,7 @@ function resume$1() {
1402
1402
  }
1403
1403
  }
1404
1404
  }
1405
- function reset$k() {
1405
+ function reset$l() {
1406
1406
  tracker = {};
1407
1407
  queuedTasks = [];
1408
1408
  activeTask = null;
@@ -1472,7 +1472,7 @@ function state$b(timer) {
1472
1472
  // If this task is no longer being tracked, send stop message to the caller
1473
1473
  return 2 /* Task.Stop */;
1474
1474
  }
1475
- function start$x(timer) {
1475
+ function start$y(timer) {
1476
1476
  tracker[key(timer)] = { start: performance.now(), calls: 0, yield: 30 /* Setting.LongTask */ };
1477
1477
  }
1478
1478
  function restart$2(timer) {
@@ -1480,12 +1480,12 @@ function restart$2(timer) {
1480
1480
  if (tracker && tracker[id]) {
1481
1481
  var c = tracker[id].calls;
1482
1482
  var y = tracker[id].yield;
1483
- start$x(timer);
1483
+ start$y(timer);
1484
1484
  tracker[id].calls = c + 1;
1485
1485
  tracker[id].yield = y;
1486
1486
  }
1487
1487
  }
1488
- function stop$v(timer) {
1488
+ function stop$w(timer) {
1489
1489
  var end = performance.now();
1490
1490
  var id = key(timer);
1491
1491
  var duration = end - tracker[id].start;
@@ -1505,7 +1505,7 @@ function suspend$1(timer) {
1505
1505
  case 0:
1506
1506
  id = key(timer);
1507
1507
  if (!(id in tracker)) return [3 /*break*/, 2];
1508
- stop$v(timer);
1508
+ stop$w(timer);
1509
1509
  _a = tracker[id];
1510
1510
  return [4 /*yield*/, wait()];
1511
1511
  case 1:
@@ -1618,14 +1618,14 @@ function tokenize (tokens) {
1618
1618
  }
1619
1619
 
1620
1620
  var data$c;
1621
- function reset$j() {
1621
+ function reset$k() {
1622
1622
  data$c = null;
1623
1623
  }
1624
- function start$w() {
1625
- reset$j();
1626
- compute$7();
1624
+ function start$x() {
1625
+ reset$k();
1626
+ compute$8();
1627
1627
  }
1628
- function compute$7() {
1628
+ function compute$8() {
1629
1629
  var body = document.body;
1630
1630
  var d = document.documentElement;
1631
1631
  var bodyClientWidth = body ? body.clientWidth : null;
@@ -1648,12 +1648,51 @@ function compute$7() {
1648
1648
  encode$4(8 /* Event.Document */);
1649
1649
  }
1650
1650
  }
1651
+ function stop$v() {
1652
+ reset$k();
1653
+ }
1654
+
1655
+ var state$a = [];
1656
+ var replace = null;
1657
+ var replaceSync = null;
1658
+ function start$w() {
1659
+ reset$j();
1660
+ if (replace === null) {
1661
+ replace = CSSStyleSheet.prototype.replace;
1662
+ CSSStyleSheet.prototype.replace = function () {
1663
+ if (active()) {
1664
+ max(36 /* Metric.ConstructedStyles */, 1);
1665
+ }
1666
+ return replace.apply(this, arguments);
1667
+ };
1668
+ }
1669
+ if (replaceSync === null) {
1670
+ replaceSync = CSSStyleSheet.prototype.replaceSync;
1671
+ CSSStyleSheet.prototype.replaceSync = function () {
1672
+ if (active()) {
1673
+ max(36 /* Metric.ConstructedStyles */, 1);
1674
+ }
1675
+ return replaceSync.apply(this, arguments);
1676
+ };
1677
+ }
1678
+ }
1679
+ function checkDocumentStyles(documentNode) {
1680
+ if (!(documentNode === null || documentNode === void 0 ? void 0 : documentNode.adoptedStyleSheets)) {
1681
+ // if we don't have adoptedStyledSheets on the Node passed to us, we can short circuit.
1682
+ return;
1683
+ }
1684
+ max(36 /* Metric.ConstructedStyles */, 1);
1685
+ }
1686
+ function compute$7() {
1687
+ checkDocumentStyles(document);
1688
+ }
1689
+ function reset$j() {
1690
+ state$a = [];
1691
+ }
1651
1692
  function stop$u() {
1652
1693
  reset$j();
1653
1694
  }
1654
1695
 
1655
- var state$a = [];
1656
-
1657
1696
  var state$9 = [];
1658
1697
  var animationPlay = null;
1659
1698
  var animationPause = null;
@@ -1786,6 +1825,7 @@ function encode$4 (type, timer, ts) {
1786
1825
  tokens.push(entry.data.newIds);
1787
1826
  queue(tokens);
1788
1827
  }
1828
+ reset$j();
1789
1829
  return [3 /*break*/, 13];
1790
1830
  case 4:
1791
1831
  for (_e = 0, _f = state$a; _e < _f.length; _e++) {
@@ -1796,6 +1836,7 @@ function encode$4 (type, timer, ts) {
1796
1836
  tokens.push(entry.data.cssRules);
1797
1837
  queue(tokens);
1798
1838
  }
1839
+ reset$j();
1799
1840
  _l.label = 5;
1800
1841
  case 5:
1801
1842
  for (_g = 0, _h = state$9; _g < _h.length; _g++) {
@@ -2708,6 +2749,7 @@ function processNode (node, source) {
2708
2749
  // later whenever there are new additions or modifications to DOM (mutations)
2709
2750
  if (node === document)
2710
2751
  parse$1(document);
2752
+ checkDocumentStyles(node);
2711
2753
  observe$2(node);
2712
2754
  break;
2713
2755
  case Node.DOCUMENT_FRAGMENT_NODE:
@@ -2731,6 +2773,7 @@ function processNode (node, source) {
2731
2773
  // the same way we observe real shadow DOM nodes (encapsulation provided by the browser).
2732
2774
  dom[call](node, shadowRoot.host, { tag: "*P" /* Constant.PolyfillShadowDomTag */, attributes: {} }, source);
2733
2775
  }
2776
+ checkDocumentStyles(node);
2734
2777
  }
2735
2778
  break;
2736
2779
  case Node.TEXT_NODE:
@@ -2847,6 +2890,16 @@ function processNode (node, source) {
2847
2890
  var linkData = { tag: tag, attributes: attributes };
2848
2891
  dom[call](node, parent, linkData, source);
2849
2892
  break;
2893
+ case "VIDEO":
2894
+ case "AUDIO":
2895
+ case "SOURCE":
2896
+ // Ignoring any base64 src attribute for media elements to prevent big unused tokens to be sent and shock the network
2897
+ if ("src" /* Constant.Src */ in attributes && attributes["src" /* Constant.Src */].startsWith("data:")) {
2898
+ delete attributes["src" /* Constant.Src */];
2899
+ }
2900
+ var mediaTag = { tag: tag, attributes: attributes };
2901
+ dom[call](node, parent, mediaTag, source);
2902
+ break;
2850
2903
  default:
2851
2904
  var data = { tag: tag, attributes: attributes };
2852
2905
  if (element.shadowRoot) {
@@ -3056,7 +3109,7 @@ function handle$1(m) {
3056
3109
  track$7(6 /* Event.Mutation */, now);
3057
3110
  mutations.push({ time: now, mutations: m });
3058
3111
  schedule$1(process$1, 1 /* Priority.High */).then(function () {
3059
- setTimeout(compute$7);
3112
+ setTimeout(compute$8);
3060
3113
  measure(compute$6)();
3061
3114
  });
3062
3115
  }
@@ -3067,7 +3120,7 @@ function process$1() {
3067
3120
  switch (_b.label) {
3068
3121
  case 0:
3069
3122
  timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
3070
- start$x(timer);
3123
+ start$y(timer);
3071
3124
  _b.label = 1;
3072
3125
  case 1:
3073
3126
  if (!(mutations.length > 0)) return [3 /*break*/, 8];
@@ -3123,7 +3176,7 @@ function process$1() {
3123
3176
  _b.sent();
3124
3177
  return [3 /*break*/, 1];
3125
3178
  case 8:
3126
- stop$v(timer);
3179
+ stop$w(timer);
3127
3180
  return [2 /*return*/];
3128
3181
  }
3129
3182
  });
@@ -3558,7 +3611,7 @@ function queue(tokens, transmit) {
3558
3611
  // We enrich the data going out with the existing upload. In these cases, call to upload comes with 'transmit' set to false.
3559
3612
  if (transmit && timeout === null) {
3560
3613
  if (type !== 25 /* Event.Ping */) {
3561
- reset$p();
3614
+ reset$q();
3562
3615
  }
3563
3616
  timeout = setTimeout(upload, gap);
3564
3617
  queuedTime = now;
@@ -3594,7 +3647,8 @@ function upload(final) {
3594
3647
  // Otherwise you run a risk of infinite loop.
3595
3648
  compute$6();
3596
3649
  compute$5();
3597
- compute$8();
3650
+ compute$9();
3651
+ compute$7();
3598
3652
  last = final === true;
3599
3653
  e = JSON.stringify(envelope(last));
3600
3654
  a = "[".concat(analysis.join(), "]");
@@ -4077,7 +4131,7 @@ function encode$1 (event) {
4077
4131
  tokens.push(b.data.activityTime);
4078
4132
  queue(tokens, false);
4079
4133
  }
4080
- reset$r();
4134
+ reset$s();
4081
4135
  break;
4082
4136
  case 25 /* Event.Ping */:
4083
4137
  tokens.push(data$h.gap);
@@ -4111,7 +4165,7 @@ function encode$1 (event) {
4111
4165
  tokens.push(v);
4112
4166
  tokens.push(data$e[v]);
4113
4167
  }
4114
- reset$n();
4168
+ reset$o();
4115
4169
  queue(tokens, false);
4116
4170
  }
4117
4171
  break;
@@ -4126,7 +4180,7 @@ function encode$1 (event) {
4126
4180
  // However, for data over the wire, we round it off to milliseconds precision.
4127
4181
  tokens.push(Math.round(updates$3[m]));
4128
4182
  }
4129
- reset$q();
4183
+ reset$r();
4130
4184
  queue(tokens, false);
4131
4185
  }
4132
4186
  break;
@@ -4152,7 +4206,7 @@ function encode$1 (event) {
4152
4206
  tokens.push(key);
4153
4207
  tokens.push([].concat.apply([], data$g[e]));
4154
4208
  }
4155
- reset$o();
4209
+ reset$p();
4156
4210
  queue(tokens, false);
4157
4211
  }
4158
4212
  break;
@@ -4339,8 +4393,9 @@ function id() {
4339
4393
  function consent(status) {
4340
4394
  if (status === void 0) { status = true; }
4341
4395
  if (!status) {
4342
- setCookie("_clsk" /* Constant.SessionKey */, "" /* Constant.Empty */, 0);
4343
- setCookie("_clck" /* Constant.CookieKey */, "" /* Constant.Empty */, 0);
4396
+ config$1.track = false;
4397
+ setCookie("_clsk" /* Constant.SessionKey */, "" /* Constant.Empty */, -Number.MAX_VALUE);
4398
+ setCookie("_clck" /* Constant.CookieKey */, "" /* Constant.Empty */, -Number.MAX_VALUE);
4344
4399
  stop();
4345
4400
  window.setTimeout(start, 250 /* Setting.RestartDelay */);
4346
4401
  return;
@@ -4511,7 +4566,9 @@ function encodeCookieValue(value) {
4511
4566
  return encodeURIComponent(value);
4512
4567
  }
4513
4568
  function setCookie(key, value, time) {
4514
- if (config$1.track && ((navigator && navigator.cookieEnabled) || supported(document, "cookie" /* Constant.Cookie */))) {
4569
+ // only write cookies if we are currently in a cookie writing mode (and they are supported)
4570
+ // OR if we are trying to write an empty cookie (i.e. clear the cookie value out)
4571
+ if ((config$1.track || value == "" /* Constant.Empty */) && ((navigator && navigator.cookieEnabled) || supported(document, "cookie" /* Constant.Cookie */))) {
4515
4572
  // Some browsers automatically url encode cookie values if they are not url encoded.
4516
4573
  // We therefore encode and decode cookie values ourselves.
4517
4574
  var encodedValue = encodeCookieValue(value);
@@ -4721,8 +4778,8 @@ function stop$6() {
4721
4778
  var status = false;
4722
4779
  function start$6() {
4723
4780
  status = true;
4724
- start$H();
4725
- reset$k();
4781
+ start$I();
4782
+ reset$l();
4726
4783
  reset$1();
4727
4784
  reset$2();
4728
4785
  start$7();
@@ -4731,8 +4788,8 @@ function stop$5() {
4731
4788
  stop$6();
4732
4789
  reset$2();
4733
4790
  reset$1();
4734
- reset$k();
4735
- stop$E();
4791
+ reset$l();
4792
+ stop$F();
4736
4793
  status = false;
4737
4794
  }
4738
4795
  function active() {
@@ -4786,7 +4843,7 @@ function restart() {
4786
4843
  }
4787
4844
 
4788
4845
  function start$5() {
4789
- start$z();
4846
+ start$A();
4790
4847
  start$e();
4791
4848
  start$d();
4792
4849
  }
@@ -4802,7 +4859,7 @@ var diagnostic = /*#__PURE__*/Object.freeze({
4802
4859
 
4803
4860
  function start$4() {
4804
4861
  schedule$1(discover, 1 /* Priority.High */).then(function () {
4805
- measure(compute$7)();
4862
+ measure(compute$8)();
4806
4863
  measure(compute$6)();
4807
4864
  });
4808
4865
  }
@@ -4814,14 +4871,15 @@ function discover() {
4814
4871
  case 0:
4815
4872
  ts = time();
4816
4873
  timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
4817
- start$x(timer);
4874
+ start$y(timer);
4818
4875
  return [4 /*yield*/, traverse(document, timer, 0 /* Source.Discover */)];
4819
4876
  case 1:
4820
4877
  _a.sent();
4878
+ checkDocumentStyles(document);
4821
4879
  return [4 /*yield*/, encode$4(5 /* Event.Discover */, timer, ts)];
4822
4880
  case 2:
4823
4881
  _a.sent();
4824
- stop$v(timer);
4882
+ stop$w(timer);
4825
4883
  return [2 /*return*/];
4826
4884
  }
4827
4885
  });
@@ -4831,17 +4889,19 @@ function discover() {
4831
4889
  function start$3() {
4832
4890
  // The order below is important
4833
4891
  // and is determined by interdependencies of modules
4834
- start$w();
4892
+ start$x();
4835
4893
  start$u();
4836
- start$y();
4894
+ start$z();
4837
4895
  start$h();
4838
4896
  start$4();
4897
+ start$w();
4839
4898
  start$v();
4840
4899
  }
4841
4900
  function stop$3() {
4842
4901
  stop$s();
4843
- stop$w();
4902
+ stop$x();
4844
4903
  stop$f();
4904
+ stop$v();
4845
4905
  stop$u();
4846
4906
  stop$t();
4847
4907
  }
@@ -5037,7 +5097,7 @@ function start(config$1) {
5037
5097
  if (check()) {
5038
5098
  config(config$1);
5039
5099
  start$6();
5040
- start$A();
5100
+ start$B();
5041
5101
  modules.forEach(function (x) { return measure(x.start)(); });
5042
5102
  // If it's an internal call to start, without explicit configuration,
5043
5103
  // re-process any newly accumulated items in the queue
@@ -5068,7 +5128,7 @@ function stop() {
5068
5128
  if (active()) {
5069
5129
  // Stop modules in the reverse order of their initialization and start queuing up items again
5070
5130
  modules.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
5071
- stop$x();
5131
+ stop$y();
5072
5132
  stop$5();
5073
5133
  setup();
5074
5134
  }