@feedmepos/mf-hrm-portal 2.0.25 → 2.1.0-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 (63) hide show
  1. package/dist/AuditLogList-AGlAsWwd.js +1608 -0
  2. package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-BYHKFwRm.js +383 -0
  3. package/dist/EmployeeList-KvjoGI87.js +884 -0
  4. package/dist/{Main-C6YMg19H.js → Main-BLh16xRg.js} +187 -184
  5. package/dist/{Main-DQg87aB2.js → Main-D3TSdtSE.js} +7 -7
  6. package/dist/{Main-CyqPnLTe.js → Main-Dn1TfDRj.js} +1033 -1029
  7. package/dist/PermissionSetList-Ds69m9UU.js +392 -0
  8. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bk6ub3Dv.js +4030 -0
  9. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-DWeS7VXx.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BHxCP_uW.js} +1 -1
  10. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +42 -0
  11. package/dist/RoleList-v8McRCnz.js +684 -0
  12. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
  13. package/dist/{index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js → TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js} +54 -20
  14. package/dist/TeamMemberList-BYQnNIhT.js +1169 -0
  15. package/dist/{TimesheetList-DzeE73Ns.js → TimesheetList-C1OWa6kf.js} +139 -133
  16. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-CTQs7MIl.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CLu9gzzi.js} +2 -2
  17. package/dist/{app-Df4eEEIU.js → app-CJouCBgi.js} +5248 -2273
  18. package/dist/app.js +1 -1
  19. package/dist/{dayjs.min-DmGoh5hw.js → dayjs.min-DUugkgDM.js} +1 -1
  20. package/dist/{employee-zWTRoOkw.js → employee-D5rEVmge.js} +3 -3
  21. package/dist/{iteration-DTV3udF0.js → iteration-QRRNYlps.js} +3 -3
  22. package/dist/{lodash-LInzVEDS.js → lodash-BlZhpHhM.js} +1 -1
  23. package/dist/rule-Dy7eMChN.js +1053 -0
  24. package/dist/src/api/audit-log/index.d.ts +6 -0
  25. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  26. package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +7 -1
  27. package/dist/src/components/table/EmptyDataTemplate/index.vue.d.ts +4 -1
  28. package/dist/src/components/table/TableEmptyState.vue.d.ts +31 -0
  29. package/dist/src/composables/useBasePermission.d.ts +1 -0
  30. package/dist/src/composables/useConditionDraft.d.ts +40 -0
  31. package/dist/src/composables/useCoverConditionOverride.d.ts +61 -0
  32. package/dist/src/helpers/business-timezone.d.ts +22 -0
  33. package/dist/src/helpers/permission-set.d.ts +4 -2
  34. package/dist/src/helpers/rule.d.ts +2 -1
  35. package/dist/src/stores/permission-set.d.ts +12 -3
  36. package/dist/src/types/audit-log.d.ts +1 -1
  37. package/dist/src/views/audit-log/event-line.d.ts +13 -0
  38. package/dist/src/views/audit-log/locales/index.d.ts +296 -0
  39. package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
  40. package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +1 -0
  41. package/dist/src/views/team/components/BasePermission.vue.d.ts +13 -0
  42. package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +22 -0
  43. package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +23 -0
  44. package/dist/src/views/team/condition-builders/component-map.d.ts +4 -0
  45. package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +23 -0
  46. package/dist/src/views/team/locales/index.d.ts +68 -0
  47. package/dist/style.css +1 -1
  48. package/dist/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/{useAppStore-BlQSL2ZO.js → useAppStore-CtMoad7V.js} +1 -1
  50. package/dist/useDebounce-B8ZPVS5C.js +15 -0
  51. package/dist/{useLoading-NkUvAr71.js → useLoading-CNqlchYO.js} +1 -1
  52. package/dist/{useReportPermissions-R-eg1L2r.js → useReportPermissions-C5wGC9bf.js} +3 -3
  53. package/package.json +2 -2
  54. package/dist/AuditLogList-BWwgm5wH.js +0 -1145
  55. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
  56. package/dist/EmployeeList-aRGYYmxf.js +0 -851
  57. package/dist/PermissionSetList-BfKgFFUh.js +0 -356
  58. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CNEAlTnY.js +0 -3457
  59. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
  60. package/dist/RoleList-CtcVwAPE.js +0 -566
  61. package/dist/TeamMemberList-DU1jYeql.js +0 -1130
  62. package/dist/rule-O-E9JWJz.js +0 -995
  63. package/dist/useDebounce-CWb5QR9G.js +0 -28
@@ -0,0 +1,4030 @@
1
+ import { getCurrentInstance as Xt, inject as as, ref as dt, shallowRef as ls, computed as z, watch as wt, onMounted as jn, onUnmounted as os, defineComponent as we, h as Un, createVNode as ie, Text as is, Fragment as Oe, resolveComponent as Me, createBlock as Ae, openBlock as J, withCtx as de, createElementVNode as se, createElementBlock as ae, toDisplayString as ke, unref as X, renderList as ye, toRef as tn, normalizeStyle as Je, renderSlot as Re, createCommentVNode as Le, createTextVNode as cs, useSlots as us, normalizeClass as at, createSlots as $e, mergeModels as nn, useModel as ds } from "vue";
2
+ import { useI18n as qe, useCoreStore as ms } from "@feedmepos/mf-common";
3
+ import { useDialog as fs, useBreakpoints as _s } from "@feedmepos/ui-library";
4
+ import "@vue/devtools-api";
5
+ import { p as Vn, i as ps, P as bs, x as Ot, l as vs, k as hs, N as Rt } from "./rule-Dy7eMChN.js";
6
+ import { _ as Ht, u as gs, a as sn } from "./ConditionFormHost.vue_vue_type_script_setup_true_lang-BYHKFwRm.js";
7
+ import { u as Is, v as ys, S as Ft, d as fe, A as Pt, k as rn, b as Es, P as Lt } from "./app-CJouCBgi.js";
8
+ import { d as gt, g as Ns, b as ks } from "./iteration-QRRNYlps.js";
9
+ import { u as Ts } from "./useAppStore-CtMoad7V.js";
10
+ function xn(e, t) {
11
+ return Array.isArray(e) ? e.includes(t) : e === t;
12
+ }
13
+ function Cs(e) {
14
+ return Array.isArray(e) ? e[0] : e;
15
+ }
16
+ function Os(e, t) {
17
+ const n = t.find((o) => xn(o.subject, e));
18
+ if (!(n != null && n.category) || n.isCategoryCover) return;
19
+ const s = t.find((o) => o.category === n.category && o.isCategoryCover);
20
+ if (s)
21
+ return Cs(s.subject);
22
+ }
23
+ function an(e, t) {
24
+ const n = t.find((s) => xn(s.subject, e));
25
+ return !!(n != null && n.isCategoryCover);
26
+ }
27
+ /*!
28
+ * shared v10.0.5
29
+ * (c) 2024 kazuya kawaguchi
30
+ * Released under the MIT License.
31
+ */
32
+ const ln = typeof window < "u", Ze = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Rs = (e, t, n) => Ls({ l: e, k: t, s: n }), Ls = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), ve = (e) => typeof e == "number" && isFinite(e), Ss = (e) => $t(e) === "[object Date]", yt = (e) => $t(e) === "[object RegExp]", Nt = (e) => q(e) && Object.keys(e).length === 0, he = Object.assign, As = Object.create, re = (e = null) => As(e);
33
+ let on;
34
+ const Ye = () => on || (on = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : re());
35
+ function cn(e) {
36
+ return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
37
+ }
38
+ const Ds = Object.prototype.hasOwnProperty;
39
+ function Se(e, t) {
40
+ return Ds.call(e, t);
41
+ }
42
+ const _e = Array.isArray, le = (e) => typeof e == "function", W = (e) => typeof e == "string", ue = (e) => typeof e == "boolean", ee = (e) => e !== null && typeof e == "object", Ms = (e) => ee(e) && le(e.then) && le(e.catch), Gn = Object.prototype.toString, $t = (e) => Gn.call(e), q = (e) => $t(e) === "[object Object]", ws = (e) => e == null ? "" : _e(e) || q(e) && e.toString === Gn ? JSON.stringify(e, null, 2) : String(e);
43
+ function Jt(e, t = "") {
44
+ return e.reduce((n, s, o) => o === 0 ? n + s : n + t + s, "");
45
+ }
46
+ function Fs(e, t) {
47
+ typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
48
+ }
49
+ const mt = (e) => !ee(e) || _e(e);
50
+ function It(e, t) {
51
+ if (mt(e) || mt(t))
52
+ throw new Error("Invalid value");
53
+ const n = [{ src: e, des: t }];
54
+ for (; n.length; ) {
55
+ const { src: s, des: o } = n.pop();
56
+ Object.keys(s).forEach((l) => {
57
+ l !== "__proto__" && (ee(s[l]) && !ee(o[l]) && (o[l] = Array.isArray(s[l]) ? [] : re()), mt(o[l]) || mt(s[l]) ? o[l] = s[l] : n.push({ src: s[l], des: o[l] }));
58
+ });
59
+ }
60
+ }
61
+ function Ps(e, t, n) {
62
+ return { line: e, column: t, offset: n };
63
+ }
64
+ function jt(e, t, n) {
65
+ return { start: e, end: t };
66
+ }
67
+ const ne = {
68
+ // tokenizer error codes
69
+ EXPECTED_TOKEN: 1,
70
+ INVALID_TOKEN_IN_PLACEHOLDER: 2,
71
+ UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
72
+ UNKNOWN_ESCAPE_SEQUENCE: 4,
73
+ INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
74
+ UNBALANCED_CLOSING_BRACE: 6,
75
+ UNTERMINATED_CLOSING_BRACE: 7,
76
+ EMPTY_PLACEHOLDER: 8,
77
+ NOT_ALLOW_NEST_PLACEHOLDER: 9,
78
+ INVALID_LINKED_FORMAT: 10,
79
+ // parser error codes
80
+ MUST_HAVE_MESSAGES_IN_PLURAL: 11,
81
+ UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
82
+ UNEXPECTED_EMPTY_LINKED_KEY: 13,
83
+ UNEXPECTED_LEXICAL_ANALYSIS: 14
84
+ }, js = 17;
85
+ function kt(e, t, n = {}) {
86
+ const { domain: s, messages: o, args: l } = n, c = e, m = new SyntaxError(String(c));
87
+ return m.code = e, t && (m.location = t), m.domain = s, m;
88
+ }
89
+ function Us(e) {
90
+ throw e;
91
+ }
92
+ const Fe = " ", Vs = "\r", Ie = `
93
+ `, xs = "\u2028", Gs = "\u2029";
94
+ function Ws(e) {
95
+ const t = e;
96
+ let n = 0, s = 1, o = 1, l = 0;
97
+ const c = (b) => t[b] === Vs && t[b + 1] === Ie, m = (b) => t[b] === Ie, v = (b) => t[b] === Gs, I = (b) => t[b] === xs, O = (b) => c(b) || m(b) || v(b) || I(b), L = () => n, R = () => s, U = () => o, B = () => l, M = (b) => c(b) || v(b) || I(b) ? Ie : t[b], P = () => M(n), u = () => M(n + l);
98
+ function p() {
99
+ return l = 0, O(n) && (s++, o = 0), c(n) && n++, n++, o++, t[n];
100
+ }
101
+ function S() {
102
+ return c(n + l) && l++, l++, t[n + l];
103
+ }
104
+ function i() {
105
+ n = 0, s = 1, o = 1, l = 0;
106
+ }
107
+ function g(b = 0) {
108
+ l = b;
109
+ }
110
+ function y() {
111
+ const b = n + l;
112
+ for (; b !== n; )
113
+ p();
114
+ l = 0;
115
+ }
116
+ return {
117
+ index: L,
118
+ line: R,
119
+ column: U,
120
+ peekOffset: B,
121
+ charAt: M,
122
+ currentChar: P,
123
+ currentPeek: u,
124
+ next: p,
125
+ peek: S,
126
+ reset: i,
127
+ resetPeek: g,
128
+ skipToPeek: y
129
+ };
130
+ }
131
+ const Ve = void 0, Ys = ".", un = "'", Zs = "tokenizer";
132
+ function Bs(e, t = {}) {
133
+ const n = t.location !== !1, s = Ws(e), o = () => s.index(), l = () => Ps(s.line(), s.column(), s.index()), c = l(), m = o(), v = {
134
+ currentType: 13,
135
+ offset: m,
136
+ startLoc: c,
137
+ endLoc: c,
138
+ lastType: 13,
139
+ lastOffset: m,
140
+ lastStartLoc: c,
141
+ lastEndLoc: c,
142
+ braceNest: 0,
143
+ inLinked: !1,
144
+ text: ""
145
+ }, I = () => v, { onError: O } = t;
146
+ function L(r, a, d, ...F) {
147
+ const D = I();
148
+ if (a.column += d, a.offset += d, O) {
149
+ const x = n ? jt(D.startLoc, a) : null, _ = kt(r, x, {
150
+ domain: Zs,
151
+ args: F
152
+ });
153
+ O(_);
154
+ }
155
+ }
156
+ function R(r, a, d) {
157
+ r.endLoc = l(), r.currentType = a;
158
+ const F = { type: a };
159
+ return n && (F.loc = jt(r.startLoc, r.endLoc)), d != null && (F.value = d), F;
160
+ }
161
+ const U = (r) => R(
162
+ r,
163
+ 13
164
+ /* TokenTypes.EOF */
165
+ );
166
+ function B(r, a) {
167
+ return r.currentChar() === a ? (r.next(), a) : (L(ne.EXPECTED_TOKEN, l(), 0, a), "");
168
+ }
169
+ function M(r) {
170
+ let a = "";
171
+ for (; r.currentPeek() === Fe || r.currentPeek() === Ie; )
172
+ a += r.currentPeek(), r.peek();
173
+ return a;
174
+ }
175
+ function P(r) {
176
+ const a = M(r);
177
+ return r.skipToPeek(), a;
178
+ }
179
+ function u(r) {
180
+ if (r === Ve)
181
+ return !1;
182
+ const a = r.charCodeAt(0);
183
+ return a >= 97 && a <= 122 || // a-z
184
+ a >= 65 && a <= 90 || // A-Z
185
+ a === 95;
186
+ }
187
+ function p(r) {
188
+ if (r === Ve)
189
+ return !1;
190
+ const a = r.charCodeAt(0);
191
+ return a >= 48 && a <= 57;
192
+ }
193
+ function S(r, a) {
194
+ const { currentType: d } = a;
195
+ if (d !== 2)
196
+ return !1;
197
+ M(r);
198
+ const F = u(r.currentPeek());
199
+ return r.resetPeek(), F;
200
+ }
201
+ function i(r, a) {
202
+ const { currentType: d } = a;
203
+ if (d !== 2)
204
+ return !1;
205
+ M(r);
206
+ const F = r.currentPeek() === "-" ? r.peek() : r.currentPeek(), D = p(F);
207
+ return r.resetPeek(), D;
208
+ }
209
+ function g(r, a) {
210
+ const { currentType: d } = a;
211
+ if (d !== 2)
212
+ return !1;
213
+ M(r);
214
+ const F = r.currentPeek() === un;
215
+ return r.resetPeek(), F;
216
+ }
217
+ function y(r, a) {
218
+ const { currentType: d } = a;
219
+ if (d !== 7)
220
+ return !1;
221
+ M(r);
222
+ const F = r.currentPeek() === ".";
223
+ return r.resetPeek(), F;
224
+ }
225
+ function b(r, a) {
226
+ const { currentType: d } = a;
227
+ if (d !== 8)
228
+ return !1;
229
+ M(r);
230
+ const F = u(r.currentPeek());
231
+ return r.resetPeek(), F;
232
+ }
233
+ function w(r, a) {
234
+ const { currentType: d } = a;
235
+ if (!(d === 7 || d === 11))
236
+ return !1;
237
+ M(r);
238
+ const F = r.currentPeek() === ":";
239
+ return r.resetPeek(), F;
240
+ }
241
+ function f(r, a) {
242
+ const { currentType: d } = a;
243
+ if (d !== 9)
244
+ return !1;
245
+ const F = () => {
246
+ const x = r.currentPeek();
247
+ return x === "{" ? u(r.peek()) : x === "@" || x === "|" || x === ":" || x === "." || x === Fe || !x ? !1 : x === Ie ? (r.peek(), F()) : E(r, !1);
248
+ }, D = F();
249
+ return r.resetPeek(), D;
250
+ }
251
+ function T(r) {
252
+ M(r);
253
+ const a = r.currentPeek() === "|";
254
+ return r.resetPeek(), a;
255
+ }
256
+ function E(r, a = !0) {
257
+ const d = (D = !1, x = "") => {
258
+ const _ = r.currentPeek();
259
+ return _ === "{" || _ === "@" || !_ ? D : _ === "|" ? !(x === Fe || x === Ie) : _ === Fe ? (r.peek(), d(!0, Fe)) : _ === Ie ? (r.peek(), d(!0, Ie)) : !0;
260
+ }, F = d();
261
+ return a && r.resetPeek(), F;
262
+ }
263
+ function h(r, a) {
264
+ const d = r.currentChar();
265
+ return d === Ve ? Ve : a(d) ? (r.next(), d) : null;
266
+ }
267
+ function Z(r) {
268
+ const a = r.charCodeAt(0);
269
+ return a >= 97 && a <= 122 || // a-z
270
+ a >= 65 && a <= 90 || // A-Z
271
+ a >= 48 && a <= 57 || // 0-9
272
+ a === 95 || // _
273
+ a === 36;
274
+ }
275
+ function H(r) {
276
+ return h(r, Z);
277
+ }
278
+ function Y(r) {
279
+ const a = r.charCodeAt(0);
280
+ return a >= 97 && a <= 122 || // a-z
281
+ a >= 65 && a <= 90 || // A-Z
282
+ a >= 48 && a <= 57 || // 0-9
283
+ a === 95 || // _
284
+ a === 36 || // $
285
+ a === 45;
286
+ }
287
+ function V(r) {
288
+ return h(r, Y);
289
+ }
290
+ function j(r) {
291
+ const a = r.charCodeAt(0);
292
+ return a >= 48 && a <= 57;
293
+ }
294
+ function $(r) {
295
+ return h(r, j);
296
+ }
297
+ function te(r) {
298
+ const a = r.charCodeAt(0);
299
+ return a >= 48 && a <= 57 || // 0-9
300
+ a >= 65 && a <= 70 || // A-F
301
+ a >= 97 && a <= 102;
302
+ }
303
+ function me(r) {
304
+ return h(r, te);
305
+ }
306
+ function pe(r) {
307
+ let a = "", d = "";
308
+ for (; a = $(r); )
309
+ d += a;
310
+ return d;
311
+ }
312
+ function Ne(r) {
313
+ let a = "";
314
+ for (; ; ) {
315
+ const d = r.currentChar();
316
+ if (d === "{" || d === "}" || d === "@" || d === "|" || !d)
317
+ break;
318
+ if (d === Fe || d === Ie)
319
+ if (E(r))
320
+ a += d, r.next();
321
+ else {
322
+ if (T(r))
323
+ break;
324
+ a += d, r.next();
325
+ }
326
+ else
327
+ a += d, r.next();
328
+ }
329
+ return a;
330
+ }
331
+ function be(r) {
332
+ P(r);
333
+ let a = "", d = "";
334
+ for (; a = V(r); )
335
+ d += a;
336
+ return r.currentChar() === Ve && L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), d;
337
+ }
338
+ function ge(r) {
339
+ P(r);
340
+ let a = "";
341
+ return r.currentChar() === "-" ? (r.next(), a += `-${pe(r)}`) : a += pe(r), r.currentChar() === Ve && L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), a;
342
+ }
343
+ function ce(r) {
344
+ return r !== un && r !== Ie;
345
+ }
346
+ function K(r) {
347
+ P(r), B(r, "'");
348
+ let a = "", d = "";
349
+ for (; a = h(r, ce); )
350
+ a === "\\" ? d += oe(r) : d += a;
351
+ const F = r.currentChar();
352
+ return F === Ie || F === Ve ? (L(ne.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, l(), 0), F === Ie && (r.next(), B(r, "'")), d) : (B(r, "'"), d);
353
+ }
354
+ function oe(r) {
355
+ const a = r.currentChar();
356
+ switch (a) {
357
+ case "\\":
358
+ case "'":
359
+ return r.next(), `\\${a}`;
360
+ case "u":
361
+ return We(r, a, 4);
362
+ case "U":
363
+ return We(r, a, 6);
364
+ default:
365
+ return L(ne.UNKNOWN_ESCAPE_SEQUENCE, l(), 0, a), "";
366
+ }
367
+ }
368
+ function We(r, a, d) {
369
+ B(r, a);
370
+ let F = "";
371
+ for (let D = 0; D < d; D++) {
372
+ const x = me(r);
373
+ if (!x) {
374
+ L(ne.INVALID_UNICODE_ESCAPE_SEQUENCE, l(), 0, `\\${a}${F}${r.currentChar()}`);
375
+ break;
376
+ }
377
+ F += x;
378
+ }
379
+ return `\\${a}${F}`;
380
+ }
381
+ function et(r) {
382
+ return r !== "{" && r !== "}" && r !== Fe && r !== Ie;
383
+ }
384
+ function tt(r) {
385
+ P(r);
386
+ let a = "", d = "";
387
+ for (; a = h(r, et); )
388
+ d += a;
389
+ return d;
390
+ }
391
+ function nt(r) {
392
+ let a = "", d = "";
393
+ for (; a = H(r); )
394
+ d += a;
395
+ return d;
396
+ }
397
+ function st(r) {
398
+ const a = (d) => {
399
+ const F = r.currentChar();
400
+ return F === "{" || F === "@" || F === "|" || F === "(" || F === ")" || !F || F === Fe ? d : (d += F, r.next(), a(d));
401
+ };
402
+ return a("");
403
+ }
404
+ function Ce(r) {
405
+ P(r);
406
+ const a = B(
407
+ r,
408
+ "|"
409
+ /* TokenChars.Pipe */
410
+ );
411
+ return P(r), a;
412
+ }
413
+ function Ue(r, a) {
414
+ let d = null;
415
+ switch (r.currentChar()) {
416
+ case "{":
417
+ return a.braceNest >= 1 && L(ne.NOT_ALLOW_NEST_PLACEHOLDER, l(), 0), r.next(), d = R(
418
+ a,
419
+ 2,
420
+ "{"
421
+ /* TokenChars.BraceLeft */
422
+ ), P(r), a.braceNest++, d;
423
+ case "}":
424
+ return a.braceNest > 0 && a.currentType === 2 && L(ne.EMPTY_PLACEHOLDER, l(), 0), r.next(), d = R(
425
+ a,
426
+ 3,
427
+ "}"
428
+ /* TokenChars.BraceRight */
429
+ ), a.braceNest--, a.braceNest > 0 && P(r), a.inLinked && a.braceNest === 0 && (a.inLinked = !1), d;
430
+ case "@":
431
+ return a.braceNest > 0 && L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), d = k(r, a) || U(a), a.braceNest = 0, d;
432
+ default: {
433
+ let D = !0, x = !0, _ = !0;
434
+ if (T(r))
435
+ return a.braceNest > 0 && L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), d = R(a, 1, Ce(r)), a.braceNest = 0, a.inLinked = !1, d;
436
+ if (a.braceNest > 0 && (a.currentType === 4 || a.currentType === 5 || a.currentType === 6))
437
+ return L(ne.UNTERMINATED_CLOSING_BRACE, l(), 0), a.braceNest = 0, N(r, a);
438
+ if (D = S(r, a))
439
+ return d = R(a, 4, be(r)), P(r), d;
440
+ if (x = i(r, a))
441
+ return d = R(a, 5, ge(r)), P(r), d;
442
+ if (_ = g(r, a))
443
+ return d = R(a, 6, K(r)), P(r), d;
444
+ if (!D && !x && !_)
445
+ return d = R(a, 12, tt(r)), L(ne.INVALID_TOKEN_IN_PLACEHOLDER, l(), 0, d.value), P(r), d;
446
+ break;
447
+ }
448
+ }
449
+ return d;
450
+ }
451
+ function k(r, a) {
452
+ const { currentType: d } = a;
453
+ let F = null;
454
+ const D = r.currentChar();
455
+ switch ((d === 7 || d === 8 || d === 11 || d === 9) && (D === Ie || D === Fe) && L(ne.INVALID_LINKED_FORMAT, l(), 0), D) {
456
+ case "@":
457
+ return r.next(), F = R(
458
+ a,
459
+ 7,
460
+ "@"
461
+ /* TokenChars.LinkedAlias */
462
+ ), a.inLinked = !0, F;
463
+ case ".":
464
+ return P(r), r.next(), R(
465
+ a,
466
+ 8,
467
+ "."
468
+ /* TokenChars.LinkedDot */
469
+ );
470
+ case ":":
471
+ return P(r), r.next(), R(
472
+ a,
473
+ 9,
474
+ ":"
475
+ /* TokenChars.LinkedDelimiter */
476
+ );
477
+ default:
478
+ return T(r) ? (F = R(a, 1, Ce(r)), a.braceNest = 0, a.inLinked = !1, F) : y(r, a) || w(r, a) ? (P(r), k(r, a)) : b(r, a) ? (P(r), R(a, 11, nt(r))) : f(r, a) ? (P(r), D === "{" ? Ue(r, a) || F : R(a, 10, st(r))) : (d === 7 && L(ne.INVALID_LINKED_FORMAT, l(), 0), a.braceNest = 0, a.inLinked = !1, N(r, a));
479
+ }
480
+ }
481
+ function N(r, a) {
482
+ let d = {
483
+ type: 13
484
+ /* TokenTypes.EOF */
485
+ };
486
+ if (a.braceNest > 0)
487
+ return Ue(r, a) || U(a);
488
+ if (a.inLinked)
489
+ return k(r, a) || U(a);
490
+ switch (r.currentChar()) {
491
+ case "{":
492
+ return Ue(r, a) || U(a);
493
+ case "}":
494
+ return L(ne.UNBALANCED_CLOSING_BRACE, l(), 0), r.next(), R(
495
+ a,
496
+ 3,
497
+ "}"
498
+ /* TokenChars.BraceRight */
499
+ );
500
+ case "@":
501
+ return k(r, a) || U(a);
502
+ default: {
503
+ if (T(r))
504
+ return d = R(a, 1, Ce(r)), a.braceNest = 0, a.inLinked = !1, d;
505
+ if (E(r))
506
+ return R(a, 0, Ne(r));
507
+ break;
508
+ }
509
+ }
510
+ return d;
511
+ }
512
+ function A() {
513
+ const { currentType: r, offset: a, startLoc: d, endLoc: F } = v;
514
+ return v.lastType = r, v.lastOffset = a, v.lastStartLoc = d, v.lastEndLoc = F, v.offset = o(), v.startLoc = l(), s.currentChar() === Ve ? R(
515
+ v,
516
+ 13
517
+ /* TokenTypes.EOF */
518
+ ) : N(s, v);
519
+ }
520
+ return {
521
+ nextToken: A,
522
+ currentOffset: o,
523
+ currentPosition: l,
524
+ context: I
525
+ };
526
+ }
527
+ const Xs = "parser", Hs = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
528
+ function $s(e, t, n) {
529
+ switch (e) {
530
+ case "\\\\":
531
+ return "\\";
532
+ case "\\'":
533
+ return "'";
534
+ default: {
535
+ const s = parseInt(t || n, 16);
536
+ return s <= 55295 || s >= 57344 ? String.fromCodePoint(s) : "�";
537
+ }
538
+ }
539
+ }
540
+ function Js(e = {}) {
541
+ const t = e.location !== !1, { onError: n } = e;
542
+ function s(u, p, S, i, ...g) {
543
+ const y = u.currentPosition();
544
+ if (y.offset += i, y.column += i, n) {
545
+ const b = t ? jt(S, y) : null, w = kt(p, b, {
546
+ domain: Xs,
547
+ args: g
548
+ });
549
+ n(w);
550
+ }
551
+ }
552
+ function o(u, p, S) {
553
+ const i = { type: u };
554
+ return t && (i.start = p, i.end = p, i.loc = { start: S, end: S }), i;
555
+ }
556
+ function l(u, p, S, i) {
557
+ t && (u.end = p, u.loc && (u.loc.end = S));
558
+ }
559
+ function c(u, p) {
560
+ const S = u.context(), i = o(3, S.offset, S.startLoc);
561
+ return i.value = p, l(i, u.currentOffset(), u.currentPosition()), i;
562
+ }
563
+ function m(u, p) {
564
+ const S = u.context(), { lastOffset: i, lastStartLoc: g } = S, y = o(5, i, g);
565
+ return y.index = parseInt(p, 10), u.nextToken(), l(y, u.currentOffset(), u.currentPosition()), y;
566
+ }
567
+ function v(u, p) {
568
+ const S = u.context(), { lastOffset: i, lastStartLoc: g } = S, y = o(4, i, g);
569
+ return y.key = p, u.nextToken(), l(y, u.currentOffset(), u.currentPosition()), y;
570
+ }
571
+ function I(u, p) {
572
+ const S = u.context(), { lastOffset: i, lastStartLoc: g } = S, y = o(9, i, g);
573
+ return y.value = p.replace(Hs, $s), u.nextToken(), l(y, u.currentOffset(), u.currentPosition()), y;
574
+ }
575
+ function O(u) {
576
+ const p = u.nextToken(), S = u.context(), { lastOffset: i, lastStartLoc: g } = S, y = o(8, i, g);
577
+ return p.type !== 11 ? (s(u, ne.UNEXPECTED_EMPTY_LINKED_MODIFIER, S.lastStartLoc, 0), y.value = "", l(y, i, g), {
578
+ nextConsumeToken: p,
579
+ node: y
580
+ }) : (p.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, S.lastStartLoc, 0, De(p)), y.value = p.value || "", l(y, u.currentOffset(), u.currentPosition()), {
581
+ node: y
582
+ });
583
+ }
584
+ function L(u, p) {
585
+ const S = u.context(), i = o(7, S.offset, S.startLoc);
586
+ return i.value = p, l(i, u.currentOffset(), u.currentPosition()), i;
587
+ }
588
+ function R(u) {
589
+ const p = u.context(), S = o(6, p.offset, p.startLoc);
590
+ let i = u.nextToken();
591
+ if (i.type === 8) {
592
+ const g = O(u);
593
+ S.modifier = g.node, i = g.nextConsumeToken || u.nextToken();
594
+ }
595
+ switch (i.type !== 9 && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), i = u.nextToken(), i.type === 2 && (i = u.nextToken()), i.type) {
596
+ case 10:
597
+ i.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), S.key = L(u, i.value || "");
598
+ break;
599
+ case 4:
600
+ i.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), S.key = v(u, i.value || "");
601
+ break;
602
+ case 5:
603
+ i.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), S.key = m(u, i.value || "");
604
+ break;
605
+ case 6:
606
+ i.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(i)), S.key = I(u, i.value || "");
607
+ break;
608
+ default: {
609
+ s(u, ne.UNEXPECTED_EMPTY_LINKED_KEY, p.lastStartLoc, 0);
610
+ const g = u.context(), y = o(7, g.offset, g.startLoc);
611
+ return y.value = "", l(y, g.offset, g.startLoc), S.key = y, l(S, g.offset, g.startLoc), {
612
+ nextConsumeToken: i,
613
+ node: S
614
+ };
615
+ }
616
+ }
617
+ return l(S, u.currentOffset(), u.currentPosition()), {
618
+ node: S
619
+ };
620
+ }
621
+ function U(u) {
622
+ const p = u.context(), S = p.currentType === 1 ? u.currentOffset() : p.offset, i = p.currentType === 1 ? p.endLoc : p.startLoc, g = o(2, S, i);
623
+ g.items = [];
624
+ let y = null;
625
+ do {
626
+ const f = y || u.nextToken();
627
+ switch (y = null, f.type) {
628
+ case 0:
629
+ f.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(f)), g.items.push(c(u, f.value || ""));
630
+ break;
631
+ case 5:
632
+ f.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(f)), g.items.push(m(u, f.value || ""));
633
+ break;
634
+ case 4:
635
+ f.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(f)), g.items.push(v(u, f.value || ""));
636
+ break;
637
+ case 6:
638
+ f.value == null && s(u, ne.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, De(f)), g.items.push(I(u, f.value || ""));
639
+ break;
640
+ case 7: {
641
+ const T = R(u);
642
+ g.items.push(T.node), y = T.nextConsumeToken || null;
643
+ break;
644
+ }
645
+ }
646
+ } while (p.currentType !== 13 && p.currentType !== 1);
647
+ const b = p.currentType === 1 ? p.lastOffset : u.currentOffset(), w = p.currentType === 1 ? p.lastEndLoc : u.currentPosition();
648
+ return l(g, b, w), g;
649
+ }
650
+ function B(u, p, S, i) {
651
+ const g = u.context();
652
+ let y = i.items.length === 0;
653
+ const b = o(1, p, S);
654
+ b.cases = [], b.cases.push(i);
655
+ do {
656
+ const w = U(u);
657
+ y || (y = w.items.length === 0), b.cases.push(w);
658
+ } while (g.currentType !== 13);
659
+ return y && s(u, ne.MUST_HAVE_MESSAGES_IN_PLURAL, S, 0), l(b, u.currentOffset(), u.currentPosition()), b;
660
+ }
661
+ function M(u) {
662
+ const p = u.context(), { offset: S, startLoc: i } = p, g = U(u);
663
+ return p.currentType === 13 ? g : B(u, S, i, g);
664
+ }
665
+ function P(u) {
666
+ const p = Bs(u, he({}, e)), S = p.context(), i = o(0, S.offset, S.startLoc);
667
+ return t && i.loc && (i.loc.source = u), i.body = M(p), e.onCacheKey && (i.cacheKey = e.onCacheKey(u)), S.currentType !== 13 && s(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, S.lastStartLoc, 0, u[S.offset] || ""), l(i, p.currentOffset(), p.currentPosition()), i;
668
+ }
669
+ return { parse: P };
670
+ }
671
+ function De(e) {
672
+ if (e.type === 13)
673
+ return "EOF";
674
+ const t = (e.value || "").replace(/\r?\n/gu, "\\n");
675
+ return t.length > 10 ? t.slice(0, 9) + "…" : t;
676
+ }
677
+ function Ks(e, t = {}) {
678
+ const n = {
679
+ ast: e,
680
+ helpers: /* @__PURE__ */ new Set()
681
+ };
682
+ return { context: () => n, helper: (l) => (n.helpers.add(l), l) };
683
+ }
684
+ function dn(e, t) {
685
+ for (let n = 0; n < e.length; n++)
686
+ Kt(e[n], t);
687
+ }
688
+ function Kt(e, t) {
689
+ switch (e.type) {
690
+ case 1:
691
+ dn(e.cases, t), t.helper(
692
+ "plural"
693
+ /* HelperNameMap.PLURAL */
694
+ );
695
+ break;
696
+ case 2:
697
+ dn(e.items, t);
698
+ break;
699
+ case 6: {
700
+ Kt(e.key, t), t.helper(
701
+ "linked"
702
+ /* HelperNameMap.LINKED */
703
+ ), t.helper(
704
+ "type"
705
+ /* HelperNameMap.TYPE */
706
+ );
707
+ break;
708
+ }
709
+ case 5:
710
+ t.helper(
711
+ "interpolate"
712
+ /* HelperNameMap.INTERPOLATE */
713
+ ), t.helper(
714
+ "list"
715
+ /* HelperNameMap.LIST */
716
+ );
717
+ break;
718
+ case 4:
719
+ t.helper(
720
+ "interpolate"
721
+ /* HelperNameMap.INTERPOLATE */
722
+ ), t.helper(
723
+ "named"
724
+ /* HelperNameMap.NAMED */
725
+ );
726
+ break;
727
+ }
728
+ }
729
+ function zs(e, t = {}) {
730
+ const n = Ks(e);
731
+ n.helper(
732
+ "normalize"
733
+ /* HelperNameMap.NORMALIZE */
734
+ ), e.body && Kt(e.body, n);
735
+ const s = n.context();
736
+ e.helpers = Array.from(s.helpers);
737
+ }
738
+ function Qs(e) {
739
+ const t = e.body;
740
+ return t.type === 2 ? mn(t) : t.cases.forEach((n) => mn(n)), e;
741
+ }
742
+ function mn(e) {
743
+ if (e.items.length === 1) {
744
+ const t = e.items[0];
745
+ (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
746
+ } else {
747
+ const t = [];
748
+ for (let n = 0; n < e.items.length; n++) {
749
+ const s = e.items[n];
750
+ if (!(s.type === 3 || s.type === 9) || s.value == null)
751
+ break;
752
+ t.push(s.value);
753
+ }
754
+ if (t.length === e.items.length) {
755
+ e.static = Jt(t);
756
+ for (let n = 0; n < e.items.length; n++) {
757
+ const s = e.items[n];
758
+ (s.type === 3 || s.type === 9) && delete s.value;
759
+ }
760
+ }
761
+ }
762
+ }
763
+ function He(e) {
764
+ switch (e.t = e.type, e.type) {
765
+ case 0: {
766
+ const t = e;
767
+ He(t.body), t.b = t.body, delete t.body;
768
+ break;
769
+ }
770
+ case 1: {
771
+ const t = e, n = t.cases;
772
+ for (let s = 0; s < n.length; s++)
773
+ He(n[s]);
774
+ t.c = n, delete t.cases;
775
+ break;
776
+ }
777
+ case 2: {
778
+ const t = e, n = t.items;
779
+ for (let s = 0; s < n.length; s++)
780
+ He(n[s]);
781
+ t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
782
+ break;
783
+ }
784
+ case 3:
785
+ case 9:
786
+ case 8:
787
+ case 7: {
788
+ const t = e;
789
+ t.value && (t.v = t.value, delete t.value);
790
+ break;
791
+ }
792
+ case 6: {
793
+ const t = e;
794
+ He(t.key), t.k = t.key, delete t.key, t.modifier && (He(t.modifier), t.m = t.modifier, delete t.modifier);
795
+ break;
796
+ }
797
+ case 5: {
798
+ const t = e;
799
+ t.i = t.index, delete t.index;
800
+ break;
801
+ }
802
+ case 4: {
803
+ const t = e;
804
+ t.k = t.key, delete t.key;
805
+ break;
806
+ }
807
+ }
808
+ delete e.type;
809
+ }
810
+ function qs(e, t) {
811
+ const { filename: n, breakLineCode: s, needIndent: o } = t, l = t.location !== !1, c = {
812
+ filename: n,
813
+ code: "",
814
+ column: 1,
815
+ line: 1,
816
+ offset: 0,
817
+ map: void 0,
818
+ breakLineCode: s,
819
+ needIndent: o,
820
+ indentLevel: 0
821
+ };
822
+ l && e.loc && (c.source = e.loc.source);
823
+ const m = () => c;
824
+ function v(M, P) {
825
+ c.code += M;
826
+ }
827
+ function I(M, P = !0) {
828
+ const u = P ? s : "";
829
+ v(o ? u + " ".repeat(M) : u);
830
+ }
831
+ function O(M = !0) {
832
+ const P = ++c.indentLevel;
833
+ M && I(P);
834
+ }
835
+ function L(M = !0) {
836
+ const P = --c.indentLevel;
837
+ M && I(P);
838
+ }
839
+ function R() {
840
+ I(c.indentLevel);
841
+ }
842
+ return {
843
+ context: m,
844
+ push: v,
845
+ indent: O,
846
+ deindent: L,
847
+ newline: R,
848
+ helper: (M) => `_${M}`,
849
+ needIndent: () => c.needIndent
850
+ };
851
+ }
852
+ function er(e, t) {
853
+ const { helper: n } = e;
854
+ e.push(`${n(
855
+ "linked"
856
+ /* HelperNameMap.LINKED */
857
+ )}(`), Ke(e, t.key), t.modifier ? (e.push(", "), Ke(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
858
+ }
859
+ function tr(e, t) {
860
+ const { helper: n, needIndent: s } = e;
861
+ e.push(`${n(
862
+ "normalize"
863
+ /* HelperNameMap.NORMALIZE */
864
+ )}([`), e.indent(s());
865
+ const o = t.items.length;
866
+ for (let l = 0; l < o && (Ke(e, t.items[l]), l !== o - 1); l++)
867
+ e.push(", ");
868
+ e.deindent(s()), e.push("])");
869
+ }
870
+ function nr(e, t) {
871
+ const { helper: n, needIndent: s } = e;
872
+ if (t.cases.length > 1) {
873
+ e.push(`${n(
874
+ "plural"
875
+ /* HelperNameMap.PLURAL */
876
+ )}([`), e.indent(s());
877
+ const o = t.cases.length;
878
+ for (let l = 0; l < o && (Ke(e, t.cases[l]), l !== o - 1); l++)
879
+ e.push(", ");
880
+ e.deindent(s()), e.push("])");
881
+ }
882
+ }
883
+ function sr(e, t) {
884
+ t.body ? Ke(e, t.body) : e.push("null");
885
+ }
886
+ function Ke(e, t) {
887
+ const { helper: n } = e;
888
+ switch (t.type) {
889
+ case 0:
890
+ sr(e, t);
891
+ break;
892
+ case 1:
893
+ nr(e, t);
894
+ break;
895
+ case 2:
896
+ tr(e, t);
897
+ break;
898
+ case 6:
899
+ er(e, t);
900
+ break;
901
+ case 8:
902
+ e.push(JSON.stringify(t.value), t);
903
+ break;
904
+ case 7:
905
+ e.push(JSON.stringify(t.value), t);
906
+ break;
907
+ case 5:
908
+ e.push(`${n(
909
+ "interpolate"
910
+ /* HelperNameMap.INTERPOLATE */
911
+ )}(${n(
912
+ "list"
913
+ /* HelperNameMap.LIST */
914
+ )}(${t.index}))`, t);
915
+ break;
916
+ case 4:
917
+ e.push(`${n(
918
+ "interpolate"
919
+ /* HelperNameMap.INTERPOLATE */
920
+ )}(${n(
921
+ "named"
922
+ /* HelperNameMap.NAMED */
923
+ )}(${JSON.stringify(t.key)}))`, t);
924
+ break;
925
+ case 9:
926
+ e.push(JSON.stringify(t.value), t);
927
+ break;
928
+ case 3:
929
+ e.push(JSON.stringify(t.value), t);
930
+ break;
931
+ }
932
+ }
933
+ const rr = (e, t = {}) => {
934
+ const n = W(t.mode) ? t.mode : "normal", s = W(t.filename) ? t.filename : "message.intl";
935
+ t.sourceMap;
936
+ const o = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
937
+ `, l = t.needIndent ? t.needIndent : n !== "arrow", c = e.helpers || [], m = qs(e, {
938
+ filename: s,
939
+ breakLineCode: o,
940
+ needIndent: l
941
+ });
942
+ m.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), m.indent(l), c.length > 0 && (m.push(`const { ${Jt(c.map((O) => `${O}: _${O}`), ", ")} } = ctx`), m.newline()), m.push("return "), Ke(m, e), m.deindent(l), m.push("}"), delete e.helpers;
943
+ const { code: v, map: I } = m.context();
944
+ return {
945
+ ast: e,
946
+ code: v,
947
+ map: I ? I.toJSON() : void 0
948
+ // eslint-disable-line @typescript-eslint/no-explicit-any
949
+ };
950
+ };
951
+ function ar(e, t = {}) {
952
+ const n = he({}, t), s = !!n.jit, o = !!n.minify, l = n.optimize == null ? !0 : n.optimize, m = Js(n).parse(e);
953
+ return s ? (l && Qs(m), o && He(m), { ast: m, code: "" }) : (zs(m, n), rr(m, n));
954
+ }
955
+ var lr = { env: { NODE_ENV: "production" } };
956
+ function or() {
957
+ typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ye().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ye().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
958
+ }
959
+ function St(e) {
960
+ return (n) => ir(n, e);
961
+ }
962
+ function ir(e, t) {
963
+ const n = ur(t);
964
+ if (n == null)
965
+ throw ot(
966
+ 0
967
+ /* NodeTypes.Resource */
968
+ );
969
+ if (zt(n) === 1) {
970
+ const l = mr(n);
971
+ return e.plural(l.reduce((c, m) => [
972
+ ...c,
973
+ fn(e, m)
974
+ ], []));
975
+ } else
976
+ return fn(e, n);
977
+ }
978
+ const cr = ["b", "body"];
979
+ function ur(e) {
980
+ return xe(e, cr);
981
+ }
982
+ const dr = ["c", "cases"];
983
+ function mr(e) {
984
+ return xe(e, dr, []);
985
+ }
986
+ function fn(e, t) {
987
+ const n = _r(t);
988
+ if (n != null)
989
+ return e.type === "text" ? n : e.normalize([n]);
990
+ {
991
+ const s = br(t).reduce((o, l) => [...o, Ut(e, l)], []);
992
+ return e.normalize(s);
993
+ }
994
+ }
995
+ const fr = ["s", "static"];
996
+ function _r(e) {
997
+ return xe(e, fr);
998
+ }
999
+ const pr = ["i", "items"];
1000
+ function br(e) {
1001
+ return xe(e, pr, []);
1002
+ }
1003
+ function Ut(e, t) {
1004
+ const n = zt(t);
1005
+ switch (n) {
1006
+ case 3:
1007
+ return ft(t, n);
1008
+ case 9:
1009
+ return ft(t, n);
1010
+ case 4: {
1011
+ const s = t;
1012
+ if (Se(s, "k") && s.k)
1013
+ return e.interpolate(e.named(s.k));
1014
+ if (Se(s, "key") && s.key)
1015
+ return e.interpolate(e.named(s.key));
1016
+ throw ot(n);
1017
+ }
1018
+ case 5: {
1019
+ const s = t;
1020
+ if (Se(s, "i") && ve(s.i))
1021
+ return e.interpolate(e.list(s.i));
1022
+ if (Se(s, "index") && ve(s.index))
1023
+ return e.interpolate(e.list(s.index));
1024
+ throw ot(n);
1025
+ }
1026
+ case 6: {
1027
+ const s = t, o = Ir(s), l = Er(s);
1028
+ return e.linked(Ut(e, l), o ? Ut(e, o) : void 0, e.type);
1029
+ }
1030
+ case 7:
1031
+ return ft(t, n);
1032
+ case 8:
1033
+ return ft(t, n);
1034
+ default:
1035
+ throw new Error(`unhandled node on format message part: ${n}`);
1036
+ }
1037
+ }
1038
+ const vr = ["t", "type"];
1039
+ function zt(e) {
1040
+ return xe(e, vr);
1041
+ }
1042
+ const hr = ["v", "value"];
1043
+ function ft(e, t) {
1044
+ const n = xe(e, hr);
1045
+ if (n)
1046
+ return n;
1047
+ throw ot(t);
1048
+ }
1049
+ const gr = ["m", "modifier"];
1050
+ function Ir(e) {
1051
+ return xe(e, gr);
1052
+ }
1053
+ const yr = ["k", "key"];
1054
+ function Er(e) {
1055
+ const t = xe(e, yr);
1056
+ if (t)
1057
+ return t;
1058
+ throw ot(
1059
+ 6
1060
+ /* NodeTypes.Linked */
1061
+ );
1062
+ }
1063
+ function xe(e, t, n) {
1064
+ for (let s = 0; s < t.length; s++) {
1065
+ const o = t[s];
1066
+ if (Se(e, o) && e[o] != null)
1067
+ return e[o];
1068
+ }
1069
+ return n;
1070
+ }
1071
+ function ot(e) {
1072
+ return new Error(`unhandled node type: ${e}`);
1073
+ }
1074
+ const Nr = (e) => e;
1075
+ let _t = re();
1076
+ function ze(e) {
1077
+ return ee(e) && zt(e) === 0 && (Se(e, "b") || Se(e, "body"));
1078
+ }
1079
+ function kr(e, t = {}) {
1080
+ let n = !1;
1081
+ const s = t.onError || Us;
1082
+ return t.onError = (o) => {
1083
+ n = !0, s(o);
1084
+ }, { ...ar(e, t), detectError: n };
1085
+ }
1086
+ // @__NO_SIDE_EFFECTS__
1087
+ function Tr(e, t) {
1088
+ if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && W(e)) {
1089
+ ue(t.warnHtmlMessage) && t.warnHtmlMessage;
1090
+ const s = (t.onCacheKey || Nr)(e), o = _t[s];
1091
+ if (o)
1092
+ return o;
1093
+ const { ast: l, detectError: c } = kr(e, {
1094
+ ...t,
1095
+ location: lr.env.NODE_ENV !== "production",
1096
+ jit: !0
1097
+ }), m = St(l);
1098
+ return c ? m : _t[s] = m;
1099
+ } else {
1100
+ const n = e.cacheKey;
1101
+ if (n) {
1102
+ const s = _t[n];
1103
+ return s || (_t[n] = St(e));
1104
+ } else
1105
+ return St(e);
1106
+ }
1107
+ }
1108
+ let it = null;
1109
+ function Cr(e) {
1110
+ it = e;
1111
+ }
1112
+ function Or(e, t, n) {
1113
+ it && it.emit("i18n:init", {
1114
+ timestamp: Date.now(),
1115
+ i18n: e,
1116
+ version: t,
1117
+ meta: n
1118
+ });
1119
+ }
1120
+ const Rr = /* @__PURE__ */ Lr("function:translate");
1121
+ function Lr(e) {
1122
+ return (t) => it && it.emit(e, t);
1123
+ }
1124
+ const Pe = {
1125
+ INVALID_ARGUMENT: js,
1126
+ // 17
1127
+ INVALID_DATE_ARGUMENT: 18,
1128
+ INVALID_ISO_DATE_ARGUMENT: 19,
1129
+ NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1130
+ NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1131
+ NOT_SUPPORT_LOCALE_TYPE: 23
1132
+ }, Sr = 24;
1133
+ function je(e) {
1134
+ return kt(e, null, void 0);
1135
+ }
1136
+ function Qt(e, t) {
1137
+ return t.locale != null ? _n(t.locale) : _n(e.locale);
1138
+ }
1139
+ let At;
1140
+ function _n(e) {
1141
+ if (W(e))
1142
+ return e;
1143
+ if (le(e)) {
1144
+ if (e.resolvedOnce && At != null)
1145
+ return At;
1146
+ if (e.constructor.name === "Function") {
1147
+ const t = e();
1148
+ if (Ms(t))
1149
+ throw je(Pe.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1150
+ return At = t;
1151
+ } else
1152
+ throw je(Pe.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1153
+ } else
1154
+ throw je(Pe.NOT_SUPPORT_LOCALE_TYPE);
1155
+ }
1156
+ function Ar(e, t, n) {
1157
+ return [.../* @__PURE__ */ new Set([
1158
+ n,
1159
+ ..._e(t) ? t : ee(t) ? Object.keys(t) : W(t) ? [t] : [n]
1160
+ ])];
1161
+ }
1162
+ function Wn(e, t, n) {
1163
+ const s = W(n) ? n : Et, o = e;
1164
+ o.__localeChainCache || (o.__localeChainCache = /* @__PURE__ */ new Map());
1165
+ let l = o.__localeChainCache.get(s);
1166
+ if (!l) {
1167
+ l = [];
1168
+ let c = [n];
1169
+ for (; _e(c); )
1170
+ c = pn(l, c, t);
1171
+ const m = _e(t) || !q(t) ? t : t.default ? t.default : null;
1172
+ c = W(m) ? [m] : m, _e(c) && pn(l, c, !1), o.__localeChainCache.set(s, l);
1173
+ }
1174
+ return l;
1175
+ }
1176
+ function pn(e, t, n) {
1177
+ let s = !0;
1178
+ for (let o = 0; o < t.length && ue(s); o++) {
1179
+ const l = t[o];
1180
+ W(l) && (s = Dr(e, t[o], n));
1181
+ }
1182
+ return s;
1183
+ }
1184
+ function Dr(e, t, n) {
1185
+ let s;
1186
+ const o = t.split("-");
1187
+ do {
1188
+ const l = o.join("-");
1189
+ s = Mr(e, l, n), o.splice(-1, 1);
1190
+ } while (o.length && s === !0);
1191
+ return s;
1192
+ }
1193
+ function Mr(e, t, n) {
1194
+ let s = !1;
1195
+ if (!e.includes(t) && (s = !0, t)) {
1196
+ s = t[t.length - 1] !== "!";
1197
+ const o = t.replace(/!/g, "");
1198
+ e.push(o), (_e(n) || q(n)) && n[o] && (s = n[o]);
1199
+ }
1200
+ return s;
1201
+ }
1202
+ const Ge = [];
1203
+ Ge[
1204
+ 0
1205
+ /* States.BEFORE_PATH */
1206
+ ] = {
1207
+ w: [
1208
+ 0
1209
+ /* States.BEFORE_PATH */
1210
+ ],
1211
+ i: [
1212
+ 3,
1213
+ 0
1214
+ /* Actions.APPEND */
1215
+ ],
1216
+ "[": [
1217
+ 4
1218
+ /* States.IN_SUB_PATH */
1219
+ ],
1220
+ o: [
1221
+ 7
1222
+ /* States.AFTER_PATH */
1223
+ ]
1224
+ };
1225
+ Ge[
1226
+ 1
1227
+ /* States.IN_PATH */
1228
+ ] = {
1229
+ w: [
1230
+ 1
1231
+ /* States.IN_PATH */
1232
+ ],
1233
+ ".": [
1234
+ 2
1235
+ /* States.BEFORE_IDENT */
1236
+ ],
1237
+ "[": [
1238
+ 4
1239
+ /* States.IN_SUB_PATH */
1240
+ ],
1241
+ o: [
1242
+ 7
1243
+ /* States.AFTER_PATH */
1244
+ ]
1245
+ };
1246
+ Ge[
1247
+ 2
1248
+ /* States.BEFORE_IDENT */
1249
+ ] = {
1250
+ w: [
1251
+ 2
1252
+ /* States.BEFORE_IDENT */
1253
+ ],
1254
+ i: [
1255
+ 3,
1256
+ 0
1257
+ /* Actions.APPEND */
1258
+ ],
1259
+ 0: [
1260
+ 3,
1261
+ 0
1262
+ /* Actions.APPEND */
1263
+ ]
1264
+ };
1265
+ Ge[
1266
+ 3
1267
+ /* States.IN_IDENT */
1268
+ ] = {
1269
+ i: [
1270
+ 3,
1271
+ 0
1272
+ /* Actions.APPEND */
1273
+ ],
1274
+ 0: [
1275
+ 3,
1276
+ 0
1277
+ /* Actions.APPEND */
1278
+ ],
1279
+ w: [
1280
+ 1,
1281
+ 1
1282
+ /* Actions.PUSH */
1283
+ ],
1284
+ ".": [
1285
+ 2,
1286
+ 1
1287
+ /* Actions.PUSH */
1288
+ ],
1289
+ "[": [
1290
+ 4,
1291
+ 1
1292
+ /* Actions.PUSH */
1293
+ ],
1294
+ o: [
1295
+ 7,
1296
+ 1
1297
+ /* Actions.PUSH */
1298
+ ]
1299
+ };
1300
+ Ge[
1301
+ 4
1302
+ /* States.IN_SUB_PATH */
1303
+ ] = {
1304
+ "'": [
1305
+ 5,
1306
+ 0
1307
+ /* Actions.APPEND */
1308
+ ],
1309
+ '"': [
1310
+ 6,
1311
+ 0
1312
+ /* Actions.APPEND */
1313
+ ],
1314
+ "[": [
1315
+ 4,
1316
+ 2
1317
+ /* Actions.INC_SUB_PATH_DEPTH */
1318
+ ],
1319
+ "]": [
1320
+ 1,
1321
+ 3
1322
+ /* Actions.PUSH_SUB_PATH */
1323
+ ],
1324
+ o: 8,
1325
+ l: [
1326
+ 4,
1327
+ 0
1328
+ /* Actions.APPEND */
1329
+ ]
1330
+ };
1331
+ Ge[
1332
+ 5
1333
+ /* States.IN_SINGLE_QUOTE */
1334
+ ] = {
1335
+ "'": [
1336
+ 4,
1337
+ 0
1338
+ /* Actions.APPEND */
1339
+ ],
1340
+ o: 8,
1341
+ l: [
1342
+ 5,
1343
+ 0
1344
+ /* Actions.APPEND */
1345
+ ]
1346
+ };
1347
+ Ge[
1348
+ 6
1349
+ /* States.IN_DOUBLE_QUOTE */
1350
+ ] = {
1351
+ '"': [
1352
+ 4,
1353
+ 0
1354
+ /* Actions.APPEND */
1355
+ ],
1356
+ o: 8,
1357
+ l: [
1358
+ 6,
1359
+ 0
1360
+ /* Actions.APPEND */
1361
+ ]
1362
+ };
1363
+ const wr = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1364
+ function Fr(e) {
1365
+ return wr.test(e);
1366
+ }
1367
+ function Pr(e) {
1368
+ const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1369
+ return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1370
+ }
1371
+ function jr(e) {
1372
+ if (e == null)
1373
+ return "o";
1374
+ switch (e.charCodeAt(0)) {
1375
+ case 91:
1376
+ case 93:
1377
+ case 46:
1378
+ case 34:
1379
+ case 39:
1380
+ return e;
1381
+ case 95:
1382
+ case 36:
1383
+ case 45:
1384
+ return "i";
1385
+ case 9:
1386
+ case 10:
1387
+ case 13:
1388
+ case 160:
1389
+ case 65279:
1390
+ case 8232:
1391
+ case 8233:
1392
+ return "w";
1393
+ }
1394
+ return "i";
1395
+ }
1396
+ function Ur(e) {
1397
+ const t = e.trim();
1398
+ return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : Fr(t) ? Pr(t) : "*" + t;
1399
+ }
1400
+ function Vr(e) {
1401
+ const t = [];
1402
+ let n = -1, s = 0, o = 0, l, c, m, v, I, O, L;
1403
+ const R = [];
1404
+ R[
1405
+ 0
1406
+ /* Actions.APPEND */
1407
+ ] = () => {
1408
+ c === void 0 ? c = m : c += m;
1409
+ }, R[
1410
+ 1
1411
+ /* Actions.PUSH */
1412
+ ] = () => {
1413
+ c !== void 0 && (t.push(c), c = void 0);
1414
+ }, R[
1415
+ 2
1416
+ /* Actions.INC_SUB_PATH_DEPTH */
1417
+ ] = () => {
1418
+ R[
1419
+ 0
1420
+ /* Actions.APPEND */
1421
+ ](), o++;
1422
+ }, R[
1423
+ 3
1424
+ /* Actions.PUSH_SUB_PATH */
1425
+ ] = () => {
1426
+ if (o > 0)
1427
+ o--, s = 4, R[
1428
+ 0
1429
+ /* Actions.APPEND */
1430
+ ]();
1431
+ else {
1432
+ if (o = 0, c === void 0 || (c = Ur(c), c === !1))
1433
+ return !1;
1434
+ R[
1435
+ 1
1436
+ /* Actions.PUSH */
1437
+ ]();
1438
+ }
1439
+ };
1440
+ function U() {
1441
+ const B = e[n + 1];
1442
+ if (s === 5 && B === "'" || s === 6 && B === '"')
1443
+ return n++, m = "\\" + B, R[
1444
+ 0
1445
+ /* Actions.APPEND */
1446
+ ](), !0;
1447
+ }
1448
+ for (; s !== null; )
1449
+ if (n++, l = e[n], !(l === "\\" && U())) {
1450
+ if (v = jr(l), L = Ge[s], I = L[v] || L.l || 8, I === 8 || (s = I[0], I[1] !== void 0 && (O = R[I[1]], O && (m = l, O() === !1))))
1451
+ return;
1452
+ if (s === 7)
1453
+ return t;
1454
+ }
1455
+ }
1456
+ const bn = /* @__PURE__ */ new Map();
1457
+ function xr(e, t) {
1458
+ return ee(e) ? e[t] : null;
1459
+ }
1460
+ function Gr(e, t) {
1461
+ if (!ee(e))
1462
+ return null;
1463
+ let n = bn.get(t);
1464
+ if (n || (n = Vr(t), n && bn.set(t, n)), !n)
1465
+ return null;
1466
+ const s = n.length;
1467
+ let o = e, l = 0;
1468
+ for (; l < s; ) {
1469
+ const c = o[n[l]];
1470
+ if (c === void 0 || le(o))
1471
+ return null;
1472
+ o = c, l++;
1473
+ }
1474
+ return o;
1475
+ }
1476
+ const Wr = "10.0.5", Tt = -1, Et = "en-US", vn = "", hn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1477
+ function Yr() {
1478
+ return {
1479
+ upper: (e, t) => t === "text" && W(e) ? e.toUpperCase() : t === "vnode" && ee(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1480
+ lower: (e, t) => t === "text" && W(e) ? e.toLowerCase() : t === "vnode" && ee(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1481
+ capitalize: (e, t) => t === "text" && W(e) ? hn(e) : t === "vnode" && ee(e) && "__v_isVNode" in e ? hn(e.children) : e
1482
+ };
1483
+ }
1484
+ let Yn;
1485
+ function Zr(e) {
1486
+ Yn = e;
1487
+ }
1488
+ let Zn;
1489
+ function Br(e) {
1490
+ Zn = e;
1491
+ }
1492
+ let Bn;
1493
+ function Xr(e) {
1494
+ Bn = e;
1495
+ }
1496
+ let Xn = null;
1497
+ const Hr = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1498
+ Xn = e;
1499
+ }, $r = /* @__NO_SIDE_EFFECTS__ */ () => Xn;
1500
+ let Hn = null;
1501
+ const gn = (e) => {
1502
+ Hn = e;
1503
+ }, Jr = () => Hn;
1504
+ let In = 0;
1505
+ function Kr(e = {}) {
1506
+ const t = le(e.onWarn) ? e.onWarn : Fs, n = W(e.version) ? e.version : Wr, s = W(e.locale) || le(e.locale) ? e.locale : Et, o = le(s) ? Et : s, l = _e(e.fallbackLocale) || q(e.fallbackLocale) || W(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : o, c = q(e.messages) ? e.messages : Dt(o), m = q(e.datetimeFormats) ? e.datetimeFormats : Dt(o), v = q(e.numberFormats) ? e.numberFormats : Dt(o), I = he(re(), e.modifiers, Yr()), O = e.pluralRules || re(), L = le(e.missing) ? e.missing : null, R = ue(e.missingWarn) || yt(e.missingWarn) ? e.missingWarn : !0, U = ue(e.fallbackWarn) || yt(e.fallbackWarn) ? e.fallbackWarn : !0, B = !!e.fallbackFormat, M = !!e.unresolving, P = le(e.postTranslation) ? e.postTranslation : null, u = q(e.processor) ? e.processor : null, p = ue(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, S = !!e.escapeParameter, i = le(e.messageCompiler) ? e.messageCompiler : Yn, g = le(e.messageResolver) ? e.messageResolver : Zn || xr, y = le(e.localeFallbacker) ? e.localeFallbacker : Bn || Ar, b = ee(e.fallbackContext) ? e.fallbackContext : void 0, w = e, f = ee(w.__datetimeFormatters) ? w.__datetimeFormatters : /* @__PURE__ */ new Map(), T = ee(w.__numberFormatters) ? w.__numberFormatters : /* @__PURE__ */ new Map(), E = ee(w.__meta) ? w.__meta : {};
1507
+ In++;
1508
+ const h = {
1509
+ version: n,
1510
+ cid: In,
1511
+ locale: s,
1512
+ fallbackLocale: l,
1513
+ messages: c,
1514
+ modifiers: I,
1515
+ pluralRules: O,
1516
+ missing: L,
1517
+ missingWarn: R,
1518
+ fallbackWarn: U,
1519
+ fallbackFormat: B,
1520
+ unresolving: M,
1521
+ postTranslation: P,
1522
+ processor: u,
1523
+ warnHtmlMessage: p,
1524
+ escapeParameter: S,
1525
+ messageCompiler: i,
1526
+ messageResolver: g,
1527
+ localeFallbacker: y,
1528
+ fallbackContext: b,
1529
+ onWarn: t,
1530
+ __meta: E
1531
+ };
1532
+ return h.datetimeFormats = m, h.numberFormats = v, h.__datetimeFormatters = f, h.__numberFormatters = T, __INTLIFY_PROD_DEVTOOLS__ && Or(h, n, E), h;
1533
+ }
1534
+ const Dt = (e) => ({ [e]: re() });
1535
+ function qt(e, t, n, s, o) {
1536
+ const { missing: l, onWarn: c } = e;
1537
+ if (l !== null) {
1538
+ const m = l(e, n, t, o);
1539
+ return W(m) ? m : t;
1540
+ } else
1541
+ return t;
1542
+ }
1543
+ function rt(e, t, n) {
1544
+ const s = e;
1545
+ s.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1546
+ }
1547
+ function zr(e, t) {
1548
+ return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1549
+ }
1550
+ function Qr(e, t) {
1551
+ const n = t.indexOf(e);
1552
+ if (n === -1)
1553
+ return !1;
1554
+ for (let s = n + 1; s < t.length; s++)
1555
+ if (zr(e, t[s]))
1556
+ return !0;
1557
+ return !1;
1558
+ }
1559
+ function yn(e, ...t) {
1560
+ const { datetimeFormats: n, unresolving: s, fallbackLocale: o, onWarn: l, localeFallbacker: c } = e, { __datetimeFormatters: m } = e, [v, I, O, L] = Vt(...t), R = ue(O.missingWarn) ? O.missingWarn : e.missingWarn;
1561
+ ue(O.fallbackWarn) ? O.fallbackWarn : e.fallbackWarn;
1562
+ const U = !!O.part, B = Qt(e, O), M = c(
1563
+ e,
1564
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1565
+ o,
1566
+ B
1567
+ );
1568
+ if (!W(v) || v === "")
1569
+ return new Intl.DateTimeFormat(B, L).format(I);
1570
+ let P = {}, u, p = null;
1571
+ const S = "datetime format";
1572
+ for (let y = 0; y < M.length && (u = M[y], P = n[u] || {}, p = P[v], !q(p)); y++)
1573
+ qt(e, v, u, R, S);
1574
+ if (!q(p) || !W(u))
1575
+ return s ? Tt : v;
1576
+ let i = `${u}__${v}`;
1577
+ Nt(L) || (i = `${i}__${JSON.stringify(L)}`);
1578
+ let g = m.get(i);
1579
+ return g || (g = new Intl.DateTimeFormat(u, he({}, p, L)), m.set(i, g)), U ? g.formatToParts(I) : g.format(I);
1580
+ }
1581
+ const $n = [
1582
+ "localeMatcher",
1583
+ "weekday",
1584
+ "era",
1585
+ "year",
1586
+ "month",
1587
+ "day",
1588
+ "hour",
1589
+ "minute",
1590
+ "second",
1591
+ "timeZoneName",
1592
+ "formatMatcher",
1593
+ "hour12",
1594
+ "timeZone",
1595
+ "dateStyle",
1596
+ "timeStyle",
1597
+ "calendar",
1598
+ "dayPeriod",
1599
+ "numberingSystem",
1600
+ "hourCycle",
1601
+ "fractionalSecondDigits"
1602
+ ];
1603
+ function Vt(...e) {
1604
+ const [t, n, s, o] = e, l = re();
1605
+ let c = re(), m;
1606
+ if (W(t)) {
1607
+ const v = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1608
+ if (!v)
1609
+ throw je(Pe.INVALID_ISO_DATE_ARGUMENT);
1610
+ const I = v[3] ? v[3].trim().startsWith("T") ? `${v[1].trim()}${v[3].trim()}` : `${v[1].trim()}T${v[3].trim()}` : v[1].trim();
1611
+ m = new Date(I);
1612
+ try {
1613
+ m.toISOString();
1614
+ } catch {
1615
+ throw je(Pe.INVALID_ISO_DATE_ARGUMENT);
1616
+ }
1617
+ } else if (Ss(t)) {
1618
+ if (isNaN(t.getTime()))
1619
+ throw je(Pe.INVALID_DATE_ARGUMENT);
1620
+ m = t;
1621
+ } else if (ve(t))
1622
+ m = t;
1623
+ else
1624
+ throw je(Pe.INVALID_ARGUMENT);
1625
+ return W(n) ? l.key = n : q(n) && Object.keys(n).forEach((v) => {
1626
+ $n.includes(v) ? c[v] = n[v] : l[v] = n[v];
1627
+ }), W(s) ? l.locale = s : q(s) && (c = s), q(o) && (c = o), [l.key || "", m, l, c];
1628
+ }
1629
+ function En(e, t, n) {
1630
+ const s = e;
1631
+ for (const o in n) {
1632
+ const l = `${t}__${o}`;
1633
+ s.__datetimeFormatters.has(l) && s.__datetimeFormatters.delete(l);
1634
+ }
1635
+ }
1636
+ function Nn(e, ...t) {
1637
+ const { numberFormats: n, unresolving: s, fallbackLocale: o, onWarn: l, localeFallbacker: c } = e, { __numberFormatters: m } = e, [v, I, O, L] = xt(...t), R = ue(O.missingWarn) ? O.missingWarn : e.missingWarn;
1638
+ ue(O.fallbackWarn) ? O.fallbackWarn : e.fallbackWarn;
1639
+ const U = !!O.part, B = Qt(e, O), M = c(
1640
+ e,
1641
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1642
+ o,
1643
+ B
1644
+ );
1645
+ if (!W(v) || v === "")
1646
+ return new Intl.NumberFormat(B, L).format(I);
1647
+ let P = {}, u, p = null;
1648
+ const S = "number format";
1649
+ for (let y = 0; y < M.length && (u = M[y], P = n[u] || {}, p = P[v], !q(p)); y++)
1650
+ qt(e, v, u, R, S);
1651
+ if (!q(p) || !W(u))
1652
+ return s ? Tt : v;
1653
+ let i = `${u}__${v}`;
1654
+ Nt(L) || (i = `${i}__${JSON.stringify(L)}`);
1655
+ let g = m.get(i);
1656
+ return g || (g = new Intl.NumberFormat(u, he({}, p, L)), m.set(i, g)), U ? g.formatToParts(I) : g.format(I);
1657
+ }
1658
+ const Jn = [
1659
+ "localeMatcher",
1660
+ "style",
1661
+ "currency",
1662
+ "currencyDisplay",
1663
+ "currencySign",
1664
+ "useGrouping",
1665
+ "minimumIntegerDigits",
1666
+ "minimumFractionDigits",
1667
+ "maximumFractionDigits",
1668
+ "minimumSignificantDigits",
1669
+ "maximumSignificantDigits",
1670
+ "compactDisplay",
1671
+ "notation",
1672
+ "signDisplay",
1673
+ "unit",
1674
+ "unitDisplay",
1675
+ "roundingMode",
1676
+ "roundingPriority",
1677
+ "roundingIncrement",
1678
+ "trailingZeroDisplay"
1679
+ ];
1680
+ function xt(...e) {
1681
+ const [t, n, s, o] = e, l = re();
1682
+ let c = re();
1683
+ if (!ve(t))
1684
+ throw je(Pe.INVALID_ARGUMENT);
1685
+ const m = t;
1686
+ return W(n) ? l.key = n : q(n) && Object.keys(n).forEach((v) => {
1687
+ Jn.includes(v) ? c[v] = n[v] : l[v] = n[v];
1688
+ }), W(s) ? l.locale = s : q(s) && (c = s), q(o) && (c = o), [l.key || "", m, l, c];
1689
+ }
1690
+ function kn(e, t, n) {
1691
+ const s = e;
1692
+ for (const o in n) {
1693
+ const l = `${t}__${o}`;
1694
+ s.__numberFormatters.has(l) && s.__numberFormatters.delete(l);
1695
+ }
1696
+ }
1697
+ const qr = (e) => e, ea = (e) => "", ta = "text", na = (e) => e.length === 0 ? "" : Jt(e), sa = ws;
1698
+ function Tn(e, t) {
1699
+ return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
1700
+ }
1701
+ function ra(e) {
1702
+ const t = ve(e.pluralIndex) ? e.pluralIndex : -1;
1703
+ return e.named && (ve(e.named.count) || ve(e.named.n)) ? ve(e.named.count) ? e.named.count : ve(e.named.n) ? e.named.n : t : t;
1704
+ }
1705
+ function aa(e, t) {
1706
+ t.count || (t.count = e), t.n || (t.n = e);
1707
+ }
1708
+ function la(e = {}) {
1709
+ const t = e.locale, n = ra(e), s = ee(e.pluralRules) && W(t) && le(e.pluralRules[t]) ? e.pluralRules[t] : Tn, o = ee(e.pluralRules) && W(t) && le(e.pluralRules[t]) ? Tn : void 0, l = (u) => u[s(n, u.length, o)], c = e.list || [], m = (u) => c[u], v = e.named || re();
1710
+ ve(e.pluralIndex) && aa(n, v);
1711
+ const I = (u) => v[u];
1712
+ function O(u, p) {
1713
+ const S = le(e.messages) ? e.messages(u, !!p) : ee(e.messages) ? e.messages[u] : !1;
1714
+ return S || (e.parent ? e.parent.message(u) : ea);
1715
+ }
1716
+ const L = (u) => e.modifiers ? e.modifiers[u] : qr, R = q(e.processor) && le(e.processor.normalize) ? e.processor.normalize : na, U = q(e.processor) && le(e.processor.interpolate) ? e.processor.interpolate : sa, B = q(e.processor) && W(e.processor.type) ? e.processor.type : ta, P = {
1717
+ list: m,
1718
+ named: I,
1719
+ plural: l,
1720
+ linked: (u, ...p) => {
1721
+ const [S, i] = p;
1722
+ let g = "text", y = "";
1723
+ p.length === 1 ? ee(S) ? (y = S.modifier || y, g = S.type || g) : W(S) && (y = S || y) : p.length === 2 && (W(S) && (y = S || y), W(i) && (g = i || g));
1724
+ const b = O(u, !0)(P), w = (
1725
+ // The message in vnode resolved with linked are returned as an array by processor.nomalize
1726
+ g === "vnode" && _e(b) && y ? b[0] : b
1727
+ );
1728
+ return y ? L(y)(w, g) : w;
1729
+ },
1730
+ message: O,
1731
+ type: B,
1732
+ interpolate: U,
1733
+ normalize: R,
1734
+ values: he(re(), c, v)
1735
+ };
1736
+ return P;
1737
+ }
1738
+ const Cn = () => "", Te = (e) => le(e);
1739
+ function On(e, ...t) {
1740
+ const { fallbackFormat: n, postTranslation: s, unresolving: o, messageCompiler: l, fallbackLocale: c, messages: m } = e, [v, I] = Gt(...t), O = ue(I.missingWarn) ? I.missingWarn : e.missingWarn, L = ue(I.fallbackWarn) ? I.fallbackWarn : e.fallbackWarn, R = ue(I.escapeParameter) ? I.escapeParameter : e.escapeParameter, U = !!I.resolvedMessage, B = W(I.default) || ue(I.default) ? ue(I.default) ? l ? v : () => v : I.default : n ? l ? v : () => v : null, M = n || B != null && (W(B) || le(B)), P = Qt(e, I);
1741
+ R && oa(I);
1742
+ let [u, p, S] = U ? [
1743
+ v,
1744
+ P,
1745
+ m[P] || re()
1746
+ ] : Kn(e, v, P, c, L, O), i = u, g = v;
1747
+ if (!U && !(W(i) || ze(i) || Te(i)) && M && (i = B, g = i), !U && (!(W(i) || ze(i) || Te(i)) || !W(p)))
1748
+ return o ? Tt : v;
1749
+ let y = !1;
1750
+ const b = () => {
1751
+ y = !0;
1752
+ }, w = Te(i) ? i : zn(e, v, p, i, g, b);
1753
+ if (y)
1754
+ return i;
1755
+ const f = ua(e, p, S, I), T = la(f), E = ia(e, w, T), h = s ? s(E, v) : E;
1756
+ if (__INTLIFY_PROD_DEVTOOLS__) {
1757
+ const Z = {
1758
+ timestamp: Date.now(),
1759
+ key: W(v) ? v : Te(i) ? i.key : "",
1760
+ locale: p || (Te(i) ? i.locale : ""),
1761
+ format: W(i) ? i : Te(i) ? i.source : "",
1762
+ message: h
1763
+ };
1764
+ Z.meta = he({}, e.__meta, /* @__PURE__ */ $r() || {}), Rr(Z);
1765
+ }
1766
+ return h;
1767
+ }
1768
+ function oa(e) {
1769
+ _e(e.list) ? e.list = e.list.map((t) => W(t) ? cn(t) : t) : ee(e.named) && Object.keys(e.named).forEach((t) => {
1770
+ W(e.named[t]) && (e.named[t] = cn(e.named[t]));
1771
+ });
1772
+ }
1773
+ function Kn(e, t, n, s, o, l) {
1774
+ const { messages: c, onWarn: m, messageResolver: v, localeFallbacker: I } = e, O = I(e, s, n);
1775
+ let L = re(), R, U = null;
1776
+ const B = "translate";
1777
+ for (let M = 0; M < O.length && (R = O[M], L = c[R] || re(), (U = v(L, t)) === null && (U = L[t]), !(W(U) || ze(U) || Te(U))); M++)
1778
+ if (!Qr(R, O)) {
1779
+ const P = qt(
1780
+ e,
1781
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1782
+ t,
1783
+ R,
1784
+ l,
1785
+ B
1786
+ );
1787
+ P !== t && (U = P);
1788
+ }
1789
+ return [U, R, L];
1790
+ }
1791
+ function zn(e, t, n, s, o, l) {
1792
+ const { messageCompiler: c, warnHtmlMessage: m } = e;
1793
+ if (Te(s)) {
1794
+ const I = s;
1795
+ return I.locale = I.locale || n, I.key = I.key || t, I;
1796
+ }
1797
+ if (c == null) {
1798
+ const I = () => s;
1799
+ return I.locale = n, I.key = t, I;
1800
+ }
1801
+ const v = c(s, ca(e, n, o, s, m, l));
1802
+ return v.locale = n, v.key = t, v.source = s, v;
1803
+ }
1804
+ function ia(e, t, n) {
1805
+ return t(n);
1806
+ }
1807
+ function Gt(...e) {
1808
+ const [t, n, s] = e, o = re();
1809
+ if (!W(t) && !ve(t) && !Te(t) && !ze(t))
1810
+ throw je(Pe.INVALID_ARGUMENT);
1811
+ const l = ve(t) ? String(t) : (Te(t), t);
1812
+ return ve(n) ? o.plural = n : W(n) ? o.default = n : q(n) && !Nt(n) ? o.named = n : _e(n) && (o.list = n), ve(s) ? o.plural = s : W(s) ? o.default = s : q(s) && he(o, s), [l, o];
1813
+ }
1814
+ function ca(e, t, n, s, o, l) {
1815
+ return {
1816
+ locale: t,
1817
+ key: n,
1818
+ warnHtmlMessage: o,
1819
+ onError: (c) => {
1820
+ throw l && l(c), c;
1821
+ },
1822
+ onCacheKey: (c) => Rs(t, n, c)
1823
+ };
1824
+ }
1825
+ function ua(e, t, n, s) {
1826
+ const { modifiers: o, pluralRules: l, messageResolver: c, fallbackLocale: m, fallbackWarn: v, missingWarn: I, fallbackContext: O } = e, R = {
1827
+ locale: t,
1828
+ modifiers: o,
1829
+ pluralRules: l,
1830
+ messages: (U, B) => {
1831
+ let M = c(n, U);
1832
+ if (M == null && (O || B)) {
1833
+ const [, , P] = Kn(
1834
+ O || e,
1835
+ // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
1836
+ U,
1837
+ t,
1838
+ m,
1839
+ v,
1840
+ I
1841
+ );
1842
+ M = c(P, U);
1843
+ }
1844
+ if (W(M) || ze(M)) {
1845
+ let P = !1;
1846
+ const p = zn(e, U, t, M, U, () => {
1847
+ P = !0;
1848
+ });
1849
+ return P ? Cn : p;
1850
+ } else return Te(M) ? M : Cn;
1851
+ }
1852
+ };
1853
+ return e.processor && (R.processor = e.processor), s.list && (R.list = s.list), s.named && (R.named = s.named), ve(s.plural) && (R.pluralIndex = s.plural), R;
1854
+ }
1855
+ or();
1856
+ var da = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_f2cfef7c-e7c3-47a6-885e-d2db229fb3e0", npm_package_devDependencies__types_node: "^18.17.17", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_devDependencies_vitest: "^1.2.0", USER: "runner", npm_config_always_auth: "", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v24.5.0 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.16", npm_package_devDependencies_vue_i18n: "10.0.5", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_f2cfef7c-e7c3-47a6-885e-d2db229fb3e0", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.2.0", npm_node_execpath: "/opt/hostedtoolcache/node/24.5.0/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", HCA_CLOUD_PROVIDER: "azure", npm_package_files_0: "dist", npm_package_devDependencies_eslint_import_resolver_typescript: "^4.4.4", HOME: "/home/runner", npm_package_devDependencies__eslint_js: "^9.39.2", npm_package_devDependencies__typescript_eslint_parser: "^8.52.0", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_devDependencies_eslint_config_prettier: "^10.1.8", npm_config_save_workspace_protocol: "true", 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.6.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", npm_package_scripts_type_check: "vue-tsc --noEmit -p tsconfig.app.json --composite false", npm_package_dependencies__feedmepos_mf_common: "^1.29.10", npm_package_devDependencies_code_inspector_plugin: "^0.20.16", npm_package_devDependencies_npm_run_all2: "^6.0.6", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-Linux", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", SYSTEMD_EXEC_PID: "1806", ACTIONS_ORCHESTRATION_ID: "f8bd90fb-7c1a-4f56-af6f-02e6c9eb903b.publish.publish.__default", npm_package_dependencies__feedmepos_ui_library: "^1.10.6", npm_package_dependencies_dayjs: "^1.11.10", npm_package_devDependencies__tsconfig_node18: "^18.2.2", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "VITE_TARGET_ENV=dev pnpm build:mf && pnpm build:dts", npm_package_devDependencies_tailwindcss: "^3.3.3", npm_package_devDependencies_typescript: "^5.9.3", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.6", npm_config_prefer_workspace_packages: "true", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260720.247.2", npm_package_scripts_dev: "vite", npm_package_devDependencies_prettier: "^3.7.4", npm_package_devDependencies_sass_embedded: "^1.93.3", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GITHUB_ARTIFACTS: "/home/runner/work/_temp/_runner_file_commands/artifacts_f2cfef7c-e7c3-47a6-885e-d2db229fb3e0", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", npm_package_devDependencies__vue_tsconfig: "^0.4.0", npm_package_devDependencies_eslint_plugin_import: "^2.32.0", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "9:12872", GITHUB_WORKFLOW: "Publish hrm-portal", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.16", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", npm_package_scripts_lint: "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^8.52.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.12/x64", GITHUB_RUN_ID: "29978572712", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "768ab34bebbbc848daddbcb95a4471dad7160261", GOROOT_1_26_X64: "/opt/hostedtoolcache/go/1.26.5/x64", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.4", GITHUB_WORKFLOW_REF: "feedmepos/hrm-service/.github/workflows/publish-hrm-portal-trusted.yml@refs/heads/dev", ACTIONS_ID_TOKEN_REQUEST_TOKEN: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9kZXZcIixcIlBlcm1pc3Npb25cIjozfSx7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6MX1dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOjZmOTZmYTg5LWI3YmYtNDg3OC1iYWQzLTg5ODAwNjU2NmI2ZSIsImJpbGxpbmdfb3duZXJfaWQiOiJFX2tnRE9BQUpvWVEiLCJleHAiOjE3ODQ4MDE2MjcsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc4NDc3OTQyNywiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6IjJmZDdhNGJmLWVkMjUtNTQ3OS04ZmZiLWMxNjUwZTE4N2YzYSIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc4NDc3OTEyNywib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJqdW4tbGVlLWZlZWRtZVwiLFwiYWN0b3JfaWRcIjpcIjIzOTI4Mjg2MlwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiY2hlY2tfcnVuX2lkXCI6XCI4OTExNTQ3MDQzNFwiLFwiZXZlbnRfbmFtZVwiOlwid29ya2Zsb3dfZGlzcGF0Y2hcIixcImhlYWRfcmVmXCI6XCJcIixcImpvYl93b3JrZmxvd19yZWZcIjpcImZlZWRtZXBvcy9hY3Rpb25zLy5naXRodWIvd29ya2Zsb3dzL3B1Ymxpc2gtbnBtLWdpdGh1Yi55YW1sQHJlZnMvaGVhZHMvbWFpblwiLFwiam9iX3dvcmtmbG93X3NoYVwiOlwiMTZkYTQzODhhZTQ0YzgwNTk2ZTkzMWEyMDhmNDc4NDA1MDc2ODIxNVwiLFwicmVmXCI6XCJyZWZzL2hlYWRzL2RldlwiLFwicmVmX3Byb3RlY3RlZFwiOlwiZmFsc2VcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImZlZWRtZXBvcy9ocm0tc2VydmljZVwiLFwicmVwb3NpdG9yeV9pZFwiOlwiMTEyNDY3MjIzNVwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiZmVlZG1lcG9zXCIsXCJyZXBvc2l0b3J5X293bmVyX2lkXCI6XCI1NDgzMTUxNVwiLFwicmVwb3NpdG9yeV92aXNpYmlsaXR5XCI6XCJwcml2YXRlXCIsXCJydW5fYXR0ZW1wdFwiOlwiMVwiLFwicnVuX2lkXCI6XCIyOTk3ODU3MjcxMlwiLFwicnVuX251bWJlclwiOlwiMTQxXCIsXCJydW5uZXJfZW52aXJvbm1lbnRcIjpcImdpdGh1Yi1ob3N0ZWRcIixcInNoYVwiOlwiNzY4YWIzNGJlYmJiYzg0OGRhZGRiY2I5NWE0NDcxZGFkNzE2MDI2MVwiLFwid29ya2Zsb3dcIjpcIlB1Ymxpc2ggaHJtLXBvcnRhbFwiLFwid29ya2Zsb3dfcmVmXCI6XCJmZWVkbWVwb3MvaHJtLXNlcnZpY2UvLmdpdGh1Yi93b3JrZmxvd3MvcHVibGlzaC1ocm0tcG9ydGFsLXRydXN0ZWQueW1sQHJlZnMvaGVhZHMvZGV2XCIsXCJ3b3JrZmxvd19zaGFcIjpcIjc2OGFiMzRiZWJiYmM4NDhkYWRkYmNiOTVhNDQ3MWRhZDcxNjAyNjFcIn0iLCJvaWRjX3N1YiI6InJlcG86ZmVlZG1lcG9zL2hybS1zZXJ2aWNlOnJlZjpyZWZzL2hlYWRzL2RldiIsIm9yY2hfaWQiOiJmOGJkOTBmYi03YzFhLTRmNTYtYWY2Zi0wMmU2YzllYjkwM2IucHVibGlzaC5wdWJsaXNoLl9fZGVmYXVsdCIsIm93bmVyX2lkIjoiRV9rZ0RPQUFKb1lRIiwicGxhbl9pZCI6ImY4YmQ5MGZiLTdjMWEtNGY1Ni1hZjZmLTAyZTZjOWViOTAzYiIsInJlcG9zaXRvcnlfaWQiOiIxMTI0NjcyMjM1IiwicmVwb3NpdG9yeV9vd25lcl9pZCI6IjU0ODMxNTE1IiwicmVwb3NpdG9yeV92aXNpYmlsaXR5IjoicHJpdmF0ZSIsInJ1bl9pZCI6IjI5OTc4NTcyNzEyIiwicnVuX251bWJlciI6IjE0MSIsInJ1bl90eXBlIjoiZnVsbCIsInJ1bm5lcl9pZCI6IjEwMDAwOTU0MzgiLCJydW5uZXJfdHlwZSI6Imhvc3RlZCIsInNjcCI6IkFjdGlvbnMuUmVzdWx0czpmOGJkOTBmYi03YzFhLTRmNTYtYWY2Zi0wMmU2YzllYjkwM2I6MmZkN2E0YmYtZWQyNS01NDc5LThmZmItYzE2NTBlMTg3ZjNhIEFjdGlvbnMuUnVubmVyOmY4YmQ5MGZiLTdjMWEtNGY1Ni1hZjZmLTAyZTZjOWViOTAzYjoyZmQ3YTRiZi1lZDI1LTU0NzktOGZmYi1jMTY1MGUxODdmM2EgQWN0aW9ucy5VcGxvYWRBcnRpZmFjdHM6ZjhiZDkwZmItN2MxYS00ZjU2LWFmNmYtMDJlNmM5ZWI5MDNiOjJmZDdhNGJmLWVkMjUtNTQ3OS04ZmZiLWMxNjUwZTE4N2YzYSBnZW5lcmF0ZV9pZF90b2tlbjpmOGJkOTBmYi03YzFhLTRmNTYtYWY2Zi0wMmU2YzllYjkwM2I6MmZkN2E0YmYtZWQyNS01NDc5LThmZmItYzE2NTBlMTg3ZjNhIEFjdGlvbnMuR2VuZXJpY1JlYWQ6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIiwic2hhIjoiNzY4YWIzNGJlYmJiYzg0OGRhZGRiY2I5NWE0NDcxZGFkNzE2MDI2MSIsInRydXN0X3RpZXIiOiIxIn0.H8SwdvScQax0bM9JYUs4Y_6fsYpgNPpLo4RTc8S22s29vPvE1O6Blkc_IrzEPhFDrfE16It6W_33dVZ_GAwRYiU5K_URRXgapD3t8cRBjxQdMH4LQybnpbbslJG0WbYZ51SclBn5gEQJd0zbT_8sgY8AtrskAM6jeRyQROJQkEwFKh2ZX2mDBDvI_4xMLtrIq4AuPCmvybXSAGonpbf0h8C0IOLhaSfOxTCLp_jZtVRG--XWwn1J18X7ym1r3-vdJc6jbZYyMsYkOvygntB8W_G1NMBhqgQZ8Xbe3Im71AKiqZXPVBaHGT0-etW2fPQkojpzyyriaz5VPcn2Scyg0w", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_package_dependencies_axios: "^1.7.7", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/hrm-service/hrm-service/node_modules/.bin:/home/runner/work/hrm-service/hrm-service/apps/hrm-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/hrm-service/hrm-service/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/24.5.0/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_29e64ee1-e035-46e5-b4bf-902fa58ce9fd", INVOCATION_ID: "2cbf39d49dff46c08bc6207e7f90afc4", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/24.5.0/x64/bin/node", npm_package_name: "@feedmepos/mf-hrm-portal", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "141", GITHUB_TRIGGERING_ACTOR: "jun-lee-feedme", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_build_mf: "vite build --mode fmmf", npm_package_scripts_publish_npm: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --access public --tag latest --no-git-checks", npm_package_scripts_publish_npm_beta: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --access public --tag beta --no-git-checks", npm_package_scripts_publish_github: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --tag latest --no-git-checks", npm_package_scripts_publish_github_beta: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --tag beta --no-git-checks", npm_config_frozen_lockfile: "", npm_package_devDependencies__vitest_ui: "^1.2.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_devDependencies__vue_eslint_config_typescript: "^12.0.0", npm_package_devDependencies_eslint: "^9.39.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000095438", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "dev", GITHUB_REPOSITORY: "feedmepos/hrm-service", npm_package_scripts_build_dts: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist", npm_package_dependencies__feedmepos_core: "^2.14.36", npm_lifecycle_script: "vite build --mode fmmf", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_scripts_test: "vitest", npm_package_dependencies_vue3_lottie: "^3.3.0", npm_package_devDependencies__casl_ability: "^3.4.0", npm_package_devDependencies__vitejs_plugin_vue_jsx: "^4.0.0", npm_package_devDependencies__vue_eslint_config_prettier: "^8.0.0", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "1124672235", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules/vite/bin/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules/vite/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "2.1.0-dev.2", npm_package_scripts_build_only: "pnpm build:mf && pnpm build:dts", npm_package_dependencies__feedmepos_hrm_permission: "workspace:*", npm_package_devDependencies__rushstack_eslint_patch: "^1.3.3", npm_package_devDependencies_eslint_plugin_unused_imports: "^4.3.0", npm_package_devDependencies_jsdom: "^24.0.0", npm_lifecycle_event: "build:mf", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: 'run-p type-check "build-only {@}" --', npm_package_dependencies_uuid: "^10.0.0", GITHUB_WORKSPACE: "/home/runner/work/hrm-service/hrm-service", ACCEPT_EULA: "Y", GITHUB_JOB: "publish", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "768ab34bebbbc848daddbcb95a4471dad7160261", GITHUB_RUN_ATTEMPT: "1", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.3.2", ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED: "1", GITHUB_REF: "refs/heads/dev", GITHUB_ACTOR: "jun-lee-feedme", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", VITE_TARGET_ENV: "dev", npm_package_devDependencies_globals: "^16.5.0", npm_package_scripts_format: "prettier --write src/", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_f2cfef7c-e7c3-47a6-885e-d2db229fb3e0", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", GITHUB_ACTOR_ID: "239282862", RUNNER_WORKSPACE: "/home/runner/work/hrm-service", npm_package_devDependencies_vue_eslint_parser: "^10.2.0", npm_config_link_workspace_packages: "true", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", ACTIONS_ID_TOKEN_REQUEST_URL: "https://run-actions-3-azure-eastus.actions.githubusercontent.com/52//idtoken/f8bd90fb-7c1a-4f56-af6f-02e6c9eb903b/2fd7a4bf-ed25-5479-8ffb-c1650e187f3a?api-version=2.0", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_f2cfef7c-e7c3-47a6-885e-d2db229fb3e0", npm_package_exports___types: "./dist/app.d.ts", npm_package_dependencies__feedmepos_auth: "^1.1.14", npm_package_dependencies__feedmepos_feature_flag: "^0.0.15", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", npm_package_devDependencies_eslint_plugin_vue: "^9.33.0", npm_package_devDependencies_postcss: "^8.4.31", 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_f2cfef7c-e7c3-47a6-885e-d2db229fb3e0", 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", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_f2cfef7c-e7c3-47a6-885e-d2db229fb3e0", INIT_CWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", npm_package_dependencies_libphonenumber_js: "^1.11.1", NODE_ENV: "production" } };
1857
+ const ma = "10.0.5";
1858
+ function fa() {
1859
+ typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Ye().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Ye().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ye().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ye().__INTLIFY_PROD_DEVTOOLS__ = !1);
1860
+ }
1861
+ const Qe = {
1862
+ // composer module errors
1863
+ UNEXPECTED_RETURN_TYPE: Sr,
1864
+ // 24
1865
+ // legacy module errors
1866
+ INVALID_ARGUMENT: 25,
1867
+ // i18n module errors
1868
+ MUST_BE_CALL_SETUP_TOP: 26,
1869
+ NOT_INSTALLED: 27,
1870
+ NOT_INSTALLED_WITH_PROVIDE: 31,
1871
+ // unexpected error
1872
+ UNEXPECTED_ERROR: 32
1873
+ };
1874
+ function ct(e, ...t) {
1875
+ return kt(e, null, void 0);
1876
+ }
1877
+ const Wt = /* @__PURE__ */ Ze("__translateVNode"), Yt = /* @__PURE__ */ Ze("__datetimeParts"), Zt = /* @__PURE__ */ Ze("__numberParts"), _a = Ze("__setPluralRules"), Qn = /* @__PURE__ */ Ze("__injectWithOption"), Bt = /* @__PURE__ */ Ze("__dispose");
1878
+ function ut(e) {
1879
+ if (!ee(e))
1880
+ return e;
1881
+ for (const t in e)
1882
+ if (Se(e, t))
1883
+ if (!t.includes("."))
1884
+ ee(e[t]) && ut(e[t]);
1885
+ else {
1886
+ const n = t.split("."), s = n.length - 1;
1887
+ let o = e, l = !1;
1888
+ for (let c = 0; c < s; c++) {
1889
+ if (n[c] in o || (o[n[c]] = re()), !ee(o[n[c]])) {
1890
+ l = !0;
1891
+ break;
1892
+ }
1893
+ o = o[n[c]];
1894
+ }
1895
+ l || (o[n[s]] = e[t], delete e[t]), ee(o[n[s]]) && ut(o[n[s]]);
1896
+ }
1897
+ return e;
1898
+ }
1899
+ function qn(e, t) {
1900
+ const { messages: n, __i18n: s, messageResolver: o, flatJson: l } = t, c = q(n) ? n : _e(s) ? re() : { [e]: re() };
1901
+ if (_e(s) && s.forEach((m) => {
1902
+ if ("locale" in m && "resource" in m) {
1903
+ const { locale: v, resource: I } = m;
1904
+ v ? (c[v] = c[v] || re(), It(I, c[v])) : It(I, c);
1905
+ } else
1906
+ W(m) && It(JSON.parse(m), c);
1907
+ }), o == null && l)
1908
+ for (const m in c)
1909
+ Se(c, m) && ut(c[m]);
1910
+ return c;
1911
+ }
1912
+ function es(e) {
1913
+ return e.type;
1914
+ }
1915
+ function pa(e, t, n) {
1916
+ let s = ee(t.messages) ? t.messages : re();
1917
+ "__i18nGlobal" in n && (s = qn(e.locale.value, {
1918
+ messages: s,
1919
+ __i18n: n.__i18nGlobal
1920
+ }));
1921
+ const o = Object.keys(s);
1922
+ o.length && o.forEach((l) => {
1923
+ e.mergeLocaleMessage(l, s[l]);
1924
+ });
1925
+ {
1926
+ if (ee(t.datetimeFormats)) {
1927
+ const l = Object.keys(t.datetimeFormats);
1928
+ l.length && l.forEach((c) => {
1929
+ e.mergeDateTimeFormat(c, t.datetimeFormats[c]);
1930
+ });
1931
+ }
1932
+ if (ee(t.numberFormats)) {
1933
+ const l = Object.keys(t.numberFormats);
1934
+ l.length && l.forEach((c) => {
1935
+ e.mergeNumberFormat(c, t.numberFormats[c]);
1936
+ });
1937
+ }
1938
+ }
1939
+ }
1940
+ function Rn(e) {
1941
+ return ie(is, null, e, 0);
1942
+ }
1943
+ const Ln = "__INTLIFY_META__", Sn = () => [], ba = () => !1;
1944
+ let An = 0;
1945
+ function Dn(e) {
1946
+ return (t, n, s, o) => e(n, s, Xt() || void 0, o);
1947
+ }
1948
+ const va = /* @__NO_SIDE_EFFECTS__ */ () => {
1949
+ const e = Xt();
1950
+ let t = null;
1951
+ return e && (t = es(e)[Ln]) ? { [Ln]: t } : null;
1952
+ };
1953
+ function ha(e = {}) {
1954
+ const { __root: t, __injectWithOption: n } = e, s = t === void 0, o = e.flatJson, l = ln ? dt : ls;
1955
+ let c = ue(e.inheritLocale) ? e.inheritLocale : !0;
1956
+ const m = l(
1957
+ // prettier-ignore
1958
+ t && c ? t.locale.value : W(e.locale) ? e.locale : Et
1959
+ ), v = l(
1960
+ // prettier-ignore
1961
+ t && c ? t.fallbackLocale.value : W(e.fallbackLocale) || _e(e.fallbackLocale) || q(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : m.value
1962
+ ), I = l(qn(m.value, e)), O = l(q(e.datetimeFormats) ? e.datetimeFormats : { [m.value]: {} }), L = l(q(e.numberFormats) ? e.numberFormats : { [m.value]: {} });
1963
+ let R = t ? t.missingWarn : ue(e.missingWarn) || yt(e.missingWarn) ? e.missingWarn : !0, U = t ? t.fallbackWarn : ue(e.fallbackWarn) || yt(e.fallbackWarn) ? e.fallbackWarn : !0, B = t ? t.fallbackRoot : ue(e.fallbackRoot) ? e.fallbackRoot : !0, M = !!e.fallbackFormat, P = le(e.missing) ? e.missing : null, u = le(e.missing) ? Dn(e.missing) : null, p = le(e.postTranslation) ? e.postTranslation : null, S = t ? t.warnHtmlMessage : ue(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, i = !!e.escapeParameter;
1964
+ const g = t ? t.modifiers : q(e.modifiers) ? e.modifiers : {};
1965
+ let y = e.pluralRules || t && t.pluralRules, b;
1966
+ b = (() => {
1967
+ s && gn(null);
1968
+ const _ = {
1969
+ version: ma,
1970
+ locale: m.value,
1971
+ fallbackLocale: v.value,
1972
+ messages: I.value,
1973
+ modifiers: g,
1974
+ pluralRules: y,
1975
+ missing: u === null ? void 0 : u,
1976
+ missingWarn: R,
1977
+ fallbackWarn: U,
1978
+ fallbackFormat: M,
1979
+ unresolving: !0,
1980
+ postTranslation: p === null ? void 0 : p,
1981
+ warnHtmlMessage: S,
1982
+ escapeParameter: i,
1983
+ messageResolver: e.messageResolver,
1984
+ messageCompiler: e.messageCompiler,
1985
+ __meta: { framework: "vue" }
1986
+ };
1987
+ _.datetimeFormats = O.value, _.numberFormats = L.value, _.__datetimeFormatters = q(b) ? b.__datetimeFormatters : void 0, _.__numberFormatters = q(b) ? b.__numberFormatters : void 0;
1988
+ const C = Kr(_);
1989
+ return s && gn(C), C;
1990
+ })(), rt(b, m.value, v.value);
1991
+ function f() {
1992
+ return [
1993
+ m.value,
1994
+ v.value,
1995
+ I.value,
1996
+ O.value,
1997
+ L.value
1998
+ ];
1999
+ }
2000
+ const T = z({
2001
+ get: () => m.value,
2002
+ set: (_) => {
2003
+ m.value = _, b.locale = m.value;
2004
+ }
2005
+ }), E = z({
2006
+ get: () => v.value,
2007
+ set: (_) => {
2008
+ v.value = _, b.fallbackLocale = v.value, rt(b, m.value, _);
2009
+ }
2010
+ }), h = z(() => I.value), Z = /* @__PURE__ */ z(() => O.value), H = /* @__PURE__ */ z(() => L.value);
2011
+ function Y() {
2012
+ return le(p) ? p : null;
2013
+ }
2014
+ function V(_) {
2015
+ p = _, b.postTranslation = _;
2016
+ }
2017
+ function j() {
2018
+ return P;
2019
+ }
2020
+ function $(_) {
2021
+ _ !== null && (u = Dn(_)), P = _, b.missing = u;
2022
+ }
2023
+ const te = (_, C, G, Q, Ee, Be) => {
2024
+ f();
2025
+ let Xe;
2026
+ try {
2027
+ da.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, s || (b.fallbackContext = t ? Jr() : void 0), Xe = _(b);
2028
+ } finally {
2029
+ __INTLIFY_PROD_DEVTOOLS__, s || (b.fallbackContext = void 0);
2030
+ }
2031
+ if (G !== "translate exists" && // for not `te` (e.g `t`)
2032
+ ve(Xe) && Xe === Tt || G === "translate exists" && !Xe) {
2033
+ const [rs, vl] = C();
2034
+ return t && B ? Q(t) : Ee(rs);
2035
+ } else {
2036
+ if (Be(Xe))
2037
+ return Xe;
2038
+ throw ct(Qe.UNEXPECTED_RETURN_TYPE);
2039
+ }
2040
+ };
2041
+ function me(..._) {
2042
+ return te((C) => Reflect.apply(On, null, [C, ..._]), () => Gt(..._), "translate", (C) => Reflect.apply(C.t, C, [..._]), (C) => C, (C) => W(C));
2043
+ }
2044
+ function pe(..._) {
2045
+ const [C, G, Q] = _;
2046
+ if (Q && !ee(Q))
2047
+ throw ct(Qe.INVALID_ARGUMENT);
2048
+ return me(C, G, he({ resolvedMessage: !0 }, Q || {}));
2049
+ }
2050
+ function Ne(..._) {
2051
+ return te((C) => Reflect.apply(yn, null, [C, ..._]), () => Vt(..._), "datetime format", (C) => Reflect.apply(C.d, C, [..._]), () => vn, (C) => W(C));
2052
+ }
2053
+ function be(..._) {
2054
+ return te((C) => Reflect.apply(Nn, null, [C, ..._]), () => xt(..._), "number format", (C) => Reflect.apply(C.n, C, [..._]), () => vn, (C) => W(C));
2055
+ }
2056
+ function ge(_) {
2057
+ return _.map((C) => W(C) || ve(C) || ue(C) ? Rn(String(C)) : C);
2058
+ }
2059
+ const K = {
2060
+ normalize: ge,
2061
+ interpolate: (_) => _,
2062
+ type: "vnode"
2063
+ };
2064
+ function oe(..._) {
2065
+ return te((C) => {
2066
+ let G;
2067
+ const Q = C;
2068
+ try {
2069
+ Q.processor = K, G = Reflect.apply(On, null, [Q, ..._]);
2070
+ } finally {
2071
+ Q.processor = null;
2072
+ }
2073
+ return G;
2074
+ }, () => Gt(..._), "translate", (C) => C[Wt](..._), (C) => [Rn(C)], (C) => _e(C));
2075
+ }
2076
+ function We(..._) {
2077
+ return te((C) => Reflect.apply(Nn, null, [C, ..._]), () => xt(..._), "number format", (C) => C[Zt](..._), Sn, (C) => W(C) || _e(C));
2078
+ }
2079
+ function et(..._) {
2080
+ return te((C) => Reflect.apply(yn, null, [C, ..._]), () => Vt(..._), "datetime format", (C) => C[Yt](..._), Sn, (C) => W(C) || _e(C));
2081
+ }
2082
+ function tt(_) {
2083
+ y = _, b.pluralRules = y;
2084
+ }
2085
+ function nt(_, C) {
2086
+ return te(() => {
2087
+ if (!_)
2088
+ return !1;
2089
+ const G = W(C) ? C : m.value, Q = Ue(G), Ee = b.messageResolver(Q, _);
2090
+ return ze(Ee) || Te(Ee) || W(Ee);
2091
+ }, () => [_], "translate exists", (G) => Reflect.apply(G.te, G, [_, C]), ba, (G) => ue(G));
2092
+ }
2093
+ function st(_) {
2094
+ let C = null;
2095
+ const G = Wn(b, v.value, m.value);
2096
+ for (let Q = 0; Q < G.length; Q++) {
2097
+ const Ee = I.value[G[Q]] || {}, Be = b.messageResolver(Ee, _);
2098
+ if (Be != null) {
2099
+ C = Be;
2100
+ break;
2101
+ }
2102
+ }
2103
+ return C;
2104
+ }
2105
+ function Ce(_) {
2106
+ const C = st(_);
2107
+ return C ?? (t ? t.tm(_) || {} : {});
2108
+ }
2109
+ function Ue(_) {
2110
+ return I.value[_] || {};
2111
+ }
2112
+ function k(_, C) {
2113
+ if (o) {
2114
+ const G = { [_]: C };
2115
+ for (const Q in G)
2116
+ Se(G, Q) && ut(G[Q]);
2117
+ C = G[_];
2118
+ }
2119
+ I.value[_] = C, b.messages = I.value;
2120
+ }
2121
+ function N(_, C) {
2122
+ I.value[_] = I.value[_] || {};
2123
+ const G = { [_]: C };
2124
+ if (o)
2125
+ for (const Q in G)
2126
+ Se(G, Q) && ut(G[Q]);
2127
+ C = G[_], It(C, I.value[_]), b.messages = I.value;
2128
+ }
2129
+ function A(_) {
2130
+ return O.value[_] || {};
2131
+ }
2132
+ function r(_, C) {
2133
+ O.value[_] = C, b.datetimeFormats = O.value, En(b, _, C);
2134
+ }
2135
+ function a(_, C) {
2136
+ O.value[_] = he(O.value[_] || {}, C), b.datetimeFormats = O.value, En(b, _, C);
2137
+ }
2138
+ function d(_) {
2139
+ return L.value[_] || {};
2140
+ }
2141
+ function F(_, C) {
2142
+ L.value[_] = C, b.numberFormats = L.value, kn(b, _, C);
2143
+ }
2144
+ function D(_, C) {
2145
+ L.value[_] = he(L.value[_] || {}, C), b.numberFormats = L.value, kn(b, _, C);
2146
+ }
2147
+ An++, t && ln && (wt(t.locale, (_) => {
2148
+ c && (m.value = _, b.locale = _, rt(b, m.value, v.value));
2149
+ }), wt(t.fallbackLocale, (_) => {
2150
+ c && (v.value = _, b.fallbackLocale = _, rt(b, m.value, v.value));
2151
+ }));
2152
+ const x = {
2153
+ id: An,
2154
+ locale: T,
2155
+ fallbackLocale: E,
2156
+ get inheritLocale() {
2157
+ return c;
2158
+ },
2159
+ set inheritLocale(_) {
2160
+ c = _, _ && t && (m.value = t.locale.value, v.value = t.fallbackLocale.value, rt(b, m.value, v.value));
2161
+ },
2162
+ get availableLocales() {
2163
+ return Object.keys(I.value).sort();
2164
+ },
2165
+ messages: h,
2166
+ get modifiers() {
2167
+ return g;
2168
+ },
2169
+ get pluralRules() {
2170
+ return y || {};
2171
+ },
2172
+ get isGlobal() {
2173
+ return s;
2174
+ },
2175
+ get missingWarn() {
2176
+ return R;
2177
+ },
2178
+ set missingWarn(_) {
2179
+ R = _, b.missingWarn = R;
2180
+ },
2181
+ get fallbackWarn() {
2182
+ return U;
2183
+ },
2184
+ set fallbackWarn(_) {
2185
+ U = _, b.fallbackWarn = U;
2186
+ },
2187
+ get fallbackRoot() {
2188
+ return B;
2189
+ },
2190
+ set fallbackRoot(_) {
2191
+ B = _;
2192
+ },
2193
+ get fallbackFormat() {
2194
+ return M;
2195
+ },
2196
+ set fallbackFormat(_) {
2197
+ M = _, b.fallbackFormat = M;
2198
+ },
2199
+ get warnHtmlMessage() {
2200
+ return S;
2201
+ },
2202
+ set warnHtmlMessage(_) {
2203
+ S = _, b.warnHtmlMessage = _;
2204
+ },
2205
+ get escapeParameter() {
2206
+ return i;
2207
+ },
2208
+ set escapeParameter(_) {
2209
+ i = _, b.escapeParameter = _;
2210
+ },
2211
+ t: me,
2212
+ getLocaleMessage: Ue,
2213
+ setLocaleMessage: k,
2214
+ mergeLocaleMessage: N,
2215
+ getPostTranslationHandler: Y,
2216
+ setPostTranslationHandler: V,
2217
+ getMissingHandler: j,
2218
+ setMissingHandler: $,
2219
+ [_a]: tt
2220
+ };
2221
+ return x.datetimeFormats = Z, x.numberFormats = H, x.rt = pe, x.te = nt, x.tm = Ce, x.d = Ne, x.n = be, x.getDateTimeFormat = A, x.setDateTimeFormat = r, x.mergeDateTimeFormat = a, x.getNumberFormat = d, x.setNumberFormat = F, x.mergeNumberFormat = D, x[Qn] = n, x[Wt] = oe, x[Yt] = et, x[Zt] = We, x;
2222
+ }
2223
+ const en = {
2224
+ tag: {
2225
+ type: [String, Object]
2226
+ },
2227
+ locale: {
2228
+ type: String
2229
+ },
2230
+ scope: {
2231
+ type: String,
2232
+ // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
2233
+ validator: (e) => e === "parent" || e === "global",
2234
+ default: "parent"
2235
+ /* ComponentI18nScope */
2236
+ },
2237
+ i18n: {
2238
+ type: Object
2239
+ }
2240
+ };
2241
+ function ga({ slots: e }, t) {
2242
+ return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((s, o) => [
2243
+ ...s,
2244
+ // prettier-ignore
2245
+ ...o.type === Oe ? o.children : [o]
2246
+ ], []) : t.reduce((n, s) => {
2247
+ const o = e[s];
2248
+ return o && (n[s] = o()), n;
2249
+ }, re());
2250
+ }
2251
+ function ts() {
2252
+ return Oe;
2253
+ }
2254
+ he({
2255
+ keypath: {
2256
+ type: String,
2257
+ required: !0
2258
+ },
2259
+ plural: {
2260
+ type: [Number, String],
2261
+ validator: (e) => ve(e) || !isNaN(e)
2262
+ }
2263
+ }, en);
2264
+ function Ia(e) {
2265
+ return _e(e) && !W(e[0]);
2266
+ }
2267
+ function ns(e, t, n, s) {
2268
+ const { slots: o, attrs: l } = t;
2269
+ return () => {
2270
+ const c = { part: !0 };
2271
+ let m = re();
2272
+ e.locale && (c.locale = e.locale), W(e.format) ? c.key = e.format : ee(e.format) && (W(e.format.key) && (c.key = e.format.key), m = Object.keys(e.format).reduce((R, U) => n.includes(U) ? he(re(), R, { [U]: e.format[U] }) : R, re()));
2273
+ const v = s(e.value, c, m);
2274
+ let I = [c.key];
2275
+ _e(v) ? I = v.map((R, U) => {
2276
+ const B = o[R.type], M = B ? B({ [R.type]: R.value, index: U, parts: v }) : [R.value];
2277
+ return Ia(M) && (M[0].key = `${R.type}-${U}`), M;
2278
+ }) : W(v) && (I = [v]);
2279
+ const O = he(re(), l), L = W(e.tag) || ee(e.tag) ? e.tag : ts();
2280
+ return Un(L, O, I);
2281
+ };
2282
+ }
2283
+ he({
2284
+ value: {
2285
+ type: Number,
2286
+ required: !0
2287
+ },
2288
+ format: {
2289
+ type: [String, Object]
2290
+ }
2291
+ }, en);
2292
+ he({
2293
+ value: {
2294
+ type: [Number, Date],
2295
+ required: !0
2296
+ },
2297
+ format: {
2298
+ type: [String, Object]
2299
+ }
2300
+ }, en);
2301
+ const ya = /* @__PURE__ */ Ze("global-vue-i18n");
2302
+ function Ct(e = {}) {
2303
+ const t = Xt();
2304
+ if (t == null)
2305
+ throw ct(Qe.MUST_BE_CALL_SETUP_TOP);
2306
+ if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
2307
+ throw ct(Qe.NOT_INSTALLED);
2308
+ const n = Ea(t), s = ka(n), o = es(t), l = Na(e, o);
2309
+ if (l === "global")
2310
+ return pa(s, e, o), s;
2311
+ if (l === "parent") {
2312
+ let v = Ta(n, t, e.__useComponent);
2313
+ return v == null && (v = s), v;
2314
+ }
2315
+ const c = n;
2316
+ let m = c.__getInstance(t);
2317
+ if (m == null) {
2318
+ const v = he({}, e);
2319
+ "__i18n" in o && (v.__i18n = o.__i18n), s && (v.__root = s), m = ha(v), c.__composerExtend && (m[Bt] = c.__composerExtend(m)), Oa(c, t, m), c.__setInstance(t, m);
2320
+ }
2321
+ return m;
2322
+ }
2323
+ function Ea(e) {
2324
+ const t = as(e.isCE ? ya : e.appContext.app.__VUE_I18N_SYMBOL__);
2325
+ if (!t)
2326
+ throw ct(e.isCE ? Qe.NOT_INSTALLED_WITH_PROVIDE : Qe.UNEXPECTED_ERROR);
2327
+ return t;
2328
+ }
2329
+ function Na(e, t) {
2330
+ return Nt(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
2331
+ }
2332
+ function ka(e) {
2333
+ return e.mode === "composition" ? e.global : e.global.__composer;
2334
+ }
2335
+ function Ta(e, t, n = !1) {
2336
+ let s = null;
2337
+ const o = t.root;
2338
+ let l = Ca(t, n);
2339
+ for (; l != null; ) {
2340
+ const c = e;
2341
+ if (e.mode === "composition")
2342
+ s = c.__getInstance(l);
2343
+ else if (__VUE_I18N_LEGACY_API__) {
2344
+ const m = c.__getInstance(l);
2345
+ m != null && (s = m.__composer, n && s && !s[Qn] && (s = null));
2346
+ }
2347
+ if (s != null || o === l)
2348
+ break;
2349
+ l = l.parent;
2350
+ }
2351
+ return s;
2352
+ }
2353
+ function Ca(e, t = !1) {
2354
+ return e == null ? null : t && e.vnode.ctx || e.parent;
2355
+ }
2356
+ function Oa(e, t, n) {
2357
+ jn(() => {
2358
+ }, t), os(() => {
2359
+ const s = n;
2360
+ e.__deleteInstance(t);
2361
+ const o = s[Bt];
2362
+ o && (o(), delete s[Bt]);
2363
+ }, t);
2364
+ }
2365
+ fa();
2366
+ Zr(Tr);
2367
+ Br(Gr);
2368
+ Xr(Wn);
2369
+ if (__INTLIFY_PROD_DEVTOOLS__) {
2370
+ const e = Ye();
2371
+ e.__INTLIFY__ = !0, Cr(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
2372
+ }
2373
+ const pt = /* @__PURE__ */ we({
2374
+ __name: "InheritPermissionTooltip",
2375
+ props: {
2376
+ item: {
2377
+ type: Object,
2378
+ required: !0
2379
+ }
2380
+ },
2381
+ setup(e) {
2382
+ const { t } = Ct();
2383
+ return (n, s) => {
2384
+ const o = Me("FmIcon"), l = Me("FmTooltip");
2385
+ return J(), Ae(l, {
2386
+ variant: "plain",
2387
+ placement: "right",
2388
+ "z-index": 50
2389
+ }, {
2390
+ content: de(() => [
2391
+ se("div", null, ke(X(t)("team.memberForm.permissions.inherited")), 1),
2392
+ (J(!0), ae(Oe, null, ye(e.item.setNames, (c) => (J(), ae("div", { key: c }, [
2393
+ se("div", null, "- " + ke(c), 1)
2394
+ ]))), 128))
2395
+ ]),
2396
+ default: de(() => [
2397
+ ie(o, {
2398
+ name: "admin_panel_settings",
2399
+ size: "sm",
2400
+ class: "ml-1 text-fm-color-typo-info"
2401
+ })
2402
+ ]),
2403
+ _: 1
2404
+ });
2405
+ };
2406
+ }
2407
+ });
2408
+ function Mn(e, t, n) {
2409
+ const s = n.filter((m) => m !== "manage");
2410
+ if (s.length === 0) return;
2411
+ const o = e.findIndex((m) => m.subject === t && !m.inverted);
2412
+ if (o < 0) return;
2413
+ const l = new Set(e[o].actions), c = s.every((m) => l.has(m));
2414
+ c && !l.has("manage") ? (l.add("manage"), e[o] = {
2415
+ ...e[o],
2416
+ actions: Array.from(l)
2417
+ }) : !c && l.has("manage") && (l.delete("manage"), l.size === 0 ? e.splice(o, 1) : e[o] = {
2418
+ ...e[o],
2419
+ actions: Array.from(l)
2420
+ });
2421
+ }
2422
+ const wn = Object.values(ys), Ra = {
2423
+ read: "View",
2424
+ create: "Duplicate",
2425
+ update: "Edit"
2426
+ };
2427
+ function La(e, t, n, s) {
2428
+ const { t: o } = qe(), { getFlagValue: l, getFlag: c } = Is(), m = z(() => {
2429
+ var Z;
2430
+ const f = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
2431
+ for (const H of t.value) {
2432
+ const Y = H.category;
2433
+ if (!Y) continue;
2434
+ const V = H.subject;
2435
+ if (n.value.includes(H.subject) || H.showByFeatureFlag && ((Z = c(H.showByFeatureFlag)) == null ? void 0 : Z.enabled) === !1 && l(H.showByFeatureFlag) === "true")
2436
+ continue;
2437
+ f.has(Y) || f.set(Y, []);
2438
+ const j = E.get(V) ?? 0;
2439
+ E.set(V, j + 1), f.get(Y).push({
2440
+ label: o(`permissionSet.permissionLabels.${V}`, H.label),
2441
+ value: V,
2442
+ optionKey: `${V}::${j}`
2443
+ }), T.has(V) || T.set(V, H);
2444
+ }
2445
+ return [...f.keys()].sort((H, Y) => {
2446
+ const V = wn.indexOf(H), j = wn.indexOf(Y);
2447
+ return V === -1 && j === -1 ? H.localeCompare(Y) : V === -1 ? 1 : j === -1 ? -1 : V - j;
2448
+ }).map((H) => {
2449
+ const Y = f.get(H), V = o(`permissionSet.categoryLabels.${H}`, H), j = /* @__PURE__ */ new Map();
2450
+ for (const K of Y) {
2451
+ const oe = T.get(K.value);
2452
+ oe && j.set(K.value, oe.actions);
2453
+ }
2454
+ const $ = Y.some((K) => {
2455
+ const oe = j.get(K.value);
2456
+ return oe && oe.length > 1;
2457
+ }), te = $ ? [
2458
+ ...new Set(
2459
+ Y.flatMap((K) => j.get(K.value) ?? []).filter((K) => K !== "manage")
2460
+ )
2461
+ ] : [], me = /* @__PURE__ */ new Map();
2462
+ for (const K of e.value)
2463
+ Y.some((oe) => oe.value === K.subject) && !K.inverted && me.set(K.subject, new Set(K.actions));
2464
+ const pe = $ ? e.value.filter(
2465
+ (K) => Y.some((oe) => oe.value === K.subject) && !K.inverted && K.actions.includes("manage")
2466
+ ).map((K) => K.subject) : e.value.filter((K) => Y.some((oe) => oe.value === K.subject) && !K.inverted).map((K) => K.subject), Ne = Y.find((K) => {
2467
+ var oe;
2468
+ return (oe = T.get(K.value)) == null ? void 0 : oe.isCategoryCover;
2469
+ }), be = (Ne == null ? void 0 : Ne.value) ?? null, ge = be ? me.get(be) ?? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set(), ce = ge.has("manage");
2470
+ return {
2471
+ category: H,
2472
+ label: V,
2473
+ options: Y,
2474
+ selectedSubjects: pe,
2475
+ isMultiAction: $,
2476
+ actionColumns: te,
2477
+ permissionActionsMap: j,
2478
+ selectedActionsMap: me,
2479
+ coverSubject: be,
2480
+ coverSelectedActions: ge,
2481
+ coverCoversAll: ce
2482
+ };
2483
+ });
2484
+ });
2485
+ function v(f, T) {
2486
+ var V;
2487
+ const E = ((V = m.value.find((j) => j.category === f)) == null ? void 0 : V.options) ?? [], h = new Set(E.map((j) => j.value)), Z = new Set(T), H = /* @__PURE__ */ new Set(), Y = t.value.flatMap(
2488
+ ({ category: j, showByFeatureFlag: $, isCategoryCover: te, ...me }) => {
2489
+ const pe = me.subject;
2490
+ return !Z.has(pe) || H.has(pe) ? [] : (H.add(pe), [me]);
2491
+ }
2492
+ );
2493
+ s("update:model-value", [
2494
+ ...e.value.filter((j) => !h.has(j.subject)),
2495
+ ...Y
2496
+ ]);
2497
+ }
2498
+ function I(f) {
2499
+ return f.options.length > 0 && f.options.every((T) => f.selectedSubjects.includes(T.value));
2500
+ }
2501
+ function O(f) {
2502
+ if (f.options.length === 0) return !1;
2503
+ const T = f.options.filter(
2504
+ (E) => f.selectedSubjects.includes(E.value)
2505
+ ).length;
2506
+ return T > 0 && T < f.options.length;
2507
+ }
2508
+ function L(f) {
2509
+ const T = new Set(f.options.map((h) => h.value)), E = e.value.filter((h) => !T.has(h.subject));
2510
+ if (I(f))
2511
+ s("update:model-value", E);
2512
+ else {
2513
+ const h = /* @__PURE__ */ new Set(), Z = t.value.flatMap(
2514
+ ({ category: H, showByFeatureFlag: Y, isCategoryCover: V, ...j }) => {
2515
+ const $ = j.subject;
2516
+ return !T.has($) || h.has($) ? [] : (h.add($), [j]);
2517
+ }
2518
+ );
2519
+ s("update:model-value", [...E, ...Z]);
2520
+ }
2521
+ }
2522
+ function R(f, T) {
2523
+ const E = f.selectedActionsMap.get(T);
2524
+ return E ? E.has("manage") : !1;
2525
+ }
2526
+ function U(f, T) {
2527
+ const E = f.permissionActionsMap.get(T);
2528
+ if (!E) return !1;
2529
+ const h = E.filter((Y) => Y !== "manage");
2530
+ if (h.length === 0) return !1;
2531
+ const Z = f.selectedActionsMap.get(T);
2532
+ if (!Z) return !1;
2533
+ const H = h.filter((Y) => Z.has(Y));
2534
+ return H.length > 0 && H.length < h.length;
2535
+ }
2536
+ function B(f, T, E) {
2537
+ if (E) {
2538
+ const h = t.value.find(($) => $.subject === T);
2539
+ if (!h) return;
2540
+ const {
2541
+ category: Z,
2542
+ showByFeatureFlag: H,
2543
+ isCategoryCover: Y,
2544
+ ...V
2545
+ } = h, j = e.value.filter(($) => $.subject !== T);
2546
+ j.push(V), s("update:model-value", j);
2547
+ } else
2548
+ s(
2549
+ "update:model-value",
2550
+ e.value.filter((h) => h.subject !== T)
2551
+ );
2552
+ }
2553
+ function M(f, T) {
2554
+ const E = f.permissionActionsMap.get(T);
2555
+ return E ? E.some((h) => h !== "manage") : !1;
2556
+ }
2557
+ function P(f, T, E) {
2558
+ const h = f.selectedActionsMap.get(T);
2559
+ return h ? h.has(E) : !1;
2560
+ }
2561
+ function u(f, T) {
2562
+ return !f.coverSubject || T === f.coverSubject ? !1 : f.coverCoversAll;
2563
+ }
2564
+ function p(f, T, E) {
2565
+ return !f.coverSubject || T === f.coverSubject ? !1 : f.coverCoversAll ? !0 : f.coverSelectedActions.has(E);
2566
+ }
2567
+ function S(f, T, E) {
2568
+ const h = f.permissionActionsMap.get(T);
2569
+ return h ? h.includes(E) : !1;
2570
+ }
2571
+ function i(f, T, E) {
2572
+ const h = [...e.value], Z = h.findIndex((Y) => Y.subject === f && !Y.inverted);
2573
+ if (E)
2574
+ if (Z >= 0) {
2575
+ const Y = { ...h[Z] }, V = new Set(Y.actions);
2576
+ V.add(T), Y.actions = Array.from(V), h[Z] = Y;
2577
+ } else {
2578
+ const Y = t.value.find((me) => me.subject === f);
2579
+ if (!Y) return;
2580
+ const {
2581
+ category: V,
2582
+ showByFeatureFlag: j,
2583
+ isCategoryCover: $,
2584
+ ...te
2585
+ } = Y;
2586
+ h.push({ ...te, actions: [T] });
2587
+ }
2588
+ else if (Z >= 0) {
2589
+ const Y = { ...h[Z] }, V = Y.actions.filter((j) => j !== T);
2590
+ V.length === 0 ? h.splice(Z, 1) : (Y.actions = V, h[Z] = Y);
2591
+ }
2592
+ const H = t.value.find((Y) => Y.subject === f);
2593
+ H && Mn(h, f, H.actions), s("update:model-value", h);
2594
+ }
2595
+ function g(f, T) {
2596
+ const E = f.options.filter(
2597
+ (h) => S(f, h.value, T)
2598
+ );
2599
+ return E.length === 0 ? !1 : E.every(
2600
+ (h) => P(f, h.value, T) || p(f, h.value, T)
2601
+ );
2602
+ }
2603
+ function y(f, T) {
2604
+ const E = f.options.filter(
2605
+ (Z) => S(f, Z.value, T)
2606
+ );
2607
+ if (E.length === 0) return !1;
2608
+ const h = E.filter(
2609
+ (Z) => P(f, Z.value, T) || p(f, Z.value, T)
2610
+ ).length;
2611
+ return h > 0 && h < E.length;
2612
+ }
2613
+ function b(f, T, E) {
2614
+ const h = [...e.value];
2615
+ for (const Z of f.options) {
2616
+ if (!S(f, Z.value, T)) continue;
2617
+ const H = Z.value, Y = h.findIndex(
2618
+ (j) => j.subject === H && !j.inverted
2619
+ );
2620
+ if (E)
2621
+ if (Y >= 0) {
2622
+ const j = { ...h[Y] }, $ = new Set(j.actions);
2623
+ $.add(T), j.actions = Array.from($), h[Y] = j;
2624
+ } else {
2625
+ const j = t.value.find((Ne) => Ne.subject === H);
2626
+ if (!j) continue;
2627
+ const {
2628
+ category: $,
2629
+ showByFeatureFlag: te,
2630
+ isCategoryCover: me,
2631
+ ...pe
2632
+ } = j;
2633
+ h.push({ ...pe, actions: [T] });
2634
+ }
2635
+ else if (Y >= 0) {
2636
+ const j = { ...h[Y] }, $ = j.actions.filter((te) => te !== T);
2637
+ $.length === 0 ? h.splice(Y, 1) : (j.actions = $, h[Y] = j);
2638
+ }
2639
+ const V = t.value.find((j) => j.subject === H);
2640
+ V && Mn(h, H, V.actions);
2641
+ }
2642
+ s("update:model-value", h);
2643
+ }
2644
+ function w(f) {
2645
+ const T = `permissionSet.actionLabels.${f}`, E = Ra[f] ?? f.charAt(0).toUpperCase() + f.slice(1);
2646
+ return o(T, E);
2647
+ }
2648
+ return {
2649
+ categoryGroups: m,
2650
+ toggleCategory: v,
2651
+ isAllManageChecked: I,
2652
+ isAllManageIndeterminate: O,
2653
+ toggleAllManage: L,
2654
+ isManageChecked: R,
2655
+ isManageIndeterminate: U,
2656
+ toggleManage: B,
2657
+ hasNonManageActions: M,
2658
+ isActionChecked: P,
2659
+ isRowFullyCoveredByCover: u,
2660
+ isActionCoveredByCover: p,
2661
+ permissionDefinesAction: S,
2662
+ toggleAction: i,
2663
+ isAllActionChecked: g,
2664
+ isAllActionIndeterminate: y,
2665
+ toggleAllAction: b,
2666
+ actionLabel: w
2667
+ };
2668
+ }
2669
+ const Sa = { class: "flex flex-col gap-16" }, Aa = { class: "fm-typo-en-title-sm-600" }, Da = { class: "mt-16" }, Ma = { class: "text-center text-sm font-semibold text-fm-color-typo-primary" }, wa = ["onClick"], Fa = { class: "flex justify-center" }, Pa = { class: "flex items-center min-w-0 gap-8" }, ja = ["title", "onClick"], Ua = { class: "flex justify-center" }, Va = /* @__PURE__ */ we({
2670
+ __name: "BasePermission",
2671
+ props: {
2672
+ modelValue: {
2673
+ type: Array,
2674
+ required: !0
2675
+ },
2676
+ disable: {
2677
+ type: Boolean,
2678
+ default: !1
2679
+ },
2680
+ excludedSubjects: {
2681
+ type: Array,
2682
+ required: !0
2683
+ },
2684
+ additionalPermissions: {
2685
+ type: Array,
2686
+ default: () => []
2687
+ }
2688
+ },
2689
+ emits: ["update:model-value"],
2690
+ setup(e, { emit: t }) {
2691
+ const n = e, s = t, { t: o } = qe(), l = z(() => [...Vn, ...n.additionalPermissions]), {
2692
+ categoryGroups: c,
2693
+ isAllManageChecked: m,
2694
+ isAllManageIndeterminate: v,
2695
+ toggleAllManage: I,
2696
+ isManageChecked: O,
2697
+ isManageIndeterminate: L,
2698
+ toggleManage: R,
2699
+ isActionChecked: U,
2700
+ isRowFullyCoveredByCover: B,
2701
+ isActionCoveredByCover: M,
2702
+ permissionDefinesAction: P,
2703
+ toggleAction: u,
2704
+ isAllActionChecked: p,
2705
+ isAllActionIndeterminate: S,
2706
+ toggleAllAction: i,
2707
+ actionLabel: g
2708
+ } = La(
2709
+ tn(n, "modelValue"),
2710
+ l,
2711
+ tn(n, "excludedSubjects"),
2712
+ (w, f) => s("update:model-value", f)
2713
+ );
2714
+ function y(w) {
2715
+ const f = w.selectedSubjects.length;
2716
+ return f === 0 ? "" : o("team.memberForm.permissions.allowedCount", { count: f });
2717
+ }
2718
+ function b(w, f) {
2719
+ return O(w, f) || B(w, f) ? !0 : w.actionColumns.some(
2720
+ (T) => P(w, f, T) && (U(w, f, T) || M(w, f, T))
2721
+ );
2722
+ }
2723
+ return (w, f) => {
2724
+ const T = Me("FmCheckbox");
2725
+ return J(), ae("div", Sa, [
2726
+ (J(!0), ae(Oe, null, ye(X(c), (E) => (J(), Ae(Ht, {
2727
+ key: E.category,
2728
+ subtitle: y(E)
2729
+ }, {
2730
+ title: de(() => [
2731
+ se("p", Aa, ke(E.label), 1)
2732
+ ]),
2733
+ default: de(() => [
2734
+ se("div", Da, [
2735
+ se("div", {
2736
+ class: "grid items-center px-12 py-8",
2737
+ style: Je({
2738
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${E.actionColumns.length + 1}, 80px)`
2739
+ })
2740
+ }, [
2741
+ f[0] || (f[0] = se("div", null, null, -1)),
2742
+ se("div", Ma, ke(X(o)("team.memberForm.permissions.columnManage")), 1),
2743
+ (J(!0), ae(Oe, null, ye(E.actionColumns, (h) => (J(), ae("div", {
2744
+ key: `header-${h}`,
2745
+ class: "text-center text-sm font-semibold text-fm-color-typo-primary"
2746
+ }, ke(X(g)(h)), 1))), 128))
2747
+ ], 4),
2748
+ se("div", {
2749
+ class: "grid items-center bg-fm-color-neutral-gray-100 px-12 py-8",
2750
+ style: Je({
2751
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${E.actionColumns.length + 1}, 80px)`
2752
+ })
2753
+ }, [
2754
+ se("div", {
2755
+ class: "cursor-pointer font-semibold",
2756
+ onClick: (h) => !e.disable && X(I)(E)
2757
+ }, ke(X(o)("team.labels.all")), 9, wa),
2758
+ se("div", Fa, [
2759
+ ie(T, {
2760
+ "model-value": X(m)(E),
2761
+ indeterminate: X(v)(E),
2762
+ value: !0,
2763
+ disabled: e.disable,
2764
+ size: "sm",
2765
+ dense: "",
2766
+ "onUpdate:modelValue": (h) => X(I)(E)
2767
+ }, null, 8, ["model-value", "indeterminate", "disabled", "onUpdate:modelValue"])
2768
+ ]),
2769
+ (J(!0), ae(Oe, null, ye(E.actionColumns, (h) => (J(), ae("div", {
2770
+ key: `all-${h}`,
2771
+ class: "flex justify-center"
2772
+ }, [
2773
+ ie(T, {
2774
+ "model-value": X(p)(E, h),
2775
+ indeterminate: X(S)(E, h),
2776
+ value: h,
2777
+ disabled: e.disable,
2778
+ size: "sm",
2779
+ dense: "",
2780
+ "onUpdate:modelValue": (Z) => X(i)(E, h, Z)
2781
+ }, null, 8, ["model-value", "indeterminate", "value", "disabled", "onUpdate:modelValue"])
2782
+ ]))), 128))
2783
+ ], 4),
2784
+ f[1] || (f[1] = se("div", { class: "h-px bg-fm-color-neutral-gray-200" }, null, -1)),
2785
+ (J(!0), ae(Oe, null, ye(E.options, (h) => (J(), ae("div", {
2786
+ key: h.optionKey,
2787
+ class: "grid items-center rounded px-12 py-8 transition-colors hover:bg-fm-color-neutral-gray-100",
2788
+ style: Je({
2789
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${E.actionColumns.length + 1}, 80px)`
2790
+ })
2791
+ }, [
2792
+ se("div", Pa, [
2793
+ se("span", {
2794
+ class: "block truncate cursor-pointer",
2795
+ title: h.label,
2796
+ onClick: (Z) => !e.disable && !X(B)(E, h.value) && X(R)(E, h.value, !X(O)(E, h.value))
2797
+ }, ke(h.label), 9, ja),
2798
+ Re(w.$slots, `checkbox-${h.value}-append`, {
2799
+ option: h,
2800
+ isEffectiveSelected: b(E, h.value),
2801
+ isCoveredByCover: X(B)(E, h.value) || E.actionColumns.some((Z) => X(M)(E, h.value, Z))
2802
+ }),
2803
+ Re(w.$slots, `checkbox-${h.value}-icon`, {
2804
+ option: h,
2805
+ isEffectiveSelected: b(E, h.value),
2806
+ isCoveredByCover: X(B)(E, h.value) || E.actionColumns.some((Z) => X(M)(E, h.value, Z))
2807
+ })
2808
+ ]),
2809
+ se("div", Ua, [
2810
+ ie(T, {
2811
+ "model-value": X(O)(E, h.value) || X(B)(E, h.value),
2812
+ value: h.value,
2813
+ disabled: e.disable || X(B)(E, h.value),
2814
+ indeterminate: X(L)(E, h.value),
2815
+ size: "sm",
2816
+ "onUpdate:modelValue": (Z) => X(R)(E, h.value, Z)
2817
+ }, null, 8, ["model-value", "value", "disabled", "indeterminate", "onUpdate:modelValue"])
2818
+ ]),
2819
+ (J(!0), ae(Oe, null, ye(E.actionColumns, (Z) => (J(), ae("div", {
2820
+ key: `${h.optionKey}-${Z}`,
2821
+ class: "flex justify-center"
2822
+ }, [
2823
+ X(P)(E, h.value, Z) ? (J(), Ae(T, {
2824
+ key: 0,
2825
+ "model-value": X(U)(E, h.value, Z) || X(M)(E, h.value, Z),
2826
+ value: Z,
2827
+ disabled: e.disable || X(M)(E, h.value, Z),
2828
+ size: "sm",
2829
+ "onUpdate:modelValue": (H) => X(u)(h.value, Z, H)
2830
+ }, null, 8, ["model-value", "value", "disabled", "onUpdate:modelValue"])) : Le("", !0)
2831
+ ]))), 128))
2832
+ ], 4))), 128))
2833
+ ])
2834
+ ]),
2835
+ _: 2
2836
+ }, 1032, ["subtitle"]))), 128))
2837
+ ]);
2838
+ };
2839
+ }
2840
+ }), xa = { class: "space-y-16" }, Ga = {
2841
+ key: 0,
2842
+ class: "flex fm-typo-en-title-sm-600"
2843
+ }, Wa = {
2844
+ key: 0,
2845
+ class: "q-mr-xs text-red col"
2846
+ }, Ya = { class: "form-input" }, Za = /* @__PURE__ */ we({
2847
+ __name: "AppForm",
2848
+ props: {
2849
+ title: {
2850
+ type: String,
2851
+ default: void 0
2852
+ },
2853
+ required: {
2854
+ type: [Boolean, String],
2855
+ default: !1
2856
+ },
2857
+ inline: {
2858
+ type: Boolean,
2859
+ default: !1
2860
+ }
2861
+ },
2862
+ setup(e) {
2863
+ const t = e;
2864
+ return (n, s) => (J(), ae("div", xa, [
2865
+ Re(n.$slots, "top", {}, () => [
2866
+ t.title ? (J(), ae("div", Ga, [
2867
+ se("div", null, [
2868
+ t.required ? (J(), ae("span", Wa, "*")) : Le("", !0),
2869
+ cs(ke(t.title), 1)
2870
+ ]),
2871
+ Re(n.$slots, "title-right")
2872
+ ])) : Le("", !0)
2873
+ ]),
2874
+ se("div", Ya, [
2875
+ Re(n.$slots, "default")
2876
+ ])
2877
+ ]));
2878
+ }
2879
+ });
2880
+ function Ba(e, t) {
2881
+ let n = "", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
2882
+ const o = s.length;
2883
+ for (let l = 0; l < e; l++)
2884
+ n += s.charAt(Math.floor(Math.random() * o));
2885
+ return n;
2886
+ }
2887
+ const Xa = { class: "col flex items-center" }, Ha = {
2888
+ key: 1,
2889
+ class: "q-pa-sm form-error-message text-error"
2890
+ }, ss = /* @__PURE__ */ we({
2891
+ __name: "CheckboxInput",
2892
+ props: {
2893
+ options: {
2894
+ type: Array,
2895
+ required: !0
2896
+ },
2897
+ title: {
2898
+ type: String,
2899
+ required: !0
2900
+ },
2901
+ modelValue: {
2902
+ type: Array,
2903
+ required: !0
2904
+ },
2905
+ showAllToggle: {
2906
+ type: [Boolean, String],
2907
+ default: !0
2908
+ },
2909
+ includeDisabledOptionsWhenSelectAll: {
2910
+ type: Boolean,
2911
+ default: !1
2912
+ },
2913
+ disable: {
2914
+ type: Boolean,
2915
+ default: !1
2916
+ },
2917
+ min: {
2918
+ type: Number,
2919
+ default: 0
2920
+ },
2921
+ max: {
2922
+ type: Number,
2923
+ default: void 0
2924
+ },
2925
+ showIntermediate: {
2926
+ type: Boolean,
2927
+ default: !0
2928
+ },
2929
+ gutter: {
2930
+ type: Number,
2931
+ default: void 0
2932
+ },
2933
+ falsyShowSlot: {
2934
+ type: Boolean,
2935
+ default: !1
2936
+ },
2937
+ bottomSlotIndent: {
2938
+ type: String,
2939
+ default: "36px"
2940
+ },
2941
+ alignCenter: {
2942
+ type: Boolean,
2943
+ default: !0
2944
+ }
2945
+ },
2946
+ emits: ["update:model-value"],
2947
+ setup(e, { emit: t }) {
2948
+ const n = e, s = t, { t: o } = qe(), l = dt(!1), c = us(), m = z(() => n.modelValue.length < n.min ? `Min selection ${n.min}` : n.max !== void 0 && n.modelValue.length > n.max ? `Max selection ${n.max}` : !0), v = `checkbox-${Ba(6)}`, I = z(() => m.value !== !0), O = z(
2949
+ () => n.modelValue.filter((M) => n.options.some((P) => P.value === M))
2950
+ ), L = z(
2951
+ () => typeof n.showAllToggle == "boolean" ? o("team.labels.all") : n.showAllToggle
2952
+ ), R = z(() => n.options.length > 0 && n.options.length === O.value.length);
2953
+ function U() {
2954
+ const M = n.modelValue.filter((P) => !O.value.includes(P));
2955
+ if (R.value === !0)
2956
+ s("update:model-value", M);
2957
+ else {
2958
+ const P = n.includeDisabledOptionsWhenSelectAll ? n.options.map((u) => u.value) : n.options.filter((u) => !u.disabled).map((u) => u.value);
2959
+ s("update:model-value", [...M, ...P]);
2960
+ }
2961
+ }
2962
+ function B(M, P) {
2963
+ let u = gt(n.modelValue);
2964
+ P ? u.every((p) => p !== M) && u.push(M) : u = u.filter((p) => p !== M), s("update:model-value", u);
2965
+ }
2966
+ return (M, P) => {
2967
+ const u = Me("FmCheckbox");
2968
+ return J(), Ae(Za, {
2969
+ id: v,
2970
+ title: e.title,
2971
+ required: !1
2972
+ }, {
2973
+ top: de(() => [
2974
+ Re(M.$slots, "top")
2975
+ ]),
2976
+ default: de(() => [
2977
+ n.showAllToggle ? (J(), Ae(u, {
2978
+ key: 0,
2979
+ "model-value": R.value,
2980
+ disabled: e.disable,
2981
+ label: L.value,
2982
+ style: Je(`margin-bottom: ${n.gutter}px`),
2983
+ size: "sm",
2984
+ dense: "",
2985
+ value: L.value,
2986
+ "onUpdate:modelValue": U
2987
+ }, null, 8, ["model-value", "disabled", "label", "style", "value"])) : Le("", !0),
2988
+ (J(!0), ae(Oe, null, ye(e.options, (p, S) => (J(), ae("div", {
2989
+ key: p.value,
2990
+ style: Je(`margin-bottom: ${S < e.options.length - 1 ? n.gutter : 0}px`),
2991
+ class: at(S < e.options.length - 1 ? "q-mb-sm" : "")
2992
+ }, [
2993
+ se("div", {
2994
+ class: at(["row justify-between", e.alignCenter ? "items-center" : "items-start"])
2995
+ }, [
2996
+ se("div", Xa, [
2997
+ ie(u, {
2998
+ "model-value": e.modelValue.includes(p.value),
2999
+ disabled: e.disable || p.disabled,
3000
+ size: "sm",
3001
+ label: p.label,
3002
+ value: p.label,
3003
+ "onUpdate:modelValue": (i) => B(p.value, i)
3004
+ }, null, 8, ["model-value", "disabled", "label", "value", "onUpdate:modelValue"]),
3005
+ Re(M.$slots, `checkbox-${p.key || p.value}-append`, {
3006
+ option: p,
3007
+ selected: e.modelValue.includes(p.value)
3008
+ })
3009
+ ]),
3010
+ X(c)[`checkbox-${p.key || p.value}-end`] && (e.modelValue.includes(p.value) || e.falsyShowSlot) ? (J(), ae("div", {
3011
+ key: 0,
3012
+ class: at([{ "q-checkbox disabled": e.disable || p.disabled }, "col"])
3013
+ }, [
3014
+ Re(M.$slots, `checkbox-${p.key || p.value}-end`, {
3015
+ option: p,
3016
+ value: e.modelValue.includes(p.value),
3017
+ disable: e.disable || p.disabled
3018
+ })
3019
+ ], 2)) : Le("", !0)
3020
+ ], 2),
3021
+ X(c)[`checkbox-${p.key || p.value}-bottom`] && (e.modelValue.includes(p.value) || e.falsyShowSlot) ? (J(), ae("div", {
3022
+ key: 0,
3023
+ class: at(["q-mt-sm", { "q-checkbox disabled": e.disable || p.disabled }]),
3024
+ style: Je(`margin-left: ${e.bottomSlotIndent}`)
3025
+ }, [
3026
+ Re(M.$slots, `checkbox-${p.key || p.value}-bottom`, {
3027
+ option: p,
3028
+ disable: e.disable || p.disabled,
3029
+ value: e.modelValue.includes(p.value)
3030
+ })
3031
+ ], 6)) : Le("", !0)
3032
+ ], 6))), 128)),
3033
+ l.value && I.value ? (J(), ae("div", Ha, ke(m.value), 1)) : Le("", !0)
3034
+ ]),
3035
+ _: 3
3036
+ }, 8, ["title"]);
3037
+ };
3038
+ }
3039
+ }), $a = { class: "fm-typo-en-title-sm-600" }, bt = "includedFuture", Fn = /* @__PURE__ */ we({
3040
+ __name: "ConditionPermission",
3041
+ props: {
3042
+ modelValue: {
3043
+ type: Array,
3044
+ default: null
3045
+ },
3046
+ options: {
3047
+ type: Array,
3048
+ required: !0
3049
+ },
3050
+ disable: {
3051
+ type: Boolean,
3052
+ default: !1
3053
+ },
3054
+ context: {
3055
+ type: String,
3056
+ required: !0
3057
+ }
3058
+ },
3059
+ emits: ["update:model-value"],
3060
+ setup(e, { emit: t }) {
3061
+ const n = e, s = t, { t: o } = qe(), l = z(() => [
3062
+ {
3063
+ label: o("team.memberForm.permissions.includedFuture", { context: n.context }),
3064
+ value: bt,
3065
+ // Can only be selected if all other options are selected
3066
+ disabled: !!n.modelValue && n.options.length > n.modelValue.length
3067
+ },
3068
+ ...n.options.filter(
3069
+ (O) => O.label.toLocaleLowerCase().includes(I.value.toLocaleLowerCase())
3070
+ )
3071
+ ]), c = z(() => n.modelValue ? n.modelValue : [bt, ...n.options.map((O) => O.value)]), m = z(() => {
3072
+ const O = c.value.filter((L) => L !== bt).length;
3073
+ return O === 0 ? "" : o("team.memberForm.permissions.allowedCount", { count: O });
3074
+ });
3075
+ function v(O) {
3076
+ const L = O.length === l.value.length;
3077
+ s("update:model-value", L ? null : O.filter((R) => R !== bt));
3078
+ }
3079
+ const I = dt("");
3080
+ return (O, L) => {
3081
+ const R = Me("fm-search");
3082
+ return J(), Ae(Ht, { subtitle: m.value }, {
3083
+ title: de(() => [
3084
+ se("p", $a, ke(X(o)("team.memberForm.permissions.manageable", { context: e.context })), 1)
3085
+ ]),
3086
+ default: de(() => [
3087
+ e.options.length > 1 ? (J(), Ae(R, {
3088
+ key: 0,
3089
+ modelValue: I.value,
3090
+ "onUpdate:modelValue": L[0] || (L[0] = (U) => I.value = U),
3091
+ class: "mt-16",
3092
+ placeholder: X(o)("team.memberForm.permissions.search", { context: e.context })
3093
+ }, null, 8, ["modelValue", "placeholder"])) : Le("", !0),
3094
+ ie(ss, {
3095
+ "model-value": c.value,
3096
+ options: l.value,
3097
+ "show-intermediate": !1,
3098
+ "show-all-toggle": !0,
3099
+ disable: e.disable,
3100
+ "include-disabled-options-when-select-all": !0,
3101
+ title: "",
3102
+ class: "mt-16",
3103
+ "onUpdate:modelValue": v
3104
+ }, $e({ _: 2 }, [
3105
+ ye(l.value, (U) => ({
3106
+ name: `checkbox-${U.value}-append`,
3107
+ fn: de(({ option: B }) => [
3108
+ Re(O.$slots, `checkbox-${U.value}-append`, { option: B })
3109
+ ])
3110
+ }))
3111
+ ]), 1032, ["model-value", "options", "disable"])
3112
+ ]),
3113
+ _: 3
3114
+ }, 8, ["subtitle"]);
3115
+ };
3116
+ }
3117
+ }), Ja = { class: "fm-typo-en-title-sm-600" }, vt = "includedNewRole", Ka = /* @__PURE__ */ we({
3118
+ __name: "PosRolePermission",
3119
+ props: {
3120
+ modelValue: {
3121
+ type: Array,
3122
+ default: null
3123
+ },
3124
+ roles: {
3125
+ type: Array,
3126
+ required: !0
3127
+ },
3128
+ restaurantIds: {
3129
+ type: Array,
3130
+ default: null
3131
+ },
3132
+ disable: {
3133
+ type: Boolean,
3134
+ default: !1
3135
+ }
3136
+ },
3137
+ emits: ["update:model-value"],
3138
+ setup(e, { emit: t }) {
3139
+ const n = e, s = t, { t: o } = qe(), l = z(() => {
3140
+ const I = n.restaurantIds;
3141
+ return [
3142
+ {
3143
+ label: o("team.memberForm.permissions.includedNewRole"),
3144
+ value: vt,
3145
+ disabled: !!n.modelValue && n.roles.length > n.modelValue.length
3146
+ },
3147
+ ...n.roles.map((O) => ({
3148
+ label: O.name,
3149
+ value: O._id,
3150
+ disabled: !!I && O.restaurants.every(({ id: L }) => !I.includes(L))
3151
+ }))
3152
+ ];
3153
+ }), c = z(() => n.modelValue ? n.modelValue : [vt, ...n.roles.map((I) => I._id)]), m = z(() => {
3154
+ const I = c.value.filter((O) => O !== vt).length;
3155
+ return I === 0 ? "" : o("team.memberForm.permissions.allowedCount", { count: I });
3156
+ });
3157
+ function v(I) {
3158
+ const O = I.length === l.value.length;
3159
+ s("update:model-value", O ? null : I.filter((L) => L !== vt));
3160
+ }
3161
+ return (I, O) => (J(), Ae(Ht, { subtitle: m.value }, {
3162
+ title: de(() => [
3163
+ se("p", Ja, ke(X(o)("team.memberForm.permissions.roles")), 1)
3164
+ ]),
3165
+ default: de(() => [
3166
+ ie(ss, {
3167
+ "model-value": c.value,
3168
+ options: l.value,
3169
+ "show-intermediate": !1,
3170
+ "show-all-toggle": !1,
3171
+ disable: e.disable,
3172
+ title: "",
3173
+ class: "mt-16",
3174
+ "onUpdate:modelValue": v
3175
+ }, $e({ _: 2 }, [
3176
+ ye(l.value, (L) => ({
3177
+ name: `checkbox-${L.value}-append`,
3178
+ fn: de(({ option: R }) => [
3179
+ Re(I.$slots, `checkbox-${L.value}-append`, { option: R })
3180
+ ])
3181
+ }))
3182
+ ]), 1032, ["model-value", "options", "disable"])
3183
+ ]),
3184
+ _: 3
3185
+ }, 8, ["subtitle"]));
3186
+ }
3187
+ }), za = {
3188
+ async readWarehouses() {
3189
+ return Ns(await ks().get("/warehouses"));
3190
+ }
3191
+ }, Qa = {
3192
+ MY: "Asia/Kuala_Lumpur",
3193
+ SG: "Asia/Singapore",
3194
+ TH: "Asia/Bangkok",
3195
+ ID: "Asia/Jakarta",
3196
+ MO: "Asia/Macau",
3197
+ BN: "Asia/Brunei",
3198
+ PK: "Asia/Karachi",
3199
+ MV: "Indian/Maldives",
3200
+ VN: "Asia/Ho_Chi_Minh",
3201
+ JP: "Asia/Tokyo",
3202
+ AU: "Australia/Sydney",
3203
+ AE: "Asia/Dubai",
3204
+ UK: "Europe/London"
3205
+ };
3206
+ function qa(e) {
3207
+ const t = (e || "").toUpperCase();
3208
+ return Qa[t] ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
3209
+ }
3210
+ function el(e, t) {
3211
+ return e != null && e.timezone ? e.timezone : e != null && e.timeZone ? e.timeZone : qa((e == null ? void 0 : e.country) ?? t);
3212
+ }
3213
+ function ht(e, t) {
3214
+ return `${e}::${t.builderKey}`;
3215
+ }
3216
+ function lt(e) {
3217
+ try {
3218
+ return e.conditions ? JSON.parse(e.conditions) : void 0;
3219
+ } catch {
3220
+ return;
3221
+ }
3222
+ }
3223
+ function tl(e, t) {
3224
+ return e.find((n) => !n.inverted && n.subject === t);
3225
+ }
3226
+ function Mt(e, t) {
3227
+ const n = new Set(e.actions);
3228
+ return n.has(fe.Action.manage) ? !0 : t.actions.every((s) => n.has(s));
3229
+ }
3230
+ function Pn(e, t) {
3231
+ const n = lt(e);
3232
+ return Ft(n, [{ builder: t, formValue: t.fromCondition(void 0) }]);
3233
+ }
3234
+ function nl(e, t, n) {
3235
+ const s = dt(/* @__PURE__ */ new Set());
3236
+ function o(i) {
3237
+ return Os(i, t.value);
3238
+ }
3239
+ function l(i) {
3240
+ return t.value.find((g) => g.subject === i);
3241
+ }
3242
+ function c(i) {
3243
+ var y;
3244
+ const g = o(i);
3245
+ return g ? (y = l(g)) == null ? void 0 : y.label : void 0;
3246
+ }
3247
+ function m(i) {
3248
+ return tl(e.value, i);
3249
+ }
3250
+ function v(i, g) {
3251
+ return Pt(lt(i), g);
3252
+ }
3253
+ function I(i, g) {
3254
+ var w;
3255
+ if (!(((w = g.appliesToActions) == null ? void 0 : w.call(g, i.actions)) ?? !0)) return !1;
3256
+ const y = o(i.subject);
3257
+ if (!y) return !1;
3258
+ const b = m(y);
3259
+ return b ? Object.keys(v(b, g)).length > 0 : !1;
3260
+ }
3261
+ function O(i, g) {
3262
+ return !I(i, g) || s.value.has(ht(i.subject, g)) ? "custom" : i.index === null ? "inherit" : "custom";
3263
+ }
3264
+ function L(i, g, y) {
3265
+ if (!g.summarizeForm) return;
3266
+ const b = o(i.subject);
3267
+ if (!b) return;
3268
+ const w = m(b);
3269
+ if (!w) return;
3270
+ const f = g.fromCondition(v(w, g));
3271
+ return g.summarizeForm(f, { timeZone: y });
3272
+ }
3273
+ function R(i, g) {
3274
+ if (i.index === null) return;
3275
+ const y = [...e.value], b = { ...y[i.index] }, w = Pn(b, g), f = Object.keys(w).length === 0, T = o(i.subject), E = T ? m(T) : void 0, h = E ? Mt(E, b) : !1;
3276
+ f && h ? y.splice(i.index, 1) : (f ? delete b.conditions : b.conditions = JSON.stringify(w), y[i.index] = b), n(y);
3277
+ }
3278
+ function U(i, g, y) {
3279
+ const b = ht(i.subject, g);
3280
+ if (y === "inherit") {
3281
+ const f = new Set(s.value);
3282
+ f.delete(b), s.value = f, R(i, g);
3283
+ return;
3284
+ }
3285
+ const w = new Set(s.value);
3286
+ w.add(b), s.value = w, i.index === null && p(i, g, g.fromCondition(void 0), {
3287
+ forceCreateRule: !0
3288
+ });
3289
+ }
3290
+ function B(i) {
3291
+ const g = o(i);
3292
+ if (!g) return [];
3293
+ const y = m(g);
3294
+ return (y == null ? void 0 : y.actions) ?? [];
3295
+ }
3296
+ function M(i, g) {
3297
+ return e.value.filter((y) => {
3298
+ if (y.inverted) return !1;
3299
+ const b = y.subject;
3300
+ return b === i || o(b) !== i ? !1 : s.value.has(ht(b, g)) ? !0 : Object.keys(Pt(lt(y), g)).length > 0;
3301
+ });
3302
+ }
3303
+ function P(i, g) {
3304
+ const y = `::${g.builderKey}`, b = new Set(s.value);
3305
+ for (const w of b) {
3306
+ if (!w.endsWith(y)) continue;
3307
+ const f = w.slice(0, -y.length);
3308
+ o(f) === i && b.delete(w);
3309
+ }
3310
+ s.value = b;
3311
+ }
3312
+ function u(i, g, y) {
3313
+ const b = g.subject;
3314
+ return i.reduce((w, f) => {
3315
+ if (f.inverted)
3316
+ return w.push(f), w;
3317
+ const T = f.subject;
3318
+ if (T === b || o(T) !== b || !Mt(g, f))
3319
+ return w.push(f), w;
3320
+ const E = Pn(f, y);
3321
+ return Object.keys(E).length === 0 || w.push({ ...f, conditions: JSON.stringify(E) }), w;
3322
+ }, []);
3323
+ }
3324
+ function p(i, g, y, b = {}) {
3325
+ var Y;
3326
+ const w = [...e.value];
3327
+ let f = i.index;
3328
+ const T = g.toCondition(y), E = Object.keys(T).length > 0;
3329
+ if (f === null && !E && !b.forceCreateRule) return;
3330
+ if (f === null) {
3331
+ const V = w.findIndex((j) => !j.inverted && j.subject === i.subject);
3332
+ if (V !== -1)
3333
+ f = V;
3334
+ else {
3335
+ const j = t.value.find((Ne) => Ne.subject === i.subject);
3336
+ if (!j) return;
3337
+ const {
3338
+ category: $,
3339
+ showByFeatureFlag: te,
3340
+ isCategoryCover: me,
3341
+ ...pe
3342
+ } = j;
3343
+ w.push(pe), f = w.length - 1;
3344
+ }
3345
+ }
3346
+ const h = { ...w[f] }, Z = lt(h), H = Ft(Z, [{ builder: g, formValue: y }]);
3347
+ if (Object.keys(H).length === 0 ? delete h.conditions : h.conditions = JSON.stringify(H), w[f] = h, an(i.subject, t.value)) {
3348
+ const V = M(i.subject, g), j = () => {
3349
+ var te;
3350
+ P(i.subject, g), n(u(w, h, g)), (te = b.afterCommit) == null || te.call(b);
3351
+ }, $ = () => {
3352
+ var te;
3353
+ n(w), (te = b.afterCommit) == null || te.call(b);
3354
+ };
3355
+ if (V.length === 0) {
3356
+ j();
3357
+ return;
3358
+ }
3359
+ b.onOverridesConflict ? b.onOverridesConflict({ override: j, keep: $ }) : $();
3360
+ return;
3361
+ }
3362
+ n(w), (Y = b.afterCommit) == null || Y.call(b);
3363
+ }
3364
+ function S(i, g, y = {}) {
3365
+ if (g.length === 0) return;
3366
+ const b = [...e.value];
3367
+ let w = b.findIndex((V) => !V.inverted && V.subject === i.subject), f = w === -1 ? void 0 : { ...b[w] }, T = lt(f ?? {}) ?? {};
3368
+ for (const V of g) {
3369
+ const j = V.mode === "inherit" ? V.builder.fromCondition(void 0) : V.form;
3370
+ T = Ft(T, [{ builder: V.builder, formValue: j }]);
3371
+ }
3372
+ const E = g.some((V) => V.mode === "custom");
3373
+ if (!f && (Object.keys(T).length > 0 || E)) {
3374
+ const V = t.value.find((pe) => pe.subject === i.subject);
3375
+ if (!V) return;
3376
+ const {
3377
+ category: j,
3378
+ showByFeatureFlag: $,
3379
+ isCategoryCover: te,
3380
+ ...me
3381
+ } = V;
3382
+ f = me, b.push(f), w = b.length - 1;
3383
+ }
3384
+ if (f) {
3385
+ const V = o(i.subject), j = V ? m(V) : void 0;
3386
+ !E && Object.keys(T).length === 0 && !!j && Mt(j, f) ? (b.splice(w, 1), f = void 0) : (Object.keys(T).length === 0 ? delete f.conditions : f.conditions = JSON.stringify(T), b[w] = f);
3387
+ }
3388
+ const h = () => {
3389
+ const V = new Set(s.value);
3390
+ for (const j of g) {
3391
+ const $ = ht(i.subject, j.builder);
3392
+ j.mode === "custom" ? V.add($) : V.delete($);
3393
+ }
3394
+ s.value = V;
3395
+ }, Z = (V) => {
3396
+ var j;
3397
+ h(), n(V), (j = y.afterCommit) == null || j.call(y);
3398
+ };
3399
+ if (!an(i.subject, t.value) || !f) {
3400
+ Z(b);
3401
+ return;
3402
+ }
3403
+ const H = g.map((V) => V.builder).filter((V) => M(i.subject, V).length > 0), Y = () => {
3404
+ let V = b;
3405
+ for (const j of g.map(($) => $.builder))
3406
+ P(i.subject, j), V = u(V, f, j);
3407
+ Z(V);
3408
+ };
3409
+ if (H.length > 0 && y.onOverridesConflict) {
3410
+ y.onOverridesConflict({ override: Y, keep: () => Z(b) });
3411
+ return;
3412
+ }
3413
+ H.length > 0 ? Z(b) : Y();
3414
+ }
3415
+ return {
3416
+ getCoverSubject: o,
3417
+ coverLabel: c,
3418
+ shouldShowInheritToggle: I,
3419
+ inheritMode: O,
3420
+ setInheritMode: U,
3421
+ inheritedSummary: L,
3422
+ getEffectiveActions: B,
3423
+ updateBuilderCondition: p,
3424
+ applyConditionDrafts: S
3425
+ };
3426
+ }
3427
+ const sl = { class: "flex flex-col gap-32" }, rl = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, al = { class: "h-[24px] w-[24px] flex items-center justify-center" }, ll = { class: "flex flex-col gap-12 p-16 w-[320px]" }, ol = { class: "fm-typo-en-title-sm-600" }, il = {
3428
+ key: 0,
3429
+ class: "h-px w-full bg-fm-color-neutral-gray-200"
3430
+ }, cl = {
3431
+ key: 1,
3432
+ class: "flex flex-col gap-8"
3433
+ }, ul = {
3434
+ key: 0,
3435
+ class: "ml-32",
3436
+ style: { "font-size": "12px", "line-height": "16px", color: "#8a8f98", "font-weight": "400" }
3437
+ }, dl = {
3438
+ key: 0,
3439
+ class: "ml-32"
3440
+ }, ml = { class: "flex justify-end pt-8" }, fl = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, _l = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, pl = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, bl = "condition-form-select-menu", Ol = /* @__PURE__ */ we({
3441
+ __name: "PortalPermissionEditor",
3442
+ props: /* @__PURE__ */ nn({
3443
+ disable: {
3444
+ type: Boolean,
3445
+ default: !1
3446
+ },
3447
+ inheritPermissions: {
3448
+ type: Array,
3449
+ default: () => []
3450
+ }
3451
+ }, {
3452
+ modelValue: { default: () => [] },
3453
+ modelModifiers: {}
3454
+ }),
3455
+ emits: /* @__PURE__ */ nn(["permissionChanged"], ["update:modelValue"]),
3456
+ setup(e, { emit: t }) {
3457
+ const n = ds(e, "modelValue"), s = e, o = t, { t: l } = qe(), c = ms(), m = fs(), { breakpoints: v } = _s(), {
3458
+ fetchCustomReportPermissions: I,
3459
+ customReportPermissions: O
3460
+ } = ps(), L = z(() => [
3461
+ ...Vn,
3462
+ ...O.value
3463
+ ]), R = z(() => {
3464
+ const k = c.currentBusiness.value, N = c.currentCountry.value, A = N instanceof Object ? N.code : N;
3465
+ return el(k, A);
3466
+ });
3467
+ function U(k) {
3468
+ return L.value.find((N) => N.subject === k);
3469
+ }
3470
+ function B(k, N) {
3471
+ return rn(k).filter(
3472
+ (A) => {
3473
+ var r;
3474
+ return ((r = A.appliesToActions) == null ? void 0 : r.call(A, N)) ?? !0;
3475
+ }
3476
+ );
3477
+ }
3478
+ const M = z(() => {
3479
+ const k = L.value.filter((A) => !S.includes(A.subject)).map((A) => A.subject);
3480
+ return bs(
3481
+ s.inheritPermissions.map((A) => ({
3482
+ ...A,
3483
+ permissions: A.permissions.filter((r) => k.includes(r.subject))
3484
+ }))
3485
+ ).map((A) => ({
3486
+ id: A.subject,
3487
+ setNames: A.setNames
3488
+ }));
3489
+ }), P = z(() => {
3490
+ const k = s.inheritPermissions.map((N) => ({
3491
+ ...N,
3492
+ permissions: N.permissions.filter(
3493
+ (A) => A.subject === fe.Subject.Business.inventory_stock
3494
+ )
3495
+ }));
3496
+ return Ot(
3497
+ k,
3498
+ "warehouseId",
3499
+ g.value.map((N) => N._id)
3500
+ );
3501
+ }), u = z(() => {
3502
+ const k = s.inheritPermissions.map((N) => ({
3503
+ ...N,
3504
+ permissions: N.permissions.filter(
3505
+ (A) => A.subject === fe.Subject.Restaurant.restaurant
3506
+ )
3507
+ }));
3508
+ return Ot(
3509
+ k,
3510
+ "restaurantId",
3511
+ f.value.map((N) => N._id)
3512
+ );
3513
+ }), p = z(() => {
3514
+ const k = s.inheritPermissions.map((N) => ({
3515
+ ...N,
3516
+ permissions: N.permissions.filter((A) => A.subject === fe.Subject.Business.role)
3517
+ }));
3518
+ return Ot(
3519
+ k,
3520
+ "roleId",
3521
+ T.value.map((N) => N._id)
3522
+ );
3523
+ }), S = [
3524
+ fe.Subject.Business.restaurant,
3525
+ fe.Subject.Business.role,
3526
+ fe.Subject.Restaurant.restaurant,
3527
+ fe.Subject.Business.inventory_stock
3528
+ ], i = z(() => {
3529
+ var N;
3530
+ const k = (N = n.value) == null ? void 0 : N.find(
3531
+ (A) => A.subject === fe.Subject.Business.inventory_stock
3532
+ );
3533
+ return k ? k.conditions ? JSON.parse(k.conditions).warehouseId.$in : null : [];
3534
+ }), g = dt([]), y = z(() => g.value.map((k) => ({
3535
+ label: k.profile.name,
3536
+ value: k._id
3537
+ })));
3538
+ function b(k) {
3539
+ const N = w(n.value, k);
3540
+ n.value = N;
3541
+ }
3542
+ function w(k, N) {
3543
+ let A = gt(
3544
+ k.filter((r) => r.subject !== fe.Subject.Business.inventory_stock)
3545
+ );
3546
+ if (!N || N.length > 0) {
3547
+ const r = {
3548
+ actions: [fe.Action.manage],
3549
+ subject: fe.Subject.Business.inventory_stock
3550
+ };
3551
+ N && (r.conditions = JSON.stringify({ warehouseId: { $in: N } })), A.push(r);
3552
+ }
3553
+ return A;
3554
+ }
3555
+ const { restaurants: f } = c, T = Ts().roles, E = z(() => f.value.map((k) => ({
3556
+ label: `${k.profile.code ? k.profile.code + "-" : ""}${k.profile.name}`,
3557
+ value: k._id
3558
+ }))), h = z(() => f.value.reduce((k, N) => (k[N._id] = T.value.filter((A) => A.restaurants.some((r) => r.id === N._id)).map((A) => A._id), k), {})), Z = z(() => vs(n.value));
3559
+ function H(k) {
3560
+ const N = V(n.value, k);
3561
+ n.value = N;
3562
+ }
3563
+ const Y = z(() => hs(n.value));
3564
+ function V(k, N) {
3565
+ var r;
3566
+ let A = gt(
3567
+ k.filter(
3568
+ (a) => a.subject !== fe.Subject.Business.restaurant && a.subject !== fe.Subject.Restaurant.restaurant
3569
+ )
3570
+ );
3571
+ if (!N || N.length > 0) {
3572
+ const {
3573
+ category: a,
3574
+ showByFeatureFlag: d,
3575
+ ...F
3576
+ } = Es.restaurant;
3577
+ A.push(F);
3578
+ const D = {
3579
+ actions: [fe.Action.manage],
3580
+ subject: fe.Subject.Restaurant.restaurant
3581
+ };
3582
+ N && (D.conditions = JSON.stringify({ restaurantId: { $in: N } })), A.push(D);
3583
+ }
3584
+ if (N) {
3585
+ const a = [
3586
+ ...new Set(N.map((F) => h.value[F]).flatMap((F) => F))
3587
+ ], d = T.value.map((F) => F._id);
3588
+ a.length !== d.length && (A = $(
3589
+ A,
3590
+ (r = Y.value || d) == null ? void 0 : r.filter((F) => a.includes(F))
3591
+ ));
3592
+ }
3593
+ return A;
3594
+ }
3595
+ function j(k) {
3596
+ const N = $(n.value, k);
3597
+ n.value = N;
3598
+ }
3599
+ function $(k, N) {
3600
+ let A = gt(
3601
+ k.filter((r) => r.subject !== fe.Subject.Business.role)
3602
+ );
3603
+ if (N && N.length > 0) {
3604
+ const r = {
3605
+ actions: [fe.Action.manage],
3606
+ subject: fe.Subject.Business.role,
3607
+ conditions: JSON.stringify({ roleId: { $in: N } })
3608
+ };
3609
+ A.push(r);
3610
+ }
3611
+ return A;
3612
+ }
3613
+ jn(async () => {
3614
+ await Promise.all([
3615
+ za.readWarehouses().then((k) => g.value = k),
3616
+ I()
3617
+ ]);
3618
+ });
3619
+ const te = z(() => Rt(
3620
+ n.value,
3621
+ Lt
3622
+ ).filter((A) => {
3623
+ const r = A.source;
3624
+ return (r == null ? void 0 : r.type) !== "systemPermissionSet" ? !0 : A.actions.includes("manage");
3625
+ }).map((A) => {
3626
+ if (A.inverted) return A;
3627
+ const r = A.actions;
3628
+ if (!r.includes("manage")) return A;
3629
+ const a = U(A.subject);
3630
+ if (!a) return A;
3631
+ const d = a.actions;
3632
+ return d.length <= 1 || d.filter((D) => !r.includes(D)).length === 0 ? A : { ...A, actions: [...d] };
3633
+ }));
3634
+ function me(k) {
3635
+ const N = new Set(
3636
+ te.value.filter((d) => !d.inverted).map((d) => d.subject)
3637
+ ), A = new Set(
3638
+ k.filter((d) => !d.inverted).map((d) => d.subject)
3639
+ ), r = new Set(
3640
+ n.value.filter((d) => !d.inverted).map((d) => d.subject)
3641
+ );
3642
+ let a = [...n.value];
3643
+ for (const d of N)
3644
+ A.has(d) || (r.has(d) && (a = a.filter((D) => D.subject !== d)), (!r.has(d) || Rt(
3645
+ a,
3646
+ Lt
3647
+ ).some(
3648
+ (D) => D.subject === d && !D.inverted && D.actions.includes("manage")
3649
+ )) && !a.some((D) => D.subject === d && D.inverted) && a.push({ subject: d, actions: ["manage"], inverted: !0 }));
3650
+ for (const d of A)
3651
+ if (!N.has(d)) {
3652
+ const F = a.some((D) => D.subject === d && D.inverted);
3653
+ if (a = a.filter((D) => !(D.subject === d && D.inverted)), !F && !r.has(d)) {
3654
+ const D = k.find(
3655
+ (_) => _.subject === d && !_.inverted
3656
+ ), x = U(d);
3657
+ if (x && D) {
3658
+ const { category: _, showByFeatureFlag: C, ...G } = x;
3659
+ a.push({ ...G, actions: D.actions });
3660
+ }
3661
+ }
3662
+ }
3663
+ for (const d of A) {
3664
+ if (!N.has(d)) continue;
3665
+ const F = te.value.find(
3666
+ (G) => G.subject === d && !G.inverted
3667
+ ), D = k.find((G) => G.subject === d && !G.inverted);
3668
+ if (!F || !D) continue;
3669
+ const x = new Set(F.actions), _ = new Set(D.actions);
3670
+ if (x.size === _.size && [...x].every((G) => _.has(G)))
3671
+ continue;
3672
+ const C = a.findIndex((G) => G.subject === d && !G.inverted);
3673
+ if (C >= 0)
3674
+ a[C] = {
3675
+ ...a[C],
3676
+ actions: Array.from(_)
3677
+ };
3678
+ else {
3679
+ const G = U(d);
3680
+ if (G) {
3681
+ const { category: Q, showByFeatureFlag: Ee, ...Be } = G;
3682
+ a.push({ ...Be, actions: Array.from(_) });
3683
+ }
3684
+ }
3685
+ x.has("manage") && !_.has("manage") && Rt(
3686
+ a,
3687
+ Lt
3688
+ ).some(
3689
+ (Q) => Q.subject === d && !Q.inverted && Q.actions.includes("manage")
3690
+ ) && !a.some((Q) => Q.subject === d && Q.inverted) && a.push({ subject: d, actions: ["manage"], inverted: !0 }), !x.has("manage") && _.has("manage") && (a = a.filter((G) => !(G.subject === d && G.inverted)));
3691
+ }
3692
+ n.value = a;
3693
+ }
3694
+ const pe = z(() => new Set(
3695
+ L.value.filter((k) => rn(k.subject).length > 0).map((k) => k.subject)
3696
+ )), Ne = z(() => {
3697
+ const k = /* @__PURE__ */ new Map();
3698
+ return te.value.map((N) => ({
3699
+ rule: N,
3700
+ index: n.value.findIndex(
3701
+ (A) => !A.inverted && A.subject === N.subject
3702
+ )
3703
+ })).filter(({ rule: N }) => !N.inverted).forEach(({ rule: N, index: A }) => {
3704
+ var F;
3705
+ const r = N.actions, a = B(N.subject, r);
3706
+ if (a.length === 0) return;
3707
+ let d;
3708
+ try {
3709
+ d = N.conditions ? JSON.parse(N.conditions) : void 0;
3710
+ } catch {
3711
+ d = void 0;
3712
+ }
3713
+ k.set(N.subject, {
3714
+ index: A >= 0 ? A : null,
3715
+ subject: N.subject,
3716
+ label: ((F = U(N.subject)) == null ? void 0 : F.label) ?? N.subject,
3717
+ actions: r,
3718
+ // Each builder only ever sees its own slice of the stored condition.
3719
+ sections: a.map((D) => ({
3720
+ builder: D,
3721
+ formValue: D.fromCondition(Pt(d, D))
3722
+ }))
3723
+ });
3724
+ }), k;
3725
+ }), be = nl(n, L, (k) => {
3726
+ n.value = k;
3727
+ }), ge = gs(n);
3728
+ function ce(k, N) {
3729
+ const A = Ne.value.get(k);
3730
+ if (A) return A;
3731
+ const r = be.getEffectiveActions(k), a = B(k, r);
3732
+ if (a.length !== 0)
3733
+ return {
3734
+ index: null,
3735
+ subject: k,
3736
+ label: N,
3737
+ actions: r,
3738
+ sections: a.map((d) => ({
3739
+ builder: d,
3740
+ formValue: d.fromCondition(void 0)
3741
+ }))
3742
+ };
3743
+ }
3744
+ function K(k, N) {
3745
+ const A = ge.getDraft({ subject: k.subject, builderKey: N.builderKey });
3746
+ if (A) return A.formValue;
3747
+ const r = k.sections.find((a) => a.builder.builderKey === N.builderKey);
3748
+ return r == null ? void 0 : r.formValue;
3749
+ }
3750
+ function oe(k, N) {
3751
+ const A = ge.getDraft({ subject: k.subject, builderKey: N.builderKey });
3752
+ return A != null && A.inheritMode ? A.inheritMode : be.inheritMode(k, N);
3753
+ }
3754
+ function We(k, N, A) {
3755
+ const r = ge.getDraft({
3756
+ subject: k.subject,
3757
+ builderKey: N.builderKey
3758
+ });
3759
+ ge.setDraft(
3760
+ { subject: k.subject, builderKey: N.builderKey },
3761
+ {
3762
+ formValue: A,
3763
+ inheritMode: (r == null ? void 0 : r.inheritMode) ?? oe(k, N)
3764
+ }
3765
+ );
3766
+ }
3767
+ function et(k, N, A) {
3768
+ const r = ge.getDraft({
3769
+ subject: k.subject,
3770
+ builderKey: N.builderKey
3771
+ }), a = k.sections.find((d) => d.builder.builderKey === N.builderKey);
3772
+ ge.setDraft(
3773
+ { subject: k.subject, builderKey: N.builderKey },
3774
+ {
3775
+ formValue: (r == null ? void 0 : r.formValue) ?? (a == null ? void 0 : a.formValue),
3776
+ inheritMode: A
3777
+ }
3778
+ );
3779
+ }
3780
+ function tt(k) {
3781
+ return ge.hasDraftsForSubject(k);
3782
+ }
3783
+ function nt(k, N) {
3784
+ const A = k.sections.flatMap((r) => {
3785
+ const a = ge.getDraft({
3786
+ subject: k.subject,
3787
+ builderKey: r.builder.builderKey
3788
+ });
3789
+ return a ? [{ builder: r.builder, form: a.formValue, mode: a.inheritMode ?? "custom" }] : [];
3790
+ });
3791
+ be.applyConditionDrafts(k, A, {
3792
+ afterCommit: () => {
3793
+ ge.clearDraftsForSubject(k.subject), N();
3794
+ },
3795
+ onOverridesConflict: Ue(k).onOverridesConflict
3796
+ });
3797
+ }
3798
+ function st(k) {
3799
+ return k.sections.some((N) => Object.keys(N.builder.toCondition(N.formValue)).length > 0 ? !0 : be.shouldShowInheritToggle(k, N.builder) && be.inheritMode(k, N.builder) === "custom");
3800
+ }
3801
+ let Ce = !1;
3802
+ function Ue(k, N = {}) {
3803
+ return {
3804
+ ...N,
3805
+ onOverridesConflict: ({ override: A, keep: r }) => {
3806
+ Ce || (Ce = !0, m.open({
3807
+ title: l("team.memberForm.permissions.conditionCover.confirmTitle"),
3808
+ message: l("team.memberForm.permissions.conditionCover.confirmMessage", {
3809
+ cover: k.label
3810
+ }),
3811
+ minWidth: v.value.lg ? 588 : 0,
3812
+ zIndex: 200,
3813
+ primaryActions: {
3814
+ text: l("team.memberForm.permissions.conditionCover.override"),
3815
+ close: !1
3816
+ },
3817
+ secondaryActions: {
3818
+ text: l("team.memberForm.permissions.conditionCover.keep"),
3819
+ close: !1
3820
+ }
3821
+ }).onPrimary(() => {
3822
+ A(), Ce = !1, m.close();
3823
+ }).onSecondary(() => {
3824
+ r(), Ce = !1, m.close();
3825
+ }).onClose(() => {
3826
+ Ce = !1;
3827
+ }));
3828
+ }
3829
+ };
3830
+ }
3831
+ return wt(
3832
+ n,
3833
+ (k) => {
3834
+ o("permissionChanged", k);
3835
+ },
3836
+ { deep: !0 }
3837
+ ), (k, N) => {
3838
+ const A = Me("FmIcon"), r = Me("FmRadio"), a = Me("FmRadioGroup"), d = Me("FmButton"), F = Me("FmPopover");
3839
+ return J(), ae("div", sl, [
3840
+ se("div", rl, [
3841
+ ie(Va, {
3842
+ "model-value": te.value,
3843
+ "excluded-subjects": S,
3844
+ "additional-permissions": X(O),
3845
+ "onUpdate:modelValue": me
3846
+ }, $e({ _: 2 }, [
3847
+ ye(M.value, (D) => ({
3848
+ name: `checkbox-${D.id}-append`,
3849
+ fn: de(() => [
3850
+ ie(pt, { item: D }, null, 8, ["item"])
3851
+ ])
3852
+ })),
3853
+ ye(pe.value, (D) => ({
3854
+ name: `checkbox-${D}-icon`,
3855
+ fn: de(({ option: x, isEffectiveSelected: _ }) => [
3856
+ _ && ce(D, x.label) ? (J(), Ae(F, {
3857
+ key: 0,
3858
+ disabled: e.disable,
3859
+ "z-index": 100,
3860
+ "exclude-el-from-click-outside": [bl],
3861
+ class: "h-5 flex items-center",
3862
+ onClose: () => X(ge).clearDraftsForSubject(D)
3863
+ }, {
3864
+ "popover-button": de(() => [
3865
+ se("div", al, [
3866
+ ie(A, {
3867
+ name: "settings",
3868
+ size: "sm",
3869
+ class: at([
3870
+ "cursor-pointer transition-colors",
3871
+ st(ce(D, x.label)) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
3872
+ ])
3873
+ }, null, 8, ["class"])
3874
+ ])
3875
+ ]),
3876
+ default: de(({ hide: C }) => [
3877
+ se("div", ll, [
3878
+ se("p", ol, ke(X(l)("team.memberForm.permissions.conditionTitle", {
3879
+ context: ce(D, x.label).label
3880
+ })), 1),
3881
+ (J(!0), ae(Oe, null, ye(ce(D, x.label).sections, (G, Q) => (J(), ae(Oe, {
3882
+ key: G.builder.builderKey
3883
+ }, [
3884
+ Q > 0 ? (J(), ae("div", il)) : Le("", !0),
3885
+ X(be).shouldShowInheritToggle(
3886
+ ce(D, x.label),
3887
+ G.builder
3888
+ ) ? (J(), ae("div", cl, [
3889
+ ie(a, {
3890
+ "model-value": oe(ce(D, x.label), G.builder),
3891
+ disabled: e.disable,
3892
+ "onUpdate:modelValue": (Ee) => et(
3893
+ ce(D, x.label),
3894
+ G.builder,
3895
+ Ee
3896
+ )
3897
+ }, {
3898
+ default: de(() => [
3899
+ se("div", null, [
3900
+ ie(r, {
3901
+ value: "inherit",
3902
+ label: X(l)("team.memberForm.permissions.conditionCover.inherit", {
3903
+ cover: X(be).coverLabel(D)
3904
+ })
3905
+ }, null, 8, ["label"]),
3906
+ X(be).inheritedSummary(
3907
+ ce(D, x.label),
3908
+ G.builder,
3909
+ R.value
3910
+ ) ? (J(), ae("p", ul, " (" + ke(X(l)(
3911
+ X(be).inheritedSummary(
3912
+ ce(D, x.label),
3913
+ G.builder,
3914
+ R.value
3915
+ ).labelKey,
3916
+ X(be).inheritedSummary(
3917
+ ce(D, x.label),
3918
+ G.builder,
3919
+ R.value
3920
+ ).params ?? {}
3921
+ )) + ") ", 1)) : Le("", !0)
3922
+ ]),
3923
+ ie(r, {
3924
+ value: "custom",
3925
+ label: X(l)("team.memberForm.permissions.conditionCover.custom")
3926
+ }, null, 8, ["label"])
3927
+ ]),
3928
+ _: 2
3929
+ }, 1032, ["model-value", "disabled", "onUpdate:modelValue"]),
3930
+ oe(
3931
+ ce(D, x.label),
3932
+ G.builder
3933
+ ) === "custom" ? (J(), ae("div", dl, [
3934
+ ie(sn, {
3935
+ builder: G.builder,
3936
+ "model-value": K(ce(D, x.label), G.builder),
3937
+ disable: e.disable,
3938
+ "onUpdate:modelValue": (Ee) => We(
3939
+ ce(D, x.label),
3940
+ G.builder,
3941
+ Ee
3942
+ )
3943
+ }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"])
3944
+ ])) : Le("", !0)
3945
+ ])) : (J(), Ae(sn, {
3946
+ key: 2,
3947
+ builder: G.builder,
3948
+ "model-value": K(ce(D, x.label), G.builder),
3949
+ disable: e.disable,
3950
+ "onUpdate:modelValue": (Ee) => We(
3951
+ ce(D, x.label),
3952
+ G.builder,
3953
+ Ee
3954
+ )
3955
+ }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"]))
3956
+ ], 64))), 128)),
3957
+ se("div", ml, [
3958
+ ie(d, {
3959
+ label: X(l)("team.memberForm.permissions.conditionApply"),
3960
+ size: "md",
3961
+ variant: "primary",
3962
+ disabled: e.disable || !tt(D),
3963
+ onClick: (G) => nt(ce(D, x.label), C)
3964
+ }, null, 8, ["label", "disabled", "onClick"])
3965
+ ])
3966
+ ])
3967
+ ]),
3968
+ _: 2
3969
+ }, 1032, ["disabled", "exclude-el-from-click-outside", "onClose"])) : (J(), Ae(A, {
3970
+ key: 1,
3971
+ name: "settings",
3972
+ size: "sm",
3973
+ class: "invisible"
3974
+ }))
3975
+ ])
3976
+ }))
3977
+ ]), 1032, ["model-value", "additional-permissions"])
3978
+ ]),
3979
+ se("div", fl, [
3980
+ ie(Fn, {
3981
+ "model-value": i.value,
3982
+ options: y.value,
3983
+ context: X(l)("team.labels.warehouse"),
3984
+ "onUpdate:modelValue": b
3985
+ }, $e({ _: 2 }, [
3986
+ ye(P.value, (D) => ({
3987
+ name: `checkbox-${D.id}-append`,
3988
+ fn: de(() => [
3989
+ ie(pt, { item: D }, null, 8, ["item"])
3990
+ ])
3991
+ }))
3992
+ ]), 1032, ["model-value", "options", "context"])
3993
+ ]),
3994
+ se("div", _l, [
3995
+ ie(Fn, {
3996
+ "model-value": Z.value,
3997
+ options: E.value,
3998
+ context: X(l)("team.labels.restaurant"),
3999
+ "onUpdate:modelValue": H
4000
+ }, $e({ _: 2 }, [
4001
+ ye(u.value, (D) => ({
4002
+ name: `checkbox-${D.id}-append`,
4003
+ fn: de(() => [
4004
+ ie(pt, { item: D }, null, 8, ["item"])
4005
+ ])
4006
+ }))
4007
+ ]), 1032, ["model-value", "options", "context"])
4008
+ ]),
4009
+ se("div", pl, [
4010
+ ie(Ka, {
4011
+ roles: X(T),
4012
+ "model-value": Y.value,
4013
+ "restaurant-ids": Z.value,
4014
+ "onUpdate:modelValue": j
4015
+ }, $e({ _: 2 }, [
4016
+ ye(p.value, (D) => ({
4017
+ name: `checkbox-${D.id}-append`,
4018
+ fn: de(() => [
4019
+ ie(pt, { item: D }, null, 8, ["item"])
4020
+ ])
4021
+ }))
4022
+ ]), 1032, ["roles", "model-value", "restaurant-ids"])
4023
+ ])
4024
+ ]);
4025
+ };
4026
+ }
4027
+ });
4028
+ export {
4029
+ Ol as _
4030
+ };