wineater-bot 3.0.6 → 3.0.7

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.
@@ -724,50 +724,50 @@ var fs = { exports: {} };
724
724
  return null;
725
725
  }
726
726
  }, getItem: function(b, f) {
727
- var d = this;
727
+ var u = this;
728
728
  return new Promise(function(m, g) {
729
729
  try {
730
- var w = d.getItemSync(b);
730
+ var w = u.getItemSync(b);
731
731
  f == null || f(null, w), m(w);
732
732
  } catch (x) {
733
733
  f && f(x, null), g(x);
734
734
  }
735
735
  });
736
- }, setItem: function(b, f, d) {
736
+ }, setItem: function(b, f, u) {
737
737
  return new Promise(function(m, g) {
738
738
  try {
739
- localStorage.setItem(b, f), d && d(null, f), m(f);
739
+ localStorage.setItem(b, f), u && u(null, f), m(f);
740
740
  } catch (w) {
741
- d && d(w, null), g(w);
741
+ u && u(w, null), g(w);
742
742
  }
743
743
  });
744
744
  } }, i = function() {
745
745
  return i = Object.assign || function(b) {
746
- for (var f, d = 1, m = arguments.length; d < m; d++)
747
- for (var g in f = arguments[d])
746
+ for (var f, u = 1, m = arguments.length; u < m; u++)
747
+ for (var g in f = arguments[u])
748
748
  Object.prototype.hasOwnProperty.call(f, g) && (b[g] = f[g]);
749
749
  return b;
750
750
  }, i.apply(this, arguments);
751
751
  };
752
- function r(b, f, d, m) {
753
- return new (d || (d = Promise))(function(g, w) {
754
- function x(H) {
752
+ function r(b, f, u, m) {
753
+ return new (u || (u = Promise))(function(g, w) {
754
+ function x($) {
755
755
  try {
756
- M(m.next(H));
756
+ M(m.next($));
757
757
  } catch (_) {
758
758
  w(_);
759
759
  }
760
760
  }
761
- function R(H) {
761
+ function R($) {
762
762
  try {
763
- M(m.throw(H));
763
+ M(m.throw($));
764
764
  } catch (_) {
765
765
  w(_);
766
766
  }
767
767
  }
768
- function M(H) {
768
+ function M($) {
769
769
  var _;
770
- H.done ? g(H.value) : (_ = H.value, _ instanceof d ? _ : new d(function(q) {
770
+ $.done ? g($.value) : (_ = $.value, _ instanceof u ? _ : new u(function(q) {
771
771
  q(_);
772
772
  })).then(x, R);
773
773
  }
@@ -775,7 +775,7 @@ var fs = { exports: {} };
775
775
  });
776
776
  }
777
777
  function o(b, f) {
778
- var d, m, g, w, x = { label: 0, sent: function() {
778
+ var u, m, g, w, x = { label: 0, sent: function() {
779
779
  if (1 & g[0])
780
780
  throw g[1];
781
781
  return g[1];
@@ -784,13 +784,13 @@ var fs = { exports: {} };
784
784
  return this;
785
785
  }), w;
786
786
  function R(M) {
787
- return function(H) {
787
+ return function($) {
788
788
  return function(_) {
789
- if (d)
789
+ if (u)
790
790
  throw new TypeError("Generator is already executing.");
791
791
  for (; x; )
792
792
  try {
793
- if (d = 1, m && (g = 2 & _[0] ? m.return : _[0] ? m.throw || ((g = m.return) && g.call(m), 0) : m.next) && !(g = g.call(m, _[1])).done)
793
+ if (u = 1, m && (g = 2 & _[0] ? m.return : _[0] ? m.throw || ((g = m.return) && g.call(m), 0) : m.next) && !(g = g.call(m, _[1])).done)
794
794
  return g;
795
795
  switch (m = 0, g && (_ = [2 & _[0], g.value]), _[0]) {
796
796
  case 0:
@@ -829,77 +829,77 @@ var fs = { exports: {} };
829
829
  } catch (q) {
830
830
  _ = [6, q], m = 0;
831
831
  } finally {
832
- d = g = 0;
832
+ u = g = 0;
833
833
  }
834
834
  if (5 & _[0])
835
835
  throw _[1];
836
836
  return { value: _[0] ? _[1] : void 0, done: !0 };
837
- }([M, H]);
837
+ }([M, $]);
838
838
  };
839
839
  }
840
840
  }
841
- function l(b, f, d) {
842
- if (d || arguments.length === 2)
841
+ function l(b, f, u) {
842
+ if (u || arguments.length === 2)
843
843
  for (var m, g = 0, w = f.length; g < w; g++)
844
844
  !m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
845
845
  return b.concat(m || Array.prototype.slice.call(f));
846
846
  }
847
- var a = function b(f, d) {
848
- if (f === d)
847
+ var a = function b(f, u) {
848
+ if (f === u)
849
849
  return !0;
850
- if (f && d && typeof f == "object" && typeof d == "object") {
851
- if (f.constructor !== d.constructor)
850
+ if (f && u && typeof f == "object" && typeof u == "object") {
851
+ if (f.constructor !== u.constructor)
852
852
  return !1;
853
853
  var m, g, w;
854
854
  if (Array.isArray(f)) {
855
- if ((m = f.length) != d.length)
855
+ if ((m = f.length) != u.length)
856
856
  return !1;
857
857
  for (g = m; g-- != 0; )
858
- if (!b(f[g], d[g]))
858
+ if (!b(f[g], u[g]))
859
859
  return !1;
860
860
  return !0;
861
861
  }
862
862
  if (f.constructor === RegExp)
863
- return f.source === d.source && f.flags === d.flags;
863
+ return f.source === u.source && f.flags === u.flags;
864
864
  if (f.valueOf !== Object.prototype.valueOf)
865
- return f.valueOf() === d.valueOf();
865
+ return f.valueOf() === u.valueOf();
866
866
  if (f.toString !== Object.prototype.toString)
867
- return f.toString() === d.toString();
868
- if ((m = (w = Object.keys(f)).length) !== Object.keys(d).length)
867
+ return f.toString() === u.toString();
868
+ if ((m = (w = Object.keys(f)).length) !== Object.keys(u).length)
869
869
  return !1;
870
870
  for (g = m; g-- != 0; )
871
- if (!Object.prototype.hasOwnProperty.call(d, w[g]))
871
+ if (!Object.prototype.hasOwnProperty.call(u, w[g]))
872
872
  return !1;
873
873
  for (g = m; g-- != 0; ) {
874
874
  var x = w[g];
875
- if (!b(f[x], d[x]))
875
+ if (!b(f[x], u[x]))
876
876
  return !1;
877
877
  }
878
878
  return !0;
879
879
  }
880
- return f != f && d != d;
880
+ return f != f && u != u;
881
881
  };
882
882
  function h(b, f) {
883
- var d = Object.keys(f || {}).filter(function(m) {
883
+ var u = Object.keys(f || {}).filter(function(m) {
884
884
  var g = b == null ? void 0 : b[m], w = f == null ? void 0 : f[m];
885
885
  return !a(g, w);
886
886
  });
887
887
  return Object.keys(b || {}).filter(function(m) {
888
- Object.keys(f || {}).includes(m) || d.push(m);
889
- }), Object.keys(d).length ? d : null;
888
+ Object.keys(f || {}).includes(m) || u.push(m);
889
+ }), Object.keys(u).length ? u : null;
890
890
  }
891
- var c, u;
892
- function p(b, f, d) {
891
+ var c, d;
892
+ function p(b, f, u) {
893
893
  var m = "shortString", g = !0;
894
- typeof d == "number" && (m = "javaDouble", g = !1), b[m] = b[m] || {}, b[m][f] = g ? d + "" : d;
894
+ typeof u == "number" && (m = "javaDouble", g = !1), b[m] = b[m] || {}, b[m][f] = g ? u + "" : u;
895
895
  }
896
896
  function v(b) {
897
897
  return !!b && typeof b == "object" && b.value !== void 0;
898
898
  }
899
899
  function S(b) {
900
900
  return Object.fromEntries(Object.entries(b).map(function(f) {
901
- var d = f[0], m = f[1];
902
- return [d, v(m) ? m : { value: m }];
901
+ var u = f[0], m = f[1];
902
+ return [u, v(m) ? m : { value: m }];
903
903
  }));
904
904
  }
905
905
  function y(b) {
@@ -910,122 +910,122 @@ var fs = { exports: {} };
910
910
  })(c || (c = {}));
911
911
  var E, F = null, P = "BULLET_TRAIN_DB", A = "BULLET_TRAIN_EVENT", k = "https://edge.api.flagsmith.com/api/v1/", N = "flagsmith_value_", O = "flagsmith_enabled_", D = "flagsmith_trait_", I = function() {
912
912
  function b(f) {
913
- var d = this;
913
+ var u = this;
914
914
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
915
- var m = d, g = m.api, w = m.evaluationContext;
916
- d.log("Get Flags"), d.isLoading = !0, d.loadingState.isFetching || d.setLoadingState(i(i({}, d.loadingState), { isFetching: !0 }));
917
- var x = "".concat(d.getContext().identity), R = function(M) {
918
- var H, _, q, ee;
919
- if (M && x === "".concat(d.getContext().identity)) {
915
+ var m = u, g = m.api, w = m.evaluationContext;
916
+ u.log("Get Flags"), u.isLoading = !0, u.loadingState.isFetching || u.setLoadingState(i(i({}, u.loadingState), { isFetching: !0 }));
917
+ var x = "".concat(u.getContext().identity), R = function(M) {
918
+ var $, _, q, ee;
919
+ if (M && x === "".concat(u.getContext().identity)) {
920
920
  var ae = M.flags, te = M.traits, se = M.identifier;
921
- d.isLoading = !1;
921
+ u.isLoading = !1;
922
922
  var ce = {}, le = {};
923
923
  te = te || [], (ae = ae || []).forEach(function(J) {
924
924
  ce[J.feature.name.toLowerCase().replace(/ /g, "_")] = { id: J.feature.id, enabled: J.enabled, value: J.feature_state_value };
925
925
  }), te.forEach(function(J) {
926
926
  le[J.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: J.transient, value: J.trait_value };
927
- }), d.oldFlags = i({}, d.flags);
928
- var me = h(d.oldFlags, ce), Ke = h((H = d.evaluationContext.identity) === null || H === void 0 ? void 0 : H.traits, le);
929
- if ((se || Object.keys(le).length) && (d.evaluationContext.identity = { traits: le }, se && (d.evaluationContext.identity.identifier = se)), d.flags = ce, d.updateStorage(), d._onChange(d.oldFlags, { isFromServer: !0, flagsChanged: me, traitsChanged: Ke }, d._loadedState(null, c.SERVER)), d.datadogRum)
927
+ }), u.oldFlags = i({}, u.flags);
928
+ var me = h(u.oldFlags, ce), Ke = h(($ = u.evaluationContext.identity) === null || $ === void 0 ? void 0 : $.traits, le);
929
+ if ((se || Object.keys(le).length) && (u.evaluationContext.identity = { traits: le }, se && (u.evaluationContext.identity.identifier = se)), u.flags = ce, u.updateStorage(), u._onChange(u.oldFlags, { isFromServer: !0, flagsChanged: me, traitsChanged: Ke }, u._loadedState(null, c.SERVER)), u.datadogRum)
930
930
  try {
931
- if (d.datadogRum.trackTraits) {
931
+ if (u.datadogRum.trackTraits) {
932
932
  var Je = {};
933
- Object.keys(((_ = d.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(J) {
934
- Je[D + J] = d.getTrait(J);
933
+ Object.keys(((_ = u.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(J) {
934
+ Je[D + J] = u.getTrait(J);
935
935
  });
936
- var Le = i(i(i({}, d.datadogRum.client.getUser()), { id: d.datadogRum.client.getUser().id || ((q = d.evaluationContext.identity) === null || q === void 0 ? void 0 : q.identifier) }), Je);
937
- d.log("Setting Datadog user", Le), d.datadogRum.client.setUser(Le);
936
+ var Le = i(i(i({}, u.datadogRum.client.getUser()), { id: u.datadogRum.client.getUser().id || ((q = u.evaluationContext.identity) === null || q === void 0 ? void 0 : q.identifier) }), Je);
937
+ u.log("Setting Datadog user", Le), u.datadogRum.client.setUser(Le);
938
938
  }
939
939
  } catch (J) {
940
940
  console.error(J);
941
941
  }
942
- if (d.dtrum)
942
+ if (u.dtrum)
943
943
  try {
944
944
  var ne = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
945
- Object.keys(d.flags).map(function(J) {
946
- p(ne, N + J, d.getValue(J, { skipAnalytics: !0 })), p(ne, O + J, d.hasFeature(J, { skipAnalytics: !0 }));
947
- }), Object.keys(((ee = d.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(J) {
948
- p(ne, D + J, d.getTrait(J));
949
- }), d.log("Sending javaLongOrObject traits to dynatrace", ne.javaLongOrObject), d.log("Sending date traits to dynatrace", ne.date), d.log("Sending shortString traits to dynatrace", ne.shortString), d.log("Sending javaDouble to dynatrace", ne.javaDouble), d.dtrum.sendSessionProperties(ne.javaLongOrObject, ne.date, ne.shortString, ne.javaDouble);
945
+ Object.keys(u.flags).map(function(J) {
946
+ p(ne, N + J, u.getValue(J, { skipAnalytics: !0 })), p(ne, O + J, u.hasFeature(J, { skipAnalytics: !0 }));
947
+ }), Object.keys(((ee = u.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(J) {
948
+ p(ne, D + J, u.getTrait(J));
949
+ }), u.log("Sending javaLongOrObject traits to dynatrace", ne.javaLongOrObject), u.log("Sending date traits to dynatrace", ne.date), u.log("Sending shortString traits to dynatrace", ne.shortString), u.log("Sending javaDouble to dynatrace", ne.javaDouble), u.dtrum.sendSessionProperties(ne.javaLongOrObject, ne.date, ne.shortString, ne.javaDouble);
950
950
  } catch (J) {
951
951
  console.error(J);
952
952
  }
953
953
  }
954
954
  };
955
- return w.identity ? Promise.all([w.identity.traits && Object.keys(w.identity.traits).length || !w.identity.identifier ? d.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: w.identity.identifier, transient: w.identity.transient, traits: Object.entries(w.identity.traits).map(function(M) {
956
- var H = M[0], _ = M[1];
957
- return { trait_key: H, trait_value: _ == null ? void 0 : _.value, transient: _ == null ? void 0 : _.transient };
955
+ return w.identity ? Promise.all([w.identity.traits && Object.keys(w.identity.traits).length || !w.identity.identifier ? u.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: w.identity.identifier, transient: w.identity.transient, traits: Object.entries(w.identity.traits).map(function(M) {
956
+ var $ = M[0], _ = M[1];
957
+ return { trait_key: $, trait_value: _ == null ? void 0 : _.value, transient: _ == null ? void 0 : _.transient };
958
958
  }).filter(function(M) {
959
- return M.trait_value !== void 0 || (d.log("Warning - attempted to set an undefined trait value for key", M.trait_key), !1);
960
- }) })) : d.getJSON(g + "identities/?identifier=" + encodeURIComponent(w.identity.identifier) + (w.identity.transient ? "&transient=true" : ""))]).then(function(M) {
961
- return d.evaluationContext.identity = i(i({}, d.evaluationContext.identity), { traits: {} }), R(M == null ? void 0 : M[0]);
959
+ return M.trait_value !== void 0 || (u.log("Warning - attempted to set an undefined trait value for key", M.trait_key), !1);
960
+ }) })) : u.getJSON(g + "identities/?identifier=" + encodeURIComponent(w.identity.identifier) + (w.identity.transient ? "&transient=true" : ""))]).then(function(M) {
961
+ return u.evaluationContext.identity = i(i({}, u.evaluationContext.identity), { traits: {} }), R(M == null ? void 0 : M[0]);
962
962
  }).catch(function(M) {
963
- var H = M.message, _ = new Error(H);
963
+ var $ = M.message, _ = new Error($);
964
964
  return Promise.reject(_);
965
- }) : d.getJSON(g + "flags/").then(function(M) {
965
+ }) : u.getJSON(g + "flags/").then(function(M) {
966
966
  return R({ flags: M, traits: void 0 });
967
967
  });
968
968
  }, this.analyticsFlags = function() {
969
- var m = d.api;
970
- if (d.evaluationEvent && d.evaluationContext.environment && d.evaluationEvent[d.evaluationContext.environment.apiKey])
971
- return d.evaluationEvent && Object.getOwnPropertyNames(d.evaluationEvent).length !== 0 && Object.getOwnPropertyNames(d.evaluationEvent[d.evaluationContext.environment.apiKey]).length !== 0 ? d.getJSON(m + "analytics/flags/", "POST", JSON.stringify(d.evaluationEvent[d.evaluationContext.environment.apiKey])).then(function(g) {
972
- if (d.evaluationContext.environment) {
973
- var w = d.getState();
974
- d.evaluationEvent || (d.evaluationEvent = {}), d.evaluationEvent[d.evaluationContext.environment.apiKey] = {}, d.setState(i(i({}, w), { evaluationEvent: d.evaluationEvent })), d.updateEventStorage();
969
+ var m = u.api;
970
+ if (u.evaluationEvent && u.evaluationContext.environment && u.evaluationEvent[u.evaluationContext.environment.apiKey])
971
+ return u.evaluationEvent && Object.getOwnPropertyNames(u.evaluationEvent).length !== 0 && Object.getOwnPropertyNames(u.evaluationEvent[u.evaluationContext.environment.apiKey]).length !== 0 ? u.getJSON(m + "analytics/flags/", "POST", JSON.stringify(u.evaluationEvent[u.evaluationContext.environment.apiKey])).then(function(g) {
972
+ if (u.evaluationContext.environment) {
973
+ var w = u.getState();
974
+ u.evaluationEvent || (u.evaluationEvent = {}), u.evaluationEvent[u.evaluationContext.environment.apiKey] = {}, u.setState(i(i({}, w), { evaluationEvent: u.evaluationEvent })), u.updateEventStorage();
975
975
  }
976
976
  }).catch(function(g) {
977
- d.log("Exception fetching evaluationEvent", g);
977
+ u.log("Exception fetching evaluationEvent", g);
978
978
  }) : void 0;
979
979
  }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: c.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1 }, this.getValue = function(m, g, w) {
980
- var x = d.flags && d.flags[m.toLowerCase().replace(/ /g, "_")], R = null;
981
- if (x && (R = x.value), g != null && g.skipAnalytics || w || d.evaluateFlag(m, "VALUE"), R === null && (g == null ? void 0 : g.fallback) !== void 0)
980
+ var x = u.flags && u.flags[m.toLowerCase().replace(/ /g, "_")], R = null;
981
+ if (x && (R = x.value), g != null && g.skipAnalytics || w || u.evaluateFlag(m, "VALUE"), R === null && (g == null ? void 0 : g.fallback) !== void 0)
982
982
  return g.fallback;
983
983
  if (g != null && g.json)
984
984
  try {
985
- return R === null ? (d.log("Tried to parse null flag as JSON: " + m), null) : JSON.parse(R);
985
+ return R === null ? (u.log("Tried to parse null flag as JSON: " + m), null) : JSON.parse(R);
986
986
  } catch {
987
987
  return g.fallback;
988
988
  }
989
989
  return R;
990
990
  }, this.getTrait = function(m) {
991
991
  var g, w;
992
- return ((g = d.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits) && ((w = d.evaluationContext.identity.traits[m.toLowerCase().replace(/ /g, "_")]) === null || w === void 0 ? void 0 : w.value);
992
+ return ((g = u.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits) && ((w = u.evaluationContext.identity.traits[m.toLowerCase().replace(/ /g, "_")]) === null || w === void 0 ? void 0 : w.value);
993
993
  }, this.getAllTraits = function() {
994
994
  var m;
995
- return Object.fromEntries(Object.entries(((m = d.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits) || {}).map(function(g) {
995
+ return Object.fromEntries(Object.entries(((m = u.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits) || {}).map(function(g) {
996
996
  var w = g[0], x = g[1];
997
997
  return [w, x == null ? void 0 : x.value];
998
998
  }));
999
999
  }, this.setContext = function(m) {
1000
1000
  var g = y(m);
1001
- return d.evaluationContext = i(i({}, g), { environment: g.environment || d.evaluationContext.environment }), d.initialised ? d.getFlags() : Promise.resolve();
1001
+ return u.evaluationContext = i(i({}, g), { environment: g.environment || u.evaluationContext.environment }), u.initialised ? u.getFlags() : Promise.resolve();
1002
1002
  }, this.getContext = function() {
1003
- return d.evaluationContext;
1003
+ return u.evaluationContext;
1004
1004
  }, this.updateContext = function(m) {
1005
- return d.setContext(i(i({}, d.getContext()), m));
1005
+ return u.setContext(i(i({}, u.getContext()), m));
1006
1006
  }, this.setTrait = function(m, g) {
1007
1007
  var w;
1008
- if (d.api)
1009
- return d.setContext(i(i({}, d.evaluationContext), { identity: i(i({}, d.evaluationContext.identity), { traits: i(i({}, (w = d.evaluationContext.identity) === null || w === void 0 ? void 0 : w.traits), S(Object.fromEntries([[m, g]]))) }) }));
1008
+ if (u.api)
1009
+ return u.setContext(i(i({}, u.evaluationContext), { identity: i(i({}, u.evaluationContext.identity), { traits: i(i({}, (w = u.evaluationContext.identity) === null || w === void 0 ? void 0 : w.traits), S(Object.fromEntries([[m, g]]))) }) }));
1010
1010
  }, this.setTraits = function(m) {
1011
1011
  var g;
1012
- if (d.api)
1013
- return d.setContext(i(i({}, d.evaluationContext), { identity: i(i({}, d.evaluationContext.identity), { traits: i(i({}, (g = d.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits), Object.fromEntries(Object.entries(m).map(function(w) {
1012
+ if (u.api)
1013
+ return u.setContext(i(i({}, u.evaluationContext), { identity: i(i({}, u.evaluationContext.identity), { traits: i(i({}, (g = u.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits), Object.fromEntries(Object.entries(m).map(function(w) {
1014
1014
  var x = w[0], R = w[1];
1015
1015
  return [x, v(R) ? R : { value: R }];
1016
1016
  }))) }) }));
1017
1017
  console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.");
1018
1018
  }, this.hasFeature = function(m, g) {
1019
- var w = typeof g == "object", x = d.flags && d.flags[m.toLowerCase().replace(/ /g, "_")], R = !1;
1020
- return !x && w && g.fallback !== void 0 ? R = g == null ? void 0 : g.fallback : x && x.enabled && (R = !0), (w && !g.skipAnalytics || !g) && d.evaluateFlag(m, "ENABLED"), R;
1019
+ var w = typeof g == "object", x = u.flags && u.flags[m.toLowerCase().replace(/ /g, "_")], R = !1;
1020
+ return !x && w && g.fallback !== void 0 ? R = g == null ? void 0 : g.fallback : x && x.enabled && (R = !0), (w && !g.skipAnalytics || !g) && u.evaluateFlag(m, "ENABLED"), R;
1021
1021
  }, this.getJSON = function(m, g, w) {
1022
- var x, R = d;
1022
+ var x, R = u;
1023
1023
  R.evaluationContext;
1024
- var M = R.headers, H = { method: g || "GET", body: w, cache: "no-cache", headers: {} };
1025
- d.evaluationContext.environment && (H.headers["X-Environment-Key"] = d.evaluationContext.environment.apiKey), g && g !== "GET" && (H.headers["Content-Type"] = "application/json; charset=utf-8"), M && Object.assign(H.headers, M), u || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
1026
- var _ = "".concat((x = d.evaluationContext.identity) === null || x === void 0 ? void 0 : x.identifier);
1027
- return u(m, H).then(function(q) {
1028
- var ee, ae, te = "".concat((ee = d.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.identifier);
1024
+ var M = R.headers, $ = { method: g || "GET", body: w, cache: "no-cache", headers: {} };
1025
+ u.evaluationContext.environment && ($.headers["X-Environment-Key"] = u.evaluationContext.environment.apiKey), g && g !== "GET" && ($.headers["Content-Type"] = "application/json; charset=utf-8"), M && Object.assign($.headers, M), d || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
1026
+ var _ = "".concat((x = u.evaluationContext.identity) === null || x === void 0 ? void 0 : x.identifier);
1027
+ return d(m, $).then(function(q) {
1028
+ var ee, ae, te = "".concat((ee = u.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.identifier);
1029
1029
  if (_ === te) {
1030
1030
  var se = (ae = q.headers) === null || ae === void 0 ? void 0 : ae.get("x-flagsmith-document-updated-at");
1031
1031
  if (se)
@@ -1033,11 +1033,11 @@ var fs = { exports: {} };
1033
1033
  var ce = parseFloat(se);
1034
1034
  if (isNaN(ce))
1035
1035
  return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
1036
- d.timestamp = ce;
1036
+ u.timestamp = ce;
1037
1037
  } catch (le) {
1038
- d.log(le, "Failed to parse x-flagsmith-document-updated-at", se);
1038
+ u.log(le, "Failed to parse x-flagsmith-document-updated-at", se);
1039
1039
  }
1040
- return d.log("Fetch response: " + q.status + " " + (g || "GET") + 0 + m), q.text().then(function(le) {
1040
+ return u.log("Fetch response: " + q.status + " " + (g || "GET") + 0 + m), q.text().then(function(le) {
1041
1041
  var me = le;
1042
1042
  try {
1043
1043
  me = JSON.parse(le);
@@ -1046,36 +1046,36 @@ var fs = { exports: {} };
1046
1046
  return !me && q.status && (me = "API Response: ".concat(q.status)), q.status && q.status >= 200 && q.status < 300 ? me : Promise.reject(new Error(me));
1047
1047
  });
1048
1048
  }
1049
- d.log("Received response with identity mismatch, ignoring response. Requested: ".concat(_, ", Current: ").concat(te));
1049
+ u.log("Received response with identity mismatch, ignoring response. Requested: ".concat(_, ", Current: ").concat(te));
1050
1050
  });
1051
1051
  }, this.evaluateFlag = function(m, g) {
1052
- if (d.datadogRum && (d.datadogRum.client.addFeatureFlagEvaluation ? g === "VALUE" ? d.datadogRum.client.addFeatureFlagEvaluation(N + m, d.getValue(m, {}, !0)) : d.datadogRum.client.addFeatureFlagEvaluation(O + m, d.hasFeature(m, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), d.enableAnalytics) {
1053
- if (!d.evaluationEvent || !d.evaluationContext.environment)
1052
+ if (u.datadogRum && (u.datadogRum.client.addFeatureFlagEvaluation ? g === "VALUE" ? u.datadogRum.client.addFeatureFlagEvaluation(N + m, u.getValue(m, {}, !0)) : u.datadogRum.client.addFeatureFlagEvaluation(O + m, u.hasFeature(m, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), u.enableAnalytics) {
1053
+ if (!u.evaluationEvent || !u.evaluationContext.environment)
1054
1054
  return;
1055
- d.evaluationEvent[d.evaluationContext.environment.apiKey] || (d.evaluationEvent[d.evaluationContext.environment.apiKey] = {}), d.evaluationEvent[d.evaluationContext.environment.apiKey][m] === void 0 && (d.evaluationEvent[d.evaluationContext.environment.apiKey][m] = 0), d.evaluationEvent[d.evaluationContext.environment.apiKey][m] += 1;
1055
+ u.evaluationEvent[u.evaluationContext.environment.apiKey] || (u.evaluationEvent[u.evaluationContext.environment.apiKey] = {}), u.evaluationEvent[u.evaluationContext.environment.apiKey][m] === void 0 && (u.evaluationEvent[u.evaluationContext.environment.apiKey][m] = 0), u.evaluationEvent[u.evaluationContext.environment.apiKey][m] += 1;
1056
1056
  }
1057
- d.updateEventStorage();
1057
+ u.updateEventStorage();
1058
1058
  }, this._onChange = function(m, g, w) {
1059
1059
  var x, R;
1060
- d.setLoadingState(w), (x = d.onChange) === null || x === void 0 || x.call(d, m, g, d.loadingState), (R = d._trigger) === null || R === void 0 || R.call(d);
1061
- }, u = f.fetch ? f.fetch : typeof fetch < "u" ? fetch : We == null ? void 0 : We.fetch, this.canUseStorage = typeof window < "u" || !!f.browserlessStorage, this.log("Constructing flagsmith instance " + f), f.eventSource && (E = f.eventSource), f.AsyncStorage && (F = f.AsyncStorage);
1060
+ u.setLoadingState(w), (x = u.onChange) === null || x === void 0 || x.call(u, m, g, u.loadingState), (R = u._trigger) === null || R === void 0 || R.call(u);
1061
+ }, d = f.fetch ? f.fetch : typeof fetch < "u" ? fetch : We == null ? void 0 : We.fetch, this.canUseStorage = typeof window < "u" || !!f.browserlessStorage, this.log("Constructing flagsmith instance " + f), f.eventSource && (E = f.eventSource), f.AsyncStorage && (F = f.AsyncStorage);
1062
1062
  }
1063
1063
  return b.prototype.init = function(f) {
1064
- var d, m, g;
1064
+ var u, m, g;
1065
1065
  return r(this, void 0, void 0, function() {
1066
- var w, x, R, M, H, _, q, ee, ae, te, se, ce, le, me, Ke, Je, Le, ne, J, At, Xe, $s, Ye, Dt, Ws, qs, Lt, Vs, Mt, Qe, Me, Gs, ie = this;
1066
+ var w, x, R, M, $, _, q, ee, ae, te, se, ce, le, me, Ke, Je, Le, ne, J, At, Xe, $s, Ye, Dt, Ws, qs, Lt, Vs, Mt, Qe, Me, Gs, ie = this;
1067
1067
  return o(this, function(pe) {
1068
1068
  switch (pe.label) {
1069
1069
  case 0:
1070
1070
  w = y(f.evaluationContext || this.evaluationContext), pe.label = 1;
1071
1071
  case 1:
1072
- if (pe.trys.push([1, 13, , 14]), x = f.environmentID, R = f.api, M = R === void 0 ? k : R, H = f.headers, _ = f.onChange, q = f.cacheFlags, ee = f.datadogRum, ae = f.onError, te = f.defaultFlags, se = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Ke = f.enableAnalytics, Je = f.realtime, Le = f.eventSourceUrl, ne = Le === void 0 ? "https://realtime.flagsmith.com/" : Le, J = f.AsyncStorage, At = f.identity, Xe = f.traits, $s = f.state, Ye = f.cacheOptions, Dt = f.angularHttpClient, Ws = f._trigger, qs = f._triggerLoadingState, w.environment = x ? { apiKey: x } : w.environment, !w.environment || !w.environment.apiKey)
1072
+ if (pe.trys.push([1, 13, , 14]), x = f.environmentID, R = f.api, M = R === void 0 ? k : R, $ = f.headers, _ = f.onChange, q = f.cacheFlags, ee = f.datadogRum, ae = f.onError, te = f.defaultFlags, se = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Ke = f.enableAnalytics, Je = f.realtime, Le = f.eventSourceUrl, ne = Le === void 0 ? "https://realtime.flagsmith.com/" : Le, J = f.AsyncStorage, At = f.identity, Xe = f.traits, $s = f.state, Ye = f.cacheOptions, Dt = f.angularHttpClient, Ws = f._trigger, qs = f._triggerLoadingState, w.environment = x ? { apiKey: x } : w.environment, !w.environment || !w.environment.apiKey)
1073
1073
  throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
1074
1074
  if (w.identity = At || Xe ? { identifier: At, traits: Xe ? Object.fromEntries(Object.entries(Xe).map(function(he) {
1075
1075
  return [he[0], { value: he[1] }];
1076
- })) : {} } : w.identity, this.evaluationContext = w, this.api = M, this.headers = H, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = _, Lt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Ws || this._trigger, this._triggerLoadingState = qs || this._triggerLoadingState, this.onError = function(he) {
1076
+ })) : {} } : w.identity, this.evaluationContext = w, this.api = M, this.headers = $, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = _, Lt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Ws || this._trigger, this._triggerLoadingState = qs || this._triggerLoadingState, this.onError = function(he) {
1077
1077
  ie.setLoadingState(i(i({}, ie.loadingState), { isFetching: !1, isLoading: !1, error: he })), ae == null || ae(he);
1078
- }, this.enableLogs = le || !1, this.cacheOptions = Ye ? { skipAPI: !!Ye.skipAPI, ttl: Ye.ttl || 0, loadStale: !!Ye.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 && (u = se), this.enableAnalytics = Ke || !1, this.flags = Object.assign({}, te) || {}, this.datadogRum = ee || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = F !== void 0 && !!q, J && (F = J), Je && typeof window < "u" && this.setupRealtime(ne, w.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState($s), 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), Dt && (u = /* @__PURE__ */ function(he) {
1078
+ }, this.enableLogs = le || !1, this.cacheOptions = Ye ? { skipAPI: !!Ye.skipAPI, ttl: Ye.ttl || 0, loadStale: !!Ye.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 = Ke || !1, this.flags = Object.assign({}, te) || {}, this.datadogRum = ee || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = F !== void 0 && !!q, J && (F = J), Je && typeof window < "u" && this.setupRealtime(ne, w.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState($s), 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), Dt && (d = /* @__PURE__ */ function(he) {
1079
1079
  return function(be, ve) {
1080
1080
  var Te = ve.headers, Y = ve.method, Be = ve.body;
1081
1081
  return new Promise(function(Re) {
@@ -1117,7 +1117,7 @@ var fs = { exports: {} };
1117
1117
  return [3, 8];
1118
1118
  Vs = function(he, be) {
1119
1119
  return r(ie, void 0, void 0, function() {
1120
- var ve, Te, Y, Be, Re, ke, Bt, Ks, Pt, jt, Ut, zt, Ht, $t, Wt, qt, Vt, Gt, Kt, Jt, Xt, Yt, Qt, Zt;
1120
+ var ve, Te, Y, Be, Re, ke, Bt, Ks, Pt, jt, zt, Ut, Ht, $t, Wt, qt, Vt, Gt, Kt, Jt, Xt, Yt, Qt, Zt;
1121
1121
  return o(this, function(Ie) {
1122
1122
  switch (Ie.label) {
1123
1123
  case 0:
@@ -1125,7 +1125,7 @@ var fs = { exports: {} };
1125
1125
  return [3, 7];
1126
1126
  ve = null, Te = null, Ie.label = 1;
1127
1127
  case 1:
1128
- return Ie.trys.push([1, 5, , 6]), Y = JSON.parse(be), Be = !1, Re = !1, Y && Y.api === this.api && ((jt = (Pt = Y.evaluationContext) === null || Pt === void 0 ? void 0 : Pt.environment) === null || jt === void 0 ? void 0 : jt.apiKey) === ((Ut = this.evaluationContext.environment) === null || Ut === void 0 ? void 0 : Ut.apiKey) && (ke = !0, this.evaluationContext.identity && ((Ht = (zt = Y.evaluationContext) === null || zt === void 0 ? void 0 : zt.identity) === null || Ht === void 0 ? void 0 : Ht.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Wt = ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity) === null || Wt === void 0 ? void 0 : Wt.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), ke = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Re = !0, ke = !0)), ke && (Be = !0, Te = h((qt = this.evaluationContext.identity) === null || qt === void 0 ? void 0 : qt.traits, (Gt = (Vt = Y.evaluationContext) === null || Vt === void 0 ? void 0 : Vt.identity) === null || Gt === void 0 ? void 0 : Gt.traits), ve = h(this.flags, Y.flags), this.setState(i(i({}, Y), { evaluationContext: y(i(i({}, Y.evaluationContext), { identity: !((Kt = Y.evaluationContext) === null || Kt === void 0) && Kt.identity ? i(i({}, (Jt = Y.evaluationContext) === null || Jt === void 0 ? void 0 : Jt.identity), { traits: i(i({}, ((Yt = (Xt = Y.evaluationContext) === null || Xt === void 0 ? void 0 : Xt.identity) === null || Yt === void 0 ? void 0 : Yt.traits) || {}), Xe || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Be ? (Bt = !ce && (!this.cacheOptions.skipAPI || Re), this._onChange(null, { isFromServer: !1, flagsChanged: ve, traitsChanged: Te }, this._loadedState(null, c.CACHE, Bt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Be && !Re && this.log("Skipping API, using cache"), Bt && this.getFlags(), [3, 4]) : [3, 2];
1128
+ return Ie.trys.push([1, 5, , 6]), Y = JSON.parse(be), Be = !1, Re = !1, Y && Y.api === this.api && ((jt = (Pt = Y.evaluationContext) === null || Pt === void 0 ? void 0 : Pt.environment) === null || jt === void 0 ? void 0 : jt.apiKey) === ((zt = this.evaluationContext.environment) === null || zt === void 0 ? void 0 : zt.apiKey) && (ke = !0, this.evaluationContext.identity && ((Ht = (Ut = Y.evaluationContext) === null || Ut === void 0 ? void 0 : Ut.identity) === null || Ht === void 0 ? void 0 : Ht.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Wt = ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity) === null || Wt === void 0 ? void 0 : Wt.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), ke = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Re = !0, ke = !0)), ke && (Be = !0, Te = h((qt = this.evaluationContext.identity) === null || qt === void 0 ? void 0 : qt.traits, (Gt = (Vt = Y.evaluationContext) === null || Vt === void 0 ? void 0 : Vt.identity) === null || Gt === void 0 ? void 0 : Gt.traits), ve = h(this.flags, Y.flags), this.setState(i(i({}, Y), { evaluationContext: y(i(i({}, Y.evaluationContext), { identity: !((Kt = Y.evaluationContext) === null || Kt === void 0) && Kt.identity ? i(i({}, (Jt = Y.evaluationContext) === null || Jt === void 0 ? void 0 : Jt.identity), { traits: i(i({}, ((Yt = (Xt = Y.evaluationContext) === null || Xt === void 0 ? void 0 : Xt.identity) === null || Yt === void 0 ? void 0 : Yt.traits) || {}), Xe || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Be ? (Bt = !ce && (!this.cacheOptions.skipAPI || Re), this._onChange(null, { isFromServer: !1, flagsChanged: ve, traitsChanged: Te }, this._loadedState(null, c.CACHE, Bt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Be && !Re && this.log("Skipping API, using cache"), Bt && this.getFlags(), [3, 4]) : [3, 2];
1129
1129
  case 2:
1130
1130
  return ce ? [3, 4] : [4, this.getFlags()];
1131
1131
  case 3:
@@ -1174,7 +1174,7 @@ var fs = { exports: {} };
1174
1174
  return pe.sent(), [3, 12];
1175
1175
  case 11:
1176
1176
  if (te)
1177
- this._onChange(null, { isFromServer: !1, flagsChanged: h({}, te), traitsChanged: h({}, (d = w.identity) === null || d === void 0 ? void 0 : d.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1177
+ this._onChange(null, { isFromServer: !1, flagsChanged: h({}, te), traitsChanged: h({}, (u = w.identity) === null || u === void 0 ? void 0 : u.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1178
1178
  else if (this.flags && (Qe = null, Object.keys(this.flags).length === 0 && (Qe = Lt), this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (m = w.identity) === null || m === void 0 ? void 0 : m.traits) }, this._loadedState(Qe, c.DEFAULT_FLAGS)), Qe))
1179
1179
  throw new Error(Qe);
1180
1180
  pe.label = 12;
@@ -1187,12 +1187,12 @@ var fs = { exports: {} };
1187
1187
  }
1188
1188
  });
1189
1189
  });
1190
- }, b.prototype._loadedState = function(f, d, m) {
1191
- return f === void 0 && (f = null), m === void 0 && (m = !1), { error: f, isFetching: m, isLoading: !1, source: d };
1190
+ }, b.prototype._loadedState = function(f, u, m) {
1191
+ return f === void 0 && (f = null), m === void 0 && (m = !1), { error: f, isFetching: m, isLoading: !1, source: u };
1192
1192
  }, b.prototype.getAllFlags = function() {
1193
1193
  return this.flags;
1194
- }, b.prototype.identify = function(f, d, m) {
1195
- return this.evaluationContext.identity = { identifier: f, transient: m, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == f ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = f, this.log("Identify: " + this.evaluationContext.identity.identifier), d && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(d).map(function(g) {
1194
+ }, b.prototype.identify = function(f, u, m) {
1195
+ return this.evaluationContext.identity = { identifier: f, transient: m, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == f ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = f, this.log("Identify: " + this.evaluationContext.identity.identifier), u && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(u).map(function(g) {
1196
1196
  var w = g[0], x = g[1];
1197
1197
  return [w, v(x) ? x : { value: x }];
1198
1198
  }))), this.initialised ? this.getFlags() : Promise.resolve();
@@ -1207,8 +1207,8 @@ var fs = { exports: {} };
1207
1207
  }, b.prototype.stopListening = function() {
1208
1208
  this.getFlagInterval && (clearInterval(this.getFlagInterval), this.getFlagInterval = null);
1209
1209
  }, b.prototype.log = function() {
1210
- for (var f = [], d = 0; d < arguments.length; d++)
1211
- f[d] = arguments[d];
1210
+ for (var f = [], u = 0; u < arguments.length; u++)
1211
+ f[u] = arguments[u];
1212
1212
  this.enableLogs && console.log.apply(this, l(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], f, !0));
1213
1213
  }, b.prototype.updateStorage = function() {
1214
1214
  if (this.cacheFlags) {
@@ -1222,10 +1222,10 @@ var fs = { exports: {} };
1222
1222
  F.setItem(A, f);
1223
1223
  }
1224
1224
  }, b.prototype.setLoadingState = function(f) {
1225
- var d;
1226
- a(f, this.loadingState) || (this.loadingState = i({}, f), this.log("Loading state changed", f), (d = this._triggerLoadingState) === null || d === void 0 || d.call(this));
1227
- }, b.prototype.setupRealtime = function(f, d) {
1228
- var m = this, g = f + "sse/environments/" + d + "/stream";
1225
+ var u;
1226
+ a(f, this.loadingState) || (this.loadingState = i({}, f), this.log("Loading state changed", f), (u = this._triggerLoadingState) === null || u === void 0 || u.call(this));
1227
+ }, b.prototype.setupRealtime = function(f, u) {
1228
+ var m = this, g = f + "sse/environments/" + u + "/stream";
1229
1229
  E ? this.eventSource || (this.log("Creating event source with url " + g), this.eventSource = new E(g), this.eventSource.addEventListener("environment_updated", function(w) {
1230
1230
  var x;
1231
1231
  try {
@@ -1238,37 +1238,37 @@ var fs = { exports: {} };
1238
1238
  }, b;
1239
1239
  }();
1240
1240
  function T(b) {
1241
- var f = b.fetch, d = b.AsyncStorage, m = b.eventSource;
1242
- return new I({ fetch: f, AsyncStorage: d, eventSource: m });
1241
+ var f = b.fetch, u = b.AsyncStorage, m = b.eventSource;
1242
+ return new I({ fetch: f, AsyncStorage: u, eventSource: m });
1243
1243
  }
1244
1244
  var B, G = (B = function(b, f) {
1245
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, m) {
1246
- d.__proto__ = m;
1247
- } || function(d, m) {
1245
+ return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, m) {
1246
+ u.__proto__ = m;
1247
+ } || function(u, m) {
1248
1248
  for (var g in m)
1249
- Object.prototype.hasOwnProperty.call(m, g) && (d[g] = m[g]);
1249
+ Object.prototype.hasOwnProperty.call(m, g) && (u[g] = m[g]);
1250
1250
  }, B(b, f);
1251
1251
  }, function(b, f) {
1252
1252
  if (typeof f != "function" && f !== null)
1253
1253
  throw new TypeError("Class extends value " + String(f) + " is not a constructor or null");
1254
- function d() {
1254
+ function u() {
1255
1255
  this.constructor = b;
1256
1256
  }
1257
- B(b, f), b.prototype = f === null ? Object.create(f) : (d.prototype = f.prototype, new d());
1257
+ B(b, f), b.prototype = f === null ? Object.create(f) : (u.prototype = f.prototype, new u());
1258
1258
  }), j = function(b) {
1259
- var f = typeof Symbol == "function" && Symbol.iterator, d = f && b[f], m = 0;
1260
- if (d)
1261
- return d.call(b);
1259
+ var f = typeof Symbol == "function" && Symbol.iterator, u = f && b[f], m = 0;
1260
+ if (u)
1261
+ return u.call(b);
1262
1262
  if (b && typeof b.length == "number")
1263
1263
  return { next: function() {
1264
1264
  return b && m >= b.length && (b = void 0), { value: b && b[m++], done: !b };
1265
1265
  } };
1266
1266
  throw new TypeError(f ? "Object is not iterable." : "Symbol.iterator is not defined.");
1267
1267
  }, W = function(b, f) {
1268
- var d = typeof Symbol == "function" && b[Symbol.iterator];
1269
- if (!d)
1268
+ var u = typeof Symbol == "function" && b[Symbol.iterator];
1269
+ if (!u)
1270
1270
  return b;
1271
- var m, g, w = d.call(b), x = [];
1271
+ var m, g, w = u.call(b), x = [];
1272
1272
  try {
1273
1273
  for (; (f === void 0 || f-- > 0) && !(m = w.next()).done; )
1274
1274
  x.push(m.value);
@@ -1276,15 +1276,15 @@ var fs = { exports: {} };
1276
1276
  g = { error: R };
1277
1277
  } finally {
1278
1278
  try {
1279
- m && !m.done && (d = w.return) && d.call(w);
1279
+ m && !m.done && (u = w.return) && u.call(w);
1280
1280
  } finally {
1281
1281
  if (g)
1282
1282
  throw g.error;
1283
1283
  }
1284
1284
  }
1285
1285
  return x;
1286
- }, C = function(b, f, d) {
1287
- if (d || arguments.length === 2)
1286
+ }, C = function(b, f, u) {
1287
+ if (u || arguments.length === 2)
1288
1288
  for (var m, g = 0, w = f.length; g < w; g++)
1289
1289
  !m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
1290
1290
  return b.concat(m || Array.prototype.slice.call(f));
@@ -1295,9 +1295,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1295
1295
  }
1296
1296
  return G(f, b), f;
1297
1297
  }(Error), V = function() {
1298
- function b(f, d) {
1298
+ function b(f, u) {
1299
1299
  var m = this;
1300
- if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = d != null ? Object.assign({}, d) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = f.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function")
1300
+ if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = u != null ? Object.assign({}, u) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = f.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function")
1301
1301
  throw new L();
1302
1302
  this._onevent_wrapped = function(g) {
1303
1303
  m._onevent(g);
@@ -1306,7 +1306,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1306
1306
  return b.prototype.dispatchEvent = function(f) {
1307
1307
  throw new Error("Method not implemented.");
1308
1308
  }, b.prototype._start = function() {
1309
- var f, d, m = this, g = this.url;
1309
+ var f, u, m = this, g = this.url;
1310
1310
  this._lastEventId && (g.indexOf("?") === -1 ? g += "?" : g += "&", g += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(g, this._configuration), this._eventSource.onopen = function(M) {
1311
1311
  m._onopen(M);
1312
1312
  }, this._eventSource.onerror = function(M) {
@@ -1323,7 +1323,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1323
1323
  f = { error: M };
1324
1324
  } finally {
1325
1325
  try {
1326
- x && !x.done && (d = w.return) && d.call(w);
1326
+ x && !x.done && (u = w.return) && u.call(w);
1327
1327
  } finally {
1328
1328
  if (f)
1329
1329
  throw f.error;
@@ -1332,16 +1332,16 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1332
1332
  }, b.prototype._onopen = function(f) {
1333
1333
  this.readyState === 0 && (this.readyState = 1, this.onopen(f));
1334
1334
  }, b.prototype._onerror = function(f) {
1335
- var d = this;
1335
+ var u = this;
1336
1336
  if (this.readyState === 1 && (this.readyState = 0, this.onerror(f)), this._eventSource) {
1337
1337
  this._eventSource.close(), this._eventSource = null;
1338
1338
  var m = Math.round(this.max_retry_time * Math.random());
1339
1339
  this._timer = setTimeout(function() {
1340
- return d._start();
1340
+ return u._start();
1341
1341
  }, m);
1342
1342
  }
1343
1343
  }, b.prototype._onevent = function(f) {
1344
- var d, m;
1344
+ var u, m;
1345
1345
  f && f.lastEventId && (this._lastEventId = f.lastEventId);
1346
1346
  var g = this._listeners[f.type];
1347
1347
  if (g != null)
@@ -1349,13 +1349,13 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1349
1349
  for (var w = j(C([], W(g), !1)), x = w.next(); !x.done; x = w.next())
1350
1350
  x.value.call(this, f);
1351
1351
  } catch (R) {
1352
- d = { error: R };
1352
+ u = { error: R };
1353
1353
  } finally {
1354
1354
  try {
1355
1355
  x && !x.done && (m = w.return) && m.call(w);
1356
1356
  } finally {
1357
- if (d)
1358
- throw d.error;
1357
+ if (u)
1358
+ throw u.error;
1359
1359
  }
1360
1360
  }
1361
1361
  f.type === "message" && this.onmessage(f);
@@ -1364,20 +1364,20 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1364
1364
  }, b.prototype.onmessage = function(f) {
1365
1365
  }, b.prototype.close = function() {
1366
1366
  this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
1367
- }, b.prototype.addEventListener = function(f, d, m) {
1367
+ }, b.prototype.addEventListener = function(f, u, m) {
1368
1368
  this._listeners[f] == null && (this._listeners[f] = [], this._eventSource != null && this._eventSource.addEventListener(f, this._onevent_wrapped));
1369
1369
  var g = this._listeners[f];
1370
- g.includes(d) || (this._listeners[f] = C(C([], W(g), !1), [d], !1));
1371
- }, b.prototype.removeEventListener = function(f, d, m) {
1370
+ g.includes(u) || (this._listeners[f] = C(C([], W(g), !1), [u], !1));
1371
+ }, b.prototype.removeEventListener = function(f, u, m) {
1372
1372
  var g = this._listeners[f];
1373
1373
  this._listeners[f] = g.filter(function(w) {
1374
- return w !== d;
1374
+ return w !== u;
1375
1375
  });
1376
1376
  }, b;
1377
1377
  }();
1378
1378
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
1379
1379
  var K = function(b, f) {
1380
- return f = f || {}, new Promise(function(d, m) {
1380
+ return f = f || {}, new Promise(function(u, m) {
1381
1381
  var g = new XMLHttpRequest(), w = [], x = [], R = {}, M = function() {
1382
1382
  return { ok: (g.status / 100 | 0) == 2, statusText: g.statusText, status: g.status, url: g.responseURL, text: function() {
1383
1383
  return Promise.resolve(g.responseText);
@@ -1395,18 +1395,18 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1395
1395
  return _.toLowerCase() in R;
1396
1396
  } } };
1397
1397
  };
1398
- for (var H in g.open(f.method || "get", b, !0), g.onload = function() {
1398
+ for (var $ in g.open(f.method || "get", b, !0), g.onload = function() {
1399
1399
  g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(_, q, ee) {
1400
1400
  w.push(q = q.toLowerCase()), x.push([q, ee]), R[q] = R[q] ? R[q] + "," + ee : ee;
1401
- }), d(M());
1401
+ }), u(M());
1402
1402
  }, g.onerror = m, g.withCredentials = f.credentials == "include", f.headers)
1403
- g.setRequestHeader(H, f.headers[H]);
1403
+ g.setRequestHeader($, f.headers[$]);
1404
1404
  g.send(f.body || null);
1405
1405
  });
1406
- }, z = T({ AsyncStorage: n, fetch: K, eventSource: V });
1407
- typeof window < "u" && (window.flagsmith = z), s.createFlagsmithInstance = function() {
1406
+ }, U = T({ AsyncStorage: n, fetch: K, eventSource: V });
1407
+ typeof window < "u" && (window.flagsmith = U), s.createFlagsmithInstance = function() {
1408
1408
  return T({ AsyncStorage: n, fetch: K, eventSource: V });
1409
- }, s.default = z, Object.defineProperty(s, "__esModule", { value: !0 });
1409
+ }, s.default = U, Object.defineProperty(s, "__esModule", { value: !0 });
1410
1410
  });
1411
1411
  })(fs, fs.exports);
1412
1412
  var Di = fs.exports;
@@ -1518,8 +1518,8 @@ var qe = function(t, e, s) {
1518
1518
  var a = 15 - e;
1519
1519
  for (i = 0; i < n; ++i)
1520
1520
  if (t[i])
1521
- for (var h = i << 4 | t[i], c = e - t[i], u = o[t[i] - 1]++ << c, p = u | (1 << c) - 1; u <= p; ++u)
1522
- l[vt[u] >> a] = h;
1521
+ for (var h = i << 4 | t[i], c = e - t[i], d = o[t[i] - 1]++ << c, p = d | (1 << c) - 1; d <= p; ++d)
1522
+ l[vt[d] >> a] = h;
1523
1523
  } else
1524
1524
  for (l = new re(n), i = 0; i < n; ++i)
1525
1525
  t[i] && (l[i] = vt[o[t[i] - 1]++] >> 15 - t[i]);
@@ -1565,11 +1565,11 @@ var Gn = /* @__PURE__ */ qe(Oe, 9, 0), Kn = /* @__PURE__ */ qe(st, 5, 0), Rs = f
1565
1565
  s <<= e & 7;
1566
1566
  var n = e / 8 | 0;
1567
1567
  t[n] |= s, t[n + 1] |= s >> 8;
1568
- }, ze = function(t, e, s) {
1568
+ }, Ue = function(t, e, s) {
1569
1569
  s <<= e & 7;
1570
1570
  var n = e / 8 | 0;
1571
1571
  t[n] |= s, t[n + 1] |= s >> 8, t[n + 2] |= s >> 16;
1572
- }, dt = function(t, e) {
1572
+ }, ut = function(t, e) {
1573
1573
  for (var s = [], n = 0; n < t.length; ++n)
1574
1574
  t[n] && s.push({ s: n, f: t[n] });
1575
1575
  var i = s.length, r = s.slice();
@@ -1582,9 +1582,9 @@ var Gn = /* @__PURE__ */ qe(Oe, 9, 0), Kn = /* @__PURE__ */ qe(st, 5, 0), Rs = f
1582
1582
  s.sort(function(N, O) {
1583
1583
  return N.f - O.f;
1584
1584
  }), s.push({ s: -1, f: 25001 });
1585
- var l = s[0], a = s[1], h = 0, c = 1, u = 2;
1585
+ var l = s[0], a = s[1], h = 0, c = 1, d = 2;
1586
1586
  for (s[0] = { s: -1, f: l.f + a.f, l, r: a }; c != i - 1; )
1587
- l = s[s[h].f < s[u].f ? h++ : u++], a = s[h != c && s[h].f < s[u].f ? h++ : u++], s[c++] = { s: -1, f: l.f + a.f, l, r: a };
1587
+ l = s[s[h].f < s[d].f ? h++ : d++], a = s[h != c && s[h].f < s[d].f ? h++ : d++], s[c++] = { s: -1, f: l.f + a.f, l, r: a };
1588
1588
  for (var p = r[0].s, n = 1; n < i; ++n)
1589
1589
  r[n].s > p && (p = r[n].s);
1590
1590
  var v = new re(p + 1), S = yt(s[c - 1], v, 0);
@@ -1647,46 +1647,46 @@ var Gn = /* @__PURE__ */ qe(Oe, 9, 0), Kn = /* @__PURE__ */ qe(st, 5, 0), Rs = f
1647
1647
  return (i + 4 + n) * 8;
1648
1648
  }, bs = function(t, e, s, n, i, r, o, l, a, h, c) {
1649
1649
  ye(e, c++, s), ++i[256];
1650
- for (var u = dt(i, 15), p = u.t, v = u.l, S = dt(r, 15), y = S.t, E = S.l, F = ms(p), P = F.c, A = F.n, k = ms(y), N = k.c, O = k.n, D = new re(19), I = 0; I < P.length; ++I)
1650
+ for (var d = ut(i, 15), p = d.t, v = d.l, S = ut(r, 15), y = S.t, E = S.l, F = ms(p), P = F.c, A = F.n, k = ms(y), N = k.c, O = k.n, D = new re(19), I = 0; I < P.length; ++I)
1651
1651
  ++D[P[I] & 31];
1652
1652
  for (var I = 0; I < N.length; ++I)
1653
1653
  ++D[N[I] & 31];
1654
- for (var T = dt(D, 7), B = T.t, G = T.l, j = 19; j > 4 && !B[ps[j - 1]]; --j)
1654
+ for (var T = ut(D, 7), B = T.t, G = T.l, j = 19; j > 4 && !B[ps[j - 1]]; --j)
1655
1655
  ;
1656
1656
  var W = h + 5 << 3, C = He(i, Oe) + He(r, st) + o, L = He(i, p) + He(r, y) + o + 14 + 3 * j + He(D, B) + 2 * D[16] + 3 * D[17] + 7 * D[18];
1657
1657
  if (a >= 0 && W <= C && W <= L)
1658
1658
  return Fs(e, c, t.subarray(a, a + h));
1659
- var V, K, z, b;
1659
+ var V, K, U, b;
1660
1660
  if (ye(e, c, 1 + (L < C)), c += 2, L < C) {
1661
- V = qe(p, v, 0), K = p, z = qe(y, E, 0), b = y;
1661
+ V = qe(p, v, 0), K = p, U = qe(y, E, 0), b = y;
1662
1662
  var f = qe(B, G, 0);
1663
1663
  ye(e, c, A - 257), ye(e, c + 5, O - 1), ye(e, c + 10, j - 4), c += 14;
1664
1664
  for (var I = 0; I < j; ++I)
1665
1665
  ye(e, c + 3 * I, B[ps[I]]);
1666
1666
  c += 3 * j;
1667
- for (var d = [P, N], m = 0; m < 2; ++m)
1668
- for (var g = d[m], I = 0; I < g.length; ++I) {
1667
+ for (var u = [P, N], m = 0; m < 2; ++m)
1668
+ for (var g = u[m], I = 0; I < g.length; ++I) {
1669
1669
  var w = g[I] & 31;
1670
1670
  ye(e, c, f[w]), c += B[w], w > 15 && (ye(e, c, g[I] >> 5 & 127), c += g[I] >> 12);
1671
1671
  }
1672
1672
  } else
1673
- V = Gn, K = Oe, z = Kn, b = st;
1673
+ V = Gn, K = Oe, U = Kn, b = st;
1674
1674
  for (var I = 0; I < l; ++I) {
1675
1675
  var x = n[I];
1676
1676
  if (x > 255) {
1677
1677
  var w = x >> 18 & 31;
1678
- ze(e, c, V[w + 257]), c += K[w + 257], w > 7 && (ye(e, c, x >> 23 & 31), c += _t[w]);
1678
+ Ue(e, c, V[w + 257]), c += K[w + 257], w > 7 && (ye(e, c, x >> 23 & 31), c += _t[w]);
1679
1679
  var R = x & 31;
1680
- ze(e, c, z[R]), c += b[R], R > 3 && (ze(e, c, x >> 5 & 8191), c += Nt[R]);
1680
+ Ue(e, c, U[R]), c += b[R], R > 3 && (Ue(e, c, x >> 5 & 8191), c += Nt[R]);
1681
1681
  } else
1682
- ze(e, c, V[x]), c += K[x];
1682
+ Ue(e, c, V[x]), c += K[x];
1683
1683
  }
1684
- return ze(e, c, V[256]), c + K[256];
1684
+ return Ue(e, c, V[256]), c + K[256];
1685
1685
  }, Yn = /* @__PURE__ */ new Ct([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), As = /* @__PURE__ */ new fe(0), Qn = function(t, e, s, n, i, r) {
1686
1686
  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), h = r.l, c = (r.r || 0) & 7;
1687
1687
  if (e) {
1688
1688
  c && (a[0] = r.r >> 3);
1689
- for (var u = Yn[e - 1], p = u >> 13, v = u & 8191, S = (1 << s) - 1, y = r.p || new re(32768), E = r.h || new re(S + 1), F = Math.ceil(s / 3), P = 2 * F, A = function(se) {
1689
+ for (var d = Yn[e - 1], p = d >> 13, v = d & 8191, S = (1 << s) - 1, y = r.p || new re(32768), E = r.h || new re(S + 1), F = Math.ceil(s / 3), P = 2 * F, A = function(se) {
1690
1690
  return (t[se] ^ t[se + 1] << F ^ t[se + 2] << P) & S;
1691
1691
  }, k = new Ct(25e3), N = new re(288), O = new re(32), D = 0, I = 0, T = r.i || 0, B = 0, G = r.w || 0, j = 0; T + 2 < o; ++T) {
1692
1692
  var W = A(T), C = T & 32767, L = E[W];
@@ -1699,27 +1699,27 @@ var Gn = /* @__PURE__ */ qe(Oe, 9, 0), Kn = /* @__PURE__ */ qe(st, 5, 0), Rs = f
1699
1699
  for (var K = 0; K < 30; ++K)
1700
1700
  O[K] = 0;
1701
1701
  }
1702
- var z = 2, b = 0, f = v, d = C - L & 32767;
1703
- if (V > 2 && W == A(T - d))
1704
- for (var m = Math.min(p, V) - 1, g = Math.min(32767, T), w = Math.min(258, V); d <= g && --f && C != L; ) {
1705
- if (t[T + z] == t[T + z - d]) {
1706
- for (var x = 0; x < w && t[T + x] == t[T + x - d]; ++x)
1702
+ var U = 2, b = 0, f = v, u = C - L & 32767;
1703
+ if (V > 2 && W == A(T - u))
1704
+ for (var m = Math.min(p, V) - 1, g = Math.min(32767, T), w = Math.min(258, V); u <= g && --f && C != L; ) {
1705
+ if (t[T + U] == t[T + U - u]) {
1706
+ for (var x = 0; x < w && t[T + x] == t[T + x - u]; ++x)
1707
1707
  ;
1708
- if (x > z) {
1709
- if (z = x, b = d, x > m)
1708
+ if (x > U) {
1709
+ if (U = x, b = u, x > m)
1710
1710
  break;
1711
- for (var R = Math.min(d, x - 2), M = 0, K = 0; K < R; ++K) {
1712
- var H = T - d + K & 32767, _ = y[H], q = H - _ & 32767;
1713
- q > M && (M = q, L = H);
1711
+ for (var R = Math.min(u, x - 2), M = 0, K = 0; K < R; ++K) {
1712
+ var $ = T - u + K & 32767, _ = y[$], q = $ - _ & 32767;
1713
+ q > M && (M = q, L = $);
1714
1714
  }
1715
1715
  }
1716
1716
  }
1717
- C = L, L = y[C], d += C - L & 32767;
1717
+ C = L, L = y[C], u += C - L & 32767;
1718
1718
  }
1719
1719
  if (b) {
1720
- k[B++] = 268435456 | bt[z] << 18 | gs[b];
1721
- var ee = bt[z] & 31, ae = gs[b] & 31;
1722
- I += _t[ee] + Nt[ae], ++N[257 + ee], ++O[ae], G = T + z, ++D;
1720
+ k[B++] = 268435456 | bt[U] << 18 | gs[b];
1721
+ var ee = bt[U] & 31, ae = gs[b] & 31;
1722
+ I += _t[ee] + Nt[ae], ++N[257 + ee], ++O[ae], G = T + U, ++D;
1723
1723
  } else
1724
1724
  k[B++] = t[T], ++N[t[T]];
1725
1725
  }
@@ -1779,8 +1779,8 @@ var Gn = /* @__PURE__ */ qe(Oe, 9, 0), Kn = /* @__PURE__ */ qe(st, 5, 0), Rs = f
1779
1779
  e += h.slice(c, h.indexOf("(", c));
1780
1780
  } else {
1781
1781
  e += h;
1782
- for (var u in l.prototype)
1783
- e += ";" + a + ".prototype." + u + "=" + l.prototype[u].toString();
1782
+ for (var d in l.prototype)
1783
+ e += ";" + a + ".prototype." + d + "=" + l.prototype[d].toString();
1784
1784
  }
1785
1785
  else
1786
1786
  e += h;
@@ -1788,27 +1788,27 @@ var Gn = /* @__PURE__ */ qe(Oe, 9, 0), Kn = /* @__PURE__ */ qe(st, 5, 0), Rs = f
1788
1788
  s[a] = l;
1789
1789
  }
1790
1790
  return e;
1791
- }, it = [], Ui = function(t) {
1791
+ }, it = [], zi = function(t) {
1792
1792
  var e = [];
1793
1793
  for (var s in t)
1794
1794
  t[s].buffer && e.push((t[s] = new t[s].constructor(t[s])).buffer);
1795
1795
  return e;
1796
- }, zi = function(t, e, s, n) {
1796
+ }, Ui = function(t, e, s, n) {
1797
1797
  if (!it[s]) {
1798
1798
  for (var i = "", r = {}, o = t.length - 1, l = 0; l < o; ++l)
1799
1799
  i = Ys(t[l], i, r);
1800
1800
  it[s] = { c: Ys(t[o], i, r), e: r };
1801
1801
  }
1802
1802
  var a = ji({}, it[s].e);
1803
- return Li(it[s].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", s, a, Ui(a), n);
1803
+ return Li(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);
1804
1804
  }, Hi = function() {
1805
- return [fe, re, Ct, _t, Nt, ps, bt, gs, Gn, Oe, Kn, st, vt, Yn, As, qe, ye, ze, dt, yt, ms, He, Fs, bs, Rs, Jn, Qn, Ds, qi, ti];
1805
+ return [fe, re, Ct, _t, Nt, ps, bt, gs, Gn, Oe, Kn, st, vt, Yn, As, qe, ye, Ue, ut, yt, ms, He, Fs, bs, Rs, Jn, Qn, Ds, qi, ti];
1806
1806
  }, $i = function() {
1807
1807
  return [si, ni, wt, ei, Zn];
1808
1808
  }, ti = function(t) {
1809
1809
  return postMessage(t, [t.buffer]);
1810
1810
  }, Wi = function(t, e, s, n, i, r) {
1811
- var o = zi(s, n, i, function(l, a) {
1811
+ var o = Ui(s, n, i, function(l, a) {
1812
1812
  o.terminate(), r(l, a);
1813
1813
  });
1814
1814
  return o.postMessage([t, e], e.consume ? [t.buffer] : []), function() {
@@ -1917,8 +1917,8 @@ class Xi {
1917
1917
  subConditions: [],
1918
1918
  name: o.name
1919
1919
  }, a.filters.forEach((c) => {
1920
- const u = this.createConditionFromFilter(c);
1921
- u && h.subConditions.push(u);
1920
+ const d = this.createConditionFromFilter(c);
1921
+ d && h.subConditions.push(d);
1922
1922
  })) : h = this.createConditionFromFilter(a), h && (h.type === "session_duration" && this.processDuration(h.value[0], o.name), r.push({ ...h, name: o.name }));
1923
1923
  });
1924
1924
  }), this.conditions = r;
@@ -2164,8 +2164,8 @@ class Qi {
2164
2164
  async reloadFlags(e) {
2165
2165
  const s = this.app.sessionStorage.getItem(this.storageKey), n = {};
2166
2166
  s && s.split(";").filter(Boolean).forEach((c) => {
2167
- const u = JSON.parse(c);
2168
- n[u.key] = { key: u.key, value: u.value };
2167
+ const d = JSON.parse(c);
2168
+ n[d.key] = { key: d.key, value: d.value };
2169
2169
  });
2170
2170
  const i = this.app.session.getInfo(), r = this.app.session.userInfo, o = {
2171
2171
  projectID: i.projectID,
@@ -2375,7 +2375,7 @@ function hr(t, e, s, n, i) {
2375
2375
  i
2376
2376
  ];
2377
2377
  }
2378
- function dr(t, e, s) {
2378
+ function ur(t, e, s) {
2379
2379
  return [
2380
2380
  9,
2381
2381
  t,
@@ -2383,7 +2383,7 @@ function dr(t, e, s) {
2383
2383
  s
2384
2384
  ];
2385
2385
  }
2386
- function ur(t, e, s) {
2386
+ function dr(t, e, s) {
2387
2387
  return [
2388
2388
  10,
2389
2389
  t,
@@ -2685,7 +2685,7 @@ function Mr(t) {
2685
2685
  t
2686
2686
  ];
2687
2687
  }
2688
- function di(t, e, s, n, i, r, o, l, a, h) {
2688
+ function ui(t, e, s, n, i, r, o, l, a, h) {
2689
2689
  return [
2690
2690
  116,
2691
2691
  t,
@@ -2700,7 +2700,7 @@ function di(t, e, s, n, i, r, o, l, a, h) {
2700
2700
  h
2701
2701
  ];
2702
2702
  }
2703
- function ut(t) {
2703
+ function dt(t) {
2704
2704
  return [
2705
2705
  117,
2706
2706
  t
@@ -2735,7 +2735,7 @@ function jr(t, e, s, n) {
2735
2735
  ];
2736
2736
  }
2737
2737
  const xs = xe && "performance" in window && "memory" in performance ? performance : { memory: {} }, ss = xe ? (navigator.deviceMemory || 0) * 1024 : 0, ns = xs.memory.jsHeapSizeLimit || 0;
2738
- function Ur(t, e) {
2738
+ function zr(t, e) {
2739
2739
  if (!Object.assign({
2740
2740
  capturePerformance: !0
2741
2741
  }, e).capturePerformance)
@@ -2756,11 +2756,11 @@ function Ur(t, e) {
2756
2756
  i = n = void 0;
2757
2757
  }), t.ticker.attach(o, 40, !1), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", o, !1, !1);
2758
2758
  }
2759
- const dn = "__or__watched_tags__";
2760
- class zr {
2759
+ const un = "__or__watched_tags__";
2760
+ class Ur {
2761
2761
  constructor(e, s, n) {
2762
2762
  this.sessionStorage = e, this.errLog = s, this.onTag = n, this.intervals = {}, this.tags = [];
2763
- const i = JSON.parse(e.getItem(dn) ?? "[]");
2763
+ const i = JSON.parse(e.getItem(un) ?? "[]");
2764
2764
  this.setTags(i), this.observer = new IntersectionObserver((r) => {
2765
2765
  r.forEach((o) => {
2766
2766
  if (o.isIntersecting && o.target) {
@@ -2780,7 +2780,7 @@ class zr {
2780
2780
  if (n && n.length) {
2781
2781
  this.setTags(n);
2782
2782
  const i = JSON.stringify(n);
2783
- this.sessionStorage.setItem(dn, i || "");
2783
+ this.sessionStorage.setItem(un, i || "");
2784
2784
  }
2785
2785
  }).catch((n) => this.errLog(n));
2786
2786
  }
@@ -2873,7 +2873,7 @@ const Hr = {
2873
2873
  fontWeight: "500",
2874
2874
  lineHeight: "1.5rem",
2875
2875
  cursor: "pointer"
2876
- }, un = {
2876
+ }, dn = {
2877
2877
  fontFamily: "Verdana, sans-serif",
2878
2878
  fontSize: "13px",
2879
2879
  fontWeight: "500",
@@ -3002,7 +3002,7 @@ const Hr = {
3002
3002
  }, Yr = {
3003
3003
  fontSize: "13px",
3004
3004
  lineHeight: "auto"
3005
- }, ui = {
3005
+ }, di = {
3006
3006
  marginRight: "0.5rem",
3007
3007
  cursor: "pointer",
3008
3008
  color: "#394EFF",
@@ -3013,7 +3013,7 @@ const Hr = {
3013
3013
  fontWeight: "500",
3014
3014
  lineHeight: "auto"
3015
3015
  }, Qr = {
3016
- ...ui,
3016
+ ...di,
3017
3017
  display: "flex",
3018
3018
  padding: "0.25rem 0.9375rem",
3019
3019
  justifyContent: "center",
@@ -3102,8 +3102,8 @@ function so(t, e) {
3102
3102
  const n = t.getBoundingClientRect(), i = s.clientX - n.left, r = s.clientY - n.top;
3103
3103
  t.style.position = "fixed", t.style.zIndex = 99999999999999, o(s.pageX, s.pageY);
3104
3104
  function o(h, c) {
3105
- let u = h - i, p = c - r;
3106
- u <= 5 && (u = 5), p <= 5 && (p = 5), u >= window.innerWidth - n.width && (u = window.innerWidth - n.width), p >= window.innerHeight - n.height && (p = window.innerHeight - n.height), t.style.left = `${u}px`, t.style.top = `${p}px`;
3105
+ let d = h - i, p = c - r;
3106
+ d <= 5 && (d = 5), p <= 5 && (p = 5), d >= window.innerWidth - n.width && (d = window.innerWidth - n.width), p >= window.innerHeight - n.height && (p = window.innerHeight - n.height), t.style.left = `${d}px`, t.style.top = `${p}px`;
3107
3107
  }
3108
3108
  function l(h) {
3109
3109
  o(h.pageX, h.pageY);
@@ -3170,7 +3170,7 @@ function oo() {
3170
3170
  const t = document.createElement("div");
3171
3171
  return t.classList.add("spinner"), Object.assign(t.style, eo), t;
3172
3172
  }
3173
- function U(t, e, s, n, i) {
3173
+ function z(t, e, s, n, i) {
3174
3174
  const r = document.createElement(t);
3175
3175
  return r.className = e, Object.assign(r.style, s), n && (r.textContent = n), i && (r.id = i), r;
3176
3176
  }
@@ -3180,12 +3180,12 @@ class co {
3180
3180
  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 = h, this.durations = {
3181
3181
  testStart: 0,
3182
3182
  tasks: []
3183
- }, this.getDurations = () => this.durations, this.setDurations = (u) => {
3184
- this.durations.testStart = u.testStart, this.durations.tasks = u.tasks;
3185
- }, this.signalTask = (u, p, v) => {
3186
- if (!u)
3183
+ }, this.getDurations = () => this.durations, this.setDurations = (d) => {
3184
+ this.durations.testStart = d.testStart, this.durations.tasks = d.tasks;
3185
+ }, this.signalTask = (d, p, v) => {
3186
+ if (!d)
3187
3187
  return console.error("User Testing: No Task ID Given");
3188
- const S = this.durations.tasks.find((F) => F.taskId === u), y = this.getTimestamp(), E = S ? y - S.started : 0;
3188
+ const S = this.durations.tasks.find((F) => F.taskId === d), y = this.getTimestamp(), E = S ? y - S.started : 0;
3189
3189
  return fetch(`${this.ingestPoint}/v1/web/uxt/signals/task`, {
3190
3190
  method: "POST",
3191
3191
  headers: {
@@ -3194,16 +3194,16 @@ class co {
3194
3194
  },
3195
3195
  body: JSON.stringify({
3196
3196
  testId: this.testId,
3197
- taskId: u,
3197
+ taskId: d,
3198
3198
  status: p,
3199
3199
  duration: E,
3200
3200
  timestamp: y,
3201
3201
  taskAnswer: v
3202
3202
  })
3203
3203
  });
3204
- }, this.signalTest = (u) => {
3204
+ }, this.signalTest = (d) => {
3205
3205
  const p = this.getTimestamp();
3206
- if (u === "begin" && this.testId) {
3206
+ if (d === "begin" && this.testId) {
3207
3207
  const y = this.getSessionId();
3208
3208
  this.setStorageKey(Es, y), this.setStorageKey(this.storageKey, this.testId.toString()), this.setStorageKey(ft, p.toString());
3209
3209
  } else
@@ -3217,7 +3217,7 @@ class co {
3217
3217
  },
3218
3218
  body: JSON.stringify({
3219
3219
  testId: this.testId,
3220
- status: u,
3220
+ status: d,
3221
3221
  duration: S,
3222
3222
  timestamp: p
3223
3223
  })
@@ -3229,7 +3229,7 @@ class co {
3229
3229
  }
3230
3230
  class lo {
3231
3231
  constructor(e, s) {
3232
- this.app = e, this.storageKey = s, this.bg = U("div", "bg", Hr, void 0, "__or_ut_bg"), this.container = U("div", "container", $r, 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) => {
3232
+ this.app = e, this.storageKey = s, this.bg = z("div", "bg", Hr, void 0, "__or_ut_bg"), this.container = z("div", "container", $r, 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) => {
3233
3233
  this.testId = o;
3234
3234
  const h = this.app.options.ingestPoint;
3235
3235
  return fetch(`${h}/v1/web/uxt/test/${o}`, {
@@ -3237,7 +3237,7 @@ class lo {
3237
3237
  Authorization: `Bearer ${l}`
3238
3238
  }
3239
3239
  }).then((c) => c.json()).then(({ test: c }) => {
3240
- this.isActive = !0, this.test = c, this.signalManager = new co(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (u, p) => this.app.localStorage.setItem(u, p), (u) => this.app.localStorage.removeItem(u), (u) => this.app.localStorage.getItem(u), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, yn.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
3240
+ this.isActive = !0, this.test = c, this.signalManager = new co(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, yn.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
3241
3241
  }).then(() => o).catch((c) => {
3242
3242
  console.log("OR: Error fetching test", c);
3243
3243
  });
@@ -3252,15 +3252,15 @@ class lo {
3252
3252
  return this.testId;
3253
3253
  }
3254
3254
  createGreeting(e, s, n) {
3255
- const i = U("div", "title", Wr, e), r = U("div", "description", qr, `Welcome, you're here to help us improve, not to be judged. Your insights matter!
3255
+ const i = z("div", "title", Wr, e), r = z("div", "description", qr, `Welcome, you're here to help us improve, not to be judged. Your insights matter!
3256
3256
 
3257
3257
  📹 We're recording this browser tab to learn from your experience.
3258
- 🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = U("div", "button", Vr, "Read guidelines to begin");
3258
+ 🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = z("div", "button", Vr, "Read guidelines to begin");
3259
3259
  this.removeGreeting = () => ((s || n) && this.userRecorder.startRecording(30, yn.Standard, s, n), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(i), !1), o.onclick = () => {
3260
- var a, h, c, u;
3260
+ var a, h, c, d;
3261
3261
  this.removeGreeting();
3262
3262
  const l = (a = this.signalManager) == null ? void 0 : a.getDurations();
3263
- l && this.signalManager && (l.testStart = this.app.timestamp(), this.signalManager.setDurations(l)), (h = this.signalManager) == null || h.signalTest("begin"), 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, rt), this.showWidget(((c = this.test) == null ? void 0 : c.guidelines) || "", ((u = this.test) == null ? void 0 : u.tasks) || []);
3263
+ l && this.signalManager && (l.testStart = this.app.timestamp(), this.signalManager.setDurations(l)), (h = this.signalManager) == null || h.signalTest("begin"), 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, rt), this.showWidget(((c = this.test) == null ? void 0 : c.guidelines) || "", ((d = this.test) == null ? void 0 : d.tasks) || []);
3264
3264
  }, this.container.append(i, r, o), this.bg.appendChild(this.container), document.body.appendChild(this.bg);
3265
3265
  }
3266
3266
  showWidget(e, s, n) {
@@ -3279,7 +3279,7 @@ class lo {
3279
3279
  });
3280
3280
  const i = this.createTitleSection();
3281
3281
  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, rt);
3282
- const r = this.createDescriptionSection(e), o = this.createTasksSection(s), l = U("div", "stop_bn_or", gn, "Abort Session"), a = U("div", "stop_ct_or", { fontSize: "13px!important" });
3282
+ const r = this.createDescriptionSection(e), o = this.createTasksSection(s), l = z("div", "stop_bn_or", gn, "Abort Session"), a = z("div", "stop_ct_or", { fontSize: "13px!important" });
3283
3283
  a.style.fontSize = "13px", a.append(l), this.container.append(i, r, o, a), this.taskSection = o, this.descriptionSection = r, this.stopButton = l, this.stopButtonContainer = a, l.onclick = () => {
3284
3284
  var h;
3285
3285
  this.userRecorder.discard(), (h = this.signalManager) == null || h.signalTest("skipped"), document.body.removeChild(this.bg), window.close();
@@ -3287,7 +3287,7 @@ class lo {
3287
3287
  }
3288
3288
  createTitleSection() {
3289
3289
  var l;
3290
- const e = U("div", "title", Gr), s = no(), n = U("div", "title_text", {
3290
+ const e = z("div", "title", Gr), s = no(), n = z("div", "title_text", {
3291
3291
  maxWidth: "19rem",
3292
3292
  overflow: "hidden",
3293
3293
  textOverflow: "ellipsis",
@@ -3305,11 +3305,11 @@ class lo {
3305
3305
  return n.onclick = o, i.onclick = o, so(this.bg, s), this.collapseWidget = () => r(!1), e;
3306
3306
  }
3307
3307
  createDescriptionSection(e) {
3308
- const s = U("div", "description_section_or", $e), n = U("div", "description_s_title_or", un), i = U("div", "title", {
3308
+ const s = z("div", "description_section_or", $e), n = z("div", "description_s_title_or", dn), i = z("div", "title", {
3309
3309
  fontSize: 13,
3310
3310
  fontWeight: 500,
3311
3311
  lineHeight: "auto"
3312
- }, "Introduction & Guidelines"), r = U("div", "icon", fn, "-"), o = U("div", "content", je), l = U("div", "text_description", {
3312
+ }, "Introduction & Guidelines"), r = z("div", "icon", fn, "-"), o = z("div", "content", je), l = z("div", "text_description", {
3313
3313
  maxHeight: "250px",
3314
3314
  overflowY: "auto",
3315
3315
  whiteSpace: "pre-wrap",
@@ -3318,7 +3318,7 @@ class lo {
3318
3318
  lineHeight: "auto"
3319
3319
  });
3320
3320
  l.innerHTML = e;
3321
- const a = U("div", "button_begin_or", pn, "Begin Test");
3321
+ const a = z("div", "button_begin_or", pn, "Begin Test");
3322
3322
  n.append(i, r), o.append(l, a), s.append(n, o);
3323
3323
  const h = () => {
3324
3324
  this.widgetGuidelinesVisible = !this.widgetGuidelinesVisible, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? je : { display: "none" });
@@ -3326,37 +3326,37 @@ class lo {
3326
3326
  return n.onclick = h, this.toggleDescriptionVisibility = () => {
3327
3327
  this.widgetGuidelinesVisible = !1, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? je : { display: "none" }), o.removeChild(a);
3328
3328
  }, a.onclick = () => {
3329
- var c, u, p;
3329
+ var c, d, p;
3330
3330
  if (h(), this.test) {
3331
3331
  const v = (c = this.signalManager) == null ? void 0 : c.getDurations(), S = v ? v.tasks.findIndex((y) => this.test && y.taskId === this.test.tasks[0].task_id) : null;
3332
3332
  v && S === -1 && (v.tasks.push({
3333
3333
  taskId: this.test.tasks[0].task_id,
3334
3334
  started: this.app.timestamp()
3335
- }), (u = this.signalManager) == null || u.setDurations(v)), (p = this.signalManager) == null || p.signalTask(this.test.tasks[0].task_id, "begin");
3335
+ }), (d = this.signalManager) == null || d.setDurations(v)), (p = this.signalManager) == null || p.signalTask(this.test.tasks[0].task_id, "begin");
3336
3336
  }
3337
3337
  this.showTaskSection(), o.removeChild(a);
3338
3338
  }, s;
3339
3339
  }
3340
3340
  createTasksSection(e) {
3341
3341
  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, rt);
3342
- const s = U("div", "task_section_or", $e), n = U("div", "description_t_title_or", un), i = U("div", "title", {
3342
+ const s = z("div", "task_section_or", $e), n = z("div", "description_t_title_or", dn), i = z("div", "title", {
3343
3343
  fontSize: "13px",
3344
3344
  fontWeight: "500",
3345
3345
  lineHeight: "auto"
3346
- }, "Tasks"), r = U("div", "icon", fn, "-"), o = U("div", "content", je), l = U("div", "pagination", Jr), a = U("div", "taskCard", bn), h = U("div", "taskText", vn), c = U("div", "taskDescription", Yr), u = U("div", "taskButtons", Zr), p = U("div", "taskText", vn);
3346
+ }, "Tasks"), r = z("div", "icon", fn, "-"), o = z("div", "content", je), l = z("div", "pagination", Jr), a = z("div", "taskCard", bn), h = z("div", "taskText", vn), c = z("div", "taskDescription", Yr), d = z("div", "taskButtons", Zr), p = z("div", "taskText", vn);
3347
3347
  p.textContent = "Your answer";
3348
- const v = U("textarea", "taskDescription", {
3348
+ const v = z("textarea", "taskDescription", {
3349
3349
  resize: "vertical"
3350
- }), S = U("div", "inputArea", bn);
3350
+ }), S = z("div", "inputArea", bn);
3351
3351
  S.append(p, v);
3352
- const y = U("div", "closePanelButton", ui, "Collapse Panel"), E = U("div", "nextButton", Qr, "Done, Next");
3353
- n.append(i, r), a.append(h, c), u.append(y, E), o.append(l, a, S, u), s.append(n, o);
3352
+ const y = z("div", "closePanelButton", di, "Collapse Panel"), E = z("div", "nextButton", Qr, "Done, Next");
3353
+ n.append(i, r), a.append(h, c), d.append(y, E), o.append(l, a, S, d), s.append(n, o);
3354
3354
  const F = () => {
3355
3355
  const k = e[this.currentTaskIndex];
3356
3356
  h.textContent = k.title, c.textContent = k.description, k.allow_typing ? S.style.display = "flex" : S.style.display = "none";
3357
3357
  };
3358
3358
  e.forEach((k, N) => {
3359
- const O = U("span", `or_task_${N}`, {
3359
+ const O = z("span", `or_task_${N}`, {
3360
3360
  outline: "1px solid #efefef",
3361
3361
  fontSize: "13px",
3362
3362
  height: "24px",
@@ -3405,16 +3405,16 @@ class lo {
3405
3405
  var l, a, h, c;
3406
3406
  let e = !0;
3407
3407
  (l = this.signalManager) == null || l.signalTest("done");
3408
- const s = U("div", "end_section_or", Kr), n = U("div", "end_title_or", {
3408
+ const s = z("div", "end_section_or", Kr), n = z("div", "end_title_or", {
3409
3409
  fontSize: "1.25rem",
3410
3410
  fontWeight: "500"
3411
- }, "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.
3411
+ }, "Thank you! 👍"), i = z("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.
3412
3412
 
3413
- We appreciate your time and valuable input.`), r = U("div", "end_button_or", pn, "Submitting Feedback"), o = oo();
3413
+ We appreciate your time and valuable input.`), r = z("div", "end_button_or", pn, "Submitting Feedback"), o = oo();
3414
3414
  r.appendChild(o), (h = this.test) != null && h.reqMic || (c = this.test) != null && c.reqCamera ? this.userRecorder.sendToAPI().then(() => {
3415
3415
  r.removeChild(o), r.textContent = "End Session", e = !1;
3416
- }).catch((u) => {
3417
- console.error(u), r.removeChild(o), r.textContent = "End Session", e = !1;
3416
+ }).catch((d) => {
3417
+ console.error(d), r.removeChild(o), r.textContent = "End Session", e = !1;
3418
3418
  }) : (r.removeChild(o), r.textContent = "End Session", e = !1), this.taskSection && this.container.removeChild(this.taskSection), this.descriptionSection && this.container.removeChild(this.descriptionSection), this.stopButton && this.stopButtonContainer && this.container.removeChild(this.stopButtonContainer), r.onclick = () => {
3419
3419
  e || (window.close(), document.body.removeChild(this.bg));
3420
3420
  }, s.append(n, i, r), this.endSection = s, this.container.append(s);
@@ -3768,20 +3768,20 @@ class Ps {
3768
3768
  let c = s;
3769
3769
  if (i !== void 0) {
3770
3770
  if (this.app.sanitizer.isHidden(e)) {
3771
- const u = c.clientWidth, p = c.clientHeight;
3772
- c = s.cloneNode(), c.style.width = `${u}px`, c.style.height = `${p}px`;
3771
+ const d = c.clientWidth, p = c.clientHeight;
3772
+ c = s.cloneNode(), c.style.width = `${d}px`, c.style.height = `${p}px`;
3773
3773
  }
3774
3774
  this.app.send(hr(e, i, a, c.tagName, Ts(s)));
3775
3775
  }
3776
- for (let u = 0; u < c.attributes.length; u++) {
3777
- const p = c.attributes[u];
3776
+ for (let d = 0; d < c.attributes.length; d++) {
3777
+ const p = c.attributes[d];
3778
3778
  this.sendNodeAttribute(e, c, p.nodeName, p.value);
3779
3779
  }
3780
3780
  } else
3781
- Is(s) && (this.app.send(dr(e, i, a)), this.sendNodeData(e, n, s.data));
3781
+ Is(s) && (this.app.send(ur(e, i, a)), this.sendNodeData(e, n, s.data));
3782
3782
  return !0;
3783
3783
  }
3784
- o === we.Removed && i !== void 0 && this.app.send(ur(e, i, a));
3784
+ o === we.Removed && i !== void 0 && this.app.send(dr(e, i, a));
3785
3785
  const h = this.attributesMap.get(e);
3786
3786
  if (h !== void 0) {
3787
3787
  if (!Ee(s))
@@ -4102,7 +4102,7 @@ function as() {
4102
4102
  const t = (/* @__PURE__ */ new Date()).getTimezoneOffset() * -1, e = t >= 0 ? "+" : "-", s = Math.floor(Math.abs(t) / 60), n = Math.abs(t) % 60;
4103
4103
  return `UTC${e}${String(s).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
4104
4104
  }
4105
- const Io = (t) => new Promise((e) => setTimeout(e, t)), de = {
4105
+ const Io = (t) => new Promise((e) => setTimeout(e, t)), ue = {
4106
4106
  // ask if there are any tabs alive
4107
4107
  ask: "never-gonna-give-you-up",
4108
4108
  // response from another tab
@@ -4124,12 +4124,12 @@ let Co = class {
4124
4124
  (a = this.canvasRecorder) == null || a.restartTracking();
4125
4125
  }, this.flushBuffer = async (a) => new Promise((h) => {
4126
4126
  let c = !1;
4127
- const u = [a.shift()];
4127
+ const d = [a.shift()];
4128
4128
  for (; !c; ) {
4129
4129
  const p = a[0];
4130
- !p || p[0] === 0 ? c = !0 : u.push(a.shift());
4130
+ !p || p[0] === 0 ? c = !0 : d.push(a.shift());
4131
4131
  }
4132
- this.postToWorker(u), h(null);
4132
+ this.postToWorker(d), h(null);
4133
4133
  }), this.onUxtCb = [], this.contextId = Math.random().toString(36).slice(2), this.projectKey = e, Object.keys(n).findIndex((a) => ["fixedCanvasScaling", "disableCanvas"].includes(a)) !== -1 && (console.warn('Openreplay: canvas options are moving to separate key "canvas" in next update. Please update your configuration.'), n = {
4134
4134
  ...n,
4135
4135
  canvas: {
@@ -4176,23 +4176,23 @@ let Co = class {
4176
4176
  const a = location.hostname.split(".").slice(-2).join("_");
4177
4177
  this.bc = new BroadcastChannel(`rick_${a}`);
4178
4178
  }
4179
- this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new So(this, n), this.nodes = new mo(this.options.node_id), this.observer = new yo(this, n), this.ticker = new Eo(this), this.ticker.attach(() => this.commit()), this.debug = new go(this.options.__debug__), this.session = new xo(this, this.options), this.attributeSender = new Ji(this, !!this.options.disableStringDict), this.featureFlags = new Qi(this), this.tagWatcher = new zr(this.sessionStorage, this.debug.error, (a) => {
4179
+ this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new So(this, n), this.nodes = new mo(this.options.node_id), this.observer = new yo(this, n), this.ticker = new Eo(this), this.ticker.attach(() => this.commit()), this.debug = new go(this.options.__debug__), this.session = new xo(this, this.options), this.attributeSender = new Ji(this, !!this.options.disableStringDict), this.featureFlags = new Qi(this), this.tagWatcher = new Ur(this.sessionStorage, this.debug.error, (a) => {
4180
4180
  this.send(Pr(a));
4181
4181
  }), this.session.attachUpdateCallback(({ userID: a, metadata: h }) => {
4182
- a != null && this.send(kr(a)), h != null && Object.entries(h).forEach(([c, u]) => this.send(rn(c, u)));
4182
+ a != null && this.send(kr(a)), h != null && Object.entries(h).forEach(([c, d]) => this.send(rn(c, d)));
4183
4183
  }), s != null && this.session.applySessionHash(s), this.initWorker();
4184
4184
  const l = this.session.getTabId();
4185
4185
  if (this.insideIframe) {
4186
4186
  const a = (c) => {
4187
- const { data: u } = c;
4188
- u.line === de.iframeId && (this.rootId = u.id, this.session.setSessionToken(u.token), this.frameOderNumber = u.frameOrderNumber, this.debug.log("starting iframe tracking", u), this.allowAppStart());
4187
+ const { data: d } = c;
4188
+ d.line === ue.iframeId && (this.rootId = d.id, this.session.setSessionToken(d.token), this.frameOderNumber = d.frameOrderNumber, this.debug.log("starting iframe tracking", d), this.allowAppStart());
4189
4189
  };
4190
4190
  window.addEventListener("message", a), this.attachStopCallback(() => {
4191
4191
  window.removeEventListener("message", a);
4192
4192
  });
4193
4193
  const h = this.initialHostName;
4194
4194
  window.parent.postMessage({
4195
- line: de.iframeSignal,
4195
+ line: ue.iframeSignal,
4196
4196
  source: l,
4197
4197
  context: this.contextId,
4198
4198
  domain: h
@@ -4200,9 +4200,9 @@ let Co = class {
4200
4200
  } else {
4201
4201
  let a = 0;
4202
4202
  const h = (c) => {
4203
- const { data: u } = c;
4204
- if (u.line === de.iframeSignal) {
4205
- const p = u.domain, v = Array.from(document.querySelectorAll("iframe"));
4203
+ const { data: d } = c;
4204
+ if (d.line === ue.iframeSignal) {
4205
+ const p = d.domain, v = Array.from(document.querySelectorAll("iframe"));
4206
4206
  this.pageFrames = v, (async () => {
4207
4207
  let y = 0;
4208
4208
  for (; y < 10; ) {
@@ -4212,7 +4212,7 @@ let Co = class {
4212
4212
  var A;
4213
4213
  a++;
4214
4214
  const F = this.session.getSessionToken(), P = {
4215
- line: de.iframeId,
4215
+ line: ue.iframeId,
4216
4216
  context: this.contextId,
4217
4217
  domain: p,
4218
4218
  id: E,
@@ -4227,8 +4227,8 @@ let Co = class {
4227
4227
  }
4228
4228
  })();
4229
4229
  }
4230
- if (u.line === de.iframeBatch) {
4231
- const v = u.messages.map((S) => {
4230
+ if (d.line === ue.iframeBatch) {
4231
+ const v = d.messages.map((S) => {
4232
4232
  if (S[0] === 20) {
4233
4233
  let y = S;
4234
4234
  return this.pageFrames.forEach((E) => {
@@ -4265,25 +4265,25 @@ let Co = class {
4265
4265
  });
4266
4266
  }
4267
4267
  this.bc !== null && (this.bc.postMessage({
4268
- line: de.ask,
4268
+ line: ue.ask,
4269
4269
  source: l,
4270
4270
  context: this.contextId
4271
4271
  }), this.startTimeout = setTimeout(() => {
4272
4272
  this.allowAppStart();
4273
4273
  }, 500), this.bc.onmessage = (a) => {
4274
4274
  if (a.data.context !== this.contextId) {
4275
- if (a.data.line === de.resp) {
4275
+ if (a.data.line === ue.resp) {
4276
4276
  const h = a.data.token;
4277
4277
  this.session.setSessionToken(h), this.allowAppStart();
4278
4278
  }
4279
- if (a.data.line === de.reg) {
4279
+ if (a.data.line === ue.reg) {
4280
4280
  const h = a.data.token;
4281
4281
  this.session.regenerateTabId(), this.session.setSessionToken(h), this.allowAppStart();
4282
4282
  }
4283
- if (a.data.line === de.ask) {
4283
+ if (a.data.line === ue.ask) {
4284
4284
  const h = this.session.getSessionToken();
4285
4285
  h && this.bc && this.bc.postMessage({
4286
- line: a.data.source === l ? de.reg : de.resp,
4286
+ line: a.data.source === l ? ue.reg : ue.resp,
4287
4287
  token: h,
4288
4288
  source: l,
4289
4289
  context: this.contextId
@@ -4362,7 +4362,7 @@ let Co = class {
4362
4362
  if (!(this.worker === void 0 || !this.messages.length)) {
4363
4363
  if (this.insideIframe) {
4364
4364
  window.parent.postMessage({
4365
- line: de.iframeBatch,
4365
+ line: ue.iframeBatch,
4366
4366
  messages: this.messages,
4367
4367
  domain: this.initialHostName
4368
4368
  }, "*"), this.commitCallbacks.forEach((e) => e(this.messages)), this.messages.length = 0;
@@ -4511,7 +4511,7 @@ let Co = class {
4511
4511
  this.orderNumber += 1, es(), this.coldStartTs = ge(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(Fe(this.timestamp())), this.bufferedMessages1.push(Ae(this.session.getTabId()))) : (this.bufferedMessages2.length = 0, this.bufferedMessages2.push(Fe(this.timestamp())), this.bufferedMessages2.push(Ae(this.session.getTabId()))), this.stop(!1), this.activityState = Q.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
4512
4512
  userID: e.userID,
4513
4513
  metadata: e.metadata
4514
- }), i || (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(ut(this.session.getTabId()))), this.observer.observe(), this.ticker.start();
4514
+ }), i || (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(dt(this.session.getTabId()))), this.observer.observe(), this.ticker.start();
4515
4515
  };
4516
4516
  this.coldInterval = setInterval(() => {
4517
4517
  r();
@@ -4558,8 +4558,8 @@ let Co = class {
4558
4558
  userOS: a,
4559
4559
  userState: h
4560
4560
  });
4561
- const u = { sessionToken: n, userUUID: "", sessionID: "" };
4562
- this.startCallbacks.forEach((S) => S(u)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(c, n)), await this.featureFlags.reloadFlags(n), await this.tagWatcher.fetchTags(this.options.ingestPoint, n), (v = this.conditionsManager) == null || v.processFlags(this.featureFlags.flags);
4561
+ const d = { sessionToken: n, userUUID: "", sessionID: "" };
4562
+ this.startCallbacks.forEach((S) => S(d)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(c, n)), await this.featureFlags.reloadFlags(n), await this.tagWatcher.fetchTags(this.options.ingestPoint, n), (v = this.conditionsManager) == null || v.processFlags(this.featureFlags.flags);
4563
4563
  }
4564
4564
  /**
4565
4565
  * Starts offline session recording
@@ -4580,7 +4580,7 @@ let Co = class {
4580
4580
  metadata: e.metadata
4581
4581
  });
4582
4582
  const r = { sessionToken: "", userUUID: "", sessionID: "" };
4583
- return this.startCallbacks.forEach((o) => o(r)), n || this.send(ut(this.session.getTabId())), this.observer.observe(), this.ticker.start(), {
4583
+ return this.startCallbacks.forEach((o) => o(r)), n || this.send(dt(this.session.getTabId())), this.observer.observe(), this.ticker.start(), {
4584
4584
  saveBuffer: this.saveBuffer,
4585
4585
  getBuffer: this.getBuffer,
4586
4586
  setBuffer: this.setBuffer
@@ -4645,12 +4645,12 @@ let Co = class {
4645
4645
  jsHeapSizeLimit: ns,
4646
4646
  timezone: as()
4647
4647
  })
4648
- }), { token: n, userBrowser: i, userCity: r, userCountry: o, userDevice: l, userOS: a, userState: h, beaconSizeLimit: c, projectID: u } = await s.json();
4648
+ }), { token: n, userBrowser: i, userCity: r, userCountry: o, userDevice: l, userOS: a, userState: h, beaconSizeLimit: c, projectID: d } = await s.json();
4649
4649
  for ((v = this.worker) == null || v.postMessage({
4650
4650
  type: "auth",
4651
4651
  token: n,
4652
4652
  beaconSizeLimit: c
4653
- }), this.session.assign({ projectID: u }), this.session.setUserInfo({
4653
+ }), this.session.assign({ projectID: d }), this.session.setUserInfo({
4654
4654
  userBrowser: i,
4655
4655
  userCity: r,
4656
4656
  userCountry: o,
@@ -4720,7 +4720,7 @@ let Co = class {
4720
4720
  const {
4721
4721
  token: h,
4722
4722
  userUUID: c,
4723
- projectID: u,
4723
+ projectID: d,
4724
4724
  beaconSizeLimit: p,
4725
4725
  compressionThreshold: v,
4726
4726
  // how big the batch should be before we decide to compress it
@@ -4755,12 +4755,12 @@ let Co = class {
4755
4755
  }), this.session.assign({
4756
4756
  sessionID: y,
4757
4757
  timestamp: E || r,
4758
- projectID: u
4758
+ projectID: d
4759
4759
  }), B ? (this.socketMode = !0, this.worker.postMessage("stop")) : this.worker.postMessage({
4760
4760
  type: "auth",
4761
4761
  token: h,
4762
4762
  beaconSizeLimit: p
4763
- }), !l && h === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(ut(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C, L]) => this.send(rn(C, L))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = v;
4763
+ }), !l && h === 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(([C, L]) => this.send(rn(C, L))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = v;
4764
4764
  const G = { sessionToken: h, userUUID: c, sessionID: y };
4765
4765
  if (this.startCallbacks.forEach((C) => C(G)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, h), this.activityState = Q.Active, D && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new uo(this, {
4766
4766
  fps: T,
@@ -4940,17 +4940,17 @@ function Fo(t, e) {
4940
4940
  t.attachStartCallback(r), t.ticker.attach(r, 33, !1);
4941
4941
  const o = (a, h) => {
4942
4942
  const c = {
4943
- apply: function(u, p, v) {
4944
- Reflect.apply(u, h, v), i = i + 1, !(i > s.consoleThrottling) && n(u.name, v);
4943
+ apply: function(d, p, v) {
4944
+ Reflect.apply(d, h, v), i = i + 1, !(i > s.consoleThrottling) && n(d.name, v);
4945
4945
  }
4946
4946
  };
4947
- s.consoleMethods.forEach((u) => {
4948
- if (En.indexOf(u) === -1) {
4949
- t.debug.error(`OpenReplay: unsupported console method "${u}"`);
4947
+ s.consoleMethods.forEach((d) => {
4948
+ if (En.indexOf(d) === -1) {
4949
+ t.debug.error(`OpenReplay: unsupported console method "${d}"`);
4950
4950
  return;
4951
4951
  }
4952
- const p = h.console[u];
4953
- a[u] = new Proxy(p, c);
4952
+ const p = h.console[d];
4953
+ a[d] = new Proxy(p, c);
4954
4954
  });
4955
4955
  }, l = t.safe((a) => o(a.console, a));
4956
4956
  l(window), t.observer.attachContextCallback(l);
@@ -4973,12 +4973,12 @@ function Ao() {
4973
4973
  };
4974
4974
  }
4975
4975
  var r = ["isConstructor", "isEval", "isNative", "isToplevel"], o = ["columnNumber", "lineNumber"], l = ["fileName", "functionName", "source"], a = ["args"], h = ["evalOrigin"], c = r.concat(o, l, a, h);
4976
- function u(y) {
4976
+ function d(y) {
4977
4977
  if (y)
4978
4978
  for (var E = 0; E < c.length; E++)
4979
4979
  y[c[E]] !== void 0 && this["set" + n(c[E])](y[c[E]]);
4980
4980
  }
4981
- u.prototype = {
4981
+ d.prototype = {
4982
4982
  getArgs: function() {
4983
4983
  return this.args;
4984
4984
  },
@@ -4991,10 +4991,10 @@ function Ao() {
4991
4991
  return this.evalOrigin;
4992
4992
  },
4993
4993
  setEvalOrigin: function(y) {
4994
- if (y instanceof u)
4994
+ if (y instanceof d)
4995
4995
  this.evalOrigin = y;
4996
4996
  else if (y instanceof Object)
4997
- this.evalOrigin = new u(y);
4997
+ this.evalOrigin = new d(y);
4998
4998
  else
4999
4999
  throw new TypeError("Eval Origin must be an Object or StackFrame");
5000
5000
  },
@@ -5002,11 +5002,11 @@ function Ao() {
5002
5002
  var y = this.getFileName() || "", E = this.getLineNumber() || "", F = this.getColumnNumber() || "", P = this.getFunctionName() || "";
5003
5003
  return this.getIsEval() ? y ? "[eval] (" + y + ":" + E + ":" + F + ")" : "[eval]:" + E + ":" + F : P ? P + " (" + y + ":" + E + ":" + F + ")" : y + ":" + E + ":" + F;
5004
5004
  }
5005
- }, u.fromString = function(E) {
5005
+ }, d.fromString = function(E) {
5006
5006
  var F = E.indexOf("("), P = E.lastIndexOf(")"), A = E.substring(0, F), k = E.substring(F + 1, P).split(","), N = E.substring(P + 1);
5007
5007
  if (N.indexOf("@") === 0)
5008
5008
  var O = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(N, ""), D = O[1], I = O[2], T = O[3];
5009
- return new u({
5009
+ return new d({
5010
5010
  functionName: A,
5011
5011
  args: k || void 0,
5012
5012
  fileName: D,
@@ -5015,13 +5015,13 @@ function Ao() {
5015
5015
  });
5016
5016
  };
5017
5017
  for (var p = 0; p < r.length; p++)
5018
- u.prototype["get" + n(r[p])] = i(r[p]), u.prototype["set" + n(r[p])] = /* @__PURE__ */ function(y) {
5018
+ d.prototype["get" + n(r[p])] = i(r[p]), d.prototype["set" + n(r[p])] = /* @__PURE__ */ function(y) {
5019
5019
  return function(E) {
5020
5020
  this[y] = !!E;
5021
5021
  };
5022
5022
  }(r[p]);
5023
5023
  for (var v = 0; v < o.length; v++)
5024
- u.prototype["get" + n(o[v])] = i(o[v]), u.prototype["set" + n(o[v])] = /* @__PURE__ */ function(y) {
5024
+ d.prototype["get" + n(o[v])] = i(o[v]), d.prototype["set" + n(o[v])] = /* @__PURE__ */ function(y) {
5025
5025
  return function(E) {
5026
5026
  if (!s(E))
5027
5027
  throw new TypeError(y + " must be a Number");
@@ -5029,12 +5029,12 @@ function Ao() {
5029
5029
  };
5030
5030
  }(o[v]);
5031
5031
  for (var S = 0; S < l.length; S++)
5032
- u.prototype["get" + n(l[S])] = i(l[S]), u.prototype["set" + n(l[S])] = /* @__PURE__ */ function(y) {
5032
+ d.prototype["get" + n(l[S])] = i(l[S]), d.prototype["set" + n(l[S])] = /* @__PURE__ */ function(y) {
5033
5033
  return function(E) {
5034
5034
  this[y] = String(E);
5035
5035
  };
5036
5036
  }(l[S]);
5037
- return u;
5037
+ return d;
5038
5038
  });
5039
5039
  }(cs)), cs.exports;
5040
5040
  }
@@ -5073,9 +5073,9 @@ function Ao() {
5073
5073
  }, this);
5074
5074
  return h.map(function(c) {
5075
5075
  c.indexOf("(eval ") > -1 && (c = c.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
5076
- var u = c.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), p = u.match(/ (\(.+\)$)/);
5077
- u = p ? u.replace(p[0], "") : u;
5078
- var v = this.extractLocation(p ? p[1] : u), S = p && u || void 0, y = ["eval", "<anonymous>"].indexOf(v[0]) > -1 ? void 0 : v[0];
5076
+ var d = c.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), p = d.match(/ (\(.+\)$)/);
5077
+ d = p ? d.replace(p[0], "") : d;
5078
+ var v = this.extractLocation(p ? p[1] : d), S = p && d || void 0, y = ["eval", "<anonymous>"].indexOf(v[0]) > -1 ? void 0 : v[0];
5079
5079
  return new n({
5080
5080
  functionName: S,
5081
5081
  fileName: y,
@@ -5095,7 +5095,7 @@ function Ao() {
5095
5095
  return new n({
5096
5096
  functionName: c
5097
5097
  });
5098
- var u = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = c.match(u), v = p && p[1] ? p[1] : void 0, S = this.extractLocation(c.replace(u, ""));
5098
+ var d = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = c.match(d), v = p && p[1] ? p[1] : void 0, S = this.extractLocation(c.replace(d, ""));
5099
5099
  return new n({
5100
5100
  functionName: v,
5101
5101
  fileName: S[0],
@@ -5113,21 +5113,21 @@ function Ao() {
5113
5113
  },
5114
5114
  parseOpera9: function(a) {
5115
5115
  for (var h = /Line (\d+).*script (?:in )?(\S+)/i, c = a.message.split(`
5116
- `), u = [], p = 2, v = c.length; p < v; p += 2) {
5116
+ `), d = [], p = 2, v = c.length; p < v; p += 2) {
5117
5117
  var S = h.exec(c[p]);
5118
- S && u.push(new n({
5118
+ S && d.push(new n({
5119
5119
  fileName: S[2],
5120
5120
  lineNumber: S[1],
5121
5121
  source: c[p]
5122
5122
  }));
5123
5123
  }
5124
- return u;
5124
+ return d;
5125
5125
  },
5126
5126
  parseOpera10: function(a) {
5127
5127
  for (var h = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, c = a.stacktrace.split(`
5128
- `), u = [], p = 0, v = c.length; p < v; p += 2) {
5128
+ `), d = [], p = 0, v = c.length; p < v; p += 2) {
5129
5129
  var S = h.exec(c[p]);
5130
- S && u.push(
5130
+ S && d.push(
5131
5131
  new n({
5132
5132
  functionName: S[3] || void 0,
5133
5133
  fileName: S[2],
@@ -5136,7 +5136,7 @@ function Ao() {
5136
5136
  })
5137
5137
  );
5138
5138
  }
5139
- return u;
5139
+ return d;
5140
5140
  },
5141
5141
  // Opera 10.65+ Error.stack very similar to FF/Safari
5142
5142
  parseOpera11: function(a) {
@@ -5145,7 +5145,7 @@ function Ao() {
5145
5145
  return !!c.match(i) && !c.match(/^Error created at/);
5146
5146
  }, this);
5147
5147
  return h.map(function(c) {
5148
- var u = c.split("@"), p = this.extractLocation(u.pop()), v = u.shift() || "", S = v.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, y;
5148
+ var d = c.split("@"), p = this.extractLocation(d.pop()), v = d.shift() || "", S = v.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, y;
5149
5149
  v.match(/\(([^)]*)\)/) && (y = v.replace(/^[^(]+\(([^)]*)\)$/, "$1"));
5150
5150
  var E = y === void 0 || y === "[arguments not available]" ? void 0 : y.split(",");
5151
5151
  return new n({
@@ -5235,13 +5235,13 @@ function jo(t) {
5235
5235
  const { srcset: h } = a;
5236
5236
  if (!h)
5237
5237
  return;
5238
- const c = h.split(h.match(/,\s+/) ? /,\s+/ : ",").map((u) => Cn(u)).join(", ");
5238
+ const c = h.split(h.match(/,\s+/) ? /,\s+/ : ",").map((d) => Cn(d)).join(", ");
5239
5239
  t.attributeSender.sendSetAttribute(l, "srcset", c);
5240
5240
  }, n = function(l, a) {
5241
5241
  a.src.length > er && e(l, a), t.send(vs(l, "src", a.src, t.getBaseHref()));
5242
5242
  }, i = t.safe(function(l) {
5243
5243
  const a = Cn(l.src || "");
5244
- ri(a) && t.send(di(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
5244
+ ri(a) && t.send(ui(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
5245
5245
  }), r = t.safe(function(l) {
5246
5246
  const a = t.nodes.getID(l);
5247
5247
  a !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !Bo(l.src) ? i(l) : t.sanitizer.isHidden(a) || t.sanitizer.isObscured(a) ? e(a, l) : (n(a, l), s(a, l)));
@@ -5260,7 +5260,7 @@ function jo(t) {
5260
5260
  Z(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"] }));
5261
5261
  });
5262
5262
  }
5263
- const Uo = [
5263
+ const zo = [
5264
5264
  "text",
5265
5265
  "password",
5266
5266
  "email",
@@ -5271,8 +5271,8 @@ const Uo = [
5271
5271
  "tel",
5272
5272
  "time"
5273
5273
  ];
5274
- function zo(t) {
5275
- return Z(t, "textarea") ? !0 : Z(t, "input") ? Uo.includes(t.type) : !1;
5274
+ function Uo(t) {
5275
+ return Z(t, "textarea") ? !0 : Z(t, "input") ? zo.includes(t.type) : !1;
5276
5276
  }
5277
5277
  function Ho(t) {
5278
5278
  if (!Z(t, "input"))
@@ -5308,7 +5308,7 @@ function vi(t) {
5308
5308
  }
5309
5309
  return ii(e).slice(0, 100);
5310
5310
  }
5311
- const Ue = {
5311
+ const ze = {
5312
5312
  Plain: 0,
5313
5313
  Obscured: 1,
5314
5314
  Hidden: 2
@@ -5317,78 +5317,78 @@ function Wo(t, e) {
5317
5317
  const s = Object.assign({
5318
5318
  obscureInputNumbers: !0,
5319
5319
  obscureInputEmails: !0,
5320
- defaultInputMode: Ue.Obscured,
5320
+ defaultInputMode: ze.Obscured,
5321
5321
  obscureInputDates: !1
5322
5322
  }, e);
5323
- function n(c, u) {
5324
- let p = u.value, v = s.defaultInputMode;
5325
- u.type === "password" || t.sanitizer.isHidden(c) ? v = Ue.Hidden : (t.sanitizer.isObscured(c) || v === Ue.Plain && (s.obscureInputNumbers && u.type !== "date" && /\d\d\d\d/.test(p) || s.obscureInputDates && u.type === "date" || s.obscureInputEmails && (u.type === "email" || ~p.indexOf("@")))) && (v = Ue.Obscured);
5323
+ function n(c, d) {
5324
+ let p = d.value, v = s.defaultInputMode;
5325
+ d.type === "password" || t.sanitizer.isHidden(c) ? v = ze.Hidden : (t.sanitizer.isObscured(c) || v === ze.Plain && (s.obscureInputNumbers && d.type !== "date" && /\d\d\d\d/.test(p) || s.obscureInputDates && d.type === "date" || s.obscureInputEmails && (d.type === "email" || ~p.indexOf("@")))) && (v = ze.Obscured);
5326
5326
  let S = 0;
5327
5327
  switch (v) {
5328
- case Ue.Hidden:
5328
+ case ze.Hidden:
5329
5329
  S = -1, p = "";
5330
5330
  break;
5331
- case Ue.Obscured:
5331
+ case ze.Obscured:
5332
5332
  S = p.length, p = "";
5333
5333
  break;
5334
5334
  }
5335
5335
  return { value: p, mask: S };
5336
5336
  }
5337
- function i(c, u) {
5338
- const { value: p, mask: v } = n(c, u);
5337
+ function i(c, d) {
5338
+ const { value: p, mask: v } = n(c, d);
5339
5339
  t.send(mr(c, p, v));
5340
5340
  }
5341
5341
  const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
5342
5342
  t.attachStopCallback(() => {
5343
5343
  r.clear(), o.clear();
5344
5344
  });
5345
- function l(c, u) {
5346
- r.get(c) !== u.value && (r.set(c, u.value), i(c, u));
5345
+ function l(c, d) {
5346
+ r.get(c) !== d.value && (r.set(c, d.value), i(c, d));
5347
5347
  }
5348
- function a(c, u) {
5349
- o.get(c) !== u && (o.set(c, u), t.send(br(c, u)));
5348
+ function a(c, d) {
5349
+ o.get(c) !== d && (o.set(c, d), t.send(br(c, d)));
5350
5350
  }
5351
5351
  t.ticker.attach(() => {
5352
- r.forEach((c, u) => {
5353
- const p = t.nodes.getNode(u);
5352
+ r.forEach((c, d) => {
5353
+ const p = t.nodes.getNode(d);
5354
5354
  if (!p)
5355
- return r.delete(u);
5356
- l(u, p);
5357
- }), o.forEach((c, u) => {
5358
- const p = t.nodes.getNode(u);
5355
+ return r.delete(d);
5356
+ l(d, p);
5357
+ }), o.forEach((c, d) => {
5358
+ const p = t.nodes.getNode(d);
5359
5359
  if (!p)
5360
- return o.delete(u);
5361
- a(u, p.checked);
5360
+ return o.delete(d);
5361
+ a(d, p.checked);
5362
5362
  });
5363
5363
  }, 3);
5364
- function h(c, u, p, v) {
5365
- const { value: S, mask: y } = n(c, u), E = vi(u);
5364
+ function h(c, d, p, v) {
5365
+ const { value: S, mask: y } = n(c, d), E = vi(d);
5366
5366
  t.send(Dr(c, S, y !== 0, E, p, v));
5367
5367
  }
5368
5368
  t.nodes.attachNodeCallback(t.safe((c) => {
5369
- const u = t.nodes.getID(c);
5370
- if (u !== void 0) {
5371
- if (Z(c, "select") && (i(u, c), t.nodes.attachNodeListener(c, "change", () => i(u, c))), zo(c)) {
5372
- l(u, c);
5369
+ const d = t.nodes.getID(c);
5370
+ if (d !== void 0) {
5371
+ if (Z(c, "select") && (i(d, c), t.nodes.attachNodeListener(c, "change", () => i(d, c))), Uo(c)) {
5372
+ l(d, c);
5373
5373
  let p = 0, v = 0, S = 0;
5374
5374
  const y = () => {
5375
5375
  p = ge();
5376
5376
  }, E = () => {
5377
5377
  v === 0 && p !== 0 && (v = ge() - p);
5378
5378
  }, F = () => {
5379
- p !== 0 && (S = ge() - p), h(u, c, v, S), v = 0, S = 0, p = 0;
5379
+ p !== 0 && (S = ge() - p), h(d, c, v, S), v = 0, S = 0, p = 0;
5380
5380
  };
5381
5381
  t.nodes.attachNodeListener(c, "focus", y), t.nodes.attachNodeListener(c, "input", E), t.nodes.attachNodeListener(c, "change", F);
5382
5382
  return;
5383
5383
  }
5384
5384
  if (Ho(c)) {
5385
- a(u, c.checked), t.nodes.attachNodeListener(c, "change", () => a(u, c.checked));
5385
+ a(d, c.checked), t.nodes.attachNodeListener(c, "change", () => a(d, c.checked));
5386
5386
  return;
5387
5387
  }
5388
5388
  }
5389
5389
  }));
5390
5390
  }
5391
- let ue, js, yi;
5391
+ let de, js, yi;
5392
5392
  function qo(t, e) {
5393
5393
  if (yi = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
5394
5394
  throw new Error("Can't generate CSS selector for non-element node type.");
@@ -5406,7 +5406,7 @@ function qo(t, e) {
5406
5406
  maxNumberOfTries: 1e4,
5407
5407
  timeoutMs: void 0
5408
5408
  };
5409
- ue = { ...s, ...e }, js = Vo(ue.root, s);
5409
+ de = { ...s, ...e }, js = Vo(de.root, s);
5410
5410
  let n = ot(t, "all", () => ot(t, "two", () => ot(t, "one", () => ot(t, "none"))));
5411
5411
  if (n) {
5412
5412
  const i = xi(ki(n, t));
@@ -5421,7 +5421,7 @@ function ot(t, e, s) {
5421
5421
  let n = null, i = [], r = t, o = 0;
5422
5422
  for (; r; ) {
5423
5423
  const l = (/* @__PURE__ */ new Date()).getTime() - yi.getTime();
5424
- if (ue.timeoutMs !== void 0 && l > ue.timeoutMs)
5424
+ if (de.timeoutMs !== void 0 && l > de.timeoutMs)
5425
5425
  throw new Error(`Timeout: Can't find a unique selector after ${l}ms`);
5426
5426
  let a = ct(Go(r)) || ct(...Ko(r)) || ct(...Jo(r)) || ct(Xo(r)) || [On()];
5427
5427
  const h = Yo(r);
@@ -5436,7 +5436,7 @@ function ot(t, e, s) {
5436
5436
  e == "none" && (a = [On()], h && (a = [at(a[0], h)]));
5437
5437
  for (let c of a)
5438
5438
  c.level = o;
5439
- if (i.push(a), i.length >= ue.seedMinLength && (n = _n(i, s), n))
5439
+ if (i.push(a), i.length >= de.seedMinLength && (n = _n(i, s), n))
5440
5440
  break;
5441
5441
  r = r.parentElement, o++;
5442
5442
  }
@@ -5444,7 +5444,7 @@ function ot(t, e, s) {
5444
5444
  }
5445
5445
  function _n(t, e) {
5446
5446
  const s = xi(Si(t));
5447
- if (s.length > ue.threshold)
5447
+ if (s.length > de.threshold)
5448
5448
  return e ? e() : null;
5449
5449
  for (let n of s)
5450
5450
  if (wi(n))
@@ -5475,26 +5475,26 @@ function wi(t) {
5475
5475
  }
5476
5476
  function Go(t) {
5477
5477
  const e = t.getAttribute("id");
5478
- return e && ue.idName(e) ? {
5478
+ return e && de.idName(e) ? {
5479
5479
  name: "#" + CSS.escape(e),
5480
5480
  penalty: 0
5481
5481
  } : null;
5482
5482
  }
5483
5483
  function Ko(t) {
5484
- return Array.from(t.attributes).filter((s) => ue.attr(s.name, s.value)).map((s) => ({
5484
+ return Array.from(t.attributes).filter((s) => de.attr(s.name, s.value)).map((s) => ({
5485
5485
  name: `[${CSS.escape(s.name)}="${CSS.escape(s.value)}"]`,
5486
5486
  penalty: 0.5
5487
5487
  }));
5488
5488
  }
5489
5489
  function Jo(t) {
5490
- return Array.from(t.classList).filter(ue.className).map((s) => ({
5490
+ return Array.from(t.classList).filter(de.className).map((s) => ({
5491
5491
  name: "." + CSS.escape(s),
5492
5492
  penalty: 1
5493
5493
  }));
5494
5494
  }
5495
5495
  function Xo(t) {
5496
5496
  const e = t.tagName.toLowerCase();
5497
- return ue.tagName(e) ? {
5497
+ return de.tagName(e) ? {
5498
5498
  name: e,
5499
5499
  penalty: 2
5500
5500
  } : null;
@@ -5547,9 +5547,9 @@ function* ki(t, e, s = {
5547
5547
  counter: 0,
5548
5548
  visited: /* @__PURE__ */ new Map()
5549
5549
  }) {
5550
- if (t.length > 2 && t.length > ue.optimizedMinLength)
5550
+ if (t.length > 2 && t.length > de.optimizedMinLength)
5551
5551
  for (let n = 1; n < t.length - 1; n++) {
5552
- if (s.counter > ue.maxNumberOfTries)
5552
+ if (s.counter > de.maxNumberOfTries)
5553
5553
  return;
5554
5554
  s.counter += 1;
5555
5555
  const i = [...t];
@@ -5615,7 +5615,7 @@ function sa(t, e) {
5615
5615
  }
5616
5616
  return "";
5617
5617
  }
5618
- let i = -1, r = -1, o = !1, l = null, a = 0, h = {}, c = 0, u = 0, p = 0, v = 0, S;
5618
+ let i = -1, r = -1, o = !1, l = null, a = 0, h = {}, c = 0, d = 0, p = 0, v = 0, S;
5619
5619
  const y = 8e-3, E = 225;
5620
5620
  function F() {
5621
5621
  const k = v / E;
@@ -5645,7 +5645,7 @@ function sa(t, e) {
5645
5645
  const [T, B] = t.observer.getDocumentOffset(k);
5646
5646
  i = I.clientX + T, r = I.clientY + B, o = !0;
5647
5647
  const G = Math.sign(I.movementX);
5648
- v += Math.abs(I.movementX) + Math.abs(I.movementY), G !== u && (u = G, p++);
5648
+ v += Math.abs(I.movementX) + Math.abs(I.movementY), G !== d && (d = G, p++);
5649
5649
  }, !1), D(k, "click", (I) => {
5650
5650
  const T = Rn(I.target, k);
5651
5651
  if (!I.clientX && !I.clientY || T === null)
@@ -5682,10 +5682,10 @@ function na(t) {
5682
5682
  const l = o.substr(0, 10) === "data:image" ? 0 : t[o];
5683
5683
  if (l === void 0)
5684
5684
  continue;
5685
- const a = r.getBoundingClientRect(), h = Math.max(a.top, 0), c = Math.max(a.left, 0), u = Math.min(a.bottom, window.innerHeight || document.documentElement && document.documentElement.clientHeight || 0), p = Math.min(a.right, window.innerWidth || document.documentElement && document.documentElement.clientWidth || 0);
5686
- if (u <= h || p <= c)
5685
+ const a = r.getBoundingClientRect(), h = Math.max(a.top, 0), c = Math.max(a.left, 0), d = Math.min(a.bottom, window.innerHeight || document.documentElement && document.documentElement.clientHeight || 0), p = Math.min(a.right, window.innerWidth || document.documentElement && document.documentElement.clientWidth || 0);
5686
+ if (d <= h || p <= c)
5687
5687
  continue;
5688
- const v = (u - h) * (p - c);
5688
+ const v = (d - h) * (p - c);
5689
5689
  e.push({ time: l, area: v });
5690
5690
  }
5691
5691
  return e;
@@ -5709,17 +5709,17 @@ function ra(t, e) {
5709
5709
  return;
5710
5710
  let n = {};
5711
5711
  function i(h) {
5712
- var u;
5712
+ var d;
5713
5713
  if (h.duration < 0 || !ri(h.name) || t.isServiceURL(h.name))
5714
5714
  return;
5715
5715
  n !== null && (n[h.name] = h.startTime + h.duration);
5716
5716
  let c = !1;
5717
- (u = s.excludedResourceUrls) == null || u.forEach((p) => {
5717
+ (d = s.excludedResourceUrls) == null || d.forEach((p) => {
5718
5718
  if (h.name.startsWith(p)) {
5719
5719
  c = !0;
5720
5720
  return;
5721
5721
  }
5722
- }), !c && t.send(di(
5722
+ }), !c && t.send(ui(
5723
5723
  h.startTime + Ge(),
5724
5724
  h.duration,
5725
5725
  h.responseStart && h.startTime ? h.responseStart - h.startTime : 0,
@@ -5745,8 +5745,8 @@ function ra(t, e) {
5745
5745
  let h = !1;
5746
5746
  t.ticker.attach(() => {
5747
5747
  if (!h && ((l === 0 || a === 0) && performance.getEntriesByType("paint").forEach((c) => {
5748
- const { name: u, startTime: p } = c;
5749
- switch (u) {
5748
+ const { name: d, startTime: p } = c;
5749
+ switch (d) {
5750
5750
  case "first-paint":
5751
5751
  l = p;
5752
5752
  break;
@@ -5761,7 +5761,7 @@ function ra(t, e) {
5761
5761
  // since it is compared with the values obtained on the page load (before any possible sleep state)
5762
5762
  // deprecated though
5763
5763
  navigationStart: c,
5764
- requestStart: u,
5764
+ requestStart: d,
5765
5765
  responseStart: p,
5766
5766
  responseEnd: v,
5767
5767
  domContentLoadedEventStart: S,
@@ -5769,19 +5769,19 @@ function ra(t, e) {
5769
5769
  loadEventStart: E,
5770
5770
  loadEventEnd: F
5771
5771
  } = performance.timing;
5772
- t.send(wr(u - c || 0, p - c || 0, v - c || 0, S - c || 0, y - c || 0, E - c || 0, F - c || 0, l, a));
5772
+ t.send(wr(d - c || 0, p - c || 0, v - c || 0, S - c || 0, y - c || 0, E - c || 0, F - c || 0, l, a));
5773
5773
  }
5774
5774
  }, 30);
5775
5775
  }
5776
5776
  if (s.capturePageRenderTimings) {
5777
- let h = 0, c = 0, u = 0, p = null, v = !1;
5777
+ let h = 0, c = 0, d = 0, p = null, v = !1;
5778
5778
  t.ticker.attach(() => {
5779
5779
  if (v)
5780
5780
  return;
5781
5781
  const S = performance.now();
5782
- if (n !== null && (h = Math.max.apply(null, Object.keys(n).map((y) => n[y])), S - h > 1e3 && (p = na(n), n = null)), u !== null && (S - u > 50 && (c = S), u = S - c > 5e3 ? null : S), p !== null && u === null || S > 3e4) {
5782
+ if (n !== null && (h = Math.max.apply(null, Object.keys(n).map((y) => n[y])), S - h > 1e3 && (p = na(n), n = null)), d !== null && (S - d > 50 && (c = S), d = S - c > 5e3 ? null : S), p !== null && d === null || S > 3e4) {
5783
5783
  v = !0, n = null;
5784
- const y = p === null ? 0 : ia(a || l, p), { domContentLoadedEventEnd: E, navigationStart: F } = performance.timing, P = u === null ? Math.max(c, a, E - F || 0) : 0;
5784
+ const y = p === null ? 0 : ia(a || l, p), { domContentLoadedEventEnd: E, navigationStart: F } = performance.timing, P = d === null ? Math.max(c, a, E - F || 0) : 0;
5785
5785
  t.send(Sr(y, a > h ? a : h, P));
5786
5786
  }
5787
5787
  });
@@ -5856,19 +5856,19 @@ function la(t) {
5856
5856
  a || (a = []);
5857
5857
  const h = [], c = o.adoptedStyleSheets;
5858
5858
  if (c && Symbol.iterator in c)
5859
- for (const u of c) {
5860
- let p = e.get(u);
5859
+ for (const d of c) {
5860
+ let p = e.get(d);
5861
5861
  const v = !p;
5862
- if (p || (p = Ei(), e.set(u, p)), a.includes(p) || t.send(hi(p, l)), v) {
5863
- const S = u.cssRules;
5862
+ if (p || (p = Ei(), e.set(d, p)), a.includes(p) || t.send(hi(p, l)), v) {
5863
+ const S = d.cssRules;
5864
5864
  for (let y = 0; y < S.length; y++)
5865
5865
  t.send(ws(p, S[y].cssText, y, t.getBaseHref()));
5866
5866
  }
5867
5867
  h.push(p);
5868
5868
  }
5869
5869
  if (Symbol.iterator in a)
5870
- for (const u of a)
5871
- h.includes(u) || t.send(Fr(u, l));
5870
+ for (const d of a)
5871
+ h.includes(d) || t.send(Fr(d, l));
5872
5872
  s.set(l, h);
5873
5873
  }, 20);
5874
5874
  function i(o) {
@@ -5888,8 +5888,8 @@ function la(t) {
5888
5888
  const { replace: l, replaceSync: a } = o.CSSStyleSheet.prototype;
5889
5889
  o.CSSStyleSheet.prototype.replace = function(h) {
5890
5890
  return l.call(this, h).then((c) => {
5891
- const u = e.get(this);
5892
- return u && t.send(cn(u, h, t.getBaseHref())), c;
5891
+ const d = e.get(this);
5892
+ return d && t.send(cn(d, h, t.getBaseHref())), c;
5893
5893
  });
5894
5894
  }, o.CSSStyleSheet.prototype.replaceSync = function(h) {
5895
5895
  const c = e.get(this);
@@ -5937,8 +5937,8 @@ function ha(t) {
5937
5937
  }, i.CSSStyleSheet.prototype.deleteRule = function(h) {
5938
5938
  return e(this, h), o.call(this, h);
5939
5939
  }, i.CSSGroupingRule.prototype.insertRule = function(h, c = 0) {
5940
- const u = l.call(this, h, c);
5941
- return s(this), u;
5940
+ const d = l.call(this, h, c);
5941
+ return s(this), d;
5942
5942
  }, i.CSSGroupingRule.prototype.deleteRule = function(h = 0) {
5943
5943
  const c = a.call(this, h);
5944
5944
  return s(this), c;
@@ -5957,7 +5957,7 @@ function ha(t) {
5957
5957
  e(o, h, a[h].cssText);
5958
5958
  });
5959
5959
  }
5960
- function da(t) {
5960
+ function ua(t) {
5961
5961
  function e(n) {
5962
5962
  const i = t.nodes.getID(n);
5963
5963
  i !== void 0 && t.send(an(i));
@@ -5978,7 +5978,7 @@ function da(t) {
5978
5978
  n && n !== n.ownerDocument.body && e(n);
5979
5979
  }, !0);
5980
5980
  }
5981
- function ua(t) {
5981
+ function da(t) {
5982
5982
  if (!window.FontFace)
5983
5983
  return;
5984
5984
  const e = /* @__PURE__ */ new Map(), s = (n) => {
@@ -6017,15 +6017,15 @@ function fa(t, e, s, n, i) {
6017
6017
  t.debug.log("Openreplay: attaching axios spy to instance", e);
6018
6018
  function r(p) {
6019
6019
  t.debug.log("Openreplay: capturing axios response data", p);
6020
- const { headers: v, data: S, method: y, url: E, baseURL: F } = p.config, { data: P, headers: A, status: k, response: N } = p, { data: O, headers: D, status: I } = N || {}, T = s.ignoreHeaders, B = Array.isArray(T) ? (z) => T.includes(z) : () => T;
6021
- function G(z, b) {
6022
- B(b[0]) || (z[b[0]] = b[1]);
6020
+ const { headers: v, data: S, method: y, url: E, baseURL: F } = p.config, { data: P, headers: A, status: k, response: N } = p, { data: O, headers: D, status: I } = N || {}, T = s.ignoreHeaders, B = Array.isArray(T) ? (U) => T.includes(U) : () => T;
6021
+ function G(U, b) {
6022
+ B(b[0]) || (U[b[0]] = b[1]);
6023
6023
  }
6024
6024
  let j = {}, W = {};
6025
- v.toJSON ? j = v.toJSON() : v instanceof Headers ? v.forEach((z, b) => G(j, [b, z])) : Array.isArray(v) ? v.forEach((z) => G(j, z)) : typeof v == "object" && Object.entries(v).forEach((z) => G(j, z));
6025
+ v.toJSON ? j = v.toJSON() : v instanceof Headers ? v.forEach((U, b) => G(j, [b, U])) : Array.isArray(v) ? v.forEach((U) => G(j, U)) : typeof v == "object" && Object.entries(v).forEach((U) => G(j, U));
6026
6026
  const C = D || A;
6027
- C.toJSON ? W = C.toJSON() : C instanceof Headers ? C.forEach((z, b) => G(W, [b, z])) : Array.isArray(C) ? C.forEach((z) => G(W, z)) : typeof C == "object" && Object.entries(C).forEach(([z, b]) => {
6028
- B(z) || (W[z] = b);
6027
+ C.toJSON ? W = C.toJSON() : C instanceof Headers ? C.forEach((U, b) => G(W, [b, U])) : Array.isArray(C) ? C.forEach((U) => G(W, U)) : typeof C == "object" && Object.entries(C).forEach(([U, b]) => {
6028
+ B(U) || (W[U] = b);
6029
6029
  });
6030
6030
  const L = n({
6031
6031
  url: E,
@@ -6065,12 +6065,12 @@ function fa(t, e, s, n, i) {
6065
6065
  }
6066
6066
  const c = e.interceptors.request.use(o, h, {
6067
6067
  synchronous: !0
6068
- }), u = e.interceptors.response.use(l, a, {
6068
+ }), d = e.interceptors.response.use(l, a, {
6069
6069
  synchronous: !0
6070
6070
  });
6071
6071
  t.attachStopCallback(() => {
6072
6072
  var p, v, S, y;
6073
- (v = (p = e.interceptors.request).eject) == null || v.call(p, c), (y = (S = e.interceptors.response).eject) == null || y.call(S, u);
6073
+ (v = (p = e.interceptors.request).eject) == null || v.call(p, c), (y = (S = e.interceptors.response).eject) == null || y.call(S, d);
6074
6074
  });
6075
6075
  }
6076
6076
  function pa(t) {
@@ -6083,7 +6083,7 @@ var Se;
6083
6083
  (function(t) {
6084
6084
  t[t.UNSENT = 0] = "UNSENT", t[t.OPENED = 1] = "OPENED", t[t.HEADERS_RECEIVED = 2] = "HEADERS_RECEIVED", t[t.LOADING = 3] = "LOADING", t[t.DONE = 4] = "DONE";
6085
6085
  })(Se || (Se = {}));
6086
- class Us {
6086
+ class zs {
6087
6087
  constructor(e = [], s, n) {
6088
6088
  this.ignoredHeaders = e, this.setSessionTokenHeader = s, this.sanitize = n, this.id = "", this.name = "", this.method = "", this.url = "", this.status = 0, this.statusText = "", this.cancelState = 0, this.readyState = 0, this.header = {}, this.responseType = "", this.requestHeader = {}, this.responseSize = 0, this.responseSizeText = "", this.startTime = 0, this.endTime = 0, this.duration = 0, this.getData = {}, this.requestData = null;
6089
6089
  }
@@ -6133,7 +6133,7 @@ const tt = (t, e) => {
6133
6133
  break;
6134
6134
  }
6135
6135
  return s;
6136
- }, zs = (t) => {
6136
+ }, Us = (t) => {
6137
6137
  if (!t)
6138
6138
  return null;
6139
6139
  let e;
@@ -6225,7 +6225,7 @@ class ya {
6225
6225
  if (!i || // @ts-ignore
6226
6226
  typeof i != "string" && !(i != null && i.url) || (i instanceof URL || typeof i == "string" ? this.isServiceUrl(String(i)) : this.isServiceUrl(String(i.url))))
6227
6227
  return e.apply(window, n);
6228
- const l = new Us(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
6228
+ const l = new zs(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
6229
6229
  return this.beforeFetch(l, i, r), this.setSessionTokenHeader((a, h) => {
6230
6230
  if (!(this.tokenUrlMatcher !== void 0 && !this.tokenUrlMatcher(l.url))) {
6231
6231
  if (n[1] === void 0 && n[0] instanceof Request)
@@ -6249,7 +6249,7 @@ class ya {
6249
6249
  for (const [l, a] of i.searchParams)
6250
6250
  e.getData[l] = a;
6251
6251
  }
6252
- n != null && n.body && (e.requestData = zs(n.body));
6252
+ n != null && n.body && (e.requestData = Us(n.body));
6253
6253
  }
6254
6254
  afterFetch(e) {
6255
6255
  return (s) => {
@@ -6286,7 +6286,7 @@ class Sa {
6286
6286
  this.onAbort();
6287
6287
  }, this.XMLReq.ontimeout = () => {
6288
6288
  this.onTimeout();
6289
- }, this.item = new Us(s, n, i), this.item.requestType = "xhr";
6289
+ }, this.item = new zs(s, n, i), this.item.requestType = "xhr";
6290
6290
  }
6291
6291
  get(e, s) {
6292
6292
  switch (s) {
@@ -6344,7 +6344,7 @@ class Sa {
6344
6344
  const s = Reflect.get(e, "send");
6345
6345
  return (...n) => {
6346
6346
  const i = n[0];
6347
- return this.item.requestData = zs(i), s.apply(e, n);
6347
+ return this.item.requestData = Us(i), s.apply(e, n);
6348
6348
  };
6349
6349
  }
6350
6350
  getSetRequestHeader(e) {
@@ -6415,16 +6415,16 @@ class Ea {
6415
6415
  this.ignoredHeaders = e, this.setSessionTokenHeader = s, this.sanitize = n, this.sendMessage = i, this.isServiceUrl = r;
6416
6416
  }
6417
6417
  apply(e, s, n) {
6418
- const i = n[0], r = n[1], o = new Us(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
6418
+ const i = n[0], r = n[1], o = new zs(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
6419
6419
  if (this.isServiceUrl(i))
6420
6420
  return e.apply(s, n);
6421
6421
  const l = Os(i);
6422
6422
  if (o.method = "POST", o.url = i, o.name = (l.pathname.split("/").pop() || "") + l.search, o.requestType = "beacon", o.requestHeader = { "Content-Type": ka(r) }, o.status = 0, o.statusText = "Pending", l.search && l.searchParams) {
6423
6423
  o.getData = {};
6424
- for (const [c, u] of l.searchParams)
6425
- o.getData[c] = u;
6424
+ for (const [c, d] of l.searchParams)
6425
+ o.getData[c] = d;
6426
6426
  }
6427
- o.requestData = zs(r), o.startTime || (o.startTime = performance.now());
6427
+ o.requestData = Us(r), o.startTime || (o.startTime = performance.now());
6428
6428
  const a = e.apply(s, n);
6429
6429
  a ? (o.endTime = performance.now(), o.duration = o.endTime - (o.startTime || o.endTime), o.status = 0, o.statusText = "Sent", o.readyState = 4) : (o.status = 500, o.statusText = "Unknown");
6430
6430
  const h = o.getMessage();
@@ -6448,7 +6448,7 @@ function Ta(t, e, s, n, i, r, o) {
6448
6448
  var l;
6449
6449
  t.XMLHttpRequest ? t.XMLHttpRequest = xa.create(e, s, n, i, r, o) : Dn("XMLHttpRequest"), t.fetch ? t.fetch = wa.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));
6450
6450
  }
6451
- function ds(t) {
6451
+ function us(t) {
6452
6452
  return t.__or_req_data__ || (t.__or_req_data__ = { body: void 0, headers: {} }), t.__or_req_data__;
6453
6453
  }
6454
6454
  function Ln(t) {
@@ -6468,16 +6468,16 @@ function Ia(t, e = {}) {
6468
6468
  const n = s.ignoreHeaders, i = Array.isArray(n) ? (c) => n.includes(c) : () => n, r = s.sessionTokenHeader === !0 ? "X-OpenReplay-SessionToken" : s.sessionTokenHeader;
6469
6469
  function o(c) {
6470
6470
  if (r) {
6471
- const u = t.getSessionToken();
6472
- u && t.safe(c)(r, u);
6471
+ const d = t.getSessionToken();
6472
+ d && t.safe(c)(r, d);
6473
6473
  }
6474
6474
  }
6475
6475
  function l(c) {
6476
6476
  if (s.capturePayload || (delete c.request.body, delete c.response.body), s.sanitizer) {
6477
- const u = c.response.body;
6478
- if (typeof u == "string")
6477
+ const d = c.response.body;
6478
+ if (typeof d == "string")
6479
6479
  try {
6480
- c.response.body = JSON.parse(u);
6480
+ c.response.body = JSON.parse(d);
6481
6481
  } catch {
6482
6482
  }
6483
6483
  return s.sanitizer(c);
@@ -6496,14 +6496,14 @@ function Ia(t, e = {}) {
6496
6496
  const h = (c) => {
6497
6497
  if (s.useProxy)
6498
6498
  return Ta(c, s.ignoreHeaders, o, l, (A) => t.send(A), (A) => t.isServiceURL(A), s.tokenUrlMatcher);
6499
- const u = c.fetch.bind(c), p = (A, k = {}) => {
6499
+ const d = c.fetch.bind(c), p = (A, k = {}) => {
6500
6500
  if (!(typeof A == "string" || A instanceof URL) || t.isServiceURL(String(A)))
6501
- return u(A, k);
6501
+ return d(A, k);
6502
6502
  o(function(O, D) {
6503
6503
  k.headers === void 0 && (k.headers = {}), k.headers instanceof Headers ? k.headers.append(O, D) : Array.isArray(k.headers) ? k.headers.push([O, D]) : k.headers[O] = D;
6504
6504
  });
6505
6505
  const N = performance.now();
6506
- return u(A, k).then((O) => {
6506
+ return d(A, k).then((O) => {
6507
6507
  const D = performance.now() - N;
6508
6508
  if (s.failuresOnly && O.status < 400)
6509
6509
  return O;
@@ -6545,10 +6545,10 @@ function Ia(t, e = {}) {
6545
6545
  return N.addEventListener("loadstart", (D) => {
6546
6546
  O = D.timeStamp;
6547
6547
  }), N.addEventListener("load", t.safe((D) => {
6548
- const { headers: I, body: T } = ds(N), B = O > 0 ? D.timeStamp - O : 0, j = (N.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), W = {};
6548
+ const { headers: I, body: T } = us(N), B = O > 0 ? D.timeStamp - O : 0, j = (N.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), W = {};
6549
6549
  j.forEach(function(V) {
6550
- const K = V.split(": "), z = K.shift();
6551
- i(z) || (W[z] = K.join(": "));
6550
+ const K = V.split(": "), U = K.shift();
6551
+ i(U) || (W[U] = K.join(": "));
6552
6552
  });
6553
6553
  const C = Ln(A), L = l({
6554
6554
  url: String(k),
@@ -6568,12 +6568,12 @@ function Ia(t, e = {}) {
6568
6568
  })), v.apply(this, arguments);
6569
6569
  }
6570
6570
  function F(A) {
6571
- const k = ds(this);
6571
+ const k = us(this);
6572
6572
  return k.body = A, y.apply(this, arguments);
6573
6573
  }
6574
6574
  function P(A, k) {
6575
6575
  if (!i(A)) {
6576
- const N = ds(this);
6576
+ const N = us(this);
6577
6577
  N.headers[A] = k;
6578
6578
  }
6579
6579
  return S.apply(this, arguments);
@@ -6596,7 +6596,7 @@ function Ca(t) {
6596
6596
  }
6597
6597
  function _a(t) {
6598
6598
  function e() {
6599
- document.hidden || (t.debug.log("Openreplay: tab change to" + t.session.getTabId()), t.send(ut(t.session.getTabId())));
6599
+ document.hidden || (t.debug.log("Openreplay: tab change to" + t.session.getTabId()), t.send(dt(t.session.getTabId())));
6600
6600
  }
6601
6601
  t.attachEventListener(window, "focus", e, !1, !1);
6602
6602
  }
@@ -6618,8 +6618,8 @@ class Oa {
6618
6618
  var l;
6619
6619
  if (this.options = e, this.app = null, this.crossdomainMode = !1, this.checkDoNotTrack = () => this.options.respectDoNotTrack && (navigator.doNotTrack == "1" || // @ts-ignore
6620
6620
  window.doNotTrack == "1"), this.signalStartIssue = (a, h) => {
6621
- const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), p = this.options.ingestPoint || pi;
6622
- u.open("POST", p + "/v1/web/not-started"), u.send(JSON.stringify({
6621
+ const c = this.checkDoNotTrack(), d = new XMLHttpRequest(), p = this.options.ingestPoint || pi;
6622
+ d.open("POST", p + "/v1/web/not-started"), d.send(JSON.stringify({
6623
6623
  trackerVersion: "14.0.4",
6624
6624
  projectKey: this.options.projectKey,
6625
6625
  doNotTrack: c,
@@ -6681,7 +6681,7 @@ class Oa {
6681
6681
  return;
6682
6682
  }
6683
6683
  const r = new Co(e.projectKey, e.sessionToken, e, this.signalStartIssue, this.crossdomainMode);
6684
- this.app = r, this.crossdomainMode || (aa(r), _o(r), Ur(r, e), _a(r)), sa(r, e.mouse), oa(r, this.crossdomainMode), ha(r), la(r), Fo(r, e), Mo(r, e), jo(r), Wo(r, e), ra(r, e), da(r), ua(r), Ia(r, e.network), Ca(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
6684
+ this.app = r, this.crossdomainMode || (aa(r), _o(r), zr(r, e), _a(r)), sa(r, e.mouse), oa(r, this.crossdomainMode), ha(r), la(r), Fo(r, e), Mo(r, e), jo(r), Wo(r, e), ra(r, e), ua(r), da(r), Ia(r, e.network), Ca(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
6685
6685
  const o = window.open;
6686
6686
  (e.autoResetOnWindowOpen || e.resetTabOnWindowOpen) && (r.attachStartCallback(() => {
6687
6687
  const a = r.getTabId(), h = r.sessionStorage ?? window.sessionStorage;
@@ -7202,45 +7202,54 @@ const Ra = `
7202
7202
  }
7203
7203
 
7204
7204
  /* Кнопка "Отправить" для бар-версии */
7205
- #bar-send-button {
7206
- padding: 12px 20px;
7207
- background: linear-gradient(90deg, #7B2BEB, #0044FF);
7208
- color: white;
7209
- border: none;
7210
- border-radius: 8px;
7211
- cursor: pointer;
7212
- font-size: 16px;
7213
- transition: all 0.2s ease;
7214
- text-align:center;
7215
- margin-top: 16px;
7205
+
7206
+ #bar-controls {
7207
+ display: flex;
7208
+ align-items: stretch; /* или center, если нужно выравнивать */
7209
+ gap: 8px;
7210
+ margin-top: 16px;
7216
7211
  }
7217
7212
 
7218
- #bar-send-button:hover {
7219
- transform: scale(1.05);
7220
- box-shadow: 0 4px 8px rgba(123, 43, 235, 0.15);
7213
+ /* Задаем одной высотой и одинаковыми отступами */
7214
+ #bar-controls input,
7215
+ #bar-controls button {
7216
+ height: 44px; /* или 48px, как вам нравится */
7217
+ line-height: 44px; /* чтобы текст по вертикали выровнялся */
7218
+ box-sizing: border-box; /* подстраховка, чтобы высота учитывала бордер */
7221
7219
  }
7222
7220
 
7223
- /* Кнопка "Сбросить" (bar-reset-button), стили как у bar-send-button */
7221
+ /* Чтобы кнопка и инпут смотрелись схоже по высоте */
7222
+ #bar-notes-input {
7223
+ flex: 1;
7224
+ padding: 0 12px; /* уберите или уменьшите вертикальные padding’и */
7225
+ border: 1px solid #ccc;
7226
+ border-radius: 6px;
7227
+ font-size: 14px;
7228
+ outline: none;
7229
+ }
7230
+
7231
+ /* Кнопки – чуть меняем паддинги, чтобы не «лезли» за высоту */
7232
+ #bar-send-button,
7224
7233
  #bar-reset-button {
7225
- padding: 12px 20px;
7234
+ padding: 0 20px; /* а по вертикали пусть высота сама регулируется через height */
7235
+ border-radius: 6px;
7226
7236
  background: linear-gradient(90deg, #7B2BEB, #0044FF);
7227
- color: white;
7228
- border: none;
7229
- border-radius: 8px;
7230
- cursor: pointer;
7231
- font-size: 16px;
7232
- transition: all 0.2s ease;
7233
- margin-top: 16px; /* или подстройте под свой макет */
7234
- margin-left: 12px; /* чтобы отступить от кнопки "Отправить" */
7237
+ font-size: 14px;
7238
+ cursor: pointer;
7239
+ white-space: nowrap;
7240
+ color: white;
7241
+ border: none;
7235
7242
  }
7236
7243
 
7237
- #bar-reset-button
7238
-
7244
+ /* При желании hover-эффект сохранить: */
7245
+ #bar-send-button:hover,
7239
7246
  #bar-reset-button:hover {
7240
- transform: scale(1.05);
7241
- box-shadow: 0 4px 8px rgba(123, 43, 235, 0.15);
7247
+ transform: scale(1.05);
7248
+ box-shadow: 0 4px 8px rgba(123, 43, 235, 0.15);
7242
7249
  }
7243
7250
 
7251
+
7252
+
7244
7253
  .hidden {
7245
7254
  display: none;
7246
7255
  }
@@ -7387,7 +7396,8 @@ class Da {
7387
7396
  barSubtitle: "Choisissez vos plats ci-dessous et cliquez sur «Envoyer»",
7388
7397
  barSendButton: "Envoyer",
7389
7398
  barResetButton: "Réinitialiser",
7390
- barName: "Nom du bar"
7399
+ barName: "Nom du bar",
7400
+ barNotesPlaceholder: "Entrez vos souhaits ici..."
7391
7401
  },
7392
7402
  es: {
7393
7403
  welcomeMessage: "¿Qué vas a comer? Cuéntame tu plato y te recomendaré el maridaje perfecto.",
@@ -7427,7 +7437,8 @@ class Da {
7427
7437
  barSubtitle: "Selecciona de la lista y presiona «Enviar»",
7428
7438
  barSendButton: "Enviar",
7429
7439
  barResetButton: "Reiniciar",
7430
- barName: "Nombre del bar"
7440
+ barName: "Nombre del bar",
7441
+ barNotesPlaceholder: "Agrega tus comentarios aquí..."
7431
7442
  },
7432
7443
  en: {
7433
7444
  welcomeMessage: "What are you planning to eat? Share your dish and I'll recommend the perfect wine pairing for your meal.",
@@ -7467,7 +7478,8 @@ class Da {
7467
7478
  barSubtitle: "Select dishes below and click ‘Send’",
7468
7479
  barSendButton: "Send",
7469
7480
  barResetButton: "Reset",
7470
- barName: "Bar Name"
7481
+ barName: "Bar Name",
7482
+ barNotesPlaceholder: "Add your wishes here..."
7471
7483
  },
7472
7484
  de: {
7473
7485
  welcomeMessage: "Was möchten Sie essen? Beschreiben Sie Ihr Gericht und ich empfehle Ihnen den perfekten Wein dazu.",
@@ -7523,7 +7535,7 @@ class Da {
7523
7535
  return this.translations[this.language][e] || e;
7524
7536
  }
7525
7537
  }
7526
- const $ = new Da(), us = {
7538
+ const H = new Da(), ds = {
7527
7539
  barName: "LENEZ",
7528
7540
  dishGroups: [
7529
7541
  {
@@ -7582,7 +7594,7 @@ class La {
7582
7594
  price: null,
7583
7595
  color: null,
7584
7596
  intensity: null
7585
- }, this.widgetType === "bar" ? (this.barName = us.barName, this.barDishes = us.dishes) : (this.barName = "", this.barDishes = []), this.initializeWidget(), this.widgetType === "store" && this.loadInstantRecommendations();
7597
+ }, this.widgetType === "bar" ? (this.barName = ds.barName, this.barDishes = ds.dishes) : (this.barName = "", this.barDishes = []), this.initializeWidget(), this.widgetType === "store" && this.loadInstantRecommendations();
7586
7598
  }
7587
7599
  initializeWidget() {
7588
7600
  const e = document.getElementById("wineater-widget-conteiner");
@@ -7591,16 +7603,16 @@ class La {
7591
7603
  <div id="wine-widget-container">
7592
7604
  <div id="wine-widget-left">
7593
7605
  <div id="wine-widget-header">
7594
- <h1>${$.translate("widgetTitle")}</h1>
7595
- <p>${$.translate("widgetSubtitle")}</p>
7606
+ <h1>${H.translate("widgetTitle")}</h1>
7607
+ <p>${H.translate("widgetSubtitle")}</p>
7596
7608
  </div>
7597
7609
  <div id="wine-widget-search">
7598
- <input type="text" id="wine-search-input" placeholder="${$.translate("searchPlaceholder")}">
7599
- <button id="wine-search-button">${$.translate("searchButton")}</button>
7610
+ <input type="text" id="wine-search-input" placeholder="${H.translate("searchPlaceholder")}">
7611
+ <button id="wine-search-button">${H.translate("searchButton")}</button>
7600
7612
  </div>
7601
7613
  <div id="wine-widget-filters">
7602
7614
  <div class="filter-group">
7603
- <span class="filter-label">${$.translate("priceRange")}:</span>
7615
+ <span class="filter-label">${H.translate("priceRange")}:</span>
7604
7616
  <div class="filter-buttons" id="price-buttons">
7605
7617
  <button data-value="< 500">< $500</button>
7606
7618
  <button data-value="500 - 1000">$500 - $1000</button>
@@ -7609,27 +7621,27 @@ class La {
7609
7621
  </div>
7610
7622
  </div>
7611
7623
  <div class="filter-group">
7612
- <span class="filter-label">${$.translate("wineColor")}:</span>
7624
+ <span class="filter-label">${H.translate("wineColor")}:</span>
7613
7625
  <div class="filter-buttons" id="color-buttons">
7614
- <button data-value="red">${$.translate("red")}</button>
7615
- <button data-value="white">${$.translate("white")}</button>
7616
- <button data-value="rose">${$.translate("rose")}</button>
7617
- <button data-value=" " class="selected">${$.translate("Any")}</button>
7626
+ <button data-value="red">${H.translate("red")}</button>
7627
+ <button data-value="white">${H.translate("white")}</button>
7628
+ <button data-value="rose">${H.translate("rose")}</button>
7629
+ <button data-value=" " class="selected">${H.translate("Any")}</button>
7618
7630
  </div>
7619
7631
  </div>
7620
7632
  <div class="filter-group">
7621
- <span class="filter-label">${$.translate("intensity")}:</span>
7633
+ <span class="filter-label">${H.translate("intensity")}:</span>
7622
7634
  <div class="filter-buttons" id="intensity-buttons">
7623
- <button data-value="light">${$.translate("light")}</button>
7624
- <button data-value="medium">${$.translate("medium")}</button>
7625
- <button data-value="full">${$.translate("full")}</button>
7626
- <button data-value=" " class="selected">${$.translate("Any")}</button>
7635
+ <button data-value="light">${H.translate("light")}</button>
7636
+ <button data-value="medium">${H.translate("medium")}</button>
7637
+ <button data-value="full">${H.translate("full")}</button>
7638
+ <button data-value=" " class="selected">${H.translate("Any")}</button>
7627
7639
  </div>
7628
7640
  </div>
7629
7641
  </div>
7630
7642
  <div id="powered-by-widget">
7631
7643
  <a href="https://wineater.com" target="_blank">
7632
- <span>${$.translate("poweredBy")}</span>
7644
+ <span>${H.translate("poweredBy")}</span>
7633
7645
  <img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo.svg" alt="Wineater Logo">
7634
7646
  </a>
7635
7647
  </div>
@@ -7649,7 +7661,7 @@ class La {
7649
7661
  const s = `
7650
7662
  <div id="wine-widget-container">
7651
7663
  <div id="wine-widget-right">
7652
- ${us.dishGroups.map((n) => `
7664
+ ${ds.dishGroups.map((n) => `
7653
7665
  <!-- Обёртка группы -->
7654
7666
  <div class="dish-group">
7655
7667
  <!-- Заголовок группы, если нужен -->
@@ -7666,21 +7678,27 @@ class La {
7666
7678
 
7667
7679
  <div id="wine-placeholder"></div>
7668
7680
 
7681
+ <div id="loading-indicator" class="hidden">
7682
+ <div id="typing-indicator" class="typing-indicator">
7683
+ <span></span><span></span><span></span>
7684
+ </div>
7685
+ </div>
7686
+
7669
7687
  <!-- Кнопки для отправки и сброса -->
7670
- <div id="bar-buttons">
7671
- <button id="bar-send-button">
7672
- ${$.translate("barSendButton")}
7673
- </button>
7674
- <button id="bar-reset-button" class="hidden">
7675
- ${$.translate("barResetButton")}
7676
- </button>
7677
- </div>
7688
+ <div id="bar-controls">
7689
+ <input
7690
+ type="text"
7691
+ id="bar-notes-input"
7692
+ placeholder="${H.translate("barNotesPlaceholder")}"
7693
+ />
7694
+ <button id="bar-send-button">
7695
+ ${H.translate("barSendButton")}
7696
+ </button>
7697
+ <button id="bar-reset-button" class="hidden">
7698
+ ${H.translate("barResetButton")}
7699
+ </button>
7700
+ </div>
7678
7701
 
7679
- <div id="loading-indicator" class="hidden">
7680
- <div id="typing-indicator" class="typing-indicator">
7681
- <span></span><span></span><span></span>
7682
- </div>
7683
- </div>
7684
7702
  </div>
7685
7703
  </div>
7686
7704
  `;
@@ -7755,7 +7773,7 @@ class La {
7755
7773
  const e = document.getElementById("wine-placeholder");
7756
7774
  e.innerHTML = `
7757
7775
  <div class="no-results">
7758
- <p>${$.translate("noResultsMessage") || "No recommendations found for your query."}</p>
7776
+ <p>${H.translate("noResultsMessage") || "No recommendations found for your query."}</p>
7759
7777
  </div>
7760
7778
  `;
7761
7779
  }
@@ -7763,7 +7781,7 @@ class La {
7763
7781
  const e = document.getElementById("wine-placeholder");
7764
7782
  e.innerHTML = `
7765
7783
  <div class="error-message">
7766
- <p>${$.translate("errorMessage") || "Something went wrong. Please try again later."}</p>
7784
+ <p>${H.translate("errorMessage") || "Something went wrong. Please try again later."}</p>
7767
7785
  </div>
7768
7786
  `;
7769
7787
  }
@@ -7778,30 +7796,32 @@ class La {
7778
7796
  }
7779
7797
  addEventListenersBarVersion() {
7780
7798
  const e = document.querySelectorAll(".dish-tile");
7781
- e.forEach((o) => {
7782
- o.addEventListener("click", () => {
7783
- o.classList.toggle("selected");
7799
+ e.forEach((l) => {
7800
+ l.addEventListener("click", () => {
7801
+ l.classList.toggle("selected");
7784
7802
  });
7785
7803
  });
7786
- const s = document.querySelectorAll(".dish-grid"), n = document.getElementById("bar-send-button"), i = document.getElementById("bar-reset-button"), r = document.getElementById("wine-placeholder");
7787
- !n || !i || !r || (n.addEventListener("click", async () => {
7788
- this.showLoadingIndicator(), s.forEach((a) => a.classList.add("hidden")), n.classList.add("hidden");
7789
- const o = [];
7790
- document.querySelectorAll(".dish-tile.selected").forEach((a) => {
7791
- o.push(a.dataset.dish);
7804
+ const s = document.querySelectorAll(".dish-group"), n = document.getElementById("bar-send-button"), i = document.getElementById("bar-reset-button"), r = document.getElementById("bar-notes-input"), o = document.getElementById("wine-placeholder");
7805
+ !n || !i || !r || !o || (n.addEventListener("click", async () => {
7806
+ s.forEach((d) => d.classList.add("hidden")), this.showLoadingIndicator();
7807
+ const l = [];
7808
+ document.querySelectorAll(".dish-tile.selected").forEach((d) => {
7809
+ l.push(d.dataset.dish);
7792
7810
  });
7793
- const l = o.join(", ");
7794
- console.log("Selected bar dishes =>", l);
7811
+ const a = r.value.trim(), h = [];
7812
+ l.length > 0 && h.push(`Dishes: ${l.join(", ")}`), a && h.push(`Notes: ${a}`);
7813
+ const c = h.join("; ");
7814
+ console.log("Final query =>", c);
7795
7815
  try {
7796
- const a = await this.api.getWineRecommendationsSearch(l);
7797
- a && a.length > 0 ? this.displayResults(a, !0) : this.displayNoResultsMessage(), i.classList.remove("hidden");
7798
- } catch (a) {
7799
- console.error("Error while fetching bar recommendations:", a), this.displayErrorMessage();
7816
+ const d = await this.api.getWineRecommendationsSearch(c);
7817
+ d && d.length > 0 ? this.displayResults(d, !0) : this.displayNoResultsMessage(), i.classList.remove("hidden");
7818
+ } catch (d) {
7819
+ console.error("Error while fetching bar recommendations:", d), this.displayErrorMessage();
7800
7820
  } finally {
7801
7821
  this.hideLoadingIndicator();
7802
7822
  }
7803
7823
  }), i.addEventListener("click", () => {
7804
- s.forEach((o) => o.classList.remove("hidden")), e.forEach((o) => o.classList.remove("selected")), r.innerHTML = "", i.classList.add("hidden"), n.classList.remove("hidden");
7824
+ s.forEach((l) => l.classList.remove("hidden")), e.forEach((l) => l.classList.remove("selected")), o.innerHTML = "", i.classList.add("hidden"), r.value = "";
7805
7825
  }));
7806
7826
  }
7807
7827
  }
@@ -7809,7 +7829,7 @@ class Ma {
7809
7829
  constructor() {
7810
7830
  var s;
7811
7831
  this.api = new Ft();
7812
- const e = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.FIRST_MESSAGE_TEXT) || $.translate("welcomeMessage");
7832
+ const e = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.FIRST_MESSAGE_TEXT) || H.translate("welcomeMessage");
7813
7833
  this.displayFirstMessage(e);
7814
7834
  }
7815
7835
  initialize() {
@@ -7830,7 +7850,7 @@ class Ma {
7830
7850
  const n = await this.api.getWineRecommendations(s);
7831
7851
  this.hideTypingIndicator(), n && n.length ? this.displayResults(n) : this.displayMessage("No results found.", "api");
7832
7852
  } catch {
7833
- this.hideTypingIndicator(), this.displayMessage($.translate("somethingWentWrong"), "api");
7853
+ this.hideTypingIndicator(), this.displayMessage(H.translate("somethingWentWrong"), "api");
7834
7854
  }
7835
7855
  }
7836
7856
  }
@@ -7860,10 +7880,10 @@ class Ma {
7860
7880
  const l = document.createElement("div");
7861
7881
  l.innerHTML = `
7862
7882
  <strong>${n.Title}</strong><br>
7863
- ${$.translate("price")}: ${n.Price}<br>
7864
- ${$.translate("region")}: ${n.Region}<br>
7865
- ${$.translate("type")}: ${n.Type}<br>
7866
- <a href="${n.Url}" target="_blank">${$.translate("moreInfo")}</a>
7883
+ ${H.translate("price")}: ${n.Price}<br>
7884
+ ${H.translate("region")}: ${n.Region}<br>
7885
+ ${H.translate("type")}: ${n.Type}<br>
7886
+ <a href="${n.Url}" target="_blank">${H.translate("moreInfo")}</a>
7867
7887
  `, l.querySelector("a").addEventListener("click", (c) => {
7868
7888
  c.preventDefault(), this.sendAnalytics(n.Title), window.open(n.Url, "_blank");
7869
7889
  }), r.appendChild(l);
@@ -7886,7 +7906,7 @@ function ja() {
7886
7906
  document.addEventListener("DOMContentLoaded", () => {
7887
7907
  setupCloseButton(), setupOutsideClick();
7888
7908
  });
7889
- function Ua(t) {
7909
+ function za(t) {
7890
7910
  gt = t;
7891
7911
  }
7892
7912
  new Ft();
@@ -7901,18 +7921,18 @@ const ht = {
7901
7921
  // Matches any URL containing 'tasting'
7902
7922
  };
7903
7923
  var Pn, jn;
7904
- const za = {
7924
+ const Ua = {
7905
7925
  FESTIVAL_PAGES: ((Pn = window.wineaterData) == null ? void 0 : Pn.FESTIVAL_PAGES) || Mn.FESTIVAL_PAGES,
7906
7926
  TASTING_PAGES: ((jn = window.wineaterData) == null ? void 0 : jn.TASTING_PAGES) || Mn.TASTING_PAGES
7907
7927
  };
7908
- var Un, zn;
7928
+ var zn, Un;
7909
7929
  const Ha = {
7910
- PRODUCT_PAGES: ((Un = window.wineaterData) == null ? void 0 : Un.PRODUCT_PAGES) || ht.PRODUCT_PAGES,
7911
- CART_PAGE: ((zn = window.wineaterData) == null ? void 0 : zn.CART_PAGE) || (ht == null ? void 0 : ht.CART_PAGE)
7930
+ PRODUCT_PAGES: ((zn = window.wineaterData) == null ? void 0 : zn.PRODUCT_PAGES) || ht.PRODUCT_PAGES,
7931
+ CART_PAGE: ((Un = window.wineaterData) == null ? void 0 : Un.CART_PAGE) || (ht == null ? void 0 : ht.CART_PAGE)
7912
7932
  };
7913
7933
  async function $a() {
7914
7934
  const t = window.location.href;
7915
- for (const [e, s] of Object.entries(za))
7935
+ for (const [e, s] of Object.entries(Ua))
7916
7936
  if (s.test(t))
7917
7937
  return !1;
7918
7938
  for (const [e, s] of Object.entries(Ha))
@@ -7922,7 +7942,7 @@ async function $a() {
7922
7942
  const n = setTimeout(() => {
7923
7943
  openChatWindow();
7924
7944
  }, 15e3);
7925
- return Ua(n), !0;
7945
+ return za(n), !0;
7926
7946
  } catch (n) {
7927
7947
  return console.error("Error fetching dishes:", n), !1;
7928
7948
  }
@@ -7951,7 +7971,7 @@ class qa {
7951
7971
  }
7952
7972
  async initTranslator() {
7953
7973
  const e = this.store ? this.store.charAt(0).toUpperCase() + this.store.slice(1) : "Test";
7954
- await $.fetchConfig(e || "Test");
7974
+ await H.fetchConfig(e || "Test");
7955
7975
  }
7956
7976
  initCookies() {
7957
7977
  var e;
@@ -7966,12 +7986,12 @@ class qa {
7966
7986
  <div id="chatbot-container">
7967
7987
  <div id="chat-icon">
7968
7988
  <img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/chat-icon.svg" alt="Chat Icon">
7969
- <span>${((i = window == null ? void 0 : window.wineaterData) == null ? void 0 : i.BUTTON_TEXT) || $.translate(`chatButton${e}`)}</span>
7989
+ <span>${((i = window == null ? void 0 : window.wineaterData) == null ? void 0 : i.BUTTON_TEXT) || H.translate(`chatButton${e}`)}</span>
7970
7990
  </div>
7971
7991
  <div id="chat-window" class="hidden">
7972
7992
  <div id="chat-header">
7973
7993
  <div id="chat-title">
7974
- <h1>${$.translate("chatTitle")}</h1>
7994
+ <h1>${H.translate("chatTitle")}</h1>
7975
7995
  </div>
7976
7996
  <div id="close-btn">&times;</div>
7977
7997
  </div>
@@ -7980,12 +8000,12 @@ class qa {
7980
8000
  <span></span><span></span><span></span>
7981
8001
  </div>
7982
8002
  <div id="input-container">
7983
- <input type="text" id="user-input" placeholder="${$.translate("inputPlaceholder")}">
7984
- <button id="send-button">${$.translate("sendButton")}</button>
8003
+ <input type="text" id="user-input" placeholder="${H.translate("inputPlaceholder")}">
8004
+ <button id="send-button">${H.translate("sendButton")}</button>
7985
8005
  </div>
7986
8006
  <div id="powered-by">
7987
8007
  <a href="https://wineater.com" target="_blank">
7988
- <span>${$.translate("poweredBy")}</span>
8008
+ <span>${H.translate("poweredBy")}</span>
7989
8009
  <img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo.svg" alt="Wineater Logo" id="chatbot-logo">
7990
8010
  </a>
7991
8011
  </div>