@sailfish-ai/recorder 1.10.2 → 1.10.3

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/recorder.cjs CHANGED
@@ -36,7 +36,7 @@ function v4(e, u, w2) {
36
36
  return (a[e2[u2 + 0]] + a[e2[u2 + 1]] + a[e2[u2 + 2]] + a[e2[u2 + 3]] + "-" + a[e2[u2 + 4]] + a[e2[u2 + 5]] + "-" + a[e2[u2 + 6]] + a[e2[u2 + 7]] + "-" + a[e2[u2 + 8]] + a[e2[u2 + 9]] + "-" + a[e2[u2 + 10]] + a[e2[u2 + 11]] + a[e2[u2 + 12]] + a[e2[u2 + 13]] + a[e2[u2 + 14]] + a[e2[u2 + 15]]).toLowerCase();
37
37
  })(I2);
38
38
  }
39
- const I = "X-Sf3-Rid", M = 0, _ = 1, A = 2, F = 3, $ = 4, j = [".js", ".mjs", ".cjs", ".ts", ".css", ".scss", ".sass", ".less", ".styl", ".stylus", ".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".avif", ".bmp", ".ico", ".tiff", ".tif", ".heic", ".woff", ".woff2", ".ttf", ".otf", ".eot", ".mp4", ".webm", ".ogv", ".mp3", ".wav", ".flac", ".pdf", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".csv", ".json", ".xml", ".txt", ".zip", ".rar", ".gz", ".tar", ".7z", ".map", ".webmanifest"];
39
+ const I = "X-Sf3-Rid", M = 0, _ = 1, A = 2, F = 3, $ = 4, B = [".js", ".mjs", ".cjs", ".ts", ".css", ".scss", ".sass", ".less", ".styl", ".stylus", ".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".avif", ".bmp", ".ico", ".tiff", ".tif", ".heic", ".woff", ".woff2", ".ttf", ".otf", ".eot", ".mp4", ".webm", ".ogv", ".mp3", ".wav", ".flac", ".pdf", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".csv", ".json", ".xml", ".txt", ".zip", ".rar", ".gz", ".tar", ".7z", ".map", ".webmanifest"];
40
40
  var extendStatics = function(e, a) {
41
41
  return extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e2, a2) {
42
42
  e2.__proto__ = a2;
@@ -67,7 +67,7 @@ function __read(e, a) {
67
67
  }
68
68
  return M2;
69
69
  }
70
- var B = function Event2(e, a) {
70
+ var j = function Event2(e, a) {
71
71
  this.target = a, this.type = e;
72
72
  }, U = (function(e) {
73
73
  function ErrorEvent(a, u) {
@@ -75,14 +75,14 @@ var B = function Event2(e, a) {
75
75
  return w2.message = a.message, w2.error = a, w2;
76
76
  }
77
77
  return __extends(ErrorEvent, e), ErrorEvent;
78
- })(B), z = (function(e) {
78
+ })(j), z = (function(e) {
79
79
  function CloseEvent(a, u, w2) {
80
80
  void 0 === a && (a = 1e3), void 0 === u && (u = "");
81
81
  var x2 = e.call(this, "close", w2) || this;
82
82
  return x2.wasClean = true, x2.code = a, x2.reason = u, x2;
83
83
  }
84
84
  return __extends(CloseEvent, e), CloseEvent;
85
- })(B), getGlobalWebSocket = function() {
85
+ })(j), getGlobalWebSocket = function() {
86
86
  if ("undefined" != typeof WebSocket) return WebSocket;
87
87
  }, W = { maxReconnectionDelay: 1e4, minReconnectionDelay: 1e3 + 4e3 * Math.random(), minUptime: 5e3, reconnectionDelayGrowFactor: 1.3, connectionTimeout: 4e3, maxRetries: 1 / 0, maxEnqueuedMessages: 1 / 0 }, G = (function() {
88
88
  function ReconnectingWebSocket(e, a, u) {
@@ -374,7 +374,7 @@ J && window.addEventListener("beforeunload", () => {
374
374
  window.name = ne + window.name;
375
375
  }), exports.nowTimestamp = Date.now, /[1-9][0-9]{12}/.test(Date.now().toString()) || (exports.nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime());
376
376
  const se = readDebugFlag(), le = "per_session";
377
- let ce = null, ue = false, pe = null, fe = null, me = false, ye = null, we = null, be = false;
377
+ let ce = null, ue = false, pe = null, fe = null, me = false, ye = null, be = null, we = false;
378
378
  const Se = "sailfish_funcspan_global_state";
379
379
  function saveGlobalFuncSpanState(e, a) {
380
380
  try {
@@ -394,7 +394,7 @@ function clearGlobalFuncSpanState() {
394
394
  }
395
395
  }
396
396
  function clearStaleFuncSpanState() {
397
- me = false, we = null, be = false, clearGlobalFuncSpanState(), se && console.log("[Sailfish] Cleared stale function span tracking state (backend validation failed)");
397
+ me = false, be = null, we = false, clearGlobalFuncSpanState(), se && console.log("[Sailfish] Cleared stale function span tracking state (backend validation failed)");
398
398
  }
399
399
  function isWebSocketOpen(e) {
400
400
  return (e == null ? void 0 : e.readyState) === WebSocket.OPEN;
@@ -465,7 +465,7 @@ function initializeWebSocket(e, a, u, w2) {
465
465
  const a2 = document.createElement("a");
466
466
  return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
467
467
  })(e);
468
- let I2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${x2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.10.2`;
468
+ let I2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${x2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.10.3`;
469
469
  w2 && (I2 += `&envValue=${encodeURIComponent(w2)}`);
470
470
  return ce = new G(I2, [], { connectionTimeout: 3e4 }), ce.addEventListener("open", () => {
471
471
  se && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (me ? "ENABLED" : "DISABLED"))), (async () => {
@@ -483,25 +483,25 @@ function initializeWebSocket(e, a, u, w2) {
483
483
  }), ce.addEventListener("message", (e2) => {
484
484
  try {
485
485
  const a2 = JSON.parse(e2.data);
486
- if ("funcSpanTrackingControl" === a2.type) if (se && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !== ye && (window.clearTimeout(ye), ye = null), me = a2.enabled, be = false, se && console.log("[Sailfish] Function span tracking " + (a2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a2.enabled) {
486
+ if ("funcSpanTrackingControl" === a2.type) if (se && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !== ye && (window.clearTimeout(ye), ye = null), me = a2.enabled, we = false, se && console.log("[Sailfish] Function span tracking " + (a2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a2.enabled) {
487
487
  if (a2.expirationTimestampMs) {
488
- we = a2.expirationTimestampMs;
489
- const e3 = Date.now(), u2 = we - e3;
490
- se && console.log(`[Sailfish] Server expiration timestamp: ${we}, ms until expiration: ${u2}`), u2 > 0 ? (saveGlobalFuncSpanState(true, we), ye = window.setTimeout(() => {
491
- if (!be) {
492
- me = false, we = null, clearGlobalFuncSpanState(), se && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time");
488
+ be = a2.expirationTimestampMs;
489
+ const e3 = Date.now(), u2 = be - e3;
490
+ se && console.log(`[Sailfish] Server expiration timestamp: ${be}, ms until expiration: ${u2}`), u2 > 0 ? (saveGlobalFuncSpanState(true, be), ye = window.setTimeout(() => {
491
+ if (!we) {
492
+ me = false, be = null, clearGlobalFuncSpanState(), se && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time");
493
493
  try {
494
494
  isWebSocketOpen(ce) && (ce.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), se && console.log("[Sailfish] Notified backend that function span tracking expired"));
495
495
  } catch (e4) {
496
496
  se && console.warn("[Sailfish] Failed to notify backend of tracking expiry:", e4);
497
497
  }
498
498
  }
499
- }, u2)) : (me = false, we = null, clearGlobalFuncSpanState(), se && console.log("[Sailfish] Tracking already expired, not enabling"));
499
+ }, u2)) : (me = false, be = null, clearGlobalFuncSpanState(), se && console.log("[Sailfish] Tracking already expired, not enabling"));
500
500
  } else {
501
501
  const e3 = a2.timeoutSeconds || 3600;
502
- e3 > 0 && (we = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, we), ye = window.setTimeout(() => {
503
- if (!be) {
504
- me = false, we = null, clearGlobalFuncSpanState(), se && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`);
502
+ e3 > 0 && (be = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, be), ye = window.setTimeout(() => {
503
+ if (!we) {
504
+ me = false, be = null, clearGlobalFuncSpanState(), se && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`);
505
505
  try {
506
506
  isWebSocketOpen(ce) && (ce.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), se && console.log("[Sailfish] Notified backend that function span tracking expired (legacy timeout)"));
507
507
  } catch (e4) {
@@ -516,7 +516,7 @@ function initializeWebSocket(e, a, u, w2) {
516
516
  } catch (e3) {
517
517
  se && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
518
518
  }
519
- } else we = null, clearGlobalFuncSpanState();
519
+ } else be = null, clearGlobalFuncSpanState();
520
520
  } catch (e3) {
521
521
  }
522
522
  }), ce;
@@ -533,7 +533,7 @@ function sendMessage(e) {
533
533
  }
534
534
  }
535
535
  function enableFunctionSpanTracking() {
536
- if (se && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), me = true, be = true, we = null, null !== ye && (window.clearTimeout(ye), ye = null), isWebSocketOpen(ce)) try {
536
+ if (se && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), me = true, we = true, be = null, null !== ye && (window.clearTimeout(ye), ye = null), isWebSocketOpen(ce)) try {
537
537
  const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: le };
538
538
  ce.send(JSON.stringify(e));
539
539
  } catch (e) {
@@ -549,18 +549,18 @@ function disableFunctionSpanTracking() {
549
549
  console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e);
550
550
  }
551
551
  else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
552
- be && (me = false, be = false, we = null, se && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== ye && (window.clearTimeout(ye), ye = null);
552
+ we && (me = false, we = false, be = null, se && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== ye && (window.clearTimeout(ye), ye = null);
553
553
  }
554
554
  function isFunctionSpanTrackingEnabled() {
555
555
  return me;
556
556
  }
557
557
  function initializeFunctionSpanTrackingFromApi(e) {
558
- e && !me ? (me = true, be = false, we = null, se && console.log("[Sailfish] Function span tracking initialized as ENABLED from API check")) : !e && me && (me = false, be = false, we = null, se && console.log("[Sailfish] Function span tracking initialized as DISABLED from API check"));
558
+ e && !me ? (me = true, we = false, be = null, se && console.log("[Sailfish] Function span tracking initialized as ENABLED from API check")) : !e && me && (me = false, we = false, be = null, se && console.log("[Sailfish] Function span tracking initialized as DISABLED from API check"));
559
559
  }
560
560
  function getFuncSpanHeader() {
561
561
  if (!me) return null;
562
- if (null !== we) {
563
- if (Date.now() >= we) return me = false, we = null, clearGlobalFuncSpanState(), se && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
562
+ if (null !== be) {
563
+ if (Date.now() >= be) return me = false, be = null, clearGlobalFuncSpanState(), se && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
564
564
  }
565
565
  return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-1-10-10-1-1.0-1-0-0" };
566
566
  }
@@ -576,8 +576,8 @@ function getFuncSpanHeader() {
576
576
  return se && console.warn("[Sailfish] Failed to load funcSpan state from localStorage:", e2), null;
577
577
  }
578
578
  })();
579
- if (e && e.enabled) if (me = true, we = e.expirationTimestampMs, be = false, se && console.log("[Sailfish] Module init: Restored global function span tracking from localStorage:", { enabled: true, expirationTime: we }), null !== we) {
580
- Date.now() >= we ? (me = false, we = null, clearGlobalFuncSpanState(), se && console.log("[Sailfish] Module init: Persisted tracking already expired, cleared state")) : se && console.log("[Sailfish] Module init: Function span tracking is active and valid (temporary until WebSocket confirms)");
579
+ if (e && e.enabled) if (me = true, be = e.expirationTimestampMs, we = false, se && console.log("[Sailfish] Module init: Restored global function span tracking from localStorage:", { enabled: true, expirationTime: be }), null !== be) {
580
+ Date.now() >= be ? (me = false, be = null, clearGlobalFuncSpanState(), se && console.log("[Sailfish] Module init: Persisted tracking already expired, cleared state")) : se && console.log("[Sailfish] Module init: Function span tracking is active and valid (temporary until WebSocket confirms)");
581
581
  } else se && console.log("[Sailfish] Module init: Function span tracking is active (no expiration, temporary until WebSocket confirms)");
582
582
  })();
583
583
  const ve = Object.freeze(Object.defineProperty({ __proto__: null, clearStaleFuncSpanState, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeFunctionSpanTrackingFromApi, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
@@ -864,15 +864,15 @@ function requireSourceMapGenerator() {
864
864
  throw new Error(x2);
865
865
  }
866
866
  }, SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
867
- for (var u2, w3, x2, I2, M2 = 0, _2 = 1, A2 = 0, F2 = 0, $2 = 0, j2 = 0, B2 = "", U2 = this._mappings.toArray(), z2 = 0, W2 = U2.length; z2 < W2; z2++) {
867
+ for (var u2, w3, x2, I2, M2 = 0, _2 = 1, A2 = 0, F2 = 0, $2 = 0, B2 = 0, j2 = "", U2 = this._mappings.toArray(), z2 = 0, W2 = U2.length; z2 < W2; z2++) {
868
868
  if (u2 = "", (w3 = U2[z2]).generatedLine !== _2) for (M2 = 0; w3.generatedLine !== _2; ) u2 += ";", _2++;
869
869
  else if (z2 > 0) {
870
870
  if (!a.compareByGeneratedPositionsInflated(w3, U2[z2 - 1])) continue;
871
871
  u2 += ",";
872
872
  }
873
- u2 += e.encode(w3.generatedColumn - M2), M2 = w3.generatedColumn, null != w3.source && (I2 = this._sources.indexOf(w3.source), u2 += e.encode(I2 - j2), j2 = I2, u2 += e.encode(w3.originalLine - 1 - F2), F2 = w3.originalLine - 1, u2 += e.encode(w3.originalColumn - A2), A2 = w3.originalColumn, null != w3.name && (x2 = this._names.indexOf(w3.name), u2 += e.encode(x2 - $2), $2 = x2)), B2 += u2;
873
+ u2 += e.encode(w3.generatedColumn - M2), M2 = w3.generatedColumn, null != w3.source && (I2 = this._sources.indexOf(w3.source), u2 += e.encode(I2 - B2), B2 = I2, u2 += e.encode(w3.originalLine - 1 - F2), F2 = w3.originalLine - 1, u2 += e.encode(w3.originalColumn - A2), A2 = w3.originalColumn, null != w3.name && (x2 = this._names.indexOf(w3.name), u2 += e.encode(x2 - $2), $2 = x2)), j2 += u2;
874
874
  }
875
- return B2;
875
+ return j2;
876
876
  }, SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(e2, u2) {
877
877
  return e2.map(function(e3) {
878
878
  if (!this._sourcesContents) return null;
@@ -947,13 +947,13 @@ var rt = (function requireSourceMap() {
947
947
  function BasicSourceMapConsumer(a2, w3) {
948
948
  var x3 = a2;
949
949
  "string" == typeof a2 && (x3 = e.parseSourceMapInput(a2));
950
- var I3 = e.getArg(x3, "version"), M2 = e.getArg(x3, "sources"), _2 = e.getArg(x3, "names", []), A2 = e.getArg(x3, "sourceRoot", null), F2 = e.getArg(x3, "sourcesContent", null), $2 = e.getArg(x3, "mappings"), j2 = e.getArg(x3, "file", null);
950
+ var I3 = e.getArg(x3, "version"), M2 = e.getArg(x3, "sources"), _2 = e.getArg(x3, "names", []), A2 = e.getArg(x3, "sourceRoot", null), F2 = e.getArg(x3, "sourcesContent", null), $2 = e.getArg(x3, "mappings"), B2 = e.getArg(x3, "file", null);
951
951
  if (I3 != this._version) throw new Error("Unsupported version: " + I3);
952
952
  A2 && (A2 = e.normalize(A2)), M2 = M2.map(String).map(e.normalize).map(function(a3) {
953
953
  return A2 && e.isAbsolute(A2) && e.isAbsolute(a3) ? e.relative(A2, a3) : a3;
954
954
  }), this._names = u.fromArray(_2.map(String), true), this._sources = u.fromArray(M2, true), this._absoluteSources = this._sources.toArray().map(function(a3) {
955
955
  return e.computeSourceURL(A2, a3, w3);
956
- }), this.sourceRoot = A2, this.sourcesContent = F2, this._mappings = $2, this._sourceMapURL = w3, this.file = j2;
956
+ }), this.sourceRoot = A2, this.sourcesContent = F2, this._mappings = $2, this._sourceMapURL = w3, this.file = B2;
957
957
  }
958
958
  function Mapping() {
959
959
  this.generatedLine = 0, this.generatedColumn = 0, this.source = null, this.originalLine = null, this.originalColumn = null, this.name = null;
@@ -981,8 +981,8 @@ var rt = (function requireSourceMap() {
981
981
  default:
982
982
  throw new Error("Unknown order of iteration.");
983
983
  }
984
- for (var M2 = this.sourceRoot, _2 = a2.bind(I3), A2 = this._names, F2 = this._sources, $2 = this._sourceMapURL, j2 = 0, B2 = x3.length; j2 < B2; j2++) {
985
- var U2 = x3[j2], z2 = null === U2.source ? null : F2.at(U2.source);
984
+ for (var M2 = this.sourceRoot, _2 = a2.bind(I3), A2 = this._names, F2 = this._sources, $2 = this._sourceMapURL, B2 = 0, j2 = x3.length; B2 < j2; B2++) {
985
+ var U2 = x3[B2], z2 = null === U2.source ? null : F2.at(U2.source);
986
986
  null !== z2 && (z2 = e.computeSourceURL(M2, z2, $2)), _2({ source: z2, generatedLine: U2.generatedLine, generatedColumn: U2.generatedColumn, originalLine: U2.originalLine, originalColumn: U2.originalColumn, name: null === U2.name ? null : A2.at(U2.name) });
987
987
  }
988
988
  }, SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(u2) {
@@ -1005,8 +1005,8 @@ var rt = (function requireSourceMap() {
1005
1005
  I3.sourceRoot = a2._sourceRoot, I3.sourcesContent = a2._generateSourcesContent(I3._sources.toArray(), I3.sourceRoot), I3.file = a2._file, I3._sourceMapURL = w3, I3._absoluteSources = I3._sources.toArray().map(function(a3) {
1006
1006
  return e.computeSourceURL(I3.sourceRoot, a3, w3);
1007
1007
  });
1008
- for (var A2 = a2._mappings.toArray().slice(), F2 = I3.__generatedMappings = [], $2 = I3.__originalMappings = [], j2 = 0, B2 = A2.length; j2 < B2; j2++) {
1009
- var U2 = A2[j2], z2 = new Mapping();
1008
+ for (var A2 = a2._mappings.toArray().slice(), F2 = I3.__generatedMappings = [], $2 = I3.__originalMappings = [], B2 = 0, j2 = A2.length; B2 < j2; B2++) {
1009
+ var U2 = A2[B2], z2 = new Mapping();
1010
1010
  z2.generatedLine = U2.generatedLine, z2.generatedColumn = U2.generatedColumn, U2.source && (z2.source = _2.indexOf(U2.source), z2.originalLine = U2.originalLine, z2.originalColumn = U2.originalColumn, U2.name && (z2.name = M2.indexOf(U2.name)), $2.push(z2)), F2.push(z2);
1011
1011
  }
1012
1012
  return x2(I3.__originalMappings, e.compareByOriginalPositions), I3;
@@ -1041,7 +1041,7 @@ var rt = (function requireSourceMap() {
1041
1041
  });
1042
1042
  }
1043
1043
  return BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(a2, u2) {
1044
- var I3, M2, _2, A2, F2 = 1, $2 = 0, j2 = 0, B2 = 0, U2 = 0, z2 = 0, W2 = a2.length, G2 = 0, H2 = {}, K2 = [], Y2 = [];
1044
+ var I3, M2, _2, A2, F2 = 1, $2 = 0, B2 = 0, j2 = 0, U2 = 0, z2 = 0, W2 = a2.length, G2 = 0, H2 = {}, K2 = [], Y2 = [];
1045
1045
  let Z2 = 0;
1046
1046
  for (; G2 < W2; ) if (";" === a2.charAt(G2)) F2++, G2++, $2 = 0, sortGenerated(Y2, Z2), Z2 = Y2.length;
1047
1047
  else if ("," === a2.charAt(G2)) G2++;
@@ -1050,7 +1050,7 @@ var rt = (function requireSourceMap() {
1050
1050
  for (a2.slice(G2, _2), M2 = []; G2 < _2; ) w2.decode(a2, G2, H2), A2 = H2.value, G2 = H2.rest, M2.push(A2);
1051
1051
  if (2 === M2.length) throw new Error("Found a source, but no line and column");
1052
1052
  if (3 === M2.length) throw new Error("Found a source and line, but no column");
1053
- if (I3.generatedColumn = $2 + M2[0], $2 = I3.generatedColumn, M2.length > 1 && (I3.source = U2 + M2[1], U2 += M2[1], I3.originalLine = j2 + M2[2], j2 = I3.originalLine, I3.originalLine += 1, I3.originalColumn = B2 + M2[3], B2 = I3.originalColumn, M2.length > 4 && (I3.name = z2 + M2[4], z2 += M2[4])), Y2.push(I3), "number" == typeof I3.originalLine) {
1053
+ if (I3.generatedColumn = $2 + M2[0], $2 = I3.generatedColumn, M2.length > 1 && (I3.source = U2 + M2[1], U2 += M2[1], I3.originalLine = B2 + M2[2], B2 = I3.originalLine, I3.originalLine += 1, I3.originalColumn = j2 + M2[3], j2 = I3.originalColumn, M2.length > 4 && (I3.name = z2 + M2[4], z2 += M2[4])), Y2.push(I3), "number" == typeof I3.originalLine) {
1054
1054
  let e2 = I3.source;
1055
1055
  for (; K2.length <= e2; ) K2.push(null);
1056
1056
  null === K2[e2] && (K2[e2] = []), K2[e2].push(I3);
@@ -1147,8 +1147,8 @@ var rt = (function requireSourceMap() {
1147
1147
  null !== F2 && (F2 = e.computeSourceURL(I3.consumer.sourceRoot, F2, this._sourceMapURL)), this._sources.add(F2), F2 = this._sources.indexOf(F2);
1148
1148
  var $2 = null;
1149
1149
  A2.name && ($2 = I3.consumer._names.at(A2.name), this._names.add($2), $2 = this._names.indexOf($2));
1150
- var j2 = { source: F2, generatedLine: A2.generatedLine + (I3.generatedOffset.generatedLine - 1), generatedColumn: A2.generatedColumn + (I3.generatedOffset.generatedLine === A2.generatedLine ? I3.generatedOffset.generatedColumn - 1 : 0), originalLine: A2.originalLine, originalColumn: A2.originalColumn, name: $2 };
1151
- this.__generatedMappings.push(j2), "number" == typeof j2.originalLine && this.__originalMappings.push(j2);
1150
+ var B2 = { source: F2, generatedLine: A2.generatedLine + (I3.generatedOffset.generatedLine - 1), generatedColumn: A2.generatedColumn + (I3.generatedOffset.generatedLine === A2.generatedLine ? I3.generatedOffset.generatedColumn - 1 : 0), originalLine: A2.originalLine, originalColumn: A2.originalColumn, name: $2 };
1151
+ this.__generatedMappings.push(B2), "number" == typeof B2.originalLine && this.__originalMappings.push(B2);
1152
1152
  }
1153
1153
  x2(this.__generatedMappings, e.compareByGeneratedPositionsDeflated), x2(this.__originalMappings, e.compareByOriginalPositions);
1154
1154
  }, qe.IndexedSourceMapConsumer = IndexedSourceMapConsumer, qe;
@@ -1328,8 +1328,8 @@ function createTriageFromRecorder(e, a, u, w2, x2, I2) {
1328
1328
  function fetchEngineeringTicketPlatformIntegrations(e, a) {
1329
1329
  return sendGraphQLRequest("GetEngineeringTicketPlatformIntegrationsFromApiKey", "query GetEngineeringTicketPlatformIntegrationsFromApiKey($apiKey: String!) {\n getEngineeringTicketPlatformIntegrationsFromApiKey(apiKey: $apiKey) {\n pushAutoIdentifiedIssues\n provider\n clientId\n defaultPriority\n defaultProject\n defaultTeam\n primaryCloudId\n installed\n projects\n teams\n workflowStates\n webhookState\n clouds\n labels\n sprints\n users\n fieldConfigurations\n invalidFields\n jiraReporterAccountId\n }\n }", { apiKey: e, backendApi: a });
1330
1330
  }
1331
- function createTriageAndIssueFromRecorder(e, a, u, w2, x2, I2, M2, _2, A2, F2, $2, j2, B2, U2, z2) {
1332
- return sendGraphQLRequest("CreateTriageAndIssueFromRecorder", "mutation CreateTriageAndIssueFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String,\n $issueName: String,\n $issueDescription: String,\n $createEngineeringTicket: Boolean,\n $teamId: String,\n $projectId: String,\n $priority: Int,\n $labels: [String!],\n $issueType: String,\n $customFields: JSON\n ) {\n createTriageAndIssueFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description,\n issueName: $issueName,\n issueDescription: $issueDescription,\n createEngineeringTicket: $createEngineeringTicket,\n teamId: $teamId,\n projectId: $projectId,\n priority: $priority,\n labels: $labels,\n issueType: $issueType,\n customFields: $customFields\n ) {\n id\n title\n }\n }\n ", { apiKey: e, recordingSessionId: u, timestampStart: w2, timestampEnd: x2, description: I2, issueName: M2, issueDescription: _2, createEngineeringTicket: A2, teamId: F2, projectId: $2, priority: j2, labels: B2, issueType: U2, customFields: z2, backendApi: a });
1331
+ function createTriageAndIssueFromRecorder(e, a, u, w2, x2, I2, M2, _2, A2, F2, $2, B2, j2, U2, z2) {
1332
+ return sendGraphQLRequest("CreateTriageAndIssueFromRecorder", "mutation CreateTriageAndIssueFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String,\n $issueName: String,\n $issueDescription: String,\n $createEngineeringTicket: Boolean,\n $teamId: String,\n $projectId: String,\n $priority: Int,\n $labels: [String!],\n $issueType: String,\n $customFields: JSON\n ) {\n createTriageAndIssueFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description,\n issueName: $issueName,\n issueDescription: $issueDescription,\n createEngineeringTicket: $createEngineeringTicket,\n teamId: $teamId,\n projectId: $projectId,\n priority: $priority,\n labels: $labels,\n issueType: $issueType,\n customFields: $customFields\n ) {\n id\n title\n }\n }\n ", { apiKey: e, recordingSessionId: u, timestampStart: w2, timestampEnd: x2, description: I2, issueName: M2, issueDescription: _2, createEngineeringTicket: A2, teamId: F2, projectId: $2, priority: B2, labels: j2, issueType: U2, customFields: z2, backendApi: a });
1333
1333
  }
1334
1334
  const ut = ["jira", "linear", "zendesk"];
1335
1335
  let dt = null;
@@ -1439,7 +1439,7 @@ function getInitialState() {
1439
1439
  })();
1440
1440
  return { mode: "lookback", description: "", occurredInThisTab: true, createIssue: e.createIssue, issueName: "", issueDescription: "", createEngTicket: e.createEngTicket, engTicketTeam: "", engTicketProject: "", engTicketPriority: 0, engTicketLabels: [], engTicketIssueType: "", engTicketCustomFields: {} };
1441
1441
  }
1442
- let ft = getInitialState(), wt = null, bt = null, St = null, vt = false;
1442
+ let ft = getInitialState(), bt = null, wt = null, St = null, vt = false;
1443
1443
  function setTimerInterval(e) {
1444
1444
  St = e;
1445
1445
  }
@@ -1510,27 +1510,27 @@ function renderDynamicFields(e, a) {
1510
1510
  var _a2, _b, _c2, _d2;
1511
1511
  const w3 = e3.fieldId || e3.key, x3 = e3.name, I3 = (_a2 = e3.schema) == null ? void 0 : _a2.type, M2 = (_b = e3.schema) == null ? void 0 : _b.system, _2 = (_c2 = e3.schema) == null ? void 0 : _c2.custom, A2 = e3.required || false, F2 = e3.allowedValues, $2 = ["summary", "description", "project", "issuetype", "priority"];
1512
1512
  if ($2.includes(w3) || $2.includes(M2)) return null;
1513
- const j2 = A2 ? '<span style="color:#ef4444;">*</span>' : "", B2 = "width:100%; padding:8px 12px; font-size:14px; border:1px solid #cbd5e1; border-radius:6px; outline:none;";
1513
+ const B2 = A2 ? '<span style="color:#ef4444;">*</span>' : "", j2 = "width:100%; padding:8px 12px; font-size:14px; border:1px solid #cbd5e1; border-radius:6px; outline:none;";
1514
1514
  switch (I3) {
1515
1515
  case "string":
1516
1516
  return _2 && _2.includes("textarea") ? `
1517
1517
  <div>
1518
1518
  <label for="${w3}" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
1519
- ${x3} ${j2}
1519
+ ${x3} ${B2}
1520
1520
  </label>
1521
1521
  <textarea
1522
1522
  id="${w3}"
1523
1523
  class="sf-dynamic-field"
1524
1524
  data-field-id="${w3}"
1525
1525
  placeholder="Enter ${x3.toLowerCase()}"
1526
- style="${B2} height:80px; resize:none;"
1526
+ style="${j2} height:80px; resize:none;"
1527
1527
  ${A2 ? "required" : ""}
1528
1528
  >${a2 || ""}</textarea>
1529
1529
  </div>
1530
1530
  ` : `
1531
1531
  <div>
1532
1532
  <label for="${w3}" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
1533
- ${x3} ${j2}
1533
+ ${x3} ${B2}
1534
1534
  </label>
1535
1535
  <input
1536
1536
  type="text"
@@ -1539,7 +1539,7 @@ function renderDynamicFields(e, a) {
1539
1539
  data-field-id="${w3}"
1540
1540
  value="${a2 || ""}"
1541
1541
  placeholder="Enter ${x3.toLowerCase()}"
1542
- style="${B2}"
1542
+ style="${j2}"
1543
1543
  ${A2 ? "required" : ""}
1544
1544
  />
1545
1545
  </div>
@@ -1548,7 +1548,7 @@ function renderDynamicFields(e, a) {
1548
1548
  return `
1549
1549
  <div>
1550
1550
  <label for="${w3}" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
1551
- ${x3} ${j2}
1551
+ ${x3} ${B2}
1552
1552
  </label>
1553
1553
  <input
1554
1554
  type="number"
@@ -1557,7 +1557,7 @@ function renderDynamicFields(e, a) {
1557
1557
  data-field-id="${w3}"
1558
1558
  value="${a2 || ""}"
1559
1559
  placeholder="Enter ${x3.toLowerCase()}"
1560
- style="${B2}"
1560
+ style="${j2}"
1561
1561
  step="0.5"
1562
1562
  ${A2 ? "required" : ""}
1563
1563
  />
@@ -1567,7 +1567,7 @@ function renderDynamicFields(e, a) {
1567
1567
  return `
1568
1568
  <div>
1569
1569
  <label for="${w3}" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
1570
- ${x3} ${j2}
1570
+ ${x3} ${B2}
1571
1571
  </label>
1572
1572
  <input
1573
1573
  type="date"
@@ -1575,7 +1575,7 @@ function renderDynamicFields(e, a) {
1575
1575
  class="sf-dynamic-field"
1576
1576
  data-field-id="${w3}"
1577
1577
  value="${a2 || ""}"
1578
- style="${B2}"
1578
+ style="${j2}"
1579
1579
  ${A2 ? "required" : ""}
1580
1580
  />
1581
1581
  </div>
@@ -1589,13 +1589,13 @@ function renderDynamicFields(e, a) {
1589
1589
  return `
1590
1590
  <div>
1591
1591
  <label for="${w3}" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
1592
- ${x3} ${j2}
1592
+ ${x3} ${B2}
1593
1593
  </label>
1594
1594
  <select
1595
1595
  id="${w3}"
1596
1596
  class="sf-dynamic-field"
1597
1597
  data-field-id="${w3}"
1598
- style="${B2} appearance:none; cursor:pointer; background-color: white; ${I4 ? "" : "color: #9ca3af;"}"
1598
+ style="${j2} appearance:none; cursor:pointer; background-color: white; ${I4 ? "" : "color: #9ca3af;"}"
1599
1599
  ${A2 ? "required" : ""}
1600
1600
  >
1601
1601
  <option value="" disabled ${I4 ? "" : "selected"} style="color: #9ca3af;">Select ${x3.toLowerCase()}...</option>
@@ -1614,13 +1614,13 @@ function renderDynamicFields(e, a) {
1614
1614
  return `
1615
1615
  <div>
1616
1616
  <label for="${w3}" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
1617
- ${x3} ${j2}
1617
+ ${x3} ${B2}
1618
1618
  </label>
1619
1619
  <select
1620
1620
  id="${w3}"
1621
1621
  class="sf-dynamic-field"
1622
1622
  data-field-id="${w3}"
1623
- style="${B2} appearance:none; cursor:pointer; background-color: white; ${u3 ? "" : "color: #9ca3af;"}"
1623
+ style="${j2} appearance:none; cursor:pointer; background-color: white; ${u3 ? "" : "color: #9ca3af;"}"
1624
1624
  ${A2 ? "required" : ""}
1625
1625
  >
1626
1626
  <option value="" disabled ${u3 ? "" : "selected"} style="color: #9ca3af;">Select ${x3.toLowerCase()}...</option>
@@ -1637,7 +1637,7 @@ function renderDynamicFields(e, a) {
1637
1637
  return `
1638
1638
  <div>
1639
1639
  <label for="${w3}" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
1640
- ${x3} ${j2}
1640
+ ${x3} ${B2}
1641
1641
  </label>
1642
1642
  <input
1643
1643
  type="text"
@@ -1646,7 +1646,7 @@ function renderDynamicFields(e, a) {
1646
1646
  data-field-id="${w3}"
1647
1647
  value="${a2 || ""}"
1648
1648
  placeholder="e.g., PROJ-123"
1649
- style="${B2}"
1649
+ style="${j2}"
1650
1650
  ${A2 ? "required" : ""}
1651
1651
  />
1652
1652
  </div>
@@ -1655,7 +1655,7 @@ function renderDynamicFields(e, a) {
1655
1655
  return ((_d2 = e3.operations) == null ? void 0 : _d2.includes("set")) ? `
1656
1656
  <div>
1657
1657
  <label for="${w3}" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
1658
- ${x3} ${j2}
1658
+ ${x3} ${B2}
1659
1659
  </label>
1660
1660
  <input
1661
1661
  type="text"
@@ -1664,7 +1664,7 @@ function renderDynamicFields(e, a) {
1664
1664
  data-field-id="${w3}"
1665
1665
  value="${a2 || ""}"
1666
1666
  placeholder="Enter ${x3.toLowerCase()}"
1667
- style="${B2}"
1667
+ style="${j2}"
1668
1668
  ${A2 ? "required" : ""}
1669
1669
  />
1670
1670
  </div>
@@ -1733,7 +1733,7 @@ function getSessionIdSafely() {
1733
1733
  }
1734
1734
  function closeModal() {
1735
1735
  xt.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (Ct == null ? void 0 : Ct.parentNode) && Ct.parentNode.removeChild(Ct), Ct = null, vt || (function resetState() {
1736
- ft = getInitialState(), wt = null, bt = null;
1736
+ ft = getInitialState(), bt = null, wt = null;
1737
1737
  })(), St && (clearInterval(St), setTimerInterval(null));
1738
1738
  }
1739
1739
  function activateModalIsolation(e) {
@@ -2040,24 +2040,24 @@ function injectModalHTML(e = "lookback") {
2040
2040
  $2 && $2.addEventListener("input", () => {
2041
2041
  ft.issueName = $2.value;
2042
2042
  });
2043
- const j2 = document.getElementById("sf-eng-ticket-team"), B2 = document.getElementById("sf-eng-ticket-project"), U2 = document.getElementById("sf-eng-ticket-priority"), z2 = document.getElementById("sf-eng-ticket-labels-container"), W2 = document.getElementById("sf-eng-ticket-type");
2044
- j2 && j2.addEventListener("change", () => {
2045
- if (ft.engTicketTeam = j2.value, j2.style.color = j2.value ? "" : "#9ca3af", B2) {
2046
- const e3 = getProjectsForTeam(j2.value), a3 = document.getElementById("sf-eng-ticket-project");
2043
+ const B2 = document.getElementById("sf-eng-ticket-team"), j2 = document.getElementById("sf-eng-ticket-project"), U2 = document.getElementById("sf-eng-ticket-priority"), z2 = document.getElementById("sf-eng-ticket-labels-container"), W2 = document.getElementById("sf-eng-ticket-type");
2044
+ B2 && B2.addEventListener("change", () => {
2045
+ if (ft.engTicketTeam = B2.value, B2.style.color = B2.value ? "" : "#9ca3af", j2) {
2046
+ const e3 = getProjectsForTeam(B2.value), a3 = document.getElementById("sf-eng-ticket-project");
2047
2047
  a3 && (ft.engTicketProject = "", ft.engTicketCustomFields = {}, a3.innerHTML = '<option value="">Select project...</option>', e3.forEach((e4) => {
2048
2048
  const u2 = document.createElement("option");
2049
2049
  u2.value = e4.id || e4.value || e4, u2.textContent = e4.name || e4.label || e4, a3.appendChild(u2);
2050
2050
  }));
2051
2051
  }
2052
2052
  });
2053
- B2 && B2.addEventListener("change", () => {
2053
+ j2 && j2.addEventListener("change", () => {
2054
2054
  var _a2;
2055
- ft.engTicketProject = B2.value, B2.style.color = B2.value ? "" : "#9ca3af", ft.engTicketCustomFields = {};
2055
+ ft.engTicketProject = j2.value, j2.style.color = j2.value ? "" : "#9ca3af", ft.engTicketCustomFields = {};
2056
2056
  const e3 = getIntegrationData();
2057
- if (e3 && W2 && (updateIssueTypeOptions(W2, B2.value), ft.engTicketIssueType = W2.value), e3 && "jira" === ((_a2 = e3.provider) == null ? void 0 : _a2.toLowerCase()) && e3.jiraReporterAccountId && B2.value) {
2058
- getFieldsForProject(B2.value, ft.engTicketIssueType).find((e4) => "reporter" === e4.fieldId) && (ft.engTicketCustomFields.reporter = e3.jiraReporterAccountId);
2057
+ if (e3 && W2 && (updateIssueTypeOptions(W2, j2.value), ft.engTicketIssueType = W2.value), e3 && "jira" === ((_a2 = e3.provider) == null ? void 0 : _a2.toLowerCase()) && e3.jiraReporterAccountId && j2.value) {
2058
+ getFieldsForProject(j2.value, ft.engTicketIssueType).find((e4) => "reporter" === e4.fieldId) && (ft.engTicketCustomFields.reporter = e3.jiraReporterAccountId);
2059
2059
  }
2060
- renderDynamicFields(B2.value, ft.engTicketIssueType);
2060
+ renderDynamicFields(j2.value, ft.engTicketIssueType);
2061
2061
  });
2062
2062
  U2 && U2.addEventListener("change", () => {
2063
2063
  ft.engTicketPriority = Number(U2.value);
@@ -2102,7 +2102,7 @@ function injectModalHTML(e = "lookback") {
2102
2102
  if (a3--, a3 > 0) e4.textContent = a3.toString();
2103
2103
  else {
2104
2104
  clearInterval(u2), document.body.removeChild(e4), (function setRecordingStartTime(e5) {
2105
- wt = e5;
2105
+ bt = e5;
2106
2106
  })(Date.now()), setIsRecording(true);
2107
2107
  try {
2108
2108
  const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() => ve);
@@ -2132,7 +2132,7 @@ function injectModalHTML(e = "lookback") {
2132
2132
  const a4 = e5.querySelector("#sf-recording-timer");
2133
2133
  if (!a4) return;
2134
2134
  const u3 = setInterval(() => {
2135
- const e6 = Date.now() - (wt ?? Date.now()), u4 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), w3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
2135
+ const e6 = Date.now() - (bt ?? Date.now()), u4 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), w3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
2136
2136
  a4.textContent = `${u4}:${w3}`;
2137
2137
  }, 1e3);
2138
2138
  setTimerInterval(u3);
@@ -2147,26 +2147,26 @@ function injectModalHTML(e = "lookback") {
2147
2147
  const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 = ft.mode;
2148
2148
  if (ft.description = e4, ft.createIssue && !ft.issueName.trim()) return void alert("Issue title is required when creating an issue.");
2149
2149
  let u2, w3;
2150
- if ("startnow" === a3) u2 = wt ?? Date.now() - 3e5, w3 = bt ?? Date.now();
2150
+ if ("startnow" === a3) u2 = bt ?? Date.now() - 3e5, w3 = wt ?? Date.now();
2151
2151
  else {
2152
2152
  const e5 = 60 * Number((x2 == null ? void 0 : x2.value) || "2") * 1e3;
2153
2153
  w3 = Date.now(), u2 = w3 - e5;
2154
2154
  }
2155
2155
  if (ft.createIssue) {
2156
- const a4 = document.getElementById("sf-issue-name"), x3 = document.getElementById("sf-eng-ticket-team"), I3 = document.getElementById("sf-eng-ticket-project"), M3 = document.getElementById("sf-eng-ticket-priority"), _3 = document.getElementById("sf-eng-ticket-type"), A3 = (a4 == null ? void 0 : a4.value) || "", F3 = e4, $3 = (x3 == null ? void 0 : x3.value) || "", j3 = (I3 == null ? void 0 : I3.value) || "", B3 = M3 ? Number(M3.value) : 0, U3 = ft.engTicketLabels, z3 = (_3 == null ? void 0 : _3.value) || "", W3 = { ...ft.engTicketCustomFields };
2156
+ const a4 = document.getElementById("sf-issue-name"), x3 = document.getElementById("sf-eng-ticket-team"), I3 = document.getElementById("sf-eng-ticket-project"), M3 = document.getElementById("sf-eng-ticket-priority"), _3 = document.getElementById("sf-eng-ticket-type"), A3 = (a4 == null ? void 0 : a4.value) || "", F3 = e4, $3 = (x3 == null ? void 0 : x3.value) || "", B3 = (I3 == null ? void 0 : I3.value) || "", j3 = M3 ? Number(M3.value) : 0, U3 = ft.engTicketLabels, z3 = (_3 == null ? void 0 : _3.value) || "", W3 = { ...ft.engTicketCustomFields };
2157
2157
  document.querySelectorAll(".sf-dynamic-field").forEach((e5) => {
2158
2158
  const a5 = e5, u3 = a5.dataset.fieldId;
2159
2159
  u3 && ("checkbox" === a5.type ? W3[u3] = a5.checked : "number" === a5.type ? W3[u3] = parseFloat(a5.value) || null : a5.classList.contains("sf-custom-multiselect") || (W3[u3] = a5.value));
2160
- }), closeModal(), (async function createTriageAndIssue(e5, a5, u3, w4, x4, I4, M4, _4, A4, F4, $4, j4) {
2160
+ }), closeModal(), (async function createTriageAndIssue(e5, a5, u3, w4, x4, I4, M4, _4, A4, F4, $4, B4) {
2161
2161
  var _a3, _b;
2162
2162
  try {
2163
2163
  showStatusModal(true);
2164
- const B4 = await createTriageAndIssueFromRecorder(xt.apiKey, xt.backendApi, getSessionIdSafely(), e5, a5, u3, w4, x4, I4, M4, _4, A4, F4, $4, j4), U4 = (_b = (_a3 = B4 == null ? void 0 : B4.data) == null ? void 0 : _a3.createTriageAndIssueFromRecorder) == null ? void 0 : _b.id;
2164
+ const j4 = await createTriageAndIssueFromRecorder(xt.apiKey, xt.backendApi, getSessionIdSafely(), e5, a5, u3, w4, x4, I4, M4, _4, A4, F4, $4, B4), U4 = (_b = (_a3 = j4 == null ? void 0 : j4.data) == null ? void 0 : _a3.createTriageAndIssueFromRecorder) == null ? void 0 : _b.id;
2165
2165
  U4 ? showStatusModal(false, { type: "issue", id: U4 }) : (console.error("No Issue ID returned from backend."), showStatusModal(false, null));
2166
2166
  } catch (e6) {
2167
2167
  console.error("Error creating triage and issue:", e6), showStatusModal(false, null);
2168
2168
  }
2169
- })(`${u2}`, `${w3}`, e4, A3, F3, ft.createEngTicket, $3, j3, B3, U3, z3, W3);
2169
+ })(`${u2}`, `${w3}`, e4, A3, F3, ft.createEngTicket, $3, B3, j3, U3, z3, W3);
2170
2170
  } else closeModal(), (async function createTriage(e5, a4, u3) {
2171
2171
  var _a3, _b;
2172
2172
  try {
@@ -2201,9 +2201,9 @@ function updateModeSpecificUI(e) {
2201
2201
  const a = document.querySelector("#sf-issue-mode-info div"), u = document.getElementById("sf-issue-submit-btn"), w2 = document.getElementById("sf-record-button-container"), x2 = document.getElementById("sf-recording-timer-label"), I2 = document.getElementById("sf-recording-timer-display"), M2 = document.getElementById("sf-modal-footer"), _2 = document.getElementById("sf-lookback-container");
2202
2202
  if (a && u && w2 && x2 && I2 && M2 && _2) if ("startnow" === e) {
2203
2203
  w2.style.display = "block", _2.style.display = "none", M2.style.justifyContent = "space-between", a.textContent = "I want to reproduce the issue right now.";
2204
- const e2 = null !== wt && null !== bt;
2205
- if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", wt && bt) {
2206
- const e3 = Math.floor((bt - wt) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
2204
+ const e2 = null !== bt && null !== wt;
2205
+ if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", bt && wt) {
2206
+ const e3 = Math.floor((wt - bt) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
2207
2207
  x2.style.display = "block", I2.textContent = `${a2}:${u2}`;
2208
2208
  } else x2.style.display = "none";
2209
2209
  } else w2.style.display = "none", x2.style.display = "none", _2.style.display = "block", M2.style.justifyContent = "flex-end", a.textContent = "Something already happened. Capture the past few minutes.", u.disabled = false, u.style.opacity = "1", u.style.cursor = "pointer";
@@ -2211,7 +2211,7 @@ function updateModeSpecificUI(e) {
2211
2211
  async function stopRecording() {
2212
2212
  var _a2;
2213
2213
  !(function setRecordingEndTime(e) {
2214
- bt = e;
2214
+ wt = e;
2215
2215
  })(Date.now()), setIsRecording(false), St && (clearInterval(St), setTimerInterval(null)), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
2216
2216
  try {
2217
2217
  const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() => ve);
@@ -2227,8 +2227,8 @@ async function stopRecording() {
2227
2227
  a2 && (a2.textContent = "Re-record");
2228
2228
  }
2229
2229
  const a = document.getElementById("sf-recording-timer-label"), u = document.getElementById("sf-recording-timer-display");
2230
- if (a && u && wt && bt) {
2231
- const e2 = Math.floor((bt - wt) / 1e3), w3 = Math.floor(e2 / 60).toString().padStart(2, "0"), x3 = (e2 % 60).toString().padStart(2, "0");
2230
+ if (a && u && bt && wt) {
2231
+ const e2 = Math.floor((wt - bt) / 1e3), w3 = Math.floor(e2 / 60).toString().padStart(2, "0"), x3 = (e2 % 60).toString().padStart(2, "0");
2232
2232
  u.textContent = `${w3}:${x3}`, a.style.display = "block";
2233
2233
  }
2234
2234
  const w2 = document.getElementById("sf-issue-description");
@@ -2237,7 +2237,7 @@ async function stopRecording() {
2237
2237
  x2 && (x2.checked = true);
2238
2238
  const I2 = document.getElementById("sf-inline-record-chip"), M2 = document.getElementById("sf-inline-record-timer");
2239
2239
  if (I2 && M2) {
2240
- const e2 = Math.floor(((bt ?? 0) - (wt ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
2240
+ const e2 = Math.floor(((wt ?? 0) - (bt ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
2241
2241
  M2.textContent = `${a2}:${u2}`, M2.style.color = "black", I2.style.display = "flex";
2242
2242
  }
2243
2243
  const _2 = document.getElementById("sf-issue-submit-btn");
@@ -2300,13 +2300,13 @@ function showStatusModal(e, a) {
2300
2300
  (_a2 = document.getElementById("sf-triage-modal-close")) == null ? void 0 : _a2.addEventListener("click", () => {
2301
2301
  fadeCardAndRemove(x2, F2, 300);
2302
2302
  });
2303
- const $2 = document.getElementById("sf-copy-triage-link"), j2 = document.getElementById("sf-view-triage-btn");
2304
- e2 ? ($2.disabled = true, $2.style.opacity = "0.4", $2.style.cursor = "not-allowed", j2.disabled = true, j2.style.opacity = "0.4", j2.style.cursor = "not-allowed") : ($2.disabled = false, $2.addEventListener("click", () => {
2303
+ const $2 = document.getElementById("sf-copy-triage-link"), B2 = document.getElementById("sf-view-triage-btn");
2304
+ e2 ? ($2.disabled = true, $2.style.opacity = "0.4", $2.style.cursor = "not-allowed", B2.disabled = true, B2.style.opacity = "0.4", B2.style.cursor = "not-allowed") : ($2.disabled = false, $2.addEventListener("click", () => {
2305
2305
  navigator.clipboard.writeText(w2).then(() => {
2306
2306
  const e3 = document.getElementById("sf-copied-status");
2307
2307
  e3 && (e3.style.display = "flex");
2308
2308
  });
2309
- }), j2.disabled = false, j2.addEventListener("click", () => {
2309
+ }), B2.disabled = false, B2.addEventListener("click", () => {
2310
2310
  (a2 || u) && window.open(w2, "_blank");
2311
2311
  }), setTimeout(() => fadeCardAndRemove(x2, F2, 300), 1e4));
2312
2312
  })(e, "triage" === (a == null ? void 0 : a.type) ? a.id : void 0, "issue" === (a == null ? void 0 : a.type) ? a.id : void 0);
@@ -2574,7 +2574,7 @@ function Nn(e, a, u, w2) {
2574
2574
  return false;
2575
2575
  }
2576
2576
  function Zi(e, a) {
2577
- const { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: M2, inlineStylesheet: _2, maskInputOptions: A2 = {}, maskTextFn: F2, maskInputFn: $2, dataURLOptions: j2 = {}, inlineImages: B2, recordCanvas: U2, keepIframeSrcFn: z2, newlyAddedElement: W2 = false, corruptedRules: G2 } = a, H2 = (function Hi(e2, a2) {
2577
+ const { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: M2, inlineStylesheet: _2, maskInputOptions: A2 = {}, maskTextFn: F2, maskInputFn: $2, dataURLOptions: B2 = {}, inlineImages: j2, recordCanvas: U2, keepIframeSrcFn: z2, newlyAddedElement: W2 = false, corruptedRules: G2 } = a, H2 = (function Hi(e2, a2) {
2578
2578
  if (!a2.hasNode(e2)) return;
2579
2579
  const u2 = a2.getId(e2);
2580
2580
  return 1 === u2 ? void 0 : u2;
@@ -2586,7 +2586,7 @@ function Zi(e, a) {
2586
2586
  return { type: _t.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: H2 };
2587
2587
  case e.ELEMENT_NODE:
2588
2588
  return (function Ji(e2, a2) {
2589
- const { doc: u2, blockClass: w3, blockSelector: x3, inlineStylesheet: I3, maskInputOptions: M3 = {}, maskInputFn: _3, dataURLOptions: A3 = {}, inlineImages: F3, recordCanvas: $3, keepIframeSrcFn: j3, newlyAddedElement: B3 = false, rootId: U3, corruptedRules: z3 } = a2, W3 = (function $i(e3, a3, u3) {
2589
+ const { doc: u2, blockClass: w3, blockSelector: x3, inlineStylesheet: I3, maskInputOptions: M3 = {}, maskInputFn: _3, dataURLOptions: A3 = {}, inlineImages: F3, recordCanvas: $3, keepIframeSrcFn: B3, newlyAddedElement: j3 = false, rootId: U3, corruptedRules: z3 } = a2, W3 = (function $i(e3, a3, u3) {
2590
2590
  try {
2591
2591
  if ("string" == typeof a3) {
2592
2592
  if (e3.classList.contains(a3)) return true;
@@ -2674,18 +2674,18 @@ function Zi(e, a) {
2674
2674
  const a3 = H3;
2675
2675
  a3.rr_mediaState = e2.paused ? "paused" : "played", a3.rr_mediaCurrentTime = e2.currentTime, a3.rr_mediaPlaybackRate = e2.playbackRate, a3.rr_mediaMuted = e2.muted, a3.rr_mediaLoop = e2.loop, a3.rr_mediaVolume = e2.volume;
2676
2676
  }
2677
- if (B3 || (e2.scrollLeft && (H3.rr_scrollLeft = e2.scrollLeft), e2.scrollTop && (H3.rr_scrollTop = e2.scrollTop)), W3) {
2677
+ if (j3 || (e2.scrollLeft && (H3.rr_scrollLeft = e2.scrollLeft), e2.scrollTop && (H3.rr_scrollTop = e2.scrollTop)), W3) {
2678
2678
  const { width: a3, height: u3 } = e2.getBoundingClientRect();
2679
2679
  H3 = { class: H3.class, rr_width: `${a3}px`, rr_height: `${u3}px` };
2680
2680
  }
2681
2681
  let Y2;
2682
- "iframe" === G3 && !j3(H3.src) && (e2.contentDocument || (H3.rr_src = H3.src), delete H3.src);
2682
+ "iframe" === G3 && !B3(H3.src) && (e2.contentDocument || (H3.rr_src = H3.src), delete H3.src);
2683
2683
  try {
2684
2684
  customElements.get(G3) && (Y2 = true);
2685
2685
  } catch {
2686
2686
  }
2687
2687
  return { type: _t.Element, tagName: G3, attributes: H3, childNodes: [], isSVG: Vi(e2) || void 0, needBlock: W3, rootId: U3, isCustom: Y2 };
2688
- })(e, { doc: u, blockClass: x2, blockSelector: I2, inlineStylesheet: _2, maskInputOptions: A2, maskInputFn: $2, dataURLOptions: j2, inlineImages: B2, recordCanvas: U2, keepIframeSrcFn: z2, newlyAddedElement: W2, rootId: H2, corruptedRules: G2 });
2688
+ })(e, { doc: u, blockClass: x2, blockSelector: I2, inlineStylesheet: _2, maskInputOptions: A2, maskInputFn: $2, dataURLOptions: B2, inlineImages: j2, recordCanvas: U2, keepIframeSrcFn: z2, newlyAddedElement: W2, rootId: H2, corruptedRules: G2 });
2689
2689
  case e.TEXT_NODE:
2690
2690
  return (function Xi(e2, a2) {
2691
2691
  var u2;
@@ -2714,10 +2714,10 @@ function F$1(e) {
2714
2714
  return null == e ? "" : e.toLowerCase();
2715
2715
  }
2716
2716
  function ke(e, a) {
2717
- const { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, maskTextClass: M2, maskTextSelector: _2, skipChild: A2 = false, inlineStylesheet: F2 = true, maskInputOptions: $2 = {}, maskTextFn: j2, maskInputFn: B2, slimDOMOptions: U2, dataURLOptions: z2 = {}, inlineImages: W2 = false, recordCanvas: G2 = false, onSerialize: H2, onIframeLoad: K2, iframeLoadTimeout: Y2 = 5e3, onStylesheetLoad: Z2, stylesheetLoadTimeout: J2 = 5e3, keepIframeSrcFn: X2 = () => false, newlyAddedElement: Q2 = false, corruptedRules: ee2 } = a;
2717
+ const { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, maskTextClass: M2, maskTextSelector: _2, skipChild: A2 = false, inlineStylesheet: F2 = true, maskInputOptions: $2 = {}, maskTextFn: B2, maskInputFn: j2, slimDOMOptions: U2, dataURLOptions: z2 = {}, inlineImages: W2 = false, recordCanvas: G2 = false, onSerialize: H2, onIframeLoad: K2, iframeLoadTimeout: Y2 = 5e3, onStylesheetLoad: Z2, stylesheetLoadTimeout: J2 = 5e3, keepIframeSrcFn: X2 = () => false, newlyAddedElement: Q2 = false, corruptedRules: ee2 } = a;
2718
2718
  let { needsMask: te2 } = a, { preserveWhiteSpace: ne2 = true } = a;
2719
2719
  te2 || (te2 = Nn(e, M2, _2, void 0 === te2));
2720
- const re2 = Zi(e, { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: te2, inlineStylesheet: F2, maskInputOptions: $2, maskTextFn: j2, maskInputFn: B2, dataURLOptions: z2, inlineImages: W2, recordCanvas: G2, keepIframeSrcFn: X2, newlyAddedElement: Q2, corruptedRules: ee2 });
2720
+ const re2 = Zi(e, { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: te2, inlineStylesheet: F2, maskInputOptions: $2, maskTextFn: B2, maskInputFn: j2, dataURLOptions: z2, inlineImages: W2, recordCanvas: G2, keepIframeSrcFn: X2, newlyAddedElement: Q2, corruptedRules: ee2 });
2721
2721
  if (!re2) return console.warn(e, "not serialized"), null;
2722
2722
  let se2;
2723
2723
  se2 = w2.hasNode(e) ? w2.getId(e) : (function Ki(e2, a2) {
@@ -2734,7 +2734,7 @@ function ke(e, a) {
2734
2734
  }
2735
2735
  if ((le2.type === _t.Document || le2.type === _t.Element) && ce2) {
2736
2736
  U2.headWhitespace && le2.type === _t.Element && "head" === le2.tagName && (ne2 = false);
2737
- const a2 = { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: te2, maskTextClass: M2, maskTextSelector: _2, skipChild: A2, inlineStylesheet: F2, maskInputOptions: $2, maskTextFn: j2, maskInputFn: B2, slimDOMOptions: U2, dataURLOptions: z2, inlineImages: W2, recordCanvas: G2, preserveWhiteSpace: ne2, onSerialize: H2, onIframeLoad: K2, iframeLoadTimeout: Y2, onStylesheetLoad: Z2, stylesheetLoadTimeout: J2, keepIframeSrcFn: X2, corruptedRules: ee2 };
2737
+ const a2 = { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: te2, maskTextClass: M2, maskTextSelector: _2, skipChild: A2, inlineStylesheet: F2, maskInputOptions: $2, maskTextFn: B2, maskInputFn: j2, slimDOMOptions: U2, dataURLOptions: z2, inlineImages: W2, recordCanvas: G2, preserveWhiteSpace: ne2, onSerialize: H2, onIframeLoad: K2, iframeLoadTimeout: Y2, onStylesheetLoad: Z2, stylesheetLoadTimeout: J2, keepIframeSrcFn: X2, corruptedRules: ee2 };
2738
2738
  if (le2.type !== _t.Element || "textarea" !== le2.tagName || void 0 === le2.attributes.value) for (const u2 of Array.from(e.childNodes)) {
2739
2739
  const e2 = ke(u2, a2);
2740
2740
  e2 && le2.childNodes.push(e2);
@@ -2767,7 +2767,7 @@ function ke(e, a) {
2767
2767
  })(e, () => {
2768
2768
  const a2 = e.contentDocument;
2769
2769
  if (a2 && K2) {
2770
- const u2 = ke(a2, { doc: a2, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: te2, maskTextClass: M2, maskTextSelector: _2, skipChild: false, inlineStylesheet: F2, maskInputOptions: $2, maskTextFn: j2, maskInputFn: B2, slimDOMOptions: U2, dataURLOptions: z2, inlineImages: W2, recordCanvas: G2, preserveWhiteSpace: ne2, onSerialize: H2, onIframeLoad: K2, iframeLoadTimeout: Y2, onStylesheetLoad: Z2, stylesheetLoadTimeout: J2, keepIframeSrcFn: X2 });
2770
+ const u2 = ke(a2, { doc: a2, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: te2, maskTextClass: M2, maskTextSelector: _2, skipChild: false, inlineStylesheet: F2, maskInputOptions: $2, maskTextFn: B2, maskInputFn: j2, slimDOMOptions: U2, dataURLOptions: z2, inlineImages: W2, recordCanvas: G2, preserveWhiteSpace: ne2, onSerialize: H2, onIframeLoad: K2, iframeLoadTimeout: Y2, onStylesheetLoad: Z2, stylesheetLoadTimeout: J2, keepIframeSrcFn: X2 });
2771
2771
  u2 && K2(e, u2);
2772
2772
  }
2773
2773
  }, Y2), le2.type === _t.Element && "link" === le2.tagName && "string" == typeof le2.attributes.rel && ("stylesheet" === le2.attributes.rel || "preload" === le2.attributes.rel && "string" == typeof le2.attributes.href && "css" === Ln(le2.attributes.href)) && (function Yi(e2, a2, u2) {
@@ -2786,7 +2786,7 @@ function ke(e, a) {
2786
2786
  });
2787
2787
  })(e, () => {
2788
2788
  if (Z2) {
2789
- const a2 = ke(e, { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: te2, maskTextClass: M2, maskTextSelector: _2, skipChild: false, inlineStylesheet: F2, maskInputOptions: $2, maskTextFn: j2, maskInputFn: B2, slimDOMOptions: U2, dataURLOptions: z2, inlineImages: W2, recordCanvas: G2, preserveWhiteSpace: ne2, onSerialize: H2, onIframeLoad: K2, iframeLoadTimeout: Y2, onStylesheetLoad: Z2, stylesheetLoadTimeout: J2, keepIframeSrcFn: X2 });
2789
+ const a2 = ke(e, { doc: u, mirror: w2, blockClass: x2, blockSelector: I2, needsMask: te2, maskTextClass: M2, maskTextSelector: _2, skipChild: false, inlineStylesheet: F2, maskInputOptions: $2, maskTextFn: B2, maskInputFn: j2, slimDOMOptions: U2, dataURLOptions: z2, inlineImages: W2, recordCanvas: G2, preserveWhiteSpace: ne2, onSerialize: H2, onIframeLoad: K2, iframeLoadTimeout: Y2, onStylesheetLoad: Z2, stylesheetLoadTimeout: J2, keepIframeSrcFn: X2 });
2790
2790
  a2 && Z2(e, a2);
2791
2791
  }
2792
2792
  }, J2), le2;
@@ -3004,7 +3004,7 @@ var hn = xs;
3004
3004
  xs.default = xs;
3005
3005
  var mn = {};
3006
3006
  mn.isClean = Symbol("isClean"), mn.my = Symbol("my");
3007
- let gn = ln, yn = dn, wn = hn, { isClean: bn, my: Sn } = mn;
3007
+ let gn = ln, yn = dn, bn = hn, { isClean: wn, my: Sn } = mn;
3008
3008
  function Is(e, a) {
3009
3009
  let u = new e.constructor();
3010
3010
  for (let w2 in e) {
@@ -3031,7 +3031,7 @@ let vn = class {
3031
3031
  return this;
3032
3032
  }
3033
3033
  constructor(e = {}) {
3034
- this.raws = {}, this[bn] = false, this[Sn] = true;
3034
+ this.raws = {}, this[wn] = false, this[Sn] = true;
3035
3035
  for (let a in e) if ("nodes" === a) {
3036
3036
  this.nodes = [];
3037
3037
  for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
@@ -3081,13 +3081,13 @@ let vn = class {
3081
3081
  return { get: (e, a) => "proxyOf" === a ? e : "root" === a ? () => e.root().toProxy() : e[a], set: (e, a, u) => (e[a] === u || (e[a] = u, ("prop" === a || "value" === a || "name" === a || "params" === a || "important" === a || "text" === a) && e.markDirty()), true) };
3082
3082
  }
3083
3083
  markClean() {
3084
- this[bn] = true;
3084
+ this[wn] = true;
3085
3085
  }
3086
3086
  markDirty() {
3087
- if (this[bn]) {
3088
- this[bn] = false;
3087
+ if (this[wn]) {
3088
+ this[wn] = false;
3089
3089
  let e = this;
3090
- for (; e = e.parent; ) e[bn] = false;
3090
+ for (; e = e.parent; ) e[wn] = false;
3091
3091
  }
3092
3092
  }
3093
3093
  next() {
@@ -3161,7 +3161,7 @@ let vn = class {
3161
3161
  toProxy() {
3162
3162
  return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
3163
3163
  }
3164
- toString(e = wn) {
3164
+ toString(e = bn) {
3165
3165
  e.stringify && (e = e.stringify);
3166
3166
  let a = "";
3167
3167
  return e(this, (e2) => {
@@ -3183,7 +3183,7 @@ let Cn = xn, En = class extends Cn {
3183
3183
  };
3184
3184
  var _n = En;
3185
3185
  En.default = En;
3186
- let jn = xn, Bn = class extends jn {
3186
+ let Bn = xn, jn = class extends Bn {
3187
3187
  get variable() {
3188
3188
  return this.prop.startsWith("--") || "$" === this.prop[0];
3189
3189
  }
@@ -3191,8 +3191,8 @@ let jn = xn, Bn = class extends jn {
3191
3191
  e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
3192
3192
  }
3193
3193
  };
3194
- var Un = Bn;
3195
- Bn.default = Bn;
3194
+ var Un = jn;
3195
+ jn.default = jn;
3196
3196
  let zn, Wn, Vn, Hn, qn = _n, Kn = Un, Zn = xn, { isClean: Jn, my: Xn } = mn;
3197
3197
  function $n(e) {
3198
3198
  return e.map((e2) => (e2.nodes && (e2.nodes = $n(e2.nodes)), delete e2.source, e2));
@@ -3465,20 +3465,20 @@ let gr = class {
3465
3465
  };
3466
3466
  var yr = gr;
3467
3467
  gr.default = gr;
3468
- let { nanoid: wr } = cr, { isAbsolute: br, resolve: Sr } = tn, { SourceMapConsumer: vr, SourceMapGenerator: Mr } = tn, { fileURLToPath: Er, pathToFileURL: _r } = tn, Or = ln, Tr = yr, Lr = tn, Rr = Symbol("lineToIndexCache"), Ar = !(!vr || !Mr), Fr = !(!Sr || !br);
3468
+ let { nanoid: br } = cr, { isAbsolute: wr, resolve: Sr } = tn, { SourceMapConsumer: vr, SourceMapGenerator: Mr } = tn, { fileURLToPath: Er, pathToFileURL: _r } = tn, Or = ln, Tr = yr, Lr = tn, Rr = Symbol("lineToIndexCache"), Ar = !(!vr || !Mr), Nr = !(!Sr || !wr);
3469
3469
  function Ur(e) {
3470
3470
  if (e[Rr]) return e[Rr];
3471
3471
  let a = e.css.split("\n"), u = new Array(a.length), w2 = 0;
3472
3472
  for (let e2 = 0, x2 = a.length; e2 < x2; e2++) u[e2] = w2, w2 += a[e2].length + 1;
3473
3473
  return e[Rr] = u, u;
3474
3474
  }
3475
- let Nr = class {
3475
+ let Fr = class {
3476
3476
  get from() {
3477
3477
  return this.file || this.id;
3478
3478
  }
3479
3479
  constructor(e, a = {}) {
3480
3480
  if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
3481
- if (this.css = e.toString(), "\uFEFF" === this.css[0] || "￾" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!Fr || /^\w+:\/\//.test(a.from) || br(a.from) ? this.file = a.from : this.file = Sr(a.from)), Fr && Ar) {
3481
+ if (this.css = e.toString(), "\uFEFF" === this.css[0] || "￾" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!Nr || /^\w+:\/\//.test(a.from) || wr(a.from) ? this.file = a.from : this.file = Sr(a.from)), Nr && Ar) {
3482
3482
  let e2 = new Tr(this.css, a);
3483
3483
  if (e2.text) {
3484
3484
  this.map = e2;
@@ -3486,7 +3486,7 @@ let Nr = class {
3486
3486
  !this.file && a2 && (this.file = this.mapResolve(a2));
3487
3487
  }
3488
3488
  }
3489
- this.file || (this.id = "<input css " + wr(6) + ">"), this.map && (this.map.file = this.from);
3489
+ this.file || (this.id = "<input css " + br(6) + ">"), this.map && (this.map.file = this.from);
3490
3490
  }
3491
3491
  error(e, a, u, w2 = {}) {
3492
3492
  let x2, I2, M2, _2, A2;
@@ -3537,7 +3537,7 @@ let Nr = class {
3537
3537
  if (!this.map) return false;
3538
3538
  let x2, I2, M2 = this.map.consumer(), _2 = M2.originalPositionFor({ column: a, line: e });
3539
3539
  if (!_2.source) return false;
3540
- "number" == typeof u && (x2 = M2.originalPositionFor({ column: w2, line: u })), I2 = br(_2.source) ? _r(_2.source) : new URL(_2.source, this.map.consumer().sourceRoot || _r(this.map.mapFile));
3540
+ "number" == typeof u && (x2 = M2.originalPositionFor({ column: w2, line: u })), I2 = wr(_2.source) ? _r(_2.source) : new URL(_2.source, this.map.consumer().sourceRoot || _r(this.map.mapFile));
3541
3541
  let A2 = { column: _2.column, endColumn: x2 && x2.column, endLine: x2 && x2.line, line: _2.line, url: I2.toString() };
3542
3542
  if ("file:" === I2.protocol) {
3543
3543
  if (!Er) throw new Error("file: protocol is not available in this PostCSS build");
@@ -3552,9 +3552,9 @@ let Nr = class {
3552
3552
  return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
3553
3553
  }
3554
3554
  };
3555
- var Pr = Nr;
3556
- Nr.default = Nr, Lr && Lr.registerInput && Lr.registerInput(Nr);
3557
- let Dr, $r, jr = er, Br = class extends jr {
3555
+ var Pr = Fr;
3556
+ Fr.default = Fr, Lr && Lr.registerInput && Lr.registerInput(Fr);
3557
+ let Dr, $r, Br = er, jr = class extends Br {
3558
3558
  constructor(e) {
3559
3559
  super(e), this.type = "root", this.nodes || (this.nodes = []);
3560
3560
  }
@@ -3574,13 +3574,13 @@ let Dr, $r, jr = er, Br = class extends jr {
3574
3574
  return new Dr(new $r(), this, e).stringify();
3575
3575
  }
3576
3576
  };
3577
- Br.registerLazyResult = (e) => {
3577
+ jr.registerLazyResult = (e) => {
3578
3578
  Dr = e;
3579
- }, Br.registerProcessor = (e) => {
3579
+ }, jr.registerProcessor = (e) => {
3580
3580
  $r = e;
3581
3581
  };
3582
- var zr = Br;
3583
- Br.default = Br, jr.registerRoot(Br);
3582
+ var zr = jr;
3583
+ jr.default = jr, Br.registerRoot(jr);
3584
3584
  let Wr = { comma: (e) => Wr.split(e, [","], true), space(e) {
3585
3585
  let a = [" ", "\n", " "];
3586
3586
  return Wr.split(e, a);
@@ -3629,8 +3629,8 @@ function Ye(e, a) {
3629
3629
  }
3630
3630
  var po = Ye;
3631
3631
  Ye.default = Ye;
3632
- let { dirname: ho, relative: fo, resolve: mo, sep: go } = tn, { SourceMapConsumer: yo, SourceMapGenerator: wo } = tn, { pathToFileURL: _o } = tn, Ao = Pr, $o = !(!yo || !wo), jo = !!(ho && mo && fo && go);
3633
- var Bo = class {
3632
+ let { dirname: ho, relative: fo, resolve: mo, sep: go } = tn, { SourceMapConsumer: yo, SourceMapGenerator: wo } = tn, { pathToFileURL: _o } = tn, Ao = Pr, $o = !(!yo || !wo), Bo = !!(ho && mo && fo && go);
3633
+ var jo = class {
3634
3634
  constructor(e, a, u, w2) {
3635
3635
  this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, this.css = w2, this.originalCSS = w2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
3636
3636
  }
@@ -3653,7 +3653,7 @@ var Bo = class {
3653
3653
  } else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
3654
3654
  }
3655
3655
  generate() {
3656
- if (this.clearAnnotation(), jo && $o && this.isMap()) return this.generateMap();
3656
+ if (this.clearAnnotation(), Bo && $o && this.isMap()) return this.generateMap();
3657
3657
  {
3658
3658
  let e = "";
3659
3659
  return this.stringify(this.root, (a) => {
@@ -3760,7 +3760,7 @@ var Bo = class {
3760
3760
  };
3761
3761
  const zo = /[\t\n\f\r "#'()/;[\\\]{}]/g, Wo = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, Vo = /.[\r\n"'(/\\]/, Ho = /[\da-f]/i;
3762
3762
  let qo = rr, Ko = _n, Jo = Un, Xo = zr, Qo = eo, tl = function(e, a = {}) {
3763
- let u, w2, x2, I2, M2, _2, A2, F2, $2, j2, B2 = e.css.valueOf(), U2 = a.ignoreErrors, z2 = B2.length, W2 = 0, G2 = [], H2 = [];
3763
+ let u, w2, x2, I2, M2, _2, A2, F2, $2, B2, j2 = e.css.valueOf(), U2 = a.ignoreErrors, z2 = j2.length, W2 = 0, G2 = [], H2 = [];
3764
3764
  function v(a2) {
3765
3765
  throw e.error("Unclosed " + a2, W2);
3766
3766
  }
@@ -3772,7 +3772,7 @@ let qo = rr, Ko = _n, Jo = Un, Xo = zr, Qo = eo, tl = function(e, a = {}) {
3772
3772
  if (H2.length) return H2.pop();
3773
3773
  if (W2 >= z2) return;
3774
3774
  let a2 = !!e2 && e2.ignoreUnclosed;
3775
- switch (u = B2.charCodeAt(W2), u) {
3775
+ switch (u = j2.charCodeAt(W2), u) {
3776
3776
  case 10:
3777
3777
  case 32:
3778
3778
  case 9:
@@ -3780,9 +3780,9 @@ let qo = rr, Ko = _n, Jo = Un, Xo = zr, Qo = eo, tl = function(e, a = {}) {
3780
3780
  case 12:
3781
3781
  I2 = W2;
3782
3782
  do {
3783
- I2 += 1, u = B2.charCodeAt(I2);
3783
+ I2 += 1, u = j2.charCodeAt(I2);
3784
3784
  } while (32 === u || 10 === u || 9 === u || 13 === u || 12 === u);
3785
- _2 = ["space", B2.slice(W2, I2)], W2 = I2 - 1;
3785
+ _2 = ["space", j2.slice(W2, I2)], W2 = I2 - 1;
3786
3786
  break;
3787
3787
  case 91:
3788
3788
  case 93:
@@ -3796,49 +3796,49 @@ let qo = rr, Ko = _n, Jo = Un, Xo = zr, Qo = eo, tl = function(e, a = {}) {
3796
3796
  break;
3797
3797
  }
3798
3798
  case 40:
3799
- if (j2 = G2.length ? G2.pop()[1] : "", $2 = B2.charCodeAt(W2 + 1), "url" === j2 && 39 !== $2 && 34 !== $2 && 32 !== $2 && 10 !== $2 && 9 !== $2 && 12 !== $2 && 13 !== $2) {
3799
+ if (B2 = G2.length ? G2.pop()[1] : "", $2 = j2.charCodeAt(W2 + 1), "url" === B2 && 39 !== $2 && 34 !== $2 && 32 !== $2 && 10 !== $2 && 9 !== $2 && 12 !== $2 && 13 !== $2) {
3800
3800
  I2 = W2;
3801
3801
  do {
3802
- if (A2 = false, I2 = B2.indexOf(")", I2 + 1), -1 === I2) {
3802
+ if (A2 = false, I2 = j2.indexOf(")", I2 + 1), -1 === I2) {
3803
3803
  if (U2 || a2) {
3804
3804
  I2 = W2;
3805
3805
  break;
3806
3806
  }
3807
3807
  v("bracket");
3808
3808
  }
3809
- for (F2 = I2; 92 === B2.charCodeAt(F2 - 1); ) F2 -= 1, A2 = !A2;
3809
+ for (F2 = I2; 92 === j2.charCodeAt(F2 - 1); ) F2 -= 1, A2 = !A2;
3810
3810
  } while (A2);
3811
- _2 = ["brackets", B2.slice(W2, I2 + 1), W2, I2], W2 = I2;
3812
- } else I2 = B2.indexOf(")", W2 + 1), w2 = B2.slice(W2, I2 + 1), -1 === I2 || Vo.test(w2) ? _2 = ["(", "(", W2] : (_2 = ["brackets", w2, W2, I2], W2 = I2);
3811
+ _2 = ["brackets", j2.slice(W2, I2 + 1), W2, I2], W2 = I2;
3812
+ } else I2 = j2.indexOf(")", W2 + 1), w2 = j2.slice(W2, I2 + 1), -1 === I2 || Vo.test(w2) ? _2 = ["(", "(", W2] : (_2 = ["brackets", w2, W2, I2], W2 = I2);
3813
3813
  break;
3814
3814
  case 39:
3815
3815
  case 34:
3816
3816
  M2 = 39 === u ? "'" : '"', I2 = W2;
3817
3817
  do {
3818
- if (A2 = false, I2 = B2.indexOf(M2, I2 + 1), -1 === I2) {
3818
+ if (A2 = false, I2 = j2.indexOf(M2, I2 + 1), -1 === I2) {
3819
3819
  if (U2 || a2) {
3820
3820
  I2 = W2 + 1;
3821
3821
  break;
3822
3822
  }
3823
3823
  v("string");
3824
3824
  }
3825
- for (F2 = I2; 92 === B2.charCodeAt(F2 - 1); ) F2 -= 1, A2 = !A2;
3825
+ for (F2 = I2; 92 === j2.charCodeAt(F2 - 1); ) F2 -= 1, A2 = !A2;
3826
3826
  } while (A2);
3827
- _2 = ["string", B2.slice(W2, I2 + 1), W2, I2], W2 = I2;
3827
+ _2 = ["string", j2.slice(W2, I2 + 1), W2, I2], W2 = I2;
3828
3828
  break;
3829
3829
  case 64:
3830
- zo.lastIndex = W2 + 1, zo.test(B2), I2 = 0 === zo.lastIndex ? B2.length - 1 : zo.lastIndex - 2, _2 = ["at-word", B2.slice(W2, I2 + 1), W2, I2], W2 = I2;
3830
+ zo.lastIndex = W2 + 1, zo.test(j2), I2 = 0 === zo.lastIndex ? j2.length - 1 : zo.lastIndex - 2, _2 = ["at-word", j2.slice(W2, I2 + 1), W2, I2], W2 = I2;
3831
3831
  break;
3832
3832
  case 92:
3833
- for (I2 = W2, x2 = true; 92 === B2.charCodeAt(I2 + 1); ) I2 += 1, x2 = !x2;
3834
- if (u = B2.charCodeAt(I2 + 1), x2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (I2 += 1, Ho.test(B2.charAt(I2)))) {
3835
- for (; Ho.test(B2.charAt(I2 + 1)); ) I2 += 1;
3836
- 32 === B2.charCodeAt(I2 + 1) && (I2 += 1);
3833
+ for (I2 = W2, x2 = true; 92 === j2.charCodeAt(I2 + 1); ) I2 += 1, x2 = !x2;
3834
+ if (u = j2.charCodeAt(I2 + 1), x2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (I2 += 1, Ho.test(j2.charAt(I2)))) {
3835
+ for (; Ho.test(j2.charAt(I2 + 1)); ) I2 += 1;
3836
+ 32 === j2.charCodeAt(I2 + 1) && (I2 += 1);
3837
3837
  }
3838
- _2 = ["word", B2.slice(W2, I2 + 1), W2, I2], W2 = I2;
3838
+ _2 = ["word", j2.slice(W2, I2 + 1), W2, I2], W2 = I2;
3839
3839
  break;
3840
3840
  default:
3841
- 47 === u && 42 === B2.charCodeAt(W2 + 1) ? (I2 = B2.indexOf("*/", W2 + 2) + 1, 0 === I2 && (U2 || a2 ? I2 = B2.length : v("comment")), _2 = ["comment", B2.slice(W2, I2 + 1), W2, I2], W2 = I2) : (Wo.lastIndex = W2 + 1, Wo.test(B2), I2 = 0 === Wo.lastIndex ? B2.length - 1 : Wo.lastIndex - 2, _2 = ["word", B2.slice(W2, I2 + 1), W2, I2], G2.push(_2), W2 = I2);
3841
+ 47 === u && 42 === j2.charCodeAt(W2 + 1) ? (I2 = j2.indexOf("*/", W2 + 2) + 1, 0 === I2 && (U2 || a2 ? I2 = j2.length : v("comment")), _2 = ["comment", j2.slice(W2, I2 + 1), W2, I2], W2 = I2) : (Wo.lastIndex = W2 + 1, Wo.test(j2), I2 = 0 === Wo.lastIndex ? j2.length - 1 : Wo.lastIndex - 2, _2 = ["word", j2.slice(W2, I2 + 1), W2, I2], G2.push(_2), W2 = I2);
3842
3842
  }
3843
3843
  return W2++, _2;
3844
3844
  }, position: function b() {
@@ -4141,7 +4141,7 @@ let ps = {};
4141
4141
  var lo = function(e) {
4142
4142
  ps[e] || (ps[e] = true, typeof console < "u" && console.warn && console.warn(e));
4143
4143
  };
4144
- let hs = er, fs = lr, ms = Bo, ys = is, ws = ds, bs = zr, Ss = hn, { isClean: vs, my: ks } = mn, Cs = lo;
4144
+ let hs = er, fs = lr, ms = jo, ys = is, bs = ds, ws = zr, Ss = hn, { isClean: vs, my: ks } = mn, Cs = lo;
4145
4145
  const Ms = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, Es = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, Os = { Once: true, postcssPlugin: true, prepare: true };
4146
4146
  function Fe(e) {
4147
4147
  return "object" == typeof e && "function" == typeof e.then;
@@ -4184,7 +4184,7 @@ let Ts = {}, Ls = class co {
4184
4184
  }
4185
4185
  constructor(e, a, u) {
4186
4186
  let w2;
4187
- if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof co || a instanceof ws) w2 = Ns(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
4187
+ if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof co || a instanceof bs) w2 = Ns(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
4188
4188
  else {
4189
4189
  let e2 = ys;
4190
4190
  u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
@@ -4196,7 +4196,7 @@ let Ts = {}, Ls = class co {
4196
4196
  w2 && !w2[ks] && hs.rebuild(w2);
4197
4197
  }
4198
4198
  else w2 = Ns(a);
4199
- this.result = new ws(e, w2, u), this.helpers = { ...Ts, postcss: Ts, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
4199
+ this.result = new bs(e, w2, u), this.helpers = { ...Ts, postcss: Ts, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
4200
4200
  }
4201
4201
  async() {
4202
4202
  return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
@@ -4377,8 +4377,8 @@ Ls.registerPostcss = (e) => {
4377
4377
  Ts = e;
4378
4378
  };
4379
4379
  var Rs = Ls;
4380
- Ls.default = Ls, bs.registerLazyResult(Ls), fs.registerLazyResult(Ls);
4381
- let As = Bo, Fs = is;
4380
+ Ls.default = Ls, ws.registerLazyResult(Ls), fs.registerLazyResult(Ls);
4381
+ let As = jo, Fs = is;
4382
4382
  const Ps = ds;
4383
4383
  let Ds = hn, $s = lo, Bs = class {
4384
4384
  get content() {
@@ -4474,7 +4474,7 @@ let Gs = lr, Hs = Rs, qs = zs, Ks = zr, Ys = class {
4474
4474
  };
4475
4475
  var Zs = Ys;
4476
4476
  Ys.default = Ys, Ks.registerProcessor(Ys), Gs.registerProcessor(Ys);
4477
- let Js = rr, Xs = _n, ei = er, ti = ln, ni = Un, ri = lr, oi = po, si = Pr, ii = Rs, ai = Gr, li = xn, di = is, pi = Zs, fi = ds, mi = zr, gi = eo, yi = hn, wi = ls;
4477
+ let Js = rr, Xs = _n, ei = er, ti = ln, ni = Un, ri = lr, oi = po, si = Pr, ii = Rs, ai = Gr, li = xn, di = is, pi = Zs, fi = ds, mi = zr, gi = eo, yi = hn, bi = ls;
4478
4478
  function N(...e) {
4479
4479
  return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new pi(e);
4480
4480
  }
@@ -4488,10 +4488,10 @@ N.plugin = function(e, a) {
4488
4488
  return Object.defineProperty(r, "postcss", { get: () => (u || (u = r()), u) }), r.process = function(e2, a2, u2) {
4489
4489
  return N([r(u2)]).process(e2, a2);
4490
4490
  }, r;
4491
- }, N.stringify = yi, N.parse = di, N.fromJSON = oi, N.list = ai, N.comment = (e) => new Xs(e), N.atRule = (e) => new Js(e), N.decl = (e) => new ni(e), N.rule = (e) => new gi(e), N.root = (e) => new mi(e), N.document = (e) => new ri(e), N.CssSyntaxError = ti, N.Declaration = ni, N.Container = ei, N.Processor = pi, N.Document = ri, N.Comment = Xs, N.Warning = wi, N.AtRule = Js, N.Result = fi, N.Input = si, N.Rule = gi, N.Root = mi, N.Node = li, ii.registerPostcss(N);
4492
- var bi = N;
4491
+ }, N.stringify = yi, N.parse = di, N.fromJSON = oi, N.list = ai, N.comment = (e) => new Xs(e), N.atRule = (e) => new Js(e), N.decl = (e) => new ni(e), N.rule = (e) => new gi(e), N.root = (e) => new mi(e), N.document = (e) => new ri(e), N.CssSyntaxError = ti, N.Declaration = ni, N.Container = ei, N.Processor = pi, N.Document = ri, N.Comment = Xs, N.Warning = bi, N.AtRule = Js, N.Result = fi, N.Input = si, N.Rule = gi, N.Root = mi, N.Node = li, ii.registerPostcss(N);
4492
+ var wi = N;
4493
4493
  N.default = N;
4494
- const Si = qi(bi);
4494
+ const Si = qi(wi);
4495
4495
  Si.stringify, Si.fromJSON, Si.plugin, Si.parse, Si.list, Si.document, Si.comment, Si.atRule, Si.rule, Si.decl, Si.root, Si.CssSyntaxError, Si.Declaration, Si.Container, Si.Processor, Si.Document, Si.Comment, Si.Warning, Si.AtRule, Si.Result, Si.Input, Si.Rule, Si.Root, Si.Node;
4496
4496
  var vi = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(vi || {}), ki = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e[e.Typing = 17] = "Typing", e))(ki || {}), Ci = ((e) => (e.Append = "append", e.Insert = "insert", e.Delete = "delete", e.Replace = "replace", e))(Ci || {}), _i = ((e) => (e[e.MouseUp = 0] = "MouseUp", e[e.MouseDown = 1] = "MouseDown", e[e.Click = 2] = "Click", e[e.ContextMenu = 3] = "ContextMenu", e[e.DblClick = 4] = "DblClick", e[e.Focus = 5] = "Focus", e[e.Blur = 6] = "Blur", e[e.TouchStart = 7] = "TouchStart", e[e.TouchMove_Departed = 8] = "TouchMove_Departed", e[e.TouchEnd = 9] = "TouchEnd", e[e.TouchCancel = 10] = "TouchCancel", e))(_i || {}), Ai = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(Ai || {}), Fi = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(Fi || {}), Pi = ((e) => (e[e.Play = 0] = "Play", e[e.Pause = 1] = "Pause", e[e.Seeked = 2] = "Seeked", e[e.VolumeChange = 3] = "VolumeChange", e[e.RateChange = 4] = "RateChange", e))(Pi || {});
4497
4497
  function V(e, a, u = document) {
@@ -4891,9 +4891,9 @@ class eu {
4891
4891
  let _2 = 0;
4892
4892
  const A2 = u3.length - I2, F2 = w3.length - I2, $2 = Math.min(A2, F2);
4893
4893
  for (; _2 < $2 && u3[u3.length - 1 - _2] === w3[w3.length - 1 - _2]; ) _2++;
4894
- const j2 = u3.length - I2 - _2, B2 = w3.length - I2 - _2, U2 = w3.slice(I2, w3.length - _2);
4894
+ const B2 = u3.length - I2 - _2, j2 = w3.length - I2 - _2, U2 = w3.slice(I2, w3.length - _2);
4895
4895
  let z2;
4896
- return z2 = 0 === j2 && B2 > 0 ? { op: Ci.Insert, pos: I2, text: U2 } : j2 > 0 && 0 === B2 ? { op: Ci.Delete, pos: I2, length: j2 } : { op: Ci.Replace, pos: I2, deleteCount: j2, text: U2 }, { delta: z2, deltaSize: mt({ delta: z2 }), fullTextSize: x3 };
4896
+ return z2 = 0 === B2 && j2 > 0 ? { op: Ci.Insert, pos: I2, text: U2 } : B2 > 0 && 0 === j2 ? { op: Ci.Delete, pos: I2, length: B2 } : { op: Ci.Replace, pos: I2, deleteCount: B2, text: U2 }, { delta: z2, deltaSize: mt({ delta: z2 }), fullTextSize: x3 };
4897
4897
  })(e2.oldValue, e2.value);
4898
4898
  if ((function Ql(e3) {
4899
4899
  return !!e3.delta && e3.deltaSize < 0.8 * e3.fullTextSize;
@@ -5068,8 +5068,8 @@ function ru({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: w2, blockSel
5068
5068
  null !== _3 ? (A2 = _3, (F3.startsWith("Touch") && _3 === Ai.Touch || F3.startsWith("Mouse") && _3 === Ai.Mouse) && (_3 = null)) : _i[a2] === _i.Click && (_3 = A2, A2 = null);
5069
5069
  const $2 = Us(I4) ? I4.changedTouches[0] : I4;
5070
5070
  if (!$2) return;
5071
- const j2 = u.getId(M4), { clientX: B2, clientY: U2 } = $2;
5072
- E(e)({ type: _i[F3], id: j2, x: B2, y: U2, ...null !== _3 && { pointerType: _3 } });
5071
+ const B2 = u.getId(M4), { clientX: j2, clientY: U2 } = $2;
5072
+ E(e)({ type: _i[F3], id: B2, x: j2, y: U2, ...null !== _3 && { pointerType: _3 } });
5073
5073
  })(I3);
5074
5074
  if (window.PointerEvent) switch (_i[I3]) {
5075
5075
  case _i.MouseDown:
@@ -5173,7 +5173,7 @@ function gu(e, a = {}) {
5173
5173
  };
5174
5174
  let w2;
5175
5175
  !(function mu(e2, a2) {
5176
- const { mutationCb: u2, mousemoveCb: w3, mouseInteractionCb: x3, scrollCb: I3, viewportResizeCb: M3, inputCb: _3, typingCb: A3, deviceChangeCb: F3, mediaInteractionCb: $3, styleSheetRuleCb: j3, styleDeclarationCb: B3, canvasMutationCb: U3, fontCb: z3, selectionCb: W2, customElementCb: G2 } = e2;
5176
+ const { mutationCb: u2, mousemoveCb: w3, mouseInteractionCb: x3, scrollCb: I3, viewportResizeCb: M3, inputCb: _3, typingCb: A3, deviceChangeCb: F3, mediaInteractionCb: $3, styleSheetRuleCb: B3, styleDeclarationCb: j3, canvasMutationCb: U3, fontCb: z3, selectionCb: W2, customElementCb: G2 } = e2;
5177
5177
  e2.mutationCb = (...e3) => {
5178
5178
  a2.mutation && a2.mutation(...e3), u2(...e3);
5179
5179
  }, e2.mousemoveCb = (...e3) => {
@@ -5193,9 +5193,9 @@ function gu(e, a = {}) {
5193
5193
  }, e2.mediaInteractionCb = (...e3) => {
5194
5194
  a2.mediaInteaction && a2.mediaInteaction(...e3), $3(...e3);
5195
5195
  }, e2.styleSheetRuleCb = (...e3) => {
5196
- a2.styleSheetRule && a2.styleSheetRule(...e3), j3(...e3);
5196
+ a2.styleSheetRule && a2.styleSheetRule(...e3), B3(...e3);
5197
5197
  }, e2.styleDeclarationCb = (...e3) => {
5198
- a2.styleDeclaration && a2.styleDeclaration(...e3), B3(...e3);
5198
+ a2.styleDeclaration && a2.styleDeclaration(...e3), j3(...e3);
5199
5199
  }, e2.canvasMutationCb = (...e3) => {
5200
5200
  a2.canvasMutation && a2.canvasMutation(...e3), U3(...e3);
5201
5201
  }, e2.fontCb = (...e3) => {
@@ -5231,11 +5231,11 @@ function gu(e, a = {}) {
5231
5231
  })(e, { win: u }), A2 = (function iu({ inputCb: e2, doc: a2, mirror: u2, blockClass: w3, blockSelector: x3, ignoreClass: I3, ignoreSelector: M3, maskInputOptions: _3, maskInputFn: A3, sampling: F3, userTriggeredOnInput: $3 }) {
5232
5232
  function p(e3) {
5233
5233
  let u3 = st(e3);
5234
- const F4 = e3.isTrusted, j4 = u3 && u3.tagName;
5235
- if (u3 && "OPTION" === j4 && (u3 = u3.parentElement), !u3 || !j4 || ra.indexOf(j4) < 0 || $$1(u3, w3, x3, true) || u3.classList.contains(I3) || M3 && u3.matches(M3)) return;
5236
- let B4 = u3.value, U4 = false;
5237
- const z4 = Ht(u3) || "", { value: W2, masked: G2 } = Zt({ element: u3, maskInputOptions: _3, tagName: j4, type: z4, value: B4, maskInputFn: A3 });
5238
- B4 = W2, ("radio" === z4 || "checkbox" === z4) && (U4 = u3.checked), m2(u3, $3 ? { text: B4, isChecked: U4, masked: G2, userTriggered: F4 } : { text: B4, isChecked: U4, masked: G2 });
5234
+ const F4 = e3.isTrusted, B4 = u3 && u3.tagName;
5235
+ if (u3 && "OPTION" === B4 && (u3 = u3.parentElement), !u3 || !B4 || ra.indexOf(B4) < 0 || $$1(u3, w3, x3, true) || u3.classList.contains(I3) || M3 && u3.matches(M3)) return;
5236
+ let j4 = u3.value, U4 = false;
5237
+ const z4 = Ht(u3) || "", { value: W2, masked: G2 } = Zt({ element: u3, maskInputOptions: _3, tagName: B4, type: z4, value: j4, maskInputFn: A3 });
5238
+ j4 = W2, ("radio" === z4 || "checkbox" === z4) && (U4 = u3.checked), m2(u3, $3 ? { text: j4, isChecked: U4, masked: G2, userTriggered: F4 } : { text: j4, isChecked: U4, masked: G2 });
5239
5239
  const H2 = u3.name;
5240
5240
  "radio" === z4 && H2 && U4 && a2.querySelectorAll(`input[type='radio'][name='${H2}']`).forEach((e4) => {
5241
5241
  if (e4 !== u3) {
@@ -5252,15 +5252,15 @@ function gu(e, a = {}) {
5252
5252
  E(e2)({ ...w4, id: x5 });
5253
5253
  }
5254
5254
  }
5255
- const j3 = ("last" === F3.input ? ["change"] : ["input", "change"]).map((e3) => V(e3, E(p), a2)), B3 = a2.defaultView;
5256
- if (!B3) return () => {
5257
- j3.forEach((e3) => e3());
5255
+ const B3 = ("last" === F3.input ? ["change"] : ["input", "change"]).map((e3) => V(e3, E(p), a2)), j3 = a2.defaultView;
5256
+ if (!j3) return () => {
5257
+ B3.forEach((e3) => e3());
5258
5258
  };
5259
- const U3 = B3.Object.getOwnPropertyDescriptor(B3.HTMLInputElement.prototype, "value"), z3 = [[B3.HTMLInputElement.prototype, "value"], [B3.HTMLInputElement.prototype, "checked"], [B3.HTMLSelectElement.prototype, "value"], [B3.HTMLTextAreaElement.prototype, "value"], [B3.HTMLSelectElement.prototype, "selectedIndex"], [B3.HTMLOptionElement.prototype, "selected"]];
5260
- return U3 && U3.set && j3.push(...z3.map((e3) => ts(e3[0], e3[1], { set() {
5259
+ const U3 = j3.Object.getOwnPropertyDescriptor(j3.HTMLInputElement.prototype, "value"), z3 = [[j3.HTMLInputElement.prototype, "value"], [j3.HTMLInputElement.prototype, "checked"], [j3.HTMLSelectElement.prototype, "value"], [j3.HTMLTextAreaElement.prototype, "value"], [j3.HTMLSelectElement.prototype, "selectedIndex"], [j3.HTMLOptionElement.prototype, "selected"]];
5260
+ return U3 && U3.set && B3.push(...z3.map((e3) => ts(e3[0], e3[1], { set() {
5261
5261
  E(p)({ target: this, isTrusted: false });
5262
- } }, false, B3))), E(() => {
5263
- j3.forEach((e3) => e3());
5262
+ } }, false, j3))), E(() => {
5263
+ B3.forEach((e3) => e3());
5264
5264
  });
5265
5265
  })(e), F2 = (function au({ typingCb: e2, doc: a2, maskInputOptions: u2, maskInputFn: w3 }) {
5266
5266
  const x3 = V("keydown", (a3) => {
@@ -5294,12 +5294,12 @@ function gu(e, a = {}) {
5294
5294
  return () => {
5295
5295
  x3();
5296
5296
  };
5297
- })(e), $2 = lu(e), j2 = (function hu({ mediaInteractionCb: e2, blockClass: a2, blockSelector: u2, mirror: w3, sampling: x3, doc: I3 }) {
5297
+ })(e), $2 = lu(e), B2 = (function hu({ mediaInteractionCb: e2, blockClass: a2, blockSelector: u2, mirror: w3, sampling: x3, doc: I3 }) {
5298
5298
  const M3 = E((I4) => He(E((x4) => {
5299
5299
  const M4 = st(x4);
5300
5300
  if (!M4 || $$1(M4, a2, u2, true)) return;
5301
- const { currentTime: _4, volume: A3, muted: F3, playbackRate: $3, loop: j3 } = M4;
5302
- e2({ type: I4, id: w3.getId(M4), currentTime: _4, volume: A3, muted: F3, playbackRate: $3, loop: j3 });
5301
+ const { currentTime: _4, volume: A3, muted: F3, playbackRate: $3, loop: B3 } = M4;
5302
+ e2({ type: I4, id: w3.getId(M4), currentTime: _4, volume: A3, muted: F3, playbackRate: $3, loop: B3 });
5303
5303
  }), x3.media || 500)), _3 = [V("play", M3(Pi.Play), I3), V("pause", M3(Pi.Pause), I3), V("seeked", M3(Pi.Seeked), I3), V("volumechange", M3(Pi.VolumeChange), I3), V("ratechange", M3(Pi.RateChange), I3)];
5304
5304
  return E(() => {
5305
5305
  _3.forEach((e3) => e3());
@@ -5350,18 +5350,18 @@ function gu(e, a = {}) {
5350
5350
  const I3 = x3.CSSStyleDeclaration.prototype.setProperty;
5351
5351
  x3.CSSStyleDeclaration.prototype.setProperty = new Proxy(I3, { apply: E((x4, M4, _3) => {
5352
5352
  var A3;
5353
- const [F3, $3, j3] = _3;
5354
- if (u2.has(F3)) return I3.apply(M4, [F3, $3, j3]);
5355
- const { id: B3, styleId: U3 } = de(null == (A3 = M4.parentRule) ? void 0 : A3.parentStyleSheet, a2, w3.styleMirror);
5356
- return (B3 && -1 !== B3 || U3 && -1 !== U3) && e2({ id: B3, styleId: U3, set: { property: F3, value: $3, priority: j3 }, index: jt(M4.parentRule) }), x4.apply(M4, _3);
5353
+ const [F3, $3, B3] = _3;
5354
+ if (u2.has(F3)) return I3.apply(M4, [F3, $3, B3]);
5355
+ const { id: j3, styleId: U3 } = de(null == (A3 = M4.parentRule) ? void 0 : A3.parentStyleSheet, a2, w3.styleMirror);
5356
+ return (j3 && -1 !== j3 || U3 && -1 !== U3) && e2({ id: j3, styleId: U3, set: { property: F3, value: $3, priority: B3 }, index: jt(M4.parentRule) }), x4.apply(M4, _3);
5357
5357
  }) });
5358
5358
  const M3 = x3.CSSStyleDeclaration.prototype.removeProperty;
5359
5359
  return x3.CSSStyleDeclaration.prototype.removeProperty = new Proxy(M3, { apply: E((x4, I4, _3) => {
5360
5360
  var A3;
5361
5361
  const [F3] = _3;
5362
5362
  if (u2.has(F3)) return M3.apply(I4, [F3]);
5363
- const { id: $3, styleId: j3 } = de(null == (A3 = I4.parentRule) ? void 0 : A3.parentStyleSheet, a2, w3.styleMirror);
5364
- return ($3 && -1 !== $3 || j3 && -1 !== j3) && e2({ id: $3, styleId: j3, remove: { property: F3 }, index: jt(I4.parentRule) }), x4.apply(I4, _3);
5363
+ const { id: $3, styleId: B3 } = de(null == (A3 = I4.parentRule) ? void 0 : A3.parentStyleSheet, a2, w3.styleMirror);
5364
+ return ($3 && -1 !== $3 || B3 && -1 !== B3) && e2({ id: $3, styleId: B3, remove: { property: F3 }, index: jt(I4.parentRule) }), x4.apply(I4, _3);
5365
5365
  }) }), E(() => {
5366
5366
  x3.CSSStyleDeclaration.prototype.setProperty = I3, x3.CSSStyleDeclaration.prototype.removeProperty = M3;
5367
5367
  });
@@ -5390,7 +5390,7 @@ function gu(e, a = {}) {
5390
5390
  w3.forEach((e3) => e3());
5391
5391
  });
5392
5392
  })(e)));
5393
- const B2 = (function du(e2) {
5393
+ const j2 = (function du(e2) {
5394
5394
  const { doc: a2, mirror: u2, blockClass: w3, blockSelector: x3, selectionCb: I3 } = e2;
5395
5395
  let M3 = true;
5396
5396
  const _3 = E(() => {
@@ -5421,7 +5421,7 @@ function gu(e, a = {}) {
5421
5421
  })(e), z2 = [];
5422
5422
  for (const a2 of e.plugins) z2.push(a2.observer(a2.callback, u, a2.options));
5423
5423
  return E(() => {
5424
- ta.forEach((e2) => e2.reset()), null == w2 || w2.disconnect(), x2(), I2(), M2(), _2(), A2(), F2(), j2(), m(), f(), g2(), h(), B2(), U2(), $2(), z2.forEach((e2) => e2());
5424
+ ta.forEach((e2) => e2.reset()), null == w2 || w2.disconnect(), x2(), I2(), M2(), _2(), A2(), F2(), B2(), m(), f(), g2(), h(), j2(), U2(), $2(), z2.forEach((e2) => e2());
5425
5425
  });
5426
5426
  }
5427
5427
  function gt(e) {
@@ -5741,7 +5741,7 @@ const ya = (function Li() {
5741
5741
  return new Ot();
5742
5742
  })();
5743
5743
  function he(e = {}) {
5744
- const { emit: a, checkoutEveryNms: u, checkoutEveryNth: w2, blockClass: x2 = "rr-block", blockSelector: I2 = null, ignoreClass: M2 = "rr-ignore", ignoreSelector: _2 = null, maskTextClass: A2 = "rr-mask", maskTextSelector: F2 = null, inlineStylesheet: $2 = true, maskAllInputs: j2, maskInputOptions: B2, slimDOMOptions: U2, maskInputFn: z2, maskTextFn: W2, hooks: G2, packFn: H2, sampling: K2 = {}, dataURLOptions: Y2 = {}, mousemoveWait: Z2, recordDOM: J2 = true, recordCanvas: X2 = false, recordCrossOriginIframes: Q2 = false, recordAfter: ee2 = "DOMContentLoaded" === e.recordAfter ? e.recordAfter : "load", userTriggeredOnInput: te2 = false, collectFonts: ne2 = false, inlineImages: re2 = false, plugins: se2, keepIframeSrcFn: le2 = () => false, ignoreCSSAttributes: ce2 = /* @__PURE__ */ new Set([]), errorHandler: ue2 } = e;
5744
+ const { emit: a, checkoutEveryNms: u, checkoutEveryNth: w2, blockClass: x2 = "rr-block", blockSelector: I2 = null, ignoreClass: M2 = "rr-ignore", ignoreSelector: _2 = null, maskTextClass: A2 = "rr-mask", maskTextSelector: F2 = null, inlineStylesheet: $2 = true, maskAllInputs: B2, maskInputOptions: j2, slimDOMOptions: U2, maskInputFn: z2, maskTextFn: W2, hooks: G2, packFn: H2, sampling: K2 = {}, dataURLOptions: Y2 = {}, mousemoveWait: Z2, recordDOM: J2 = true, recordCanvas: X2 = false, recordCrossOriginIframes: Q2 = false, recordAfter: ee2 = "DOMContentLoaded" === e.recordAfter ? e.recordAfter : "load", userTriggeredOnInput: te2 = false, collectFonts: ne2 = false, inlineImages: re2 = false, plugins: se2, keepIframeSrcFn: le2 = () => false, ignoreCSSAttributes: ce2 = /* @__PURE__ */ new Set([]), errorHandler: ue2 } = e;
5745
5745
  !(function Hl(e2) {
5746
5746
  zi = e2;
5747
5747
  })(ue2);
@@ -5756,7 +5756,7 @@ function he(e = {}) {
5756
5756
  if (!pe2 && !fe2) return () => {
5757
5757
  };
5758
5758
  void 0 !== Z2 && void 0 === K2.mousemove && (K2.mousemove = Z2), ya.reset();
5759
- const me2 = true === j2 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : void 0 !== B2 ? B2 : { password: true }, ye2 = true === U2 || "all" === U2 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaVerification: true, headMetaAuthorship: "all" === U2, headMetaDescKeywords: "all" === U2, headTitleMutations: "all" === U2 } : U2 || {};
5759
+ const me2 = true === B2 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : void 0 !== j2 ? j2 : { password: true }, ye2 = true === U2 || "all" === U2 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaVerification: true, headMetaAuthorship: "all" === U2, headMetaDescKeywords: "all" === U2, headTitleMutations: "all" === U2 } : U2 || {};
5760
5760
  !(function $l(e2 = window) {
5761
5761
  "NodeList" in e2 && !e2.NodeList.prototype.forEach && (e2.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e2 && !e2.DOMTokenList.prototype.forEach && (e2.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...e3) => {
5762
5762
  let a2 = e3[0];
@@ -5767,7 +5767,7 @@ function he(e = {}) {
5767
5767
  return false;
5768
5768
  });
5769
5769
  })();
5770
- let we2, be2 = 0;
5770
+ let be2, we2 = 0;
5771
5771
  const Cr = (e2) => {
5772
5772
  for (const a2 of se2 || []) a2.eventProcessor && (e2 = a2.eventProcessor(e2));
5773
5773
  return H2 && !fe2 && (e2 = H2(e2)), e2;
@@ -5780,11 +5780,11 @@ function he(e = {}) {
5780
5780
  const e3 = { type: "@sailfish-rrweb/rrweb", event: Cr(M3), origin: window.location.origin, isCheckout: x3 };
5781
5781
  window.parent.postMessage(e3, "*");
5782
5782
  }
5783
- if (M3.type === vi.FullSnapshot) we2 = M3, be2 = 0;
5783
+ if (M3.type === vi.FullSnapshot) be2 = M3, we2 = 0;
5784
5784
  else if (M3.type === vi.IncrementalSnapshot) {
5785
5785
  if (M3.data.source === ki.Mutation && M3.data.isAttachIframe) return;
5786
- be2++;
5787
- const e3 = w2 && be2 >= w2, a2 = u && M3.timestamp - we2.timestamp > u;
5786
+ we2++;
5787
+ const e3 = w2 && we2 >= w2, a2 = u && M3.timestamp - be2.timestamp > u;
5788
5788
  (e3 || a2) && ha(true);
5789
5789
  }
5790
5790
  };
@@ -5799,8 +5799,8 @@ function he(e = {}) {
5799
5799
  if (!J2) return;
5800
5800
  pa({ type: vi.Meta, data: { href: window.location.href, width: vo(), height: So() } }, e2), Se2.reset(), Ce2.init(), ta.forEach((e3) => e3.lock());
5801
5801
  const a2 = [], u2 = (function Qi(e3, a3) {
5802
- const { mirror: u3 = new Ot(), blockClass: w3 = "rr-block", blockSelector: x3 = null, maskTextClass: I3 = "rr-mask", maskTextSelector: M3 = null, inlineStylesheet: _3 = true, inlineImages: A3 = false, recordCanvas: F3 = false, maskAllInputs: $3 = false, maskTextFn: j3, maskInputFn: B3, slimDOM: U3 = false, dataURLOptions: z3, preserveWhiteSpace: W3, onSerialize: G3, onIframeLoad: H3, iframeLoadTimeout: K3, onStylesheetLoad: Y3, stylesheetLoadTimeout: Z3, keepIframeSrcFn: J3 = () => false, corruptedRules: X3 } = a3 || {};
5803
- return ke(e3, { doc: e3, mirror: u3, blockClass: w3, blockSelector: x3, maskTextClass: I3, maskTextSelector: M3, skipChild: false, inlineStylesheet: _3, maskInputOptions: true === $3 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : false === $3 ? { password: true } : $3, maskTextFn: j3, maskInputFn: B3, slimDOMOptions: true === U3 || "all" === U3 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaDescKeywords: "all" === U3, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaAuthorship: true, headMetaVerification: true } : false === U3 ? {} : U3, dataURLOptions: z3, inlineImages: A3, recordCanvas: F3, preserveWhiteSpace: W3, onSerialize: G3, onIframeLoad: H3, iframeLoadTimeout: K3, onStylesheetLoad: Y3, stylesheetLoadTimeout: Z3, keepIframeSrcFn: J3, newlyAddedElement: false, corruptedRules: X3 });
5802
+ const { mirror: u3 = new Ot(), blockClass: w3 = "rr-block", blockSelector: x3 = null, maskTextClass: I3 = "rr-mask", maskTextSelector: M3 = null, inlineStylesheet: _3 = true, inlineImages: A3 = false, recordCanvas: F3 = false, maskAllInputs: $3 = false, maskTextFn: B3, maskInputFn: j3, slimDOM: U3 = false, dataURLOptions: z3, preserveWhiteSpace: W3, onSerialize: G3, onIframeLoad: H3, iframeLoadTimeout: K3, onStylesheetLoad: Y3, stylesheetLoadTimeout: Z3, keepIframeSrcFn: J3 = () => false, corruptedRules: X3 } = a3 || {};
5803
+ return ke(e3, { doc: e3, mirror: u3, blockClass: w3, blockSelector: x3, maskTextClass: I3, maskTextSelector: M3, skipChild: false, inlineStylesheet: _3, maskInputOptions: true === $3 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : false === $3 ? { password: true } : $3, maskTextFn: B3, maskInputFn: j3, slimDOMOptions: true === U3 || "all" === U3 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaDescKeywords: "all" === U3, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaAuthorship: true, headMetaVerification: true } : false === U3 ? {} : U3, dataURLOptions: z3, inlineImages: A3, recordCanvas: F3, preserveWhiteSpace: W3, onSerialize: G3, onIframeLoad: H3, iframeLoadTimeout: K3, onStylesheetLoad: Y3, stylesheetLoadTimeout: Z3, keepIframeSrcFn: J3, newlyAddedElement: false, corruptedRules: X3 });
5804
5804
  })(document, { mirror: ya, blockClass: x2, blockSelector: I2, maskTextClass: A2, maskTextSelector: F2, inlineStylesheet: $2, maskAllInputs: me2, maskTextFn: W2, maskInputFn: z2, slimDOM: ye2, dataURLOptions: Y2, recordCanvas: X2, inlineImages: re2, corruptedRules: a2, onSerialize: (e3) => {
5805
5805
  xo(e3, ya) && ve2.addIframe(e3), Io(e3, ya) && Se2.trackLinkElement(e3), _s(e3) && Ce2.addShadowRoot(e3.shadowRoot, document);
5806
5806
  }, onIframeLoad: (e3, a3) => {
@@ -5878,11 +5878,11 @@ he.addCustomEvent = (e, a) => {
5878
5878
  if (!ma) throw new Error("please take full snapshot after start recording");
5879
5879
  ha(e);
5880
5880
  }, he.mirror = ya;
5881
- var wa = { exports: {} }, ba = String, Fo = function() {
5882
- return { isColorSupported: false, reset: ba, bold: ba, dim: ba, italic: ba, underline: ba, inverse: ba, hidden: ba, strikethrough: ba, black: ba, red: ba, green: ba, yellow: ba, blue: ba, magenta: ba, cyan: ba, white: ba, gray: ba, bgBlack: ba, bgRed: ba, bgGreen: ba, bgYellow: ba, bgBlue: ba, bgMagenta: ba, bgCyan: ba, bgWhite: ba, blackBright: ba, redBright: ba, greenBright: ba, yellowBright: ba, blueBright: ba, magentaBright: ba, cyanBright: ba, whiteBright: ba, bgBlackBright: ba, bgRedBright: ba, bgGreenBright: ba, bgYellowBright: ba, bgBlueBright: ba, bgMagentaBright: ba, bgCyanBright: ba, bgWhiteBright: ba };
5881
+ var ba = { exports: {} }, wa = String, Fo = function() {
5882
+ return { isColorSupported: false, reset: wa, bold: wa, dim: wa, italic: wa, underline: wa, inverse: wa, hidden: wa, strikethrough: wa, black: wa, red: wa, green: wa, yellow: wa, blue: wa, magenta: wa, cyan: wa, white: wa, gray: wa, bgBlack: wa, bgRed: wa, bgGreen: wa, bgYellow: wa, bgBlue: wa, bgMagenta: wa, bgCyan: wa, bgWhite: wa, blackBright: wa, redBright: wa, greenBright: wa, yellowBright: wa, blueBright: wa, magentaBright: wa, cyanBright: wa, whiteBright: wa, bgBlackBright: wa, bgRedBright: wa, bgGreenBright: wa, bgYellowBright: wa, bgBlueBright: wa, bgMagentaBright: wa, bgCyanBright: wa, bgWhiteBright: wa };
5883
5883
  };
5884
- wa.exports = Fo(), wa.exports.createColors = Fo;
5885
- var va = wa.exports;
5884
+ ba.exports = Fo(), ba.exports.createColors = Fo;
5885
+ var va = ba.exports;
5886
5886
  const ka = Lu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
5887
5887
  let xa = va, Ca = ka, Ia = class Uo extends Error {
5888
5888
  constructor(e, a, u, w2, x2, I2) {
@@ -6072,7 +6072,7 @@ var La = js;
6072
6072
  js.default = js;
6073
6073
  var Ra = {};
6074
6074
  Ra.isClean = Symbol("isClean"), Ra.my = Symbol("my");
6075
- let Aa = Ma, Fa = Oa, Na = La, { isClean: Pa, my: Da } = Ra;
6075
+ let Aa = Ma, Na = Oa, Fa = La, { isClean: Pa, my: Da } = Ra;
6076
6076
  function Vs(e, a) {
6077
6077
  let u = new e.constructor();
6078
6078
  for (let w2 in e) {
@@ -6191,7 +6191,7 @@ let $a = class {
6191
6191
  return (w2.line < u.line || w2.line === u.line && w2.column <= u.column) && (w2 = { column: u.column + 1, line: u.line, offset: u.offset + 1 }), { end: w2, start: u };
6192
6192
  }
6193
6193
  raw(e, a) {
6194
- return new Fa().raw(this, e, a);
6194
+ return new Na().raw(this, e, a);
6195
6195
  }
6196
6196
  remove() {
6197
6197
  return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
@@ -6229,7 +6229,7 @@ let $a = class {
6229
6229
  toProxy() {
6230
6230
  return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
6231
6231
  }
6232
- toString(e = Na) {
6232
+ toString(e = Fa) {
6233
6233
  e.stringify && (e = e.stringify);
6234
6234
  let a = "";
6235
6235
  return e(this, (e2) => {
@@ -6242,16 +6242,16 @@ let $a = class {
6242
6242
  return e.warn(a, w2);
6243
6243
  }
6244
6244
  };
6245
- var ja = $a;
6245
+ var Ba = $a;
6246
6246
  $a.default = $a;
6247
- let Ba = ja, Ua = class extends Ba {
6247
+ let ja = Ba, Ua = class extends ja {
6248
6248
  constructor(e) {
6249
6249
  super(e), this.type = "comment";
6250
6250
  }
6251
6251
  };
6252
6252
  var za = Ua;
6253
6253
  Ua.default = Ua;
6254
- let Wa = ja, Ga = class extends Wa {
6254
+ let Wa = Ba, Ga = class extends Wa {
6255
6255
  get variable() {
6256
6256
  return this.prop.startsWith("--") || "$" === this.prop[0];
6257
6257
  }
@@ -6261,7 +6261,7 @@ let Wa = ja, Ga = class extends Wa {
6261
6261
  };
6262
6262
  var Va = Ga;
6263
6263
  Ga.default = Ga;
6264
- let Ha, qa, Ka, Ya, Za = za, Ja = Va, Xa = ja, { isClean: Qa, my: el } = Ra;
6264
+ let Ha, qa, Ka, Ya, Za = za, Ja = Va, Xa = Ba, { isClean: Qa, my: el } = Ra;
6265
6265
  function Go(e) {
6266
6266
  return e.map((e2) => (e2.nodes && (e2.nodes = Go(e2.nodes)), delete e2.source, e2));
6267
6267
  }
@@ -6462,7 +6462,7 @@ var hl = { nanoid: (e = 21) => {
6462
6462
  for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
6463
6463
  return a;
6464
6464
  } };
6465
- let { existsSync: fl, readFileSync: ml } = ka, { dirname: gl, join: yl } = ka, { SourceMapConsumer: wl, SourceMapGenerator: bl } = ka;
6465
+ let { existsSync: fl, readFileSync: ml } = ka, { dirname: gl, join: yl } = ka, { SourceMapConsumer: bl, SourceMapGenerator: wl } = ka;
6466
6466
  let Sl = class {
6467
6467
  constructor(e, a) {
6468
6468
  if (false === a.map) return;
@@ -6471,7 +6471,7 @@ let Sl = class {
6471
6471
  !this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = gl(this.mapFile)), w2 && (this.text = w2);
6472
6472
  }
6473
6473
  consumer() {
6474
- return this.consumerCache || (this.consumerCache = new wl(this.text)), this.consumerCache;
6474
+ return this.consumerCache || (this.consumerCache = new bl(this.text)), this.consumerCache;
6475
6475
  }
6476
6476
  decodeInline(e) {
6477
6477
  let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
@@ -6503,8 +6503,8 @@ let Sl = class {
6503
6503
  if (a) {
6504
6504
  if ("string" == typeof a) return a;
6505
6505
  if ("function" != typeof a) {
6506
- if (a instanceof wl) return bl.fromSourceMap(a).toString();
6507
- if (a instanceof bl) return a.toString();
6506
+ if (a instanceof bl) return wl.fromSourceMap(a).toString();
6507
+ if (a instanceof wl) return a.toString();
6508
6508
  if (this.isMap(a)) return JSON.stringify(a);
6509
6509
  throw new Error("Unsupported previous source map format: " + a.toString());
6510
6510
  }
@@ -6533,20 +6533,20 @@ let Sl = class {
6533
6533
  };
6534
6534
  var vl = Sl;
6535
6535
  Sl.default = Sl;
6536
- let { nanoid: kl } = hl, { isAbsolute: xl, resolve: Cl } = ka, { SourceMapConsumer: Il, SourceMapGenerator: Ml } = ka, { fileURLToPath: El, pathToFileURL: _l } = ka, Ol = Ma, Tl = vl, Ll = ka, Rl = Symbol("lineToIndexCache"), Al = !(!Il || !Ml), Fl = !(!Cl || !xl);
6536
+ let { nanoid: kl } = hl, { isAbsolute: xl, resolve: Cl } = ka, { SourceMapConsumer: Il, SourceMapGenerator: Ml } = ka, { fileURLToPath: El, pathToFileURL: _l } = ka, Ol = Ma, Tl = vl, Ll = ka, Rl = Symbol("lineToIndexCache"), Al = !(!Il || !Ml), Nl = !(!Cl || !xl);
6537
6537
  function fn(e) {
6538
6538
  if (e[Rl]) return e[Rl];
6539
6539
  let a = e.css.split("\n"), u = new Array(a.length), w2 = 0;
6540
6540
  for (let e2 = 0, x2 = a.length; e2 < x2; e2++) u[e2] = w2, w2 += a[e2].length + 1;
6541
6541
  return e[Rl] = u, u;
6542
6542
  }
6543
- let Nl = class {
6543
+ let Fl = class {
6544
6544
  get from() {
6545
6545
  return this.file || this.id;
6546
6546
  }
6547
6547
  constructor(e, a = {}) {
6548
6548
  if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
6549
- if (this.css = e.toString(), "\uFEFF" === this.css[0] || "￾" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!Fl || /^\w+:\/\//.test(a.from) || xl(a.from) ? this.file = a.from : this.file = Cl(a.from)), Fl && Al) {
6549
+ if (this.css = e.toString(), "\uFEFF" === this.css[0] || "￾" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!Nl || /^\w+:\/\//.test(a.from) || xl(a.from) ? this.file = a.from : this.file = Cl(a.from)), Nl && Al) {
6550
6550
  let e2 = new Tl(this.css, a);
6551
6551
  if (e2.text) {
6552
6552
  this.map = e2;
@@ -6620,9 +6620,9 @@ let Nl = class {
6620
6620
  return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
6621
6621
  }
6622
6622
  };
6623
- var Pl = Nl;
6624
- Nl.default = Nl, Ll && Ll.registerInput && Ll.registerInput(Nl);
6625
- let Dl, jl, Bl = rl, Ul = class extends Bl {
6623
+ var Pl = Fl;
6624
+ Fl.default = Fl, Ll && Ll.registerInput && Ll.registerInput(Fl);
6625
+ let Dl, Bl, jl = rl, Ul = class extends jl {
6626
6626
  constructor(e) {
6627
6627
  super(e), this.type = "root", this.nodes || (this.nodes = []);
6628
6628
  }
@@ -6639,16 +6639,16 @@ let Dl, jl, Bl = rl, Ul = class extends Bl {
6639
6639
  return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
6640
6640
  }
6641
6641
  toResult(e = {}) {
6642
- return new Dl(new jl(), this, e).stringify();
6642
+ return new Dl(new Bl(), this, e).stringify();
6643
6643
  }
6644
6644
  };
6645
6645
  Ul.registerLazyResult = (e) => {
6646
6646
  Dl = e;
6647
6647
  }, Ul.registerProcessor = (e) => {
6648
- jl = e;
6648
+ Bl = e;
6649
6649
  };
6650
6650
  var zl = Ul;
6651
- Ul.default = Ul, Bl.registerRoot(Ul);
6651
+ Ul.default = Ul, jl.registerRoot(Ul);
6652
6652
  let Wl = { comma: (e) => Wl.split(e, [","], true), space(e) {
6653
6653
  let a = [" ", "\n", " "];
6654
6654
  return Wl.split(e, a);
@@ -6697,7 +6697,7 @@ function Qe(e, a) {
6697
6697
  }
6698
6698
  var pc = Qe;
6699
6699
  Qe.default = Qe;
6700
- let { dirname: hc, relative: fc, resolve: mc, sep: gc } = ka, { SourceMapConsumer: yc, SourceMapGenerator: wc } = ka, { pathToFileURL: bc } = ka, Sc = Pl, vc = !(!yc || !wc), kc = !!(hc && mc && fc && gc);
6700
+ let { dirname: hc, relative: fc, resolve: mc, sep: gc } = ka, { SourceMapConsumer: yc, SourceMapGenerator: bc } = ka, { pathToFileURL: wc } = ka, Sc = Pl, vc = !(!yc || !bc), kc = !!(hc && mc && fc && gc);
6701
6701
  var xc = class {
6702
6702
  constructor(e, a, u, w2) {
6703
6703
  this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, this.css = w2, this.originalCSS = w2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
@@ -6733,12 +6733,12 @@ var xc = class {
6733
6733
  if (this.root) this.generateString();
6734
6734
  else if (1 === this.previous().length) {
6735
6735
  let e = this.previous()[0].consumer();
6736
- e.file = this.outputFile(), this.map = wc.fromSourceMap(e, { ignoreInvalidMapping: true });
6737
- } else this.map = new wc({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
6736
+ e.file = this.outputFile(), this.map = bc.fromSourceMap(e, { ignoreInvalidMapping: true });
6737
+ } else this.map = new bc({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
6738
6738
  return this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline() ? [this.css] : [this.css, this.map];
6739
6739
  }
6740
6740
  generateString() {
6741
- this.css = "", this.map = new wc({ file: this.outputFile(), ignoreInvalidMapping: true });
6741
+ this.css = "", this.map = new bc({ file: this.outputFile(), ignoreInvalidMapping: true });
6742
6742
  let e, a, u = 1, w2 = 1, x2 = "<no source>", I2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
6743
6743
  this.stringify(this.root, (M2, _2, A2) => {
6744
6744
  if (this.css += M2, _2 && "end" !== A2 && (I2.generated.line = u, I2.generated.column = w2 - 1, _2.source && _2.source.start ? (I2.source = this.sourcePath(_2), I2.original.line = _2.source.start.line, I2.original.column = _2.source.start.column - 1, this.map.addMapping(I2)) : (I2.source = x2, I2.original.line = 1, I2.original.column = 0, this.map.addMapping(I2))), a = M2.match(/\n/g), a ? (u += a.length, e = M2.lastIndexOf("\n"), w2 = M2.length - e) : w2 += M2.length, _2 && "start" !== A2) {
@@ -6812,8 +6812,8 @@ var xc = class {
6812
6812
  toFileUrl(e) {
6813
6813
  let a = this.memoizedFileURLs.get(e);
6814
6814
  if (a) return a;
6815
- if (bc) {
6816
- let a2 = bc(e).toString();
6815
+ if (wc) {
6816
+ let a2 = wc(e).toString();
6817
6817
  return this.memoizedFileURLs.set(e, a2), a2;
6818
6818
  }
6819
6819
  throw new Error("`map.absolute` option is not available in this PostCSS build");
@@ -6827,8 +6827,8 @@ var xc = class {
6827
6827
  }
6828
6828
  };
6829
6829
  const Cc = /[\t\n\f\r "#'()/;[\\\]{}]/g, Ic = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, Mc = /.[\r\n"'(/\\]/, Ec = /[\da-f]/i;
6830
- let _c = al, Oc = za, Lc = Va, Rc = zl, Fc = oc, Tc = function(e, a = {}) {
6831
- let u, w2, x2, I2, M2, _2, A2, F2, $2, j2, B2 = e.css.valueOf(), U2 = a.ignoreErrors, z2 = B2.length, W2 = 0, G2 = [], H2 = [];
6830
+ let _c = al, Oc = za, Lc = Va, Rc = zl, Nc = oc, Tc = function(e, a = {}) {
6831
+ let u, w2, x2, I2, M2, _2, A2, F2, $2, B2, j2 = e.css.valueOf(), U2 = a.ignoreErrors, z2 = j2.length, W2 = 0, G2 = [], H2 = [];
6832
6832
  function v(a2) {
6833
6833
  throw e.error("Unclosed " + a2, W2);
6834
6834
  }
@@ -6840,7 +6840,7 @@ let _c = al, Oc = za, Lc = Va, Rc = zl, Fc = oc, Tc = function(e, a = {}) {
6840
6840
  if (H2.length) return H2.pop();
6841
6841
  if (W2 >= z2) return;
6842
6842
  let a2 = !!e2 && e2.ignoreUnclosed;
6843
- switch (u = B2.charCodeAt(W2), u) {
6843
+ switch (u = j2.charCodeAt(W2), u) {
6844
6844
  case 10:
6845
6845
  case 32:
6846
6846
  case 9:
@@ -6848,9 +6848,9 @@ let _c = al, Oc = za, Lc = Va, Rc = zl, Fc = oc, Tc = function(e, a = {}) {
6848
6848
  case 12:
6849
6849
  I2 = W2;
6850
6850
  do {
6851
- I2 += 1, u = B2.charCodeAt(I2);
6851
+ I2 += 1, u = j2.charCodeAt(I2);
6852
6852
  } while (32 === u || 10 === u || 9 === u || 13 === u || 12 === u);
6853
- _2 = ["space", B2.slice(W2, I2)], W2 = I2 - 1;
6853
+ _2 = ["space", j2.slice(W2, I2)], W2 = I2 - 1;
6854
6854
  break;
6855
6855
  case 91:
6856
6856
  case 93:
@@ -6864,56 +6864,56 @@ let _c = al, Oc = za, Lc = Va, Rc = zl, Fc = oc, Tc = function(e, a = {}) {
6864
6864
  break;
6865
6865
  }
6866
6866
  case 40:
6867
- if (j2 = G2.length ? G2.pop()[1] : "", $2 = B2.charCodeAt(W2 + 1), "url" === j2 && 39 !== $2 && 34 !== $2 && 32 !== $2 && 10 !== $2 && 9 !== $2 && 12 !== $2 && 13 !== $2) {
6867
+ if (B2 = G2.length ? G2.pop()[1] : "", $2 = j2.charCodeAt(W2 + 1), "url" === B2 && 39 !== $2 && 34 !== $2 && 32 !== $2 && 10 !== $2 && 9 !== $2 && 12 !== $2 && 13 !== $2) {
6868
6868
  I2 = W2;
6869
6869
  do {
6870
- if (A2 = false, I2 = B2.indexOf(")", I2 + 1), -1 === I2) {
6870
+ if (A2 = false, I2 = j2.indexOf(")", I2 + 1), -1 === I2) {
6871
6871
  if (U2 || a2) {
6872
6872
  I2 = W2;
6873
6873
  break;
6874
6874
  }
6875
6875
  v("bracket");
6876
6876
  }
6877
- for (F2 = I2; 92 === B2.charCodeAt(F2 - 1); ) F2 -= 1, A2 = !A2;
6877
+ for (F2 = I2; 92 === j2.charCodeAt(F2 - 1); ) F2 -= 1, A2 = !A2;
6878
6878
  } while (A2);
6879
- _2 = ["brackets", B2.slice(W2, I2 + 1), W2, I2], W2 = I2;
6880
- } else I2 = B2.indexOf(")", W2 + 1), w2 = B2.slice(W2, I2 + 1), -1 === I2 || Mc.test(w2) ? _2 = ["(", "(", W2] : (_2 = ["brackets", w2, W2, I2], W2 = I2);
6879
+ _2 = ["brackets", j2.slice(W2, I2 + 1), W2, I2], W2 = I2;
6880
+ } else I2 = j2.indexOf(")", W2 + 1), w2 = j2.slice(W2, I2 + 1), -1 === I2 || Mc.test(w2) ? _2 = ["(", "(", W2] : (_2 = ["brackets", w2, W2, I2], W2 = I2);
6881
6881
  break;
6882
6882
  case 39:
6883
6883
  case 34:
6884
6884
  M2 = 39 === u ? "'" : '"', I2 = W2;
6885
6885
  do {
6886
- if (A2 = false, I2 = B2.indexOf(M2, I2 + 1), -1 === I2) {
6886
+ if (A2 = false, I2 = j2.indexOf(M2, I2 + 1), -1 === I2) {
6887
6887
  if (U2 || a2) {
6888
6888
  I2 = W2 + 1;
6889
6889
  break;
6890
6890
  }
6891
6891
  v("string");
6892
6892
  }
6893
- for (F2 = I2; 92 === B2.charCodeAt(F2 - 1); ) F2 -= 1, A2 = !A2;
6893
+ for (F2 = I2; 92 === j2.charCodeAt(F2 - 1); ) F2 -= 1, A2 = !A2;
6894
6894
  } while (A2);
6895
- _2 = ["string", B2.slice(W2, I2 + 1), W2, I2], W2 = I2;
6895
+ _2 = ["string", j2.slice(W2, I2 + 1), W2, I2], W2 = I2;
6896
6896
  break;
6897
6897
  case 64:
6898
- Cc.lastIndex = W2 + 1, Cc.test(B2), I2 = 0 === Cc.lastIndex ? B2.length - 1 : Cc.lastIndex - 2, _2 = ["at-word", B2.slice(W2, I2 + 1), W2, I2], W2 = I2;
6898
+ Cc.lastIndex = W2 + 1, Cc.test(j2), I2 = 0 === Cc.lastIndex ? j2.length - 1 : Cc.lastIndex - 2, _2 = ["at-word", j2.slice(W2, I2 + 1), W2, I2], W2 = I2;
6899
6899
  break;
6900
6900
  case 92:
6901
- for (I2 = W2, x2 = true; 92 === B2.charCodeAt(I2 + 1); ) I2 += 1, x2 = !x2;
6902
- if (u = B2.charCodeAt(I2 + 1), x2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (I2 += 1, Ec.test(B2.charAt(I2)))) {
6903
- for (; Ec.test(B2.charAt(I2 + 1)); ) I2 += 1;
6904
- 32 === B2.charCodeAt(I2 + 1) && (I2 += 1);
6901
+ for (I2 = W2, x2 = true; 92 === j2.charCodeAt(I2 + 1); ) I2 += 1, x2 = !x2;
6902
+ if (u = j2.charCodeAt(I2 + 1), x2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (I2 += 1, Ec.test(j2.charAt(I2)))) {
6903
+ for (; Ec.test(j2.charAt(I2 + 1)); ) I2 += 1;
6904
+ 32 === j2.charCodeAt(I2 + 1) && (I2 += 1);
6905
6905
  }
6906
- _2 = ["word", B2.slice(W2, I2 + 1), W2, I2], W2 = I2;
6906
+ _2 = ["word", j2.slice(W2, I2 + 1), W2, I2], W2 = I2;
6907
6907
  break;
6908
6908
  default:
6909
- 47 === u && 42 === B2.charCodeAt(W2 + 1) ? (I2 = B2.indexOf("*/", W2 + 2) + 1, 0 === I2 && (U2 || a2 ? I2 = B2.length : v("comment")), _2 = ["comment", B2.slice(W2, I2 + 1), W2, I2], W2 = I2) : (Ic.lastIndex = W2 + 1, Ic.test(B2), I2 = 0 === Ic.lastIndex ? B2.length - 1 : Ic.lastIndex - 2, _2 = ["word", B2.slice(W2, I2 + 1), W2, I2], G2.push(_2), W2 = I2);
6909
+ 47 === u && 42 === j2.charCodeAt(W2 + 1) ? (I2 = j2.indexOf("*/", W2 + 2) + 1, 0 === I2 && (U2 || a2 ? I2 = j2.length : v("comment")), _2 = ["comment", j2.slice(W2, I2 + 1), W2, I2], W2 = I2) : (Ic.lastIndex = W2 + 1, Ic.test(j2), I2 = 0 === Ic.lastIndex ? j2.length - 1 : Ic.lastIndex - 2, _2 = ["word", j2.slice(W2, I2 + 1), W2, I2], G2.push(_2), W2 = I2);
6910
6910
  }
6911
6911
  return W2++, _2;
6912
6912
  }, position: function b() {
6913
6913
  return W2;
6914
6914
  } };
6915
6915
  };
6916
- const Nc = { empty: true, space: true };
6916
+ const Fc = { empty: true, space: true };
6917
6917
  var Pc = class {
6918
6918
  constructor(e) {
6919
6919
  this.input = e, this.root = new Rc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
@@ -7033,7 +7033,7 @@ var Pc = class {
7033
7033
  throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
7034
7034
  }
7035
7035
  emptyRule(e) {
7036
- let a = new Fc();
7036
+ let a = new Nc();
7037
7037
  this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
7038
7038
  }
7039
7039
  end(e) {
@@ -7109,7 +7109,7 @@ var Pc = class {
7109
7109
  }
7110
7110
  raw(e, a, u, w2) {
7111
7111
  let x2, I2, M2, _2, A2 = u.length, F2 = "", $2 = true;
7112
- for (let e2 = 0; e2 < A2; e2 += 1) x2 = u[e2], I2 = x2[0], "space" !== I2 || e2 !== A2 - 1 || w2 ? "comment" === I2 ? (_2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", M2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", Nc[_2] || Nc[M2] || "," === F2.slice(-1) ? $2 = false : F2 += x2[1]) : F2 += x2[1] : $2 = false;
7112
+ for (let e2 = 0; e2 < A2; e2 += 1) x2 = u[e2], I2 = x2[0], "space" !== I2 || e2 !== A2 - 1 || w2 ? "comment" === I2 ? (_2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", M2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", Fc[_2] || Fc[M2] || "," === F2.slice(-1) ? $2 = false : F2 += x2[1]) : F2 += x2[1] : $2 = false;
7113
7113
  if (!$2) {
7114
7114
  let w3 = u.reduce((e2, a2) => e2 + a2[1], "");
7115
7115
  e.raws[a] = { raw: w3, value: F2 };
@@ -7118,7 +7118,7 @@ var Pc = class {
7118
7118
  }
7119
7119
  rule(e) {
7120
7120
  e.pop();
7121
- let a = new Fc();
7121
+ let a = new Nc();
7122
7122
  this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
7123
7123
  }
7124
7124
  spacesAndCommentsFromEnd(e) {
@@ -7158,9 +7158,9 @@ var Pc = class {
7158
7158
  throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
7159
7159
  }
7160
7160
  };
7161
- let Dc = rl, $c = Pl, jc = Pc;
7161
+ let Dc = rl, $c = Pl, Bc = Pc;
7162
7162
  function Yt(e, a) {
7163
- let u = new $c(e, a), w2 = new jc(u);
7163
+ let u = new $c(e, a), w2 = new Bc(u);
7164
7164
  try {
7165
7165
  w2.parse();
7166
7166
  } catch (e2) {
@@ -7168,7 +7168,7 @@ function Yt(e, a) {
7168
7168
  }
7169
7169
  return w2.root;
7170
7170
  }
7171
- var Bc = Yt;
7171
+ var jc = Yt;
7172
7172
  Yt.default = Yt, Dc.registerParse(Yt);
7173
7173
  let Uc = class {
7174
7174
  constructor(e, a = {}) {
@@ -7209,7 +7209,7 @@ let Hc = {};
7209
7209
  var ui = function(e) {
7210
7210
  Hc[e] || (Hc[e] = true, typeof console < "u" && console.warn && console.warn(e));
7211
7211
  };
7212
- let qc = rl, Kc = pl, Yc = xc, Zc = Bc, Jc = Vc, Xc = zl, Qc = La, { isClean: ou, my: yu } = Ra, bu = ui;
7212
+ let qc = rl, Kc = pl, Yc = xc, Zc = jc, Jc = Vc, Xc = zl, Qc = La, { isClean: ou, my: yu } = Ra, bu = ui;
7213
7213
  const Su = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, _u = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, Tu = { Once: true, postcssPlugin: true, prepare: true };
7214
7214
  function We(e) {
7215
7215
  return "object" == typeof e && "function" == typeof e.then;
@@ -7446,9 +7446,9 @@ Fu.registerPostcss = (e) => {
7446
7446
  };
7447
7447
  var Pu = Fu;
7448
7448
  Fu.default = Fu, Xc.registerLazyResult(Fu), Kc.registerLazyResult(Fu);
7449
- let Du = xc, $u = Bc;
7450
- const ju = Vc;
7451
- let Bu = La, Uu = ui, zu = class {
7449
+ let Du = xc, $u = jc;
7450
+ const Bu = Vc;
7451
+ let ju = La, Uu = ui, zu = class {
7452
7452
  get content() {
7453
7453
  return this.result.css;
7454
7454
  }
@@ -7483,8 +7483,8 @@ let Bu = La, Uu = ui, zu = class {
7483
7483
  }
7484
7484
  constructor(e, a, u) {
7485
7485
  a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
7486
- let w2, x2 = Bu;
7487
- this.result = new ju(this._processor, w2, this._opts), this.result.css = a;
7486
+ let w2, x2 = ju;
7487
+ this.result = new Bu(this._processor, w2, this._opts), this.result.css = a;
7488
7488
  let I2 = this;
7489
7489
  Object.defineProperty(this.result, "root", { get: () => I2.root });
7490
7490
  let M2 = new Du(x2, w2, this._opts, a);
@@ -7542,7 +7542,7 @@ let Gu = pl, Vu = Pu, Hu = Wu, qu = zl, Ku = class {
7542
7542
  };
7543
7543
  var Yu = Ku;
7544
7544
  Ku.default = Ku, qu.registerProcessor(Ku), Gu.registerProcessor(Ku);
7545
- let Zu = al, Xu = za, Qu = rl, ed = Ma, td = Va, nd = pl, rd = pc, od = Pl, sd = Pu, id = ec, ad = ja, ld = Bc, cd = Yu, ud = Vc, dd = zl, pd = oc, hd = La, fd = zc;
7545
+ let Zu = al, Xu = za, Qu = rl, ed = Ma, td = Va, nd = pl, rd = pc, od = Pl, sd = Pu, id = ec, ad = Ba, ld = jc, cd = Yu, ud = Vc, dd = zl, pd = oc, hd = La, fd = zc;
7546
7546
  function D(...e) {
7547
7547
  return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new cd(e);
7548
7548
  }
@@ -7564,7 +7564,7 @@ var yd;
7564
7564
  gd.stringify, gd.fromJSON, gd.plugin, gd.parse, gd.list, gd.document, gd.comment, gd.atRule, gd.rule, gd.decl, gd.root, gd.CssSyntaxError, gd.Declaration, gd.Container, gd.Processor, gd.Document, gd.Comment, gd.Warning, gd.AtRule, gd.Result, gd.Input, gd.Rule, gd.Root, gd.Node, (function(e) {
7565
7565
  e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
7566
7566
  })(yd || (yd = {}));
7567
- const { addCustomEvent: wd } = he, { addSailfishEvent: bd } = he, { freezePage: Sd } = he, { takeFullSnapshot: vd } = he;
7567
+ const { addCustomEvent: bd } = he, { addSailfishEvent: wd } = he, { freezePage: Sd } = he, { takeFullSnapshot: vd } = he;
7568
7568
  var kd = Object.defineProperty, y = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? kd(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u);
7569
7569
  let xd = class d {
7570
7570
  constructor(e) {
@@ -7743,8 +7743,8 @@ function R(e, a, u) {
7743
7743
  }
7744
7744
  var Od = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(Od || {});
7745
7745
  const Td = 5, Ld = /* @__PURE__ */ new WeakSet();
7746
- let Rd = false, Ad = null, Fd = null;
7747
- const Nd = "production" !== process.env.NODE_ENV;
7746
+ let Rd = false, Ad = null, Nd = null;
7747
+ const Fd = "production" !== process.env.NODE_ENV;
7748
7748
  function getDisplayName(e) {
7749
7749
  const a = e.type;
7750
7750
  if (!a) return "";
@@ -7821,8 +7821,8 @@ function createCommitHandler(e) {
7821
7821
  } catch (e2) {
7822
7822
  console.warn("[Sailfish] Error in onCommitFiberRoot:", e2);
7823
7823
  }
7824
- if (Fd) try {
7825
- Fd.call(e, a, u, w2);
7824
+ if (Nd) try {
7825
+ Nd.call(e, a, u, w2);
7826
7826
  } catch (e2) {
7827
7827
  console.warn("[Sailfish] Error calling original onCommitFiberRoot:", e2);
7828
7828
  }
@@ -7946,7 +7946,7 @@ async function initializeRecording(e, a, u, w2, x2) {
7946
7946
  try {
7947
7947
  const e2 = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
7948
7948
  if (e2) {
7949
- Fd = ((_a2 = e2.onCommitFiberRoot) == null ? void 0 : _a2.bind(e2)) || null, Ad = createCommitHandler(e2);
7949
+ Nd = ((_a2 = e2.onCommitFiberRoot) == null ? void 0 : _a2.bind(e2)) || null, Ad = createCommitHandler(e2);
7950
7950
  try {
7951
7951
  e2.onCommitFiberRoot = Ad;
7952
7952
  } catch (e3) {
@@ -7963,7 +7963,7 @@ async function initializeRecording(e, a, u, w2, x2) {
7963
7963
  }
7964
7964
  })(), (function processExistingTree() {
7965
7965
  if ("undefined" == typeof window) return;
7966
- if (!Nd) return;
7966
+ if (!Fd) return;
7967
7967
  let e2 = 0, a3 = 0;
7968
7968
  try {
7969
7969
  const u2 = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT, null);
@@ -8031,7 +8031,7 @@ async function initializeRecording(e, a, u, w2, x2) {
8031
8031
  }
8032
8032
  return I2;
8033
8033
  }
8034
- const jd = readDebugFlag(), Bd = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], Ud = [400, 403], zd = "CORS", Wd = "authorization", Gd = "Authorization", Vd = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {}, enableFiberTracking: true }, Hd = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
8034
+ const Bd = readDebugFlag(), jd = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], Ud = [400, 403], zd = "CORS", Wd = "authorization", Gd = "Authorization", Vd = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {}, enableFiberTracking: true }, Hd = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
8035
8035
  function maskAuthorizationHeader(e) {
8036
8036
  const a = e[Wd] ? Wd : e[Gd] ? Gd : null;
8037
8037
  if (!a) return;
@@ -8106,111 +8106,182 @@ function shouldSkipHeadersPropagation(e, a = []) {
8106
8106
  } catch {
8107
8107
  return true;
8108
8108
  }
8109
- for (const e2 of j) if (u.pathname.toLowerCase().endsWith(e2)) return true;
8110
- return !!matchUrlWithWildcard(e, [...Bd, ...a]);
8109
+ for (const e2 of B) if (u.pathname.toLowerCase().endsWith(e2)) return true;
8110
+ return !!matchUrlWithWildcard(e, [...jd, ...a]);
8111
8111
  }
8112
- function setupFetchInterceptor(e = []) {
8113
- const a = window.fetch, u = getOrSetSessionId();
8114
- window.fetch = new Proxy(a, { apply: async (a2, w2, x2) => {
8115
- let M2, _2 = x2[0], A2 = x2[1] || {};
8116
- if ("string" == typeof _2) M2 = _2;
8117
- else if (_2 instanceof Request) M2 = _2.url;
8112
+ function setupFetchInterceptor(e = [], a = { captureStreamingResponseBody: true, captureResponseBodyMaxMb: 10, captureStreamPrefixKb: 64, captureStreamTimeoutMs: 1e4 }) {
8113
+ const u = window.fetch, w2 = getOrSetSessionId(), x2 = ["text/event-stream", "application/x-ndjson", "application/stream+json", "application/grpc", "application/grpc-web"], M2 = ["application/octet-stream"];
8114
+ window.fetch = new Proxy(u, { apply: async (u2, _2, A2) => {
8115
+ let F2, $2 = A2[0], B2 = A2[1] || {};
8116
+ if ("string" == typeof $2) F2 = $2;
8117
+ else if ($2 instanceof Request) F2 = $2.url;
8118
8118
  else {
8119
- if (!(_2 instanceof URL)) return a2.apply(w2, x2);
8120
- M2 = _2.href;
8119
+ if (!($2 instanceof URL)) return u2.apply(_2, A2);
8120
+ F2 = $2.href;
8121
8121
  }
8122
- return shouldSkipHeadersPropagation(M2, e) ? a2.apply(w2, x2) : (async function injectHeaderWrapper(e2, a3, u2, w3, x3, M3, _3) {
8122
+ return shouldSkipHeadersPropagation(F2, e) ? u2.apply(_2, A2) : (async function injectHeaderWrapper(e2, u3, w3, _3, A3, F3, $3) {
8123
8123
  var _a2, _b;
8124
- if (!M3) return e2.apply(a3, u2);
8125
- let A3 = v4();
8126
- const F2 = getUrlAndStoredUuids(), $2 = x3.method || "GET", j2 = Date.now();
8127
- let B2, U2 = {};
8124
+ if (!F3) return e2.apply(u3, w3);
8125
+ let B3 = v4();
8126
+ const j2 = getUrlAndStoredUuids(), U2 = A3.method || "GET", z2 = Date.now();
8127
+ let W2, G2 = {}, H2 = null;
8128
8128
  try {
8129
- if (w3 instanceof Request) {
8130
- w3.headers.forEach((e3, a4) => {
8131
- U2[a4] = e3;
8129
+ if (_3 instanceof Request) {
8130
+ _3.headers.forEach((e3, a2) => {
8131
+ G2[a2] = e3;
8132
8132
  });
8133
8133
  try {
8134
- const e3 = w3.clone();
8135
- B2 = await e3.text();
8134
+ H2 = _3.clone();
8136
8135
  } catch (e3) {
8137
- B2 = null;
8136
+ H2 = null;
8138
8137
  }
8139
- } else x3.headers && (x3.headers instanceof Headers ? x3.headers.forEach((e3, a4) => {
8140
- U2[a4] = e3;
8141
- }) : Array.isArray(x3.headers) ? x3.headers.forEach(([e3, a4]) => {
8142
- U2[e3] = a4;
8143
- }) : U2 = { ...x3.headers }), B2 = x3.body;
8138
+ } else A3.headers && (A3.headers instanceof Headers ? A3.headers.forEach((e3, a2) => {
8139
+ G2[a2] = e3;
8140
+ }) : Array.isArray(A3.headers) ? A3.headers.forEach(([e3, a2]) => {
8141
+ G2[e3] = a2;
8142
+ }) : G2 = { ...A3.headers }), W2 = A3.body;
8144
8143
  } catch (e3) {
8145
- jd && console.warn("[Sailfish] Failed to capture request data:", e3);
8144
+ Bd && console.warn("[Sailfish] Failed to capture request data:", e3);
8146
8145
  }
8147
- delete U2[I];
8148
- const z2 = getFuncSpanHeader();
8149
- z2 && delete U2[z2.name];
8150
- const W2 = `${M3}/${F2.page_visit_uuid}/${A3}`;
8151
- U2[I] = W2, z2 && (U2[z2.name] = z2.value);
8152
- maskAuthorizationHeader(U2);
8146
+ delete G2[I];
8147
+ const K2 = getFuncSpanHeader();
8148
+ K2 && delete G2[K2.name];
8149
+ const Y2 = `${F3}/${j2.page_visit_uuid}/${B3}`;
8150
+ G2[I] = Y2, K2 && (G2[K2.name] = K2.value);
8151
+ maskAuthorizationHeader(G2);
8153
8152
  try {
8154
- let z3 = await (async function injectHeader(e3, a4, u3, w4, x4, M4, _4) {
8153
+ let K3 = await (async function injectHeader(e3, a2, u4, w4, x3, M3, _4) {
8155
8154
  const A4 = getFuncSpanHeader();
8156
- if (u3 instanceof Request) {
8157
- const F3 = u3.clone(), $3 = new Headers(F3.headers);
8158
- $3.set(I, `${x4}/${M4}/${_4}`), A4 && ($3.set(A4.name, A4.value), jd && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u3.url, header: A4.name }));
8159
- const j3 = new Request(F3, { headers: $3 });
8160
- return await e3.call(a4, j3, w4);
8155
+ if (u4 instanceof Request) {
8156
+ const F4 = u4.clone(), $4 = new Headers(F4.headers);
8157
+ $4.set(I, `${x3}/${M3}/${_4}`), A4 && ($4.set(A4.name, A4.value), Bd && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u4.url, header: A4.name }));
8158
+ const B4 = new Request(F4, { headers: $4 });
8159
+ return await e3.call(a2, B4, w4);
8161
8160
  }
8162
8161
  {
8163
- const F3 = { ...w4 }, $3 = new Headers(w4.headers || {});
8164
- return $3.set(I, `${x4}/${M4}/${_4}`), A4 && ($3.set(A4.name, A4.value), jd && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof u3 ? u3 : u3.href, header: A4.name })), F3.headers = $3, await e3.call(a4, u3, F3);
8162
+ const F4 = { ...w4 }, $4 = new Headers(w4.headers || {});
8163
+ return $4.set(I, `${x3}/${M3}/${_4}`), A4 && ($4.set(A4.name, A4.value), Bd && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof u4 ? u4 : u4.href, header: A4.name })), F4.headers = $4, await e3.call(a2, u4, F4);
8165
8164
  }
8166
- })(e2, a3, w3, x3, M3, F2.page_visit_uuid, A3), W3 = false;
8167
- Ud.includes(z3.status) && (jd && console.log("Perform retry as status was fail:", z3), delete U2[I], z3 = await (async function retryWithoutPropagateHeaders(e3, a4, u3, w4) {
8165
+ })(e2, u3, _3, A3, F3, j2.page_visit_uuid, B3), Y3 = false;
8166
+ Ud.includes(K3.status) && (Bd && console.log("Perform retry as status was fail:", K3), delete G2[I], K3 = await (async function retryWithoutPropagateHeaders(e3, a2, u4, w4) {
8168
8167
  try {
8169
- let w5 = u3[0], x4 = u3[1] || {};
8168
+ let w5 = u4[0], x3 = u4[1] || {};
8170
8169
  if ("string" == typeof w5 || w5 instanceof URL) {
8171
- const u4 = { ...x4 }, M4 = new Headers(x4.headers || {});
8172
- M4.delete(I), u4.headers = M4;
8173
- return await e3.call(a4, w5, u4);
8170
+ const u5 = { ...x3 }, M3 = new Headers(x3.headers || {});
8171
+ M3.delete(I), u5.headers = M3;
8172
+ return await e3.call(a2, w5, u5);
8174
8173
  }
8175
8174
  if (w5 instanceof Request) {
8176
- const u4 = w5.clone(), M4 = new Headers(u4.headers);
8177
- M4.delete(I);
8178
- const _4 = new Request(u4, { headers: M4 });
8179
- return await e3.call(a4, _4, x4);
8175
+ const u5 = w5.clone(), M3 = new Headers(u5.headers);
8176
+ M3.delete(I);
8177
+ const _4 = new Request(u5, { headers: M3 });
8178
+ return await e3.call(a2, _4, x3);
8180
8179
  }
8181
- return e3.apply(a4, u3);
8180
+ return e3.apply(a2, u4);
8182
8181
  } catch (e4) {
8183
- throw jd && console.log(`Retry without ${I} for ${w4} also failed:`, e4), e4;
8182
+ throw Bd && console.log(`Retry without ${I} for ${w4} also failed:`, e4), e4;
8184
8183
  }
8185
- })(e2, a3, u2, _3), W3 = true);
8186
- const G2 = Date.now(), H2 = z3.status, K2 = z3.ok, Y2 = K2 ? "" : `Request Error: ${z3.statusText}`;
8187
- let Z2;
8184
+ })(e2, u3, w3, $3), Y3 = true);
8185
+ const Z2 = Date.now(), J2 = K3.status, X2 = K3.ok, Q2 = X2 ? "" : `Request Error: ${K3.statusText}`;
8186
+ let ee2 = null;
8188
8187
  try {
8189
- const e3 = z3.clone();
8190
- Z2 = await e3.text();
8191
- } catch (e3) {
8192
- jd && console.warn("[Sailfish] Failed to capture response data:", e3), Z2 = null;
8193
- }
8194
- let J2 = null;
8195
- try {
8196
- J2 = {}, z3.headers.forEach((e3, a4) => {
8197
- J2[a4] = e3;
8188
+ ee2 = {}, K3.headers.forEach((e3, a2) => {
8189
+ ee2[a2] = e3;
8198
8190
  });
8199
8191
  } catch (e3) {
8200
- jd && console.warn("[Sailfish] Failed to capture response headers:", e3), J2 = null;
8192
+ Bd && console.warn("[Sailfish] Failed to capture response headers:", e3), ee2 = null;
8201
8193
  }
8202
- return sendEvent({ type: 27, timestamp: G2, sessionId: M3, data: { request_id: A3, session_id: M3, timestamp_start: j2, timestamp_end: G2, response_code: H2, success: K2, error: Y2, method: $2, url: _3, retry_without_trace_id: W3, request_headers: U2, request_body: B2, response_headers: J2, response_body: Z2 }, ...F2 }), z3;
8203
- } catch (w4) {
8204
- const x4 = Date.now(), I2 = false, z3 = ((_a2 = w4.response) == null ? void 0 : _a2.status) || 500, W3 = w4.message || "Fetch request failed";
8205
- if (w4 instanceof TypeError && ((_b = w4 == null ? void 0 : w4.message) == null ? void 0 : _b.toLowerCase().includes(zd.toLowerCase()))) return e2.apply(a3, u2);
8206
- throw sendEvent({ type: 27, timestamp: x4, sessionId: M3, data: { request_id: A3, session_id: M3, timestamp_start: j2, timestamp_end: x4, response_code: z3, success: I2, error: W3, method: $2, url: _3, request_headers: U2, request_body: B2, response_body: null }, ...F2 }), w4;
8194
+ const te2 = { type: 27, timestamp: Z2, sessionId: F3, data: { request_id: B3, session_id: F3, timestamp_start: z2, timestamp_end: Z2, response_code: J2, success: X2, error: Q2, method: U2, url: $3, retry_without_trace_id: Y3, request_headers: G2, request_body: W2, response_headers: ee2, response_body: null }, ...j2 }, sendEventWithBody = (e3) => {
8195
+ te2.data.response_body = e3, H2 ? H2.text().then((e4) => {
8196
+ te2.data.request_body = e4, sendEvent(te2);
8197
+ }, () => {
8198
+ sendEvent(te2);
8199
+ }) : sendEvent(te2);
8200
+ }, ne2 = 1024 * a.captureResponseBodyMaxMb * 1024;
8201
+ if (0 === a.captureResponseBodyMaxMb) sendEventWithBody(null);
8202
+ else if ((function shouldSkipBodyCapture(e3) {
8203
+ const a2 = e3.headers.get("content-type");
8204
+ if (!a2) return false;
8205
+ const u4 = a2.toLowerCase();
8206
+ return M2.some((e4) => u4.includes(e4));
8207
+ })(K3)) sendEventWithBody(null);
8208
+ else if ((function isStreamingResponse(e3) {
8209
+ const a2 = e3.headers.get("content-type");
8210
+ if (!a2) return false;
8211
+ const u4 = a2.toLowerCase();
8212
+ return x2.some((e4) => u4.includes(e4));
8213
+ })(K3)) if (a.captureStreamingResponseBody) try {
8214
+ (async function readStreamPrefix(e3, a2, u4) {
8215
+ const w4 = e3.body;
8216
+ if (!w4) return null;
8217
+ const x3 = w4.getReader(), I2 = new TextDecoder(), M3 = [];
8218
+ let _4 = 0;
8219
+ const readWithLimit = async () => {
8220
+ try {
8221
+ for (; _4 < a2; ) {
8222
+ const { done: e4, value: a3 } = await x3.read();
8223
+ if (e4) break;
8224
+ _4 += a3.byteLength, M3.push(I2.decode(a3, { stream: true }));
8225
+ }
8226
+ return M3.push(I2.decode()), M3.join("");
8227
+ } catch {
8228
+ return M3.length > 0 ? M3.join("") : null;
8229
+ } finally {
8230
+ try {
8231
+ x3.cancel();
8232
+ } catch {
8233
+ }
8234
+ }
8235
+ };
8236
+ try {
8237
+ return await Promise.race([readWithLimit(), new Promise((e4) => setTimeout(() => {
8238
+ try {
8239
+ x3.cancel();
8240
+ } catch {
8241
+ }
8242
+ e4(M3.length > 0 ? M3.join("") : null);
8243
+ }, u4))]);
8244
+ } catch {
8245
+ try {
8246
+ x3.cancel();
8247
+ } catch {
8248
+ }
8249
+ return null;
8250
+ }
8251
+ })(K3.clone(), 1024 * a.captureStreamPrefixKb, a.captureStreamTimeoutMs).then((e3) => sendEventWithBody(e3), () => sendEventWithBody(null));
8252
+ } catch {
8253
+ sendEventWithBody(null);
8254
+ }
8255
+ else sendEventWithBody(null);
8256
+ else {
8257
+ const e3 = K3.headers.get("content-length"), a2 = e3 ? parseInt(e3, 10) : NaN;
8258
+ if (!isNaN(a2) && a2 > ne2) sendEventWithBody(null);
8259
+ else try {
8260
+ K3.clone().text().then((e4) => {
8261
+ e4.length > ne2 ? sendEventWithBody(null) : sendEventWithBody(e4);
8262
+ }, () => sendEventWithBody(null));
8263
+ } catch {
8264
+ sendEventWithBody(null);
8265
+ }
8266
+ }
8267
+ return K3;
8268
+ } catch (a2) {
8269
+ const x3 = Date.now(), I2 = false, M3 = ((_a2 = a2.response) == null ? void 0 : _a2.status) || 500, _4 = a2.message || "Fetch request failed";
8270
+ if (a2 instanceof TypeError && ((_b = a2 == null ? void 0 : a2.message) == null ? void 0 : _b.toLowerCase().includes(zd.toLowerCase()))) return e2.apply(u3, w3);
8271
+ let A4 = W2;
8272
+ if (H2) try {
8273
+ A4 = await H2.text();
8274
+ } catch {
8275
+ A4 = null;
8276
+ }
8277
+ throw sendEvent({ type: 27, timestamp: x3, sessionId: F3, data: { request_id: B3, session_id: F3, timestamp_start: z2, timestamp_end: x3, response_code: M3, success: I2, error: _4, method: U2, url: $3, request_headers: G2, request_body: A4, response_body: null }, ...j2 }), a2;
8207
8278
  }
8208
- })(a2, w2, x2, _2, A2, u, M2);
8279
+ })(u2, _2, A2, $2, B2, w2, F2);
8209
8280
  } });
8210
8281
  }
8211
- async function startRecording({ apiKey: e, backendApi: a = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo: u = [], domainsToNotPropagateHeaderTo: w2 = [], serviceVersion: x2, serviceIdentifier: M2, gitSha: _2, serviceAdditionalMetadata: A2, enableIpTracking: F2 }) {
8282
+ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo: u = [], domainsToNotPropagateHeaderTo: w2 = [], serviceVersion: x2, serviceIdentifier: M2, gitSha: _2, serviceAdditionalMetadata: A2, enableIpTracking: F2, captureStreamingResponseBody: $2 = true, captureResponseBodyMaxMb: B2 = 10, captureStreamPrefixKb: j2 = 64, captureStreamTimeoutMs: U2 = 1e4 }) {
8212
8283
  var _a2, _b;
8213
- const $2 = _2 ?? (function readGitSha() {
8284
+ const z2 = _2 ?? (function readGitSha() {
8214
8285
  var _a3;
8215
8286
  try {
8216
8287
  const e2 = globalThis;
@@ -8227,104 +8298,109 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
8227
8298
  if ("string" == typeof e2 && e2) return e2;
8228
8299
  } catch {
8229
8300
  }
8230
- })(), j2 = M2 ?? "", B2 = x2 ?? "", U2 = (function getMapUuidFromWindow() {
8301
+ })(), W2 = M2 ?? "", G2 = x2 ?? "", H2 = (function getMapUuidFromWindow() {
8231
8302
  try {
8232
8303
  const e2 = window;
8233
8304
  if (e2 && "string" == typeof e2.sfMapUuid && e2.sfMapUuid) return e2.sfMapUuid;
8234
8305
  } catch {
8235
8306
  }
8236
- })(), z2 = getOrSetSessionId(), W2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
8237
- if (W2.sessionId = z2, W2.apiKey = e, W2.backendApi = a, W2.serviceAdditionalMetadata = A2, W2.initialized && W2.sessionId === z2 && W2.ws && 1 === W2.ws.readyState) trackDomainChangesOnce();
8238
- else {
8239
- W2.domEventsInit || (initializeDomContentEvents(z2), W2.domEventsInit = true), W2.consoleInit || (initializeConsolePlugin(Hd, z2), W2.consoleInit = true), W2.errorInit || (!(function initializeErrorInterceptor() {
8240
- window.addEventListener("error", (e2) => {
8241
- captureError(e2.error || e2.message);
8242
- }), window.addEventListener("unhandledrejection", (e2) => {
8243
- captureError(e2.reason, true);
8244
- });
8245
- })(), W2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e2, backendApi: a2 }) {
8246
- ee && (sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2));
8247
- })({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), !isFunctionSpanTrackingEnabled() || W2.ws && 1 === W2.ws.readyState || fetchFunctionSpanTrackingEnabled(e, a).then((e2) => {
8248
- var _a3;
8249
- ((_a3 = e2.data) == null ? void 0 : _a3.isFunctionSpanTrackingEnabledFromApiKey) ?? false ? jd && console.log("[Sailfish] Function span tracking state validated with backend: ACTIVE") : (clearStaleFuncSpanState(), jd && console.log("[Sailfish] Cleared stale function span tracking state - backend validation shows tracking is not active"));
8250
- }).catch((e2) => {
8251
- jd && console.warn("[Sailfish] Failed to validate function span tracking status with backend:", e2);
8252
- }), W2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...w2, ...Bd], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), W2.sentDoNotPropagateOnce = true), W2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = []) {
8253
- const a2 = XMLHttpRequest.prototype.open, u2 = XMLHttpRequest.prototype.send, w3 = XMLHttpRequest.prototype.setRequestHeader, x3 = getOrSetSessionId();
8254
- XMLHttpRequest.prototype.setRequestHeader = function(e3, a3) {
8255
- return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e3] = a3, w3.call(this, e3, a3);
8256
- }, XMLHttpRequest.prototype.open = function(e3, u3, ...w4) {
8257
- return this._requestUrl = "string" == typeof u3 && u3.length > 0 ? u3 : null, this._requestMethod = e3, this._capturedRequestHeaders = {}, a2.apply(this, [e3, u3, ...w4]);
8258
- }, XMLHttpRequest.prototype.send = function(...a3) {
8259
- const w4 = this._requestUrl;
8260
- if (!w4) return u2.apply(this, a3);
8261
- if (shouldSkipHeadersPropagation(w4, e2)) return u2.apply(this, a3);
8262
- const M3 = sessionStorage.getItem("pageVisitUUID"), _3 = v4(), A3 = `${x3}/${M3}/${_3}`;
8307
+ })(), K2 = getOrSetSessionId(), Y2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
8308
+ if (Y2.sessionId = K2, Y2.apiKey = e, Y2.backendApi = a, Y2.serviceAdditionalMetadata = A2, Y2.initialized && Y2.sessionId === K2 && Y2.ws && 1 === Y2.ws.readyState) return void trackDomainChangesOnce();
8309
+ Y2.domEventsInit || (initializeDomContentEvents(K2), Y2.domEventsInit = true), Y2.consoleInit || (initializeConsolePlugin(Hd, K2), Y2.consoleInit = true), Y2.errorInit || (!(function initializeErrorInterceptor() {
8310
+ window.addEventListener("error", (e2) => {
8311
+ captureError(e2.error || e2.message);
8312
+ }), window.addEventListener("unhandledrejection", (e2) => {
8313
+ captureError(e2.reason, true);
8314
+ });
8315
+ })(), Y2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e2, backendApi: a2 }) {
8316
+ ee && (sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2));
8317
+ })({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), !isFunctionSpanTrackingEnabled() || Y2.ws && 1 === Y2.ws.readyState || fetchFunctionSpanTrackingEnabled(e, a).then((e2) => {
8318
+ var _a3;
8319
+ ((_a3 = e2.data) == null ? void 0 : _a3.isFunctionSpanTrackingEnabledFromApiKey) ?? false ? Bd && console.log("[Sailfish] Function span tracking state validated with backend: ACTIVE") : (clearStaleFuncSpanState(), Bd && console.log("[Sailfish] Cleared stale function span tracking state - backend validation shows tracking is not active"));
8320
+ }).catch((e2) => {
8321
+ Bd && console.warn("[Sailfish] Failed to validate function span tracking status with backend:", e2);
8322
+ }), Y2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...w2, ...jd], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), Y2.sentDoNotPropagateOnce = true);
8323
+ const Z2 = { captureStreamingResponseBody: $2, captureResponseBodyMaxMb: B2, captureStreamPrefixKb: j2, captureStreamTimeoutMs: U2 };
8324
+ Y2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = [], a2 = { captureStreamingResponseBody: true, captureResponseBodyMaxMb: 10, captureStreamPrefixKb: 64, captureStreamTimeoutMs: 1e4 }) {
8325
+ const u2 = XMLHttpRequest.prototype.open, w3 = XMLHttpRequest.prototype.send, x3 = XMLHttpRequest.prototype.setRequestHeader, M3 = getOrSetSessionId();
8326
+ XMLHttpRequest.prototype.setRequestHeader = function(e3, a3) {
8327
+ return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e3] = a3, x3.call(this, e3, a3);
8328
+ }, XMLHttpRequest.prototype.open = function(e3, a3, ...w4) {
8329
+ return this._requestUrl = "string" == typeof a3 && a3.length > 0 ? a3 : null, this._requestMethod = e3, this._capturedRequestHeaders = {}, u2.apply(this, [e3, a3, ...w4]);
8330
+ }, XMLHttpRequest.prototype.send = function(...u3) {
8331
+ const x4 = this._requestUrl;
8332
+ if (!x4) return w3.apply(this, u3);
8333
+ if (shouldSkipHeadersPropagation(x4, e2)) return w3.apply(this, u3);
8334
+ const _3 = sessionStorage.getItem("pageVisitUUID"), A3 = v4(), F3 = `${M3}/${_3}/${A3}`;
8335
+ try {
8336
+ this.setRequestHeader(I, F3);
8337
+ } catch (e3) {
8338
+ console.warn(`Could not set X-Sf3-Rid for ${x4}`, e3);
8339
+ }
8340
+ const $3 = getFuncSpanHeader();
8341
+ if ($3) try {
8342
+ this.setRequestHeader($3.name, $3.value), Bd && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: x4, header: $3.name });
8343
+ } catch (e3) {
8344
+ Bd && console.warn(`[Sailfish] Could not set funcspan header for ${x4}`, e3);
8345
+ }
8346
+ const B3 = Date.now();
8347
+ let j3 = false;
8348
+ const U3 = u3[0], z3 = { ...this._capturedRequestHeaders };
8349
+ maskAuthorizationHeader(z3);
8350
+ const emitFinished = (e3, a3, u4, w4, I2) => {
8351
+ if (j3) return;
8352
+ j3 = true;
8353
+ const _4 = Date.now();
8354
+ sendEvent({ type: 27, timestamp: _4, sessionId: M3, data: { request_id: A3, session_id: M3, timestamp_start: B3, timestamp_end: _4, response_code: a3, success: e3, error: u4, method: this._requestMethod, url: x4, request_headers: z3, request_body: U3, response_headers: I2, response_body: w4 }, ...getUrlAndStoredUuids() });
8355
+ };
8356
+ return this.addEventListener("load", () => {
8357
+ const e3 = this.status || 0;
8358
+ let u4, w4 = null;
8359
+ const x5 = 1024 * a2.captureResponseBodyMaxMb * 1024;
8263
8360
  try {
8264
- this.setRequestHeader(I, A3);
8265
- } catch (e3) {
8266
- console.warn(`Could not set X-Sf3-Rid for ${w4}`, e3);
8267
- }
8268
- const F3 = getFuncSpanHeader();
8269
- if (F3) try {
8270
- this.setRequestHeader(F3.name, F3.value), jd && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: w4, header: F3.name });
8271
- } catch (e3) {
8272
- jd && console.warn(`[Sailfish] Could not set funcspan header for ${w4}`, e3);
8273
- }
8274
- const $3 = Date.now();
8275
- let j3 = false;
8276
- const B3 = a3[0], U3 = { ...this._capturedRequestHeaders };
8277
- maskAuthorizationHeader(U3);
8278
- const emitFinished = (e3, a4, u3, I2, M4) => {
8279
- if (j3) return;
8280
- j3 = true;
8281
- const A4 = Date.now();
8282
- sendEvent({ type: 27, timestamp: A4, sessionId: x3, data: { request_id: _3, session_id: x3, timestamp_start: $3, timestamp_end: A4, response_code: a4, success: e3, error: u3, method: this._requestMethod, url: w4, request_headers: U3, request_body: B3, response_headers: M4, response_body: I2 }, ...getUrlAndStoredUuids() });
8283
- };
8284
- return this.addEventListener("load", () => {
8285
- const e3 = this.status || 0;
8286
- let a4, u3 = null;
8287
- try {
8288
- a4 = this.responseText || this.response;
8289
- } catch (e4) {
8290
- a4 = null;
8291
- }
8292
- try {
8293
- u3 = {};
8294
- const e4 = this.getAllResponseHeaders();
8295
- e4 && e4.split("\r\n").forEach((e5) => {
8296
- const a5 = e5.split(": ");
8297
- 2 === a5.length && (u3[a5[0]] = a5[1]);
8298
- });
8299
- } catch (e4) {
8300
- jd && console.warn("[Sailfish] Failed to capture XHR response headers:", e4), u3 = null;
8301
- }
8302
- if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "", a4, u3);
8361
+ if (0 === a2.captureResponseBodyMaxMb) u4 = null;
8303
8362
  else {
8304
- const w5 = this.statusText || `HTTP ${e3}`;
8305
- emitFinished(false, e3, w5, a4, u3);
8363
+ const e4 = this.responseText || this.response;
8364
+ u4 = "string" == typeof e4 && e4.length > x5 ? null : e4;
8306
8365
  }
8307
- }, { once: true }), this.addEventListener("error", () => {
8308
- const e3 = this.status || 0, a4 = 0 === e3 ? "Network or CORS failure" : this.statusText || `Error ${e3}`;
8309
- emitFinished(false, e3, a4);
8310
- }, { once: true }), u2.apply(this, a3);
8311
- };
8312
- })(w2), W2.xhrPatched = true), W2.fetchPatched || (setupFetchInterceptor(w2), W2.fetchPatched = true), (async function gatherAndCacheDeviceInfo() {
8313
- sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
8314
- })(), F2 && fetchAndSendIp(z2);
8315
- try {
8316
- const u2 = await fetchCaptureSettings(e, a), w3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || Vd;
8317
- if (W2.ws && 1 === W2.ws.readyState) return;
8318
- const I2 = withAppUrlMetadata(A2), _3 = await startRecordingSession(e, z2, a, j2, B2, U2, $2, "JS/TS", I2);
8319
- if ((_b = _3.data) == null ? void 0 : _b.startRecordingSession) {
8320
- const u3 = (A2 == null ? void 0 : A2.env) || (A2 == null ? void 0 : A2.environment), I3 = await initializeRecording(w3, a, e, z2, u3);
8321
- W2.ws = I3, W2.initialized = true, W2.sentMapUuidOnce || (!(function sendMapUuidIfAvailable(e2 = "", a2 = "") {
8322
- window.sfMapUuid && sendMessage({ type: "mapUuid", data: { mapUuid: window.sfMapUuid, serviceIdentifier: e2, serviceVersion: a2 } });
8323
- })(M2, x2), W2.sentMapUuidOnce = true);
8324
- } else console.error("Failed to start recording session:", _3.errors || _3);
8325
- } catch (e2) {
8326
- console.error("Error starting recording:", e2);
8327
- }
8366
+ } catch (e4) {
8367
+ u4 = null;
8368
+ }
8369
+ try {
8370
+ w4 = {};
8371
+ const e4 = this.getAllResponseHeaders();
8372
+ e4 && e4.split("\r\n").forEach((e5) => {
8373
+ const a3 = e5.split(": ");
8374
+ 2 === a3.length && (w4[a3[0]] = a3[1]);
8375
+ });
8376
+ } catch (e4) {
8377
+ Bd && console.warn("[Sailfish] Failed to capture XHR response headers:", e4), w4 = null;
8378
+ }
8379
+ if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "", u4, w4);
8380
+ else {
8381
+ const a3 = this.statusText || `HTTP ${e3}`;
8382
+ emitFinished(false, e3, a3, u4, w4);
8383
+ }
8384
+ }, { once: true }), this.addEventListener("error", () => {
8385
+ const e3 = this.status || 0, a3 = 0 === e3 ? "Network or CORS failure" : this.statusText || `Error ${e3}`;
8386
+ emitFinished(false, e3, a3);
8387
+ }, { once: true }), w3.apply(this, u3);
8388
+ };
8389
+ })(w2, Z2), Y2.xhrPatched = true), Y2.fetchPatched || (setupFetchInterceptor(w2, Z2), Y2.fetchPatched = true), (async function gatherAndCacheDeviceInfo() {
8390
+ sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
8391
+ })(), F2 && fetchAndSendIp(K2);
8392
+ try {
8393
+ const u2 = await fetchCaptureSettings(e, a), w3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || Vd;
8394
+ if (Y2.ws && 1 === Y2.ws.readyState) return;
8395
+ const I2 = withAppUrlMetadata(A2), _3 = await startRecordingSession(e, K2, a, W2, G2, H2, z2, "JS/TS", I2);
8396
+ if ((_b = _3.data) == null ? void 0 : _b.startRecordingSession) {
8397
+ const u3 = (A2 == null ? void 0 : A2.env) || (A2 == null ? void 0 : A2.environment), I3 = await initializeRecording(w3, a, e, K2, u3);
8398
+ Y2.ws = I3, Y2.initialized = true, Y2.sentMapUuidOnce || (!(function sendMapUuidIfAvailable(e2 = "", a2 = "") {
8399
+ window.sfMapUuid && sendMessage({ type: "mapUuid", data: { mapUuid: window.sfMapUuid, serviceIdentifier: e2, serviceVersion: a2 } });
8400
+ })(M2, x2), Y2.sentMapUuidOnce = true);
8401
+ } else console.error("Failed to start recording session:", _3.errors || _3);
8402
+ } catch (e2) {
8403
+ console.error("Error starting recording:", e2);
8328
8404
  }
8329
8405
  }
8330
8406
  J && (!(function sendUserDeviceUuid() {
@@ -8349,7 +8425,7 @@ J && (!(function sendUserDeviceUuid() {
8349
8425
  const e = document.visibilityState, a = Date.now();
8350
8426
  "visible" === e && getOrSetSessionId();
8351
8427
  try {
8352
- sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }), jd && console.log(`[Sailfish] Tab became ${e}, sent visibility change event`);
8428
+ sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }), Bd && console.log(`[Sailfish] Tab became ${e}, sent visibility change event`);
8353
8429
  } catch (e2) {
8354
8430
  console.warn("[Sailfish] Failed to send visibility change event:", e2);
8355
8431
  }