@feedmepos/mf-menu 0.31.30-beta.1 → 0.31.31-beta.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 (62) hide show
  1. package/dist/{App-CrQBq4gc.js → App-1TX8v7ZA.js} +10 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D00UOSsK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js} +12 -12
  3. package/dist/{Catalog-D4m8x_f2.js → Catalog-DWClc58s.js} +75 -74
  4. package/dist/{Category-sQll5ITQ.js → Category-BqKFvFam.js} +60 -60
  5. package/dist/{Category-Ql1kDDH-.js → Category-IYMtMoT-.js} +28 -28
  6. package/dist/{CookingGuide-CSutufcu.js → CookingGuide-BayJ6zj4.js} +103 -101
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BqhYFXNG.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js} +1 -1
  8. package/dist/{Group-CnBE6CiB.js → Group-LqSX7ue6.js} +1 -1
  9. package/dist/{Group-YqVh5hC0.js → Group-RujTPTns.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-D9TSH4sS.js → Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js} +138 -137
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CqriuXVC.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js} +16 -16
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js} +4616 -4610
  13. package/dist/{Ingredient-MhLxJzAU.js → Ingredient-_tc8llr1.js} +65 -64
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIbExsMI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js} +14 -12
  15. package/dist/{LinkProductSideSheet-D7vYZbFy.js → LinkProductSideSheet-C6rF-G1v.js} +14 -12
  16. package/dist/{MenuSetting-n0me5wY8.js → MenuSetting-xDHeeROY.js} +27 -26
  17. package/dist/{PrintRoute-CudZZYbe.js → PrintRoute-B_TFMn5e.js} +17 -15
  18. package/dist/{Product-DPZQgWET.js → Product-DdEEqrtc.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js → Product.vue_vue_type_script_setup_true_lang-zcistmwh.js} +257 -256
  20. package/dist/{ProductInternalTools-DgANHliV.js → ProductInternalTools-BcC7BF6W.js} +45 -45
  21. package/dist/{Products-Ez4R3jKW.js → Products-Cu0cJshV.js} +74 -72
  22. package/dist/{Publish-B4DEPe1I.js → Publish-Bm3Xiks1.js} +34 -32
  23. package/dist/{Recipe-Cripr-gY.js → Recipe-DWK-luIZ.js} +65 -63
  24. package/dist/{Scheduler-C-OV9d7d.js → Scheduler-Cb1TeBhW.js} +19 -19
  25. package/dist/{ServingSequence-DAumDXP1.js → ServingSequence-evSIET_8.js} +34 -34
  26. package/dist/{Setting-ByaHpIAN.js → Setting-Cn3kwC9F.js} +54 -53
  27. package/dist/{Subcategory-ro2aGt2H.js → Subcategory-q4m4qHsU.js} +34 -34
  28. package/dist/{Takeaway-CJb0ayDC.js → Takeaway-ClepHYGu.js} +14 -14
  29. package/dist/{Takeaway-AEg_0gKg.js → Takeaway-D-rdUZuh.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cjj4bxoL.js → Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js} +41 -40
  31. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Drf4n4rj.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js} +1108 -1106
  32. package/dist/{Unit-1wzUBplb.js → Unit-IM8Naj82.js} +12 -12
  33. package/dist/{Variant-Dnz2v5u0.js → Variant-fzGvwaMo.js} +16 -16
  34. package/dist/{_id_-C3rBZ6zL.js → _id_-BsKNG9Qv.js} +22 -22
  35. package/dist/{app-sDPxNF11.js → app-BzQRUMTK.js} +3 -3
  36. package/dist/{app-CLY6CoaV.js → app-CoVUUCa_.js} +24 -24
  37. package/dist/app.js +1 -1
  38. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/assets/{linked-status-BZ4FSJ_Z.js → linked-status-eQqjvOq_.js} +2 -2
  40. package/dist/assets/{override-menu-C-fWJdVd.js → override-menu-C8NTBJgN.js} +2 -2
  41. package/dist/assets/{validate-menu-BDEM_Odz.js → validate-menu-Dn-OO7Ed.js} +2 -2
  42. package/dist/{catalog-bkFntZNz.js → catalog-CaXceaA2.js} +1 -1
  43. package/dist/{catalogSetting-zrKwGJ_C.js → catalogSetting-BGvckFdh.js} +1 -1
  44. package/dist/{category-BuPYaEsy.js → category-u5eo_Vjd.js} +5 -3
  45. package/dist/currency-BPHwez-E.js +7 -0
  46. package/dist/{dayjs.min-CR2NIyKn.js → dayjs.min-Bsr3tJCn.js} +1 -1
  47. package/dist/{index-BNORpjos.js → index-Bbx4iZ6n.js} +27 -27
  48. package/dist/{index-Dp_vLFQp.js → index-DSAG0yWh.js} +22 -20
  49. package/dist/{index-D20u0bCl.js → index-tRQb7RN_.js} +1 -1
  50. package/dist/{item-D4DcBt7N.js → item-BAqzKh4O.js} +801 -799
  51. package/dist/{jszip.min-CRJ61J9H.js → jszip.min-BKJtvCjM.js} +353 -353
  52. package/dist/{menu-Dw-Hpy07.js → menu-CDrsBjmr.js} +11 -9
  53. package/dist/menu-CsIzrBEr.js +74044 -0
  54. package/dist/packages/shared/src/permission/posPermission.d.ts +6 -0
  55. package/dist/{priceTier-EDLTGEjz.js → priceTier-DfbHonGe.js} +4 -4
  56. package/dist/{scheduler-CpPn2BlK.js → scheduler-DTWaBudB.js} +13 -11
  57. package/dist/{subcategory-B_W6vbM8.js → subcategory-D-R5r1Tr.js} +86 -84
  58. package/dist/{toExcel-D02OlDJu.js → toExcel-84VTtSA7.js} +2 -2
  59. package/dist/{unit-fro9wz1K.js → unit-B4zscxzo.js} +24 -23
  60. package/package.json +1 -1
  61. package/dist/currency-BISImIgX.js +0 -7
  62. package/dist/menu-ibc-yXVt.js +0 -107745
@@ -0,0 +1,6 @@
1
+ import type { FdoPermissionRule } from "@feedmepos/core/entity";
2
+ /**
3
+ * TODO:Previously, it's exported from @feedmepos/core, but it's removed under new versions
4
+ * So we redefine here temporarily
5
+ */
6
+ export declare const fullPosPermissions: FdoPermissionRule[];
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as d, ref as g, watch as _, resolveComponent as S, createBlock as T, openBlock as f, unref as y, computed as h } from "vue";
2
2
  import { useI18n as m } from "@feedmepos/mf-common";
3
3
  import { useDialogChild as w, useDialog as x, useSnackbar as C } from "@feedmepos/ui-library";
4
- import { u as k, D as M } from "./menu-ibc-yXVt.js";
5
- const v = /* @__PURE__ */ d({
4
+ import { u as k, A } from "./menu-CsIzrBEr.js";
5
+ const M = /* @__PURE__ */ d({
6
6
  __name: "AddPriceGroupDialog",
7
7
  setup(s) {
8
8
  const { t: e } = m(), o = g(""), { emitData: t } = w();
@@ -18,11 +18,11 @@ const v = /* @__PURE__ */ d({
18
18
  };
19
19
  }
20
20
  }), F = (s) => {
21
- const { t: e } = m(), o = x(), t = s || k(), c = C(), n = M(c), r = h(() => t.state.menu.priceTierSettings || []);
21
+ const { t: e } = m(), o = x(), t = s || k(), c = C(), n = A(c), r = h(() => t.state.menu.priceTierSettings || []);
22
22
  function i() {
23
23
  o.open({
24
24
  title: e("menu.price_tier.add_price_group"),
25
- contentComponent: v,
25
+ contentComponent: M,
26
26
  primaryActions: {
27
27
  text: e("menu.category.manager.dialog.add.action"),
28
28
  close: !1
@@ -1,12 +1,14 @@
1
1
  import { defineComponent as ie, computed as Y, resolveComponent as _, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as F, unref as n, toDisplayString as A, createElementVNode as h, withCtx as v, Fragment as N, renderList as M, createBlock as I, ref as H, Transition as se, createTextVNode as me } from "vue";
2
- import { H as S, G as r, u as pe, I as ve, J as ue } from "./menu-ibc-yXVt.js";
2
+ import { D as S, B as r, u as pe, G as ve, H as ue } from "./menu-CsIzrBEr.js";
3
3
  import { useI18n as de } from "@feedmepos/mf-common";
4
4
  import { components as _e } from "@feedmepos/ui-library";
5
5
  import { _ as fe } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
6
6
  import { _ as ne } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
7
7
  import { u as ye } from "./discardConfirm-BHni0LNu.js";
8
- import { u as he } from "./menu-Dw-Hpy07.js";
9
- import { L as ge } from "./LinkProductSideSheet-D7vYZbFy.js";
8
+ import { u as he } from "./menu-CDrsBjmr.js";
9
+ import { L as ge } from "./LinkProductSideSheet-C6rF-G1v.js";
10
+ import "@feedmepos/core";
11
+ import "@feedmepos/core/entity";
10
12
  const Ve = { class: "space-y-8" }, Fe = {
11
13
  key: 0,
12
14
  class: "space-y-16"
@@ -151,7 +153,7 @@ const Ve = { class: "space-y-8" }, Fe = {
151
153
  }, Le = { class: "w-full" }, Ae = {
152
154
  key: 0,
153
155
  class: "mt-8"
154
- }, Ne = { class: "text-red-500 text-sm" }, Re = { class: "bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-gray-200" }, Ye = { class: "px-16 py-8 flex-1" }, Me = { class: "px-16 py-8" }, Oe = { class: "flex gap-8 items-center justify-start" }, je = /* @__PURE__ */ ie({
156
+ }, Ne = { class: "text-red-500 text-sm" }, Re = { class: "bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-gray-200" }, Ye = { class: "px-16 py-8 flex-1" }, Me = { class: "px-16 py-8" }, Oe = { class: "flex gap-8 items-center justify-start" }, We = /* @__PURE__ */ ie({
155
157
  __name: "SchedulerDialog",
156
158
  props: {
157
159
  categorizedItems: {
@@ -486,21 +488,21 @@ const Ve = { class: "space-y-8" }, Fe = {
486
488
  };
487
489
  }
488
490
  });
489
- function Je(V) {
491
+ function Xe(V) {
490
492
  return {
491
493
  module: r.F_MENU_MODULE_V4_KEY.enum.scheduler,
492
494
  operation: ue.F_OPERATION_TYPE.create,
493
495
  data: r.FdoMenuV4Scheduler.parse(V)
494
496
  };
495
497
  }
496
- function We(V) {
498
+ function Ze(V) {
497
499
  return {
498
500
  module: r.F_MENU_MODULE_V4_KEY.enum.scheduler,
499
501
  operation: ue.F_OPERATION_TYPE.update,
500
502
  data: r.FdoMenuV4Scheduler.parse(V)
501
503
  };
502
504
  }
503
- function Xe(V) {
505
+ function el(V) {
504
506
  return {
505
507
  module: r.F_MENU_MODULE_V4_KEY.enum.scheduler,
506
508
  operation: ue.F_OPERATION_TYPE.delete,
@@ -508,8 +510,8 @@ function Xe(V) {
508
510
  };
509
511
  }
510
512
  export {
511
- je as _,
512
- Je as c,
513
- Xe as d,
514
- We as u
513
+ We as _,
514
+ Xe as c,
515
+ el as d,
516
+ Ze as u
515
517
  };
@@ -1,15 +1,17 @@
1
- import { shallowRef as Q, ref as T, computed as h, shallowReactive as Fe, effectScope as Re, watch as H, defineComponent as Te, resolveComponent as z, createBlock as Ve, openBlock as Ne, unref as N, withCtx as Oe, createVNode as xe } from "vue";
2
- import { H as k, B as O, ak as X, G as I, al as G, J as S, I as ee, aa as M, c as D, Y as w, aj as J, am as Pe, an as Ae, A as Ue, ac as Ke, ao as De, ap as $e, a9 as qe, u as He } from "./menu-ibc-yXVt.js";
3
- import { useCoreStore as L, useI18n as te } from "@feedmepos/mf-common";
4
- import { useSnackbar as Ye, useDialogChild as Be } from "@feedmepos/ui-library";
5
- import { defineStore as We } from "pinia";
6
- const je = "/assets/linked-status-BZ4FSJ_Z.js", ze = "/assets/override-menu-C-fWJdVd.js";
1
+ import { shallowRef as X, ref as R, computed as h, shallowReactive as Fe, effectScope as Te, watch as H, defineComponent as Re, resolveComponent as z, createBlock as Ve, openBlock as Ne, unref as N, withCtx as Oe, createVNode as Pe } from "vue";
2
+ import { D as k, z as O, ah as Z, B as I, ai as G, H as S, G as ee, a8 as M, c as D, W as E, ag as L, aj as xe, ak as Ae, aa as Ue, al as Ke, am as De, a7 as $e, u as qe } from "./menu-CsIzrBEr.js";
3
+ import { useCoreStore as J, useI18n as te } from "@feedmepos/mf-common";
4
+ import { useSnackbar as He, useDialogChild as Be } from "@feedmepos/ui-library";
5
+ import { defineStore as Ye } from "pinia";
6
+ import { Country as We } from "@feedmepos/core";
7
+ import "@feedmepos/core/entity";
8
+ const je = "/assets/linked-status-eQqjvOq_.js", ze = "/assets/override-menu-C8NTBJgN.js";
7
9
  function Ge(e) {
8
10
  var o;
9
11
  const n = k(e), a = (o = n.variant) == null ? void 0 : o.variantCombinations;
10
12
  return delete n.variant, delete n.thumbnail, [n, ...a || []];
11
13
  }
12
- function Je(e, n, a, o) {
14
+ function Le(e, n, a, o) {
13
15
  const r = k(n), f = a ? r.modules.catalog.find((g) => g._id === a) : null, l = o ? r.modules.scheduler.find((g) => g._id === o) : null, i = f ? k(f) : void 0, d = a ? r.modules.catalog.filter((g) => g._id !== a) : [], u = l ? k(l) : void 0, s = e.reduce((g, y) => (g[y._id] = Ge(y), g), {});
14
16
  function p(g = []) {
15
17
  const y = e.map((b) => b._id);
@@ -46,7 +48,7 @@ function Je(e, n, a, o) {
46
48
  _id: r._id
47
49
  };
48
50
  }
49
- function R(e, n, a) {
51
+ function T(e, n, a) {
50
52
  var f;
51
53
  if (a >= 3) return e;
52
54
  const o = n.modules.item.find((l) => l._id === e._id);
@@ -61,8 +63,8 @@ function R(e, n, a) {
61
63
  const y = (b = i.items) == null ? void 0 : b.find(
62
64
  (F) => F._id === g._id && F.combinationKey === g.combinationKey
63
65
  );
64
- return R(y || g, n, a + 1);
65
- })) ?? [] : d = ((p = l.items) == null ? void 0 : p.map((g) => R(g, n, a + 1))) ?? [], {
66
+ return T(y || g, n, a + 1);
67
+ })) ?? [] : d = ((p = l.items) == null ? void 0 : p.map((g) => T(g, n, a + 1))) ?? [], {
66
68
  ...l,
67
69
  items: d
68
70
  };
@@ -75,7 +77,7 @@ function R(e, n, a) {
75
77
  groups: r
76
78
  };
77
79
  }
78
- function Le(e, n) {
80
+ function Je(e, n) {
79
81
  const a = e.groups.map((f) => {
80
82
  const l = n.modules.group.find((d) => d._id === f._id), i = ((l == null ? void 0 : l.items) || []).map((d) => {
81
83
  var p;
@@ -83,16 +85,16 @@ function Le(e, n) {
83
85
  (g) => g._id === d._id && g.combinationKey === d.combinationKey
84
86
  );
85
87
  if (u)
86
- return R(u, n, 1);
88
+ return T(u, n, 1);
87
89
  const s = {
88
90
  ...O.generator.initMenuV4ItemOverrider(),
89
91
  _id: d._id,
90
92
  combinationKey: d.combinationKey
91
93
  };
92
- return R(s, n, 1);
94
+ return T(s, n, 1);
93
95
  });
94
96
  return { ...f, items: i };
95
- }), o = e.variant ? e.variant.variantCombinations.map((f) => R(f, n, 1)) : [], r = {
97
+ }), o = e.variant ? e.variant.variantCombinations.map((f) => T(f, n, 1)) : [], r = {
96
98
  ...O.generator.initMenuV4ItemOverrider(),
97
99
  _id: e._id,
98
100
  name: e.name,
@@ -101,7 +103,7 @@ function Le(e, n) {
101
103
  };
102
104
  return [...o, r];
103
105
  }
104
- function Y(e, n) {
106
+ function B(e, n) {
105
107
  var o;
106
108
  if (!n)
107
109
  return e;
@@ -114,11 +116,11 @@ function Y(e, n) {
114
116
  const u = (s = f == null ? void 0 : f.items) == null ? void 0 : s.find(
115
117
  (p) => p._id === d._id && p.combinationKey === d.combinationKey
116
118
  );
117
- return Y(d, u);
119
+ return B(d, u);
118
120
  }), r;
119
121
  }), a;
120
122
  }
121
- function Ze(e, n) {
123
+ function Qe(e, n) {
122
124
  const a = e.items[n._id];
123
125
  n.variant && (n.variant = {
124
126
  ...n.variant,
@@ -128,7 +130,7 @@ function Ze(e, n) {
128
130
  );
129
131
  if (!f)
130
132
  throw new Error(`Item overrider not found - ${r._id} - ${r.combinationKey}`);
131
- return Y(f, r);
133
+ return B(f, r);
132
134
  })
133
135
  });
134
136
  const o = a.find((r) => !r.combinationKey);
@@ -142,17 +144,17 @@ function Ze(e, n) {
142
144
  const d = (u = f == null ? void 0 : f.items) == null ? void 0 : u.find(
143
145
  (s) => s._id === i._id && s.combinationKey === i.combinationKey
144
146
  );
145
- return Y(i, d);
147
+ return B(i, d);
146
148
  }), r;
147
149
  }), {
148
150
  ...n,
149
151
  price: (o == null ? void 0 : o.price) || n.price
150
152
  };
151
153
  }
152
- async function dt(e, n, a, o, r, f = !0) {
153
- const l = k(a), i = f ? Je(n, l, o, r) : l, d = n.reduce((p, g) => (p[g._id] = i.modules.item.find((y) => y._id === g._id), p), {}), u = n.reduce((p, g) => {
154
+ async function ft(e, n, a, o, r, f = !0) {
155
+ const l = k(a), i = f ? Le(n, l, o, r) : l, d = n.reduce((p, g) => (p[g._id] = i.modules.item.find((y) => y._id === g._id), p), {}), u = n.reduce((p, g) => {
154
156
  const y = g._id;
155
- return p[y] = Le(d[y], e), p;
157
+ return p[y] = Je(d[y], e), p;
156
158
  }, {}), s = O.getFallbackPrices({
157
159
  rawMenu: i,
158
160
  items: u,
@@ -162,12 +164,12 @@ async function dt(e, n, a, o, r, f = !0) {
162
164
  return n.map((p) => {
163
165
  const g = p._id, y = d[g];
164
166
  return {
165
- ...Ze(s, y),
167
+ ...Qe(s, y),
166
168
  category: o || r ? y == null ? void 0 : y.category : null
167
169
  };
168
170
  });
169
171
  }
170
- function mt(e, n) {
172
+ function pt(e, n) {
171
173
  if (e.length === 0) return "";
172
174
  const a = e == null ? void 0 : e.split("variant");
173
175
  return ((a == null ? void 0 : a.reduce((r, f) => {
@@ -181,11 +183,11 @@ function mt(e, n) {
181
183
  }, [])) || []).join(" / ");
182
184
  }
183
185
  const $ = /* @__PURE__ */ new Map();
184
- async function ft(e, n) {
186
+ async function _t(e, n) {
185
187
  const a = `${e._id}-${e.updatedAt}-${n}`;
186
188
  if ($.has(a))
187
189
  return $.get(a);
188
- const o = await X(
190
+ const o = await Z(
189
191
  je,
190
192
  JSON.stringify({
191
193
  menu: e,
@@ -195,13 +197,13 @@ async function ft(e, n) {
195
197
  return $.set(a, o), o;
196
198
  }
197
199
  async function ne(e, n, a) {
198
- return await X(ze, {
200
+ return await Z(ze, {
199
201
  menu: e,
200
202
  catalogId: n,
201
203
  schedulerId: a
202
204
  });
203
205
  }
204
- function pt(e, n, a) {
206
+ function gt(e, n, a) {
205
207
  const o = /* @__PURE__ */ new Set();
206
208
  function r(f, l) {
207
209
  if (!e || !f || !l || o.has(l)) return !1;
@@ -216,7 +218,7 @@ function pt(e, n, a) {
216
218
  }
217
219
  return r(n, a);
218
220
  }
219
- function _t(e, n, a) {
221
+ function vt(e, n, a) {
220
222
  const o = /* @__PURE__ */ new Set();
221
223
  function r(f, l) {
222
224
  if (!e || !f || !l || o.has(f)) return !1;
@@ -232,16 +234,16 @@ function _t(e, n, a) {
232
234
  return r(n, a);
233
235
  }
234
236
  const q = /* @__PURE__ */ new Map();
235
- async function Qe(e, n, a) {
237
+ async function Xe(e, n, a) {
236
238
  const o = `${e._id}-${e.updatedAt}-${n || "null"}-${a || "null"}`;
237
239
  if (q.has(o))
238
240
  return q.get(o);
239
241
  const r = await ne(e, n, a);
240
242
  return q.set(o, r), r;
241
243
  }
242
- async function gt(e, n, a) {
244
+ async function yt(e, n, a) {
243
245
  var l, i;
244
- const o = await Qe(e, n, null), r = [], f = (d, u) => {
246
+ const o = await Xe(e, n, null), r = [], f = (d, u) => {
245
247
  const s = k(d);
246
248
  for (const p in u)
247
249
  u[p] && (s[p] = u[p]);
@@ -251,9 +253,9 @@ async function gt(e, n, a) {
251
253
  const u = (l = d.items) == null ? void 0 : l.find((p) => p._id === a && !p.combinationKey), s = e.modules.item.find((p) => p._id === a);
252
254
  if (u) {
253
255
  const p = (i = d.items) == null ? void 0 : i.filter((y) => y._id === a && y.combinationKey), g = [u, ...p].map((y) => {
254
- var V, x;
255
- const b = y.combinationKey ? (x = (V = s == null ? void 0 : s.variant) == null ? void 0 : V.variantCombinations) == null ? void 0 : x.find(
256
- (P) => P.combinationKey === y.combinationKey
256
+ var V, P;
257
+ const b = y.combinationKey ? (P = (V = s == null ? void 0 : s.variant) == null ? void 0 : V.variantCombinations) == null ? void 0 : P.find(
258
+ (x) => x.combinationKey === y.combinationKey
257
259
  ) : s, F = b && s ? f(s, b) : y;
258
260
  return f(F, y);
259
261
  });
@@ -265,10 +267,10 @@ async function gt(e, n, a) {
265
267
  }
266
268
  return r;
267
269
  }
268
- function Xe({
270
+ function Ze({
269
271
  maxHistorySize: e = 50
270
272
  }) {
271
- const n = Q([]), a = T(-1), o = h(() => a.value > 0), r = h(() => a.value < n.value.length - 1);
273
+ const n = X([]), a = R(-1), o = h(() => a.value > 0), r = h(() => a.value < n.value.length - 1);
272
274
  function f(u) {
273
275
  n.value.push(u), a.value++, n.value.length > e && (n.value.shift(), a.value--);
274
276
  }
@@ -338,10 +340,10 @@ function tt() {
338
340
  currentSchedulerId: ""
339
341
  };
340
342
  }
341
- const nt = We(
343
+ const nt = Ye(
342
344
  "mf-menu-store-v2",
343
345
  () => {
344
- const e = Fe(tt()), n = L(), a = Ye(), o = h(() => e.menu.modules.serveSequence ? M(e.menu.modules.serveSequence, {
346
+ const e = Fe(tt()), n = J(), a = He(), o = h(() => e.menu.modules.serveSequence ? M(e.menu.modules.serveSequence, {
345
347
  selector: "position"
346
348
  }) : []), r = h(() => {
347
349
  var t;
@@ -353,9 +355,9 @@ const nt = We(
353
355
  (t) => t._id === e.currentSchedulerId
354
356
  ));
355
357
  function s(t, c = !0) {
356
- e.menu = { ...t, _rev: e.menu._rev }, c && E.push(e.menu);
358
+ e.menu = { ...t, _rev: e.menu._rev }, c && w.push(e.menu);
357
359
  }
358
- const p = Q(oe()), g = T(!1), y = T(1);
360
+ const p = X(oe()), g = R(!1), y = R(1);
359
361
  async function b() {
360
362
  g.value = !0;
361
363
  const t = await ne(
@@ -374,7 +376,7 @@ const nt = We(
374
376
  return p.value = t, g.value = !1, y.value = y.value + 1, t;
375
377
  }
376
378
  const V = ee.debounce(b, 200);
377
- Re(!0).run(() => {
379
+ Te(!0).run(() => {
378
380
  H(
379
381
  () => [e.menu, e.currentCatalogId, e.currentSchedulerId],
380
382
  () => {
@@ -382,7 +384,7 @@ const nt = We(
382
384
  }
383
385
  );
384
386
  });
385
- const P = h(() => [
387
+ const x = h(() => [
386
388
  {
387
389
  label: "Main",
388
390
  value: null
@@ -391,7 +393,7 @@ const nt = We(
391
393
  label: t.name,
392
394
  value: t._id
393
395
  }))
394
- ]), B = h(() => {
396
+ ]), Y = h(() => {
395
397
  const t = p.value.modules.category;
396
398
  return [
397
399
  ...U.value.item.addon ? [
@@ -401,11 +403,11 @@ const nt = We(
401
403
  position: 0
402
404
  }
403
405
  ] : [],
404
- ...w(t, (c) => c.name)
406
+ ...E(t, (c) => c.name)
405
407
  ];
406
408
  }), re = h(() => {
407
409
  const t = p.value.modules.subCategory || [];
408
- return w(t, (c) => c.name);
410
+ return E(t, (c) => c.name);
409
411
  }), W = h(() => {
410
412
  var c;
411
413
  let t = p.value.modules.item;
@@ -419,17 +421,17 @@ const nt = We(
419
421
  return (_ == null ? void 0 : _.orderFrom) !== I.F_ORDER_FROM.enum.NONE;
420
422
  });
421
423
  }
422
- return w(t, (m) => m.code || m.name);
424
+ return E(t, (m) => m.code || m.name);
423
425
  }), ae = h(() => {
424
- const t = e.menu.modules.category, c = w(t, (v) => v.name).reduce(
426
+ const t = e.menu.modules.category, c = E(t, (v) => v.name).reduce(
425
427
  (v, _, C) => (v[_._id] = C, v),
426
428
  { "": 0 }
427
429
  ), m = e.menu.modules.item;
428
- return w(
430
+ return E(
429
431
  m,
430
432
  (v) => v.code || v.name
431
433
  ).reduce((v, _, C) => (v[_._id] = C + c[_.category || ""], v), {});
432
- }), se = h(() => J(A.value, B.value, W.value)), ue = h(() => {
434
+ }), se = h(() => L(A.value, Y.value, W.value)), ue = h(() => {
433
435
  const t = U.value.item.addon ? [
434
436
  {
435
437
  _id: e.currentCatalogId ? "" : null,
@@ -438,7 +440,7 @@ const nt = We(
438
440
  },
439
441
  ...e.menu.modules.category
440
442
  ] : e.menu.modules.category;
441
- return J(
443
+ return L(
442
444
  e.menu.modules.variant,
443
445
  t,
444
446
  e.menu.modules.item
@@ -451,9 +453,9 @@ const nt = We(
451
453
  const c = t.map((v) => A.value.find((_) => _._id === v)).filter((v) => !!v);
452
454
  return O.fullVariantCombination(c).reduce((v, _) => (v[_.combinationKey] = _.selectionName.join(" / "), v), {});
453
455
  }
454
- const ce = h(() => w(p.value.modules.group, (t) => t.name)), le = h(() => M(p.value.modules.takeaway, { selector: "name" })), de = h(() => M(e.menu.modules.printDepartment || [], {
456
+ const ce = h(() => E(p.value.modules.group, (t) => t.name)), le = h(() => M(p.value.modules.takeaway, { selector: "name" })), de = h(() => M(e.menu.modules.printDepartment || [], {
455
457
  selector: "name"
456
- })), me = h(() => M(e.menu.modules.unit, { selector: "name" })), fe = h(() => M(Pe(e.menu.modules.recipe, e.menu.modules.sku), {
458
+ })), me = h(() => M(e.menu.modules.unit, { selector: "name" })), fe = h(() => M(xe(e.menu.modules.recipe, e.menu.modules.sku), {
457
459
  selector: "name"
458
460
  })), pe = h(() => e.menu.modules.cookingGuide), _e = h(() => {
459
461
  const t = Ae(e.menu.modules.sku);
@@ -539,10 +541,10 @@ const nt = We(
539
541
  }
540
542
  const ye = h(() => {
541
543
  var v;
542
- const t = ["SV5", "SV10"], c = Ue.Country.getCountryFlattenTaxes(
543
- L().currentCountry.value
544
+ const t = ["SV5", "SV10"], c = We.getCountryFlattenTaxes(
545
+ J().currentCountry.value
544
546
  ), m = c.filter((_) => f.value || !t.includes(_.taxCode)).map((_) => ({
545
- label: `${_.name} (${Ke(_.rate)}%)`,
547
+ label: `${_.name} (${Ue(_.rate)}%)`,
546
548
  value: K(_),
547
549
  meta: {
548
550
  rate: _.rate
@@ -553,10 +555,10 @@ const nt = We(
553
555
  countryTaxOptions: m
554
556
  };
555
557
  }), he = async () => {
556
- const t = await qe.readMenu();
558
+ const t = await $e.readMenu();
557
559
  e.menu = t ?? e.menu, j(null);
558
560
  }, be = async () => {
559
- const { fetchAllRestaurants: t } = $e();
561
+ const { fetchAllRestaurants: t } = De();
560
562
  await t({
561
563
  onBatchEnd: (c) => {
562
564
  e.restaurants = c;
@@ -580,7 +582,7 @@ const nt = We(
580
582
  if (c || v.some(
581
583
  (C) => [S.F_OPERATION_TYPE.delete, S.F_OPERATION_TYPE.deleteMany].includes(C.operation)
582
584
  )) {
583
- const C = await De(v, e.menu.modules);
585
+ const C = await Ke(v, e.menu.modules);
584
586
  if (C !== !0) throw new Error(C);
585
587
  }
586
588
  const _ = await et.updateMenuModule(e.menu, v);
@@ -592,7 +594,7 @@ const nt = We(
592
594
  message: _
593
595
  });
594
596
  }
595
- }, Ee = async (t) => {
597
+ }, we = async (t) => {
596
598
  const c = {
597
599
  ...e.menu,
598
600
  masterCatalogSetting: t.masterCatalogSetting,
@@ -600,7 +602,7 @@ const nt = We(
600
602
  priceTierSettings: t.priceTierSettings
601
603
  };
602
604
  return s(c), c;
603
- }, E = Xe({ maxHistorySize: 50 }), we = h(() => E.canUndo.value), Ie = h(() => E.canRedo.value);
605
+ }, w = Ze({ maxHistorySize: 50 }), Ee = h(() => w.canUndo.value), Ie = h(() => w.canRedo.value);
604
606
  return {
605
607
  state: e,
606
608
  // loading state
@@ -616,8 +618,8 @@ const nt = We(
616
618
  currentCatalog: i,
617
619
  schedulers: d,
618
620
  currentScheduler: u,
619
- catalogOptions: P,
620
- categories: B,
621
+ catalogOptions: x,
622
+ categories: Y,
621
623
  subcategories: re,
622
624
  items: W,
623
625
  sortedItems: ae,
@@ -641,7 +643,7 @@ const nt = We(
641
643
  selectScheduler: Ce,
642
644
  selectCategory: Me,
643
645
  updateMenu: Se,
644
- updateMenuSetting: Ee,
646
+ updateMenuSetting: we,
645
647
  computeMergedMenu: b,
646
648
  // helper
647
649
  encodeTax: K,
@@ -649,22 +651,22 @@ const nt = We(
649
651
  getSelectedTax: ve,
650
652
  mapVariant: ie,
651
653
  // history
652
- canUndoHistory: we,
654
+ canUndoHistory: Ee,
653
655
  canRedoHistory: Ie,
654
656
  undoHistory: () => {
655
- const t = E.undo();
657
+ const t = w.undo();
656
658
  t && s(t, !1);
657
659
  },
658
660
  redoHistory: () => {
659
- const t = E.redo();
661
+ const t = w.redo();
660
662
  t && s(t, !1);
661
663
  },
662
664
  clearHistory: () => {
663
- E.clear();
665
+ w.clear();
664
666
  }
665
667
  };
666
668
  }
667
- ), Z = /* @__PURE__ */ Te({
669
+ ), Q = /* @__PURE__ */ Re({
668
670
  __name: "AddSubcategoryDialogContentComponent",
669
671
  props: {
670
672
  initialValue: {}
@@ -677,7 +679,7 @@ const nt = We(
677
679
  o.value = l ?? "";
678
680
  }
679
681
  );
680
- const o = T(n.initialValue), { emitData: r, emitAction: f } = Be();
682
+ const o = R(n.initialValue), { emitData: r, emitAction: f } = Be();
681
683
  return H(
682
684
  o,
683
685
  (l) => {
@@ -692,7 +694,7 @@ const nt = We(
692
694
  onValidationSuccess: i[1] || (i[1] = (s) => N(f)("primary"))
693
695
  }, {
694
696
  default: Oe(() => [
695
- xe(d, {
697
+ Pe(d, {
696
698
  modelValue: o.value,
697
699
  "onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s),
698
700
  rules: [(s) => !!s || N(a)("menu.subcategory.dialog.add.name.required")],
@@ -705,17 +707,17 @@ const nt = We(
705
707
  });
706
708
  };
707
709
  }
708
- }), vt = ({
710
+ }), ht = ({
709
711
  dialog: e,
710
712
  menuLoader: n,
711
713
  isLocalOnly: a = !1
712
714
  }) => {
713
715
  const { t: o } = te(), r = nt().updateMenu;
714
716
  function f() {
715
- const u = T(!1);
717
+ const u = R(!1);
716
718
  e.open({
717
719
  title: o("menu.subcategory.manager.dialog.add.title"),
718
- contentComponent: Z,
720
+ contentComponent: Q,
719
721
  primaryActions: {
720
722
  text: o("menu.subcategory.manager.dialog.add.action"),
721
723
  close: !1,
@@ -734,7 +736,7 @@ const nt = We(
734
736
  operation: S.F_OPERATION_TYPE.create,
735
737
  data: {
736
738
  name: s,
737
- position: He().subcategories.length
739
+ position: qe().subcategories.length
738
740
  }
739
741
  };
740
742
  a ? await r(p) : await n.updateMenu(p, s), e.close();
@@ -746,7 +748,7 @@ const nt = We(
746
748
  function l(u) {
747
749
  e.open({
748
750
  title: o("menu.subcategory.manager.dialog.update.title"),
749
- contentComponent: Z,
751
+ contentComponent: Q,
750
752
  contentComponentProps: {
751
753
  initialValue: u.name
752
754
  },
@@ -805,13 +807,13 @@ const nt = We(
805
807
  };
806
808
  };
807
809
  export {
808
- vt as a,
809
- ft as b,
810
- _t as c,
811
- pt as d,
812
- gt as f,
813
- mt as g,
814
- dt as m,
815
- Qe as o,
810
+ ht as a,
811
+ _t as b,
812
+ vt as c,
813
+ gt as d,
814
+ yt as f,
815
+ pt as g,
816
+ ft as m,
817
+ Xe as o,
816
818
  nt as u
817
819
  };
@@ -1,5 +1,5 @@
1
- import { b as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js";
2
- import "./menu-ibc-yXVt.js";
1
+ import { b as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js";
2
+ import "./menu-CsIzrBEr.js";
3
3
  var Z = {
4
4
  defaultAmount: 0,
5
5
  defaultCurrency: "USD",