wineater-bot 3.0.17 → 3.0.18

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.
@@ -702,10 +702,10 @@ function $s() {
702
702
  function Ri(t) {
703
703
  st("Message Sent", { distinct_id: oe("uniqueUserID"), message_content: t, client: oe("chatbotToken") });
704
704
  }
705
- function Fi(t) {
705
+ function Ai(t) {
706
706
  st("Products Got", { distinct_id: oe("uniqueUserID"), products: t, client: oe("chatbotToken") });
707
707
  }
708
- function Ai(t) {
708
+ function Fi(t) {
709
709
  st("Product Clicked", { distinct_id: oe("uniqueUserID"), product_id: t, client: oe("chatbotToken") });
710
710
  }
711
711
  var We = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -908,7 +908,7 @@ var pn = { exports: {} };
908
908
  (function(b) {
909
909
  b.NONE = "NONE", b.DEFAULT_FLAGS = "DEFAULT_FLAGS", b.CACHE = "CACHE", b.SERVER = "SERVER";
910
910
  })(c || (c = {}));
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() {
911
+ var E, A = null, P = "BULLET_TRAIN_DB", F = "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
913
  var d = this;
914
914
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
@@ -920,35 +920,35 @@ var pn = { exports: {} };
920
920
  var ae = M.flags, te = M.traits, ne = M.identifier;
921
921
  d.isLoading = !1;
922
922
  var ce = {}, le = {};
923
- te = te || [], (ae = ae || []).forEach(function(K) {
924
- ce[K.feature.name.toLowerCase().replace(/ /g, "_")] = { id: K.feature.id, enabled: K.enabled, value: K.feature_state_value };
925
- }), te.forEach(function(K) {
926
- le[K.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: K.transient, value: K.trait_value };
923
+ te = te || [], (ae = ae || []).forEach(function(J) {
924
+ ce[J.feature.name.toLowerCase().replace(/ /g, "_")] = { id: J.feature.id, enabled: J.enabled, value: J.feature_state_value };
925
+ }), te.forEach(function(J) {
926
+ le[J.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: J.transient, value: J.trait_value };
927
927
  }), d.oldFlags = i({}, d.flags);
928
928
  var me = h(d.oldFlags, ce), Ke = h((H = d.evaluationContext.identity) === null || H === void 0 ? void 0 : H.traits, le);
929
929
  if ((ne || Object.keys(le).length) && (d.evaluationContext.identity = { traits: le }, ne && (d.evaluationContext.identity.identifier = ne)), d.flags = ce, d.updateStorage(), d._onChange(d.oldFlags, { isFromServer: !0, flagsChanged: me, traitsChanged: Ke }, d._loadedState(null, c.SERVER)), d.datadogRum)
930
930
  try {
931
931
  if (d.datadogRum.trackTraits) {
932
932
  var Je = {};
933
- Object.keys(((_ = d.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(K) {
934
- Je[D + K] = d.getTrait(K);
933
+ Object.keys(((_ = d.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(J) {
934
+ Je[D + J] = d.getTrait(J);
935
935
  });
936
936
  var Le = i(i(i({}, d.datadogRum.client.getUser()), { id: d.datadogRum.client.getUser().id || ((W = d.evaluationContext.identity) === null || W === void 0 ? void 0 : W.identifier) }), Je);
937
937
  d.log("Setting Datadog user", Le), d.datadogRum.client.setUser(Le);
938
938
  }
939
- } catch (K) {
940
- console.error(K);
939
+ } catch (J) {
940
+ console.error(J);
941
941
  }
942
942
  if (d.dtrum)
943
943
  try {
944
944
  var se = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
945
- Object.keys(d.flags).map(function(K) {
946
- p(se, N + K, d.getValue(K, { skipAnalytics: !0 })), p(se, O + K, d.hasFeature(K, { skipAnalytics: !0 }));
947
- }), Object.keys(((ee = d.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(K) {
948
- p(se, D + K, d.getTrait(K));
945
+ Object.keys(d.flags).map(function(J) {
946
+ p(se, N + J, d.getValue(J, { skipAnalytics: !0 })), p(se, 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(se, D + J, d.getTrait(J));
949
949
  }), d.log("Sending javaLongOrObject traits to dynatrace", se.javaLongOrObject), d.log("Sending date traits to dynatrace", se.date), d.log("Sending shortString traits to dynatrace", se.shortString), d.log("Sending javaDouble to dynatrace", se.javaDouble), d.dtrum.sendSessionProperties(se.javaLongOrObject, se.date, se.shortString, se.javaDouble);
950
- } catch (K) {
951
- console.error(K);
950
+ } catch (J) {
951
+ console.error(J);
952
952
  }
953
953
  }
954
954
  };
@@ -1058,28 +1058,28 @@ var pn = { exports: {} };
1058
1058
  }, this._onChange = function(m, g, w) {
1059
1059
  var x, R;
1060
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);
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 && (A = f.AsyncStorage);
1062
1062
  }
1063
1063
  return b.prototype.init = function(f) {
1064
1064
  var d, m, g;
1065
1065
  return r(this, void 0, void 0, function() {
1066
- var w, x, R, M, H, _, W, ee, ae, te, ne, ce, le, me, Ke, Je, Le, se, K, At, Xe, Wn, Ye, Dt, qn, Vn, Lt, Gn, Mt, Qe, Me, Kn, ie = this;
1066
+ var w, x, R, M, H, _, W, ee, ae, te, ne, ce, le, me, Ke, Je, Le, se, J, Ft, Xe, Wn, Ye, Dt, qn, Vn, Lt, Gn, Mt, Qe, Me, Kn, ie = this;
1067
1067
  return o(this, function(pe) {
1068
1068
  switch (pe.label) {
1069
1069
  case 0:
1070
1070
  w = v(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, W = f.cacheFlags, ee = f.datadogRum, ae = f.onError, te = f.defaultFlags, ne = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Ke = f.enableAnalytics, Je = f.realtime, Le = f.eventSourceUrl, se = Le === void 0 ? "https://realtime.flagsmith.com/" : Le, K = f.AsyncStorage, At = f.identity, Xe = f.traits, Wn = f.state, Ye = f.cacheOptions, Dt = f.angularHttpClient, qn = f._trigger, Vn = 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, H = f.headers, _ = f.onChange, W = f.cacheFlags, ee = f.datadogRum, ae = f.onError, te = f.defaultFlags, ne = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Ke = f.enableAnalytics, Je = f.realtime, Le = f.eventSourceUrl, se = Le === void 0 ? "https://realtime.flagsmith.com/" : Le, J = f.AsyncStorage, Ft = f.identity, Xe = f.traits, Wn = f.state, Ye = f.cacheOptions, Dt = f.angularHttpClient, qn = f._trigger, Vn = 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
- if (w.identity = At || Xe ? { identifier: At, traits: Xe ? Object.fromEntries(Object.entries(Xe).map(function(he) {
1074
+ if (w.identity = Ft || Xe ? { identifier: Ft, traits: Xe ? Object.fromEntries(Object.entries(Xe).map(function(he) {
1075
1075
  return [he[0], { value: he[1] }];
1076
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 = qn || this._trigger, this._triggerLoadingState = Vn || 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."), ne && (u = ne), 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 && !!W, K && (F = K), Je && typeof window < "u" && this.setupRealtime(se, w.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState(Wn), 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."), ne && (u = ne), 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 = A !== void 0 && !!W, J && (A = J), Je && typeof window < "u" && this.setupRealtime(se, w.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState(Wn), 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) {
1079
1079
  return function(be, ye) {
1080
- var Te = ye.headers, X = ye.method, Be = ye.body;
1080
+ var Te = ye.headers, Y = ye.method, Be = ye.body;
1081
1081
  return new Promise(function(Re) {
1082
- switch (X) {
1082
+ switch (Y) {
1083
1083
  case "GET":
1084
1084
  return he.get(be, { headers: Te }).subscribe(function(ke) {
1085
1085
  Re({ ok: !0, text: function() {
@@ -1096,14 +1096,14 @@ var pn = { exports: {} };
1096
1096
  }
1097
1097
  });
1098
1098
  };
1099
- }(Dt)), F && this.canUseStorage && F.getItem(A).then(function(he) {
1099
+ }(Dt)), A && this.canUseStorage && A.getItem(F).then(function(he) {
1100
1100
  try {
1101
1101
  ie.evaluationEvent = JSON.parse(he) || {};
1102
1102
  } catch {
1103
1103
  ie.evaluationEvent = {};
1104
1104
  }
1105
1105
  ie.analyticsInterval = setInterval(ie.analyticsFlags, ie.ticks);
1106
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), F && this.canUseStorage && F.getItem(A, function(he, be) {
1106
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), A && this.canUseStorage && A.getItem(F, function(he, be) {
1107
1107
  if (be && ie.evaluationContext.environment) {
1108
1108
  var ye = JSON.parse(be);
1109
1109
  if (ye[ie.evaluationContext.environment.apiKey]) {
@@ -1113,11 +1113,11 @@ var pn = { exports: {} };
1113
1113
  }
1114
1114
  })), !W)
1115
1115
  return [3, 9];
1116
- if (!F || !this.canUseStorage)
1116
+ if (!A || !this.canUseStorage)
1117
1117
  return [3, 8];
1118
1118
  Gn = function(he, be) {
1119
1119
  return r(ie, void 0, void 0, function() {
1120
- var ye, Te, X, Be, Re, ke, Bt, Jn, Pt, jt, zt, Ut, Ht, $t, Wt, qt, Vt, Gt, Kt, Jt, Xt, Yt, Qt, Zt;
1120
+ var ye, Te, Y, Be, Re, ke, Bt, Jn, 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 pn = { exports: {} };
1125
1125
  return [3, 7];
1126
1126
  ye = null, Te = null, Ie.label = 1;
1127
1127
  case 1:
1128
- return Ie.trys.push([1, 5, , 6]), X = JSON.parse(be), Be = !1, Re = !1, X && X.api === this.api && ((jt = (Pt = X.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 = X.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 = X.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 && (!X.ts || (/* @__PURE__ */ new Date()).valueOf() - X.ts > this.cacheOptions.ttl) && (X.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + X.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - X.ts) + "ms"), ke = !1) : X.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + X.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - X.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 = X.evaluationContext) === null || Vt === void 0 ? void 0 : Vt.identity) === null || Gt === void 0 ? void 0 : Gt.traits), ye = h(this.flags, X.flags), this.setState(i(i({}, X), { evaluationContext: v(i(i({}, X.evaluationContext), { identity: !((Kt = X.evaluationContext) === null || Kt === void 0) && Kt.identity ? i(i({}, (Jt = X.evaluationContext) === null || Jt === void 0 ? void 0 : Jt.identity), { traits: i(i({}, ((Yt = (Xt = X.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", X))), Be ? (Bt = !ce && (!this.cacheOptions.skipAPI || Re), this._onChange(null, { isFromServer: !1, flagsChanged: ye, 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), ye = h(this.flags, Y.flags), this.setState(i(i({}, Y), { evaluationContext: v(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: ye, 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:
@@ -1156,9 +1156,9 @@ var pn = { exports: {} };
1156
1156
  });
1157
1157
  }, pe.label = 2;
1158
1158
  case 2:
1159
- return pe.trys.push([2, 7, , 8]), F.getItemSync ? (Mt = F.getItemSync(P), [3, 5]) : [3, 3];
1159
+ return pe.trys.push([2, 7, , 8]), A.getItemSync ? (Mt = A.getItemSync(P), [3, 5]) : [3, 3];
1160
1160
  case 3:
1161
- return [4, F.getItem(P)];
1161
+ return [4, A.getItem(P)];
1162
1162
  case 4:
1163
1163
  Mt = pe.sent(), pe.label = 5;
1164
1164
  case 5:
@@ -1214,12 +1214,12 @@ var pn = { exports: {} };
1214
1214
  if (this.cacheFlags) {
1215
1215
  this.ts = (/* @__PURE__ */ new Date()).valueOf();
1216
1216
  var f = JSON.stringify(this.getState());
1217
- this.log("Setting storage", f), F.setItem(P, f);
1217
+ this.log("Setting storage", f), A.setItem(P, f);
1218
1218
  }
1219
1219
  }, b.prototype.updateEventStorage = function() {
1220
1220
  if (this.enableAnalytics) {
1221
1221
  var f = JSON.stringify(this.getState().evaluationEvent);
1222
- F.setItem(A, f);
1222
+ A.setItem(F, f);
1223
1223
  }
1224
1224
  }, b.prototype.setLoadingState = function(f) {
1225
1225
  var d;
@@ -1241,7 +1241,7 @@ var pn = { exports: {} };
1241
1241
  var f = b.fetch, d = b.AsyncStorage, m = b.eventSource;
1242
1242
  return new I({ fetch: f, AsyncStorage: d, eventSource: m });
1243
1243
  }
1244
- var B, V = (B = function(b, f) {
1244
+ var B, G = (B = function(b, f) {
1245
1245
  return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, m) {
1246
1246
  d.__proto__ = m;
1247
1247
  } || function(d, m) {
@@ -1293,8 +1293,8 @@ var pn = { exports: {} };
1293
1293
  return b.call(this, `EventSource not available.
1294
1294
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
1295
1295
  }
1296
- return V(f, b), f;
1297
- }(Error), q = function() {
1296
+ return G(f, b), f;
1297
+ }(Error), V = function() {
1298
1298
  function b(f, d) {
1299
1299
  var m = this;
1300
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")
@@ -1376,7 +1376,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1376
1376
  }, b;
1377
1377
  }();
1378
1378
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
1379
- var G = function(b, f) {
1379
+ var K = function(b, f) {
1380
1380
  return f = f || {}, new Promise(function(d, 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() {
@@ -1403,9 +1403,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1403
1403
  g.setRequestHeader(H, f.headers[H]);
1404
1404
  g.send(f.body || null);
1405
1405
  });
1406
- }, U = T({ AsyncStorage: s, fetch: G, eventSource: q });
1406
+ }, U = T({ AsyncStorage: s, fetch: K, eventSource: V });
1407
1407
  typeof window < "u" && (window.flagsmith = U), n.createFlagsmithInstance = function() {
1408
- return T({ AsyncStorage: s, fetch: G, eventSource: q });
1408
+ return T({ AsyncStorage: s, fetch: K, eventSource: V });
1409
1409
  }, n.default = U, Object.defineProperty(n, "__esModule", { value: !0 });
1410
1410
  });
1411
1411
  })(pn, pn.exports);
@@ -1502,9 +1502,9 @@ var Yn = {}, Li = function(t, e, n, s, i) {
1502
1502
  }, Vs = qs(_t, 2), Mi = Vs.b, bt = Vs.r;
1503
1503
  Mi[28] = 258, bt[258] = 28;
1504
1504
  var Bi = qs(Nt, 0), mn = Bi.r, yt = new re(32768);
1505
- for (var J = 0; J < 32768; ++J) {
1506
- var Ce = (J & 43690) >> 1 | (J & 21845) << 1;
1507
- Ce = (Ce & 52428) >> 2 | (Ce & 13107) << 2, Ce = (Ce & 61680) >> 4 | (Ce & 3855) << 4, yt[J] = ((Ce & 65280) >> 8 | (Ce & 255) << 8) >> 1;
1505
+ for (var X = 0; X < 32768; ++X) {
1506
+ var Ce = (X & 43690) >> 1 | (X & 21845) << 1;
1507
+ Ce = (Ce & 52428) >> 2 | (Ce & 13107) << 2, Ce = (Ce & 61680) >> 4 | (Ce & 3855) << 4, yt[X] = ((Ce & 65280) >> 8 | (Ce & 255) << 8) >> 1;
1508
1508
  }
1509
1509
  var qe = function(t, e, n) {
1510
1510
  for (var s = t.length, i = 0, r = new re(e); i < s; ++i)
@@ -1525,18 +1525,18 @@ var qe = function(t, e, n) {
1525
1525
  t[i] && (l[i] = yt[o[t[i] - 1]++] >> 15 - t[i]);
1526
1526
  return l;
1527
1527
  }, Oe = new fe(288);
1528
- for (var J = 0; J < 144; ++J)
1529
- Oe[J] = 8;
1530
- for (var J = 144; J < 256; ++J)
1531
- Oe[J] = 9;
1532
- for (var J = 256; J < 280; ++J)
1533
- Oe[J] = 7;
1534
- for (var J = 280; J < 288; ++J)
1535
- Oe[J] = 8;
1528
+ for (var X = 0; X < 144; ++X)
1529
+ Oe[X] = 8;
1530
+ for (var X = 144; X < 256; ++X)
1531
+ Oe[X] = 9;
1532
+ for (var X = 256; X < 280; ++X)
1533
+ Oe[X] = 7;
1534
+ for (var X = 280; X < 288; ++X)
1535
+ Oe[X] = 8;
1536
1536
  var nt = new fe(32);
1537
- for (var J = 0; J < 32; ++J)
1538
- nt[J] = 5;
1539
- var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), Fn = function(t) {
1537
+ for (var X = 0; X < 32; ++X)
1538
+ nt[X] = 5;
1539
+ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), An = function(t) {
1540
1540
  return (t + 7) / 8 | 0;
1541
1541
  }, Js = function(t, e, n) {
1542
1542
  return (e == null || e < 0) && (e = 0), (n == null || n > t.length) && (n = t.length), new fe(t.subarray(e, n));
@@ -1589,19 +1589,19 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), Fn = f
1589
1589
  r[s].s > p && (p = r[s].s);
1590
1590
  var y = new re(p + 1), S = vt(n[c - 1], y, 0);
1591
1591
  if (S > e) {
1592
- var s = 0, v = 0, E = S - e, F = 1 << E;
1592
+ var s = 0, v = 0, E = S - e, A = 1 << E;
1593
1593
  for (r.sort(function(O, D) {
1594
1594
  return y[D.s] - y[O.s] || O.f - D.f;
1595
1595
  }); s < i; ++s) {
1596
1596
  var P = r[s].s;
1597
1597
  if (y[P] > e)
1598
- v += F - (1 << S - y[P]), y[P] = e;
1598
+ v += A - (1 << S - y[P]), y[P] = e;
1599
1599
  else
1600
1600
  break;
1601
1601
  }
1602
1602
  for (v >>= E; v > 0; ) {
1603
- var A = r[s].s;
1604
- y[A] < e ? v -= 1 << e - y[A]++ - 1 : ++s;
1603
+ var F = r[s].s;
1604
+ y[F] < e ? v -= 1 << e - y[F]++ - 1 : ++s;
1605
1605
  }
1606
1606
  for (; s >= 0 && v; --s) {
1607
1607
  var k = r[s].s;
@@ -1639,28 +1639,28 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), Fn = f
1639
1639
  for (var n = 0, s = 0; s < e.length; ++s)
1640
1640
  n += t[s] * e[s];
1641
1641
  return n;
1642
- }, An = function(t, e, n) {
1643
- var s = n.length, i = Fn(e + 2);
1642
+ }, Fn = function(t, e, n) {
1643
+ var s = n.length, i = An(e + 2);
1644
1644
  t[i] = s & 255, t[i + 1] = s >> 8, t[i + 2] = t[i] ^ 255, t[i + 3] = t[i + 1] ^ 255;
1645
1645
  for (var r = 0; r < s; ++r)
1646
1646
  t[i + r + 4] = n[r];
1647
1647
  return (i + 4 + s) * 8;
1648
1648
  }, yn = function(t, e, n, s, i, r, o, l, a, h, c) {
1649
1649
  ve(e, c++, n), ++i[256];
1650
- for (var u = dt(i, 15), p = u.t, y = u.l, S = dt(r, 15), v = S.t, E = S.l, F = bn(p), P = F.c, A = F.n, k = bn(v), N = k.c, O = k.n, D = new re(19), I = 0; I < P.length; ++I)
1650
+ for (var u = dt(i, 15), p = u.t, y = u.l, S = dt(r, 15), v = S.t, E = S.l, A = bn(p), P = A.c, F = A.n, k = bn(v), 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, V = T.l, j = 19; j > 4 && !B[gn[j - 1]]; --j)
1654
+ for (var T = dt(D, 7), B = T.t, G = T.l, j = 19; j > 4 && !B[gn[j - 1]]; --j)
1655
1655
  ;
1656
1656
  var $ = h + 5 << 3, C = He(i, Oe) + He(r, nt) + o, L = He(i, p) + He(r, v) + o + 14 + 3 * j + He(D, B) + 2 * D[16] + 3 * D[17] + 7 * D[18];
1657
1657
  if (a >= 0 && $ <= C && $ <= L)
1658
- return An(e, c, t.subarray(a, a + h));
1659
- var q, G, U, b;
1658
+ return Fn(e, c, t.subarray(a, a + h));
1659
+ var V, K, U, b;
1660
1660
  if (ve(e, c, 1 + (L < C)), c += 2, L < C) {
1661
- q = qe(p, y, 0), G = p, U = qe(v, E, 0), b = v;
1662
- var f = qe(B, V, 0);
1663
- ve(e, c, A - 257), ve(e, c + 5, O - 1), ve(e, c + 10, j - 4), c += 14;
1661
+ V = qe(p, y, 0), K = p, U = qe(v, E, 0), b = v;
1662
+ var f = qe(B, G, 0);
1663
+ ve(e, c, F - 257), ve(e, c + 5, O - 1), ve(e, c + 10, j - 4), c += 14;
1664
1664
  for (var I = 0; I < j; ++I)
1665
1665
  ve(e, c + 3 * I, B[gn[I]]);
1666
1666
  c += 3 * j;
@@ -1670,46 +1670,46 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), Fn = f
1670
1670
  ve(e, c, f[w]), c += B[w], w > 15 && (ve(e, c, g[I] >> 5 & 127), c += g[I] >> 12);
1671
1671
  }
1672
1672
  } else
1673
- q = Gs, G = Oe, U = Ks, b = nt;
1673
+ V = Gs, K = Oe, U = Ks, b = nt;
1674
1674
  for (var I = 0; I < l; ++I) {
1675
1675
  var x = s[I];
1676
1676
  if (x > 255) {
1677
1677
  var w = x >> 18 & 31;
1678
- Ue(e, c, q[w + 257]), c += G[w + 257], w > 7 && (ve(e, c, x >> 23 & 31), c += _t[w]);
1678
+ Ue(e, c, V[w + 257]), c += K[w + 257], w > 7 && (ve(e, c, x >> 23 & 31), c += _t[w]);
1679
1679
  var R = x & 31;
1680
1680
  Ue(e, c, U[R]), c += b[R], R > 3 && (Ue(e, c, x >> 5 & 8191), c += Nt[R]);
1681
1681
  } else
1682
- Ue(e, c, q[x]), c += G[x];
1682
+ Ue(e, c, V[x]), c += K[x];
1683
1683
  }
1684
- return Ue(e, c, q[256]), c + G[256];
1684
+ return Ue(e, c, V[256]), c + K[256];
1685
1685
  }, Ys = /* @__PURE__ */ new Ct([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Dn = /* @__PURE__ */ new fe(0), Qs = function(t, e, n, s, i, r) {
1686
1686
  var o = r.z || t.length, l = new fe(s + o + 5 * (1 + Math.ceil(o / 7e3)) + i), a = l.subarray(s, 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 = Ys[e - 1], p = u >> 13, y = u & 8191, S = (1 << n) - 1, v = r.p || new re(32768), E = r.h || new re(S + 1), F = Math.ceil(n / 3), P = 2 * F, A = function(ne) {
1690
- return (t[ne] ^ t[ne + 1] << F ^ t[ne + 2] << P) & S;
1691
- }, k = new Ct(25e3), N = new re(288), O = new re(32), D = 0, I = 0, T = r.i || 0, B = 0, V = r.w || 0, j = 0; T + 2 < o; ++T) {
1692
- var $ = A(T), C = T & 32767, L = E[$];
1693
- if (v[C] = L, E[$] = C, V <= T) {
1694
- var q = o - T;
1695
- if ((D > 7e3 || B > 24576) && (q > 423 || !h)) {
1689
+ for (var u = Ys[e - 1], p = u >> 13, y = u & 8191, S = (1 << n) - 1, v = r.p || new re(32768), E = r.h || new re(S + 1), A = Math.ceil(n / 3), P = 2 * A, F = function(ne) {
1690
+ return (t[ne] ^ t[ne + 1] << A ^ t[ne + 2] << P) & S;
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
+ var $ = F(T), C = T & 32767, L = E[$];
1693
+ if (v[C] = L, E[$] = C, G <= T) {
1694
+ var V = o - T;
1695
+ if ((D > 7e3 || B > 24576) && (V > 423 || !h)) {
1696
1696
  c = yn(t, a, 0, k, N, O, I, B, j, T - j, c), B = D = I = 0, j = T;
1697
- for (var G = 0; G < 286; ++G)
1698
- N[G] = 0;
1699
- for (var G = 0; G < 30; ++G)
1700
- O[G] = 0;
1697
+ for (var K = 0; K < 286; ++K)
1698
+ N[K] = 0;
1699
+ for (var K = 0; K < 30; ++K)
1700
+ O[K] = 0;
1701
1701
  }
1702
1702
  var U = 2, b = 0, f = y, d = C - L & 32767;
1703
- if (q > 2 && $ == A(T - d))
1704
- for (var m = Math.min(p, q) - 1, g = Math.min(32767, T), w = Math.min(258, q); d <= g && --f && C != L; ) {
1703
+ if (V > 2 && $ == F(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
1705
  if (t[T + U] == t[T + U - d]) {
1706
1706
  for (var x = 0; x < w && t[T + x] == t[T + x - d]; ++x)
1707
1707
  ;
1708
1708
  if (x > U) {
1709
1709
  if (U = x, b = d, x > m)
1710
1710
  break;
1711
- for (var R = Math.min(d, x - 2), M = 0, G = 0; G < R; ++G) {
1712
- var H = T - d + G & 32767, _ = v[H], W = H - _ & 32767;
1711
+ for (var R = Math.min(d, x - 2), M = 0, K = 0; K < R; ++K) {
1712
+ var H = T - d + K & 32767, _ = v[H], W = H - _ & 32767;
1713
1713
  W > M && (M = W, L = H);
1714
1714
  }
1715
1715
  }
@@ -1719,22 +1719,22 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), Fn = f
1719
1719
  if (b) {
1720
1720
  k[B++] = 268435456 | bt[U] << 18 | mn[b];
1721
1721
  var ee = bt[U] & 31, ae = mn[b] & 31;
1722
- I += _t[ee] + Nt[ae], ++N[257 + ee], ++O[ae], V = T + U, ++D;
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
  }
1726
1726
  }
1727
- for (T = Math.max(T, V); T < o; ++T)
1727
+ for (T = Math.max(T, G); T < o; ++T)
1728
1728
  k[B++] = t[T], ++N[t[T]];
1729
- c = yn(t, a, h, k, N, O, I, B, j, T - j, c), h || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = E, r.p = v, r.i = T, r.w = V);
1729
+ c = yn(t, a, h, k, N, O, I, B, j, T - j, c), h || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = E, r.p = v, r.i = T, r.w = G);
1730
1730
  } else {
1731
1731
  for (var T = r.w || 0; T < o + h; T += 65535) {
1732
1732
  var te = T + 65535;
1733
- te >= o && (a[c / 8 | 0] = h, te = o), c = An(a, c + 1, t.subarray(T, te));
1733
+ te >= o && (a[c / 8 | 0] = h, te = o), c = Fn(a, c + 1, t.subarray(T, te));
1734
1734
  }
1735
1735
  r.i = o;
1736
1736
  }
1737
- return Js(l, 0, s + Fn(c) + i);
1737
+ return Js(l, 0, s + An(c) + i);
1738
1738
  }, Zs = /* @__PURE__ */ function() {
1739
1739
  for (var t = new Int32Array(256), e = 0; e < 256; ++e) {
1740
1740
  for (var n = e, s = 9; --s; )
@@ -1802,7 +1802,7 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), Fn = f
1802
1802
  var a = ji({}, it[n].e);
1803
1803
  return Li(it[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n, a, zi(a), s);
1804
1804
  }, Hi = function() {
1805
- return [fe, re, Ct, _t, Nt, gn, bt, mn, Gs, Oe, Ks, nt, yt, Ys, Dn, qe, ve, Ue, dt, vt, bn, He, An, yn, Fn, Js, Qs, Ln, qi, ti];
1805
+ return [fe, re, Ct, _t, Nt, gn, bt, mn, Gs, Oe, Ks, nt, yt, Ys, Dn, qe, ve, Ue, dt, vt, bn, He, Fn, yn, An, Js, Qs, Ln, qi, ti];
1806
1806
  }, $i = function() {
1807
1807
  return [ni, si, wt, ei, Zs];
1808
1808
  }, ti = function(t) {
@@ -2340,7 +2340,7 @@ function li(t, e) {
2340
2340
  }
2341
2341
  return n;
2342
2342
  }
2343
- function Fe(t) {
2343
+ function Ae(t) {
2344
2344
  return [
2345
2345
  0,
2346
2346
  t
@@ -2613,7 +2613,7 @@ function hi(t, e) {
2613
2613
  e
2614
2614
  ];
2615
2615
  }
2616
- function Fr(t, e) {
2616
+ function Ar(t, e) {
2617
2617
  return [
2618
2618
  77,
2619
2619
  t,
@@ -2643,7 +2643,7 @@ function xt(t, e, n, s, i, r, o, l, a) {
2643
2643
  a
2644
2644
  ];
2645
2645
  }
2646
- function Ar(t, e, n, s, i, r) {
2646
+ function Fr(t, e, n, s, i, r) {
2647
2647
  return [
2648
2648
  84,
2649
2649
  t,
@@ -2706,7 +2706,7 @@ function ut(t) {
2706
2706
  t
2707
2707
  ];
2708
2708
  }
2709
- function Ae(t) {
2709
+ function Fe(t) {
2710
2710
  return [
2711
2711
  118,
2712
2712
  t
@@ -3185,7 +3185,7 @@ class co {
3185
3185
  }, this.signalTask = (u, p, y) => {
3186
3186
  if (!u)
3187
3187
  return console.error("User Testing: No Task ID Given");
3188
- const S = this.durations.tasks.find((F) => F.taskId === u), v = this.getTimestamp(), E = S ? v - S.started : 0;
3188
+ const S = this.durations.tasks.find((A) => A.taskId === u), v = this.getTimestamp(), E = S ? v - S.started : 0;
3189
3189
  return fetch(`${this.ingestPoint}/v1/web/uxt/signals/task`, {
3190
3190
  method: "POST",
3191
3191
  headers: {
@@ -3351,7 +3351,7 @@ class lo {
3351
3351
  S.append(p, y);
3352
3352
  const v = z("div", "closePanelButton", ui, "Collapse Panel"), E = z("div", "nextButton", Qr, "Done, Next");
3353
3353
  s.append(i, r), a.append(h, c), u.append(v, E), o.append(l, a, S, u), n.append(s, o);
3354
- const F = () => {
3354
+ const A = () => {
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
  };
@@ -3375,7 +3375,7 @@ class lo {
3375
3375
  this.hideTaskSection = () => (r.textContent = "+", Object.assign(o.style, {
3376
3376
  display: "none"
3377
3377
  }), this.widgetTasksVisible = !1, !1), this.showTaskSection = () => (r.textContent = "-", Object.assign(o.style, je), this.widgetTasksVisible = !0, !0);
3378
- const A = () => {
3378
+ const F = () => {
3379
3379
  const k = document.getElementById(`or_task_${this.currentTaskIndex}`);
3380
3380
  k && Object.assign(k.style, ms);
3381
3381
  for (let N = 0; N < this.currentTaskIndex; N++) {
@@ -3387,18 +3387,18 @@ class lo {
3387
3387
  var N, O, D, I;
3388
3388
  const k = e[this.currentTaskIndex].allow_typing ? y.value : void 0;
3389
3389
  if (y.value = "", (N = this.signalManager) == null || N.signalTask(e[this.currentTaskIndex].task_id, "done", k), this.currentTaskIndex < e.length - 1) {
3390
- this.currentTaskIndex++, F();
3390
+ this.currentTaskIndex++, A();
3391
3391
  const T = (O = this.signalManager) == null ? void 0 : O.getDurations();
3392
3392
  T && T.tasks.findIndex((B) => B.taskId === e[this.currentTaskIndex].task_id) === -1 && (T.tasks.push({
3393
3393
  taskId: e[this.currentTaskIndex].task_id,
3394
3394
  started: this.app.timestamp()
3395
- }), (D = this.signalManager) == null || D.setDurations(T)), (I = this.signalManager) == null || I.signalTask(e[this.currentTaskIndex].task_id, "begin"), A();
3395
+ }), (D = this.signalManager) == null || D.setDurations(T)), (I = this.signalManager) == null || I.signalTask(e[this.currentTaskIndex].task_id, "begin"), F();
3396
3396
  } else
3397
3397
  this.showEndSection();
3398
3398
  this.app.localStorage.setItem("or_uxt_task_index", this.currentTaskIndex.toString());
3399
3399
  }, setTimeout(() => {
3400
3400
  const k = document.getElementById("or_task_0");
3401
- k && Object.assign(k.style, ms), F(), A();
3401
+ k && Object.assign(k.style, ms), A(), F();
3402
3402
  }, 1), n;
3403
3403
  }
3404
3404
  showEndSection() {
@@ -4209,17 +4209,17 @@ let Co = class {
4209
4209
  const E = this.checkNodeId(y, p);
4210
4210
  if (E) {
4211
4211
  this.waitStarted().then(() => {
4212
- var A;
4212
+ var F;
4213
4213
  a++;
4214
- const F = this.session.getSessionToken(), P = {
4214
+ const A = this.session.getSessionToken(), P = {
4215
4215
  line: de.iframeId,
4216
4216
  context: this.contextId,
4217
4217
  domain: p,
4218
4218
  id: E,
4219
- token: F,
4219
+ token: A,
4220
4220
  frameOrderNumber: a
4221
4221
  };
4222
- this.debug.log("iframe_data", P), (A = c.source) == null || A.postMessage(P, "*");
4222
+ this.debug.log("iframe_data", P), (F = c.source) == null || F.postMessage(P, "*");
4223
4223
  }).catch(console.error), v = 10;
4224
4224
  break;
4225
4225
  }
@@ -4233,8 +4233,8 @@ let Co = class {
4233
4233
  let v = S;
4234
4234
  return this.pageFrames.forEach((E) => {
4235
4235
  if (E.dataset.domain === c.data.domain) {
4236
- const [F, P, A] = S, { left: k, top: N } = E.getBoundingClientRect();
4237
- v = [F, P + k, A + N];
4236
+ const [A, P, F] = S, { left: k, top: N } = E.getBoundingClientRect();
4237
+ v = [A, P + k, F + N];
4238
4238
  }
4239
4239
  }), v;
4240
4240
  }
@@ -4242,15 +4242,15 @@ let Co = class {
4242
4242
  let v = S;
4243
4243
  return this.pageFrames.forEach((E) => {
4244
4244
  if (E.dataset.domain === c.data.domain) {
4245
- const [F, P, A, k, N, O, D] = S, { left: I, top: T, width: B, height: V } = E.getBoundingClientRect(), j = document.documentElement.scrollWidth, $ = document.documentElement.scrollHeight, C = O / 100 * B + I, L = D / 100 * V + T, q = C / j, G = L / $;
4245
+ const [A, P, F, k, N, O, D] = S, { left: I, top: T, width: B, height: G } = E.getBoundingClientRect(), j = document.documentElement.scrollWidth, $ = document.documentElement.scrollHeight, C = O / 100 * B + I, L = D / 100 * G + T, V = C / j, K = L / $;
4246
4246
  v = [
4247
- F,
4248
- P,
4249
4247
  A,
4248
+ P,
4249
+ F,
4250
4250
  k,
4251
4251
  N,
4252
- Math.round(q * 1e3) / 10,
4253
- Math.round(G * 1e3) / 10
4252
+ Math.round(V * 1e3) / 10,
4253
+ Math.round(K * 1e3) / 10
4254
4254
  ];
4255
4255
  }
4256
4256
  }), v;
@@ -4356,7 +4356,7 @@ let Co = class {
4356
4356
  * */
4357
4357
  _nCommit() {
4358
4358
  if (this.socketMode) {
4359
- this.messages.unshift(Ae(this.session.getTabId())), this.messages.unshift(Fe(this.timestamp())), this.commitCallbacks.forEach((e) => e(this.messages)), this.messages.length = 0;
4359
+ this.messages.unshift(Fe(this.session.getTabId())), this.messages.unshift(Ae(this.timestamp())), this.commitCallbacks.forEach((e) => e(this.messages)), this.messages.length = 0;
4360
4360
  return;
4361
4361
  }
4362
4362
  if (!(this.worker === void 0 || !this.messages.length)) {
@@ -4371,7 +4371,7 @@ let Co = class {
4371
4371
  try {
4372
4372
  or(() => {
4373
4373
  var e;
4374
- this.messages.unshift(Ae(this.session.getTabId())), this.messages.unshift(Fe(this.timestamp())), (e = this.worker) == null || e.postMessage(this.messages), this.commitCallbacks.forEach((n) => n(this.messages)), this.messages.length = 0;
4374
+ this.messages.unshift(Fe(this.session.getTabId())), this.messages.unshift(Ae(this.timestamp())), (e = this.worker) == null || e.postMessage(this.messages), this.commitCallbacks.forEach((n) => n(this.messages)), this.messages.length = 0;
4375
4375
  });
4376
4376
  } catch (e) {
4377
4377
  this._debug("worker_commit", e), this.stop(!0), setTimeout(() => {
@@ -4387,7 +4387,7 @@ let Co = class {
4387
4387
  * but in turn we don't overload batch writer on session start with 1000 batches
4388
4388
  * */
4389
4389
  _cStartCommit() {
4390
- this.coldStartCommitN += 1, this.coldStartCommitN === 2 && (this.bufferedMessages1.push(Fe(this.timestamp())), this.bufferedMessages1.push(Ae(this.session.getTabId())), this.bufferedMessages2.push(Fe(this.timestamp())), this.bufferedMessages2.push(Ae(this.session.getTabId())), this.coldStartCommitN = 0);
4390
+ this.coldStartCommitN += 1, this.coldStartCommitN === 2 && (this.bufferedMessages1.push(Ae(this.timestamp())), this.bufferedMessages1.push(Fe(this.session.getTabId())), this.bufferedMessages2.push(Ae(this.timestamp())), this.bufferedMessages2.push(Fe(this.session.getTabId())), this.coldStartCommitN = 0);
4391
4391
  }
4392
4392
  commit() {
4393
4393
  this.activityState === Q.ColdStart ? this._cStartCommit() : this._nCommit();
@@ -4508,7 +4508,7 @@ let Co = class {
4508
4508
  const s = 1e3, i = this.checkSessionToken(e.forceNew);
4509
4509
  n && await this.setupConditionalStart(e);
4510
4510
  const r = () => {
4511
- this.orderNumber += 1, en(), 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({
4511
+ this.orderNumber += 1, en(), this.coldStartTs = ge(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(Ae(this.timestamp())), this.bufferedMessages1.push(Fe(this.session.getTabId()))) : (this.bufferedMessages2.length = 0, this.bufferedMessages2.push(Ae(this.timestamp())), this.bufferedMessages2.push(Fe(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
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();
@@ -4575,7 +4575,7 @@ let Co = class {
4575
4575
  const o = JSON.parse(i);
4576
4576
  this.bufferedMessages1 = Array.isArray(o) ? o : this.bufferedMessages1, this.localStorage.removeItem(an);
4577
4577
  }
4578
- this.bufferedMessages1.push(Fe(this.timestamp())), this.bufferedMessages1.push(Ae(this.session.getTabId())), this.activityState = Q.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
4578
+ this.bufferedMessages1.push(Ae(this.timestamp())), this.bufferedMessages1.push(Fe(this.session.getTabId())), this.activityState = Q.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
4579
4579
  userID: e.userID,
4580
4580
  metadata: e.metadata
4581
4581
  });
@@ -4730,9 +4730,9 @@ let Co = class {
4730
4730
  // derived from token
4731
4731
  startTimestamp: E,
4732
4732
  // real startTS (server time), derived from sessionID
4733
- userBrowser: F,
4733
+ userBrowser: A,
4734
4734
  userCity: P,
4735
- userCountry: A,
4735
+ userCountry: F,
4736
4736
  userDevice: k,
4737
4737
  userOS: N,
4738
4738
  userState: O,
@@ -4746,9 +4746,9 @@ let Co = class {
4746
4746
  return this.signalError(C, []), _e(C);
4747
4747
  }
4748
4748
  this.delay = S, this.session.setSessionToken(h), this.session.setUserInfo({
4749
- userBrowser: F,
4749
+ userBrowser: A,
4750
4750
  userCity: P,
4751
- userCountry: A,
4751
+ userCountry: F,
4752
4752
  userDevice: k,
4753
4753
  userOS: N,
4754
4754
  userState: O
@@ -4761,8 +4761,8 @@ let Co = class {
4761
4761
  token: h,
4762
4762
  beaconSizeLimit: p
4763
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(rs(C, L))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = y;
4764
- const V = { sessionToken: h, userUUID: c, sessionID: v };
4765
- if (this.startCallbacks.forEach((C) => C(V)), 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, {
4764
+ const G = { sessionToken: h, userUUID: c, sessionID: v };
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,
4767
4767
  quality: I,
4768
4768
  isDebug: this.options.canvas.__save_canvas_locally,
@@ -4787,7 +4787,7 @@ let Co = class {
4787
4787
  }
4788
4788
  return j && (this.uxtManager.isActive ? this.onUxtCb.forEach((C) => C(j)) : this.uxtManager.getTest(j, h, !!$).then((C) => {
4789
4789
  C && this.onUxtCb.forEach((L) => L(C));
4790
- })), To(V);
4790
+ })), To(G);
4791
4791
  } catch (a) {
4792
4792
  if (this.stop(), this.session.reset(), a === Ze)
4793
4793
  return this.signalError(Ze, []), _e(Ze);
@@ -4849,7 +4849,7 @@ let Co = class {
4849
4849
  trackWs(e) {
4850
4850
  const n = e;
4851
4851
  return (s, i, r = "down") => {
4852
- typeof s != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || s.length > 255 || this.send(Ar("websocket", n, i, this.timestamp(), r, s));
4852
+ typeof s != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || s.length > 255 || this.send(Fr("websocket", n, i, this.timestamp(), r, s));
4853
4853
  };
4854
4854
  }
4855
4855
  stop(e = !0) {
@@ -4925,7 +4925,7 @@ function Ro(t) {
4925
4925
  })), t.map(ks).join(" ");
4926
4926
  }
4927
4927
  const Es = ["log", "info", "warn", "error", "debug", "assert"];
4928
- function Fo(t, e) {
4928
+ function Ao(t, e) {
4929
4929
  const n = Object.assign({
4930
4930
  consoleMethods: Es,
4931
4931
  consoleThrottling: 30
@@ -4956,7 +4956,7 @@ function Fo(t, e) {
4956
4956
  l(window), t.observer.attachContextCallback(l);
4957
4957
  }
4958
4958
  var mi = { exports: {} }, ln = { exports: {} }, Ts;
4959
- function Ao() {
4959
+ function Fo() {
4960
4960
  return Ts || (Ts = 1, function(t, e) {
4961
4961
  (function(n, s) {
4962
4962
  t.exports = s();
@@ -4999,15 +4999,15 @@ function Ao() {
4999
4999
  throw new TypeError("Eval Origin must be an Object or StackFrame");
5000
5000
  },
5001
5001
  toString: function() {
5002
- var v = this.getFileName() || "", E = this.getLineNumber() || "", F = this.getColumnNumber() || "", P = this.getFunctionName() || "";
5003
- return this.getIsEval() ? v ? "[eval] (" + v + ":" + E + ":" + F + ")" : "[eval]:" + E + ":" + F : P ? P + " (" + v + ":" + E + ":" + F + ")" : v + ":" + E + ":" + F;
5002
+ var v = this.getFileName() || "", E = this.getLineNumber() || "", A = this.getColumnNumber() || "", P = this.getFunctionName() || "";
5003
+ return this.getIsEval() ? v ? "[eval] (" + v + ":" + E + ":" + A + ")" : "[eval]:" + E + ":" + A : P ? P + " (" + v + ":" + E + ":" + A + ")" : v + ":" + E + ":" + A;
5004
5004
  }
5005
5005
  }, u.fromString = function(E) {
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);
5006
+ var A = E.indexOf("("), P = E.lastIndexOf(")"), F = E.substring(0, A), k = E.substring(A + 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
5009
  return new u({
5010
- functionName: A,
5010
+ functionName: F,
5011
5011
  args: k || void 0,
5012
5012
  fileName: D,
5013
5013
  lineNumber: I || void 0,
@@ -5040,7 +5040,7 @@ function Ao() {
5040
5040
  }
5041
5041
  (function(t, e) {
5042
5042
  (function(n, s) {
5043
- t.exports = s(Ao());
5043
+ t.exports = s(Fo());
5044
5044
  })(We, function(s) {
5045
5045
  var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, o = /^(eval@)?(\[native code])?$/;
5046
5046
  return {
@@ -5375,10 +5375,10 @@ function Wo(t, e) {
5375
5375
  p = ge();
5376
5376
  }, E = () => {
5377
5377
  y === 0 && p !== 0 && (y = ge() - p);
5378
- }, F = () => {
5378
+ }, A = () => {
5379
5379
  p !== 0 && (S = ge() - p), h(u, c, y, S), y = 0, S = 0, p = 0;
5380
5380
  };
5381
- t.nodes.attachNodeListener(c, "focus", v), t.nodes.attachNodeListener(c, "input", E), t.nodes.attachNodeListener(c, "change", F);
5381
+ t.nodes.attachNodeListener(c, "focus", v), t.nodes.attachNodeListener(c, "input", E), t.nodes.attachNodeListener(c, "change", A);
5382
5382
  return;
5383
5383
  }
5384
5384
  if (Ho(c)) {
@@ -5617,7 +5617,7 @@ function na(t, e) {
5617
5617
  }
5618
5618
  let i = -1, r = -1, o = !1, l = null, a = 0, h = {}, c = 0, u = 0, p = 0, y = 0, S;
5619
5619
  const v = 8e-3, E = 225;
5620
- function F() {
5620
+ function A() {
5621
5621
  const k = y / E;
5622
5622
  if (!c) {
5623
5623
  c = k;
@@ -5627,13 +5627,13 @@ function na(t, e) {
5627
5627
  p > 4 && N > v && t.send(Lr(ge())), y = 0, p = 0, c = k;
5628
5628
  }
5629
5629
  t.attachStartCallback(() => {
5630
- S = setInterval(() => F(), E);
5630
+ S = setInterval(() => A(), E);
5631
5631
  }), t.attachStopCallback(() => {
5632
5632
  i = -1, r = -1, o = !1, l = null, h = {}, S && clearInterval(S);
5633
5633
  });
5634
5634
  const P = () => {
5635
5635
  o && (t.send(yr(i, r)), o = !1);
5636
- }, A = (k, N = !1) => {
5636
+ }, F = (k, N = !1) => {
5637
5637
  function O(I, T, B) {
5638
5638
  return h[I] = h[I] || ea(T, k, B);
5639
5639
  }
@@ -5644,25 +5644,25 @@ function na(t, e) {
5644
5644
  }), D(k, "mousemove", (I) => {
5645
5645
  const [T, B] = t.observer.getDocumentOffset(k);
5646
5646
  i = I.clientX + T, r = I.clientY + B, o = !0;
5647
- const V = Math.sign(I.movementX);
5648
- y += Math.abs(I.movementX) + Math.abs(I.movementY), V !== u && (u = V, p++);
5647
+ const G = Math.sign(I.movementX);
5648
+ y += Math.abs(I.movementX) + Math.abs(I.movementY), G !== u && (u = G, p++);
5649
5649
  }, !1), D(k, "click", (I) => {
5650
5650
  const T = Rs(I.target, k);
5651
5651
  if (!I.clientX && !I.clientY || T === null)
5652
5652
  return;
5653
5653
  const B = t.nodes.getID(T);
5654
5654
  if (B !== void 0) {
5655
- const V = I.pageX, j = I.pageY, $ = k.documentElement.scrollWidth, C = k.documentElement.scrollHeight, L = Fs(V / $), q = Fs(j / C);
5656
- P(), t.send(Rr(B, l === T ? Math.round(performance.now() - a) : 0, s(T), On(T) && !n ? O(B, T, e) : "", L, q), !0);
5655
+ const G = I.pageX, j = I.pageY, $ = k.documentElement.scrollWidth, C = k.documentElement.scrollHeight, L = As(G / $), V = As(j / C);
5656
+ P(), t.send(Rr(B, l === T ? Math.round(performance.now() - a) : 0, s(T), On(T) && !n ? O(B, T, e) : "", L, V), !0);
5657
5657
  }
5658
5658
  l = null;
5659
5659
  });
5660
5660
  };
5661
5661
  t.nodes.attachNodeCallback((k) => {
5662
- kt(k) && A(k);
5663
- }), A(document, !0), t.ticker.attach(P, (e == null ? void 0 : e.trackingOffset) || 7);
5662
+ kt(k) && F(k);
5663
+ }), F(document, !0), t.ticker.attach(P, (e == null ? void 0 : e.trackingOffset) || 7);
5664
5664
  }
5665
- function Fs(t) {
5665
+ function As(t) {
5666
5666
  return Math.round(t * 1e4);
5667
5667
  }
5668
5668
  function sa(t) {
@@ -5767,9 +5767,9 @@ function ra(t, e) {
5767
5767
  domContentLoadedEventStart: S,
5768
5768
  domContentLoadedEventEnd: v,
5769
5769
  loadEventStart: E,
5770
- loadEventEnd: F
5770
+ loadEventEnd: A
5771
5771
  } = performance.timing;
5772
- t.send(wr(u - c || 0, p - c || 0, y - c || 0, S - c || 0, v - c || 0, E - c || 0, F - c || 0, l, a));
5772
+ t.send(wr(u - c || 0, p - c || 0, y - c || 0, S - c || 0, v - c || 0, E - c || 0, A - c || 0, l, a));
5773
5773
  }
5774
5774
  }, 30);
5775
5775
  }
@@ -5781,7 +5781,7 @@ function ra(t, e) {
5781
5781
  const S = performance.now();
5782
5782
  if (s !== null && (h = Math.max.apply(null, Object.keys(s).map((v) => s[v])), S - h > 1e3 && (p = sa(s), s = null)), u !== null && (S - u > 50 && (c = S), u = S - c > 5e3 ? null : S), p !== null && u === null || S > 3e4) {
5783
5783
  y = !0, s = null;
5784
- const v = 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 v = p === null ? 0 : ia(a || l, p), { domContentLoadedEventEnd: E, navigationStart: A } = performance.timing, P = u === null ? Math.max(c, a, E - A || 0) : 0;
5785
5785
  t.send(Sr(v, a > h ? a : h, P));
5786
5786
  }
5787
5787
  });
@@ -5836,7 +5836,7 @@ function aa(t) {
5836
5836
  e = null, i = Ge(), n = s = -1, o(), l(), a();
5837
5837
  }), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", a, !1, !1), t.ticker.attach(o, 1, !1), t.ticker.attach(l, 5, !1);
5838
5838
  }
5839
- function As(t) {
5839
+ function Fs(t) {
5840
5840
  return Ot(t) && // @ts-ignore
5841
5841
  !!t.adoptedStyleSheets;
5842
5842
  }
@@ -5846,7 +5846,7 @@ function Ei() {
5846
5846
  }
5847
5847
  const lt = /* @__PURE__ */ new Map();
5848
5848
  function la(t) {
5849
- if (t === null || !As(document))
5849
+ if (t === null || !Fs(document))
5850
5850
  return;
5851
5851
  const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), s = (o) => setTimeout(() => {
5852
5852
  let l = t.nodes.getID(o);
@@ -5868,7 +5868,7 @@ function la(t) {
5868
5868
  }
5869
5869
  if (Symbol.iterator in a)
5870
5870
  for (const u of a)
5871
- h.includes(u) || t.send(Fr(u, l));
5871
+ h.includes(u) || t.send(Ar(u, l));
5872
5872
  n.set(l, h);
5873
5873
  }, 20);
5874
5874
  function i(o) {
@@ -5901,7 +5901,7 @@ function la(t) {
5901
5901
  }), t.attachStartCallback(() => {
5902
5902
  s(document);
5903
5903
  }), t.nodes.attachNodeCallback((o) => {
5904
- As(o) && s(o);
5904
+ Fs(o) && s(o);
5905
5905
  });
5906
5906
  }
5907
5907
  function ha(t) {
@@ -6017,14 +6017,14 @@ function fa(t, e, n, s, 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: y, data: S, method: v, url: E, baseURL: F } = p.config, { data: P, headers: A, status: k, response: N } = p, { data: O, headers: D, status: I } = N || {}, T = n.ignoreHeaders, B = Array.isArray(T) ? (U) => T.includes(U) : () => T;
6021
- function V(U, b) {
6020
+ const { headers: y, data: S, method: v, url: E, baseURL: A } = p.config, { data: P, headers: F, status: k, response: N } = p, { data: O, headers: D, status: I } = N || {}, T = n.ignoreHeaders, B = Array.isArray(T) ? (U) => T.includes(U) : () => T;
6021
+ function G(U, b) {
6022
6022
  B(b[0]) || (U[b[0]] = b[1]);
6023
6023
  }
6024
6024
  let j = {}, $ = {};
6025
- y.toJSON ? j = y.toJSON() : y instanceof Headers ? y.forEach((U, b) => V(j, [b, U])) : Array.isArray(y) ? y.forEach((U) => V(j, U)) : typeof y == "object" && Object.entries(y).forEach((U) => V(j, U));
6026
- const C = D || A;
6027
- C.toJSON ? $ = C.toJSON() : C instanceof Headers ? C.forEach((U, b) => V($, [b, U])) : Array.isArray(C) ? C.forEach((U) => V($, U)) : typeof C == "object" && Object.entries(C).forEach(([U, b]) => {
6025
+ y.toJSON ? j = y.toJSON() : y instanceof Headers ? y.forEach((U, b) => G(j, [b, U])) : Array.isArray(y) ? y.forEach((U) => G(j, U)) : typeof y == "object" && Object.entries(y).forEach((U) => G(j, U));
6026
+ const C = D || F;
6027
+ C.toJSON ? $ = C.toJSON() : C instanceof Headers ? C.forEach((U, b) => G($, [b, U])) : Array.isArray(C) ? C.forEach((U) => G($, U)) : typeof C == "object" && Object.entries(C).forEach(([U, b]) => {
6028
6028
  B(U) || ($[U] = b);
6029
6029
  });
6030
6030
  const L = s({
@@ -6044,8 +6044,8 @@ function fa(t, e, n, s, i) {
6044
6044
  t.debug.log("Openreplay: empty request/response info, skipping");
6045
6045
  return;
6046
6046
  }
6047
- const q = p.config.__openreplay_timing, G = performance.now() - q;
6048
- t.debug.log("Openreplay: final req object", L), t.send(xt("xhr", String(v), String(L.url), i(L.request), i(L.response), L.status, q + Ge(), G, 0));
6047
+ const V = p.config.__openreplay_timing, K = performance.now() - V;
6048
+ t.debug.log("Openreplay: final req object", L), t.send(xt("xhr", String(v), String(L.url), i(L.request), i(L.response), L.status, V + Ge(), K, 0));
6049
6049
  }
6050
6050
  function o(p) {
6051
6051
  if (t.debug.log("Openreplay: capturing API request", p), p.__openreplay_timing = performance.now(), n.sessionTokenHeader) {
@@ -6495,31 +6495,31 @@ function Ia(t, e = {}) {
6495
6495
  }
6496
6496
  const h = (c) => {
6497
6497
  if (n.useProxy)
6498
- return Ta(c, n.ignoreHeaders, o, l, (A) => t.send(A), (A) => t.isServiceURL(A), n.tokenUrlMatcher);
6499
- const u = c.fetch.bind(c), p = (A, k = {}) => {
6500
- if (!(typeof A == "string" || A instanceof URL) || t.isServiceURL(String(A)))
6501
- return u(A, k);
6498
+ return Ta(c, n.ignoreHeaders, o, l, (F) => t.send(F), (F) => t.isServiceURL(F), n.tokenUrlMatcher);
6499
+ const u = c.fetch.bind(c), p = (F, k = {}) => {
6500
+ if (!(typeof F == "string" || F instanceof URL) || t.isServiceURL(String(F)))
6501
+ return u(F, 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 u(F, k).then((O) => {
6507
6507
  const D = performance.now() - N;
6508
6508
  if (n.failuresOnly && O.status < 400)
6509
6509
  return O;
6510
6510
  const I = O.clone();
6511
6511
  return I.text().then((T) => {
6512
- const B = {}, V = {};
6512
+ const B = {}, G = {};
6513
6513
  if (s !== !0) {
6514
- const C = ([L, q]) => {
6515
- i(L) || (B[L] = q);
6514
+ const C = ([L, V]) => {
6515
+ i(L) || (B[L] = V);
6516
6516
  };
6517
- k.headers instanceof Headers ? k.headers.forEach((L, q) => C([q, L])) : Array.isArray(k.headers) ? k.headers.forEach(C) : typeof k.headers == "object" && Object.entries(k.headers).forEach(C), I.headers.forEach((L, q) => {
6518
- i(q) || (V[q] = L);
6517
+ k.headers instanceof Headers ? k.headers.forEach((L, V) => C([V, L])) : Array.isArray(k.headers) ? k.headers.forEach(C) : typeof k.headers == "object" && Object.entries(k.headers).forEach(C), I.headers.forEach((L, V) => {
6518
+ i(V) || (G[V] = L);
6519
6519
  });
6520
6520
  }
6521
6521
  const j = Ls(k.method), $ = l({
6522
- url: String(A),
6522
+ url: String(F),
6523
6523
  method: j,
6524
6524
  status: I.status,
6525
6525
  request: {
@@ -6528,7 +6528,7 @@ function Ia(t, e = {}) {
6528
6528
  body: k.body || null
6529
6529
  },
6530
6530
  response: {
6531
- headers: V,
6531
+ headers: G,
6532
6532
  body: T
6533
6533
  }
6534
6534
  });
@@ -6538,7 +6538,7 @@ function Ia(t, e = {}) {
6538
6538
  };
6539
6539
  c.fetch = p;
6540
6540
  const y = c.XMLHttpRequest.prototype.open, S = c.XMLHttpRequest.prototype.setRequestHeader, v = c.XMLHttpRequest.prototype.send;
6541
- function E(A, k) {
6541
+ function E(F, k) {
6542
6542
  const N = this;
6543
6543
  o((D, I) => N.setRequestHeader(D, I));
6544
6544
  let O = 0;
@@ -6546,11 +6546,11 @@ function Ia(t, e = {}) {
6546
6546
  O = D.timeStamp;
6547
6547
  }), N.addEventListener("load", t.safe((D) => {
6548
6548
  const { headers: I, body: T } = un(N), B = O > 0 ? D.timeStamp - O : 0, j = (N.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), $ = {};
6549
- j.forEach(function(q) {
6550
- const G = q.split(": "), U = G.shift();
6551
- i(U) || ($[U] = G.join(": "));
6549
+ j.forEach(function(V) {
6550
+ const K = V.split(": "), U = K.shift();
6551
+ i(U) || ($[U] = K.join(": "));
6552
6552
  });
6553
- const C = Ls(A), L = l({
6553
+ const C = Ls(F), L = l({
6554
6554
  url: String(k),
6555
6555
  method: C,
6556
6556
  status: N.status,
@@ -6567,18 +6567,18 @@ function Ia(t, e = {}) {
6567
6567
  L && t.send(xt("xhr", C, String(L.url), a(L.request), a(L.response), N.status, O + Ge(), B, 0));
6568
6568
  })), y.apply(this, arguments);
6569
6569
  }
6570
- function F(A) {
6570
+ function A(F) {
6571
6571
  const k = un(this);
6572
- return k.body = A, v.apply(this, arguments);
6572
+ return k.body = F, v.apply(this, arguments);
6573
6573
  }
6574
- function P(A, k) {
6575
- if (!i(A)) {
6574
+ function P(F, k) {
6575
+ if (!i(F)) {
6576
6576
  const N = un(this);
6577
- N.headers[A] = k;
6577
+ N.headers[F] = k;
6578
6578
  }
6579
6579
  return S.apply(this, arguments);
6580
6580
  }
6581
- n.axiosInstances || (c.XMLHttpRequest.prototype.open = E, c.XMLHttpRequest.prototype.send = F, c.XMLHttpRequest.prototype.setRequestHeader = P);
6581
+ n.axiosInstances || (c.XMLHttpRequest.prototype.open = E, c.XMLHttpRequest.prototype.send = A, c.XMLHttpRequest.prototype.setRequestHeader = P);
6582
6582
  };
6583
6583
  h(window), n.axiosInstances && n.axiosInstances.forEach((c) => {
6584
6584
  fa(t, c, n, l, a);
@@ -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), zr(r, e), _a(r)), na(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)), na(r, e.mouse), oa(r, this.crossdomainMode), ha(r), la(r), Ao(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);
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;
@@ -7329,11 +7329,11 @@ width: 100%;
7329
7329
  `, Ti = document.createElement("style");
7330
7330
  Ti.textContent = Ra;
7331
7331
  document.head.appendChild(Ti);
7332
- const Fa = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi", "ampely", "test"], Aa = "HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";
7333
- class Ft {
7332
+ const Aa = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi", "ampely", "test"], Fa = "HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";
7333
+ class At {
7334
7334
  constructor(e) {
7335
7335
  var n;
7336
- this.baseURL = "https://wineater-backend.vercel.app/", this.store = Fa.find((s) => window.location.href.includes(s)), this.token = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.CLIENT_TOKEN) || Aa;
7336
+ this.baseURL = "http://localhost:3000/", this.store = Aa.find((s) => window.location.href.includes(s)), this.token = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.CLIENT_TOKEN) || Fa;
7337
7337
  }
7338
7338
  async getStoreConfig(e) {
7339
7339
  console.log(e);
@@ -7430,7 +7430,7 @@ class Ft {
7430
7430
  }
7431
7431
  class Da {
7432
7432
  constructor() {
7433
- this.api = new Ft(), this.language = "en", this.translations = {
7433
+ this.api = new At(), this.language = "en", this.translations = {
7434
7434
  fr: {
7435
7435
  welcomeMessage: "Quel plat allez-vous déguster ? Décrivez-le-moi et je vous proposerai le vin qui l'accompagnera parfaitement.",
7436
7436
  noResultsFound: "Aucun résultat trouvé.",
@@ -7454,6 +7454,15 @@ class Da {
7454
7454
  widgetTitle: "TROUVEZ VOTRE VIN PARFAIT",
7455
7455
  widgetSubtitle: "Partagez tout ce que vous avez en tête—votre repas, humeur, budget ou occasion—et notre sommelier IA vous recommandera le vin parfait en quelques secondes",
7456
7456
  searchPlaceholder: "Entrez un mot-clé ou une description",
7457
+ wineDetails: {
7458
+ reason: "Raison",
7459
+ price: "Prix",
7460
+ region: "Région",
7461
+ type: "Type",
7462
+ moreInfo: "Plus d'infos",
7463
+ sommSelection: "Sélection Somm",
7464
+ code: "Code"
7465
+ },
7457
7466
  searchButton: "Rechercher",
7458
7467
  priceRange: "Gamme de prix",
7459
7468
  wineColor: "Couleur du vin",
@@ -7500,6 +7509,15 @@ class Da {
7500
7509
  widgetTitle: "ENCUENTRA TU VINO PERFECTO",
7501
7510
  widgetSubtitle: "Comparte cualquier cosa que tengas en mente—tu comida, estado de ánimo, presupuesto o evento—y nuestro sommelier de IA te recomendará el vino perfecto en segundos",
7502
7511
  searchPlaceholder: "Escribe una palabra clave o descripción",
7512
+ wineDetails: {
7513
+ reason: "Razón",
7514
+ price: "Precio",
7515
+ region: "Región",
7516
+ type: "Tipo",
7517
+ code: "Código",
7518
+ moreInfo: "Más información",
7519
+ sommSelection: "Selección Somm"
7520
+ },
7503
7521
  searchButton: "Buscar",
7504
7522
  priceRange: "Rango de precios",
7505
7523
  wineColor: "Color del vino",
@@ -7546,6 +7564,15 @@ class Da {
7546
7564
  widgetTitle: "FIND YOUR PERFECT WINE",
7547
7565
  widgetSubtitle: "Share anything on your mind—your meal, mood, budget, or occasion—and our AI sommelier will recommend the perfect wine in seconds",
7548
7566
  searchPlaceholder: "Enter a keyword or description",
7567
+ wineDetails: {
7568
+ price: "Price",
7569
+ region: "Region",
7570
+ type: "Type",
7571
+ moreInfo: "More info",
7572
+ reason: "Reason",
7573
+ sommSelection: "Somm Selection",
7574
+ code: "Code"
7575
+ },
7549
7576
  searchButton: "Search",
7550
7577
  priceRange: "Price Range",
7551
7578
  wineColor: "Wine Color",
@@ -7597,6 +7624,15 @@ class Da {
7597
7624
  "Empfohlen für eine Party"
7598
7625
  ],
7599
7626
  searchPlaceholder: "Geben Sie ein Stichwort oder eine Beschreibung ein",
7627
+ wineDetails: {
7628
+ price: "Preis",
7629
+ region: "Region",
7630
+ type: "Typ",
7631
+ moreInfo: "Mehr Infos",
7632
+ sommSelection: "Somm-Auswahl",
7633
+ reason: "Grund",
7634
+ code: "Code"
7635
+ },
7600
7636
  searchButton: "Suche",
7601
7637
  priceRange: "Preisspanne",
7602
7638
  wineColor: "Weinfarbe",
@@ -7625,10 +7661,17 @@ class Da {
7625
7661
  }
7626
7662
  }
7627
7663
  translate(e) {
7628
- return this.translations[this.language][e] || e;
7664
+ const n = e.split(".");
7665
+ let s = this.translations[this.language];
7666
+ for (const i of n)
7667
+ if (s && typeof s == "object" && i in s)
7668
+ s = s[i];
7669
+ else
7670
+ return e;
7671
+ return s;
7629
7672
  }
7630
7673
  }
7631
- const Y = new Da(), fn = {
7674
+ const q = new Da(), fn = {
7632
7675
  barName: "LENEZ",
7633
7676
  dishGroups: [
7634
7677
  {
@@ -7638,7 +7681,7 @@ const Y = new Da(), fn = {
7638
7681
  "Ensalada de arúgula y parmesano",
7639
7682
  "Tomate hierloom aliñado",
7640
7683
  "Aceitunas LENEZ",
7641
- "PapaBnaz",
7684
+ "Papatinaz",
7642
7685
  "Croquetas | hongos de temporada | jamón serrano",
7643
7686
  "Carpaccio Cesar",
7644
7687
  "Torreznos",
@@ -7659,13 +7702,13 @@ const Y = new Da(), fn = {
7659
7702
  "Jamón Ibérico de bellota",
7660
7703
  "Lomo ibérico",
7661
7704
  "Chorizo ibérico",
7662
- "Plato mixto"
7705
+ "Plato mixto iberico"
7663
7706
  ]
7664
7707
  },
7665
7708
  {
7666
7709
  groupTitle: "Quesos",
7667
7710
  dishes: [
7668
- "Selección de quesos"
7711
+ "Selección de quesos (D’Affinois, Brie Ermitage, Manchego semi curado, Roquefort)"
7669
7712
  ]
7670
7713
  },
7671
7714
  {
@@ -7683,7 +7726,7 @@ const Y = new Da(), fn = {
7683
7726
  class La {
7684
7727
  constructor() {
7685
7728
  var e;
7686
- this.widgetType = ((e = window == null ? void 0 : window.wineaterData) == null ? void 0 : e.WIDGET_TYPE) || "store", this.api = new Ft(), this.selectedFilters = {
7729
+ this.widgetType = ((e = window == null ? void 0 : window.wineaterData) == null ? void 0 : e.WIDGET_TYPE) || "store", this.api = new At(), this.selectedFilters = {
7687
7730
  price: null,
7688
7731
  color: null,
7689
7732
  intensity: null
@@ -7696,12 +7739,12 @@ class La {
7696
7739
  <div id="wine-widget-container">
7697
7740
  <div class="wine-widget-wrapper">
7698
7741
  <div id="wine-widget-header">
7699
- <h1>${Y.translate("widgetTitle")}</h1>
7700
- <p>${Y.translate("widgetSubtitle")}</p>
7742
+ <h1>${q.translate("widgetTitle")}</h1>
7743
+ <p>${q.translate("widgetSubtitle")}</p>
7701
7744
  </div>
7702
7745
  <div id="wine-widget-search">
7703
- <input type="text" id="wine-search-input" placeholder="${Y.translate("searchPlaceholder")}">
7704
- <button id="wine-search-button">${Y.translate("searchButton")}</button>
7746
+ <input type="text" id="wine-search-input" placeholder="${q.translate("searchPlaceholder")}">
7747
+ <button id="wine-search-button">${q.translate("searchButton")}</button>
7705
7748
  </div>
7706
7749
  <div id="wine-widget-right">
7707
7750
  <div id="loading-indicator" class="hidden">
@@ -7713,7 +7756,7 @@ class La {
7713
7756
  </div>
7714
7757
  <div id="powered-by-widget">
7715
7758
  <a href="https://wineater.com" target="_blank">
7716
- <span>${Y.translate("poweredBy")}</span>
7759
+ <span>${q.translate("poweredBy")}</span>
7717
7760
  <img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo.svg" alt="Wineater Logo">
7718
7761
  </a>
7719
7762
  </div>
@@ -7753,13 +7796,13 @@ class La {
7753
7796
  <input
7754
7797
  type="text"
7755
7798
  id="bar-notes-input"
7756
- placeholder="${Y.translate("barNotesPlaceholder")}"
7799
+ placeholder="${q.translate("barNotesPlaceholder")}"
7757
7800
  />
7758
7801
  <button id="bar-send-button">
7759
- ${Y.translate("barSendButton")}
7802
+ ${q.translate("barSendButton")}
7760
7803
  </button>
7761
7804
  <button id="bar-reset-button" class="hidden">
7762
- ${Y.translate("barResetButton")}
7805
+ ${q.translate("barResetButton")}
7763
7806
  </button>
7764
7807
  </div>
7765
7808
 
@@ -7799,17 +7842,18 @@ class La {
7799
7842
  const s = document.getElementById("wine-placeholder");
7800
7843
  this.hideLoadingIndicator(), s.innerHTML = "", e.forEach((i, r) => {
7801
7844
  const o = `
7802
- <div class="wine-recommendation-tile ${r === e.length - 1 ? "somm-selection" : ""}">
7803
- ${r === e.length - 1 ? '<div class="somm-selection-badge">Somm Selection</div>' : ""}
7804
- <img src="${i.Image}" alt="${i.Title}" />
7805
- <div class="tile-details">
7806
- <strong>${i.Title}</strong>
7807
- <p>Prix: ${i.Price || "N/A"}</p>
7808
- <p>Région: ${i.Region || "N/A"}</p>
7809
- <p>Type: ${i.Type || "N/A"}</p>
7810
- <a href="${i.Url}" target="_blank">Plus d'infos</a>
7811
- </div>
7812
- </div>
7845
+ <div class="wine-recommendation-tile ${i.isSommSelection ? "somm-selection" : ""}">
7846
+ ${i.isSommSelection ? `<div class="somm-selection-badge">${q.translate("wineDetails.sommSelection")}</div>` : ""}
7847
+ ${i.image ? `<img src="${i.image}" alt="${i.title}" />` : ""}
7848
+ <div class="tile-details">
7849
+ <strong>${i.title}</strong>
7850
+ <p>${q.translate("wineDetails.price")}: ${i.price || "N/A"}</p>
7851
+ <p>${q.translate("wineDetails.region")}: ${i.region || "N/A"}</p>
7852
+ <p>${q.translate("wineDetails.type")}: ${i.type || "N/A"}</p>
7853
+ ${this.widgetType === "bar" ? `<p>${q.translate("wineDetails.reason")}: ${i.pairing_recommendation || "N/A"}</p>` : ""}
7854
+ ${this.widgetType === "bar" ? `<p>${q.translate("wineDetails.code")}: ${i.url || "N/A"}</p>` : `<a href="${i.Url}" target="_blank">${q.translate("wineDetails.moreInfo")}</a>`}
7855
+ </div>
7856
+ </div>
7813
7857
  `;
7814
7858
  s.insertAdjacentHTML("beforeend", o);
7815
7859
  const l = s.children[r];
@@ -7838,7 +7882,7 @@ class La {
7838
7882
  const e = document.getElementById("wine-placeholder");
7839
7883
  e.innerHTML = `
7840
7884
  <div class="no-results">
7841
- <p>${Y.translate("noResultsMessage") || "No recommendations found for your query."}</p>
7885
+ <p>${q.translate("noResultsMessage") || "No recommendations found for your query."}</p>
7842
7886
  </div>
7843
7887
  `;
7844
7888
  }
@@ -7846,7 +7890,7 @@ class La {
7846
7890
  const e = document.getElementById("wine-placeholder");
7847
7891
  e.innerHTML = `
7848
7892
  <div class="error-message">
7849
- <p>${Y.translate("errorMessage") || "Something went wrong. Please try again later."}</p>
7893
+ <p>${q.translate("errorMessage") || "Something went wrong. Please try again later."}</p>
7850
7894
  </div>
7851
7895
  `;
7852
7896
  }
@@ -7890,7 +7934,7 @@ class La {
7890
7934
  }));
7891
7935
  }
7892
7936
  initializeSearchAnimation() {
7893
- const e = document.getElementById("wine-search-input"), n = Y.translate("placeholderSuggestions");
7937
+ const e = document.getElementById("wine-search-input"), n = q.translate("placeholderSuggestions");
7894
7938
  let s = 0, i = 0, r = !0, o = !1;
7895
7939
  const l = () => {
7896
7940
  o || (r ? (e.placeholder = n[s].substring(0, i++), i > n[s].length ? (r = !1, setTimeout(l, 2e3)) : setTimeout(l, 100)) : (e.placeholder = n[s].substring(0, i--), i < 0 ? (r = !0, s = (s + 1) % n.length, setTimeout(l, 500)) : setTimeout(l, 50)));
@@ -7905,8 +7949,8 @@ class La {
7905
7949
  class Ma {
7906
7950
  constructor() {
7907
7951
  var n;
7908
- this.api = new Ft();
7909
- const e = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.FIRST_MESSAGE_TEXT) || Y.translate("welcomeMessage");
7952
+ this.api = new At();
7953
+ const e = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.FIRST_MESSAGE_TEXT) || q.translate("welcomeMessage");
7910
7954
  this.displayFirstMessage(e);
7911
7955
  }
7912
7956
  initialize() {
@@ -7927,7 +7971,7 @@ class Ma {
7927
7971
  const s = await this.api.getWineRecommendations(n);
7928
7972
  this.hideTypingIndicator(), s && s.length ? this.displayResults(s) : this.displayMessage("No results found.", "api");
7929
7973
  } catch {
7930
- this.hideTypingIndicator(), this.displayMessage(Y.translate("somethingWentWrong"), "api");
7974
+ this.hideTypingIndicator(), this.displayMessage(q.translate("somethingWentWrong"), "api");
7931
7975
  }
7932
7976
  }
7933
7977
  }
@@ -7942,12 +7986,12 @@ class Ma {
7942
7986
  i.textContent = e, i.className = "message " + n, s.appendChild(i), s.scrollTop = s.scrollHeight;
7943
7987
  }
7944
7988
  sendAnalytics(e) {
7945
- console.log(e), Ai(e);
7989
+ console.log(e), Fi(e);
7946
7990
  }
7947
7991
  displayResults(e) {
7948
7992
  console.log(e);
7949
7993
  const n = document.getElementById("message-container");
7950
- Fi(e.map((s) => s.Title)), e.forEach((s) => {
7994
+ Ai(e.map((s) => s.Title)), e.forEach((s) => {
7951
7995
  const i = document.createElement("div");
7952
7996
  i.className = "wine-recommendation";
7953
7997
  const r = document.createElement("div");
@@ -7957,10 +8001,10 @@ class Ma {
7957
8001
  const l = document.createElement("div");
7958
8002
  l.innerHTML = `
7959
8003
  <strong>${s.Title}</strong><br>
7960
- ${Y.translate("price")}: ${s.Price}<br>
7961
- ${Y.translate("region")}: ${s.Region}<br>
7962
- ${Y.translate("type")}: ${s.Type}<br>
7963
- <a href="${s.Url}" target="_blank">${Y.translate("moreInfo")}</a>
8004
+ ${q.translate("price")}: ${s.Price}<br>
8005
+ ${q.translate("region")}: ${s.Region}<br>
8006
+ ${q.translate("type")}: ${s.Type}<br>
8007
+ <a href="${s.Url}" target="_blank">${q.translate("moreInfo")}</a>
7964
8008
  `, l.querySelector("a").addEventListener("click", (c) => {
7965
8009
  c.preventDefault(), this.sendAnalytics(s.Title), window.open(s.Url, "_blank");
7966
8010
  }), r.appendChild(l);
@@ -7986,7 +8030,7 @@ document.addEventListener("DOMContentLoaded", () => {
7986
8030
  function za(t) {
7987
8031
  gt = t;
7988
8032
  }
7989
- new Ft();
8033
+ new At();
7990
8034
  const ht = {
7991
8035
  PRODUCT_PAGES: /producto\/[^\/]+\/$/
7992
8036
  // Matches any product page like 'producto/any-product-name/'
@@ -8048,7 +8092,7 @@ class qa {
8048
8092
  }
8049
8093
  async initTranslator() {
8050
8094
  const e = this.store ? this.store.charAt(0).toUpperCase() + this.store.slice(1) : "Test";
8051
- await Y.fetchConfig(e || "Test");
8095
+ await q.fetchConfig(e || "Test");
8052
8096
  }
8053
8097
  initCookies() {
8054
8098
  var e;
@@ -8063,12 +8107,12 @@ class qa {
8063
8107
  <div id="chatbot-container">
8064
8108
  <div id="chat-icon">
8065
8109
  <img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/chat-icon.svg" alt="Chat Icon">
8066
- <span>${((i = window == null ? void 0 : window.wineaterData) == null ? void 0 : i.BUTTON_TEXT) || Y.translate(`chatButton${e}`)}</span>
8110
+ <span>${((i = window == null ? void 0 : window.wineaterData) == null ? void 0 : i.BUTTON_TEXT) || q.translate(`chatButton${e}`)}</span>
8067
8111
  </div>
8068
8112
  <div id="chat-window" class="hidden">
8069
8113
  <div id="chat-header">
8070
8114
  <div id="chat-title">
8071
- <h1>${Y.translate("chatTitle")}</h1>
8115
+ <h1>${q.translate("chatTitle")}</h1>
8072
8116
  </div>
8073
8117
  <div id="close-btn">&times;</div>
8074
8118
  </div>
@@ -8077,12 +8121,12 @@ class qa {
8077
8121
  <span></span><span></span><span></span>
8078
8122
  </div>
8079
8123
  <div id="input-container">
8080
- <input type="text" id="user-input" placeholder="${Y.translate("inputPlaceholder")}">
8081
- <button id="send-button">${Y.translate("sendButton")}</button>
8124
+ <input type="text" id="user-input" placeholder="${q.translate("inputPlaceholder")}">
8125
+ <button id="send-button">${q.translate("sendButton")}</button>
8082
8126
  </div>
8083
8127
  <div id="powered-by">
8084
8128
  <a href="https://wineater.com" target="_blank">
8085
- <span>${Y.translate("poweredBy")}</span>
8129
+ <span>${q.translate("poweredBy")}</span>
8086
8130
  <img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo.svg" alt="Wineater Logo" id="chatbot-logo">
8087
8131
  </a>
8088
8132
  </div>