@appsurify-testmap/rrweb-all 2.1.3-alpha.3 → 2.1.3-alpha.4

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.
@@ -14516,7 +14516,7 @@ class VisibilityManager {
14516
14516
  }
14517
14517
  }
14518
14518
  }
14519
- const version$1 = "2.1.3-alpha.3";
14519
+ const version$1 = "2.1.3-alpha.4";
14520
14520
  let wrappedEmit;
14521
14521
  let takeFullSnapshot$1;
14522
14522
  let canvasManager;
@@ -14678,13 +14678,27 @@ function record(options = {}) {
14678
14678
  }
14679
14679
  return e2;
14680
14680
  };
14681
+ let lastMetaHref = null;
14682
+ let navSnapshotInProgress = false;
14681
14683
  wrappedEmit = (r2, isCheckout) => {
14682
- var _a2;
14684
+ var _a2, _b2;
14683
14685
  const e2 = r2;
14684
14686
  e2.timestamp = nowTimestamp();
14687
+ let navTriggeredFS = false;
14685
14688
  if (((_a2 = mutationBuffers[0]) == null ? void 0 : _a2.isFrozen()) && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {
14686
14689
  mutationBuffers.forEach((buf) => buf.unfreeze());
14687
14690
  }
14691
+ if (!navSnapshotInProgress && e2.type !== EventType.Meta && e2.type !== EventType.FullSnapshot && lastMetaHref && window.location.href !== lastMetaHref) {
14692
+ navSnapshotInProgress = true;
14693
+ try {
14694
+ recentVisibilityChanges = 0;
14695
+ incrementalSnapshotCount = 0;
14696
+ navTriggeredFS = true;
14697
+ takeFullSnapshot$1(true);
14698
+ } finally {
14699
+ navSnapshotInProgress = false;
14700
+ }
14701
+ }
14688
14702
  if (inEmittingFrame) {
14689
14703
  emit == null ? void 0 : emit(eventProcessor(e2), isCheckout);
14690
14704
  } else if (passEmitsToParent) {
@@ -14696,6 +14710,9 @@ function record(options = {}) {
14696
14710
  };
14697
14711
  window.parent.postMessage(message, "*");
14698
14712
  }
14713
+ if (e2.type === EventType.Meta) {
14714
+ lastMetaHref = ((_b2 = e2.data) == null ? void 0 : _b2.href) || window.location.href;
14715
+ }
14699
14716
  if (e2.type === EventType.FullSnapshot) {
14700
14717
  lastFullSnapshotEvent = e2;
14701
14718
  incrementalSnapshotCount = 0;
@@ -14704,14 +14721,16 @@ function record(options = {}) {
14704
14721
  return;
14705
14722
  }
14706
14723
  incrementalSnapshotCount++;
14707
- const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
14708
- const exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
14709
- const exceedVisibility = checkoutEveryNvm && recentVisibilityChanges >= checkoutEveryNvm;
14710
- if (exceedCount || exceedTime || exceedVisibility) {
14711
- if (exceedVisibility) {
14712
- recentVisibilityChanges = 0;
14724
+ if (!navTriggeredFS) {
14725
+ const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
14726
+ const exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
14727
+ const exceedVisibility = checkoutEveryNvm && recentVisibilityChanges >= checkoutEveryNvm;
14728
+ if (exceedCount || exceedTime || exceedVisibility) {
14729
+ if (exceedVisibility) {
14730
+ recentVisibilityChanges = 0;
14731
+ }
14732
+ takeFullSnapshot$1(true);
14713
14733
  }
14714
- takeFullSnapshot$1(true);
14715
14734
  }
14716
14735
  }
14717
14736
  };
@@ -18007,7 +18026,7 @@ class Replayer {
18007
18026
  this.config.logger.log(REPLAY_CONSOLE_PREFIX, ...args);
18008
18027
  }
18009
18028
  }
18010
- const version = "2.1.3-alpha.3";
18029
+ const version = "2.1.3-alpha.4";
18011
18030
  const { getVersion } = record;
18012
18031
  const { isRecording } = record;
18013
18032
  const { flushCustomEventQueue } = record;