@appsurify-testmap/rrweb-replay 3.10.0-alpha.1 → 3.12.0-alpha.1

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.
@@ -263,6 +263,29 @@ try {
263
263
  }
264
264
  } catch (error) {
265
265
  }
266
+ const ht$2 = {
267
+ id: "i",
268
+ "data-testid": "tid",
269
+ "data-qa": "qa",
270
+ "data-cy": "cy",
271
+ "data-test": "dt",
272
+ "aria-label": "al",
273
+ "aria-labelledby": "alb",
274
+ "aria-describedby": "adb",
275
+ name: "n",
276
+ href: "h",
277
+ src: "s",
278
+ type: "t",
279
+ role: "r",
280
+ alt: "at",
281
+ title: "tt",
282
+ for: "f",
283
+ placeholder: "ph",
284
+ text: "x"
285
+ };
286
+ Object.fromEntries(
287
+ Object.entries(ht$2).map(([r2, t2]) => [t2, r2])
288
+ );
266
289
  const MEDIA_SELECTOR = /(max|min)-device-(width|height)/;
267
290
  const MEDIA_SELECTOR_GLOBAL = new RegExp(MEDIA_SELECTOR.source, "g");
268
291
  const mediaSelectorPlugin = {
@@ -4706,6 +4729,29 @@ try {
4706
4729
  }
4707
4730
  } catch (error) {
4708
4731
  }
4732
+ const ht$1 = {
4733
+ id: "i",
4734
+ "data-testid": "tid",
4735
+ "data-qa": "qa",
4736
+ "data-cy": "cy",
4737
+ "data-test": "dt",
4738
+ "aria-label": "al",
4739
+ "aria-labelledby": "alb",
4740
+ "aria-describedby": "adb",
4741
+ name: "n",
4742
+ href: "h",
4743
+ src: "s",
4744
+ type: "t",
4745
+ role: "r",
4746
+ alt: "at",
4747
+ title: "tt",
4748
+ for: "f",
4749
+ placeholder: "ph",
4750
+ text: "x"
4751
+ };
4752
+ Object.fromEntries(
4753
+ Object.entries(ht$1).map(([r2, t2]) => [t2, r2])
4754
+ );
4709
4755
  function getDefaultExportFromCjs(x2) {
4710
4756
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
4711
4757
  }
@@ -9995,6 +10041,18 @@ function describeNode(el) {
9995
10041
  const classes = el.classList.length ? "." + Array.from(el.classList).join(".") : "";
9996
10042
  return `${tag}${id}${classes}`;
9997
10043
  }
10044
+ function isAncestorOpacityVisible$1(el, win) {
10045
+ var _a2;
10046
+ let node2 = el.parentElement;
10047
+ while (node2) {
10048
+ const s2 = (_a2 = win.getComputedStyle) == null ? void 0 : _a2.call(win, node2);
10049
+ if (s2 && (parseFloat(s2.opacity) || 0) <= 0) {
10050
+ return false;
10051
+ }
10052
+ node2 = node2.parentElement;
10053
+ }
10054
+ return true;
10055
+ }
9998
10056
  function getElementVisibility(el) {
9999
10057
  var _a3;
10000
10058
  var _a2, _b;
@@ -10002,10 +10060,12 @@ function getElementVisibility(el) {
10002
10060
  const rect = el.getBoundingClientRect();
10003
10061
  const viewportWidth = win.innerWidth || win.document.documentElement.clientWidth || 0;
10004
10062
  const viewportHeight = win.innerHeight || win.document.documentElement.clientHeight || 0;
10005
- const isRectVisible = rect.width > 0 && rect.height > 0 && rect.bottom > 0 && rect.right > 0 && rect.top < viewportHeight && rect.left < viewportWidth;
10063
+ const elHasSize = rect.width > 0 && rect.height > 0;
10064
+ const isViewportVisible = elHasSize && rect.bottom > 0 && rect.right > 0 && rect.top < viewportHeight && rect.left < viewportWidth;
10006
10065
  const style = (_b = win.getComputedStyle) == null ? void 0 : _b.call(win, el);
10007
- const isStyleVisible2 = !!style && style.display !== "none" && style.visibility !== "hidden" && (parseFloat(style.opacity) || 0) > 0;
10008
- const isVisible = isStyleVisible2 && isRectVisible;
10066
+ const isOwnStyleVisible2 = !!style && style.display !== "none" && style.visibility !== "hidden" && (parseFloat(style.opacity) || 0) > 0;
10067
+ const isCSSVisible = isOwnStyleVisible2 && isAncestorOpacityVisible$1(el, win);
10068
+ const isVisible = isCSSVisible && isViewportVisible;
10009
10069
  let ratio = 0;
10010
10070
  if (isVisible) {
10011
10071
  const xOverlap = Math.max(
@@ -10022,6 +10082,9 @@ function getElementVisibility(el) {
10022
10082
  }
10023
10083
  return {
10024
10084
  isVisible,
10085
+ isCSSVisible,
10086
+ isViewportVisible,
10087
+ hasSize: elHasSize,
10025
10088
  ratio
10026
10089
  };
10027
10090
  }
@@ -10314,6 +10377,29 @@ var NodeType = /* @__PURE__ */ ((NodeType2) => {
10314
10377
  NodeType2[NodeType2["Comment"] = 5] = "Comment";
10315
10378
  return NodeType2;
10316
10379
  })(NodeType || {});
10380
+ const ht = {
10381
+ id: "i",
10382
+ "data-testid": "tid",
10383
+ "data-qa": "qa",
10384
+ "data-cy": "cy",
10385
+ "data-test": "dt",
10386
+ "aria-label": "al",
10387
+ "aria-labelledby": "alb",
10388
+ "aria-describedby": "adb",
10389
+ name: "n",
10390
+ href: "h",
10391
+ src: "s",
10392
+ type: "t",
10393
+ role: "r",
10394
+ alt: "at",
10395
+ title: "tt",
10396
+ for: "f",
10397
+ placeholder: "ph",
10398
+ text: "x"
10399
+ };
10400
+ Object.fromEntries(
10401
+ Object.entries(ht).map(([r2, t2]) => [t2, r2])
10402
+ );
10317
10403
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
10318
10404
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
10319
10405
  for (var i$1 = 0; i$1 < chars.length; i$1++) {
@@ -10775,16 +10861,16 @@ function s(n2, o2) {
10775
10861
  var S = b.value;
10776
10862
  if (void 0 === S)
10777
10863
  return c(p, g);
10778
- var w2 = "string" == typeof S ? { target: S } : S, j2 = w2.target, E = w2.actions, R = void 0 === E ? [] : E, N = w2.cond, O2 = void 0 === N ? function() {
10864
+ var w2 = "string" == typeof S ? { target: S } : S, j2 = w2.target, E = w2.actions, R = void 0 === E ? [] : E, N = w2.cond, O = void 0 === N ? function() {
10779
10865
  return true;
10780
10866
  } : N, _2 = void 0 === j2, k2 = null != j2 ? j2 : p, T = n2.states[k2];
10781
- if (O2(g, d)) {
10782
- var q = t(f((_2 ? r(R) : [].concat(x2.exit, R, T.entry).filter(function(t2) {
10867
+ if (O(g, d)) {
10868
+ var q2 = t(f((_2 ? r(R) : [].concat(x2.exit, R, T.entry).filter(function(t2) {
10783
10869
  return t2;
10784
10870
  })).map(function(t2) {
10785
10871
  return i(t2, y._options.actions);
10786
- }), g, d), 3), z2 = q[0], A = q[1], B2 = q[2], C = null != j2 ? j2 : p;
10787
- return { value: C, context: A, actions: z2, changed: j2 !== p || z2.length > 0 || B2, matches: a(C) };
10872
+ }), g, d), 3), z2 = q2[0], A = q2[1], B = q2[2], C = null != j2 ? j2 : p;
10873
+ return { value: C, context: A, actions: z2, changed: j2 !== p || z2.length > 0 || B, matches: a(C) };
10788
10874
  }
10789
10875
  }
10790
10876
  } catch (t2) {