@feedmepos/mf-menu 0.32.56 → 0.32.57-dev.2

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 (73) hide show
  1. package/dist/{App-BUePFRjb.js → App-CE5s0l9A.js} +5 -5
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-oPq3AcV2.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DZ5sZWpU.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-r2W9cuVe.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-B0POr6JV.js} +2 -2
  4. package/dist/{Catalog-uo0vO8uy.js → Catalog-CY6RvjyS.js} +6 -6
  5. package/dist/{Category-CHN6aSPS.js → Category-BoVnd_-a.js} +10 -10
  6. package/dist/{Category-BvetZzck.js → Category-DIpJlX_N.js} +13 -13
  7. package/dist/{CookingGuide-DU8D0T0w.js → CookingGuide-CHzasZA9.js} +4 -4
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DIxKLpe8.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DIhsGYRl.js} +1 -1
  9. package/dist/{Group-Cd1OoALN.js → Group-CwBojMky.js} +1 -1
  10. package/dist/{Group-BFGFyGhC.js → Group-SUmVQxSU.js} +3 -3
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-Dyb9On55.js → Group.vue_vue_type_script_setup_true_lang-BBqXiV3r.js} +57 -58
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-XcNt0ZBv.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CcQdvzMy.js} +5 -5
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dw3IXPUL.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C8VMeXoW.js} +193 -190
  14. package/dist/{Ingredient-CXU04qIu.js → Ingredient-DmsJNTi3.js} +3 -3
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-q9DVgfMD.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CZ3Ti5o-.js} +2 -2
  16. package/dist/{LinkProductSideSheet-CaFKMMSd.js → LinkProductSideSheet-D8Dvdhk0.js} +3 -3
  17. package/dist/{MenuSetting-EeJdFNfx.js → MenuSetting-CmFx4CKw.js} +6 -6
  18. package/dist/{OrderPacing-Db4P-2ea.js → OrderPacing-CFuteZjm.js} +5 -5
  19. package/dist/{PrintRoute-CSScKjFa.js → PrintRoute-CeHNsLcv.js} +4 -4
  20. package/dist/{Product-tvbYvK5u.js → Product-bJfbi1yz.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-BQ_PgMDP.js → Product.vue_vue_type_script_setup_true_lang-kvqrUjei.js} +66 -66
  22. package/dist/{ProductInternalTools-D2rmgEby.js → ProductInternalTools-BkKbXFdG.js} +16 -16
  23. package/dist/{Products-WPvLY_wr.js → Products-Bv9gINb8.js} +24 -24
  24. package/dist/{Publish-BJ9rz75C.js → Publish-CSMkGRiV.js} +3 -3
  25. package/dist/{Recipe-BMRTd58L.js → Recipe-CDK1f07t.js} +4 -4
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BefgcG34.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-hYs_2e94.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DlzIboPc.js → RuleView.vue_vue_type_script_setup_true_lang-DdSe-i8f.js} +187 -187
  28. package/dist/{Scheduler-CHQ5YcBq.js → Scheduler-Ce6qK5xo.js} +3 -3
  29. package/dist/{ServingSequence-BtXSEzfn.js → ServingSequence-BSX_g50j.js} +3 -3
  30. package/dist/{Setting-BnXj1uTa.js → Setting-BNS9ggtX.js} +5 -5
  31. package/dist/{Subcategory-miGPIoku.js → Subcategory-62g1JEwl.js} +5 -5
  32. package/dist/{Takeaway-DtVvfRQy.js → Takeaway-DR0Ax44B.js} +1 -1
  33. package/dist/{Takeaway-zaChLDgt.js → Takeaway-f4VO0ZJ-.js} +4 -4
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BFnbiGsG.js → Takeaway.vue_vue_type_script_setup_true_lang-B3UE1p7X.js} +5 -5
  35. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CNYxe969.js → Thumbnail.vue_vue_type_script_setup_true_lang-CTw2lKns.js} +4 -4
  36. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-D4fWF46n.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-hd6JGri0.js} +1 -1
  37. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DLqeQRkH.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BRXHWG5s.js} +2 -2
  38. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ClDRf-88.js +5986 -0
  39. package/dist/{Unit-BaLVANd9.js → Unit-DnrLxe1V.js} +2 -2
  40. package/dist/{Variant-Bnb4SllS.js → Variant-DM2r3Of9.js} +3 -3
  41. package/dist/{_id_-btH88hnV.js → _id_-BhFeSJIu.js} +9 -9
  42. package/dist/{app-D1a9CqKF.js → app-CO3nuOc3.js} +1 -1
  43. package/dist/{app-BO16t-ps.js → app-DH7q5VuL.js} +32 -32
  44. package/dist/app.js +1 -1
  45. package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +2 -0
  46. package/dist/apps/mf-menu/src/manager/menu/circularLink.d.ts +3 -0
  47. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +1 -2
  48. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/assets/{linked-status-zxrRiX3x.js → linked-status-BR-paOgW.js} +2 -2
  50. package/dist/assets/{menu-export-DXB8Py6r.js → menu-export-Dwpl4c_S.js} +4 -4
  51. package/dist/assets/{override-menu-CEIJGR_x.js → override-menu-BS1DhRTo.js} +2 -2
  52. package/dist/assets/{validate-menu-DN3P-OR7.js → validate-menu-B-YCNUDR.js} +2 -2
  53. package/dist/{catalog-COu1SO_p.js → catalog-DN1unMjl.js} +1 -1
  54. package/dist/{catalogSetting-D34fLwdB.js → catalogSetting-CI8dXYw5.js} +1 -1
  55. package/dist/{currency-DlfcFoj5.js → currency-BFqLFFOP.js} +1 -1
  56. package/dist/{dayjs.min-xM9KAjrx.js → dayjs.min-BXDB3ec6.js} +2 -2
  57. package/dist/{index-B5d_uvVc.js → index-CCKQLhW1.js} +4 -4
  58. package/dist/{index-ByEp1JD0.js → index-CYexEfd8.js} +5 -5
  59. package/dist/{index.vue_vue_type_script_setup_true_lang-DAJSG8i1.js → index.vue_vue_type_script_setup_true_lang-BbQF5cdO.js} +5 -5
  60. package/dist/{item-CtfWra_w.js → item-eua4dBDT.js} +516 -488
  61. package/dist/{jszip.min-CNLaYb3p.js → jszip.min-C10zcIsO.js} +3 -3
  62. package/dist/{memberPricing-DSqwOAgM.js → memberPricing-BlITNLhE.js} +1 -1
  63. package/dist/{menu-DUsES-YM.js → menu-C4vsCvFL.js} +1 -1
  64. package/dist/menuV2-DB-VttRA.js +1023 -0
  65. package/dist/{order_pacing-B5a8Fch-.js → order_pacing-CDQ6wUL_.js} +5 -5
  66. package/dist/{priceTier-bxvu4c84.js → priceTier-pJMZysfK.js} +1 -1
  67. package/dist/{rules-CTd3QZhN.js → rules-BScEYhiY.js} +3 -3
  68. package/dist/{scheduler-DIl9SPsA.js → scheduler-BTiyl-EY.js} +4 -4
  69. package/dist/{toExcel-CUAEPhEv.js → toExcel-CSdnEWqk.js} +2 -2
  70. package/dist/{unit-DThoovpF.js → unit-BcPS3VM3.js} +2 -2
  71. package/package.json +1 -1
  72. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DUxEgL0r.js +0 -5974
  73. package/dist/menuV2-BaY8Z_1c.js +0 -1055
@@ -1,1055 +0,0 @@
1
- var We = Object.defineProperty;
2
- var ze = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var ne = (e, t, n) => ze(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { I as ae, G as C, A as T, U as ue, ax as re, J as q, H as ie, aj as x, c as z, a0 as D, au as oe, ay as Ge, az as Le, z as qe, am as He, aA as Be, aB as Je, ah as Ye } from "./index.vue_vue_type_script_setup_true_lang-DAJSG8i1.js";
5
- import { defineStore as Xe } from "pinia";
6
- import { shallowRef as j, ref as H, computed as S, shallowReactive as Qe, effectScope as Ze, watch as et } from "vue";
7
- import { useCoreStore as se } from "@feedmepos/mf-common";
8
- import { useSnackbar as tt } from "@feedmepos/ui-library";
9
- const nt = "/assets/linked-status-zxrRiX3x.js", rt = "/assets/override-menu-CEIJGR_x.js";
10
- function ot(e) {
11
- var o;
12
- const t = C(e), n = (o = t.variant) == null ? void 0 : o.variantCombinations;
13
- return delete t.variant, delete t.thumbnail, [t, ...n || []];
14
- }
15
- function st(e, t, n, o) {
16
- const r = C(t), u = n ? r.modules.catalog.find((v) => v._id === n) : null, l = o ? r.modules.scheduler.find((v) => v._id === o) : null, a = u ? C(u) : void 0, c = n ? r.modules.catalog.filter((v) => v._id !== n) : [], i = l ? C(l) : void 0, f = e.reduce((v, y) => (v[y._id] = ot(y), v), {});
17
- function h(v = []) {
18
- const y = e.map((p) => p._id);
19
- return [
20
- ...v.filter((p) => !y.includes(p._id)),
21
- ...Object.values(f).flatMap((p) => p)
22
- ];
23
- }
24
- return a && o ? (a.override.scheduler = {
25
- ...a.override.scheduler,
26
- [o]: {
27
- ...a.override.scheduler[o],
28
- _id: o,
29
- items: h(i == null ? void 0 : i.items).map((v) => ({
30
- ...v,
31
- orderFrom: ue.enum.ALL
32
- }))
33
- }
34
- }, r.modules.catalog = [...c, a], r) : a ? (a.override.items = {
35
- ...a.override.items,
36
- ...f
37
- }, r.modules.catalog = [...c, a], r) : i ? (i.items = h(i.items), r.modules.scheduler = [
38
- ...r.modules.scheduler.filter((v) => v._id !== o),
39
- i
40
- ], r) : {
41
- ...re(),
42
- modules: {
43
- ...re().modules,
44
- catalog: r.modules.catalog,
45
- item: r.modules.item,
46
- group: r.modules.group,
47
- scheduler: r.modules.scheduler
48
- },
49
- _id: r._id
50
- };
51
- }
52
- function F(e, t, n) {
53
- var u;
54
- if (n >= 3) return e;
55
- const o = t.modules.item.find((l) => l._id === e._id);
56
- if (!o)
57
- throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
58
- const r = (u = o.groups) == null ? void 0 : u.map((l) => {
59
- var i, f, h;
60
- const a = (i = e == null ? void 0 : e.groups) == null ? void 0 : i.find((v) => v._id === l._id);
61
- let c;
62
- return a ? c = ((f = l.items) == null ? void 0 : f.map((v) => {
63
- var p;
64
- const y = (p = a.items) == null ? void 0 : p.find(
65
- (b) => b._id === v._id && b.combinationKey === v.combinationKey
66
- );
67
- return F(y || v, t, n + 1);
68
- })) ?? [] : c = ((h = l.items) == null ? void 0 : h.map((v) => F(v, t, n + 1))) ?? [], {
69
- ...l,
70
- items: c
71
- };
72
- });
73
- return {
74
- _id: o._id,
75
- name: e.name || o.name,
76
- code: e.code || o.code,
77
- combinationKey: e.combinationKey,
78
- groups: r
79
- };
80
- }
81
- function at(e, t) {
82
- const n = e.groups.map((u) => {
83
- const l = t.modules.group.find((c) => c._id === u._id), a = ((l == null ? void 0 : l.items) || []).map((c) => {
84
- var h;
85
- const i = (h = u.items) == null ? void 0 : h.find(
86
- (v) => v._id === c._id && v.combinationKey === c.combinationKey
87
- );
88
- if (i)
89
- return F(i, t, 1);
90
- const f = {
91
- ...T.generator.initMenuV4ItemOverrider(),
92
- _id: c._id,
93
- combinationKey: c.combinationKey
94
- };
95
- return F(f, t, 1);
96
- });
97
- return { ...u, items: a };
98
- }), o = e.variant ? e.variant.variantCombinations.map((u) => F(u, t, 1)) : [], r = {
99
- ...T.generator.initMenuV4ItemOverrider(),
100
- _id: e._id,
101
- name: e.name,
102
- code: e.code,
103
- groups: n
104
- };
105
- return [...o, r];
106
- }
107
- function B(e, t) {
108
- var o;
109
- if (!t)
110
- return e;
111
- const n = { ...e, code: t.code };
112
- return n.groups = (o = n.groups) == null ? void 0 : o.map((r) => {
113
- var l, a;
114
- const u = (l = t.groups) == null ? void 0 : l.find((c) => c._id === r._id);
115
- return r.items = (a = r.items) == null ? void 0 : a.map((c) => {
116
- var f;
117
- const i = (f = u == null ? void 0 : u.items) == null ? void 0 : f.find(
118
- (h) => h._id === c._id && h.combinationKey === c.combinationKey
119
- );
120
- return B(c, i);
121
- }), r;
122
- }), n;
123
- }
124
- function ut(e, t) {
125
- const n = e.items[t._id];
126
- t.variant && (t.variant = {
127
- ...t.variant,
128
- variantCombinations: t.variant.variantCombinations.map((r) => {
129
- const u = n.find(
130
- (l) => l._id === r._id && l.combinationKey === r.combinationKey
131
- );
132
- if (!u)
133
- throw new Error(`Item overrider not found - ${r._id} - ${r.combinationKey}`);
134
- return B(u, r);
135
- })
136
- });
137
- const o = n.find((r) => !r.combinationKey);
138
- if (!o)
139
- throw new Error(`Base item overrider not found - ${t._id}`);
140
- return t.groups = (o.groups || []).map((r) => {
141
- var l;
142
- const u = t.groups.find((a) => a._id === r._id);
143
- return r.items = (l = r.items) == null ? void 0 : l.map((a) => {
144
- var i;
145
- const c = (i = u == null ? void 0 : u.items) == null ? void 0 : i.find(
146
- (f) => f._id === a._id && f.combinationKey === a.combinationKey
147
- );
148
- return B(a, c);
149
- }), r;
150
- }), {
151
- ...t,
152
- price: (o == null ? void 0 : o.price) || t.price
153
- };
154
- }
155
- async function Vt(e, t, n, o, r, u = !0) {
156
- const l = C(n), a = u ? st(t, l, o, r) : l, c = t.reduce((h, v) => (h[v._id] = a.modules.item.find((y) => y._id === v._id), h), {}), i = t.reduce((h, v) => {
157
- const y = v._id;
158
- return h[y] = at(c[y], e), h;
159
- }, {}), f = T.getFallbackPrices({
160
- rawMenu: a,
161
- items: i,
162
- catalogId: o || void 0,
163
- schedulerId: r
164
- });
165
- return t.map((h) => {
166
- const v = h._id, y = c[v];
167
- return {
168
- ...ut(f, y),
169
- category: o || r ? y == null ? void 0 : y.category : null
170
- };
171
- });
172
- }
173
- function Dt(e, t) {
174
- if (e.length === 0) return "";
175
- const n = e == null ? void 0 : e.split("variant");
176
- return ((n == null ? void 0 : n.reduce((r, u) => {
177
- if (u && u.length > 0) {
178
- const l = `variant${u.split("/")[0]}`, a = u.split("/")[1], i = t.find(
179
- ({ _id: f }) => f === l
180
- ).options.find(({ _id: f }) => f === a);
181
- r.push(((i == null ? void 0 : i.name) || "").trim());
182
- }
183
- return r;
184
- }, [])) || []).join(" / ");
185
- }
186
- const G = /* @__PURE__ */ new Map();
187
- async function Tt(e, t) {
188
- const n = `${e._id}-${e.updatedAt}-${t}`;
189
- if (G.has(n))
190
- return G.get(n);
191
- const o = await ae(
192
- nt,
193
- JSON.stringify({
194
- menu: e,
195
- itemId: t
196
- })
197
- );
198
- return G.set(n, o), o;
199
- }
200
- async function ce(e, t, n) {
201
- return await ae(rt, {
202
- menu: e,
203
- catalogId: t,
204
- schedulerId: n
205
- });
206
- }
207
- function Kt(e, t, n) {
208
- const o = /* @__PURE__ */ new Set();
209
- function r(u, l) {
210
- if (!e || !u || !l || o.has(l)) return !1;
211
- o.add(l);
212
- const a = e.modules.item.find((c) => c._id === l);
213
- return !a || !a.groups ? !1 : a.groups.some((c) => c._id === u) ? !0 : a.groups.some((c) => {
214
- const i = e.modules.group.find((f) => f._id === c._id);
215
- for (const f of (i == null ? void 0 : i.items) || [])
216
- if (r(u, f._id)) return !0;
217
- return !1;
218
- });
219
- }
220
- return r(t, n);
221
- }
222
- function Pt(e, t, n) {
223
- const o = /* @__PURE__ */ new Set();
224
- function r(u, l) {
225
- if (!e || !u || !l || o.has(u)) return !1;
226
- o.add(u);
227
- const a = e.modules.group.find((c) => c._id === u);
228
- return !a || !a.items ? !1 : a.items.some((c) => c._id === l) ? !0 : a.items.some((c) => {
229
- const i = e.modules.item.find((f) => f._id === c._id);
230
- for (const f of (i == null ? void 0 : i.groups) || [])
231
- if (r(f._id, l)) return !0;
232
- return !1;
233
- });
234
- }
235
- return r(t, n);
236
- }
237
- const L = /* @__PURE__ */ new Map();
238
- async function it(e, t, n) {
239
- const o = `${e._id}-${e.updatedAt}-${t || "null"}-${n || "null"}`;
240
- if (L.has(o))
241
- return L.get(o);
242
- const r = await ce(e, t, n);
243
- return L.set(o, r), r;
244
- }
245
- async function $t(e, t, n) {
246
- var l, a;
247
- const o = await it(e, t, null), r = [], u = (c, i) => {
248
- const f = C(c);
249
- for (const h in i)
250
- i[h] && (f[h] = i[h]);
251
- return f;
252
- };
253
- for (const c of o.modules.group) {
254
- const i = (l = c.items) == null ? void 0 : l.find((h) => h._id === n && !h.combinationKey), f = e.modules.item.find((h) => h._id === n);
255
- if (i) {
256
- const h = (a = c.items) == null ? void 0 : a.filter((y) => y._id === n && y.combinationKey), v = [i, ...h].map((y) => {
257
- var w, I;
258
- const p = y.combinationKey ? (I = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : I.find(
259
- (k) => k.combinationKey === y.combinationKey
260
- ) : f, b = p && f ? u(f, p) : y;
261
- return u(b, y);
262
- });
263
- r.push({
264
- group: c,
265
- items: v
266
- });
267
- }
268
- }
269
- return r;
270
- }
271
- const M = 0, K = 3;
272
- function ct(e) {
273
- const t = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
274
- if (!t)
275
- throw new Error("Invalid RegExp");
276
- return new RegExp(t[1] ?? "", t[2]);
277
- }
278
- function O(e) {
279
- if (typeof e != "object")
280
- return e;
281
- if (e === null)
282
- return null;
283
- if (Array.isArray(e))
284
- return e.map(O);
285
- if (e instanceof Date)
286
- return new Date(e.getTime());
287
- if (e instanceof RegExp)
288
- return ct(e);
289
- const t = {};
290
- for (const n in e)
291
- Object.prototype.hasOwnProperty.call(e, n) && (t[n] = O(e[n]));
292
- return t;
293
- }
294
- function $(e) {
295
- return e instanceof RegExp ? e.toString() : e;
296
- }
297
- function E(e) {
298
- return typeof e == "object" && e !== null && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof RegExp);
299
- }
300
- function P(e, t) {
301
- if (e === t) return !0;
302
- if (typeof e != typeof t) return !1;
303
- if (e instanceof Date && t instanceof Date)
304
- return e.getTime() === t.getTime();
305
- if (e instanceof RegExp && t instanceof RegExp)
306
- return e.toString() === t.toString();
307
- if (Array.isArray(e) && Array.isArray(t)) {
308
- if (e.length !== t.length) return !1;
309
- for (let n = 0; n < e.length; n++)
310
- if (!P(e[n], t[n])) return !1;
311
- return !0;
312
- }
313
- if (E(e) && E(t)) {
314
- const n = Object.keys(e), o = Object.keys(t);
315
- if (n.length !== o.length) return !1;
316
- for (const r of n)
317
- if (!Object.prototype.hasOwnProperty.call(t, r) || !P(e[r], t[r])) return !1;
318
- return !0;
319
- }
320
- return !1;
321
- }
322
- function lt(e, t, n) {
323
- const o = e.length, r = t.length, u = /* @__PURE__ */ new Map();
324
- for (let c = 0; c < r; c++) {
325
- const i = n ? n(t[c]) : JSON.stringify(t[c]);
326
- u.has(i) || u.set(i, []), u.get(i).push(c);
327
- }
328
- const l = [], a = /* @__PURE__ */ new Set();
329
- for (let c = 0; c < o; c++) {
330
- const i = e[c], f = n ? n(i) : JSON.stringify(i), h = u.get(f);
331
- if (h) {
332
- for (const v of h)
333
- if (!a.has(v) && P(i, t[v])) {
334
- l.push({ leftIndex: c, rightIndex: v }), a.add(v);
335
- break;
336
- }
337
- }
338
- }
339
- return l;
340
- }
341
- function dt(e, t, n) {
342
- var v, y;
343
- if (P(e, t)) return;
344
- const o = { _t: "a" }, r = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.detectMove) !== !1, u = ((y = n == null ? void 0 : n.arrays) == null ? void 0 : y.includeValueOnMove) === !0, l = n == null ? void 0 : n.objectHash;
345
- let a = r ? lt(e, t, l) : [];
346
- if (!l && e.length === t.length && e.length > 0 && a.length < e.length) {
347
- const p = E(e[0]) || Array.isArray(e[0]), b = a.length > 0;
348
- if (p || b) {
349
- a = [];
350
- for (let w = 0; w < e.length; w++)
351
- a.push({ leftIndex: w, rightIndex: w });
352
- }
353
- }
354
- new Set(a.map((p) => p.leftIndex));
355
- const c = new Set(a.map((p) => p.rightIndex)), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
356
- for (const p of a)
357
- i.set(p.leftIndex, p.rightIndex), f.set(p.rightIndex, p.leftIndex);
358
- for (let p = 0; p < e.length; p++) {
359
- const b = i.get(p);
360
- if (b !== void 0) {
361
- const w = J(e[p], t[b], n);
362
- if (w !== void 0 && (o[b] = w), r && b !== p) {
363
- const I = `_${p}`, k = u ? [e[p], b, K] : ["", b, K];
364
- o[I] = k;
365
- }
366
- } else {
367
- const w = `_${p}`;
368
- o[w] = [e[p], M, M];
369
- }
370
- }
371
- for (let p = 0; p < t.length; p++)
372
- c.has(p) || (o[p] = [t[p]]);
373
- const h = Object.keys(o);
374
- if (!(h.length === 1 && h[0] === "_t"))
375
- return o;
376
- }
377
- function ft(e, t, n) {
378
- if (P(e, t)) return;
379
- const o = {}, r = Object.keys(e), u = Object.keys(t), l = /* @__PURE__ */ new Set([...r, ...u]);
380
- for (const a of l) {
381
- if (n != null && n.propertyFilter && !n.propertyFilter(a, { left: e, right: t }))
382
- continue;
383
- const c = Object.prototype.hasOwnProperty.call(e, a), i = Object.prototype.hasOwnProperty.call(t, a);
384
- if (c && i) {
385
- const f = J(e[a], t[a], n);
386
- f !== void 0 && (o[a] = f);
387
- } else if (c && !i) {
388
- const f = n != null && n.omitRemovedValues ? 0 : e[a];
389
- o[a] = [f, M, M];
390
- } else !c && i && (o[a] = [t[a]]);
391
- }
392
- return Object.keys(o).length > 0 ? o : void 0;
393
- }
394
- function J(e, t, n) {
395
- if (P(e, t)) return;
396
- if (e === void 0 && t !== void 0) {
397
- const a = n != null && n.cloneDiffValues ? O(t) : t;
398
- return [$(a)];
399
- }
400
- if (typeof e !== typeof t || e instanceof Date != t instanceof Date || e instanceof RegExp != t instanceof RegExp || Array.isArray(e) !== Array.isArray(t)) {
401
- const a = n != null && n.cloneDiffValues ? O(e) : e, c = n != null && n.cloneDiffValues ? O(t) : t;
402
- return [$(a), $(c)];
403
- }
404
- if (Array.isArray(e) && Array.isArray(t))
405
- return dt(e, t, n);
406
- if (E(e) && E(t))
407
- return ft(e, t, n);
408
- const u = n != null && n.cloneDiffValues ? O(e) : e, l = n != null && n.cloneDiffValues ? O(t) : t;
409
- return [$(u), $(l)];
410
- }
411
- function mt(e, t, n) {
412
- return J(e, t, n);
413
- }
414
- function vt(e, t, n) {
415
- const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
416
- for (const a in t) {
417
- if (a === "_t" || !a.startsWith("_")) continue;
418
- const c = parseInt(a.slice(1)), i = t[a];
419
- Array.isArray(i) && (i.length === 3 && i[2] === M ? o.add(c) : i.length === 3 && i[2] === K && r.set(c, i[1]));
420
- }
421
- const u = [];
422
- let l = 0;
423
- for (let a = 0; ; a++) {
424
- const c = a.toString(), i = t[c];
425
- if (i !== void 0)
426
- if (Array.isArray(i) && i.length === 1)
427
- u.push(i[0]);
428
- else {
429
- for (; l < e.length && o.has(l); )
430
- l++;
431
- l < e.length && (u.push(Y(e[l], i)), l++);
432
- }
433
- else {
434
- let f = !1;
435
- for (const [h, v] of r.entries())
436
- if (v === a) {
437
- u.push(e[h]), f = !0;
438
- break;
439
- }
440
- if (!f) {
441
- for (; l < e.length && (o.has(l) || r.has(l)); )
442
- l++;
443
- if (l < e.length)
444
- u.push(e[l]), l++;
445
- else
446
- break;
447
- }
448
- }
449
- }
450
- return u;
451
- }
452
- function yt(e, t, n) {
453
- const o = { ...e };
454
- for (const r in t) {
455
- const u = t[r];
456
- Array.isArray(u) ? u.length === 1 ? o[r] = u[0] : u.length === 3 && u[2] === M ? delete o[r] : u.length === 2 && (o[r] = u[1]) : o[r] = Y(o[r], u);
457
- }
458
- return o;
459
- }
460
- function Y(e, t, n) {
461
- if (t === void 0) return e;
462
- if (Array.isArray(t)) {
463
- if (t.length === 1)
464
- return t[0];
465
- if (t.length === 2)
466
- return t[1];
467
- if (t.length === 3 && t[2] === M)
468
- return;
469
- }
470
- return E(t) && t._t === "a" ? vt(e, t) : E(t) && E(e) ? yt(e, t) : e;
471
- }
472
- function le(e, t, n) {
473
- return Y(e, t);
474
- }
475
- function ht(e) {
476
- const t = { _t: "a" };
477
- for (const n in e)
478
- if (n !== "_t")
479
- if (n.startsWith("_")) {
480
- const o = parseInt(n.slice(1)), r = e[n];
481
- if (Array.isArray(r)) {
482
- if (r.length === 3 && r[2] === M)
483
- t[o] = [r[0]];
484
- else if (r.length === 3 && r[2] === K) {
485
- const u = r[1];
486
- t[`_${u}`] = [r[0], o, K];
487
- }
488
- }
489
- } else {
490
- const o = parseInt(n), r = e[n];
491
- if (Array.isArray(r) && r.length === 1)
492
- t[`_${o}`] = [r[0], M, M];
493
- else {
494
- const u = X(r);
495
- u !== void 0 && (t[n] = u);
496
- }
497
- }
498
- return t;
499
- }
500
- function pt(e) {
501
- const t = {};
502
- for (const n in e) {
503
- const o = e[n];
504
- if (Array.isArray(o))
505
- o.length === 1 ? t[n] = [o[0], M, M] : o.length === 3 && o[2] === M ? t[n] = [o[0]] : o.length === 2 && (t[n] = [o[1], o[0]]);
506
- else {
507
- const r = X(o);
508
- r !== void 0 && (t[n] = r);
509
- }
510
- }
511
- return t;
512
- }
513
- function X(e) {
514
- if (e !== void 0) {
515
- if (Array.isArray(e)) {
516
- if (e.length === 1)
517
- return [e[0], M, M];
518
- if (e.length === 2)
519
- return [e[1], e[0]];
520
- if (e.length === 3 && e[2] === M)
521
- return [e[0]];
522
- if (e.length === 3 && e[2] === K)
523
- return e;
524
- }
525
- return E(e) && e._t === "a" ? ht(e) : E(e) ? pt(e) : e;
526
- }
527
- }
528
- function de(e) {
529
- return X(e);
530
- }
531
- function gt(e, t, n) {
532
- const o = de(t);
533
- return le(e, o);
534
- }
535
- class _t {
536
- constructor(t) {
537
- ne(this, "options");
538
- this.options = t || {};
539
- }
540
- diff(t, n) {
541
- return mt(t, n, this.options);
542
- }
543
- patch(t, n) {
544
- return le(t, n, this.options);
545
- }
546
- reverse(t) {
547
- return de(t);
548
- }
549
- unpatch(t, n) {
550
- return gt(t, n, this.options);
551
- }
552
- clone(t) {
553
- return O(t);
554
- }
555
- }
556
- function St(e) {
557
- return new _t(e);
558
- }
559
- function bt({
560
- maxHistorySize: e = 10
561
- }) {
562
- const t = St({
563
- objectHash: (y) => y._id || y.id,
564
- arrays: {
565
- detectMove: !0,
566
- includeValueOnMove: !1
567
- },
568
- cloneDiffValues: !1
569
- }), n = j(null), o = j([]), r = H(-1), u = j(null), l = S(() => r.value > 0), a = S(() => r.value < o.value.length - 1);
570
- function c(y) {
571
- if (n.value === null) {
572
- n.value = C(y), u.value = C(y), o.value = [{ delta: null }], r.value = 0;
573
- return;
574
- }
575
- const p = t.diff(u.value, y);
576
- if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta: p }), r.value++, u.value = C(y), o.value.length > e) {
577
- const b = o.value[1].delta;
578
- b && n.value && (n.value = t.patch(C(n.value), b)), o.value.shift(), r.value--;
579
- }
580
- }
581
- function i(y) {
582
- if (!n.value || y < 0 || y >= o.value.length)
583
- return;
584
- let p = C(n.value);
585
- for (let b = 1; b <= y; b++) {
586
- const w = o.value[b];
587
- w.delta && (p = t.patch(p, w.delta));
588
- }
589
- return p;
590
- }
591
- function f() {
592
- if (l.value) {
593
- r.value--;
594
- const y = i(r.value);
595
- return y && (u.value = C(y)), y;
596
- }
597
- }
598
- function h() {
599
- if (a.value) {
600
- r.value++;
601
- const y = i(r.value);
602
- return y && (u.value = C(y)), y;
603
- }
604
- }
605
- function v() {
606
- n.value = null, u.value = null, o.value = [], r.value = -1;
607
- }
608
- return {
609
- push: c,
610
- canUndo: l,
611
- canRedo: a,
612
- undo: f,
613
- redo: h,
614
- clear: v
615
- };
616
- }
617
- const wt = {
618
- async updateMenuModule(e, t) {
619
- const n = q.RequestRunner.operation(t, e.modules);
620
- if (n.validateError.length > 0)
621
- throw new Error(n.validateError.join(`
622
- `));
623
- const o = {
624
- ...e,
625
- modules: n.result || e.modules,
626
- _rev: n.id ?? ""
627
- };
628
- return ie.cloneDeep({ menu: o, updateId: n.id ?? null });
629
- }
630
- };
631
- function fe() {
632
- return {
633
- _id: "",
634
- masterCatalogSetting: { inclusiveTaxes: [] },
635
- modules: {
636
- catalog: [],
637
- category: [],
638
- group: [],
639
- item: [],
640
- printDepartment: [],
641
- scheduler: [],
642
- takeaway: [],
643
- variant: [],
644
- sku: [],
645
- recipe: [],
646
- unit: [],
647
- cookingGuide: [],
648
- serveSequence: [],
649
- subCategory: []
650
- },
651
- updatedAt: (/* @__PURE__ */ new Date()).toISOString()
652
- };
653
- }
654
- function Mt() {
655
- return {
656
- restaurants: [],
657
- menu: { ...fe(), _rev: "" },
658
- currentCatalogId: null,
659
- currentCategoryIds: null,
660
- currentSchedulerId: "",
661
- currentRestaurantAttrParams: {
662
- restaurantCustomAttributes: null,
663
- restaurantAttributes: null
664
- }
665
- };
666
- }
667
- const Ft = Xe(
668
- "mf-menu-store-v2",
669
- () => {
670
- const e = Qe(Mt()), t = se(), n = tt(), o = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
671
- selector: "position"
672
- }) : []), r = S(() => {
673
- var s;
674
- return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) || z.F_MENU_VERSION.v3;
675
- }), u = S(() => r.value === z.F_MENU_VERSION.v4), l = S(() => {
676
- const s = e.menu.modules.catalog;
677
- return x(s, { selector: "name" });
678
- }), a = S(() => {
679
- var d;
680
- let s = e.menu.modules.catalog.find(
681
- (m) => m._id === e.currentCatalogId
682
- );
683
- return s && ((d = s.linkItemRules) != null && d.length) && (s = T.populateCatalog({
684
- catalog: s,
685
- ruleGroupSettings: e.menu.ruleGroupSettings,
686
- items: e.menu.modules.item,
687
- ...e.currentRestaurantAttrParams ?? {}
688
- })), s;
689
- }), c = S(() => x(h.value.modules.scheduler, { selector: "name" })), i = S(() => e.menu.modules.scheduler.find(
690
- (s) => s._id === e.currentSchedulerId
691
- ));
692
- function f(s, d = !0) {
693
- e.menu = { ...s, _rev: e.menu._rev }, d && V.push(e.menu);
694
- }
695
- const h = j(fe()), v = H(!1), y = H(1);
696
- async function p() {
697
- var m;
698
- v.value = !0;
699
- let s = e.menu.modules.catalog;
700
- if (a.value && ((m = a.value.linkItemRules) != null && m.length)) {
701
- const g = T.populateCatalog({
702
- catalog: a.value,
703
- ruleGroupSettings: e.menu.ruleGroupSettings,
704
- items: e.menu.modules.item,
705
- ...e.currentRestaurantAttrParams ?? {}
706
- });
707
- s = e.menu.modules.catalog.map((_) => _._id === (g == null ? void 0 : g._id) ? g : _);
708
- }
709
- const d = await ce(
710
- {
711
- ...e.menu,
712
- modules: {
713
- ...e.menu.modules,
714
- catalog: s
715
- }
716
- },
717
- e.currentCatalogId,
718
- e.currentSchedulerId
719
- );
720
- if (e.currentSchedulerId != null) {
721
- const g = e.menu.modules.catalog.find(
722
- (R) => R._id === e.currentCatalogId
723
- ), _ = g ? g.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
724
- (R) => R._id === e.currentSchedulerId
725
- ), A = new Set(((_ == null ? void 0 : _.items) || []).map((R) => R._id));
726
- d.modules.item = d.modules.item.filter((R) => A.has(R._id));
727
- }
728
- return h.value = d, v.value = !1, y.value = y.value + 1, d;
729
- }
730
- const w = ie.debounce(p, 200);
731
- let I = null, k = null;
732
- function Q() {
733
- k && (k(), k = null), I && I.stop(), I = Ze(!0), k = I.run(() => et(
734
- () => [e.menu, e.currentCatalogId, e.currentSchedulerId],
735
- () => {
736
- v.value || w();
737
- }
738
- )) || null;
739
- }
740
- Q();
741
- const me = S(() => [
742
- {
743
- label: "Main",
744
- value: null
745
- },
746
- ...l.value.map((s) => ({
747
- label: s.name,
748
- value: s._id
749
- }))
750
- ]), Z = S(() => {
751
- const s = h.value.modules.category;
752
- return [
753
- ...U.value.item.addon ? [
754
- {
755
- _id: e.currentCatalogId ? "" : null,
756
- name: "Addon",
757
- position: 0
758
- }
759
- ] : [],
760
- ...D(s, (d) => d.name)
761
- ];
762
- }), ve = S(() => {
763
- const s = h.value.modules.subCategory || [];
764
- return D(s, (d) => d.name);
765
- }), ee = S(() => {
766
- var d;
767
- let s = h.value.modules.item;
768
- if (a.value) {
769
- const m = (d = a.value) == null ? void 0 : d.override.items;
770
- s = s.filter((g) => {
771
- var A;
772
- const _ = (A = m == null ? void 0 : m[g._id]) == null ? void 0 : A.find(
773
- (R) => !R.combinationKey
774
- );
775
- return (_ == null ? void 0 : _.orderFrom) !== ue.enum.NONE;
776
- });
777
- }
778
- return D(s, (m) => m.code || m.name);
779
- }), ye = S(() => {
780
- const s = e.menu.modules.category, d = D(s, (g) => g.name).reduce(
781
- (g, _, A) => (g[_._id] = A, g),
782
- { "": 0 }
783
- ), m = e.menu.modules.item;
784
- return D(
785
- m,
786
- (g) => g.code || g.name
787
- ).reduce((g, _, A) => (g[_._id] = A + d[_.category || ""], g), {});
788
- }), he = S(() => oe(N.value, Z.value, ee.value)), pe = S(() => {
789
- const s = U.value.item.addon ? [
790
- {
791
- _id: e.currentCatalogId ? "" : null,
792
- name: "Addon",
793
- position: 0
794
- },
795
- ...e.menu.modules.category
796
- ] : e.menu.modules.category;
797
- return oe(
798
- e.menu.modules.variant,
799
- s,
800
- e.menu.modules.item
801
- );
802
- }), N = S(() => {
803
- const s = h.value.modules.variant;
804
- return x(s, { selector: "name" });
805
- });
806
- function ge(s = []) {
807
- const d = s.map((g) => N.value.find((_) => _._id === g)).filter((g) => !!g);
808
- return T.fullVariantCombination(d).reduce((g, _) => (g[_.combinationKey] = _.selectionName.join(" / "), g), {});
809
- }
810
- const _e = S(() => D(h.value.modules.group, (s) => s.name)), Se = S(() => x(h.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
811
- selector: "name"
812
- })), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(Ge(e.menu.modules.recipe, e.menu.modules.sku), {
813
- selector: "name"
814
- })), Ae = S(() => e.menu.modules.cookingGuide), Ce = S(() => {
815
- const s = Le(e.menu.modules.sku);
816
- return x(s, { selector: "code" });
817
- }), Ie = S(() => {
818
- const s = /* @__PURE__ */ new Map();
819
- return e.menu.modules.item.forEach((d) => {
820
- var m, g;
821
- d.code && s.set(d.code, (s.get(d.code) || 0) + 1), (g = (m = d.variant) == null ? void 0 : m.variantCombinations) == null || g.forEach((_) => {
822
- _.code && s.set(_.code, (s.get(_.code) || 0) + 1);
823
- });
824
- }), s;
825
- }), U = S(() => {
826
- const s = !e.currentCatalogId, d = r.value === z.F_MENU_VERSION.v4, m = !e.currentSchedulerId, g = {
827
- create: s && m,
828
- edit: s && m,
829
- delete: s && m
830
- };
831
- return {
832
- item: {
833
- ...g,
834
- edit: d || m,
835
- sort: d && s && m,
836
- addon: d,
837
- code: m,
838
- name: s && m,
839
- description: s && m,
840
- category: m,
841
- thumbnail: s && m,
842
- orderFrom: (d || s) && m,
843
- orderFromNone: s,
844
- orderFromActiveOnly: !d,
845
- openPrice: s && m,
846
- unit: s && m,
847
- price: s,
848
- editPrice: s,
849
- minPrice: d && m,
850
- costing: d && s && m,
851
- tax: s && m,
852
- variant: s && m,
853
- maxVariant: d ? 4 : 2,
854
- group: s && m,
855
- overrideProductGroup: d && m,
856
- inventory: (d || s) && m,
857
- bindToVariant: d,
858
- print: s && m,
859
- toRoot: d && m,
860
- takeaway: (_) => !!_ && (d || s) && m,
861
- serveDelay: d && s && m,
862
- multiScheduler: d,
863
- canRearrange: d,
864
- printConfig: d,
865
- takeawayConfig: d
866
- },
867
- category: {
868
- ...g,
869
- sort: s,
870
- overrideSequence: d
871
- },
872
- group: {
873
- ...g,
874
- edit: d || m,
875
- sort: s,
876
- applyProduct: s,
877
- showAppliedProduct: m,
878
- type: !d,
879
- insertRawItems: !d,
880
- multiScheduler: d,
881
- linkAddonName: d
882
- },
883
- scheduler: {
884
- override: d
885
- },
886
- takeaway: {
887
- ...g,
888
- edit: (d || s) && m,
889
- name: s
890
- },
891
- catalog: {
892
- name: !s,
893
- defaultOrderFrom: d,
894
- markup: d
895
- }
896
- };
897
- });
898
- function W(s) {
899
- return `${s.systemCode}/${s.taxCode}`;
900
- }
901
- function ke(s) {
902
- const [d, m] = s.split("/");
903
- return { systemCode: d, taxCode: m };
904
- }
905
- function Ee(s, d, m) {
906
- return (s ?? d ?? []).map((g) => W(g)).find((g) => m.some((_) => _.value === g));
907
- }
908
- const Re = S(() => {
909
- var g;
910
- const s = ["SV5", "SV10"], d = qe.Country.getCountryFlattenTaxes(
911
- se().currentCountry.value
912
- ), m = d.filter((_) => u.value || !s.includes(_.taxCode)).map((_) => ({
913
- label: `${_.name} (${He(_.rate)}%)`,
914
- value: W(_),
915
- meta: {
916
- rate: _.rate
917
- }
918
- }));
919
- return m.sort((_, A) => _.label.localeCompare(A.label, void 0, { numeric: !0 })), {
920
- systemCode: (g = d[0]) == null ? void 0 : g.systemCode,
921
- countryTaxOptions: m
922
- };
923
- }), xe = async () => {
924
- const s = await Ye.readMenu();
925
- e.menu = s ?? e.menu, te(null);
926
- }, Oe = async () => {
927
- const { fetchAllRestaurants: s } = Je();
928
- await s({
929
- onBatchEnd: (d) => {
930
- e.restaurants = d;
931
- }
932
- });
933
- }, te = (s) => {
934
- e.currentCatalogId = s;
935
- }, Ve = (s) => {
936
- e.currentSchedulerId = s;
937
- }, De = (s) => {
938
- e.currentCategoryIds = s;
939
- }, Te = (s) => {
940
- e.currentRestaurantAttrParams = s;
941
- }, Ke = async (s, d) => {
942
- const m = Array.isArray(s) ? s : [s];
943
- if (!m.length) return;
944
- const g = m.map((_) => ({
945
- ..._,
946
- _id: e.menu._id,
947
- _rev: e.menu._rev
948
- }));
949
- try {
950
- if (d || g.some(
951
- (A) => [q.F_OPERATION_TYPE.delete, q.F_OPERATION_TYPE.deleteMany].includes(A.operation)
952
- )) {
953
- const A = await Be(g, e.menu.modules);
954
- if (A !== !0) throw new Error(A);
955
- }
956
- const _ = await wt.updateMenuModule(e.menu, g);
957
- return f(_.menu), _;
958
- } catch (_) {
959
- n.open({
960
- type: "error",
961
- title: "Failed to update menu",
962
- message: _
963
- });
964
- }
965
- }, Pe = async (s) => {
966
- const d = {
967
- ...e.menu,
968
- masterCatalogSetting: s.masterCatalogSetting,
969
- lowStockThreshold: s.lowStockThreshold,
970
- priceTierSettings: s.priceTierSettings
971
- };
972
- return f(d), d;
973
- }, V = bt({ maxHistorySize: 50 }), $e = S(() => V.canUndo.value), Fe = S(() => V.canRedo.value), je = () => {
974
- const s = V.undo();
975
- s && f(s, !1);
976
- }, Ne = () => {
977
- const s = V.redo();
978
- s && f(s, !1);
979
- }, Ue = () => {
980
- V.clear();
981
- };
982
- return {
983
- state: e,
984
- // loading state
985
- workerIsComputing: v,
986
- mergedMenuChangeId: y,
987
- // async computed state
988
- mergedMenu: h,
989
- // Computed
990
- version: r,
991
- isV4: u,
992
- serveSequence: o,
993
- catalogs: l,
994
- currentCatalog: a,
995
- schedulers: c,
996
- currentScheduler: i,
997
- catalogOptions: me,
998
- categories: Z,
999
- subcategories: ve,
1000
- items: ee,
1001
- sortedItems: ye,
1002
- itemCodeMap: Ie,
1003
- categorizedItems: he,
1004
- categorizedRawMenuItems: pe,
1005
- variants: N,
1006
- groups: _e,
1007
- takeaways: Se,
1008
- printDepartments: be,
1009
- units: we,
1010
- recipes: Me,
1011
- cookingGuide: Ae,
1012
- skus: Ce,
1013
- rules: U,
1014
- taxSetting: Re,
1015
- // Action
1016
- setMenu: f,
1017
- readMenu: xe,
1018
- readRestaurants: Oe,
1019
- selectCatalog: te,
1020
- selectScheduler: Ve,
1021
- selectCategory: De,
1022
- setRestaurantAttrParams: Te,
1023
- updateMenu: Ke,
1024
- updateMenuSetting: Pe,
1025
- computeMergedMenu: p,
1026
- // helper
1027
- encodeTax: W,
1028
- decodeTax: ke,
1029
- getSelectedTax: Ee,
1030
- mapVariant: ge,
1031
- // history
1032
- canUndoHistory: $e,
1033
- canRedoHistory: Fe,
1034
- undoHistory: je,
1035
- redoHistory: Ne,
1036
- // cleanup
1037
- $dispose: () => {
1038
- w.cancel(), k && (k(), k = null), I && (I.stop(), I = null), Ue();
1039
- },
1040
- $reinitialize: () => {
1041
- Q();
1042
- }
1043
- };
1044
- }
1045
- );
1046
- export {
1047
- Tt as a,
1048
- Kt as b,
1049
- Pt as c,
1050
- $t as f,
1051
- Dt as g,
1052
- Vt as m,
1053
- it as o,
1054
- Ft as u
1055
- };