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

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 (295) hide show
  1. package/dist/{ApprovalCodeList-xOyDG5ug.js → ApprovalCodeList-RKU5B8SO.js} +14 -15
  2. package/dist/AuditLogList-DuDCMjGR.js +2026 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Cixg_icC.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-pL2zRc67.js} +10 -10
  4. package/dist/{EmployeeList-BG2KPvOB.js → EmployeeList-nrYsS5uz.js} +196 -208
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-7S2w36aY.js +90 -0
  6. package/dist/{GrantUserList-CUkuf3VV.js → GrantUserList-BSjeC4MC.js} +15 -16
  7. package/dist/{Main-Cg9SOzcz.js → Main-CpuHaXU6.js} +5 -5
  8. package/dist/{Main-BSHf8gTE.js → Main-DbdoVLCE.js} +12 -11
  9. package/dist/{Main-BcixH7R5.js → Main-DtmCBbTR.js} +1005 -999
  10. package/dist/MyPosProfile-CsTCfGNT.js +360 -0
  11. package/dist/{PermissionSetList-I3u2_qHR.js → PermissionSetList-B1c-uGZO.js} +82 -80
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Toq6qrLx.js +4208 -0
  13. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-D6Z9z_Yt.js +1831 -0
  14. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-TWTVo_9Y.js +547 -0
  16. package/dist/RoleList-CwaGNsFy.js +265 -0
  17. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-C2ekVXdR.js +544 -0
  18. package/dist/ScheduleGeneralPage-BVtXmxtp.js +811 -0
  19. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-DdsQ8v-5.js +2557 -0
  20. package/dist/SchedulePage-3qksmT2I.js +19446 -0
  21. package/dist/SchedulePositionPage-DAU20KPZ.js +282 -0
  22. package/dist/SelectFilter-BpzBwBmQ.js +263 -0
  23. package/dist/TeamMemberList-Bdpm40i3.js +2087 -0
  24. package/dist/TimesheetList-CL_eJp2h.js +437 -0
  25. package/dist/{app-CdrnR_Pw.js → app-DEZT4wdV.js} +14439 -5834
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-Bwvwehz9.js → approval-code-BZTz5OXK.js} +4 -4
  28. package/dist/{dayjs.min-BO8bcI17.js → dayjs.min-B55I-uhI.js} +12 -12
  29. package/dist/employee-C6z5i6O4.js +172 -0
  30. package/dist/{grant-user-whFOaPZI.js → grant-user-B2rYztyf.js} +2 -2
  31. package/dist/{iteration-ZpERYj3o.js → index-Bfdseotz.js} +698 -726
  32. package/dist/iteration-CcXrOMQe.js +30 -0
  33. package/dist/{lodash-7SZBZ8VQ.js → lodash-B8bqa6a9.js} +1 -1
  34. package/dist/member-grant-BIpKkuu8.js +54 -0
  35. package/dist/object-Dwyg2LgX.js +16 -0
  36. package/dist/restaurant-ejyX2jEG.js +52 -0
  37. package/dist/role-C_t3DDlG.js +98 -0
  38. package/dist/rule-Ccopk8R_.js +843 -0
  39. package/dist/src/api/audit-log/index.d.ts +6 -0
  40. package/dist/src/api/employee/index.d.ts +3 -4
  41. package/dist/src/api/my-pos-profile/index.d.ts +1 -3
  42. package/dist/src/api/restaurant/index.d.ts +2 -0
  43. package/dist/src/api/schedule/index.d.ts +68 -0
  44. package/dist/src/api/sso-provider/index.d.ts +5 -0
  45. package/dist/src/api/staff-invite/index.d.ts +1 -2
  46. package/dist/src/api/timesheet/index.d.ts +1 -1
  47. package/dist/src/components/AppForm.vue.d.ts +2 -2
  48. package/dist/src/components/CheckboxInput.vue.d.ts +2 -2
  49. package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
  50. package/dist/src/components/layout/SchedulePromoBanner.vue.d.ts +2 -0
  51. package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
  52. package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
  53. package/dist/src/composables/useMessage.d.ts +8 -2
  54. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  55. package/dist/src/composables/useStaffInviteProviders.d.ts +1 -12
  56. package/dist/src/helpers/permission-set.d.ts +1 -102
  57. package/dist/src/helpers/pos-assignment-rows.d.ts +2 -0
  58. package/dist/src/helpers/rule.d.ts +2 -2
  59. package/dist/src/helpers/staff-invite.d.ts +3 -0
  60. package/dist/src/router/shared.d.ts +3 -0
  61. package/dist/src/stores/approval-code.d.ts +1 -1
  62. package/dist/src/stores/employee.d.ts +15 -21
  63. package/dist/src/stores/grant-user.d.ts +1 -1
  64. package/dist/src/stores/permission-assignment.d.ts +2 -2
  65. package/dist/src/stores/permission-set.d.ts +2 -2
  66. package/dist/src/stores/restaurant.d.ts +63 -3
  67. package/dist/src/stores/role.d.ts +2 -2
  68. package/dist/src/stores/team.d.ts +1 -1
  69. package/dist/src/stores/timesheet.d.ts +68 -53
  70. package/dist/src/types/employee.d.ts +1 -0
  71. package/dist/src/types/my-pos-profile.d.ts +2 -3
  72. package/dist/src/types/schedule.d.ts +23 -0
  73. package/dist/src/types/sso-provider.d.ts +10 -0
  74. package/dist/src/types/timesheet.d.ts +3 -0
  75. package/dist/src/views/audit-log/constants.d.ts +9 -30
  76. package/dist/src/views/audit-log/locales/index.d.ts +528 -0
  77. package/dist/src/views/audit-log/pos-row.d.ts +27 -0
  78. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
  79. package/dist/src/views/hr/locales/index.d.ts +24 -4
  80. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  81. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
  82. package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -4
  83. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
  84. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
  85. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
  86. package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
  87. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +12 -0
  88. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
  89. package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
  90. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
  91. package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
  92. package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
  93. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
  94. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +41 -0
  95. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
  96. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDoneArt.vue.d.ts +2 -0
  97. package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +10 -0
  98. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +25 -0
  99. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +17 -0
  100. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +31 -0
  101. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +29 -0
  102. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +34 -0
  103. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +26 -0
  104. package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
  105. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +38 -0
  106. package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
  107. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
  108. package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
  109. package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
  110. package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +6 -0
  111. package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +15 -0
  112. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +33 -0
  113. package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +17 -0
  114. package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
  115. package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
  116. package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
  117. package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
  118. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +17 -0
  119. package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
  120. package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
  121. package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
  122. package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
  123. package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
  124. package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +7 -0
  125. package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
  126. package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
  127. package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
  128. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  129. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +6 -0
  130. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +9 -0
  131. package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
  132. package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +6 -0
  133. package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +6 -0
  134. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +6 -0
  135. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +6 -0
  136. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
  137. package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
  138. package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
  139. package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
  140. package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
  141. package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
  142. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +11 -0
  143. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
  144. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
  145. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
  146. package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
  147. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
  148. package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
  149. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +70 -0
  150. package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
  151. package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
  152. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
  153. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
  154. package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
  155. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +8 -0
  156. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
  157. package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
  158. package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
  159. package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
  160. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +16 -0
  161. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +50 -0
  162. package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
  163. package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
  164. package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
  165. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
  166. package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +35 -0
  167. package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +7 -0
  168. package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
  169. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +51 -0
  170. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +15 -0
  171. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +82 -0
  172. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +63 -0
  173. package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +9 -0
  174. package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +17 -0
  175. package/dist/src/views/scheduling/composables/schedule-cost.d.ts +24 -0
  176. package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
  177. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +21 -0
  178. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +23 -0
  179. package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
  180. package/dist/src/views/scheduling/composables/schedule-error.d.ts +1 -0
  181. package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
  182. package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +9 -0
  183. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
  184. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +23 -0
  185. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +29 -0
  186. package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
  187. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +9 -0
  188. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
  189. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +16 -0
  190. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +137 -0
  191. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +75 -0
  192. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
  193. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +11 -0
  194. package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
  195. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +301 -0
  196. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +615 -0
  197. package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
  198. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +28 -0
  199. package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +21 -0
  200. package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
  201. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +12 -0
  202. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +60 -0
  203. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +44 -0
  204. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +111 -0
  205. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +59 -0
  206. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +47 -0
  207. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +166 -0
  208. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +55 -0
  209. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +24 -0
  210. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
  211. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +49 -0
  212. package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
  213. package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
  214. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +50 -0
  215. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +38 -0
  216. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +32 -0
  217. package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
  218. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +18 -0
  219. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +52 -0
  220. package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
  221. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +79 -0
  222. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +60 -0
  223. package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
  224. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
  225. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
  226. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +231 -0
  227. package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
  228. package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
  229. package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
  230. package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
  231. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1543 -0
  232. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +25 -0
  233. package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
  234. package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
  235. package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
  236. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +20 -0
  237. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +33 -0
  238. package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
  239. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +21 -0
  240. package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
  241. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +55 -0
  242. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +35 -0
  243. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +127 -0
  244. package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
  245. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
  246. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +313 -0
  247. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +40 -0
  248. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +17 -0
  249. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +245 -0
  250. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +63 -0
  251. package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
  252. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +255 -0
  253. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +27 -0
  254. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
  255. package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +95 -0
  256. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
  257. package/dist/src/views/scheduling/country-rules/index.d.ts +33 -0
  258. package/dist/src/views/scheduling/data.d.ts +123 -0
  259. package/dist/src/views/scheduling/locales/index.d.ts +6988 -0
  260. package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
  261. package/dist/src/views/scheduling/schedule-state.d.ts +767 -0
  262. package/dist/src/views/scheduling/schedule-store.d.ts +140 -0
  263. package/dist/src/views/scheduling/types.d.ts +381 -0
  264. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +2 -6
  265. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
  266. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -2
  267. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
  268. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +0 -2
  269. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -2
  270. package/dist/style.css +1 -1
  271. package/dist/timesheet-CZHcebqS.js +76 -0
  272. package/dist/tsconfig.app.tsbuildinfo +1 -1
  273. package/dist/{useAppStore-CL6EEDuw.js → useAppStore-DfqsbhT2.js} +1 -1
  274. package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
  275. package/dist/{useLoading-BBjBUzGJ.js → useLoading-CQnX5WjI.js} +1 -1
  276. package/dist/useMessage-_ywT_N9X.js +17 -0
  277. package/dist/{useReportPermissions-Bg0fma6m.js → useReportPermissions-kTjftFk7.js} +13 -13
  278. package/package.json +7 -5
  279. package/dist/AuditLogList-Dd6HyFhk.js +0 -1777
  280. package/dist/FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js +0 -45
  281. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  282. package/dist/MyPosProfile-CN8Bj3aV.js +0 -301
  283. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBoRXQPn.js +0 -4243
  284. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B5QDOF0L.js +0 -1840
  285. package/dist/RoleList-ALmAwN0U.js +0 -739
  286. package/dist/SelectFilter-ATOm0hdn.js +0 -269
  287. package/dist/TeamMemberList-DZfEnOs1.js +0 -2097
  288. package/dist/TimesheetList-CECFKt7H.js +0 -402
  289. package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RIyoAmeb.js +0 -58
  290. package/dist/employee-Dg-J9goA.js +0 -205
  291. package/dist/member-grant-C46lvrh2.js +0 -55
  292. package/dist/restaurant-CKhT6kgj.js +0 -45
  293. package/dist/role-C6hFKOfU.js +0 -93
  294. package/dist/rule-BlMymDXm.js +0 -788
  295. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
@@ -0,0 +1,2557 @@
1
+ import { onMounted as Re, onBeforeUnmount as $e, ref as S, reactive as T, shallowRef as Ae, watch as Be, computed as Y, defineComponent as xe, createElementBlock as M, openBlock as C, renderSlot as Xe, useAttrs as pa, nextTick as ke, normalizeClass as he, createElementVNode as x, createBlock as ha, mergeProps as va, toDisplayString as z, Teleport as ga, createCommentVNode as G, withDirectives as Da, unref as Ee, vModelText as wa, Fragment as be, renderList as Ha, createTextVNode as Aa, withModifiers as Ea, normalizeStyle as ba } from "vue";
2
+ import { useRoute as Pa, useRouter as Sa } from "vue-router";
3
+ import { useCoreStore as Je, useI18n as ka } from "@feedmepos/mf-common";
4
+ import { u as Ca } from "./restaurant-ejyX2jEG.js";
5
+ import { g, b as p } from "./app-DEZT4wdV.js";
6
+ import { E as Ce, u as Ze } from "./employee-C6z5i6O4.js";
7
+ import { t as Fe, c as Ma } from "./rule-Ccopk8R_.js";
8
+ function io(e) {
9
+ let a = null;
10
+ function t() {
11
+ if (!a) return;
12
+ a.style.height = "";
13
+ const n = a.getBoundingClientRect().top;
14
+ a.style.height = `${Math.max(0, window.innerHeight - n)}px`;
15
+ }
16
+ Re(() => {
17
+ var n;
18
+ a = ((n = e.value) == null ? void 0 : n.closest(".sch-page")) ?? null, t(), window.addEventListener("resize", t);
19
+ }), $e(() => {
20
+ window.removeEventListener("resize", t), a && (a.style.height = "");
21
+ });
22
+ }
23
+ function Me(e) {
24
+ const [a, t] = String(e || "0:0").split(":").map(Number);
25
+ return (Number.isFinite(a) ? a : 0) * 60 + (Number.isFinite(t) ? t : 0);
26
+ }
27
+ function Na(e) {
28
+ const a = Math.max(0, Math.min(1439, Math.round(e)));
29
+ return `${String(Math.floor(a / 60)).padStart(2, "0")}:${String(a % 60).padStart(2, "0")}`;
30
+ }
31
+ function La(e, a) {
32
+ const t = Me(e);
33
+ let n = Me(a);
34
+ return n <= t && (n += 1440), [t, n];
35
+ }
36
+ function qe(e, a) {
37
+ const [t, n] = La(e, a);
38
+ return Math.max(0, n - t);
39
+ }
40
+ function Oa(e) {
41
+ const a = (Me(e) % 1440 + 1440) % 1440, t = Math.floor(a / 60), n = a % 60, o = t < 12 ? "am" : "pm", i = t % 12 || 12;
42
+ return n ? `${i}:${String(n).padStart(2, "0")}${o}` : `${i}${o}`;
43
+ }
44
+ function ro(e) {
45
+ return Oa(Na(e % 1440));
46
+ }
47
+ function ea(e) {
48
+ const a = Array.isArray(e) ? e : e == null ? void 0 : e.breaks;
49
+ return a != null && a.length ? a.reduce((t, n) => {
50
+ if (n.type === "DURATION") return t + n.minutes;
51
+ const [o, i] = n.startTime.split(":").map(Number), [u, s] = n.endTime.split(":").map(Number);
52
+ let d = u * 60 + s - (o * 60 + i);
53
+ return d < 0 && (d += 24 * 60), t + d;
54
+ }, 0) : Math.max(0, e && !Array.isArray(e) ? e.breakMins ?? 0 : 0);
55
+ }
56
+ function lo(e, a) {
57
+ var o;
58
+ const t = a ?? qe(e.start, e.end), n = (o = e.breaks) != null && o.length ? e.breaks.reduce((i, u) => i + (u.breakPayType === "UNPAID" ? ea([u]) : 0), 0) : Math.max(0, e.breakMins ?? 0);
59
+ return Math.max(0, t - Math.min(t, n));
60
+ }
61
+ function uo(e) {
62
+ const a = Math.max(0, Math.round(e ?? 0));
63
+ return a ? [{ type: "DURATION", minutes: a, breakPayType: "UNPAID" }] : [];
64
+ }
65
+ const ne = 500, Ia = 10, _e = 6, co = 1500, aa = 1e6, w = {
66
+ async completeOnboarding(e, a) {
67
+ return g(
68
+ await p(`restaurants/${e}/schedules`).post("onboarding", a)
69
+ );
70
+ },
71
+ async listEmployeeProfiles(e) {
72
+ return g(
73
+ await p("schedules").get("employees", {
74
+ params: e != null && e.length ? { ids: e.join(",") } : void 0
75
+ })
76
+ );
77
+ },
78
+ async listEmployeeConfigs(e) {
79
+ return g(
80
+ await p(`restaurants/${e}/schedules`).get("employee-configs")
81
+ );
82
+ },
83
+ async saveEmployeeConfigs(e, a) {
84
+ return g(
85
+ await p(`restaurants/${e}/schedules`).post(
86
+ "employee-configs/reorder",
87
+ a
88
+ )
89
+ );
90
+ },
91
+ async getSettings(e) {
92
+ return g(
93
+ await p(`restaurants/${e}/schedules`).get("settings")
94
+ );
95
+ },
96
+ async saveSettings(e, a) {
97
+ return g(
98
+ await p(`restaurants/${e}/schedules`).post("settings", a)
99
+ );
100
+ },
101
+ async generateAutoSchedule(e, a) {
102
+ return g(
103
+ await p(`restaurants/${e}/schedules`).post(
104
+ "auto-schedule/generate",
105
+ a
106
+ )
107
+ );
108
+ },
109
+ async getAutoScheduleCapabilities(e) {
110
+ return g(
111
+ await p(`restaurants/${e}/schedules`).get(
112
+ "auto-schedule/capabilities"
113
+ )
114
+ );
115
+ },
116
+ async applyAutoSchedule(e, a) {
117
+ return g(
118
+ await p(`restaurants/${e}/schedules`).post(
119
+ "auto-schedule/apply",
120
+ a
121
+ )
122
+ );
123
+ },
124
+ /** One outlet's whole board over `[from, to]` (inclusive, 'YYYY-MM-DD'). */
125
+ async readBoard(e, a, t) {
126
+ return g(
127
+ await p(`restaurants/${e}/schedules`).get("board", {
128
+ params: { from: a, to: t }
129
+ })
130
+ );
131
+ },
132
+ async createTimeOff(e, a) {
133
+ return g(
134
+ await p(`restaurants/${e}/schedules`).post("time-off", a)
135
+ );
136
+ },
137
+ async updateTimeOffStatus(e, a, t) {
138
+ return g(
139
+ await p(`restaurants/${e}/schedules`).post(
140
+ `time-off/${a}/status`,
141
+ t
142
+ )
143
+ );
144
+ },
145
+ async deleteTimeOff(e, a) {
146
+ await p(`restaurants/${e}/schedules`).delete(`time-off/${a}`);
147
+ },
148
+ /** Creates or updates the employee's shared business-level scheduling profile. */
149
+ async createEmployeeProfile(e, a) {
150
+ return g(await p("schedules").post("employees", a));
151
+ },
152
+ /** Edits the employee's shared business-level scheduling profile. */
153
+ async updateEmployeeProfile(e, a, t) {
154
+ return g(
155
+ await p("schedules").post("employees", { employeeId: a, ...t })
156
+ );
157
+ },
158
+ async validatePosAccess(e) {
159
+ await p("schedules").post("employees/validate-pos-access", e);
160
+ },
161
+ /** Positions are shared across the business. */
162
+ async createPosition(e) {
163
+ return g(await p("schedules").post("positions", e));
164
+ },
165
+ async updatePosition(e, a) {
166
+ return g(await p("schedules").post(`positions/${e}`, a));
167
+ },
168
+ /** Deleting one position is `deletePositions` with a single-id array — the backend's
169
+ * `DELETE positions/:id` route is gone; this is now `DELETE positions?ids=`. */
170
+ async deletePosition(e) {
171
+ await p("schedules").delete("positions", {
172
+ params: { ids: e }
173
+ });
174
+ },
175
+ /** Creates one flat demand interval. */
176
+ async createDemand(e, a) {
177
+ return g(
178
+ await p(`restaurants/${e}/schedules`).post("demands", a)
179
+ );
180
+ },
181
+ /** Deletes a batch of demands in one request — e.g. `saveDemand` replacing a whole
182
+ * day/weekday's demand rows wholesale. Deleting one demand is just this with a single-id
183
+ * array. */
184
+ async deleteDemands(e, a) {
185
+ return g(
186
+ await p(`restaurants/${e}/schedules`).delete("demands", {
187
+ params: { ids: a.join(",") }
188
+ })
189
+ );
190
+ },
191
+ /** Atomically replaces one date/weekday's flattened demand rows. */
192
+ async replaceDemands(e, a) {
193
+ return g(
194
+ await p(`restaurants/${e}/schedules`).post(
195
+ "demands/replace",
196
+ a
197
+ )
198
+ );
199
+ },
200
+ /** Atomically replaces several date/weekday demand generations. */
201
+ async bulkReplaceDemands(e, a) {
202
+ return g(
203
+ await p(`restaurants/${e}/schedules`).post(
204
+ "demands/bulk-replace",
205
+ a
206
+ )
207
+ );
208
+ },
209
+ /** Replaces one date's note/holiday-mark. All three fields back to empty/false clears it. */
210
+ async saveScheduleDay(e, a, t) {
211
+ return g(
212
+ await p(`restaurants/${e}/schedules`).post(
213
+ `days/${a}`,
214
+ t
215
+ )
216
+ );
217
+ },
218
+ /** A one-off shift assignment. */
219
+ async createAssignment(e, a) {
220
+ return g(
221
+ await p(`restaurants/${e}/schedules`).post("assignments", a)
222
+ );
223
+ },
224
+ async updateAssignment(e, a, t) {
225
+ return g(
226
+ await p(`restaurants/${e}/schedules`).patch(
227
+ `assignments/${a}`,
228
+ t
229
+ )
230
+ );
231
+ },
232
+ /** Atomically applies assignment updates, creates, and deletes used by moves and swaps. */
233
+ async bulkSaveAssignments(e, a) {
234
+ return g(
235
+ await p(`restaurants/${e}/schedules`).post(
236
+ "assignments/bulk",
237
+ a
238
+ )
239
+ );
240
+ },
241
+ /** Replaces demand and/or assignments in one backend transaction. */
242
+ async copySchedule(e, a) {
243
+ return g(
244
+ await p(`restaurants/${e}/schedules`).post("copy", a)
245
+ );
246
+ },
247
+ /** Clears demand and/or assignments in one backend transaction. */
248
+ async clearSchedule(e, a) {
249
+ return g(
250
+ await p(`restaurants/${e}/schedules`).post("clear", a)
251
+ );
252
+ },
253
+ /** Deletes a batch of assignments in one request — e.g. a shift split into several segments
254
+ * getting replaced wholesale. Deleting one assignment is just this with a single-id
255
+ * array. */
256
+ async deleteAssignments(e, a) {
257
+ return g(
258
+ await p(`restaurants/${e}/schedules`).delete("assignments", {
259
+ params: { ids: a.join(",") }
260
+ })
261
+ );
262
+ },
263
+ /** Removes all assignments for an employee from the inclusive removal date onward. */
264
+ async deleteEmployeeFutureAssignments(e, a, t) {
265
+ return g(
266
+ await p(`restaurants/${e}/schedules`).delete(
267
+ "assignments/employee-future",
268
+ { params: { employeeId: a, from: t } }
269
+ )
270
+ );
271
+ },
272
+ /** Flips a batch of assignments to one status in a single request — e.g. Publish sending
273
+ * every DRAFT shift on the board to PUBLISHED at once. */
274
+ async bulkUpdateAssignmentStatus(e, a) {
275
+ return g(
276
+ await p(`restaurants/${e}/schedules`).patch(
277
+ "assignments/bulk-status",
278
+ a
279
+ )
280
+ );
281
+ }
282
+ }, ta = {
283
+ payload: Ae(null),
284
+ loading: S(!1),
285
+ rosterLoading: S(!1),
286
+ loadError: S(null),
287
+ scheduleSetupCompleted: S(!1),
288
+ dataVersion: S(0),
289
+ outletId: S(""),
290
+ restaurantEmployees: S([]),
291
+ employeeConfigs: S([]),
292
+ employeeOutletIds: Ae({}),
293
+ businessEmployees: Ae([]),
294
+ positions: T([]),
295
+ positionRecords: T([]),
296
+ rolePositions: T({}),
297
+ outlet: T({ name: "" }),
298
+ locationOptions: T([]),
299
+ locationLabelById: T({}),
300
+ departmentOptions: T([]),
301
+ compensationGroupOptions: T([]),
302
+ compensationGroupMeta: T({}),
303
+ existingStaff: T([]),
304
+ shiftTemplates: T([]),
305
+ rules: T({
306
+ coverage: {},
307
+ openFrom: "00:00",
308
+ openTo: "24:00",
309
+ dayHours: Array.from({ length: 7 }, () => []),
310
+ payRate: {
311
+ NORMAL: { overtime: 1.5 },
312
+ REST_DAY: { regular: 1, overtime: 2 },
313
+ PUBLIC_HOLIDAY: { regular: 2, overtime: 3 }
314
+ },
315
+ salesForecast: 0,
316
+ closedWeekdays: [],
317
+ labourTarget: 0,
318
+ budgetFromSales: !1,
319
+ budget: 0,
320
+ otCapHours: null,
321
+ workingHours: {
322
+ minHoursPerDay: null,
323
+ maxHoursPerDay: 8,
324
+ maxHoursPerWeek: 45
325
+ },
326
+ otBudget: 0,
327
+ notify: {
328
+ waConnected: !1,
329
+ waNumber: "",
330
+ waDisplayName: "",
331
+ defaults: { wa: !1, push: !1, email: !1 }
332
+ }
333
+ })
334
+ }, {
335
+ payload: r,
336
+ loading: Ue,
337
+ rosterLoading: We,
338
+ loadError: ve,
339
+ scheduleSetupCompleted: ge,
340
+ dataVersion: J,
341
+ outletId: m,
342
+ restaurantEmployees: le,
343
+ employeeConfigs: V,
344
+ employeeOutletIds: na,
345
+ businessEmployees: Pe,
346
+ positions: Ta,
347
+ positionRecords: W,
348
+ rolePositions: mo,
349
+ outlet: Ra,
350
+ locationOptions: Ke,
351
+ locationLabelById: se,
352
+ compensationGroupMeta: yo,
353
+ existingStaff: fo,
354
+ shiftTemplates: po,
355
+ rules: N
356
+ } = ta;
357
+ function $a() {
358
+ const e = ta.rules;
359
+ Object.keys(e.coverage).forEach((a) => delete e.coverage[a]), e.openFrom = "00:00", e.openTo = "24:00", e.dayHours.splice(0, e.dayHours.length, ...Array.from({ length: 7 }, () => [])), Object.assign(e.payRate.NORMAL, { overtime: 1.5 }), Object.assign(e.payRate.REST_DAY, { regular: 1, overtime: 2 }), Object.assign(e.payRate.PUBLIC_HOLIDAY, { regular: 2, overtime: 3 }), e.salesForecast = 0, e.closedWeekdays.splice(0, e.closedWeekdays.length), e.labourTarget = 0, e.budgetFromSales = !1, e.budget = 0, e.otCapHours = null, e.workingHours = {
360
+ minHoursPerDay: null,
361
+ maxHoursPerDay: 8,
362
+ maxHoursPerWeek: 45
363
+ }, e.otBudget = 0, Object.assign(e.notify, {
364
+ waConnected: !1,
365
+ waNumber: "",
366
+ waDisplayName: "",
367
+ defaults: { wa: !1, push: !1, email: !1 }
368
+ });
369
+ }
370
+ const Ne = 7;
371
+ function Ba(e) {
372
+ const a = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
373
+ return `${a}-${t}-${n}`;
374
+ }
375
+ function ie(e, a) {
376
+ const t = new Date(e);
377
+ return t.setDate(t.getDate() + a), t;
378
+ }
379
+ function Le(e) {
380
+ const a = new Date(e);
381
+ return a.setHours(0, 0, 0, 0), a.setDate(a.getDate() - (a.getDay() + 6) % 7), a;
382
+ }
383
+ function ho(e, a = /* @__PURE__ */ new Date()) {
384
+ const t = ie(Le(a), e * Ne);
385
+ return Array.from({ length: Ne }, (n, o) => ie(t, o));
386
+ }
387
+ function vo(e, a) {
388
+ const t = (i) => Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()), n = t(Le(e)), o = t(Le(a));
389
+ return Math.trunc((o - n) / (Ne * 24 * 60 * 60 * 1e3));
390
+ }
391
+ const oa = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
392
+ function go(e) {
393
+ return `scheduling.days.short.${oa[(e % 7 + 7) % 7]}`;
394
+ }
395
+ function Do(e) {
396
+ return `scheduling.days.long.${oa[(e % 7 + 7) % 7]}`;
397
+ }
398
+ function wo(e, a = "en-US") {
399
+ return !e || e.startsWith("en") ? a : e.startsWith("th") ? "th-TH-u-ca-gregory" : e;
400
+ }
401
+ const j = Ba, xa = {
402
+ noOutlet: "No outlet selected",
403
+ employeeNotFound: "Could not find this employee",
404
+ keepOneLocation: "An employee must keep at least 1 location, otherwise they are deleted. To delete them, use the Employee page.",
405
+ loadFailed: "Could not load the schedule"
406
+ };
407
+ let Oe = null;
408
+ function Ho(e) {
409
+ Oe = e;
410
+ }
411
+ function A(e) {
412
+ return Oe ? Oe(`scheduling.store.${e}`) : xa[e];
413
+ }
414
+ let Z = null, q = null, Q = null, oe = 0, De = null;
415
+ function ze(e) {
416
+ return e === m.value ? !1 : ($a(), m.value = e, r.value = null, Z = null, q = null, ve.value = null, De = null, ge.value = !1, le.value = [], V.value = [], Q = null, oe += 1, J.value += 1, !0);
417
+ }
418
+ async function Ie(e) {
419
+ if (!(!e || De === e)) {
420
+ We.value = !0;
421
+ try {
422
+ await Ya(e);
423
+ } finally {
424
+ We.value = !1;
425
+ }
426
+ }
427
+ }
428
+ async function Ya(e) {
429
+ const a = await Ce.readEmployeesPage({
430
+ limit: ne,
431
+ offset: 0,
432
+ restaurantIds: [e]
433
+ });
434
+ e === m.value && (le.value = a.items, V.value = await w.listEmployeeConfigs(e), De = e, J.value += 1, Ka().then((t) => {
435
+ e === m.value && (na.value = t, J.value += 1);
436
+ }));
437
+ }
438
+ async function Fa(e) {
439
+ const a = m.value;
440
+ if (!a || !e.length) return;
441
+ const t = await w.saveEmployeeConfigs(a, { configs: e });
442
+ V.value = t, J.value += 1;
443
+ }
444
+ async function Ao(e) {
445
+ const a = m.value;
446
+ if (!a) throw new Error(A("noOutlet"));
447
+ const t = await w.saveSettings(a, e);
448
+ return m.value === a && r.value && (r.value = { ...r.value, settings: t }), t;
449
+ }
450
+ function sa() {
451
+ !ge.value && r.value && r.value.demands.length > 0 && r.value.assignments.length > 0 && (ge.value = !0);
452
+ }
453
+ async function _a(e, a) {
454
+ const t = V.value.find((o) => o.employeeId === e), n = (t == null ? void 0 : t.displayOrder) ?? (a && V.value.some((o) => o.displayOrder !== null) ? Math.max(
455
+ 0,
456
+ ...V.value.filter(
457
+ (o) => o.displayOrder !== null
458
+ ).map((o) => o.displayOrder)
459
+ ) + 100 : null);
460
+ await Fa([{ employeeId: e, enabled: a, displayOrder: n }]);
461
+ }
462
+ async function Eo(e, a = j(/* @__PURE__ */ new Date())) {
463
+ const t = m.value;
464
+ if (!t) throw new Error(A("noOutlet"));
465
+ await w.deleteEmployeeFutureAssignments(t, e, a), r.value && (r.value = {
466
+ ...r.value,
467
+ assignments: r.value.assignments.filter(
468
+ (n) => n.employeeId !== e || n.date < a
469
+ )
470
+ });
471
+ }
472
+ async function Te() {
473
+ const e = m.value;
474
+ e && (De = null, await Ie(e));
475
+ }
476
+ async function Ua(e, a) {
477
+ const t = Ze(), n = (await X(!0)).find((s) => s._id === e);
478
+ if (!n) throw new Error(A("employeeNotFound"));
479
+ const o = n.restaurantRole.map((s) => ({
480
+ restaurantId: s.restaurantId,
481
+ roleId: s.roleId
482
+ })), i = a(o);
483
+ if (!i.length)
484
+ throw new Error(A("keepOneLocation"));
485
+ (n.isMasterUser ? "master" : "user") === "master" ? await t.updateMasterEmployee(e, {
486
+ user: { name: n.name, passcode: n.passcode, code: n.code ?? "" },
487
+ roles: i,
488
+ previousRoles: o
489
+ }) : await t.updateEmployee(e, {
490
+ user: { name: n.name, passcode: n.passcode },
491
+ roles: i,
492
+ previousRoles: o
493
+ }), await X(!0);
494
+ }
495
+ async function bo(e, a, t = "", n = !0) {
496
+ const o = [...new Set(a.filter(Boolean))];
497
+ o.length && (await Ua(e, (i) => [
498
+ ...i.filter((u) => !o.includes(u.restaurantId)),
499
+ ...o.map((u) => ({ restaurantId: u, roleId: t }))
500
+ ]), n && m.value && o.includes(m.value) && await _a(e, !0), await Te());
501
+ }
502
+ async function Po(e, a, t) {
503
+ const n = Ze(), o = (t == null ? void 0 : t._id) === e ? t : (await X(!0)).find((h) => h._id === e);
504
+ if (!o) throw new Error(A("employeeNotFound"));
505
+ const i = (h) => h.slice().sort((H, $) => H.restaurantId.localeCompare($.restaurantId)).map((H) => `${H.restaurantId}:${H.roleId}`).join("|"), u = i(o.restaurantRole) !== i(a.roles), s = o.name !== a.name || o.passcode !== a.passcode || o.isMasterUser !== a.masterUser || a.masterUser && (o.code ?? "") !== a.masterCode;
506
+ if (!u && !s) return;
507
+ const d = o.restaurantRole.map((h) => ({
508
+ restaurantId: h.restaurantId,
509
+ roleId: h.roleId
510
+ })), D = o.isMasterUser ? (await Fe.readTeamMembers()).find((h) => h.doc.posUserId === e) : void 0;
511
+ if (D) {
512
+ const h = Ma(), H = h.getPermissionAssignmentByUserId(D.id) ?? await h.readPermissionAssignmentByUserId(D.id), $ = a.masterUser ? {
513
+ code: a.masterCode,
514
+ name: a.name,
515
+ passcode: a.passcode,
516
+ roles: a.roles
517
+ } : null;
518
+ await Fe.updateTeamMember(D.id, {
519
+ permissions: D.permissions,
520
+ customPermissions: (H == null ? void 0 : H.customPermissions) ?? D.permissions,
521
+ permissionSetIds: (H == null ? void 0 : H.permissionSetIds) ?? D.doc.permissionSetIds ?? [],
522
+ posUser: $
523
+ }), await X(!0), await Te();
524
+ return;
525
+ }
526
+ if (a.masterUser) {
527
+ const h = {
528
+ user: { name: a.name, passcode: a.passcode, code: a.masterCode },
529
+ roles: a.roles,
530
+ previousRoles: d
531
+ };
532
+ o.isMasterUser ? await n.updateMasterEmployee(e, h) : await n.migrateToMasterUser(e, h);
533
+ } else
534
+ o.isMasterUser ? await n.updateMasterEmployee(e, {
535
+ user: { name: o.name, passcode: o.passcode, code: o.code ?? "" },
536
+ roles: [],
537
+ previousRoles: d
538
+ }) : await n.updateEmployee(e, {
539
+ user: { name: a.name, passcode: a.passcode },
540
+ roles: a.roles,
541
+ previousRoles: d
542
+ });
543
+ await X(!0), await Te();
544
+ }
545
+ let te = null;
546
+ async function Wa() {
547
+ const e = await Ce.readEmployeesPage({
548
+ limit: ne,
549
+ offset: 0,
550
+ includeEmptyPasscode: !0
551
+ }), a = Math.min(Ia, Math.ceil(e.total / ne)), t = await Promise.all(
552
+ Array.from(
553
+ { length: Math.max(0, a - 1) },
554
+ (n, o) => Ce.readEmployeesPage({
555
+ limit: ne,
556
+ offset: (o + 1) * ne,
557
+ includeEmptyPasscode: !0
558
+ })
559
+ )
560
+ );
561
+ return [...e.items, ...t.flatMap((n) => n.items)];
562
+ }
563
+ function X(e = !1) {
564
+ if (!e) {
565
+ if (te) return te;
566
+ if (Pe.value.length) return Promise.resolve(Pe.value);
567
+ }
568
+ const a = Wa().then((t) => (Pe.value = t, t)).finally(() => {
569
+ te === a && (te = null);
570
+ });
571
+ return te = a, a;
572
+ }
573
+ async function Ka() {
574
+ const e = {};
575
+ try {
576
+ (await X()).forEach((a) => {
577
+ e[a._id] = [...new Set(a.restaurantRole.map((t) => t.restaurantId))];
578
+ });
579
+ } catch {
580
+ return e;
581
+ }
582
+ return e;
583
+ }
584
+ function Ve(e, a) {
585
+ return Z !== null && q !== null && Z <= e && q >= a;
586
+ }
587
+ async function za(e) {
588
+ const a = j(e), t = j(ie(e, 6));
589
+ Ve(a, t) || Q && (await Q, Ve(a, t)) || await ia(
590
+ ie(e, -7 * _e),
591
+ ie(e, 7 * _e)
592
+ );
593
+ }
594
+ async function So() {
595
+ !Z || !q || await ia(/* @__PURE__ */ new Date(`${Z}T00:00:00`), /* @__PURE__ */ new Date(`${q}T00:00:00`));
596
+ }
597
+ async function ko(e) {
598
+ if (!m.value) throw new Error(A("noOutlet"));
599
+ const a = await w.createEmployeeProfile(m.value, e);
600
+ r.value && (r.value.employees.push(a), J.value += 1);
601
+ }
602
+ async function Co(e) {
603
+ await w.validatePosAccess(e);
604
+ }
605
+ async function Mo(e, a) {
606
+ if (!m.value) throw new Error(A("noOutlet"));
607
+ const t = await w.updateEmployeeProfile(m.value, e, a);
608
+ if (r.value) {
609
+ const n = r.value.employees.findIndex((o) => o.employeeId === e);
610
+ n > -1 && (r.value = {
611
+ ...r.value,
612
+ employees: r.value.employees.map((o, i) => i === n ? t : o)
613
+ });
614
+ }
615
+ }
616
+ async function No(e) {
617
+ const a = await w.createPosition(e);
618
+ r.value && (r.value = { ...r.value, positions: [...r.value.positions, a] });
619
+ }
620
+ async function Lo(e, a) {
621
+ const t = await w.updatePosition(e, a);
622
+ if (r.value) {
623
+ const n = r.value.positions.find((i) => i.id === e), o = (i) => i.positionId === e || !i.positionId && i.positionName === (n == null ? void 0 : n.name);
624
+ r.value = {
625
+ ...r.value,
626
+ positions: r.value.positions.map((i) => i.id === e ? t : i),
627
+ employees: r.value.employees.map((i) => ({
628
+ ...i,
629
+ primaryPosition: i.primaryPosition && o(i.primaryPosition) ? { ...i.primaryPosition, positionName: t.name } : i.primaryPosition,
630
+ secondaryPositions: i.secondaryPositions.map(
631
+ (u) => o(u) ? { ...u, positionName: t.name } : u
632
+ )
633
+ }))
634
+ };
635
+ }
636
+ }
637
+ async function Oo(e) {
638
+ await w.deletePosition(e), r.value && (r.value = {
639
+ ...r.value,
640
+ positions: r.value.positions.filter((a) => a.id !== e)
641
+ });
642
+ }
643
+ async function Io(e, a) {
644
+ var o;
645
+ if (!m.value) throw new Error(A("noOutlet"));
646
+ const t = (o = r.value) == null ? void 0 : o.days.find((i) => i.date === e), n = await w.saveScheduleDay(m.value, e, {
647
+ ...a,
648
+ expectedUpdatedAt: a.expectedUpdatedAt ?? (t == null ? void 0 : t.updatedAt)
649
+ });
650
+ if (r.value) {
651
+ const i = r.value.days.filter((u) => u.date !== e);
652
+ n && i.push(n), r.value = { ...r.value, days: i };
653
+ }
654
+ }
655
+ function Va(e) {
656
+ const a = e.periods.flatMap((t) => {
657
+ const n = (t.roles ?? []).filter((u) => u.positionName && u.headcount > 0), o = n.reduce((u, s) => u + s.headcount, 0), i = {
658
+ startTime: t.startTime,
659
+ endTime: t.endTime
660
+ };
661
+ return [
662
+ ...n.map((u) => ({
663
+ ...i,
664
+ headcount: u.headcount,
665
+ position: { positionId: u.positionId, positionName: u.positionName }
666
+ })),
667
+ ...t.headcount > o ? [{ ...i, headcount: t.headcount - o }] : []
668
+ ];
669
+ });
670
+ return {
671
+ date: e.date,
672
+ demands: a
673
+ };
674
+ }
675
+ async function To(e) {
676
+ if (!m.value) throw new Error(A("noOutlet"));
677
+ if (!e.length) return;
678
+ const a = e.map(Va), t = e.length === 1 ? await w.replaceDemands(m.value, a[0]) : await w.bulkReplaceDemands(m.value, { replacements: a });
679
+ if (r.value) {
680
+ const n = new Set(e.map((i) => i.date)), o = r.value.demands.filter((i) => i.date === null || !n.has(i.date));
681
+ r.value = { ...r.value, demands: [...o, ...t] };
682
+ }
683
+ sa();
684
+ }
685
+ async function Ro(e) {
686
+ if (!m.value) throw new Error(A("noOutlet"));
687
+ return w.generateAutoSchedule(m.value, e);
688
+ }
689
+ async function $o() {
690
+ if (!m.value) throw new Error(A("noOutlet"));
691
+ return w.getAutoScheduleCapabilities(m.value);
692
+ }
693
+ async function Bo(e) {
694
+ if (!m.value) throw new Error(A("noOutlet"));
695
+ return w.applyAutoSchedule(m.value, e);
696
+ }
697
+ async function xo(e) {
698
+ if (!m.value) throw new Error(A("noOutlet"));
699
+ const a = await w.bulkSaveAssignments(m.value, e);
700
+ if (r.value) {
701
+ const t = new Set(e.deleteIds), n = new Map(
702
+ r.value.assignments.filter((o) => !t.has(o.id)).map((o) => [o.id, o])
703
+ );
704
+ a.updated.forEach((o) => n.set(o.id, o)), a.created.forEach((o) => n.set(o.id, o)), r.value = { ...r.value, assignments: [...n.values()] };
705
+ }
706
+ return sa(), a;
707
+ }
708
+ async function Yo(e) {
709
+ if (!m.value) throw new Error(A("noOutlet"));
710
+ return w.copySchedule(m.value, e);
711
+ }
712
+ async function Fo(e) {
713
+ var t;
714
+ if (!m.value) throw new Error(A("noOutlet"));
715
+ const a = await w.clearSchedule(m.value, e);
716
+ if (r.value) {
717
+ const n = new Set(
718
+ (((t = e.demand) == null ? void 0 : t.replacements) ?? []).map((u) => u.date)
719
+ ), o = new Set(a.deletedAssignmentIds), i = a.demand;
720
+ r.value = {
721
+ ...r.value,
722
+ demands: [
723
+ ...r.value.demands.filter((u) => u.date === null || !n.has(u.date)),
724
+ ...i
725
+ ],
726
+ assignments: r.value.assignments.filter((u) => !o.has(u.id))
727
+ };
728
+ }
729
+ return a;
730
+ }
731
+ async function _o(e) {
732
+ if (!m.value) throw new Error(A("noOutlet"));
733
+ if (e.length && (await w.deleteAssignments(m.value, e), r.value)) {
734
+ const a = new Set(e);
735
+ r.value = {
736
+ ...r.value,
737
+ assignments: r.value.assignments.filter((t) => !a.has(t.id))
738
+ };
739
+ }
740
+ }
741
+ async function Uo(e) {
742
+ if (!m.value) throw new Error(A("noOutlet"));
743
+ const a = await w.createTimeOff(m.value, e);
744
+ return r.value && (r.value = { ...r.value, timeOff: [...r.value.timeOff, a] }), a;
745
+ }
746
+ async function Wo(e, a) {
747
+ if (!m.value) throw new Error(A("noOutlet"));
748
+ const t = await w.updateTimeOffStatus(m.value, e, a);
749
+ return t && r.value && (r.value = {
750
+ ...r.value,
751
+ timeOff: r.value.timeOff.map((n) => n.id === e ? t : n)
752
+ }), t;
753
+ }
754
+ async function Ko(e) {
755
+ if (!m.value) throw new Error(A("noOutlet"));
756
+ await w.deleteTimeOff(m.value, e), r.value && (r.value = {
757
+ ...r.value,
758
+ timeOff: r.value.timeOff.filter((a) => a.id !== e)
759
+ });
760
+ }
761
+ async function zo(e) {
762
+ if (!m.value) throw new Error(A("noOutlet"));
763
+ const a = await w.bulkUpdateAssignmentStatus(m.value, e);
764
+ if (r.value && a.length) {
765
+ const t = new Map(a.map((n) => [n.id, n]));
766
+ r.value = {
767
+ ...r.value,
768
+ assignments: r.value.assignments.map(
769
+ (n) => t.get(n.id) ?? n
770
+ )
771
+ };
772
+ }
773
+ return a;
774
+ }
775
+ async function ia(e, a) {
776
+ const t = m.value;
777
+ if (!t) {
778
+ ve.value = A("noOutlet");
779
+ return;
780
+ }
781
+ const n = j(e), o = j(a), i = ++oe;
782
+ Ue.value = !0, ve.value = null;
783
+ const u = (async () => {
784
+ try {
785
+ const s = await w.readBoard(t, n, o);
786
+ if (m.value !== t || i !== oe) return;
787
+ r.value = s, ge.value = s.settings.setupCompleted, Z = n, q = o, J.value += 1;
788
+ } catch (s) {
789
+ if (m.value !== t || i !== oe) return;
790
+ ve.value = s instanceof Error ? s.message : A("loadFailed");
791
+ } finally {
792
+ m.value === t && i === oe && (Ue.value = !1);
793
+ }
794
+ })();
795
+ Q = u;
796
+ try {
797
+ await u;
798
+ } finally {
799
+ Q === u && (Q = null);
800
+ }
801
+ }
802
+ const ja = "AE", Ga = "Asia/Dubai", Qa = {
803
+ NORMAL: {
804
+ overtime: 1.25
805
+ },
806
+ REST_DAY: {
807
+ regular: 1,
808
+ overtime: 2
809
+ },
810
+ PUBLIC_HOLIDAY: {
811
+ regular: 2.5,
812
+ overtime: 1.5
813
+ }
814
+ }, Xa = {
815
+ maxHoursPerMonth: null
816
+ }, Ja = {
817
+ fullTime: {
818
+ minHoursPerDay: null,
819
+ maxHoursPerDay: 8,
820
+ maxHoursPerWeek: 48
821
+ },
822
+ partTime: {
823
+ maxHoursPerWeek: 32
824
+ }
825
+ }, Za = [
826
+ {
827
+ month: 1,
828
+ day: 1,
829
+ name: "New Year's Day"
830
+ },
831
+ {
832
+ month: 12,
833
+ day: 2,
834
+ name: "UAE National Day"
835
+ },
836
+ {
837
+ month: 12,
838
+ day: 3,
839
+ name: "UAE National Day Holiday"
840
+ }
841
+ ], qa = {
842
+ 2026: {
843
+ "2026-01-01": "Gregorian New Year",
844
+ "2026-03-20": "Eid Al-Fitr Holiday",
845
+ "2026-03-21": "Eid Al-Fitr Holiday",
846
+ "2026-03-22": "Eid Al-Fitr Holiday",
847
+ "2026-05-26": "Arafat Day",
848
+ "2026-05-27": "Eid Al-Adha Holiday",
849
+ "2026-05-28": "Eid Al-Adha Holiday",
850
+ "2026-05-29": "Eid Al-Adha Holiday",
851
+ "2026-06-17": "Islamic New Year",
852
+ "2026-08-26": "Prophet Muhammad's Birthday",
853
+ "2026-12-02": "UAE National Day",
854
+ "2026-12-03": "UAE National Day Holiday"
855
+ },
856
+ 2027: {
857
+ "2027-01-01": "Gregorian New Year",
858
+ "2027-03-08": "Eid Al-Fitr Holiday",
859
+ "2027-03-09": "Eid Al-Fitr Holiday",
860
+ "2027-03-10": "Eid Al-Fitr Holiday",
861
+ "2027-03-11": "Eid Al-Fitr Holiday",
862
+ "2027-05-15": "Arafat Day",
863
+ "2027-05-16": "Eid Al-Adha Holiday",
864
+ "2027-05-17": "Eid Al-Adha Holiday",
865
+ "2027-05-18": "Eid Al-Adha Holiday",
866
+ "2027-06-06": "Islamic New Year",
867
+ "2027-08-14": "Prophet Muhammad's Birthday",
868
+ "2027-12-02": "UAE National Day",
869
+ "2027-12-03": "UAE National Day Holiday"
870
+ }
871
+ }, et = {
872
+ countryCode: ja,
873
+ timezone: Ga,
874
+ payRate: Qa,
875
+ overtime: Xa,
876
+ workingHours: Ja,
877
+ recurringPublicHolidays: Za,
878
+ publicHolidays: qa
879
+ }, at = "BN", tt = "Asia/Brunei", nt = {
880
+ NORMAL: {
881
+ overtime: 1.5
882
+ },
883
+ REST_DAY: {
884
+ regular: 1,
885
+ overtime: 2
886
+ },
887
+ PUBLIC_HOLIDAY: {
888
+ regular: 2,
889
+ overtime: 3
890
+ }
891
+ }, ot = {
892
+ maxHoursPerMonth: 72
893
+ }, st = {
894
+ fullTime: {
895
+ minHoursPerDay: null,
896
+ maxHoursPerDay: 8,
897
+ maxHoursPerWeek: 44
898
+ },
899
+ partTime: {
900
+ maxHoursPerWeek: 30
901
+ }
902
+ }, it = [
903
+ {
904
+ month: 1,
905
+ day: 1,
906
+ name: "New Year's Day"
907
+ },
908
+ {
909
+ month: 2,
910
+ day: 23,
911
+ name: "National Day"
912
+ },
913
+ {
914
+ month: 5,
915
+ day: 1,
916
+ name: "International Labour Day"
917
+ },
918
+ {
919
+ month: 7,
920
+ day: 15,
921
+ name: "Sultan's Birthday"
922
+ },
923
+ {
924
+ month: 12,
925
+ day: 25,
926
+ name: "Christmas Day"
927
+ }
928
+ ], rt = {
929
+ 2026: {
930
+ "2026-01-01": "New Year's Day",
931
+ "2026-02-17": "Chinese New Year",
932
+ "2026-02-23": "National Day",
933
+ "2026-03-07": "Nuzul Al-Quran",
934
+ "2026-03-20": "Hari Raya Aidilfitri",
935
+ "2026-03-21": "Hari Raya Aidilfitri Holiday",
936
+ "2026-03-22": "Hari Raya Aidilfitri Holiday",
937
+ "2026-05-01": "International Labour Day",
938
+ "2026-05-27": "Hari Raya Aidiladha",
939
+ "2026-06-17": "Islamic New Year",
940
+ "2026-07-15": "Sultan's Birthday",
941
+ "2026-08-25": "Prophet Muhammad's Birthday",
942
+ "2026-12-25": "Christmas Day"
943
+ },
944
+ 2027: {
945
+ "2027-01-01": "New Year's Day",
946
+ "2027-02-06": "Chinese New Year",
947
+ "2027-02-23": "National Day",
948
+ "2027-03-07": "Nuzul Al-Quran",
949
+ "2027-03-10": "Hari Raya Aidilfitri",
950
+ "2027-03-11": "Hari Raya Aidilfitri Holiday",
951
+ "2027-05-01": "International Labour Day",
952
+ "2027-05-17": "Hari Raya Aidiladha",
953
+ "2027-06-06": "Islamic New Year",
954
+ "2027-07-15": "Sultan's Birthday",
955
+ "2027-08-15": "Prophet Muhammad's Birthday",
956
+ "2027-12-25": "Christmas Day"
957
+ }
958
+ }, lt = {
959
+ countryCode: at,
960
+ timezone: tt,
961
+ payRate: nt,
962
+ overtime: ot,
963
+ workingHours: st,
964
+ recurringPublicHolidays: it,
965
+ publicHolidays: rt
966
+ }, ut = "ID", dt = "Asia/Jakarta", ct = {
967
+ NORMAL: {
968
+ overtime: 1.5
969
+ },
970
+ REST_DAY: {
971
+ regular: 1,
972
+ overtime: 2
973
+ },
974
+ PUBLIC_HOLIDAY: {
975
+ regular: 2,
976
+ overtime: 2
977
+ }
978
+ }, mt = {
979
+ maxHoursPerMonth: 72
980
+ }, yt = {
981
+ fullTime: {
982
+ minHoursPerDay: null,
983
+ maxHoursPerDay: 8,
984
+ maxHoursPerWeek: 40
985
+ },
986
+ partTime: {
987
+ maxHoursPerWeek: null
988
+ }
989
+ }, ft = [
990
+ {
991
+ month: 1,
992
+ day: 1,
993
+ name: "New Year's Day"
994
+ },
995
+ {
996
+ month: 5,
997
+ day: 1,
998
+ name: "International Labour Day"
999
+ },
1000
+ {
1001
+ month: 8,
1002
+ day: 17,
1003
+ name: "Independence Day"
1004
+ },
1005
+ {
1006
+ month: 12,
1007
+ day: 25,
1008
+ name: "Christmas Day"
1009
+ }
1010
+ ], pt = {
1011
+ 2026: {
1012
+ "2026-01-01": "New Year's Day",
1013
+ "2026-01-16": "Isra Mi'raj",
1014
+ "2026-02-17": "Chinese New Year",
1015
+ "2026-03-19": "Nyepi",
1016
+ "2026-03-21": "Eid al-Fitr",
1017
+ "2026-03-22": "Eid al-Fitr Holiday",
1018
+ "2026-04-03": "Good Friday",
1019
+ "2026-04-05": "Easter Sunday",
1020
+ "2026-05-01": "International Labour Day",
1021
+ "2026-05-14": "Ascension Day",
1022
+ "2026-05-27": "Eid al-Adha",
1023
+ "2026-05-31": "Vesak Day",
1024
+ "2026-06-01": "Pancasila Day",
1025
+ "2026-06-16": "Islamic New Year",
1026
+ "2026-08-17": "Independence Day",
1027
+ "2026-08-25": "Prophet Muhammad's Birthday",
1028
+ "2026-12-25": "Christmas Day"
1029
+ },
1030
+ 2027: {
1031
+ "2027-01-01": "New Year's Day",
1032
+ "2027-01-05": "Isra Mi'raj",
1033
+ "2027-02-06": "Chinese New Year",
1034
+ "2027-03-08": "Nyepi",
1035
+ "2027-03-10": "Eid al-Fitr",
1036
+ "2027-03-11": "Eid al-Fitr Holiday",
1037
+ "2027-03-26": "Good Friday",
1038
+ "2027-03-28": "Easter Sunday",
1039
+ "2027-05-01": "International Labour Day",
1040
+ "2027-05-06": "Ascension Day",
1041
+ "2027-05-17": "Eid al-Adha",
1042
+ "2027-05-20": "Vesak Day",
1043
+ "2027-06-01": "Pancasila Day",
1044
+ "2027-06-06": "Islamic New Year",
1045
+ "2027-08-15": "Prophet Muhammad's Birthday",
1046
+ "2027-08-17": "Independence Day",
1047
+ "2027-12-25": "Christmas Day",
1048
+ "2027-12-26": "Isra Mi'raj"
1049
+ }
1050
+ }, ht = {
1051
+ countryCode: ut,
1052
+ timezone: dt,
1053
+ payRate: ct,
1054
+ overtime: mt,
1055
+ workingHours: yt,
1056
+ recurringPublicHolidays: ft,
1057
+ publicHolidays: pt
1058
+ }, vt = "MO", gt = "Asia/Macau", Dt = {
1059
+ NORMAL: {
1060
+ overtime: 1.5
1061
+ },
1062
+ REST_DAY: {
1063
+ regular: 1,
1064
+ overtime: 2
1065
+ },
1066
+ PUBLIC_HOLIDAY: {
1067
+ regular: 2,
1068
+ overtime: 3
1069
+ }
1070
+ }, wt = {
1071
+ maxHoursPerMonth: null
1072
+ }, Ht = {
1073
+ fullTime: {
1074
+ minHoursPerDay: null,
1075
+ maxHoursPerDay: 8,
1076
+ maxHoursPerWeek: 48
1077
+ },
1078
+ partTime: {
1079
+ maxHoursPerWeek: null
1080
+ }
1081
+ }, At = [
1082
+ {
1083
+ month: 1,
1084
+ day: 1,
1085
+ name: "New Year's Day"
1086
+ },
1087
+ {
1088
+ month: 5,
1089
+ day: 1,
1090
+ name: "Labour Day"
1091
+ },
1092
+ {
1093
+ month: 10,
1094
+ day: 1,
1095
+ name: "National Day"
1096
+ },
1097
+ {
1098
+ month: 12,
1099
+ day: 20,
1100
+ name: "Macao Special Administrative Region Establishment Day"
1101
+ },
1102
+ {
1103
+ month: 12,
1104
+ day: 25,
1105
+ name: "Christmas Day"
1106
+ }
1107
+ ], Et = {
1108
+ 2026: {
1109
+ "2026-01-01": "New Year's Day",
1110
+ "2026-02-17": "Lunar New Year's Day",
1111
+ "2026-02-18": "Second day of Lunar New Year",
1112
+ "2026-02-19": "Third day of Lunar New Year",
1113
+ "2026-04-03": "Good Friday",
1114
+ "2026-04-04": "Day before Easter",
1115
+ "2026-04-05": "Cheng Ming Festival",
1116
+ "2026-04-06": "Compensatory rest day",
1117
+ "2026-04-07": "Compensatory rest day",
1118
+ "2026-05-01": "Labour Day",
1119
+ "2026-05-24": "Buddha's Birthday",
1120
+ "2026-05-25": "Compensatory rest day",
1121
+ "2026-06-19": "Dragon Boat Festival",
1122
+ "2026-09-26": "Day following Mid-Autumn Festival",
1123
+ "2026-09-28": "Compensatory rest day",
1124
+ "2026-10-01": "National Day",
1125
+ "2026-10-02": "Day following National Day",
1126
+ "2026-10-18": "Chong Yeung Festival",
1127
+ "2026-10-19": "Compensatory rest day",
1128
+ "2026-11-02": "All Souls' Day",
1129
+ "2026-12-08": "Immaculate Conception",
1130
+ "2026-12-20": "Macao SAR Establishment Day",
1131
+ "2026-12-21": "Compensatory rest day",
1132
+ "2026-12-22": "Winter Solstice",
1133
+ "2026-12-24": "Christmas Eve",
1134
+ "2026-12-25": "Christmas Day"
1135
+ },
1136
+ 2027: {
1137
+ "2027-01-01": "New Year's Day",
1138
+ "2027-02-06": "Lunar New Year's Day",
1139
+ "2027-02-07": "Second day of Lunar New Year",
1140
+ "2027-02-08": "Third day of Lunar New Year",
1141
+ "2027-02-09": "Compensatory rest day",
1142
+ "2027-02-10": "Compensatory rest day",
1143
+ "2027-03-26": "Good Friday",
1144
+ "2027-03-27": "Day before Easter",
1145
+ "2027-03-29": "Compensatory rest day",
1146
+ "2027-04-05": "Cheng Ming Festival",
1147
+ "2027-05-01": "Labour Day",
1148
+ "2027-05-03": "Compensatory rest day",
1149
+ "2027-05-13": "Buddha's Birthday",
1150
+ "2027-06-09": "Dragon Boat Festival",
1151
+ "2027-09-16": "Day following Mid-Autumn Festival",
1152
+ "2027-10-01": "National Day",
1153
+ "2027-10-02": "Day following National Day",
1154
+ "2027-10-04": "Compensatory rest day",
1155
+ "2027-10-08": "Chong Yeung Festival",
1156
+ "2027-11-02": "All Souls' Day",
1157
+ "2027-12-08": "Immaculate Conception",
1158
+ "2027-12-20": "Macao SAR Establishment Day",
1159
+ "2027-12-22": "Winter Solstice",
1160
+ "2027-12-24": "Christmas Eve",
1161
+ "2027-12-25": "Christmas Day",
1162
+ "2027-12-27": "Compensatory rest day"
1163
+ }
1164
+ }, bt = {
1165
+ countryCode: vt,
1166
+ timezone: gt,
1167
+ payRate: Dt,
1168
+ overtime: wt,
1169
+ workingHours: Ht,
1170
+ recurringPublicHolidays: At,
1171
+ publicHolidays: Et
1172
+ }, Pt = "MV", St = "Indian/Maldives", kt = {
1173
+ NORMAL: {
1174
+ overtime: 1.5
1175
+ },
1176
+ REST_DAY: {
1177
+ regular: 1,
1178
+ overtime: 2
1179
+ },
1180
+ PUBLIC_HOLIDAY: {
1181
+ regular: 2,
1182
+ overtime: 3
1183
+ }
1184
+ }, Ct = {
1185
+ maxHoursPerMonth: null
1186
+ }, Mt = {
1187
+ fullTime: {
1188
+ minHoursPerDay: null,
1189
+ maxHoursPerDay: 8,
1190
+ maxHoursPerWeek: 48
1191
+ },
1192
+ partTime: {
1193
+ maxHoursPerWeek: null
1194
+ }
1195
+ }, Nt = [
1196
+ {
1197
+ month: 1,
1198
+ day: 1,
1199
+ name: "New Year's Day"
1200
+ },
1201
+ {
1202
+ month: 5,
1203
+ day: 1,
1204
+ name: "Labour Day"
1205
+ },
1206
+ {
1207
+ month: 7,
1208
+ day: 26,
1209
+ name: "Independence Day"
1210
+ },
1211
+ {
1212
+ month: 11,
1213
+ day: 3,
1214
+ name: "Victory Day"
1215
+ },
1216
+ {
1217
+ month: 11,
1218
+ day: 11,
1219
+ name: "Republic Day"
1220
+ }
1221
+ ], Lt = {
1222
+ 2026: {
1223
+ "2026-01-01": "New Year's Day",
1224
+ "2026-03-20": "Eid al-Fitr Holiday",
1225
+ "2026-03-21": "Eid al-Fitr Holiday",
1226
+ "2026-03-22": "Eid al-Fitr Holiday",
1227
+ "2026-05-01": "Labour Day",
1228
+ "2026-05-26": "Arafah Day",
1229
+ "2026-05-27": "Eid al-Adha Holiday",
1230
+ "2026-05-28": "Eid al-Adha Holiday",
1231
+ "2026-05-29": "Eid al-Adha Holiday",
1232
+ "2026-06-17": "Islamic New Year",
1233
+ "2026-07-26": "Independence Day",
1234
+ "2026-07-27": "Independence Day Holiday",
1235
+ "2026-08-14": "National Day",
1236
+ "2026-08-25": "Prophet Muhammad's Birthday",
1237
+ "2026-09-13": "The Day Maldives Embraced Islam",
1238
+ "2026-11-03": "Victory Day",
1239
+ "2026-11-11": "Republic Day"
1240
+ },
1241
+ 2027: {
1242
+ "2027-01-01": "New Year's Day",
1243
+ "2027-03-10": "Eid al-Fitr Holiday",
1244
+ "2027-03-11": "Eid al-Fitr Holiday",
1245
+ "2027-05-01": "Labour Day",
1246
+ "2027-05-15": "Arafah Day",
1247
+ "2027-05-16": "Eid al-Adha Holiday",
1248
+ "2027-05-17": "Eid al-Adha Holiday",
1249
+ "2027-05-18": "Eid al-Adha Holiday",
1250
+ "2027-06-06": "Islamic New Year",
1251
+ "2027-07-26": "Independence Day",
1252
+ "2027-07-27": "Independence Day Holiday",
1253
+ "2027-08-14": "National Day",
1254
+ "2027-08-15": "Prophet Muhammad's Birthday",
1255
+ "2027-09-03": "The Day Maldives Embraced Islam",
1256
+ "2027-11-03": "Victory Day",
1257
+ "2027-11-11": "Republic Day"
1258
+ }
1259
+ }, Ot = {
1260
+ countryCode: Pt,
1261
+ timezone: St,
1262
+ payRate: kt,
1263
+ overtime: Ct,
1264
+ workingHours: Mt,
1265
+ recurringPublicHolidays: Nt,
1266
+ publicHolidays: Lt
1267
+ }, It = "MY", Tt = "Asia/Kuala_Lumpur", Rt = {
1268
+ NORMAL: {
1269
+ overtime: 1.5
1270
+ },
1271
+ REST_DAY: {
1272
+ regular: 1,
1273
+ overtime: 2
1274
+ },
1275
+ PUBLIC_HOLIDAY: {
1276
+ regular: 2,
1277
+ overtime: 3
1278
+ }
1279
+ }, $t = {
1280
+ maxHoursPerMonth: 104
1281
+ }, Bt = {
1282
+ fullTime: {
1283
+ minHoursPerDay: null,
1284
+ maxHoursPerDay: 8,
1285
+ maxHoursPerWeek: 45
1286
+ },
1287
+ partTime: {
1288
+ maxHoursPerWeek: 31.5
1289
+ }
1290
+ }, xt = [
1291
+ {
1292
+ month: 1,
1293
+ day: 1,
1294
+ name: "New Year's Day"
1295
+ },
1296
+ {
1297
+ month: 5,
1298
+ day: 1,
1299
+ name: "Labour Day"
1300
+ },
1301
+ {
1302
+ month: 8,
1303
+ day: 31,
1304
+ name: "Merdeka Day"
1305
+ },
1306
+ {
1307
+ month: 9,
1308
+ day: 16,
1309
+ name: "Malaysia Day"
1310
+ },
1311
+ {
1312
+ month: 12,
1313
+ day: 25,
1314
+ name: "Christmas Day"
1315
+ }
1316
+ ], Yt = {
1317
+ 2026: {
1318
+ "2026-01-01": "New Year's Day",
1319
+ "2026-02-17": "Chinese New Year",
1320
+ "2026-02-18": "Chinese New Year Holiday",
1321
+ "2026-03-07": "Nuzul Al-Quran",
1322
+ "2026-03-20": "Hari Raya Aidilfitri",
1323
+ "2026-03-21": "Hari Raya Aidilfitri Holiday",
1324
+ "2026-03-22": "Hari Raya Aidilfitri Holiday",
1325
+ "2026-03-23": "Hari Raya Aidilfitri Holiday",
1326
+ "2026-05-01": "Labour Day",
1327
+ "2026-05-27": "Hari Raya Haji",
1328
+ "2026-05-31": "Wesak Day",
1329
+ "2026-06-01": "Agong's Birthday",
1330
+ "2026-06-17": "Awal Muharram",
1331
+ "2026-08-25": "Prophet Muhammad's Birthday",
1332
+ "2026-08-31": "Merdeka Day",
1333
+ "2026-09-16": "Malaysia Day",
1334
+ "2026-11-08": "Deepavali",
1335
+ "2026-12-25": "Christmas Day"
1336
+ },
1337
+ 2027: {
1338
+ "2027-01-01": "New Year's Day",
1339
+ "2027-02-06": "Chinese New Year",
1340
+ "2027-02-07": "Chinese New Year Holiday",
1341
+ "2027-03-10": "Hari Raya Aidilfitri",
1342
+ "2027-03-11": "Hari Raya Aidilfitri Holiday",
1343
+ "2027-05-01": "Labour Day",
1344
+ "2027-05-17": "Hari Raya Haji",
1345
+ "2027-05-20": "Wesak Day",
1346
+ "2027-06-01": "Agong's Birthday",
1347
+ "2027-06-06": "Awal Muharram",
1348
+ "2027-08-15": "Prophet Muhammad's Birthday",
1349
+ "2027-08-31": "Merdeka Day",
1350
+ "2027-09-16": "Malaysia Day",
1351
+ "2027-10-28": "Deepavali",
1352
+ "2027-12-25": "Christmas Day"
1353
+ }
1354
+ }, Ft = {
1355
+ countryCode: It,
1356
+ timezone: Tt,
1357
+ payRate: Rt,
1358
+ overtime: $t,
1359
+ workingHours: Bt,
1360
+ recurringPublicHolidays: xt,
1361
+ publicHolidays: Yt
1362
+ }, _t = "PK", Ut = "Asia/Karachi", Wt = {
1363
+ NORMAL: {
1364
+ overtime: 1.5
1365
+ },
1366
+ REST_DAY: {
1367
+ regular: 1,
1368
+ overtime: 2
1369
+ },
1370
+ PUBLIC_HOLIDAY: {
1371
+ regular: 2,
1372
+ overtime: 3
1373
+ }
1374
+ }, Kt = {
1375
+ maxHoursPerMonth: null
1376
+ }, zt = {
1377
+ fullTime: {
1378
+ minHoursPerDay: null,
1379
+ maxHoursPerDay: 9,
1380
+ maxHoursPerWeek: 48
1381
+ },
1382
+ partTime: {
1383
+ maxHoursPerWeek: null
1384
+ }
1385
+ }, Vt = [
1386
+ {
1387
+ month: 1,
1388
+ day: 1,
1389
+ name: "New Year's Day"
1390
+ },
1391
+ {
1392
+ month: 2,
1393
+ day: 5,
1394
+ name: "Kashmir Day"
1395
+ },
1396
+ {
1397
+ month: 3,
1398
+ day: 23,
1399
+ name: "Pakistan Day"
1400
+ },
1401
+ {
1402
+ month: 5,
1403
+ day: 1,
1404
+ name: "Labour Day"
1405
+ },
1406
+ {
1407
+ month: 8,
1408
+ day: 14,
1409
+ name: "Independence Day"
1410
+ },
1411
+ {
1412
+ month: 12,
1413
+ day: 25,
1414
+ name: "Quaid-e-Azam Day and Christmas Day"
1415
+ }
1416
+ ], jt = {
1417
+ 2026: {
1418
+ "2026-01-01": "New Year's Day",
1419
+ "2026-02-05": "Kashmir Day",
1420
+ "2026-03-23": "Pakistan Day",
1421
+ "2026-05-01": "Labour Day",
1422
+ "2026-06-27": "Eid al-Adha",
1423
+ "2026-06-28": "Eid al-Adha Holiday",
1424
+ "2026-06-29": "Eid al-Adha Holiday",
1425
+ "2026-08-14": "Independence Day",
1426
+ "2026-08-25": "Eid Milad-un-Nabi",
1427
+ "2026-12-25": "Quaid-e-Azam Day and Christmas Day"
1428
+ },
1429
+ 2027: {
1430
+ "2027-01-01": "New Year's Day",
1431
+ "2027-02-05": "Kashmir Day",
1432
+ "2027-03-23": "Pakistan Day",
1433
+ "2027-05-01": "Labour Day",
1434
+ "2027-05-17": "Eid al-Adha",
1435
+ "2027-05-18": "Eid al-Adha Holiday",
1436
+ "2027-05-19": "Eid al-Adha Holiday",
1437
+ "2027-08-14": "Independence Day",
1438
+ "2027-08-15": "Eid Milad-un-Nabi",
1439
+ "2027-12-25": "Quaid-e-Azam Day and Christmas Day"
1440
+ }
1441
+ }, Gt = {
1442
+ countryCode: _t,
1443
+ timezone: Ut,
1444
+ payRate: Wt,
1445
+ overtime: Kt,
1446
+ workingHours: zt,
1447
+ recurringPublicHolidays: Vt,
1448
+ publicHolidays: jt
1449
+ }, Qt = "SG", Xt = "Asia/Singapore", Jt = {
1450
+ NORMAL: {
1451
+ overtime: 1.5
1452
+ },
1453
+ REST_DAY: {
1454
+ regular: 1,
1455
+ overtime: 2
1456
+ },
1457
+ PUBLIC_HOLIDAY: {
1458
+ regular: 2,
1459
+ overtime: 1.5
1460
+ }
1461
+ }, Zt = {
1462
+ maxHoursPerMonth: 72
1463
+ }, qt = {
1464
+ fullTime: {
1465
+ minHoursPerDay: null,
1466
+ maxHoursPerDay: 12,
1467
+ maxHoursPerWeek: 44
1468
+ },
1469
+ partTime: {
1470
+ maxHoursPerWeek: 35
1471
+ }
1472
+ }, en = [
1473
+ {
1474
+ month: 1,
1475
+ day: 1,
1476
+ name: "New Year's Day"
1477
+ },
1478
+ {
1479
+ month: 5,
1480
+ day: 1,
1481
+ name: "Labour Day"
1482
+ },
1483
+ {
1484
+ month: 8,
1485
+ day: 9,
1486
+ name: "National Day"
1487
+ },
1488
+ {
1489
+ month: 12,
1490
+ day: 25,
1491
+ name: "Christmas Day"
1492
+ }
1493
+ ], an = {
1494
+ 2026: {
1495
+ "2026-01-01": "New Year's Day",
1496
+ "2026-02-17": "Chinese New Year's Day",
1497
+ "2026-02-18": "Chinese New Year's Holiday",
1498
+ "2026-03-21": "Hari Raya Puasa",
1499
+ "2026-04-03": "Good Friday",
1500
+ "2026-05-01": "Labour Day",
1501
+ "2026-05-27": "Hari Raya Haji",
1502
+ "2026-05-31": "Vesak Day",
1503
+ "2026-06-01": "Vesak Day Holiday",
1504
+ "2026-08-09": "National Day",
1505
+ "2026-08-10": "National Day Holiday",
1506
+ "2026-11-08": "Deepavali",
1507
+ "2026-11-09": "Deepavali Holiday",
1508
+ "2026-12-25": "Christmas Day"
1509
+ },
1510
+ 2027: {
1511
+ "2027-01-01": "New Year's Day",
1512
+ "2027-02-06": "Chinese New Year's Day",
1513
+ "2027-02-07": "Chinese New Year's Holiday",
1514
+ "2027-02-08": "Chinese New Year Holiday",
1515
+ "2027-03-10": "Hari Raya Puasa",
1516
+ "2027-03-26": "Good Friday",
1517
+ "2027-05-01": "Labour Day",
1518
+ "2027-05-17": "Hari Raya Haji",
1519
+ "2027-05-20": "Vesak Day",
1520
+ "2027-08-09": "National Day",
1521
+ "2027-10-28": "Deepavali",
1522
+ "2027-12-25": "Christmas Day"
1523
+ }
1524
+ }, tn = {
1525
+ countryCode: Qt,
1526
+ timezone: Xt,
1527
+ payRate: Jt,
1528
+ overtime: Zt,
1529
+ workingHours: qt,
1530
+ recurringPublicHolidays: en,
1531
+ publicHolidays: an
1532
+ }, nn = "TH", on = "Asia/Bangkok", sn = {
1533
+ NORMAL: {
1534
+ overtime: 1.5
1535
+ },
1536
+ REST_DAY: {
1537
+ regular: 1,
1538
+ overtime: 2
1539
+ },
1540
+ PUBLIC_HOLIDAY: {
1541
+ regular: 2,
1542
+ overtime: 3
1543
+ }
1544
+ }, rn = {
1545
+ maxHoursPerMonth: 36
1546
+ }, ln = {
1547
+ fullTime: {
1548
+ minHoursPerDay: null,
1549
+ maxHoursPerDay: 8,
1550
+ maxHoursPerWeek: 48
1551
+ },
1552
+ partTime: {
1553
+ maxHoursPerWeek: null
1554
+ }
1555
+ }, un = [
1556
+ {
1557
+ month: 1,
1558
+ day: 1,
1559
+ name: "New Year's Day"
1560
+ },
1561
+ {
1562
+ month: 4,
1563
+ day: 6,
1564
+ name: "Chakri Memorial Day"
1565
+ },
1566
+ {
1567
+ month: 4,
1568
+ day: 13,
1569
+ name: "Songkran Festival"
1570
+ },
1571
+ {
1572
+ month: 4,
1573
+ day: 14,
1574
+ name: "Songkran Festival"
1575
+ },
1576
+ {
1577
+ month: 4,
1578
+ day: 15,
1579
+ name: "Songkran Festival"
1580
+ },
1581
+ {
1582
+ month: 5,
1583
+ day: 1,
1584
+ name: "National Labour Day"
1585
+ },
1586
+ {
1587
+ month: 5,
1588
+ day: 4,
1589
+ name: "Coronation Day"
1590
+ },
1591
+ {
1592
+ month: 6,
1593
+ day: 3,
1594
+ name: "Queen Suthida's Birthday"
1595
+ },
1596
+ {
1597
+ month: 7,
1598
+ day: 28,
1599
+ name: "King Vajiralongkorn's Birthday"
1600
+ },
1601
+ {
1602
+ month: 8,
1603
+ day: 12,
1604
+ name: "Queen Mother's Birthday and Mother's Day"
1605
+ },
1606
+ {
1607
+ month: 10,
1608
+ day: 13,
1609
+ name: "King Bhumibol Memorial Day"
1610
+ },
1611
+ {
1612
+ month: 10,
1613
+ day: 23,
1614
+ name: "King Chulalongkorn Memorial Day"
1615
+ },
1616
+ {
1617
+ month: 12,
1618
+ day: 5,
1619
+ name: "King Bhumibol's Birthday, National Day and Father's Day"
1620
+ },
1621
+ {
1622
+ month: 12,
1623
+ day: 10,
1624
+ name: "Constitution Day"
1625
+ },
1626
+ {
1627
+ month: 12,
1628
+ day: 31,
1629
+ name: "New Year's Eve"
1630
+ }
1631
+ ], dn = {
1632
+ 2026: {
1633
+ "2026-01-01": "New Year's Day",
1634
+ "2026-03-03": "Makha Bucha Day",
1635
+ "2026-04-06": "Chakri Memorial Day",
1636
+ "2026-04-13": "Songkran Festival",
1637
+ "2026-04-14": "Songkran Festival",
1638
+ "2026-04-15": "Songkran Festival",
1639
+ "2026-05-01": "National Labour Day",
1640
+ "2026-05-04": "Coronation Day",
1641
+ "2026-05-13": "Royal Ploughing Ceremony",
1642
+ "2026-05-31": "Visakha Bucha Day",
1643
+ "2026-06-01": "Substitution for Visakha Bucha Day",
1644
+ "2026-06-03": "Queen Suthida's Birthday",
1645
+ "2026-07-28": "King Vajiralongkorn's Birthday",
1646
+ "2026-07-29": "Asarnha Bucha Day",
1647
+ "2026-07-30": "Buddhist Lent Day",
1648
+ "2026-08-12": "Queen Mother's Birthday and Mother's Day",
1649
+ "2026-10-13": "King Bhumibol Memorial Day",
1650
+ "2026-10-23": "King Chulalongkorn Memorial Day",
1651
+ "2026-12-05": "King Bhumibol's Birthday, National Day and Father's Day",
1652
+ "2026-12-07": "Substitution for National Day and Father's Day",
1653
+ "2026-12-10": "Constitution Day",
1654
+ "2026-12-31": "New Year's Eve"
1655
+ },
1656
+ 2027: {
1657
+ "2027-01-01": "New Year's Day",
1658
+ "2027-02-21": "Makha Bucha Day",
1659
+ "2027-02-22": "Substitution for Makha Bucha Day",
1660
+ "2027-04-06": "Chakri Memorial Day",
1661
+ "2027-04-13": "Songkran Festival",
1662
+ "2027-04-14": "Songkran Festival",
1663
+ "2027-04-15": "Songkran Festival",
1664
+ "2027-05-01": "National Labour Day",
1665
+ "2027-05-03": "Substitution for National Labour Day",
1666
+ "2027-05-04": "Coronation Day",
1667
+ "2027-05-20": "Visakha Bucha Day",
1668
+ "2027-06-03": "Queen Suthida's Birthday",
1669
+ "2027-07-18": "Asarnha Bucha Day",
1670
+ "2027-07-19": "Buddhist Lent Day",
1671
+ "2027-07-20": "Substitution for Asarnha Bucha Day",
1672
+ "2027-07-28": "King Vajiralongkorn's Birthday",
1673
+ "2027-08-12": "Queen Mother's Birthday and Mother's Day",
1674
+ "2027-10-13": "King Bhumibol Memorial Day",
1675
+ "2027-10-23": "King Chulalongkorn Memorial Day",
1676
+ "2027-10-25": "Substitution for King Chulalongkorn Memorial Day",
1677
+ "2027-12-05": "King Bhumibol's Birthday, National Day and Father's Day",
1678
+ "2027-12-06": "Substitution for National Day and Father's Day",
1679
+ "2027-12-10": "Constitution Day",
1680
+ "2027-12-31": "New Year's Eve"
1681
+ }
1682
+ }, cn = {
1683
+ th: {
1684
+ "New Year's Day": "วันขึ้นปีใหม่",
1685
+ "Makha Bucha Day": "วันมาฆบูชา",
1686
+ "Substitution for Makha Bucha Day": "วันหยุดชดเชยวันมาฆบูชา",
1687
+ "Chakri Memorial Day": "วันจักรี",
1688
+ "Songkran Festival": "วันสงกรานต์",
1689
+ "National Labour Day": "วันแรงงานแห่งชาติ",
1690
+ "Substitution for National Labour Day": "วันหยุดชดเชยวันแรงงานแห่งชาติ",
1691
+ "Coronation Day": "วันฉัตรมงคล",
1692
+ "Royal Ploughing Ceremony": "วันพืชมงคล",
1693
+ "Visakha Bucha Day": "วันวิสาขบูชา",
1694
+ "Substitution for Visakha Bucha Day": "วันหยุดชดเชยวันวิสาขบูชา",
1695
+ "Queen Suthida's Birthday": "วันเฉลิมพระชนมพรรษาสมเด็จพระราชินี",
1696
+ "Asarnha Bucha Day": "วันอาสาฬหบูชา",
1697
+ "Substitution for Asarnha Bucha Day": "วันหยุดชดเชยวันอาสาฬหบูชา",
1698
+ "Buddhist Lent Day": "วันเข้าพรรษา",
1699
+ "King Vajiralongkorn's Birthday": "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระเจ้าอยู่หัว",
1700
+ "Queen Mother's Birthday and Mother's Day": "วันเฉลิมพระชนมพรรษาพระพันปีหลวง และวันแม่แห่งชาติ",
1701
+ "King Bhumibol Memorial Day": "วันนวมินทรมหาราช",
1702
+ "King Chulalongkorn Memorial Day": "วันปิยมหาราช",
1703
+ "Substitution for King Chulalongkorn Memorial Day": "วันหยุดชดเชยวันปิยมหาราช",
1704
+ "King Bhumibol's Birthday, National Day and Father's Day": "วันชาติ และวันพ่อแห่งชาติ",
1705
+ "Substitution for National Day and Father's Day": "วันหยุดชดเชยวันชาติ และวันพ่อแห่งชาติ",
1706
+ "Constitution Day": "วันรัฐธรรมนูญ",
1707
+ "New Year's Eve": "วันสิ้นปี"
1708
+ }
1709
+ }, mn = {
1710
+ countryCode: nn,
1711
+ timezone: on,
1712
+ payRate: sn,
1713
+ overtime: rn,
1714
+ workingHours: ln,
1715
+ recurringPublicHolidays: un,
1716
+ publicHolidays: dn,
1717
+ holidayNames: cn
1718
+ }, yn = "VN", fn = "Asia/Ho_Chi_Minh", pn = {
1719
+ NORMAL: {
1720
+ overtime: 1.5
1721
+ },
1722
+ REST_DAY: {
1723
+ regular: 1,
1724
+ overtime: 2
1725
+ },
1726
+ PUBLIC_HOLIDAY: {
1727
+ regular: 2,
1728
+ overtime: 3
1729
+ }
1730
+ }, hn = {
1731
+ maxHoursPerMonth: 40
1732
+ }, vn = {
1733
+ fullTime: {
1734
+ minHoursPerDay: null,
1735
+ maxHoursPerDay: 8,
1736
+ maxHoursPerWeek: 48
1737
+ },
1738
+ partTime: {
1739
+ maxHoursPerWeek: null
1740
+ }
1741
+ }, gn = [
1742
+ {
1743
+ month: 1,
1744
+ day: 1,
1745
+ name: "New Year's Day"
1746
+ },
1747
+ {
1748
+ month: 4,
1749
+ day: 30,
1750
+ name: "Reunification Day"
1751
+ },
1752
+ {
1753
+ month: 5,
1754
+ day: 1,
1755
+ name: "International Labour Day"
1756
+ },
1757
+ {
1758
+ month: 9,
1759
+ day: 2,
1760
+ name: "National Day"
1761
+ }
1762
+ ], Dn = {
1763
+ 2026: {
1764
+ "2026-01-01": "New Year's Day",
1765
+ "2026-02-16": "Tet Holiday",
1766
+ "2026-02-17": "Tet Holiday",
1767
+ "2026-02-18": "Tet Holiday",
1768
+ "2026-02-19": "Tet Holiday",
1769
+ "2026-02-20": "Tet Holiday",
1770
+ "2026-04-26": "Hung Kings Commemoration Day",
1771
+ "2026-04-27": "Hung Kings Holiday",
1772
+ "2026-04-30": "Reunification Day",
1773
+ "2026-05-01": "International Labour Day",
1774
+ "2026-09-02": "National Day",
1775
+ "2026-09-03": "National Day Holiday"
1776
+ },
1777
+ 2027: {
1778
+ "2027-01-01": "New Year's Day",
1779
+ "2027-02-05": "Tet Holiday",
1780
+ "2027-02-06": "Tet Holiday",
1781
+ "2027-02-07": "Tet Holiday",
1782
+ "2027-02-08": "Tet Holiday",
1783
+ "2027-02-09": "Tet Holiday",
1784
+ "2027-04-16": "Hung Kings Commemoration Day",
1785
+ "2027-04-30": "Reunification Day",
1786
+ "2027-05-01": "International Labour Day",
1787
+ "2027-09-02": "National Day",
1788
+ "2027-09-03": "National Day Holiday"
1789
+ }
1790
+ }, wn = {
1791
+ countryCode: yn,
1792
+ timezone: fn,
1793
+ payRate: pn,
1794
+ overtime: hn,
1795
+ workingHours: vn,
1796
+ recurringPublicHolidays: gn,
1797
+ publicHolidays: Dn
1798
+ }, je = { AE: et, BN: lt, ID: ht, MO: bt, MV: Ot, MY: Ft, PK: Gt, SG: tn, TH: mn, VN: wn };
1799
+ function Hn(e) {
1800
+ if (typeof e == "string") return e.toUpperCase();
1801
+ if (e && typeof e == "object" && "code" in e) {
1802
+ const a = e.code;
1803
+ if (typeof a == "string") return a.toUpperCase();
1804
+ }
1805
+ return "MY";
1806
+ }
1807
+ function An(e) {
1808
+ return je[Hn(e)] ?? je.MY;
1809
+ }
1810
+ function Vo(e, a, t) {
1811
+ var o, i;
1812
+ const n = En(e, a);
1813
+ return !n || !t ? n : ((i = (o = e.holidayNames) == null ? void 0 : o[t.slice(0, 2).toLowerCase()]) == null ? void 0 : i[n]) ?? n;
1814
+ }
1815
+ function En(e, a) {
1816
+ var i, u;
1817
+ const t = (i = e.publicHolidays[a.slice(0, 4)]) == null ? void 0 : i[a];
1818
+ if (t) return t;
1819
+ const n = Number(a.slice(5, 7)), o = Number(a.slice(8, 10));
1820
+ return ((u = e.recurringPublicHolidays.find((s) => s.month === n && s.day === o)) == null ? void 0 : u.name) ?? null;
1821
+ }
1822
+ const bn = Je(), ra = "unassigned", jo = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Go = "All Stations", Qo = [{ id: ra, label: "Assigned", roles: [], system: !0 }], Ge = [
1823
+ "#903E1F",
1824
+ "#5F090A",
1825
+ "#0A5384",
1826
+ "#1F5F3E",
1827
+ "#5B2C6F",
1828
+ "#7D5A00",
1829
+ "#0F5C5C",
1830
+ "#6E2142"
1831
+ ];
1832
+ function Pn(e) {
1833
+ var t;
1834
+ const a = e.trim().toLocaleLowerCase();
1835
+ return (t = W.find((n) => n.name.toLocaleLowerCase() === a)) == null ? void 0 : t.id;
1836
+ }
1837
+ function Xo(e, a) {
1838
+ if (e)
1839
+ return { positionId: a ?? Pn(e), positionName: e };
1840
+ }
1841
+ function re(e, a = W) {
1842
+ var t;
1843
+ if (e)
1844
+ return (e.positionId && ((t = a.find((n) => n.id === e.positionId)) == null ? void 0 : t.name)) ?? e.positionName;
1845
+ }
1846
+ function Jo(e, a = W) {
1847
+ var t, n;
1848
+ if (e)
1849
+ return e.positionId ? (t = a.find((o) => o.id === e.positionId)) == null ? void 0 : t.name : (n = a.find((o) => o.name.toLocaleLowerCase() === e.positionName.toLocaleLowerCase())) == null ? void 0 : n.name;
1850
+ }
1851
+ function Zo(e, a) {
1852
+ return a ? !W.some((t) => t.id === a) : !!e && !W.some((t) => t.name.toLocaleLowerCase() === e.toLocaleLowerCase());
1853
+ }
1854
+ const qo = [1, 1, 1, 1, 1, 1, 1];
1855
+ function ue(e) {
1856
+ return (e + 6) % 7;
1857
+ }
1858
+ function es(e) {
1859
+ return (e + 1) % 7;
1860
+ }
1861
+ function pe(e, a) {
1862
+ e.splice(0, e.length, ...a);
1863
+ }
1864
+ function Sn(e, a) {
1865
+ return qe(e, a) / 60;
1866
+ }
1867
+ function kn(e) {
1868
+ var t;
1869
+ const a = e.trim().split(/\s+/).filter(Boolean);
1870
+ return a.length ? (a[0][0] + (((t = a[1]) == null ? void 0 : t[0]) ?? "")).toUpperCase() : "??";
1871
+ }
1872
+ const la = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ new Map();
1873
+ function as(e) {
1874
+ return la.get(e);
1875
+ }
1876
+ function Cn(e) {
1877
+ const a = Se.get(e);
1878
+ if (a !== void 0) return a;
1879
+ const t = aa + Se.size + 1;
1880
+ return Se.set(e, t), la.set(t, e), t;
1881
+ }
1882
+ function ts(e) {
1883
+ return e.sourceId || String(e.id);
1884
+ }
1885
+ function Mn(e) {
1886
+ Ra.name = (e == null ? void 0 : e.outlet.name) ?? "", pe(Ta, (e == null ? void 0 : e.positions.map((s) => s.name)) ?? []), pe(W, (e == null ? void 0 : e.positions) ?? []);
1887
+ const a = (e == null ? void 0 : e.restaurantProfile.operatingHours) ?? [], t = Array.from({ length: 7 }, () => []);
1888
+ for (const s of a) t[ue(s.dayOfWeek)] = s.closed ? [] : s.hours;
1889
+ pe(N.dayHours, t);
1890
+ const n = a.filter((s) => !s.closed).flatMap((s) => s.hours);
1891
+ N.openFrom = n.length ? n.map((s) => s.start).reduce((s, d) => d < s ? d : s) : "00:00", N.openTo = n.length ? n.map((s) => s.end).reduce((s, d) => d > s ? d : s) : "24:00", pe(
1892
+ N.closedWeekdays,
1893
+ a.filter((s) => s.closed).map((s) => ue(s.dayOfWeek)).sort((s, d) => s - d)
1894
+ );
1895
+ const o = An(bn.currentCountry.value), i = (e == null ? void 0 : e.settings.settingsConfigured) === !0, u = i ? e.settings.payRate : o.payRate;
1896
+ N.otCapHours = i ? e.settings.overtime.maxHoursPerMonth : o.overtime.maxHoursPerMonth, N.workingHours = i ? e.settings.workingHours : {
1897
+ minHoursPerDay: null,
1898
+ maxHoursPerDay: o.workingHours.fullTime.maxHoursPerDay,
1899
+ maxHoursPerWeek: o.workingHours.fullTime.maxHoursPerWeek
1900
+ }, N.payRate.NORMAL.overtime = u.NORMAL.overtime, N.payRate.REST_DAY.regular = u.REST_DAY.regular, N.payRate.REST_DAY.overtime = u.REST_DAY.overtime, N.payRate.PUBLIC_HOLIDAY.regular = u.PUBLIC_HOLIDAY.regular, N.payRate.PUBLIC_HOLIDAY.overtime = u.PUBLIC_HOLIDAY.overtime;
1901
+ }
1902
+ Be(r, Mn, { immediate: !0 });
1903
+ function we(e) {
1904
+ var a, t, n;
1905
+ return {
1906
+ minHoursPerDay: ((a = e.workingHours) == null ? void 0 : a.minHoursPerDay) ?? N.workingHours.minHoursPerDay,
1907
+ maxHoursPerDay: ((t = e.workingHours) == null ? void 0 : t.maxHoursPerDay) ?? N.workingHours.maxHoursPerDay,
1908
+ maxHoursPerWeek: ((n = e.workingHours) == null ? void 0 : n.maxHoursPerWeek) ?? N.workingHours.maxHoursPerWeek
1909
+ };
1910
+ }
1911
+ function Nn(e) {
1912
+ return e.reduce(
1913
+ (a, t) => {
1914
+ const n = we(t).maxHoursPerWeek;
1915
+ return t.employmentType === "FULLTIME" && n != null ? Math.max(a, n) : a;
1916
+ },
1917
+ 0
1918
+ );
1919
+ }
1920
+ function Ln(e, a) {
1921
+ if (e.wage.type === "HOURLY") return e.wage.amount;
1922
+ const t = we(e).maxHoursPerWeek ?? a;
1923
+ return t ? e.wage.amount / (t * (52 / 12)) : 0;
1924
+ }
1925
+ function On(e, a) {
1926
+ if (e.employmentType === "FULLTIME") return 100;
1927
+ const t = we(e).maxHoursPerWeek;
1928
+ return !a || t == null ? 0 : Math.min(99, Math.round(t / a * 100));
1929
+ }
1930
+ function In(e) {
1931
+ var a;
1932
+ return {
1933
+ start: e.startTime,
1934
+ end: e.endTime,
1935
+ // A missing position means this assignment was genuinely saved as "Any position" — it must
1936
+ // stay blank rather than falling back to the employee's own primary position, or a reload
1937
+ // silently reassigns every "Any position" shift to whatever station the employee is normally
1938
+ // pinned to.
1939
+ role: re(e.position) ?? "",
1940
+ positionId: ((a = e.position) == null ? void 0 : a.positionId) || void 0,
1941
+ // Mongo distinguishes a draft from a published/confirmed assignment; the board's third
1942
+ // state ('ot') is a costing outcome, never something stored.
1943
+ status: e.status === "DRAFT" ? "pending" : "confirmed",
1944
+ breakMins: ea(e.breaks),
1945
+ breaks: e.breaks,
1946
+ // Carried through so an edit updates this same ScheduleShiftAssignments document instead of
1947
+ // creating a duplicate — see useScheduleBoard's commitShift/persistSlot.
1948
+ assignmentId: e.id,
1949
+ updatedAt: e.updatedAt
1950
+ };
1951
+ }
1952
+ function Tn(e) {
1953
+ return e.type === "OFF_DAY" ? "Off day" : e.leaveType === "MEDICAL" ? "Medical Leave" : e.leaveType === "EMERGENCY" ? "Emergency Leave" : e.leaveType === "UNPAID" ? "Unpaid Leave" : "Annual Leave";
1954
+ }
1955
+ function Rn(e, a) {
1956
+ if (a < e.startDate || a > e.endDate) return null;
1957
+ const n = e.startDate === e.endDate || a === e.startDate ? e.startPart : a === e.endDate ? e.endPart : "FULL_DAY";
1958
+ return {
1959
+ requestId: e.id,
1960
+ type: e.type,
1961
+ leaveType: e.leaveType ?? void 0,
1962
+ timeOff: e.status === "PENDING" ? "pending" : "approved",
1963
+ reason: Tn(e),
1964
+ half: n !== "FULL_DAY",
1965
+ halfPart: n === "FULL_DAY" ? void 0 : n
1966
+ };
1967
+ }
1968
+ function $n(e) {
1969
+ return {
1970
+ employeeId: e._id,
1971
+ name: e.name,
1972
+ employmentType: "FULLTIME",
1973
+ wage: { type: "HOURLY", amount: 0 },
1974
+ primaryPosition: null,
1975
+ secondaryPositions: [],
1976
+ availability: []
1977
+ };
1978
+ }
1979
+ function Bn(e) {
1980
+ const a = se[m.value];
1981
+ return !a || !e.includes(a) ? e : [a, ...e.filter((t) => t !== a)];
1982
+ }
1983
+ function xn(e) {
1984
+ var n;
1985
+ const t = (na.value[e] ?? ((n = le.value.find((o) => o._id === e)) == null ? void 0 : n.restaurantRole.map((o) => o.restaurantId)) ?? []).map((o) => se[o]).filter((o) => !!o);
1986
+ return t.length ? Bn([...new Set(t)]) : void 0;
1987
+ }
1988
+ function ns(e = []) {
1989
+ const a = r.value;
1990
+ if (!a) return [];
1991
+ const t = new Map(a.employees.map((s) => [s.employeeId, s])), n = new Map(
1992
+ V.value.map((s) => [s.employeeId, s])
1993
+ ), o = le.value.filter((s) => {
1994
+ var d;
1995
+ return ((d = n.get(s._id)) == null ? void 0 : d.enabled) !== !1;
1996
+ }).map((s) => t.get(s._id) ?? $n(s)), i = Nn(o), u = /* @__PURE__ */ new Map();
1997
+ for (const s of a.assignments) {
1998
+ const d = `${s.employeeId}|${s.date}`, D = u.get(d);
1999
+ D ? D.push(s) : u.set(d, [s]);
2000
+ }
2001
+ return o.map((s) => {
2002
+ const d = le.value.find((v) => v._id === s.employeeId) ?? {
2003
+ name: s.name,
2004
+ code: void 0,
2005
+ passcode: "",
2006
+ isMasterUser: !1
2007
+ }, D = we(s), h = Cn(s.employeeId), H = new Set(W.map((v) => v.id)), $ = new Set(W.map((v) => v.name.toLocaleLowerCase())), F = (v) => v.positionId ? H.has(v.positionId) : $.has(v.positionName.toLocaleLowerCase()), B = re(s.primaryPosition), f = !!s.primaryPosition && F(s.primaryPosition), b = s.secondaryPositions.filter(F).map((v) => re(v)).filter((v) => !!v), _ = B ? f ? [B, ...b] : [] : b, I = [
2008
+ ...B && !f ? [B] : [],
2009
+ ...s.secondaryPositions.filter((v) => !F(v)).map((v) => re(v)).filter((v) => !!v)
2010
+ ], de = _[0] ?? "", K = e.map((v) => {
2011
+ const k = j(v);
2012
+ return (a.timeOff ?? []).filter((E) => E.employeeId === s.employeeId).map((E) => Rn(E, k)).find((E) => E !== null) ?? null;
2013
+ }), L = e.map((v) => {
2014
+ const k = j(v), P = (u.get(`${s.employeeId}|${k}`) ?? []).filter((U) => U.startTime && U.endTime).map((U) => In(U)).sort((U, ye) => U.start.localeCompare(ye.start));
2015
+ return P.length ? P.length === 1 ? P[0] : P : null;
2016
+ }), ee = s.availability.length > 0, ce = Array.from(
2017
+ { length: 7 },
2018
+ (v, k) => ee ? s.availability.some((E) => ue(E.dayOfWeek) === k) : !0
2019
+ ), me = Array.from({ length: 7 }, (v, k) => {
2020
+ const E = s.availability.find((P) => ue(P.dayOfWeek) === k);
2021
+ return { from: (E == null ? void 0 : E.start) ?? "", to: (E == null ? void 0 : E.end) ?? "" };
2022
+ });
2023
+ return {
2024
+ id: h,
2025
+ sourceId: s.employeeId,
2026
+ // Employee page edits update the POS employee name. Use that as the display
2027
+ // source so Scheduling reflects those changes after its roster refresh.
2028
+ name: d.name,
2029
+ // POS access belongs to the POS roster, not the scheduling profile. Keep these
2030
+ // fields on the board employee so the edit form can initialise its access section
2031
+ // from the employee's existing POS account.
2032
+ passcode: d.passcode || void 0,
2033
+ code: d.code,
2034
+ masterUser: d.isMasterUser,
2035
+ employmentType: s.employmentType,
2036
+ role: de,
2037
+ initials: kn(d.name),
2038
+ color: Ge[(h - aa - 1) % Ge.length],
2039
+ // Gross hours actually rostered this week — the figure the cost rail multiplies by
2040
+ // the rate. Contracted hours are a separate question, answered by RULES.contract.
2041
+ // Rounded to one decimal — `hoursBetween` divides by 60, so an unrounded sum reads
2042
+ // as a long, meaningless float (e.g. 31.983333333333334) everywhere this is shown
2043
+ // verbatim, matching the rounding `employeeLoadOf`'s own hours figure already uses.
2044
+ weekHours: Math.round(
2045
+ L.reduce(
2046
+ (v, k) => v + (Array.isArray(k) ? k : k && "start" in k ? [k] : []).reduce(
2047
+ (E, P) => E + Sn(P.start, P.end),
2048
+ 0
2049
+ ),
2050
+ 0
2051
+ ) * 10
2052
+ ) / 10,
2053
+ pct: On(s, i),
2054
+ contractHours: D.maxHoursPerWeek ?? void 0,
2055
+ minHoursPerDay: D.minHoursPerDay ?? void 0,
2056
+ // Keep the persisted override shape here. Consumers that need the effective value use
2057
+ // effectiveWorkingHours(), so an inherited null remains distinguishable from an override.
2058
+ workingHours: s.workingHours,
2059
+ // Every outlet the POS says this person works at, not just this one — the Add / Edit form
2060
+ // shows them, and saving keeps them.
2061
+ locations: xn(s.employeeId),
2062
+ rate: Ln(s, i),
2063
+ positions: _,
2064
+ archivedPositions: I.length ? I : void 0,
2065
+ shifts: L,
2066
+ timeOff: K,
2067
+ // Remarks live in their own collection in the older scheduling design and are not
2068
+ // part of this board's payload yet.
2069
+ remarks: [],
2070
+ section: ra,
2071
+ payBasis: s.wage.type === "HOURLY" ? "hourly" : "monthly",
2072
+ payAmount: s.wage.amount,
2073
+ availDays: ce,
2074
+ availHours: me
2075
+ };
2076
+ });
2077
+ }
2078
+ function os() {
2079
+ return [];
2080
+ }
2081
+ function ss() {
2082
+ var n, o;
2083
+ const e = r.value, a = {}, t = {};
2084
+ for (const i of (e == null ? void 0 : e.demands) ?? []) {
2085
+ const u = i.date ? a[n = i.date] ?? (a[n] = []) : i.dayOfWeek !== null ? t[o = ue(i.dayOfWeek)] ?? (t[o] = []) : null;
2086
+ if (!u) continue;
2087
+ let s = u.find((d) => d.from === i.startTime && d.to === i.endTime);
2088
+ s || (s = { from: i.startTime, to: i.endTime, n: 0, roles: [] }, u.push(s)), s.n += i.headcount, i.position && s.roles.push({
2089
+ position: re(i.position) ?? "",
2090
+ positionId: i.position.positionId || void 0,
2091
+ n: i.headcount
2092
+ });
2093
+ }
2094
+ return { byDate: a, byWeekday: t };
2095
+ }
2096
+ function is() {
2097
+ const e = Je(), { restaurants: a, readRestaurants: t } = Ca(), n = Pa(), o = Sa(), i = S(!1);
2098
+ let u = () => !0;
2099
+ const s = Y(
2100
+ () => a.value.filter((f) => f.managable).map((f) => ({ value: f._id, label: f.profile.name })).sort((f, b) => f.label.localeCompare(b.label))
2101
+ ), d = () => {
2102
+ var f;
2103
+ return `hrm-schedule-outlet:${((f = e.currentBusiness.value) == null ? void 0 : f._id) ?? ""}`;
2104
+ }, D = Y(() => {
2105
+ var f;
2106
+ return ((f = e.currentRestaurant.value) == null ? void 0 : f._id) ?? "";
2107
+ });
2108
+ async function h(f, b) {
2109
+ return f !== m.value && !await u(f) || !ze(f) ? !1 : (localStorage.setItem(d(), f), n.query.restaurantId !== f && o.replace({ query: { ...n.query, restaurantId: f } }), await Promise.all([Ie(f), za(b)]), !0);
2110
+ }
2111
+ function H(f) {
2112
+ u = f;
2113
+ }
2114
+ const $ = (f) => !!f && s.value.some((b) => b.value === f);
2115
+ async function F() {
2116
+ var _;
2117
+ await t(), Ke.splice(0, Ke.length, ...s.value.map((I) => I.label)), Object.keys(se).forEach((I) => delete se[I]), a.value.forEach((I) => se[I._id] = I.profile.name);
2118
+ const f = localStorage.getItem(d()) ?? "", b = [m.value, f, D.value].find($) ?? ((_ = s.value[0]) == null ? void 0 : _.value) ?? "";
2119
+ return b && ze(b), i.value = !0, b;
2120
+ }
2121
+ async function B() {
2122
+ const f = await F();
2123
+ return f && await Ie(f), f;
2124
+ }
2125
+ return { options: s, ready: i, outletId: m, resolve: B, resolveOutlet: F, switchTo: h, setBeforeSwitch: H };
2126
+ }
2127
+ const Yn = ["data-hierarchy", "data-size", "data-icon"], rs = /* @__PURE__ */ xe({
2128
+ __name: "ScheduleButton",
2129
+ props: {
2130
+ hierarchy: { default: "primary" },
2131
+ size: { default: "sm" },
2132
+ iconOnly: { type: Boolean, default: !1 }
2133
+ },
2134
+ setup(e) {
2135
+ return (a, t) => (C(), M("button", {
2136
+ type: "button",
2137
+ class: "sch-button",
2138
+ "data-hierarchy": e.hierarchy,
2139
+ "data-size": e.size,
2140
+ "data-icon": e.iconOnly ? "only" : void 0
2141
+ }, [
2142
+ Xe(a.$slots, "default")
2143
+ ], 8, Yn));
2144
+ }
2145
+ }), Fn = ["disabled", "aria-expanded"], _n = { class: "fx-btn-label" }, Un = { class: "sch" }, Wn = ["aria-multiselectable"], Kn = {
2146
+ key: 0,
2147
+ class: "fx-pop-head"
2148
+ }, zn = {
2149
+ key: 1,
2150
+ class: "fx-pop-search"
2151
+ }, Vn = ["placeholder", "aria-label"], jn = {
2152
+ key: 2,
2153
+ class: "fx-opt is-off"
2154
+ }, Gn = {
2155
+ key: 0,
2156
+ class: "fx-grp"
2157
+ }, Qn = ["aria-selected", "onClick"], Xn = {
2158
+ key: 0,
2159
+ class: "fx-opt-text"
2160
+ }, Jn = { key: 0 }, ls = /* @__PURE__ */ xe({
2161
+ inheritAttrs: !1,
2162
+ __name: "ScheduleSelect",
2163
+ props: {
2164
+ modelValue: {},
2165
+ options: {},
2166
+ multiple: { type: Boolean },
2167
+ selected: {},
2168
+ selectedId: {},
2169
+ placeholder: {},
2170
+ selectedLabel: {},
2171
+ disabled: { type: Boolean },
2172
+ menuTitle: {},
2173
+ searchable: { type: Boolean },
2174
+ teleport: { type: Boolean, default: !0 }
2175
+ },
2176
+ emits: ["update:modelValue", "toggle"],
2177
+ setup(e, { emit: a }) {
2178
+ const { t } = ka(), n = e, o = a, i = pa(), u = Y(() => i.class ?? ""), s = S(!1), d = S(!1), D = S(null), h = S(null), H = S(null), $ = Y(() => n.teleport !== !1 && d.value);
2179
+ Re(() => {
2180
+ d.value = typeof document < "u" && !!document.body;
2181
+ });
2182
+ const F = Y(() => {
2183
+ var l, y;
2184
+ if (n.selectedLabel != null) return n.selectedLabel;
2185
+ if (n.multiple) {
2186
+ const c = ((l = n.selected) == null ? void 0 : l.length) ?? 0;
2187
+ return c ? t("scheduling.filter.selectedCount", { count: c }) : n.placeholder ?? "";
2188
+ }
2189
+ return ((y = n.options.find((c) => c.value === n.modelValue)) == null ? void 0 : y.label) ?? n.placeholder ?? "";
2190
+ });
2191
+ function B(l) {
2192
+ var y;
2193
+ return n.multiple ? !!((y = n.selected) != null && y.includes(l.value)) : n.selectedId != null ? l.id === n.selectedId : l.value === n.modelValue;
2194
+ }
2195
+ const f = Y(() => !!n.menuTitle || n.options.some((l) => l.hint)), b = S(""), _ = S(null), I = Y(() => {
2196
+ const l = b.value.trim().toLowerCase();
2197
+ return !n.searchable || !l ? n.options : n.options.filter((y) => `${y.label} ${y.hint ?? ""}`.toLowerCase().includes(l));
2198
+ }), de = Y(() => {
2199
+ const l = [];
2200
+ let y;
2201
+ for (const c of I.value)
2202
+ c.group !== y && (y = c.group, y && l.push({ heading: y })), l.push({ option: c });
2203
+ return l;
2204
+ }), K = 5, L = 8;
2205
+ function ee() {
2206
+ const l = H.value, y = h.value;
2207
+ if (!l || !y) return;
2208
+ const c = y.getBoundingClientRect(), O = window.innerWidth || document.documentElement.clientWidth, R = window.innerHeight || document.documentElement.clientHeight;
2209
+ l.style.minWidth = `${Math.round(c.width)}px`, l.style.maxWidth = `${Math.max(180, Math.round(O - L * 2))}px`;
2210
+ const ae = R - c.bottom - K - L, ma = c.top - K - L;
2211
+ l.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(ae, ma)))}px`;
2212
+ const fe = l.offsetHeight, ya = l.offsetWidth;
2213
+ let He = c.bottom + K;
2214
+ He + fe > R - L && (He = c.top - K - fe >= L ? c.top - K - fe : Math.max(L, R - fe - L));
2215
+ const fa = Math.min(Math.max(L, c.left), Math.max(L, O - ya - L));
2216
+ l.style.top = `${Math.round(He)}px`, l.style.left = `${Math.round(fa)}px`, l.style.visibility = "visible";
2217
+ }
2218
+ function ce(l) {
2219
+ var c, O;
2220
+ const y = l.target;
2221
+ y && ((c = D.value) != null && c.contains(y) || (O = H.value) != null && O.contains(y)) || P();
2222
+ }
2223
+ function me(l) {
2224
+ const y = H.value, c = l.target;
2225
+ if (y && c && c !== document && y.contains(c)) return;
2226
+ const O = h.value;
2227
+ if (!O) return;
2228
+ const R = O.getBoundingClientRect(), ae = window.innerHeight || document.documentElement.clientHeight;
2229
+ if (R.bottom < 0 || R.top > ae) {
2230
+ P();
2231
+ return;
2232
+ }
2233
+ ee();
2234
+ }
2235
+ function v() {
2236
+ document.addEventListener("click", ce), document.addEventListener("scroll", me, !0), window.addEventListener("resize", P);
2237
+ }
2238
+ function k() {
2239
+ document.removeEventListener("click", ce), document.removeEventListener("scroll", me, !0), window.removeEventListener("resize", P);
2240
+ }
2241
+ async function E() {
2242
+ var l, y, c;
2243
+ n.disabled || s.value || (b.value = "", s.value = !0, await ke(), ee(), (l = _.value) == null || l.focus(), (c = (y = H.value) == null ? void 0 : y.querySelector(".fx-opt.is-on")) == null || c.scrollIntoView({ block: "nearest" }), v());
2244
+ }
2245
+ function P() {
2246
+ s.value && (s.value = !1, b.value = "", k());
2247
+ }
2248
+ Be(b, async () => {
2249
+ s.value && (await ke(), ee());
2250
+ });
2251
+ function U(l) {
2252
+ var y;
2253
+ if (l.key === "Escape")
2254
+ l.preventDefault(), P(), (y = h.value) == null || y.focus();
2255
+ else if (l.key === "Enter") {
2256
+ l.preventDefault();
2257
+ const c = I.value.find((O) => !O.disabled);
2258
+ c && Ye(c);
2259
+ }
2260
+ }
2261
+ function ye() {
2262
+ s.value ? P() : E();
2263
+ }
2264
+ function Ye(l) {
2265
+ if (!l.disabled) {
2266
+ if (n.multiple && !l.command) {
2267
+ o("toggle", l.value);
2268
+ return;
2269
+ }
2270
+ if (P(), n.multiple) {
2271
+ o("update:modelValue", l.value);
2272
+ return;
2273
+ }
2274
+ l.value !== n.modelValue && o("update:modelValue", l.value);
2275
+ }
2276
+ }
2277
+ const ua = Y(() => n.options.filter((l) => !l.disabled));
2278
+ function da(l) {
2279
+ const y = ua.value;
2280
+ if (n.multiple || !y.length) {
2281
+ E();
2282
+ return;
2283
+ }
2284
+ const c = y.findIndex((ae) => ae.value === n.modelValue), O = l === "Home" ? 0 : l === "End" ? y.length - 1 : l === "ArrowDown" ? Math.min(y.length - 1, (c < 0 ? -1 : c) + 1) : Math.max(0, (c < 0 ? 1 : c) - 1), R = y[O];
2285
+ R && R.value !== n.modelValue ? o("update:modelValue", R.value) : E();
2286
+ }
2287
+ function ca(l) {
2288
+ var y;
2289
+ if (l.key === "Escape") {
2290
+ if (!s.value) return;
2291
+ l.preventDefault(), P(), (y = h.value) == null || y.focus();
2292
+ return;
2293
+ }
2294
+ if (l.key === "Enter" || l.key === " ") {
2295
+ l.preventDefault(), ye();
2296
+ return;
2297
+ }
2298
+ l.key !== "ArrowDown" && l.key !== "ArrowUp" && l.key !== "Home" && l.key !== "End" || (l.preventDefault(), da(l.key));
2299
+ }
2300
+ return $e(k), (l, y) => (C(), M("div", {
2301
+ ref_key: "rootEl",
2302
+ ref: D,
2303
+ class: he(["fx-sel", u.value])
2304
+ }, [
2305
+ x("button", va({
2306
+ ref_key: "btnEl",
2307
+ ref: h
2308
+ }, l.$attrs, {
2309
+ type: "button",
2310
+ class: ["sch-input fx-btn", { "is-open": s.value }],
2311
+ disabled: e.disabled,
2312
+ "aria-haspopup": "listbox",
2313
+ "aria-expanded": s.value,
2314
+ onClick: y[0] || (y[0] = (c) => ye()),
2315
+ onKeydown: ca
2316
+ }), [
2317
+ x("span", _n, z(F.value), 1)
2318
+ ], 16, Fn),
2319
+ (C(), ha(ga, {
2320
+ to: "body",
2321
+ disabled: !$.value
2322
+ }, [
2323
+ x("div", Un, [
2324
+ s.value ? (C(), M("div", {
2325
+ key: 0,
2326
+ ref_key: "popEl",
2327
+ ref: H,
2328
+ class: he(["fx-pop", { "fx-pop-rich": f.value }]),
2329
+ role: "listbox",
2330
+ "aria-multiselectable": e.multiple || void 0,
2331
+ style: { visibility: "hidden" }
2332
+ }, [
2333
+ e.menuTitle ? (C(), M("div", Kn, z(e.menuTitle), 1)) : G("", !0),
2334
+ e.searchable ? (C(), M("div", zn, [
2335
+ Da(x("input", {
2336
+ ref_key: "searchEl",
2337
+ ref: _,
2338
+ "onUpdate:modelValue": y[1] || (y[1] = (c) => b.value = c),
2339
+ class: "sch-input fx-pop-q",
2340
+ type: "search",
2341
+ placeholder: Ee(t)("scheduling.filter.search"),
2342
+ autocomplete: "off",
2343
+ spellcheck: "false",
2344
+ "aria-label": Ee(t)("scheduling.filter.search"),
2345
+ onKeydown: U
2346
+ }, null, 40, Vn), [
2347
+ [wa, b.value]
2348
+ ])
2349
+ ])) : G("", !0),
2350
+ e.searchable && !de.value.length ? (C(), M("div", jn, z(Ee(t)("scheduling.filter.noMatches")), 1)) : G("", !0),
2351
+ (C(!0), M(be, null, Ha(de.value, (c) => (C(), M(be, {
2352
+ key: "heading" in c ? `heading:${c.heading}` : `option:${c.option.value}`
2353
+ }, [
2354
+ "heading" in c ? (C(), M("div", Gn, z(c.heading), 1)) : (C(), M("div", {
2355
+ key: 1,
2356
+ class: he(["fx-opt", {
2357
+ "is-on": B(c.option),
2358
+ "is-off": c.option.disabled,
2359
+ "is-new": c.option.command
2360
+ }]),
2361
+ role: "option",
2362
+ "aria-selected": B(c.option),
2363
+ onClick: (O) => Ye(c.option)
2364
+ }, [
2365
+ y[2] || (y[2] = x("span", {
2366
+ class: "fx-tick",
2367
+ "aria-hidden": "true"
2368
+ }, [
2369
+ x("svg", {
2370
+ width: "11",
2371
+ height: "11",
2372
+ viewBox: "0 0 16 16",
2373
+ fill: "none"
2374
+ }, [
2375
+ x("path", {
2376
+ d: "m3.5 8.4 3 3 6-7",
2377
+ stroke: "currentColor",
2378
+ "stroke-width": "2.2",
2379
+ "stroke-linecap": "round",
2380
+ "stroke-linejoin": "round"
2381
+ })
2382
+ ])
2383
+ ], -1)),
2384
+ f.value ? (C(), M("span", Xn, [
2385
+ x("b", null, z(c.option.label), 1),
2386
+ c.option.hint ? (C(), M("small", Jn, z(c.option.hint), 1)) : G("", !0)
2387
+ ])) : (C(), M(be, { key: 1 }, [
2388
+ Aa(z(c.option.label), 1)
2389
+ ], 64))
2390
+ ], 10, Qn))
2391
+ ], 64))), 128))
2392
+ ], 10, Wn)) : G("", !0)
2393
+ ])
2394
+ ], 8, ["disabled"]))
2395
+ ], 2));
2396
+ }
2397
+ }), Zn = ["id", "aria-labelledby", "aria-label"], Qe = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', us = /* @__PURE__ */ xe({
2398
+ __name: "ScheduleModal",
2399
+ props: {
2400
+ open: { type: Boolean },
2401
+ id: {},
2402
+ panelClass: { default: "ob-modal" },
2403
+ panelStyle: {},
2404
+ labelledBy: {},
2405
+ label: {}
2406
+ },
2407
+ emits: ["close"],
2408
+ setup(e, { emit: a }) {
2409
+ const t = e, n = a, o = S(null);
2410
+ let i = null;
2411
+ function u() {
2412
+ ke(() => {
2413
+ const d = o.value;
2414
+ d && (d.querySelector(Qe) ?? d).focus();
2415
+ });
2416
+ }
2417
+ function s(d) {
2418
+ if (!t.open) return;
2419
+ if (d.key === "Escape") {
2420
+ d.preventDefault(), n("close");
2421
+ return;
2422
+ }
2423
+ if (d.key !== "Tab" || !o.value) return;
2424
+ const D = Array.from(o.value.querySelectorAll(Qe));
2425
+ if (!D.length) return;
2426
+ const h = D[0], H = D[D.length - 1];
2427
+ d.shiftKey && document.activeElement === h ? (d.preventDefault(), H.focus()) : !d.shiftKey && document.activeElement === H && (d.preventDefault(), h.focus());
2428
+ }
2429
+ return Be(
2430
+ () => t.open,
2431
+ (d) => {
2432
+ d ? (i = document.activeElement instanceof HTMLElement ? document.activeElement : null, u()) : (i == null || i.focus(), i = null);
2433
+ },
2434
+ { immediate: !0 }
2435
+ ), Re(() => document.addEventListener("keydown", s)), $e(() => {
2436
+ document.removeEventListener("keydown", s), i = null;
2437
+ }), (d, D) => e.open ? (C(), M("div", {
2438
+ key: 0,
2439
+ class: "modal-overlay open",
2440
+ onClick: D[0] || (D[0] = Ea((h) => n("close"), ["self"]))
2441
+ }, [
2442
+ x("div", {
2443
+ id: e.id,
2444
+ ref_key: "panel",
2445
+ ref: o,
2446
+ class: he(["schedule-modal-panel", e.panelClass]),
2447
+ style: ba(e.panelStyle),
2448
+ role: "dialog",
2449
+ "aria-modal": "true",
2450
+ "aria-labelledby": e.labelledBy,
2451
+ "aria-label": e.label,
2452
+ tabindex: "-1"
2453
+ }, [
2454
+ Xe(d.$slots, "default")
2455
+ ], 14, Zn)
2456
+ ])) : G("", !0);
2457
+ }
2458
+ });
2459
+ export {
2460
+ fo as $,
2461
+ Go as A,
2462
+ Pn as B,
2463
+ yo as C,
2464
+ co as D,
2465
+ ts as E,
2466
+ lo as F,
2467
+ qe as G,
2468
+ Me as H,
2469
+ Oa as I,
2470
+ po as J,
2471
+ Mo as K,
2472
+ Zo as L,
2473
+ Na as M,
2474
+ Ko as N,
2475
+ Wo as O,
2476
+ Ta as P,
2477
+ Uo as Q,
2478
+ mo as R,
2479
+ Qo as S,
2480
+ ge as T,
2481
+ ra as U,
2482
+ Ao as V,
2483
+ jo as W,
2484
+ V as X,
2485
+ Fa as Y,
2486
+ Ke as Z,
2487
+ es as _,
2488
+ ns as a,
2489
+ Bn as a0,
2490
+ w as a1,
2491
+ ue as a2,
2492
+ re as a3,
2493
+ se as a4,
2494
+ Po as a5,
2495
+ ko as a6,
2496
+ Te as a7,
2497
+ X as a8,
2498
+ bo as a9,
2499
+ io as aA,
2500
+ is as aB,
2501
+ Ho as aC,
2502
+ Oo as aD,
2503
+ No as aE,
2504
+ le as aF,
2505
+ Lo as aG,
2506
+ _a as aa,
2507
+ Co as ab,
2508
+ j as ac,
2509
+ Cn as ad,
2510
+ Bo as ae,
2511
+ Ro as af,
2512
+ $o as ag,
2513
+ qo as ah,
2514
+ za as ai,
2515
+ Yo as aj,
2516
+ Ra as ak,
2517
+ ro as al,
2518
+ To as am,
2519
+ Do as an,
2520
+ Ue as ao,
2521
+ ss as ap,
2522
+ We as aq,
2523
+ ve as ar,
2524
+ Ie as as,
2525
+ Fo as at,
2526
+ Eo as au,
2527
+ rs as av,
2528
+ oa as aw,
2529
+ ls as ax,
2530
+ us as ay,
2531
+ W as az,
2532
+ N as b,
2533
+ os as c,
2534
+ J as d,
2535
+ Xo as e,
2536
+ uo as f,
2537
+ An as g,
2538
+ Vo as h,
2539
+ Ba as i,
2540
+ Io as j,
2541
+ as as k,
2542
+ xo as l,
2543
+ _o as m,
2544
+ zo as n,
2545
+ m as o,
2546
+ r as p,
2547
+ wo as q,
2548
+ So as r,
2549
+ La as s,
2550
+ Le as t,
2551
+ vo as u,
2552
+ ie as v,
2553
+ ho as w,
2554
+ Ne as x,
2555
+ Jo as y,
2556
+ go as z
2557
+ };