@feedmepos/mf-menu 0.32.73 → 0.32.74-dev.2

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