@feedmepos/mf-hrm-portal 2.3.0-dev → 2.3.0-dev.11

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