wineater-bot 2.1.2 → 2.1.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.
@@ -1,4 +1,4 @@
1
- const _i = `
1
+ const Ai = `
2
2
  @font-face {
3
3
  font-family: 'Poppins';
4
4
  src: url('https://fonts.googleapis.com/css2?family=Poppins:wght@400&display=swap');
@@ -10,7 +10,7 @@ const _i = `
10
10
  bottom: 20px;
11
11
  right: 20px;
12
12
  font-family: 'Poppins', sans-serif; /* Use Poppins as the main font */
13
- z-index: 1000; /* Ensure chat is above other content */
13
+ z-index: 10000; /* Ensure chat is above other content */
14
14
  }
15
15
 
16
16
  /* Styling the chat icon */
@@ -28,6 +28,7 @@ const _i = `
28
28
  font-family: 'Poppins', sans-serif;
29
29
  font-size: 16px; /* Увеличенный размер текста */
30
30
  font-weight: bold;
31
+ box-sizing: border-box;
31
32
  transition: transform 0.2s ease, box-shadow 0.2s ease; /* Анимация при наведении */
32
33
  }
33
34
 
@@ -84,14 +85,18 @@ const _i = `
84
85
  /* Chat window styles */
85
86
  #chat-window {
86
87
  position: fixed;
87
- bottom: 20px;
88
- right: 20px;
89
- width: 380px;
90
- background-color: white;
91
- border-radius: 24px;
92
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
93
- display: none;
94
- overflow: hidden;
88
+ bottom: 20px;
89
+ right: 20px;
90
+ width: 380px;
91
+ background-color: white;
92
+ border-radius: 24px;
93
+ border: 2px solid transparent;
94
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
95
+ display: none;
96
+ overflow: hidden;
97
+ background: linear-gradient(white, white) padding-box,
98
+ linear-gradient(90deg, #7B2BEB, #0044FF) border-box;
99
+
95
100
  }
96
101
 
97
102
  #chat-header {
@@ -360,10 +365,17 @@ border-top-left-radius: 4px;
360
365
  }
361
366
 
362
367
  .wine-item a {
363
- color: #0044FF;
364
- text-decoration: none;
365
- font-size: 14px;
366
- font-weight: 500;
368
+ color: #0044FF; /* Синий цвет ссылки */
369
+ text-decoration: underline; /* Подчеркивание для эффекта ссылки */
370
+ font-size: 14px; /* Размер текста */
371
+ font-weight: 500; /* Полужирный текст */
372
+ margin-top: 10px; /* Отступ сверху */
373
+ display: inline-block; /* Чтобы отступы работали корректно */
374
+ }
375
+
376
+ .wine-item a:hover {
377
+ text-decoration: none; /* Убираем подчеркивание при наведении */
378
+ color: #002699; /* Более темный синий для интерактивного эффекта */
367
379
  }
368
380
 
369
381
  .wine-description {
@@ -387,7 +399,7 @@ border-bottom-right-radius: 15px;
387
399
 
388
400
  /* Loader Styles */
389
401
  .loader {
390
- display: none;
402
+ display: none;
391
403
  width: 40px;
392
404
  height: 40px;
393
405
  margin: 20px auto;
@@ -423,7 +435,7 @@ border-bottom-right-radius: 15px;
423
435
  justify-content: center;
424
436
  align-items: center;
425
437
  height: 0;
426
- visibility: hidden;
438
+ visibility: hidden;
427
439
  background-color: white;
428
440
  }
429
441
 
@@ -477,7 +489,7 @@ border-bottom-right-radius: 15px;
477
489
  }
478
490
 
479
491
  #message-container {
480
- height: calc(100vh - 180px); /* Учитываем высоту header и input container */
492
+ height: calc(100vh - 250px); /* Учитываем высоту header и input container */
481
493
  max-height: none;
482
494
  }
483
495
 
@@ -624,10 +636,10 @@ border-bottom-right-radius: 15px;
624
636
  height: 80px;
625
637
  }
626
638
  }
627
- `, Hn = document.createElement("style");
628
- Hn.textContent = _i;
629
- document.head.appendChild(Hn);
630
- function Oi() {
639
+ `, Vn = document.createElement("style");
640
+ Vn.textContent = Ai;
641
+ document.head.appendChild(Vn);
642
+ function Fi() {
631
643
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
632
644
  const e = Math.random() * 16 | 0;
633
645
  return (t === "x" ? e : e & 3 | 8).toString(16);
@@ -642,7 +654,7 @@ function mt(t, e, s) {
642
654
  }
643
655
  document.cookie = t + "=" + (e || "") + n + "; path=/; secure; samesite=strict";
644
656
  }
645
- function se(t) {
657
+ function te(t) {
646
658
  const e = t + "=", s = document.cookie.split(";");
647
659
  for (let n = 0; n < s.length; n++) {
648
660
  let i = s[n];
@@ -653,13 +665,13 @@ function se(t) {
653
665
  }
654
666
  return null;
655
667
  }
656
- function Ni(t) {
668
+ function Mi(t) {
657
669
  document.cookie = t + "=; Max-Age=-99999999;";
658
670
  }
659
- function Ri() {
671
+ function Li() {
660
672
  const t = "uniqueUserID";
661
- let e = se(t);
662
- return e || (e = Oi(), mt(t, e, 365)), e;
673
+ let e = te(t);
674
+ return e || (e = Fi(), mt(t, e, 365)), e;
663
675
  }
664
676
  function Ke(t, e) {
665
677
  fetch("https://wineater-backend.vercel.app/proxy/track", {
@@ -677,26 +689,26 @@ function Ke(t, e) {
677
689
  console.error("Mixpanel tracking error", i);
678
690
  });
679
691
  }
680
- function zn() {
681
- Ke("Chatbot Opened", { distinct_id: se("uniqueUserID"), client: se("chatbotToken") });
692
+ function Gn() {
693
+ Ke("Chatbot Opened", { distinct_id: te("uniqueUserID"), client: te("chatbotToken") });
682
694
  }
683
- function Di(t) {
684
- Ke("Chatbot Opened Auto", { distinct_id: se("uniqueUserID"), url: t, client: se("chatbotToken") });
695
+ function Pi(t) {
696
+ Ke("Chatbot Opened Auto", { distinct_id: te("uniqueUserID"), url: t, client: te("chatbotToken") });
685
697
  }
686
- function Wn() {
687
- Ke("Chatbot Closed", { distinct_id: se("uniqueUserID"), client: se("chatbotToken") });
698
+ function Kn() {
699
+ Ke("Chatbot Closed", { distinct_id: te("uniqueUserID"), client: te("chatbotToken") });
688
700
  }
689
- function Ai(t) {
690
- Ke("Message Sent", { distinct_id: se("uniqueUserID"), message_content: t, client: se("chatbotToken") });
701
+ function Bi(t) {
702
+ Ke("Message Sent", { distinct_id: te("uniqueUserID"), message_content: t, client: te("chatbotToken") });
691
703
  }
692
- function Fi(t) {
693
- Ke("Products Got", { distinct_id: se("uniqueUserID"), products: t, client: se("chatbotToken") });
704
+ function ji(t) {
705
+ Ke("Products Got", { distinct_id: te("uniqueUserID"), products: t, client: te("chatbotToken") });
694
706
  }
695
- function Mi(t) {
696
- Ke("Product Clicked", { distinct_id: se("uniqueUserID"), product_id: t, client: se("chatbotToken") });
707
+ function Ui(t) {
708
+ Ke("Product Clicked", { distinct_id: te("uniqueUserID"), product_id: t, client: te("chatbotToken") });
697
709
  }
698
710
  var $e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
699
- function $n(t) {
711
+ function Xn(t) {
700
712
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
701
713
  }
702
714
  var hs = { exports: {} };
@@ -904,7 +916,7 @@ var hs = { exports: {} };
904
916
  var x = "".concat(h.getContext().identity), R = function(L) {
905
917
  var z, _, $, Z;
906
918
  if (L && x === "".concat(h.getContext().identity)) {
907
- var ae = L.flags, ee = L.traits, te = L.identifier;
919
+ var ae = L.flags, ee = L.traits, se = L.identifier;
908
920
  h.isLoading = !1;
909
921
  var ce = {}, le = {};
910
922
  ee = ee || [], (ae = ae || []).forEach(function(K) {
@@ -913,7 +925,7 @@ var hs = { exports: {} };
913
925
  le[K.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: K.transient, value: K.trait_value };
914
926
  }), h.oldFlags = i({}, h.flags);
915
927
  var me = u(h.oldFlags, ce), Xe = u((z = h.evaluationContext.identity) === null || z === void 0 ? void 0 : z.traits, le);
916
- if ((te || Object.keys(le).length) && (h.evaluationContext.identity = { traits: le }, te && (h.evaluationContext.identity.identifier = te)), h.flags = ce, h.updateStorage(), h._onChange(h.oldFlags, { isFromServer: !0, flagsChanged: me, traitsChanged: Xe }, h._loadedState(null, c.SERVER)), h.datadogRum)
928
+ if ((se || Object.keys(le).length) && (h.evaluationContext.identity = { traits: le }, se && (h.evaluationContext.identity.identifier = se)), h.flags = ce, h.updateStorage(), h._onChange(h.oldFlags, { isFromServer: !0, flagsChanged: me, traitsChanged: Xe }, h._loadedState(null, c.SERVER)), h.datadogRum)
917
929
  try {
918
930
  if (h.datadogRum.trackTraits) {
919
931
  var Je = {};
@@ -1014,15 +1026,15 @@ var hs = { exports: {} };
1014
1026
  return d(m, z).then(function($) {
1015
1027
  var Z, ae, ee = "".concat((Z = h.evaluationContext.identity) === null || Z === void 0 ? void 0 : Z.identifier);
1016
1028
  if (_ === ee) {
1017
- var te = (ae = $.headers) === null || ae === void 0 ? void 0 : ae.get("x-flagsmith-document-updated-at");
1018
- if (te)
1029
+ var se = (ae = $.headers) === null || ae === void 0 ? void 0 : ae.get("x-flagsmith-document-updated-at");
1030
+ if (se)
1019
1031
  try {
1020
- var ce = parseFloat(te);
1032
+ var ce = parseFloat(se);
1021
1033
  if (isNaN(ce))
1022
1034
  return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
1023
1035
  h.timestamp = ce;
1024
1036
  } catch (le) {
1025
- h.log(le, "Failed to parse x-flagsmith-document-updated-at", te);
1037
+ h.log(le, "Failed to parse x-flagsmith-document-updated-at", se);
1026
1038
  }
1027
1039
  return h.log("Fetch response: " + $.status + " " + (g || "GET") + 0 + m), $.text().then(function(le) {
1028
1040
  var me = le;
@@ -1050,19 +1062,19 @@ var hs = { exports: {} };
1050
1062
  return v.prototype.init = function(f) {
1051
1063
  var h, m, g;
1052
1064
  return r(this, void 0, void 0, function() {
1053
- var S, x, R, L, z, _, $, Z, ae, ee, te, ce, le, me, Xe, Je, Me, ne, K, Dt, Ye, zs, Qe, At, Ws, $s, Ft, qs, Mt, Ze, Le, Vs, ie = this;
1065
+ var S, x, R, L, z, _, $, Z, ae, ee, se, ce, le, me, Xe, Je, Me, ne, K, Dt, Ye, zs, Qe, At, Ws, $s, Ft, qs, Mt, Ze, Le, Vs, ie = this;
1054
1066
  return o(this, function(pe) {
1055
1067
  switch (pe.label) {
1056
1068
  case 0:
1057
1069
  S = b(f.evaluationContext || this.evaluationContext), pe.label = 1;
1058
1070
  case 1:
1059
- if (pe.trys.push([1, 13, , 14]), x = f.environmentID, R = f.api, L = R === void 0 ? k : R, z = f.headers, _ = f.onChange, $ = f.cacheFlags, Z = f.datadogRum, ae = f.onError, ee = f.defaultFlags, te = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Xe = f.enableAnalytics, Je = f.realtime, Me = f.eventSourceUrl, ne = Me === void 0 ? "https://realtime.flagsmith.com/" : Me, K = f.AsyncStorage, Dt = f.identity, Ye = f.traits, zs = f.state, Qe = f.cacheOptions, At = f.angularHttpClient, Ws = f._trigger, $s = f._triggerLoadingState, S.environment = x ? { apiKey: x } : S.environment, !S.environment || !S.environment.apiKey)
1071
+ if (pe.trys.push([1, 13, , 14]), x = f.environmentID, R = f.api, L = R === void 0 ? k : R, z = f.headers, _ = f.onChange, $ = f.cacheFlags, Z = f.datadogRum, ae = f.onError, ee = f.defaultFlags, se = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Xe = f.enableAnalytics, Je = f.realtime, Me = f.eventSourceUrl, ne = Me === void 0 ? "https://realtime.flagsmith.com/" : Me, K = f.AsyncStorage, Dt = f.identity, Ye = f.traits, zs = f.state, Qe = f.cacheOptions, At = f.angularHttpClient, Ws = f._trigger, $s = f._triggerLoadingState, S.environment = x ? { apiKey: x } : S.environment, !S.environment || !S.environment.apiKey)
1060
1072
  throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
1061
1073
  if (S.identity = Dt || Ye ? { identifier: Dt, traits: Ye ? Object.fromEntries(Object.entries(Ye).map(function(ue) {
1062
1074
  return [ue[0], { value: ue[1] }];
1063
1075
  })) : {} } : S.identity, this.evaluationContext = S, this.api = L, this.headers = z, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = _, Ft = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Ws || this._trigger, this._triggerLoadingState = $s || this._triggerLoadingState, this.onError = function(ue) {
1064
1076
  ie.setLoadingState(i(i({}, ie.loadingState), { isFetching: !1, isLoading: !1, error: ue })), ae == null || ae(ue);
1065
- }, this.enableLogs = le || !1, this.cacheOptions = Qe ? { skipAPI: !!Qe.skipAPI, ttl: Qe.ttl || 0, loadStale: !!Qe.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), te && (d = te), this.enableAnalytics = Xe || !1, this.flags = Object.assign({}, ee) || {}, this.datadogRum = Z || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = D !== void 0 && !!$, K && (D = K), Je && typeof window < "u" && this.setupRealtime(ne, S.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState(zs), this.log("Initialising with properties", f, this), me && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), At && (d = /* @__PURE__ */ function(ue) {
1077
+ }, this.enableLogs = le || !1, this.cacheOptions = Qe ? { skipAPI: !!Qe.skipAPI, ttl: Qe.ttl || 0, loadStale: !!Qe.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), se && (d = se), this.enableAnalytics = Xe || !1, this.flags = Object.assign({}, ee) || {}, this.datadogRum = Z || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = D !== void 0 && !!$, K && (D = K), Je && typeof window < "u" && this.setupRealtime(ne, S.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState(zs), this.log("Initialising with properties", f, this), me && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), At && (d = /* @__PURE__ */ function(ue) {
1066
1078
  return function(ve, ye) {
1067
1079
  var Ee = ye.headers, J = ye.method, Pe = ye.body;
1068
1080
  return new Promise(function(Re) {
@@ -1396,9 +1408,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1396
1408
  }, s.default = H, Object.defineProperty(s, "__esModule", { value: !0 });
1397
1409
  });
1398
1410
  })(hs, hs.exports);
1399
- var Li = hs.exports;
1400
- const qn = /* @__PURE__ */ $n(Li);
1401
- var Ks = {}, Pi = function(t, e, s, n, i) {
1411
+ var Hi = hs.exports;
1412
+ const Jn = /* @__PURE__ */ Xn(Hi);
1413
+ var Ks = {}, zi = function(t, e, s, n, i) {
1402
1414
  var r = new Worker(Ks[e] || (Ks[e] = URL.createObjectURL(new Blob([
1403
1415
  t + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'
1404
1416
  ], { type: "text/javascript" }))));
@@ -1479,16 +1491,16 @@ var Ks = {}, Pi = function(t, e, s, n, i) {
1479
1491
  /* unused */
1480
1492
  0,
1481
1493
  0
1482
- ]), ds = new fe([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Vn = function(t, e) {
1494
+ ]), ds = new fe([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Yn = function(t, e) {
1483
1495
  for (var s = new oe(31), n = 0; n < 31; ++n)
1484
1496
  s[n] = e += 1 << t[n - 1];
1485
1497
  for (var i = new It(s[30]), n = 1; n < 30; ++n)
1486
1498
  for (var r = s[n]; r < s[n + 1]; ++r)
1487
1499
  i[r] = r - s[n] << 5 | n;
1488
1500
  return { b: s, r: i };
1489
- }, Gn = Vn(_t, 2), Bi = Gn.b, vt = Gn.r;
1490
- Bi[28] = 258, vt[258] = 28;
1491
- var ji = Vn(Ot, 0), fs = ji.r, yt = new oe(32768);
1501
+ }, Qn = Yn(_t, 2), Wi = Qn.b, vt = Qn.r;
1502
+ Wi[28] = 258, vt[258] = 28;
1503
+ var $i = Yn(Ot, 0), fs = $i.r, yt = new oe(32768);
1492
1504
  for (var X = 0; X < 32768; ++X) {
1493
1505
  var Ie = (X & 43690) >> 1 | (X & 21845) << 1;
1494
1506
  Ie = (Ie & 52428) >> 2 | (Ie & 13107) << 2, Ie = (Ie & 61680) >> 4 | (Ie & 3855) << 4, yt[X] = ((Ie & 65280) >> 8 | (Ie & 255) << 8) >> 1;
@@ -1523,11 +1535,11 @@ for (var X = 280; X < 288; ++X)
1523
1535
  var nt = new fe(32);
1524
1536
  for (var X = 0; X < 32; ++X)
1525
1537
  nt[X] = 5;
1526
- var Kn = /* @__PURE__ */ qe(Ne, 9, 0), Xn = /* @__PURE__ */ qe(nt, 5, 0), Os = function(t) {
1538
+ var Zn = /* @__PURE__ */ qe(Ne, 9, 0), ei = /* @__PURE__ */ qe(nt, 5, 0), Os = function(t) {
1527
1539
  return (t + 7) / 8 | 0;
1528
- }, Jn = function(t, e, s) {
1540
+ }, ti = function(t, e, s) {
1529
1541
  return (e == null || e < 0) && (e = 0), (s == null || s > t.length) && (s = t.length), new fe(t.subarray(e, s));
1530
- }, Ui = [
1542
+ }, qi = [
1531
1543
  "unexpected EOF",
1532
1544
  "invalid block type",
1533
1545
  "invalid length/literal",
@@ -1543,9 +1555,9 @@ var Kn = /* @__PURE__ */ qe(Ne, 9, 0), Xn = /* @__PURE__ */ qe(nt, 5, 0), Os = f
1543
1555
  "stream finishing",
1544
1556
  "invalid zip data"
1545
1557
  // determined by unknown compression method
1546
- ], Yn = function(t, e, s) {
1547
- var n = new Error(e || Ui[t]);
1548
- if (n.code = t, Error.captureStackTrace && Error.captureStackTrace(n, Yn), !s)
1558
+ ], si = function(t, e, s) {
1559
+ var n = new Error(e || qi[t]);
1560
+ if (n.code = t, Error.captureStackTrace && Error.captureStackTrace(n, si), !s)
1549
1561
  throw n;
1550
1562
  return n;
1551
1563
  }, be = function(t, e, s) {
@@ -1657,7 +1669,7 @@ var Kn = /* @__PURE__ */ qe(Ne, 9, 0), Xn = /* @__PURE__ */ qe(nt, 5, 0), Os = f
1657
1669
  be(e, c, f[S]), c += P[S], S > 15 && (be(e, c, g[C] >> 5 & 127), c += g[C] >> 12);
1658
1670
  }
1659
1671
  } else
1660
- q = Kn, G = Ne, H = Xn, v = nt;
1672
+ q = Zn, G = Ne, H = ei, v = nt;
1661
1673
  for (var C = 0; C < l; ++C) {
1662
1674
  var x = n[C];
1663
1675
  if (x > 255) {
@@ -1669,12 +1681,12 @@ var Kn = /* @__PURE__ */ qe(Ne, 9, 0), Xn = /* @__PURE__ */ qe(nt, 5, 0), Os = f
1669
1681
  He(e, c, q[x]), c += G[x];
1670
1682
  }
1671
1683
  return He(e, c, q[256]), c + G[256];
1672
- }, Qn = /* @__PURE__ */ new It([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Rs = /* @__PURE__ */ new fe(0), Zn = function(t, e, s, n, i, r) {
1684
+ }, ni = /* @__PURE__ */ new It([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Rs = /* @__PURE__ */ new fe(0), ii = function(t, e, s, n, i, r) {
1673
1685
  var o = r.z || t.length, l = new fe(n + o + 5 * (1 + Math.ceil(o / 7e3)) + i), a = l.subarray(n, l.length - i), u = r.l, c = (r.r || 0) & 7;
1674
1686
  if (e) {
1675
1687
  c && (a[0] = r.r >> 3);
1676
- for (var d = Qn[e - 1], p = d >> 13, y = d & 8191, w = (1 << s) - 1, b = r.p || new oe(32768), T = r.h || new oe(w + 1), D = Math.ceil(s / 3), B = 2 * D, A = function(te) {
1677
- return (t[te] ^ t[te + 1] << D ^ t[te + 2] << B) & w;
1688
+ for (var d = ni[e - 1], p = d >> 13, y = d & 8191, w = (1 << s) - 1, b = r.p || new oe(32768), T = r.h || new oe(w + 1), D = Math.ceil(s / 3), B = 2 * D, A = function(se) {
1689
+ return (t[se] ^ t[se + 1] << D ^ t[se + 2] << B) & w;
1678
1690
  }, k = new It(25e3), O = new oe(288), N = new oe(32), F = 0, C = 0, E = r.i || 0, P = 0, V = r.w || 0, j = 0; E + 2 < o; ++E) {
1679
1691
  var W = A(E), I = E & 32767, M = T[W];
1680
1692
  if (b[I] = M, T[W] = I, V <= E) {
@@ -1721,20 +1733,20 @@ var Kn = /* @__PURE__ */ qe(Ne, 9, 0), Xn = /* @__PURE__ */ qe(nt, 5, 0), Os = f
1721
1733
  }
1722
1734
  r.i = o;
1723
1735
  }
1724
- return Jn(l, 0, n + Os(c) + i);
1725
- }, ei = /* @__PURE__ */ function() {
1736
+ return ti(l, 0, n + Os(c) + i);
1737
+ }, ri = /* @__PURE__ */ function() {
1726
1738
  for (var t = new Int32Array(256), e = 0; e < 256; ++e) {
1727
1739
  for (var s = e, n = 9; --n; )
1728
1740
  s = (s & 1 && -306674912) ^ s >>> 1;
1729
1741
  t[e] = s;
1730
1742
  }
1731
1743
  return t;
1732
- }(), ti = function() {
1744
+ }(), oi = function() {
1733
1745
  var t = -1;
1734
1746
  return {
1735
1747
  p: function(e) {
1736
1748
  for (var s = t, n = 0; n < e.length; ++n)
1737
- s = ei[s & 255 ^ e[n]] ^ s >>> 8;
1749
+ s = ri[s & 255 ^ e[n]] ^ s >>> 8;
1738
1750
  t = s;
1739
1751
  },
1740
1752
  d: function() {
@@ -1746,8 +1758,8 @@ var Kn = /* @__PURE__ */ qe(Ne, 9, 0), Xn = /* @__PURE__ */ qe(nt, 5, 0), Os = f
1746
1758
  var r = e.dictionary.subarray(-32768), o = new fe(r.length + t.length);
1747
1759
  o.set(r), o.set(t, r.length), t = o, i.w = r.length;
1748
1760
  }
1749
- return Zn(t, e.level == null ? 6 : e.level, e.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, s, n, i);
1750
- }, Hi = function(t, e) {
1761
+ return ii(t, e.level == null ? 6 : e.level, e.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, s, n, i);
1762
+ }, Vi = function(t, e) {
1751
1763
  var s = {};
1752
1764
  for (var n in t)
1753
1765
  s[n] = t[n];
@@ -1775,27 +1787,27 @@ var Kn = /* @__PURE__ */ qe(Ne, 9, 0), Xn = /* @__PURE__ */ qe(nt, 5, 0), Os = f
1775
1787
  s[a] = l;
1776
1788
  }
1777
1789
  return e;
1778
- }, it = [], zi = function(t) {
1790
+ }, it = [], Gi = function(t) {
1779
1791
  var e = [];
1780
1792
  for (var s in t)
1781
1793
  t[s].buffer && e.push((t[s] = new t[s].constructor(t[s])).buffer);
1782
1794
  return e;
1783
- }, Wi = function(t, e, s, n) {
1795
+ }, Ki = function(t, e, s, n) {
1784
1796
  if (!it[s]) {
1785
1797
  for (var i = "", r = {}, o = t.length - 1, l = 0; l < o; ++l)
1786
1798
  i = Xs(t[l], i, r);
1787
1799
  it[s] = { c: Xs(t[o], i, r), e: r };
1788
1800
  }
1789
- var a = Hi({}, it[s].e);
1790
- return Pi(it[s].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", s, a, zi(a), n);
1791
- }, $i = function() {
1792
- return [fe, oe, It, _t, Ot, ds, vt, fs, Kn, Ne, Xn, nt, yt, Qn, Rs, qe, be, He, ht, bt, ps, ze, Ns, gs, Os, Jn, Zn, Ds, Gi, si];
1793
- }, qi = function() {
1794
- return [ni, ii, St, ti, ei];
1795
- }, si = function(t) {
1801
+ var a = Vi({}, it[s].e);
1802
+ return zi(it[s].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", s, a, Gi(a), n);
1803
+ }, Xi = function() {
1804
+ return [fe, oe, It, _t, Ot, ds, vt, fs, Zn, Ne, ei, nt, yt, ni, Rs, qe, be, He, ht, bt, ps, ze, Ns, gs, Os, ti, ii, Ds, Qi, ai];
1805
+ }, Ji = function() {
1806
+ return [ci, li, St, oi, ri];
1807
+ }, ai = function(t) {
1796
1808
  return postMessage(t, [t.buffer]);
1797
- }, Vi = function(t, e, s, n, i, r) {
1798
- var o = Wi(s, n, i, function(l, a) {
1809
+ }, Yi = function(t, e, s, n, i, r) {
1810
+ var o = Ki(s, n, i, function(l, a) {
1799
1811
  o.terminate(), r(l, a);
1800
1812
  });
1801
1813
  return o.postMessage([t, e], e.consume ? [t.buffer] : []), function() {
@@ -1804,40 +1816,40 @@ var Kn = /* @__PURE__ */ qe(Ne, 9, 0), Xn = /* @__PURE__ */ qe(nt, 5, 0), Os = f
1804
1816
  }, St = function(t, e, s) {
1805
1817
  for (; s; ++e)
1806
1818
  t[e] = s, s >>>= 8;
1807
- }, ni = function(t, e) {
1819
+ }, ci = function(t, e) {
1808
1820
  var s = e.filename;
1809
1821
  if (t[0] = 31, t[1] = 139, t[2] = 8, t[8] = e.level < 2 ? 4 : e.level == 9 ? 2 : 0, t[9] = 3, e.mtime != 0 && St(t, 4, Math.floor(new Date(e.mtime || Date.now()) / 1e3)), s) {
1810
1822
  t[3] = 8;
1811
1823
  for (var n = 0; n <= s.length; ++n)
1812
1824
  t[n + 10] = s.charCodeAt(n);
1813
1825
  }
1814
- }, ii = function(t) {
1826
+ }, li = function(t) {
1815
1827
  return 10 + (t.filename ? t.filename.length + 1 : 0);
1816
1828
  };
1817
- function Gi(t, e) {
1829
+ function Qi(t, e) {
1818
1830
  return Ds(t, e || {}, 0, 0);
1819
1831
  }
1820
- function Ki(t, e, s) {
1821
- return s || (s = e, e = {}), typeof s != "function" && Yn(7), Vi(t, e, [
1822
- $i,
1823
- qi,
1832
+ function Zi(t, e, s) {
1833
+ return s || (s = e, e = {}), typeof s != "function" && si(7), Yi(t, e, [
1834
+ Xi,
1835
+ Ji,
1824
1836
  function() {
1825
1837
  return [Js];
1826
1838
  }
1827
1839
  ], function(n) {
1828
- return si(Js(n.data[0], n.data[1]));
1840
+ return ai(Js(n.data[0], n.data[1]));
1829
1841
  }, 2, s);
1830
1842
  }
1831
1843
  function Js(t, e) {
1832
1844
  e || (e = {});
1833
- var s = ti(), n = t.length;
1845
+ var s = oi(), n = t.length;
1834
1846
  s.p(t);
1835
- var i = Ds(t, e, ii(e), 8), r = i.length;
1836
- return ni(i, e), St(i, r - 8, s.d()), St(i, r - 4, n), i;
1847
+ var i = Ds(t, e, li(e), 8), r = i.length;
1848
+ return ci(i, e), St(i, r - 8, s.d()), St(i, r - 4, n), i;
1837
1849
  }
1838
- var Xi = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Ji = 0;
1850
+ var er = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), tr = 0;
1839
1851
  try {
1840
- Xi.decode(Rs, { stream: !0 }), Ji = 1;
1852
+ er.decode(Rs, { stream: !0 }), tr = 1;
1841
1853
  } catch {
1842
1854
  }
1843
1855
  class Ys {
@@ -1849,7 +1861,7 @@ class Ys {
1849
1861
  return this.backDict[e] || (s = !0, this.backDict[e] = this.idx++), [this.backDict[e], s];
1850
1862
  }
1851
1863
  }
1852
- class Yi {
1864
+ class sr {
1853
1865
  constructor(e, s) {
1854
1866
  this.app = e, this.isDictDisabled = s, this.dict = new Ys();
1855
1867
  }
@@ -1875,11 +1887,11 @@ class Yi {
1875
1887
  this.dict = new Ys();
1876
1888
  }
1877
1889
  }
1878
- class Qi {
1890
+ class nr {
1879
1891
  constructor(e, s) {
1880
1892
  this.app = e, this.startParams = s, this.conditions = [], this.hasStarted = !1, this.createConditionFromFilter = (n) => {
1881
1893
  if (n.value.length) {
1882
- const i = Zi(n);
1894
+ const i = ir(n);
1883
1895
  if (i.type)
1884
1896
  return i;
1885
1897
  }
@@ -2022,7 +2034,7 @@ const Be = {
2022
2034
  greaterOrEqual: (t, e) => t >= e,
2023
2035
  lessOrEqual: (t, e) => t <= e,
2024
2036
  lessThan: (t, e) => t < e
2025
- }, Zi = (t) => {
2037
+ }, ir = (t) => {
2026
2038
  const e = {
2027
2039
  on: "is",
2028
2040
  notOn: "isNot",
@@ -2130,7 +2142,7 @@ const Be = {
2130
2142
  }
2131
2143
  return n;
2132
2144
  };
2133
- class er {
2145
+ class rr {
2134
2146
  constructor(e) {
2135
2147
  this.app = e, this.flags = [], this.storageKey = "__openreplay_flags";
2136
2148
  const s = this.app.sessionStorage.getItem(this.storageKey);
@@ -2201,7 +2213,7 @@ class er {
2201
2213
  return e.filter((r) => i.findIndex((o) => o.key === r.key) === -1);
2202
2214
  }
2203
2215
  }
2204
- const Qs = { htmlmasked: "hidden", masked: "obscured" }, xe = !(typeof window > "u"), tr = xe && navigator.userAgent.match(/firefox|fxios/i), sr = 1e5;
2216
+ const Qs = { htmlmasked: "hidden", masked: "obscured" }, xe = !(typeof window > "u"), or = xe && navigator.userAgent.match(/firefox|fxios/i), ar = 1e5;
2205
2217
  let As = xe ? Date.now() - performance.now() : 0;
2206
2218
  function Zt() {
2207
2219
  As = Date.now() - performance.now();
@@ -2210,10 +2222,10 @@ function Ge() {
2210
2222
  return As;
2211
2223
  }
2212
2224
  const ge = xe && performance.now ? () => Math.round(performance.now() + As) : () => Date.now(), es = "repeat" in String.prototype ? (t) => "*".repeat(t.length) : (t) => t.replace(/./g, "*");
2213
- function ri(t) {
2225
+ function ui(t) {
2214
2226
  return t.trim().replace(/\s+/g, " ");
2215
2227
  }
2216
- function oi(t) {
2228
+ function hi(t) {
2217
2229
  return t.startsWith("https://") || t.startsWith("http://");
2218
2230
  }
2219
2231
  const wt = "https://docs.openreplay.com", Zs = {};
@@ -2233,7 +2245,7 @@ function Fe(t, e) {
2233
2245
  "/installation/sanitize-data"
2234
2246
  ), !0) : !1;
2235
2247
  }
2236
- function nr(t) {
2248
+ function cr(t) {
2237
2249
  try {
2238
2250
  return !!t.contentDocument;
2239
2251
  } catch {
@@ -2243,11 +2255,11 @@ function nr(t) {
2243
2255
  function en(t) {
2244
2256
  return t.toString(16).padStart(2, "0");
2245
2257
  }
2246
- function ir(t) {
2258
+ function lr(t) {
2247
2259
  const e = new Uint8Array((t || 40) / 2), s = window.crypto || window.msCrypto;
2248
2260
  return s ? (s.getRandomValues(e), Array.from(e, en).join("")) : Array.from({ length: t || 40 }, () => en(Math.floor(Math.random() * 16))).join("");
2249
2261
  }
2250
- function rr() {
2262
+ function ur() {
2251
2263
  try {
2252
2264
  return window.self && window.top && window.self !== window.top;
2253
2265
  } catch {
@@ -2260,11 +2272,11 @@ function Ms(t) {
2260
2272
  window.Zone.__symbol__(t)
2261
2273
  ) : t;
2262
2274
  }
2263
- function ai(t) {
2275
+ function di(t) {
2264
2276
  const e = Ms("MutationObserver");
2265
2277
  return new window[e](t);
2266
2278
  }
2267
- function ci(t, e, s, n) {
2279
+ function fi(t, e, s, n) {
2268
2280
  const i = Ms("addEventListener");
2269
2281
  try {
2270
2282
  t[i](e, s, n);
@@ -2276,7 +2288,7 @@ function ci(t, e, s, n) {
2276
2288
  );
2277
2289
  }
2278
2290
  }
2279
- function li(t, e, s, n) {
2291
+ function pi(t, e, s, n) {
2280
2292
  const i = Ms("removeEventListener");
2281
2293
  try {
2282
2294
  t[i](e, s, n);
@@ -2288,7 +2300,7 @@ function li(t, e, s, n) {
2288
2300
  );
2289
2301
  }
2290
2302
  }
2291
- class or {
2303
+ class hr {
2292
2304
  constructor() {
2293
2305
  this.taskQueue = [], this.isRunning = !1;
2294
2306
  }
@@ -2314,16 +2326,16 @@ class or {
2314
2326
  e();
2315
2327
  }
2316
2328
  }
2317
- const ar = new or();
2318
- function cr(t) {
2319
- ar.addTask(t);
2329
+ const dr = new hr();
2330
+ function fr(t) {
2331
+ dr.addTask(t);
2320
2332
  }
2321
- function ui(t, e) {
2333
+ function gi(t, e) {
2322
2334
  const s = { ...t };
2323
2335
  for (const n in e)
2324
2336
  if (e.hasOwnProperty(n)) {
2325
2337
  const i = e[n], r = t[n];
2326
- typeof i == "object" && !Array.isArray(i) && i !== null ? s[n] = ui(r || {}, i) : s[n] = i;
2338
+ typeof i == "object" && !Array.isArray(i) && i !== null ? s[n] = gi(r || {}, i) : s[n] = i;
2327
2339
  }
2328
2340
  return s;
2329
2341
  }
@@ -2333,26 +2345,26 @@ function De(t) {
2333
2345
  t
2334
2346
  ];
2335
2347
  }
2336
- function lr(t, e) {
2348
+ function pr(t, e) {
2337
2349
  return [
2338
2350
  5,
2339
2351
  t,
2340
2352
  e
2341
2353
  ];
2342
2354
  }
2343
- function ur(t, e) {
2355
+ function gr(t, e) {
2344
2356
  return [
2345
2357
  6,
2346
2358
  t,
2347
2359
  e
2348
2360
  ];
2349
2361
  }
2350
- function hr() {
2362
+ function mr() {
2351
2363
  return [
2352
2364
  7
2353
2365
  ];
2354
2366
  }
2355
- function dr(t, e, s, n, i) {
2367
+ function vr(t, e, s, n, i) {
2356
2368
  return [
2357
2369
  8,
2358
2370
  t,
@@ -2362,7 +2374,7 @@ function dr(t, e, s, n, i) {
2362
2374
  i
2363
2375
  ];
2364
2376
  }
2365
- function fr(t, e, s) {
2377
+ function yr(t, e, s) {
2366
2378
  return [
2367
2379
  9,
2368
2380
  t,
@@ -2370,7 +2382,7 @@ function fr(t, e, s) {
2370
2382
  s
2371
2383
  ];
2372
2384
  }
2373
- function pr(t, e, s) {
2385
+ function br(t, e, s) {
2374
2386
  return [
2375
2387
  10,
2376
2388
  t,
@@ -2378,7 +2390,7 @@ function pr(t, e, s) {
2378
2390
  s
2379
2391
  ];
2380
2392
  }
2381
- function gr(t) {
2393
+ function Sr(t) {
2382
2394
  return [
2383
2395
  11,
2384
2396
  t
@@ -2391,14 +2403,14 @@ function tn(t, e) {
2391
2403
  e
2392
2404
  ];
2393
2405
  }
2394
- function mr(t, e) {
2406
+ function wr(t, e) {
2395
2407
  return [
2396
2408
  14,
2397
2409
  t,
2398
2410
  e
2399
2411
  ];
2400
2412
  }
2401
- function vr(t, e, s) {
2413
+ function xr(t, e, s) {
2402
2414
  return [
2403
2415
  16,
2404
2416
  t,
@@ -2406,7 +2418,7 @@ function vr(t, e, s) {
2406
2418
  s
2407
2419
  ];
2408
2420
  }
2409
- function yr(t, e, s) {
2421
+ function kr(t, e, s) {
2410
2422
  return [
2411
2423
  18,
2412
2424
  t,
@@ -2414,28 +2426,28 @@ function yr(t, e, s) {
2414
2426
  s
2415
2427
  ];
2416
2428
  }
2417
- function br(t, e) {
2429
+ function Tr(t, e) {
2418
2430
  return [
2419
2431
  19,
2420
2432
  t,
2421
2433
  e
2422
2434
  ];
2423
2435
  }
2424
- function Sr(t, e) {
2436
+ function Er(t, e) {
2425
2437
  return [
2426
2438
  20,
2427
2439
  t,
2428
2440
  e
2429
2441
  ];
2430
2442
  }
2431
- function wr(t, e) {
2443
+ function Cr(t, e) {
2432
2444
  return [
2433
2445
  22,
2434
2446
  t,
2435
2447
  e
2436
2448
  ];
2437
2449
  }
2438
- function xr(t, e, s, n, i, r, o, l, a) {
2450
+ function Ir(t, e, s, n, i, r, o, l, a) {
2439
2451
  return [
2440
2452
  23,
2441
2453
  t,
@@ -2449,7 +2461,7 @@ function xr(t, e, s, n, i, r, o, l, a) {
2449
2461
  a
2450
2462
  ];
2451
2463
  }
2452
- function kr(t, e, s) {
2464
+ function _r(t, e, s) {
2453
2465
  return [
2454
2466
  24,
2455
2467
  t,
@@ -2457,20 +2469,20 @@ function kr(t, e, s) {
2457
2469
  s
2458
2470
  ];
2459
2471
  }
2460
- function Tr(t, e) {
2472
+ function Or(t, e) {
2461
2473
  return [
2462
2474
  27,
2463
2475
  t,
2464
2476
  e
2465
2477
  ];
2466
2478
  }
2467
- function Er(t) {
2479
+ function Nr(t) {
2468
2480
  return [
2469
2481
  28,
2470
2482
  t
2471
2483
  ];
2472
2484
  }
2473
- function Cr(t) {
2485
+ function Rr(t) {
2474
2486
  return [
2475
2487
  29,
2476
2488
  t
@@ -2483,7 +2495,7 @@ function sn(t, e) {
2483
2495
  e
2484
2496
  ];
2485
2497
  }
2486
- function Ir(t, e, s, n) {
2498
+ function Dr(t, e, s, n) {
2487
2499
  return [
2488
2500
  49,
2489
2501
  t,
@@ -2492,14 +2504,14 @@ function Ir(t, e, s, n) {
2492
2504
  n
2493
2505
  ];
2494
2506
  }
2495
- function _r(t, e) {
2507
+ function Ar(t, e) {
2496
2508
  return [
2497
2509
  54,
2498
2510
  t,
2499
2511
  e
2500
2512
  ];
2501
2513
  }
2502
- function Or(t) {
2514
+ function Fr(t) {
2503
2515
  return [
2504
2516
  55,
2505
2517
  t
@@ -2529,7 +2541,7 @@ function ms(t, e, s, n) {
2529
2541
  n
2530
2542
  ];
2531
2543
  }
2532
- function Nr(t, e, s) {
2544
+ function Mr(t, e, s) {
2533
2545
  return [
2534
2546
  61,
2535
2547
  t,
@@ -2537,21 +2549,21 @@ function Nr(t, e, s) {
2537
2549
  s
2538
2550
  ];
2539
2551
  }
2540
- function Rr(t, e) {
2552
+ function Lr(t, e) {
2541
2553
  return [
2542
2554
  63,
2543
2555
  t,
2544
2556
  e
2545
2557
  ];
2546
2558
  }
2547
- function Dr(t, e) {
2559
+ function Pr(t, e) {
2548
2560
  return [
2549
2561
  64,
2550
2562
  t,
2551
2563
  e
2552
2564
  ];
2553
2565
  }
2554
- function Ar(t, e, s, n, i, r) {
2566
+ function Br(t, e, s, n, i, r) {
2555
2567
  return [
2556
2568
  68,
2557
2569
  t,
@@ -2593,14 +2605,14 @@ function an(t, e) {
2593
2605
  e
2594
2606
  ];
2595
2607
  }
2596
- function hi(t, e) {
2608
+ function mi(t, e) {
2597
2609
  return [
2598
2610
  76,
2599
2611
  t,
2600
2612
  e
2601
2613
  ];
2602
2614
  }
2603
- function Fr(t, e) {
2615
+ function jr(t, e) {
2604
2616
  return [
2605
2617
  77,
2606
2618
  t,
@@ -2630,7 +2642,7 @@ function xt(t, e, s, n, i, r, o, l, a) {
2630
2642
  a
2631
2643
  ];
2632
2644
  }
2633
- function Mr(t, e, s, n, i, r) {
2645
+ function Ur(t, e, s, n, i, r) {
2634
2646
  return [
2635
2647
  84,
2636
2648
  t,
@@ -2641,7 +2653,7 @@ function Mr(t, e, s, n, i, r) {
2641
2653
  r
2642
2654
  ];
2643
2655
  }
2644
- function Lr(t, e, s, n, i, r) {
2656
+ function Hr(t, e, s, n, i, r) {
2645
2657
  return [
2646
2658
  112,
2647
2659
  t,
@@ -2660,19 +2672,19 @@ function cn(t, e, s) {
2660
2672
  s
2661
2673
  ];
2662
2674
  }
2663
- function Pr(t) {
2675
+ function zr(t) {
2664
2676
  return [
2665
2677
  114,
2666
2678
  t
2667
2679
  ];
2668
2680
  }
2669
- function Br(t) {
2681
+ function Wr(t) {
2670
2682
  return [
2671
2683
  115,
2672
2684
  t
2673
2685
  ];
2674
2686
  }
2675
- function di(t, e, s, n, i, r, o, l, a, u) {
2687
+ function vi(t, e, s, n, i, r, o, l, a, u) {
2676
2688
  return [
2677
2689
  116,
2678
2690
  t,
@@ -2699,20 +2711,20 @@ function Ae(t) {
2699
2711
  t
2700
2712
  ];
2701
2713
  }
2702
- function jr(t, e) {
2714
+ function $r(t, e) {
2703
2715
  return [
2704
2716
  119,
2705
2717
  t,
2706
2718
  e
2707
2719
  ];
2708
2720
  }
2709
- function Ur(t) {
2721
+ function qr(t) {
2710
2722
  return [
2711
2723
  120,
2712
2724
  t
2713
2725
  ];
2714
2726
  }
2715
- function Hr(t, e, s, n) {
2727
+ function Vr(t, e, s, n) {
2716
2728
  return [
2717
2729
  122,
2718
2730
  t,
@@ -2722,7 +2734,7 @@ function Hr(t, e, s, n) {
2722
2734
  ];
2723
2735
  }
2724
2736
  const Ss = xe && "performance" in window && "memory" in performance ? performance : { memory: {} }, ts = xe ? (navigator.deviceMemory || 0) * 1024 : 0, ss = Ss.memory.jsHeapSizeLimit || 0;
2725
- function zr(t, e) {
2737
+ function Gr(t, e) {
2726
2738
  if (!Object.assign({
2727
2739
  capturePerformance: !0
2728
2740
  }, e).capturePerformance)
@@ -2735,7 +2747,7 @@ function zr(t, e) {
2735
2747
  i === void 0 || i === -1 || i++;
2736
2748
  }, 0, !1);
2737
2749
  const o = () => {
2738
- n === void 0 || i === void 0 || (t.send(Ir(n, i, Ss.memory.totalJSHeapSize || 0, Ss.memory.usedJSHeapSize || 0)), i = n = document.hidden ? -1 : 0);
2750
+ n === void 0 || i === void 0 || (t.send(Dr(n, i, Ss.memory.totalJSHeapSize || 0, Ss.memory.usedJSHeapSize || 0)), i = n = document.hidden ? -1 : 0);
2739
2751
  };
2740
2752
  t.attachStartCallback(() => {
2741
2753
  i = n = -1, o(), r();
@@ -2744,7 +2756,7 @@ function zr(t, e) {
2744
2756
  }), t.ticker.attach(o, 40, !1), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", o, !1, !1);
2745
2757
  }
2746
2758
  const ln = "__or__watched_tags__";
2747
- class Wr {
2759
+ class Kr {
2748
2760
  constructor(e, s, n) {
2749
2761
  this.sessionStorage = e, this.errLog = s, this.onTag = n, this.intervals = {}, this.tags = [];
2750
2762
  const i = JSON.parse(e.getItem(ln) ?? "[]");
@@ -2791,7 +2803,7 @@ class Wr {
2791
2803
  }), this.tags = [], this.intervals = {}, this.observer.disconnect();
2792
2804
  }
2793
2805
  }
2794
- const $r = {
2806
+ const Xr = {
2795
2807
  position: "fixed",
2796
2808
  top: 0,
2797
2809
  left: 0,
@@ -2803,7 +2815,7 @@ const $r = {
2803
2815
  justifyContent: "center",
2804
2816
  zIndex: 999999,
2805
2817
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
2806
- }, qr = {
2818
+ }, Jr = {
2807
2819
  display: "flex",
2808
2820
  flexDirection: "column",
2809
2821
  gap: "2rem",
@@ -2824,14 +2836,14 @@ const $r = {
2824
2836
  border: "1px solid #D9D9D9",
2825
2837
  background: "rgba(255, 255, 255, 0.75)",
2826
2838
  width: "22rem"
2827
- }, Vr = {
2839
+ }, Yr = {
2828
2840
  fontFamily: "Verdana, sans-serif",
2829
2841
  fontSize: "1.25rem",
2830
2842
  fontStyle: "normal",
2831
2843
  fontWeight: "500",
2832
2844
  lineHeight: "1.75rem",
2833
2845
  color: "rgba(0, 0, 0, 0.85)"
2834
- }, Gr = {
2846
+ }, Qr = {
2835
2847
  borderTop: "1px solid rgba(0, 0, 0, 0.06)",
2836
2848
  borderBottom: "1px solid rgba(0, 0, 0, 0.06)",
2837
2849
  padding: "1.25rem 0rem",
@@ -2842,7 +2854,7 @@ const $r = {
2842
2854
  fontWeight: "400",
2843
2855
  lineHeight: "auto",
2844
2856
  whiteSpace: "pre-wrap"
2845
- }, Kr = {
2857
+ }, Zr = {
2846
2858
  display: "flex",
2847
2859
  padding: "0.4rem 0.9375rem",
2848
2860
  justifyContent: "center",
@@ -2876,7 +2888,7 @@ const $r = {
2876
2888
  gap: "0.625rem",
2877
2889
  fontSize: "13px",
2878
2890
  lineHeight: "auto"
2879
- }, Xr = {
2891
+ }, eo = {
2880
2892
  padding: "0.5rem",
2881
2893
  gap: "0.5rem",
2882
2894
  fontFamily: "Verdana, sans-serif",
@@ -2905,7 +2917,7 @@ const $r = {
2905
2917
  fontStyle: "normal",
2906
2918
  fontWeight: "400"
2907
2919
  // lineHeight: '1.375rem',
2908
- }, Jr = {
2920
+ }, to = {
2909
2921
  ...We,
2910
2922
  display: "flex",
2911
2923
  flexDirection: "column",
@@ -2944,7 +2956,7 @@ const $r = {
2944
2956
  fontWeight: "500",
2945
2957
  fontSize: "13px!important",
2946
2958
  lineHeight: "auto"
2947
- }, Yr = {
2959
+ }, so = {
2948
2960
  display: "flex",
2949
2961
  justifyContent: "space-between",
2950
2962
  alignItems: "center",
@@ -2962,7 +2974,7 @@ const $r = {
2962
2974
  fontSize: "13px",
2963
2975
  height: "24px",
2964
2976
  width: "24px"
2965
- }, Qr = {
2977
+ }, no = {
2966
2978
  display: "flex",
2967
2979
  flexDirection: "column",
2968
2980
  alignItems: "center",
@@ -2986,10 +2998,10 @@ const $r = {
2986
2998
  alignSelf: "stretch"
2987
2999
  }, mn = {
2988
3000
  fontWeight: "bold"
2989
- }, Zr = {
3001
+ }, io = {
2990
3002
  fontSize: "13px",
2991
3003
  lineHeight: "auto"
2992
- }, fi = {
3004
+ }, yi = {
2993
3005
  marginRight: "0.5rem",
2994
3006
  cursor: "pointer",
2995
3007
  color: "#394EFF",
@@ -2999,8 +3011,8 @@ const $r = {
2999
3011
  fontStyle: "normal",
3000
3012
  fontWeight: "500",
3001
3013
  lineHeight: "auto"
3002
- }, eo = {
3003
- ...fi,
3014
+ }, ro = {
3015
+ ...yi,
3004
3016
  display: "flex",
3005
3017
  padding: "0.25rem 0.9375rem",
3006
3018
  justifyContent: "center",
@@ -3008,13 +3020,13 @@ const $r = {
3008
3020
  gap: "0.5rem",
3009
3021
  borderRadius: "0.25rem",
3010
3022
  border: "1px solid #394EFF"
3011
- }, to = {
3023
+ }, oo = {
3012
3024
  display: "flex",
3013
3025
  justifyContent: "space-between",
3014
3026
  alignItems: "center",
3015
3027
  width: "100%",
3016
3028
  boxSizing: "border-box"
3017
- }, so = {
3029
+ }, ao = {
3018
3030
  border: "4px solid rgba(255, 255, 255, 0.4)",
3019
3031
  width: "16px",
3020
3032
  height: "16px",
@@ -3025,7 +3037,7 @@ const $r = {
3025
3037
  Standard: { width: 1280, height: 720 },
3026
3038
  High: { width: 1920, height: 1080 }
3027
3039
  };
3028
- class no {
3040
+ class co {
3029
3041
  constructor(e) {
3030
3042
  this.app = e, this.mediaRecorder = null, this.recordedChunks = [], this.stream = null, this.recStartTs = null;
3031
3043
  }
@@ -3084,7 +3096,7 @@ class no {
3084
3096
  (e = this.mediaRecorder) == null || e.stop(), (s = this.stream) == null || s.getTracks().forEach((n) => n.stop());
3085
3097
  }
3086
3098
  }
3087
- function io(t, e) {
3099
+ function lo(t, e) {
3088
3100
  e.onmousedown = function(s) {
3089
3101
  const n = t.getBoundingClientRect(), i = s.clientX - n.left, r = s.clientY - n.top;
3090
3102
  t.style.position = "fixed", t.style.zIndex = 99999999999999, o(s.pageX, s.pageY);
@@ -3104,7 +3116,7 @@ function io(t, e) {
3104
3116
  return !1;
3105
3117
  };
3106
3118
  }
3107
- function ro() {
3119
+ function uo() {
3108
3120
  const t = document.createElement("div");
3109
3121
  t.className = "grid";
3110
3122
  for (let e = 0; e < 16; e++) {
@@ -3124,7 +3136,7 @@ function ro() {
3124
3136
  cursor: "grab"
3125
3137
  }), t;
3126
3138
  }
3127
- function oo() {
3139
+ function ho() {
3128
3140
  const t = document.createElement("div");
3129
3141
  Object.assign(t.style, {
3130
3142
  width: "0",
@@ -3145,24 +3157,24 @@ function oo() {
3145
3157
  transform: "rotate(180deg)"
3146
3158
  }), e;
3147
3159
  }
3148
- function ao() {
3160
+ function fo() {
3149
3161
  const t = document.createElement("style");
3150
3162
  t.type = "text/css", t.innerText = `@keyframes spin {
3151
3163
  0% { transform: rotate(0deg); }
3152
3164
  100% { transform: rotate(360deg); }
3153
3165
  }`, document.head.appendChild(t);
3154
3166
  }
3155
- function co() {
3156
- ao();
3167
+ function po() {
3168
+ fo();
3157
3169
  const t = document.createElement("div");
3158
- return t.classList.add("spinner"), Object.assign(t.style, so), t;
3170
+ return t.classList.add("spinner"), Object.assign(t.style, ao), t;
3159
3171
  }
3160
3172
  function U(t, e, s, n, i) {
3161
3173
  const r = document.createElement(t);
3162
3174
  return r.className = e, Object.assign(r.style, s), n && (r.textContent = n), i && (r.id = i), r;
3163
3175
  }
3164
- const ft = "or_uxt_test_start", ws = "or_uxt_task_index", xs = "or_uxt_session_id", lo = "or_uxt_test_id";
3165
- class uo {
3176
+ const ft = "or_uxt_test_start", ws = "or_uxt_task_index", xs = "or_uxt_session_id", go = "or_uxt_test_id";
3177
+ class mo {
3166
3178
  constructor(e, s, n, i, r, o, l, a, u) {
3167
3179
  this.ingestPoint = e, this.getTimestamp = s, this.token = n, this.testId = i, this.storageKey = r, this.setStorageKey = o, this.removeStorageKey = l, this.getStorageKey = a, this.getSessionId = u, this.durations = {
3168
3180
  testStart: 0,
@@ -3214,9 +3226,9 @@ class uo {
3214
3226
  c && (this.durations.testStart = parseInt(c, 10));
3215
3227
  }
3216
3228
  }
3217
- class ho {
3229
+ class vo {
3218
3230
  constructor(e, s) {
3219
- this.app = e, this.storageKey = s, this.bg = U("div", "bg", $r, void 0, "__or_ut_bg"), this.container = U("div", "container", qr, void 0, "__or_ut_ct"), this.widgetGuidelinesVisible = !0, this.widgetTasksVisible = !1, this.widgetVisible = !0, this.isActive = !1, this.descriptionSection = null, this.taskSection = null, this.endSection = null, this.stopButton = null, this.stopButtonContainer = null, this.test = null, this.testId = null, this.signalManager = null, this.getTest = (o, l, a) => {
3231
+ this.app = e, this.storageKey = s, this.bg = U("div", "bg", Xr, void 0, "__or_ut_bg"), this.container = U("div", "container", Jr, void 0, "__or_ut_ct"), this.widgetGuidelinesVisible = !0, this.widgetTasksVisible = !1, this.widgetVisible = !0, this.isActive = !1, this.descriptionSection = null, this.taskSection = null, this.endSection = null, this.stopButton = null, this.stopButtonContainer = null, this.test = null, this.testId = null, this.signalManager = null, this.getTest = (o, l, a) => {
3220
3232
  this.testId = o;
3221
3233
  const u = this.app.options.ingestPoint;
3222
3234
  return fetch(`${u}/v1/web/uxt/test/${o}`, {
@@ -3224,14 +3236,14 @@ class ho {
3224
3236
  Authorization: `Bearer ${l}`
3225
3237
  }
3226
3238
  }).then((c) => c.json()).then(({ test: c }) => {
3227
- this.isActive = !0, this.test = c, this.signalManager = new uo(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (d, p) => this.app.localStorage.setItem(d, p), (d) => this.app.localStorage.removeItem(d), (d) => this.app.localStorage.getItem(d), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, vn.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
3239
+ this.isActive = !0, this.test = c, this.signalManager = new mo(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (d, p) => this.app.localStorage.setItem(d, p), (d) => this.app.localStorage.removeItem(d), (d) => this.app.localStorage.getItem(d), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, vn.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
3228
3240
  }).then(() => o).catch((c) => {
3229
3241
  console.log("OR: Error fetching test", c);
3230
3242
  });
3231
3243
  }, this.hideTaskSection = () => !1, this.showTaskSection = () => !0, this.collapseWidget = () => !1, this.removeGreeting = () => !1, this.toggleDescriptionVisibility = () => {
3232
- }, this.currentTaskIndex = 0, this.userRecorder = new no(e);
3244
+ }, this.currentTaskIndex = 0, this.userRecorder = new co(e);
3233
3245
  const n = this.app.getSessionID(), i = this.app.localStorage.getItem(xs);
3234
- n !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(xs), this.app.localStorage.removeItem(lo), this.app.localStorage.removeItem(ws), this.app.localStorage.removeItem(ft));
3246
+ n !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(xs), this.app.localStorage.removeItem(go), this.app.localStorage.removeItem(ws), this.app.localStorage.removeItem(ft));
3235
3247
  const r = this.app.localStorage.getItem(ws);
3236
3248
  r && (this.currentTaskIndex = parseInt(r, 10));
3237
3249
  }
@@ -3239,10 +3251,10 @@ class ho {
3239
3251
  return this.testId;
3240
3252
  }
3241
3253
  createGreeting(e, s, n) {
3242
- const i = U("div", "title", Vr, e), r = U("div", "description", Gr, `Welcome, you're here to help us improve, not to be judged. Your insights matter!
3254
+ const i = U("div", "title", Yr, e), r = U("div", "description", Qr, `Welcome, you're here to help us improve, not to be judged. Your insights matter!
3243
3255
 
3244
3256
  📹 We're recording this browser tab to learn from your experience.
3245
- 🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = U("div", "button", Kr, "Read guidelines to begin");
3257
+ 🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = U("div", "button", Zr, "Read guidelines to begin");
3246
3258
  this.removeGreeting = () => ((s || n) && this.userRecorder.startRecording(30, vn.Standard, s, n), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(i), !1), o.onclick = () => {
3247
3259
  var a, u, c, d;
3248
3260
  this.removeGreeting();
@@ -3274,7 +3286,7 @@ class ho {
3274
3286
  }
3275
3287
  createTitleSection() {
3276
3288
  var l;
3277
- const e = U("div", "title", Xr), s = ro(), n = U("div", "title_text", {
3289
+ const e = U("div", "title", eo), s = uo(), n = U("div", "title_text", {
3278
3290
  maxWidth: "19rem",
3279
3291
  overflow: "hidden",
3280
3292
  textOverflow: "ellipsis",
@@ -3282,14 +3294,14 @@ class ho {
3282
3294
  fontSize: 16,
3283
3295
  lineHeight: "auto",
3284
3296
  cursor: "pointer"
3285
- }, (l = this.test) == null ? void 0 : l.title), i = oo();
3297
+ }, (l = this.test) == null ? void 0 : l.title), i = ho();
3286
3298
  e.append(s, n, i);
3287
3299
  const r = (a) => (this.widgetVisible = a, this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, this.widgetVisible ? rt : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? We : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? We : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? We : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ? fn : { display: "none" }), a), o = () => {
3288
3300
  Object.assign(i.style, {
3289
3301
  transform: this.widgetVisible ? "rotate(0deg)" : "rotate(180deg)"
3290
3302
  }), r(!this.widgetVisible);
3291
3303
  };
3292
- return n.onclick = o, i.onclick = o, io(this.bg, s), this.collapseWidget = () => r(!1), e;
3304
+ return n.onclick = o, i.onclick = o, lo(this.bg, s), this.collapseWidget = () => r(!1), e;
3293
3305
  }
3294
3306
  createDescriptionSection(e) {
3295
3307
  const s = U("div", "description_section_or", We), n = U("div", "description_s_title_or", un), i = U("div", "title", {
@@ -3330,13 +3342,13 @@ class ho {
3330
3342
  fontSize: "13px",
3331
3343
  fontWeight: "500",
3332
3344
  lineHeight: "auto"
3333
- }, "Tasks"), r = U("div", "icon", hn, "-"), o = U("div", "content", je), l = U("div", "pagination", Yr), a = U("div", "taskCard", gn), u = U("div", "taskText", mn), c = U("div", "taskDescription", Zr), d = U("div", "taskButtons", to), p = U("div", "taskText", mn);
3345
+ }, "Tasks"), r = U("div", "icon", hn, "-"), o = U("div", "content", je), l = U("div", "pagination", so), a = U("div", "taskCard", gn), u = U("div", "taskText", mn), c = U("div", "taskDescription", io), d = U("div", "taskButtons", oo), p = U("div", "taskText", mn);
3334
3346
  p.textContent = "Your answer";
3335
3347
  const y = U("textarea", "taskDescription", {
3336
3348
  resize: "vertical"
3337
3349
  }), w = U("div", "inputArea", gn);
3338
3350
  w.append(p, y);
3339
- const b = U("div", "closePanelButton", fi, "Collapse Panel"), T = U("div", "nextButton", eo, "Done, Next");
3351
+ const b = U("div", "closePanelButton", yi, "Collapse Panel"), T = U("div", "nextButton", ro, "Done, Next");
3340
3352
  n.append(i, r), a.append(u, c), d.append(b, T), o.append(l, a, w, d), s.append(n, o);
3341
3353
  const D = () => {
3342
3354
  const k = e[this.currentTaskIndex];
@@ -3367,7 +3379,7 @@ class ho {
3367
3379
  k && Object.assign(k.style, pn);
3368
3380
  for (let O = 0; O < this.currentTaskIndex; O++) {
3369
3381
  const N = document.getElementById(`or_task_${O}`);
3370
- N && Object.assign(N.style, Qr);
3382
+ N && Object.assign(N.style, no);
3371
3383
  }
3372
3384
  };
3373
3385
  return n.onclick = B, b.onclick = this.collapseWidget, T.onclick = () => {
@@ -3392,12 +3404,12 @@ class ho {
3392
3404
  var l, a, u, c;
3393
3405
  let e = !0;
3394
3406
  (l = this.signalManager) == null || l.signalTest("done");
3395
- const s = U("div", "end_section_or", Jr), n = U("div", "end_title_or", {
3407
+ const s = U("div", "end_section_or", to), n = U("div", "end_title_or", {
3396
3408
  fontSize: "1.25rem",
3397
3409
  fontWeight: "500"
3398
3410
  }, "Thank you! 👍"), i = U("div", "end_description_or", {}, ((a = this.test) == null ? void 0 : a.conclusion) ?? `Thank you for participating in our usability test. Your feedback has been captured and will be used to enhance our website.
3399
3411
 
3400
- We appreciate your time and valuable input.`), r = U("div", "end_button_or", dn, "Submitting Feedback"), o = co();
3412
+ We appreciate your time and valuable input.`), r = U("div", "end_button_or", dn, "Submitting Feedback"), o = po();
3401
3413
  r.appendChild(o), (u = this.test) != null && u.reqMic || (c = this.test) != null && c.reqCamera ? this.userRecorder.sendToAPI().then(() => {
3402
3414
  r.removeChild(o), r.textContent = "End Session", e = !1;
3403
3415
  }).catch((d) => {
@@ -3407,7 +3419,7 @@ We appreciate your time and valuable input.`), r = U("div", "end_button_or", dn,
3407
3419
  }, s.append(n, i, r), this.endSection = s, this.container.append(s);
3408
3420
  }
3409
3421
  }
3410
- function pi(t) {
3422
+ function bi(t) {
3411
3423
  return !!t && t.nodeType != null;
3412
3424
  }
3413
3425
  function ks(t) {
@@ -3416,7 +3428,7 @@ function ks(t) {
3416
3428
  function Te(t) {
3417
3429
  return t.nodeType === Node.ELEMENT_NODE;
3418
3430
  }
3419
- function fo(t) {
3431
+ function yo(t) {
3420
3432
  return t.nodeType === Node.COMMENT_NODE;
3421
3433
  }
3422
3434
  function Ts(t) {
@@ -3431,7 +3443,7 @@ function Nt(t) {
3431
3443
  function Q(t, e) {
3432
3444
  return t.localName === e;
3433
3445
  }
3434
- class po {
3446
+ class bo {
3435
3447
  constructor(e, s) {
3436
3448
  this.app = e, this.options = s, this.snapshots = {}, this.intervals = [], this.restartTracking = () => {
3437
3449
  this.clear(), this.app.nodes.scanTree(this.captureCanvas);
@@ -3452,10 +3464,10 @@ class po {
3452
3464
  paused: !1,
3453
3465
  dummy: document.createElement("canvas")
3454
3466
  };
3455
- const o = jr(i.toString(), r);
3467
+ const o = $r(i.toString(), r);
3456
3468
  this.app.send(o);
3457
3469
  const l = (u) => {
3458
- go(u, this.options.quality, this.snapshots[i].dummy, this.options.fixedScaling, this.fileExt, (c) => {
3470
+ So(u, this.options.quality, this.snapshots[i].dummy, this.options.fixedScaling, this.fileExt, (c) => {
3459
3471
  c && (this.snapshots[i].images.push({ id: this.app.timestamp(), data: c }), this.snapshots[i].images.length > 9 && (this.sendSnaps(this.snapshots[i].images, i, this.snapshots[i].createdAt), this.snapshots[i].images = []));
3460
3472
  });
3461
3473
  }, a = setInterval(() => {
@@ -3480,7 +3492,7 @@ class po {
3480
3492
  const i = new FormData();
3481
3493
  e.forEach((r) => {
3482
3494
  const o = r.data;
3483
- o && (i.append("snapshot", o, `${n}_${s}_${r.id}.${this.fileExt}`), this.options.isDebug && mo(o, `${n}_${s}_${r.id}.${this.fileExt}`));
3495
+ o && (i.append("snapshot", o, `${n}_${s}_${r.id}.${this.fileExt}`), this.options.isDebug && wo(o, `${n}_${s}_${r.id}.${this.fileExt}`));
3484
3496
  }), fetch(this.app.options.ingestPoint + "/v1/web/images", {
3485
3497
  method: "POST",
3486
3498
  headers: {
@@ -3500,7 +3512,7 @@ const yn = {
3500
3512
  medium: 0.55,
3501
3513
  high: 0.8
3502
3514
  };
3503
- function go(t, e = "medium", s, n = !1, i, r) {
3515
+ function So(t, e = "medium", s, n = !1, i, r) {
3504
3516
  const o = `image/${i}`;
3505
3517
  if (n) {
3506
3518
  const l = window.devicePixelRatio || 1;
@@ -3512,7 +3524,7 @@ function go(t, e = "medium", s, n = !1, i, r) {
3512
3524
  } else
3513
3525
  t.toBlob(r, o, yn[e]);
3514
3526
  }
3515
- function mo(t, e) {
3527
+ function wo(t, e) {
3516
3528
  const s = URL.createObjectURL(t), n = document.createElement("a");
3517
3529
  n.href = s, n.download = e, n.style.display = "none", document.body.appendChild(n), n.click(), document.body.removeChild(n);
3518
3530
  }
@@ -3523,7 +3535,7 @@ const tt = {
3523
3535
  Errors: 2,
3524
3536
  Silent: 0
3525
3537
  };
3526
- class vo {
3538
+ class xo {
3527
3539
  constructor(e = tt.Silent) {
3528
3540
  this.shouldLog = (s) => this.level >= s, this.log = (...s) => {
3529
3541
  this.shouldLog(tt.Log) && console.log(...s);
@@ -3534,7 +3546,7 @@ class vo {
3534
3546
  }, this.level = e;
3535
3547
  }
3536
3548
  }
3537
- class yo {
3549
+ class ko {
3538
3550
  constructor(e) {
3539
3551
  this.node_id = e, this.nodes = [], this.totalNodeAmount = 0, this.nodeCallbacks = [], this.elementListeners = /* @__PURE__ */ new Map(), this.nextNodeId = 0, this.scanTree = (s) => {
3540
3552
  this.nodes.forEach((n) => s(n));
@@ -3554,7 +3566,7 @@ class yo {
3554
3566
  const r = this.getID(e);
3555
3567
  if (r === void 0)
3556
3568
  return;
3557
- ci(e, s, n, i);
3569
+ fi(e, s, n, i);
3558
3570
  let o = this.elementListeners.get(r);
3559
3571
  o === void 0 && (o = [], this.elementListeners.set(r, o)), o.push([s, n, i]);
3560
3572
  }
@@ -3568,7 +3580,7 @@ class yo {
3568
3580
  if (s !== void 0) {
3569
3581
  e[this.node_id] = void 0, delete e[this.node_id], delete this.nodes[s];
3570
3582
  const n = this.elementListeners.get(s);
3571
- n !== void 0 && (this.elementListeners.delete(s), n.forEach((i) => li(e, i[0], i[1], i[2]))), this.totalNodeAmount--;
3583
+ n !== void 0 && (this.elementListeners.delete(s), n.forEach((i) => pi(e, i[0], i[1], i[2]))), this.totalNodeAmount--;
3572
3584
  }
3573
3585
  return s;
3574
3586
  }
@@ -3600,7 +3612,7 @@ class yo {
3600
3612
  }
3601
3613
  }
3602
3614
  function Es(t) {
3603
- if (fo(t))
3615
+ if (yo(t))
3604
3616
  return !0;
3605
3617
  if (Ts(t))
3606
3618
  return !1;
@@ -3622,7 +3634,7 @@ var Se;
3622
3634
  })(Se || (Se = {}));
3623
3635
  class Ls {
3624
3636
  constructor(e, s = !1) {
3625
- this.app = e, this.isTopContext = s, this.commited = [], this.recents = /* @__PURE__ */ new Map(), this.indexes = [], this.attributesMap = /* @__PURE__ */ new Map(), this.textSet = /* @__PURE__ */ new Set(), this.observer = ai(this.app.safe((n) => {
3637
+ this.app = e, this.isTopContext = s, this.commited = [], this.recents = /* @__PURE__ */ new Map(), this.indexes = [], this.attributesMap = /* @__PURE__ */ new Map(), this.textSet = /* @__PURE__ */ new Set(), this.observer = di(this.app.safe((n) => {
3626
3638
  for (const i of n) {
3627
3639
  const r = i.target, o = i.type;
3628
3640
  if (!ns(r))
@@ -3675,10 +3687,10 @@ class Ls {
3675
3687
  }
3676
3688
  sendNodeData(e, s, n) {
3677
3689
  if (Q(s, "style")) {
3678
- this.app.send(Nr(e, n, this.app.getBaseHref()));
3690
+ this.app.send(Mr(e, n, this.app.getBaseHref()));
3679
3691
  return;
3680
3692
  }
3681
- n = this.app.sanitizer.sanitize(e, n), this.app.send(mr(e, n));
3693
+ n = this.app.sanitizer.sanitize(e, n), this.app.send(wr(e, n));
3682
3694
  }
3683
3695
  bindNode(e) {
3684
3696
  const [s, n] = this.app.nodes.registerNode(e);
@@ -3703,7 +3715,7 @@ class Ls {
3703
3715
  unbindTree(e) {
3704
3716
  const s = this.app.nodes.unregisterNode(e);
3705
3717
  if (s !== void 0 && this.recents.get(s) === Se.Removed) {
3706
- this.app.send(gr(s));
3718
+ this.app.send(Sr(s));
3707
3719
  const n = document.createTreeWalker(
3708
3720
  e,
3709
3721
  NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_TEXT,
@@ -3718,7 +3730,7 @@ class Ls {
3718
3730
  for (; n.nextNode(); )
3719
3731
  i += 1, this.app.nodes.unregisterNode(n.currentNode);
3720
3732
  const o = Math.floor(i / r * 100);
3721
- o > 30 && this.app.send(Br(o));
3733
+ o > 30 && this.app.send(Wr(o));
3722
3734
  }
3723
3735
  }
3724
3736
  // A top-consumption function on the infinite lists test. (~1% of performance resources)
@@ -3758,17 +3770,17 @@ class Ls {
3758
3770
  const d = c.clientWidth, p = c.clientHeight;
3759
3771
  c = s.cloneNode(), c.style.width = `${d}px`, c.style.height = `${p}px`;
3760
3772
  }
3761
- this.app.send(dr(e, i, a, c.tagName, ks(s)));
3773
+ this.app.send(vr(e, i, a, c.tagName, ks(s)));
3762
3774
  }
3763
3775
  for (let d = 0; d < c.attributes.length; d++) {
3764
3776
  const p = c.attributes[d];
3765
3777
  this.sendNodeAttribute(e, c, p.nodeName, p.value);
3766
3778
  }
3767
3779
  } else
3768
- Ts(s) && (this.app.send(fr(e, i, a)), this.sendNodeData(e, n, s.data));
3780
+ Ts(s) && (this.app.send(yr(e, i, a)), this.sendNodeData(e, n, s.data));
3769
3781
  return !0;
3770
3782
  }
3771
- o === Se.Removed && i !== void 0 && this.app.send(pr(e, i, a));
3783
+ o === Se.Removed && i !== void 0 && this.app.send(br(e, i, a));
3772
3784
  const u = this.attributesMap.get(e);
3773
3785
  if (u !== void 0) {
3774
3786
  if (!Te(s))
@@ -3833,7 +3845,7 @@ class bn extends Ls {
3833
3845
  });
3834
3846
  }
3835
3847
  }
3836
- class bo extends Ls {
3848
+ class To extends Ls {
3837
3849
  observe(e) {
3838
3850
  const s = e.shadowRoot, n = this.app.nodes.getID(e);
3839
3851
  !s || n === void 0 || this.observeRoot(s, (i) => {
@@ -3845,7 +3857,7 @@ class bo extends Ls {
3845
3857
  });
3846
3858
  }
3847
3859
  }
3848
- class So {
3860
+ class Eo {
3849
3861
  constructor() {
3850
3862
  this.states = /* @__PURE__ */ new Map();
3851
3863
  }
@@ -3885,9 +3897,9 @@ class So {
3885
3897
  }
3886
3898
  }
3887
3899
  const is = xe ? Element.prototype.attachShadow : () => new ShadowRoot();
3888
- class wo extends Ls {
3900
+ class Co extends Ls {
3889
3901
  constructor(e, s) {
3890
- super(e, !0), this.iframeOffsets = new So(), this.contextCallbacks = [], this.contextsSet = /* @__PURE__ */ new Set(), this.iframeObservers = [], this.shadowRootObservers = [], this.options = Object.assign({
3902
+ super(e, !0), this.iframeOffsets = new Eo(), this.contextCallbacks = [], this.contextsSet = /* @__PURE__ */ new Set(), this.iframeObservers = [], this.shadowRootObservers = [], this.options = Object.assign({
3891
3903
  captureIFrames: !0
3892
3904
  }, s), this.app.nodes.attachNodeCallback((n) => {
3893
3905
  Q(n, "iframe") && (this.options.captureIFrames && !Fe(n, "obscured") || Fe(n, "capture")) && this.handleIframe(n);
@@ -3904,7 +3916,7 @@ class wo extends Ls {
3904
3916
  handleIframe(e) {
3905
3917
  let s = null;
3906
3918
  const n = this.app.safe(() => setTimeout(() => {
3907
- if (this.app.nodes.getID(e) === void 0 || !nr(e))
3919
+ if (this.app.nodes.getID(e) === void 0 || !cr(e))
3908
3920
  return;
3909
3921
  const r = e.contentWindow, o = e.contentDocument;
3910
3922
  if (o && o !== s) {
@@ -3917,7 +3929,7 @@ class wo extends Ls {
3917
3929
  e.addEventListener("load", n), n();
3918
3930
  }
3919
3931
  handleShadowRoot(e) {
3920
- const s = new bo(this.app);
3932
+ const s = new To(this.app);
3921
3933
  this.shadowRootObservers.push(s), s.observe(e.host);
3922
3934
  }
3923
3935
  observe() {
@@ -3926,7 +3938,7 @@ class wo extends Ls {
3926
3938
  const s = is.apply(this, arguments);
3927
3939
  return e.handleShadowRoot(s), s;
3928
3940
  }, this.app.nodes.clear(), this.observeRoot(window.document, () => {
3929
- this.app.send(hr()), this.app.nodes.callNodeCallbacks(document, !0);
3941
+ this.app.send(mr()), this.app.nodes.callNodeCallbacks(document, !0);
3930
3942
  }, window.document.documentElement);
3931
3943
  }
3932
3944
  crossdomainObserve(e, s) {
@@ -3946,8 +3958,8 @@ var Tt;
3946
3958
  (function(t) {
3947
3959
  t[t.Plain = 0] = "Plain", t[t.Obscured = 1] = "Obscured", t[t.Hidden = 2] = "Hidden";
3948
3960
  })(Tt || (Tt = {}));
3949
- const xo = (t) => t.trim().replace(/[^\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g, "█");
3950
- class ko {
3961
+ const Io = (t) => t.trim().replace(/[^\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g, "█");
3962
+ class _o {
3951
3963
  constructor(e, s) {
3952
3964
  this.app = e, this.obscured = /* @__PURE__ */ new Set(), this.hidden = /* @__PURE__ */ new Set(), this.options = Object.assign({
3953
3965
  obscureTextEmails: !0,
@@ -3961,7 +3973,7 @@ class ko {
3961
3973
  }
3962
3974
  }
3963
3975
  sanitize(e, s) {
3964
- return this.obscured.has(e) ? xo(s) : (this.options.obscureTextNumbers && (s = s.replace(/\d/g, "0")), this.options.obscureTextEmails && (s = s.replace(/^\w+([+.-]\w+)*@\w+([.-]\w+)*\.\w{2,3}$/g, (n) => {
3976
+ return this.obscured.has(e) ? Io(s) : (this.options.obscureTextNumbers && (s = s.replace(/\d/g, "0")), this.options.obscureTextEmails && (s = s.replace(/^\w+([+.-]\w+)*@\w+([.-]\w+)*\.\w{2,3}$/g, (n) => {
3965
3977
  const [i, r] = n.split("@"), [o, l] = r.split(".");
3966
3978
  return `${es(i)}@${es(o)}.${es(l)}`;
3967
3979
  })), s);
@@ -3980,7 +3992,7 @@ class ko {
3980
3992
  this.obscured.clear(), this.hidden.clear();
3981
3993
  }
3982
3994
  }
3983
- class To {
3995
+ class Oo {
3984
3996
  constructor(e, s) {
3985
3997
  this.app = e, this.options = s, this.metadata = {}, this.userID = null, this.callbacks = [], this.timestamp = 0, this.createTabId();
3986
3998
  }
@@ -4031,7 +4043,7 @@ class To {
4031
4043
  return this.tabId || this.createTabId(), this.tabId;
4032
4044
  }
4033
4045
  regenerateTabId() {
4034
- const e = ir(12);
4046
+ const e = lr(12);
4035
4047
  this.app.sessionStorage.setItem(this.options.session_tabid_key, e), this.tabId = e;
4036
4048
  }
4037
4049
  createTabId() {
@@ -4051,13 +4063,13 @@ class To {
4051
4063
  this.app.sessionStorage.removeItem(this.options.session_token_key), this.metadata = {}, this.userID = null, this.sessionID = void 0, this.timestamp = 0;
4052
4064
  }
4053
4065
  }
4054
- function Eo(t, e) {
4066
+ function No(t, e) {
4055
4067
  let s = 0;
4056
4068
  return () => {
4057
4069
  s++ >= e && (s = 0, t());
4058
4070
  };
4059
4071
  }
4060
- class Co {
4072
+ class Ro {
4061
4073
  constructor(e) {
4062
4074
  this.app = e, this.timer = null, this.callbacks = [];
4063
4075
  }
@@ -4068,7 +4080,7 @@ class Co {
4068
4080
  * @param {object} thisArg - link to <this>
4069
4081
  * */
4070
4082
  attach(e, s = 0, n = !0, i) {
4071
- i && (e = e.bind(i)), n && (e = this.app.safe(e)), this.callbacks.unshift(s ? Eo(e, s) : e) - 1;
4083
+ i && (e = e.bind(i)), n && (e = this.app.safe(e)), this.callbacks.unshift(s ? No(e, s) : e) - 1;
4072
4084
  }
4073
4085
  start() {
4074
4086
  this.timer === null && (this.timer = setInterval(() => this.callbacks.forEach((e) => {
@@ -4079,17 +4091,17 @@ class Co {
4079
4091
  this.timer !== null && (clearInterval(this.timer), this.timer = null);
4080
4092
  }
4081
4093
  }
4082
- const et = "canceled", Sn = "or_uxt_active", rs = "or_buffer_1", _e = (t) => ({ reason: t, success: !1 }), Io = (t) => ({ ...t, success: !0 });
4094
+ const et = "canceled", Sn = "or_uxt_active", rs = "or_buffer_1", _e = (t) => ({ reason: t, success: !1 }), Do = (t) => ({ ...t, success: !0 });
4083
4095
  var Y;
4084
4096
  (function(t) {
4085
4097
  t[t.NotActive = 0] = "NotActive", t[t.Starting = 1] = "Starting", t[t.Active = 2] = "Active", t[t.ColdStart = 3] = "ColdStart";
4086
4098
  })(Y || (Y = {}));
4087
- const gi = "https://api.openreplay.com/ingest";
4099
+ const Si = "https://api.openreplay.com/ingest";
4088
4100
  function os() {
4089
4101
  const t = (/* @__PURE__ */ new Date()).getTimezoneOffset() * -1, e = t >= 0 ? "+" : "-", s = Math.floor(Math.abs(t) / 60), n = Math.abs(t) % 60;
4090
4102
  return `UTC${e}${String(s).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
4091
4103
  }
4092
- const _o = (t) => new Promise((e) => setTimeout(e, t)), he = {
4104
+ const Ao = (t) => new Promise((e) => setTimeout(e, t)), he = {
4093
4105
  // ask if there are any tabs alive
4094
4106
  ask: "never-gonna-give-you-up",
4095
4107
  // response from another tab
@@ -4103,7 +4115,7 @@ const _o = (t) => new Promise((e) => setTimeout(e, t)), he = {
4103
4115
  // batch of messages from an iframe window
4104
4116
  iframeBatch: "never-gonna-tell-a-lie-and-hurt-you"
4105
4117
  };
4106
- class Oo {
4118
+ class Fo {
4107
4119
  constructor(e, s, n, i, r) {
4108
4120
  this.signalError = i, this.insideIframe = r, this.messages = [], this.bufferedMessages1 = [], this.bufferedMessages2 = [], this.startCallbacks = [], this.stopCallbacks = [], this.commitCallbacks = [], this.activityState = Y.NotActive, this.version = "14.0.4", this.socketMode = !1, this.compressionThreshold = 24 * 1e3, this.bc = null, this.canvasRecorder = null, this.conditionsManager = null, this.canStart = !1, this.rootId = null, this.pageFrames = [], this.frameOderNumber = 0, this.initialHostName = location.hostname, this.startTimeout = null, this.coldStartCommitN = 0, this.delay = 0, this.coldInterval = null, this.orderNumber = 0, this.coldStartTs = 0, this.singleBuffer = !1, this.onSessionSent = () => {
4109
4121
  }, this.restartCanvasTracking = () => {
@@ -4133,7 +4145,7 @@ class Oo {
4133
4145
  session_reset_key: "__openreplay_reset",
4134
4146
  session_tabid_key: "__openreplay_tabid",
4135
4147
  local_uuid_key: "__openreplay_uuid",
4136
- ingestPoint: gi,
4148
+ ingestPoint: Si,
4137
4149
  resourceBaseHref: null,
4138
4150
  __is_snippet: !1,
4139
4151
  __debug_report_edp: null,
@@ -4159,14 +4171,14 @@ class Oo {
4159
4171
  useAnimationFrame: !1
4160
4172
  }
4161
4173
  };
4162
- if (this.options = ui(o, n), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
4174
+ if (this.options = gi(o, n), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
4163
4175
  const a = location.hostname.split(".").slice(-2).join("_");
4164
4176
  this.bc = new BroadcastChannel(`rick_${a}`);
4165
4177
  }
4166
- this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new ko(this, n), this.nodes = new yo(this.options.node_id), this.observer = new wo(this, n), this.ticker = new Co(this), this.ticker.attach(() => this.commit()), this.debug = new vo(this.options.__debug__), this.session = new To(this, this.options), this.attributeSender = new Yi(this, !!this.options.disableStringDict), this.featureFlags = new er(this), this.tagWatcher = new Wr(this.sessionStorage, this.debug.error, (a) => {
4167
- this.send(Ur(a));
4178
+ this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new _o(this, n), this.nodes = new ko(this.options.node_id), this.observer = new Co(this, n), this.ticker = new Ro(this), this.ticker.attach(() => this.commit()), this.debug = new xo(this.options.__debug__), this.session = new Oo(this, this.options), this.attributeSender = new sr(this, !!this.options.disableStringDict), this.featureFlags = new rr(this), this.tagWatcher = new Kr(this.sessionStorage, this.debug.error, (a) => {
4179
+ this.send(qr(a));
4168
4180
  }), this.session.attachUpdateCallback(({ userID: a, metadata: u }) => {
4169
- a != null && this.send(Er(a)), u != null && Object.entries(u).forEach(([c, d]) => this.send(sn(c, d)));
4181
+ a != null && this.send(Nr(a)), u != null && Object.entries(u).forEach(([c, d]) => this.send(sn(c, d)));
4170
4182
  }), s != null && this.session.applySessionHash(s), this.initWorker();
4171
4183
  const l = this.session.getTabId();
4172
4184
  if (this.insideIframe) {
@@ -4210,7 +4222,7 @@ class Oo {
4210
4222
  }).catch(console.error), b = 10;
4211
4223
  break;
4212
4224
  }
4213
- b++, await _o(100);
4225
+ b++, await Ao(100);
4214
4226
  }
4215
4227
  })();
4216
4228
  }
@@ -4315,7 +4327,7 @@ class Oo {
4315
4327
  this.stop(!1), this.debug.error("worker_failed", e.reason), this._debug("worker_failed", e.reason);
4316
4328
  else if (e.type === "compress") {
4317
4329
  const n = e.batch;
4318
- n.byteLength > this.compressionThreshold ? Ki(e.batch, { mtime: 0 }, (r, o) => {
4330
+ n.byteLength > this.compressionThreshold ? Zi(e.batch, { mtime: 0 }, (r, o) => {
4319
4331
  var l, a;
4320
4332
  r ? (this.debug.error("Openreplay compression error:", r), (l = this.worker) == null || l.postMessage({ type: "uncompressed", batch: n })) : (a = this.worker) == null || a.postMessage({ type: "compressed", batch: o });
4321
4333
  }) : (s = this.worker) == null || s.postMessage({ type: "uncompressed", batch: n });
@@ -4356,7 +4368,7 @@ class Oo {
4356
4368
  return;
4357
4369
  }
4358
4370
  try {
4359
- cr(() => {
4371
+ fr(() => {
4360
4372
  var e;
4361
4373
  this.messages.unshift(Ae(this.session.getTabId())), this.messages.unshift(De(this.timestamp())), (e = this.worker) == null || e.postMessage(this.messages), this.commitCallbacks.forEach((s) => s(this.messages)), this.messages.length = 0;
4362
4374
  });
@@ -4408,7 +4420,7 @@ class Oo {
4408
4420
  // Use app.nodes.attachNodeListener for registered nodes instead
4409
4421
  attachEventListener(e, s, n, i = !0, r = !0) {
4410
4422
  i && (n = this.safe(n));
4411
- const o = () => e ? ci(e, s, n, r) : null, l = () => e ? li(e, s, n, r) : null;
4423
+ const o = () => e ? fi(e, s, n, r) : null, l = () => e ? pi(e, s, n, r) : null;
4412
4424
  this.attachStartCallback(o, i), this.attachStopCallback(l, i);
4413
4425
  }
4414
4426
  // TODO: full correct semantic
@@ -4506,7 +4518,7 @@ class Oo {
4506
4518
  }
4507
4519
  async setupConditionalStart(e) {
4508
4520
  var p, y;
4509
- this.conditionsManager = new Qi(this, e);
4521
+ this.conditionsManager = new nr(this, e);
4510
4522
  const s = await fetch(this.options.ingestPoint + "/v1/web/start", {
4511
4523
  method: "POST",
4512
4524
  headers: {
@@ -4749,7 +4761,7 @@ class Oo {
4749
4761
  beaconSizeLimit: p
4750
4762
  }), !l && u === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(dt(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([I, M]) => this.send(sn(I, M))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = y;
4751
4763
  const V = { sessionToken: u, userUUID: c, sessionID: b };
4752
- if (this.startCallbacks.forEach((I) => I(V)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, u), this.activityState = Y.Active, F && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new po(this, {
4764
+ if (this.startCallbacks.forEach((I) => I(V)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, u), this.activityState = Y.Active, F && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new bo(this, {
4753
4765
  fps: E,
4754
4766
  quality: C,
4755
4767
  isDebug: this.options.canvas.__save_canvas_locally,
@@ -4762,7 +4774,7 @@ class Oo {
4762
4774
  this.clearBuffers(), this.commit();
4763
4775
  } else
4764
4776
  this.insideIframe && this.rootId ? this.observer.crossdomainObserve(this.rootId, this.frameOderNumber) : this.observer.observe(), this.ticker.start();
4765
- this.uxtManager = this.uxtManager ? this.uxtManager : new ho(this, Sn);
4777
+ this.uxtManager = this.uxtManager ? this.uxtManager : new vo(this, Sn);
4766
4778
  let j;
4767
4779
  const W = this.localStorage.getItem(Sn);
4768
4780
  if (W && (j = parseInt(W, 10)), location != null && location.search) {
@@ -4774,7 +4786,7 @@ class Oo {
4774
4786
  }
4775
4787
  return j && (this.uxtManager.isActive ? this.onUxtCb.forEach((I) => I(j)) : this.uxtManager.getTest(j, u, !!W).then((I) => {
4776
4788
  I && this.onUxtCb.forEach((M) => M(I));
4777
- })), Io(V);
4789
+ })), Do(V);
4778
4790
  } catch (a) {
4779
4791
  if (this.stop(), this.session.reset(), a === et)
4780
4792
  return this.signalError(et, []), _e(et);
@@ -4836,7 +4848,7 @@ class Oo {
4836
4848
  trackWs(e) {
4837
4849
  const s = e;
4838
4850
  return (n, i, r = "down") => {
4839
- typeof n != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || n.length > 255 || this.send(Mr("websocket", s, i, this.timestamp(), r, n));
4851
+ typeof n != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || n.length > 255 || this.send(Ur("websocket", s, i, this.timestamp(), r, n));
4840
4852
  };
4841
4853
  }
4842
4854
  stop(e = !0) {
@@ -4849,22 +4861,22 @@ class Oo {
4849
4861
  }
4850
4862
  }
4851
4863
  }
4852
- function No(t) {
4864
+ function Mo(t) {
4853
4865
  const e = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
4854
4866
  if (e === void 0)
4855
4867
  return;
4856
- const s = () => t.send(_r(Math.round(e.downlink * 1e3), e.type || "unknown"));
4868
+ const s = () => t.send(Ar(Math.round(e.downlink * 1e3), e.type || "unknown"));
4857
4869
  s(), e.addEventListener("change", s);
4858
4870
  }
4859
- const mi = xe && "InstallTrigger" in window ? (t) => t.message + `
4871
+ const wi = xe && "InstallTrigger" in window ? (t) => t.message + `
4860
4872
  ` + t.stack : (t) => t.stack || t.message;
4861
4873
  function Cs(t) {
4862
- return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ? mi(t) : Array.isArray(t) ? `Array(${t.length})` : String(t);
4874
+ return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ? wi(t) : Array.isArray(t) ? `Array(${t.length})` : String(t);
4863
4875
  }
4864
- function Ro(t) {
4876
+ function Lo(t) {
4865
4877
  return typeof t != "number" ? "NaN" : t.toString();
4866
4878
  }
4867
- function Do(t) {
4879
+ function Po(t) {
4868
4880
  return typeof t != "number" ? "NaN" : Math.floor(t).toString();
4869
4881
  }
4870
4882
  function wn(t) {
@@ -4873,7 +4885,7 @@ function wn(t) {
4873
4885
  if (t === null)
4874
4886
  return "null";
4875
4887
  if (t instanceof Error)
4876
- return mi(t);
4888
+ return wi(t);
4877
4889
  if (Array.isArray(t)) {
4878
4890
  const e = t.length, s = t.slice(0, 10).map(Cs).join(", ");
4879
4891
  return `Array(${e})[${s}]`;
@@ -4891,7 +4903,7 @@ function wn(t) {
4891
4903
  }
4892
4904
  return t.toString();
4893
4905
  }
4894
- function Ao(t) {
4906
+ function Bo(t) {
4895
4907
  return typeof t[0] == "string" && t.unshift(t.shift().replace(/%(o|s|f|d|i)/g, (e, s) => {
4896
4908
  const n = t.shift();
4897
4909
  if (n === void 0)
@@ -4902,24 +4914,24 @@ function Ao(t) {
4902
4914
  case "s":
4903
4915
  return Cs(n);
4904
4916
  case "f":
4905
- return Ro(n);
4917
+ return Lo(n);
4906
4918
  case "d":
4907
4919
  case "i":
4908
- return Do(n);
4920
+ return Po(n);
4909
4921
  default:
4910
4922
  return e;
4911
4923
  }
4912
4924
  })), t.map(wn).join(" ");
4913
4925
  }
4914
4926
  const xn = ["log", "info", "warn", "error", "debug", "assert"];
4915
- function Fo(t, e) {
4927
+ function jo(t, e) {
4916
4928
  const s = Object.assign({
4917
4929
  consoleMethods: xn,
4918
4930
  consoleThrottling: 30
4919
4931
  }, e);
4920
4932
  if (!Array.isArray(s.consoleMethods) || s.consoleMethods.length === 0)
4921
4933
  return;
4922
- const n = t.safe((a, u) => t.send(wr(a, Ao(u))));
4934
+ const n = t.safe((a, u) => t.send(Cr(a, Bo(u))));
4923
4935
  let i = 0;
4924
4936
  const r = () => {
4925
4937
  i = 0;
@@ -4942,8 +4954,8 @@ function Fo(t, e) {
4942
4954
  }, l = t.safe((a) => o(a.console, a));
4943
4955
  l(window), t.observer.attachContextCallback(l);
4944
4956
  }
4945
- var vi = { exports: {} }, as = { exports: {} }, kn;
4946
- function Mo() {
4957
+ var xi = { exports: {} }, as = { exports: {} }, kn;
4958
+ function Uo() {
4947
4959
  return kn || (kn = 1, function(t, e) {
4948
4960
  (function(s, n) {
4949
4961
  t.exports = n();
@@ -5027,7 +5039,7 @@ function Mo() {
5027
5039
  }
5028
5040
  (function(t, e) {
5029
5041
  (function(s, n) {
5030
- t.exports = n(Mo());
5042
+ t.exports = n(Uo());
5031
5043
  })($e, function(n) {
5032
5044
  var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, o = /^(eval@)?(\[native code])?$/;
5033
5045
  return {
@@ -5147,9 +5159,9 @@ function Mo() {
5147
5159
  }
5148
5160
  };
5149
5161
  });
5150
- })(vi);
5151
- var Lo = vi.exports;
5152
- const Po = /* @__PURE__ */ $n(Lo);
5162
+ })(xi);
5163
+ var Ho = xi.exports;
5164
+ const zo = /* @__PURE__ */ Xn(Ho);
5153
5165
  function Tn(t) {
5154
5166
  return [
5155
5167
  {
@@ -5164,12 +5176,12 @@ function Tn(t) {
5164
5176
  function Et(t, e, s = {}) {
5165
5177
  let n = e;
5166
5178
  try {
5167
- n = Po.parse(t);
5179
+ n = zo.parse(t);
5168
5180
  } catch {
5169
5181
  }
5170
5182
  return bs(t.name, t.message, JSON.stringify(n), JSON.stringify(s));
5171
5183
  }
5172
- function yi(t, e = window, s = {}) {
5184
+ function ki(t, e = window, s = {}) {
5173
5185
  if (t instanceof ErrorEvent) {
5174
5186
  if (t.error instanceof Error)
5175
5187
  return Et(t.error, Tn(t), s);
@@ -5192,13 +5204,13 @@ function yi(t, e = window, s = {}) {
5192
5204
  }
5193
5205
  return null;
5194
5206
  }
5195
- function Bo(t, e) {
5207
+ function Wo(t, e) {
5196
5208
  const s = Object.assign({
5197
5209
  captureExceptions: !0
5198
5210
  }, e);
5199
5211
  function n(i) {
5200
5212
  function r(o) {
5201
- const l = yi(o, i);
5213
+ const l = ki(o, i);
5202
5214
  l != null && t.send(l);
5203
5215
  }
5204
5216
  t.attachEventListener(i, "unhandledrejection", r), t.attachEventListener(i, "error", r);
@@ -5208,13 +5220,13 @@ function Bo(t, e) {
5208
5220
  function En(t, e = document.location) {
5209
5221
  return t = t.trim(), t.startsWith("//") || t.startsWith("http://") || t.startsWith("https://") || t.startsWith("data:") ? t : t.startsWith("/") ? e.origin + t : e.origin + e.pathname + t;
5210
5222
  }
5211
- function jo(t) {
5212
- return tr && (t.startsWith("data:image/svg+xml") || t.match(/.svg$|/i));
5223
+ function $o(t) {
5224
+ return or && (t.startsWith("data:image/svg+xml") || t.match(/.svg$|/i));
5213
5225
  }
5214
- const Uo = "https://static.openreplay.com/tracker/placeholder.jpeg";
5215
- function Ho(t) {
5226
+ const qo = "https://static.openreplay.com/tracker/placeholder.jpeg";
5227
+ function Vo(t) {
5216
5228
  function e(l, a) {
5217
- t.attributeSender.sendSetAttribute(l, "src", Uo);
5229
+ t.attributeSender.sendSetAttribute(l, "src", qo);
5218
5230
  const { width: u, height: c } = a.getBoundingClientRect();
5219
5231
  a.hasAttribute("width") || t.attributeSender.sendSetAttribute(l, "width", String(u)), a.hasAttribute("height") || t.attributeSender.sendSetAttribute(l, "height", String(c));
5220
5232
  }
@@ -5225,14 +5237,14 @@ function Ho(t) {
5225
5237
  const c = u.split(u.match(/,\s+/) ? /,\s+/ : ",").map((d) => En(d)).join(", ");
5226
5238
  t.attributeSender.sendSetAttribute(l, "srcset", c);
5227
5239
  }, n = function(l, a) {
5228
- a.src.length > sr && e(l, a), t.send(ms(l, "src", a.src, t.getBaseHref()));
5240
+ a.src.length > ar && e(l, a), t.send(ms(l, "src", a.src, t.getBaseHref()));
5229
5241
  }, i = t.safe(function(l) {
5230
5242
  const a = En(l.src || "");
5231
- oi(a) && t.send(di(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
5243
+ hi(a) && t.send(vi(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
5232
5244
  }), r = t.safe(function(l) {
5233
5245
  const a = t.nodes.getID(l);
5234
- a !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !jo(l.src) ? i(l) : t.sanitizer.isHidden(a) || t.sanitizer.isObscured(a) ? e(a, l) : (n(a, l), s(a, l)));
5235
- }), o = ai(t.safe((l) => {
5246
+ a !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !$o(l.src) ? i(l) : t.sanitizer.isHidden(a) || t.sanitizer.isObscured(a) ? e(a, l) : (n(a, l), s(a, l)));
5247
+ }), o = di(t.safe((l) => {
5236
5248
  for (const a of l)
5237
5249
  if (a.type === "attributes") {
5238
5250
  const u = a.target, c = t.nodes.getID(u);
@@ -5247,7 +5259,7 @@ function Ho(t) {
5247
5259
  Q(l, "img") && (t.nodes.attachNodeListener(l, "error", () => i(l)), t.nodes.attachNodeListener(l, "load", () => r(l)), r(l), o.observe(l, { attributes: !0, attributeFilter: ["src", "srcset"] }));
5248
5260
  });
5249
5261
  }
5250
- const zo = [
5262
+ const Go = [
5251
5263
  "text",
5252
5264
  "password",
5253
5265
  "email",
@@ -5258,16 +5270,16 @@ const zo = [
5258
5270
  "tel",
5259
5271
  "time"
5260
5272
  ];
5261
- function Wo(t) {
5262
- return Q(t, "textarea") ? !0 : Q(t, "input") ? zo.includes(t.type) : !1;
5273
+ function Ko(t) {
5274
+ return Q(t, "textarea") ? !0 : Q(t, "input") ? Go.includes(t.type) : !1;
5263
5275
  }
5264
- function $o(t) {
5276
+ function Xo(t) {
5265
5277
  if (!Q(t, "input"))
5266
5278
  return !1;
5267
5279
  const e = t.type;
5268
5280
  return e === "checkbox" || e === "radio";
5269
5281
  }
5270
- const qo = xe && "labels" in HTMLInputElement.prototype ? (t) => {
5282
+ const Jo = xe && "labels" in HTMLInputElement.prototype ? (t) => {
5271
5283
  let e = t;
5272
5284
  for (; (e = e.parentNode) !== null; )
5273
5285
  if (Q(e, "label"))
@@ -5287,20 +5299,20 @@ const qo = xe && "labels" in HTMLInputElement.prototype ? (t) => {
5287
5299
  return n[0];
5288
5300
  }
5289
5301
  };
5290
- function bi(t) {
5302
+ function Ti(t) {
5291
5303
  let e = Fs(t);
5292
5304
  if (e === null) {
5293
- const s = qo(t);
5305
+ const s = Jo(t);
5294
5306
  e = s && s.innerText || t.placeholder || t.name || t.id || t.className || t.type;
5295
5307
  }
5296
- return ri(e).slice(0, 100);
5308
+ return ui(e).slice(0, 100);
5297
5309
  }
5298
5310
  const Ue = {
5299
5311
  Plain: 0,
5300
5312
  Obscured: 1,
5301
5313
  Hidden: 2
5302
5314
  };
5303
- function Vo(t, e) {
5315
+ function Yo(t, e) {
5304
5316
  const s = Object.assign({
5305
5317
  obscureInputNumbers: !0,
5306
5318
  obscureInputEmails: !0,
@@ -5323,7 +5335,7 @@ function Vo(t, e) {
5323
5335
  }
5324
5336
  function i(c, d) {
5325
5337
  const { value: p, mask: y } = n(c, d);
5326
- t.send(yr(c, p, y));
5338
+ t.send(kr(c, p, y));
5327
5339
  }
5328
5340
  const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
5329
5341
  t.attachStopCallback(() => {
@@ -5333,7 +5345,7 @@ function Vo(t, e) {
5333
5345
  r.get(c) !== d.value && (r.set(c, d.value), i(c, d));
5334
5346
  }
5335
5347
  function a(c, d) {
5336
- o.get(c) !== d && (o.set(c, d), t.send(br(c, d)));
5348
+ o.get(c) !== d && (o.set(c, d), t.send(Tr(c, d)));
5337
5349
  }
5338
5350
  t.ticker.attach(() => {
5339
5351
  r.forEach((c, d) => {
@@ -5349,13 +5361,13 @@ function Vo(t, e) {
5349
5361
  });
5350
5362
  }, 3);
5351
5363
  function u(c, d, p, y) {
5352
- const { value: w, mask: b } = n(c, d), T = bi(d);
5353
- t.send(Lr(c, w, b !== 0, T, p, y));
5364
+ const { value: w, mask: b } = n(c, d), T = Ti(d);
5365
+ t.send(Hr(c, w, b !== 0, T, p, y));
5354
5366
  }
5355
5367
  t.nodes.attachNodeCallback(t.safe((c) => {
5356
5368
  const d = t.nodes.getID(c);
5357
5369
  if (d !== void 0) {
5358
- if (Q(c, "select") && (i(d, c), t.nodes.attachNodeListener(c, "change", () => i(d, c))), Wo(c)) {
5370
+ if (Q(c, "select") && (i(d, c), t.nodes.attachNodeListener(c, "change", () => i(d, c))), Ko(c)) {
5359
5371
  l(d, c);
5360
5372
  let p = 0, y = 0, w = 0;
5361
5373
  const b = () => {
@@ -5368,16 +5380,16 @@ function Vo(t, e) {
5368
5380
  t.nodes.attachNodeListener(c, "focus", b), t.nodes.attachNodeListener(c, "input", T), t.nodes.attachNodeListener(c, "change", D);
5369
5381
  return;
5370
5382
  }
5371
- if ($o(c)) {
5383
+ if (Xo(c)) {
5372
5384
  a(d, c.checked), t.nodes.attachNodeListener(c, "change", () => a(d, c.checked));
5373
5385
  return;
5374
5386
  }
5375
5387
  }
5376
5388
  }));
5377
5389
  }
5378
- let de, Ps, Si;
5379
- function Go(t, e) {
5380
- if (Si = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
5390
+ let de, Ps, Ei;
5391
+ function Qo(t, e) {
5392
+ if (Ei = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
5381
5393
  throw new Error("Can't generate CSS selector for non-element node type.");
5382
5394
  if (t.tagName.toLowerCase() === "html")
5383
5395
  return "html";
@@ -5393,25 +5405,25 @@ function Go(t, e) {
5393
5405
  maxNumberOfTries: 1e4,
5394
5406
  timeoutMs: void 0
5395
5407
  };
5396
- de = { ...s, ...e }, Ps = Ko(de.root, s);
5408
+ de = { ...s, ...e }, Ps = Zo(de.root, s);
5397
5409
  let n = ot(t, "all", () => ot(t, "two", () => ot(t, "one", () => ot(t, "none"))));
5398
5410
  if (n) {
5399
- const i = ki(Ti(n, t));
5411
+ const i = _i(Oi(n, t));
5400
5412
  return i.length > 0 && (n = i[0]), Rt(n);
5401
5413
  } else
5402
5414
  throw new Error("Selector was not found.");
5403
5415
  }
5404
- function Ko(t, e) {
5416
+ function Zo(t, e) {
5405
5417
  return t.nodeType === Node.DOCUMENT_NODE ? t : t === e.root ? t.ownerDocument : t;
5406
5418
  }
5407
5419
  function ot(t, e, s) {
5408
5420
  let n = null, i = [], r = t, o = 0;
5409
5421
  for (; r; ) {
5410
- const l = (/* @__PURE__ */ new Date()).getTime() - Si.getTime();
5422
+ const l = (/* @__PURE__ */ new Date()).getTime() - Ei.getTime();
5411
5423
  if (de.timeoutMs !== void 0 && l > de.timeoutMs)
5412
5424
  throw new Error(`Timeout: Can't find a unique selector after ${l}ms`);
5413
- let a = ct(Xo(r)) || ct(...Jo(r)) || ct(...Yo(r)) || ct(Qo(r)) || [_n()];
5414
- const u = Zo(r);
5425
+ let a = ct(ea(r)) || ct(...ta(r)) || ct(...sa(r)) || ct(na(r)) || [_n()];
5426
+ const u = ia(r);
5415
5427
  if (e == "all")
5416
5428
  u && (a = a.concat(a.filter(cs).map((c) => at(c, u))));
5417
5429
  else if (e == "two")
@@ -5430,11 +5442,11 @@ function ot(t, e, s) {
5430
5442
  return n || (n = Cn(i, s)), !n && s ? s() : n;
5431
5443
  }
5432
5444
  function Cn(t, e) {
5433
- const s = ki(xi(t));
5445
+ const s = _i(Ii(t));
5434
5446
  if (s.length > de.threshold)
5435
5447
  return e ? e() : null;
5436
5448
  for (let n of s)
5437
- if (wi(n))
5449
+ if (Ci(n))
5438
5450
  return n;
5439
5451
  return null;
5440
5452
  }
@@ -5449,7 +5461,7 @@ function Rt(t) {
5449
5461
  function In(t) {
5450
5462
  return t.map((e) => e.penalty).reduce((e, s) => e + s, 0);
5451
5463
  }
5452
- function wi(t) {
5464
+ function Ci(t) {
5453
5465
  const e = Rt(t);
5454
5466
  switch (Ps.querySelectorAll(e).length) {
5455
5467
  case 0:
@@ -5460,26 +5472,26 @@ function wi(t) {
5460
5472
  return !1;
5461
5473
  }
5462
5474
  }
5463
- function Xo(t) {
5475
+ function ea(t) {
5464
5476
  const e = t.getAttribute("id");
5465
5477
  return e && de.idName(e) ? {
5466
5478
  name: "#" + CSS.escape(e),
5467
5479
  penalty: 0
5468
5480
  } : null;
5469
5481
  }
5470
- function Jo(t) {
5482
+ function ta(t) {
5471
5483
  return Array.from(t.attributes).filter((s) => de.attr(s.name, s.value)).map((s) => ({
5472
5484
  name: `[${CSS.escape(s.name)}="${CSS.escape(s.value)}"]`,
5473
5485
  penalty: 0.5
5474
5486
  }));
5475
5487
  }
5476
- function Yo(t) {
5488
+ function sa(t) {
5477
5489
  return Array.from(t.classList).filter(de.className).map((s) => ({
5478
5490
  name: "." + CSS.escape(s),
5479
5491
  penalty: 1
5480
5492
  }));
5481
5493
  }
5482
- function Qo(t) {
5494
+ function na(t) {
5483
5495
  const e = t.tagName.toLowerCase();
5484
5496
  return de.tagName(e) ? {
5485
5497
  name: e,
@@ -5492,7 +5504,7 @@ function _n() {
5492
5504
  penalty: 3
5493
5505
  };
5494
5506
  }
5495
- function Zo(t) {
5507
+ function ia(t) {
5496
5508
  const e = t.parentNode;
5497
5509
  if (!e)
5498
5510
  return null;
@@ -5514,23 +5526,23 @@ function cs(t) {
5514
5526
  return t.name !== "html" && !t.name.startsWith("#");
5515
5527
  }
5516
5528
  function ct(...t) {
5517
- const e = t.filter(ea);
5529
+ const e = t.filter(ra);
5518
5530
  return e.length > 0 ? e : null;
5519
5531
  }
5520
- function ea(t) {
5532
+ function ra(t) {
5521
5533
  return t != null;
5522
5534
  }
5523
- function* xi(t, e = []) {
5535
+ function* Ii(t, e = []) {
5524
5536
  if (t.length > 0)
5525
5537
  for (let s of t[0])
5526
- yield* xi(t.slice(1, t.length), e.concat(s));
5538
+ yield* Ii(t.slice(1, t.length), e.concat(s));
5527
5539
  else
5528
5540
  yield e;
5529
5541
  }
5530
- function ki(t) {
5542
+ function _i(t) {
5531
5543
  return [...t].sort((e, s) => In(e) - In(s));
5532
5544
  }
5533
- function* Ti(t, e, s = {
5545
+ function* Oi(t, e, s = {
5534
5546
  counter: 0,
5535
5547
  visited: /* @__PURE__ */ new Map()
5536
5548
  }) {
@@ -5544,14 +5556,14 @@ function* Ti(t, e, s = {
5544
5556
  const r = Rt(i);
5545
5557
  if (s.visited.has(r))
5546
5558
  return;
5547
- wi(i) && ta(i, e) && (yield i, s.visited.set(r, !0), yield* Ti(i, e, s));
5559
+ Ci(i) && oa(i, e) && (yield i, s.visited.set(r, !0), yield* Oi(i, e, s));
5548
5560
  }
5549
5561
  }
5550
- function ta(t, e) {
5562
+ function oa(t, e) {
5551
5563
  return Ps.querySelector(Rt(t)) === e;
5552
5564
  }
5553
- function sa(t, e, s) {
5554
- return Go(t, {
5565
+ function aa(t, e, s) {
5566
+ return Qo(t, {
5555
5567
  root: e.body,
5556
5568
  seedMinLength: 3,
5557
5569
  optimizedMinLength: (s == null ? void 0 : s.minSelectorDepth) || 2,
@@ -5564,9 +5576,9 @@ function Is(t) {
5564
5576
  return e === "BUTTON" || e === "A" || e === "LI" || e === "SELECT" || e === "TR" || e === "TH" || t.onclick != null || t.getAttribute("role") === "button";
5565
5577
  }
5566
5578
  function On(t, e) {
5567
- return t instanceof Element ? na(t, e) : null;
5579
+ return t instanceof Element ? ca(t, e) : null;
5568
5580
  }
5569
- function na(t, e) {
5581
+ function ca(t, e) {
5570
5582
  let s = t;
5571
5583
  for (; s !== null && s !== e.documentElement; ) {
5572
5584
  if (Fe(s, "masked"))
@@ -5588,17 +5600,17 @@ function na(t, e) {
5588
5600
  }
5589
5601
  return t === e.documentElement ? null : t;
5590
5602
  }
5591
- function ia(t, e) {
5603
+ function la(t, e) {
5592
5604
  const { disableClickmaps: s = !1 } = e || {};
5593
5605
  function n(k) {
5594
5606
  const O = Fs(k);
5595
5607
  if (O !== null)
5596
5608
  return O;
5597
5609
  if (Q(k, "input"))
5598
- return bi(k);
5610
+ return Ti(k);
5599
5611
  if (Is(k)) {
5600
5612
  let N = "";
5601
- return k instanceof HTMLElement && (N = t.sanitizer.getInnerTextSecure(k)), N = N || k.id || k.className, ri(N).slice(0, 100);
5613
+ return k instanceof HTMLElement && (N = t.sanitizer.getInnerTextSecure(k)), N = N || k.id || k.className, ui(N).slice(0, 100);
5602
5614
  }
5603
5615
  return "";
5604
5616
  }
@@ -5611,7 +5623,7 @@ function ia(t, e) {
5611
5623
  return;
5612
5624
  }
5613
5625
  const O = (k - c) / T;
5614
- p > 4 && O > b && t.send(Pr(ge())), y = 0, p = 0, c = k;
5626
+ p > 4 && O > b && t.send(zr(ge())), y = 0, p = 0, c = k;
5615
5627
  }
5616
5628
  t.attachStartCallback(() => {
5617
5629
  w = setInterval(() => D(), T);
@@ -5619,10 +5631,10 @@ function ia(t, e) {
5619
5631
  i = -1, r = -1, o = !1, l = null, u = {}, w && clearInterval(w);
5620
5632
  });
5621
5633
  const B = () => {
5622
- o && (t.send(Sr(i, r)), o = !1);
5634
+ o && (t.send(Er(i, r)), o = !1);
5623
5635
  }, A = (k, O = !1) => {
5624
5636
  function N(C, E, P) {
5625
- return u[C] = u[C] || sa(E, k, P);
5637
+ return u[C] = u[C] || aa(E, k, P);
5626
5638
  }
5627
5639
  const F = O ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
5628
5640
  F(k.documentElement, "mouseover", (C) => {
@@ -5640,7 +5652,7 @@ function ia(t, e) {
5640
5652
  const P = t.nodes.getID(E);
5641
5653
  if (P !== void 0) {
5642
5654
  const V = C.pageX, j = C.pageY, W = k.documentElement.scrollWidth, I = k.documentElement.scrollHeight, M = Nn(V / W), q = Nn(j / I);
5643
- B(), t.send(Ar(P, l === E ? Math.round(performance.now() - a) : 0, n(E), Is(E) && !s ? N(P, E, e) : "", M, q), !0);
5655
+ B(), t.send(Br(P, l === E ? Math.round(performance.now() - a) : 0, n(E), Is(E) && !s ? N(P, E, e) : "", M, q), !0);
5644
5656
  }
5645
5657
  l = null;
5646
5658
  });
@@ -5652,7 +5664,7 @@ function ia(t, e) {
5652
5664
  function Nn(t) {
5653
5665
  return Math.round(t * 1e4);
5654
5666
  }
5655
- function ra(t) {
5667
+ function ua(t) {
5656
5668
  const e = [], s = document.getElementsByTagName("*"), n = /url\(("[^"]*"|'[^']*'|[^)]*)\)/i;
5657
5669
  for (let i = 0; i < s.length; i++) {
5658
5670
  const r = s[i];
@@ -5677,7 +5689,7 @@ function ra(t) {
5677
5689
  }
5678
5690
  return e;
5679
5691
  }
5680
- function oa(t, e) {
5692
+ function ha(t, e) {
5681
5693
  let s = Math.max(document.documentElement && document.documentElement.clientWidth || 0, window.innerWidth || 0) * Math.max(document.documentElement && document.documentElement.clientHeight || 0, window.innerHeight || 0) / 10, n = s * t;
5682
5694
  for (let i = 0; i < e.length; i++) {
5683
5695
  const { time: r, area: o } = e[i];
@@ -5685,7 +5697,7 @@ function oa(t, e) {
5685
5697
  }
5686
5698
  return s === 0 ? 0 : n / s;
5687
5699
  }
5688
- function aa(t, e) {
5700
+ function da(t, e) {
5689
5701
  const s = Object.assign({
5690
5702
  captureResourceTimings: !0,
5691
5703
  capturePageLoadTimings: !0,
@@ -5697,7 +5709,7 @@ function aa(t, e) {
5697
5709
  let n = {};
5698
5710
  function i(u) {
5699
5711
  var d;
5700
- if (u.duration < 0 || !oi(u.name) || t.isServiceURL(u.name))
5712
+ if (u.duration < 0 || !hi(u.name) || t.isServiceURL(u.name))
5701
5713
  return;
5702
5714
  n !== null && (n[u.name] = u.startTime + u.duration);
5703
5715
  let c = !1;
@@ -5706,7 +5718,7 @@ function aa(t, e) {
5706
5718
  c = !0;
5707
5719
  return;
5708
5720
  }
5709
- }), !c && t.send(di(
5721
+ }), !c && t.send(vi(
5710
5722
  u.startTime + Ge(),
5711
5723
  u.duration,
5712
5724
  u.responseStart && u.startTime ? u.responseStart - u.startTime : 0,
@@ -5756,7 +5768,7 @@ function aa(t, e) {
5756
5768
  loadEventStart: T,
5757
5769
  loadEventEnd: D
5758
5770
  } = performance.timing;
5759
- t.send(xr(d - c || 0, p - c || 0, y - c || 0, w - c || 0, b - c || 0, T - c || 0, D - c || 0, l, a));
5771
+ t.send(Ir(d - c || 0, p - c || 0, y - c || 0, w - c || 0, b - c || 0, T - c || 0, D - c || 0, l, a));
5760
5772
  }
5761
5773
  }, 30);
5762
5774
  }
@@ -5766,10 +5778,10 @@ function aa(t, e) {
5766
5778
  if (y)
5767
5779
  return;
5768
5780
  const w = performance.now();
5769
- if (n !== null && (u = Math.max.apply(null, Object.keys(n).map((b) => n[b])), w - u > 1e3 && (p = ra(n), n = null)), d !== null && (w - d > 50 && (c = w), d = w - c > 5e3 ? null : w), p !== null && d === null || w > 3e4) {
5781
+ if (n !== null && (u = Math.max.apply(null, Object.keys(n).map((b) => n[b])), w - u > 1e3 && (p = ua(n), n = null)), d !== null && (w - d > 50 && (c = w), d = w - c > 5e3 ? null : w), p !== null && d === null || w > 3e4) {
5770
5782
  y = !0, n = null;
5771
- const b = p === null ? 0 : oa(a || l, p), { domContentLoadedEventEnd: T, navigationStart: D } = performance.timing, B = d === null ? Math.max(c, a, T - D || 0) : 0;
5772
- t.send(kr(b, a > u ? a : u, B));
5783
+ const b = p === null ? 0 : ha(a || l, p), { domContentLoadedEventEnd: T, navigationStart: D } = performance.timing, B = d === null ? Math.max(c, a, T - D || 0) : 0;
5784
+ t.send(_r(b, a > u ? a : u, B));
5773
5785
  }
5774
5786
  });
5775
5787
  }
@@ -5781,17 +5793,17 @@ function ls(t) {
5781
5793
  e && e.scrollY || t.documentElement && t.documentElement.scrollTop || t.body && t.body.scrollTop || 0
5782
5794
  ];
5783
5795
  }
5784
- function ca(t, e) {
5796
+ function fa(t, e) {
5785
5797
  let s = !1;
5786
5798
  const n = /* @__PURE__ */ new Map();
5787
5799
  function i(l) {
5788
- pi(l) && (Te(l) && n.set(l, [l.scrollLeft, l.scrollTop]), kt(l) && n.set(l, ls(l)));
5800
+ bi(l) && (Te(l) && n.set(l, [l.scrollLeft, l.scrollTop]), kt(l) && n.set(l, ls(l)));
5789
5801
  }
5790
5802
  const r = t.safe(() => {
5791
- e || t.send(ur(...ls(document)));
5803
+ e || t.send(gr(...ls(document)));
5792
5804
  }), o = t.safe((l, a) => {
5793
5805
  const u = t.nodes.getID(a);
5794
- u !== void 0 && t.send(vr(u, l[0], l[1]));
5806
+ u !== void 0 && t.send(xr(u, l[0], l[1]));
5795
5807
  });
5796
5808
  t.attachStartCallback(r), t.attachStopCallback(() => {
5797
5809
  s = !1, n.clear();
@@ -5810,15 +5822,15 @@ function ca(t, e) {
5810
5822
  s && (r(), s = !1), n.forEach(o), n.clear();
5811
5823
  }, 5, !1);
5812
5824
  }
5813
- function la(t) {
5825
+ function pa(t) {
5814
5826
  let e, s, n, i, r = document.referrer;
5815
5827
  const o = t.safe(() => {
5816
5828
  const { URL: u } = document;
5817
- u !== e && (e = u, t.send(Hr(e, r, i, document.title)), i = 0, r = e);
5829
+ u !== e && (e = u, t.send(Vr(e, r, i, document.title)), i = 0, r = e);
5818
5830
  }), l = t.safe(() => {
5819
5831
  const { innerWidth: u, innerHeight: c } = window;
5820
- (u !== s || c !== n) && (s = u, n = c, t.send(lr(s, n)));
5821
- }), a = document.hidden === void 0 ? Function.prototype : t.safe(() => t.send(Or(document.hidden)));
5832
+ (u !== s || c !== n) && (s = u, n = c, t.send(pr(s, n)));
5833
+ }), a = document.hidden === void 0 ? Function.prototype : t.safe(() => t.send(Fr(document.hidden)));
5822
5834
  t.attachStartCallback(() => {
5823
5835
  e = null, i = Ge(), s = n = -1, o(), l(), a();
5824
5836
  }), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", a, !1, !1), t.ticker.attach(o, 1, !1), t.ticker.attach(l, 5, !1);
@@ -5827,12 +5839,12 @@ function Rn(t) {
5827
5839
  return Nt(t) && // @ts-ignore
5828
5840
  !!t.adoptedStyleSheets;
5829
5841
  }
5830
- let ua = 15;
5831
- function Ei() {
5832
- return ua++;
5842
+ let ga = 15;
5843
+ function Ni() {
5844
+ return ga++;
5833
5845
  }
5834
5846
  const lt = /* @__PURE__ */ new Map();
5835
- function ha(t) {
5847
+ function ma(t) {
5836
5848
  if (t === null || !Rn(document))
5837
5849
  return;
5838
5850
  const e = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), n = (o) => setTimeout(() => {
@@ -5846,7 +5858,7 @@ function ha(t) {
5846
5858
  for (const d of c) {
5847
5859
  let p = e.get(d);
5848
5860
  const y = !p;
5849
- if (p || (p = Ei(), e.set(d, p)), a.includes(p) || t.send(hi(p, l)), y) {
5861
+ if (p || (p = Ni(), e.set(d, p)), a.includes(p) || t.send(mi(p, l)), y) {
5850
5862
  const w = d.cssRules;
5851
5863
  for (let b = 0; b < w.length; b++)
5852
5864
  t.send(ys(p, w[b].cssText, b, t.getBaseHref()));
@@ -5855,7 +5867,7 @@ function ha(t) {
5855
5867
  }
5856
5868
  if (Symbol.iterator in a)
5857
5869
  for (const d of a)
5858
- u.includes(d) || t.send(Fr(d, l));
5870
+ u.includes(d) || t.send(jr(d, l));
5859
5871
  s.set(l, u);
5860
5872
  }, 20);
5861
5873
  function i(o) {
@@ -5891,11 +5903,11 @@ function ha(t) {
5891
5903
  Rn(o) && n(o);
5892
5904
  });
5893
5905
  }
5894
- function da(t) {
5906
+ function va(t) {
5895
5907
  if (t === null)
5896
5908
  return;
5897
5909
  if (!window.CSSStyleSheet) {
5898
- t.send(Rr("no_stylesheet_prototype_in_window", ""));
5910
+ t.send(Lr("no_stylesheet_prototype_in_window", ""));
5899
5911
  return;
5900
5912
  }
5901
5913
  const e = t.safe((i, r, o) => {
@@ -5937,14 +5949,14 @@ function da(t) {
5937
5949
  const r = t.nodes.getID(i);
5938
5950
  if (!r)
5939
5951
  return;
5940
- const o = i.sheet, l = Ei();
5941
- lt.set(o, l), t.send(hi(l, r));
5952
+ const o = i.sheet, l = Ni();
5953
+ lt.set(o, l), t.send(mi(l, r));
5942
5954
  const a = o.cssRules;
5943
5955
  for (let u = 0; u < a.length; u++)
5944
5956
  e(o, u, a[u].cssText);
5945
5957
  });
5946
5958
  }
5947
- function fa(t) {
5959
+ function ya(t) {
5948
5960
  function e(n) {
5949
5961
  const i = t.nodes.getID(n);
5950
5962
  i !== void 0 && t.send(rn(i));
@@ -5952,7 +5964,7 @@ function fa(t) {
5952
5964
  let s = !1;
5953
5965
  t.nodes.attachNodeCallback((n) => {
5954
5966
  Q(n, "body") && (t.nodes.attachNodeListener(n, "focus", (i) => {
5955
- pi(i.target) && (e(i.target), s = !1);
5967
+ bi(i.target) && (e(i.target), s = !1);
5956
5968
  }), t.nodes.attachNodeListener(n, "blur", (i) => {
5957
5969
  i.relatedTarget === null && (s = !0, setTimeout(() => {
5958
5970
  s && t.send(rn(-1));
@@ -5965,7 +5977,7 @@ function fa(t) {
5965
5977
  n && n !== n.ownerDocument.body && e(n);
5966
5978
  }, !0);
5967
5979
  }
5968
- function pa(t) {
5980
+ function ba(t) {
5969
5981
  if (!window.FontFace)
5970
5982
  return;
5971
5983
  const e = /* @__PURE__ */ new Map(), s = (n) => {
@@ -6000,7 +6012,7 @@ function pa(t) {
6000
6012
  });
6001
6013
  }));
6002
6014
  }
6003
- function ga(t, e, s, n, i) {
6015
+ function Sa(t, e, s, n, i) {
6004
6016
  t.debug.log("Openreplay: attaching axios spy to instance", e);
6005
6017
  function r(p) {
6006
6018
  t.debug.log("Openreplay: capturing axios response data", p);
@@ -6045,7 +6057,7 @@ function ga(t, e, s, n, i) {
6045
6057
  return s.failuresOnly || r(p), p;
6046
6058
  }
6047
6059
  function a(p) {
6048
- return t.debug.log("Openreplay: capturing API request error", p), ma(p) && p.response ? r(p.response) : p instanceof Error && t.send(Et(p, [])), Promise.reject(p);
6060
+ return t.debug.log("Openreplay: capturing API request error", p), wa(p) && p.response ? r(p.response) : p instanceof Error && t.send(Et(p, [])), Promise.reject(p);
6049
6061
  }
6050
6062
  function u(p) {
6051
6063
  t.debug.log("Openreplay: failed API request, skipping", p);
@@ -6060,10 +6072,10 @@ function ga(t, e, s, n, i) {
6060
6072
  (y = (p = e.interceptors.request).eject) == null || y.call(p, c), (b = (w = e.interceptors.response).eject) == null || b.call(w, d);
6061
6073
  });
6062
6074
  }
6063
- function ma(t) {
6064
- return va(t) && t.isAxiosError === !0;
6075
+ function wa(t) {
6076
+ return xa(t) && t.isAxiosError === !0;
6065
6077
  }
6066
- function va(t) {
6078
+ function xa(t) {
6067
6079
  return t !== null && typeof t == "object";
6068
6080
  }
6069
6081
  var we;
@@ -6128,7 +6140,7 @@ const st = (t, e) => {
6128
6140
  (t[0] === "{" || t[0] === "[") && (e = t);
6129
6141
  const s = t.split("&");
6130
6142
  s.length === 1 ? e = t : e = s.join(",");
6131
- } else if (ba(t)) {
6143
+ } else if (Ta(t)) {
6132
6144
  const s = [];
6133
6145
  for (const [n, i] of t)
6134
6146
  s.push(`${n}=${typeof i == "string" ? i : "[object Object]"}`);
@@ -6136,7 +6148,7 @@ const st = (t, e) => {
6136
6148
  } else
6137
6149
  t instanceof Blob || t instanceof ReadableStream || t instanceof ArrayBuffer ? e = "byte data" : Us(t) ? e = t : e = `can't parse body ${typeof t}`;
6138
6150
  return e;
6139
- }, ya = (t, e = {}) => {
6151
+ }, ka = (t, e = {}) => {
6140
6152
  Us(e) || (e = {});
6141
6153
  let s = t ? t.split("?") : [];
6142
6154
  if (s.shift(), s.length > 0) {
@@ -6155,14 +6167,14 @@ const st = (t, e) => {
6155
6167
  function Us(t) {
6156
6168
  return t !== null && typeof t == "object";
6157
6169
  }
6158
- function ba(t) {
6170
+ function Ta(t) {
6159
6171
  return t == null || ArrayBuffer.isView(t) ? !1 : typeof Symbol < "u" && typeof t[Symbol.iterator] == "function";
6160
6172
  }
6161
6173
  function Ct(t) {
6162
6174
  return t <= 0 ? "" : t >= 1e3 * 1e3 ? (t / 1e3 / 1e3).toFixed(1) + " MB" : t >= 1e3 ? (t / 1e3).toFixed(1) + " KB" : `${t}B`;
6163
6175
  }
6164
6176
  const _s = (t) => (t.startsWith("//") && (t = `${new URL(window.location.href).protocol}${t}`), t.startsWith("http") ? new URL(t) : new URL(t, window.location.href));
6165
- class Sa {
6177
+ class Ea {
6166
6178
  constructor(e, s) {
6167
6179
  this.resp = e, this.item = s, this.mockReader();
6168
6180
  }
@@ -6203,7 +6215,7 @@ class Sa {
6203
6215
  };
6204
6216
  }
6205
6217
  }
6206
- class wa {
6218
+ class Ca {
6207
6219
  constructor(e, s, n, i, r, o) {
6208
6220
  this.ignoredHeaders = e, this.setSessionTokenHeader = s, this.sanitize = n, this.sendMessage = i, this.isServiceUrl = r, this.tokenUrlMatcher = o;
6209
6221
  }
@@ -6252,7 +6264,7 @@ class wa {
6252
6264
  }).catch((i) => {
6253
6265
  if (i.name !== "AbortError")
6254
6266
  throw i;
6255
- })), new Proxy(s, new Sa(s, e));
6267
+ })), new Proxy(s, new Ea(s, e));
6256
6268
  };
6257
6269
  }
6258
6270
  handleResponseBody(e, s) {
@@ -6260,12 +6272,12 @@ class wa {
6260
6272
  return n && n.includes("application/json") ? (s.responseType = "json", e.text()) : n && (n.includes("text/html") || n.includes("text/plain")) ? (s.responseType = "text", e.text()) : (s.responseType = "arraybuffer", e.arrayBuffer());
6261
6273
  }
6262
6274
  }
6263
- class xa {
6275
+ class Ia {
6264
6276
  static create(e, s, n, i, r, o) {
6265
- return new Proxy(fetch, new wa(e, s, n, i, r, o));
6277
+ return new Proxy(fetch, new Ca(e, s, n, i, r, o));
6266
6278
  }
6267
6279
  }
6268
- class ka {
6280
+ class _a {
6269
6281
  constructor(e, s, n, i, r, o, l) {
6270
6282
  this.ignoredHeaders = s, this.setSessionTokenHeader = n, this.sanitize = i, this.sendMessage = r, this.isServiceUrl = o, this.tokenUrlMatcher = l, this.XMLReq = e, this.XMLReq.onreadystatechange = () => {
6271
6283
  this.onReadyStateChange();
@@ -6324,7 +6336,7 @@ class ka {
6324
6336
  return (...n) => {
6325
6337
  var o, l;
6326
6338
  const i = n[0], r = n[1];
6327
- return this.item.method = i ? i.toUpperCase() : "GET", this.item.url = ((o = r.toString) == null ? void 0 : o.call(r)) || "", this.item.name = ((l = this.item.url) == null ? void 0 : l.replace(new RegExp("/*$"), "").split("/").pop()) ?? "", this.item.getData = ya(this.item.url, {}), s.apply(e, n);
6339
+ return this.item.method = i ? i.toUpperCase() : "GET", this.item.url = ((o = r.toString) == null ? void 0 : o.call(r)) || "", this.item.name = ((l = this.item.url) == null ? void 0 : l.replace(new RegExp("/*$"), "").split("/").pop()) ?? "", this.item.getData = ka(this.item.url, {}), s.apply(e, n);
6328
6340
  };
6329
6341
  }
6330
6342
  getSend(e) {
@@ -6386,18 +6398,18 @@ class ka {
6386
6398
  }
6387
6399
  }
6388
6400
  }
6389
- class Ta {
6401
+ class Oa {
6390
6402
  static create(e, s, n, i, r, o) {
6391
6403
  return new Proxy(XMLHttpRequest, {
6392
6404
  construct(l) {
6393
6405
  const a = new l();
6394
- return new Proxy(a, new ka(a, e, s, n, i, r, o));
6406
+ return new Proxy(a, new _a(a, e, s, n, i, r, o));
6395
6407
  }
6396
6408
  });
6397
6409
  }
6398
6410
  }
6399
- const Ea = (t) => t instanceof Blob ? t.type : t instanceof FormData ? "multipart/form-data" : t instanceof URLSearchParams ? "application/x-www-form-urlencoded;charset=UTF-8" : "text/plain;charset=UTF-8";
6400
- class Ca {
6411
+ const Na = (t) => t instanceof Blob ? t.type : t instanceof FormData ? "multipart/form-data" : t instanceof URLSearchParams ? "application/x-www-form-urlencoded;charset=UTF-8" : "text/plain;charset=UTF-8";
6412
+ class Ra {
6401
6413
  constructor(e, s, n, i, r) {
6402
6414
  this.ignoredHeaders = e, this.setSessionTokenHeader = s, this.sanitize = n, this.sendMessage = i, this.isServiceUrl = r;
6403
6415
  }
@@ -6406,7 +6418,7 @@ class Ca {
6406
6418
  if (this.isServiceUrl(i))
6407
6419
  return e.apply(s, n);
6408
6420
  const l = _s(i);
6409
- if (o.method = "POST", o.url = i, o.name = (l.pathname.split("/").pop() || "") + l.search, o.requestType = "beacon", o.requestHeader = { "Content-Type": Ea(r) }, o.status = 0, o.statusText = "Pending", l.search && l.searchParams) {
6421
+ if (o.method = "POST", o.url = i, o.name = (l.pathname.split("/").pop() || "") + l.search, o.requestType = "beacon", o.requestHeader = { "Content-Type": Na(r) }, o.status = 0, o.statusText = "Pending", l.search && l.searchParams) {
6410
6422
  o.getData = {};
6411
6423
  for (const [c, d] of l.searchParams)
6412
6424
  o.getData[c] = d;
@@ -6424,16 +6436,16 @@ class Ve {
6424
6436
  }
6425
6437
  static create(e, s, n, i, r) {
6426
6438
  if (Ve.hasSendBeacon())
6427
- return new Proxy(Ve.origSendBeacon, new Ca(e, s, n, i, r));
6439
+ return new Proxy(Ve.origSendBeacon, new Ra(e, s, n, i, r));
6428
6440
  }
6429
6441
  }
6430
- var Mn;
6431
- Ve.origSendBeacon = (Mn = window == null ? void 0 : window.navigator) == null ? void 0 : Mn.sendBeacon;
6442
+ var Un;
6443
+ Ve.origSendBeacon = (Un = window == null ? void 0 : window.navigator) == null ? void 0 : Un.sendBeacon;
6432
6444
  const Dn = (t) => console.warn(`Openreplay: Can't find ${t} in global context.
6433
6445
  If you're using serverside rendering in your app, make sure that tracker is loaded dynamically, otherwise ${t} won't be tracked.`);
6434
- function Ia(t, e, s, n, i, r, o) {
6446
+ function Da(t, e, s, n, i, r, o) {
6435
6447
  var l;
6436
- t.XMLHttpRequest ? t.XMLHttpRequest = Ta.create(e, s, n, i, r, o) : Dn("XMLHttpRequest"), t.fetch ? t.fetch = xa.create(e, s, n, i, r, o) : Dn("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = Ve.create(e, s, n, i, r));
6448
+ t.XMLHttpRequest ? t.XMLHttpRequest = Oa.create(e, s, n, i, r, o) : Dn("XMLHttpRequest"), t.fetch ? t.fetch = Ia.create(e, s, n, i, r, o) : Dn("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = Ve.create(e, s, n, i, r));
6437
6449
  }
6438
6450
  function us(t) {
6439
6451
  return t.__or_req_data__ || (t.__or_req_data__ = { body: void 0, headers: {} }), t.__or_req_data__;
@@ -6441,7 +6453,7 @@ function us(t) {
6441
6453
  function An(t) {
6442
6454
  return typeof t == "string" ? t.toUpperCase() : "GET";
6443
6455
  }
6444
- function _a(t, e = {}) {
6456
+ function Aa(t, e = {}) {
6445
6457
  const s = Object.assign({
6446
6458
  failuresOnly: !1,
6447
6459
  ignoreHeaders: ["cookie", "set-cookie", "authorization"],
@@ -6482,7 +6494,7 @@ function _a(t, e = {}) {
6482
6494
  }
6483
6495
  const u = (c) => {
6484
6496
  if (s.useProxy)
6485
- return Ia(c, s.ignoreHeaders, o, l, (A) => t.send(A), (A) => t.isServiceURL(A), s.tokenUrlMatcher);
6497
+ return Da(c, s.ignoreHeaders, o, l, (A) => t.send(A), (A) => t.isServiceURL(A), s.tokenUrlMatcher);
6486
6498
  const d = c.fetch.bind(c), p = (A, k = {}) => {
6487
6499
  if (!(typeof A == "string" || A instanceof URL) || t.isServiceURL(String(A)))
6488
6500
  return d(A, k);
@@ -6568,10 +6580,10 @@ function _a(t, e = {}) {
6568
6580
  s.axiosInstances || (c.XMLHttpRequest.prototype.open = T, c.XMLHttpRequest.prototype.send = D, c.XMLHttpRequest.prototype.setRequestHeader = B);
6569
6581
  };
6570
6582
  u(window), s.axiosInstances && s.axiosInstances.forEach((c) => {
6571
- ga(t, c, s, l, a);
6583
+ Sa(t, c, s, l, a);
6572
6584
  }), s.captureInIframes && t.observer.attachContextCallback(t.safe(u));
6573
6585
  }
6574
- function Oa(t) {
6586
+ function Fa(t) {
6575
6587
  t.attachEventListener(document, "selectionchange", () => {
6576
6588
  const e = document.getSelection();
6577
6589
  if (e !== null && !e.isCollapsed) {
@@ -6581,14 +6593,14 @@ function Oa(t) {
6581
6593
  t.send(cn(-1, -1, ""));
6582
6594
  });
6583
6595
  }
6584
- function Na(t) {
6596
+ function Ma(t) {
6585
6597
  function e() {
6586
6598
  document.hidden || (t.debug.log("Openreplay: tab change to" + t.session.getTabId()), t.send(dt(t.session.getTabId())));
6587
6599
  }
6588
6600
  t.attachEventListener(window, "focus", e, !1, !1);
6589
6601
  }
6590
6602
  const pt = "/installation/javascript-sdk";
6591
- function Ra(t) {
6603
+ function La(t) {
6592
6604
  if (t == null)
6593
6605
  return console.error(`OpenReplay: invalid options argument type. Please, check documentation on ${wt}${pt}`), !1;
6594
6606
  if (typeof t.projectKey != "string")
@@ -6600,12 +6612,12 @@ function Ra(t) {
6600
6612
  console.warn("OpenReplay: projectKey is expected to have a string type."), t.projectKey = t.projectKey.toString();
6601
6613
  return t.sessionToken != null && Oe("`sessionToken` option", "`sessionHash` start() option", "/"), !0;
6602
6614
  }
6603
- class Da {
6615
+ class Pa {
6604
6616
  constructor(e) {
6605
6617
  var l;
6606
6618
  if (this.options = e, this.app = null, this.crossdomainMode = !1, this.checkDoNotTrack = () => this.options.respectDoNotTrack && (navigator.doNotTrack == "1" || // @ts-ignore
6607
6619
  window.doNotTrack == "1"), this.signalStartIssue = (a, u) => {
6608
- const c = this.checkDoNotTrack(), d = new XMLHttpRequest(), p = this.options.ingestPoint || gi;
6620
+ const c = this.checkDoNotTrack(), d = new XMLHttpRequest(), p = this.options.ingestPoint || Si;
6609
6621
  d.open("POST", p + "/v1/web/not-started"), d.send(JSON.stringify({
6610
6622
  trackerVersion: "14.0.4",
6611
6623
  projectKey: this.options.projectKey,
@@ -6620,11 +6632,11 @@ class Da {
6620
6632
  const c = Et(a, [], u);
6621
6633
  this.app.send(c);
6622
6634
  } else if (a instanceof ErrorEvent || "PromiseRejectionEvent" in window && a instanceof PromiseRejectionEvent) {
6623
- const c = yi(a, void 0, u);
6635
+ const c = ki(a, void 0, u);
6624
6636
  c != null && this.app.send(c);
6625
6637
  }
6626
6638
  }
6627
- }, this.crossdomainMode = !!(rr() && ((l = e.crossdomain) != null && l.enabled)), !xe || !Ra(e))
6639
+ }, this.crossdomainMode = !!(ur() && ((l = e.crossdomain) != null && l.enabled)), !xe || !La(e))
6628
6640
  return;
6629
6641
  if (window.__OPENREPLAY__) {
6630
6642
  console.error("OpenReplay: one tracker instance has been initialised already");
@@ -6667,8 +6679,8 @@ class Da {
6667
6679
  console.error(`OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1. Reason: ${a}`), this.signalStartIssue("missing_api", n);
6668
6680
  return;
6669
6681
  }
6670
- const r = new Oo(e.projectKey, e.sessionToken, e, this.signalStartIssue, this.crossdomainMode);
6671
- this.app = r, this.crossdomainMode || (la(r), No(r), zr(r, e), Na(r)), ia(r, e.mouse), ca(r, this.crossdomainMode), da(r), ha(r), Fo(r, e), Bo(r, e), Ho(r), Vo(r, e), aa(r, e), fa(r), pa(r), _a(r, e.network), Oa(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
6682
+ const r = new Fo(e.projectKey, e.sessionToken, e, this.signalStartIssue, this.crossdomainMode);
6683
+ this.app = r, this.crossdomainMode || (pa(r), Mo(r), Gr(r, e), Ma(r)), la(r, e.mouse), fa(r, this.crossdomainMode), va(r), ma(r), jo(r, e), Wo(r, e), Vo(r), Yo(r, e), da(r, e), ya(r), ba(r), Aa(r, e.network), Fa(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
6672
6684
  const o = window.open;
6673
6685
  (e.autoResetOnWindowOpen || e.resetTabOnWindowOpen) && (r.attachStartCallback(() => {
6674
6686
  const a = r.getTabId(), u = r.sessionStorage ?? window.sessionStorage;
@@ -6801,7 +6813,7 @@ class Da {
6801
6813
  Oe("'userID' method", "'setUserID' method", "/"), this.setUserID(e);
6802
6814
  }
6803
6815
  setUserAnonymousID(e) {
6804
- typeof e == "string" && this.app !== null && this.app.send(Cr(e));
6816
+ typeof e == "string" && this.app !== null && this.app.send(Rr(e));
6805
6817
  }
6806
6818
  userAnonymousID(e) {
6807
6819
  Oe("'userAnonymousID' method", "'setUserAnonymousID' method", "/"), this.setUserAnonymousID(e);
@@ -6821,7 +6833,7 @@ class Da {
6821
6833
  } catch {
6822
6834
  return;
6823
6835
  }
6824
- this.app.send(Tr(e, s));
6836
+ this.app.send(Or(e, s));
6825
6837
  }
6826
6838
  }
6827
6839
  issue(e, s = null) {
@@ -6831,15 +6843,15 @@ class Da {
6831
6843
  } catch {
6832
6844
  return;
6833
6845
  }
6834
- this.app.send(Dr(e, s));
6846
+ this.app.send(Pr(e, s));
6835
6847
  }
6836
6848
  }
6837
6849
  }
6838
- const Aa = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"], Fa = "bMTFzLbWcXFgXK8SzyFHA6kIjelFcz5VQABVPbXdXh5XZJCDQH9BcVlrv3DF3kA";
6850
+ const Ba = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"], ja = "bMTFzLbWcXFgXK8SzyFHA6kIjelFcz5VQABVPbXdXh5XZJCDQH9BcVlrv3DF3kA";
6839
6851
  class Hs {
6840
6852
  constructor(e) {
6841
6853
  var s;
6842
- this.baseURL = "https://wineater-backend.vercel.app/", this.store = Aa.find((n) => window.location.href.includes(n)), this.token = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.CLIENT_TOKEN) || Fa;
6854
+ this.baseURL = "https://wineater-backend.vercel.app/", this.store = Ba.find((n) => window.location.href.includes(n)), this.token = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.CLIENT_TOKEN) || ja;
6843
6855
  }
6844
6856
  async getStoreConfig(e) {
6845
6857
  console.log(e);
@@ -6898,7 +6910,7 @@ class Hs {
6898
6910
  }
6899
6911
  }
6900
6912
  }
6901
- class Ma {
6913
+ class Ua {
6902
6914
  constructor() {
6903
6915
  this.api = new Hs(), this.language = "en", this.translations = {
6904
6916
  fr: {
@@ -7001,18 +7013,18 @@ class Ma {
7001
7013
  return this.translations[this.language][e] || e;
7002
7014
  }
7003
7015
  }
7004
- const re = new Ma(), La = 3;
7016
+ const re = new Ua(), Ha = 3;
7005
7017
  let gt = null;
7006
- function Ci() {
7018
+ function Ri() {
7007
7019
  const t = document.getElementById("chat-window"), e = document.getElementById("chat-icon");
7008
- t.classList.contains("visible") ? (Wn(), Ii(), e.style.display = "flex") : (gt && (clearTimeout(gt), gt = null), zn(), t.classList.add("visible"), e.style.display = "none");
7020
+ t.classList.contains("visible") ? (Kn(), Di(), e.style.display = "flex") : (gt && (clearTimeout(gt), gt = null), Gn(), t.classList.add("visible"), e.style.display = "none");
7009
7021
  }
7010
- function Ii() {
7011
- console.log("ghbdtn"), Wn(), document.getElementById("chat-window").classList.remove("visible");
7012
- let e = parseInt(se("chatCloseCount")) || 0;
7013
- e += 1, e >= La ? (console.log(e), mt("disableAutoOpen", "true", 1), Ni("chatCloseCount")) : (console.log(e), mt("chatCloseCount", e, 1));
7022
+ function Di() {
7023
+ console.log("ghbdtn"), Kn(), document.getElementById("chat-window").classList.remove("visible");
7024
+ let e = parseInt(te("chatCloseCount")) || 0;
7025
+ e += 1, e >= Ha ? (console.log(e), mt("disableAutoOpen", "true", 1), Mi("chatCloseCount")) : (console.log(e), mt("chatCloseCount", e, 1));
7014
7026
  }
7015
- function Pa(t) {
7027
+ function za(t) {
7016
7028
  const e = document.getElementById("chat-window"), s = document.getElementById("message-container"), n = document.querySelector("#input-container input");
7017
7029
  s.innerHTML = "", e.classList.add("visible");
7018
7030
  const i = document.createElement("div");
@@ -7025,16 +7037,16 @@ function Pa(t) {
7025
7037
  const r = document.createElement("div");
7026
7038
  r.className = "message api", r.textContent = re.translate("askForDinner"), s.appendChild(r), s.scrollTop = s.scrollHeight;
7027
7039
  }
7028
- function Ba(t = null) {
7029
- t ? Di(t) : zn(), document.getElementById("chat-window").classList.add("visible");
7040
+ function Wa(t = null) {
7041
+ t ? Pi(t) : Gn(), document.getElementById("chat-window").classList.add("visible");
7030
7042
  }
7031
7043
  document.addEventListener("DOMContentLoaded", () => {
7032
7044
  setupCloseButton(), setupOutsideClick();
7033
7045
  });
7034
- function ja(t) {
7046
+ function $a(t) {
7035
7047
  gt = t;
7036
7048
  }
7037
- class Ua {
7049
+ class Fn {
7038
7050
  constructor() {
7039
7051
  var s;
7040
7052
  this.api = new Hs();
@@ -7055,7 +7067,7 @@ class Ua {
7055
7067
  if (s) {
7056
7068
  this.displayMessage(s, "user"), e.value = "", this.showTypingIndicator();
7057
7069
  try {
7058
- Ai(s);
7070
+ Bi(s);
7059
7071
  const n = await this.api.getWineRecommendations(s);
7060
7072
  this.hideTypingIndicator(), n && n.length ? this.displayResults(n) : this.displayMessage("No results found.", "api");
7061
7073
  } catch {
@@ -7074,12 +7086,12 @@ class Ua {
7074
7086
  i.textContent = e, i.className = "message " + s, n.appendChild(i), n.scrollTop = n.scrollHeight;
7075
7087
  }
7076
7088
  sendAnalytics(e) {
7077
- console.log(e), Mi(e);
7089
+ console.log(e), Ui(e);
7078
7090
  }
7079
7091
  displayResults(e) {
7080
7092
  console.log(e);
7081
7093
  const s = document.getElementById("message-container");
7082
- Fi(e.map((n) => n.Title)), e.forEach((n) => {
7094
+ ji(e.map((n) => n.Title)), e.forEach((n) => {
7083
7095
  const i = document.createElement("div");
7084
7096
  i.className = "wine-recommendation";
7085
7097
  const r = document.createElement("div");
@@ -7101,66 +7113,57 @@ class Ua {
7101
7113
  }), s.scrollTop = s.scrollHeight;
7102
7114
  }
7103
7115
  }
7104
- const Ha = new Hs(), ut = {
7116
+ const qa = new Hs(), ut = {
7105
7117
  PRODUCT_PAGES: /producto\/[^\/]+\/$/
7106
7118
  // Matches any product page like 'producto/any-product-name/'
7107
7119
  // CART_PAGE: /carrito\/$/ // Matches the cart page like 'carrito/'
7108
- }, Fn = {
7120
+ }, Mn = {
7109
7121
  FESTIVAL_PAGES: /festival/,
7110
7122
  // Matches any URL containing 'festival'
7111
7123
  TASTING_PAGES: /tasting/
7112
7124
  // Matches any URL containing 'tasting'
7113
7125
  };
7114
- var Ln, Pn;
7115
- const za = {
7116
- FESTIVAL_PAGES: ((Ln = window.wineaterData) == null ? void 0 : Ln.FESTIVAL_PAGES) || Fn.FESTIVAL_PAGES,
7117
- TASTING_PAGES: ((Pn = window.wineaterData) == null ? void 0 : Pn.TASTING_PAGES) || Fn.TASTING_PAGES
7126
+ var Hn, zn;
7127
+ const Va = {
7128
+ FESTIVAL_PAGES: ((Hn = window.wineaterData) == null ? void 0 : Hn.FESTIVAL_PAGES) || Mn.FESTIVAL_PAGES,
7129
+ TASTING_PAGES: ((zn = window.wineaterData) == null ? void 0 : zn.TASTING_PAGES) || Mn.TASTING_PAGES
7118
7130
  };
7119
- var Bn, jn;
7120
- const Wa = {
7121
- PRODUCT_PAGES: ((Bn = window.wineaterData) == null ? void 0 : Bn.PRODUCT_PAGES) || ut.PRODUCT_PAGES,
7122
- CART_PAGE: ((jn = window.wineaterData) == null ? void 0 : jn.CART_PAGE) || (ut == null ? void 0 : ut.CART_PAGE)
7131
+ var Wn, $n;
7132
+ const Ga = {
7133
+ PRODUCT_PAGES: ((Wn = window.wineaterData) == null ? void 0 : Wn.PRODUCT_PAGES) || ut.PRODUCT_PAGES,
7134
+ CART_PAGE: (($n = window.wineaterData) == null ? void 0 : $n.CART_PAGE) || (ut == null ? void 0 : ut.CART_PAGE)
7123
7135
  };
7124
- async function $a() {
7136
+ async function Ka() {
7125
7137
  var e, s;
7126
7138
  const t = window.location.href;
7127
- for (const [n, i] of Object.entries(za))
7139
+ for (const [n, i] of Object.entries(Va))
7128
7140
  if (i.test(t))
7129
7141
  return !1;
7130
- for (const [n, i] of Object.entries(Wa))
7142
+ for (const [n, i] of Object.entries(Ga))
7131
7143
  if (i.test(t))
7132
7144
  try {
7133
- const r = ((e = document.querySelector('meta[name="title"]')) == null ? void 0 : e.getAttribute("content")) || document.title, o = ((s = document.querySelector('meta[name="description"]')) == null ? void 0 : s.getAttribute("content")) || "", l = await Ha.getPossibleDishesWithMeta(r, o);
7145
+ const r = ((e = document.querySelector('meta[name="title"]')) == null ? void 0 : e.getAttribute("content")) || document.title, o = ((s = document.querySelector('meta[name="description"]')) == null ? void 0 : s.getAttribute("content")) || "", l = await qa.getPossibleDishesWithMeta(r, o);
7134
7146
  console.log(l);
7135
7147
  const a = setTimeout(() => {
7136
- Pa(l);
7148
+ za(l);
7137
7149
  }, 15e3);
7138
- return ja(a), !0;
7150
+ return $a(a), !0;
7139
7151
  } catch (r) {
7140
7152
  return console.error("Error fetching dishes:", r), !1;
7141
7153
  }
7142
7154
  return !1;
7143
7155
  }
7144
- const qa = new Da({
7156
+ const Xa = new Pa({
7145
7157
  projectKey: "PA8j9fAi49i6g2QnvpNs",
7146
7158
  __DISABLE_SECURE_MODE: !0
7147
- });
7148
- qn.init({
7149
- environmentID: "5RfiDoiqb4dHrNdQvzbkfM",
7150
- // api:"http://localhost:8000/api/v1/" set this if you are self hosting, and point it to your API
7151
- cacheFlags: !0,
7152
- // stores flags in localStorage cache
7153
- enableAnalytics: !0
7154
- // See https://docs.flagsmith.com/flag-analytics/ for more info.
7155
- });
7156
- const Va = "tbMTFzLbWcXFgXK8SzyFHA6kIjelFcz5VQABVPbXdXh5XZJCDQH9BcVlrv3DF3kA";
7159
+ }), Ja = "tbMTFzLbWcXFgXK8SzyFHA6kIjelFcz5VQABVPbXdXh5XZJCDQH9BcVlrv3DF3kA";
7157
7160
  document.addEventListener("DOMContentLoaded", () => {
7158
- window.toggleChatWindow = Ci, window.closeChatWindow = Ii, window.openChatWindow = Ba;
7161
+ window.toggleChatWindow = Ri, window.closeChatWindow = Di, window.openChatWindow = Wa;
7159
7162
  });
7160
- function Ga() {
7163
+ function Ln() {
7161
7164
  var n;
7162
- qa.start();
7163
- const t = qn.getValue("chat-btn-txt"), s = `
7165
+ Xa.start();
7166
+ const t = Jn.getValue("chat-btn-txt"), s = `
7164
7167
  <div id="chatbot-container">
7165
7168
  <div id="chat-icon" onclick="toggleChatWindow()">
7166
7169
  <img src="https://landing-static.s3.eu-central-1.amazonaws.com/images/chat-icon.svg" alt="Chat Icon"> <!-- Update the path to your logo image -->
@@ -7193,35 +7196,47 @@ function Ga() {
7193
7196
  `;
7194
7197
  document.body.insertAdjacentHTML("beforeend", s);
7195
7198
  }
7196
- function Ka() {
7197
- document.getElementById("close-btn").addEventListener("click", Ci);
7199
+ function Pn() {
7200
+ document.getElementById("close-btn").addEventListener("click", Ri);
7198
7201
  }
7199
- function Xa() {
7202
+ function Bn() {
7200
7203
  window.addEventListener("click", function(t) {
7201
7204
  const e = document.getElementById("chat-window"), s = document.getElementById("chat-icon");
7202
7205
  !e.contains(t.target) && !s.contains(t.target) && (e.classList.remove("visible"), s.style.display = "flex");
7203
7206
  });
7204
7207
  }
7205
- function Ja(t) {
7208
+ function jn(t) {
7206
7209
  console.log(t);
7207
7210
  const e = document.getElementById("chat-icon"), s = document.getElementById("chat-window");
7208
7211
  e.className = "", s.className = "", t === "right-center" ? (e.classList.add("chat-icon-right-center"), s.classList.add("right-center-aligned")) : e.classList.add("chat-icon-bottom-right");
7209
7212
  }
7210
7213
  document.addEventListener("DOMContentLoaded", () => {
7211
- se("disableAutoOpen") || $a();
7214
+ te("disableAutoOpen") || Ka();
7212
7215
  });
7213
- var Un;
7216
+ var qn;
7214
7217
  if (typeof window < "u") {
7215
- let t = ((Un = window == null ? void 0 : window.wineaterData) == null ? void 0 : Un.POSITION) || "right-center";
7218
+ let t = ((qn = window == null ? void 0 : window.wineaterData) == null ? void 0 : qn.POSITION) || "right-center";
7216
7219
  window.addEventListener("DOMContentLoaded", async () => {
7217
- var r;
7218
- const s = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"].find((o) => window.location.href.includes(o)) || null;
7220
+ var i;
7221
+ const s = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"].find((r) => window.location.href.includes(r)) || null;
7219
7222
  let n;
7220
- s && (n = s.charAt(0).toUpperCase() + s.slice(1), n === "Climats" && (t = "right-center")), await re.fetchConfig(n || "Climats"), Ga(), Ka(), Xa(), Ja(t), mt("chatbotToken", ((r = window.wineaterData) == null ? void 0 : r.CLIENT_TOKEN) || Va, 365), Ri(), new Ua().initialize();
7223
+ s && (n = s.charAt(0).toUpperCase() + s.slice(1), n === "Climats" && (t = "right-center")), await re.fetchConfig(n || "Climats"), mt("chatbotToken", ((i = window.wineaterData) == null ? void 0 : i.CLIENT_TOKEN) || Ja, 365), Li(), Jn.init({
7224
+ environmentID: "5RfiDoiqb4dHrNdQvzbkfM",
7225
+ // api:"http://localhost:8000/api/v1/" set this if you are self hosting, and point it to your API
7226
+ cacheFlags: !1,
7227
+ // stores flags in localStorage cache
7228
+ enableAnalytics: !0,
7229
+ identity: te("uniqueUserID")
7230
+ // See https://docs.flagsmith.com/flag-analytics/ for more info.
7231
+ }).then(() => {
7232
+ Ln(), Pn(), Bn(), jn(t), new Fn().initialize();
7233
+ }).catch(() => {
7234
+ Ln(), Pn(), Bn(), jn(t), new Fn().initialize();
7235
+ });
7221
7236
  });
7222
7237
  }
7223
7238
  export {
7224
- Ii as closeChatWindow,
7225
- Ba as openChatWindow,
7226
- Ci as toggleChatWindow
7239
+ Di as closeChatWindow,
7240
+ Wa as openChatWindow,
7241
+ Ri as toggleChatWindow
7227
7242
  };