@feedmepos/mf-hrm-portal 2.2.2-dev.4 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{ApprovalCodeList-Dn8R6jgC.js → ApprovalCodeList-BnG3T_Lk.js} +5 -5
  2. package/dist/{AuditLogList-BdWELtlp.js → AuditLogList-CpK9-YkB.js} +759 -705
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DbUdX_Qk.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CzKzq19d.js} +2 -2
  4. package/dist/{EmployeeList-Br4a6imR.js → EmployeeList-CUsRanu7.js} +6 -6
  5. package/dist/{GrantUserList-YpLuH3il.js → GrantUserList-BJoj3ZcO.js} +6 -6
  6. package/dist/{Main-eBobrTdz.js → Main-5QLhf80L.js} +8 -8
  7. package/dist/{Main-DPoPfzcK.js → Main-BEUu3Hba.js} +5 -5
  8. package/dist/{Main-DWv0oSH4.js → Main-FPpK9B70.js} +11 -11
  9. package/dist/{PermissionSetList-ttA1JLVy.js → PermissionSetList-DZGZ0Pm_.js} +7 -7
  10. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DQa3GK8B.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BHEW1_dv.js} +945 -945
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js} +1 -1
  12. package/dist/{RoleList-B790AV-j.js → RoleList-D5yToard.js} +43 -43
  13. package/dist/{TeamMemberList-B-vgWJw4.js → TeamMemberList-C4-AHxO4.js} +9 -9
  14. package/dist/{TimesheetList-C05Wl5Gw.js → TimesheetList-DMo8KXoU.js} +7 -7
  15. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CDxi-Gdu.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-2KHu-f8U.js} +3 -3
  16. package/dist/{app-DzZ_hyHn.js → app-DlSD8S9A.js} +2625 -2217
  17. package/dist/app.js +1 -1
  18. package/dist/{approval-code-jIjkeVEb.js → approval-code-BRClD2HN.js} +1 -1
  19. package/dist/{dayjs.min-B-hCRyX9.js → dayjs.min-DcI2auGP.js} +1 -1
  20. package/dist/{employee-C2s088Kk.js → employee-C_cvCoHM.js} +4 -4
  21. package/dist/{grant-user-SNiDV22U.js → grant-user-Dhi3ilC_.js} +1 -1
  22. package/dist/{iteration-C2OwvCva.js → iteration-DSzPQ0fZ.js} +1 -1
  23. package/dist/{lodash-BQEjwNx9.js → lodash-Ce0IJ8Y3.js} +1 -1
  24. package/dist/{restaurant-BTpBmfBV.js → restaurant-DiYb0pCm.js} +2 -2
  25. package/dist/{role-Z9s80hOy.js → role-DkTkfUgR.js} +2 -2
  26. package/dist/rule-B-REsmVM.js +771 -0
  27. package/dist/src/views/audit-log/export-lines.d.ts +8 -0
  28. package/dist/src/views/audit-log/locales/index.d.ts +68 -12
  29. package/dist/style.css +1 -1
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/dist/{useAppStore-DCwd8GWN.js → useAppStore-BGhlB1_1.js} +1 -1
  32. package/dist/{useLoading-CXzTpIVv.js → useLoading-CvgqVDbF.js} +1 -1
  33. package/dist/{useReportPermissions-VnFzkyAH.js → useReportPermissions-VCzAQXKz.js} +5 -5
  34. package/package.json +2 -2
  35. package/dist/rule-DpoKkvLa.js +0 -1121
@@ -1,16 +1,16 @@
1
- import { defineComponent as Mt, ref as S, computed as A, onMounted as ko, onBeforeUnmount as Io, watch as ue, resolveComponent as U, createElementBlock as p, openBlock as v, createBlock as Se, createCommentVNode as j, createElementVNode as a, Fragment as q, renderList as ae, withCtx as B, createVNode as m, toDisplayString as l, unref as u, nextTick as Ao, onUnmounted as Fo, createTextVNode as Te, normalizeClass as Mo } from "vue";
2
- import { d as D } from "./dayjs.min-B-hCRyX9.js";
3
- import { useI18n as Ot, useCoreStore as Oo } from "@feedmepos/mf-common";
4
- import { G as xt, _ as Do } from "./app-DzZ_hyHn.js";
5
- import { components as ie } from "@feedmepos/ui-library";
6
- import { g as Qe, b as Ze } from "./restaurant-BTpBmfBV.js";
7
- import { S as Pe, _ as jo } from "./SelectFilter-ATOm0hdn.js";
8
- import { _ as Co } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
- import { _ as To } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
10
- import { t as Po, p as Lt } from "./rule-DpoKkvLa.js";
11
- import { defineStore as Vo } from "pinia";
12
- import { u as Eo } from "./useDebounce-B8ZPVS5C.js";
13
- const xe = [
1
+ import { defineComponent as Mt, ref as S, computed as A, onMounted as Ao, onBeforeUnmount as Fo, watch as de, resolveComponent as N, createElementBlock as b, openBlock as v, createBlock as ke, createCommentVNode as j, createElementVNode as a, Fragment as q, renderList as ae, withCtx as B, createVNode as m, toDisplayString as l, unref as c, nextTick as Mo, onUnmounted as Oo, createTextVNode as Ve, normalizeClass as Do } from "vue";
2
+ import { d as D } from "./dayjs.min-DcI2auGP.js";
3
+ import { useI18n as Ot, useCoreStore as jo } from "@feedmepos/mf-common";
4
+ import { B as St, _ as Co } from "./app-DlSD8S9A.js";
5
+ import { components as ue } from "@feedmepos/ui-library";
6
+ import { g as Ze, b as et } from "./restaurant-DiYb0pCm.js";
7
+ import { S as Pe, _ as To } from "./SelectFilter-ATOm0hdn.js";
8
+ import { _ as Vo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
+ import { _ as Po } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
10
+ import { t as Eo, p as kt } from "./rule-B-REsmVM.js";
11
+ import { defineStore as $o } from "pinia";
12
+ import { u as No } from "./useDebounce-B8ZPVS5C.js";
13
+ const Le = [
14
14
  { key: "all", label: "All", subjectPrefixes: [] },
15
15
  { key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
16
16
  { key: "report", label: "Report", subjectPrefixes: ["business::report", "report"] },
@@ -20,64 +20,64 @@ const xe = [
20
20
  { key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"] }
21
21
  // Add more as modules are revamped with new actionguard:
22
22
  // { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
23
- ], et = "/audit-logs", Ve = {
23
+ ], tt = "/audit-logs", Ee = {
24
24
  async count(t) {
25
- var d, c, g, b, h, n, C;
25
+ var r, d, g, p, h, i, C;
26
26
  const o = {
27
27
  ...t != null && t.from ? { from: t.from } : {},
28
28
  ...t != null && t.to ? { to: t.to } : {},
29
- ...(d = t == null ? void 0 : t.userIds) != null && d.length ? { userIds: t.userIds } : {},
30
- ...(c = t == null ? void 0 : t.subjects) != null && c.length ? { subjects: t.subjects } : {},
29
+ ...(r = t == null ? void 0 : t.userIds) != null && r.length ? { userIds: t.userIds } : {},
30
+ ...(d = t == null ? void 0 : t.subjects) != null && d.length ? { subjects: t.subjects } : {},
31
31
  ...(g = t == null ? void 0 : t.subjectPrefixes) != null && g.length ? { subjectPrefixes: t.subjectPrefixes } : {},
32
- ...(b = t == null ? void 0 : t.actions) != null && b.length ? { actions: t.actions } : {},
32
+ ...(p = t == null ? void 0 : t.actions) != null && p.length ? { actions: t.actions } : {},
33
33
  ...(h = t == null ? void 0 : t.outcomes) != null && h.length ? { outcomes: t.outcomes } : {},
34
34
  ...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
35
35
  ...t != null && t.search ? { search: t.search } : {},
36
- ...(n = t == null ? void 0 : t.searchUserIds) != null && n.length ? { searchUserIds: t.searchUserIds } : {},
36
+ ...(i = t == null ? void 0 : t.searchUserIds) != null && i.length ? { searchUserIds: t.searchUserIds } : {},
37
37
  ...(C = t == null ? void 0 : t.searchSubjects) != null && C.length ? { searchSubjects: t.searchSubjects } : {}
38
38
  };
39
- return (await Qe(
40
- await Ze().get(`${et}/count`, {
39
+ return (await Ze(
40
+ await et().get(`${tt}/count`, {
41
41
  params: o,
42
42
  paramsSerializer: (O) => {
43
- const w = new URLSearchParams();
44
- for (const [P, L] of Object.entries(O))
43
+ const k = new URLSearchParams();
44
+ for (const [V, L] of Object.entries(O))
45
45
  if (Array.isArray(L))
46
- for (const I of L) w.append(P, String(I));
47
- else L != null && w.append(P, String(L));
48
- return w.toString();
46
+ for (const I of L) k.append(V, String(I));
47
+ else L != null && k.append(V, String(L));
48
+ return k.toString();
49
49
  }
50
50
  })
51
51
  )).total;
52
52
  },
53
53
  async read(t) {
54
- var i, d, c, g, b, h, n;
54
+ var n, r, d, g, p, h, i;
55
55
  const o = {
56
56
  limit: (t == null ? void 0 : t.limit) ?? 100,
57
57
  offset: (t == null ? void 0 : t.offset) ?? 0,
58
58
  ...t != null && t.from ? { from: t.from } : {},
59
59
  ...t != null && t.to ? { to: t.to } : {},
60
- ...(i = t == null ? void 0 : t.userIds) != null && i.length ? { userIds: t.userIds } : {},
60
+ ...(n = t == null ? void 0 : t.userIds) != null && n.length ? { userIds: t.userIds } : {},
61
61
  ...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
62
- ...(d = t == null ? void 0 : t.subjects) != null && d.length ? { subjects: t.subjects } : {},
63
- ...(c = t == null ? void 0 : t.subjectPrefixes) != null && c.length ? { subjectPrefixes: t.subjectPrefixes } : {},
62
+ ...(r = t == null ? void 0 : t.subjects) != null && r.length ? { subjects: t.subjects } : {},
63
+ ...(d = t == null ? void 0 : t.subjectPrefixes) != null && d.length ? { subjectPrefixes: t.subjectPrefixes } : {},
64
64
  ...(g = t == null ? void 0 : t.actions) != null && g.length ? { actions: t.actions } : {},
65
- ...(b = t == null ? void 0 : t.outcomes) != null && b.length ? { outcomes: t.outcomes } : {},
65
+ ...(p = t == null ? void 0 : t.outcomes) != null && p.length ? { outcomes: t.outcomes } : {},
66
66
  ...t != null && t.search ? { search: t.search } : {},
67
67
  ...(h = t == null ? void 0 : t.searchUserIds) != null && h.length ? { searchUserIds: t.searchUserIds } : {},
68
- ...(n = t == null ? void 0 : t.searchSubjects) != null && n.length ? { searchSubjects: t.searchSubjects } : {}
68
+ ...(i = t == null ? void 0 : t.searchSubjects) != null && i.length ? { searchSubjects: t.searchSubjects } : {}
69
69
  };
70
- return Qe(
71
- await Ze().get(et, {
70
+ return Ze(
71
+ await et().get(tt, {
72
72
  params: o,
73
73
  // Serialize arrays as repeated params: key=val1&key=val2
74
74
  // (NestJS @Query expects this; axios default adds brackets which break matching)
75
75
  paramsSerializer: (C) => {
76
76
  const O = new URLSearchParams();
77
- for (const [w, P] of Object.entries(C))
78
- if (Array.isArray(P))
79
- for (const L of P) O.append(w, String(L));
80
- else P != null && O.append(w, String(P));
77
+ for (const [k, V] of Object.entries(C))
78
+ if (Array.isArray(V))
79
+ for (const L of V) O.append(k, String(L));
80
+ else V != null && O.append(k, String(V));
81
81
  return O.toString();
82
82
  }
83
83
  })
@@ -93,14 +93,14 @@ const xe = [
93
93
  ...t != null && t.from ? { from: t.from } : {},
94
94
  ...t != null && t.to ? { to: t.to } : {}
95
95
  };
96
- return Qe(
97
- await Ze().get(`${et}/actors`, { params: o })
96
+ return Ze(
97
+ await et().get(`${tt}/actors`, { params: o })
98
98
  );
99
99
  }
100
- }, Ro = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, Uo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, No = {
100
+ }, Uo = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, Ro = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ko = {
101
101
  "data-more-measure": "",
102
102
  class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
103
- }, $o = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ko = /* @__PURE__ */ Mt({
103
+ }, Bo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Yo = /* @__PURE__ */ Mt({
104
104
  __name: "AuditLogModuleTabs",
105
105
  props: {
106
106
  modelValue: {},
@@ -108,92 +108,92 @@ const xe = [
108
108
  },
109
109
  emits: ["update:modelValue"],
110
110
  setup(t, { emit: o }) {
111
- const i = t, d = o, { t: c } = Ot(), g = S(!1), b = S(null), h = S(null), n = S([]), C = S(0), O = S(0);
112
- let w = null;
113
- async function P() {
114
- if (await Ao(), !h.value) return;
115
- const y = h.value.querySelectorAll("[data-tab-measure]");
116
- n.value = Array.from(y).map((E) => E.offsetWidth);
111
+ const n = t, r = o, { t: d } = Ot(), g = S(!1), p = S(null), h = S(null), i = S([]), C = S(0), O = S(0);
112
+ let k = null;
113
+ async function V() {
114
+ if (await Mo(), !h.value) return;
115
+ const _ = h.value.querySelectorAll("[data-tab-measure]");
116
+ i.value = Array.from(_).map((E) => E.offsetWidth);
117
117
  const M = h.value.querySelector("[data-more-measure]");
118
118
  C.value = (M == null ? void 0 : M.offsetWidth) ?? 0;
119
119
  }
120
120
  const L = A(() => {
121
- const y = i.items.length;
122
- if (y === 0) return 0;
123
- if (!O.value || n.value.length !== y) return y;
124
- const M = n.value;
125
- if (M.reduce((k, de) => k + de, 0) <= O.value) return y;
121
+ const _ = n.items.length;
122
+ if (_ === 0) return 0;
123
+ if (!O.value || i.value.length !== _) return _;
124
+ const M = i.value;
125
+ if (M.reduce((w, ce) => w + ce, 0) <= O.value) return _;
126
126
  const T = C.value;
127
- let Y = 0, N = 0;
128
- for (let k = 0; k < y && !(Y + M[k] + T > O.value); k++)
129
- Y += M[k], N++;
130
- return N;
127
+ let Y = 0, U = 0;
128
+ for (let w = 0; w < _ && !(Y + M[w] + T > O.value); w++)
129
+ Y += M[w], U++;
130
+ return U;
131
131
  }), I = A(() => {
132
- const y = L.value, M = i.items.length;
133
- if (y >= M) return [...i.items];
134
- const E = i.items.slice(0, y), T = i.items.find((J) => J.value === i.modelValue);
132
+ const _ = L.value, M = n.items.length;
133
+ if (_ >= M) return [...n.items];
134
+ const E = n.items.slice(0, _), T = n.items.find((J) => J.value === n.modelValue);
135
135
  if (!T || E.some((J) => J.value === T.value)) return E;
136
- if (y === 0) return [T];
137
- const Y = i.items.findIndex((J) => J.value === T.value), N = n.value, k = C.value, de = N[Y] ?? 0;
138
- let le = y, ke = N.slice(0, le - 1).reduce((J, ge) => J + ge, 0);
139
- for (; le > 1 && ke + de + k > O.value; )
140
- le--, ke = N.slice(0, le - 1).reduce((J, ge) => J + ge, 0);
141
- return [...i.items.slice(0, Math.max(le - 1, 0)), T];
136
+ if (_ === 0) return [T];
137
+ const Y = n.items.findIndex((J) => J.value === T.value), U = i.value, w = C.value, ce = U[Y] ?? 0;
138
+ let ne = _, Ie = U.slice(0, ne - 1).reduce((J, he) => J + he, 0);
139
+ for (; ne > 1 && Ie + ce + w > O.value; )
140
+ ne--, Ie = U.slice(0, ne - 1).reduce((J, he) => J + he, 0);
141
+ return [...n.items.slice(0, Math.max(ne - 1, 0)), T];
142
142
  }), K = A(() => {
143
- const y = new Set(I.value.map((M) => M.value));
144
- return i.items.filter((M) => !y.has(M.value));
143
+ const _ = new Set(I.value.map((M) => M.value));
144
+ return n.items.filter((M) => !_.has(M.value));
145
145
  });
146
- function H(y) {
147
- g.value = !1, d("update:modelValue", y);
146
+ function W(_) {
147
+ g.value = !1, r("update:modelValue", _);
148
148
  }
149
- return ko(async () => {
150
- await P(), b.value && (O.value = b.value.clientWidth, w = new ResizeObserver(() => {
151
- b.value && (O.value = b.value.clientWidth);
152
- }), w.observe(b.value));
153
- }), Io(() => {
154
- w == null || w.disconnect(), w = null;
155
- }), ue(
156
- () => i.items,
149
+ return Ao(async () => {
150
+ await V(), p.value && (O.value = p.value.clientWidth, k = new ResizeObserver(() => {
151
+ p.value && (O.value = p.value.clientWidth);
152
+ }), k.observe(p.value));
153
+ }), Fo(() => {
154
+ k == null || k.disconnect(), k = null;
155
+ }), de(
156
+ () => n.items,
157
157
  () => {
158
- P();
158
+ V();
159
159
  },
160
160
  { deep: !0 }
161
- ), (y, M) => {
162
- const E = U("FmTab"), T = U("FmIcon"), Y = U("FmMenuItem"), N = U("FmMenu");
163
- return v(), p("div", {
161
+ ), (_, M) => {
162
+ const E = N("FmTab"), T = N("FmIcon"), Y = N("FmMenuItem"), U = N("FmMenu");
163
+ return v(), b("div", {
164
164
  ref_key: "containerRef",
165
- ref: b,
165
+ ref: p,
166
166
  class: "relative flex w-full flex-row items-center"
167
167
  }, [
168
- (v(!0), p(q, null, ae(I.value, (k) => (v(), Se(E, {
169
- key: k.value,
168
+ (v(!0), b(q, null, ae(I.value, (w) => (v(), ke(E, {
169
+ key: w.value,
170
170
  "model-value": t.modelValue,
171
- label: k.label,
172
- badge: k.badge,
173
- disabled: k.disabled,
174
- value: k.value,
175
- "onUpdate:modelValue": H
171
+ label: w.label,
172
+ badge: w.badge,
173
+ disabled: w.disabled,
174
+ value: w.value,
175
+ "onUpdate:modelValue": W
176
176
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
177
- K.value.length > 0 ? (v(), Se(N, {
177
+ K.value.length > 0 ? (v(), ke(U, {
178
178
  key: 0,
179
179
  "show-menu": g.value,
180
180
  class: "max-w-[360px] min-w-[90px] rounded-sm",
181
181
  placement: "bottom-start",
182
- onMenuChanged: M[0] || (M[0] = (k) => g.value = k)
182
+ onMenuChanged: M[0] || (M[0] = (w) => g.value = w)
183
183
  }, {
184
184
  "menu-button": B(() => [
185
- a("div", Ro, [
185
+ a("div", Uo, [
186
186
  m(T, { name: "more_vert" }),
187
- a("span", Uo, l(u(c)("auditLog.modules.more")), 1)
187
+ a("span", Ro, l(c(d)("auditLog.modules.more")), 1)
188
188
  ])
189
189
  ]),
190
190
  default: B(() => [
191
- (v(!0), p(q, null, ae(K.value, (k) => (v(), Se(Y, {
192
- key: k.value,
193
- "model-value": t.modelValue === k.value,
194
- label: k.label,
195
- disabled: k.disabled,
196
- onClick: (de) => H(k.value)
191
+ (v(!0), b(q, null, ae(K.value, (w) => (v(), ke(Y, {
192
+ key: w.value,
193
+ "model-value": t.modelValue === w.value,
194
+ label: w.label,
195
+ disabled: w.disabled,
196
+ onClick: (ce) => W(w.value)
197
197
  }, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
198
198
  ]),
199
199
  _: 1
@@ -204,40 +204,40 @@ const xe = [
204
204
  "aria-hidden": "true",
205
205
  class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
206
206
  }, [
207
- (v(!0), p(q, null, ae(t.items, (k) => (v(), p("div", {
208
- key: `measure-${k.value}`,
207
+ (v(!0), b(q, null, ae(t.items, (w) => (v(), b("div", {
208
+ key: `measure-${w.value}`,
209
209
  "data-tab-measure": ""
210
210
  }, [
211
211
  m(E, {
212
212
  "model-value": t.modelValue,
213
- label: k.label,
214
- badge: k.badge,
215
- disabled: k.disabled,
216
- value: k.value
213
+ label: w.label,
214
+ badge: w.badge,
215
+ disabled: w.disabled,
216
+ value: w.value
217
217
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"])
218
218
  ]))), 128)),
219
- a("div", No, [
219
+ a("div", Ko, [
220
220
  m(T, { name: "more_vert" }),
221
- a("span", $o, l(u(c)("auditLog.modules.more")), 1)
221
+ a("span", Bo, l(c(d)("auditLog.modules.more")), 1)
222
222
  ])
223
223
  ], 512)
224
224
  ], 512);
225
225
  };
226
226
  }
227
- }), Bo = Vo("team", () => {
228
- const t = S([]), o = S(!1), i = S(!1), d = A(
227
+ }), zo = $o("team", () => {
228
+ const t = S([]), o = S(!1), n = S(!1), r = A(
229
229
  () => Object.fromEntries(t.value.map((h) => [h.doc.userId, h.name]))
230
- ), c = A(
230
+ ), d = A(
231
231
  () => Object.fromEntries(t.value.map((h) => [h.doc.userId, h.email]))
232
232
  ), g = A(
233
233
  () => Object.fromEntries(t.value.map((h) => [h.doc.userId, h.phoneNumber]))
234
234
  );
235
- async function b({ force: h = !1 } = {}) {
235
+ async function p({ force: h = !1 } = {}) {
236
236
  if (!(!h && t.value.length > 0))
237
237
  try {
238
238
  o.value = !0;
239
- const n = await Po.readTeamMembers();
240
- t.value = n.sort((C, O) => C.doc.isOwner ? -1 : C.name.localeCompare(O.name)), i.value = !0;
239
+ const i = await Eo.readTeamMembers();
240
+ t.value = i.sort((C, O) => C.doc.isOwner ? -1 : C.name.localeCompare(O.name)), n.value = !0;
241
241
  } finally {
242
242
  o.value = !1;
243
243
  }
@@ -245,45 +245,45 @@ const xe = [
245
245
  return {
246
246
  members: t,
247
247
  isLoading: o,
248
- hasLoaded: i,
249
- userIdToName: d,
250
- userIdToEmail: c,
248
+ hasLoaded: n,
249
+ userIdToName: r,
250
+ userIdToEmail: d,
251
251
  userIdToPhone: g,
252
- readTeamMembers: b
252
+ readTeamMembers: p
253
253
  };
254
254
  });
255
- function Yo(t) {
255
+ function qo(t) {
256
256
  const o = t.indexOf(".");
257
257
  return o <= 0 || o === t.length - 1 ? null : { entity: t.slice(0, o), verb: t.slice(o + 1) };
258
258
  }
259
- function St(t) {
259
+ function wt(t) {
260
260
  const o = t.split("-").join(" ");
261
261
  return o.charAt(0).toUpperCase() + o.slice(1);
262
262
  }
263
- function zo(t, o, i) {
264
- const d = t(o, i);
265
- return d === o ? null : d;
263
+ function Jo(t, o, n) {
264
+ const r = t(o, n);
265
+ return r === o ? null : r;
266
266
  }
267
- function wt(t, o) {
268
- const { eventKey: i, params: d, operationLabel: c } = o;
269
- if (i) {
270
- const g = zo(t, `auditLog.event.sentence.${i}`, d);
267
+ function st(t, o) {
268
+ const { eventKey: n, params: r, operationLabel: d } = o;
269
+ if (n) {
270
+ const g = Jo(t, `auditLog.event.sentence.${n}`, r);
271
271
  if (g) return g;
272
- const b = Yo(i);
273
- if (b) {
274
- const h = `${St(b.verb)} ${St(b.entity)}`, n = (d == null ? void 0 : d.label) ?? (d == null ? void 0 : d.name);
275
- return n !== void 0 && n !== "" ? `${h} — ${n}` : h;
272
+ const p = qo(n);
273
+ if (p) {
274
+ const h = `${wt(p.verb)} ${wt(p.entity)}`, i = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
275
+ return i !== void 0 && i !== "" ? `${h} — ${i}` : h;
276
276
  }
277
277
  }
278
- return c ?? "";
278
+ return d ?? "";
279
279
  }
280
- function pe(t) {
280
+ function ge(t) {
281
281
  return typeof t == "object" && t !== null && !Array.isArray(t);
282
282
  }
283
283
  function we(t) {
284
284
  return Array.isArray(t);
285
285
  }
286
- function Re(t) {
286
+ function Ne(t) {
287
287
  if (t === null) return "null";
288
288
  if (typeof t == "object")
289
289
  try {
@@ -293,398 +293,429 @@ function Re(t) {
293
293
  }
294
294
  return String(t);
295
295
  }
296
- function qo(t, o) {
296
+ function Ho(t, o) {
297
297
  return t ? `${t}.${o}` : o;
298
298
  }
299
- function kt(t) {
299
+ function It(t) {
300
300
  if (typeof t != "string") return { ok: !1, value: void 0 };
301
301
  const o = t.trim();
302
302
  if (!o.startsWith("{") && !o.startsWith("[")) return { ok: !1, value: void 0 };
303
303
  try {
304
- const i = JSON.parse(o);
305
- return pe(i) || we(i) ? { ok: !0, value: i } : { ok: !1, value: void 0 };
304
+ const n = JSON.parse(o);
305
+ return ge(n) || we(n) ? { ok: !0, value: n } : { ok: !1, value: void 0 };
306
306
  } catch {
307
307
  return { ok: !1, value: void 0 };
308
308
  }
309
309
  }
310
- const Jo = ["_id", "id", "subject", "key", "name"];
311
- function Wo(t, o) {
310
+ const Wo = ["_id", "id", "subject", "key", "name"];
311
+ function Go(t, o) {
312
312
  if (t.length === 0 || o.length === 0) return null;
313
- const i = (c, g) => c.every((b) => pe(b) && b[g] !== void 0), d = (c, g) => {
314
- const b = c.map((h) => h[g]);
315
- return b.length === new Set(b).size;
313
+ const n = (d, g) => d.every((p) => ge(p) && p[g] !== void 0), r = (d, g) => {
314
+ const p = d.map((h) => h[g]);
315
+ return p.length === new Set(p).size;
316
316
  };
317
- for (const c of Jo)
318
- if (i(t, c) && i(o, c) && d(t, c) && d(o, c))
319
- return c;
317
+ for (const d of Wo)
318
+ if (n(t, d) && n(o, d) && r(t, d) && r(o, d))
319
+ return d;
320
320
  return null;
321
321
  }
322
- function Dt(t, o, i) {
323
- i.push({ path: t, type: "added", before: null, after: Re(o) });
322
+ function Dt(t, o, n) {
323
+ n.push({ path: t, type: "added", before: null, after: Ne(o) });
324
324
  }
325
- function jt(t, o, i) {
326
- i.push({ path: t, type: "removed", before: Re(o), after: null });
325
+ function jt(t, o, n) {
326
+ n.push({ path: t, type: "removed", before: Ne(o), after: null });
327
327
  }
328
- function Ho(t, o, i, d) {
329
- const c = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(i)]);
330
- for (const g of Array.from(c)) {
331
- const b = Object.prototype.hasOwnProperty.call(o, g), h = Object.prototype.hasOwnProperty.call(i, g);
332
- Ue(qo(t, g), o[g], b, i[g], h, d);
328
+ function Xo(t, o, n, r) {
329
+ const d = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
330
+ for (const g of Array.from(d)) {
331
+ const p = Object.prototype.hasOwnProperty.call(o, g), h = Object.prototype.hasOwnProperty.call(n, g);
332
+ Ue(Ho(t, g), o[g], p, n[g], h, r);
333
333
  }
334
334
  }
335
- function Go(t, o, i, d) {
336
- const c = Wo(o, i);
337
- if (c) {
335
+ function Qo(t, o, n, r) {
336
+ const d = Go(o, n);
337
+ if (d) {
338
338
  const L = new Map(
339
- o.map((y) => [y[c], y])
339
+ o.map((_) => [_[d], _])
340
340
  ), I = new Map(
341
- i.map((y) => [y[c], y])
342
- ), K = Array.from(L.keys()).concat(Array.from(I.keys())), H = Array.from(new Set(K));
343
- for (const y of H) {
344
- const M = L.has(y), E = I.has(y), T = `${t}[${String(y)}]`;
341
+ n.map((_) => [_[d], _])
342
+ ), K = Array.from(L.keys()).concat(Array.from(I.keys())), W = Array.from(new Set(K));
343
+ for (const _ of W) {
344
+ const M = L.has(_), E = I.has(_), T = `${t}[${String(_)}]`;
345
345
  Ue(
346
346
  T,
347
- L.get(y),
347
+ L.get(_),
348
348
  M,
349
- I.get(y),
349
+ I.get(_),
350
350
  E,
351
- d
351
+ r
352
352
  );
353
353
  }
354
354
  return;
355
355
  }
356
- const g = o.map((L, I) => ({ sig: JSON.stringify(L), idx: I, item: L })), b = i.map((L, I) => ({ sig: JSON.stringify(L), idx: I, item: L })), h = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
356
+ const g = o.map((L, I) => ({ sig: JSON.stringify(L), idx: I, item: L })), p = n.map((L, I) => ({ sig: JSON.stringify(L), idx: I, item: L })), h = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
357
357
  for (const L of g)
358
358
  h.has(L.sig) || h.set(L.sig, []), h.get(L.sig).push(L);
359
- for (const L of b)
360
- n.has(L.sig) || n.set(L.sig, []), n.get(L.sig).push(L);
361
- const C = [], O = [], w = Array.from(h.keys()).concat(Array.from(n.keys())), P = Array.from(new Set(w));
362
- for (const L of P) {
363
- const I = h.get(L) || [], K = n.get(L) || [], H = Math.min(I.length, K.length);
364
- for (let y = H; y < I.length; y++)
365
- C.push({ idx: I[y].idx, item: I[y].item });
366
- for (let y = H; y < K.length; y++)
367
- O.push({ idx: K[y].idx, item: K[y].item });
359
+ for (const L of p)
360
+ i.has(L.sig) || i.set(L.sig, []), i.get(L.sig).push(L);
361
+ const C = [], O = [], k = Array.from(h.keys()).concat(Array.from(i.keys())), V = Array.from(new Set(k));
362
+ for (const L of V) {
363
+ const I = h.get(L) || [], K = i.get(L) || [], W = Math.min(I.length, K.length);
364
+ for (let _ = W; _ < I.length; _++)
365
+ C.push({ idx: I[_].idx, item: I[_].item });
366
+ for (let _ = W; _ < K.length; _++)
367
+ O.push({ idx: K[_].idx, item: K[_].item });
368
368
  }
369
369
  for (const { idx: L, item: I } of C)
370
- jt(`${t}[${L}]`, I, d);
370
+ jt(`${t}[${L}]`, I, r);
371
371
  for (const { idx: L, item: I } of O)
372
- Dt(`${t}[${L}]`, I, d);
372
+ Dt(`${t}[${L}]`, I, r);
373
373
  }
374
- function Ue(t, o, i, d, c, g) {
375
- if (!i && !c) return;
376
- if (i && !c) {
374
+ function Ue(t, o, n, r, d, g) {
375
+ if (!n && !d) return;
376
+ if (n && !d) {
377
377
  jt(t, o, g);
378
378
  return;
379
379
  }
380
- if (!i && c) {
381
- Dt(t, d, g);
380
+ if (!n && d) {
381
+ Dt(t, r, g);
382
382
  return;
383
383
  }
384
- if (JSON.stringify(o) === JSON.stringify(d)) return;
385
- if (pe(o) && pe(d)) {
386
- Ho(t, o, d, g);
384
+ if (JSON.stringify(o) === JSON.stringify(r)) return;
385
+ if (ge(o) && ge(r)) {
386
+ Xo(t, o, r, g);
387
387
  return;
388
388
  }
389
- if (we(o) && we(d)) {
390
- Go(t, o, d, g);
389
+ if (we(o) && we(r)) {
390
+ Qo(t, o, r, g);
391
391
  return;
392
392
  }
393
- const b = kt(o), h = kt(d);
394
- if (b.ok && h.ok) {
395
- Ue(t, b.value, !0, h.value, !0, g);
393
+ const p = It(o), h = It(r);
394
+ if (p.ok && h.ok) {
395
+ Ue(t, p.value, !0, h.value, !0, g);
396
396
  return;
397
397
  }
398
398
  g.push({
399
399
  path: t,
400
400
  type: "changed",
401
- before: Re(o),
402
- after: Re(d)
401
+ before: Ne(o),
402
+ after: Ne(r)
403
403
  });
404
404
  }
405
- function Xo(t, o) {
405
+ function Zo(t, o) {
406
406
  if (JSON.stringify(t) === JSON.stringify(o)) return [];
407
- const i = t == null, d = o == null;
408
- let c = t;
409
- i && (pe(o) ? c = {} : we(o) && (c = []));
407
+ const n = t == null, r = o == null;
408
+ let d = t;
409
+ n && (ge(o) ? d = {} : we(o) && (d = []));
410
410
  let g = o;
411
- d && (pe(t) ? g = {} : we(t) && (g = []));
412
- const b = [];
413
- return Ue("", c, !0, g, !0, b), b;
411
+ r && (ge(t) ? g = {} : we(t) && (g = []));
412
+ const p = [];
413
+ return Ue("", d, !0, g, !0, p), p;
414
414
  }
415
- function It(t) {
415
+ function At(t) {
416
416
  const o = t.operations;
417
- return !o || o.length === 0 ? !1 : o.some((i) => i.status === "failed");
417
+ return !o || o.length === 0 ? !1 : o.some((n) => n.status === "failed");
418
418
  }
419
- function At(t) {
419
+ function pe(t) {
420
420
  return t === void 0 ? "—" : Array.isArray(t) ? t.length > 0 ? t.join(", ") : "—" : t || "—";
421
421
  }
422
- function Qo(t) {
422
+ function es(t) {
423
423
  return {
424
424
  label: t.label,
425
425
  labelKey: t.labelKey,
426
426
  type: t.type,
427
- beforeDisplay: At(t.before),
428
- afterDisplay: At(t.after)
427
+ beforeDisplay: pe(t.before),
428
+ afterDisplay: pe(t.after)
429
429
  };
430
430
  }
431
- function Zo(t) {
431
+ function ts(t) {
432
432
  return Array.isArray(t) && t.length > 0;
433
433
  }
434
- const es = {
434
+ function Ct(t, o, n) {
435
+ return n.labelKey && o(n.labelKey) ? t(n.labelKey) : n.label;
436
+ }
437
+ function Tt(t, o) {
438
+ return st(t, o) || t("auditLog.operation.unlabeled");
439
+ }
440
+ function os(t, o) {
441
+ return !o || o.length === 0 ? "" : o.map((n) => {
442
+ const r = Tt(t, n), d = t(`auditLog.outcome.${n.status}`);
443
+ let g = `${r}: ${d}`;
444
+ return n.status === "failed" && n.errorMessage && (g += ` — ${n.errorMessage}`), g;
445
+ }).join(`
446
+ `);
447
+ }
448
+ function ss(t, o, n) {
449
+ const r = Ct(t, o, n);
450
+ return n.type === "add" ? `${r}: + ${pe(n.after)}` : n.type === "remove" ? `${r}: - ${pe(n.before)}` : `${r}: ${pe(n.before)} → ${pe(n.after)}`;
451
+ }
452
+ function as(t, o, n) {
453
+ if (!n || n.length === 0) return "";
454
+ const r = n.filter((p) => p.changeNodes && p.changeNodes.length > 0);
455
+ if (r.length === 0) return "";
456
+ const d = r.length > 1;
457
+ return r.map((p) => {
458
+ const h = (p.changeNodes ?? []).map((i) => ss(t, o, i));
459
+ return d ? [`[${Tt(t, p)}]`, ...h].join(`
460
+ `) : h.join(`
461
+ `);
462
+ }).join(`
463
+ `);
464
+ }
465
+ const ns = {
435
466
  class: "flex flex-col gap-4 p-12 w-[260px]"
436
- }, ts = {
467
+ }, ls = {
437
468
  class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
438
- }, os = {
469
+ }, rs = {
439
470
  class: "flex min-h-0 flex-1 flex-col gap-16"
440
- }, ss = {
471
+ }, is = {
441
472
  class: "space-y-16"
442
- }, as = {
473
+ }, us = {
443
474
  class: "flex flex-wrap items-center gap-8"
444
- }, ls = {
475
+ }, ds = {
445
476
  class: "w-fit"
446
- }, ns = {
477
+ }, cs = {
447
478
  class: "w-fit"
448
- }, rs = {
479
+ }, fs = {
449
480
  class: "w-fit"
450
- }, is = {
481
+ }, ms = {
451
482
  class: "w-fit"
452
- }, us = {
483
+ }, vs = {
453
484
  class: "flex h-full flex-col overflow-auto"
454
- }, ds = {
485
+ }, ps = {
455
486
  key: 0,
456
487
  class: "space-y-12 p-4 text-sm"
457
- }, cs = {
488
+ }, gs = {
458
489
  class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
459
- }, fs = {
490
+ }, hs = {
460
491
  class: "min-w-0 flex-1"
461
- }, ms = {
492
+ }, ys = {
462
493
  class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
463
- }, vs = {
494
+ }, bs = {
464
495
  key: 0,
465
496
  class: "mt-4 break-all font-mono text-xs text-fm-color-typo-secondary"
466
- }, ps = {
497
+ }, _s = {
467
498
  class: "flex items-center gap-4"
468
- }, gs = {
499
+ }, xs = {
469
500
  class: "rounded-lg border border-fm-color-border-default p-12"
470
- }, hs = {
501
+ }, Ls = {
471
502
  class: "space-y-12"
472
- }, ys = {
473
- class: "text-xs text-fm-color-typo-secondary"
474
- }, bs = {
475
- class: "font-semibold"
476
- }, _s = {
503
+ }, Ss = {
477
504
  class: "text-xs text-fm-color-typo-secondary"
478
- }, xs = {
505
+ }, ks = {
479
506
  class: "font-semibold"
480
- }, Ls = {
481
- class: "text-xs text-fm-color-typo-secondary"
482
- }, Ss = {
483
- class: "break-all font-semibold"
484
507
  }, ws = {
485
- key: 0
486
- }, ks = {
487
508
  class: "text-xs text-fm-color-typo-secondary"
488
509
  }, Is = {
489
- class: "break-all font-mono text-xs font-semibold"
510
+ class: "font-semibold"
490
511
  }, As = {
491
512
  class: "text-xs text-fm-color-typo-secondary"
492
513
  }, Fs = {
493
- class: "break-all font-mono text-xs font-semibold"
514
+ class: "break-all font-semibold"
494
515
  }, Ms = {
495
- class: "text-xs text-fm-color-typo-secondary"
516
+ key: 0
496
517
  }, Os = {
497
- class: "font-semibold"
518
+ class: "text-xs text-fm-color-typo-secondary"
498
519
  }, Ds = {
499
- class: "rounded-lg border border-fm-color-border-default"
520
+ class: "break-all font-mono text-xs font-semibold"
500
521
  }, js = {
501
- class: "p-12"
522
+ class: "text-xs text-fm-color-typo-secondary"
502
523
  }, Cs = {
503
- class: "text-base font-bold text-fm-color-typo-primary"
524
+ class: "break-all font-mono text-xs font-semibold"
504
525
  }, Ts = {
505
- class: "space-y-12 p-12"
506
- }, Ps = {
507
526
  class: "text-xs text-fm-color-typo-secondary"
508
527
  }, Vs = {
509
528
  class: "font-semibold"
510
- }, Es = {
529
+ }, Ps = {
511
530
  class: "rounded-lg border border-fm-color-border-default"
512
- }, Rs = {
531
+ }, Es = {
513
532
  class: "p-12"
514
- }, Us = {
533
+ }, $s = {
515
534
  class: "text-base font-bold text-fm-color-typo-primary"
516
535
  }, Ns = {
517
536
  class: "space-y-12 p-12"
518
- }, $s = {
537
+ }, Us = {
519
538
  class: "text-xs text-fm-color-typo-secondary"
520
- }, Ks = {
539
+ }, Rs = {
521
540
  class: "font-semibold"
541
+ }, Ks = {
542
+ class: "rounded-lg border border-fm-color-border-default"
522
543
  }, Bs = {
523
- key: 0
544
+ class: "p-12"
524
545
  }, Ys = {
525
- class: "text-xs text-fm-color-typo-secondary"
546
+ class: "text-base font-bold text-fm-color-typo-primary"
526
547
  }, zs = {
548
+ class: "space-y-12 p-12"
549
+ }, qs = {
550
+ class: "text-xs text-fm-color-typo-secondary"
551
+ }, Js = {
552
+ class: "font-semibold"
553
+ }, Hs = {
554
+ key: 0
555
+ }, Ws = {
556
+ class: "text-xs text-fm-color-typo-secondary"
557
+ }, Gs = {
527
558
  key: 0,
528
559
  class: "font-semibold"
529
- }, qs = {
560
+ }, Xs = {
530
561
  key: 1,
531
562
  class: "break-all font-mono text-xs text-fm-color-typo-secondary"
532
- }, Js = {
563
+ }, Qs = {
533
564
  key: 1
534
- }, Ws = {
565
+ }, Zs = {
535
566
  class: "text-xs text-fm-color-typo-secondary"
536
- }, Hs = {
567
+ }, ea = {
537
568
  class: "font-semibold whitespace-pre-line"
538
- }, Gs = {
569
+ }, ta = {
539
570
  class: "text-xs text-fm-color-typo-secondary"
540
- }, Xs = {
571
+ }, oa = {
541
572
  class: "font-semibold"
542
- }, Qs = {
573
+ }, sa = {
543
574
  class: "text-xs text-fm-color-typo-secondary"
544
- }, Zs = {
575
+ }, aa = {
545
576
  class: "break-all font-mono text-xs font-semibold"
546
- }, ea = {
577
+ }, na = {
547
578
  key: 2
548
- }, ta = {
579
+ }, la = {
549
580
  class: "text-xs text-fm-color-typo-secondary"
550
- }, oa = {
581
+ }, ra = {
551
582
  class: "mt-4 space-y-4"
552
- }, sa = {
583
+ }, ia = {
553
584
  class: "flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-fm-color-primary-default text-xs font-bold text-white"
554
- }, aa = {
585
+ }, ua = {
555
586
  class: "text-xs font-semibold"
556
- }, la = {
587
+ }, da = {
557
588
  key: 0,
558
589
  class: "text-fm-color-typo-secondary"
559
- }, na = {
590
+ }, ca = {
560
591
  key: 3
561
- }, ra = {
592
+ }, fa = {
562
593
  class: "text-xs text-fm-color-typo-secondary"
563
- }, ia = {
594
+ }, ma = {
564
595
  class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
565
- }, ua = {
596
+ }, va = {
566
597
  key: 0,
567
598
  class: "space-y-12 p-4 text-sm"
568
- }, da = {
599
+ }, pa = {
569
600
  class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
570
- }, ca = {
601
+ }, ga = {
571
602
  class: "min-w-0 flex-1"
572
- }, fa = {
603
+ }, ha = {
573
604
  class: "text-base font-bold leading-snug text-fm-color-typo-primary"
574
- }, ma = {
605
+ }, ya = {
575
606
  key: 0,
576
607
  class: "text-xs text-fm-color-typo-secondary"
577
- }, va = {
608
+ }, ba = {
578
609
  class: "rounded-lg border border-fm-color-border-default p-12"
579
- }, pa = {
610
+ }, _a = {
580
611
  class: "space-y-12"
581
- }, ga = {
612
+ }, xa = {
582
613
  class: "text-xs text-fm-color-typo-secondary"
583
- }, ha = {
614
+ }, La = {
584
615
  class: "font-semibold"
585
- }, ya = {
616
+ }, Sa = {
586
617
  key: 0
587
- }, ba = {
618
+ }, ka = {
588
619
  class: "text-xs text-fm-color-typo-secondary"
589
- }, _a = {
620
+ }, wa = {
590
621
  class: "font-semibold"
591
- }, xa = {
622
+ }, Ia = {
592
623
  key: 1
593
- }, La = {
624
+ }, Aa = {
594
625
  class: "text-xs text-fm-color-typo-secondary"
595
- }, Sa = {
626
+ }, Fa = {
596
627
  class: "font-semibold"
597
- }, wa = {
628
+ }, Ma = {
598
629
  key: 0,
599
630
  class: "rounded-lg border border-fm-color-border-default p-12"
600
- }, ka = {
631
+ }, Oa = {
601
632
  class: "text-xs text-fm-color-typo-secondary"
602
- }, Ia = {
633
+ }, Da = {
603
634
  class: "whitespace-pre-line font-semibold text-fm-color-typo-error"
604
- }, Aa = {
635
+ }, ja = {
605
636
  class: "rounded-lg border border-fm-color-border-default"
606
- }, Fa = {
637
+ }, Ca = {
607
638
  class: "p-12"
608
- }, Ma = {
639
+ }, Ta = {
609
640
  class: "text-base font-bold text-fm-color-typo-primary"
610
- }, Oa = {
641
+ }, Va = {
611
642
  class: "p-12"
612
- }, Da = {
643
+ }, Pa = {
613
644
  key: 0,
614
645
  class: "divide-y divide-fm-color-border-default"
615
- }, ja = {
646
+ }, Ea = {
616
647
  class: "flex flex-wrap items-center gap-8"
617
- }, Ca = {
648
+ }, $a = {
618
649
  class: "break-all text-xs"
619
- }, Ta = {
650
+ }, Na = {
620
651
  class: "break-all font-mono text-xs"
621
- }, Pa = {
652
+ }, Ua = {
622
653
  key: 0,
623
654
  class: "text-fm-color-typo-success"
624
- }, Va = {
655
+ }, Ra = {
625
656
  key: 1,
626
657
  class: "text-fm-color-typo-error"
627
- }, Ea = {
658
+ }, Ka = {
628
659
  class: "text-fm-color-typo-error"
629
- }, Ra = {
660
+ }, Ba = {
630
661
  class: "text-fm-color-typo-success"
631
- }, Ua = {
662
+ }, Ya = {
632
663
  key: 1,
633
664
  class: "divide-y divide-fm-color-border-default"
634
- }, Na = {
665
+ }, za = {
635
666
  class: "flex flex-wrap items-center gap-8"
636
- }, $a = {
667
+ }, qa = {
637
668
  class: "break-all font-mono text-xs"
638
- }, Ka = {
669
+ }, Ja = {
639
670
  class: "space-y-4"
640
- }, Ba = {
671
+ }, Ha = {
641
672
  key: 0,
642
673
  class: "text-fm-color-typo-success"
643
- }, Ya = {
674
+ }, Wa = {
644
675
  key: 1,
645
676
  class: "text-fm-color-typo-error"
646
- }, za = {
677
+ }, Ga = {
647
678
  class: "text-fm-color-typo-error"
648
- }, qa = {
679
+ }, Xa = {
649
680
  class: "text-fm-color-typo-success"
650
- }, Ja = {
681
+ }, Qa = {
651
682
  key: 2,
652
683
  class: "text-fm-color-typo-secondary"
653
- }, Wa = {
684
+ }, Za = {
654
685
  key: 1,
655
686
  class: "rounded-lg border border-fm-color-border-default"
656
- }, Ha = {
687
+ }, en = {
657
688
  class: "text-base font-bold text-fm-color-typo-primary"
658
- }, Ga = {
689
+ }, tn = {
659
690
  class: "space-y-12 p-12"
660
- }, Xa = {
691
+ }, on = {
661
692
  key: 0
662
- }, Qa = {
693
+ }, sn = {
663
694
  class: "text-xs text-fm-color-typo-secondary"
664
- }, Za = {
695
+ }, an = {
665
696
  class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
666
- }, el = {
697
+ }, nn = {
667
698
  key: 1
668
- }, tl = {
699
+ }, ln = {
669
700
  class: "text-xs text-fm-color-typo-secondary"
670
- }, ol = {
701
+ }, rn = {
671
702
  class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
672
- }, Le = 100, tt = 1e3, Ee = "__feedmeAdmin__", sl = "D MMM YYYY h:mm A", al = "YYYY-MM-DD HH:mm", $ = "YYYY-MM-DD", Ft = "audit-log-export-fields", ll = /* @__PURE__ */ Mt({
703
+ }, Se = 100, ot = 1e3, $e = "__feedmeAdmin__", un = "D MMM YYYY h:mm A", dn = "YYYY-MM-DD HH:mm", R = "YYYY-MM-DD", Ft = "audit-log-export-fields-v3", cn = /* @__PURE__ */ Mt({
673
704
  __name: "AuditLogList",
674
705
  setup(t) {
675
706
  const {
676
707
  t: o,
677
- te: i
678
- } = Ot(), d = Oo(), c = Bo(), g = S(!1), b = S(!1), h = S([]), n = S(null), C = S(!1), O = S({}), w = S(null), P = S(!1);
708
+ te: n
709
+ } = Ot(), r = jo(), d = zo(), g = S(!1), p = S(!1), h = S([]), i = S(null), C = S(!1), O = S({}), k = S(null), V = S(!1);
679
710
  async function L(e) {
680
- const s = Uint8Array.from(atob(e), (x) => x.charCodeAt(0)), r = new DecompressionStream("gzip"), _ = r.writable.getWriter();
681
- return await _.write(s), await _.close(), new Response(r.readable).text();
711
+ const s = Uint8Array.from(atob(e), (x) => x.charCodeAt(0)), u = new DecompressionStream("gzip"), y = u.writable.getWriter();
712
+ return await y.write(s), await y.close(), new Response(u.readable).text();
682
713
  }
683
714
  const I = S("");
684
715
  let K = 0;
685
- ue(() => {
716
+ de(() => {
686
717
  var e, s;
687
- return (s = (e = n.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
718
+ return (s = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
688
719
  }, async (e) => {
689
720
  const s = ++K;
690
721
  if (!e) {
@@ -697,9 +728,9 @@ const es = {
697
728
  }
698
729
  if (e.startsWith("gzip:")) {
699
730
  try {
700
- const r = await L(e.slice(5));
731
+ const u = await L(e.slice(5));
701
732
  if (s !== K) return;
702
- I.value = JSON.stringify(JSON.parse(r), null, 2);
733
+ I.value = JSON.stringify(JSON.parse(u), null, 2);
703
734
  } catch {
704
735
  if (s !== K) return;
705
736
  I.value = e;
@@ -714,7 +745,7 @@ const es = {
714
745
  }, {
715
746
  immediate: !0
716
747
  });
717
- async function H(e) {
748
+ async function W(e) {
718
749
  if (!e) return;
719
750
  let s = e;
720
751
  if (e.startsWith("gzip:"))
@@ -729,7 +760,7 @@ const es = {
729
760
  return s;
730
761
  }
731
762
  }
732
- function y(e) {
763
+ function _(e) {
733
764
  if (e === void 0) return "";
734
765
  if (typeof e == "object" && e !== null)
735
766
  try {
@@ -739,171 +770,171 @@ const es = {
739
770
  }
740
771
  return String(e);
741
772
  }
742
- const M = S([]), E = S([]), T = S(""), Y = S(""), N = S(!1);
743
- let k = 0;
744
- ue(w, async (e) => {
745
- const s = ++k;
746
- if (M.value = [], E.value = [], T.value = "", Y.value = "", N.value = !1, !e) return;
747
- const [r, _] = await Promise.all([H(e.before), H(e.after)]);
748
- s === k && (Zo(e.changeNodes) ? E.value = e.changeNodes.map(Qo) : M.value = Xo(r, _), T.value = y(r), Y.value = y(_));
773
+ const M = S([]), E = S([]), T = S(""), Y = S(""), U = S(!1);
774
+ let w = 0;
775
+ de(k, async (e) => {
776
+ const s = ++w;
777
+ if (M.value = [], E.value = [], T.value = "", Y.value = "", U.value = !1, !e) return;
778
+ const [u, y] = await Promise.all([W(e.before), W(e.after)]);
779
+ s === w && (ts(e.changeNodes) ? E.value = e.changeNodes.map(es) : M.value = Zo(u, y), T.value = _(u), Y.value = _(y));
749
780
  });
750
- function de(e) {
781
+ function ce(e) {
751
782
  return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
752
783
  }
753
- function le(e) {
784
+ function ne(e) {
754
785
  return o(e === "added" ? "auditLog.operation.added" : e === "removed" ? "auditLog.operation.removed" : "auditLog.operation.updated");
755
786
  }
756
- function ke(e) {
787
+ function Ie(e) {
757
788
  return e.replace(/\[[^\]]*\]/g, "");
758
789
  }
759
- function ot(e) {
790
+ function at(e) {
760
791
  return e === "add" ? "success" : e === "remove" ? "critical" : "warning";
761
792
  }
762
793
  function J(e) {
763
794
  return o(e === "add" ? "auditLog.operation.added" : e === "remove" ? "auditLog.operation.removed" : "auditLog.operation.updated");
764
795
  }
765
- function ge(e) {
766
- return e.labelKey && i(e.labelKey) ? o(e.labelKey) : e.label;
796
+ function he(e) {
797
+ return Ct(o, n, e);
767
798
  }
768
- const st = A(() => {
799
+ const nt = A(() => {
769
800
  const e = [], s = /* @__PURE__ */ new Map();
770
- for (const r of M.value) {
771
- const _ = ke(r.path), x = `${r.type}::${_}`;
801
+ for (const u of M.value) {
802
+ const y = Ie(u.path), x = `${u.type}::${y}`;
772
803
  let F = s.get(x);
773
804
  F || (F = {
774
805
  groupKey: x,
775
- displayKey: _,
776
- type: r.type,
806
+ displayKey: y,
807
+ type: u.type,
777
808
  rows: []
778
- }, s.set(x, F), e.push(F)), F.rows.push(r);
809
+ }, s.set(x, F), e.push(F)), F.rows.push(u);
779
810
  }
780
811
  return e;
781
- }), Ie = S(1), Ct = S(!1), Ne = S(0), at = A(() => Math.max(1, Math.ceil(Ne.value / Le))), lt = D().format("YYYY-MM-DD"), Q = S({
782
- startDate: `${lt} 00:00`,
783
- endDate: `${lt} 23:59`
784
- }), ce = S(), G = S(), Z = S(), ee = S(), ne = S("all");
785
- function Tt(e) {
812
+ }), Ae = S(1), Vt = S(!1), Re = S(0), lt = A(() => Math.max(1, Math.ceil(Re.value / Se))), rt = D().format("YYYY-MM-DD"), Q = S({
813
+ startDate: `${rt} 00:00`,
814
+ endDate: `${rt} 23:59`
815
+ }), fe = S(), G = S(), Z = S(), ee = S(), le = S("all");
816
+ function Pt(e) {
786
817
  return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
787
818
  }
788
- const nt = xe.filter((e) => e.key !== "all").map((e) => e.key);
789
- function Ae(e) {
790
- const s = xe.find((r) => r.key !== "all" && r.subjectPrefixes.some((_) => e.startsWith(_)));
819
+ const it = Le.filter((e) => e.key !== "all").map((e) => e.key);
820
+ function Fe(e) {
821
+ const s = Le.find((u) => u.key !== "all" && u.subjectPrefixes.some((y) => e.startsWith(y)));
791
822
  return (s == null ? void 0 : s.key) ?? "other";
792
823
  }
793
- function rt(e) {
794
- const s = nt.indexOf(e);
795
- return s === -1 ? nt.length : s;
824
+ function ut(e) {
825
+ const s = it.indexOf(e);
826
+ return s === -1 ? it.length : s;
796
827
  }
797
- const Pt = A(() => xe.map(({
828
+ const Et = A(() => Le.map(({
798
829
  key: e
799
830
  }) => ({
800
831
  label: o(`auditLog.modules.${e}`),
801
832
  value: e
802
- }))), $e = A(() => xe.find((e) => e.key === ne.value) ?? xe[0]), Vt = A(() => ne.value === "all"), he = S([]), Fe = S(!1), Et = A(() => [...Fe.value ? [{
833
+ }))), Ke = A(() => Le.find((e) => e.key === le.value) ?? Le[0]), $t = A(() => le.value === "all"), ye = S([]), Me = S(!1), Nt = A(() => [...Me.value ? [{
803
834
  label: o("auditLog.user.feedmeAdmin"),
804
- value: Ee
805
- }] : [], ...c.members.map((e) => ({
835
+ value: $e
836
+ }] : [], ...d.members.map((e) => ({
806
837
  label: e.name,
807
838
  value: e.doc.userId
808
- })), ...he.value.map((e) => ({
839
+ })), ...ye.value.map((e) => ({
809
840
  label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
810
841
  value: e.userId
811
842
  }))]), te = A(() => {
812
- const e = ce.value ?? [];
843
+ const e = fe.value ?? [];
813
844
  return {
814
- userIds: e.filter((s) => s !== Ee),
815
- feedmeAdminActors: e.includes(Ee)
845
+ userIds: e.filter((s) => s !== $e),
846
+ feedmeAdminActors: e.includes($e)
816
847
  };
817
- }), Ke = S(""), X = S(""), Rt = Eo(Ke, (e) => {
848
+ }), Be = S(""), X = S(""), Ut = No(Be, (e) => {
818
849
  X.value = e.trim();
819
850
  });
820
- Fo(Rt);
821
- const fe = A(() => {
851
+ Oo(Ut);
852
+ const re = A(() => {
822
853
  const e = X.value.toLowerCase();
823
854
  if (!e) return [];
824
855
  const s = /* @__PURE__ */ new Set();
825
- for (const r of c.members) {
826
- const _ = r.doc.userId;
827
- ((c.userIdToName[_] ?? "").toLowerCase().includes(e) || (c.userIdToEmail[_] ?? "").toLowerCase().includes(e) || (c.userIdToPhone[_] ?? "").toLowerCase().includes(e)) && s.add(_);
856
+ for (const u of d.members) {
857
+ const y = u.doc.userId;
858
+ ((d.userIdToName[y] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[y] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[y] ?? "").toLowerCase().includes(e)) && s.add(y);
828
859
  }
829
- for (const r of he.value)
830
- r.name.toLowerCase().includes(e) && s.add(r.userId);
860
+ for (const u of ye.value)
861
+ u.name.toLowerCase().includes(e) && s.add(u.userId);
831
862
  return [...s];
832
- }), Be = A(() => {
833
- const e = Lt.flatMap((x) => Tt(x.subject).map((F) => ({
863
+ }), Ye = A(() => {
864
+ const e = kt.flatMap((x) => Pt(x.subject).map((F) => ({
834
865
  label: x.label,
835
866
  value: F
836
- }))), s = Object.entries(xt).map(([x, F]) => ({
867
+ }))), s = Object.entries(St).map(([x, F]) => ({
837
868
  label: F,
838
869
  value: x
839
- })), r = /* @__PURE__ */ new Set(), _ = [];
870
+ })), u = /* @__PURE__ */ new Set(), y = [];
840
871
  for (const x of [...e, ...s])
841
- if (!r.has(x.value)) {
842
- r.add(x.value);
843
- const F = Ae(x.value);
844
- _.push({
872
+ if (!u.has(x.value)) {
873
+ u.add(x.value);
874
+ const F = Fe(x.value);
875
+ y.push({
845
876
  ...x,
846
877
  group: o(`auditLog.modules.${F}`)
847
878
  });
848
879
  }
849
- return _.sort((x, F) => rt(Ae(x.value)) - rt(Ae(F.value)));
880
+ return y.sort((x, F) => ut(Fe(x.value)) - ut(Fe(F.value)));
850
881
  }), me = A(() => {
851
882
  const e = X.value.toLowerCase();
852
883
  if (!e) return [];
853
884
  const s = /* @__PURE__ */ new Set();
854
- for (const r of Be.value)
855
- r.label.toLowerCase().includes(e) && s.add(r.value);
885
+ for (const u of Ye.value)
886
+ u.label.toLowerCase().includes(e) && s.add(u.value);
856
887
  return [...s];
857
- }), Ut = A(() => Vt.value ? Be.value : Be.value.filter((e) => Ae(e.value) === ne.value));
858
- function Nt(e, s) {
859
- const r = s.toLowerCase();
860
- return e.label.toLowerCase().includes(r) || e.value.replace(/^business::/, "").toLowerCase().includes(r) ? !0 : e.value.toLowerCase().includes(r);
888
+ }), Rt = A(() => $t.value ? Ye.value : Ye.value.filter((e) => Fe(e.value) === le.value));
889
+ function Kt(e, s) {
890
+ const u = s.toLowerCase();
891
+ return e.label.toLowerCase().includes(u) || e.value.replace(/^business::/, "").toLowerCase().includes(u) ? !0 : e.value.toLowerCase().includes(u);
861
892
  }
862
- const W = A(() => ({
893
+ const H = A(() => ({
863
894
  manage: o("auditLog.action.manage"),
864
895
  create: o("auditLog.action.create"),
865
896
  read: o("auditLog.action.read"),
866
897
  update: o("auditLog.action.update"),
867
898
  delete: o("auditLog.action.delete")
868
- })), $t = A(() => [{
869
- label: W.value.manage,
899
+ })), Bt = A(() => [{
900
+ label: H.value.manage,
870
901
  value: "manage"
871
902
  }, {
872
- label: W.value.create,
903
+ label: H.value.create,
873
904
  value: "create"
874
905
  }, {
875
- label: W.value.read,
906
+ label: H.value.read,
876
907
  value: "read"
877
908
  }, {
878
- label: W.value.update,
909
+ label: H.value.update,
879
910
  value: "update"
880
911
  }, {
881
- label: W.value.delete,
912
+ label: H.value.delete,
882
913
  value: "delete"
883
- }]), Me = A(() => ({
914
+ }]), Oe = A(() => ({
884
915
  allowed: o("auditLog.outcome.success"),
885
916
  denied: o("auditLog.outcome.failed"),
886
917
  skipped: o("auditLog.outcome.skipped")
887
- })), Ye = A(() => {
918
+ })), ze = A(() => {
888
919
  var e;
889
- return ((e = d.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
920
+ return ((e = r.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
890
921
  });
891
- function it(e) {
892
- return !Ye.value && e === "skipped" ? "allowed" : e;
922
+ function dt(e) {
923
+ return !ze.value && e === "skipped" ? "allowed" : e;
893
924
  }
894
- function ze(e) {
895
- return !(e != null && e.length) || Ye.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
925
+ function qe(e) {
926
+ return !(e != null && e.length) || ze.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
896
927
  }
897
- const Kt = A(() => [{
898
- label: Me.value.allowed,
928
+ const Yt = A(() => [{
929
+ label: Oe.value.allowed,
899
930
  value: "allowed"
900
931
  }, {
901
- label: Me.value.denied,
932
+ label: Oe.value.denied,
902
933
  value: "denied"
903
- }, ...Ye.value ? [{
904
- label: Me.value.skipped,
934
+ }, ...ze.value ? [{
935
+ label: Oe.value.skipped,
905
936
  value: "skipped"
906
- }] : []]), Bt = A(() => ({
937
+ }] : []]), zt = A(() => ({
907
938
  admin: o("auditLog.detail.resolvedFromValue.admin"),
908
939
  staff: o("auditLog.detail.resolvedFromValue.staff"),
909
940
  permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
@@ -911,141 +942,145 @@ const es = {
911
942
  custom: o("auditLog.detail.resolvedFromValue.custom"),
912
943
  "no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
913
944
  unknown: o("auditLog.detail.resolvedFromValue.unknown")
914
- })), Yt = A(() => ({
915
- GET: W.value.read,
916
- POST: W.value.create,
917
- PUT: W.value.update,
918
- PATCH: W.value.update,
919
- DELETE: W.value.delete
920
- })), zt = {
945
+ })), qt = A(() => ({
946
+ GET: H.value.read,
947
+ POST: H.value.create,
948
+ PUT: H.value.update,
949
+ PATCH: H.value.update,
950
+ DELETE: H.value.delete
951
+ })), Jt = {
921
952
  allowed: "success",
922
953
  denied: "critical",
923
954
  skipped: "warning"
924
955
  };
925
- function Oe(e) {
926
- return D(e).format(sl);
956
+ function De(e) {
957
+ return D(e).format(un);
927
958
  }
928
- const qt = A(() => {
959
+ const Ht = A(() => {
929
960
  const {
930
961
  startDate: e,
931
962
  endDate: s
932
963
  } = Q.value;
933
- return e && s ? `${Oe(e)} – ${Oe(s)}` : e ? Oe(e) : s ? Oe(s) : o("auditLog.dateRange.placeholder");
934
- }), Jt = A(() => [{
964
+ return e && s ? `${De(e)} – ${De(s)}` : e ? De(e) : s ? De(s) : o("auditLog.dateRange.placeholder");
965
+ }), Wt = A(() => [{
935
966
  label: o("date.predefinedRanges.today"),
936
967
  value: {
937
- startDate: D().format($),
938
- endDate: D().format($)
968
+ startDate: D().format(R),
969
+ endDate: D().format(R)
939
970
  }
940
971
  }, {
941
972
  label: o("date.predefinedRanges.yesterday"),
942
973
  value: {
943
- startDate: D().subtract(1, "day").format($),
944
- endDate: D().subtract(1, "day").format($)
974
+ startDate: D().subtract(1, "day").format(R),
975
+ endDate: D().subtract(1, "day").format(R)
945
976
  }
946
977
  }, {
947
978
  label: o("date.predefinedRanges.thisWeek"),
948
979
  value: {
949
- startDate: D().startOf("week").format($),
950
- endDate: D().endOf("week").format($)
980
+ startDate: D().startOf("week").format(R),
981
+ endDate: D().endOf("week").format(R)
951
982
  }
952
983
  }, {
953
984
  label: o("date.predefinedRanges.lastWeek"),
954
985
  value: {
955
- startDate: D().subtract(1, "week").startOf("week").format($),
956
- endDate: D().subtract(1, "week").endOf("week").format($)
986
+ startDate: D().subtract(1, "week").startOf("week").format(R),
987
+ endDate: D().subtract(1, "week").endOf("week").format(R)
957
988
  }
958
989
  }, {
959
990
  label: o("date.predefinedRanges.last7Days"),
960
991
  value: {
961
- startDate: D().subtract(7, "day").format($),
962
- endDate: D().subtract(1, "day").format($)
992
+ startDate: D().subtract(7, "day").format(R),
993
+ endDate: D().subtract(1, "day").format(R)
963
994
  }
964
995
  }, {
965
996
  label: o("date.predefinedRanges.thisMonth"),
966
997
  value: {
967
- startDate: D().startOf("month").format($),
968
- endDate: D().endOf("month").format($)
998
+ startDate: D().startOf("month").format(R),
999
+ endDate: D().endOf("month").format(R)
969
1000
  }
970
1001
  }, {
971
1002
  label: o("date.predefinedRanges.lastMonth"),
972
1003
  value: {
973
- startDate: D().subtract(1, "month").startOf("month").format($),
974
- endDate: D().subtract(1, "month").endOf("month").format($)
1004
+ startDate: D().subtract(1, "month").startOf("month").format(R),
1005
+ endDate: D().subtract(1, "month").endOf("month").format(R)
975
1006
  }
976
1007
  }]);
977
- function qe(e) {
1008
+ function Je(e) {
978
1009
  var s;
979
- return ((s = Lt.find((r) => r.subject === e)) == null ? void 0 : s.label) ?? xt[e];
1010
+ return ((s = kt.find((u) => u.subject === e)) == null ? void 0 : s.label) ?? St[e];
980
1011
  }
981
- function De(e) {
982
- var r;
983
- const s = c.userIdToName[e.userId];
984
- return s || (c.hasLoaded ? (r = d.sessionUser.value) != null && r.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
1012
+ function je(e) {
1013
+ var u, y;
1014
+ if (e.actorType === "portalUser")
1015
+ return e.actorName ?? e.userId;
1016
+ if (e.actorType === "feedmeAdmin")
1017
+ return (u = r.sessionUser.value) != null && u.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
1018
+ const s = d.userIdToName[e.userId];
1019
+ return s || (d.hasLoaded ? (y = r.sessionUser.value) != null && y.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
985
1020
  }
986
- function ut(e) {
987
- return c.userIdToPhone[e.userId] || "-";
1021
+ function ct(e) {
1022
+ return d.userIdToPhone[e.userId] || "-";
988
1023
  }
989
- function Wt(e) {
990
- return c.userIdToEmail[e.userId] || "-";
1024
+ function Gt(e) {
1025
+ return d.userIdToEmail[e.userId] || "-";
991
1026
  }
992
- function dt(e) {
1027
+ function ft(e) {
993
1028
  return D(e).format("DD MMM YYYY, HH:mm");
994
1029
  }
995
- function ct(e) {
1030
+ function mt(e) {
996
1031
  return D(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
997
1032
  }
998
- function ft(e) {
999
- return W.value[e] ?? e;
1033
+ function vt(e) {
1034
+ return H.value[e] ?? e;
1000
1035
  }
1001
- function mt(e) {
1002
- return wt(o, {
1036
+ function pt(e) {
1037
+ return st(o, {
1003
1038
  eventKey: e.eventKey,
1004
1039
  params: e.params,
1005
- operationLabel: e.metadata.operationLabel ?? ft(e.action)
1040
+ operationLabel: e.metadata.operationLabel ?? vt(e.action)
1006
1041
  });
1007
1042
  }
1008
- function vt(e) {
1009
- return wt(o, e) || o("auditLog.operation.unlabeled");
1043
+ function gt(e) {
1044
+ return st(o, e) || o("auditLog.operation.unlabeled");
1010
1045
  }
1011
- function Ht(e) {
1012
- return qe(e.subject) ?? e.subject;
1046
+ function Xt(e) {
1047
+ return Je(e.subject) ?? e.subject;
1013
1048
  }
1014
- function Je(e) {
1015
- return Me.value[it(e)];
1049
+ function He(e) {
1050
+ return Oe.value[dt(e)];
1016
1051
  }
1017
- function pt(e) {
1018
- return zt[it(e)] ?? "neutral";
1052
+ function ht(e) {
1053
+ return Jt[dt(e)] ?? "neutral";
1019
1054
  }
1020
- function Gt(e) {
1021
- return Bt.value[e] ?? e;
1055
+ function Qt(e) {
1056
+ return zt.value[e] ?? e;
1022
1057
  }
1023
- function Xt(e) {
1024
- return e.metadata.requestMethod ? Yt.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : ft(e.action);
1058
+ function Zt(e) {
1059
+ return e.metadata.requestMethod ? qt.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : vt(e.action);
1025
1060
  }
1026
- function gt(e) {
1061
+ function yt(e) {
1027
1062
  const s = String(e ?? "");
1028
1063
  return `"${(/^[=+\-@\t\r]/.test(s) ? `'${s}` : s).replace(/"/g, '""')}"`;
1029
1064
  }
1030
1065
  const We = [{
1031
1066
  key: "timestamp",
1032
1067
  labelKey: "auditLog.exportFields.timestamp",
1033
- getValue: (e) => dt(e.timestamp),
1068
+ getValue: (e) => ft(e.timestamp),
1034
1069
  defaultSelected: !0
1035
1070
  }, {
1036
1071
  key: "userName",
1037
1072
  labelKey: "auditLog.exportFields.userName",
1038
- getValue: (e) => De(e),
1073
+ getValue: (e) => je(e),
1039
1074
  defaultSelected: !0
1040
1075
  }, {
1041
1076
  key: "userPhone",
1042
1077
  labelKey: "auditLog.exportFields.userPhone",
1043
- getValue: (e) => ut(e),
1078
+ getValue: (e) => ct(e),
1044
1079
  defaultSelected: !0
1045
1080
  }, {
1046
1081
  key: "subject",
1047
1082
  labelKey: "auditLog.exportFields.subject",
1048
- getValue: (e) => qe(e.subject) ?? e.subject,
1083
+ getValue: (e) => Je(e.subject) ?? e.subject,
1049
1084
  defaultSelected: !0
1050
1085
  }, {
1051
1086
  key: "action",
@@ -1055,13 +1090,23 @@ const es = {
1055
1090
  }, {
1056
1091
  key: "operation",
1057
1092
  labelKey: "auditLog.exportFields.operation",
1058
- getValue: (e) => mt(e),
1093
+ getValue: (e) => pt(e),
1059
1094
  defaultSelected: !0
1060
1095
  }, {
1061
1096
  key: "outcome",
1062
1097
  labelKey: "auditLog.exportFields.outcome",
1063
- getValue: (e) => Je(e.outcome),
1098
+ getValue: (e) => He(e.outcome),
1099
+ defaultSelected: !0
1100
+ }, {
1101
+ key: "operationEvents",
1102
+ labelKey: "auditLog.exportFields.operationEvents",
1103
+ getValue: (e) => os(o, e.operations),
1064
1104
  defaultSelected: !0
1105
+ }, {
1106
+ key: "changes",
1107
+ labelKey: "auditLog.exportFields.changes",
1108
+ getValue: (e) => as(o, n, e.operations),
1109
+ defaultSelected: !1
1065
1110
  }, {
1066
1111
  key: "businessId",
1067
1112
  labelKey: "auditLog.exportFields.businessId",
@@ -1101,8 +1146,13 @@ const es = {
1101
1146
  return (s = e.metadata) == null ? void 0 : s.requestPath;
1102
1147
  },
1103
1148
  defaultSelected: !1
1149
+ }, {
1150
+ key: "traceId",
1151
+ labelKey: "auditLog.exportFields.traceId",
1152
+ getValue: (e) => e.traceId ?? "",
1153
+ defaultSelected: !1
1104
1154
  }];
1105
- function Qt() {
1155
+ function eo() {
1106
1156
  try {
1107
1157
  const e = localStorage.getItem(Ft);
1108
1158
  if (e) {
@@ -1113,8 +1163,8 @@ const es = {
1113
1163
  }
1114
1164
  return new Set(We.filter((e) => e.defaultSelected).map((e) => e.key));
1115
1165
  }
1116
- const ve = S(Qt());
1117
- function Zt(e) {
1166
+ const ve = S(eo());
1167
+ function to(e) {
1118
1168
  const s = new Set(ve.value);
1119
1169
  if (s.has(e)) {
1120
1170
  if (s.size <= 1) return;
@@ -1127,19 +1177,19 @@ const es = {
1127
1177
  } catch {
1128
1178
  }
1129
1179
  }
1130
- async function eo() {
1131
- var e, s, r, _, x;
1132
- if (!b.value) {
1133
- b.value = !0;
1180
+ async function oo() {
1181
+ var e, s, u, y, x;
1182
+ if (!p.value) {
1183
+ p.value = !0;
1134
1184
  try {
1135
1185
  const {
1136
1186
  startDate: F,
1137
- endDate: R
1138
- } = Q.value, oe = $e.value.subjectPrefixes, je = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), ye = R ? se(R) : null, Ce = ye && ye < je ? ye : je, Ge = {
1187
+ endDate: $
1188
+ } = Q.value, oe = Ke.value.subjectPrefixes, Ce = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), be = $ ? se($) : null, Te = be && be < Ce ? be : Ce, Xe = {
1139
1189
  ...F ? {
1140
1190
  from: se(F)
1141
1191
  } : {},
1142
- to: Ce,
1192
+ to: Te,
1143
1193
  ...te.value.userIds.length ? {
1144
1194
  userIds: te.value.userIds
1145
1195
  } : {},
@@ -1155,48 +1205,48 @@ const es = {
1155
1205
  ...(s = ee.value) != null && s.length ? {
1156
1206
  actions: ee.value
1157
1207
  } : {},
1158
- ...(r = Z.value) != null && r.length ? {
1159
- outcomes: ze(Z.value)
1208
+ ...(u = Z.value) != null && u.length ? {
1209
+ outcomes: qe(Z.value)
1160
1210
  } : {},
1161
1211
  ...X.value ? {
1162
1212
  search: X.value
1163
1213
  } : {},
1164
- ...fe.value.length ? {
1165
- searchUserIds: fe.value
1214
+ ...re.value.length ? {
1215
+ searchUserIds: re.value
1166
1216
  } : {},
1167
1217
  ...me.value.length ? {
1168
1218
  searchSubjects: me.value
1169
1219
  } : {}
1170
- }, be = [];
1220
+ }, _e = [];
1171
1221
  let f = 0;
1172
1222
  for (; ; ) {
1173
- const z = await Ve.read({
1174
- ...Ge,
1175
- limit: tt,
1223
+ const z = await Ee.read({
1224
+ ...Xe,
1225
+ limit: ot,
1176
1226
  offset: f
1177
1227
  });
1178
- if (be.push(...z), z.length < tt) break;
1179
- f += tt;
1228
+ if (_e.push(...z), z.length < ot) break;
1229
+ f += ot;
1180
1230
  }
1181
- const V = We.filter((z) => ve.value.has(z.key)), vo = V.map((z) => o(z.labelKey)), po = be.map((z) => V.map((wo) => wo.getValue(z) ?? "")), Xe = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), go = Xe >= 0 ? "+" : "-", ho = String(Math.floor(Math.abs(Xe) / 60)).padStart(2, "0"), yo = String(Math.abs(Xe) % 60).padStart(2, "0"), bo = `UTC${go}${ho}:${yo}`, bt = ((_ = d.currentBusiness.value) == null ? void 0 : _.name) || "", _o = [F, R].filter(Boolean).join(" – "), xo = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${_o}`], ...bt ? [[`${o("auditLog.frontMatter.business")}: ${bt}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${D().format("DD MMM YYYY, HH:mm")} (${bo})`], []].map((z) => z.map(gt).join(",")), ...[vo, ...po].map((z) => z.map(gt).join(","))].join(`
1182
- `), Lo = `audit-log_${(((x = d.currentBusiness.value) == null ? void 0 : x.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${D().format("YYYYMMDD_HHmmss")}.csv`, So = new Blob([`\uFEFF${xo}`], {
1231
+ const P = We.filter((z) => ve.value.has(z.key)), go = P.map((z) => o(z.labelKey)), ho = _e.map((z) => P.map((Io) => Io.getValue(z) ?? "")), Qe = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), yo = Qe >= 0 ? "+" : "-", bo = String(Math.floor(Math.abs(Qe) / 60)).padStart(2, "0"), _o = String(Math.abs(Qe) % 60).padStart(2, "0"), xo = `UTC${yo}${bo}:${_o}`, xt = ((y = r.currentBusiness.value) == null ? void 0 : y.name) || "", Lo = [F, $].filter(Boolean).join(" – "), So = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Lo}`], ...xt ? [[`${o("auditLog.frontMatter.business")}: ${xt}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${D().format("DD MMM YYYY, HH:mm")} (${xo})`], []].map((z) => z.map(yt).join(",")), ...[go, ...ho].map((z) => z.map(yt).join(","))].join(`
1232
+ `), ko = `audit-log_${(((x = r.currentBusiness.value) == null ? void 0 : x.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${D().format("YYYYMMDD_HHmmss")}.csv`, wo = new Blob([`\uFEFF${So}`], {
1183
1233
  type: "text/csv;charset=utf-8;"
1184
- }), _t = window.URL.createObjectURL(So), _e = document.createElement("a");
1185
- _e.href = _t, _e.download = Lo, document.body.appendChild(_e), _e.click(), _e.remove(), window.URL.revokeObjectURL(_t);
1234
+ }), Lt = window.URL.createObjectURL(wo), xe = document.createElement("a");
1235
+ xe.href = Lt, xe.download = ko, document.body.appendChild(xe), xe.click(), xe.remove(), window.URL.revokeObjectURL(Lt);
1186
1236
  } finally {
1187
- b.value = !1;
1237
+ p.value = !1;
1188
1238
  }
1189
1239
  }
1190
1240
  }
1191
- function re(e) {
1241
+ function ie(e) {
1192
1242
  return "status" in e;
1193
1243
  }
1194
- function to(e) {
1195
- return It(e) ? m(ie.FmTooltip, {
1244
+ function so(e) {
1245
+ return At(e) ? m(ue.FmTooltip, {
1196
1246
  variant: "plain",
1197
1247
  placement: "top"
1198
1248
  }, {
1199
- default: () => m(ie.FmIcon, {
1249
+ default: () => m(ue.FmIcon, {
1200
1250
  name: "error",
1201
1251
  size: "sm",
1202
1252
  class: "cursor-help text-fm-color-typo-error"
@@ -1204,19 +1254,19 @@ const es = {
1204
1254
  content: () => o("auditLog.operation.partialFailure")
1205
1255
  }) : null;
1206
1256
  }
1207
- function oo(e) {
1208
- var r;
1257
+ function ao(e) {
1258
+ var u;
1209
1259
  const s = e.original;
1210
- return e.depth === 0 && !re(s) && !!((r = s.operations) != null && r.length);
1260
+ return e.depth === 0 && !ie(s) && !!((u = s.operations) != null && u.length);
1211
1261
  }
1212
- function so(e) {
1213
- return re(e) ? void 0 : e.operations;
1262
+ function no(e) {
1263
+ return ie(e) ? void 0 : e.operations;
1214
1264
  }
1215
- const ao = [{
1265
+ const lo = [{
1216
1266
  accessorKey: "timestamp",
1217
1267
  header: () => o("auditLog.columns.timestamp"),
1218
1268
  cell(e) {
1219
- return dt(e.row.original.timestamp);
1269
+ return ft(e.row.original.timestamp);
1220
1270
  }
1221
1271
  }, {
1222
1272
  accessorKey: "userId",
@@ -1225,28 +1275,28 @@ const es = {
1225
1275
  size: 220,
1226
1276
  cell(e) {
1227
1277
  const s = e.row.original;
1228
- return re(s) ? null : m("div", {
1278
+ return ie(s) ? null : m("div", {
1229
1279
  class: "flex items-center gap-8"
1230
- }, [m(ie.FmAvatar, {
1231
- name: De(s),
1280
+ }, [m(ue.FmAvatar, {
1281
+ name: je(s),
1232
1282
  size: "sm",
1233
1283
  class: "shrink-0"
1234
1284
  }, null), m("div", {
1235
1285
  class: "min-w-0"
1236
1286
  }, [m("p", {
1237
1287
  class: "truncate font-semibold"
1238
- }, [De(s)]), m("p", {
1288
+ }, [je(s)]), m("p", {
1239
1289
  class: "truncate text-fm-color-typo-secondary"
1240
- }, [ut(s)])])]);
1290
+ }, [ct(s)])])]);
1241
1291
  }
1242
1292
  }, {
1243
1293
  accessorKey: "subject",
1244
1294
  header: () => o("auditLog.columns.subject"),
1245
1295
  cell(e) {
1246
1296
  const s = e.row.original;
1247
- return re(s) ? m("span", {
1297
+ return ie(s) ? m("span", {
1248
1298
  class: "text-fm-color-typo-secondary"
1249
- }, [o("auditLog.operation.rowHint")]) : qe(s.subject) ?? s.subject;
1299
+ }, [o("auditLog.operation.rowHint")]) : Je(s.subject) ?? s.subject;
1250
1300
  }
1251
1301
  }, {
1252
1302
  accessorKey: "action",
@@ -1257,39 +1307,39 @@ const es = {
1257
1307
  cellSpanClass: "audit-log-action-label"
1258
1308
  },
1259
1309
  cell(e) {
1260
- var R;
1310
+ var $;
1261
1311
  const s = e.row.original;
1262
- if (re(s))
1312
+ if (ie(s))
1263
1313
  return m("span", {
1264
1314
  class: "audit-op-marker flex flex-wrap items-baseline gap-4"
1265
1315
  }, [m("span", {
1266
1316
  class: "text-fm-color-typo-secondary"
1267
- }, [Te("↳")]), m("span", {
1317
+ }, [Ve("↳")]), m("span", {
1268
1318
  class: "font-semibold"
1269
- }, [vt(s)]), s.entityId ? m("span", {
1319
+ }, [gt(s)]), s.entityId ? m("span", {
1270
1320
  class: "text-fm-color-typo-secondary"
1271
- }, [Te("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? m("span", {
1321
+ }, [Ve("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? m("span", {
1272
1322
  class: "text-fm-color-typo-error"
1273
- }, [Te("· "), s.errorMessage]) : null]);
1274
- const r = ((R = s.operations) == null ? void 0 : R.length) ?? 0, _ = (oe) => {
1323
+ }, [Ve("· "), s.errorMessage]) : null]);
1324
+ const u = (($ = s.operations) == null ? void 0 : $.length) ?? 0, y = (oe) => {
1275
1325
  oe.stopPropagation(), e.row.getToggleExpandedHandler()();
1276
1326
  }, x = {
1277
1327
  variant: "tertiary",
1278
1328
  icon: e.row.getIsExpanded() ? "keyboard_arrow_up" : "keyboard_arrow_down",
1279
1329
  "aria-label": o("auditLog.operation.toggle"),
1280
1330
  class: "ml-auto shrink-0",
1281
- onClick: _
1282
- }, F = ie.FmButton;
1331
+ onClick: y
1332
+ }, F = ue.FmButton;
1283
1333
  return m("span", {
1284
1334
  class: "flex items-center gap-8"
1285
- }, [m("span", null, [mt(s)]), r > 0 ? m("span", {
1335
+ }, [m("span", null, [pt(s)]), u > 0 ? m("span", {
1286
1336
  class: "cursor-pointer",
1287
- onClick: _
1288
- }, [m(ie.FmChip, {
1337
+ onClick: y
1338
+ }, [m(ue.FmChip, {
1289
1339
  variant: "neutral",
1290
1340
  compact: !0,
1291
1341
  label: o("auditLog.operation.badge", {
1292
- count: r
1342
+ count: u
1293
1343
  })
1294
1344
  }, null)]) : null, e.row.getCanExpand() ? m(F, x, null) : null]);
1295
1345
  }
@@ -1299,35 +1349,35 @@ const es = {
1299
1349
  enableSorting: !1,
1300
1350
  cell(e) {
1301
1351
  const s = e.row.original;
1302
- return re(s) ? m(ie.FmChip, {
1352
+ return ie(s) ? m(ue.FmChip, {
1303
1353
  variant: s.status === "failed" ? "critical" : "success",
1304
1354
  label: s.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
1305
1355
  compact: !0
1306
1356
  }, null) : m("span", {
1307
1357
  class: "flex items-center gap-4"
1308
- }, [m(ie.FmChip, {
1309
- variant: pt(s.outcome),
1310
- label: Je(s.outcome),
1358
+ }, [m(ue.FmChip, {
1359
+ variant: ht(s.outcome),
1360
+ label: He(s.outcome),
1311
1361
  compact: !0
1312
- }, null), to(s)]);
1362
+ }, null), so(s)]);
1313
1363
  }
1314
1364
  }];
1315
1365
  function se(e) {
1316
- const s = D(e, al);
1366
+ const s = D(e, dn);
1317
1367
  return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
1318
1368
  }
1319
- async function ht() {
1320
- var e, s, r;
1369
+ async function bt() {
1370
+ var e, s, u;
1321
1371
  g.value = !0;
1322
1372
  try {
1323
1373
  const {
1324
- startDate: _,
1374
+ startDate: y,
1325
1375
  endDate: x
1326
- } = Q.value, F = (Ie.value - 1) * Le, R = $e.value.subjectPrefixes, oe = await Ve.read({
1327
- limit: Le,
1376
+ } = Q.value, F = (Ae.value - 1) * Se, $ = Ke.value.subjectPrefixes, oe = await Ee.read({
1377
+ limit: Se,
1328
1378
  offset: F,
1329
- ..._ ? {
1330
- from: se(_)
1379
+ ...y ? {
1380
+ from: se(y)
1331
1381
  } : {},
1332
1382
  ...x ? {
1333
1383
  to: se(x)
@@ -1341,50 +1391,54 @@ const es = {
1341
1391
  ...(e = G.value) != null && e.length ? {
1342
1392
  subjects: G.value
1343
1393
  } : {},
1344
- ...R.length ? {
1345
- subjectPrefixes: [...R]
1394
+ ...$.length ? {
1395
+ subjectPrefixes: [...$]
1346
1396
  } : {},
1347
1397
  ...(s = ee.value) != null && s.length ? {
1348
1398
  actions: ee.value
1349
1399
  } : {},
1350
- ...(r = Z.value) != null && r.length ? {
1351
- outcomes: ze(Z.value)
1400
+ ...(u = Z.value) != null && u.length ? {
1401
+ outcomes: qe(Z.value)
1352
1402
  } : {},
1353
1403
  ...X.value ? {
1354
1404
  search: X.value
1355
1405
  } : {},
1356
- ...fe.value.length ? {
1357
- searchUserIds: fe.value
1406
+ ...re.value.length ? {
1407
+ searchUserIds: re.value
1358
1408
  } : {},
1359
1409
  ...me.value.length ? {
1360
1410
  searchSubjects: me.value
1361
1411
  } : {}
1362
1412
  });
1363
- h.value = oe, Ct.value = oe.length === Le, O.value = {};
1413
+ h.value = oe, Vt.value = oe.length === Se, O.value = {};
1364
1414
  } finally {
1365
1415
  g.value = !1;
1366
1416
  }
1367
1417
  }
1368
- const yt = A(() => {
1418
+ const _t = A(() => {
1369
1419
  var e;
1370
1420
  return JSON.stringify({
1371
- businessId: ((e = d.currentBusiness.value) == null ? void 0 : e._id) ?? "",
1421
+ businessId: ((e = r.currentBusiness.value) == null ? void 0 : e._id) ?? "",
1372
1422
  dateRange: Q.value,
1373
- users: [...ce.value ?? []].sort(),
1423
+ users: [...fe.value ?? []].sort(),
1374
1424
  subjects: [...G.value ?? []].sort(),
1375
1425
  outcomes: [...Z.value ?? []].sort(),
1376
1426
  actions: [...ee.value ?? []].sort(),
1377
- moduleKey: ne.value,
1378
- search: X.value
1427
+ moduleKey: le.value,
1428
+ search: X.value,
1429
+ // Member/feedme-admin-actor lists resolve asynchronously (and actors refetch on
1430
+ // every date-range change), so searchUserIds can change after the key above is
1431
+ // computed — include it explicitly or a late-arriving match never refetches.
1432
+ searchUserIds: [...re.value].sort()
1379
1433
  });
1380
1434
  });
1381
- async function lo() {
1382
- var _, x, F;
1435
+ async function ro() {
1436
+ var y, x, F;
1383
1437
  const {
1384
1438
  startDate: e,
1385
1439
  endDate: s
1386
- } = Q.value, r = $e.value.subjectPrefixes;
1387
- Ne.value = await Ve.count({
1440
+ } = Q.value, u = Ke.value.subjectPrefixes;
1441
+ Re.value = await Ee.count({
1388
1442
  ...e ? {
1389
1443
  from: se(e)
1390
1444
  } : {},
@@ -1397,90 +1451,90 @@ const es = {
1397
1451
  ...te.value.feedmeAdminActors ? {
1398
1452
  feedmeAdminActors: !0
1399
1453
  } : {},
1400
- ...(_ = G.value) != null && _.length ? {
1454
+ ...(y = G.value) != null && y.length ? {
1401
1455
  subjects: G.value
1402
1456
  } : {},
1403
- ...r.length ? {
1404
- subjectPrefixes: [...r]
1457
+ ...u.length ? {
1458
+ subjectPrefixes: [...u]
1405
1459
  } : {},
1406
1460
  ...(x = ee.value) != null && x.length ? {
1407
1461
  actions: ee.value
1408
1462
  } : {},
1409
1463
  ...(F = Z.value) != null && F.length ? {
1410
- outcomes: ze(Z.value)
1464
+ outcomes: qe(Z.value)
1411
1465
  } : {},
1412
1466
  ...X.value ? {
1413
1467
  search: X.value
1414
1468
  } : {},
1415
- ...fe.value.length ? {
1416
- searchUserIds: fe.value
1469
+ ...re.value.length ? {
1470
+ searchUserIds: re.value
1417
1471
  } : {},
1418
1472
  ...me.value.length ? {
1419
1473
  searchSubjects: me.value
1420
1474
  } : {}
1421
1475
  });
1422
1476
  }
1423
- ue(yt, async () => {
1477
+ de(_t, async () => {
1424
1478
  var e;
1425
- Ie.value = 1, (e = d.currentBusiness.value) != null && e._id && await Promise.all([lo(), ht()]);
1479
+ Ae.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([ro(), bt()]);
1426
1480
  }, {
1427
1481
  immediate: !0
1428
- }), ue(ne, () => {
1482
+ }), de(le, () => {
1429
1483
  G.value = void 0;
1430
1484
  });
1431
- let He = !1;
1432
- async function no({
1485
+ let Ge = !1;
1486
+ async function io({
1433
1487
  pageIndex: e
1434
1488
  }) {
1435
1489
  var s;
1436
- if ((s = d.currentBusiness.value) != null && s._id && !(e === 0 && Ie.value === 1) && !He) {
1437
- He = !0, Ie.value = e + 1;
1490
+ if ((s = r.currentBusiness.value) != null && s._id && !(e === 0 && Ae.value === 1) && !Ge) {
1491
+ Ge = !0, Ae.value = e + 1;
1438
1492
  try {
1439
- await ht();
1493
+ await bt();
1440
1494
  } finally {
1441
- He = !1;
1495
+ Ge = !1;
1442
1496
  }
1443
1497
  }
1444
1498
  }
1445
- function ro(e) {
1446
- if (re(e)) {
1447
- uo(e);
1499
+ function uo(e) {
1500
+ if (ie(e)) {
1501
+ fo(e);
1448
1502
  return;
1449
1503
  }
1450
- n.value = e, C.value = !0;
1504
+ i.value = e, C.value = !0;
1451
1505
  }
1452
- function io() {
1453
- C.value = !1, n.value = null;
1506
+ function co() {
1507
+ C.value = !1, i.value = null;
1454
1508
  }
1455
- function uo(e) {
1456
- w.value = e, P.value = !0;
1509
+ function fo(e) {
1510
+ k.value = e, V.value = !0;
1457
1511
  }
1458
- function co() {
1459
- P.value = !1, w.value = null;
1512
+ function mo() {
1513
+ V.value = !1, k.value = null;
1460
1514
  }
1461
- ue(d.currentBusiness, (e) => {
1462
- e && c.readTeamMembers();
1515
+ de(r.currentBusiness, (e) => {
1516
+ e && d.readTeamMembers();
1463
1517
  }, {
1464
1518
  immediate: !0
1465
1519
  });
1466
- function fo() {
1467
- const e = ce.value;
1520
+ function vo() {
1521
+ const e = fe.value;
1468
1522
  if (!(e != null && e.length)) return;
1469
- const s = new Set(he.value.map((x) => x.userId)), r = new Set(c.members.map((x) => x.doc.userId)), _ = e.filter((x) => x === Ee ? Fe.value : c.hasLoaded ? r.has(x) || s.has(x) : !0);
1470
- _.length !== e.length && (ce.value = _.length ? _ : void 0);
1523
+ const s = new Set(ye.value.map((x) => x.userId)), u = new Set(d.members.map((x) => x.doc.userId)), y = e.filter((x) => x === $e ? Me.value : d.hasLoaded ? u.has(x) || s.has(x) : !0);
1524
+ y.length !== e.length && (fe.value = y.length ? y : void 0);
1471
1525
  }
1472
- async function mo() {
1473
- var r;
1474
- if (!((r = d.currentBusiness.value) != null && r._id)) return;
1526
+ async function po() {
1527
+ var u;
1528
+ if (!((u = r.currentBusiness.value) != null && u._id)) return;
1475
1529
  const {
1476
1530
  startDate: e,
1477
1531
  endDate: s
1478
1532
  } = Q.value;
1479
1533
  try {
1480
1534
  const {
1481
- actors: _,
1535
+ actors: y,
1482
1536
  showFeedmeAdminFilter: x
1483
- } = await Ve.getFeedmeAdminFilter({
1537
+ } = await Ee.getFeedmeAdminFilter({
1484
1538
  ...e ? {
1485
1539
  from: se(e)
1486
1540
  } : {},
@@ -1488,235 +1542,235 @@ const es = {
1488
1542
  to: se(s)
1489
1543
  } : {}
1490
1544
  });
1491
- he.value = _, Fe.value = x;
1545
+ ye.value = y, Me.value = x;
1492
1546
  } catch {
1493
- he.value = [], Fe.value = !1;
1547
+ ye.value = [], Me.value = !1;
1494
1548
  }
1495
- fo();
1549
+ vo();
1496
1550
  }
1497
- return ue(() => {
1551
+ return de(() => {
1498
1552
  var e;
1499
1553
  return {
1500
- businessId: (e = d.currentBusiness.value) == null ? void 0 : e._id,
1554
+ businessId: (e = r.currentBusiness.value) == null ? void 0 : e._id,
1501
1555
  range: Q.value
1502
1556
  };
1503
- }, () => mo(), {
1557
+ }, () => po(), {
1504
1558
  immediate: !0,
1505
1559
  deep: !0
1506
1560
  }), (e, s) => {
1507
- const r = U("FmSpacer"), _ = U("FmButton"), x = U("FmMenuItem"), F = U("FmMenu"), R = U("FmChip"), oe = U("FmDateRangePicker"), je = U("FmSearch"), ye = U("FmTable"), Ce = U("FmIcon"), Ge = U("FmTooltip"), be = U("FmSideSheet");
1508
- return v(), p(q, null, [m(Co, {
1509
- heading: u(o)("auditLog.title")
1561
+ const u = N("FmSpacer"), y = N("FmButton"), x = N("FmMenuItem"), F = N("FmMenu"), $ = N("FmChip"), oe = N("FmDateRangePicker"), Ce = N("FmSearch"), be = N("FmTable"), Te = N("FmIcon"), Xe = N("FmTooltip"), _e = N("FmSideSheet");
1562
+ return v(), b(q, null, [m(Vo, {
1563
+ heading: c(o)("auditLog.title")
1510
1564
  }, {
1511
- "append-heading": B(() => [m(r), m(_, {
1565
+ "append-heading": B(() => [m(u), m(y, {
1512
1566
  variant: "primary",
1513
1567
  "prepend-icon": "upload",
1514
- label: u(o)("auditLog.export"),
1515
- disabled: h.value.length === 0 || b.value || u(c).isLoading || u(c).members.length === 0,
1516
- loading: b.value,
1517
- onClick: eo
1568
+ label: c(o)("auditLog.export"),
1569
+ disabled: h.value.length === 0 || p.value || c(d).isLoading || c(d).members.length === 0,
1570
+ loading: p.value,
1571
+ onClick: oo
1518
1572
  }, null, 8, ["label", "disabled", "loading"]), m(F, {
1519
1573
  "close-on-click": !1,
1520
1574
  "z-index": 50
1521
1575
  }, {
1522
- "menu-button": B(() => [m(_, {
1576
+ "menu-button": B(() => [m(y, {
1523
1577
  variant: "tertiary",
1524
1578
  icon: "settings",
1525
- "aria-label": u(o)("auditLog.exportSettings.title"),
1526
- disabled: b.value
1579
+ "aria-label": c(o)("auditLog.exportSettings.title"),
1580
+ disabled: p.value
1527
1581
  }, null, 8, ["aria-label", "disabled"])]),
1528
- default: B(() => [a("div", es, [a("p", ts, l(u(o)("auditLog.exportSettings.title")), 1), (v(), p(q, null, ae(We, (f) => m(x, {
1582
+ default: B(() => [a("div", ns, [a("p", ls, l(c(o)("auditLog.exportSettings.title")), 1), (v(), b(q, null, ae(We, (f) => m(x, {
1529
1583
  key: f.key,
1530
- label: u(o)(f.labelKey),
1584
+ label: c(o)(f.labelKey),
1531
1585
  "has-checkbox": "",
1532
1586
  "model-value": ve.value.has(f.key),
1533
1587
  disabled: ve.value.has(f.key) && ve.value.size === 1,
1534
- onClick: (V) => Zt(f.key)
1588
+ onClick: (P) => to(f.key)
1535
1589
  }, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
1536
1590
  _: 1
1537
1591
  })]),
1538
- default: B(() => [a("div", os, [a("div", ss, [m(Ko, {
1539
- modelValue: ne.value,
1540
- "onUpdate:modelValue": s[0] || (s[0] = (f) => ne.value = f),
1541
- items: Pt.value
1542
- }, null, 8, ["modelValue", "items"]), a("div", as, [m(oe, {
1592
+ default: B(() => [a("div", rs, [a("div", is, [m(Yo, {
1593
+ modelValue: le.value,
1594
+ "onUpdate:modelValue": s[0] || (s[0] = (f) => le.value = f),
1595
+ items: Et.value
1596
+ }, null, 8, ["modelValue", "items"]), a("div", us, [m(oe, {
1543
1597
  modelValue: Q.value,
1544
1598
  "onUpdate:modelValue": s[1] || (s[1] = (f) => Q.value = f),
1545
1599
  "show-predefined-range": "",
1546
1600
  "show-time": "",
1547
- "predefined-range": Jt.value
1601
+ "predefined-range": Wt.value
1548
1602
  }, {
1549
- "trigger-button": B(() => [m(R, {
1550
- label: qt.value,
1603
+ "trigger-button": B(() => [m($, {
1604
+ label: Ht.value,
1551
1605
  icon: "calendar_month"
1552
1606
  }, null, 8, ["label"])]),
1553
1607
  _: 1
1554
- }, 8, ["modelValue", "predefined-range"]), a("div", ls, [m(Pe, {
1555
- modelValue: ce.value,
1556
- "onUpdate:modelValue": s[2] || (s[2] = (f) => ce.value = f),
1557
- items: Et.value,
1608
+ }, 8, ["modelValue", "predefined-range"]), a("div", ds, [m(Pe, {
1609
+ modelValue: fe.value,
1610
+ "onUpdate:modelValue": s[2] || (s[2] = (f) => fe.value = f),
1611
+ items: Nt.value,
1558
1612
  multiple: "",
1559
1613
  variant: "dark",
1560
- placeholder: u(o)("auditLog.filter.user_placeholder"),
1561
- "selected-prefix": u(o)("auditLog.filter.selected_user_prefix"),
1614
+ placeholder: c(o)("auditLog.filter.user_placeholder"),
1615
+ "selected-prefix": c(o)("auditLog.filter.selected_user_prefix"),
1562
1616
  "chip-icon": "account_circle"
1563
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ns, [m(Pe, {
1617
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", cs, [m(Pe, {
1564
1618
  modelValue: G.value,
1565
1619
  "onUpdate:modelValue": s[3] || (s[3] = (f) => G.value = f),
1566
- items: Ut.value,
1567
- "filter-fn": Nt,
1620
+ items: Rt.value,
1621
+ "filter-fn": Kt,
1568
1622
  multiple: "",
1569
1623
  variant: "dark",
1570
- placeholder: u(o)("auditLog.filter.subject_placeholder"),
1571
- "selected-prefix": u(o)("auditLog.filter.selected_subject_prefix"),
1624
+ placeholder: c(o)("auditLog.filter.subject_placeholder"),
1625
+ "selected-prefix": c(o)("auditLog.filter.selected_subject_prefix"),
1572
1626
  "chip-icon": "badge"
1573
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", rs, [m(Pe, {
1627
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", fs, [m(Pe, {
1574
1628
  modelValue: ee.value,
1575
1629
  "onUpdate:modelValue": s[4] || (s[4] = (f) => ee.value = f),
1576
- items: $t.value,
1630
+ items: Bt.value,
1577
1631
  multiple: "",
1578
1632
  variant: "dark",
1579
- placeholder: u(o)("auditLog.filter.action_placeholder"),
1580
- "selected-prefix": u(o)("auditLog.filter.selected_action_prefix"),
1633
+ placeholder: c(o)("auditLog.filter.action_placeholder"),
1634
+ "selected-prefix": c(o)("auditLog.filter.selected_action_prefix"),
1581
1635
  searchable: !1
1582
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", is, [m(Pe, {
1636
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ms, [m(Pe, {
1583
1637
  modelValue: Z.value,
1584
1638
  "onUpdate:modelValue": s[5] || (s[5] = (f) => Z.value = f),
1585
- items: Kt.value,
1639
+ items: Yt.value,
1586
1640
  multiple: "",
1587
1641
  variant: "dark",
1588
- placeholder: u(o)("auditLog.filter.status_placeholder"),
1589
- "selected-prefix": u(o)("auditLog.filter.selected_status_prefix"),
1642
+ placeholder: c(o)("auditLog.filter.status_placeholder"),
1643
+ "selected-prefix": c(o)("auditLog.filter.selected_status_prefix"),
1590
1644
  searchable: !1,
1591
1645
  "chip-icon": "check_circle"
1592
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), m(je, {
1593
- modelValue: Ke.value,
1594
- "onUpdate:modelValue": s[6] || (s[6] = (f) => Ke.value = f),
1646
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), m(Ce, {
1647
+ modelValue: Be.value,
1648
+ "onUpdate:modelValue": s[6] || (s[6] = (f) => Be.value = f),
1595
1649
  class: "ml-auto w-[280px]",
1596
- placeholder: u(o)("auditLog.search.placeholder")
1597
- }, null, 8, ["modelValue", "placeholder"])])]), m(Do, null, {
1598
- default: B(() => [a("div", us, [m(To, {
1650
+ placeholder: c(o)("auditLog.search.placeholder")
1651
+ }, null, 8, ["modelValue", "placeholder"])])]), m(Co, null, {
1652
+ default: B(() => [a("div", vs, [m(Po, {
1599
1653
  "is-loading": g.value,
1600
1654
  "is-empty": h.value.length === 0,
1601
- title: u(o)("auditLog.noData.title"),
1602
- subtitle: u(o)("auditLog.noData.subtitle")
1655
+ title: c(o)("auditLog.noData.title"),
1656
+ subtitle: c(o)("auditLog.noData.subtitle")
1603
1657
  }, {
1604
- default: B(() => [(v(), Se(ye, {
1605
- key: yt.value,
1606
- "column-defs": ao,
1658
+ default: B(() => [(v(), ke(be, {
1659
+ key: _t.value,
1660
+ "column-defs": lo,
1607
1661
  "row-data": h.value,
1608
- "page-size": Le,
1609
- "page-count": at.value,
1610
- "row-count": Ne.value,
1611
- "fetch-fn": no,
1612
- "hide-footer": at.value <= 1,
1662
+ "page-size": Se,
1663
+ "page-count": lt.value,
1664
+ "row-count": Re.value,
1665
+ "fetch-fn": io,
1666
+ "hide-footer": lt.value <= 1,
1613
1667
  loading: g.value,
1614
1668
  "expanded-state": O.value,
1615
- "get-row-can-expand": oo,
1616
- "get-sub-row": so,
1669
+ "get-row-can-expand": ao,
1670
+ "get-sub-row": no,
1617
1671
  "pin-header-row": "",
1618
1672
  class: "audit-log-list-table cursor-pointer",
1619
1673
  "onUpdate:expandedState": s[7] || (s[7] = (f) => O.value = f),
1620
- onRowClick: s[8] || (s[8] = (f) => ro(f.original))
1674
+ onRowClick: s[8] || (s[8] = (f) => uo(f.original))
1621
1675
  }, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
1622
1676
  _: 1
1623
1677
  }, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
1624
1678
  _: 1
1625
1679
  })])]),
1626
1680
  _: 1
1627
- }, 8, ["heading"]), m(be, {
1628
- header: u(o)("auditLog.detail.header"),
1681
+ }, 8, ["heading"]), m(_e, {
1682
+ header: c(o)("auditLog.detail.header"),
1629
1683
  "model-value": C.value,
1630
1684
  "max-width": 768,
1631
1685
  "dismiss-away": "",
1632
1686
  "onUpdate:modelValue": s[9] || (s[9] = (f) => {
1633
- f || io();
1687
+ f || co();
1634
1688
  })
1635
1689
  }, {
1636
- default: B(() => [n.value ? (v(), p("div", ds, [a("div", cs, [a("div", fs, [a("p", ms, l(Ht(n.value)), 1), n.value.traceId ? (v(), p("p", vs, " Trace ID: " + l(n.value.traceId), 1)) : j("", !0)]), a("div", ps, [m(R, {
1637
- variant: pt(n.value.outcome),
1638
- label: Je(n.value.outcome),
1690
+ default: B(() => [i.value ? (v(), b("div", ps, [a("div", gs, [a("div", hs, [a("p", ys, l(Xt(i.value)), 1), i.value.traceId ? (v(), b("p", bs, " Trace ID: " + l(i.value.traceId), 1)) : j("", !0)]), a("div", _s, [m($, {
1691
+ variant: ht(i.value.outcome),
1692
+ label: He(i.value.outcome),
1639
1693
  compact: ""
1640
- }, null, 8, ["variant", "label"]), u(It)(n.value) ? (v(), Se(Ge, {
1694
+ }, null, 8, ["variant", "label"]), c(At)(i.value) ? (v(), ke(Xe, {
1641
1695
  key: 0,
1642
1696
  variant: "plain",
1643
1697
  placement: "top"
1644
1698
  }, {
1645
- content: B(() => [Te(l(u(o)("auditLog.operation.partialFailure")), 1)]),
1646
- default: B(() => [m(Ce, {
1699
+ content: B(() => [Ve(l(c(o)("auditLog.operation.partialFailure")), 1)]),
1700
+ default: B(() => [m(Te, {
1647
1701
  name: "error",
1648
1702
  size: "sm",
1649
1703
  class: "cursor-help text-fm-color-typo-error"
1650
1704
  })]),
1651
1705
  _: 1
1652
- })) : j("", !0)])]), a("div", gs, [a("div", hs, [a("div", null, [a("p", ys, l(u(o)("auditLog.detail.date")), 1), a("p", bs, l(ct(n.value.timestamp)), 1)]), a("div", null, [a("p", _s, l(u(o)("auditLog.detail.user")), 1), a("p", xs, l(De(n.value)), 1)]), a("div", null, [a("p", Ls, l(u(o)("auditLog.detail.email")), 1), a("p", Ss, l(Wt(n.value)), 1)]), n.value.field ? (v(), p("div", ws, [a("p", ks, l(u(o)("auditLog.detail.field")), 1), a("p", Is, l(n.value.field), 1)])) : j("", !0), a("div", null, [a("p", As, l(u(o)("auditLog.detail.business")), 1), a("p", Fs, l(n.value.businessId || "-"), 1)]), a("div", null, [a("p", Ms, l(u(o)("auditLog.detail.restaurant")), 1), a("p", Os, l(n.value.restaurantId || "-"), 1)])])]), a("div", Ds, [a("div", js, [a("p", Cs, l(u(o)("auditLog.detail.eventDetails")), 1)]), s[12] || (s[12] = a("hr", {
1706
+ })) : j("", !0)])]), a("div", xs, [a("div", Ls, [a("div", null, [a("p", Ss, l(c(o)("auditLog.detail.date")), 1), a("p", ks, l(mt(i.value.timestamp)), 1)]), a("div", null, [a("p", ws, l(c(o)("auditLog.detail.user")), 1), a("p", Is, l(je(i.value)), 1)]), a("div", null, [a("p", As, l(c(o)("auditLog.detail.email")), 1), a("p", Fs, l(Gt(i.value)), 1)]), i.value.field ? (v(), b("div", Ms, [a("p", Os, l(c(o)("auditLog.detail.field")), 1), a("p", Ds, l(i.value.field), 1)])) : j("", !0), a("div", null, [a("p", js, l(c(o)("auditLog.detail.business")), 1), a("p", Cs, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", Ts, l(c(o)("auditLog.detail.restaurant")), 1), a("p", Vs, l(i.value.restaurantId || "-"), 1)])])]), a("div", Ps, [a("div", Es, [a("p", $s, l(c(o)("auditLog.detail.eventDetails")), 1)]), s[12] || (s[12] = a("hr", {
1653
1707
  class: "border-fm-color-border-default"
1654
- }, null, -1)), a("div", Ts, [a("div", null, [a("p", Ps, l(u(o)("auditLog.detail.actionDescription")), 1), a("p", Vs, l(n.value.metadata.operationLabel || "-"), 1)])])]), a("div", Es, [a("div", Rs, [a("p", Us, l(u(o)("auditLog.detail.metadata")), 1)]), s[13] || (s[13] = a("hr", {
1708
+ }, null, -1)), a("div", Ns, [a("div", null, [a("p", Us, l(c(o)("auditLog.detail.actionDescription")), 1), a("p", Rs, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", Ks, [a("div", Bs, [a("p", Ys, l(c(o)("auditLog.detail.metadata")), 1)]), s[13] || (s[13] = a("hr", {
1655
1709
  class: "border-fm-color-border-default"
1656
- }, null, -1)), a("div", Ns, [a("div", null, [a("p", $s, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", Ks, l(Gt(n.value.metadata.resolvedFrom)), 1)]), (n.value.metadata.resolvedFrom === "permissionSet" || n.value.metadata.resolvedFrom === "systemPermissionSet") && (n.value.metadata.permissionSetName || n.value.metadata.permissionSetId) ? (v(), p("div", Bs, [a("p", Ys, l(u(o)("auditLog.detail.permissionSet")), 1), n.value.metadata.permissionSetName ? (v(), p("p", zs, l(n.value.metadata.permissionSetName), 1)) : j("", !0), n.value.metadata.permissionSetId ? (v(), p("p", qs, l(n.value.metadata.permissionSetId), 1)) : j("", !0)])) : j("", !0), n.value.metadata.reason ? (v(), p("div", Js, [a("p", Ws, l(u(o)("auditLog.detail.reason")), 1), a("p", Hs, l(n.value.metadata.reason), 1)])) : j("", !0), a("div", null, [a("p", Gs, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", Xs, l(Xt(n.value)), 1)]), a("div", null, [a("p", Qs, l(u(o)("auditLog.detail.requestPath")), 1), a("p", Zs, l(n.value.metadata.requestPath || "-"), 1)]), n.value.metadata.trace && n.value.metadata.trace.length > 0 ? (v(), p("div", ea, [a("p", ta, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", oa, [(v(!0), p(q, null, ae(n.value.metadata.trace, (f, V) => (v(), p("li", {
1657
- key: V,
1710
+ }, null, -1)), a("div", zs, [a("div", null, [a("p", qs, l(c(o)("auditLog.detail.resolvedFrom")), 1), a("p", Js, l(Qt(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (v(), b("div", Hs, [a("p", Ws, l(c(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (v(), b("p", Gs, l(i.value.metadata.permissionSetName), 1)) : j("", !0), i.value.metadata.permissionSetId ? (v(), b("p", Xs, l(i.value.metadata.permissionSetId), 1)) : j("", !0)])) : j("", !0), i.value.metadata.reason ? (v(), b("div", Qs, [a("p", Zs, l(c(o)("auditLog.detail.reason")), 1), a("p", ea, l(i.value.metadata.reason), 1)])) : j("", !0), a("div", null, [a("p", ta, l(c(o)("auditLog.detail.requestMethod")), 1), a("p", oa, l(Zt(i.value)), 1)]), a("div", null, [a("p", sa, l(c(o)("auditLog.detail.requestPath")), 1), a("p", aa, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (v(), b("div", na, [a("p", la, l(c(o)("auditLog.detail.permissionTrace")), 1), a("ol", ra, [(v(!0), b(q, null, ae(i.value.metadata.trace, (f, P) => (v(), b("li", {
1711
+ key: P,
1658
1712
  class: "flex items-center gap-6"
1659
- }, [a("span", sa, l(V + 1), 1), a("span", aa, l(f), 1), V < n.value.metadata.trace.length - 1 ? (v(), p("span", la, "→")) : j("", !0)]))), 128))])])) : j("", !0), I.value ? (v(), p("div", na, [a("p", ra, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", ia, l(I.value), 1)])) : j("", !0)])])])) : j("", !0)]),
1713
+ }, [a("span", ia, l(P + 1), 1), a("span", ua, l(f), 1), P < i.value.metadata.trace.length - 1 ? (v(), b("span", da, "→")) : j("", !0)]))), 128))])])) : j("", !0), I.value ? (v(), b("div", ca, [a("p", fa, l(c(o)("auditLog.detail.requestBody")), 1), a("pre", ma, l(I.value), 1)])) : j("", !0)])])])) : j("", !0)]),
1660
1714
  _: 1
1661
- }, 8, ["header", "model-value"]), m(be, {
1662
- header: u(o)("auditLog.operation.sheetHeader"),
1663
- "model-value": P.value,
1715
+ }, 8, ["header", "model-value"]), m(_e, {
1716
+ header: c(o)("auditLog.operation.sheetHeader"),
1717
+ "model-value": V.value,
1664
1718
  "max-width": 768,
1665
1719
  "dismiss-away": "",
1666
1720
  "onUpdate:modelValue": s[11] || (s[11] = (f) => {
1667
- f || co();
1721
+ f || mo();
1668
1722
  })
1669
1723
  }, {
1670
- default: B(() => [w.value ? (v(), p("div", ua, [a("div", da, [a("div", ca, [a("p", fa, l(vt(w.value)), 1), w.value.entityId ? (v(), p("p", ma, l(w.value.entityId), 1)) : j("", !0)]), m(R, {
1671
- variant: w.value.status === "failed" ? "critical" : "success",
1672
- label: w.value.status === "failed" ? u(o)("auditLog.outcome.failed") : u(o)("auditLog.outcome.success"),
1724
+ default: B(() => [k.value ? (v(), b("div", va, [a("div", pa, [a("div", ga, [a("p", ha, l(gt(k.value)), 1), k.value.entityId ? (v(), b("p", ya, l(k.value.entityId), 1)) : j("", !0)]), m($, {
1725
+ variant: k.value.status === "failed" ? "critical" : "success",
1726
+ label: k.value.status === "failed" ? c(o)("auditLog.outcome.failed") : c(o)("auditLog.outcome.success"),
1673
1727
  compact: ""
1674
- }, null, 8, ["variant", "label"])]), a("div", va, [a("div", pa, [a("div", null, [a("p", ga, l(u(o)("auditLog.detail.date")), 1), a("p", ha, l(ct(w.value.timestamp)), 1)]), w.value.entityId ? (v(), p("div", ya, [a("p", ba, l(u(o)("auditLog.operation.entity")), 1), a("p", _a, l(w.value.entityId), 1)])) : j("", !0), w.value.durationMs !== void 0 ? (v(), p("div", xa, [a("p", La, l(u(o)("auditLog.operation.duration")), 1), a("p", Sa, l(u(o)("auditLog.operation.durationValue", {
1675
- ms: w.value.durationMs
1676
- })), 1)])) : j("", !0)])]), w.value.status === "failed" ? (v(), p("div", wa, [a("p", ka, l(u(o)("auditLog.operation.error")), 1), a("p", Ia, l(w.value.errorMessage || "-"), 1)])) : j("", !0), a("div", Aa, [a("div", Fa, [a("p", Ma, l(u(o)("auditLog.operation.changes")), 1)]), s[16] || (s[16] = a("hr", {
1728
+ }, null, 8, ["variant", "label"])]), a("div", ba, [a("div", _a, [a("div", null, [a("p", xa, l(c(o)("auditLog.detail.date")), 1), a("p", La, l(mt(k.value.timestamp)), 1)]), k.value.entityId ? (v(), b("div", Sa, [a("p", ka, l(c(o)("auditLog.operation.entity")), 1), a("p", wa, l(k.value.entityId), 1)])) : j("", !0), k.value.durationMs !== void 0 ? (v(), b("div", Ia, [a("p", Aa, l(c(o)("auditLog.operation.duration")), 1), a("p", Fa, l(c(o)("auditLog.operation.durationValue", {
1729
+ ms: k.value.durationMs
1730
+ })), 1)])) : j("", !0)])]), k.value.status === "failed" ? (v(), b("div", Ma, [a("p", Oa, l(c(o)("auditLog.operation.error")), 1), a("p", Da, l(k.value.errorMessage || "-"), 1)])) : j("", !0), a("div", ja, [a("div", Ca, [a("p", Ta, l(c(o)("auditLog.operation.changes")), 1)]), s[16] || (s[16] = a("hr", {
1677
1731
  class: "border-fm-color-border-default"
1678
- }, null, -1)), a("div", Oa, [E.value.length ? (v(), p("div", Da, [(v(!0), p(q, null, ae(E.value, (f, V) => (v(), p("div", {
1679
- key: V,
1732
+ }, null, -1)), a("div", Va, [E.value.length ? (v(), b("div", Pa, [(v(!0), b(q, null, ae(E.value, (f, P) => (v(), b("div", {
1733
+ key: P,
1680
1734
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
1681
- }, [a("div", ja, [m(R, {
1682
- variant: ot(f.type),
1735
+ }, [a("div", Ea, [m($, {
1736
+ variant: at(f.type),
1683
1737
  label: J(f.type),
1684
1738
  compact: ""
1685
- }, null, 8, ["variant", "label"]), a("span", Ca, l(ge(f)), 1)]), a("p", Ta, [f.type === "add" ? (v(), p("span", Pa, l(f.afterDisplay), 1)) : f.type === "remove" ? (v(), p("span", Va, l(f.beforeDisplay), 1)) : (v(), p(q, {
1739
+ }, null, 8, ["variant", "label"]), a("span", $a, l(he(f)), 1)]), a("p", Na, [f.type === "add" ? (v(), b("span", Ua, l(f.afterDisplay), 1)) : f.type === "remove" ? (v(), b("span", Ra, l(f.beforeDisplay), 1)) : (v(), b(q, {
1686
1740
  key: 2
1687
- }, [a("span", Ea, l(f.beforeDisplay), 1), s[14] || (s[14] = a("span", {
1741
+ }, [a("span", Ka, l(f.beforeDisplay), 1), s[14] || (s[14] = a("span", {
1688
1742
  class: "text-fm-color-typo-secondary"
1689
- }, " → ", -1)), a("span", Ra, l(f.afterDisplay), 1)], 64))])]))), 128))])) : st.value.length ? (v(), p("div", Ua, [(v(!0), p(q, null, ae(st.value, (f) => (v(), p("div", {
1743
+ }, " → ", -1)), a("span", Ba, l(f.afterDisplay), 1)], 64))])]))), 128))])) : nt.value.length ? (v(), b("div", Ya, [(v(!0), b(q, null, ae(nt.value, (f) => (v(), b("div", {
1690
1744
  key: f.groupKey,
1691
1745
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
1692
- }, [a("div", Na, [m(R, {
1693
- variant: de(f.type),
1694
- label: le(f.type),
1746
+ }, [a("div", za, [m($, {
1747
+ variant: ce(f.type),
1748
+ label: ne(f.type),
1695
1749
  compact: ""
1696
- }, null, 8, ["variant", "label"]), a("span", $a, l(f.displayKey), 1)]), a("div", Ka, [(v(!0), p(q, null, ae(f.rows, (V) => (v(), p("p", {
1697
- key: V.path,
1750
+ }, null, 8, ["variant", "label"]), a("span", qa, l(f.displayKey), 1)]), a("div", Ja, [(v(!0), b(q, null, ae(f.rows, (P) => (v(), b("p", {
1751
+ key: P.path,
1698
1752
  class: "break-all font-mono text-xs"
1699
- }, [V.type === "added" ? (v(), p("span", Ba, l(V.after ?? "—"), 1)) : V.type === "removed" ? (v(), p("span", Ya, l(V.before ?? "—"), 1)) : (v(), p(q, {
1753
+ }, [P.type === "added" ? (v(), b("span", Ha, l(P.after ?? "—"), 1)) : P.type === "removed" ? (v(), b("span", Wa, l(P.before ?? "—"), 1)) : (v(), b(q, {
1700
1754
  key: 2
1701
- }, [a("span", za, l(V.before ?? "—"), 1), s[15] || (s[15] = a("span", {
1755
+ }, [a("span", Ga, l(P.before ?? "—"), 1), s[15] || (s[15] = a("span", {
1702
1756
  class: "text-fm-color-typo-secondary"
1703
- }, " → ", -1)), a("span", qa, l(V.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (v(), p("p", Ja, l(u(o)("auditLog.operation.noChanges")), 1))])]), T.value || Y.value ? (v(), p("div", Wa, [a("button", {
1757
+ }, " → ", -1)), a("span", Xa, l(P.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (v(), b("p", Qa, l(c(o)("auditLog.operation.noChanges")), 1))])]), T.value || Y.value ? (v(), b("div", Za, [a("button", {
1704
1758
  type: "button",
1705
1759
  class: "flex w-full items-center justify-between p-12 text-left",
1706
- onClick: s[10] || (s[10] = (f) => N.value = !N.value)
1707
- }, [a("p", Ha, l(u(o)("auditLog.operation.showData")), 1), m(Ce, {
1760
+ onClick: s[10] || (s[10] = (f) => U.value = !U.value)
1761
+ }, [a("p", en, l(c(o)("auditLog.operation.showData")), 1), m(Te, {
1708
1762
  name: "keyboard_arrow_down",
1709
- class: Mo(["shrink-0 transition-transform", N.value ? "rotate-180" : ""])
1710
- }, null, 8, ["class"])]), N.value ? (v(), p(q, {
1763
+ class: Do(["shrink-0 transition-transform", U.value ? "rotate-180" : ""])
1764
+ }, null, 8, ["class"])]), U.value ? (v(), b(q, {
1711
1765
  key: 0
1712
1766
  }, [s[17] || (s[17] = a("hr", {
1713
1767
  class: "border-fm-color-border-default"
1714
- }, null, -1)), a("div", Ga, [T.value ? (v(), p("div", Xa, [a("p", Qa, l(u(o)("auditLog.operation.before")), 1), a("pre", Za, l(T.value), 1)])) : j("", !0), Y.value ? (v(), p("div", el, [a("p", tl, l(u(o)("auditLog.operation.after")), 1), a("pre", ol, l(Y.value), 1)])) : j("", !0)])], 64)) : j("", !0)])) : j("", !0)])) : j("", !0)]),
1768
+ }, null, -1)), a("div", tn, [T.value ? (v(), b("div", on, [a("p", sn, l(c(o)("auditLog.operation.before")), 1), a("pre", an, l(T.value), 1)])) : j("", !0), Y.value ? (v(), b("div", nn, [a("p", ln, l(c(o)("auditLog.operation.after")), 1), a("pre", rn, l(Y.value), 1)])) : j("", !0)])], 64)) : j("", !0)])) : j("", !0)])) : j("", !0)]),
1715
1769
  _: 1
1716
1770
  }, 8, ["header", "model-value"])], 64);
1717
1771
  };
1718
1772
  }
1719
- }), _l = /* @__PURE__ */ jo(ll, [["__scopeId", "data-v-9d69ce94"]]);
1773
+ }), In = /* @__PURE__ */ To(cn, [["__scopeId", "data-v-8abe880c"]]);
1720
1774
  export {
1721
- _l as default
1775
+ In as default
1722
1776
  };