@appsurify-testmap/rrweb 2.0.0-alpha.35 → 2.0.0-alpha.41

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/dist/rrweb.cjs CHANGED
@@ -527,7 +527,7 @@ function getXPath(node2) {
527
527
  return "/html/body";
528
528
  }
529
529
  const parentNode2 = element.parentNode;
530
- if (!parentNode2 || !(parentNode2 instanceof Element)) {
530
+ if (!parentNode2) {
531
531
  return "";
532
532
  }
533
533
  const siblings = Array.from(parentNode2.children).filter(
@@ -589,14 +589,19 @@ function isTextVisible(n2) {
589
589
  return textContent2 !== "";
590
590
  }
591
591
  function isElementVisible(n2) {
592
- return isStyleVisible(n2) && isRectVisible(n2.getBoundingClientRect());
593
- }
594
- function isStyleVisible(n2) {
595
- const style = window.getComputedStyle(n2);
596
- return style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
592
+ var _a2;
593
+ const win = ((_a2 = n2.ownerDocument) == null ? void 0 : _a2.defaultView) ?? null;
594
+ const style = win ? win.getComputedStyle(n2) : null;
595
+ const isStyleVisible = style != null && style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
596
+ const rect = n2.getBoundingClientRect();
597
+ const result2 = isStyleVisible && isRectVisible(rect, win);
598
+ return result2;
597
599
  }
598
- function isRectVisible(rect) {
599
- return rect.width > 0 && rect.height > 0 && rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
600
+ function isRectVisible(rect, win) {
601
+ var _a2, _b, _c, _d;
602
+ const height = (win == null ? void 0 : win.innerHeight) ?? ((_b = (_a2 = win == null ? void 0 : win.document) == null ? void 0 : _a2.documentElement) == null ? void 0 : _b.clientHeight) ?? 0;
603
+ const width = (win == null ? void 0 : win.innerWidth) ?? ((_d = (_c = win == null ? void 0 : win.document) == null ? void 0 : _c.documentElement) == null ? void 0 : _d.clientWidth) ?? 0;
604
+ return rect.width > 0 && rect.height > 0 && rect.top >= 0 && rect.left >= 0 && rect.bottom <= height && rect.right <= width;
600
605
  }
601
606
  const interactiveEvents$1 = [
602
607
  "change",
@@ -636,7 +641,7 @@ const interactiveTags = [
636
641
  "video",
637
642
  "audio"
638
643
  ];
639
- const inlineEventAttributes$1 = [
644
+ const inlineEventAttributes = [
640
645
  "onclick",
641
646
  "ondblclick",
642
647
  "onmousedown",
@@ -661,25 +666,31 @@ const inlineEventAttributes$1 = [
661
666
  "ontouchcancel"
662
667
  ];
663
668
  const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
664
- const originalAddEventListener$1 = EventTarget.prototype.addEventListener;
665
- EventTarget.prototype.addEventListener = function(type, listener, options) {
666
- originalAddEventListener$1.call(this, type, listener, options);
667
- if (this instanceof Element) {
668
- const eventType = type.toLowerCase();
669
- if (interactiveEvents$1.includes(eventType)) {
670
- interactiveElementsRegistry$1.add(this);
669
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
670
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
671
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
672
+ originalAddEventListener.call(this, type, listener, options);
673
+ if (this instanceof Element) {
674
+ const eventType = type.toLowerCase();
675
+ if (interactiveEvents$1.includes(eventType)) {
676
+ interactiveElementsRegistry$1.add(this);
677
+ }
671
678
  }
672
- }
673
- };
674
- const originalRemoveEventListener$1 = EventTarget.prototype.removeEventListener;
675
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
676
- originalRemoveEventListener$1.call(this, type, listener, options);
677
- };
679
+ };
680
+ }
681
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
682
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
683
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
684
+ originalRemoveEventListener.call(this, type, listener, options);
685
+ if (this instanceof Element) {
686
+ type.toLowerCase();
687
+ }
688
+ };
689
+ }
678
690
  function hasEventListeners(n2) {
679
691
  return n2 instanceof Element && interactiveElementsRegistry$1.has(n2);
680
692
  }
681
693
  function isElementInteractive(n2) {
682
- var _a2;
683
694
  if (n2.nodeType === Node.ELEMENT_NODE) {
684
695
  const element = n2;
685
696
  const tagName = element.tagName.toLowerCase();
@@ -693,30 +704,35 @@ function isElementInteractive(n2) {
693
704
  const result2 = hasEventListeners(element) || hasTabIndex || hasRoleInteractive || element instanceof HTMLAnchorElement && element.hasAttribute("href") || element instanceof HTMLButtonElement && !element.disabled;
694
705
  return result2;
695
706
  }
696
- if (n2.nodeType === Node.TEXT_NODE) {
697
- const textNode = n2;
698
- const parentElement2 = textNode.parentElement;
699
- if (parentElement2 !== null && interactiveTags.includes(parentElement2.tagName.toLowerCase())) {
700
- return true;
701
- }
702
- return parentElement2 !== null && isElementVisible(parentElement2) && ((_a2 = textNode.textContent) == null ? void 0 : _a2.trim().length) !== 0 && isElementInteractive(parentElement2);
703
- }
704
707
  return false;
705
708
  }
706
- function inspectInlineEventHandlers$1() {
707
- const allElements = document.querySelectorAll("*");
709
+ function inspectInlineEventHandlers(doc) {
710
+ if (!doc || typeof doc.querySelectorAll !== "function") return;
711
+ const allElements = doc.querySelectorAll("*");
708
712
  allElements.forEach((el) => {
709
- inlineEventAttributes$1.forEach((attr) => {
713
+ inlineEventAttributes.forEach((attr) => {
710
714
  if (el.hasAttribute(attr)) {
711
715
  interactiveElementsRegistry$1.add(el);
712
716
  }
713
717
  });
714
718
  });
715
719
  }
716
- if (document.readyState === "complete" || document.readyState === "interactive") {
717
- inspectInlineEventHandlers$1();
718
- } else {
719
- document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers$1);
720
+ function scheduleInlineEventInspection(doc) {
721
+ if (!doc || typeof doc.addEventListener !== "function" || typeof doc.querySelectorAll !== "function") {
722
+ return;
723
+ }
724
+ try {
725
+ if (doc.readyState === "complete" || doc.readyState === "interactive") {
726
+ inspectInlineEventHandlers(doc);
727
+ } else {
728
+ doc.addEventListener("DOMContentLoaded", () => inspectInlineEventHandlers(doc), {
729
+ once: true,
730
+ capture: false
731
+ });
732
+ }
733
+ } catch (e2) {
734
+ console.warn("[inlineEventInspection] Failed to inspect document:", e2);
735
+ }
720
736
  }
721
737
  let _id = 1;
722
738
  const tagNameRegex = new RegExp("[^a-z0-9-_:]");
@@ -835,9 +851,29 @@ function transformAttribute(doc, tagName, name, value) {
835
851
  }
836
852
  return value;
837
853
  }
838
- function ignoreAttribute(tagName, name, _value) {
854
+ function isIgnoreAttribute(tagName, name, _value) {
839
855
  return (tagName === "video" || tagName === "audio") && name === "autoplay";
840
856
  }
857
+ function cleanAttributes(doc, element, ignoreAttribute) {
858
+ const tagName = getValidTagName$1(element);
859
+ const attributes = {};
860
+ const len = element.attributes.length;
861
+ for (let i2 = 0; i2 < len; i2++) {
862
+ const attr = element.attributes[i2];
863
+ const name = attr.name;
864
+ const value = attr.value;
865
+ const shouldIgnoreByName = typeof ignoreAttribute === "string" ? name === ignoreAttribute : ignoreAttribute.test(name);
866
+ if (!shouldIgnoreByName && !isIgnoreAttribute(tagName, name)) {
867
+ attributes[name] = transformAttribute(
868
+ doc,
869
+ tagName,
870
+ toLowerCase(name),
871
+ value
872
+ );
873
+ }
874
+ }
875
+ return attributes;
876
+ }
841
877
  function _isBlockedElement(element, blockClass, blockSelector) {
842
878
  try {
843
879
  if (typeof blockClass === "string") {
@@ -967,6 +1003,7 @@ function serializeNode(n2, options) {
967
1003
  mirror: mirror2,
968
1004
  blockClass,
969
1005
  blockSelector,
1006
+ ignoreAttribute,
970
1007
  needsMask,
971
1008
  inlineStylesheet,
972
1009
  maskInputOptions = {},
@@ -1011,6 +1048,7 @@ function serializeNode(n2, options) {
1011
1048
  doc,
1012
1049
  blockClass,
1013
1050
  blockSelector,
1051
+ ignoreAttribute,
1014
1052
  inlineStylesheet,
1015
1053
  maskInputOptions,
1016
1054
  maskInputFn,
@@ -1088,6 +1126,7 @@ function serializeElementNode(n2, options) {
1088
1126
  doc,
1089
1127
  blockClass,
1090
1128
  blockSelector,
1129
+ ignoreAttribute,
1091
1130
  inlineStylesheet,
1092
1131
  maskInputOptions = {},
1093
1132
  maskInputFn,
@@ -1101,19 +1140,7 @@ function serializeElementNode(n2, options) {
1101
1140
  } = options;
1102
1141
  const needBlock = _isBlockedElement(n2, blockClass, blockSelector);
1103
1142
  const tagName = getValidTagName$1(n2);
1104
- let attributes = {};
1105
- const len = n2.attributes.length;
1106
- for (let i2 = 0; i2 < len; i2++) {
1107
- const attr = n2.attributes[i2];
1108
- if (!ignoreAttribute(tagName, attr.name, attr.value)) {
1109
- attributes[attr.name] = transformAttribute(
1110
- doc,
1111
- tagName,
1112
- toLowerCase(attr.name),
1113
- attr.value
1114
- );
1115
- }
1116
- }
1143
+ let attributes = cleanAttributes(doc, n2, ignoreAttribute);
1117
1144
  if (tagName === "link" && inlineStylesheet) {
1118
1145
  const stylesheet = Array.from(doc.styleSheets).find((s2) => {
1119
1146
  return s2.href === n2.href;
@@ -1327,6 +1354,7 @@ function serializeNodeWithId(n2, options) {
1327
1354
  blockSelector,
1328
1355
  maskTextClass,
1329
1356
  maskTextSelector,
1357
+ ignoreAttribute,
1330
1358
  skipChild = false,
1331
1359
  inlineStylesheet = true,
1332
1360
  maskInputOptions = {},
@@ -1361,6 +1389,7 @@ function serializeNodeWithId(n2, options) {
1361
1389
  mirror: mirror2,
1362
1390
  blockClass,
1363
1391
  blockSelector,
1392
+ ignoreAttribute,
1364
1393
  needsMask,
1365
1394
  inlineStylesheet,
1366
1395
  maskInputOptions,
@@ -1413,6 +1442,7 @@ function serializeNodeWithId(n2, options) {
1413
1442
  needsMask,
1414
1443
  maskTextClass,
1415
1444
  maskTextSelector,
1445
+ ignoreAttribute,
1416
1446
  skipChild,
1417
1447
  inlineStylesheet,
1418
1448
  maskInputOptions,
@@ -1472,6 +1502,7 @@ function serializeNodeWithId(n2, options) {
1472
1502
  needsMask,
1473
1503
  maskTextClass,
1474
1504
  maskTextSelector,
1505
+ ignoreAttribute,
1475
1506
  skipChild: false,
1476
1507
  inlineStylesheet,
1477
1508
  maskInputOptions,
@@ -1513,6 +1544,7 @@ function serializeNodeWithId(n2, options) {
1513
1544
  needsMask,
1514
1545
  maskTextClass,
1515
1546
  maskTextSelector,
1547
+ ignoreAttribute,
1516
1548
  skipChild: false,
1517
1549
  inlineStylesheet,
1518
1550
  maskInputOptions,
@@ -1550,6 +1582,7 @@ function snapshot(n2, options) {
1550
1582
  blockSelector = null,
1551
1583
  maskTextClass = "rr-mask",
1552
1584
  maskTextSelector = null,
1585
+ ignoreAttribute = "rr-ignore-attr",
1553
1586
  inlineStylesheet = true,
1554
1587
  inlineImages = false,
1555
1588
  recordCanvas = false,
@@ -1566,6 +1599,7 @@ function snapshot(n2, options) {
1566
1599
  stylesheetLoadTimeout,
1567
1600
  keepIframeSrcFn = () => false
1568
1601
  } = options || {};
1602
+ scheduleInlineEventInspection(n2);
1569
1603
  const maskInputOptions = maskAllInputs === true ? {
1570
1604
  color: true,
1571
1605
  date: true,
@@ -1609,6 +1643,7 @@ function snapshot(n2, options) {
1609
1643
  blockSelector,
1610
1644
  maskTextClass,
1611
1645
  maskTextSelector,
1646
+ ignoreAttribute,
1612
1647
  skipChild: false,
1613
1648
  inlineStylesheet,
1614
1649
  maskInputOptions,
@@ -5684,59 +5719,27 @@ const interactiveEvents = [
5684
5719
  "touchend",
5685
5720
  "touchcancel"
5686
5721
  ];
5687
- const inlineEventAttributes = [
5688
- "onclick",
5689
- "ondblclick",
5690
- "onmousedown",
5691
- "onmouseup",
5692
- "onmouseover",
5693
- "onmouseout",
5694
- "onmousemove",
5695
- "onfocus",
5696
- "onblur",
5697
- "onkeydown",
5698
- "onkeypress",
5699
- "onkeyup",
5700
- "onchange",
5701
- "oninput",
5702
- "onsubmit",
5703
- "onreset",
5704
- "onselect",
5705
- "oncontextmenu",
5706
- "ontouchstart",
5707
- "ontouchmove",
5708
- "ontouchend",
5709
- "ontouchcancel"
5710
- ];
5711
5722
  const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
5712
- const originalAddEventListener = EventTarget.prototype.addEventListener;
5713
- EventTarget.prototype.addEventListener = function(type, listener, options) {
5714
- originalAddEventListener.call(this, type, listener, options);
5715
- if (this instanceof Element) {
5716
- const eventType = type.toLowerCase();
5717
- if (interactiveEvents.includes(eventType)) {
5718
- interactiveElementsRegistry.add(this);
5719
- }
5720
- }
5721
- };
5722
- const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5723
- EventTarget.prototype.removeEventListener = function(type, listener, options) {
5724
- originalRemoveEventListener.call(this, type, listener, options);
5725
- };
5726
- function inspectInlineEventHandlers() {
5727
- const allElements = document.querySelectorAll("*");
5728
- allElements.forEach((el) => {
5729
- inlineEventAttributes.forEach((attr) => {
5730
- if (el.hasAttribute(attr)) {
5731
- interactiveElementsRegistry.add(el);
5723
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5724
+ const originalAddEventListener = EventTarget.prototype.addEventListener;
5725
+ EventTarget.prototype.addEventListener = function(type, listener, options) {
5726
+ originalAddEventListener.call(this, type, listener, options);
5727
+ if (this instanceof Element) {
5728
+ const eventType = type.toLowerCase();
5729
+ if (interactiveEvents.includes(eventType)) {
5730
+ interactiveElementsRegistry.add(this);
5732
5731
  }
5733
- });
5734
- });
5732
+ }
5733
+ };
5735
5734
  }
5736
- if (document.readyState === "complete" || document.readyState === "interactive") {
5737
- inspectInlineEventHandlers();
5738
- } else {
5739
- document.addEventListener("DOMContentLoaded", inspectInlineEventHandlers);
5735
+ if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
5736
+ const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
5737
+ EventTarget.prototype.removeEventListener = function(type, listener, options) {
5738
+ originalRemoveEventListener.call(this, type, listener, options);
5739
+ if (this instanceof Element) {
5740
+ type.toLowerCase();
5741
+ }
5742
+ };
5740
5743
  }
5741
5744
  function getDefaultExportFromCjs(x2) {
5742
5745
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -10813,7 +10816,7 @@ let nowTimestamp = Date.now;
10813
10816
  if (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {
10814
10817
  nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();
10815
10818
  }
10816
- function getWindowScroll(win) {
10819
+ function getWindowScroll(win = window) {
10817
10820
  var _a2, _b, _c, _d;
10818
10821
  const doc = win.document;
10819
10822
  return {
@@ -10821,11 +10824,13 @@ function getWindowScroll(win) {
10821
10824
  top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : (doc == null ? void 0 : doc.documentElement.scrollTop) || (doc == null ? void 0 : doc.body) && ((_c = index.parentElement(doc.body)) == null ? void 0 : _c.scrollTop) || ((_d = doc == null ? void 0 : doc.body) == null ? void 0 : _d.scrollTop) || 0
10822
10825
  };
10823
10826
  }
10824
- function getWindowHeight() {
10825
- return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;
10827
+ function getWindowHeight(win = window) {
10828
+ const doc = win.document;
10829
+ return win.innerHeight || doc.documentElement && doc.documentElement.clientHeight || doc.body && doc.body.clientHeight || 0;
10826
10830
  }
10827
- function getWindowWidth() {
10828
- return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;
10831
+ function getWindowWidth(win = window) {
10832
+ const doc = win.document;
10833
+ return win.innerWidth || doc.documentElement && doc.documentElement.clientWidth || doc.body && doc.body.clientWidth || 0;
10829
10834
  }
10830
10835
  function closestElementOfNode(node2) {
10831
10836
  if (!node2) {
@@ -11311,6 +11316,7 @@ class MutationBuffer {
11311
11316
  __publicField(this, "blockSelector");
11312
11317
  __publicField(this, "maskTextClass");
11313
11318
  __publicField(this, "maskTextSelector");
11319
+ __publicField(this, "ignoreAttribute");
11314
11320
  __publicField(this, "inlineStylesheet");
11315
11321
  __publicField(this, "maskInputOptions");
11316
11322
  __publicField(this, "maskTextFn");
@@ -11374,6 +11380,7 @@ class MutationBuffer {
11374
11380
  blockSelector: this.blockSelector,
11375
11381
  maskTextClass: this.maskTextClass,
11376
11382
  maskTextSelector: this.maskTextSelector,
11383
+ ignoreAttribute: this.ignoreAttribute || "",
11377
11384
  skipChild: true,
11378
11385
  newlyAddedElement: true,
11379
11386
  inlineStylesheet: this.inlineStylesheet,
@@ -11602,7 +11609,7 @@ class MutationBuffer {
11602
11609
  if (attributeName === "type" && target.tagName === "INPUT" && (m.oldValue || "").toLowerCase() === "password") {
11603
11610
  target.setAttribute("data-rr-is-password", "true");
11604
11611
  }
11605
- if (!ignoreAttribute(target.tagName, attributeName)) {
11612
+ if (!isIgnoreAttribute(target.tagName, attributeName)) {
11606
11613
  item.attributes[attributeName] = transformAttribute(
11607
11614
  this.doc,
11608
11615
  toLowerCase(target.tagName),
@@ -11724,6 +11731,7 @@ class MutationBuffer {
11724
11731
  "blockSelector",
11725
11732
  "maskTextClass",
11726
11733
  "maskTextSelector",
11734
+ "ignoreAttribute",
11727
11735
  "inlineStylesheet",
11728
11736
  "maskInputOptions",
11729
11737
  "maskTextFn",
@@ -13973,6 +13981,7 @@ function record(options = {}) {
13973
13981
  blockSelector = null,
13974
13982
  ignoreClass = "rr-ignore",
13975
13983
  ignoreSelector = null,
13984
+ ignoreAttribute = "rr-ignore-attribute",
13976
13985
  maskTextClass = "rr-mask",
13977
13986
  maskTextSelector = null,
13978
13987
  inlineStylesheet = true,
@@ -14168,7 +14177,7 @@ function record(options = {}) {
14168
14177
  canvasManager = new CanvasManager({
14169
14178
  recordCanvas,
14170
14179
  mutationCb: wrappedCanvasMutationEmit,
14171
- win: window,
14180
+ win,
14172
14181
  blockClass,
14173
14182
  blockSelector,
14174
14183
  mirror,
@@ -14183,6 +14192,7 @@ function record(options = {}) {
14183
14192
  blockSelector,
14184
14193
  maskTextClass,
14185
14194
  maskTextSelector,
14195
+ ignoreAttribute,
14186
14196
  inlineStylesheet,
14187
14197
  maskInputOptions,
14188
14198
  dataURLOptions,
@@ -14209,8 +14219,8 @@ function record(options = {}) {
14209
14219
  type: EventType.Meta,
14210
14220
  data: {
14211
14221
  href: win.location.href,
14212
- width: getWindowWidth(),
14213
- height: getWindowHeight()
14222
+ width: getWindowWidth(win),
14223
+ height: getWindowHeight(win)
14214
14224
  }
14215
14225
  },
14216
14226
  isCheckout
@@ -14218,7 +14228,7 @@ function record(options = {}) {
14218
14228
  stylesheetManager.reset();
14219
14229
  shadowDomManager.init();
14220
14230
  mutationBuffers.forEach((buf) => buf.lock());
14221
- const node2 = snapshot(document, {
14231
+ const node2 = snapshot(doc, {
14222
14232
  mirror,
14223
14233
  blockClass,
14224
14234
  blockSelector,
@@ -14240,7 +14250,7 @@ function record(options = {}) {
14240
14250
  stylesheetManager.trackLinkElement(n2);
14241
14251
  }
14242
14252
  if (hasShadowRoot(n2)) {
14243
- shadowDomManager.addShadowRoot(index.shadowRoot(n2), document);
14253
+ shadowDomManager.addShadowRoot(index.shadowRoot(n2), doc);
14244
14254
  }
14245
14255
  },
14246
14256
  onIframeLoad: (iframe, childSn) => {
@@ -14260,7 +14270,7 @@ function record(options = {}) {
14260
14270
  type: EventType.FullSnapshot,
14261
14271
  data: {
14262
14272
  node: node2,
14263
- initialOffset: getWindowScroll(window)
14273
+ initialOffset: getWindowScroll(win)
14264
14274
  }
14265
14275
  },
14266
14276
  isCheckout
@@ -14369,6 +14379,7 @@ function record(options = {}) {
14369
14379
  ignoreSelector,
14370
14380
  maskTextClass,
14371
14381
  maskTextSelector,
14382
+ ignoreAttribute,
14372
14383
  maskInputOptions,
14373
14384
  inlineStylesheet,
14374
14385
  sampling,
@@ -14415,7 +14426,7 @@ function record(options = {}) {
14415
14426
  });
14416
14427
  const init = () => {
14417
14428
  takeFullSnapshot$1();
14418
- handlers.push(observe(document));
14429
+ handlers.push(observe(doc));
14419
14430
  recording = true;
14420
14431
  };
14421
14432
  if (doc.readyState === "interactive" || doc.readyState === "complete") {
@@ -14440,7 +14451,7 @@ function record(options = {}) {
14440
14451
  });
14441
14452
  if (recordAfter === "load") init();
14442
14453
  },
14443
- window
14454
+ win
14444
14455
  )
14445
14456
  );
14446
14457
  }