@feedmepos/mf-menu 0.32.17 → 0.32.18-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 (82) hide show
  1. package/dist/App-Cfl37TTw.js +152661 -0
  2. package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
  3. package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
  4. package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
  5. package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
  6. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
  7. package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
  8. package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
  9. package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
  10. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
  11. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
  12. package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
  13. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
  14. package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
  15. package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
  16. package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
  17. package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
  18. package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
  19. package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
  20. package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
  21. package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
  22. package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
  23. package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
  24. package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
  25. package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
  26. package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
  27. package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
  28. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
  29. package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
  30. package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
  31. package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
  32. package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
  33. package/dist/app.js +4 -5
  34. package/dist/apps/mf-menu/src/app.d.ts +1 -2
  35. package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
  36. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
  38. package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
  39. package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
  40. package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
  41. package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
  42. package/dist/dayjs.min-DNPTnUFp.js +6 -0
  43. package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
  44. package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
  45. package/dist/mf-menu.css +1 -1
  46. package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
  47. package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
  48. package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
  49. package/package.json +1 -1
  50. package/dist/App-BiSEuDkd.js +0 -13484
  51. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
  52. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
  53. package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
  54. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
  55. package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
  56. package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
  57. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
  58. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
  59. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  60. package/dist/app-5fxKLAzS.js +0 -8163
  61. package/dist/app-nTzkERJW.js +0 -68
  62. package/dist/catalog-BO2nXwe5.js +0 -199
  63. package/dist/category-CuG3DsGL.js +0 -156
  64. package/dist/check-C9mY6LiX.js +0 -9
  65. package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
  66. package/dist/currency-DxC5zyZB.js +0 -7
  67. package/dist/dayjs.min-BvFUSPWD.js +0 -6
  68. package/dist/discardConfirm-BHni0LNu.js +0 -28
  69. package/dist/index-B0nhvuxR.js +0 -273
  70. package/dist/index-C2zPvt64.js +0 -239
  71. package/dist/index-C36JQix-.js +0 -246
  72. package/dist/index-CisutoS9.js +0 -156
  73. package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
  74. package/dist/item-K01xd1Z0.js +0 -6868
  75. package/dist/menuV2-DKE-xanq.js +0 -1052
  76. package/dist/object-DVUNCr7w.js +0 -16
  77. package/dist/priceTier-Beavb91W.js +0 -87
  78. package/dist/search-BAPEUu1R.js +0 -15
  79. package/dist/string-DpfFixWH.js +0 -4
  80. package/dist/subcategory-DnslmmRD.js +0 -148
  81. package/dist/tooltip-B5BiPMx9.js +0 -32
  82. package/dist/vuedraggable-CK8z7qA8.js +0 -1728
@@ -1,3285 +0,0 @@
1
- import { defineComponent as ie, createElementBlock as j, openBlock as W, normalizeClass as yn, renderSlot as Qe, createCommentVNode as we, createVNode as Q, createElementVNode as V, toDisplayString as Z, withCtx as ae, getCurrentInstance as Dt, inject as Hn, ref as oe, shallowRef as Gn, computed as x, watch as Ze, onMounted as bn, onUnmounted as xn, h as hn, Text as Bn, Fragment as de, resolveComponent as fe, unref as Y, withModifiers as se, renderList as Me, createBlock as xt } from "vue";
2
- import { x as Wn, N as Kn } from "./app-5fxKLAzS.js";
3
- import { useCoreStore as Pt, useI18n as Ge, useCustomAttributes as Bt, EMPTY_RULE as jn, isEmptyMongoQuery as Yn, isEmptyRule as Xn } from "@feedmepos/mf-common";
4
- import "@vue/devtools-api";
5
- import { u as Tn, J as Wt, A as yt } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
6
- import { FmButtonVariant as Fe, components as qn } from "@feedmepos/ui-library";
7
- const Jn = /* @__PURE__ */ ie({
8
- __name: "FormColumn",
9
- props: {
10
- shrinkable: { type: Boolean }
11
- },
12
- setup(e) {
13
- return (t, n) => (W(), j("div", {
14
- class: yn(["flex-1 flex flex-col space-y-24", { "min-h-0": t.shrinkable }])
15
- }, [
16
- Qe(t.$slots, "default")
17
- ], 2));
18
- }
19
- }), Qn = {
20
- key: 0,
21
- class: "flex flex-row justify-between items-center"
22
- }, Zn = { class: "space-y-4" }, zn = { class: "fm-typo-en-title-sm-600" }, er = {
23
- key: 0,
24
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
25
- }, Bs = /* @__PURE__ */ ie({
26
- __name: "FormSection",
27
- props: {
28
- title: {},
29
- subTitle: {},
30
- shrinkable: { type: Boolean }
31
- },
32
- setup(e) {
33
- return (t, n) => (W(), j("div", {
34
- class: yn(["flex flex-col space-y-16", { "min-h-0": t.shrinkable }])
35
- }, [
36
- t.title ? (W(), j("div", Qn, [
37
- V("div", Zn, [
38
- V("p", zn, Z(t.title), 1),
39
- t.subTitle ? (W(), j("p", er, Z(t.subTitle), 1)) : we("", !0)
40
- ]),
41
- Qe(t.$slots, "append-title")
42
- ])) : we("", !0),
43
- Q(Jn, { shrinkable: t.shrinkable }, {
44
- default: ae(() => [
45
- Qe(t.$slots, "default")
46
- ]),
47
- _: 3
48
- }, 8, ["shrinkable"])
49
- ], 2));
50
- }
51
- });
52
- /*!
53
- * shared v10.0.5
54
- * (c) 2024 kazuya kawaguchi
55
- * Released under the MIT License.
56
- */
57
- const Kt = typeof window < "u", Te = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), tr = (e, t, n) => nr({ l: e, k: t, s: n }), nr = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), ee = (e) => typeof e == "number" && isFinite(e), rr = (e) => wt(e) === "[object Date]", ze = (e) => wt(e) === "[object RegExp]", tt = (e) => M(e) && Object.keys(e).length === 0, te = Object.assign, ar = Object.create, H = (e = null) => ar(e);
58
- let jt;
59
- const he = () => jt || (jt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : H());
60
- function Yt(e) {
61
- return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
62
- }
63
- const sr = Object.prototype.hasOwnProperty;
64
- function le(e, t) {
65
- return sr.call(e, t);
66
- }
67
- const z = Array.isArray, K = (e) => typeof e == "function", O = (e) => typeof e == "string", J = (e) => typeof e == "boolean", U = (e) => e !== null && typeof e == "object", or = (e) => U(e) && K(e.then) && K(e.catch), kn = Object.prototype.toString, wt = (e) => kn.call(e), M = (e) => wt(e) === "[object Object]", lr = (e) => e == null ? "" : z(e) || M(e) && e.toString === kn ? JSON.stringify(e, null, 2) : String(e);
68
- function Ft(e, t = "") {
69
- return e.reduce((n, r, a) => a === 0 ? n + r : n + t + r, "");
70
- }
71
- function ur(e, t) {
72
- typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
73
- }
74
- const Ye = (e) => !U(e) || z(e);
75
- function Je(e, t) {
76
- if (Ye(e) || Ye(t))
77
- throw new Error("Invalid value");
78
- const n = [{ src: e, des: t }];
79
- for (; n.length; ) {
80
- const { src: r, des: a } = n.pop();
81
- Object.keys(r).forEach((s) => {
82
- s !== "__proto__" && (U(r[s]) && !U(a[s]) && (a[s] = Array.isArray(r[s]) ? [] : H()), Ye(a[s]) || Ye(r[s]) ? a[s] = r[s] : n.push({ src: r[s], des: a[s] }));
83
- });
84
- }
85
- }
86
- function ir(e, t, n) {
87
- return { line: e, column: t, offset: n };
88
- }
89
- function kt(e, t, n) {
90
- return { start: e, end: t };
91
- }
92
- const $ = {
93
- // tokenizer error codes
94
- EXPECTED_TOKEN: 1,
95
- INVALID_TOKEN_IN_PLACEHOLDER: 2,
96
- UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
97
- UNKNOWN_ESCAPE_SEQUENCE: 4,
98
- INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
99
- UNBALANCED_CLOSING_BRACE: 6,
100
- UNTERMINATED_CLOSING_BRACE: 7,
101
- EMPTY_PLACEHOLDER: 8,
102
- NOT_ALLOW_NEST_PLACEHOLDER: 9,
103
- INVALID_LINKED_FORMAT: 10,
104
- // parser error codes
105
- MUST_HAVE_MESSAGES_IN_PLURAL: 11,
106
- UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
107
- UNEXPECTED_EMPTY_LINKED_KEY: 13,
108
- UNEXPECTED_LEXICAL_ANALYSIS: 14
109
- }, cr = 17;
110
- function nt(e, t, n = {}) {
111
- const { domain: r, messages: a, args: s } = n, u = e, _ = new SyntaxError(String(u));
112
- return _.code = e, t && (_.location = t), _.domain = r, _;
113
- }
114
- function _r(e) {
115
- throw e;
116
- }
117
- const _e = " ", mr = "\r", ne = `
118
- `, pr = "\u2028", dr = "\u2029";
119
- function fr(e) {
120
- const t = e;
121
- let n = 0, r = 1, a = 1, s = 0;
122
- const u = (m) => t[m] === mr && t[m + 1] === ne, _ = (m) => t[m] === ne, c = (m) => t[m] === dr, E = (m) => t[m] === pr, T = (m) => u(m) || _(m) || c(m) || E(m), R = () => n, g = () => r, p = () => a, L = () => s, k = (m) => u(m) || c(m) || E(m) ? ne : t[m], y = () => k(n), i = () => k(n + s);
123
- function b() {
124
- return s = 0, T(n) && (r++, a = 0), u(n) && n++, n++, a++, t[n];
125
- }
126
- function N() {
127
- return u(n + s) && s++, s++, t[n + s];
128
- }
129
- function f() {
130
- n = 0, r = 1, a = 1, s = 0;
131
- }
132
- function A(m = 0) {
133
- s = m;
134
- }
135
- function v() {
136
- const m = n + s;
137
- for (; m !== n; )
138
- b();
139
- s = 0;
140
- }
141
- return {
142
- index: R,
143
- line: g,
144
- column: p,
145
- peekOffset: L,
146
- charAt: k,
147
- currentChar: y,
148
- currentPeek: i,
149
- next: b,
150
- peek: N,
151
- reset: f,
152
- resetPeek: A,
153
- skipToPeek: v
154
- };
155
- }
156
- const Ee = void 0, gr = ".", Xt = "'", Er = "tokenizer";
157
- function vr(e, t = {}) {
158
- const n = t.location !== !1, r = fr(e), a = () => r.index(), s = () => ir(r.line(), r.column(), r.index()), u = s(), _ = a(), c = {
159
- currentType: 13,
160
- offset: _,
161
- startLoc: u,
162
- endLoc: u,
163
- lastType: 13,
164
- lastOffset: _,
165
- lastStartLoc: u,
166
- lastEndLoc: u,
167
- braceNest: 0,
168
- inLinked: !1,
169
- text: ""
170
- }, E = () => c, { onError: T } = t;
171
- function R(o, l, h, ...S) {
172
- const X = E();
173
- if (l.column += h, l.offset += h, T) {
174
- const F = n ? kt(X.startLoc, l) : null, d = nt(o, F, {
175
- domain: Er,
176
- args: S
177
- });
178
- T(d);
179
- }
180
- }
181
- function g(o, l, h) {
182
- o.endLoc = s(), o.currentType = l;
183
- const S = { type: l };
184
- return n && (S.loc = kt(o.startLoc, o.endLoc)), h != null && (S.value = h), S;
185
- }
186
- const p = (o) => g(
187
- o,
188
- 13
189
- /* TokenTypes.EOF */
190
- );
191
- function L(o, l) {
192
- return o.currentChar() === l ? (o.next(), l) : (R($.EXPECTED_TOKEN, s(), 0, l), "");
193
- }
194
- function k(o) {
195
- let l = "";
196
- for (; o.currentPeek() === _e || o.currentPeek() === ne; )
197
- l += o.currentPeek(), o.peek();
198
- return l;
199
- }
200
- function y(o) {
201
- const l = k(o);
202
- return o.skipToPeek(), l;
203
- }
204
- function i(o) {
205
- if (o === Ee)
206
- return !1;
207
- const l = o.charCodeAt(0);
208
- return l >= 97 && l <= 122 || // a-z
209
- l >= 65 && l <= 90 || // A-Z
210
- l === 95;
211
- }
212
- function b(o) {
213
- if (o === Ee)
214
- return !1;
215
- const l = o.charCodeAt(0);
216
- return l >= 48 && l <= 57;
217
- }
218
- function N(o, l) {
219
- const { currentType: h } = l;
220
- if (h !== 2)
221
- return !1;
222
- k(o);
223
- const S = i(o.currentPeek());
224
- return o.resetPeek(), S;
225
- }
226
- function f(o, l) {
227
- const { currentType: h } = l;
228
- if (h !== 2)
229
- return !1;
230
- k(o);
231
- const S = o.currentPeek() === "-" ? o.peek() : o.currentPeek(), X = b(S);
232
- return o.resetPeek(), X;
233
- }
234
- function A(o, l) {
235
- const { currentType: h } = l;
236
- if (h !== 2)
237
- return !1;
238
- k(o);
239
- const S = o.currentPeek() === Xt;
240
- return o.resetPeek(), S;
241
- }
242
- function v(o, l) {
243
- const { currentType: h } = l;
244
- if (h !== 7)
245
- return !1;
246
- k(o);
247
- const S = o.currentPeek() === ".";
248
- return o.resetPeek(), S;
249
- }
250
- function m(o, l) {
251
- const { currentType: h } = l;
252
- if (h !== 8)
253
- return !1;
254
- k(o);
255
- const S = i(o.currentPeek());
256
- return o.resetPeek(), S;
257
- }
258
- function C(o, l) {
259
- const { currentType: h } = l;
260
- if (!(h === 7 || h === 11))
261
- return !1;
262
- k(o);
263
- const S = o.currentPeek() === ":";
264
- return o.resetPeek(), S;
265
- }
266
- function D(o, l) {
267
- const { currentType: h } = l;
268
- if (h !== 9)
269
- return !1;
270
- const S = () => {
271
- const F = o.currentPeek();
272
- return F === "{" ? i(o.peek()) : F === "@" || F === "|" || F === ":" || F === "." || F === _e || !F ? !1 : F === ne ? (o.peek(), S()) : w(o, !1);
273
- }, X = S();
274
- return o.resetPeek(), X;
275
- }
276
- function B(o) {
277
- k(o);
278
- const l = o.currentPeek() === "|";
279
- return o.resetPeek(), l;
280
- }
281
- function w(o, l = !0) {
282
- const h = (X = !1, F = "") => {
283
- const d = o.currentPeek();
284
- return d === "{" || d === "@" || !d ? X : d === "|" ? !(F === _e || F === ne) : d === _e ? (o.peek(), h(!0, _e)) : d === ne ? (o.peek(), h(!0, ne)) : !0;
285
- }, S = h();
286
- return l && o.resetPeek(), S;
287
- }
288
- function P(o, l) {
289
- const h = o.currentChar();
290
- return h === Ee ? Ee : l(h) ? (o.next(), h) : null;
291
- }
292
- function ke(o) {
293
- const l = o.charCodeAt(0);
294
- return l >= 97 && l <= 122 || // a-z
295
- l >= 65 && l <= 90 || // A-Z
296
- l >= 48 && l <= 57 || // 0-9
297
- l === 95 || // _
298
- l === 36;
299
- }
300
- function at(o) {
301
- return P(o, ke);
302
- }
303
- function st(o) {
304
- const l = o.charCodeAt(0);
305
- return l >= 97 && l <= 122 || // a-z
306
- l >= 65 && l <= 90 || // A-Z
307
- l >= 48 && l <= 57 || // 0-9
308
- l === 95 || // _
309
- l === 36 || // $
310
- l === 45;
311
- }
312
- function ot(o) {
313
- return P(o, st);
314
- }
315
- function lt(o) {
316
- const l = o.charCodeAt(0);
317
- return l >= 48 && l <= 57;
318
- }
319
- function ut(o) {
320
- return P(o, lt);
321
- }
322
- function ce(o) {
323
- const l = o.charCodeAt(0);
324
- return l >= 48 && l <= 57 || // 0-9
325
- l >= 65 && l <= 70 || // A-F
326
- l >= 97 && l <= 102;
327
- }
328
- function Be(o) {
329
- return P(o, ce);
330
- }
331
- function We(o) {
332
- let l = "", h = "";
333
- for (; l = ut(o); )
334
- h += l;
335
- return h;
336
- }
337
- function it(o) {
338
- let l = "";
339
- for (; ; ) {
340
- const h = o.currentChar();
341
- if (h === "{" || h === "}" || h === "@" || h === "|" || !h)
342
- break;
343
- if (h === _e || h === ne)
344
- if (w(o))
345
- l += h, o.next();
346
- else {
347
- if (B(o))
348
- break;
349
- l += h, o.next();
350
- }
351
- else
352
- l += h, o.next();
353
- }
354
- return l;
355
- }
356
- function ct(o) {
357
- y(o);
358
- let l = "", h = "";
359
- for (; l = ot(o); )
360
- h += l;
361
- return o.currentChar() === Ee && R($.UNTERMINATED_CLOSING_BRACE, s(), 0), h;
362
- }
363
- function _t(o) {
364
- y(o);
365
- let l = "";
366
- return o.currentChar() === "-" ? (o.next(), l += `-${We(o)}`) : l += We(o), o.currentChar() === Ee && R($.UNTERMINATED_CLOSING_BRACE, s(), 0), l;
367
- }
368
- function Gt(o) {
369
- return o !== Xt && o !== ne;
370
- }
371
- function mt(o) {
372
- y(o), L(o, "'");
373
- let l = "", h = "";
374
- for (; l = P(o, Gt); )
375
- l === "\\" ? h += pt(o) : h += l;
376
- const S = o.currentChar();
377
- return S === ne || S === Ee ? (R($.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, s(), 0), S === ne && (o.next(), L(o, "'")), h) : (L(o, "'"), h);
378
- }
379
- function pt(o) {
380
- const l = o.currentChar();
381
- switch (l) {
382
- case "\\":
383
- case "'":
384
- return o.next(), `\\${l}`;
385
- case "u":
386
- return Ke(o, l, 4);
387
- case "U":
388
- return Ke(o, l, 6);
389
- default:
390
- return R($.UNKNOWN_ESCAPE_SEQUENCE, s(), 0, l), "";
391
- }
392
- }
393
- function Ke(o, l, h) {
394
- L(o, l);
395
- let S = "";
396
- for (let X = 0; X < h; X++) {
397
- const F = Be(o);
398
- if (!F) {
399
- R($.INVALID_UNICODE_ESCAPE_SEQUENCE, s(), 0, `\\${l}${S}${o.currentChar()}`);
400
- break;
401
- }
402
- S += F;
403
- }
404
- return `\\${l}${S}`;
405
- }
406
- function dt(o) {
407
- return o !== "{" && o !== "}" && o !== _e && o !== ne;
408
- }
409
- function ft(o) {
410
- y(o);
411
- let l = "", h = "";
412
- for (; l = P(o, dt); )
413
- h += l;
414
- return h;
415
- }
416
- function gt(o) {
417
- let l = "", h = "";
418
- for (; l = at(o); )
419
- h += l;
420
- return h;
421
- }
422
- function Et(o) {
423
- const l = (h) => {
424
- const S = o.currentChar();
425
- return S === "{" || S === "@" || S === "|" || S === "(" || S === ")" || !S || S === _e ? h : (h += S, o.next(), l(h));
426
- };
427
- return l("");
428
- }
429
- function Se(o) {
430
- y(o);
431
- const l = L(
432
- o,
433
- "|"
434
- /* TokenChars.Pipe */
435
- );
436
- return y(o), l;
437
- }
438
- function Ie(o, l) {
439
- let h = null;
440
- switch (o.currentChar()) {
441
- case "{":
442
- return l.braceNest >= 1 && R($.NOT_ALLOW_NEST_PLACEHOLDER, s(), 0), o.next(), h = g(
443
- l,
444
- 2,
445
- "{"
446
- /* TokenChars.BraceLeft */
447
- ), y(o), l.braceNest++, h;
448
- case "}":
449
- return l.braceNest > 0 && l.currentType === 2 && R($.EMPTY_PLACEHOLDER, s(), 0), o.next(), h = g(
450
- l,
451
- 3,
452
- "}"
453
- /* TokenChars.BraceRight */
454
- ), l.braceNest--, l.braceNest > 0 && y(o), l.inLinked && l.braceNest === 0 && (l.inLinked = !1), h;
455
- case "@":
456
- return l.braceNest > 0 && R($.UNTERMINATED_CLOSING_BRACE, s(), 0), h = Ne(o, l) || p(l), l.braceNest = 0, h;
457
- default: {
458
- let X = !0, F = !0, d = !0;
459
- if (B(o))
460
- return l.braceNest > 0 && R($.UNTERMINATED_CLOSING_BRACE, s(), 0), h = g(l, 1, Se(o)), l.braceNest = 0, l.inLinked = !1, h;
461
- if (l.braceNest > 0 && (l.currentType === 4 || l.currentType === 5 || l.currentType === 6))
462
- return R($.UNTERMINATED_CLOSING_BRACE, s(), 0), l.braceNest = 0, De(o, l);
463
- if (X = N(o, l))
464
- return h = g(l, 4, ct(o)), y(o), h;
465
- if (F = f(o, l))
466
- return h = g(l, 5, _t(o)), y(o), h;
467
- if (d = A(o, l))
468
- return h = g(l, 6, mt(o)), y(o), h;
469
- if (!X && !F && !d)
470
- return h = g(l, 12, ft(o)), R($.INVALID_TOKEN_IN_PLACEHOLDER, s(), 0, h.value), y(o), h;
471
- break;
472
- }
473
- }
474
- return h;
475
- }
476
- function Ne(o, l) {
477
- const { currentType: h } = l;
478
- let S = null;
479
- const X = o.currentChar();
480
- switch ((h === 7 || h === 8 || h === 11 || h === 9) && (X === ne || X === _e) && R($.INVALID_LINKED_FORMAT, s(), 0), X) {
481
- case "@":
482
- return o.next(), S = g(
483
- l,
484
- 7,
485
- "@"
486
- /* TokenChars.LinkedAlias */
487
- ), l.inLinked = !0, S;
488
- case ".":
489
- return y(o), o.next(), g(
490
- l,
491
- 8,
492
- "."
493
- /* TokenChars.LinkedDot */
494
- );
495
- case ":":
496
- return y(o), o.next(), g(
497
- l,
498
- 9,
499
- ":"
500
- /* TokenChars.LinkedDelimiter */
501
- );
502
- default:
503
- return B(o) ? (S = g(l, 1, Se(o)), l.braceNest = 0, l.inLinked = !1, S) : v(o, l) || C(o, l) ? (y(o), Ne(o, l)) : m(o, l) ? (y(o), g(l, 11, gt(o))) : D(o, l) ? (y(o), X === "{" ? Ie(o, l) || S : g(l, 10, Et(o))) : (h === 7 && R($.INVALID_LINKED_FORMAT, s(), 0), l.braceNest = 0, l.inLinked = !1, De(o, l));
504
- }
505
- }
506
- function De(o, l) {
507
- let h = {
508
- type: 13
509
- /* TokenTypes.EOF */
510
- };
511
- if (l.braceNest > 0)
512
- return Ie(o, l) || p(l);
513
- if (l.inLinked)
514
- return Ne(o, l) || p(l);
515
- switch (o.currentChar()) {
516
- case "{":
517
- return Ie(o, l) || p(l);
518
- case "}":
519
- return R($.UNBALANCED_CLOSING_BRACE, s(), 0), o.next(), g(
520
- l,
521
- 3,
522
- "}"
523
- /* TokenChars.BraceRight */
524
- );
525
- case "@":
526
- return Ne(o, l) || p(l);
527
- default: {
528
- if (B(o))
529
- return h = g(l, 1, Se(o)), l.braceNest = 0, l.inLinked = !1, h;
530
- if (w(o))
531
- return g(l, 0, it(o));
532
- break;
533
- }
534
- }
535
- return h;
536
- }
537
- function vt() {
538
- const { currentType: o, offset: l, startLoc: h, endLoc: S } = c;
539
- return c.lastType = o, c.lastOffset = l, c.lastStartLoc = h, c.lastEndLoc = S, c.offset = a(), c.startLoc = s(), r.currentChar() === Ee ? g(
540
- c,
541
- 13
542
- /* TokenTypes.EOF */
543
- ) : De(r, c);
544
- }
545
- return {
546
- nextToken: vt,
547
- currentOffset: a,
548
- currentPosition: s,
549
- context: E
550
- };
551
- }
552
- const yr = "parser", br = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
553
- function hr(e, t, n) {
554
- switch (e) {
555
- case "\\\\":
556
- return "\\";
557
- // eslint-disable-next-line no-useless-escape
558
- case "\\'":
559
- return "'";
560
- default: {
561
- const r = parseInt(t || n, 16);
562
- return r <= 55295 || r >= 57344 ? String.fromCodePoint(r) : "�";
563
- }
564
- }
565
- }
566
- function Tr(e = {}) {
567
- const t = e.location !== !1, { onError: n } = e;
568
- function r(i, b, N, f, ...A) {
569
- const v = i.currentPosition();
570
- if (v.offset += f, v.column += f, n) {
571
- const m = t ? kt(N, v) : null, C = nt(b, m, {
572
- domain: yr,
573
- args: A
574
- });
575
- n(C);
576
- }
577
- }
578
- function a(i, b, N) {
579
- const f = { type: i };
580
- return t && (f.start = b, f.end = b, f.loc = { start: N, end: N }), f;
581
- }
582
- function s(i, b, N, f) {
583
- t && (i.end = b, i.loc && (i.loc.end = N));
584
- }
585
- function u(i, b) {
586
- const N = i.context(), f = a(3, N.offset, N.startLoc);
587
- return f.value = b, s(f, i.currentOffset(), i.currentPosition()), f;
588
- }
589
- function _(i, b) {
590
- const N = i.context(), { lastOffset: f, lastStartLoc: A } = N, v = a(5, f, A);
591
- return v.index = parseInt(b, 10), i.nextToken(), s(v, i.currentOffset(), i.currentPosition()), v;
592
- }
593
- function c(i, b) {
594
- const N = i.context(), { lastOffset: f, lastStartLoc: A } = N, v = a(4, f, A);
595
- return v.key = b, i.nextToken(), s(v, i.currentOffset(), i.currentPosition()), v;
596
- }
597
- function E(i, b) {
598
- const N = i.context(), { lastOffset: f, lastStartLoc: A } = N, v = a(9, f, A);
599
- return v.value = b.replace(br, hr), i.nextToken(), s(v, i.currentOffset(), i.currentPosition()), v;
600
- }
601
- function T(i) {
602
- const b = i.nextToken(), N = i.context(), { lastOffset: f, lastStartLoc: A } = N, v = a(8, f, A);
603
- return b.type !== 11 ? (r(i, $.UNEXPECTED_EMPTY_LINKED_MODIFIER, N.lastStartLoc, 0), v.value = "", s(v, f, A), {
604
- nextConsumeToken: b,
605
- node: v
606
- }) : (b.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, N.lastStartLoc, 0, ue(b)), v.value = b.value || "", s(v, i.currentOffset(), i.currentPosition()), {
607
- node: v
608
- });
609
- }
610
- function R(i, b) {
611
- const N = i.context(), f = a(7, N.offset, N.startLoc);
612
- return f.value = b, s(f, i.currentOffset(), i.currentPosition()), f;
613
- }
614
- function g(i) {
615
- const b = i.context(), N = a(6, b.offset, b.startLoc);
616
- let f = i.nextToken();
617
- if (f.type === 8) {
618
- const A = T(i);
619
- N.modifier = A.node, f = A.nextConsumeToken || i.nextToken();
620
- }
621
- switch (f.type !== 9 && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ue(f)), f = i.nextToken(), f.type === 2 && (f = i.nextToken()), f.type) {
622
- case 10:
623
- f.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ue(f)), N.key = R(i, f.value || "");
624
- break;
625
- case 4:
626
- f.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ue(f)), N.key = c(i, f.value || "");
627
- break;
628
- case 5:
629
- f.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ue(f)), N.key = _(i, f.value || "");
630
- break;
631
- case 6:
632
- f.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ue(f)), N.key = E(i, f.value || "");
633
- break;
634
- default: {
635
- r(i, $.UNEXPECTED_EMPTY_LINKED_KEY, b.lastStartLoc, 0);
636
- const A = i.context(), v = a(7, A.offset, A.startLoc);
637
- return v.value = "", s(v, A.offset, A.startLoc), N.key = v, s(N, A.offset, A.startLoc), {
638
- nextConsumeToken: f,
639
- node: N
640
- };
641
- }
642
- }
643
- return s(N, i.currentOffset(), i.currentPosition()), {
644
- node: N
645
- };
646
- }
647
- function p(i) {
648
- const b = i.context(), N = b.currentType === 1 ? i.currentOffset() : b.offset, f = b.currentType === 1 ? b.endLoc : b.startLoc, A = a(2, N, f);
649
- A.items = [];
650
- let v = null;
651
- do {
652
- const D = v || i.nextToken();
653
- switch (v = null, D.type) {
654
- case 0:
655
- D.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ue(D)), A.items.push(u(i, D.value || ""));
656
- break;
657
- case 5:
658
- D.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ue(D)), A.items.push(_(i, D.value || ""));
659
- break;
660
- case 4:
661
- D.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ue(D)), A.items.push(c(i, D.value || ""));
662
- break;
663
- case 6:
664
- D.value == null && r(i, $.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ue(D)), A.items.push(E(i, D.value || ""));
665
- break;
666
- case 7: {
667
- const B = g(i);
668
- A.items.push(B.node), v = B.nextConsumeToken || null;
669
- break;
670
- }
671
- }
672
- } while (b.currentType !== 13 && b.currentType !== 1);
673
- const m = b.currentType === 1 ? b.lastOffset : i.currentOffset(), C = b.currentType === 1 ? b.lastEndLoc : i.currentPosition();
674
- return s(A, m, C), A;
675
- }
676
- function L(i, b, N, f) {
677
- const A = i.context();
678
- let v = f.items.length === 0;
679
- const m = a(1, b, N);
680
- m.cases = [], m.cases.push(f);
681
- do {
682
- const C = p(i);
683
- v || (v = C.items.length === 0), m.cases.push(C);
684
- } while (A.currentType !== 13);
685
- return v && r(i, $.MUST_HAVE_MESSAGES_IN_PLURAL, N, 0), s(m, i.currentOffset(), i.currentPosition()), m;
686
- }
687
- function k(i) {
688
- const b = i.context(), { offset: N, startLoc: f } = b, A = p(i);
689
- return b.currentType === 13 ? A : L(i, N, f, A);
690
- }
691
- function y(i) {
692
- const b = vr(i, te({}, e)), N = b.context(), f = a(0, N.offset, N.startLoc);
693
- return t && f.loc && (f.loc.source = i), f.body = k(b), e.onCacheKey && (f.cacheKey = e.onCacheKey(i)), N.currentType !== 13 && r(b, $.UNEXPECTED_LEXICAL_ANALYSIS, N.lastStartLoc, 0, i[N.offset] || ""), s(f, b.currentOffset(), b.currentPosition()), f;
694
- }
695
- return { parse: y };
696
- }
697
- function ue(e) {
698
- if (e.type === 13)
699
- return "EOF";
700
- const t = (e.value || "").replace(/\r?\n/gu, "\\n");
701
- return t.length > 10 ? t.slice(0, 9) + "…" : t;
702
- }
703
- function kr(e, t = {}) {
704
- const n = {
705
- ast: e,
706
- helpers: /* @__PURE__ */ new Set()
707
- };
708
- return { context: () => n, helper: (s) => (n.helpers.add(s), s) };
709
- }
710
- function qt(e, t) {
711
- for (let n = 0; n < e.length; n++)
712
- Mt(e[n], t);
713
- }
714
- function Mt(e, t) {
715
- switch (e.type) {
716
- case 1:
717
- qt(e.cases, t), t.helper(
718
- "plural"
719
- /* HelperNameMap.PLURAL */
720
- );
721
- break;
722
- case 2:
723
- qt(e.items, t);
724
- break;
725
- case 6: {
726
- Mt(e.key, t), t.helper(
727
- "linked"
728
- /* HelperNameMap.LINKED */
729
- ), t.helper(
730
- "type"
731
- /* HelperNameMap.TYPE */
732
- );
733
- break;
734
- }
735
- case 5:
736
- t.helper(
737
- "interpolate"
738
- /* HelperNameMap.INTERPOLATE */
739
- ), t.helper(
740
- "list"
741
- /* HelperNameMap.LIST */
742
- );
743
- break;
744
- case 4:
745
- t.helper(
746
- "interpolate"
747
- /* HelperNameMap.INTERPOLATE */
748
- ), t.helper(
749
- "named"
750
- /* HelperNameMap.NAMED */
751
- );
752
- break;
753
- }
754
- }
755
- function Ir(e, t = {}) {
756
- const n = kr(e);
757
- n.helper(
758
- "normalize"
759
- /* HelperNameMap.NORMALIZE */
760
- ), e.body && Mt(e.body, n);
761
- const r = n.context();
762
- e.helpers = Array.from(r.helpers);
763
- }
764
- function Nr(e) {
765
- const t = e.body;
766
- return t.type === 2 ? Jt(t) : t.cases.forEach((n) => Jt(n)), e;
767
- }
768
- function Jt(e) {
769
- if (e.items.length === 1) {
770
- const t = e.items[0];
771
- (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
772
- } else {
773
- const t = [];
774
- for (let n = 0; n < e.items.length; n++) {
775
- const r = e.items[n];
776
- if (!(r.type === 3 || r.type === 9) || r.value == null)
777
- break;
778
- t.push(r.value);
779
- }
780
- if (t.length === e.items.length) {
781
- e.static = Ft(t);
782
- for (let n = 0; n < e.items.length; n++) {
783
- const r = e.items[n];
784
- (r.type === 3 || r.type === 9) && delete r.value;
785
- }
786
- }
787
- }
788
- }
789
- function Ae(e) {
790
- switch (e.t = e.type, e.type) {
791
- case 0: {
792
- const t = e;
793
- Ae(t.body), t.b = t.body, delete t.body;
794
- break;
795
- }
796
- case 1: {
797
- const t = e, n = t.cases;
798
- for (let r = 0; r < n.length; r++)
799
- Ae(n[r]);
800
- t.c = n, delete t.cases;
801
- break;
802
- }
803
- case 2: {
804
- const t = e, n = t.items;
805
- for (let r = 0; r < n.length; r++)
806
- Ae(n[r]);
807
- t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
808
- break;
809
- }
810
- case 3:
811
- case 9:
812
- case 8:
813
- case 7: {
814
- const t = e;
815
- t.value && (t.v = t.value, delete t.value);
816
- break;
817
- }
818
- case 6: {
819
- const t = e;
820
- Ae(t.key), t.k = t.key, delete t.key, t.modifier && (Ae(t.modifier), t.m = t.modifier, delete t.modifier);
821
- break;
822
- }
823
- case 5: {
824
- const t = e;
825
- t.i = t.index, delete t.index;
826
- break;
827
- }
828
- case 4: {
829
- const t = e;
830
- t.k = t.key, delete t.key;
831
- break;
832
- }
833
- }
834
- delete e.type;
835
- }
836
- function Rr(e, t) {
837
- const { filename: n, breakLineCode: r, needIndent: a } = t, s = t.location !== !1, u = {
838
- filename: n,
839
- code: "",
840
- column: 1,
841
- line: 1,
842
- offset: 0,
843
- map: void 0,
844
- breakLineCode: r,
845
- needIndent: a,
846
- indentLevel: 0
847
- };
848
- s && e.loc && (u.source = e.loc.source);
849
- const _ = () => u;
850
- function c(k, y) {
851
- u.code += k;
852
- }
853
- function E(k, y = !0) {
854
- const i = y ? r : "";
855
- c(a ? i + " ".repeat(k) : i);
856
- }
857
- function T(k = !0) {
858
- const y = ++u.indentLevel;
859
- k && E(y);
860
- }
861
- function R(k = !0) {
862
- const y = --u.indentLevel;
863
- k && E(y);
864
- }
865
- function g() {
866
- E(u.indentLevel);
867
- }
868
- return {
869
- context: _,
870
- push: c,
871
- indent: T,
872
- deindent: R,
873
- newline: g,
874
- helper: (k) => `_${k}`,
875
- needIndent: () => u.needIndent
876
- };
877
- }
878
- function Ar(e, t) {
879
- const { helper: n } = e;
880
- e.push(`${n(
881
- "linked"
882
- /* HelperNameMap.LINKED */
883
- )}(`), Le(e, t.key), t.modifier ? (e.push(", "), Le(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
884
- }
885
- function Lr(e, t) {
886
- const { helper: n, needIndent: r } = e;
887
- e.push(`${n(
888
- "normalize"
889
- /* HelperNameMap.NORMALIZE */
890
- )}([`), e.indent(r());
891
- const a = t.items.length;
892
- for (let s = 0; s < a && (Le(e, t.items[s]), s !== a - 1); s++)
893
- e.push(", ");
894
- e.deindent(r()), e.push("])");
895
- }
896
- function Or(e, t) {
897
- const { helper: n, needIndent: r } = e;
898
- if (t.cases.length > 1) {
899
- e.push(`${n(
900
- "plural"
901
- /* HelperNameMap.PLURAL */
902
- )}([`), e.indent(r());
903
- const a = t.cases.length;
904
- for (let s = 0; s < a && (Le(e, t.cases[s]), s !== a - 1); s++)
905
- e.push(", ");
906
- e.deindent(r()), e.push("])");
907
- }
908
- }
909
- function Cr(e, t) {
910
- t.body ? Le(e, t.body) : e.push("null");
911
- }
912
- function Le(e, t) {
913
- const { helper: n } = e;
914
- switch (t.type) {
915
- case 0:
916
- Cr(e, t);
917
- break;
918
- case 1:
919
- Or(e, t);
920
- break;
921
- case 2:
922
- Lr(e, t);
923
- break;
924
- case 6:
925
- Ar(e, t);
926
- break;
927
- case 8:
928
- e.push(JSON.stringify(t.value), t);
929
- break;
930
- case 7:
931
- e.push(JSON.stringify(t.value), t);
932
- break;
933
- case 5:
934
- e.push(`${n(
935
- "interpolate"
936
- /* HelperNameMap.INTERPOLATE */
937
- )}(${n(
938
- "list"
939
- /* HelperNameMap.LIST */
940
- )}(${t.index}))`, t);
941
- break;
942
- case 4:
943
- e.push(`${n(
944
- "interpolate"
945
- /* HelperNameMap.INTERPOLATE */
946
- )}(${n(
947
- "named"
948
- /* HelperNameMap.NAMED */
949
- )}(${JSON.stringify(t.key)}))`, t);
950
- break;
951
- case 9:
952
- e.push(JSON.stringify(t.value), t);
953
- break;
954
- case 3:
955
- e.push(JSON.stringify(t.value), t);
956
- break;
957
- }
958
- }
959
- const Sr = (e, t = {}) => {
960
- const n = O(t.mode) ? t.mode : "normal", r = O(t.filename) ? t.filename : "message.intl";
961
- t.sourceMap;
962
- const a = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
963
- `, s = t.needIndent ? t.needIndent : n !== "arrow", u = e.helpers || [], _ = Rr(e, {
964
- filename: r,
965
- breakLineCode: a,
966
- needIndent: s
967
- });
968
- _.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), _.indent(s), u.length > 0 && (_.push(`const { ${Ft(u.map((T) => `${T}: _${T}`), ", ")} } = ctx`), _.newline()), _.push("return "), Le(_, e), _.deindent(s), _.push("}"), delete e.helpers;
969
- const { code: c, map: E } = _.context();
970
- return {
971
- ast: e,
972
- code: c,
973
- map: E ? E.toJSON() : void 0
974
- // eslint-disable-line @typescript-eslint/no-explicit-any
975
- };
976
- };
977
- function Dr(e, t = {}) {
978
- const n = te({}, t), r = !!n.jit, a = !!n.minify, s = n.optimize == null ? !0 : n.optimize, _ = Tr(n).parse(e);
979
- return r ? (s && Nr(_), a && Ae(_), { ast: _, code: "" }) : (Ir(_, n), Sr(_, n));
980
- }
981
- var Pr = { env: { NODE_ENV: "production" } };
982
- function wr() {
983
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (he().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (he().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
984
- }
985
- function bt(e) {
986
- return (n) => Fr(n, e);
987
- }
988
- function Fr(e, t) {
989
- const n = Ur(t);
990
- if (n == null)
991
- throw Ue(
992
- 0
993
- /* NodeTypes.Resource */
994
- );
995
- if (Ut(n) === 1) {
996
- const s = $r(n);
997
- return e.plural(s.reduce((u, _) => [
998
- ...u,
999
- Qt(e, _)
1000
- ], []));
1001
- } else
1002
- return Qt(e, n);
1003
- }
1004
- const Mr = ["b", "body"];
1005
- function Ur(e) {
1006
- return ve(e, Mr);
1007
- }
1008
- const Vr = ["c", "cases"];
1009
- function $r(e) {
1010
- return ve(e, Vr, []);
1011
- }
1012
- function Qt(e, t) {
1013
- const n = Gr(t);
1014
- if (n != null)
1015
- return e.type === "text" ? n : e.normalize([n]);
1016
- {
1017
- const r = Br(t).reduce((a, s) => [...a, It(e, s)], []);
1018
- return e.normalize(r);
1019
- }
1020
- }
1021
- const Hr = ["s", "static"];
1022
- function Gr(e) {
1023
- return ve(e, Hr);
1024
- }
1025
- const xr = ["i", "items"];
1026
- function Br(e) {
1027
- return ve(e, xr, []);
1028
- }
1029
- function It(e, t) {
1030
- const n = Ut(t);
1031
- switch (n) {
1032
- case 3:
1033
- return Xe(t, n);
1034
- case 9:
1035
- return Xe(t, n);
1036
- case 4: {
1037
- const r = t;
1038
- if (le(r, "k") && r.k)
1039
- return e.interpolate(e.named(r.k));
1040
- if (le(r, "key") && r.key)
1041
- return e.interpolate(e.named(r.key));
1042
- throw Ue(n);
1043
- }
1044
- case 5: {
1045
- const r = t;
1046
- if (le(r, "i") && ee(r.i))
1047
- return e.interpolate(e.list(r.i));
1048
- if (le(r, "index") && ee(r.index))
1049
- return e.interpolate(e.list(r.index));
1050
- throw Ue(n);
1051
- }
1052
- case 6: {
1053
- const r = t, a = Yr(r), s = qr(r);
1054
- return e.linked(It(e, s), a ? It(e, a) : void 0, e.type);
1055
- }
1056
- case 7:
1057
- return Xe(t, n);
1058
- case 8:
1059
- return Xe(t, n);
1060
- default:
1061
- throw new Error(`unhandled node on format message part: ${n}`);
1062
- }
1063
- }
1064
- const Wr = ["t", "type"];
1065
- function Ut(e) {
1066
- return ve(e, Wr);
1067
- }
1068
- const Kr = ["v", "value"];
1069
- function Xe(e, t) {
1070
- const n = ve(e, Kr);
1071
- if (n)
1072
- return n;
1073
- throw Ue(t);
1074
- }
1075
- const jr = ["m", "modifier"];
1076
- function Yr(e) {
1077
- return ve(e, jr);
1078
- }
1079
- const Xr = ["k", "key"];
1080
- function qr(e) {
1081
- const t = ve(e, Xr);
1082
- if (t)
1083
- return t;
1084
- throw Ue(
1085
- 6
1086
- /* NodeTypes.Linked */
1087
- );
1088
- }
1089
- function ve(e, t, n) {
1090
- for (let r = 0; r < t.length; r++) {
1091
- const a = t[r];
1092
- if (le(e, a) && e[a] != null)
1093
- return e[a];
1094
- }
1095
- return n;
1096
- }
1097
- function Ue(e) {
1098
- return new Error(`unhandled node type: ${e}`);
1099
- }
1100
- const Jr = (e) => e;
1101
- let qe = H();
1102
- function Oe(e) {
1103
- return U(e) && Ut(e) === 0 && (le(e, "b") || le(e, "body"));
1104
- }
1105
- function Qr(e, t = {}) {
1106
- let n = !1;
1107
- const r = t.onError || _r;
1108
- return t.onError = (a) => {
1109
- n = !0, r(a);
1110
- }, { ...Dr(e, t), detectError: n };
1111
- }
1112
- // @__NO_SIDE_EFFECTS__
1113
- function Zr(e, t) {
1114
- if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && O(e)) {
1115
- J(t.warnHtmlMessage) && t.warnHtmlMessage;
1116
- const r = (t.onCacheKey || Jr)(e), a = qe[r];
1117
- if (a)
1118
- return a;
1119
- const { ast: s, detectError: u } = Qr(e, {
1120
- ...t,
1121
- location: Pr.env.NODE_ENV !== "production",
1122
- jit: !0
1123
- }), _ = bt(s);
1124
- return u ? _ : qe[r] = _;
1125
- } else {
1126
- const n = e.cacheKey;
1127
- if (n) {
1128
- const r = qe[n];
1129
- return r || (qe[n] = bt(e));
1130
- } else
1131
- return bt(e);
1132
- }
1133
- }
1134
- let Ve = null;
1135
- function zr(e) {
1136
- Ve = e;
1137
- }
1138
- function ea(e, t, n) {
1139
- Ve && Ve.emit("i18n:init", {
1140
- timestamp: Date.now(),
1141
- i18n: e,
1142
- version: t,
1143
- meta: n
1144
- });
1145
- }
1146
- const ta = /* @__PURE__ */ na("function:translate");
1147
- function na(e) {
1148
- return (t) => Ve && Ve.emit(e, t);
1149
- }
1150
- const me = {
1151
- INVALID_ARGUMENT: cr,
1152
- // 17
1153
- INVALID_DATE_ARGUMENT: 18,
1154
- INVALID_ISO_DATE_ARGUMENT: 19,
1155
- NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1156
- NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1157
- NOT_SUPPORT_LOCALE_TYPE: 23
1158
- }, ra = 24;
1159
- function pe(e) {
1160
- return nt(e, null, void 0);
1161
- }
1162
- function Vt(e, t) {
1163
- return t.locale != null ? Zt(t.locale) : Zt(e.locale);
1164
- }
1165
- let ht;
1166
- function Zt(e) {
1167
- if (O(e))
1168
- return e;
1169
- if (K(e)) {
1170
- if (e.resolvedOnce && ht != null)
1171
- return ht;
1172
- if (e.constructor.name === "Function") {
1173
- const t = e();
1174
- if (or(t))
1175
- throw pe(me.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1176
- return ht = t;
1177
- } else
1178
- throw pe(me.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1179
- } else
1180
- throw pe(me.NOT_SUPPORT_LOCALE_TYPE);
1181
- }
1182
- function aa(e, t, n) {
1183
- return [.../* @__PURE__ */ new Set([
1184
- n,
1185
- ...z(t) ? t : U(t) ? Object.keys(t) : O(t) ? [t] : [n]
1186
- ])];
1187
- }
1188
- function In(e, t, n) {
1189
- const r = O(n) ? n : et, a = e;
1190
- a.__localeChainCache || (a.__localeChainCache = /* @__PURE__ */ new Map());
1191
- let s = a.__localeChainCache.get(r);
1192
- if (!s) {
1193
- s = [];
1194
- let u = [n];
1195
- for (; z(u); )
1196
- u = zt(s, u, t);
1197
- const _ = z(t) || !M(t) ? t : t.default ? t.default : null;
1198
- u = O(_) ? [_] : _, z(u) && zt(s, u, !1), a.__localeChainCache.set(r, s);
1199
- }
1200
- return s;
1201
- }
1202
- function zt(e, t, n) {
1203
- let r = !0;
1204
- for (let a = 0; a < t.length && J(r); a++) {
1205
- const s = t[a];
1206
- O(s) && (r = sa(e, t[a], n));
1207
- }
1208
- return r;
1209
- }
1210
- function sa(e, t, n) {
1211
- let r;
1212
- const a = t.split("-");
1213
- do {
1214
- const s = a.join("-");
1215
- r = oa(e, s, n), a.splice(-1, 1);
1216
- } while (a.length && r === !0);
1217
- return r;
1218
- }
1219
- function oa(e, t, n) {
1220
- let r = !1;
1221
- if (!e.includes(t) && (r = !0, t)) {
1222
- r = t[t.length - 1] !== "!";
1223
- const a = t.replace(/!/g, "");
1224
- e.push(a), (z(n) || M(n)) && n[a] && (r = n[a]);
1225
- }
1226
- return r;
1227
- }
1228
- const ye = [];
1229
- ye[
1230
- 0
1231
- /* States.BEFORE_PATH */
1232
- ] = {
1233
- w: [
1234
- 0
1235
- /* States.BEFORE_PATH */
1236
- ],
1237
- i: [
1238
- 3,
1239
- 0
1240
- /* Actions.APPEND */
1241
- ],
1242
- "[": [
1243
- 4
1244
- /* States.IN_SUB_PATH */
1245
- ],
1246
- o: [
1247
- 7
1248
- /* States.AFTER_PATH */
1249
- ]
1250
- };
1251
- ye[
1252
- 1
1253
- /* States.IN_PATH */
1254
- ] = {
1255
- w: [
1256
- 1
1257
- /* States.IN_PATH */
1258
- ],
1259
- ".": [
1260
- 2
1261
- /* States.BEFORE_IDENT */
1262
- ],
1263
- "[": [
1264
- 4
1265
- /* States.IN_SUB_PATH */
1266
- ],
1267
- o: [
1268
- 7
1269
- /* States.AFTER_PATH */
1270
- ]
1271
- };
1272
- ye[
1273
- 2
1274
- /* States.BEFORE_IDENT */
1275
- ] = {
1276
- w: [
1277
- 2
1278
- /* States.BEFORE_IDENT */
1279
- ],
1280
- i: [
1281
- 3,
1282
- 0
1283
- /* Actions.APPEND */
1284
- ],
1285
- 0: [
1286
- 3,
1287
- 0
1288
- /* Actions.APPEND */
1289
- ]
1290
- };
1291
- ye[
1292
- 3
1293
- /* States.IN_IDENT */
1294
- ] = {
1295
- i: [
1296
- 3,
1297
- 0
1298
- /* Actions.APPEND */
1299
- ],
1300
- 0: [
1301
- 3,
1302
- 0
1303
- /* Actions.APPEND */
1304
- ],
1305
- w: [
1306
- 1,
1307
- 1
1308
- /* Actions.PUSH */
1309
- ],
1310
- ".": [
1311
- 2,
1312
- 1
1313
- /* Actions.PUSH */
1314
- ],
1315
- "[": [
1316
- 4,
1317
- 1
1318
- /* Actions.PUSH */
1319
- ],
1320
- o: [
1321
- 7,
1322
- 1
1323
- /* Actions.PUSH */
1324
- ]
1325
- };
1326
- ye[
1327
- 4
1328
- /* States.IN_SUB_PATH */
1329
- ] = {
1330
- "'": [
1331
- 5,
1332
- 0
1333
- /* Actions.APPEND */
1334
- ],
1335
- '"': [
1336
- 6,
1337
- 0
1338
- /* Actions.APPEND */
1339
- ],
1340
- "[": [
1341
- 4,
1342
- 2
1343
- /* Actions.INC_SUB_PATH_DEPTH */
1344
- ],
1345
- "]": [
1346
- 1,
1347
- 3
1348
- /* Actions.PUSH_SUB_PATH */
1349
- ],
1350
- o: 8,
1351
- l: [
1352
- 4,
1353
- 0
1354
- /* Actions.APPEND */
1355
- ]
1356
- };
1357
- ye[
1358
- 5
1359
- /* States.IN_SINGLE_QUOTE */
1360
- ] = {
1361
- "'": [
1362
- 4,
1363
- 0
1364
- /* Actions.APPEND */
1365
- ],
1366
- o: 8,
1367
- l: [
1368
- 5,
1369
- 0
1370
- /* Actions.APPEND */
1371
- ]
1372
- };
1373
- ye[
1374
- 6
1375
- /* States.IN_DOUBLE_QUOTE */
1376
- ] = {
1377
- '"': [
1378
- 4,
1379
- 0
1380
- /* Actions.APPEND */
1381
- ],
1382
- o: 8,
1383
- l: [
1384
- 6,
1385
- 0
1386
- /* Actions.APPEND */
1387
- ]
1388
- };
1389
- const la = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1390
- function ua(e) {
1391
- return la.test(e);
1392
- }
1393
- function ia(e) {
1394
- const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1395
- return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1396
- }
1397
- function ca(e) {
1398
- if (e == null)
1399
- return "o";
1400
- switch (e.charCodeAt(0)) {
1401
- case 91:
1402
- // [
1403
- case 93:
1404
- // ]
1405
- case 46:
1406
- // .
1407
- case 34:
1408
- // "
1409
- case 39:
1410
- return e;
1411
- case 95:
1412
- // _
1413
- case 36:
1414
- // $
1415
- case 45:
1416
- return "i";
1417
- case 9:
1418
- // Tab (HT)
1419
- case 10:
1420
- // Newline (LF)
1421
- case 13:
1422
- // Return (CR)
1423
- case 160:
1424
- // No-break space (NBSP)
1425
- case 65279:
1426
- // Byte Order Mark (BOM)
1427
- case 8232:
1428
- // Line Separator (LS)
1429
- case 8233:
1430
- return "w";
1431
- }
1432
- return "i";
1433
- }
1434
- function _a(e) {
1435
- const t = e.trim();
1436
- return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : ua(t) ? ia(t) : "*" + t;
1437
- }
1438
- function ma(e) {
1439
- const t = [];
1440
- let n = -1, r = 0, a = 0, s, u, _, c, E, T, R;
1441
- const g = [];
1442
- g[
1443
- 0
1444
- /* Actions.APPEND */
1445
- ] = () => {
1446
- u === void 0 ? u = _ : u += _;
1447
- }, g[
1448
- 1
1449
- /* Actions.PUSH */
1450
- ] = () => {
1451
- u !== void 0 && (t.push(u), u = void 0);
1452
- }, g[
1453
- 2
1454
- /* Actions.INC_SUB_PATH_DEPTH */
1455
- ] = () => {
1456
- g[
1457
- 0
1458
- /* Actions.APPEND */
1459
- ](), a++;
1460
- }, g[
1461
- 3
1462
- /* Actions.PUSH_SUB_PATH */
1463
- ] = () => {
1464
- if (a > 0)
1465
- a--, r = 4, g[
1466
- 0
1467
- /* Actions.APPEND */
1468
- ]();
1469
- else {
1470
- if (a = 0, u === void 0 || (u = _a(u), u === !1))
1471
- return !1;
1472
- g[
1473
- 1
1474
- /* Actions.PUSH */
1475
- ]();
1476
- }
1477
- };
1478
- function p() {
1479
- const L = e[n + 1];
1480
- if (r === 5 && L === "'" || r === 6 && L === '"')
1481
- return n++, _ = "\\" + L, g[
1482
- 0
1483
- /* Actions.APPEND */
1484
- ](), !0;
1485
- }
1486
- for (; r !== null; )
1487
- if (n++, s = e[n], !(s === "\\" && p())) {
1488
- if (c = ca(s), R = ye[r], E = R[c] || R.l || 8, E === 8 || (r = E[0], E[1] !== void 0 && (T = g[E[1]], T && (_ = s, T() === !1))))
1489
- return;
1490
- if (r === 7)
1491
- return t;
1492
- }
1493
- }
1494
- const en = /* @__PURE__ */ new Map();
1495
- function pa(e, t) {
1496
- return U(e) ? e[t] : null;
1497
- }
1498
- function da(e, t) {
1499
- if (!U(e))
1500
- return null;
1501
- let n = en.get(t);
1502
- if (n || (n = ma(t), n && en.set(t, n)), !n)
1503
- return null;
1504
- const r = n.length;
1505
- let a = e, s = 0;
1506
- for (; s < r; ) {
1507
- const u = a[n[s]];
1508
- if (u === void 0 || K(a))
1509
- return null;
1510
- a = u, s++;
1511
- }
1512
- return a;
1513
- }
1514
- const fa = "10.0.5", rt = -1, et = "en-US", tn = "", nn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1515
- function ga() {
1516
- return {
1517
- upper: (e, t) => t === "text" && O(e) ? e.toUpperCase() : t === "vnode" && U(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1518
- lower: (e, t) => t === "text" && O(e) ? e.toLowerCase() : t === "vnode" && U(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1519
- capitalize: (e, t) => t === "text" && O(e) ? nn(e) : t === "vnode" && U(e) && "__v_isVNode" in e ? nn(e.children) : e
1520
- };
1521
- }
1522
- let Nn;
1523
- function Ea(e) {
1524
- Nn = e;
1525
- }
1526
- let Rn;
1527
- function va(e) {
1528
- Rn = e;
1529
- }
1530
- let An;
1531
- function ya(e) {
1532
- An = e;
1533
- }
1534
- let Ln = null;
1535
- const ba = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1536
- Ln = e;
1537
- }, ha = /* @__NO_SIDE_EFFECTS__ */ () => Ln;
1538
- let On = null;
1539
- const rn = (e) => {
1540
- On = e;
1541
- }, Ta = () => On;
1542
- let an = 0;
1543
- function ka(e = {}) {
1544
- const t = K(e.onWarn) ? e.onWarn : ur, n = O(e.version) ? e.version : fa, r = O(e.locale) || K(e.locale) ? e.locale : et, a = K(r) ? et : r, s = z(e.fallbackLocale) || M(e.fallbackLocale) || O(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : a, u = M(e.messages) ? e.messages : Tt(a), _ = M(e.datetimeFormats) ? e.datetimeFormats : Tt(a), c = M(e.numberFormats) ? e.numberFormats : Tt(a), E = te(H(), e.modifiers, ga()), T = e.pluralRules || H(), R = K(e.missing) ? e.missing : null, g = J(e.missingWarn) || ze(e.missingWarn) ? e.missingWarn : !0, p = J(e.fallbackWarn) || ze(e.fallbackWarn) ? e.fallbackWarn : !0, L = !!e.fallbackFormat, k = !!e.unresolving, y = K(e.postTranslation) ? e.postTranslation : null, i = M(e.processor) ? e.processor : null, b = J(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, N = !!e.escapeParameter, f = K(e.messageCompiler) ? e.messageCompiler : Nn, A = K(e.messageResolver) ? e.messageResolver : Rn || pa, v = K(e.localeFallbacker) ? e.localeFallbacker : An || aa, m = U(e.fallbackContext) ? e.fallbackContext : void 0, C = e, D = U(C.__datetimeFormatters) ? C.__datetimeFormatters : /* @__PURE__ */ new Map(), B = U(C.__numberFormatters) ? C.__numberFormatters : /* @__PURE__ */ new Map(), w = U(C.__meta) ? C.__meta : {};
1545
- an++;
1546
- const P = {
1547
- version: n,
1548
- cid: an,
1549
- locale: r,
1550
- fallbackLocale: s,
1551
- messages: u,
1552
- modifiers: E,
1553
- pluralRules: T,
1554
- missing: R,
1555
- missingWarn: g,
1556
- fallbackWarn: p,
1557
- fallbackFormat: L,
1558
- unresolving: k,
1559
- postTranslation: y,
1560
- processor: i,
1561
- warnHtmlMessage: b,
1562
- escapeParameter: N,
1563
- messageCompiler: f,
1564
- messageResolver: A,
1565
- localeFallbacker: v,
1566
- fallbackContext: m,
1567
- onWarn: t,
1568
- __meta: w
1569
- };
1570
- return P.datetimeFormats = _, P.numberFormats = c, P.__datetimeFormatters = D, P.__numberFormatters = B, __INTLIFY_PROD_DEVTOOLS__ && ea(P, n, w), P;
1571
- }
1572
- const Tt = (e) => ({ [e]: H() });
1573
- function $t(e, t, n, r, a) {
1574
- const { missing: s, onWarn: u } = e;
1575
- if (s !== null) {
1576
- const _ = s(e, n, t, a);
1577
- return O(_) ? _ : t;
1578
- } else
1579
- return t;
1580
- }
1581
- function Pe(e, t, n) {
1582
- const r = e;
1583
- r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1584
- }
1585
- function Ia(e, t) {
1586
- return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1587
- }
1588
- function Na(e, t) {
1589
- const n = t.indexOf(e);
1590
- if (n === -1)
1591
- return !1;
1592
- for (let r = n + 1; r < t.length; r++)
1593
- if (Ia(e, t[r]))
1594
- return !0;
1595
- return !1;
1596
- }
1597
- function sn(e, ...t) {
1598
- const { datetimeFormats: n, unresolving: r, fallbackLocale: a, onWarn: s, localeFallbacker: u } = e, { __datetimeFormatters: _ } = e, [c, E, T, R] = Nt(...t), g = J(T.missingWarn) ? T.missingWarn : e.missingWarn;
1599
- J(T.fallbackWarn) ? T.fallbackWarn : e.fallbackWarn;
1600
- const p = !!T.part, L = Vt(e, T), k = u(
1601
- e,
1602
- // eslint-disable-line @typescript-eslint/no-explicit-any
1603
- a,
1604
- L
1605
- );
1606
- if (!O(c) || c === "")
1607
- return new Intl.DateTimeFormat(L, R).format(E);
1608
- let y = {}, i, b = null;
1609
- const N = "datetime format";
1610
- for (let v = 0; v < k.length && (i = k[v], y = n[i] || {}, b = y[c], !M(b)); v++)
1611
- $t(e, c, i, g, N);
1612
- if (!M(b) || !O(i))
1613
- return r ? rt : c;
1614
- let f = `${i}__${c}`;
1615
- tt(R) || (f = `${f}__${JSON.stringify(R)}`);
1616
- let A = _.get(f);
1617
- return A || (A = new Intl.DateTimeFormat(i, te({}, b, R)), _.set(f, A)), p ? A.formatToParts(E) : A.format(E);
1618
- }
1619
- const Cn = [
1620
- "localeMatcher",
1621
- "weekday",
1622
- "era",
1623
- "year",
1624
- "month",
1625
- "day",
1626
- "hour",
1627
- "minute",
1628
- "second",
1629
- "timeZoneName",
1630
- "formatMatcher",
1631
- "hour12",
1632
- "timeZone",
1633
- "dateStyle",
1634
- "timeStyle",
1635
- "calendar",
1636
- "dayPeriod",
1637
- "numberingSystem",
1638
- "hourCycle",
1639
- "fractionalSecondDigits"
1640
- ];
1641
- function Nt(...e) {
1642
- const [t, n, r, a] = e, s = H();
1643
- let u = H(), _;
1644
- if (O(t)) {
1645
- const c = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1646
- if (!c)
1647
- throw pe(me.INVALID_ISO_DATE_ARGUMENT);
1648
- const E = c[3] ? c[3].trim().startsWith("T") ? `${c[1].trim()}${c[3].trim()}` : `${c[1].trim()}T${c[3].trim()}` : c[1].trim();
1649
- _ = new Date(E);
1650
- try {
1651
- _.toISOString();
1652
- } catch {
1653
- throw pe(me.INVALID_ISO_DATE_ARGUMENT);
1654
- }
1655
- } else if (rr(t)) {
1656
- if (isNaN(t.getTime()))
1657
- throw pe(me.INVALID_DATE_ARGUMENT);
1658
- _ = t;
1659
- } else if (ee(t))
1660
- _ = t;
1661
- else
1662
- throw pe(me.INVALID_ARGUMENT);
1663
- return O(n) ? s.key = n : M(n) && Object.keys(n).forEach((c) => {
1664
- Cn.includes(c) ? u[c] = n[c] : s[c] = n[c];
1665
- }), O(r) ? s.locale = r : M(r) && (u = r), M(a) && (u = a), [s.key || "", _, s, u];
1666
- }
1667
- function on(e, t, n) {
1668
- const r = e;
1669
- for (const a in n) {
1670
- const s = `${t}__${a}`;
1671
- r.__datetimeFormatters.has(s) && r.__datetimeFormatters.delete(s);
1672
- }
1673
- }
1674
- function ln(e, ...t) {
1675
- const { numberFormats: n, unresolving: r, fallbackLocale: a, onWarn: s, localeFallbacker: u } = e, { __numberFormatters: _ } = e, [c, E, T, R] = Rt(...t), g = J(T.missingWarn) ? T.missingWarn : e.missingWarn;
1676
- J(T.fallbackWarn) ? T.fallbackWarn : e.fallbackWarn;
1677
- const p = !!T.part, L = Vt(e, T), k = u(
1678
- e,
1679
- // eslint-disable-line @typescript-eslint/no-explicit-any
1680
- a,
1681
- L
1682
- );
1683
- if (!O(c) || c === "")
1684
- return new Intl.NumberFormat(L, R).format(E);
1685
- let y = {}, i, b = null;
1686
- const N = "number format";
1687
- for (let v = 0; v < k.length && (i = k[v], y = n[i] || {}, b = y[c], !M(b)); v++)
1688
- $t(e, c, i, g, N);
1689
- if (!M(b) || !O(i))
1690
- return r ? rt : c;
1691
- let f = `${i}__${c}`;
1692
- tt(R) || (f = `${f}__${JSON.stringify(R)}`);
1693
- let A = _.get(f);
1694
- return A || (A = new Intl.NumberFormat(i, te({}, b, R)), _.set(f, A)), p ? A.formatToParts(E) : A.format(E);
1695
- }
1696
- const Sn = [
1697
- "localeMatcher",
1698
- "style",
1699
- "currency",
1700
- "currencyDisplay",
1701
- "currencySign",
1702
- "useGrouping",
1703
- "minimumIntegerDigits",
1704
- "minimumFractionDigits",
1705
- "maximumFractionDigits",
1706
- "minimumSignificantDigits",
1707
- "maximumSignificantDigits",
1708
- "compactDisplay",
1709
- "notation",
1710
- "signDisplay",
1711
- "unit",
1712
- "unitDisplay",
1713
- "roundingMode",
1714
- "roundingPriority",
1715
- "roundingIncrement",
1716
- "trailingZeroDisplay"
1717
- ];
1718
- function Rt(...e) {
1719
- const [t, n, r, a] = e, s = H();
1720
- let u = H();
1721
- if (!ee(t))
1722
- throw pe(me.INVALID_ARGUMENT);
1723
- const _ = t;
1724
- return O(n) ? s.key = n : M(n) && Object.keys(n).forEach((c) => {
1725
- Sn.includes(c) ? u[c] = n[c] : s[c] = n[c];
1726
- }), O(r) ? s.locale = r : M(r) && (u = r), M(a) && (u = a), [s.key || "", _, s, u];
1727
- }
1728
- function un(e, t, n) {
1729
- const r = e;
1730
- for (const a in n) {
1731
- const s = `${t}__${a}`;
1732
- r.__numberFormatters.has(s) && r.__numberFormatters.delete(s);
1733
- }
1734
- }
1735
- const Ra = (e) => e, Aa = (e) => "", La = "text", Oa = (e) => e.length === 0 ? "" : Ft(e), Ca = lr;
1736
- function cn(e, t) {
1737
- return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
1738
- }
1739
- function Sa(e) {
1740
- const t = ee(e.pluralIndex) ? e.pluralIndex : -1;
1741
- return e.named && (ee(e.named.count) || ee(e.named.n)) ? ee(e.named.count) ? e.named.count : ee(e.named.n) ? e.named.n : t : t;
1742
- }
1743
- function Da(e, t) {
1744
- t.count || (t.count = e), t.n || (t.n = e);
1745
- }
1746
- function Pa(e = {}) {
1747
- const t = e.locale, n = Sa(e), r = U(e.pluralRules) && O(t) && K(e.pluralRules[t]) ? e.pluralRules[t] : cn, a = U(e.pluralRules) && O(t) && K(e.pluralRules[t]) ? cn : void 0, s = (i) => i[r(n, i.length, a)], u = e.list || [], _ = (i) => u[i], c = e.named || H();
1748
- ee(e.pluralIndex) && Da(n, c);
1749
- const E = (i) => c[i];
1750
- function T(i, b) {
1751
- const N = K(e.messages) ? e.messages(i, !!b) : U(e.messages) ? e.messages[i] : !1;
1752
- return N || (e.parent ? e.parent.message(i) : Aa);
1753
- }
1754
- const R = (i) => e.modifiers ? e.modifiers[i] : Ra, g = M(e.processor) && K(e.processor.normalize) ? e.processor.normalize : Oa, p = M(e.processor) && K(e.processor.interpolate) ? e.processor.interpolate : Ca, L = M(e.processor) && O(e.processor.type) ? e.processor.type : La, y = {
1755
- list: _,
1756
- named: E,
1757
- plural: s,
1758
- linked: (i, ...b) => {
1759
- const [N, f] = b;
1760
- let A = "text", v = "";
1761
- b.length === 1 ? U(N) ? (v = N.modifier || v, A = N.type || A) : O(N) && (v = N || v) : b.length === 2 && (O(N) && (v = N || v), O(f) && (A = f || A));
1762
- const m = T(i, !0)(y), C = (
1763
- // The message in vnode resolved with linked are returned as an array by processor.nomalize
1764
- A === "vnode" && z(m) && v ? m[0] : m
1765
- );
1766
- return v ? R(v)(C, A) : C;
1767
- },
1768
- message: T,
1769
- type: L,
1770
- interpolate: p,
1771
- normalize: g,
1772
- values: te(H(), u, c)
1773
- };
1774
- return y;
1775
- }
1776
- const _n = () => "", re = (e) => K(e);
1777
- function mn(e, ...t) {
1778
- const { fallbackFormat: n, postTranslation: r, unresolving: a, messageCompiler: s, fallbackLocale: u, messages: _ } = e, [c, E] = At(...t), T = J(E.missingWarn) ? E.missingWarn : e.missingWarn, R = J(E.fallbackWarn) ? E.fallbackWarn : e.fallbackWarn, g = J(E.escapeParameter) ? E.escapeParameter : e.escapeParameter, p = !!E.resolvedMessage, L = O(E.default) || J(E.default) ? J(E.default) ? s ? c : () => c : E.default : n ? s ? c : () => c : null, k = n || L != null && (O(L) || K(L)), y = Vt(e, E);
1779
- g && wa(E);
1780
- let [i, b, N] = p ? [
1781
- c,
1782
- y,
1783
- _[y] || H()
1784
- ] : Dn(e, c, y, u, R, T), f = i, A = c;
1785
- if (!p && !(O(f) || Oe(f) || re(f)) && k && (f = L, A = f), !p && (!(O(f) || Oe(f) || re(f)) || !O(b)))
1786
- return a ? rt : c;
1787
- let v = !1;
1788
- const m = () => {
1789
- v = !0;
1790
- }, C = re(f) ? f : Pn(e, c, b, f, A, m);
1791
- if (v)
1792
- return f;
1793
- const D = Ua(e, b, N, E), B = Pa(D), w = Fa(e, C, B), P = r ? r(w, c) : w;
1794
- if (__INTLIFY_PROD_DEVTOOLS__) {
1795
- const ke = {
1796
- timestamp: Date.now(),
1797
- key: O(c) ? c : re(f) ? f.key : "",
1798
- locale: b || (re(f) ? f.locale : ""),
1799
- format: O(f) ? f : re(f) ? f.source : "",
1800
- message: P
1801
- };
1802
- ke.meta = te({}, e.__meta, /* @__PURE__ */ ha() || {}), ta(ke);
1803
- }
1804
- return P;
1805
- }
1806
- function wa(e) {
1807
- z(e.list) ? e.list = e.list.map((t) => O(t) ? Yt(t) : t) : U(e.named) && Object.keys(e.named).forEach((t) => {
1808
- O(e.named[t]) && (e.named[t] = Yt(e.named[t]));
1809
- });
1810
- }
1811
- function Dn(e, t, n, r, a, s) {
1812
- const { messages: u, onWarn: _, messageResolver: c, localeFallbacker: E } = e, T = E(e, r, n);
1813
- let R = H(), g, p = null;
1814
- const L = "translate";
1815
- for (let k = 0; k < T.length && (g = T[k], R = u[g] || H(), (p = c(R, t)) === null && (p = R[t]), !(O(p) || Oe(p) || re(p))); k++)
1816
- if (!Na(g, T)) {
1817
- const y = $t(
1818
- e,
1819
- // eslint-disable-line @typescript-eslint/no-explicit-any
1820
- t,
1821
- g,
1822
- s,
1823
- L
1824
- );
1825
- y !== t && (p = y);
1826
- }
1827
- return [p, g, R];
1828
- }
1829
- function Pn(e, t, n, r, a, s) {
1830
- const { messageCompiler: u, warnHtmlMessage: _ } = e;
1831
- if (re(r)) {
1832
- const E = r;
1833
- return E.locale = E.locale || n, E.key = E.key || t, E;
1834
- }
1835
- if (u == null) {
1836
- const E = () => r;
1837
- return E.locale = n, E.key = t, E;
1838
- }
1839
- const c = u(r, Ma(e, n, a, r, _, s));
1840
- return c.locale = n, c.key = t, c.source = r, c;
1841
- }
1842
- function Fa(e, t, n) {
1843
- return t(n);
1844
- }
1845
- function At(...e) {
1846
- const [t, n, r] = e, a = H();
1847
- if (!O(t) && !ee(t) && !re(t) && !Oe(t))
1848
- throw pe(me.INVALID_ARGUMENT);
1849
- const s = ee(t) ? String(t) : (re(t), t);
1850
- return ee(n) ? a.plural = n : O(n) ? a.default = n : M(n) && !tt(n) ? a.named = n : z(n) && (a.list = n), ee(r) ? a.plural = r : O(r) ? a.default = r : M(r) && te(a, r), [s, a];
1851
- }
1852
- function Ma(e, t, n, r, a, s) {
1853
- return {
1854
- locale: t,
1855
- key: n,
1856
- warnHtmlMessage: a,
1857
- onError: (u) => {
1858
- throw s && s(u), u;
1859
- },
1860
- onCacheKey: (u) => tr(t, n, u)
1861
- };
1862
- }
1863
- function Ua(e, t, n, r) {
1864
- const { modifiers: a, pluralRules: s, messageResolver: u, fallbackLocale: _, fallbackWarn: c, missingWarn: E, fallbackContext: T } = e, g = {
1865
- locale: t,
1866
- modifiers: a,
1867
- pluralRules: s,
1868
- messages: (p, L) => {
1869
- let k = u(n, p);
1870
- if (k == null && (T || L)) {
1871
- const [, , y] = Dn(
1872
- T || e,
1873
- // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
1874
- p,
1875
- t,
1876
- _,
1877
- c,
1878
- E
1879
- );
1880
- k = u(y, p);
1881
- }
1882
- if (O(k) || Oe(k)) {
1883
- let y = !1;
1884
- const b = Pn(e, p, t, k, p, () => {
1885
- y = !0;
1886
- });
1887
- return y ? _n : b;
1888
- } else return re(k) ? k : _n;
1889
- }
1890
- };
1891
- return e.processor && (g.processor = e.processor), r.list && (g.list = r.list), r.named && (g.named = r.named), ee(r.plural) && (g.pluralIndex = r.plural), g;
1892
- }
1893
- wr();
1894
- var Va = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_9e9c6766-930f-498e-b3dc-118b559ec52f", npm_package_scripts_dev_prod: "dotenv -e .env.prod -- vite --mode dev --port 5176", npm_package_dependencies__vue_devtools_api: "^6.5.0", npm_package_dependencies_dinero_js: "^1.9.1", npm_package_devDependencies__types_node: "^18.18.5", DOTNET_NOLOGO: "1", npm_package_dependencies__feedmepos_core_dart: "^0.2.6", npm_package_dependencies_pinia: "^2.1.7", npm_package_devDependencies_vitest: "^2.1.8", USER: "runner", npm_package_devDependencies__rollup_plugin_node_resolve: "^16.0.0", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v18.20.8 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.16", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_9e9c6766-930f-498e-b3dc-118b559ec52f", PIPX_HOME: "/opt/pipx", FIREBASE_DATABASE_URL: "https://feedme-253402.firebaseio.com", npm_package_devDependencies_vite: "^6.2.2", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.8/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", MENU_BACKEND_URL: "https://menu-v4.feedmeapi.com", GTM_ID: "GTM-WR8XHXLH", FIREBASE_MESSAGING_SENDER_ID: "128512026847", npm_package_files_0: "dist", HOME: "/home/runner", VITE_FEED_ME_NAMESPACE: "production", npm_package_devDependencies_sass: "1.69.5", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_dependencies__feedmepos_core_legacy: "file:../../core-legacy-1.5.tar.gz", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=10240", GRADLE_HOME: "/usr/share/gradle-9.3.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", npm_package_scripts_type_check: "vue-tsc --noEmit -p tsconfig.app.json --composite false", npm_package_dependencies__feedmepos_mf_common: "workspace:^", npm_package_devDependencies_npm_run_all2: "^6.1.1", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", GTM_SERVER_URL: "https://server-side-tagging-zzez732dna-as.a.run.app", VITE_FEATURE_FLAG_API_KEY: "6GhcttsJ9Rj9cTevcdrpin", SYSTEMD_EXEC_PID: "1892", ACTIONS_ORCHESTRATION_ID: "a7c4e52b-25fb-4ec5-8475-baf1edf77b1a.publish.deploy.__default", npm_package_dependencies__feedmepos_ui_library: "1.8.8", npm_package_dependencies_dayjs: "^1.11.12", npm_package_devDependencies__tsconfig_node18: "^18.2.2", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_dependencies_i18next: "^23.11.5", npm_package_devDependencies_tailwindcss: "^3.3.3", npm_package_devDependencies_typescript: "^5.2.2", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "dotenv -e .env.dev pnpm build-only", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^1.8.25", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260302.42.1", npm_package_scripts_dev: "vite --mode dev --port 5176", npm_package_scripts_build_prod: "dotenv -e .env.prod pnpm build-only", npm_package_dependencies__feedmepos_custom_attributes: "0.0.1-rc.4", npm_package_dependencies__types_dinero_js: "^1.9.4", npm_package_dependencies_i18next_vue: "^4.0.0", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.12/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", PORTAL_BACKEND_URL: "https://portal-v2.feedmeapi.com", npm_package_type: "module", npm_package_dependencies__vueuse_core: "^10.11.0", npm_package_devDependencies__vue_tsconfig: "^0.4.0", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.12/x64", JOURNAL_STREAM: "9:12997", GITHUB_WORKFLOW: "Publish mf-menu prod", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_dependencies_vite_svg_loader: "^5.1.0", npm_package_devDependencies__rollup_plugin_commonjs: "^28.0.2", npm_package_devDependencies_autoprefixer: "^10.4.16", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", REMY_URL: "https://remy.feedmeapi.com/v1", npm_package_scripts_lint: "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", npm_package_devDependencies__types_uuid: "^10.0.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.7/x64", GITHUB_RUN_ID: "22949326108", VITE_REMY_BACKEND_URL: "https://remy-agent-api.feedmeapi.com", npm_package_devDependencies__types_lodash: "^4.17.6", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "b9517c0ff783b8d01a29c9c5741da2adce9137e6", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", GTM_ENV: "production", FIREBASE_STORAGE_BUCKET: "image.feedme.cc", FIREBASE_MEASUREMENT_ID: "G-LTKS7N2HQS", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.2.4", GITHUB_WORKFLOW_REF: "feedmepos/portal/.github/workflows/publish-mf-menu-prod.yml@refs/heads/main", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", FIREBASE_AUTH_DOMAIN: "feedme-253402.firebaseapp.com", npm_package_dependencies_axios: "^1.7.2", npm_package_devDependencies__types_pouchdb_core: "^7.0.15", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/portal/portal/apps/mf-menu/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/portal/portal/node_modules/.bin:/home/runner/work/portal/portal/apps/mf-menu/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/portal/portal/node_modules/.bin:/home/runner/work/portal/portal/apps/mf-menu/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/portal/portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/18.20.8/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_0d70aeb9-10df-421a-a2e9-f72bf90b936d", INVOCATION_ID: "43b0775c72db4b20ab1a08a5d1176017", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/18.20.8/x64/bin/node", npm_package_name: "@feedmepos/mf-menu", npm_package_dependencies_file_saver: "^2.0.5", GITHUB_ACTION: "__run_4", GITHUB_RUN_NUMBER: "140", GITHUB_TRIGGERING_ACTOR: "kasugasorata98", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", GTM_SERVER_MEASUREMENT_ID: "G-2MP52PC24R", npm_package_scripts_build_mf: "vite build --mode fmmf", npm_package_scripts_publish_npm: "pnpm build && pnpm publish --no-git-checks", npm_config_frozen_lockfile: "", npm_package_dependencies_vue_advanced_cropper: "^2.8.9", npm_package_devDependencies__vitest_ui: "^2.1.8", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", VITE_LICENSE_API_URL: "https://license-v2.feedmeapi.com", npm_package_devDependencies_eslint: "^8.49.0", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000052731", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "main", GITHUB_REPOSITORY: "feedmepos/portal", npm_package_exports___style_css: "./dist/style.css", npm_package_scripts_build_dts: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist", npm_package_dependencies__feedmepos_core: "2.15.3", npm_lifecycle_script: "vite build --mode fmmf", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_scripts_test: "vitest", npm_package_dependencies_vue3_lottie: "^3.3.0", npm_package_devDependencies__vitejs_plugin_vue_jsx: "^5.0.0", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "705534668", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/portal/portal/node_modules/.pnpm/vite@6.3.5_@types+node@18.19.110_jiti@1.21.7_sass@1.69.5_terser@5.40.0_yaml@2.8.0/node_modules/vite/bin/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/vite@6.3.5_@types+node@18.19.110_jiti@1.21.7_sass@1.69.5_terser@5.40.0_yaml@2.8.0/node_modules/vite/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/vite@6.3.5_@types+node@18.19.110_jiti@1.21.7_sass@1.69.5_terser@5.40.0_yaml@2.8.0/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/dotenv-cli@7.4.4/node_modules/dotenv-cli/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/dotenv-cli@7.4.4/node_modules:/home/runner/work/portal/portal/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.32.17", npm_package_scripts_build_only: "pnpm build:mf && pnpm build:dts && echo 'Build completed'", npm_package_dependencies__feedmepos_mf_inventory_portal: "https://registry.npmjs.org/@feedmepos/mf-inventory-portal/-/mf-inventory-portal-0.0.19-dev.6.tgz", npm_package_dependencies_exceljs: "^4.4.0", npm_package_dependencies_vuedraggable: "^4.1.0", npm_lifecycle_event: "build:mf", GITHUB_REF_PROTECTED: "false", GTM_DEBUG: "false", FIREBASE_PROJECT_ID: "feedme-253402", npm_package_scripts_build: 'run-p type-check "build-only {@}" --', npm_package_dependencies_dotenv_cli: "^7.4.2", npm_package_dependencies_uuid: "^10.0.0", npm_package_dependencies_vue_i18n: "10.0.5", GITHUB_WORKSPACE: "/home/runner/work/portal/portal", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", npm_package_scripts_test_coverage: "vitest --coverage", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "b9517c0ff783b8d01a29c9c5741da2adce9137e6", GITHUB_RUN_ATTEMPT: "2", FIREBASE_APP_ID: "1:128512026847:web:7c5c8ab7e8b90502dc616a", npm_package_dependencies_canvas: "^2.9.3", npm_package_dependencies_vue_router: "^4.2.5", npm_package_devDependencies_eslint_plugin_tailwindcss: "^3.14.0", GITHUB_REF: "refs/heads/main", GITHUB_ACTOR: "kasugasorata98", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_scripts_test_ui: "vitest --ui", npm_package_scripts_format: "prettier --write src/", npm_package_scripts_prepare_menu_debug: "bash scripts/prepare-menu-debug.sh", npm_package_dependencies_firebase: "^10.12.4", npm_package_dependencies_jszip: "^3.10.1", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_9e9c6766-930f-498e-b3dc-118b559ec52f", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/portal/portal/apps/mf-menu", GITHUB_ACTOR_ID: "50161346", RUNNER_WORKSPACE: "/home/runner/work/portal", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_9e9c6766-930f-498e-b3dc-118b559ec52f", npm_package_exports___types: "./dist/apps/mf-menu/src/app.d.ts", npm_package_dependencies__feedmepos_auth: "^1.1.14", npm_package_dependencies__feedmepos_feature_flag: "0.0.15", npm_package_dependencies__feedmepos_inventory_core: "^0.2.6", npm_package_dependencies__feedmepos_zod_entity: "0.0.4-alpha.9", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/portal/portal/apps/mf-menu", npm_package_devDependencies_eslint_plugin_vue: "^9.17.0", npm_package_devDependencies_postcss: "^8.4.31", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_14.6.0", CHROME_BIN: "/usr/bin/google-chrome", VITE_FEED_ME_CLIENT_ID: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", npm_package_scripts_deploy: "pnpm publish --no-git-checks .", npm_package_dependencies_vue3_carousel: "0.16.0", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", FIREBASE_API_KEY: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", npm_package_dependencies__feedmepos_menu: "1.7.32", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_9e9c6766-930f-498e-b3dc-118b559ec52f", INIT_CWD: "/home/runner/work/portal/portal/apps/mf-menu", npm_package_dependencies__feedmepos_mf_remy_panel: "^0.3.5", NODE_ENV: "production" } };
1895
- const $a = "10.0.5";
1896
- function Ha() {
1897
- typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (he().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (he().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (he().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (he().__INTLIFY_PROD_DEVTOOLS__ = !1);
1898
- }
1899
- const Ce = {
1900
- // composer module errors
1901
- UNEXPECTED_RETURN_TYPE: ra,
1902
- // 24
1903
- // legacy module errors
1904
- INVALID_ARGUMENT: 25,
1905
- // i18n module errors
1906
- MUST_BE_CALL_SETUP_TOP: 26,
1907
- NOT_INSTALLED: 27,
1908
- NOT_INSTALLED_WITH_PROVIDE: 31,
1909
- // unexpected error
1910
- UNEXPECTED_ERROR: 32
1911
- };
1912
- function $e(e, ...t) {
1913
- return nt(e, null, void 0);
1914
- }
1915
- const Lt = /* @__PURE__ */ Te("__translateVNode"), Ot = /* @__PURE__ */ Te("__datetimeParts"), Ct = /* @__PURE__ */ Te("__numberParts"), Ga = Te("__setPluralRules"), wn = /* @__PURE__ */ Te("__injectWithOption"), St = /* @__PURE__ */ Te("__dispose");
1916
- function He(e) {
1917
- if (!U(e))
1918
- return e;
1919
- for (const t in e)
1920
- if (le(e, t))
1921
- if (!t.includes("."))
1922
- U(e[t]) && He(e[t]);
1923
- else {
1924
- const n = t.split("."), r = n.length - 1;
1925
- let a = e, s = !1;
1926
- for (let u = 0; u < r; u++) {
1927
- if (n[u] in a || (a[n[u]] = H()), !U(a[n[u]])) {
1928
- s = !0;
1929
- break;
1930
- }
1931
- a = a[n[u]];
1932
- }
1933
- s || (a[n[r]] = e[t], delete e[t]), U(a[n[r]]) && He(a[n[r]]);
1934
- }
1935
- return e;
1936
- }
1937
- function Fn(e, t) {
1938
- const { messages: n, __i18n: r, messageResolver: a, flatJson: s } = t, u = M(n) ? n : z(r) ? H() : { [e]: H() };
1939
- if (z(r) && r.forEach((_) => {
1940
- if ("locale" in _ && "resource" in _) {
1941
- const { locale: c, resource: E } = _;
1942
- c ? (u[c] = u[c] || H(), Je(E, u[c])) : Je(E, u);
1943
- } else
1944
- O(_) && Je(JSON.parse(_), u);
1945
- }), a == null && s)
1946
- for (const _ in u)
1947
- le(u, _) && He(u[_]);
1948
- return u;
1949
- }
1950
- function Mn(e) {
1951
- return e.type;
1952
- }
1953
- function xa(e, t, n) {
1954
- let r = U(t.messages) ? t.messages : H();
1955
- "__i18nGlobal" in n && (r = Fn(e.locale.value, {
1956
- messages: r,
1957
- __i18n: n.__i18nGlobal
1958
- }));
1959
- const a = Object.keys(r);
1960
- a.length && a.forEach((s) => {
1961
- e.mergeLocaleMessage(s, r[s]);
1962
- });
1963
- {
1964
- if (U(t.datetimeFormats)) {
1965
- const s = Object.keys(t.datetimeFormats);
1966
- s.length && s.forEach((u) => {
1967
- e.mergeDateTimeFormat(u, t.datetimeFormats[u]);
1968
- });
1969
- }
1970
- if (U(t.numberFormats)) {
1971
- const s = Object.keys(t.numberFormats);
1972
- s.length && s.forEach((u) => {
1973
- e.mergeNumberFormat(u, t.numberFormats[u]);
1974
- });
1975
- }
1976
- }
1977
- }
1978
- function pn(e) {
1979
- return Q(Bn, null, e, 0);
1980
- }
1981
- const dn = "__INTLIFY_META__", fn = () => [], Ba = () => !1;
1982
- let gn = 0;
1983
- function En(e) {
1984
- return (t, n, r, a) => e(n, r, Dt() || void 0, a);
1985
- }
1986
- const Wa = /* @__NO_SIDE_EFFECTS__ */ () => {
1987
- const e = Dt();
1988
- let t = null;
1989
- return e && (t = Mn(e)[dn]) ? { [dn]: t } : null;
1990
- };
1991
- function Ka(e = {}) {
1992
- const { __root: t, __injectWithOption: n } = e, r = t === void 0, a = e.flatJson, s = Kt ? oe : Gn;
1993
- let u = J(e.inheritLocale) ? e.inheritLocale : !0;
1994
- const _ = s(
1995
- // prettier-ignore
1996
- t && u ? t.locale.value : O(e.locale) ? e.locale : et
1997
- ), c = s(
1998
- // prettier-ignore
1999
- t && u ? t.fallbackLocale.value : O(e.fallbackLocale) || z(e.fallbackLocale) || M(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : _.value
2000
- ), E = s(Fn(_.value, e)), T = s(M(e.datetimeFormats) ? e.datetimeFormats : { [_.value]: {} }), R = s(M(e.numberFormats) ? e.numberFormats : { [_.value]: {} });
2001
- let g = t ? t.missingWarn : J(e.missingWarn) || ze(e.missingWarn) ? e.missingWarn : !0, p = t ? t.fallbackWarn : J(e.fallbackWarn) || ze(e.fallbackWarn) ? e.fallbackWarn : !0, L = t ? t.fallbackRoot : J(e.fallbackRoot) ? e.fallbackRoot : !0, k = !!e.fallbackFormat, y = K(e.missing) ? e.missing : null, i = K(e.missing) ? En(e.missing) : null, b = K(e.postTranslation) ? e.postTranslation : null, N = t ? t.warnHtmlMessage : J(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, f = !!e.escapeParameter;
2002
- const A = t ? t.modifiers : M(e.modifiers) ? e.modifiers : {};
2003
- let v = e.pluralRules || t && t.pluralRules, m;
2004
- m = (() => {
2005
- r && rn(null);
2006
- const d = {
2007
- version: $a,
2008
- locale: _.value,
2009
- fallbackLocale: c.value,
2010
- messages: E.value,
2011
- modifiers: A,
2012
- pluralRules: v,
2013
- missing: i === null ? void 0 : i,
2014
- missingWarn: g,
2015
- fallbackWarn: p,
2016
- fallbackFormat: k,
2017
- unresolving: !0,
2018
- postTranslation: b === null ? void 0 : b,
2019
- warnHtmlMessage: N,
2020
- escapeParameter: f,
2021
- messageResolver: e.messageResolver,
2022
- messageCompiler: e.messageCompiler,
2023
- __meta: { framework: "vue" }
2024
- };
2025
- d.datetimeFormats = T.value, d.numberFormats = R.value, d.__datetimeFormatters = M(m) ? m.__datetimeFormatters : void 0, d.__numberFormatters = M(m) ? m.__numberFormatters : void 0;
2026
- const I = ka(d);
2027
- return r && rn(I), I;
2028
- })(), Pe(m, _.value, c.value);
2029
- function D() {
2030
- return [
2031
- _.value,
2032
- c.value,
2033
- E.value,
2034
- T.value,
2035
- R.value
2036
- ];
2037
- }
2038
- const B = x({
2039
- get: () => _.value,
2040
- set: (d) => {
2041
- _.value = d, m.locale = _.value;
2042
- }
2043
- }), w = x({
2044
- get: () => c.value,
2045
- set: (d) => {
2046
- c.value = d, m.fallbackLocale = c.value, Pe(m, _.value, d);
2047
- }
2048
- }), P = x(() => E.value), ke = /* @__PURE__ */ x(() => T.value), at = /* @__PURE__ */ x(() => R.value);
2049
- function st() {
2050
- return K(b) ? b : null;
2051
- }
2052
- function ot(d) {
2053
- b = d, m.postTranslation = d;
2054
- }
2055
- function lt() {
2056
- return y;
2057
- }
2058
- function ut(d) {
2059
- d !== null && (i = En(d)), y = d, m.missing = i;
2060
- }
2061
- const ce = (d, I, G, q, be, je) => {
2062
- D();
2063
- let Re;
2064
- try {
2065
- Va.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (m.fallbackContext = t ? Ta() : void 0), Re = d(m);
2066
- } finally {
2067
- __INTLIFY_PROD_DEVTOOLS__, r || (m.fallbackContext = void 0);
2068
- }
2069
- if (G !== "translate exists" && // for not `te` (e.g `t`)
2070
- ee(Re) && Re === rt || G === "translate exists" && !Re) {
2071
- const [$n, Ms] = I();
2072
- return t && L ? q(t) : be($n);
2073
- } else {
2074
- if (je(Re))
2075
- return Re;
2076
- throw $e(Ce.UNEXPECTED_RETURN_TYPE);
2077
- }
2078
- };
2079
- function Be(...d) {
2080
- return ce((I) => Reflect.apply(mn, null, [I, ...d]), () => At(...d), "translate", (I) => Reflect.apply(I.t, I, [...d]), (I) => I, (I) => O(I));
2081
- }
2082
- function We(...d) {
2083
- const [I, G, q] = d;
2084
- if (q && !U(q))
2085
- throw $e(Ce.INVALID_ARGUMENT);
2086
- return Be(I, G, te({ resolvedMessage: !0 }, q || {}));
2087
- }
2088
- function it(...d) {
2089
- return ce((I) => Reflect.apply(sn, null, [I, ...d]), () => Nt(...d), "datetime format", (I) => Reflect.apply(I.d, I, [...d]), () => tn, (I) => O(I));
2090
- }
2091
- function ct(...d) {
2092
- return ce((I) => Reflect.apply(ln, null, [I, ...d]), () => Rt(...d), "number format", (I) => Reflect.apply(I.n, I, [...d]), () => tn, (I) => O(I));
2093
- }
2094
- function _t(d) {
2095
- return d.map((I) => O(I) || ee(I) || J(I) ? pn(String(I)) : I);
2096
- }
2097
- const mt = {
2098
- normalize: _t,
2099
- interpolate: (d) => d,
2100
- type: "vnode"
2101
- };
2102
- function pt(...d) {
2103
- return ce((I) => {
2104
- let G;
2105
- const q = I;
2106
- try {
2107
- q.processor = mt, G = Reflect.apply(mn, null, [q, ...d]);
2108
- } finally {
2109
- q.processor = null;
2110
- }
2111
- return G;
2112
- }, () => At(...d), "translate", (I) => I[Lt](...d), (I) => [pn(I)], (I) => z(I));
2113
- }
2114
- function Ke(...d) {
2115
- return ce((I) => Reflect.apply(ln, null, [I, ...d]), () => Rt(...d), "number format", (I) => I[Ct](...d), fn, (I) => O(I) || z(I));
2116
- }
2117
- function dt(...d) {
2118
- return ce((I) => Reflect.apply(sn, null, [I, ...d]), () => Nt(...d), "datetime format", (I) => I[Ot](...d), fn, (I) => O(I) || z(I));
2119
- }
2120
- function ft(d) {
2121
- v = d, m.pluralRules = v;
2122
- }
2123
- function gt(d, I) {
2124
- return ce(() => {
2125
- if (!d)
2126
- return !1;
2127
- const G = O(I) ? I : _.value, q = Ie(G), be = m.messageResolver(q, d);
2128
- return Oe(be) || re(be) || O(be);
2129
- }, () => [d], "translate exists", (G) => Reflect.apply(G.te, G, [d, I]), Ba, (G) => J(G));
2130
- }
2131
- function Et(d) {
2132
- let I = null;
2133
- const G = In(m, c.value, _.value);
2134
- for (let q = 0; q < G.length; q++) {
2135
- const be = E.value[G[q]] || {}, je = m.messageResolver(be, d);
2136
- if (je != null) {
2137
- I = je;
2138
- break;
2139
- }
2140
- }
2141
- return I;
2142
- }
2143
- function Se(d) {
2144
- const I = Et(d);
2145
- return I ?? (t ? t.tm(d) || {} : {});
2146
- }
2147
- function Ie(d) {
2148
- return E.value[d] || {};
2149
- }
2150
- function Ne(d, I) {
2151
- if (a) {
2152
- const G = { [d]: I };
2153
- for (const q in G)
2154
- le(G, q) && He(G[q]);
2155
- I = G[d];
2156
- }
2157
- E.value[d] = I, m.messages = E.value;
2158
- }
2159
- function De(d, I) {
2160
- E.value[d] = E.value[d] || {};
2161
- const G = { [d]: I };
2162
- if (a)
2163
- for (const q in G)
2164
- le(G, q) && He(G[q]);
2165
- I = G[d], Je(I, E.value[d]), m.messages = E.value;
2166
- }
2167
- function vt(d) {
2168
- return T.value[d] || {};
2169
- }
2170
- function o(d, I) {
2171
- T.value[d] = I, m.datetimeFormats = T.value, on(m, d, I);
2172
- }
2173
- function l(d, I) {
2174
- T.value[d] = te(T.value[d] || {}, I), m.datetimeFormats = T.value, on(m, d, I);
2175
- }
2176
- function h(d) {
2177
- return R.value[d] || {};
2178
- }
2179
- function S(d, I) {
2180
- R.value[d] = I, m.numberFormats = R.value, un(m, d, I);
2181
- }
2182
- function X(d, I) {
2183
- R.value[d] = te(R.value[d] || {}, I), m.numberFormats = R.value, un(m, d, I);
2184
- }
2185
- gn++, t && Kt && (Ze(t.locale, (d) => {
2186
- u && (_.value = d, m.locale = d, Pe(m, _.value, c.value));
2187
- }), Ze(t.fallbackLocale, (d) => {
2188
- u && (c.value = d, m.fallbackLocale = d, Pe(m, _.value, c.value));
2189
- }));
2190
- const F = {
2191
- id: gn,
2192
- locale: B,
2193
- fallbackLocale: w,
2194
- get inheritLocale() {
2195
- return u;
2196
- },
2197
- set inheritLocale(d) {
2198
- u = d, d && t && (_.value = t.locale.value, c.value = t.fallbackLocale.value, Pe(m, _.value, c.value));
2199
- },
2200
- get availableLocales() {
2201
- return Object.keys(E.value).sort();
2202
- },
2203
- messages: P,
2204
- get modifiers() {
2205
- return A;
2206
- },
2207
- get pluralRules() {
2208
- return v || {};
2209
- },
2210
- get isGlobal() {
2211
- return r;
2212
- },
2213
- get missingWarn() {
2214
- return g;
2215
- },
2216
- set missingWarn(d) {
2217
- g = d, m.missingWarn = g;
2218
- },
2219
- get fallbackWarn() {
2220
- return p;
2221
- },
2222
- set fallbackWarn(d) {
2223
- p = d, m.fallbackWarn = p;
2224
- },
2225
- get fallbackRoot() {
2226
- return L;
2227
- },
2228
- set fallbackRoot(d) {
2229
- L = d;
2230
- },
2231
- get fallbackFormat() {
2232
- return k;
2233
- },
2234
- set fallbackFormat(d) {
2235
- k = d, m.fallbackFormat = k;
2236
- },
2237
- get warnHtmlMessage() {
2238
- return N;
2239
- },
2240
- set warnHtmlMessage(d) {
2241
- N = d, m.warnHtmlMessage = d;
2242
- },
2243
- get escapeParameter() {
2244
- return f;
2245
- },
2246
- set escapeParameter(d) {
2247
- f = d, m.escapeParameter = d;
2248
- },
2249
- t: Be,
2250
- getLocaleMessage: Ie,
2251
- setLocaleMessage: Ne,
2252
- mergeLocaleMessage: De,
2253
- getPostTranslationHandler: st,
2254
- setPostTranslationHandler: ot,
2255
- getMissingHandler: lt,
2256
- setMissingHandler: ut,
2257
- [Ga]: ft
2258
- };
2259
- return F.datetimeFormats = ke, F.numberFormats = at, F.rt = We, F.te = gt, F.tm = Se, F.d = it, F.n = ct, F.getDateTimeFormat = vt, F.setDateTimeFormat = o, F.mergeDateTimeFormat = l, F.getNumberFormat = h, F.setNumberFormat = S, F.mergeNumberFormat = X, F[wn] = n, F[Lt] = pt, F[Ot] = dt, F[Ct] = Ke, F;
2260
- }
2261
- const Ht = {
2262
- tag: {
2263
- type: [String, Object]
2264
- },
2265
- locale: {
2266
- type: String
2267
- },
2268
- scope: {
2269
- type: String,
2270
- // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
2271
- validator: (e) => e === "parent" || e === "global",
2272
- default: "parent"
2273
- /* ComponentI18nScope */
2274
- },
2275
- i18n: {
2276
- type: Object
2277
- }
2278
- };
2279
- function ja({ slots: e }, t) {
2280
- return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((r, a) => [
2281
- ...r,
2282
- // prettier-ignore
2283
- ...a.type === de ? a.children : [a]
2284
- ], []) : t.reduce((n, r) => {
2285
- const a = e[r];
2286
- return a && (n[r] = a()), n;
2287
- }, H());
2288
- }
2289
- function Un() {
2290
- return de;
2291
- }
2292
- te({
2293
- keypath: {
2294
- type: String,
2295
- required: !0
2296
- },
2297
- plural: {
2298
- type: [Number, String],
2299
- validator: (e) => ee(e) || !isNaN(e)
2300
- }
2301
- }, Ht);
2302
- function Ya(e) {
2303
- return z(e) && !O(e[0]);
2304
- }
2305
- function Vn(e, t, n, r) {
2306
- const { slots: a, attrs: s } = t;
2307
- return () => {
2308
- const u = { part: !0 };
2309
- let _ = H();
2310
- e.locale && (u.locale = e.locale), O(e.format) ? u.key = e.format : U(e.format) && (O(e.format.key) && (u.key = e.format.key), _ = Object.keys(e.format).reduce((g, p) => n.includes(p) ? te(H(), g, { [p]: e.format[p] }) : g, H()));
2311
- const c = r(e.value, u, _);
2312
- let E = [u.key];
2313
- z(c) ? E = c.map((g, p) => {
2314
- const L = a[g.type], k = L ? L({ [g.type]: g.value, index: p, parts: c }) : [g.value];
2315
- return Ya(k) && (k[0].key = `${g.type}-${p}`), k;
2316
- }) : O(c) && (E = [c]);
2317
- const T = te(H(), s), R = O(e.tag) || U(e.tag) ? e.tag : Un();
2318
- return hn(R, T, E);
2319
- };
2320
- }
2321
- te({
2322
- value: {
2323
- type: Number,
2324
- required: !0
2325
- },
2326
- format: {
2327
- type: [String, Object]
2328
- }
2329
- }, Ht);
2330
- te({
2331
- value: {
2332
- type: [Number, Date],
2333
- required: !0
2334
- },
2335
- format: {
2336
- type: [String, Object]
2337
- }
2338
- }, Ht);
2339
- const Xa = /* @__PURE__ */ Te("global-vue-i18n");
2340
- function xe(e = {}) {
2341
- const t = Dt();
2342
- if (t == null)
2343
- throw $e(Ce.MUST_BE_CALL_SETUP_TOP);
2344
- if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
2345
- throw $e(Ce.NOT_INSTALLED);
2346
- const n = qa(t), r = Qa(n), a = Mn(t), s = Ja(e, a);
2347
- if (s === "global")
2348
- return xa(r, e, a), r;
2349
- if (s === "parent") {
2350
- let c = Za(n, t, e.__useComponent);
2351
- return c == null && (c = r), c;
2352
- }
2353
- const u = n;
2354
- let _ = u.__getInstance(t);
2355
- if (_ == null) {
2356
- const c = te({}, e);
2357
- "__i18n" in a && (c.__i18n = a.__i18n), r && (c.__root = r), _ = Ka(c), u.__composerExtend && (_[St] = u.__composerExtend(_)), es(u, t, _), u.__setInstance(t, _);
2358
- }
2359
- return _;
2360
- }
2361
- function qa(e) {
2362
- const t = Hn(e.isCE ? Xa : e.appContext.app.__VUE_I18N_SYMBOL__);
2363
- if (!t)
2364
- throw $e(e.isCE ? Ce.NOT_INSTALLED_WITH_PROVIDE : Ce.UNEXPECTED_ERROR);
2365
- return t;
2366
- }
2367
- function Ja(e, t) {
2368
- return tt(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
2369
- }
2370
- function Qa(e) {
2371
- return e.mode === "composition" ? e.global : e.global.__composer;
2372
- }
2373
- function Za(e, t, n = !1) {
2374
- let r = null;
2375
- const a = t.root;
2376
- let s = za(t, n);
2377
- for (; s != null; ) {
2378
- const u = e;
2379
- if (e.mode === "composition")
2380
- r = u.__getInstance(s);
2381
- else if (__VUE_I18N_LEGACY_API__) {
2382
- const _ = u.__getInstance(s);
2383
- _ != null && (r = _.__composer, n && r && !r[wn] && (r = null));
2384
- }
2385
- if (r != null || a === s)
2386
- break;
2387
- s = s.parent;
2388
- }
2389
- return r;
2390
- }
2391
- function za(e, t = !1) {
2392
- return e == null ? null : t && e.vnode.ctx || e.parent;
2393
- }
2394
- function es(e, t, n) {
2395
- bn(() => {
2396
- }, t), xn(() => {
2397
- const r = n;
2398
- e.__deleteInstance(t);
2399
- const a = r[St];
2400
- a && (a(), delete r[St]);
2401
- }, t);
2402
- }
2403
- Ha();
2404
- Ea(Zr);
2405
- va(da);
2406
- ya(In);
2407
- if (__INTLIFY_PROD_DEVTOOLS__) {
2408
- const e = he();
2409
- e.__INTLIFY__ = !0, zr(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
2410
- }
2411
- function ge(e) {
2412
- return Array.from(new Set(e));
2413
- }
2414
- function Ws() {
2415
- const e = Pt();
2416
- return {
2417
- restaurantAttributes: x(() => [
2418
- {
2419
- type: "string",
2420
- key: "name",
2421
- entity: "restaurant",
2422
- values: ge(
2423
- e.restaurants.value.filter((n) => {
2424
- var r;
2425
- return !!((r = n.profile) != null && r.name);
2426
- }).map((n) => n.profile.name)
2427
- )
2428
- },
2429
- {
2430
- type: "string",
2431
- key: "code",
2432
- entity: "restaurant",
2433
- values: ge(
2434
- e.restaurants.value.filter((n) => {
2435
- var r;
2436
- return !!((r = n.profile) != null && r.code);
2437
- }).map((n) => n.profile.code)
2438
- )
2439
- }
2440
- ])
2441
- };
2442
- }
2443
- function ts(e, t) {
2444
- return t.split(".").reduce((n, r) => n == null ? void 0 : n[r], e);
2445
- }
2446
- function ns(e, t) {
2447
- return ge(
2448
- e.map((n) => ts(n.profile, t)).filter(Boolean)
2449
- ).map((n) => ({
2450
- label: n,
2451
- value: n
2452
- }));
2453
- }
2454
- function rs() {
2455
- const e = Pt(), { t } = Ge(), n = e.restaurants.value;
2456
- return [
2457
- "name",
2458
- "code",
2459
- "address.city",
2460
- "address.postcode",
2461
- "address.state"
2462
- ].map((a) => ({
2463
- label: t(
2464
- `menu.rule_groups.condition_view.attribute.restaurant_${a.replace("address.", "")}`
2465
- ),
2466
- value: a,
2467
- options: ns(n, a)
2468
- }));
2469
- }
2470
- function as() {
2471
- const e = Tn(), { t } = Ge(), n = e.state.menu.modules.item, r = e.categories;
2472
- return [
2473
- {
2474
- label: t("menu.rule_groups.condition_view.attribute.product_name"),
2475
- value: "name",
2476
- options: ge(n.filter((a) => !!a.name).map((a) => a.name)).map(
2477
- (a) => ({ label: a, value: a })
2478
- )
2479
- },
2480
- {
2481
- label: t("menu.rule_groups.condition_view.attribute.product_code"),
2482
- value: "code",
2483
- options: ge(n.filter((a) => !!a.code).map((a) => a.code)).map(
2484
- (a) => ({ label: a, value: a })
2485
- )
2486
- },
2487
- {
2488
- label: t("menu.rule_groups.condition_view.attribute.product_category"),
2489
- value: "category",
2490
- options: ge(r.filter((a) => !!a.name).map((a) => a.name)).map(
2491
- (a) => ({ label: a, value: a })
2492
- )
2493
- }
2494
- ];
2495
- }
2496
- function Ks(e = {}) {
2497
- const t = x(() => {
2498
- var c, E;
2499
- const u = ((c = e.menuItems) == null ? void 0 : c.value) || [], _ = ((E = e.categories) == null ? void 0 : E.value) || [];
2500
- return [
2501
- {
2502
- type: "string",
2503
- key: "name",
2504
- entity: "item",
2505
- values: ge(u.filter((T) => !!T.name).map((T) => T.name))
2506
- },
2507
- {
2508
- type: "string",
2509
- key: "code",
2510
- entity: "item",
2511
- values: ge(u.filter((T) => !!T.code).map((T) => T.code))
2512
- },
2513
- {
2514
- type: "string",
2515
- key: "category",
2516
- entity: "item",
2517
- values: ge(_.filter((T) => !!T.name).map((T) => T.name))
2518
- }
2519
- ];
2520
- }), n = x(() => {
2521
- var _;
2522
- const u = {};
2523
- return (_ = e.categories) == null || _.value.forEach((c) => {
2524
- u[c.name] = c._id;
2525
- }), u;
2526
- }), r = x(() => {
2527
- var _;
2528
- const u = {};
2529
- return (_ = e.categories) == null || _.value.forEach((c) => {
2530
- u[c._id] = c.name;
2531
- }), u;
2532
- });
2533
- function a(u) {
2534
- const _ = Wt.cloneDeep(u);
2535
- return _ != null && _.rules && (_.rules = _.rules.map((c) => {
2536
- if ("property" in c && c.property === "category" && Array.isArray(c.value)) {
2537
- const E = c.value.map((T) => r.value[T]);
2538
- return { ...c, value: E };
2539
- }
2540
- return c;
2541
- })), _;
2542
- }
2543
- function s(u) {
2544
- const _ = Wt.cloneDeep(u);
2545
- return _ != null && _.rules && (_.rules = _.rules.map((c) => {
2546
- if ("property" in c && c.property === "category" && Array.isArray(c.value)) {
2547
- const E = c.value.map((T) => n.value[T]);
2548
- return { ...c, value: E };
2549
- }
2550
- return c;
2551
- })), _;
2552
- }
2553
- return {
2554
- itemAttributes: t,
2555
- convertCategoryIdToName: a,
2556
- convertCategoryNameToId: s
2557
- };
2558
- }
2559
- const ss = {
2560
- class: "flex justify-between gap-8"
2561
- }, os = {
2562
- class: "flex w-full justify-between gap-16"
2563
- }, ls = {
2564
- class: "break-all fm-typo-en-body-lg-400 line-clamp-1"
2565
- }, vn = /* @__PURE__ */ ie({
2566
- __name: "RuleConditionSelector",
2567
- props: {
2568
- ruleKey: {
2569
- type: String,
2570
- required: !0
2571
- },
2572
- operator: {
2573
- type: String,
2574
- required: !0
2575
- },
2576
- values: {
2577
- type: Array,
2578
- required: !0
2579
- },
2580
- uniqueKey: {
2581
- type: String,
2582
- required: !0
2583
- },
2584
- selectedKeys: {
2585
- type: Array,
2586
- default: () => []
2587
- }
2588
- },
2589
- emits: ["update:modelValue"],
2590
- setup(e, {
2591
- emit: t
2592
- }) {
2593
- const {
2594
- t: n
2595
- } = Ge(), r = e, a = t, s = Tn(), {
2596
- attributes: u
2597
- } = Bt({
2598
- valueSource: Pt().restaurants,
2599
- entity: "restaurant"
2600
- }), {
2601
- attributes: _
2602
- } = Bt({
2603
- valueSource: x(() => s.state.menu.modules.item || []),
2604
- entity: "item"
2605
- }), c = rs(), E = as(), T = oe(r.ruleKey), R = x(() => [...c.map((v) => ({
2606
- label: v.label,
2607
- value: `restaurant_attr_${v.value}`
2608
- })), ...u.value.map((v) => ({
2609
- label: `Restaurant ${v.key}`,
2610
- value: `restaurant_custom_${v.key}`
2611
- })), ...E.map((v) => ({
2612
- label: v.label,
2613
- value: `item_attr_${v.value}`
2614
- })), ..._.value.map((v) => ({
2615
- label: `Product ${v.key}`,
2616
- value: `item_custom_${v.key}`
2617
- }))]), g = oe(r.values), p = x(() => {
2618
- const v = T.value;
2619
- if (!v) return [];
2620
- if (v.startsWith("restaurant_attr_")) {
2621
- const m = v.replace("restaurant_attr_", ""), C = c.find((D) => D.value === m);
2622
- if (C && Array.isArray(C.options))
2623
- return C.options;
2624
- } else if (v.startsWith("restaurant_custom_")) {
2625
- const m = v.replace("restaurant_custom_", ""), C = u.value.find((D) => D.key === m);
2626
- if (C && Array.isArray(C.values))
2627
- return C.values.map((D) => ({
2628
- label: D,
2629
- value: D
2630
- }));
2631
- } else if (v.startsWith("item_attr_")) {
2632
- const m = v.replace("item_attr_", ""), C = E.find((D) => D.value === m);
2633
- if (C && Array.isArray(C.options))
2634
- return C.options;
2635
- } else if (v.startsWith("item_custom_")) {
2636
- const m = v.replace("item_custom_", ""), C = _.value.find((D) => D.key === m);
2637
- if (C && Array.isArray(C.values))
2638
- return C.values.map((D) => ({
2639
- label: D,
2640
- value: D
2641
- }));
2642
- }
2643
- return [];
2644
- }), L = oe(r.operator), k = [{
2645
- label: n("menu.rule_groups.condition_view.operator.in"),
2646
- value: "$in"
2647
- }, {
2648
- label: n("menu.rule_groups.condition_view.operator.not_in"),
2649
- value: "$nin"
2650
- }, {
2651
- label: n("menu.rule_groups.condition_view.operator.contains"),
2652
- value: "$contains"
2653
- }, {
2654
- label: n("menu.rule_groups.condition_view.operator.starts_with"),
2655
- value: "$startsWith"
2656
- }], y = oe(""), i = x(() => {
2657
- const v = p.value, m = Array.isArray(g.value) ? g.value : [], C = m.map((B) => v.find((w) => w.value === B)).filter(Boolean);
2658
- let D = [];
2659
- return y.value ? (D = v.filter((B) => B.label.toLowerCase().includes(y.value.toLowerCase()) && !m.includes(B.value)), [...C, ...D]) : (D = v.filter((B) => !m.includes(B.value)), [...C, ...D]);
2660
- }), b = x(() => {
2661
- let v = R.value;
2662
- return v = v.filter((m) => !r.selectedKeys.includes(m.value) || m.value === T.value), y.value ? v.filter((m) => m.label.toLowerCase().includes(y.value.toLowerCase())) : v;
2663
- });
2664
- Ze(() => T.value, (v) => {
2665
- g.value = [];
2666
- });
2667
- function N(v) {
2668
- if (v.startsWith("restaurant_custom_")) {
2669
- const m = v.replace("restaurant_custom_", ""), C = u.value.find((D) => D.key === m);
2670
- return (C == null ? void 0 : C.type) || "string";
2671
- } else if (v.startsWith("item_custom_")) {
2672
- const m = v.replace("item_custom_", ""), C = _.value.find((D) => D.key === m);
2673
- return (C == null ? void 0 : C.type) || "string";
2674
- }
2675
- return "string";
2676
- }
2677
- function f(v, m) {
2678
- const C = N(v === "ruleKey" ? m : T.value);
2679
- switch (v) {
2680
- case "ruleKey":
2681
- a("update:modelValue", {
2682
- ruleKey: m,
2683
- operator: L.value,
2684
- values: g.value,
2685
- uniqueKey: r.uniqueKey,
2686
- type: C,
2687
- action: "update"
2688
- });
2689
- break;
2690
- case "operator":
2691
- a("update:modelValue", {
2692
- ruleKey: T.value,
2693
- operator: m,
2694
- values: g.value,
2695
- uniqueKey: r.uniqueKey,
2696
- type: C,
2697
- action: "update"
2698
- });
2699
- break;
2700
- case "ruleValues":
2701
- a("update:modelValue", {
2702
- ruleKey: T.value,
2703
- operator: L.value,
2704
- values: m,
2705
- uniqueKey: r.uniqueKey,
2706
- type: C,
2707
- action: "update"
2708
- });
2709
- break;
2710
- }
2711
- }
2712
- function A() {
2713
- a("update:modelValue", {
2714
- ruleKey: null,
2715
- operator: null,
2716
- values: null,
2717
- uniqueKey: r.uniqueKey,
2718
- action: "delete"
2719
- });
2720
- }
2721
- return (v, m) => {
2722
- const C = fe("FmSearch"), D = fe("FmSelect"), B = fe("FmButton");
2723
- return W(), j("div", ss, [V("div", os, [Q(D, {
2724
- class: "flex w-full",
2725
- modelValue: T.value,
2726
- "onUpdate:modelValue": [m[2] || (m[2] = (w) => T.value = w), m[3] || (m[3] = (w) => f("ruleKey", w))],
2727
- items: b.value,
2728
- placeholder: Y(n)("menu.rule_groups.condition_view.select_item")
2729
- }, {
2730
- "prepend-menu": ae(() => [V("div", {
2731
- onClick: m[1] || (m[1] = se(() => {
2732
- }, ["stop"]))
2733
- }, [Q(C, {
2734
- class: "px-8",
2735
- modelValue: y.value,
2736
- "onUpdate:modelValue": m[0] || (m[0] = (w) => y.value = w),
2737
- placeholder: "Filter"
2738
- }, null, 8, ["modelValue"])])]),
2739
- _: 1
2740
- }, 8, ["modelValue", "items", "placeholder"]), Q(D, {
2741
- class: "flex w-full",
2742
- modelValue: L.value,
2743
- "onUpdate:modelValue": [m[4] || (m[4] = (w) => L.value = w), m[5] || (m[5] = (w) => f("operator", w))],
2744
- placeholder: Y(n)("menu.rule_groups.condition_view.select_item"),
2745
- items: k,
2746
- rules: [(w) => T.value && !w ? Y(n)("menu.rule_groups.condition_view.required") : !0]
2747
- }, null, 8, ["modelValue", "placeholder", "rules"]), Q(D, {
2748
- class: "flex w-full",
2749
- modelValue: g.value,
2750
- "onUpdate:modelValue": [m[7] || (m[7] = (w) => g.value = w), m[8] || (m[8] = (w) => f("ruleValues", w))],
2751
- items: i.value,
2752
- placeholder: Y(n)("menu.rule_groups.condition_view.select_item"),
2753
- multiselect: "",
2754
- "hide-chips": "",
2755
- rules: [(w) => T.value && (!w || w.length === 0) ? Y(n)("menu.rule_groups.condition_view.required") : !0]
2756
- }, {
2757
- default: ae(() => [V("div", ls, Z(g.value.join(", ")), 1)]),
2758
- "prepend-menu": ae(() => [Q(C, {
2759
- class: "px-8",
2760
- modelValue: y.value,
2761
- "onUpdate:modelValue": m[6] || (m[6] = (w) => y.value = w),
2762
- placeholder: Y(n)("common.filter")
2763
- }, null, 8, ["modelValue", "placeholder"])]),
2764
- _: 1
2765
- }, 8, ["modelValue", "items", "placeholder", "rules"])]), Q(B, {
2766
- variant: "tertiary",
2767
- "prepend-icon": "close",
2768
- onClick: m[9] || (m[9] = se((w) => A(), ["stop"]))
2769
- })]);
2770
- };
2771
- }
2772
- }), us = {
2773
- class: "flex flex-col gap-16"
2774
- }, is = {
2775
- class: "fm-typo-en-body-lg-600"
2776
- }, cs = {
2777
- class: "flex flex-col gap-16"
2778
- }, _s = /* @__PURE__ */ ie({
2779
- __name: "RuleCondition",
2780
- props: {
2781
- modelValue: {}
2782
- },
2783
- emits: ["update:modelValue"],
2784
- setup(e, {
2785
- emit: t
2786
- }) {
2787
- const {
2788
- t: n
2789
- } = Ge(), r = e, a = t, s = x(() => {
2790
- var p;
2791
- return ((p = r.modelValue.restaurantRule) == null ? void 0 : p.restaurantAttributes) ?? {};
2792
- }), u = x(() => {
2793
- var p;
2794
- return ((p = r.modelValue.restaurantRule) == null ? void 0 : p.restaurantCustomAttributes) ?? {};
2795
- }), _ = x(() => {
2796
- var p;
2797
- return ((p = r.modelValue.itemRule) == null ? void 0 : p.itemAttributes) ?? {};
2798
- }), c = x(() => {
2799
- var p;
2800
- return ((p = r.modelValue.itemRule) == null ? void 0 : p.itemCustomAttributes) ?? {};
2801
- }), E = oe([...(s.value.rules ?? []).map((p) => ({
2802
- ...p,
2803
- id: crypto.randomUUID(),
2804
- property: `restaurant_attr_${p.property}`
2805
- })), ...(u.value.rules ?? []).map((p) => ({
2806
- ...p,
2807
- id: crypto.randomUUID(),
2808
- property: `restaurant_custom_${p.property}`
2809
- })), ...(_.value.rules ?? []).map((p) => ({
2810
- ...p,
2811
- id: crypto.randomUUID(),
2812
- property: `item_attr_${p.property}`
2813
- })), ...(c.value.rules ?? []).map((p) => ({
2814
- ...p,
2815
- id: crypto.randomUUID(),
2816
- property: `item_custom_${p.property}`
2817
- }))]);
2818
- bn(() => {
2819
- E.value.length === 0 && g();
2820
- });
2821
- const T = oe([]);
2822
- function R(p) {
2823
- const L = p.uniqueKey.split("_"), k = L[0] === "newCondition";
2824
- if (p.action === "delete")
2825
- if (k)
2826
- T.value = T.value.filter((y) => y.key !== p.uniqueKey);
2827
- else {
2828
- const y = L.slice(1).join("_");
2829
- E.value = E.value.filter((i) => i.id !== y);
2830
- }
2831
- else if (p.action === "update")
2832
- if (k)
2833
- T.value = T.value.filter((y) => y.key !== p.uniqueKey), E.value.push({
2834
- id: crypto.randomUUID(),
2835
- property: p.ruleKey,
2836
- operator: p.operator,
2837
- value: p.values,
2838
- type: p.type
2839
- });
2840
- else {
2841
- const y = L.slice(1).join("_"), i = E.value.findIndex((b) => b.id === y);
2842
- i !== -1 && (E.value[i] = {
2843
- id: y,
2844
- // Keep the same ID
2845
- property: p.ruleKey,
2846
- operator: p.operator,
2847
- value: p.values,
2848
- type: p.type
2849
- });
2850
- }
2851
- a("update:modelValue", E.value);
2852
- }
2853
- function g() {
2854
- T.value.push({
2855
- key: `newCondition_${T.value.length}`
2856
- });
2857
- }
2858
- return Ze(() => E.value.length + T.value.length, (p) => {
2859
- p === 0 && g();
2860
- }), (p, L) => {
2861
- const k = fe("FmButton");
2862
- return W(), j("div", us, [V("p", is, Z(Y(n)("menu.rule_groups.condition_view.condition")), 1), V("div", cs, [(W(!0), j(de, null, Me(E.value, (y) => (W(), j("div", {
2863
- key: y.id
2864
- }, [Q(vn, {
2865
- ruleKey: y.property,
2866
- operator: y.operator,
2867
- values: y.value,
2868
- "unique-key": `condition_${y.id}`,
2869
- "selected-keys": E.value.map((i) => i.property),
2870
- "onUpdate:modelValue": L[0] || (L[0] = (i) => {
2871
- R(i);
2872
- })
2873
- }, null, 8, ["ruleKey", "operator", "values", "unique-key", "selected-keys"])]))), 128)), (W(!0), j(de, null, Me(T.value, (y) => (W(), j("div", {
2874
- key: y.key
2875
- }, [Q(vn, {
2876
- ruleKey: "",
2877
- operator: "",
2878
- "unique-key": y.key,
2879
- values: [],
2880
- "selected-keys": E.value.map((i) => i.property),
2881
- "onUpdate:modelValue": L[1] || (L[1] = (i) => {
2882
- R(i);
2883
- })
2884
- }, null, 8, ["unique-key", "selected-keys"])]))), 128)), Q(k, {
2885
- variant: Y(Fe).Plain,
2886
- "prepend-icon": "add",
2887
- label: Y(n)("menu.rule_groups.condition_view.add_condition"),
2888
- onClick: L[2] || (L[2] = se((y) => g(), ["stop"]))
2889
- }, null, 8, ["variant", "label"])])]);
2890
- };
2891
- }
2892
- }), ms = { class: "flex w-full items-center space-x-8" }, ps = { class: "w-24" }, ds = { class: "flex w-full fm-typo-en-body-lg-400 space-x-8 overflow-hidden" }, fs = { class: "whitespace-nowrap" }, gs = { class: "fm-typo-en-body-lg-600 whitespace-nowrap" }, Es = /* @__PURE__ */ ie({
2893
- __name: "RuleConditionListView",
2894
- props: {
2895
- number: {
2896
- type: Number,
2897
- required: !0
2898
- },
2899
- property: {
2900
- type: String,
2901
- required: !0
2902
- },
2903
- operator: {
2904
- type: String,
2905
- required: !0
2906
- },
2907
- value: {
2908
- type: Array,
2909
- required: !0
2910
- },
2911
- isCatalogLinkItemRuleView: {
2912
- type: Boolean,
2913
- required: !1,
2914
- default: !1
2915
- }
2916
- },
2917
- emits: ["open-catalog-link-item-rule-form", "open-rule-condition-form"],
2918
- setup(e, { emit: t }) {
2919
- const { t: n } = xe(), r = {
2920
- $eq: n("menu.rule_groups.condition_view.operator.equals_to"),
2921
- $ne: n("menu.rule_groups.condition_view.operator.not_equals_to"),
2922
- $in: n("menu.rule_groups.condition_view.operator.in"),
2923
- $nin: n("menu.rule_groups.condition_view.operator.not_in"),
2924
- $regex: n("menu.rule_groups.condition_view.operator.matches_regex"),
2925
- $contains: n("menu.rule_groups.condition_view.operator.contains"),
2926
- $startsWith: n("menu.rule_groups.condition_view.operator.starts_with"),
2927
- $endsWith: n("menu.rule_groups.condition_view.operator.ends_with"),
2928
- $gt: n("menu.rule_groups.condition_view.operator.greater_than"),
2929
- $gte: n("menu.rule_groups.condition_view.operator.greater_than_or_equals_to"),
2930
- $lt: n("menu.rule_groups.condition_view.operator.less_than"),
2931
- $lte: n("menu.rule_groups.condition_view.operator.less_than_or_equals_to"),
2932
- $between: n("menu.rule_groups.condition_view.operator.between")
2933
- };
2934
- return (a, s) => {
2935
- const u = fe("FmMenu");
2936
- return W(), j("div", ms, [
2937
- V("p", ps, Z(e.number) + ".", 1),
2938
- V("div", ds, [
2939
- V("p", fs, Z(e.property), 1),
2940
- V("p", gs, Z(r[e.operator]), 1),
2941
- Q(u, {
2942
- trigger: "hover",
2943
- closeOnMouseLeave: ""
2944
- }, {
2945
- "menu-button": ae(() => [
2946
- V("p", {
2947
- ref: "valueTextRef",
2948
- onClick: s[0] || (s[0] = se((_) => e.isCatalogLinkItemRuleView ? a.$emit("open-catalog-link-item-rule-form") : a.$emit("open-rule-condition-form"), ["stop"])),
2949
- class: "text-fm-color-primary underline underline-offset-2 cursor-pointer truncate"
2950
- }, Z(e.value.join(", ")), 513)
2951
- ]),
2952
- default: ae(() => [
2953
- (W(!0), j(de, null, Me(e.value, (_) => (W(), j("div", {
2954
- key: _,
2955
- class: "flex flex-col px-8 space-y-8"
2956
- }, [
2957
- V("p", null, Z(_), 1)
2958
- ]))), 128))
2959
- ]),
2960
- _: 1
2961
- })
2962
- ])
2963
- ]);
2964
- };
2965
- }
2966
- });
2967
- function js(e) {
2968
- return Yn(e) ? jn : Wn.build(e);
2969
- }
2970
- function Ys(e) {
2971
- return Xn(e) ? null : Kn.build(e);
2972
- }
2973
- const vs = {
2974
- class: "flex items-center gap-24"
2975
- }, ys = {
2976
- key: 0,
2977
- class: "fm-typo-en-headline-lg-600"
2978
- }, bs = {
2979
- key: 1,
2980
- class: "fm-typo-en-headline-lg-600"
2981
- }, hs = {
2982
- class: "flex gap-16 items-center"
2983
- }, Ts = /* @__PURE__ */ ie({
2984
- __name: "RuleForm",
2985
- props: {
2986
- modelValue: {},
2987
- isEditMode: {
2988
- type: Boolean
2989
- }
2990
- },
2991
- emits: ["update:modelValue"],
2992
- setup(e, {
2993
- expose: t,
2994
- emit: n
2995
- }) {
2996
- const {
2997
- t: r
2998
- } = Ge(), a = oe(!1), s = (k) => {
2999
- typeof k == "boolean" ? a.value = k : a.value = !a.value;
3000
- }, u = e, _ = n;
3001
- t({
3002
- show: a,
3003
- trigger: s
3004
- });
3005
- const c = x(() => {
3006
- var k;
3007
- return ((k = u.modelValue.restaurantRule) == null ? void 0 : k.restaurantAttributes) ?? {};
3008
- }), E = x(() => {
3009
- var k;
3010
- return ((k = u.modelValue.restaurantRule) == null ? void 0 : k.restaurantCustomAttributes) ?? {};
3011
- }), T = x(() => {
3012
- var k;
3013
- return ((k = u.modelValue.itemRule) == null ? void 0 : k.itemAttributes) ?? {};
3014
- }), R = x(() => {
3015
- var k;
3016
- return ((k = u.modelValue.itemRule) == null ? void 0 : k.itemCustomAttributes) ?? {};
3017
- }), g = oe([...c.value.rules ?? [], ...E.value.rules ?? [], ...T.value.rules ?? [], ...R.value.rules ?? []]), p = oe([]);
3018
- function L() {
3019
- var f, A, v, m, C, D, B, w;
3020
- const k = u.modelValue, y = [], i = [], b = [], N = [];
3021
- if (p.value.length === 0) {
3022
- s(!1);
3023
- return;
3024
- }
3025
- p.value.forEach((P) => {
3026
- P.property.startsWith("restaurant_attr") ? y.push({
3027
- property: P.property.replace("restaurant_attr_", ""),
3028
- operator: P.operator,
3029
- value: P.value,
3030
- type: P.type
3031
- }) : P.property.startsWith("restaurant_custom") ? i.push({
3032
- property: P.property.replace("restaurant_custom_", ""),
3033
- operator: P.operator,
3034
- value: P.value,
3035
- type: P.type
3036
- }) : P.property.startsWith("item_attr") ? b.push({
3037
- property: P.property.replace("item_attr_", ""),
3038
- operator: P.operator,
3039
- value: P.value,
3040
- type: P.type
3041
- }) : P.property.startsWith("item_custom") && N.push({
3042
- property: P.property.replace("item_custom_", ""),
3043
- operator: P.operator,
3044
- value: P.value,
3045
- type: P.type
3046
- });
3047
- }), k.restaurantRule = {
3048
- restaurantAttributes: {
3049
- logic: ((A = (f = k.restaurantRule) == null ? void 0 : f.restaurantAttributes) == null ? void 0 : A.logic) ?? "AND",
3050
- rules: y
3051
- },
3052
- restaurantCustomAttributes: {
3053
- logic: ((m = (v = k.restaurantRule) == null ? void 0 : v.restaurantCustomAttributes) == null ? void 0 : m.logic) ?? "AND",
3054
- rules: i
3055
- }
3056
- }, k.itemRule = {
3057
- itemAttributes: {
3058
- logic: ((D = (C = k.itemRule) == null ? void 0 : C.itemAttributes) == null ? void 0 : D.logic) ?? "AND",
3059
- rules: b
3060
- },
3061
- itemCustomAttributes: {
3062
- logic: ((w = (B = k.itemRule) == null ? void 0 : B.itemCustomAttributes) == null ? void 0 : w.logic) ?? "AND",
3063
- rules: N
3064
- }
3065
- }, s(!1), _("update:modelValue", {
3066
- menuRule: k
3067
- });
3068
- }
3069
- return (k, y) => {
3070
- const i = fe("FmButton"), b = fe("FmSideSheet");
3071
- return W(), j(de, null, [Qe(k.$slots, "default", {
3072
- trigger: s
3073
- }), Q(b, {
3074
- modelValue: a.value,
3075
- "onUpdate:modelValue": y[3] || (y[3] = (N) => a.value = N),
3076
- "max-width": 760,
3077
- "close-button": !1,
3078
- "is-container": Y(qn).FmForm,
3079
- "is-container-props": {
3080
- onValidationSuccess: L,
3081
- blameFormChildOnValidationFailed: !0
3082
- }
3083
- }, {
3084
- "side-sheet-header": ae(() => [V("div", vs, [Q(i, {
3085
- variant: Y(Fe).Tertiary,
3086
- "prepend-icon": "arrow_back",
3087
- onClick: y[0] || (y[0] = se((N) => s(), ["stop"]))
3088
- }, null, 8, ["variant"]), k.isEditMode && g.value.length > 0 ? (W(), j("div", ys, Z(Y(r)("menu.rule_groups.condition_view.edit_condition")), 1)) : (W(), j("div", bs, Z(Y(r)("menu.rule_groups.condition_view.add_condition")), 1))])]),
3089
- "side-sheet-footer": ae(() => [V("div", hs, [Q(i, {
3090
- variant: "primary",
3091
- label: Y(r)("common.save"),
3092
- type: "submit"
3093
- }, null, 8, ["label"]), Q(i, {
3094
- variant: "secondary",
3095
- label: Y(r)("common.cancel"),
3096
- onClick: y[2] || (y[2] = se((N) => s(!1), ["stop"]))
3097
- }, null, 8, ["label"])])]),
3098
- default: ae(() => [Q(_s, {
3099
- class: "p-16",
3100
- "model-value": k.modelValue,
3101
- "onUpdate:modelValue": y[1] || (y[1] = (N) => {
3102
- p.value = N;
3103
- })
3104
- }, null, 8, ["model-value"])]),
3105
- _: 1
3106
- }, 8, ["modelValue", "is-container", "is-container-props"])], 64);
3107
- };
3108
- }
3109
- }), ks = {
3110
- class: "flex items-center justify-between pb-8"
3111
- }, Is = {
3112
- key: 0,
3113
- class: "text-fm-color-neutral-gray-300"
3114
- }, Ns = {
3115
- class: "flex gap-8"
3116
- }, Rs = {
3117
- class: "flex flex-col space-y-8"
3118
- }, As = {
3119
- class: "fm-typo-en-body-lg-600"
3120
- }, Ls = {
3121
- class: "flex items-center space-x-8"
3122
- }, Os = {
3123
- class: "w-24"
3124
- }, Cs = {
3125
- class: "flex break-all fm-typo-en-body-lg-400 line-clamp-1 space-x-8"
3126
- }, Ss = {
3127
- class: "px-8"
3128
- }, Ds = {
3129
- key: 0,
3130
- class: "flex flex-col space-y-8"
3131
- }, Ps = {
3132
- class: "fm-typo-en-body-lg-600"
3133
- }, ws = {
3134
- class: "flex w-full fm-typo-en-body-lg-400 space-x-8 overflow-hidden"
3135
- }, Fs = {
3136
- class: "whitespace-nowrap"
3137
- }, Xs = /* @__PURE__ */ ie({
3138
- __name: "RuleView",
3139
- props: {
3140
- modelValue: {
3141
- type: Object,
3142
- required: !0
3143
- },
3144
- title: {
3145
- type: String,
3146
- required: !1
3147
- },
3148
- isCatalogLinkItemRuleView: {
3149
- type: Boolean,
3150
- required: !1,
3151
- default: !1
3152
- },
3153
- ruleGroupNames: {
3154
- type: Array,
3155
- required: !1
3156
- },
3157
- orderFrom: {
3158
- type: String,
3159
- required: !1
3160
- }
3161
- },
3162
- emits: ["update:model-value", "delete-rule", "open-catalog-link-item-rule-form"],
3163
- setup(e, {
3164
- emit: t
3165
- }) {
3166
- const {
3167
- t: n
3168
- } = xe(), r = e, a = {
3169
- [yt.F_ORDER_FROM.Enum.ALL]: "ALL",
3170
- [yt.F_ORDER_FROM.Enum.POS_ONLY]: "POS ONLY",
3171
- [yt.F_ORDER_FROM.Enum.NONE]: "NONE"
3172
- }, s = t, u = oe(), _ = x(() => {
3173
- var g, p;
3174
- return ((p = (g = r.modelValue.restaurantRule) == null ? void 0 : g.restaurantAttributes) == null ? void 0 : p.rules) ?? [];
3175
- }), c = x(() => {
3176
- var g, p;
3177
- return ((p = (g = r.modelValue.restaurantRule) == null ? void 0 : g.restaurantCustomAttributes) == null ? void 0 : p.rules) ?? [];
3178
- }), E = x(() => {
3179
- var g, p;
3180
- return ((p = (g = r.modelValue.itemRule) == null ? void 0 : g.itemAttributes) == null ? void 0 : p.rules) ?? [];
3181
- }), T = x(() => {
3182
- var g, p;
3183
- return ((p = (g = r.modelValue.itemRule) == null ? void 0 : g.itemCustomAttributes) == null ? void 0 : p.rules) ?? [];
3184
- }), R = x(() => [..._.value.map((g) => ({
3185
- ...g,
3186
- property: `${n("menu.catalog.usage.restaurant")} ${g.property}`
3187
- })), ...c.value.map((g) => ({
3188
- ...g,
3189
- property: `${n("menu.catalog.usage.restaurant")} ${g.property}`
3190
- })), ...E.value.map((g) => ({
3191
- ...g,
3192
- property: `${n("menu.product.title")} ${g.property}`
3193
- })), ...T.value.map((g) => ({
3194
- ...g,
3195
- property: `${n("menu.product.title")} ${g.property}`
3196
- }))]);
3197
- return (g, p) => {
3198
- const L = fe("FmButton"), k = fe("FmMenu");
3199
- return W(), j(de, null, [V("div", ks, [e.title ? (W(), j("p", Is, Z(e.title), 1)) : we("", !0), V("div", Ns, [e.isCatalogLinkItemRuleView ? (W(), xt(L, {
3200
- key: 1,
3201
- variant: Y(Fe).Tertiary,
3202
- class: "cursor-pointer",
3203
- "prepend-icon": "edit",
3204
- "text-color": " text-fm-color-primary",
3205
- onClick: p[1] || (p[1] = se((y) => e.isCatalogLinkItemRuleView ? g.$emit("open-catalog-link-item-rule-form") : null, ["stop"]))
3206
- }, null, 8, ["variant"])) : (W(), xt(Ts, {
3207
- key: 0,
3208
- ref_key: "ruleFormRef",
3209
- ref: u,
3210
- "model-value": r.modelValue,
3211
- "is-edit-mode": !0,
3212
- "onUpdate:modelValue": p[0] || (p[0] = (y) => {
3213
- s("update:model-value", y);
3214
- })
3215
- }, {
3216
- default: ae(({
3217
- trigger: y
3218
- }) => [Q(L, {
3219
- variant: Y(Fe).Tertiary,
3220
- class: "cursor-pointer",
3221
- "prepend-icon": "edit",
3222
- "text-color": " text-fm-color-primary",
3223
- onClick: se((i) => y(), ["stop"])
3224
- }, null, 8, ["variant", "onClick"])]),
3225
- _: 1
3226
- }, 8, ["model-value"])), Q(L, {
3227
- variant: Y(Fe).Tertiary,
3228
- class: "cursor-pointer",
3229
- "prepend-icon": "delete",
3230
- "text-color": " text-fm-color-typo-error",
3231
- onClick: p[2] || (p[2] = se(() => s("delete-rule", r.modelValue._id), ["stop"]))
3232
- }, null, 8, ["variant"])])]), V("div", Rs, [V("p", As, Z(Y(n)("menu.rule_groups.condition_view.when")), 1), e.ruleGroupNames ? (W(!0), j(de, {
3233
- key: 0
3234
- }, Me(e.ruleGroupNames, (y, i) => (W(), j("div", {
3235
- key: y
3236
- }, [V("div", Ls, [V("p", Os, Z(i + 1) + ".", 1), V("div", Cs, [V("p", null, Z(Y(n)("menu.rule_groups.condition_view.in_rule_group")), 1), Q(k, {
3237
- trigger: "hover",
3238
- closeOnMouseLeave: ""
3239
- }, {
3240
- "menu-button": ae(() => [V("p", {
3241
- ref_for: !0,
3242
- ref: "valueTextRef",
3243
- onClick: p[3] || (p[3] = se((b) => e.isCatalogLinkItemRuleView ? g.$emit("open-catalog-link-item-rule-form") : null, ["stop"])),
3244
- class: "text-fm-color-primary underline underline-offset-2 cursor-pointer truncate"
3245
- }, Z(y), 513)]),
3246
- default: ae(() => [V("p", Ss, Z(y), 1)]),
3247
- _: 2
3248
- }, 1024)])])]))), 128)) : we("", !0), (W(!0), j(de, null, Me(R.value, (y, i) => {
3249
- var b;
3250
- return W(), j("div", {
3251
- key: y.property
3252
- }, [Q(Es, {
3253
- number: i + (((b = e.ruleGroupNames) == null ? void 0 : b.length) ?? 0) + 1,
3254
- property: y.property,
3255
- operator: y.operator,
3256
- value: y.value,
3257
- isCatalogLinkItemRuleView: e.isCatalogLinkItemRuleView,
3258
- onOpenCatalogLinkItemRuleForm: p[4] || (p[4] = (N) => g.$emit("open-catalog-link-item-rule-form")),
3259
- onOpenRuleConditionForm: p[5] || (p[5] = (N) => {
3260
- var f;
3261
- return (f = u.value) == null ? void 0 : f.trigger();
3262
- })
3263
- }, null, 8, ["number", "property", "operator", "value", "isCatalogLinkItemRuleView"])]);
3264
- }), 128))]), e.orderFrom ? (W(), j("div", Ds, [V("p", Ps, Z(Y(n)("menu.rule_groups.condition_view.then")), 1), V("div", ws, [V("p", Fs, Z(Y(n)("menu.rule_groups.condition_view.product_availability")), 1), p[7] || (p[7] = V("p", {
3265
- class: "fm-typo-en-body-lg-600 text-fm-color-neutral-gray-300"
3266
- }, "is", -1)), V("p", {
3267
- class: "text-fm-color-primary underline underline-offset-2 cursor-pointer truncate",
3268
- onClick: p[6] || (p[6] = se((y) => e.isCatalogLinkItemRuleView ? g.$emit("open-catalog-link-item-rule-form") : null, ["stop"]))
3269
- }, Z(a[e.orderFrom]), 1)])])) : we("", !0)], 64);
3270
- };
3271
- }
3272
- });
3273
- export {
3274
- Bs as _,
3275
- Jn as a,
3276
- Xs as b,
3277
- Ts as c,
3278
- Ws as d,
3279
- xe as e,
3280
- Ys as f,
3281
- Es as g,
3282
- _s as h,
3283
- js as m,
3284
- Ks as u
3285
- };