@feedmepos/mf-inventory-portal 1.5.8 → 1.5.9-dev.1

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 (92) hide show
  1. package/dist/{App-CkuUHPEo.js → App-CRKhmCwm.js} +4 -4
  2. package/dist/{ApprovalView-DubepVw0.js → ApprovalView-BdvNZ3Mi.js} +7 -7
  3. package/dist/{BindingsDialog-B4WNBwyC.js → BindingsDialog-UieCgCDS.js} +13 -13
  4. package/dist/{BindingsPicker-BRrLqG1M.js → BindingsPicker-Bo7xvsut.js} +2 -2
  5. package/dist/{BindingsTable-CsL2_ZUy.js → BindingsTable-CUaQzSBn.js} +3 -3
  6. package/dist/ClosingDraftView-QgRaat2h.js +3335 -0
  7. package/dist/{ClosingHistoryView-C9Hidhix.js → ClosingHistoryView-C_qw6v7h.js} +469 -459
  8. package/dist/{ClosingTemplateView-gzJmYQLL.js → ClosingTemplateView-BAsHjB3H.js} +14 -14
  9. package/dist/{DefaultView-Wd26nwBn.js → DefaultView-CaWfkTXn.js} +2 -2
  10. package/dist/{DeliveryOrderPrintPreview-5Jm6QgAP.js → DeliveryOrderPrintPreview-Dv2fXveZ.js} +2 -2
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bye4GWOd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BFzPTyKA.js} +2 -2
  12. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0u8X0Bk.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Y_AhN6qb.js} +2 -2
  13. package/dist/{FmMultiselectDialog-BuXhazyF.js → FmMultiselectDialog-DT28lMdK.js} +1 -1
  14. package/dist/{FmMultiselectDialog-CrbCQvck.js → FmMultiselectDialog-e4dbq-bB.js} +2 -2
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-U0Io6FhR.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CO2Uom0f.js} +111 -110
  16. package/dist/{ImportView-PBP1w1_z.js → ImportView-Brvxm1EN.js} +6 -6
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BvlBuk3S.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DSqbdU3A.js} +1 -1
  18. package/dist/{IngredientGroupView-ZavZf2r_.js → IngredientGroupView-CqqD1_5X.js} +5 -5
  19. package/dist/{IngredientsView-DXKIqdoR.js → IngredientsView-BmOSo8oo.js} +17 -17
  20. package/dist/{IntegrationExplorerView-D-7q6p_s.js → IntegrationExplorerView-CZH3568k.js} +5 -5
  21. package/dist/{IntegrationView-ByvhMaCO.js → IntegrationView-CJv9Ps4v.js} +13 -13
  22. package/dist/{InventoryBindingForm-DAAeny2A.js → InventoryBindingForm-BZVAC4x1.js} +1 -1
  23. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DpR5ySFv.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BPl9weMj.js} +5 -5
  24. package/dist/{InventoryBindingSummary-CZBnbomV.js → InventoryBindingSummary-C7Xl5Fd7.js} +1 -1
  25. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BJ6gswNM.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CyjRq3A-.js} +1 -1
  26. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-mlVRfnxo.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DIoYx-x4.js} +1 -1
  27. package/dist/{PublishView-CsMKko5l.js → PublishView-DHK3MPsP.js} +3 -3
  28. package/dist/{PurchaseOrderPrintPreview-B-jchSYL.js → PurchaseOrderPrintPreview-DLg01buw.js} +2 -2
  29. package/dist/{ReceiveRequestView-DfOcn_OW.js → ReceiveRequestView-B1n42VJ5.js} +25 -25
  30. package/dist/{RecipeView-C-1PuiaO.js → RecipeView-BOEfiTuN.js} +19 -19
  31. package/dist/{SettingsView-C3vB5Vjb.js → SettingsView-Bqx3woVD.js} +4 -4
  32. package/dist/{StockView-BAXULvMh.js → StockView-UjWpz_eL.js} +775 -765
  33. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BI_hHa88.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BxyFAK_X.js} +1 -1
  34. package/dist/{SupplierView-B9y9d6C0.js → SupplierView-_zK2xohX.js} +12 -12
  35. package/dist/{SurchargeView-D3lq3G0g.js → SurchargeView-BtUebfil.js} +6 -6
  36. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-D54FjCtg.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DF3seGmT.js} +2 -2
  37. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bi-9US2G.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bpo1u5g2.js} +1 -1
  38. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BkmO63qQ.js → TransferDetails.vue_vue_type_script_setup_true_lang-B_kdNBCT.js} +20 -20
  39. package/dist/{TransferTemplateView-B7hDis-b.js → TransferTemplateView-OlHTVdCG.js} +18 -18
  40. package/dist/{UnitCostHistoryView-DR-RJ6lO.js → UnitCostHistoryView-BIvYaMio.js} +4 -4
  41. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-WSYbNJL_.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DqTis1lE.js} +4 -4
  42. package/dist/{UnitView-Dx3NUFp2.js → UnitView-DAtDiu3f.js} +9 -9
  43. package/dist/{WarehouseView-CSmq2xhS.js → WarehouseView-B3mXQpoO.js} +5 -5
  44. package/dist/{WastageTemplateView-Bya8Ptja.js → WastageTemplateView-BOoybeCb.js} +14 -14
  45. package/dist/api/error.d.ts +6 -3
  46. package/dist/{app-BtIUZZer.js → app-cwueji6m.js} +10353 -10377
  47. package/dist/app.d.ts +8 -0
  48. package/dist/app.js +4 -4
  49. package/dist/{closing-template-CY4I4oi6.js → closing-template-CobmAqhD.js} +1 -1
  50. package/dist/{date2-BXHREmqe.js → date2-D_-j6u1x.js} +1 -1
  51. package/dist/{dayjs.min-B15_mmz6.js → dayjs.min-iDeAwg0n.js} +1 -1
  52. package/dist/{decimal-CfCuBc7o.js → decimal-DcHr_uvI.js} +2 -2
  53. package/dist/{defineDeepModel-CeW3ETAv.js → defineDeepModel-BhC1n6G-.js} +1 -1
  54. package/dist/{duplicate-template-CTHciPHW.js → duplicate-template-Y9iggS9l.js} +1 -1
  55. package/dist/{export-CCbJ-2Gk.js → export-CAHG4EbP.js} +2 -2
  56. package/dist/{feature-RoG35971.js → feature-BhK4XmmS.js} +86 -86
  57. package/dist/{format-time-from-id-q1T46zz9.js → format-time-from-id-2IFiQNTX.js} +1 -1
  58. package/dist/{format-unit-display-DUaKGmsk.js → format-unit-display-CTYZvXcZ.js} +11 -11
  59. package/dist/helper/uom-rules.d.ts +12 -0
  60. package/dist/{import-export.helper-B2ZzXsyT.js → import-export.helper-DtWH9atw.js} +6 -6
  61. package/dist/{index-CKErlM6H.js → index-Ckhb0CMq.js} +1 -1
  62. package/dist/{index-CF466Sy_.js → index-dfAAA8HA.js} +3 -3
  63. package/dist/{index-BC06YbP9.js → index-iGt85nBk.js} +1 -1
  64. package/dist/{inventory-core-dart.default-BEB7pV9M.js → inventory-core-dart.default-R1tOn2RS.js} +1319 -1264
  65. package/dist/{lz-string-D3Jm7T7Q.js → lz-string-DUT6tVSg.js} +1 -1
  66. package/dist/{menu-usage-module-BiCPifRX.js → menu-usage-module-D7cxkbEk.js} +11 -12
  67. package/dist/netsuite-BiF6Fo7G.js +9381 -0
  68. package/dist/{number-C6mI12qg.js → number-Cqsx9s88.js} +3 -3
  69. package/dist/{predefined-templates-DfpzUsNl.js → predefined-templates-CHExzSjx.js} +1 -1
  70. package/dist/{purchase-order-template-Dq3N4vgB.js → purchase-order-template-_FfLY2u1.js} +1 -1
  71. package/dist/{recalculationUtils-D0A7mbSs.js → recalculationUtils-KdVSBljW.js} +1 -1
  72. package/dist/{rules-Dajxj04v.js → rules-DB26S6qs.js} +2 -2
  73. package/dist/{stock-D6d8tS4B.js → stock-n6h8HkNk.js} +1 -1
  74. package/dist/{supplier-CkfePT6a.js → supplier-6K9Cbfcf.js} +2 -2
  75. package/dist/{surcharge-C3uSQoRw.js → surcharge-BV03ItuR.js} +1 -1
  76. package/dist/tsconfig.app.tsbuildinfo +1 -1
  77. package/dist/uom-rules-CzTxRiqL.js +21 -0
  78. package/dist/{use-ingredient-select-dialog-C3zCgi5E.js → use-ingredient-select-dialog-Bs_4jjVy.js} +2 -2
  79. package/dist/{use-inventory-binding-dialog-CsDrU6sx.js → use-inventory-binding-dialog-CgtoqJ2D.js} +2 -2
  80. package/dist/{use-template-enabled-locations-DpZY_R7j.js → use-template-enabled-locations-C6fQtFF0.js} +2 -2
  81. package/dist/{use-transfer-locations-DlHF5kG-.js → use-transfer-locations-DI48leYd.js} +2 -2
  82. package/dist/{useHrmPermission-C1G3BVpn.js → useHrmPermission-Co1Jgyvq.js} +1 -1
  83. package/dist/{useNavigationMenu-tNJYWFkU.js → useNavigationMenu-JenXwvSv.js} +2 -2
  84. package/dist/{useSseClient-4qu-xO3k.js → useSseClient-gIA58rTS.js} +3 -3
  85. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +11 -2
  86. package/dist/{vue-i18n-eqPSat_0.js → vue-i18n-C3I0upD3.js} +331 -331
  87. package/dist/{xlsx-DB2JHegF.js → xlsx-4BYDayT5.js} +1 -1
  88. package/dist/{xlsx.util-TwDCO4ay.js → xlsx.util-CD_xD6ZX.js} +3 -3
  89. package/package.json +1 -1
  90. package/dist/ClosingDraftView-Psl49bhd.js +0 -3202
  91. package/dist/lodash-D9rnJgGZ.js +0 -3678
  92. package/dist/netsuite-CuPJ_UTs.js +0 -5708
@@ -2,9 +2,9 @@ var ht = Object.defineProperty;
2
2
  var ft = (l, u, _) => u in l ? ht(l, u, { enumerable: !0, configurable: !0, writable: !0, value: _ }) : l[u] = _;
3
3
  var ce = (l, u, _) => ft(l, typeof u != "symbol" ? u + "" : u, _);
4
4
  import { useCoreStore as Ke } from "@feedmepos/mf-common";
5
- import { U as ve, u as Ve, j as ot, a as gt } from "./app-BtIUZZer.js";
5
+ import { U as ve, u as Ve, j as ot, a as pt } from "./app-cwueji6m.js";
6
6
  import { ref as de, readonly as Ge } from "vue";
7
- import "./inventory-core-dart.default-BEB7pV9M.js";
7
+ import "./inventory-core-dart.default-R1tOn2RS.js";
8
8
  var Je = { exports: {} };
9
9
  (function(l, u) {
10
10
  (function(_, f) {
@@ -42,23 +42,23 @@ var Je = { exports: {} };
42
42
  };
43
43
  function O(i, t, e, r) {
44
44
  return new (e || (e = Promise))(function(n, a) {
45
- function o(p) {
45
+ function o(g) {
46
46
  try {
47
- d(r.next(p));
47
+ d(r.next(g));
48
48
  } catch (c) {
49
49
  a(c);
50
50
  }
51
51
  }
52
- function v(p) {
52
+ function v(g) {
53
53
  try {
54
- d(r.throw(p));
54
+ d(r.throw(g));
55
55
  } catch (c) {
56
56
  a(c);
57
57
  }
58
58
  }
59
- function d(p) {
59
+ function d(g) {
60
60
  var c;
61
- p.done ? n(p.value) : (c = p.value, c instanceof e ? c : new e(function(y) {
61
+ g.done ? n(g.value) : (c = g.value, c instanceof e ? c : new e(function(y) {
62
62
  y(c);
63
63
  })).then(o, v);
64
64
  }
@@ -74,7 +74,7 @@ var Je = { exports: {} };
74
74
  return this;
75
75
  }), a;
76
76
  function v(d) {
77
- return function(p) {
77
+ return function(g) {
78
78
  return function(c) {
79
79
  if (e) throw new TypeError("Generator is already executing.");
80
80
  for (; o; ) try {
@@ -120,11 +120,11 @@ var Je = { exports: {} };
120
120
  }
121
121
  if (5 & c[0]) throw c[1];
122
122
  return { value: c[0] ? c[1] : void 0, done: !0 };
123
- }([d, p]);
123
+ }([d, g]);
124
124
  };
125
125
  }
126
126
  }
127
- function I(i, t, e) {
127
+ function F(i, t, e) {
128
128
  for (var r, n = 0, a = t.length; n < a; n++) !r && n in t || (r || (r = Array.prototype.slice.call(t, 0, n)), r[n] = t[n]);
129
129
  return i.concat(r || Array.prototype.slice.call(t));
130
130
  }
@@ -160,18 +160,18 @@ var Je = { exports: {} };
160
160
  Object.keys(t || {}).includes(r) || e.push(r);
161
161
  }), Object.keys(e).length ? e : null;
162
162
  }
163
- var g, C;
163
+ var p, C;
164
164
  function E(i, t, e) {
165
165
  var r = "shortString", n = !0;
166
166
  typeof e == "number" && (r = "javaDouble", n = !1), i[r] = i[r] || {}, i[r][t] = n ? e + "" : e;
167
167
  }
168
- function A(i) {
168
+ function I(i) {
169
169
  return !!i && typeof i == "object" && i.value !== void 0;
170
170
  }
171
171
  function $(i) {
172
172
  return Object.fromEntries(Object.entries(i).map(function(t) {
173
173
  var e = t[0], r = t[1];
174
- return [e, A(r) ? r : { value: r }];
174
+ return [e, I(r) ? r : { value: r }];
175
175
  }));
176
176
  }
177
177
  function Y(i) {
@@ -179,15 +179,15 @@ var Je = { exports: {} };
179
179
  }
180
180
  (function(i) {
181
181
  i.NONE = "NONE", i.DEFAULT_FLAGS = "DEFAULT_FLAGS", i.CACHE = "CACHE", i.SERVER = "SERVER";
182
- })(g || (g = {}));
183
- var fe, F = null, ut = "FLAGSMITH_EVENT", le = ut, qe = "https://edge.api.flagsmith.com/api/v1/", Be = "flagsmith_value_", Me = "flagsmith_enabled_", ze = "flagsmith_trait_", ct = function() {
182
+ })(p || (p = {}));
183
+ var fe, A = null, ut = "FLAGSMITH_EVENT", le = ut, qe = "https://edge.api.flagsmith.com/api/v1/", Be = "flagsmith_value_", Me = "flagsmith_enabled_", ze = "flagsmith_trait_", ct = function() {
184
184
  function i(t) {
185
185
  var e = this;
186
186
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
187
187
  var r = e, n = r.api, a = r.evaluationContext;
188
188
  e.log("Get Flags"), e.isLoading = !0, e.loadingState.isFetching || e.setLoadingState(s(s({}, e.loadingState), { isFetching: !0 }));
189
189
  var o = "".concat(e.getContext().identity), v = function(d) {
190
- var p, c, y, k;
190
+ var g, c, y, k;
191
191
  if (d && o === "".concat(e.getContext().identity)) {
192
192
  var V = d.flags, P = d.traits, U = d.identifier;
193
193
  e.isLoading = !1;
@@ -197,8 +197,8 @@ var Je = { exports: {} };
197
197
  }), P.forEach(function(m) {
198
198
  N[m.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: m.transient, value: m.trait_value };
199
199
  }), e.oldFlags = s({}, e.flags);
200
- var G = w(e.oldFlags, j), re = w((p = e.evaluationContext.identity) === null || p === void 0 ? void 0 : p.traits, N);
201
- if ((U || Object.keys(N).length) && (e.evaluationContext.identity = s(s({}, e.evaluationContext.identity), { traits: N }), U && (e.evaluationContext.identity.identifier = U)), e.flags = j, e.updateStorage(), e._onChange(e.oldFlags, { isFromServer: !0, flagsChanged: G, traitsChanged: re }, e._loadedState(null, g.SERVER)), e.datadogRum) try {
200
+ var G = w(e.oldFlags, j), re = w((g = e.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits, N);
201
+ if ((U || Object.keys(N).length) && (e.evaluationContext.identity = s(s({}, e.evaluationContext.identity), { traits: N }), U && (e.evaluationContext.identity.identifier = U)), e.flags = j, e.updateStorage(), e._onChange(e.oldFlags, { isFromServer: !0, flagsChanged: G, traitsChanged: re }, e._loadedState(null, p.SERVER)), e.datadogRum) try {
202
202
  if (e.datadogRum.trackTraits) {
203
203
  var ie = {};
204
204
  Object.keys(((c = e.evaluationContext.identity) === null || c === void 0 ? void 0 : c.traits) || {}).map(function(m) {
@@ -223,14 +223,14 @@ var Je = { exports: {} };
223
223
  }
224
224
  };
225
225
  return a.identity ? Promise.all([a.identity.traits && Object.keys(a.identity.traits).length || !a.identity.identifier ? e.getJSON(n + "identities/", "POST", JSON.stringify({ identifier: a.identity.identifier, transient: a.identity.transient, traits: Object.entries(a.identity.traits).map(function(d) {
226
- var p = d[0], c = d[1];
227
- return { trait_key: p, trait_value: c == null ? void 0 : c.value, transient: c == null ? void 0 : c.transient };
226
+ var g = d[0], c = d[1];
227
+ return { trait_key: g, trait_value: c == null ? void 0 : c.value, transient: c == null ? void 0 : c.transient };
228
228
  }).filter(function(d) {
229
229
  return d.trait_value !== void 0 || (e.log("Warning - attempted to set an undefined trait value for key", d.trait_key), !1);
230
230
  }) })) : e.getJSON(n + "identities/?identifier=" + encodeURIComponent(a.identity.identifier) + (a.identity.transient ? "&transient=true" : ""))]).then(function(d) {
231
231
  return e.evaluationContext.identity = s(s({}, e.evaluationContext.identity), { traits: {} }), v(d == null ? void 0 : d[0]);
232
232
  }).catch(function(d) {
233
- var p = d.message, c = new Error(p);
233
+ var g = d.message, c = new Error(g);
234
234
  return Promise.reject(c);
235
235
  }) : e.getJSON(n + "flags/").then(function(d) {
236
236
  return v({ flags: d, traits: void 0 });
@@ -245,7 +245,7 @@ var Je = { exports: {} };
245
245
  }).catch(function(n) {
246
246
  e.log("Exception fetching evaluationEvent", n);
247
247
  }) : void 0;
248
- }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: g.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(r, n, a) {
248
+ }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: p.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(r, n, a) {
249
249
  var o = e.flags && e.flags[r.toLowerCase().replace(/ /g, "_")], v = null;
250
250
  if (o && (v = o.value), n != null && n.skipAnalytics || a || e.evaluateFlag(r, "VALUE"), v === null && (n == null ? void 0 : n.fallback) !== void 0) return n.fallback;
251
251
  if (n != null && n.json) try {
@@ -277,7 +277,7 @@ var Je = { exports: {} };
277
277
  var n;
278
278
  if (e.api) return e.setContext(s(s({}, e.evaluationContext), { identity: s(s({}, e.evaluationContext.identity), { traits: s(s({}, (n = e.evaluationContext.identity) === null || n === void 0 ? void 0 : n.traits), Object.fromEntries(Object.entries(r).map(function(a) {
279
279
  var o = a[0], v = a[1];
280
- return [o, A(v) ? v : { value: v }];
280
+ return [o, I(v) ? v : { value: v }];
281
281
  }))) }) }));
282
282
  console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.");
283
283
  }, this.hasFeature = function(r, n) {
@@ -289,10 +289,10 @@ var Je = { exports: {} };
289
289
  }, this.getJSON = function(r, n, a) {
290
290
  var o, v = e;
291
291
  v.evaluationContext;
292
- var d = v.headers, p = { method: n || "GET", body: a, cache: "no-cache", headers: {} };
293
- e.evaluationContext.environment && (p.headers["X-Environment-Key"] = e.evaluationContext.environment.apiKey), n && n !== "GET" && (p.headers["Content-Type"] = "application/json; charset=utf-8"), d && Object.assign(p.headers, d), C || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
292
+ var d = v.headers, g = { method: n || "GET", body: a, cache: "no-cache", headers: {} };
293
+ e.evaluationContext.environment && (g.headers["X-Environment-Key"] = e.evaluationContext.environment.apiKey), n && n !== "GET" && (g.headers["Content-Type"] = "application/json; charset=utf-8"), d && Object.assign(g.headers, d), C || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
294
294
  var c = "".concat((o = e.evaluationContext.identity) === null || o === void 0 ? void 0 : o.identifier);
295
- return C(r, p).then(function(y) {
295
+ return C(r, g).then(function(y) {
296
296
  var k, V, P = "".concat((k = e.evaluationContext.identity) === null || k === void 0 ? void 0 : k.identifier);
297
297
  if (c === P) {
298
298
  var U = (V = y.headers) === null || V === void 0 ? void 0 : V.get("x-flagsmith-document-updated-at");
@@ -323,23 +323,23 @@ var Je = { exports: {} };
323
323
  }, this._onChange = function(r, n, a) {
324
324
  var o, v;
325
325
  e.setLoadingState(a), (o = e.onChange) === null || o === void 0 || o.call(e, r, n, e.loadingState), (v = e._trigger) === null || v === void 0 || v.call(e);
326
- }, C = t.fetch ? t.fetch : typeof fetch < "u" ? fetch : ve === null || ve === void 0 ? void 0 : ve.fetch, this.canUseStorage = typeof window < "u" || !!t.browserlessStorage, this.log("Constructing flagsmith instance " + t), t.eventSource && (fe = t.eventSource), t.AsyncStorage && (F = t.AsyncStorage);
326
+ }, C = t.fetch ? t.fetch : typeof fetch < "u" ? fetch : ve === null || ve === void 0 ? void 0 : ve.fetch, this.canUseStorage = typeof window < "u" || !!t.browserlessStorage, this.log("Constructing flagsmith instance " + t), t.eventSource && (fe = t.eventSource), t.AsyncStorage && (A = t.AsyncStorage);
327
327
  }
328
328
  return i.prototype.init = function(t) {
329
329
  var e, r, n;
330
330
  return O(this, void 0, void 0, function() {
331
- var a, o, v, d, p, c, y, k, V, P, U, j, N, G, re, ie, Z, T, m, pe, ae, Qe, Q, ye, et, tt, me, nt, be, oe, ee, rt, L = this;
331
+ var a, o, v, d, g, c, y, k, V, P, U, j, N, G, re, ie, Z, T, m, ge, ae, Qe, Q, ye, et, tt, me, nt, be, oe, ee, rt, L = this;
332
332
  return K(this, function(D) {
333
333
  switch (D.label) {
334
334
  case 0:
335
335
  a = Y(t.evaluationContext || this.evaluationContext), D.label = 1;
336
336
  case 1:
337
- if (D.trys.push([1, 13, , 14]), o = t.environmentID, v = t.api, d = v === void 0 ? qe : v, p = t.headers, c = t.onChange, y = t.cacheFlags, k = t.datadogRum, V = t.onError, P = t.defaultFlags, U = t.fetch, j = t.preventFetch, N = t.enableLogs, G = t.enableDynatrace, re = t.enableAnalytics, ie = t.realtime, Z = t.eventSourceUrl, T = Z === void 0 ? "https://realtime.flagsmith.com/" : Z, m = t.AsyncStorage, pe = t.identity, ae = t.traits, Qe = t.state, Q = t.cacheOptions, ye = t.angularHttpClient, et = t._trigger, tt = t._triggerLoadingState, a.environment = o ? { apiKey: o } : a.environment, !a.environment || !a.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
338
- if (a.identity = pe || ae ? { identifier: pe, traits: ae ? Object.fromEntries(Object.entries(ae).map(function(R) {
337
+ if (D.trys.push([1, 13, , 14]), o = t.environmentID, v = t.api, d = v === void 0 ? qe : v, g = t.headers, c = t.onChange, y = t.cacheFlags, k = t.datadogRum, V = t.onError, P = t.defaultFlags, U = t.fetch, j = t.preventFetch, N = t.enableLogs, G = t.enableDynatrace, re = t.enableAnalytics, ie = t.realtime, Z = t.eventSourceUrl, T = Z === void 0 ? "https://realtime.flagsmith.com/" : Z, m = t.AsyncStorage, ge = t.identity, ae = t.traits, Qe = t.state, Q = t.cacheOptions, ye = t.angularHttpClient, et = t._trigger, tt = t._triggerLoadingState, a.environment = o ? { apiKey: o } : a.environment, !a.environment || !a.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
338
+ if (a.identity = ge || ae ? { identifier: ge, traits: ae ? Object.fromEntries(Object.entries(ae).map(function(R) {
339
339
  return [R[0], { value: R[1] }];
340
- })) : {} } : a.identity, this.evaluationContext = a, this.api = d, this.headers = p, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = c, me = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = et || this._trigger, this._triggerLoadingState = tt || this._triggerLoadingState, this.onError = function(R) {
340
+ })) : {} } : a.identity, this.evaluationContext = a, this.api = d, this.headers = g, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = c, me = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = et || this._trigger, this._triggerLoadingState = tt || this._triggerLoadingState, this.onError = function(R) {
341
341
  L.setLoadingState(s(s({}, L.loadingState), { isFetching: !1, isLoading: !1, error: R })), V == null || V(R);
342
- }, this.enableLogs = N || !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."), U && (C = U), this.enableAnalytics = re || !1, this.flags = Object.assign({}, P) || {}, this.datadogRum = k || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = F !== void 0 && !!y, le = "FLAGSMITH_EVENT_" + a.environment.apiKey, m && (F = m), ie && typeof window < "u" && this.setupRealtime(T, a.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: g.DEFAULT_FLAGS })), this.setState(Qe), this.log("Initialising with properties", t, this), G && (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), ye && (C = /* @__PURE__ */ function(R) {
342
+ }, this.enableLogs = N || !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."), U && (C = U), this.enableAnalytics = re || !1, this.flags = Object.assign({}, P) || {}, this.datadogRum = k || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = A !== void 0 && !!y, le = "FLAGSMITH_EVENT_" + a.environment.apiKey, m && (A = m), ie && typeof window < "u" && this.setupRealtime(T, a.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: p.DEFAULT_FLAGS })), this.setState(Qe), this.log("Initialising with properties", t, this), G && (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), ye && (C = /* @__PURE__ */ function(R) {
343
343
  return function(J, q) {
344
344
  var z = q.headers, x = q.method, te = q.body;
345
345
  return new Promise(function(X) {
@@ -360,14 +360,14 @@ var Je = { exports: {} };
360
360
  }
361
361
  });
362
362
  };
363
- }(ye)), F && this.canUseStorage && F.getItem(le).then(function(R) {
363
+ }(ye)), A && this.canUseStorage && A.getItem(le).then(function(R) {
364
364
  try {
365
365
  L.evaluationEvent = JSON.parse(R) || {};
366
366
  } catch {
367
367
  L.evaluationEvent = {};
368
368
  }
369
369
  L.analyticsInterval = setInterval(L.analyticsFlags, L.ticks);
370
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), F && this.canUseStorage && F.getItem(le, function(R, J) {
370
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), A && this.canUseStorage && A.getItem(le, function(R, J) {
371
371
  if (J && L.evaluationContext.environment) {
372
372
  var q = JSON.parse(J);
373
373
  if (q[L.evaluationContext.environment.apiKey]) {
@@ -376,17 +376,17 @@ var Je = { exports: {} };
376
376
  }
377
377
  }
378
378
  })), !y) return [3, 9];
379
- if (!F || !this.canUseStorage) return [3, 8];
379
+ if (!A || !this.canUseStorage) return [3, 8];
380
380
  nt = function(R, J) {
381
381
  return O(L, void 0, void 0, function() {
382
- var q, z, x, te, X, M, Se, it, Ce, xe, Ee, we, Oe, ke, Te, Le, Fe, Ie, Ae, Pe, je, Ne, Re, Ue, at = this;
382
+ var q, z, x, te, X, M, Se, it, Ce, xe, Ee, we, Oe, ke, Te, Le, Ae, Fe, Ie, Pe, je, Ne, Re, Ue, at = this;
383
383
  return K(this, function(H) {
384
384
  switch (H.label) {
385
385
  case 0:
386
386
  if (!J) return [3, 7];
387
387
  q = null, z = null, H.label = 1;
388
388
  case 1:
389
- return H.trys.push([1, 5, , 6]), x = JSON.parse(J), te = !1, X = !1, x && x.api === this.api && ((xe = (Ce = x.evaluationContext) === null || Ce === void 0 ? void 0 : Ce.environment) === null || xe === void 0 ? void 0 : xe.apiKey) === ((Ee = this.evaluationContext.environment) === null || Ee === void 0 ? void 0 : Ee.apiKey) && (M = !0, this.evaluationContext.identity && ((Oe = (we = x.evaluationContext) === null || we === void 0 ? void 0 : we.identity) === null || Oe === void 0 ? void 0 : Oe.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Te = (ke = x.evaluationContext) === null || ke === void 0 ? void 0 : ke.identity) === null || Te === void 0 ? void 0 : Te.identifier) + " to " + this.evaluationContext.identity.identifier), M = !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"), M = !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"), X = !0, M = !0)), M && (te = !0, z = w((Le = this.evaluationContext.identity) === null || Le === void 0 ? void 0 : Le.traits, (Ie = (Fe = x.evaluationContext) === null || Fe === void 0 ? void 0 : Fe.identity) === null || Ie === void 0 ? void 0 : Ie.traits), q = w(this.flags, x.flags), this.setState(s(s({}, x), { evaluationContext: Y(s(s({}, x.evaluationContext), { identity: !((Ae = x.evaluationContext) === null || Ae === void 0) && Ae.identity ? s(s({}, (Pe = x.evaluationContext) === null || Pe === void 0 ? void 0 : Pe.identity), { traits: s(s({}, ((Ne = (je = x.evaluationContext) === null || je === void 0 ? void 0 : je.identity) === null || Ne === void 0 ? void 0 : Ne.traits) || {}), ae || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", x))), te ? (Se = !j && (!this.cacheOptions.skipAPI || X), this._onChange(null, { isFromServer: !1, flagsChanged: q, traitsChanged: z }, this._loadedState(null, g.CACHE, Se)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && te && !X && this.log("Skipping API, using cache"), Se && this.getFlags().catch(function(dt) {
389
+ return H.trys.push([1, 5, , 6]), x = JSON.parse(J), te = !1, X = !1, x && x.api === this.api && ((xe = (Ce = x.evaluationContext) === null || Ce === void 0 ? void 0 : Ce.environment) === null || xe === void 0 ? void 0 : xe.apiKey) === ((Ee = this.evaluationContext.environment) === null || Ee === void 0 ? void 0 : Ee.apiKey) && (M = !0, this.evaluationContext.identity && ((Oe = (we = x.evaluationContext) === null || we === void 0 ? void 0 : we.identity) === null || Oe === void 0 ? void 0 : Oe.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Te = (ke = x.evaluationContext) === null || ke === void 0 ? void 0 : ke.identity) === null || Te === void 0 ? void 0 : Te.identifier) + " to " + this.evaluationContext.identity.identifier), M = !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"), M = !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"), X = !0, M = !0)), M && (te = !0, z = w((Le = this.evaluationContext.identity) === null || Le === void 0 ? void 0 : Le.traits, (Fe = (Ae = x.evaluationContext) === null || Ae === void 0 ? void 0 : Ae.identity) === null || Fe === void 0 ? void 0 : Fe.traits), q = w(this.flags, x.flags), this.setState(s(s({}, x), { evaluationContext: Y(s(s({}, x.evaluationContext), { identity: !((Ie = x.evaluationContext) === null || Ie === void 0) && Ie.identity ? s(s({}, (Pe = x.evaluationContext) === null || Pe === void 0 ? void 0 : Pe.identity), { traits: s(s({}, ((Ne = (je = x.evaluationContext) === null || je === void 0 ? void 0 : je.identity) === null || Ne === void 0 ? void 0 : Ne.traits) || {}), ae || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", x))), te ? (Se = !j && (!this.cacheOptions.skipAPI || X), this._onChange(null, { isFromServer: !1, flagsChanged: q, traitsChanged: z }, this._loadedState(null, p.CACHE, Se)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && te && !X && this.log("Skipping API, using cache"), Se && this.getFlags().catch(function(dt) {
390
390
  var De;
391
391
  (De = at.onError) === null || De === void 0 || De.call(at, dt);
392
392
  }), [3, 4]) : [3, 2];
@@ -405,10 +405,10 @@ var Je = { exports: {} };
405
405
  case 8:
406
406
  return H.sent(), [3, 10];
407
407
  case 9:
408
- if (P) this._onChange(null, { isFromServer: !1, flagsChanged: w({}, this.flags), traitsChanged: w({}, (Re = this.evaluationContext.identity) === null || Re === void 0 ? void 0 : Re.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
408
+ if (P) this._onChange(null, { isFromServer: !1, flagsChanged: w({}, this.flags), traitsChanged: w({}, (Re = this.evaluationContext.identity) === null || Re === void 0 ? void 0 : Re.traits) }, this._loadedState(null, p.DEFAULT_FLAGS));
409
409
  else {
410
410
  if (!this.flags) throw new Error(me);
411
- this._onChange(null, { isFromServer: !1, flagsChanged: w({}, this.flags), traitsChanged: w({}, (Ue = this.evaluationContext.identity) === null || Ue === void 0 ? void 0 : Ue.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
411
+ this._onChange(null, { isFromServer: !1, flagsChanged: w({}, this.flags), traitsChanged: w({}, (Ue = this.evaluationContext.identity) === null || Ue === void 0 ? void 0 : Ue.traits) }, this._loadedState(null, p.DEFAULT_FLAGS));
412
412
  }
413
413
  H.label = 10;
414
414
  case 10:
@@ -418,9 +418,9 @@ var Je = { exports: {} };
418
418
  });
419
419
  }, D.label = 2;
420
420
  case 2:
421
- return D.trys.push([2, 7, , 8]), F.getItemSync ? (be = F.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
421
+ return D.trys.push([2, 7, , 8]), A.getItemSync ? (be = A.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
422
422
  case 3:
423
- return [4, F.getItem(this.getStorageKey())];
423
+ return [4, A.getItem(this.getStorageKey())];
424
424
  case 4:
425
425
  be = D.sent(), D.label = 5;
426
426
  case 5:
@@ -435,8 +435,8 @@ var Je = { exports: {} };
435
435
  case 10:
436
436
  return D.sent(), [3, 12];
437
437
  case 11:
438
- if (P) this._onChange(null, { isFromServer: !1, flagsChanged: w({}, P), traitsChanged: w({}, (e = a.identity) === null || e === void 0 ? void 0 : e.traits) }, this._loadedState(null, g.DEFAULT_FLAGS));
439
- else if (this.flags && (oe = null, Object.keys(this.flags).length === 0 && (oe = me), this._onChange(null, { isFromServer: !1, flagsChanged: w({}, this.flags), traitsChanged: w({}, (r = a.identity) === null || r === void 0 ? void 0 : r.traits) }, this._loadedState(oe, g.DEFAULT_FLAGS)), oe)) throw new Error(oe);
438
+ if (P) this._onChange(null, { isFromServer: !1, flagsChanged: w({}, P), traitsChanged: w({}, (e = a.identity) === null || e === void 0 ? void 0 : e.traits) }, this._loadedState(null, p.DEFAULT_FLAGS));
439
+ else if (this.flags && (oe = null, Object.keys(this.flags).length === 0 && (oe = me), this._onChange(null, { isFromServer: !1, flagsChanged: w({}, this.flags), traitsChanged: w({}, (r = a.identity) === null || r === void 0 ? void 0 : r.traits) }, this._loadedState(oe, p.DEFAULT_FLAGS)), oe)) throw new Error(oe);
440
440
  D.label = 12;
441
441
  case 12:
442
442
  return [3, 14];
@@ -452,7 +452,7 @@ var Je = { exports: {} };
452
452
  }, i.prototype.identify = function(t, e, r) {
453
453
  return this.evaluationContext.identity = { identifier: t, transient: r, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == t ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = t, this.log("Identify: " + this.evaluationContext.identity.identifier), e && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(e).map(function(n) {
454
454
  var a = n[0], o = n[1];
455
- return [a, A(o) ? o : { value: o }];
455
+ return [a, I(o) ? o : { value: o }];
456
456
  }))), this.initialised ? this.getFlags() : Promise.resolve();
457
457
  }, i.prototype.getState = function() {
458
458
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
@@ -468,17 +468,17 @@ var Je = { exports: {} };
468
468
  return t === void 0 && (t = null), r === void 0 && (r = !1), { error: t, isFetching: r, isLoading: !1, source: e };
469
469
  }, i.prototype.log = function() {
470
470
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
471
- this.enableLogs && console.log.apply(this, I(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], t));
471
+ this.enableLogs && console.log.apply(this, F(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], t));
472
472
  }, i.prototype.updateStorage = function() {
473
473
  if (this.cacheFlags) {
474
474
  this.ts = (/* @__PURE__ */ new Date()).valueOf();
475
475
  var t = JSON.stringify(this.getState());
476
- this.log("Setting storage", t), F.setItem(this.getStorageKey(), t);
476
+ this.log("Setting storage", t), A.setItem(this.getStorageKey(), t);
477
477
  }
478
478
  }, i.prototype.updateEventStorage = function() {
479
479
  if (this.enableAnalytics) {
480
480
  var t = JSON.stringify(this.getState().evaluationEvent);
481
- F.setItem(le, t).catch(function(e) {
481
+ A.setItem(le, t).catch(function(e) {
482
482
  return console.error("Flagsmith: Error setting item in async storage", e);
483
483
  });
484
484
  }
@@ -537,7 +537,7 @@ var Je = { exports: {} };
537
537
  }
538
538
  }
539
539
  return o;
540
- }, ge = function(i, t, e) {
540
+ }, pe = function(i, t, e) {
541
541
  if (arguments.length === 2) for (var r, n = 0, a = t.length; n < a; n++) !r && n in t || (r || (r = Array.prototype.slice.call(t, 0, n)), r[n] = t[n]);
542
542
  return i.concat(r || Array.prototype.slice.call(t));
543
543
  }, _t = function(i) {
@@ -595,7 +595,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
595
595
  t && t.lastEventId && (this._lastEventId = t.lastEventId);
596
596
  var n = this._listeners[t.type];
597
597
  if (n != null) try {
598
- for (var a = $e(ge([], Xe(n), !1)), o = a.next(); !o.done; o = a.next())
598
+ for (var a = $e(pe([], Xe(n), !1)), o = a.next(); !o.done; o = a.next())
599
599
  o.value.call(this, t);
600
600
  } catch (v) {
601
601
  e = { error: v };
@@ -615,7 +615,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
615
615
  }, i.prototype.addEventListener = function(t, e, r) {
616
616
  this._listeners[t] == null && (this._listeners[t] = [], this._eventSource != null && this._eventSource.addEventListener(t, this._onevent_wrapped));
617
617
  var n = this._listeners[t];
618
- n.includes(e) || (this._listeners[t] = ge(ge([], Xe(n), !1), [e], !1));
618
+ n.includes(e) || (this._listeners[t] = pe(pe([], Xe(n), !1), [e], !1));
619
619
  }, i.prototype.removeEventListener = function(t, e, r) {
620
620
  var n = this._listeners[t];
621
621
  this._listeners[t] = n.filter(function(a) {
@@ -643,11 +643,11 @@ Consider loading an EventSource polyfill and making it available globally as Eve
643
643
  return c.toLowerCase() in v;
644
644
  } } };
645
645
  };
646
- for (var p in n.open(t.method || "get", i, !0), n.onload = function() {
646
+ for (var g in n.open(t.method || "get", i, !0), n.onload = function() {
647
647
  n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(c, y, k) {
648
648
  a.push(y = y.toLowerCase()), o.push([y, k]), v[y] = v[y] ? v[y] + "," + k : k;
649
649
  }), e(d());
650
- }, n.onerror = r, n.withCredentials = t.credentials == "include", t.headers) n.setRequestHeader(p, t.headers[p]);
650
+ }, n.onerror = r, n.withCredentials = t.credentials == "include", t.headers) n.setRequestHeader(g, t.headers[g]);
651
651
  n.send(t.body || null);
652
652
  });
653
653
  }, Ze = He({ AsyncStorage: f, fetch: Ye, eventSource: We });
@@ -656,7 +656,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
656
656
  }, _.default = Ze, Object.defineProperty(_, "__esModule", { value: !0 });
657
657
  });
658
658
  })(Je, Je.exports);
659
- var pt = Je.exports, yt = {
659
+ var gt = Je.exports, yt = {
660
660
  NOT_INITIALIZED: "FeatureFlag not initialized. Call init() first.",
661
661
  INVALID_CONFIG: "Invalid Flagsmith configuration",
662
662
  FETCH_FAILED: "Failed to fetch Flagsmith configuration",
@@ -677,7 +677,7 @@ var pt = Je.exports, yt = {
677
677
  async init(u, _ = []) {
678
678
  if (!this.flagsmithClient)
679
679
  try {
680
- this.flagsmithClient = pt.createFlagsmithInstance();
680
+ this.flagsmithClient = gt.createFlagsmithInstance();
681
681
  const f = _.reduce((s, O) => (s[O.feature.name] = O, s), {});
682
682
  await this.flagsmithClient.init({
683
683
  environmentID: u.apiKey,
@@ -751,13 +751,13 @@ var pt = Je.exports, yt = {
751
751
  const O = this.userContext;
752
752
  try {
753
753
  return await this.setUser(u), this.getFlagValue(_, s) ?? f;
754
- } catch (I) {
755
- return console.error(`Error getting user flag value for ${_}:`, I), f;
754
+ } catch (F) {
755
+ return console.error(`Error getting user flag value for ${_}:`, F), f;
756
756
  } finally {
757
757
  try {
758
758
  await ((K = this.flagsmithClient) == null ? void 0 : K.logout()), this.userContext = null, O && await this.setUser(O.identifier);
759
- } catch (I) {
760
- console.error("Error during cleanup:", I);
759
+ } catch (F) {
760
+ console.error("Error during cleanup:", F);
761
761
  }
762
762
  }
763
763
  }
@@ -766,49 +766,49 @@ var pt = Je.exports, yt = {
766
766
  }
767
767
  }, ce(B, "instance"), B), bt = mt.getInstance(), se = de(!1), _e = de([]), ne = de(null);
768
768
  function St(l = bt) {
769
- const u = () => se.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), _ = async (g, C = []) => {
769
+ const u = () => se.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), _ = async (p, C = []) => {
770
770
  if (se.value) {
771
771
  console.warn("FeatureFlag is already initialized.");
772
772
  return;
773
773
  }
774
774
  try {
775
- await l.init(g, C), _e.value = await l.getFlags(), se.value = !0, ne.value = null;
775
+ await l.init(p, C), _e.value = await l.getFlags(), se.value = !0, ne.value = null;
776
776
  } catch (E) {
777
777
  console.error("Failed to initialize feature flags:", E), ne.value = E;
778
778
  }
779
- }, f = async (g) => {
779
+ }, f = async (p) => {
780
780
  if (u())
781
781
  try {
782
- await l.setUser(g), _e.value = await l.getFlags(), ne.value = null;
782
+ await l.setUser(p), _e.value = await l.getFlags(), ne.value = null;
783
783
  } catch (C) {
784
784
  console.error("Failed to set user:", C), ne.value = C;
785
785
  }
786
- }, s = async (g) => f(`${st}-${g}`), O = (g, C, E = null) => {
786
+ }, s = async (p) => f(`${st}-${p}`), O = (p, C, E = null) => {
787
787
  if (!u()) return E;
788
788
  try {
789
- return l.getFlagValue(g, C) ?? E;
790
- } catch (A) {
791
- return console.error(`Error getting flag value for ${g}:`, A), E;
789
+ return l.getFlagValue(p, C) ?? E;
790
+ } catch (I) {
791
+ return console.error(`Error getting flag value for ${p}:`, I), E;
792
792
  }
793
- }, K = (g, C) => {
793
+ }, K = (p, C) => {
794
794
  if (!u()) return C ?? null;
795
795
  try {
796
- return l.getFlag(g) ?? C ?? null;
796
+ return l.getFlag(p) ?? C ?? null;
797
797
  } catch (E) {
798
- return console.error(`Error getting flag for ${g}:`, E), C ?? null;
798
+ return console.error(`Error getting flag for ${p}:`, E), C ?? null;
799
799
  }
800
- }, I = async (g, C, E = null, A) => {
800
+ }, F = async (p, C, E = null, I) => {
801
801
  if (!u()) return E;
802
802
  try {
803
- return await l.getUserFlagValue(g, C, E, A);
803
+ return await l.getUserFlagValue(p, C, E, I);
804
804
  } catch ($) {
805
805
  return console.error(`Error getting user flag value for ${C}:`, $), E;
806
806
  }
807
- }, W = async (g, C, E = null, A) => I(`${st}-${g}`, C, E, A), w = () => {
807
+ }, W = async (p, C, E = null, I) => F(`${st}-${p}`, C, E, I), w = () => {
808
808
  try {
809
809
  l.reset();
810
- } catch (g) {
811
- console.error("Error resetting feature flags:", g);
810
+ } catch (p) {
811
+ console.error("Error resetting feature flags:", p);
812
812
  } finally {
813
813
  _e.value = [], se.value = !1, ne.value = null;
814
814
  }
@@ -822,12 +822,12 @@ function St(l = bt) {
822
822
  setBusiness: s,
823
823
  getFlagValue: O,
824
824
  getFlag: K,
825
- getUserFlagValue: I,
825
+ getUserFlagValue: F,
826
826
  getBusinessFlagValue: W,
827
827
  reset: w
828
828
  };
829
829
  }
830
- var he = () => St(), b = /* @__PURE__ */ ((l) => (l.inventory_portal_must_use_transfer_template = "inventory_portal_must_use_transfer_template", l.inventory_portal_use_iframe = "inventory_portal_use_iframe", l.inventory_pos_adjust_v1 = "inventory_pos_adjust_v1", l.inventory_pos_adjust_v2_wastage = "inventory_pos_adjust_v2_wastage", l.inventory_pos_closing_recalculation = "inventory_pos_closing_recalculation", l.inventory_pos_closing_v1 = "inventory_pos_closing_v1", l.inventory_pos_closing_v2 = "inventory_pos_closing_v2", l.inventory_pos_convert_v1 = "inventory_pos_convert_v1", l.inventory_pos_costing = "inventory_pos_costing", l.inventory_pos_stock_return = "inventory_pos_stock_return", l.inventory_pos_transfer_require_fulfillment = "inventory_pos_transfer_require_fulfillment", l.inventory_purchase_order_approval = "inventory_purchase_order_approval", l.inventory_portal_xilnex_transfer_note = "inventory_portal_xilnex_transfer_note", l.inventory_portal_custom_attribute = "inventory_portal_custom_attribute", l.inventory_portal_purchase_order_v2 = "inventory_portal_purchase_order_v2", l.inventory_portal_accept_require_fulfillment = "inventory_portal_accept_require_fulfillment", l.inventory_portal_po_operate_v2 = "inventory_portal_po_operate_v2", l.inventory_pos_allow_receive_order = "inventory_pos_allow_receive_order", l.inventory_xilnex_opening_migration = "inventory_xilnex_opening_migration", l.inventory_ingredient_group = "inventory_ingredient_group", l.inventory_purchase_order_backdate = "inventory_purchase_order_backdate", l.inventory_synergy_opening_migration = "inventory_synergy_opening_migration", l.inventory_netsuite_inventory_transfer_out = "inventory_netsuite_inventory_transfer_out", l.inventory_portal_supplier_preparation_time = "inventory_portal_supplier_preparation_time", l.inventory_backdate_receive = "inventory_backdate_receive", l.inventory_portal_delivery_order_write = "inventory_portal_delivery_order_write", l.inventory_purchase_order_custom_cost = "inventory_purchase_order_custom_cost", l.inventory_bulk_import = "inventory_bulk_import", l.inventory_portal_surcharge = "inventory_portal_surcharge", l.inventory_purchase_order_cost_edit = "inventory_purchase_order_cost_edit", l.inventory_purchase_order_workflow_allow_to_mark_completed = "inventory_purchase_order_workflow_allow_to_mark_completed", l.inventory_recipe_v2 = "inventory_recipe_v2", l.inventory_print_template = "inventory_print_template", l.inventory_purchase_order_email = "inventory_purchase_order_email", l.inventory_bulk_edit_recipes = "inventory_bulk_edit_recipes", l))(b || {});
830
+ var he = () => St(), b = /* @__PURE__ */ ((l) => (l.inventory_portal_must_use_transfer_template = "inventory_portal_must_use_transfer_template", l.inventory_portal_use_iframe = "inventory_portal_use_iframe", l.inventory_pos_adjust_v1 = "inventory_pos_adjust_v1", l.inventory_pos_adjust_v2_wastage = "inventory_pos_adjust_v2_wastage", l.inventory_pos_closing_recalculation = "inventory_pos_closing_recalculation", l.inventory_pos_closing_v1 = "inventory_pos_closing_v1", l.inventory_pos_closing_v2 = "inventory_pos_closing_v2", l.inventory_pos_convert_v1 = "inventory_pos_convert_v1", l.inventory_pos_costing = "inventory_pos_costing", l.inventory_pos_stock_return = "inventory_pos_stock_return", l.inventory_pos_transfer_require_fulfillment = "inventory_pos_transfer_require_fulfillment", l.inventory_purchase_order_approval = "inventory_purchase_order_approval", l.inventory_portal_xilnex_transfer_note = "inventory_portal_xilnex_transfer_note", l.inventory_portal_custom_attribute = "inventory_portal_custom_attribute", l.inventory_portal_purchase_order_v2 = "inventory_portal_purchase_order_v2", l.inventory_portal_accept_require_fulfillment = "inventory_portal_accept_require_fulfillment", l.inventory_portal_po_operate_v2 = "inventory_portal_po_operate_v2", l.inventory_pos_allow_receive_order = "inventory_pos_allow_receive_order", l.inventory_xilnex_opening_migration = "inventory_xilnex_opening_migration", l.inventory_ingredient_group = "inventory_ingredient_group", l.inventory_purchase_order_backdate = "inventory_purchase_order_backdate", l.inventory_synergy_opening_migration = "inventory_synergy_opening_migration", l.inventory_netsuite_inventory_transfer_out = "inventory_netsuite_inventory_transfer_out", l.inventory_portal_supplier_preparation_time = "inventory_portal_supplier_preparation_time", l.inventory_backdate_receive = "inventory_backdate_receive", l.inventory_portal_delivery_order_write = "inventory_portal_delivery_order_write", l.inventory_purchase_order_custom_cost = "inventory_purchase_order_custom_cost", l.inventory_bulk_import = "inventory_bulk_import", l.inventory_portal_surcharge = "inventory_portal_surcharge", l.inventory_purchase_order_cost_edit = "inventory_purchase_order_cost_edit", l.inventory_purchase_order_workflow_allow_to_mark_completed = "inventory_purchase_order_workflow_allow_to_mark_completed", l.inventory_recipe_v2 = "inventory_recipe_v2", l.inventory_print_template = "inventory_print_template", l.inventory_purchase_order_email = "inventory_purchase_order_email", l.inventory_bulk_edit_recipes = "inventory_bulk_edit_recipes", l.inventory_stocksnapshot_cron_beta = "inventory_stocksnapshot_cron_beta", l.inventory_scheduler_daily_stock_snapshot = "inventory_scheduler_daily_stock_snapshot", l.inventory_scheduler_hourly_recalculation = "inventory_scheduler_hourly_recalculation", l))(b || {});
831
831
  const Ct = /* @__PURE__ */ new Set([
832
832
  // vivo pizza prod
833
833
  "business_6687e91fa7240b001ba3f4c2",
@@ -878,7 +878,7 @@ function lt() {
878
878
  report_portal_po_forecast_days_default: 7
879
879
  };
880
880
  }
881
- const h = de(lt()), It = () => ({
881
+ const h = de(lt()), Ft = () => ({
882
882
  get businessDbName() {
883
883
  var _;
884
884
  return `business_${((_ = Ke().currentBusiness.value) == null ? void 0 : _._id) ?? ""}`;
@@ -1002,21 +1002,21 @@ const h = de(lt()), It = () => ({
1002
1002
  return h.value.report_portal_po_forecast_days_default;
1003
1003
  },
1004
1004
  async init() {
1005
- const l = Ke(), { init: u, setBusiness: _ } = he(), f = gt(), s = l.namespace.value === "prod";
1005
+ const l = Ke(), { init: u, setBusiness: _ } = he(), f = pt(), s = l.namespace.value === "prod";
1006
1006
  await u({
1007
1007
  apiKey: s ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
1008
1008
  // url: 'https://flag.feedme.farm/api/v1/', // optional -> this is a default URL value
1009
1009
  // enableAnalytics: true, // optional, defaults to true
1010
1010
  // cacheFlags: true // optional, defaults to true
1011
1011
  }), Ve().watchLocation(async (K) => {
1012
- var A, $, Y;
1012
+ var I, $, Y;
1013
1013
  if (!K) {
1014
1014
  h.value = lt();
1015
1015
  return;
1016
1016
  }
1017
- const I = ((A = l.currentBusiness.value) == null ? void 0 : A._id) ?? "";
1018
- await _(I);
1019
- const W = `business_${I}`, w = K.type === ot.enum.warehouse, g = (
1017
+ const F = ((I = l.currentBusiness.value) == null ? void 0 : I._id) ?? "";
1018
+ await _(F);
1019
+ const W = `business_${F}`, w = K.type === ot.enum.warehouse, p = (
1020
1020
  // if menu v4, must manual receive && must use outlet app
1021
1021
  (($ = l.currentBusiness.value) == null ? void 0 : $.menuVersion) === "v4" && // more guard for businesses using menu v4, only those listed for manual receive will be included
1022
1022
  // TODO: may be removed to use menu version only
@@ -1026,8 +1026,8 @@ const h = de(lt()), It = () => ({
1026
1026
  isLoaded: !0,
1027
1027
  enableTotalCost: ((Y = l.currentBusiness.value) == null ? void 0 : Y.menuVersion) === "v4",
1028
1028
  enableBackdatePo: E,
1029
- autoReceiveWarehouse: w && !g,
1030
- manualReceive: g,
1029
+ autoReceiveWarehouse: w && !p,
1030
+ manualReceive: p,
1031
1031
  enablePoTemplate: C,
1032
1032
  enableClosingTemplate: S(b.inventory_pos_closing_v2),
1033
1033
  enableWastageTemplate: S(b.inventory_pos_adjust_v2_wastage),
@@ -1113,5 +1113,5 @@ function wt(l, u) {
1113
1113
  export {
1114
1114
  b as I,
1115
1115
  he as a,
1116
- It as u
1116
+ Ft as u
1117
1117
  };
@@ -1,4 +1,4 @@
1
- import { h as n } from "./date2-BXHREmqe.js";
1
+ import { h as n } from "./date2-D_-j6u1x.js";
2
2
  function d(r) {
3
3
  const t = a(r);
4
4
  return t === null ? "" : n(t);
@@ -1,23 +1,23 @@
1
1
  import { components as X, useDialogChild as Ae, useSnackbar as ye, useDialog as De, FmButtonVariant as j } from "@feedmepos/ui-library";
2
2
  import { defineStore as he } from "pinia";
3
3
  import { F as le } from "./form-mode.enum-BKiNVH6A.js";
4
- import { u as ve } from "./purchase-order-template-Dq3N4vgB.js";
4
+ import { u as ve } from "./purchase-order-template-_FfLY2u1.js";
5
5
  import { ref as E, h as K, defineComponent as te, resolveComponent as U, openBlock as _, createElementBlock as k, createElementVNode as C, normalizeClass as V, createTextVNode as Ne, toDisplayString as N, unref as O, createCommentVNode as q, createVNode as P, withCtx as ee, Fragment as L, renderList as W, onMounted as Re, computed as me, watch as Fe, createSlots as Pe, createBlock as z } from "vue";
6
- import { a as H, c as re, r as A, u as Z, l as Me, j as ce, s as Le, R as ue } from "./app-BtIUZZer.js";
6
+ import { a as H, c as re, r as A, u as Z, l as Me, j as ce, s as Le, R as ue } from "./app-cwueji6m.js";
7
7
  import { useRouter as Be } from "vue-router";
8
- import { a as Qe } from "./FmMultiselectDialog-CrbCQvck.js";
8
+ import { a as Qe } from "./FmMultiselectDialog-e4dbq-bB.js";
9
9
  import { D as Y, R as D } from "./row-action.enum-DQ9bJ_uv.js";
10
10
  import { c as Ue } from "./component-kqxARxvM.js";
11
- import { f as Ve } from "./format-time-from-id-q1T46zz9.js";
11
+ import { f as Ve } from "./format-time-from-id-2IFiQNTX.js";
12
12
  import { useI18n as ne, useCoreStore as ge } from "@feedmepos/mf-common";
13
- import { t as B, a as be, d as xe, s as Te, r as qe } from "./xlsx.util-TwDCO4ay.js";
13
+ import { t as B, a as be, d as xe, s as Te, r as qe } from "./xlsx.util-CD_xD6ZX.js";
14
14
  import { F as He } from "./FmDroppableField-J0xUsOTV.js";
15
- import { c as je, a as Q, t as G, g as J } from "./number-C6mI12qg.js";
16
- import { f as ze } from "./date2-BXHREmqe.js";
17
- import { u as oe } from "./supplier-CkfePT6a.js";
18
- import { a as Ye, B as Ke } from "./rules-Dajxj04v.js";
19
- import { u as ae } from "./netsuite-CuPJ_UTs.js";
20
- import { u as We } from "./duplicate-template-CTHciPHW.js";
15
+ import { c as je, a as Q, t as G, g as J } from "./number-Cqsx9s88.js";
16
+ import { f as ze } from "./date2-D_-j6u1x.js";
17
+ import { u as oe } from "./supplier-6K9Cbfcf.js";
18
+ import { a as Ye, B as Ke } from "./rules-DB26S6qs.js";
19
+ import { u as ae } from "./netsuite-BiF6Fo7G.js";
20
+ import { u as We } from "./duplicate-template-Y9iggS9l.js";
21
21
  function Se(t) {
22
22
  const e = H(), a = t.sku, u = e.skuById[a._id];
23
23
  if (u.unit._id !== a.unit._id) return !0;
@@ -0,0 +1,12 @@
1
+ import { type ComputedRef } from 'vue';
2
+ export interface UomMeasurement {
3
+ name: string;
4
+ abbrev: string;
5
+ }
6
+ export interface UomContext {
7
+ netSuiteEnabled: boolean;
8
+ }
9
+ export declare function isInactiveMeasurement(measurement: UomMeasurement): boolean;
10
+ export declare function isHiddenByBaseline(measurement: UomMeasurement, ctx: UomContext): boolean;
11
+ export declare function isFlaggedInactive(measurement: UomMeasurement, ctx: UomContext): boolean;
12
+ export declare function useUomContext(): ComputedRef<UomContext>;
@@ -1,10 +1,10 @@
1
- import { a as w, t as H, f as T } from "./number-C6mI12qg.js";
2
- import { u as P } from "./feature-RoG35971.js";
1
+ import { a as w, t as H, f as T } from "./number-Cqsx9s88.js";
2
+ import { u as P } from "./feature-BhK4XmmS.js";
3
3
  import { useCoreStore as g } from "@feedmepos/mf-common";
4
- import { a as y, g as k, l as j, d as S } from "./app-BtIUZZer.js";
5
- import { b as N, d as $, s as I } from "./xlsx.util-TwDCO4ay.js";
6
- import { f as _ } from "./date2-BXHREmqe.js";
7
- import { I as O } from "./rules-Dajxj04v.js";
4
+ import { a as y, g as k, l as j, d as S } from "./app-cwueji6m.js";
5
+ import { b as N, d as $, s as I } from "./xlsx.util-CD_xD6ZX.js";
6
+ import { f as _ } from "./date2-D_-j6u1x.js";
7
+ import { I as O } from "./rules-DB26S6qs.js";
8
8
  function R() {
9
9
  return {
10
10
  low: 6,
@@ -1,4 +1,4 @@
1
- import { y as x, ap as V, aq as J, ar as Ne, ae as $l, U as sr, as as Lt, at as Er, au as Fr } from "./app-BtIUZZer.js";
1
+ import { y as x, ap as V, aq as J, ar as Ne, ah as $l, U as sr, as as Lt, at as Er, au as Fr } from "./app-cwueji6m.js";
2
2
  function vl(t, e) {
3
3
  for (var r = 0; r < e.length; r++) {
4
4
  const n = e[r];