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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/dist/{ApprovalCodeList-xOyDG5ug.js → ApprovalCodeList-D3U4nvlF.js} +7 -7
  2. package/dist/AuditLogList-qGCW7tf0.js +1950 -0
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B0VcRYUg.js +438 -0
  4. package/dist/EmployeeList-Bd73xDCX.js +776 -0
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js → FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.js} +6 -6
  6. package/dist/{GrantUserList-CUkuf3VV.js → GrantUserList-C71pal0N.js} +8 -8
  7. package/dist/{Main-Cg9SOzcz.js → Main-BWJPyEU1.js} +5 -5
  8. package/dist/{Main-BcixH7R5.js → Main-CCdTWngg.js} +11 -11
  9. package/dist/Main-DGf0bQvy.js +96 -0
  10. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
  11. package/dist/{PermissionSetList-I3u2_qHR.js → PermissionSetList-BS-oBunI.js} +35 -33
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CkOAT-oX.js +4167 -0
  13. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js +35 -0
  14. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
  15. package/dist/{RoleList-ALmAwN0U.js → RoleList-B_7UnVNb.js} +21 -20
  16. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BXihM4sl.js +544 -0
  17. package/dist/ScheduleGeneralPage-DpNvWNGs.js +811 -0
  18. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-DIYLOF9N.js +2556 -0
  19. package/dist/SchedulePage-QW-cYvu2.js +19458 -0
  20. package/dist/SchedulePositionPage-BtFfVo2N.js +282 -0
  21. package/dist/SelectFilter-BXeVKgHN.js +264 -0
  22. package/dist/TeamMemberList-DoisBYnk.js +1154 -0
  23. package/dist/{TimesheetList-CECFKt7H.js → TimesheetList-D-bESKe5.js} +11 -11
  24. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RIyoAmeb.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D0zAVqCa.js} +3 -3
  25. package/dist/{app-CdrnR_Pw.js → app-D-MUq9Ab.js} +11435 -6652
  26. package/dist/app.js +3 -3
  27. package/dist/{approval-code-Bwvwehz9.js → approval-code-BXUiojPH.js} +1 -1
  28. package/dist/{dayjs.min-BO8bcI17.js → dayjs.min-BZ1pM-6M.js} +13 -13
  29. package/dist/{employee-Dg-J9goA.js → employee-HQEU8fjb.js} +66 -62
  30. package/dist/{grant-user-whFOaPZI.js → grant-user-CBJ3gEgW.js} +1 -1
  31. package/dist/{iteration-ZpERYj3o.js → iteration-ogxW2-Tv.js} +1 -1
  32. package/dist/{lodash-7SZBZ8VQ.js → lodash-Def4gaas.js} +1 -1
  33. package/dist/object-Dwyg2LgX.js +16 -0
  34. package/dist/restaurant-D2mfKHaH.js +1880 -0
  35. package/dist/{role-C6hFKOfU.js → role-JDoDFVd9.js} +4 -5
  36. package/dist/{rule-BlMymDXm.js → rule-DPtqlnz-.js} +94 -99
  37. package/dist/src/api/audit-log/index.d.ts +4 -0
  38. package/dist/src/api/employee/index.d.ts +2 -2
  39. package/dist/src/api/restaurant/index.d.ts +2 -0
  40. package/dist/src/api/schedule/index.d.ts +68 -0
  41. package/dist/src/components/AppForm.vue.d.ts +2 -2
  42. package/dist/src/components/CheckboxInput.vue.d.ts +2 -2
  43. package/dist/src/components/CollapsibleWrapper.vue.d.ts +3 -11
  44. package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
  45. package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
  46. package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
  47. package/dist/src/composables/useMessage.d.ts +8 -2
  48. package/dist/src/helpers/string.d.ts +1 -10
  49. package/dist/src/router/shared.d.ts +3 -2
  50. package/dist/src/stores/employee.d.ts +12 -12
  51. package/dist/src/stores/restaurant.d.ts +7 -7
  52. package/dist/src/stores/team.d.ts +0 -30
  53. package/dist/src/types/employee.d.ts +1 -0
  54. package/dist/src/types/schedule.d.ts +23 -0
  55. package/dist/src/types/team.d.ts +1 -17
  56. package/dist/src/views/audit-log/constants.d.ts +9 -30
  57. package/dist/src/views/audit-log/locales/index.d.ts +488 -0
  58. package/dist/src/views/audit-log/pos-row.d.ts +27 -0
  59. package/dist/src/views/hr/locales/index.d.ts +4 -4
  60. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
  61. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
  62. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
  63. package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
  64. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +12 -0
  65. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
  66. package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
  67. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
  68. package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
  69. package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
  70. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
  71. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +41 -0
  72. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
  73. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDoneArt.vue.d.ts +2 -0
  74. package/dist/src/views/{team/member/ExistingMemberNotice.vue.d.ts → scheduling/components/ScheduleAutoScheduleModal.vue.d.ts} +5 -6
  75. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +25 -0
  76. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +17 -0
  77. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +31 -0
  78. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +29 -0
  79. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +34 -0
  80. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +26 -0
  81. package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
  82. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +38 -0
  83. package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
  84. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
  85. package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
  86. package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
  87. package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +6 -0
  88. package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +15 -0
  89. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +33 -0
  90. package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +17 -0
  91. package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
  92. package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
  93. package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
  94. package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
  95. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +17 -0
  96. package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
  97. package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
  98. package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
  99. package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
  100. package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
  101. package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +7 -0
  102. package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
  103. package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
  104. package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
  105. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  106. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +6 -0
  107. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +9 -0
  108. package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
  109. package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +6 -0
  110. package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +6 -0
  111. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +6 -0
  112. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +6 -0
  113. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
  114. package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
  115. package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
  116. package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
  117. package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
  118. package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
  119. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +11 -0
  120. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
  121. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
  122. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
  123. package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
  124. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
  125. package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
  126. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +70 -0
  127. package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
  128. package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
  129. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
  130. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
  131. package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
  132. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +8 -0
  133. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
  134. package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
  135. package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
  136. package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
  137. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +16 -0
  138. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +50 -0
  139. package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
  140. package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
  141. package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
  142. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
  143. package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +35 -0
  144. package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +7 -0
  145. package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
  146. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +51 -0
  147. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +15 -0
  148. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +82 -0
  149. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +63 -0
  150. package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +9 -0
  151. package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +17 -0
  152. package/dist/src/views/scheduling/composables/schedule-cost.d.ts +24 -0
  153. package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
  154. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +21 -0
  155. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +23 -0
  156. package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
  157. package/dist/src/views/scheduling/composables/schedule-error.d.ts +1 -0
  158. package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
  159. package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +9 -0
  160. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
  161. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +23 -0
  162. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +29 -0
  163. package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
  164. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +9 -0
  165. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
  166. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +16 -0
  167. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +137 -0
  168. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +75 -0
  169. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
  170. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +11 -0
  171. package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
  172. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +301 -0
  173. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +615 -0
  174. package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
  175. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +28 -0
  176. package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +21 -0
  177. package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
  178. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +12 -0
  179. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +60 -0
  180. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +44 -0
  181. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +111 -0
  182. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +59 -0
  183. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +47 -0
  184. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +166 -0
  185. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +55 -0
  186. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +24 -0
  187. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
  188. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +49 -0
  189. package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
  190. package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
  191. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +50 -0
  192. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +38 -0
  193. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +32 -0
  194. package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
  195. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +18 -0
  196. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +52 -0
  197. package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
  198. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +79 -0
  199. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +60 -0
  200. package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
  201. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
  202. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
  203. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +231 -0
  204. package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
  205. package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
  206. package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
  207. package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
  208. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1543 -0
  209. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +25 -0
  210. package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
  211. package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
  212. package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
  213. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +20 -0
  214. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +33 -0
  215. package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
  216. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +21 -0
  217. package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
  218. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +55 -0
  219. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +35 -0
  220. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +127 -0
  221. package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
  222. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
  223. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +313 -0
  224. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +40 -0
  225. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +17 -0
  226. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +245 -0
  227. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +63 -0
  228. package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
  229. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +255 -0
  230. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +27 -0
  231. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
  232. package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +95 -0
  233. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
  234. package/dist/src/views/scheduling/country-rules/index.d.ts +33 -0
  235. package/dist/src/views/scheduling/data.d.ts +123 -0
  236. package/dist/src/views/scheduling/locales/index.d.ts +6988 -0
  237. package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
  238. package/dist/src/views/scheduling/schedule-state.d.ts +767 -0
  239. package/dist/src/views/scheduling/schedule-store.d.ts +140 -0
  240. package/dist/src/views/scheduling/types.d.ts +381 -0
  241. package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -11
  242. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +0 -11
  243. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
  244. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +0 -21
  245. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +0 -11
  246. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
  247. package/dist/src/views/team/locales/index.d.ts +0 -716
  248. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -50
  249. package/dist/src/views/team/{components/MemberStatusBadge.vue.d.ts → member/MemberInfo.vue.d.ts} +2 -2
  250. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +0 -1
  251. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -2
  252. package/dist/string-VNuQNweN.js +15 -0
  253. package/dist/style.css +1 -1
  254. package/dist/tsconfig.app.tsbuildinfo +1 -1
  255. package/dist/{useAppStore-CL6EEDuw.js → useAppStore-DZCdxlCd.js} +1 -1
  256. package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
  257. package/dist/{useLoading-BBjBUzGJ.js → useLoading-Nygx2zn8.js} +1 -1
  258. package/dist/{useReportPermissions-Bg0fma6m.js → useReportPermissions-CxV7Dz1B.js} +3 -3
  259. package/package.json +5 -3
  260. package/dist/AuditLogList-Dd6HyFhk.js +0 -1777
  261. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Cixg_icC.js +0 -459
  262. package/dist/EmployeeList-BG2KPvOB.js +0 -908
  263. package/dist/Main-BSHf8gTE.js +0 -100
  264. package/dist/MyPosProfile-CN8Bj3aV.js +0 -301
  265. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +0 -126
  266. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBoRXQPn.js +0 -4243
  267. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B5QDOF0L.js +0 -1840
  268. package/dist/SelectFilter-ATOm0hdn.js +0 -269
  269. package/dist/TeamMemberList-DZfEnOs1.js +0 -2097
  270. package/dist/member-grant-C46lvrh2.js +0 -55
  271. package/dist/restaurant-CKhT6kgj.js +0 -45
  272. package/dist/src/api/my-pos-profile/index.d.ts +0 -5
  273. package/dist/src/api/staff-invite/index.d.ts +0 -17
  274. package/dist/src/components/form/SegmentedTabs.vue.d.ts +0 -23
  275. package/dist/src/composables/useMenuAccess.d.ts +0 -56
  276. package/dist/src/composables/useStaffInviteProviders.d.ts +0 -19
  277. package/dist/src/helpers/member-grant.d.ts +0 -36
  278. package/dist/src/helpers/my-pos-profile.d.ts +0 -37
  279. package/dist/src/helpers/pos-assignment-rows.d.ts +0 -26
  280. package/dist/src/helpers/staff-invite.d.ts +0 -51
  281. package/dist/src/router/menu-access-guard.d.ts +0 -17
  282. package/dist/src/types/my-pos-profile.d.ts +0 -25
  283. package/dist/src/types/staff-invite.d.ts +0 -100
  284. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +0 -4
  285. package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -200
  286. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +0 -55
  287. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -46
  288. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +0 -35
  289. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +0 -19
  290. package/dist/string-DZQ1uNjn.js +0 -22
  291. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
  292. /package/dist/src/{views/my-pos-profile/MyPosProfile.vue.d.ts → components/layout/SchedulePromoBanner.vue.d.ts} +0 -0
@@ -0,0 +1,1950 @@
1
+ import { defineComponent as Vt, ref as S, computed as I, onMounted as Eo, onBeforeUnmount as No, watch as ie, resolveComponent as N, createElementBlock as v, openBlock as f, createBlock as Oe, createCommentVNode as F, createElementVNode as a, Fragment as z, renderList as ce, withCtx as Y, createVNode as g, toDisplayString as l, unref as u, nextTick as Ro, onUnmounted as Uo, createTextVNode as Ae, normalizeClass as Ko } from "vue";
2
+ import { d as O } from "./dayjs.min-BZ1pM-6M.js";
3
+ import { defineStore as Bo, storeToRefs as Yo } from "pinia";
4
+ import { useI18n as $t, useCoreStore as zo } from "@feedmepos/mf-common";
5
+ import { B as Ft, _ as qo, a as Jo } from "./app-D-MUq9Ab.js";
6
+ import { components as ve } from "@feedmepos/ui-library";
7
+ import { g as st, b as at, u as Ho } from "./restaurant-D2mfKHaH.js";
8
+ import { S as Fe } from "./SelectFilter-BXeVKgHN.js";
9
+ import { _ as Wo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
10
+ import { _ as Go } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
11
+ import { t as Xo, p as Mt } from "./rule-DPtqlnz-.js";
12
+ import { u as Qo } from "./useDebounce-B8ZPVS5C.js";
13
+ import { n as Zo } from "./string-VNuQNweN.js";
14
+ const es = {
15
+ order: "Order",
16
+ refund: "Refund",
17
+ drawer: "Cash drawer",
18
+ menu: "Menu",
19
+ inventory: "Inventory",
20
+ deposit: "Deposit",
21
+ delivery: "Delivery",
22
+ counterRecord: "Counter",
23
+ counter: "Counter",
24
+ setting: "Settings",
25
+ display: "Display",
26
+ printer: "Printer",
27
+ table: "Table",
28
+ employee: "Employee",
29
+ system: "System",
30
+ tax: "Tax",
31
+ paymentType: "Payment type",
32
+ faceId: "Face ID",
33
+ mallIntegration: "Mall integration",
34
+ report: "Report"
35
+ }, Me = [
36
+ { key: "all", label: "All", subjectPrefixes: [] },
37
+ { key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"], sources: ["portal"] },
38
+ { key: "report", label: "Report", subjectPrefixes: ["business::report", "report"], sources: ["portal"] },
39
+ { key: "hrm", label: "HRM", subjectPrefixes: ["business::hrm", "hrm"], sources: ["portal"] },
40
+ { key: "payment", label: "Payment", subjectPrefixes: ["business::payment", "payment"], sources: ["portal"] },
41
+ { key: "menu", label: "Menu", subjectPrefixes: ["business::menu", "menu"], sources: ["portal"] },
42
+ { key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"], sources: ["portal"] },
43
+ { key: "pos", label: "POS", subjectPrefixes: [], sources: ["pos-v8", "hrm-validate"] }
44
+ ], nt = "/audit-logs", Ke = {
45
+ async count(t) {
46
+ var r, d, h, b, y, A, C, i, V;
47
+ const o = {
48
+ ...t != null && t.from ? { from: t.from } : {},
49
+ ...t != null && t.to ? { to: t.to } : {},
50
+ ...(r = t == null ? void 0 : t.userIds) != null && r.length ? { userIds: t.userIds } : {},
51
+ ...(d = t == null ? void 0 : t.subjects) != null && d.length ? { subjects: t.subjects } : {},
52
+ ...(h = t == null ? void 0 : t.subjectPrefixes) != null && h.length ? { subjectPrefixes: t.subjectPrefixes } : {},
53
+ ...(b = t == null ? void 0 : t.actions) != null && b.length ? { actions: t.actions } : {},
54
+ ...(y = t == null ? void 0 : t.outcomes) != null && y.length ? { outcomes: t.outcomes } : {},
55
+ ...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
56
+ ...t != null && t.search ? { search: t.search } : {},
57
+ ...(A = t == null ? void 0 : t.searchUserIds) != null && A.length ? { searchUserIds: t.searchUserIds } : {},
58
+ ...(C = t == null ? void 0 : t.searchSubjects) != null && C.length ? { searchSubjects: t.searchSubjects } : {},
59
+ ...(i = t == null ? void 0 : t.sources) != null && i.length ? { sources: t.sources } : {},
60
+ ...(V = t == null ? void 0 : t.restaurantIds) != null && V.length ? { restaurantIds: t.restaurantIds } : {}
61
+ };
62
+ return (await st(
63
+ await at().get(`${nt}/count`, {
64
+ params: o,
65
+ paramsSerializer: (R) => {
66
+ const m = new URLSearchParams();
67
+ for (const [w, j] of Object.entries(R))
68
+ if (Array.isArray(j))
69
+ for (const T of j) m.append(w, String(T));
70
+ else j != null && m.append(w, String(j));
71
+ return m.toString();
72
+ }
73
+ })
74
+ )).total;
75
+ },
76
+ async read(t) {
77
+ var n, r, d, h, b, y, A, C, i;
78
+ const o = {
79
+ limit: (t == null ? void 0 : t.limit) ?? 100,
80
+ offset: (t == null ? void 0 : t.offset) ?? 0,
81
+ ...t != null && t.from ? { from: t.from } : {},
82
+ ...t != null && t.to ? { to: t.to } : {},
83
+ ...(n = t == null ? void 0 : t.userIds) != null && n.length ? { userIds: t.userIds } : {},
84
+ ...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
85
+ ...(r = t == null ? void 0 : t.subjects) != null && r.length ? { subjects: t.subjects } : {},
86
+ ...(d = t == null ? void 0 : t.subjectPrefixes) != null && d.length ? { subjectPrefixes: t.subjectPrefixes } : {},
87
+ ...(h = t == null ? void 0 : t.actions) != null && h.length ? { actions: t.actions } : {},
88
+ ...(b = t == null ? void 0 : t.outcomes) != null && b.length ? { outcomes: t.outcomes } : {},
89
+ ...t != null && t.search ? { search: t.search } : {},
90
+ ...(y = t == null ? void 0 : t.searchUserIds) != null && y.length ? { searchUserIds: t.searchUserIds } : {},
91
+ ...(A = t == null ? void 0 : t.searchSubjects) != null && A.length ? { searchSubjects: t.searchSubjects } : {},
92
+ ...(C = t == null ? void 0 : t.sources) != null && C.length ? { sources: t.sources } : {},
93
+ ...(i = t == null ? void 0 : t.restaurantIds) != null && i.length ? { restaurantIds: t.restaurantIds } : {}
94
+ };
95
+ return st(
96
+ await at().get(nt, {
97
+ params: o,
98
+ // Serialize arrays as repeated params: key=val1&key=val2
99
+ // (NestJS @Query expects this; axios default adds brackets which break matching)
100
+ paramsSerializer: (V) => {
101
+ const R = new URLSearchParams();
102
+ for (const [m, w] of Object.entries(V))
103
+ if (Array.isArray(w))
104
+ for (const j of w) R.append(m, String(j));
105
+ else w != null && R.append(m, String(w));
106
+ return R.toString();
107
+ }
108
+ })
109
+ );
110
+ },
111
+ /**
112
+ * FeedMe-admin options for the User filter. `actors` is the named admin list (internal
113
+ * viewers only; empty for merchants). `showFeedmeAdminFilter` indicates whether to offer
114
+ * the "FeedMe Admin" catch-all (only when the business has relevant admin activity).
115
+ */
116
+ async getFeedmeAdminFilter(t) {
117
+ const o = {
118
+ ...t != null && t.from ? { from: t.from } : {},
119
+ ...t != null && t.to ? { to: t.to } : {}
120
+ };
121
+ return st(
122
+ await at().get(`${nt}/actors`, { params: o })
123
+ );
124
+ }
125
+ }, ts = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, os = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ss = {
126
+ "data-more-measure": "",
127
+ class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
128
+ }, as = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ns = /* @__PURE__ */ Vt({
129
+ __name: "AuditLogModuleTabs",
130
+ props: {
131
+ modelValue: {},
132
+ items: {}
133
+ },
134
+ emits: ["update:modelValue"],
135
+ setup(t, { emit: o }) {
136
+ const n = t, r = o, { t: d } = $t(), h = S(!1), b = S(null), y = S(null), A = S([]), C = S(0), i = S(0);
137
+ let V = null;
138
+ async function R() {
139
+ if (await Ro(), !y.value) return;
140
+ const _ = y.value.querySelectorAll("[data-tab-measure]");
141
+ A.value = Array.from(_).map((B) => B.offsetWidth);
142
+ const D = y.value.querySelector("[data-more-measure]");
143
+ C.value = (D == null ? void 0 : D.offsetWidth) ?? 0;
144
+ }
145
+ const m = I(() => {
146
+ const _ = n.items.length;
147
+ if (_ === 0) return 0;
148
+ if (!i.value || A.value.length !== _) return _;
149
+ const D = A.value;
150
+ if (D.reduce((k, X) => k + X, 0) <= i.value) return _;
151
+ const P = C.value;
152
+ let H = 0, U = 0;
153
+ for (let k = 0; k < _ && !(H + D[k] + P > i.value); k++)
154
+ H += D[k], U++;
155
+ return U;
156
+ }), w = I(() => {
157
+ const _ = m.value, D = n.items.length;
158
+ if (_ >= D) return [...n.items];
159
+ const B = n.items.slice(0, _), P = n.items.find((W) => W.value === n.modelValue);
160
+ if (!P || B.some((W) => W.value === P.value)) return B;
161
+ if (_ === 0) return [P];
162
+ const H = n.items.findIndex((W) => W.value === P.value), U = A.value, k = C.value, X = U[H] ?? 0;
163
+ let ue = _, je = U.slice(0, ue - 1).reduce((W, _e) => W + _e, 0);
164
+ for (; ue > 1 && je + X + k > i.value; )
165
+ ue--, je = U.slice(0, ue - 1).reduce((W, _e) => W + _e, 0);
166
+ return [...n.items.slice(0, Math.max(ue - 1, 0)), P];
167
+ }), j = I(() => {
168
+ const _ = new Set(w.value.map((D) => D.value));
169
+ return n.items.filter((D) => !_.has(D.value));
170
+ });
171
+ function T(_) {
172
+ h.value = !1, r("update:modelValue", _);
173
+ }
174
+ return Eo(async () => {
175
+ await R(), b.value && (i.value = b.value.clientWidth, V = new ResizeObserver(() => {
176
+ b.value && (i.value = b.value.clientWidth);
177
+ }), V.observe(b.value));
178
+ }), No(() => {
179
+ V == null || V.disconnect(), V = null;
180
+ }), ie(
181
+ () => n.items,
182
+ () => {
183
+ R();
184
+ },
185
+ { deep: !0 }
186
+ ), (_, D) => {
187
+ const B = N("FmTab"), P = N("FmIcon"), H = N("FmMenuItem"), U = N("FmMenu");
188
+ return f(), v("div", {
189
+ ref_key: "containerRef",
190
+ ref: b,
191
+ class: "relative flex w-full flex-row items-center"
192
+ }, [
193
+ (f(!0), v(z, null, ce(w.value, (k) => (f(), Oe(B, {
194
+ key: k.value,
195
+ "model-value": t.modelValue,
196
+ label: k.label,
197
+ badge: k.badge,
198
+ disabled: k.disabled,
199
+ value: k.value,
200
+ "onUpdate:modelValue": T
201
+ }, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
202
+ j.value.length > 0 ? (f(), Oe(U, {
203
+ key: 0,
204
+ "show-menu": h.value,
205
+ class: "max-w-[360px] min-w-[90px] rounded-sm",
206
+ placement: "bottom-start",
207
+ onMenuChanged: D[0] || (D[0] = (k) => h.value = k)
208
+ }, {
209
+ "menu-button": Y(() => [
210
+ a("div", ts, [
211
+ g(P, { name: "more_vert" }),
212
+ a("span", os, l(u(d)("auditLog.modules.more")), 1)
213
+ ])
214
+ ]),
215
+ default: Y(() => [
216
+ (f(!0), v(z, null, ce(j.value, (k) => (f(), Oe(H, {
217
+ key: k.value,
218
+ "model-value": t.modelValue === k.value,
219
+ label: k.label,
220
+ disabled: k.disabled,
221
+ onClick: (X) => T(k.value)
222
+ }, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
223
+ ]),
224
+ _: 1
225
+ }, 8, ["show-menu"])) : F("", !0),
226
+ a("div", {
227
+ ref_key: "measurerRef",
228
+ ref: y,
229
+ "aria-hidden": "true",
230
+ class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
231
+ }, [
232
+ (f(!0), v(z, null, ce(t.items, (k) => (f(), v("div", {
233
+ key: `measure-${k.value}`,
234
+ "data-tab-measure": ""
235
+ }, [
236
+ g(B, {
237
+ "model-value": t.modelValue,
238
+ label: k.label,
239
+ badge: k.badge,
240
+ disabled: k.disabled,
241
+ value: k.value
242
+ }, null, 8, ["model-value", "label", "badge", "disabled", "value"])
243
+ ]))), 128)),
244
+ a("div", ss, [
245
+ g(P, { name: "more_vert" }),
246
+ a("span", as, l(u(d)("auditLog.modules.more")), 1)
247
+ ])
248
+ ], 512)
249
+ ], 512);
250
+ };
251
+ }
252
+ }), ls = Bo("team", () => {
253
+ const t = S([]), o = S(!1), n = S(!1), r = I(
254
+ () => Object.fromEntries(t.value.map((y) => [y.doc.userId, y.name]))
255
+ ), d = I(
256
+ () => Object.fromEntries(t.value.map((y) => [y.doc.userId, y.email]))
257
+ ), h = I(
258
+ () => Object.fromEntries(t.value.map((y) => [y.doc.userId, y.phoneNumber]))
259
+ );
260
+ async function b({ force: y = !1 } = {}) {
261
+ if (!(!y && t.value.length > 0))
262
+ try {
263
+ o.value = !0;
264
+ const A = await Xo.readTeamMembers();
265
+ t.value = A.sort((C, i) => C.doc.isOwner ? -1 : C.name.localeCompare(i.name)), n.value = !0;
266
+ } finally {
267
+ o.value = !1;
268
+ }
269
+ }
270
+ return {
271
+ members: t,
272
+ isLoading: o,
273
+ hasLoaded: n,
274
+ userIdToName: r,
275
+ userIdToEmail: d,
276
+ userIdToPhone: h,
277
+ readTeamMembers: b
278
+ };
279
+ });
280
+ function rs(t) {
281
+ const o = t.indexOf(".");
282
+ return o <= 0 || o === t.length - 1 ? null : { entity: t.slice(0, o), verb: t.slice(o + 1) };
283
+ }
284
+ function Dt(t) {
285
+ const o = t.split("-").join(" ");
286
+ return o.charAt(0).toUpperCase() + o.slice(1);
287
+ }
288
+ function is(t, o, n) {
289
+ const r = t(o, n);
290
+ return r === o ? null : r;
291
+ }
292
+ function ut(t, o) {
293
+ const { eventKey: n, params: r, operationLabel: d } = o;
294
+ if (n) {
295
+ const h = is(t, `auditLog.event.sentence.${n}`, r);
296
+ if (h) return h;
297
+ const b = rs(n);
298
+ if (b) {
299
+ const y = `${Dt(b.verb)} ${Dt(b.entity)}`, A = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
300
+ return A !== void 0 && A !== "" ? `${y} — ${A}` : y;
301
+ }
302
+ }
303
+ return d ?? "";
304
+ }
305
+ function be(t) {
306
+ return typeof t == "object" && t !== null && !Array.isArray(t);
307
+ }
308
+ function Ce(t) {
309
+ return Array.isArray(t);
310
+ }
311
+ function Be(t) {
312
+ if (t === null) return "null";
313
+ if (typeof t == "object")
314
+ try {
315
+ return JSON.stringify(t);
316
+ } catch {
317
+ return String(t);
318
+ }
319
+ return String(t);
320
+ }
321
+ function us(t, o) {
322
+ return t ? `${t}.${o}` : o;
323
+ }
324
+ function Ot(t) {
325
+ if (typeof t != "string") return { ok: !1, value: void 0 };
326
+ const o = t.trim();
327
+ if (!o.startsWith("{") && !o.startsWith("[")) return { ok: !1, value: void 0 };
328
+ try {
329
+ const n = JSON.parse(o);
330
+ return be(n) || Ce(n) ? { ok: !0, value: n } : { ok: !1, value: void 0 };
331
+ } catch {
332
+ return { ok: !1, value: void 0 };
333
+ }
334
+ }
335
+ const ds = ["_id", "id", "subject", "key", "name"];
336
+ function cs(t, o) {
337
+ if (t.length === 0 || o.length === 0) return null;
338
+ const n = (d, h) => d.every((b) => be(b) && b[h] !== void 0), r = (d, h) => {
339
+ const b = d.map((y) => y[h]);
340
+ return b.length === new Set(b).size;
341
+ };
342
+ for (const d of ds)
343
+ if (n(t, d) && n(o, d) && r(t, d) && r(o, d))
344
+ return d;
345
+ return null;
346
+ }
347
+ function Pt(t, o, n) {
348
+ n.push({ path: t, type: "added", before: null, after: Be(o) });
349
+ }
350
+ function Et(t, o, n) {
351
+ n.push({ path: t, type: "removed", before: Be(o), after: null });
352
+ }
353
+ function fs(t, o, n, r) {
354
+ const d = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
355
+ for (const h of Array.from(d)) {
356
+ const b = Object.prototype.hasOwnProperty.call(o, h), y = Object.prototype.hasOwnProperty.call(n, h);
357
+ Ye(us(t, h), o[h], b, n[h], y, r);
358
+ }
359
+ }
360
+ function ms(t, o, n, r) {
361
+ const d = cs(o, n);
362
+ if (d) {
363
+ const m = new Map(
364
+ o.map((_) => [_[d], _])
365
+ ), w = new Map(
366
+ n.map((_) => [_[d], _])
367
+ ), j = Array.from(m.keys()).concat(Array.from(w.keys())), T = Array.from(new Set(j));
368
+ for (const _ of T) {
369
+ const D = m.has(_), B = w.has(_), P = `${t}[${String(_)}]`;
370
+ Ye(
371
+ P,
372
+ m.get(_),
373
+ D,
374
+ w.get(_),
375
+ B,
376
+ r
377
+ );
378
+ }
379
+ return;
380
+ }
381
+ const h = o.map((m, w) => ({ sig: JSON.stringify(m), idx: w, item: m })), b = n.map((m, w) => ({ sig: JSON.stringify(m), idx: w, item: m })), y = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
382
+ for (const m of h)
383
+ y.has(m.sig) || y.set(m.sig, []), y.get(m.sig).push(m);
384
+ for (const m of b)
385
+ A.has(m.sig) || A.set(m.sig, []), A.get(m.sig).push(m);
386
+ const C = [], i = [], V = Array.from(y.keys()).concat(Array.from(A.keys())), R = Array.from(new Set(V));
387
+ for (const m of R) {
388
+ const w = y.get(m) || [], j = A.get(m) || [], T = Math.min(w.length, j.length);
389
+ for (let _ = T; _ < w.length; _++)
390
+ C.push({ idx: w[_].idx, item: w[_].item });
391
+ for (let _ = T; _ < j.length; _++)
392
+ i.push({ idx: j[_].idx, item: j[_].item });
393
+ }
394
+ for (const { idx: m, item: w } of C)
395
+ Et(`${t}[${m}]`, w, r);
396
+ for (const { idx: m, item: w } of i)
397
+ Pt(`${t}[${m}]`, w, r);
398
+ }
399
+ function Ye(t, o, n, r, d, h) {
400
+ if (!n && !d) return;
401
+ if (n && !d) {
402
+ Et(t, o, h);
403
+ return;
404
+ }
405
+ if (!n && d) {
406
+ Pt(t, r, h);
407
+ return;
408
+ }
409
+ if (JSON.stringify(o) === JSON.stringify(r)) return;
410
+ if (be(o) && be(r)) {
411
+ fs(t, o, r, h);
412
+ return;
413
+ }
414
+ if (Ce(o) && Ce(r)) {
415
+ ms(t, o, r, h);
416
+ return;
417
+ }
418
+ const b = Ot(o), y = Ot(r);
419
+ if (b.ok && y.ok) {
420
+ Ye(t, b.value, !0, y.value, !0, h);
421
+ return;
422
+ }
423
+ h.push({
424
+ path: t,
425
+ type: "changed",
426
+ before: Be(o),
427
+ after: Be(r)
428
+ });
429
+ }
430
+ function vs(t, o) {
431
+ if (JSON.stringify(t) === JSON.stringify(o)) return [];
432
+ const n = t == null, r = o == null;
433
+ let d = t;
434
+ n && (be(o) ? d = {} : Ce(o) && (d = []));
435
+ let h = o;
436
+ r && (be(t) ? h = {} : Ce(t) && (h = []));
437
+ const b = [];
438
+ return Ye("", d, !0, h, !0, b), b;
439
+ }
440
+ function Ct(t) {
441
+ const o = t.operations;
442
+ return !o || o.length === 0 ? !1 : o.some((n) => n.status === "failed");
443
+ }
444
+ function lt(t, o) {
445
+ var d, h;
446
+ if (t.source === "hrm-validate") return o("auditLog.pos.device.posV7");
447
+ const n = (h = (d = t.metadata) == null ? void 0 : d.pos) == null ? void 0 : h.posMode, r = t.deviceId || "-";
448
+ return n ? `${r} · ${o(`auditLog.pos.mode.${n}`)}` : r;
449
+ }
450
+ function ps(t, o) {
451
+ var r;
452
+ const n = t.actorName || t.userId || "-";
453
+ return ((r = t.metadata) == null ? void 0 : r.actorKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
454
+ }
455
+ function jt(t, o) {
456
+ var d;
457
+ const n = t.approverName || t.approverId;
458
+ if (!n)
459
+ return t.source === "hrm-validate" ? o("auditLog.pos.viaCode") : "-";
460
+ const r = ((d = t.metadata) == null ? void 0 : d.approverKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
461
+ return t.source === "hrm-validate" ? `${r} · ${o("auditLog.pos.viaCode")}` : r;
462
+ }
463
+ function gs(t, o) {
464
+ const n = t.approverName || t.approverId;
465
+ return n ? ` · ${o("auditLog.pos.approverInline", { name: n })}` : "";
466
+ }
467
+ function hs(t, o, n) {
468
+ return o || !(t != null && t.length) ? { userIds: [], feedmeAdminActors: !1 } : {
469
+ userIds: t.filter((r) => r !== n),
470
+ feedmeAdminActors: t.includes(n)
471
+ };
472
+ }
473
+ function ye(t) {
474
+ return t === void 0 ? "—" : Array.isArray(t) ? t.length > 0 ? t.join(", ") : "—" : t || "—";
475
+ }
476
+ function ys(t) {
477
+ return {
478
+ label: t.label,
479
+ labelKey: t.labelKey,
480
+ type: t.type,
481
+ beforeDisplay: ye(t.before),
482
+ afterDisplay: ye(t.after)
483
+ };
484
+ }
485
+ function bs(t) {
486
+ return Array.isArray(t) && t.length > 0;
487
+ }
488
+ function Nt(t, o, n) {
489
+ return n.labelKey && o(n.labelKey) ? t(n.labelKey) : n.label;
490
+ }
491
+ function Rt(t, o) {
492
+ return ut(t, o) || t("auditLog.operation.unlabeled");
493
+ }
494
+ function _s(t, o) {
495
+ return !o || o.length === 0 ? "" : o.map((n) => {
496
+ const r = Rt(t, n), d = t(`auditLog.outcome.${n.status}`);
497
+ let h = `${r}: ${d}`;
498
+ return n.status === "failed" && n.errorMessage && (h += ` — ${n.errorMessage}`), h;
499
+ }).join(`
500
+ `);
501
+ }
502
+ function xs(t, o, n) {
503
+ const r = Nt(t, o, n);
504
+ return n.type === "add" ? `${r}: + ${ye(n.after)}` : n.type === "remove" ? `${r}: - ${ye(n.before)}` : `${r}: ${ye(n.before)} → ${ye(n.after)}`;
505
+ }
506
+ function Ls(t, o, n) {
507
+ if (!n || n.length === 0) return "";
508
+ const r = n.filter((b) => b.changeNodes && b.changeNodes.length > 0);
509
+ if (r.length === 0) return "";
510
+ const d = r.length > 1;
511
+ return r.map((b) => {
512
+ const y = (b.changeNodes ?? []).map((A) => xs(t, o, A));
513
+ return d ? [`[${Rt(t, b)}]`, ...y].join(`
514
+ `) : y.join(`
515
+ `);
516
+ }).join(`
517
+ `);
518
+ }
519
+ const Ss = {
520
+ class: "flex flex-col gap-4 p-12 w-[260px]"
521
+ }, ks = {
522
+ class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
523
+ }, ws = {
524
+ class: "flex min-h-0 flex-1 flex-col gap-16"
525
+ }, Is = {
526
+ class: "space-y-16"
527
+ }, As = {
528
+ class: "flex flex-wrap items-center gap-8"
529
+ }, Fs = {
530
+ key: 0,
531
+ class: "w-fit"
532
+ }, Ms = {
533
+ key: 1,
534
+ class: "w-fit"
535
+ }, Ds = {
536
+ class: "w-fit"
537
+ }, Os = {
538
+ class: "w-fit"
539
+ }, Cs = {
540
+ key: 2,
541
+ class: "w-fit"
542
+ }, js = {
543
+ class: "flex h-full flex-col overflow-auto"
544
+ }, Ts = {
545
+ key: 0,
546
+ class: "space-y-12 p-4 text-sm"
547
+ }, Vs = {
548
+ class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
549
+ }, $s = {
550
+ class: "min-w-0 flex-1"
551
+ }, Ps = {
552
+ class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
553
+ }, Es = {
554
+ key: 0,
555
+ class: "mt-4 break-all font-mono text-xs text-fm-color-typo-secondary"
556
+ }, Ns = {
557
+ key: 1,
558
+ class: "mt-2 break-all font-mono text-xs text-fm-color-typo-secondary"
559
+ }, Rs = {
560
+ class: "flex items-center gap-4"
561
+ }, Us = {
562
+ class: "rounded-lg border border-fm-color-border-default p-12"
563
+ }, Ks = {
564
+ class: "space-y-12"
565
+ }, Bs = {
566
+ class: "text-xs text-fm-color-typo-secondary"
567
+ }, Ys = {
568
+ class: "font-semibold"
569
+ }, zs = {
570
+ class: "text-xs text-fm-color-typo-secondary"
571
+ }, qs = {
572
+ class: "font-semibold"
573
+ }, Js = {
574
+ class: "text-xs text-fm-color-typo-secondary"
575
+ }, Hs = {
576
+ class: "break-all font-semibold"
577
+ }, Ws = {
578
+ key: 0
579
+ }, Gs = {
580
+ class: "text-xs text-fm-color-typo-secondary"
581
+ }, Xs = {
582
+ class: "break-all font-mono text-xs font-semibold"
583
+ }, Qs = {
584
+ class: "text-xs text-fm-color-typo-secondary"
585
+ }, Zs = {
586
+ class: "break-all font-mono text-xs font-semibold"
587
+ }, ea = {
588
+ class: "text-xs text-fm-color-typo-secondary"
589
+ }, ta = {
590
+ class: "font-semibold"
591
+ }, oa = {
592
+ class: "rounded-lg border border-fm-color-border-default"
593
+ }, sa = {
594
+ class: "p-12"
595
+ }, aa = {
596
+ class: "text-base font-bold text-fm-color-typo-primary"
597
+ }, na = {
598
+ class: "space-y-12 p-12"
599
+ }, la = {
600
+ class: "text-xs text-fm-color-typo-secondary"
601
+ }, ra = {
602
+ class: "font-semibold"
603
+ }, ia = {
604
+ class: "rounded-lg border border-fm-color-border-default"
605
+ }, ua = {
606
+ class: "p-12"
607
+ }, da = {
608
+ class: "text-base font-bold text-fm-color-typo-primary"
609
+ }, ca = {
610
+ class: "space-y-12 p-12"
611
+ }, fa = {
612
+ class: "text-xs text-fm-color-typo-secondary"
613
+ }, ma = {
614
+ class: "font-semibold"
615
+ }, va = {
616
+ key: 0
617
+ }, pa = {
618
+ class: "text-xs text-fm-color-typo-secondary"
619
+ }, ga = {
620
+ key: 0,
621
+ class: "font-semibold"
622
+ }, ha = {
623
+ key: 1,
624
+ class: "break-all font-mono text-xs text-fm-color-typo-secondary"
625
+ }, ya = {
626
+ key: 1
627
+ }, ba = {
628
+ class: "text-xs text-fm-color-typo-secondary"
629
+ }, _a = {
630
+ class: "font-semibold whitespace-pre-line"
631
+ }, xa = {
632
+ class: "text-xs text-fm-color-typo-secondary"
633
+ }, La = {
634
+ class: "font-semibold"
635
+ }, Sa = {
636
+ class: "text-xs text-fm-color-typo-secondary"
637
+ }, ka = {
638
+ class: "break-all font-mono text-xs font-semibold"
639
+ }, wa = {
640
+ class: "text-xs text-fm-color-typo-secondary"
641
+ }, Ia = {
642
+ class: "break-all font-mono text-xs font-semibold"
643
+ }, Aa = {
644
+ class: "text-xs text-fm-color-typo-secondary"
645
+ }, Fa = {
646
+ class: "font-semibold"
647
+ }, Ma = {
648
+ key: 0,
649
+ class: "break-all font-mono text-xs"
650
+ }, Da = {
651
+ key: 0
652
+ }, Oa = {
653
+ class: "text-xs text-fm-color-typo-secondary"
654
+ }, Ca = {
655
+ class: "font-semibold"
656
+ }, ja = {
657
+ class: "text-xs text-fm-color-typo-secondary"
658
+ }, Ta = {
659
+ class: "font-semibold"
660
+ }, Va = {
661
+ class: "text-xs text-fm-color-typo-secondary"
662
+ }, $a = {
663
+ class: "font-semibold"
664
+ }, Pa = {
665
+ key: 0
666
+ }, Ea = {
667
+ key: 1
668
+ }, Na = {
669
+ class: "text-xs text-fm-color-typo-secondary"
670
+ }, Ra = {
671
+ class: "whitespace-pre-wrap break-all font-mono text-xs"
672
+ }, Ua = {
673
+ key: 3
674
+ }, Ka = {
675
+ class: "text-xs text-fm-color-typo-secondary"
676
+ }, Ba = {
677
+ class: "mt-4 space-y-4"
678
+ }, Ya = {
679
+ 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"
680
+ }, za = {
681
+ class: "text-xs font-semibold"
682
+ }, qa = {
683
+ key: 0,
684
+ class: "text-fm-color-typo-secondary"
685
+ }, Ja = {
686
+ key: 4
687
+ }, Ha = {
688
+ class: "text-xs text-fm-color-typo-secondary"
689
+ }, Wa = {
690
+ 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"
691
+ }, Ga = {
692
+ key: 0,
693
+ class: "space-y-12 p-4 text-sm"
694
+ }, Xa = {
695
+ class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
696
+ }, Qa = {
697
+ class: "min-w-0 flex-1"
698
+ }, Za = {
699
+ class: "text-base font-bold leading-snug text-fm-color-typo-primary"
700
+ }, en = {
701
+ key: 0,
702
+ class: "text-xs text-fm-color-typo-secondary"
703
+ }, tn = {
704
+ class: "rounded-lg border border-fm-color-border-default p-12"
705
+ }, on = {
706
+ class: "space-y-12"
707
+ }, sn = {
708
+ class: "text-xs text-fm-color-typo-secondary"
709
+ }, an = {
710
+ class: "font-semibold"
711
+ }, nn = {
712
+ key: 0
713
+ }, ln = {
714
+ class: "text-xs text-fm-color-typo-secondary"
715
+ }, rn = {
716
+ class: "font-semibold"
717
+ }, un = {
718
+ key: 1
719
+ }, dn = {
720
+ class: "text-xs text-fm-color-typo-secondary"
721
+ }, cn = {
722
+ class: "font-semibold"
723
+ }, fn = {
724
+ key: 0,
725
+ class: "rounded-lg border border-fm-color-border-default p-12"
726
+ }, mn = {
727
+ class: "text-xs text-fm-color-typo-secondary"
728
+ }, vn = {
729
+ class: "whitespace-pre-line font-semibold text-fm-color-typo-error"
730
+ }, pn = {
731
+ class: "rounded-lg border border-fm-color-border-default"
732
+ }, gn = {
733
+ class: "p-12"
734
+ }, hn = {
735
+ class: "text-base font-bold text-fm-color-typo-primary"
736
+ }, yn = {
737
+ class: "p-12"
738
+ }, bn = {
739
+ key: 0,
740
+ class: "divide-y divide-fm-color-border-default"
741
+ }, _n = {
742
+ class: "flex flex-wrap items-center gap-8"
743
+ }, xn = {
744
+ class: "break-all text-xs"
745
+ }, Ln = {
746
+ class: "break-all font-mono text-xs"
747
+ }, Sn = {
748
+ key: 0,
749
+ class: "text-fm-color-typo-success"
750
+ }, kn = {
751
+ key: 1,
752
+ class: "text-fm-color-typo-error"
753
+ }, wn = {
754
+ class: "text-fm-color-typo-error"
755
+ }, In = {
756
+ class: "text-fm-color-typo-success"
757
+ }, An = {
758
+ key: 1,
759
+ class: "divide-y divide-fm-color-border-default"
760
+ }, Fn = {
761
+ class: "flex flex-wrap items-center gap-8"
762
+ }, Mn = {
763
+ class: "break-all font-mono text-xs"
764
+ }, Dn = {
765
+ class: "space-y-4"
766
+ }, On = {
767
+ key: 0,
768
+ class: "text-fm-color-typo-success"
769
+ }, Cn = {
770
+ key: 1,
771
+ class: "text-fm-color-typo-error"
772
+ }, jn = {
773
+ class: "text-fm-color-typo-error"
774
+ }, Tn = {
775
+ class: "text-fm-color-typo-success"
776
+ }, Vn = {
777
+ key: 2,
778
+ class: "text-fm-color-typo-secondary"
779
+ }, $n = {
780
+ key: 1,
781
+ class: "rounded-lg border border-fm-color-border-default"
782
+ }, Pn = {
783
+ class: "text-base font-bold text-fm-color-typo-primary"
784
+ }, En = {
785
+ class: "space-y-12 p-12"
786
+ }, Nn = {
787
+ key: 0
788
+ }, Rn = {
789
+ class: "text-xs text-fm-color-typo-secondary"
790
+ }, Un = {
791
+ 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"
792
+ }, Kn = {
793
+ key: 1
794
+ }, Bn = {
795
+ class: "text-xs text-fm-color-typo-secondary"
796
+ }, Yn = {
797
+ 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"
798
+ }, De = 100, rt = 1e3, it = "__feedmeAdmin__", zn = "D MMM YYYY h:mm A", qn = "YYYY-MM-DD HH:mm", K = "YYYY-MM-DD", Tt = "audit-log-export-fields-v3", Jn = /* @__PURE__ */ Vt({
799
+ __name: "AuditLogList",
800
+ setup(t) {
801
+ const {
802
+ t: o,
803
+ te: n
804
+ } = $t(), r = zo(), d = ls(), h = Ho(), {
805
+ restaurants: b
806
+ } = Yo(h), y = S(!1), A = S(!1), C = S([]), i = S(null), V = S(!1), R = S({}), m = S(null), w = S(!1);
807
+ async function j(e) {
808
+ const s = Uint8Array.from(atob(e), (L) => L.charCodeAt(0)), c = new DecompressionStream("gzip"), x = c.writable.getWriter();
809
+ return await x.write(s), await x.close(), new Response(c.readable).text();
810
+ }
811
+ const T = S("");
812
+ let _ = 0;
813
+ ie(() => {
814
+ var e, s;
815
+ return (s = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
816
+ }, async (e) => {
817
+ const s = ++_;
818
+ if (!e) {
819
+ T.value = "";
820
+ return;
821
+ }
822
+ if (typeof e == "object") {
823
+ T.value = JSON.stringify(e, null, 2);
824
+ return;
825
+ }
826
+ if (e.startsWith("gzip:")) {
827
+ try {
828
+ const c = await j(e.slice(5));
829
+ if (s !== _) return;
830
+ T.value = JSON.stringify(JSON.parse(c), null, 2);
831
+ } catch {
832
+ if (s !== _) return;
833
+ T.value = e;
834
+ }
835
+ return;
836
+ }
837
+ try {
838
+ T.value = JSON.stringify(JSON.parse(e), null, 2);
839
+ } catch {
840
+ T.value = e;
841
+ }
842
+ }, {
843
+ immediate: !0
844
+ });
845
+ async function D(e) {
846
+ if (!e) return;
847
+ let s = e;
848
+ if (e.startsWith("gzip:"))
849
+ try {
850
+ s = await j(e.slice(5));
851
+ } catch {
852
+ return e;
853
+ }
854
+ try {
855
+ return JSON.parse(s);
856
+ } catch {
857
+ return s;
858
+ }
859
+ }
860
+ function B(e) {
861
+ if (e === void 0) return "";
862
+ if (typeof e == "object" && e !== null)
863
+ try {
864
+ return JSON.stringify(e, null, 2);
865
+ } catch {
866
+ return String(e);
867
+ }
868
+ return String(e);
869
+ }
870
+ const P = S([]), H = S([]), U = S(""), k = S(""), X = S(!1);
871
+ let ue = 0;
872
+ ie(m, async (e) => {
873
+ const s = ++ue;
874
+ if (P.value = [], H.value = [], U.value = "", k.value = "", X.value = !1, !e) return;
875
+ const [c, x] = await Promise.all([D(e.before), D(e.after)]);
876
+ s === ue && (bs(e.changeNodes) ? H.value = e.changeNodes.map(ys) : P.value = vs(c, x), U.value = B(c), k.value = B(x));
877
+ });
878
+ function je(e) {
879
+ return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
880
+ }
881
+ function dt(e) {
882
+ return o(e === "added" ? "auditLog.operation.added" : e === "removed" ? "auditLog.operation.removed" : "auditLog.operation.updated");
883
+ }
884
+ function W(e) {
885
+ return e.replace(/\[[^\]]*\]/g, "");
886
+ }
887
+ function _e(e) {
888
+ return e === "add" ? "success" : e === "remove" ? "critical" : "warning";
889
+ }
890
+ function Ut(e) {
891
+ return o(e === "add" ? "auditLog.operation.added" : e === "remove" ? "auditLog.operation.removed" : "auditLog.operation.updated");
892
+ }
893
+ function Kt(e) {
894
+ return Nt(o, n, e);
895
+ }
896
+ const ct = I(() => {
897
+ const e = [], s = /* @__PURE__ */ new Map();
898
+ for (const c of P.value) {
899
+ const x = W(c.path), L = `${c.type}::${x}`;
900
+ let M = s.get(L);
901
+ M || (M = {
902
+ groupKey: L,
903
+ displayKey: x,
904
+ type: c.type,
905
+ rows: []
906
+ }, s.set(L, M), e.push(M)), M.rows.push(c);
907
+ }
908
+ return e;
909
+ }), Te = S(1), Bt = S(!1), ze = S(0), ft = I(() => Math.max(1, Math.ceil(ze.value / De))), mt = O().format("YYYY-MM-DD"), oe = S({
910
+ startDate: `${mt} 00:00`,
911
+ endDate: `${mt} 23:59`
912
+ }), fe = S(), Q = S(), se = S(), ae = S(), ne = S("all");
913
+ function Yt(e) {
914
+ return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
915
+ }
916
+ const vt = Me.filter((e) => e.key !== "all").map((e) => e.key);
917
+ function Ve(e) {
918
+ const s = Me.find((c) => c.key !== "all" && c.subjectPrefixes.some((x) => e.startsWith(x)));
919
+ return (s == null ? void 0 : s.key) ?? "other";
920
+ }
921
+ function pt(e) {
922
+ const s = vt.indexOf(e);
923
+ return s === -1 ? vt.length : s;
924
+ }
925
+ const zt = I(() => Me.map(({
926
+ key: e
927
+ }) => ({
928
+ label: o(`auditLog.modules.${e}`),
929
+ value: e
930
+ }))), $e = I(() => Me.find((e) => e.key === ne.value) ?? Me[0]), qt = I(() => ne.value === "all"), q = I(() => ne.value === "pos"), pe = I(() => $e.value.sources ?? []);
931
+ ie(q, (e) => {
932
+ e && h.readRestaurants();
933
+ }, {
934
+ immediate: !0
935
+ });
936
+ const Z = S([]), Jt = I(() => b.value.map((e) => ({
937
+ label: e.profile.name,
938
+ value: String(e._id)
939
+ }))), Ht = I(() => Object.fromEntries(b.value.map((e) => [String(e._id), e.profile.name])));
940
+ ie(ne, () => {
941
+ Z.value = [];
942
+ });
943
+ const xe = S([]), Pe = S(!1), Wt = I(() => [...Pe.value ? [{
944
+ label: o("auditLog.user.feedmeAdmin"),
945
+ value: it
946
+ }] : [], ...d.members.map((e) => ({
947
+ label: e.name,
948
+ value: e.doc.userId
949
+ })), ...xe.value.map((e) => ({
950
+ label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
951
+ value: e.userId
952
+ }))]), le = I(() => hs(fe.value, q.value, it)), qe = S(""), ee = S(""), Gt = Qo(qe, (e) => {
953
+ ee.value = e.trim();
954
+ });
955
+ Uo(Gt);
956
+ const me = I(() => {
957
+ const e = ee.value.toLowerCase();
958
+ if (!e) return [];
959
+ const s = /* @__PURE__ */ new Set();
960
+ for (const c of d.members) {
961
+ const x = c.doc.userId;
962
+ ((d.userIdToName[x] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[x] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[x] ?? "").toLowerCase().includes(e)) && s.add(x);
963
+ }
964
+ for (const c of xe.value)
965
+ c.name.toLowerCase().includes(e) && s.add(c.userId);
966
+ return [...s];
967
+ }), Je = I(() => {
968
+ const e = Mt.flatMap((L) => Yt(L.subject).map((M) => ({
969
+ label: L.label,
970
+ value: M
971
+ }))), s = Object.entries(Ft).map(([L, M]) => ({
972
+ label: M,
973
+ value: L
974
+ })), c = /* @__PURE__ */ new Set(), x = [];
975
+ for (const L of [...e, ...s])
976
+ if (!c.has(L.value)) {
977
+ c.add(L.value);
978
+ const M = Ve(L.value);
979
+ x.push({
980
+ ...L,
981
+ group: o(`auditLog.modules.${M}`)
982
+ });
983
+ }
984
+ return x.sort((L, M) => pt(Ve(L.value)) - pt(Ve(M.value)));
985
+ }), ge = I(() => {
986
+ const e = ee.value.toLowerCase();
987
+ if (!e) return [];
988
+ const s = /* @__PURE__ */ new Set();
989
+ for (const c of Je.value)
990
+ c.label.toLowerCase().includes(e) && s.add(c.value);
991
+ return [...s];
992
+ }), Xt = I(() => qt.value ? Je.value : Je.value.filter((e) => Ve(e.value) === ne.value));
993
+ function Qt(e, s) {
994
+ const c = s.toLowerCase();
995
+ return e.label.toLowerCase().includes(c) || e.value.replace(/^business::/, "").toLowerCase().includes(c) ? !0 : e.value.toLowerCase().includes(c);
996
+ }
997
+ const G = I(() => ({
998
+ manage: o("auditLog.action.manage"),
999
+ create: o("auditLog.action.create"),
1000
+ read: o("auditLog.action.read"),
1001
+ update: o("auditLog.action.update"),
1002
+ delete: o("auditLog.action.delete")
1003
+ })), Zt = I(() => [{
1004
+ label: G.value.manage,
1005
+ value: "manage"
1006
+ }, {
1007
+ label: G.value.create,
1008
+ value: "create"
1009
+ }, {
1010
+ label: G.value.read,
1011
+ value: "read"
1012
+ }, {
1013
+ label: G.value.update,
1014
+ value: "update"
1015
+ }, {
1016
+ label: G.value.delete,
1017
+ value: "delete"
1018
+ }]), Ee = I(() => ({
1019
+ allowed: o("auditLog.outcome.success"),
1020
+ denied: o("auditLog.outcome.failed"),
1021
+ skipped: o("auditLog.outcome.skipped")
1022
+ })), He = I(() => {
1023
+ var e;
1024
+ return ((e = r.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
1025
+ });
1026
+ function gt(e) {
1027
+ return !He.value && e === "skipped" ? "allowed" : e;
1028
+ }
1029
+ function We(e) {
1030
+ return !(e != null && e.length) || He.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
1031
+ }
1032
+ const eo = I(() => [{
1033
+ label: Ee.value.allowed,
1034
+ value: "allowed"
1035
+ }, {
1036
+ label: Ee.value.denied,
1037
+ value: "denied"
1038
+ }, ...He.value ? [{
1039
+ label: Ee.value.skipped,
1040
+ value: "skipped"
1041
+ }] : []]), to = I(() => ({
1042
+ admin: o("auditLog.detail.resolvedFromValue.admin"),
1043
+ staff: o("auditLog.detail.resolvedFromValue.staff"),
1044
+ permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
1045
+ systemPermissionSet: o("auditLog.detail.resolvedFromValue.systemPermissionSet"),
1046
+ custom: o("auditLog.detail.resolvedFromValue.custom"),
1047
+ "no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
1048
+ unknown: o("auditLog.detail.resolvedFromValue.unknown")
1049
+ })), oo = I(() => ({
1050
+ GET: G.value.read,
1051
+ POST: G.value.create,
1052
+ PUT: G.value.update,
1053
+ PATCH: G.value.update,
1054
+ DELETE: G.value.delete
1055
+ })), so = {
1056
+ allowed: "success",
1057
+ denied: "critical",
1058
+ skipped: "warning"
1059
+ };
1060
+ function Ne(e) {
1061
+ return O(e).format(zn);
1062
+ }
1063
+ const ao = I(() => {
1064
+ const {
1065
+ startDate: e,
1066
+ endDate: s
1067
+ } = oe.value;
1068
+ return e && s ? `${Ne(e)} – ${Ne(s)}` : e ? Ne(e) : s ? Ne(s) : o("auditLog.dateRange.placeholder");
1069
+ }), no = I(() => [{
1070
+ label: o("date.predefinedRanges.today"),
1071
+ value: {
1072
+ startDate: O().format(K),
1073
+ endDate: O().format(K)
1074
+ }
1075
+ }, {
1076
+ label: o("date.predefinedRanges.yesterday"),
1077
+ value: {
1078
+ startDate: O().subtract(1, "day").format(K),
1079
+ endDate: O().subtract(1, "day").format(K)
1080
+ }
1081
+ }, {
1082
+ label: o("date.predefinedRanges.thisWeek"),
1083
+ value: {
1084
+ startDate: O().startOf("week").format(K),
1085
+ endDate: O().endOf("week").format(K)
1086
+ }
1087
+ }, {
1088
+ label: o("date.predefinedRanges.lastWeek"),
1089
+ value: {
1090
+ startDate: O().subtract(1, "week").startOf("week").format(K),
1091
+ endDate: O().subtract(1, "week").endOf("week").format(K)
1092
+ }
1093
+ }, {
1094
+ label: o("date.predefinedRanges.last7Days"),
1095
+ value: {
1096
+ startDate: O().subtract(7, "day").format(K),
1097
+ endDate: O().subtract(1, "day").format(K)
1098
+ }
1099
+ }, {
1100
+ label: o("date.predefinedRanges.thisMonth"),
1101
+ value: {
1102
+ startDate: O().startOf("month").format(K),
1103
+ endDate: O().endOf("month").format(K)
1104
+ }
1105
+ }, {
1106
+ label: o("date.predefinedRanges.lastMonth"),
1107
+ value: {
1108
+ startDate: O().subtract(1, "month").startOf("month").format(K),
1109
+ endDate: O().subtract(1, "month").endOf("month").format(K)
1110
+ }
1111
+ }]);
1112
+ function Ge(e) {
1113
+ var s;
1114
+ return ((s = Mt.find((c) => c.subject === e)) == null ? void 0 : s.label) ?? Ft[e] ?? es[e];
1115
+ }
1116
+ function Le(e) {
1117
+ var c, x;
1118
+ if (e.actorType === "posUser")
1119
+ return ps(e, o);
1120
+ if (e.actorType === "portalUser")
1121
+ return e.actorName ?? e.userId;
1122
+ if (e.actorType === "feedmeAdmin")
1123
+ return (c = r.sessionUser.value) != null && c.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
1124
+ const s = d.userIdToName[e.userId];
1125
+ return s || (d.hasLoaded ? (x = r.sessionUser.value) != null && x.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
1126
+ }
1127
+ function ht(e) {
1128
+ return e.actorType === "posUser" ? q.value ? "" : lt(e, o) : d.userIdToPhone[e.userId] || "-";
1129
+ }
1130
+ function lo(e) {
1131
+ return d.userIdToEmail[e.userId] || "-";
1132
+ }
1133
+ function yt(e) {
1134
+ return O(e).format("DD MMM YYYY, HH:mm");
1135
+ }
1136
+ function Xe(e) {
1137
+ return O(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
1138
+ }
1139
+ function bt(e) {
1140
+ return G.value[e] ?? e;
1141
+ }
1142
+ function _t(e) {
1143
+ const s = ut(o, {
1144
+ eventKey: e.eventKey,
1145
+ params: e.params,
1146
+ operationLabel: e.metadata.operationLabel ?? bt(e.action)
1147
+ });
1148
+ return e.actorType === "posUser" && !q.value ? s + gs(e, o) : s;
1149
+ }
1150
+ function xt(e) {
1151
+ return ut(o, e) || o("auditLog.operation.unlabeled");
1152
+ }
1153
+ function ro(e) {
1154
+ return Ge(e.subject) ?? e.subject;
1155
+ }
1156
+ function Qe(e) {
1157
+ return Ee.value[gt(e)];
1158
+ }
1159
+ function Lt(e) {
1160
+ return so[gt(e)] ?? "neutral";
1161
+ }
1162
+ function io(e) {
1163
+ return to.value[e] ?? e;
1164
+ }
1165
+ function uo(e) {
1166
+ return e.metadata.requestMethod ? oo.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : bt(e.action);
1167
+ }
1168
+ function St(e) {
1169
+ const s = String(e ?? "");
1170
+ return `"${(/^[=+\-@\t\r]/.test(s) ? `'${s}` : s).replace(/"/g, '""')}"`;
1171
+ }
1172
+ const Ze = [{
1173
+ key: "timestamp",
1174
+ labelKey: "auditLog.exportFields.timestamp",
1175
+ getValue: (e) => yt(e.timestamp),
1176
+ defaultSelected: !0
1177
+ }, {
1178
+ key: "userName",
1179
+ labelKey: "auditLog.exportFields.userName",
1180
+ getValue: (e) => Le(e),
1181
+ defaultSelected: !0
1182
+ }, {
1183
+ key: "userPhone",
1184
+ labelKey: "auditLog.exportFields.userPhone",
1185
+ getValue: (e) => ht(e),
1186
+ defaultSelected: !0
1187
+ }, {
1188
+ key: "subject",
1189
+ labelKey: "auditLog.exportFields.subject",
1190
+ getValue: (e) => Ge(e.subject) ?? e.subject,
1191
+ defaultSelected: !0
1192
+ }, {
1193
+ key: "action",
1194
+ labelKey: "auditLog.exportFields.action",
1195
+ getValue: (e) => e.action,
1196
+ defaultSelected: !0
1197
+ }, {
1198
+ key: "operation",
1199
+ labelKey: "auditLog.exportFields.operation",
1200
+ getValue: (e) => _t(e),
1201
+ defaultSelected: !0
1202
+ }, {
1203
+ key: "outcome",
1204
+ labelKey: "auditLog.exportFields.outcome",
1205
+ getValue: (e) => Qe(e.outcome),
1206
+ defaultSelected: !0
1207
+ }, {
1208
+ key: "operationEvents",
1209
+ labelKey: "auditLog.exportFields.operationEvents",
1210
+ getValue: (e) => _s(o, e.operations),
1211
+ defaultSelected: !0
1212
+ }, {
1213
+ key: "changes",
1214
+ labelKey: "auditLog.exportFields.changes",
1215
+ getValue: (e) => Ls(o, n, e.operations),
1216
+ defaultSelected: !1
1217
+ }, {
1218
+ key: "businessId",
1219
+ labelKey: "auditLog.exportFields.businessId",
1220
+ getValue: (e) => e.businessId,
1221
+ defaultSelected: !1
1222
+ }, {
1223
+ key: "restaurantId",
1224
+ labelKey: "auditLog.exportFields.restaurantId",
1225
+ getValue: (e) => e.restaurantId,
1226
+ defaultSelected: !1
1227
+ }, {
1228
+ key: "country",
1229
+ labelKey: "auditLog.exportFields.country",
1230
+ getValue: (e) => e.country,
1231
+ defaultSelected: !1
1232
+ }, {
1233
+ key: "resolvedFrom",
1234
+ labelKey: "auditLog.exportFields.resolvedFrom",
1235
+ getValue: (e) => {
1236
+ var s;
1237
+ return (s = e.metadata) == null ? void 0 : s.resolvedFrom;
1238
+ },
1239
+ defaultSelected: !1
1240
+ }, {
1241
+ key: "requestMethod",
1242
+ labelKey: "auditLog.exportFields.requestMethod",
1243
+ getValue: (e) => {
1244
+ var s;
1245
+ return (s = e.metadata) == null ? void 0 : s.requestMethod;
1246
+ },
1247
+ defaultSelected: !1
1248
+ }, {
1249
+ key: "requestPath",
1250
+ labelKey: "auditLog.exportFields.requestPath",
1251
+ getValue: (e) => {
1252
+ var s;
1253
+ return (s = e.metadata) == null ? void 0 : s.requestPath;
1254
+ },
1255
+ defaultSelected: !1
1256
+ }, {
1257
+ key: "traceId",
1258
+ labelKey: "auditLog.exportFields.traceId",
1259
+ getValue: (e) => e.traceId ?? "",
1260
+ defaultSelected: !1
1261
+ }];
1262
+ function co() {
1263
+ try {
1264
+ const e = localStorage.getItem(Tt);
1265
+ if (e) {
1266
+ const s = JSON.parse(e);
1267
+ if (Array.isArray(s) && s.length > 0) return new Set(s);
1268
+ }
1269
+ } catch {
1270
+ }
1271
+ return new Set(Ze.filter((e) => e.defaultSelected).map((e) => e.key));
1272
+ }
1273
+ const he = S(co());
1274
+ function fo(e) {
1275
+ const s = new Set(he.value);
1276
+ if (s.has(e)) {
1277
+ if (s.size <= 1) return;
1278
+ s.delete(e);
1279
+ } else
1280
+ s.add(e);
1281
+ he.value = s;
1282
+ try {
1283
+ localStorage.setItem(Tt, JSON.stringify([...s]));
1284
+ } catch {
1285
+ }
1286
+ }
1287
+ async function mo() {
1288
+ var e, s, c, x, L;
1289
+ if (!A.value) {
1290
+ A.value = !0;
1291
+ try {
1292
+ const {
1293
+ startDate: M,
1294
+ endDate: E
1295
+ } = oe.value, re = $e.value.subjectPrefixes, Re = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), ke = E ? de(E) : null, Ue = ke && ke < Re ? ke : Re, tt = {
1296
+ ...M ? {
1297
+ from: de(M)
1298
+ } : {},
1299
+ to: Ue,
1300
+ ...le.value.userIds.length ? {
1301
+ userIds: le.value.userIds
1302
+ } : {},
1303
+ ...le.value.feedmeAdminActors ? {
1304
+ feedmeAdminActors: !0
1305
+ } : {},
1306
+ ...(e = Q.value) != null && e.length ? {
1307
+ subjects: Q.value
1308
+ } : {},
1309
+ ...re.length ? {
1310
+ subjectPrefixes: [...re]
1311
+ } : {},
1312
+ ...pe.value.length ? {
1313
+ sources: [...pe.value]
1314
+ } : {},
1315
+ ...q.value && Z.value.length ? {
1316
+ restaurantIds: [...Z.value]
1317
+ } : {},
1318
+ ...(s = ae.value) != null && s.length ? {
1319
+ actions: ae.value
1320
+ } : {},
1321
+ ...(c = se.value) != null && c.length ? {
1322
+ outcomes: We(se.value)
1323
+ } : {},
1324
+ ...ee.value ? {
1325
+ search: ee.value
1326
+ } : {},
1327
+ ...me.value.length ? {
1328
+ searchUserIds: me.value
1329
+ } : {},
1330
+ ...ge.value.length ? {
1331
+ searchSubjects: ge.value
1332
+ } : {}
1333
+ }, we = [];
1334
+ let p = 0;
1335
+ for (; ; ) {
1336
+ const J = await Ke.read({
1337
+ ...tt,
1338
+ limit: rt,
1339
+ offset: p
1340
+ });
1341
+ if (we.push(...J), J.length < rt) break;
1342
+ p += rt;
1343
+ }
1344
+ const $ = Ze.filter((J) => he.value.has(J.key)), Ao = $.map((J) => o(J.labelKey)), Fo = we.map((J) => $.map((Po) => Po.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Mo = ot >= 0 ? "+" : "-", Do = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), Oo = String(Math.abs(ot) % 60).padStart(2, "0"), Co = `UTC${Mo}${Do}:${Oo}`, It = ((x = r.currentBusiness.value) == null ? void 0 : x.name) || "", jo = [M, E].filter(Boolean).join(" – "), To = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${jo}`], ...It ? [[`${o("auditLog.frontMatter.business")}: ${It}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${O().format("DD MMM YYYY, HH:mm")} (${Co})`], []].map((J) => J.map(St).join(",")), ...[Ao, ...Fo].map((J) => J.map(St).join(","))].join(`
1345
+ `), Vo = `audit-log_${(((L = r.currentBusiness.value) == null ? void 0 : L.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${O().format("YYYYMMDD_HHmmss")}.csv`, $o = new Blob([`\uFEFF${To}`], {
1346
+ type: "text/csv;charset=utf-8;"
1347
+ }), At = window.URL.createObjectURL($o), Ie = document.createElement("a");
1348
+ Ie.href = At, Ie.download = Vo, document.body.appendChild(Ie), Ie.click(), Ie.remove(), window.URL.revokeObjectURL(At);
1349
+ } finally {
1350
+ A.value = !1;
1351
+ }
1352
+ }
1353
+ }
1354
+ function te(e) {
1355
+ return "status" in e;
1356
+ }
1357
+ function vo(e) {
1358
+ return Ct(e) ? g(ve.FmTooltip, {
1359
+ variant: "plain",
1360
+ placement: "top"
1361
+ }, {
1362
+ default: () => g(ve.FmIcon, {
1363
+ name: "error",
1364
+ size: "sm",
1365
+ class: "cursor-help text-fm-color-typo-error"
1366
+ }, null),
1367
+ content: () => o("auditLog.operation.partialFailure")
1368
+ }) : null;
1369
+ }
1370
+ function po(e) {
1371
+ var c;
1372
+ const s = e.original;
1373
+ return e.depth === 0 && !te(s) && !!((c = s.operations) != null && c.length);
1374
+ }
1375
+ function go(e) {
1376
+ return te(e) ? void 0 : e.operations;
1377
+ }
1378
+ const Se = [{
1379
+ accessorKey: "timestamp",
1380
+ header: () => o("auditLog.columns.timestamp"),
1381
+ cell(e) {
1382
+ return yt(e.row.original.timestamp);
1383
+ }
1384
+ }, {
1385
+ accessorKey: "userId",
1386
+ header: () => o("auditLog.columns.user"),
1387
+ enableSorting: !1,
1388
+ size: 220,
1389
+ cell(e) {
1390
+ const s = e.row.original;
1391
+ return te(s) ? null : g("div", {
1392
+ class: "flex items-center gap-8"
1393
+ }, [g(ve.FmAvatar, {
1394
+ name: Le(s),
1395
+ initials: Zo(Le(s)),
1396
+ size: "sm",
1397
+ class: "shrink-0"
1398
+ }, null), g("div", {
1399
+ class: "min-w-0"
1400
+ }, [g("p", {
1401
+ class: "truncate font-semibold"
1402
+ }, [Le(s)]), g("p", {
1403
+ class: "truncate text-fm-color-typo-secondary"
1404
+ }, [ht(s)])])]);
1405
+ }
1406
+ }, {
1407
+ accessorKey: "subject",
1408
+ header: () => o("auditLog.columns.subject"),
1409
+ cell(e) {
1410
+ const s = e.row.original;
1411
+ return te(s) ? g("span", {
1412
+ class: "text-fm-color-typo-secondary"
1413
+ }, [o("auditLog.operation.rowHint")]) : Ge(s.subject) ?? s.subject;
1414
+ }
1415
+ }, {
1416
+ accessorKey: "action",
1417
+ header: () => o("auditLog.columns.action"),
1418
+ enableSorting: !1,
1419
+ size: 280,
1420
+ meta: {
1421
+ cellSpanClass: "audit-log-action-label"
1422
+ },
1423
+ cell(e) {
1424
+ var E;
1425
+ const s = e.row.original;
1426
+ if (te(s))
1427
+ return g("span", {
1428
+ class: "audit-op-marker flex flex-wrap items-baseline gap-4"
1429
+ }, [g("span", {
1430
+ class: "text-fm-color-typo-secondary"
1431
+ }, [Ae("↳")]), g("span", {
1432
+ class: "font-semibold"
1433
+ }, [xt(s)]), s.entityId ? g("span", {
1434
+ class: "text-fm-color-typo-secondary"
1435
+ }, [Ae("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? g("span", {
1436
+ class: "text-fm-color-typo-error"
1437
+ }, [Ae("· "), s.errorMessage]) : null]);
1438
+ const c = ((E = s.operations) == null ? void 0 : E.length) ?? 0, x = (re) => {
1439
+ re.stopPropagation(), e.row.getToggleExpandedHandler()();
1440
+ }, L = {
1441
+ variant: "tertiary",
1442
+ icon: e.row.getIsExpanded() ? "keyboard_arrow_up" : "keyboard_arrow_down",
1443
+ "aria-label": o("auditLog.operation.toggle"),
1444
+ class: "ml-auto shrink-0",
1445
+ onClick: x
1446
+ }, M = ve.FmButton;
1447
+ return g("span", {
1448
+ class: "flex items-center gap-8"
1449
+ }, [g("span", null, [_t(s)]), c > 0 ? g("span", {
1450
+ class: "cursor-pointer",
1451
+ onClick: x
1452
+ }, [g(ve.FmChip, {
1453
+ variant: "neutral",
1454
+ compact: !0,
1455
+ label: o("auditLog.operation.badge", {
1456
+ count: c
1457
+ })
1458
+ }, null)]) : null, e.row.getCanExpand() ? g(M, L, null) : null]);
1459
+ }
1460
+ }, {
1461
+ accessorKey: "outcome",
1462
+ header: () => o("auditLog.columns.outcome"),
1463
+ enableSorting: !1,
1464
+ cell(e) {
1465
+ const s = e.row.original;
1466
+ return te(s) ? g(ve.FmChip, {
1467
+ variant: s.status === "failed" ? "critical" : "success",
1468
+ label: s.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
1469
+ compact: !0
1470
+ }, null) : g("span", {
1471
+ class: "flex items-center gap-4"
1472
+ }, [g(ve.FmChip, {
1473
+ variant: Lt(s.outcome),
1474
+ label: Qe(s.outcome),
1475
+ compact: !0
1476
+ }, null), vo(s)]);
1477
+ }
1478
+ }], ho = [
1479
+ Se[0],
1480
+ // timestamp: Date
1481
+ Se.find((e) => e.accessorKey === "userId"),
1482
+ // User: getUserName -> posActorLabel for posUser rows
1483
+ {
1484
+ accessorKey: "restaurantId",
1485
+ header: () => o("auditLog.columns.restaurant"),
1486
+ enableSorting: !1,
1487
+ cell(e) {
1488
+ const s = e.row.original;
1489
+ return te(s) ? null : s.restaurantId && Ht.value[s.restaurantId] || s.restaurantId || "-";
1490
+ }
1491
+ },
1492
+ {
1493
+ accessorKey: "deviceId",
1494
+ header: () => o("auditLog.columns.device"),
1495
+ enableSorting: !1,
1496
+ cell(e) {
1497
+ const s = e.row.original;
1498
+ return te(s) ? null : lt(s, o);
1499
+ }
1500
+ },
1501
+ {
1502
+ accessorKey: "approverName",
1503
+ header: () => o("auditLog.columns.approver"),
1504
+ enableSorting: !1,
1505
+ cell(e) {
1506
+ const s = e.row.original;
1507
+ return te(s) ? null : jt(s, o);
1508
+ }
1509
+ },
1510
+ Se.find((e) => e.accessorKey === "action"),
1511
+ // Action Description: event line
1512
+ Se.find((e) => e.accessorKey === "outcome")
1513
+ // Status
1514
+ ], yo = I(() => q.value ? ho : Se);
1515
+ function de(e) {
1516
+ const s = O(e, qn);
1517
+ return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
1518
+ }
1519
+ async function kt() {
1520
+ var e, s, c;
1521
+ y.value = !0;
1522
+ try {
1523
+ const {
1524
+ startDate: x,
1525
+ endDate: L
1526
+ } = oe.value, M = (Te.value - 1) * De, E = $e.value.subjectPrefixes, re = await Ke.read({
1527
+ limit: De,
1528
+ offset: M,
1529
+ ...x ? {
1530
+ from: de(x)
1531
+ } : {},
1532
+ ...L ? {
1533
+ to: de(L)
1534
+ } : {},
1535
+ ...le.value.userIds.length ? {
1536
+ userIds: le.value.userIds
1537
+ } : {},
1538
+ ...le.value.feedmeAdminActors ? {
1539
+ feedmeAdminActors: !0
1540
+ } : {},
1541
+ ...(e = Q.value) != null && e.length ? {
1542
+ subjects: Q.value
1543
+ } : {},
1544
+ ...E.length ? {
1545
+ subjectPrefixes: [...E]
1546
+ } : {},
1547
+ ...pe.value.length ? {
1548
+ sources: [...pe.value]
1549
+ } : {},
1550
+ ...q.value && Z.value.length ? {
1551
+ restaurantIds: [...Z.value]
1552
+ } : {},
1553
+ ...(s = ae.value) != null && s.length ? {
1554
+ actions: ae.value
1555
+ } : {},
1556
+ ...(c = se.value) != null && c.length ? {
1557
+ outcomes: We(se.value)
1558
+ } : {},
1559
+ ...ee.value ? {
1560
+ search: ee.value
1561
+ } : {},
1562
+ ...me.value.length ? {
1563
+ searchUserIds: me.value
1564
+ } : {},
1565
+ ...ge.value.length ? {
1566
+ searchSubjects: ge.value
1567
+ } : {}
1568
+ });
1569
+ C.value = re, Bt.value = re.length === De, R.value = {};
1570
+ } finally {
1571
+ y.value = !1;
1572
+ }
1573
+ }
1574
+ const wt = I(() => {
1575
+ var e;
1576
+ return JSON.stringify({
1577
+ businessId: ((e = r.currentBusiness.value) == null ? void 0 : e._id) ?? "",
1578
+ dateRange: oe.value,
1579
+ users: [...fe.value ?? []].sort(),
1580
+ subjects: [...Q.value ?? []].sort(),
1581
+ outcomes: [...se.value ?? []].sort(),
1582
+ actions: [...ae.value ?? []].sort(),
1583
+ moduleKey: ne.value,
1584
+ restaurantIds: [...Z.value].sort(),
1585
+ search: ee.value,
1586
+ // Member/feedme-admin-actor lists resolve asynchronously (and actors refetch on
1587
+ // every date-range change), so searchUserIds can change after the key above is
1588
+ // computed — include it explicitly or a late-arriving match never refetches.
1589
+ searchUserIds: [...me.value].sort()
1590
+ });
1591
+ });
1592
+ async function bo() {
1593
+ var x, L, M;
1594
+ const {
1595
+ startDate: e,
1596
+ endDate: s
1597
+ } = oe.value, c = $e.value.subjectPrefixes;
1598
+ ze.value = await Ke.count({
1599
+ ...e ? {
1600
+ from: de(e)
1601
+ } : {},
1602
+ ...s ? {
1603
+ to: de(s)
1604
+ } : {},
1605
+ ...le.value.userIds.length ? {
1606
+ userIds: le.value.userIds
1607
+ } : {},
1608
+ ...le.value.feedmeAdminActors ? {
1609
+ feedmeAdminActors: !0
1610
+ } : {},
1611
+ ...(x = Q.value) != null && x.length ? {
1612
+ subjects: Q.value
1613
+ } : {},
1614
+ ...c.length ? {
1615
+ subjectPrefixes: [...c]
1616
+ } : {},
1617
+ ...pe.value.length ? {
1618
+ sources: [...pe.value]
1619
+ } : {},
1620
+ ...q.value && Z.value.length ? {
1621
+ restaurantIds: [...Z.value]
1622
+ } : {},
1623
+ ...(L = ae.value) != null && L.length ? {
1624
+ actions: ae.value
1625
+ } : {},
1626
+ ...(M = se.value) != null && M.length ? {
1627
+ outcomes: We(se.value)
1628
+ } : {},
1629
+ ...ee.value ? {
1630
+ search: ee.value
1631
+ } : {},
1632
+ ...me.value.length ? {
1633
+ searchUserIds: me.value
1634
+ } : {},
1635
+ ...ge.value.length ? {
1636
+ searchSubjects: ge.value
1637
+ } : {}
1638
+ });
1639
+ }
1640
+ ie(wt, async () => {
1641
+ var e;
1642
+ Te.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([bo(), kt()]);
1643
+ }, {
1644
+ immediate: !0
1645
+ }), ie(ne, () => {
1646
+ Q.value = void 0, q.value && (fe.value = void 0);
1647
+ });
1648
+ let et = !1;
1649
+ async function _o({
1650
+ pageIndex: e
1651
+ }) {
1652
+ var s;
1653
+ if ((s = r.currentBusiness.value) != null && s._id && !(e === 0 && Te.value === 1) && !et) {
1654
+ et = !0, Te.value = e + 1;
1655
+ try {
1656
+ await kt();
1657
+ } finally {
1658
+ et = !1;
1659
+ }
1660
+ }
1661
+ }
1662
+ function xo(e) {
1663
+ if (te(e)) {
1664
+ So(e);
1665
+ return;
1666
+ }
1667
+ i.value = e, V.value = !0;
1668
+ }
1669
+ function Lo() {
1670
+ V.value = !1, i.value = null;
1671
+ }
1672
+ function So(e) {
1673
+ m.value = e, w.value = !0;
1674
+ }
1675
+ function ko() {
1676
+ w.value = !1, m.value = null;
1677
+ }
1678
+ ie(r.currentBusiness, (e) => {
1679
+ e && d.readTeamMembers();
1680
+ }, {
1681
+ immediate: !0
1682
+ });
1683
+ function wo() {
1684
+ const e = fe.value;
1685
+ if (!(e != null && e.length)) return;
1686
+ const s = new Set(xe.value.map((L) => L.userId)), c = new Set(d.members.map((L) => L.doc.userId)), x = e.filter((L) => L === it ? Pe.value : d.hasLoaded ? c.has(L) || s.has(L) : !0);
1687
+ x.length !== e.length && (fe.value = x.length ? x : void 0);
1688
+ }
1689
+ async function Io() {
1690
+ var c;
1691
+ if (!((c = r.currentBusiness.value) != null && c._id)) return;
1692
+ const {
1693
+ startDate: e,
1694
+ endDate: s
1695
+ } = oe.value;
1696
+ try {
1697
+ const {
1698
+ actors: x,
1699
+ showFeedmeAdminFilter: L
1700
+ } = await Ke.getFeedmeAdminFilter({
1701
+ ...e ? {
1702
+ from: de(e)
1703
+ } : {},
1704
+ ...s ? {
1705
+ to: de(s)
1706
+ } : {}
1707
+ });
1708
+ xe.value = x, Pe.value = L;
1709
+ } catch {
1710
+ xe.value = [], Pe.value = !1;
1711
+ }
1712
+ wo();
1713
+ }
1714
+ return ie(() => {
1715
+ var e;
1716
+ return {
1717
+ businessId: (e = r.currentBusiness.value) == null ? void 0 : e._id,
1718
+ range: oe.value
1719
+ };
1720
+ }, () => Io(), {
1721
+ immediate: !0,
1722
+ deep: !0
1723
+ }), (e, s) => {
1724
+ const c = N("FmSpacer"), x = N("FmButton"), L = N("FmMenuItem"), M = N("FmMenu"), E = N("FmChip"), re = N("FmDateRangePicker"), Re = N("FmSearch"), ke = N("FmTable"), Ue = N("FmIcon"), tt = N("FmTooltip"), we = N("FmSideSheet");
1725
+ return f(), v(z, null, [g(Wo, {
1726
+ heading: u(o)("auditLog.title")
1727
+ }, {
1728
+ "append-heading": Y(() => [g(c), g(x, {
1729
+ variant: "primary",
1730
+ "prepend-icon": "upload",
1731
+ label: u(o)("auditLog.export"),
1732
+ disabled: C.value.length === 0 || A.value || u(d).isLoading || u(d).members.length === 0,
1733
+ loading: A.value,
1734
+ onClick: mo
1735
+ }, null, 8, ["label", "disabled", "loading"]), g(M, {
1736
+ "close-on-click": !1,
1737
+ "z-index": 50
1738
+ }, {
1739
+ "menu-button": Y(() => [g(x, {
1740
+ variant: "tertiary",
1741
+ icon: "settings",
1742
+ "aria-label": u(o)("auditLog.exportSettings.title"),
1743
+ disabled: A.value
1744
+ }, null, 8, ["aria-label", "disabled"])]),
1745
+ default: Y(() => [a("div", Ss, [a("p", ks, l(u(o)("auditLog.exportSettings.title")), 1), (f(), v(z, null, ce(Ze, (p) => g(L, {
1746
+ key: p.key,
1747
+ label: u(o)(p.labelKey),
1748
+ "has-checkbox": "",
1749
+ "model-value": he.value.has(p.key),
1750
+ disabled: he.value.has(p.key) && he.value.size === 1,
1751
+ onClick: ($) => fo(p.key)
1752
+ }, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
1753
+ _: 1
1754
+ })]),
1755
+ default: Y(() => [a("div", ws, [a("div", Is, [g(ns, {
1756
+ modelValue: ne.value,
1757
+ "onUpdate:modelValue": s[0] || (s[0] = (p) => ne.value = p),
1758
+ items: zt.value
1759
+ }, null, 8, ["modelValue", "items"]), a("div", As, [g(re, {
1760
+ modelValue: oe.value,
1761
+ "onUpdate:modelValue": s[1] || (s[1] = (p) => oe.value = p),
1762
+ "show-predefined-range": "",
1763
+ "show-time": "",
1764
+ "predefined-range": no.value
1765
+ }, {
1766
+ "trigger-button": Y(() => [g(E, {
1767
+ label: ao.value,
1768
+ icon: "calendar_month"
1769
+ }, null, 8, ["label"])]),
1770
+ _: 1
1771
+ }, 8, ["modelValue", "predefined-range"]), q.value ? F("", !0) : (f(), v("div", Fs, [g(Fe, {
1772
+ modelValue: fe.value,
1773
+ "onUpdate:modelValue": s[2] || (s[2] = (p) => fe.value = p),
1774
+ items: Wt.value,
1775
+ multiple: "",
1776
+ variant: "dark",
1777
+ placeholder: u(o)("auditLog.filter.user_placeholder"),
1778
+ "selected-prefix": u(o)("auditLog.filter.selected_user_prefix"),
1779
+ "chip-icon": "account_circle"
1780
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? F("", !0) : (f(), v("div", Ms, [g(Fe, {
1781
+ modelValue: Q.value,
1782
+ "onUpdate:modelValue": s[3] || (s[3] = (p) => Q.value = p),
1783
+ items: Xt.value,
1784
+ "filter-fn": Qt,
1785
+ multiple: "",
1786
+ variant: "dark",
1787
+ placeholder: u(o)("auditLog.filter.subject_placeholder"),
1788
+ "selected-prefix": u(o)("auditLog.filter.selected_subject_prefix"),
1789
+ "chip-icon": "badge"
1790
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", Ds, [g(Fe, {
1791
+ modelValue: ae.value,
1792
+ "onUpdate:modelValue": s[4] || (s[4] = (p) => ae.value = p),
1793
+ items: Zt.value,
1794
+ multiple: "",
1795
+ variant: "dark",
1796
+ placeholder: u(o)("auditLog.filter.action_placeholder"),
1797
+ "selected-prefix": u(o)("auditLog.filter.selected_action_prefix"),
1798
+ searchable: !1
1799
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Os, [g(Fe, {
1800
+ modelValue: se.value,
1801
+ "onUpdate:modelValue": s[5] || (s[5] = (p) => se.value = p),
1802
+ items: eo.value,
1803
+ multiple: "",
1804
+ variant: "dark",
1805
+ placeholder: u(o)("auditLog.filter.status_placeholder"),
1806
+ "selected-prefix": u(o)("auditLog.filter.selected_status_prefix"),
1807
+ searchable: !1,
1808
+ "chip-icon": "check_circle"
1809
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (f(), v("div", Cs, [g(Fe, {
1810
+ modelValue: Z.value,
1811
+ "onUpdate:modelValue": s[6] || (s[6] = (p) => Z.value = p),
1812
+ items: Jt.value,
1813
+ multiple: "",
1814
+ variant: "dark",
1815
+ placeholder: u(o)("auditLog.filter.restaurant_placeholder"),
1816
+ "selected-prefix": u(o)("auditLog.filter.selected_restaurant_prefix"),
1817
+ "chip-icon": "storefront"
1818
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : F("", !0), g(Re, {
1819
+ modelValue: qe.value,
1820
+ "onUpdate:modelValue": s[7] || (s[7] = (p) => qe.value = p),
1821
+ class: "ml-auto w-[280px]",
1822
+ placeholder: u(o)("auditLog.search.placeholder")
1823
+ }, null, 8, ["modelValue", "placeholder"])])]), g(qo, null, {
1824
+ default: Y(() => [a("div", js, [g(Go, {
1825
+ "is-loading": y.value,
1826
+ "is-empty": C.value.length === 0,
1827
+ title: u(o)("auditLog.noData.title"),
1828
+ subtitle: u(o)("auditLog.noData.subtitle")
1829
+ }, {
1830
+ default: Y(() => [(f(), Oe(ke, {
1831
+ key: wt.value,
1832
+ "column-defs": yo.value,
1833
+ "row-data": C.value,
1834
+ "page-size": De,
1835
+ "page-count": ft.value,
1836
+ "row-count": ze.value,
1837
+ "fetch-fn": _o,
1838
+ "hide-footer": ft.value <= 1,
1839
+ loading: y.value,
1840
+ "expanded-state": R.value,
1841
+ "get-row-can-expand": po,
1842
+ "get-sub-row": go,
1843
+ "pin-header-row": "",
1844
+ class: "audit-log-list-table cursor-pointer",
1845
+ "onUpdate:expandedState": s[8] || (s[8] = (p) => R.value = p),
1846
+ onRowClick: s[9] || (s[9] = (p) => xo(p.original))
1847
+ }, null, 8, ["column-defs", "row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
1848
+ _: 1
1849
+ }, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
1850
+ _: 1
1851
+ })])]),
1852
+ _: 1
1853
+ }, 8, ["heading"]), g(we, {
1854
+ header: u(o)("auditLog.detail.header"),
1855
+ "model-value": V.value,
1856
+ "max-width": 768,
1857
+ "dismiss-away": "",
1858
+ "onUpdate:modelValue": s[10] || (s[10] = (p) => {
1859
+ p || Lo();
1860
+ })
1861
+ }, {
1862
+ default: Y(() => [i.value ? (f(), v("div", Ts, [a("div", Vs, [a("div", $s, [a("p", Ps, l(ro(i.value)), 1), i.value.traceId ? (f(), v("p", Es, " Trace ID: " + l(i.value.traceId), 1)) : F("", !0), i.value.eventId ? (f(), v("p", Ns, " Event ID: " + l(i.value.eventId), 1)) : F("", !0)]), a("div", Rs, [g(E, {
1863
+ variant: Lt(i.value.outcome),
1864
+ label: Qe(i.value.outcome),
1865
+ compact: ""
1866
+ }, null, 8, ["variant", "label"]), u(Ct)(i.value) ? (f(), Oe(tt, {
1867
+ key: 0,
1868
+ variant: "plain",
1869
+ placement: "top"
1870
+ }, {
1871
+ content: Y(() => [Ae(l(u(o)("auditLog.operation.partialFailure")), 1)]),
1872
+ default: Y(() => [g(Ue, {
1873
+ name: "error",
1874
+ size: "sm",
1875
+ class: "cursor-help text-fm-color-typo-error"
1876
+ })]),
1877
+ _: 1
1878
+ })) : F("", !0)])]), a("div", Us, [a("div", Ks, [a("div", null, [a("p", Bs, l(u(o)("auditLog.detail.date")), 1), a("p", Ys, l(Xe(i.value.timestamp)), 1)]), a("div", null, [a("p", zs, l(u(o)("auditLog.detail.user")), 1), a("p", qs, l(Le(i.value)), 1)]), a("div", null, [a("p", Js, l(u(o)("auditLog.detail.email")), 1), a("p", Hs, l(lo(i.value)), 1)]), i.value.field ? (f(), v("div", Ws, [a("p", Gs, l(u(o)("auditLog.detail.field")), 1), a("p", Xs, l(i.value.field), 1)])) : F("", !0), a("div", null, [a("p", Qs, l(u(o)("auditLog.detail.business")), 1), a("p", Zs, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", ea, l(u(o)("auditLog.detail.restaurant")), 1), a("p", ta, l(i.value.restaurantId || "-"), 1)])])]), a("div", oa, [a("div", sa, [a("p", aa, l(u(o)("auditLog.detail.eventDetails")), 1)]), s[13] || (s[13] = a("hr", {
1879
+ class: "border-fm-color-border-default"
1880
+ }, null, -1)), a("div", na, [a("div", null, [a("p", la, l(u(o)("auditLog.detail.actionDescription")), 1), a("p", ra, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", ia, [a("div", ua, [a("p", da, l(u(o)("auditLog.detail.metadata")), 1)]), s[14] || (s[14] = a("hr", {
1881
+ class: "border-fm-color-border-default"
1882
+ }, null, -1)), a("div", ca, [a("div", null, [a("p", fa, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", ma, l(io(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (f(), v("div", va, [a("p", pa, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (f(), v("p", ga, l(i.value.metadata.permissionSetName), 1)) : F("", !0), i.value.metadata.permissionSetId ? (f(), v("p", ha, l(i.value.metadata.permissionSetId), 1)) : F("", !0)])) : F("", !0), i.value.metadata.reason ? (f(), v("div", ya, [a("p", ba, l(u(o)("auditLog.detail.reason")), 1), a("p", _a, l(i.value.metadata.reason), 1)])) : F("", !0), a("div", null, [a("p", xa, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", La, l(uo(i.value)), 1)]), a("div", null, [a("p", Sa, l(u(o)("auditLog.detail.requestPath")), 1), a("p", ka, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (f(), v(z, {
1883
+ key: 2
1884
+ }, [a("div", null, [a("p", wa, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", Ia, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", Aa, l(u(o)("auditLog.columns.device")), 1), a("p", Fa, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (f(), v("p", Ma, l(i.value.metadata.pos.machineId), 1)) : F("", !0)]), i.value.metadata.pos.appVersion ? (f(), v("div", Da, [a("p", Oa, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ca, l(i.value.metadata.pos.appVersion), 1)])) : F("", !0), a("div", null, [a("p", ja, l(u(o)("auditLog.columns.approver")), 1), a("p", Ta, l(u(jt)(i.value, u(o))), 1)]), a("div", null, [a("p", Va, l(u(o)("auditLog.pos.details.clock")), 1), a("p", $a, [Ae(l(Xe(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (f(), v("span", Pa, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : F("", !0)])]), i.value.params ? (f(), v("div", Ea, [a("p", Na, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ra, l(i.value.params), 1)])) : F("", !0)], 64)) : F("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (f(), v("div", Ua, [a("p", Ka, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Ba, [(f(!0), v(z, null, ce(i.value.metadata.trace, (p, $) => (f(), v("li", {
1885
+ key: $,
1886
+ class: "flex items-center gap-6"
1887
+ }, [a("span", Ya, l($ + 1), 1), a("span", za, l(p), 1), $ < i.value.metadata.trace.length - 1 ? (f(), v("span", qa, "→")) : F("", !0)]))), 128))])])) : F("", !0), T.value ? (f(), v("div", Ja, [a("p", Ha, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", Wa, l(T.value), 1)])) : F("", !0)])])])) : F("", !0)]),
1888
+ _: 1
1889
+ }, 8, ["header", "model-value"]), g(we, {
1890
+ header: u(o)("auditLog.operation.sheetHeader"),
1891
+ "model-value": w.value,
1892
+ "max-width": 768,
1893
+ "dismiss-away": "",
1894
+ "onUpdate:modelValue": s[12] || (s[12] = (p) => {
1895
+ p || ko();
1896
+ })
1897
+ }, {
1898
+ default: Y(() => [m.value ? (f(), v("div", Ga, [a("div", Xa, [a("div", Qa, [a("p", Za, l(xt(m.value)), 1), m.value.entityId ? (f(), v("p", en, l(m.value.entityId), 1)) : F("", !0)]), g(E, {
1899
+ variant: m.value.status === "failed" ? "critical" : "success",
1900
+ label: m.value.status === "failed" ? u(o)("auditLog.outcome.failed") : u(o)("auditLog.outcome.success"),
1901
+ compact: ""
1902
+ }, null, 8, ["variant", "label"])]), a("div", tn, [a("div", on, [a("div", null, [a("p", sn, l(u(o)("auditLog.detail.date")), 1), a("p", an, l(Xe(m.value.timestamp)), 1)]), m.value.entityId ? (f(), v("div", nn, [a("p", ln, l(u(o)("auditLog.operation.entity")), 1), a("p", rn, l(m.value.entityId), 1)])) : F("", !0), m.value.durationMs !== void 0 ? (f(), v("div", un, [a("p", dn, l(u(o)("auditLog.operation.duration")), 1), a("p", cn, l(u(o)("auditLog.operation.durationValue", {
1903
+ ms: m.value.durationMs
1904
+ })), 1)])) : F("", !0)])]), m.value.status === "failed" ? (f(), v("div", fn, [a("p", mn, l(u(o)("auditLog.operation.error")), 1), a("p", vn, l(m.value.errorMessage || "-"), 1)])) : F("", !0), a("div", pn, [a("div", gn, [a("p", hn, l(u(o)("auditLog.operation.changes")), 1)]), s[17] || (s[17] = a("hr", {
1905
+ class: "border-fm-color-border-default"
1906
+ }, null, -1)), a("div", yn, [H.value.length ? (f(), v("div", bn, [(f(!0), v(z, null, ce(H.value, (p, $) => (f(), v("div", {
1907
+ key: $,
1908
+ class: "space-y-4 py-8 first:pt-0 last:pb-0"
1909
+ }, [a("div", _n, [g(E, {
1910
+ variant: _e(p.type),
1911
+ label: Ut(p.type),
1912
+ compact: ""
1913
+ }, null, 8, ["variant", "label"]), a("span", xn, l(Kt(p)), 1)]), a("p", Ln, [p.type === "add" ? (f(), v("span", Sn, l(p.afterDisplay), 1)) : p.type === "remove" ? (f(), v("span", kn, l(p.beforeDisplay), 1)) : (f(), v(z, {
1914
+ key: 2
1915
+ }, [a("span", wn, l(p.beforeDisplay), 1), s[15] || (s[15] = a("span", {
1916
+ class: "text-fm-color-typo-secondary"
1917
+ }, " → ", -1)), a("span", In, l(p.afterDisplay), 1)], 64))])]))), 128))])) : ct.value.length ? (f(), v("div", An, [(f(!0), v(z, null, ce(ct.value, (p) => (f(), v("div", {
1918
+ key: p.groupKey,
1919
+ class: "space-y-4 py-8 first:pt-0 last:pb-0"
1920
+ }, [a("div", Fn, [g(E, {
1921
+ variant: je(p.type),
1922
+ label: dt(p.type),
1923
+ compact: ""
1924
+ }, null, 8, ["variant", "label"]), a("span", Mn, l(p.displayKey), 1)]), a("div", Dn, [(f(!0), v(z, null, ce(p.rows, ($) => (f(), v("p", {
1925
+ key: $.path,
1926
+ class: "break-all font-mono text-xs"
1927
+ }, [$.type === "added" ? (f(), v("span", On, l($.after ?? "—"), 1)) : $.type === "removed" ? (f(), v("span", Cn, l($.before ?? "—"), 1)) : (f(), v(z, {
1928
+ key: 2
1929
+ }, [a("span", jn, l($.before ?? "—"), 1), s[16] || (s[16] = a("span", {
1930
+ class: "text-fm-color-typo-secondary"
1931
+ }, " → ", -1)), a("span", Tn, l($.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (f(), v("p", Vn, l(u(o)("auditLog.operation.noChanges")), 1))])]), U.value || k.value ? (f(), v("div", $n, [a("button", {
1932
+ type: "button",
1933
+ class: "flex w-full items-center justify-between p-12 text-left",
1934
+ onClick: s[11] || (s[11] = (p) => X.value = !X.value)
1935
+ }, [a("p", Pn, l(u(o)("auditLog.operation.showData")), 1), g(Ue, {
1936
+ name: "keyboard_arrow_down",
1937
+ class: Ko(["shrink-0 transition-transform", X.value ? "rotate-180" : ""])
1938
+ }, null, 8, ["class"])]), X.value ? (f(), v(z, {
1939
+ key: 0
1940
+ }, [s[18] || (s[18] = a("hr", {
1941
+ class: "border-fm-color-border-default"
1942
+ }, null, -1)), a("div", En, [U.value ? (f(), v("div", Nn, [a("p", Rn, l(u(o)("auditLog.operation.before")), 1), a("pre", Un, l(U.value), 1)])) : F("", !0), k.value ? (f(), v("div", Kn, [a("p", Bn, l(u(o)("auditLog.operation.after")), 1), a("pre", Yn, l(k.value), 1)])) : F("", !0)])], 64)) : F("", !0)])) : F("", !0)])) : F("", !0)]),
1943
+ _: 1
1944
+ }, 8, ["header", "model-value"])], 64);
1945
+ };
1946
+ }
1947
+ }), ul = /* @__PURE__ */ Jo(Jn, [["__scopeId", "data-v-2fab18d4"]]);
1948
+ export {
1949
+ ul as default
1950
+ };