@feedmepos/mf-hrm-portal 2.1.1-dev → 2.1.1-dev.3

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