@feedmepos/mf-inventory-portal 0.0.25-dev.19 → 0.0.25-dev.20

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.
Files changed (46) hide show
  1. package/dist/{App-Hgn8IBaK.js → App-oGRS_PEV.js} +2 -2
  2. package/dist/{ApprovalView-BSk9kEGm.js → ApprovalView-BnTD6HJE.js} +2 -2
  3. package/dist/{BindingsDialog-SxUwbW5x.js → BindingsDialog-DLLq9cDi.js} +2 -2
  4. package/dist/{BindingsPicker-_zOGJ17i.js → BindingsPicker-NXJruTzV.js} +1 -1
  5. package/dist/{BindingsTable-I8MLwuIR.js → BindingsTable-Bs211Phb.js} +1 -1
  6. package/dist/{ClosingDraftView-D80vDRO7.js → ClosingDraftView-B4_2-44Y.js} +2 -2
  7. package/dist/{ClosingTemplateView-BCE-SHm9.js → ClosingTemplateView-Db6Fn2kD.js} +2 -2
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BmLxDo6V.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-YNtFlw4B.js} +25 -25
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D21lpws0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-jnn4TF71.js} +1 -1
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-WTlNX0f8.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-nP9OAqMD.js} +1 -1
  11. package/dist/{IngredientGroupView-DDD_-og5.js → IngredientGroupView-Bc2_n2PG.js} +1 -1
  12. package/dist/{IngredientsView-CJ4F7BwZ.js → IngredientsView-BePK8LAK.js} +4 -4
  13. package/dist/{IntegrationView-B0TjX4yz.js → IntegrationView-CfpQDaZj.js} +1 -1
  14. package/dist/{InventoryBindingForm-DGXN2PXz.js → InventoryBindingForm-BiwiGKsQ.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-gQNCKIfa.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DgOJi8Lz.js} +3 -3
  16. package/dist/{InventoryBindingSummary-CDAivJA8.js → InventoryBindingSummary-CIMPOjDM.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CfaZ1GtI.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B-XKuP8P.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DmhP_O3l.js → PremiumBadge.vue_vue_type_script_setup_true_lang-45qs9f6I.js} +1 -1
  19. package/dist/{PublishView-DvriUy_9.js → PublishView-DgtRnkwT.js} +2 -2
  20. package/dist/{PurchaseOrderPrintPreview-Dr-I6VKI.js → PurchaseOrderPrintPreview-Cp_Ye4dK.js} +1 -1
  21. package/dist/{ReceiveRequestView-FcC0nStC.js → ReceiveRequestView-oe1V_bVC.js} +161 -160
  22. package/dist/{RecipeView-BMYzOsb2.js → RecipeView-Dy6W78uU.js} +3 -3
  23. package/dist/{StockView-gTmg4gih.js → StockView-D2kDteQe.js} +7 -7
  24. package/dist/{SupplierView-CrixDjq3.js → SupplierView-rNltG4Fy.js} +4 -4
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CX9l0sM4.js +1769 -0
  26. package/dist/{TransferTemplateView-DhgyCwnD.js → TransferTemplateView-PcJvtsk4.js} +7 -7
  27. package/dist/{UnitView-Bll1VTnD.js → UnitView-BSWzk_pn.js} +3 -3
  28. package/dist/{WarehouseView-KstzwWxq.js → WarehouseView-Dh-Q19A6.js} +1 -1
  29. package/dist/api/purchase-order.d.ts +1 -1
  30. package/dist/{app-qyqp2u_f.js → app-Dyd8pohX.js} +10 -10
  31. package/dist/app.js +1 -1
  32. package/dist/{decimal-BQ6Hkwom.js → decimal-aSw2Jae-.js} +1 -1
  33. package/dist/{feature-C6Z6N_iv.js → feature-BdLkjjxs.js} +215 -211
  34. package/dist/{format-unit-display-T-fT7FAg.js → format-unit-display-Ca92KbGT.js} +2 -2
  35. package/dist/{index-B6HIaHJq.js → index-Cvl2NcJ7.js} +2 -2
  36. package/dist/{stock-Cd6rXnhv.js → stock-CvQLThK4.js} +1 -1
  37. package/dist/stores/feature.d.ts +4 -3
  38. package/dist/{supplier-b6qWYeQu.js → supplier-C5hvXTbC.js} +1 -1
  39. package/dist/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/{use-ingredient-select-dialog-C8sylcwR.js → use-ingredient-select-dialog-BP_mP7e_.js} +1 -1
  41. package/dist/{use-inventory-binding-dialog-D7wI4_lU.js → use-inventory-binding-dialog-C_bBts1K.js} +1 -1
  42. package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +1 -1
  43. package/dist/views/receive-request/helper/print-po.d.ts +9 -2
  44. package/dist/{vue-i18n-BmWUvN1e.js → vue-i18n-Clx6r-KT.js} +209 -209
  45. package/package.json +3 -3
  46. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-15cqyqCC.js +0 -1567
@@ -1,13 +1,13 @@
1
1
  var fe = Object.defineProperty;
2
- var pe = (p, l, v) => l in p ? fe(p, l, { enumerable: !0, configurable: !0, writable: !0, value: v }) : p[l] = v;
3
- var ct = (p, l, v) => pe(p, typeof l != "symbol" ? l + "" : l, v);
2
+ var pe = (S, u, v) => u in S ? fe(S, u, { enumerable: !0, configurable: !0, writable: !0, value: v }) : S[u] = v;
3
+ var ct = (S, u, v) => pe(S, typeof u != "symbol" ? u + "" : u, v);
4
4
  import { useCoreStore as ht } from "@feedmepos/mf-common";
5
- import { a4 as vt, u as Ut, ax as re, a as ye } from "./app-qyqp2u_f.js";
6
- import { ref as dt, readonly as Dt } from "vue";
5
+ import { a4 as vt, u as Dt, ax as ae, a as ye } from "./app-Dyd8pohX.js";
6
+ import { ref as gt, readonly as Kt } from "vue";
7
7
  var Gt = { exports: {} };
8
- (function(p, l) {
8
+ (function(S, u) {
9
9
  (function(v, d) {
10
- d(l);
10
+ d(u);
11
11
  })(vt, function(v) {
12
12
  var d = { getItemSync: function(a) {
13
13
  try {
@@ -44,21 +44,21 @@ var Gt = { exports: {} };
44
44
  function s(f) {
45
45
  try {
46
46
  h(i.next(f));
47
- } catch (u) {
48
- r(u);
47
+ } catch (l) {
48
+ r(l);
49
49
  }
50
50
  }
51
51
  function c(f) {
52
52
  try {
53
53
  h(i.throw(f));
54
- } catch (u) {
55
- r(u);
54
+ } catch (l) {
55
+ r(l);
56
56
  }
57
57
  }
58
58
  function h(f) {
59
- var u;
60
- f.done ? n(f.value) : (u = f.value, u instanceof t ? u : new t(function(m) {
61
- m(u);
59
+ var l;
60
+ f.done ? n(f.value) : (l = f.value, l instanceof t ? l : new t(function(y) {
61
+ y(l);
62
62
  })).then(s, c);
63
63
  }
64
64
  h((i = i.apply(a, [])).next());
@@ -74,51 +74,51 @@ var Gt = { exports: {} };
74
74
  }), r;
75
75
  function c(h) {
76
76
  return function(f) {
77
- return function(u) {
77
+ return function(l) {
78
78
  if (t) throw new TypeError("Generator is already executing.");
79
79
  for (; s; ) try {
80
- if (t = 1, i && (n = 2 & u[0] ? i.return : u[0] ? i.throw || ((n = i.return) && n.call(i), 0) : i.next) && !(n = n.call(i, u[1])).done) return n;
81
- switch (i = 0, n && (u = [2 & u[0], n.value]), u[0]) {
80
+ if (t = 1, i && (n = 2 & l[0] ? i.return : l[0] ? i.throw || ((n = i.return) && n.call(i), 0) : i.next) && !(n = n.call(i, l[1])).done) return n;
81
+ switch (i = 0, n && (l = [2 & l[0], n.value]), l[0]) {
82
82
  case 0:
83
83
  case 1:
84
- n = u;
84
+ n = l;
85
85
  break;
86
86
  case 4:
87
- return s.label++, { value: u[1], done: !1 };
87
+ return s.label++, { value: l[1], done: !1 };
88
88
  case 5:
89
- s.label++, i = u[1], u = [0];
89
+ s.label++, i = l[1], l = [0];
90
90
  continue;
91
91
  case 7:
92
- u = s.ops.pop(), s.trys.pop();
92
+ l = s.ops.pop(), s.trys.pop();
93
93
  continue;
94
94
  default:
95
- if (n = s.trys, !((n = n.length > 0 && n[n.length - 1]) || u[0] !== 6 && u[0] !== 2)) {
95
+ if (n = s.trys, !((n = n.length > 0 && n[n.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
96
96
  s = 0;
97
97
  continue;
98
98
  }
99
- if (u[0] === 3 && (!n || u[1] > n[0] && u[1] < n[3])) {
100
- s.label = u[1];
99
+ if (l[0] === 3 && (!n || l[1] > n[0] && l[1] < n[3])) {
100
+ s.label = l[1];
101
101
  break;
102
102
  }
103
- if (u[0] === 6 && s.label < n[1]) {
104
- s.label = n[1], n = u;
103
+ if (l[0] === 6 && s.label < n[1]) {
104
+ s.label = n[1], n = l;
105
105
  break;
106
106
  }
107
107
  if (n && s.label < n[2]) {
108
- s.label = n[2], s.ops.push(u);
108
+ s.label = n[2], s.ops.push(l);
109
109
  break;
110
110
  }
111
111
  n[2] && s.ops.pop(), s.trys.pop();
112
112
  continue;
113
113
  }
114
- u = e.call(a, s);
115
- } catch (m) {
116
- u = [6, m], i = 0;
114
+ l = e.call(a, s);
115
+ } catch (y) {
116
+ l = [6, y], i = 0;
117
117
  } finally {
118
118
  t = n = 0;
119
119
  }
120
- if (5 & u[0]) throw u[1];
121
- return { value: u[0] ? u[1] : void 0, done: !0 };
120
+ if (5 & l[0]) throw l[1];
121
+ return { value: l[0] ? l[1] : void 0, done: !0 };
122
122
  }([h, f]);
123
123
  };
124
124
  }
@@ -160,77 +160,77 @@ var Gt = { exports: {} };
160
160
  }), Object.keys(t).length ? t : null;
161
161
  }
162
162
  var F, g;
163
- function y(a, e, t) {
163
+ function p(a, e, t) {
164
164
  var i = "shortString", n = !0;
165
165
  typeof t == "number" && (i = "javaDouble", n = !1), a[i] = a[i] || {}, a[i][e] = n ? t + "" : t;
166
166
  }
167
167
  function C(a) {
168
168
  return !!a && typeof a == "object" && a.value !== void 0;
169
169
  }
170
- function R(a) {
170
+ function k(a) {
171
171
  return Object.fromEntries(Object.entries(a).map(function(e) {
172
172
  var t = e[0], i = e[1];
173
173
  return [t, C(i) ? i : { value: i }];
174
174
  }));
175
175
  }
176
176
  function z(a) {
177
- return o(o({}, a), { identity: a.identity ? o(o({}, a.identity), { traits: R(a.identity.traits || {}) }) : void 0 });
177
+ return o(o({}, a), { identity: a.identity ? o(o({}, a.identity), { traits: k(a.identity.traits || {}) }) : void 0 });
178
178
  }
179
179
  (function(a) {
180
180
  a.NONE = "NONE", a.DEFAULT_FLAGS = "DEFAULT_FLAGS", a.CACHE = "CACHE", a.SERVER = "SERVER";
181
181
  })(F || (F = {}));
182
- var Y, I = null, ce = "FLAGSMITH_EVENT", lt = ce, Vt = "https://edge.api.flagsmith.com/api/v1/", Mt = "flagsmith_value_", Bt = "flagsmith_enabled_", zt = "flagsmith_trait_", he = function() {
182
+ var Y, L = null, ce = "FLAGSMITH_EVENT", lt = ce, Jt = "https://edge.api.flagsmith.com/api/v1/", Vt = "flagsmith_value_", Mt = "flagsmith_enabled_", Bt = "flagsmith_trait_", he = function() {
183
183
  function a(e) {
184
184
  var t = this;
185
185
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
186
186
  var i = t, n = i.api, r = i.evaluationContext;
187
187
  t.log("Get Flags"), t.isLoading = !0, t.loadingState.isFetching || t.setLoadingState(o(o({}, t.loadingState), { isFetching: !0 }));
188
188
  var s = "".concat(t.getContext().identity), c = function(h) {
189
- var f, u, m, x;
189
+ var f, l, y, x;
190
190
  if (h && s === "".concat(t.getContext().identity)) {
191
- var D = h.flags, A = h.traits, k = h.identifier;
191
+ var D = h.flags, A = h.traits, R = h.identifier;
192
192
  t.isLoading = !1;
193
193
  var j = {}, P = {};
194
- A = A || [], (D = D || []).forEach(function(S) {
195
- j[S.feature.name.toLowerCase().replace(/ /g, "_")] = { id: S.feature.id, enabled: S.enabled, value: S.feature_state_value };
196
- }), A.forEach(function(S) {
197
- P[S.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: S.transient, value: S.trait_value };
194
+ A = A || [], (D = D || []).forEach(function(m) {
195
+ j[m.feature.name.toLowerCase().replace(/ /g, "_")] = { id: m.feature.id, enabled: m.enabled, value: m.feature_state_value };
196
+ }), A.forEach(function(m) {
197
+ P[m.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: m.transient, value: m.trait_value };
198
198
  }), t.oldFlags = o({}, t.flags);
199
199
  var K = _(t.oldFlags, j), nt = _((f = t.evaluationContext.identity) === null || f === void 0 ? void 0 : f.traits, P);
200
- if ((k || Object.keys(P).length) && (t.evaluationContext.identity = o(o({}, t.evaluationContext.identity), { traits: P }), k && (t.evaluationContext.identity.identifier = k)), t.flags = j, t.updateStorage(), t._onChange(t.oldFlags, { isFromServer: !0, flagsChanged: K, traitsChanged: nt }, t._loadedState(null, F.SERVER)), t.datadogRum) try {
200
+ if ((R || Object.keys(P).length) && (t.evaluationContext.identity = o(o({}, t.evaluationContext.identity), { traits: P }), R && (t.evaluationContext.identity.identifier = R)), t.flags = j, t.updateStorage(), t._onChange(t.oldFlags, { isFromServer: !0, flagsChanged: K, traitsChanged: nt }, t._loadedState(null, F.SERVER)), t.datadogRum) try {
201
201
  if (t.datadogRum.trackTraits) {
202
202
  var it = {};
203
- Object.keys(((u = t.evaluationContext.identity) === null || u === void 0 ? void 0 : u.traits) || {}).map(function(S) {
204
- it[zt + S] = t.getTrait(S);
203
+ Object.keys(((l = t.evaluationContext.identity) === null || l === void 0 ? void 0 : l.traits) || {}).map(function(m) {
204
+ it[Bt + m] = t.getTrait(m);
205
205
  });
206
- var Z = o(o(o({}, t.datadogRum.client.getUser()), { id: t.datadogRum.client.getUser().id || ((m = t.evaluationContext.identity) === null || m === void 0 ? void 0 : m.identifier) }), it);
206
+ var Z = o(o(o({}, t.datadogRum.client.getUser()), { id: t.datadogRum.client.getUser().id || ((y = t.evaluationContext.identity) === null || y === void 0 ? void 0 : y.identifier) }), it);
207
207
  t.log("Setting Datadog user", Z), t.datadogRum.client.setUser(Z);
208
208
  }
209
- } catch (S) {
210
- console.error(S);
209
+ } catch (m) {
210
+ console.error(m);
211
211
  }
212
212
  if (t.dtrum) try {
213
213
  var w = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
214
- Object.keys(t.flags).map(function(S) {
215
- y(w, Mt + S, t.getValue(S, { skipAnalytics: !0 })), y(w, Bt + S, t.hasFeature(S, { skipAnalytics: !0 }));
216
- }), Object.keys(((x = t.evaluationContext.identity) === null || x === void 0 ? void 0 : x.traits) || {}).map(function(S) {
217
- y(w, zt + S, t.getTrait(S));
214
+ Object.keys(t.flags).map(function(m) {
215
+ p(w, Vt + m, t.getValue(m, { skipAnalytics: !0 })), p(w, Mt + m, t.hasFeature(m, { skipAnalytics: !0 }));
216
+ }), Object.keys(((x = t.evaluationContext.identity) === null || x === void 0 ? void 0 : x.traits) || {}).map(function(m) {
217
+ p(w, Bt + m, t.getTrait(m));
218
218
  }), t.log("Sending javaLongOrObject traits to dynatrace", w.javaLongOrObject), t.log("Sending date traits to dynatrace", w.date), t.log("Sending shortString traits to dynatrace", w.shortString), t.log("Sending javaDouble to dynatrace", w.javaDouble), t.dtrum.sendSessionProperties(w.javaLongOrObject, w.date, w.shortString, w.javaDouble);
219
- } catch (S) {
220
- console.error(S);
219
+ } catch (m) {
220
+ console.error(m);
221
221
  }
222
222
  }
223
223
  };
224
224
  return r.identity ? Promise.all([r.identity.traits && Object.keys(r.identity.traits).length || !r.identity.identifier ? t.getJSON(n + "identities/", "POST", JSON.stringify({ identifier: r.identity.identifier, transient: r.identity.transient, traits: Object.entries(r.identity.traits).map(function(h) {
225
- var f = h[0], u = h[1];
226
- return { trait_key: f, trait_value: u == null ? void 0 : u.value, transient: u == null ? void 0 : u.transient };
225
+ var f = h[0], l = h[1];
226
+ return { trait_key: f, trait_value: l == null ? void 0 : l.value, transient: l == null ? void 0 : l.transient };
227
227
  }).filter(function(h) {
228
228
  return h.trait_value !== void 0 || (t.log("Warning - attempted to set an undefined trait value for key", h.trait_key), !1);
229
229
  }) })) : t.getJSON(n + "identities/?identifier=" + encodeURIComponent(r.identity.identifier) + (r.identity.transient ? "&transient=true" : ""))]).then(function(h) {
230
230
  return t.evaluationContext.identity = o(o({}, t.evaluationContext.identity), { traits: {} }), c(h == null ? void 0 : h[0]);
231
231
  }).catch(function(h) {
232
- var f = h.message, u = new Error(f);
233
- return Promise.reject(u);
232
+ var f = h.message, l = new Error(f);
233
+ return Promise.reject(l);
234
234
  }) : t.getJSON(n + "flags/").then(function(h) {
235
235
  return c({ flags: h, traits: void 0 });
236
236
  });
@@ -271,7 +271,7 @@ var Gt = { exports: {} };
271
271
  return t.setContext(o(o({}, t.getContext()), i));
272
272
  }, this.setTrait = function(i, n) {
273
273
  var r;
274
- if (t.api) return t.setContext(o(o({}, t.evaluationContext), { identity: o(o({}, t.evaluationContext.identity), { traits: o(o({}, (r = t.evaluationContext.identity) === null || r === void 0 ? void 0 : r.traits), R(Object.fromEntries([[i, n]]))) }) }));
274
+ if (t.api) return t.setContext(o(o({}, t.evaluationContext), { identity: o(o({}, t.evaluationContext.identity), { traits: o(o({}, (r = t.evaluationContext.identity) === null || r === void 0 ? void 0 : r.traits), k(Object.fromEntries([[i, n]]))) }) }));
275
275
  }, this.setTraits = function(i) {
276
276
  var n;
277
277
  if (t.api) return t.setContext(o(o({}, t.evaluationContext), { identity: o(o({}, t.evaluationContext.identity), { traits: o(o({}, (n = t.evaluationContext.identity) === null || n === void 0 ? void 0 : n.traits), Object.fromEntries(Object.entries(i).map(function(r) {
@@ -290,31 +290,31 @@ var Gt = { exports: {} };
290
290
  c.evaluationContext;
291
291
  var h = c.headers, f = { method: n || "GET", body: r, cache: "no-cache", headers: {} };
292
292
  t.evaluationContext.environment && (f.headers["X-Environment-Key"] = t.evaluationContext.environment.apiKey), n && n !== "GET" && (f.headers["Content-Type"] = "application/json; charset=utf-8"), h && Object.assign(f.headers, h), g || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
293
- var u = "".concat((s = t.evaluationContext.identity) === null || s === void 0 ? void 0 : s.identifier);
294
- return g(i, f).then(function(m) {
293
+ var l = "".concat((s = t.evaluationContext.identity) === null || s === void 0 ? void 0 : s.identifier);
294
+ return g(i, f).then(function(y) {
295
295
  var x, D, A = "".concat((x = t.evaluationContext.identity) === null || x === void 0 ? void 0 : x.identifier);
296
- if (u === A) {
297
- var k = (D = m.headers) === null || D === void 0 ? void 0 : D.get("x-flagsmith-document-updated-at");
298
- if (k) try {
299
- var j = parseFloat(k);
296
+ if (l === A) {
297
+ var R = (D = y.headers) === null || D === void 0 ? void 0 : D.get("x-flagsmith-document-updated-at");
298
+ if (R) try {
299
+ var j = parseFloat(R);
300
300
  if (isNaN(j)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
301
301
  t.timestamp = j;
302
302
  } catch (P) {
303
- t.log(P, "Failed to parse x-flagsmith-document-updated-at", k);
303
+ t.log(P, "Failed to parse x-flagsmith-document-updated-at", R);
304
304
  }
305
- return t.log("Fetch response: " + m.status + " " + (n || "GET") + 0 + i), m.text().then(function(P) {
305
+ return t.log("Fetch response: " + y.status + " " + (n || "GET") + 0 + i), y.text().then(function(P) {
306
306
  var K = P;
307
307
  try {
308
308
  K = JSON.parse(P);
309
309
  } catch {
310
310
  }
311
- return !K && m.status && (K = "API Response: ".concat(m.status)), m.status && m.status >= 200 && m.status < 300 ? K : Promise.reject(new Error(K));
311
+ return !K && y.status && (K = "API Response: ".concat(y.status)), y.status && y.status >= 200 && y.status < 300 ? K : Promise.reject(new Error(K));
312
312
  });
313
313
  }
314
- t.log("Received response with identity mismatch, ignoring response. Requested: ".concat(u, ", Current: ").concat(A));
314
+ t.log("Received response with identity mismatch, ignoring response. Requested: ".concat(l, ", Current: ").concat(A));
315
315
  });
316
316
  }, this.evaluateFlag = function(i, n) {
317
- if (t.datadogRum && (t.datadogRum.client.addFeatureFlagEvaluation ? n === "VALUE" ? t.datadogRum.client.addFeatureFlagEvaluation(Mt + i, t.getValue(i, {}, !0)) : t.datadogRum.client.addFeatureFlagEvaluation(Bt + i, t.hasFeature(i, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), t.enableAnalytics) {
317
+ if (t.datadogRum && (t.datadogRum.client.addFeatureFlagEvaluation ? n === "VALUE" ? t.datadogRum.client.addFeatureFlagEvaluation(Vt + i, t.getValue(i, {}, !0)) : t.datadogRum.client.addFeatureFlagEvaluation(Mt + i, t.hasFeature(i, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), t.enableAnalytics) {
318
318
  if (!t.evaluationEvent || !t.evaluationContext.environment) return;
319
319
  t.evaluationEvent[t.evaluationContext.environment.apiKey] || (t.evaluationEvent[t.evaluationContext.environment.apiKey] = {}), t.evaluationEvent[t.evaluationContext.environment.apiKey][i] === void 0 && (t.evaluationEvent[t.evaluationContext.environment.apiKey][i] = 0), t.evaluationEvent[t.evaluationContext.environment.apiKey][i] += 1;
320
320
  }
@@ -322,23 +322,23 @@ var Gt = { exports: {} };
322
322
  }, this._onChange = function(i, n, r) {
323
323
  var s, c;
324
324
  t.setLoadingState(r), (s = t.onChange) === null || s === void 0 || s.call(t, i, n, t.loadingState), (c = t._trigger) === null || c === void 0 || c.call(t);
325
- }, g = e.fetch ? e.fetch : typeof fetch < "u" ? fetch : vt === null || vt === void 0 ? void 0 : vt.fetch, this.canUseStorage = typeof window < "u" || !!e.browserlessStorage, this.log("Constructing flagsmith instance " + e), e.eventSource && (Y = e.eventSource), e.AsyncStorage && (I = e.AsyncStorage);
325
+ }, g = e.fetch ? e.fetch : typeof fetch < "u" ? fetch : vt === null || vt === void 0 ? void 0 : vt.fetch, this.canUseStorage = typeof window < "u" || !!e.browserlessStorage, this.log("Constructing flagsmith instance " + e), e.eventSource && (Y = e.eventSource), e.AsyncStorage && (L = e.AsyncStorage);
326
326
  }
327
327
  return a.prototype.init = function(e) {
328
328
  var t, i, n;
329
329
  return E(this, void 0, void 0, function() {
330
- var r, s, c, h, f, u, m, x, D, A, k, j, P, K, nt, it, Z, w, S, ft, at, Zt, Q, pt, Qt, te, yt, ee, mt, rt, tt, ne, O = this;
330
+ var r, s, c, h, f, l, y, x, D, A, R, j, P, K, nt, it, Z, w, m, pt, at, Yt, Q, yt, Zt, Qt, mt, te, St, rt, tt, ee, O = this;
331
331
  return M(this, function(U) {
332
332
  switch (U.label) {
333
333
  case 0:
334
334
  r = z(e.evaluationContext || this.evaluationContext), U.label = 1;
335
335
  case 1:
336
- if (U.trys.push([1, 13, , 14]), s = e.environmentID, c = e.api, h = c === void 0 ? Vt : c, f = e.headers, u = e.onChange, m = e.cacheFlags, x = e.datadogRum, D = e.onError, A = e.defaultFlags, k = e.fetch, j = e.preventFetch, P = e.enableLogs, K = e.enableDynatrace, nt = e.enableAnalytics, it = e.realtime, Z = e.eventSourceUrl, w = Z === void 0 ? "https://realtime.flagsmith.com/" : Z, S = e.AsyncStorage, ft = e.identity, at = e.traits, Zt = e.state, Q = e.cacheOptions, pt = e.angularHttpClient, Qt = e._trigger, te = e._triggerLoadingState, r.environment = s ? { apiKey: s } : r.environment, !r.environment || !r.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
337
- if (r.identity = ft || at ? { identifier: ft, traits: at ? Object.fromEntries(Object.entries(at).map(function(N) {
336
+ if (U.trys.push([1, 13, , 14]), s = e.environmentID, c = e.api, h = c === void 0 ? Jt : c, f = e.headers, l = e.onChange, y = e.cacheFlags, x = e.datadogRum, D = e.onError, A = e.defaultFlags, R = e.fetch, j = e.preventFetch, P = e.enableLogs, K = e.enableDynatrace, nt = e.enableAnalytics, it = e.realtime, Z = e.eventSourceUrl, w = Z === void 0 ? "https://realtime.flagsmith.com/" : Z, m = e.AsyncStorage, pt = e.identity, at = e.traits, Yt = e.state, Q = e.cacheOptions, yt = e.angularHttpClient, Zt = e._trigger, Qt = e._triggerLoadingState, r.environment = s ? { apiKey: s } : r.environment, !r.environment || !r.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
337
+ if (r.identity = pt || at ? { identifier: pt, traits: at ? Object.fromEntries(Object.entries(at).map(function(N) {
338
338
  return [N[0], { value: N[1] }];
339
- })) : {} } : r.identity, this.evaluationContext = r, this.api = h, this.headers = f, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = u, yt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Qt || this._trigger, this._triggerLoadingState = te || this._triggerLoadingState, this.onError = function(N) {
339
+ })) : {} } : r.identity, this.evaluationContext = r, this.api = h, this.headers = f, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = l, mt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Zt || this._trigger, this._triggerLoadingState = Qt || this._triggerLoadingState, this.onError = function(N) {
340
340
  O.setLoadingState(o(o({}, O.loadingState), { isFetching: !1, isLoading: !1, error: N })), D == null || D(N);
341
- }, this.enableLogs = P || !1, this.cacheOptions = Q ? { skipAPI: !!Q.skipAPI, ttl: Q.ttl || 0, storageKey: Q.storageKey, loadStale: !!Q.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."), k && (g = k), this.enableAnalytics = nt || !1, this.flags = Object.assign({}, A) || {}, this.datadogRum = x || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = I !== void 0 && !!m, lt = "FLAGSMITH_EVENT_" + r.environment.apiKey, S && (I = S), it && typeof window < "u" && this.setupRealtime(w, r.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = o(o({}, this.loadingState), { isLoading: !1, source: F.DEFAULT_FLAGS })), this.setState(Zt), this.log("Initialising with properties", e, this), K && (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), pt && (g = /* @__PURE__ */ function(N) {
341
+ }, this.enableLogs = P || !1, this.cacheOptions = Q ? { skipAPI: !!Q.skipAPI, ttl: Q.ttl || 0, storageKey: Q.storageKey, loadStale: !!Q.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."), R && (g = R), this.enableAnalytics = nt || !1, this.flags = Object.assign({}, A) || {}, this.datadogRum = x || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = L !== void 0 && !!y, lt = "FLAGSMITH_EVENT_" + r.environment.apiKey, m && (L = m), it && typeof window < "u" && this.setupRealtime(w, r.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = o(o({}, this.loadingState), { isLoading: !1, source: F.DEFAULT_FLAGS })), this.setState(Yt), this.log("Initialising with properties", e, this), K && (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), yt && (g = /* @__PURE__ */ function(N) {
342
342
  return function(G, J) {
343
343
  var H = J.headers, b = J.method, et = J.body;
344
344
  return new Promise(function(W) {
@@ -359,14 +359,14 @@ var Gt = { exports: {} };
359
359
  }
360
360
  });
361
361
  };
362
- }(pt)), I && this.canUseStorage && I.getItem(lt).then(function(N) {
362
+ }(yt)), L && this.canUseStorage && L.getItem(lt).then(function(N) {
363
363
  try {
364
364
  O.evaluationEvent = JSON.parse(N) || {};
365
365
  } catch {
366
366
  O.evaluationEvent = {};
367
367
  }
368
368
  O.analyticsInterval = setInterval(O.analyticsFlags, O.ticks);
369
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), I && this.canUseStorage && I.getItem(lt, function(N, G) {
369
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), L && this.canUseStorage && L.getItem(lt, function(N, G) {
370
370
  if (G && O.evaluationContext.environment) {
371
371
  var J = JSON.parse(G);
372
372
  if (J[O.evaluationContext.environment.apiKey]) {
@@ -374,20 +374,20 @@ var Gt = { exports: {} };
374
374
  O.log("Retrieved events from cache", G), O.setState(o(o({}, H), { evaluationEvent: J[O.evaluationContext.environment.apiKey] }));
375
375
  }
376
376
  }
377
- })), !m) return [3, 9];
378
- if (!I || !this.canUseStorage) return [3, 8];
379
- ee = function(N, G) {
377
+ })), !y) return [3, 9];
378
+ if (!L || !this.canUseStorage) return [3, 8];
379
+ te = function(N, G) {
380
380
  return E(O, void 0, void 0, function() {
381
- var J, H, b, et, W, B, St, ie, bt, Ct, _t, Et, Ft, xt, wt, Ot, It, Lt, Tt, At, jt, Pt, Nt, Rt, ae = this;
381
+ var J, H, b, et, W, B, bt, ne, Ct, _t, Et, Ft, xt, wt, Ot, It, Lt, Tt, At, jt, Pt, Nt, kt, Rt, ie = this;
382
382
  return M(this, function($) {
383
383
  switch ($.label) {
384
384
  case 0:
385
385
  if (!G) return [3, 7];
386
386
  J = null, H = null, $.label = 1;
387
387
  case 1:
388
- return $.trys.push([1, 5, , 6]), b = JSON.parse(G), et = !1, W = !1, b && b.api === this.api && ((Ct = (bt = b.evaluationContext) === null || bt === void 0 ? void 0 : bt.environment) === null || Ct === void 0 ? void 0 : Ct.apiKey) === ((_t = this.evaluationContext.environment) === null || _t === void 0 ? void 0 : _t.apiKey) && (B = !0, this.evaluationContext.identity && ((Ft = (Et = b.evaluationContext) === null || Et === void 0 ? void 0 : Et.identity) === null || Ft === void 0 ? void 0 : Ft.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((wt = (xt = b.evaluationContext) === null || xt === void 0 ? void 0 : xt.identity) === null || wt === void 0 ? void 0 : wt.identifier) + " to " + this.evaluationContext.identity.identifier), B = !1), this.cacheOptions.ttl && (!b.ts || (/* @__PURE__ */ new Date()).valueOf() - b.ts > this.cacheOptions.ttl) && (b.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + b.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - b.ts) + "ms"), B = !1) : b.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + b.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - b.ts) + "ms"), W = !0, B = !0)), B && (et = !0, H = _((Ot = this.evaluationContext.identity) === null || Ot === void 0 ? void 0 : Ot.traits, (Lt = (It = b.evaluationContext) === null || It === void 0 ? void 0 : It.identity) === null || Lt === void 0 ? void 0 : Lt.traits), J = _(this.flags, b.flags), this.setState(o(o({}, b), { evaluationContext: z(o(o({}, b.evaluationContext), { identity: !((Tt = b.evaluationContext) === null || Tt === void 0) && Tt.identity ? o(o({}, (At = b.evaluationContext) === null || At === void 0 ? void 0 : At.identity), { traits: o(o({}, ((Pt = (jt = b.evaluationContext) === null || jt === void 0 ? void 0 : jt.identity) === null || Pt === void 0 ? void 0 : Pt.traits) || {}), at || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", b))), et ? (St = !j && (!this.cacheOptions.skipAPI || W), this._onChange(null, { isFromServer: !1, flagsChanged: J, traitsChanged: H }, this._loadedState(null, F.CACHE, St)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && et && !W && this.log("Skipping API, using cache"), St && this.getFlags().catch(function(ge) {
389
- var kt;
390
- (kt = ae.onError) === null || kt === void 0 || kt.call(ae, ge);
388
+ return $.trys.push([1, 5, , 6]), b = JSON.parse(G), et = !1, W = !1, b && b.api === this.api && ((_t = (Ct = b.evaluationContext) === null || Ct === void 0 ? void 0 : Ct.environment) === null || _t === void 0 ? void 0 : _t.apiKey) === ((Et = this.evaluationContext.environment) === null || Et === void 0 ? void 0 : Et.apiKey) && (B = !0, this.evaluationContext.identity && ((xt = (Ft = b.evaluationContext) === null || Ft === void 0 ? void 0 : Ft.identity) === null || xt === void 0 ? void 0 : xt.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Ot = (wt = b.evaluationContext) === null || wt === void 0 ? void 0 : wt.identity) === null || Ot === void 0 ? void 0 : Ot.identifier) + " to " + this.evaluationContext.identity.identifier), B = !1), this.cacheOptions.ttl && (!b.ts || (/* @__PURE__ */ new Date()).valueOf() - b.ts > this.cacheOptions.ttl) && (b.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + b.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - b.ts) + "ms"), B = !1) : b.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + b.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - b.ts) + "ms"), W = !0, B = !0)), B && (et = !0, H = _((It = this.evaluationContext.identity) === null || It === void 0 ? void 0 : It.traits, (Tt = (Lt = b.evaluationContext) === null || Lt === void 0 ? void 0 : Lt.identity) === null || Tt === void 0 ? void 0 : Tt.traits), J = _(this.flags, b.flags), this.setState(o(o({}, b), { evaluationContext: z(o(o({}, b.evaluationContext), { identity: !((At = b.evaluationContext) === null || At === void 0) && At.identity ? o(o({}, (jt = b.evaluationContext) === null || jt === void 0 ? void 0 : jt.identity), { traits: o(o({}, ((Nt = (Pt = b.evaluationContext) === null || Pt === void 0 ? void 0 : Pt.identity) === null || Nt === void 0 ? void 0 : Nt.traits) || {}), at || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", b))), et ? (bt = !j && (!this.cacheOptions.skipAPI || W), this._onChange(null, { isFromServer: !1, flagsChanged: J, traitsChanged: H }, this._loadedState(null, F.CACHE, bt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && et && !W && this.log("Skipping API, using cache"), bt && this.getFlags().catch(function(ge) {
389
+ var Ut;
390
+ (Ut = ie.onError) === null || Ut === void 0 || Ut.call(ie, ge);
391
391
  }), [3, 4]) : [3, 2];
392
392
  case 2:
393
393
  return j ? [3, 4] : [4, this.getFlags()];
@@ -396,7 +396,7 @@ var Gt = { exports: {} };
396
396
  case 4:
397
397
  return [3, 6];
398
398
  case 5:
399
- return ie = $.sent(), this.log("Exception fetching cached logs", ie), [3, 6];
399
+ return ne = $.sent(), this.log("Exception fetching cached logs", ne), [3, 6];
400
400
  case 6:
401
401
  return [3, 10];
402
402
  case 7:
@@ -404,9 +404,9 @@ var Gt = { exports: {} };
404
404
  case 8:
405
405
  return $.sent(), [3, 10];
406
406
  case 9:
407
- if (A) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Nt = this.evaluationContext.identity) === null || Nt === void 0 ? void 0 : Nt.traits) }, this._loadedState(null, F.DEFAULT_FLAGS));
407
+ if (A) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (kt = this.evaluationContext.identity) === null || kt === void 0 ? void 0 : kt.traits) }, this._loadedState(null, F.DEFAULT_FLAGS));
408
408
  else {
409
- if (!this.flags) throw new Error(yt);
409
+ if (!this.flags) throw new Error(mt);
410
410
  this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (Rt = this.evaluationContext.identity) === null || Rt === void 0 ? void 0 : Rt.traits) }, this._loadedState(null, F.DEFAULT_FLAGS));
411
411
  }
412
412
  $.label = 10;
@@ -417,13 +417,13 @@ var Gt = { exports: {} };
417
417
  });
418
418
  }, U.label = 2;
419
419
  case 2:
420
- return U.trys.push([2, 7, , 8]), I.getItemSync ? (mt = I.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
420
+ return U.trys.push([2, 7, , 8]), L.getItemSync ? (St = L.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
421
421
  case 3:
422
- return [4, I.getItem(this.getStorageKey())];
422
+ return [4, L.getItem(this.getStorageKey())];
423
423
  case 4:
424
- mt = U.sent(), U.label = 5;
424
+ St = U.sent(), U.label = 5;
425
425
  case 5:
426
- return [4, ee(null, mt)];
426
+ return [4, te(null, St)];
427
427
  case 6:
428
428
  case 7:
429
429
  return U.sent(), [3, 8];
@@ -435,12 +435,12 @@ var Gt = { exports: {} };
435
435
  return U.sent(), [3, 12];
436
436
  case 11:
437
437
  if (A) this._onChange(null, { isFromServer: !1, flagsChanged: _({}, A), traitsChanged: _({}, (t = r.identity) === null || t === void 0 ? void 0 : t.traits) }, this._loadedState(null, F.DEFAULT_FLAGS));
438
- else if (this.flags && (rt = null, Object.keys(this.flags).length === 0 && (rt = yt), this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (i = r.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(rt, F.DEFAULT_FLAGS)), rt)) throw new Error(rt);
438
+ else if (this.flags && (rt = null, Object.keys(this.flags).length === 0 && (rt = mt), this._onChange(null, { isFromServer: !1, flagsChanged: _({}, this.flags), traitsChanged: _({}, (i = r.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(rt, F.DEFAULT_FLAGS)), rt)) throw new Error(rt);
439
439
  U.label = 12;
440
440
  case 12:
441
441
  return [3, 14];
442
442
  case 13:
443
- throw tt = U.sent(), this.log("Error during initialisation ", tt), ne = tt instanceof Error ? tt : new Error("".concat(tt)), (n = this.onError) === null || n === void 0 || n.call(this, ne), tt;
443
+ throw tt = U.sent(), this.log("Error during initialisation ", tt), ee = tt instanceof Error ? tt : new Error("".concat(tt)), (n = this.onError) === null || n === void 0 || n.call(this, ee), tt;
444
444
  case 14:
445
445
  return [2];
446
446
  }
@@ -456,7 +456,7 @@ var Gt = { exports: {} };
456
456
  }, a.prototype.getState = function() {
457
457
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
458
458
  }, a.prototype.setState = function(e) {
459
- e && (this.initialised = !0, this.api = e.api || this.api || Vt, this.flags = e.flags || this.flags, this.evaluationContext = e.evaluationContext || this.evaluationContext, this.evaluationEvent = e.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
459
+ e && (this.initialised = !0, this.api = e.api || this.api || Jt, this.flags = e.flags || this.flags, this.evaluationContext = e.evaluationContext || this.evaluationContext, this.evaluationEvent = e.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
460
460
  }, a.prototype.logout = function() {
461
461
  return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
462
462
  }, a.prototype.startListening = function(e) {
@@ -472,12 +472,12 @@ var Gt = { exports: {} };
472
472
  if (this.cacheFlags) {
473
473
  this.ts = (/* @__PURE__ */ new Date()).valueOf();
474
474
  var e = JSON.stringify(this.getState());
475
- this.log("Setting storage", e), I.setItem(this.getStorageKey(), e);
475
+ this.log("Setting storage", e), L.setItem(this.getStorageKey(), e);
476
476
  }
477
477
  }, a.prototype.updateEventStorage = function() {
478
478
  if (this.enableAnalytics) {
479
479
  var e = JSON.stringify(this.getState().evaluationEvent);
480
- I.setItem(lt, e).catch(function(t) {
480
+ L.setItem(lt, e).catch(function(t) {
481
481
  return console.error("Flagsmith: Error setting item in async storage", t);
482
482
  });
483
483
  }
@@ -497,7 +497,7 @@ var Gt = { exports: {} };
497
497
  })) : this.log("Error, EventSource is undefined");
498
498
  }, a;
499
499
  }();
500
- function Ht(a) {
500
+ function zt(a) {
501
501
  var e = a.fetch, t = a.AsyncStorage, i = a.eventSource;
502
502
  return new he({ fetch: e, AsyncStorage: t, eventSource: i });
503
503
  }
@@ -513,14 +513,14 @@ var Gt = { exports: {} };
513
513
  this.constructor = a;
514
514
  }
515
515
  ut(a, e), a.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
516
- }), $t = function(a) {
516
+ }), Ht = function(a) {
517
517
  var e = typeof Symbol == "function" && Symbol.iterator, t = e && a[e], i = 0;
518
518
  if (t) return t.call(a);
519
519
  if (a && typeof a.length == "number") return { next: function() {
520
520
  return a && i >= a.length && (a = void 0), { value: a && a[i++], done: !a };
521
521
  } };
522
522
  throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
523
- }, qt = function(a, e) {
523
+ }, $t = function(a, e) {
524
524
  var t = typeof Symbol == "function" && a[Symbol.iterator];
525
525
  if (!t) return a;
526
526
  var i, n, r = t.call(a), s = [];
@@ -536,7 +536,7 @@ var Gt = { exports: {} };
536
536
  }
537
537
  }
538
538
  return s;
539
- }, gt = function(a, e, t) {
539
+ }, ft = function(a, e, t) {
540
540
  if (arguments.length === 2) for (var i, n = 0, r = e.length; n < r; n++) !i && n in e || (i || (i = Array.prototype.slice.call(e, 0, n)), i[n] = e[n]);
541
541
  return a.concat(i || Array.prototype.slice.call(e));
542
542
  }, de = function(a) {
@@ -545,7 +545,7 @@ var Gt = { exports: {} };
545
545
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
546
546
  }
547
547
  return ve(e, a), e;
548
- }(Error), Wt = function() {
548
+ }(Error), qt = function() {
549
549
  function a(e, t) {
550
550
  var i = this;
551
551
  if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = t != null ? Object.assign({}, t) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = e.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") throw new de();
@@ -565,7 +565,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
565
565
  i.onmessage(h);
566
566
  };
567
567
  try {
568
- for (var r = $t(Object.keys(this._listeners)), s = r.next(); !s.done; s = r.next()) {
568
+ for (var r = Ht(Object.keys(this._listeners)), s = r.next(); !s.done; s = r.next()) {
569
569
  var c = s.value;
570
570
  this._eventSource.addEventListener(c, this._onevent_wrapped);
571
571
  }
@@ -594,7 +594,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
594
594
  e && e.lastEventId && (this._lastEventId = e.lastEventId);
595
595
  var n = this._listeners[e.type];
596
596
  if (n != null) try {
597
- for (var r = $t(gt([], qt(n), !1)), s = r.next(); !s.done; s = r.next())
597
+ for (var r = Ht(ft([], $t(n), !1)), s = r.next(); !s.done; s = r.next())
598
598
  s.value.call(this, e);
599
599
  } catch (c) {
600
600
  t = { error: c };
@@ -614,7 +614,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
614
614
  }, a.prototype.addEventListener = function(e, t, i) {
615
615
  this._listeners[e] == null && (this._listeners[e] = [], this._eventSource != null && this._eventSource.addEventListener(e, this._onevent_wrapped));
616
616
  var n = this._listeners[e];
617
- n.includes(t) || (this._listeners[e] = gt(gt([], qt(n), !1), [t], !1));
617
+ n.includes(t) || (this._listeners[e] = ft(ft([], $t(n), !1), [t], !1));
618
618
  }, a.prototype.removeEventListener = function(e, t, i) {
619
619
  var n = this._listeners[e];
620
620
  this._listeners[e] = n.filter(function(r) {
@@ -623,7 +623,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
623
623
  }, a;
624
624
  }();
625
625
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
626
- var Xt = function(a, e) {
626
+ var Wt = function(a, e) {
627
627
  return e = e || {}, new Promise(function(t, i) {
628
628
  var n = new XMLHttpRequest(), r = [], s = [], c = {}, h = function() {
629
629
  return { ok: (n.status / 100 | 0) == 2, statusText: n.statusText, status: n.status, url: n.responseURL, text: function() {
@@ -636,32 +636,32 @@ Consider loading an EventSource polyfill and making it available globally as Eve
636
636
  return r;
637
637
  }, entries: function() {
638
638
  return s;
639
- }, get: function(u) {
640
- return c[u.toLowerCase()];
641
- }, has: function(u) {
642
- return u.toLowerCase() in c;
639
+ }, get: function(l) {
640
+ return c[l.toLowerCase()];
641
+ }, has: function(l) {
642
+ return l.toLowerCase() in c;
643
643
  } } };
644
644
  };
645
645
  for (var f in n.open(e.method || "get", a, !0), n.onload = function() {
646
- n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(u, m, x) {
647
- r.push(m = m.toLowerCase()), s.push([m, x]), c[m] = c[m] ? c[m] + "," + x : x;
646
+ n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(l, y, x) {
647
+ r.push(y = y.toLowerCase()), s.push([y, x]), c[y] = c[y] ? c[y] + "," + x : x;
648
648
  }), t(h());
649
649
  }, n.onerror = i, n.withCredentials = e.credentials == "include", e.headers) n.setRequestHeader(f, e.headers[f]);
650
650
  n.send(e.body || null);
651
651
  });
652
- }, Yt = Ht({ AsyncStorage: d, fetch: Xt, eventSource: Wt });
653
- typeof window < "u" && (window.flagsmith = Yt), v.createFlagsmithInstance = function() {
654
- return Ht({ AsyncStorage: d, fetch: Xt, eventSource: Wt });
655
- }, v.default = Yt, Object.defineProperty(v, "__esModule", { value: !0 });
652
+ }, Xt = zt({ AsyncStorage: d, fetch: Wt, eventSource: qt });
653
+ typeof window < "u" && (window.flagsmith = Xt), v.createFlagsmithInstance = function() {
654
+ return zt({ AsyncStorage: d, fetch: Wt, eventSource: qt });
655
+ }, v.default = Xt, Object.defineProperty(v, "__esModule", { value: !0 });
656
656
  });
657
657
  })(Gt, Gt.exports);
658
- var me = Gt.exports, se = {
658
+ var me = Gt.exports, re = {
659
659
  NOT_INITIALIZED: "FeatureFlag not initialized. Call init() first.",
660
660
  INVALID_CONFIG: "Invalid Flagsmith configuration",
661
661
  FETCH_FAILED: "Failed to fetch Flagsmith configuration",
662
662
  NO_USER_CONTEXT: "User context not set. Call setUser() first.",
663
663
  ALREADY_INITIALIZED: "FeatureFlag is already initialized."
664
- }, oe = "business", V, Se = (V = class {
664
+ }, se = "business", V, Se = (V = class {
665
665
  constructor() {
666
666
  ct(this, "flagsmithClient", null);
667
667
  ct(this, "userContext", null);
@@ -671,31 +671,31 @@ var me = Gt.exports, se = {
671
671
  }
672
672
  ensureInitialized() {
673
673
  if (!this.flagsmithClient)
674
- throw new Error(se.NOT_INITIALIZED);
674
+ throw new Error(re.NOT_INITIALIZED);
675
675
  }
676
- async init(l, v = []) {
676
+ async init(u, v = []) {
677
677
  if (!this.flagsmithClient)
678
678
  try {
679
679
  this.flagsmithClient = me.createFlagsmithInstance();
680
680
  const d = v.reduce((o, E) => (o[E.feature.name] = E, o), {});
681
681
  await this.flagsmithClient.init({
682
- environmentID: l.apiKey,
683
- api: (l == null ? void 0 : l.url) ?? "https://flag.feedme.farm/api/v1/",
684
- enableAnalytics: (l == null ? void 0 : l.enableAnalytics) ?? !0,
682
+ environmentID: u.apiKey,
683
+ api: (u == null ? void 0 : u.url) ?? "https://flag.feedme.farm/api/v1/",
684
+ enableAnalytics: (u == null ? void 0 : u.enableAnalytics) ?? !0,
685
685
  defaultFlags: d,
686
- cacheFlags: (l == null ? void 0 : l.cacheFlags) ?? !0
686
+ cacheFlags: (u == null ? void 0 : u.cacheFlags) ?? !0
687
687
  });
688
688
  } catch (d) {
689
689
  throw console.error("Failed to initialize FeatureFlag:", d), d;
690
690
  }
691
691
  }
692
- async setUser(l, v) {
693
- this.ensureInitialized(), this.userContext = { identifier: l, traits: v }, await this.updateContext();
692
+ async setUser(u, v) {
693
+ this.ensureInitialized(), this.userContext = { identifier: u, traits: v }, await this.updateContext();
694
694
  }
695
- async addTraits(l) {
695
+ async addTraits(u) {
696
696
  if (this.ensureInitialized(), !this.userContext)
697
- throw new Error(se.NO_USER_CONTEXT);
698
- this.userContext.traits = { ...this.userContext.traits, ...l }, await this.updateContext();
697
+ throw new Error(re.NO_USER_CONTEXT);
698
+ this.userContext.traits = { ...this.userContext.traits, ...u }, await this.updateContext();
699
699
  }
700
700
  async updateContext() {
701
701
  try {
@@ -706,14 +706,14 @@ var me = Gt.exports, se = {
706
706
  traits: this.userContext.traits || {}
707
707
  }
708
708
  });
709
- } catch (l) {
710
- throw console.error("Failed to update user context:", l), l;
709
+ } catch (u) {
710
+ throw console.error("Failed to update user context:", u), u;
711
711
  }
712
712
  }
713
713
  async getFlags() {
714
714
  this.ensureInitialized();
715
- const l = this.flagsmithClient.getAllFlags();
716
- return Object.entries(l).map(([v, d]) => {
715
+ const u = this.flagsmithClient.getAllFlags();
716
+ return Object.entries(u).map(([v, d]) => {
717
717
  var o;
718
718
  return {
719
719
  feature: {
@@ -725,9 +725,9 @@ var me = Gt.exports, se = {
725
725
  };
726
726
  });
727
727
  }
728
- getFlagValue(l, v) {
728
+ getFlagValue(u, v) {
729
729
  this.ensureInitialized();
730
- const d = this.flagsmithClient.getValue(l);
730
+ const d = this.flagsmithClient.getValue(u);
731
731
  if (d == null)
732
732
  return null;
733
733
  try {
@@ -737,25 +737,25 @@ var me = Gt.exports, se = {
737
737
  return console.error("Error transforming flag value:", o), null;
738
738
  }
739
739
  }
740
- getFlag(l) {
740
+ getFlag(u) {
741
741
  this.ensureInitialized();
742
- const v = this.flagsmithClient.getValue(l);
742
+ const v = this.flagsmithClient.getValue(u);
743
743
  if (v == null) return null;
744
- const d = this.flagsmithClient.hasFeature(l);
744
+ const d = this.flagsmithClient.hasFeature(u);
745
745
  return {
746
746
  feature: {
747
- name: l,
747
+ name: u,
748
748
  id: 0
749
749
  },
750
750
  enabled: d,
751
751
  value: v.toString()
752
752
  };
753
753
  }
754
- async getUserFlagValue(l, v, d = null, o) {
754
+ async getUserFlagValue(u, v, d = null, o) {
755
755
  var M;
756
756
  const E = this.userContext;
757
757
  try {
758
- return await this.setUser(l), this.getFlagValue(v, o) ?? d;
758
+ return await this.setUser(u), this.getFlagValue(v, o) ?? d;
759
759
  } catch (T) {
760
760
  return console.error(`Error getting user flag value for ${v}:`, T), d;
761
761
  } finally {
@@ -769,56 +769,56 @@ var me = Gt.exports, se = {
769
769
  reset() {
770
770
  this.flagsmithClient = null, this.userContext = null;
771
771
  }
772
- }, ct(V, "instance"), V), be = Se.getInstance(), st = dt(!1), ot = dt([]), q = dt(null);
773
- function Ce(p = be) {
774
- const l = () => st.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), v = async (g, y = []) => {
772
+ }, ct(V, "instance"), V), be = Se.getInstance(), st = gt(!1), ot = gt([]), q = gt(null);
773
+ function Ce(S = be) {
774
+ const u = () => st.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), v = async (g, p = []) => {
775
775
  if (st.value) {
776
776
  console.warn("FeatureFlag is already initialized.");
777
777
  return;
778
778
  }
779
779
  try {
780
- await p.init(g, y), ot.value = await p.getFlags(), st.value = !0, q.value = null;
780
+ await S.init(g, p), ot.value = await S.getFlags(), st.value = !0, q.value = null;
781
781
  } catch (C) {
782
782
  console.error("Failed to initialize feature flags:", C), q.value = C;
783
783
  }
784
- }, d = async (g, y) => {
785
- if (l())
784
+ }, d = async (g, p) => {
785
+ if (u())
786
786
  try {
787
- await p.setUser(g, y), ot.value = await p.getFlags(), q.value = null;
787
+ await S.setUser(g, p), ot.value = await S.getFlags(), q.value = null;
788
788
  } catch (C) {
789
789
  console.error("Failed to set user:", C), q.value = C;
790
790
  }
791
- }, o = async (g, y) => d(`${oe}-${g}`, y), E = async (g) => {
792
- if (l())
791
+ }, o = async (g, p) => d(`${se}-${g}`, p), E = async (g) => {
792
+ if (u())
793
793
  try {
794
- await p.addTraits(g), ot.value = await p.getFlags(), q.value = null;
795
- } catch (y) {
796
- console.error("Failed to add traits:", y), q.value = y;
794
+ await S.addTraits(g), ot.value = await S.getFlags(), q.value = null;
795
+ } catch (p) {
796
+ console.error("Failed to add traits:", p), q.value = p;
797
797
  }
798
- }, M = (g, y, C = null) => {
799
- if (!l()) return C;
798
+ }, M = (g, p, C = null) => {
799
+ if (!u()) return C;
800
800
  try {
801
- return p.getFlagValue(g, y) ?? C;
802
- } catch (R) {
803
- return console.error(`Error getting flag value for ${g}:`, R), C;
801
+ return S.getFlagValue(g, p) ?? C;
802
+ } catch (k) {
803
+ return console.error(`Error getting flag value for ${g}:`, k), C;
804
804
  }
805
- }, T = (g, y) => {
806
- if (!l()) return y ?? null;
805
+ }, T = (g, p) => {
806
+ if (!u()) return p ?? null;
807
807
  try {
808
- return p.getFlag(g) ?? y ?? null;
808
+ return S.getFlag(g) ?? p ?? null;
809
809
  } catch (C) {
810
- return console.error(`Error getting flag for ${g}:`, C), y ?? null;
810
+ return console.error(`Error getting flag for ${g}:`, C), p ?? null;
811
811
  }
812
- }, X = async (g, y, C = null, R) => {
813
- if (!l()) return C;
812
+ }, X = async (g, p, C = null, k) => {
813
+ if (!u()) return C;
814
814
  try {
815
- return await p.getUserFlagValue(g, y, C, R);
815
+ return await S.getUserFlagValue(g, p, C, k);
816
816
  } catch (z) {
817
- return console.error(`Error getting user flag value for ${y}:`, z), C;
817
+ return console.error(`Error getting user flag value for ${p}:`, z), C;
818
818
  }
819
- }, _ = async (g, y, C = null, R) => X(`${oe}-${g}`, y, C, R), F = () => {
819
+ }, _ = async (g, p, C = null, k) => X(`${se}-${g}`, p, C, k), F = () => {
820
820
  try {
821
- p.reset();
821
+ S.reset();
822
822
  } catch (g) {
823
823
  console.error("Error resetting feature flags:", g);
824
824
  } finally {
@@ -826,9 +826,9 @@ function Ce(p = be) {
826
826
  }
827
827
  };
828
828
  return {
829
- flags: Dt(ot),
830
- isInitialized: Dt(st),
831
- error: Dt(q),
829
+ flags: Kt(ot),
830
+ isInitialized: Kt(st),
831
+ error: Kt(q),
832
832
  init: v,
833
833
  setUser: d,
834
834
  setBusiness: o,
@@ -840,7 +840,7 @@ function Ce(p = be) {
840
840
  reset: F
841
841
  };
842
842
  }
843
- var Jt = () => Ce();
843
+ var le = () => Ce();
844
844
  const _e = /* @__PURE__ */ new Set([
845
845
  // vivo pizza prod
846
846
  "business_6687e91fa7240b001ba3f4c2",
@@ -855,7 +855,7 @@ const _e = /* @__PURE__ */ new Set([
855
855
  "business_655b25254fe3be001b123f0b",
856
856
  // King Menu V4
857
857
  "business_646ee00ebffa92001b84c4c7"
858
- ]), le = /* @__PURE__ */ new Set([
858
+ ]), oe = /* @__PURE__ */ new Set([
859
859
  // zus dev
860
860
  "business_671005de24a7f4001c87e25e",
861
861
  // zus prod
@@ -883,116 +883,120 @@ function ue() {
883
883
  enableTotalCost: !1,
884
884
  enableWastageTemplate: !1,
885
885
  manualReceive: !1,
886
- mustUsePoTemplate: !1
886
+ mustUsePoTemplate: !1,
887
+ enableReturnStocks: !1
887
888
  };
888
889
  }
889
- const L = dt(ue()), Te = () => ({
890
+ const I = gt(ue()), Te = () => ({
890
891
  get businessDbName() {
891
892
  var v;
892
893
  return `business_${((v = ht().currentBusiness.value) == null ? void 0 : v._id) ?? ""}`;
893
894
  },
894
895
  get isWarehouse() {
895
- var l;
896
- return ((l = Ut()._currentLocation) == null ? void 0 : l.type) === re.enum.warehouse;
896
+ var u;
897
+ return ((u = Dt()._currentLocation) == null ? void 0 : u.type) === ae.enum.warehouse;
897
898
  },
898
899
  get restaurantPosVersion() {
899
900
  var v;
900
- const p = Ut();
901
+ const S = Dt();
901
902
  return (v = ht().restaurants.value.find(
902
903
  (d) => {
903
904
  var o;
904
- return d._id === ((o = p._currentLocation) == null ? void 0 : o.doc._id);
905
+ return d._id === ((o = S._currentLocation) == null ? void 0 : o.doc._id);
905
906
  }
906
907
  )) == null ? void 0 : v.posVersion;
907
908
  },
908
909
  get enableTotalCost() {
909
- return L.value.enableTotalCost;
910
+ return I.value.enableTotalCost;
910
911
  },
911
912
  get enableBackdatePo() {
912
- return L.value.enableBackdatePo;
913
+ return I.value.enableBackdatePo;
913
914
  },
914
915
  /** @deprecated TODO: remove */
915
916
  get autoReceiveWarehouse() {
916
- return L.value.autoReceiveWarehouse;
917
+ return I.value.autoReceiveWarehouse;
917
918
  },
918
919
  /** @deprecated TODO: remove */
919
920
  get manualReceive() {
920
- return L.value.manualReceive;
921
+ return I.value.manualReceive;
921
922
  },
922
923
  get enablePoTemplate() {
923
- return L.value.enablePoTemplate;
924
+ return I.value.enablePoTemplate;
924
925
  },
925
926
  get enableClosingTemplate() {
926
- return L.value.enableClosingTemplate;
927
+ return I.value.enableClosingTemplate;
927
928
  },
928
929
  get enableWastageTemplate() {
929
- return L.value.enableWastageTemplate;
930
+ return I.value.enableWastageTemplate;
930
931
  },
931
932
  get enableIngredientGroup() {
932
- return L.value.enableIngredientGroup;
933
+ return I.value.enableIngredientGroup;
933
934
  },
934
935
  get mustUsePoTemplate() {
935
- return L.value.mustUsePoTemplate;
936
+ return I.value.mustUsePoTemplate;
936
937
  },
937
938
  get enableSupplierMasterList() {
938
- return L.value.enableSupplierMasterList;
939
+ return I.value.enableSupplierMasterList;
939
940
  },
940
941
  get businessSupplierOnly() {
941
- return L.value.businessSupplierOnly;
942
+ return I.value.businessSupplierOnly;
943
+ },
944
+ get enableReturnStocks() {
945
+ return I.value.enableReturnStocks;
942
946
  },
943
947
  async init() {
944
- const p = ht(), { init: l, setUser: v } = Jt(), d = p.namespace.value === "prod";
945
- await l({
948
+ const S = ht(), { init: u, setUser: v } = le(), d = S.namespace.value === "prod";
949
+ await u({
946
950
  apiKey: d ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
947
951
  // url: 'https://flag.feedme.farm/api/v1/', // optional -> this is a default URL value
948
952
  // enableAnalytics: true, // optional, defaults to true
949
953
  // cacheFlags: true // optional, defaults to true
950
- }), Ut().watchLocation(async (E) => {
951
- var R, z, Y;
954
+ }), Dt().watchLocation(async (E) => {
955
+ var k, z, Y;
952
956
  if (!E) {
953
- L.value = ue();
957
+ I.value = ue();
954
958
  return;
955
959
  }
956
960
  await v(E.doc._id);
957
- const M = ye(), T = ht(), _ = `business_${((R = T.currentBusiness.value) == null ? void 0 : R._id) ?? ""}`, F = E.type === re.enum.warehouse, g = (
961
+ const M = ye(), T = ht(), _ = `business_${((k = T.currentBusiness.value) == null ? void 0 : k._id) ?? ""}`, F = E.type === ae.enum.warehouse, g = (
958
962
  // if menu v4, must manual receive && must use outlet app
959
963
  ((z = T.currentBusiness.value) == null ? void 0 : z.menuVersion) === "v4" && // more guard for businesses using menu v4, only those listed for manual receive will be included
960
964
  // TODO: may be removed to use menu version only
961
965
  _e.has(this.businessDbName)
962
- ), y = le.has(_) || Kt(
966
+ ), p = oe.has(_) || dt(
963
967
  "inventory_portal_must_use_transfer_template"
964
968
  /* inventory_portal_must_use_transfer_template */
965
969
  ), C = Ee.has(this.businessDbName) && (this.isWarehouse || M.state.closing !== null);
966
- L.value = {
970
+ I.value = {
967
971
  enableTotalCost: ((Y = T.currentBusiness.value) == null ? void 0 : Y.menuVersion) === "v4",
968
972
  enableBackdatePo: C,
969
973
  autoReceiveWarehouse: F && !g,
970
974
  manualReceive: g,
971
- enablePoTemplate: y,
972
- enableClosingTemplate: Fe.has(_) && Kt(
975
+ enablePoTemplate: p,
976
+ enableClosingTemplate: Fe.has(_) && dt(
973
977
  "inventory_pos_closing_v2"
974
978
  /* inventory_pos_closing_v2 */
975
979
  ),
976
- enableWastageTemplate: xe.has(_) && Kt(
980
+ enableWastageTemplate: xe.has(_) && dt(
977
981
  "inventory_pos_adjust_v2_wastage"
978
982
  /* inventory_pos_adjust_v2_wastage */
979
983
  ),
980
984
  enableIngredientGroup: !1,
981
- mustUsePoTemplate: y,
982
- businessSupplierOnly: y,
983
- enableSupplierMasterList: le.has(_)
985
+ mustUsePoTemplate: p,
986
+ businessSupplierOnly: p,
987
+ enableSupplierMasterList: oe.has(_),
988
+ enableReturnStocks: dt(
989
+ "inventory_portal_stock_return"
990
+ /* inventory_portal_stock_return */
991
+ )
984
992
  };
985
993
  }, "feature");
986
- },
987
- async setUser(p) {
988
- const { setUser: l } = Jt();
989
- await l(p.doc._id);
990
994
  }
991
995
  });
992
- function Kt(p, l) {
993
- l = l === void 0 ? null : l;
994
- const { getFlagValue: v } = Jt();
995
- return v(p, (d) => d === "true") ?? l;
996
+ function dt(S, u) {
997
+ u = u === void 0 ? null : u;
998
+ const { getFlagValue: v } = le();
999
+ return v(S, (d) => d === "true") ?? u;
996
1000
  }
997
1001
  export {
998
1002
  Te as u