@feedmepos/mf-hrm-portal 2.0.8-dev.1 → 2.0.8-dev.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/AuditLogList-CYoUWLEX.js +708 -0
  2. package/dist/{EmployeeList-DuRlCrqN.js → EmployeeList-DFocs_BJ.js} +5 -5
  3. package/dist/{Main-QpKV1hdj.js → Main-C2gZX1AT.js} +4 -4
  4. package/dist/{Main-D4ueBOl0.js → Main-CZAGXvvi.js} +6 -6
  5. package/dist/{Main-BfDH3uAt.js → Main-DkkkR5h8.js} +9 -9
  6. package/dist/{PermissionSetList-DfAZmUkI.js → PermissionSetList-DZ2P4mKk.js} +5 -5
  7. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D5_uFNqA.js +3471 -0
  8. package/dist/{RoleList-D4mup6LW.js → RoleList-C21eCooe.js} +7 -7
  9. package/dist/{TeamMemberList-D9rTKS5N.js → TeamMemberList-BEJpfmbN.js} +8 -8
  10. package/dist/{TimesheetList-CBudjg1y.js → TimesheetList-Bq0z6v_2.js} +7 -7
  11. package/dist/{app-BO9lM0sJ.js → app-B285_m2n.js} +683 -503
  12. package/dist/app.js +1 -1
  13. package/dist/{dayjs.min-lY-LRZuh.js → dayjs.min-BxzxUB_-.js} +1 -1
  14. package/dist/{employee-DXp_u8jd.js → employee-m_0kWAh4.js} +4 -4
  15. package/dist/{index-BigKo-lS.js → index-BnHa9Fqh.js} +1 -1
  16. package/dist/{index-DAuOIotV.js → index-Bq0fqdmL.js} +2 -2
  17. package/dist/{iteration-DgaP-HFg.js → iteration-DwHZ7vH4.js} +1 -1
  18. package/dist/{lodash-Mhrrz947.js → lodash-C_oqURUo.js} +1 -1
  19. package/dist/src/composables/useBasePermission.d.ts +37 -0
  20. package/dist/src/helpers/permission-sync.d.ts +12 -0
  21. package/dist/src/views/audit-log/locales/index.d.ts +140 -0
  22. package/dist/src/views/team/components/BasePermission.vue.d.ts +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{team-oeTIbsa-.js → team-DfLxBGup.js} +1 -1
  25. package/dist/{timesheet-B4XO3Kjx.js → timesheet-kIuiHl_B.js} +3 -3
  26. package/dist/tsconfig.app.tsbuildinfo +1 -1
  27. package/dist/{useAppStore-Cu5QCTlx.js → useAppStore-Gfzjp5eI.js} +1 -1
  28. package/dist/{useLoading-DKnxkHGF.js → useLoading-DGTaKnpg.js} +1 -1
  29. package/dist/{useReportPermissions-B_w5FiAK.js → useReportPermissions-CDY1iQtG.js} +3 -3
  30. package/package.json +2 -2
  31. package/dist/AuditLogList-YGP3G14A.js +0 -493
  32. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DokyDyxJ.js +0 -3432
@@ -1,9 +1,10 @@
1
- import { isRef as mt, ref as T, shallowRef as dt, watchEffect as he, computed as ie, h as fe, defineComponent as N, createBlock as $, renderSlot as Ge, createCommentVNode as Bt, unref as Z, openBlock as W, createElementBlock as ye, createElementVNode as O, toDisplayString as we, watch as De, nextTick as Me, onMounted as Ve, onBeforeUnmount as pt, normalizeStyle as bt, resolveComponent as le, withCtx as ft, createVNode as wt, defineAsyncComponent as Dt } from "vue";
1
+ import { isRef as mt, ref as T, shallowRef as dt, watchEffect as he, computed as ie, h as fe, defineComponent as z, createBlock as $, renderSlot as Ye, createCommentVNode as Bt, unref as Z, openBlock as W, createElementBlock as Ge, createElementVNode as O, toDisplayString as we, watch as De, nextTick as Me, onMounted as Ve, onBeforeUnmount as pt, normalizeStyle as bt, resolveComponent as le, withCtx as ft, createVNode as wt, defineAsyncComponent as Dt } from "vue";
2
2
  import { useBreakpoints as Mt } from "@feedmepos/ui-library";
3
- import { useRoute as vt, useRouter as Ct } from "vue-router";
3
+ import { useRoute as vt, useRouter as yt } from "vue-router";
4
4
  import { useCoreStore as ue, useI18n as je } from "@feedmepos/mf-common";
5
5
  const Ee = {
6
6
  title: "Audit Log",
7
+ export: "Export",
7
8
  dateRange: {
8
9
  placeholder: "Select date range"
9
10
  },
@@ -27,14 +28,17 @@ const Ee = {
27
28
  delete: "Delete"
28
29
  },
29
30
  columns: {
30
- timestamp: "Timestamp",
31
+ timestamp: "Date",
31
32
  user: "User",
33
+ role: "Role",
32
34
  subject: "Subject",
33
35
  action: "Action",
34
36
  operation: "Operation",
35
37
  outcome: "Status"
36
38
  },
37
39
  outcome: {
40
+ success: "Success",
41
+ failed: "Failed",
38
42
  allowed: "Allowed",
39
43
  denied: "Denied",
40
44
  skipped: "Skipped"
@@ -48,21 +52,52 @@ const Ee = {
48
52
  prevPage: "Previous page",
49
53
  nextPage: "Next page"
50
54
  },
55
+ exportSettings: {
56
+ title: "Export Columns"
57
+ },
58
+ exportFields: {
59
+ timestamp: "Date",
60
+ userName: "User Name",
61
+ userPhone: "Phone",
62
+ subject: "Role",
63
+ action: "Action",
64
+ operation: "Operation",
65
+ outcome: "Status",
66
+ businessId: "Business ID",
67
+ restaurantId: "Restaurant ID",
68
+ country: "Country",
69
+ resolvedFrom: "Resolved From",
70
+ requestMethod: "Request Method",
71
+ requestPath: "Request Path"
72
+ },
51
73
  detail: {
52
74
  header: "Audit Log Detail",
75
+ date: "Date",
53
76
  timestamp: "Timestamp",
54
77
  user: "User",
55
78
  email: "E-mail",
56
79
  action: "Action",
57
80
  operation: "Operation",
81
+ role: "Role",
58
82
  subject: "Subject",
59
83
  field: "Field",
60
84
  outcome: "Outcome",
61
85
  business: "Business",
62
86
  restaurant: "Restaurant",
87
+ changeDetails: "Change Details",
88
+ eventType: "Event Type",
63
89
  metadata: "Metadata",
64
90
  reason: "Reason",
65
91
  resolvedFrom: "Resolved From",
92
+ resolvedFromValue: {
93
+ admin: "Admin",
94
+ staff: "Staff",
95
+ permissionSet: "Permission Set",
96
+ systemPermissionSet: "System Permission Set",
97
+ custom: "Custom",
98
+ noMatch: "No Match",
99
+ unknown: "Unknown"
100
+ },
66
101
  permissionSet: "Permission Set",
67
102
  permissionTrace: "Permission Trace",
68
103
  decisivePermission: "Required rule",
@@ -71,14 +106,15 @@ const Ee = {
71
106
  requestPath: "Request Path",
72
107
  requestBody: "Request Body"
73
108
  }
74
- }, Yt = {
109
+ }, Ct = {
75
110
  auditLog: Ee
76
111
  }, ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
77
112
  __proto__: null,
78
113
  auditLog: Ee,
79
- default: Yt
114
+ default: Ct
80
115
  }, Symbol.toStringTag, { value: "Module" })), xe = {
81
116
  title: "บันทึกการตรวจสอบ",
117
+ export: "ส่งออก",
82
118
  dateRange: {
83
119
  placeholder: "เลือกช่วงวันที่"
84
120
  },
@@ -102,14 +138,17 @@ const Ee = {
102
138
  delete: "ลบ"
103
139
  },
104
140
  columns: {
105
- timestamp: "เวลา",
141
+ timestamp: "วันที่",
106
142
  user: "ผู้ใช้",
143
+ role: "บทบาท",
107
144
  subject: "หัวข้อ",
108
145
  action: "การกระทำ",
109
146
  operation: "รายละเอียดการดำเนินการ",
110
147
  outcome: "สถานะ"
111
148
  },
112
149
  outcome: {
150
+ success: "สำเร็จ",
151
+ failed: "ล้มเหลว",
113
152
  allowed: "อนุญาต",
114
153
  denied: "ปฏิเสธ",
115
154
  skipped: "ข้ามไป"
@@ -123,21 +162,52 @@ const Ee = {
123
162
  prevPage: "หน้าก่อนหน้า",
124
163
  nextPage: "หน้าถัดไป"
125
164
  },
165
+ exportSettings: {
166
+ title: "เลือกคอลัมน์ที่ส่งออก"
167
+ },
168
+ exportFields: {
169
+ timestamp: "วันที่",
170
+ userName: "ชื่อผู้ใช้",
171
+ userPhone: "เบอร์โทรศัพท์",
172
+ subject: "บทบาท",
173
+ action: "การกระทำ",
174
+ operation: "รายละเอียดการดำเนินการ",
175
+ outcome: "สถานะ",
176
+ businessId: "รหัสธุรกิจ",
177
+ restaurantId: "รหัสร้านอาหาร",
178
+ country: "ประเทศ",
179
+ resolvedFrom: "แก้ไขจาก",
180
+ requestMethod: "วิธีการร้องขอ",
181
+ requestPath: "เส้นทางร้องขอ"
182
+ },
126
183
  detail: {
127
184
  header: "รายละเอียดบันทึกการตรวจสอบ",
185
+ date: "วันที่",
128
186
  timestamp: "เวลา",
129
187
  user: "ผู้ใช้",
130
188
  email: "อีเมล",
131
189
  action: "การกระทำ",
132
190
  operation: "รายละเอียดการดำเนินการ",
191
+ role: "บทบาท",
133
192
  subject: "หัวข้อ",
134
193
  field: "ฟิลด์",
135
194
  outcome: "ผลลัพธ์",
136
195
  business: "ธุรกิจ",
137
196
  restaurant: "ร้านอาหาร",
197
+ changeDetails: "รายละเอียดการเปลี่ยนแปลง",
198
+ eventType: "ประเภทเหตุการณ์",
138
199
  metadata: "ข้อมูลเมตา",
139
200
  reason: "เหตุผล",
140
201
  resolvedFrom: "แก้ไขจาก",
202
+ resolvedFromValue: {
203
+ admin: "ผู้ดูแลระบบ",
204
+ staff: "พนักงาน",
205
+ permissionSet: "ชุดสิทธิ์",
206
+ systemPermissionSet: "ชุดสิทธิ์ระบบ",
207
+ custom: "กำหนดเอง",
208
+ noMatch: "ไม่พบรายการที่ตรงกัน",
209
+ unknown: "ไม่ทราบ"
210
+ },
141
211
  permissionSet: "ชุดสิทธิ์",
142
212
  permissionTrace: "เส้นทางสิทธิ์",
143
213
  decisivePermission: "กฎที่จำเป็น",
@@ -147,14 +217,15 @@ const Ee = {
147
217
  requestPath: "เส้นทางร้องขอ",
148
218
  requestBody: "เนื้อหาคำขอ"
149
219
  }
150
- }, Gt = {
220
+ }, Yt = {
151
221
  auditLog: xe
152
- }, yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
222
+ }, Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
153
223
  __proto__: null,
154
224
  auditLog: xe,
155
- default: Gt
225
+ default: Yt
156
226
  }, Symbol.toStringTag, { value: "Module" })), qe = {
157
227
  title: "审计日志",
228
+ export: "导出",
158
229
  dateRange: {
159
230
  placeholder: "选择日期范围"
160
231
  },
@@ -178,14 +249,17 @@ const Ee = {
178
249
  delete: "删除"
179
250
  },
180
251
  columns: {
181
- timestamp: "时间戳",
252
+ timestamp: "日期",
182
253
  user: "用户",
254
+ role: "角色",
183
255
  subject: "主题",
184
256
  action: "操作",
185
257
  operation: "操作说明",
186
258
  outcome: "状态"
187
259
  },
188
260
  outcome: {
261
+ success: "成功",
262
+ failed: "失败",
189
263
  allowed: "允许",
190
264
  denied: "拒绝",
191
265
  skipped: "已跳过"
@@ -199,21 +273,52 @@ const Ee = {
199
273
  prevPage: "上一页",
200
274
  nextPage: "下一页"
201
275
  },
276
+ exportSettings: {
277
+ title: "导出列"
278
+ },
279
+ exportFields: {
280
+ timestamp: "日期",
281
+ userName: "用户名",
282
+ userPhone: "手机号",
283
+ subject: "角色",
284
+ action: "操作",
285
+ operation: "操作说明",
286
+ outcome: "状态",
287
+ businessId: "商家 ID",
288
+ restaurantId: "餐厅 ID",
289
+ country: "国家",
290
+ resolvedFrom: "解析来源",
291
+ requestMethod: "请求方法",
292
+ requestPath: "请求路径"
293
+ },
202
294
  detail: {
203
295
  header: "审计日志详情",
296
+ date: "日期",
204
297
  timestamp: "时间戳",
205
298
  user: "用户",
206
299
  email: "邮箱",
207
300
  action: "操作",
208
301
  operation: "操作说明",
302
+ role: "角色",
209
303
  subject: "主题",
210
304
  field: "字段",
211
305
  outcome: "结果",
212
306
  business: "商家",
213
307
  restaurant: "餐厅",
308
+ changeDetails: "变更详情",
309
+ eventType: "事件类型",
214
310
  metadata: "元数据",
215
311
  reason: "原因",
216
312
  resolvedFrom: "解析来源",
313
+ resolvedFromValue: {
314
+ admin: "管理员",
315
+ staff: "员工",
316
+ permissionSet: "权限集",
317
+ systemPermissionSet: "系统权限集",
318
+ custom: "自定义",
319
+ noMatch: "无匹配",
320
+ unknown: "未知"
321
+ },
217
322
  permissionSet: "权限集",
218
323
  permissionTrace: "权限追踪",
219
324
  decisivePermission: "必要规则",
@@ -229,8 +334,9 @@ const Ee = {
229
334
  __proto__: null,
230
335
  auditLog: qe,
231
336
  default: Vt
232
- }, Symbol.toStringTag, { value: "Module" })), Qe = {
337
+ }, Symbol.toStringTag, { value: "Module" })), Pe = {
233
338
  title: "審計日誌",
339
+ export: "匯出",
234
340
  dateRange: {
235
341
  placeholder: "選擇日期範圍"
236
342
  },
@@ -254,14 +360,17 @@ const Ee = {
254
360
  delete: "刪除"
255
361
  },
256
362
  columns: {
257
- timestamp: "時間戳",
363
+ timestamp: "日期",
258
364
  user: "用戶",
365
+ role: "角色",
259
366
  subject: "主題",
260
367
  action: "操作",
261
368
  operation: "操作說明",
262
369
  outcome: "狀態"
263
370
  },
264
371
  outcome: {
372
+ success: "成功",
373
+ failed: "失敗",
265
374
  allowed: "允許",
266
375
  denied: "拒絕",
267
376
  skipped: "已略過"
@@ -275,21 +384,52 @@ const Ee = {
275
384
  prevPage: "上一頁",
276
385
  nextPage: "下一頁"
277
386
  },
387
+ exportSettings: {
388
+ title: "匯出欄位"
389
+ },
390
+ exportFields: {
391
+ timestamp: "日期",
392
+ userName: "用戶名稱",
393
+ userPhone: "手機號碼",
394
+ subject: "角色",
395
+ action: "操作",
396
+ operation: "操作說明",
397
+ outcome: "狀態",
398
+ businessId: "商家 ID",
399
+ restaurantId: "餐廳 ID",
400
+ country: "國家",
401
+ resolvedFrom: "解析來源",
402
+ requestMethod: "請求方法",
403
+ requestPath: "請求路徑"
404
+ },
278
405
  detail: {
279
406
  header: "審計日誌詳情",
407
+ date: "日期",
280
408
  timestamp: "時間戳",
281
409
  user: "用戶",
282
410
  email: "電子郵件",
283
411
  action: "操作",
284
412
  operation: "操作說明",
413
+ role: "角色",
285
414
  subject: "主題",
286
415
  field: "字段",
287
416
  outcome: "結果",
288
417
  business: "商家",
289
418
  restaurant: "餐廳",
419
+ changeDetails: "變更詳情",
420
+ eventType: "事件類型",
290
421
  metadata: "元數據",
291
422
  reason: "原因",
292
423
  resolvedFrom: "解析來源",
424
+ resolvedFromValue: {
425
+ admin: "管理員",
426
+ staff: "員工",
427
+ permissionSet: "權限集",
428
+ systemPermissionSet: "系統權限集",
429
+ custom: "自訂",
430
+ noMatch: "無匹配",
431
+ unknown: "未知"
432
+ },
293
433
  permissionSet: "權限集",
294
434
  permissionTrace: "權限追蹤",
295
435
  decisivePermission: "必要規則",
@@ -300,17 +440,17 @@ const Ee = {
300
440
  requestBody: "請求內容"
301
441
  }
302
442
  }, Et = {
303
- auditLog: Qe
443
+ auditLog: Pe
304
444
  }, xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
305
445
  __proto__: null,
306
- auditLog: Qe,
446
+ auditLog: Pe,
307
447
  default: Et
308
448
  }, Symbol.toStringTag, { value: "Module" })), qt = {
309
449
  "en-US": ht,
310
450
  "zh-CN": jt,
311
- "th-TH": yt,
451
+ "th-TH": Gt,
312
452
  "zh-Hant": xt
313
- }, Xe = {
453
+ }, Fe = {
314
454
  employee: {
315
455
  title: "Employee",
316
456
  exportButtonLabel: "Export",
@@ -463,13 +603,13 @@ const Ee = {
463
603
  placeholder: "Search restaurant"
464
604
  }
465
605
  }
466
- }, Qt = {
467
- hr: Xe
468
- }, Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
606
+ }, Pt = {
607
+ hr: Fe
608
+ }, Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
469
609
  __proto__: null,
470
- default: Qt,
471
- hr: Xe
472
- }, Symbol.toStringTag, { value: "Module" })), He = {
610
+ default: Pt,
611
+ hr: Fe
612
+ }, Symbol.toStringTag, { value: "Module" })), Qe = {
473
613
  employee: {
474
614
  title: "พนักงาน",
475
615
  exportButtonLabel: "ส่งออก",
@@ -621,13 +761,13 @@ const Ee = {
621
761
  placeholder: "ค้นหาร้านอาหาร"
622
762
  }
623
763
  }
624
- }, Ht = {
625
- hr: He
626
- }, Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
764
+ }, Qt = {
765
+ hr: Qe
766
+ }, Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
627
767
  __proto__: null,
628
- default: Ht,
629
- hr: He
630
- }, Symbol.toStringTag, { value: "Module" })), Fe = {
768
+ default: Qt,
769
+ hr: Qe
770
+ }, Symbol.toStringTag, { value: "Module" })), Xe = {
631
771
  employee: {
632
772
  title: "员工",
633
773
  exportButtonLabel: "导出",
@@ -780,13 +920,13 @@ const Ee = {
780
920
  placeholder: "搜索餐厅"
781
921
  }
782
922
  }
783
- }, Pt = {
784
- hr: Fe
923
+ }, Ht = {
924
+ hr: Xe
785
925
  }, Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
786
926
  __proto__: null,
787
- default: Pt,
788
- hr: Fe
789
- }, Symbol.toStringTag, { value: "Module" })), Pe = {
927
+ default: Ht,
928
+ hr: Xe
929
+ }, Symbol.toStringTag, { value: "Module" })), He = {
790
930
  employee: {
791
931
  title: "員工",
792
932
  exportButtonLabel: "導出",
@@ -935,15 +1075,15 @@ const Ee = {
935
1075
  }
936
1076
  }
937
1077
  }, Zt = {
938
- hr: Pe
1078
+ hr: He
939
1079
  }, It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
940
1080
  __proto__: null,
941
1081
  default: Zt,
942
- hr: Pe
943
- }, Symbol.toStringTag, { value: "Module" })), zt = {
944
- "en-US": Xt,
1082
+ hr: He
1083
+ }, Symbol.toStringTag, { value: "Module" })), Nt = {
1084
+ "en-US": Ft,
945
1085
  "zh-CN": Ot,
946
- "th-TH": Ft,
1086
+ "th-TH": Xt,
947
1087
  "zh-Hant": It
948
1088
  }, Oe = {
949
1089
  title: "Team members",
@@ -1078,12 +1218,12 @@ const Ee = {
1078
1218
  permissions: "Permissions"
1079
1219
  }
1080
1220
  }
1081
- }, Nt = {
1221
+ }, zt = {
1082
1222
  team: Oe,
1083
1223
  permissionSet: Ze
1084
1224
  }, Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1085
1225
  __proto__: null,
1086
- default: Nt,
1226
+ default: zt,
1087
1227
  permissionSet: Ze,
1088
1228
  team: Oe
1089
1229
  }, Symbol.toStringTag, { value: "Module" })), Ie = {
@@ -1181,7 +1321,7 @@ const Ee = {
1181
1321
  selectPlaceholder: "เลือกบทบาทสิทธิ์"
1182
1322
  }
1183
1323
  }
1184
- }, ze = {
1324
+ }, Ne = {
1185
1325
  title: "ชุดสิทธิ์",
1186
1326
  createButtonLabel: "สร้างชุดสิทธิ์",
1187
1327
  search: {
@@ -1220,13 +1360,13 @@ const Ee = {
1220
1360
  }
1221
1361
  }, Ut = {
1222
1362
  team: Ie,
1223
- permissionSet: ze
1363
+ permissionSet: Ne
1224
1364
  }, Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1225
1365
  __proto__: null,
1226
1366
  default: Ut,
1227
- permissionSet: ze,
1367
+ permissionSet: Ne,
1228
1368
  team: Ie
1229
- }, Symbol.toStringTag, { value: "Module" })), Ne = {
1369
+ }, Symbol.toStringTag, { value: "Module" })), ze = {
1230
1370
  title: "团队成员",
1231
1371
  actions: {
1232
1372
  addMember: "添加成员",
@@ -1359,13 +1499,13 @@ const Ee = {
1359
1499
  }
1360
1500
  }
1361
1501
  }, Tt = {
1362
- team: Ne,
1502
+ team: ze,
1363
1503
  permissionSet: We
1364
1504
  }, Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1365
1505
  __proto__: null,
1366
1506
  default: Tt,
1367
1507
  permissionSet: We,
1368
- team: Ne
1508
+ team: ze
1369
1509
  }, Symbol.toStringTag, { value: "Module" })), Ue = {
1370
1510
  title: "團隊成員",
1371
1511
  actions: {
@@ -1754,15 +1894,15 @@ const Ee = {
1754
1894
  }
1755
1895
  }, rs = {
1756
1896
  grantUser: ke
1757
- }, As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1897
+ }, as = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1758
1898
  __proto__: null,
1759
1899
  default: rs,
1760
1900
  grantUser: ke
1761
- }, Symbol.toStringTag, { value: "Module" })), as = {
1901
+ }, Symbol.toStringTag, { value: "Module" })), As = {
1762
1902
  "en-US": _t,
1763
1903
  "zh-CN": ss,
1764
1904
  "th-TH": es,
1765
- "zh-Hant": As
1905
+ "zh-Hant": as
1766
1906
  };
1767
1907
  var ns = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1768
1908
  function os(e) {
@@ -1775,21 +1915,21 @@ var Le = { exports: {} };
1775
1915
  })(ns, function() {
1776
1916
  return function(c) {
1777
1917
  var r = {};
1778
- function A(n) {
1918
+ function a(n) {
1779
1919
  if (r[n]) return r[n].exports;
1780
1920
  var u = r[n] = { i: n, l: !1, exports: {} };
1781
- return c[n].call(u.exports, u, u.exports, A), u.l = !0, u.exports;
1921
+ return c[n].call(u.exports, u, u.exports, a), u.l = !0, u.exports;
1782
1922
  }
1783
- return A.m = c, A.c = r, A.d = function(n, u, m) {
1784
- A.o(n, u) || Object.defineProperty(n, u, { enumerable: !0, get: m });
1785
- }, A.r = function(n) {
1923
+ return a.m = c, a.c = r, a.d = function(n, u, m) {
1924
+ a.o(n, u) || Object.defineProperty(n, u, { enumerable: !0, get: m });
1925
+ }, a.r = function(n) {
1786
1926
  typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(n, "__esModule", { value: !0 });
1787
- }, A.t = function(n, u) {
1788
- if (1 & u && (n = A(n)), 8 & u || 4 & u && typeof n == "object" && n && n.__esModule) return n;
1927
+ }, a.t = function(n, u) {
1928
+ if (1 & u && (n = a(n)), 8 & u || 4 & u && typeof n == "object" && n && n.__esModule) return n;
1789
1929
  var m = /* @__PURE__ */ Object.create(null);
1790
- if (A.r(m), Object.defineProperty(m, "default", { enumerable: !0, value: n }), 2 & u && typeof n != "string")
1930
+ if (a.r(m), Object.defineProperty(m, "default", { enumerable: !0, value: n }), 2 & u && typeof n != "string")
1791
1931
  for (var b in n)
1792
- A.d(
1932
+ a.d(
1793
1933
  m,
1794
1934
  b,
1795
1935
  (function(v) {
@@ -1797,141 +1937,141 @@ var Le = { exports: {} };
1797
1937
  }).bind(null, b)
1798
1938
  );
1799
1939
  return m;
1800
- }, A.n = function(n) {
1940
+ }, a.n = function(n) {
1801
1941
  var u = n && n.__esModule ? function() {
1802
1942
  return n.default;
1803
1943
  } : function() {
1804
1944
  return n;
1805
1945
  };
1806
- return A.d(u, "a", u), u;
1807
- }, A.o = function(n, u) {
1946
+ return a.d(u, "a", u), u;
1947
+ }, a.o = function(n, u) {
1808
1948
  return Object.prototype.hasOwnProperty.call(n, u);
1809
- }, A.p = "", A(A.s = 0);
1949
+ }, a.p = "", a(a.s = 0);
1810
1950
  }([
1811
- function(c, r, A) {
1812
- c.exports = A(1);
1951
+ function(c, r, a) {
1952
+ c.exports = a(1);
1813
1953
  },
1814
- function(c, r, A) {
1954
+ function(c, r, a) {
1815
1955
  function n(t) {
1816
- return (n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
1817
- return typeof a;
1818
- } : function(a) {
1819
- return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
1956
+ return (n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(A) {
1957
+ return typeof A;
1958
+ } : function(A) {
1959
+ return A && typeof Symbol == "function" && A.constructor === Symbol && A !== Symbol.prototype ? "symbol" : typeof A;
1820
1960
  })(t);
1821
1961
  }
1822
1962
  function u(t) {
1823
- var a = "[object " + t + "]";
1824
- return function(i) {
1825
- return Object.prototype.toString.call(i) === a;
1963
+ var A = "[object " + t + "]";
1964
+ return function(l) {
1965
+ return Object.prototype.toString.call(l) === A;
1826
1966
  };
1827
1967
  }
1828
- A.r(r), A.d(r, "default", function() {
1968
+ a.r(r), a.d(r, "default", function() {
1829
1969
  return lt;
1830
- }), A.d(r, "compare", function() {
1970
+ }), a.d(r, "compare", function() {
1831
1971
  return Be;
1832
- }), A.d(r, "comparable", function() {
1972
+ }), a.d(r, "comparable", function() {
1833
1973
  return te;
1834
1974
  });
1835
1975
  var m = u("Array"), b = u("Object"), v = u("Function");
1836
- function D(t, a) {
1837
- return v(t.get) ? t.get(a) : t[a];
1976
+ function D(t, A) {
1977
+ return v(t.get) ? t.get(A) : t[A];
1838
1978
  }
1839
- function C(t) {
1840
- return function(a, i) {
1841
- if (!m(i) || !i.length) return t(a, i);
1842
- for (var g = 0, d = i.length; g < d; g++)
1843
- if (t(a, D(i, g))) return !0;
1979
+ function y(t) {
1980
+ return function(A, l) {
1981
+ if (!m(l) || !l.length) return t(A, l);
1982
+ for (var g = 0, d = l.length; g < d; g++)
1983
+ if (t(A, D(l, g))) return !0;
1844
1984
  return !1;
1845
1985
  };
1846
1986
  }
1847
- function P(t) {
1848
- return function(a, i) {
1849
- if (!m(i) || !i.length) return t(a, i);
1850
- for (var g = 0, d = i.length; g < d; g++)
1851
- if (!t(a, D(i, g))) return !1;
1987
+ function H(t) {
1988
+ return function(A, l) {
1989
+ if (!m(l) || !l.length) return t(A, l);
1990
+ for (var g = 0, d = l.length; g < d; g++)
1991
+ if (!t(A, D(l, g))) return !1;
1852
1992
  return !0;
1853
1993
  };
1854
1994
  }
1855
- function h(t, a, i, g) {
1856
- return t.validate(t.options, a, i, g);
1995
+ function h(t, A, l, g) {
1996
+ return t.validate(t.options, A, l, g);
1857
1997
  }
1858
1998
  var j = {
1859
- $eq: C(function(t, a) {
1860
- return t(a);
1999
+ $eq: y(function(t, A) {
2000
+ return t(A);
1861
2001
  }),
1862
- $ne: P(function(t, a) {
1863
- return t(a);
2002
+ $ne: H(function(t, A) {
2003
+ return t(A);
1864
2004
  }),
1865
- $gt: C(function(t, a) {
1866
- return t(a);
2005
+ $gt: y(function(t, A) {
2006
+ return t(A);
1867
2007
  }),
1868
- $gte: C(function(t, a) {
1869
- return t(a);
2008
+ $gte: y(function(t, A) {
2009
+ return t(A);
1870
2010
  }),
1871
- $lt: C(function(t, a) {
1872
- return t(a);
2011
+ $lt: y(function(t, A) {
2012
+ return t(A);
1873
2013
  }),
1874
- $lte: C(function(t, a) {
1875
- return t(a);
2014
+ $lte: y(function(t, A) {
2015
+ return t(A);
1876
2016
  }),
1877
- $mod: C(function(t, a) {
1878
- return t(a);
2017
+ $mod: y(function(t, A) {
2018
+ return t(A);
1879
2019
  }),
1880
- $in: function(t, a) {
1881
- return t(a);
2020
+ $in: function(t, A) {
2021
+ return t(A);
1882
2022
  },
1883
- $nin: function(t, a) {
1884
- return t(a);
2023
+ $nin: function(t, A) {
2024
+ return t(A);
1885
2025
  },
1886
- $not: function(t, a, i, g) {
1887
- return t(a, i, g);
2026
+ $not: function(t, A, l, g) {
2027
+ return t(A, l, g);
1888
2028
  },
1889
- $type: function(t, a) {
1890
- return t(a);
2029
+ $type: function(t, A) {
2030
+ return t(A);
1891
2031
  },
1892
- $all: function(t, a, i, g) {
1893
- return j.$and(t, a, i, g);
2032
+ $all: function(t, A, l, g) {
2033
+ return j.$and(t, A, l, g);
1894
2034
  },
1895
- $size: function(t, a) {
1896
- return !!a && t === a.length;
2035
+ $size: function(t, A) {
2036
+ return !!A && t === A.length;
1897
2037
  },
1898
- $or: function(t, a, i, g) {
2038
+ $or: function(t, A, l, g) {
1899
2039
  for (var d = 0, p = t.length; d < p; d++)
1900
- if (h(D(t, d), a, i, g)) return !0;
2040
+ if (h(D(t, d), A, l, g)) return !0;
1901
2041
  return !1;
1902
2042
  },
1903
- $nor: function(t, a, i, g) {
1904
- return !j.$or(t, a, i, g);
2043
+ $nor: function(t, A, l, g) {
2044
+ return !j.$or(t, A, l, g);
1905
2045
  },
1906
- $and: function(t, a, i, g) {
2046
+ $and: function(t, A, l, g) {
1907
2047
  for (var d = 0, p = t.length; d < p; d++)
1908
- if (!h(D(t, d), a, i, g)) return !1;
2048
+ if (!h(D(t, d), A, l, g)) return !1;
1909
2049
  return !0;
1910
2050
  },
1911
- $regex: C(function(t, a) {
1912
- return typeof a == "string" && t.test(a);
2051
+ $regex: y(function(t, A) {
2052
+ return typeof A == "string" && t.test(A);
1913
2053
  }),
1914
- $where: function(t, a, i, g) {
1915
- return t.call(a, a, i, g);
2054
+ $where: function(t, A, l, g) {
2055
+ return t.call(A, A, l, g);
1916
2056
  },
1917
- $elemMatch: function(t, a, i, g) {
1918
- return m(a) ? !!~function(d, p) {
2057
+ $elemMatch: function(t, A, l, g) {
2058
+ return m(A) ? !!~function(d, p) {
1919
2059
  for (var f = 0; f < d.length; f++)
1920
2060
  if (D(d, f), h(p, D(d, f))) return f;
1921
2061
  return -1;
1922
- }(a, t) : h(t, a, i, g);
2062
+ }(A, t) : h(t, A, l, g);
1923
2063
  },
1924
- $exists: function(t, a, i, g) {
1925
- return g.hasOwnProperty(i) === t;
2064
+ $exists: function(t, A, l, g) {
2065
+ return g.hasOwnProperty(l) === t;
1926
2066
  }
1927
2067
  }, q = {
1928
- $eq: function(t, a, i) {
1929
- var g = i.comparable, d = i.compare;
1930
- return t instanceof RegExp ? C(function(p) {
2068
+ $eq: function(t, A, l) {
2069
+ var g = l.comparable, d = l.compare;
2070
+ return t instanceof RegExp ? y(function(p) {
1931
2071
  return typeof p == "string" && t.test(p);
1932
- }) : t instanceof Function ? C(t) : m(t) && !t.length ? C(function(p) {
2072
+ }) : t instanceof Function ? y(t) : m(t) && !t.length ? y(function(p) {
1933
2073
  return m(p) && !p.length;
1934
- }) : C(
2074
+ }) : y(
1935
2075
  t === null ? function(p) {
1936
2076
  return p == null;
1937
2077
  } : function(p) {
@@ -1939,32 +2079,32 @@ var Le = { exports: {} };
1939
2079
  }
1940
2080
  );
1941
2081
  },
1942
- $gt: function(t, a, i) {
1943
- var g = i.comparable, d = i.compare;
2082
+ $gt: function(t, A, l) {
2083
+ var g = l.comparable, d = l.compare;
1944
2084
  return function(p) {
1945
2085
  return d(g(p), g(t)) > 0;
1946
2086
  };
1947
2087
  },
1948
- $gte: function(t, a, i) {
1949
- var g = i.comparable, d = i.compare;
2088
+ $gte: function(t, A, l) {
2089
+ var g = l.comparable, d = l.compare;
1950
2090
  return function(p) {
1951
2091
  return d(g(p), g(t)) >= 0;
1952
2092
  };
1953
2093
  },
1954
- $lt: function(t, a, i) {
1955
- var g = i.comparable, d = i.compare;
2094
+ $lt: function(t, A, l) {
2095
+ var g = l.comparable, d = l.compare;
1956
2096
  return function(p) {
1957
2097
  return d(g(p), g(t)) < 0;
1958
2098
  };
1959
2099
  },
1960
- $lte: function(t, a, i) {
1961
- var g = i.comparable, d = i.compare;
2100
+ $lte: function(t, A, l) {
2101
+ var g = l.comparable, d = l.compare;
1962
2102
  return function(p) {
1963
2103
  return d(g(p), g(t)) <= 0;
1964
2104
  };
1965
2105
  },
1966
- $in: function(t, a, i) {
1967
- var g = i.comparable;
2106
+ $in: function(t, A, l) {
2107
+ var g = l.comparable;
1968
2108
  return function(d) {
1969
2109
  if (!(d instanceof Array)) {
1970
2110
  var p = g(d);
@@ -1977,7 +2117,7 @@ var Le = { exports: {} };
1977
2117
  for (M = t.length; M--; ) if (t[M] == null) return !0;
1978
2118
  }
1979
2119
  for (M = t.length; M--; ) {
1980
- var f = h(de(D(t, M), i), p, M, t);
2120
+ var f = h(de(D(t, M), l), p, M, t);
1981
2121
  if (f && String(f) !== "[object Object]" && String(p) !== "[object Object]")
1982
2122
  return !0;
1983
2123
  }
@@ -1988,48 +2128,48 @@ var Le = { exports: {} };
1988
2128
  return !1;
1989
2129
  };
1990
2130
  },
1991
- $nin: function(t, a, i) {
1992
- var g = q.$in(t, a, i);
2131
+ $nin: function(t, A, l) {
2132
+ var g = q.$in(t, A, l);
1993
2133
  return function(d, p, f, M) {
1994
2134
  return !g(d, p, f, M);
1995
2135
  };
1996
2136
  },
1997
2137
  $mod: function(t) {
1998
- return function(a) {
1999
- return a % t[0] == t[1];
2138
+ return function(A) {
2139
+ return A % t[0] == t[1];
2000
2140
  };
2001
2141
  },
2002
- $ne: function(t, a, i) {
2003
- var g = q.$eq(t, a, i);
2004
- return P(function(d, p, f, M) {
2142
+ $ne: function(t, A, l) {
2143
+ var g = q.$eq(t, A, l);
2144
+ return H(function(d, p, f, M) {
2005
2145
  return !g(d, p, f, M);
2006
2146
  });
2007
2147
  },
2008
- $and: function(t, a, i) {
2009
- return t.map(I(i));
2148
+ $and: function(t, A, l) {
2149
+ return t.map(I(l));
2010
2150
  },
2011
- $all: function(t, a, i) {
2012
- return q.$and(t, a, i);
2151
+ $all: function(t, A, l) {
2152
+ return q.$and(t, A, l);
2013
2153
  },
2014
- $or: function(t, a, i) {
2015
- return t.map(I(i));
2154
+ $or: function(t, A, l) {
2155
+ return t.map(I(l));
2016
2156
  },
2017
- $nor: function(t, a, i) {
2018
- return t.map(I(i));
2157
+ $nor: function(t, A, l) {
2158
+ return t.map(I(l));
2019
2159
  },
2020
- $not: function(t, a, i) {
2021
- var g = I(i)(t);
2160
+ $not: function(t, A, l) {
2161
+ var g = I(l)(t);
2022
2162
  return function(d, p, f) {
2023
2163
  return !h(g, d, p, f);
2024
2164
  };
2025
2165
  },
2026
2166
  $type: function(t) {
2027
- return function(a, i, g) {
2028
- return a != null && (a instanceof t || a.constructor == t);
2167
+ return function(A, l, g) {
2168
+ return A != null && (A instanceof t || A.constructor == t);
2029
2169
  };
2030
2170
  },
2031
- $regex: function(t, a) {
2032
- return new RegExp(t, a.$options);
2171
+ $regex: function(t, A) {
2172
+ return new RegExp(t, A.$options);
2033
2173
  },
2034
2174
  $where: function(t) {
2035
2175
  if (typeof t == "function") return t;
@@ -2037,106 +2177,106 @@ var Le = { exports: {} };
2037
2177
  'In CSP mode, sift does not support strings in "$where" condition'
2038
2178
  );
2039
2179
  },
2040
- $elemMatch: function(t, a, i) {
2041
- return I(i)(t);
2180
+ $elemMatch: function(t, A, l) {
2181
+ return I(l)(t);
2042
2182
  },
2043
2183
  $exists: function(t) {
2044
2184
  return !!t;
2045
2185
  }
2046
2186
  };
2047
- function H(t, a) {
2048
- return { options: t, validate: a };
2187
+ function Q(t, A) {
2188
+ return { options: t, validate: A };
2049
2189
  }
2050
- function ct(t, a) {
2051
- var i = t.keyPath, g = t.child, d = t.query, p = [];
2052
- if (function pe(F, U, R, ut, se) {
2053
- if (R === U.length || F == null)
2054
- return void se.push([F, U[R - 1], ut]);
2190
+ function ct(t, A) {
2191
+ var l = t.keyPath, g = t.child, d = t.query, p = [];
2192
+ if (function pe(X, U, R, ut, se) {
2193
+ if (R === U.length || X == null)
2194
+ return void se.push([X, U[R - 1], ut]);
2055
2195
  var be = D(U, R);
2056
- if (m(F) && isNaN(Number(be)))
2057
- for (var re = 0, gt = F.length; re < gt; re++) pe(D(F, re), U, R, F, se);
2058
- else pe(D(F, be), U, R + 1, F, se);
2059
- }(a, i, 0, a, p), p.length === 1) {
2196
+ if (m(X) && isNaN(Number(be)))
2197
+ for (var re = 0, gt = X.length; re < gt; re++) pe(D(X, re), U, R, X, se);
2198
+ else pe(D(X, be), U, R + 1, X, se);
2199
+ }(A, l, 0, A, p), p.length === 1) {
2060
2200
  var f = p[0];
2061
2201
  return h(g, f[0], f[1], f[2]);
2062
2202
  }
2063
- for (var M = d && d.$ne !== void 0, G = M, E = 0; E < p.length; E++) {
2064
- var Q = p[E], J = h(g, Q[0], Q[1], Q[2]);
2065
- M ? G &= J : G |= J;
2203
+ for (var M = d && d.$ne !== void 0, Y = M, E = 0; E < p.length; E++) {
2204
+ var P = p[E], J = h(g, P[0], P[1], P[2]);
2205
+ M ? Y &= J : Y |= J;
2066
2206
  }
2067
- return G;
2207
+ return Y;
2068
2208
  }
2069
- function it(t, a, i) {
2070
- return H({ keyPath: t, child: a, query: i }, ct);
2209
+ function it(t, A, l) {
2210
+ return Q({ keyPath: t, child: A, query: l }, ct);
2071
2211
  }
2072
2212
  function I(t) {
2073
- var a = t.comparable, i = t.expressions, g = function(f) {
2213
+ var A = t.comparable, l = t.expressions, g = function(f) {
2074
2214
  var M;
2075
2215
  return (!f || !(M = f) || M.constructor !== Object && M.constructor !== Array && M.constructor.toString() !== "function Object() { [native code] }" && M.constructor.toString() !== "function Array() { [native code] }" || M.toJSON) && (f = { $eq: f }), f;
2076
2216
  }, d = function(f) {
2077
- f = a(f);
2217
+ f = A(f);
2078
2218
  var M = [];
2079
- for (var G in f) {
2080
- var E = f[G];
2081
- if (G !== "$options") {
2082
- var Q = j[G] || t && i && i[G];
2083
- if (Q) q[G] && (E = q[G](E, f, t)), M.push(H(a(E), Q));
2219
+ for (var Y in f) {
2220
+ var E = f[Y];
2221
+ if (Y !== "$options") {
2222
+ var P = j[Y] || t && l && l[Y];
2223
+ if (P) q[Y] && (E = q[Y](E, f, t)), M.push(Q(A(E), P));
2084
2224
  else {
2085
- if (G.charCodeAt(0) === 36)
2086
- throw new Error("Unknown operation " + G);
2087
- var J = G.split(".");
2225
+ if (Y.charCodeAt(0) === 36)
2226
+ throw new Error("Unknown operation " + Y);
2227
+ var J = Y.split(".");
2088
2228
  M.push(it(J, p(E), E));
2089
2229
  }
2090
2230
  }
2091
2231
  }
2092
- return M.length === 1 ? M[0] : H(M, j.$and);
2232
+ return M.length === 1 ? M[0] : Q(M, j.$and);
2093
2233
  }, p = function(f) {
2094
- return f = g(f), function M(G, E) {
2095
- if (!b(G)) return E;
2096
- for (var Q in G) E.push(Q), M(G[Q], E);
2234
+ return f = g(f), function M(Y, E) {
2235
+ if (!b(Y)) return E;
2236
+ for (var P in Y) E.push(P), M(Y[P], E);
2097
2237
  return E;
2098
- }(f, []).join(",").search(/[$.]/) === -1 ? H(f, K) : d(f);
2238
+ }(f, []).join(",").search(/[$.]/) === -1 ? Q(f, K) : d(f);
2099
2239
  };
2100
2240
  return function(f) {
2101
2241
  return d(g(f));
2102
2242
  };
2103
2243
  }
2104
- function K(t, a) {
2105
- if (Object.prototype.toString.call(t) !== Object.prototype.toString.call(a))
2244
+ function K(t, A) {
2245
+ if (Object.prototype.toString.call(t) !== Object.prototype.toString.call(A))
2106
2246
  return !1;
2107
2247
  if (b(t)) {
2108
- if (Object.keys(t).length !== Object.keys(a).length) return !1;
2109
- for (var i in t) if (!K(t[i], a[i])) return !1;
2248
+ if (Object.keys(t).length !== Object.keys(A).length) return !1;
2249
+ for (var l in t) if (!K(t[l], A[l])) return !1;
2110
2250
  return !0;
2111
2251
  }
2112
2252
  if (m(t)) {
2113
- if (t.length !== a.length) return !1;
2253
+ if (t.length !== A.length) return !1;
2114
2254
  for (var g = 0, d = t.length; g < d; g++)
2115
- if (!K(t[g], a[g])) return !1;
2255
+ if (!K(t[g], A[g])) return !1;
2116
2256
  return !0;
2117
2257
  }
2118
- return t === a;
2258
+ return t === A;
2119
2259
  }
2120
- function de(t, a) {
2121
- var i = I(a)(t);
2122
- return a && a.select && (i = {
2123
- options: i,
2260
+ function de(t, A) {
2261
+ var l = I(A)(t);
2262
+ return A && A.select && (l = {
2263
+ options: l,
2124
2264
  validate: function(g, d, p, f) {
2125
- return h(g, d && a.select(d), p, f);
2265
+ return h(g, d && A.select(d), p, f);
2126
2266
  }
2127
- }), i;
2267
+ }), l;
2128
2268
  }
2129
- function lt(t, a) {
2130
- var i = de(t, a = Object.assign({ compare: Be, comparable: te }, a));
2269
+ function lt(t, A) {
2270
+ var l = de(t, A = Object.assign({ compare: Be, comparable: te }, A));
2131
2271
  return function(g, d, p) {
2132
- return h(i, g, d, p);
2272
+ return h(l, g, d, p);
2133
2273
  };
2134
2274
  }
2135
- function Be(t, a) {
2136
- if (K(t, a)) return 0;
2137
- if (n(t) === n(a)) {
2138
- if (t > a) return 1;
2139
- if (t < a) return -1;
2275
+ function Be(t, A) {
2276
+ if (K(t, A)) return 0;
2277
+ if (n(t) === n(A)) {
2278
+ if (t > A) return 1;
2279
+ if (t < A) return -1;
2140
2280
  }
2141
2281
  }
2142
2282
  function te(t) {
@@ -2160,14 +2300,14 @@ function us(e, o, c) {
2160
2300
  function gs(e, o) {
2161
2301
  e.prototype = Object.create(o.prototype), e.prototype.constructor = e, e.__proto__ = o;
2162
2302
  }
2163
- function ae(e) {
2164
- return ae = Object.setPrototypeOf ? Object.getPrototypeOf : function(c) {
2303
+ function Ae(e) {
2304
+ return Ae = Object.setPrototypeOf ? Object.getPrototypeOf : function(c) {
2165
2305
  return c.__proto__ || Object.getPrototypeOf(c);
2166
- }, ae(e);
2306
+ }, Ae(e);
2167
2307
  }
2168
2308
  function _(e, o) {
2169
- return _ = Object.setPrototypeOf || function(r, A) {
2170
- return r.__proto__ = A, r;
2309
+ return _ = Object.setPrototypeOf || function(r, a) {
2310
+ return r.__proto__ = a, r;
2171
2311
  }, _(e, o);
2172
2312
  }
2173
2313
  function ms() {
@@ -2181,10 +2321,10 @@ function ms() {
2181
2321
  }
2182
2322
  }
2183
2323
  function L(e, o, c) {
2184
- return ms() ? L = Reflect.construct : L = function(A, n, u) {
2324
+ return ms() ? L = Reflect.construct : L = function(a, n, u) {
2185
2325
  var m = [null];
2186
2326
  m.push.apply(m, n);
2187
- var b = Function.bind.apply(A, m), v = new b();
2327
+ var b = Function.bind.apply(a, m), v = new b();
2188
2328
  return u && _(v, u.prototype), v;
2189
2329
  }, L.apply(null, arguments);
2190
2330
  }
@@ -2199,19 +2339,19 @@ function ne(e) {
2199
2339
  throw new TypeError("Super expression must either be null or a function");
2200
2340
  if (typeof o < "u") {
2201
2341
  if (o.has(r)) return o.get(r);
2202
- o.set(r, A);
2342
+ o.set(r, a);
2203
2343
  }
2204
- function A() {
2205
- return L(r, arguments, ae(this).constructor);
2344
+ function a() {
2345
+ return L(r, arguments, Ae(this).constructor);
2206
2346
  }
2207
- return A.prototype = Object.create(r.prototype, {
2347
+ return a.prototype = Object.create(r.prototype, {
2208
2348
  constructor: {
2209
- value: A,
2349
+ value: a,
2210
2350
  enumerable: !1,
2211
2351
  writable: !0,
2212
2352
  configurable: !0
2213
2353
  }
2214
- }), _(A, r);
2354
+ }), _(a, r);
2215
2355
  }, ne(e);
2216
2356
  }
2217
2357
  function ve(e) {
@@ -2222,30 +2362,30 @@ function ve(e) {
2222
2362
  var Se = function(o) {
2223
2363
  return 'Cannot execute "' + o.action + '" on "' + o.subjectName + '"';
2224
2364
  }, k = Se, Bs = /* @__PURE__ */ function(e) {
2225
- gs(o, e), o.setDefaultMessage = function(A) {
2226
- A === null ? k = Se : k = typeof A == "string" ? function() {
2227
- return A;
2228
- } : A;
2229
- }, o.from = function(A) {
2365
+ gs(o, e), o.setDefaultMessage = function(a) {
2366
+ a === null ? k = Se : k = typeof a == "string" ? function() {
2367
+ return a;
2368
+ } : a;
2369
+ }, o.from = function(a) {
2230
2370
  var n = new this("");
2231
2371
  return Object.defineProperty(n, "ability", {
2232
- value: A
2372
+ value: a
2233
2373
  }), n;
2234
2374
  };
2235
- function o(r, A) {
2375
+ function o(r, a) {
2236
2376
  var n;
2237
- return A === void 0 && (A = {}), n = e.call(this, r) || this, n._setMetadata(A), n.message = r || k(ve(n)), n._customMessage = null, typeof Error.captureStackTrace == "function" && (n.name = n.constructor.name, Error.captureStackTrace(ve(n), n.constructor)), n;
2377
+ return a === void 0 && (a = {}), n = e.call(this, r) || this, n._setMetadata(a), n.message = r || k(ve(n)), n._customMessage = null, typeof Error.captureStackTrace == "function" && (n.name = n.constructor.name, Error.captureStackTrace(ve(n), n.constructor)), n;
2238
2378
  }
2239
2379
  var c = o.prototype;
2240
- return c.setMessage = function(A) {
2241
- return this._customMessage = A, this;
2242
- }, c.throwUnlessCan = function(A, n, u) {
2380
+ return c.setMessage = function(a) {
2381
+ return this._customMessage = a, this;
2382
+ }, c.throwUnlessCan = function(a, n, u) {
2243
2383
  if (!this.ability)
2244
2384
  throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
2245
- var m = this.ability.relevantRuleFor(A, n, u);
2385
+ var m = this.ability.relevantRuleFor(a, n, u);
2246
2386
  if (!(m && !m.inverted)) {
2247
2387
  this._setMetadata({
2248
- action: A,
2388
+ action: a,
2249
2389
  subject: n,
2250
2390
  field: u,
2251
2391
  subjectName: this.ability.subjectName(n)
@@ -2253,8 +2393,8 @@ var Se = function(o) {
2253
2393
  var b = m ? m.reason : "";
2254
2394
  throw this.message = this._customMessage || b || k(this), this;
2255
2395
  }
2256
- }, c._setMetadata = function(A) {
2257
- this.subject = A.subject, this.subjectName = A.subjectName, this.action = A.action, this.field = A.field;
2396
+ }, c._setMetadata = function(a) {
2397
+ this.subject = a.subject, this.subjectName = a.subjectName, this.action = a.action, this.field = a.field;
2258
2398
  }, o;
2259
2399
  }(ne(Error));
2260
2400
  function oe(e) {
@@ -2271,15 +2411,15 @@ function bs(e) {
2271
2411
  }
2272
2412
  var fs = /[-/\\^$+?.()|[\]{}]/g, ws = /\.?\*+\.?/g, Ds = /\*+/, Ms = /\./g;
2273
2413
  function vs(e, o, c) {
2274
- var r = c[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", A = e.indexOf("**") === -1 ? "[^.]" : ".", n = e.replace(Ms, "\\$&").replace(Ds, A + r);
2414
+ var r = c[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", a = e.indexOf("**") === -1 ? "[^.]" : ".", n = e.replace(Ms, "\\$&").replace(Ds, a + r);
2275
2415
  return o + e.length === c.length ? "(?:" + n + ")?" : n;
2276
2416
  }
2277
- function Cs(e, o, c) {
2417
+ function ys(e, o, c) {
2278
2418
  return e === "." && (c[o - 1] === "*" || c[o + 1] === "*") ? e : "\\" + e;
2279
2419
  }
2280
- function Ys(e) {
2420
+ function Cs(e) {
2281
2421
  var o = e.map(function(r) {
2282
- return r.replace(fs, Cs).replace(ws, vs);
2422
+ return r.replace(fs, ys).replace(ws, vs);
2283
2423
  }), c = o.length > 1 ? "(?:" + o.join("|") + ")" : o[0];
2284
2424
  return new RegExp("^" + c + "$");
2285
2425
  }
@@ -2295,24 +2435,24 @@ var hs = /* @__PURE__ */ function() {
2295
2435
  var o = e.prototype;
2296
2436
  return o.matches = function(r) {
2297
2437
  return this._matches ? typeof r == "string" ? !this.inverted : this._matches(r) : !0;
2298
- }, o.isRelevantFor = function(r, A) {
2299
- return this.fields ? A ? this.matchesField(A) : !this.inverted : !0;
2438
+ }, o.isRelevantFor = function(r, a) {
2439
+ return this.fields ? a ? this.matchesField(a) : !this.inverted : !0;
2300
2440
  }, o.matchesField = function(r) {
2301
- return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Ys(this.fields)), this._fieldsPattern === null || r.indexOf("*") !== -1 ? this.fields.indexOf(r) !== -1 : this._fieldsPattern.test(r);
2441
+ return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Cs(this.fields)), this._fieldsPattern === null || r.indexOf("*") !== -1 ? this.fields.indexOf(r) !== -1 : this._fieldsPattern.test(r);
2302
2442
  }, e;
2303
- }(), x = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), Ce = {
2443
+ }(), x = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), ye = {
2304
2444
  crud: ["create", "read", "update", "delete"]
2305
2445
  };
2306
- function Ye(e, o) {
2446
+ function Ce(e, o) {
2307
2447
  return e === o || Array.isArray(o) && o.indexOf(e) !== -1;
2308
2448
  }
2309
- var Gs = /* @__PURE__ */ function() {
2310
- e.addAlias = function(r, A) {
2311
- if (r === "manage" || Ye("manage", A))
2449
+ var Ys = /* @__PURE__ */ function() {
2450
+ e.addAlias = function(r, a) {
2451
+ if (r === "manage" || Ce("manage", a))
2312
2452
  throw new Error('Cannot add alias for "manage" action because it represents any action');
2313
- if (Ye(r, A))
2314
- throw new Error("Attempt to alias action to itself: " + r + " -> " + A.toString());
2315
- return Ce[r] = A, this;
2453
+ if (Ce(r, a))
2454
+ throw new Error("Attempt to alias action to itself: " + r + " -> " + a.toString());
2455
+ return ye[r] = a, this;
2316
2456
  };
2317
2457
  function e(c, r) {
2318
2458
  r === void 0 && (r = {}), Object.defineProperty(this, "subjectName", {
@@ -2324,67 +2464,67 @@ var Gs = /* @__PURE__ */ function() {
2324
2464
  indexedRules: /* @__PURE__ */ Object.create(null),
2325
2465
  mergedRules: /* @__PURE__ */ Object.create(null),
2326
2466
  events: {},
2327
- aliases: bs(Ce)
2467
+ aliases: bs(ye)
2328
2468
  }, this.update(c);
2329
2469
  }
2330
2470
  var o = e.prototype;
2331
2471
  return o.update = function(r) {
2332
2472
  if (!Array.isArray(r))
2333
2473
  return this;
2334
- var A = {
2474
+ var a = {
2335
2475
  rules: r,
2336
2476
  ability: this
2337
2477
  };
2338
- this.emit("update", A), this[x].originalRules = r.slice(0), this[x].mergedRules = /* @__PURE__ */ Object.create(null);
2478
+ this.emit("update", a), this[x].originalRules = r.slice(0), this[x].mergedRules = /* @__PURE__ */ Object.create(null);
2339
2479
  var n = this.buildIndexFor(r);
2340
- return this[x].indexedRules = n.rules, this[x].hasPerFieldRules = n.hasPerFieldRules, this.emit("updated", A), this;
2480
+ return this[x].indexedRules = n.rules, this[x].hasPerFieldRules = n.hasPerFieldRules, this.emit("updated", a), this;
2341
2481
  }, o.buildIndexFor = function(r) {
2342
- for (var A = /* @__PURE__ */ Object.create(null), n = this[x].RuleType, u = !0, m = !1, b = 0; b < r.length; b++) {
2343
- var v = new n(r[b]), D = this.expandActions(v.actions), C = oe(v.subject), P = r.length - b - 1;
2482
+ for (var a = /* @__PURE__ */ Object.create(null), n = this[x].RuleType, u = !0, m = !1, b = 0; b < r.length; b++) {
2483
+ var v = new n(r[b]), D = this.expandActions(v.actions), y = oe(v.subject), H = r.length - b - 1;
2344
2484
  u = !!(u && v.inverted), !m && v.fields && (m = !0);
2345
- for (var h = 0; h < C.length; h++) {
2346
- var j = C[h];
2347
- A[j] = A[j] || /* @__PURE__ */ Object.create(null);
2485
+ for (var h = 0; h < y.length; h++) {
2486
+ var j = y[h];
2487
+ a[j] = a[j] || /* @__PURE__ */ Object.create(null);
2348
2488
  for (var q = 0; q < D.length; q++) {
2349
- var H = D[q];
2350
- A[j][H] = A[j][H] || /* @__PURE__ */ Object.create(null), A[j][H][P] = v;
2489
+ var Q = D[q];
2490
+ a[j][Q] = a[j][Q] || /* @__PURE__ */ Object.create(null), a[j][Q][H] = v;
2351
2491
  }
2352
2492
  }
2353
2493
  }
2354
2494
  return {
2355
2495
  isAllInverted: u,
2356
2496
  hasPerFieldRules: m,
2357
- rules: A
2497
+ rules: a
2358
2498
  };
2359
2499
  }, o.expandActions = function(r) {
2360
- for (var A = this[x].aliases, n = oe(r), u = 0; u < n.length; ) {
2500
+ for (var a = this[x].aliases, n = oe(r), u = 0; u < n.length; ) {
2361
2501
  var m = n[u++];
2362
- A.hasOwnProperty(m) && (n = n.concat(A[m]));
2502
+ a.hasOwnProperty(m) && (n = n.concat(a[m]));
2363
2503
  }
2364
2504
  return n;
2365
- }, o.can = function(r, A, n) {
2505
+ }, o.can = function(r, a, n) {
2366
2506
  if (n && typeof n != "string")
2367
2507
  throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
2368
- var u = this.relevantRuleFor(r, A, n);
2508
+ var u = this.relevantRuleFor(r, a, n);
2369
2509
  return !!u && !u.inverted;
2370
- }, o.relevantRuleFor = function(r, A, n) {
2371
- for (var u = this.rulesFor(r, A, n), m = 0; m < u.length; m++)
2372
- if (u[m].matches(A))
2510
+ }, o.relevantRuleFor = function(r, a, n) {
2511
+ for (var u = this.rulesFor(r, a, n), m = 0; m < u.length; m++)
2512
+ if (u[m].matches(a))
2373
2513
  return u[m];
2374
2514
  return null;
2375
- }, o.possibleRulesFor = function(r, A) {
2376
- var n = this.subjectName(A), u = this[x].mergedRules, m = n + "_" + r;
2515
+ }, o.possibleRulesFor = function(r, a) {
2516
+ var n = this.subjectName(a), u = this[x].mergedRules, m = n + "_" + r;
2377
2517
  return u[m] || (u[m] = this.mergeRulesFor(r, n)), u[m];
2378
- }, o.mergeRulesFor = function(r, A) {
2379
- var n = this[x].indexedRules, u = [A, "all"].reduce(function(m, b) {
2518
+ }, o.mergeRulesFor = function(r, a) {
2519
+ var n = this[x].indexedRules, u = [a, "all"].reduce(function(m, b) {
2380
2520
  var v = n[b];
2381
2521
  return v ? Object.assign(m, v[r], v.manage) : m;
2382
2522
  }, []);
2383
2523
  return u.filter(Boolean);
2384
- }, o.rulesFor = function(r, A, n) {
2385
- var u = this.possibleRulesFor(r, A);
2524
+ }, o.rulesFor = function(r, a, n) {
2525
+ var u = this.possibleRulesFor(r, a);
2386
2526
  return this[x].hasPerFieldRules ? u.filter(function(m) {
2387
- return m.isRelevantFor(A, n);
2527
+ return m.isRelevantFor(a, n);
2388
2528
  }) : u;
2389
2529
  }, o.cannot = function() {
2390
2530
  return !this.can.apply(this, arguments);
@@ -2394,18 +2534,18 @@ var Gs = /* @__PURE__ */ function() {
2394
2534
  Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
2395
2535
  Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
2396
2536
  `.trim()), (r = Bs.from(this)).throwUnlessCan.apply(r, arguments);
2397
- }, o.on = function(r, A) {
2537
+ }, o.on = function(r, a) {
2398
2538
  var n = this[x].events, u = !0;
2399
- return n[r] || (n[r] = []), n[r].push(A), function() {
2539
+ return n[r] || (n[r] = []), n[r].push(a), function() {
2400
2540
  if (u) {
2401
- var m = n[r].indexOf(A);
2541
+ var m = n[r].indexOf(a);
2402
2542
  n[r].splice(m, 1), u = !1;
2403
2543
  }
2404
2544
  };
2405
- }, o.emit = function(r, A) {
2545
+ }, o.emit = function(r, a) {
2406
2546
  var n = this[x].events[r];
2407
2547
  n && n.slice(0).forEach(function(u) {
2408
- return u(A);
2548
+ return u(a);
2409
2549
  });
2410
2550
  }, us(e, [{
2411
2551
  key: "rules",
@@ -2413,274 +2553,310 @@ var Gs = /* @__PURE__ */ function() {
2413
2553
  return this[x].originalRules;
2414
2554
  }
2415
2555
  }]), e;
2416
- }(), s = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(s || {}), l = /* @__PURE__ */ ((e) => (e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu = "business::menu", e.restaurant = "business::restaurant", e.role = "business::role", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e))(l || {}), Y = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(Y || {}), _e = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(_e || {});
2556
+ }(), s = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(s || {}), i = /* @__PURE__ */ ((e) => (e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.payment = "business::payment", e.payment_payoutAccount = "business::payment::payoutAccount", e.payment_paymentOnboarding = "business::payment::paymentOnboarding", e.payment_transactions = "business::payment::transactions", e.payment_settlements = "business::payment::settlements", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu = "business::menu", e.restaurant = "business::restaurant", e.role = "business::role", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e))(i || {}), C = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(C || {}), _e = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(_e || {});
2417
2557
  const w = {
2418
2558
  general: "General",
2419
2559
  inventory: "Inventory",
2420
2560
  hrm: "HRM",
2421
2561
  crm: "CRM",
2562
+ payment: "Payment",
2422
2563
  report: "Report",
2423
2564
  reports: "Default Report",
2424
2565
  customReports: "Custom Report"
2425
- }, ys = "access-denied", S = {
2566
+ }, qr = [
2567
+ { key: "all", label: "All", subjectPrefixes: [] },
2568
+ { key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
2569
+ { key: "report", label: "Report", subjectPrefixes: ["business::report", "report"] },
2570
+ { key: "hrm", label: "HRM", subjectPrefixes: ["business::hrm", "hrm"] },
2571
+ { key: "payment", label: "Payment", subjectPrefixes: ["business::payment", "payment"] }
2572
+ // Add more as modules are revamped with new actionguard:
2573
+ // { key: 'menu', label: 'Menu', subjectPrefixes: ['business::menu'] },
2574
+ // { key: 'crm', label: 'CRM', subjectPrefixes: ['business::crm'] },
2575
+ // { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
2576
+ ], Gs = "access-denied", S = {
2426
2577
  Action: s,
2427
2578
  Subject: {
2428
- Business: l,
2579
+ Business: i,
2429
2580
  Restaurant: _e
2430
2581
  }
2431
2582
  }, $e = {
2432
- [Y.permission]: l.hrm_teamMember,
2433
- [Y.promotion]: l.crm_promotion,
2434
- [Y.voucher]: l.crm_voucher,
2435
- [Y.membership]: l.crm_membership,
2436
- [Y.stock]: l.inventory_stock,
2437
- [Y.wastageTemplate]: l.inventory_wastageTemplate,
2438
- [Y.closingTemplate]: l.inventory_closingTemplate,
2439
- [Y.orderTemplate]: l.inventory_orderTemplate,
2440
- [Y.ingredient]: l.inventory_ingredient,
2441
- [Y.recipe]: l.inventory_recipe,
2442
- [Y.unit]: l.inventory_unit,
2443
- [Y.supplier]: l.inventory_supplier,
2444
- [Y.warehouse]: l.inventory_warehouse,
2445
- [Y.publish]: l.inventory_publish,
2446
- [Y.integration]: l.inventory_integration,
2447
- [Y.orderDraft]: l.inventory_orderDraftApproval,
2448
- [Y.unitCostHistory]: l.inventory_unitCostHistory
2583
+ [C.permission]: i.hrm_teamMember,
2584
+ [C.promotion]: i.crm_promotion,
2585
+ [C.voucher]: i.crm_voucher,
2586
+ [C.membership]: i.crm_membership,
2587
+ [C.stock]: i.inventory_stock,
2588
+ [C.wastageTemplate]: i.inventory_wastageTemplate,
2589
+ [C.closingTemplate]: i.inventory_closingTemplate,
2590
+ [C.orderTemplate]: i.inventory_orderTemplate,
2591
+ [C.ingredient]: i.inventory_ingredient,
2592
+ [C.recipe]: i.inventory_recipe,
2593
+ [C.unit]: i.inventory_unit,
2594
+ [C.supplier]: i.inventory_supplier,
2595
+ [C.warehouse]: i.inventory_warehouse,
2596
+ [C.publish]: i.inventory_publish,
2597
+ [C.integration]: i.inventory_integration,
2598
+ [C.orderDraft]: i.inventory_orderDraftApproval,
2599
+ [C.unitCostHistory]: i.inventory_unitCostHistory
2449
2600
  };
2450
2601
  function Vs(e) {
2451
2602
  return $e[e] ?? e;
2452
2603
  }
2453
- function qr(e) {
2604
+ function Pr(e) {
2454
2605
  const o = Object.entries($e).find(([, c]) => c === e);
2455
2606
  return o ? o[0] : e;
2456
2607
  }
2457
- const Qr = {
2608
+ const Fr = {
2458
2609
  // General
2459
2610
  restaurant: {
2460
2611
  label: "Restaurant Owner",
2461
- subject: l.restaurant,
2612
+ subject: i.restaurant,
2462
2613
  actions: [s.manage],
2463
2614
  category: w.general
2464
2615
  },
2465
2616
  menu: {
2466
2617
  label: "Menu Management",
2467
- subject: l.menu,
2618
+ subject: i.menu,
2468
2619
  actions: [s.manage],
2469
2620
  category: w.general
2470
2621
  },
2471
2622
  // inventory
2472
2623
  stockBalance: {
2473
2624
  label: "Stock Balance Management",
2474
- subject: l.inventory_stockBalance,
2625
+ subject: i.inventory_stockBalance,
2475
2626
  actions: [s.manage],
2476
2627
  category: w.inventory
2477
2628
  },
2478
2629
  stockAdjustment: {
2479
2630
  label: "Stock Adjustment Management",
2480
- subject: l.inventory_stockAdjustment,
2631
+ subject: i.inventory_stockAdjustment,
2481
2632
  actions: [s.manage],
2482
2633
  category: w.inventory
2483
2634
  },
2484
2635
  unitCostHistory: {
2485
2636
  label: "Unit Cost History Management",
2486
- subject: l.inventory_unitCostHistory,
2637
+ subject: i.inventory_unitCostHistory,
2487
2638
  actions: [s.manage],
2488
2639
  category: w.inventory
2489
2640
  },
2490
2641
  wastageTemplate: {
2491
2642
  label: "Wastage Template Management",
2492
- subject: l.inventory_wastageTemplate,
2643
+ subject: i.inventory_wastageTemplate,
2493
2644
  actions: [s.manage],
2494
2645
  category: w.inventory,
2495
2646
  showByFeatureFlag: "inventory_pos_adjust_v2_wastage"
2496
2647
  },
2497
2648
  closingHistory: {
2498
2649
  label: "Closing History Management",
2499
- subject: l.inventory_closingHistory,
2650
+ subject: i.inventory_closingHistory,
2500
2651
  actions: [s.manage],
2501
2652
  category: w.inventory
2502
2653
  },
2503
2654
  closingTemplate: {
2504
2655
  label: "Closing Template Management",
2505
- subject: l.inventory_closingTemplate,
2656
+ subject: i.inventory_closingTemplate,
2506
2657
  actions: [s.manage],
2507
2658
  category: w.inventory,
2508
2659
  showByFeatureFlag: "inventory_pos_closing_v2"
2509
2660
  },
2510
2661
  closingDraft: {
2511
2662
  label: "Closing Draft Management",
2512
- subject: l.inventory_closingDraft,
2663
+ subject: i.inventory_closingDraft,
2513
2664
  actions: [s.manage],
2514
2665
  category: w.inventory,
2515
2666
  showByFeatureFlag: "inventory_pos_closing_v2"
2516
2667
  },
2517
2668
  ingredient: {
2518
2669
  label: "Ingredient Management",
2519
- subject: l.inventory_ingredient,
2670
+ subject: i.inventory_ingredient,
2520
2671
  actions: [s.manage],
2521
2672
  category: w.inventory
2522
2673
  },
2523
2674
  ingredientGroup: {
2524
2675
  label: "Ingredient Group Management",
2525
- subject: l.inventory_ingredientGroup,
2676
+ subject: i.inventory_ingredientGroup,
2526
2677
  actions: [s.manage],
2527
2678
  showByFeatureFlag: "inventory_ingredient_group",
2528
2679
  category: w.inventory
2529
2680
  },
2530
2681
  recipe: {
2531
2682
  label: "Recipe Management",
2532
- subject: l.inventory_recipe,
2683
+ subject: i.inventory_recipe,
2533
2684
  actions: [s.manage],
2534
2685
  category: w.inventory
2535
2686
  },
2536
2687
  unit: {
2537
2688
  label: "Unit Management",
2538
- subject: l.inventory_unit,
2689
+ subject: i.inventory_unit,
2539
2690
  actions: [s.manage],
2540
2691
  category: w.inventory
2541
2692
  },
2542
2693
  purchaseTransfer: {
2543
2694
  label: "Purchase / Transfer Management",
2544
- subject: l.inventory_purchaseTransfer,
2695
+ subject: i.inventory_purchaseTransfer,
2545
2696
  actions: [s.manage],
2546
2697
  category: w.inventory
2547
2698
  },
2548
2699
  orderDraftApproval: {
2549
2700
  label: "Order Draft Approval",
2550
- subject: l.inventory_orderDraftApproval,
2701
+ subject: i.inventory_orderDraftApproval,
2551
2702
  actions: [s.manage],
2552
2703
  category: w.inventory
2553
2704
  },
2554
2705
  transferOut: {
2555
2706
  label: "Transfer Out Management",
2556
- subject: l.inventory_transferOut,
2707
+ subject: i.inventory_transferOut,
2557
2708
  actions: [s.manage],
2558
2709
  category: w.inventory
2559
2710
  },
2560
2711
  surcharge: {
2561
2712
  label: "Surcharge Management",
2562
- subject: l.inventory_surcharge,
2713
+ subject: i.inventory_surcharge,
2563
2714
  actions: [s.manage],
2564
2715
  showByFeatureFlag: "inventory_portal_surcharge",
2565
2716
  category: w.inventory
2566
2717
  },
2567
2718
  orderTemplate: {
2568
2719
  label: "Order Template Management",
2569
- subject: l.inventory_orderTemplate,
2720
+ subject: i.inventory_orderTemplate,
2570
2721
  actions: [s.manage],
2571
2722
  showByFeatureFlag: "inventory_portal_must_use_transfer_template",
2572
2723
  category: w.inventory
2573
2724
  },
2574
2725
  supplier: {
2575
2726
  label: "Supplier Management",
2576
- subject: l.inventory_supplier,
2727
+ subject: i.inventory_supplier,
2577
2728
  actions: [s.manage],
2578
2729
  category: w.inventory
2579
2730
  },
2580
2731
  warehouse: {
2581
2732
  label: "Warehouse Management",
2582
- subject: l.inventory_warehouse,
2733
+ subject: i.inventory_warehouse,
2583
2734
  actions: [s.manage],
2584
2735
  category: w.inventory
2585
2736
  },
2586
2737
  publish: {
2587
2738
  label: "Publish Management",
2588
- subject: l.inventory_publish,
2739
+ subject: i.inventory_publish,
2589
2740
  actions: [s.manage],
2590
2741
  category: w.inventory
2591
2742
  },
2592
2743
  import: {
2593
2744
  label: "Import Management",
2594
- subject: l.inventory_import,
2745
+ subject: i.inventory_import,
2595
2746
  actions: [s.manage],
2596
2747
  showByFeatureFlag: "inventory_bulk_import",
2597
2748
  category: w.inventory
2598
2749
  },
2599
2750
  integration: {
2600
2751
  label: "Integration Management",
2601
- subject: l.inventory_integration,
2752
+ subject: i.inventory_integration,
2602
2753
  actions: [s.manage],
2603
2754
  category: w.inventory
2604
2755
  },
2605
2756
  // CRM
2606
2757
  promotion: {
2607
2758
  label: "Promotion Management",
2608
- subject: l.crm_promotion,
2759
+ subject: i.crm_promotion,
2609
2760
  actions: [s.manage],
2610
2761
  category: w.crm
2611
2762
  },
2612
2763
  voucher: {
2613
2764
  label: "Voucher Management",
2614
- subject: l.crm_voucher,
2765
+ subject: i.crm_voucher,
2615
2766
  actions: [s.manage],
2616
2767
  category: w.crm
2617
2768
  },
2618
2769
  membership: {
2619
2770
  label: "Membership Management",
2620
- subject: l.crm_membership,
2771
+ subject: i.crm_membership,
2621
2772
  actions: [s.manage],
2622
2773
  category: w.crm
2623
2774
  },
2775
+ // Payment
2776
+ payoutAccount: {
2777
+ label: "Payout Account Management",
2778
+ subject: i.payment_payoutAccount,
2779
+ actions: [s.manage],
2780
+ category: w.payment
2781
+ },
2782
+ paymentOnboarding: {
2783
+ label: "Payment Onboarding Management",
2784
+ subject: i.payment_paymentOnboarding,
2785
+ actions: [s.manage],
2786
+ category: w.payment
2787
+ },
2788
+ transactions: {
2789
+ label: "Transactions Management",
2790
+ subject: i.payment_transactions,
2791
+ actions: [s.manage],
2792
+ category: w.payment
2793
+ },
2794
+ settlements: {
2795
+ label: "Settlements Management",
2796
+ subject: i.payment_settlements,
2797
+ actions: [s.manage],
2798
+ category: w.payment
2799
+ },
2624
2800
  // HRM
2625
2801
  teamMember: {
2626
2802
  label: "Team Member Management",
2627
- subject: l.hrm_teamMember,
2803
+ subject: i.hrm_teamMember,
2628
2804
  actions: [s.manage],
2629
2805
  category: w.hrm
2630
2806
  },
2631
2807
  employee: {
2632
2808
  label: "Employee Management",
2633
- subject: l.hrm_employee,
2809
+ subject: i.hrm_employee,
2634
2810
  actions: [s.manage],
2635
2811
  category: w.hrm
2636
2812
  },
2637
2813
  auditLog: {
2638
2814
  label: "Audit Log Management",
2639
- subject: l.hrm_auditLog,
2815
+ subject: i.hrm_auditLog,
2640
2816
  actions: [s.manage],
2641
2817
  category: w.hrm
2642
2818
  },
2643
2819
  // Report
2644
2820
  report_reports: {
2645
2821
  label: "Create Report",
2646
- subject: l.report_createReport,
2822
+ subject: i.report_createReport,
2647
2823
  actions: [s.manage],
2648
2824
  category: w.report
2649
2825
  },
2650
2826
  report_accessOverview: {
2651
2827
  label: "Access Overview Page",
2652
- subject: l.report_accessOverview,
2828
+ subject: i.report_accessOverview,
2653
2829
  actions: [s.manage],
2654
2830
  category: w.report
2655
2831
  },
2656
2832
  report_accessInsight: {
2657
2833
  label: "Access Insight Page",
2658
- subject: l.report_accessInsight,
2834
+ subject: i.report_accessInsight,
2659
2835
  actions: [s.manage],
2660
2836
  category: w.report
2661
2837
  },
2662
2838
  report_accessSetting: {
2663
2839
  label: "Access Setting Page",
2664
- subject: l.report_accessSetting,
2840
+ subject: i.report_accessSetting,
2665
2841
  actions: [s.manage],
2666
2842
  category: w.report
2667
2843
  },
2668
2844
  report_accessIntegration: {
2669
2845
  label: "Access Integration Page",
2670
- subject: l.report_accessIntegration,
2846
+ subject: i.report_accessIntegration,
2671
2847
  actions: [s.manage],
2672
2848
  category: w.report
2673
2849
  },
2674
2850
  report_reports_allDefaultReports: {
2675
2851
  label: "Include future Default Reports",
2676
- subject: l.report_reports_allDefaultReports,
2852
+ subject: i.report_reports_allDefaultReports,
2677
2853
  actions: [s.manage, s.read, s.create],
2678
2854
  category: w.reports,
2679
2855
  isCategoryCover: !0
2680
2856
  },
2681
2857
  report_reports_allCustomReports: {
2682
2858
  label: "Include future Custom Reports",
2683
- subject: l.report_reports_allCustomReports,
2859
+ subject: i.report_reports_allCustomReports,
2684
2860
  actions: [
2685
2861
  s.manage,
2686
2862
  s.read,
@@ -2853,13 +3029,13 @@ const Es = [
2853
3029
  subject: B.inventory,
2854
3030
  actions: [s.read, s.update]
2855
3031
  }
2856
- ], Qs = [
3032
+ ], Ps = [
2857
3033
  {
2858
3034
  label: "Inventory",
2859
3035
  subject: B.inventory,
2860
3036
  actions: [s.read, s.update]
2861
3037
  }
2862
- ], At = [
3038
+ ], at = [
2863
3039
  {
2864
3040
  label: "Purchase Order",
2865
3041
  subject: B.inventory_purchaseOrder,
@@ -2900,7 +3076,7 @@ const Es = [
2900
3076
  subject: B.inventory_shipment,
2901
3077
  actions: [s.read, s.update]
2902
3078
  }
2903
- ], at = [
3079
+ ], At = [
2904
3080
  {
2905
3081
  label: "Purchase Order",
2906
3082
  subject: B.inventory_purchaseOrder,
@@ -2960,7 +3136,7 @@ const Es = [
2960
3136
  subject: B.inventory_shipment,
2961
3137
  actions: [s.read, s.update]
2962
3138
  }
2963
- ], Xs = [
3139
+ ], Fs = [
2964
3140
  ...V,
2965
3141
  {
2966
3142
  label: "Order Draft Approval",
@@ -2969,12 +3145,12 @@ const Es = [
2969
3145
  }
2970
3146
  ];
2971
3147
  [
2972
- ...At,
2973
3148
  ...at,
3149
+ ...At,
2974
3150
  ...nt,
2975
3151
  ...ot
2976
3152
  ];
2977
- const Hs = [
3153
+ const Qs = [
2978
3154
  ...V,
2979
3155
  {
2980
3156
  label: "Supplier",
@@ -2991,7 +3167,7 @@ const Hs = [
2991
3167
  subject: B.inventory_orderTemplate,
2992
3168
  actions: [s.read, s.update]
2993
3169
  }
2994
- ], Fs = [
3170
+ ], Xs = [
2995
3171
  ...V,
2996
3172
  {
2997
3173
  label: "Warehouse",
@@ -3003,7 +3179,7 @@ const Hs = [
3003
3179
  s.delete
3004
3180
  ]
3005
3181
  }
3006
- ], Ps = [
3182
+ ], Hs = [
3007
3183
  {
3008
3184
  label: "Inventory",
3009
3185
  subject: B.inventory,
@@ -3030,136 +3206,136 @@ const Hs = [
3030
3206
  ...me
3031
3207
  ];
3032
3208
  const Is = {
3033
- [`set_${l.inventory_stockBalance}`]: {
3209
+ [`set_${i.inventory_stockBalance}`]: {
3034
3210
  key: "sys:inventory:stock_balance",
3035
3211
  name: "Stock Balance",
3036
3212
  permissions: ge
3037
3213
  },
3038
- [`set_${l.inventory_stockAdjustment}`]: {
3214
+ [`set_${i.inventory_stockAdjustment}`]: {
3039
3215
  key: "sys:inventory:stock_adjustment",
3040
3216
  name: "Stock Adjustment",
3041
3217
  permissions: js
3042
3218
  },
3043
- [`set_${l.inventory_unitCostHistory}`]: {
3219
+ [`set_${i.inventory_unitCostHistory}`]: {
3044
3220
  key: "sys:inventory:unit_cost_history",
3045
3221
  name: "Unit Cost History",
3046
3222
  permissions: et
3047
3223
  },
3048
- [`set_${l.inventory_wastageTemplate}`]: {
3224
+ [`set_${i.inventory_wastageTemplate}`]: {
3049
3225
  key: "sys:inventory:wastage_template",
3050
3226
  name: "Wastage Template",
3051
3227
  permissions: tt
3052
3228
  },
3053
- [`set_${l.inventory_closingHistory}`]: {
3229
+ [`set_${i.inventory_closingHistory}`]: {
3054
3230
  key: "sys:inventory:closing_history",
3055
3231
  name: "Closing History",
3056
3232
  permissions: me
3057
3233
  },
3058
- [`set_${l.inventory_closingTemplate}`]: {
3234
+ [`set_${i.inventory_closingTemplate}`]: {
3059
3235
  key: "sys:inventory:closing_template",
3060
3236
  name: "Closing Template",
3061
3237
  permissions: rt
3062
3238
  },
3063
- [`set_${l.inventory_closingDraft}`]: {
3239
+ [`set_${i.inventory_closingDraft}`]: {
3064
3240
  key: "sys:inventory:closing_draft",
3065
3241
  name: "Closing Draft",
3066
3242
  permissions: st
3067
3243
  },
3068
- [`set_${l.inventory_ingredient}`]: {
3244
+ [`set_${i.inventory_ingredient}`]: {
3069
3245
  key: "sys:inventory:ingredient",
3070
3246
  name: "Ingredient",
3071
3247
  permissions: Es
3072
3248
  },
3073
- [`set_${l.inventory_ingredientGroup}`]: {
3249
+ [`set_${i.inventory_ingredientGroup}`]: {
3074
3250
  key: "sys:inventory:ingredient_group",
3075
3251
  name: "Ingredient Group",
3076
3252
  permissions: xs
3077
3253
  },
3078
- [`set_${l.inventory_recipe}`]: {
3254
+ [`set_${i.inventory_recipe}`]: {
3079
3255
  key: "sys:inventory:recipe",
3080
3256
  name: "Recipe",
3081
3257
  permissions: qs
3082
3258
  },
3083
- [`set_${l.inventory_unit}`]: {
3259
+ [`set_${i.inventory_unit}`]: {
3084
3260
  key: "sys:inventory:unit",
3085
3261
  name: "Unit",
3086
- permissions: Qs
3262
+ permissions: Ps
3087
3263
  },
3088
- [`set_${l.inventory_purchaseTransfer}`]: {
3264
+ [`set_${i.inventory_purchaseTransfer}`]: {
3089
3265
  key: "sys:inventory:purchase_transfer",
3090
3266
  name: "Purchase Transfer",
3091
- permissions: At
3267
+ permissions: at
3092
3268
  },
3093
- [`set_${l.inventory_orderDraftApproval}`]: {
3269
+ [`set_${i.inventory_orderDraftApproval}`]: {
3094
3270
  key: "sys:inventory:order_draft_approval",
3095
3271
  name: "Order Draft Approval",
3096
- permissions: Xs
3272
+ permissions: Fs
3097
3273
  },
3098
- [`set_${l.inventory_transferOut}`]: {
3274
+ [`set_${i.inventory_transferOut}`]: {
3099
3275
  key: "sys:inventory:transfer_out",
3100
3276
  name: "Transfer Out",
3101
- permissions: at
3277
+ permissions: At
3102
3278
  },
3103
- [`set_${l.inventory_surcharge}`]: {
3279
+ [`set_${i.inventory_surcharge}`]: {
3104
3280
  key: "sys:inventory:surcharge",
3105
3281
  name: "Surcharge",
3106
3282
  permissions: nt
3107
3283
  },
3108
- [`set_${l.inventory_orderTemplate}`]: {
3284
+ [`set_${i.inventory_orderTemplate}`]: {
3109
3285
  key: "sys:inventory:order_template",
3110
3286
  name: "Order Template",
3111
3287
  permissions: ot
3112
3288
  },
3113
- [`set_${l.inventory_supplier}`]: {
3289
+ [`set_${i.inventory_supplier}`]: {
3114
3290
  key: "sys:inventory:supplier",
3115
3291
  name: "Supplier",
3116
- permissions: Hs
3292
+ permissions: Qs
3117
3293
  },
3118
- [`set_${l.inventory_warehouse}`]: {
3294
+ [`set_${i.inventory_warehouse}`]: {
3119
3295
  key: "sys:inventory:warehouse",
3120
3296
  name: "Warehouse",
3121
- permissions: Fs
3297
+ permissions: Xs
3122
3298
  },
3123
- [`set_${l.inventory_publish}`]: {
3299
+ [`set_${i.inventory_publish}`]: {
3124
3300
  key: "sys:inventory:publish",
3125
3301
  name: "Publish",
3126
- permissions: Ps
3302
+ permissions: Hs
3127
3303
  },
3128
- [`set_${l.inventory_import}`]: {
3304
+ [`set_${i.inventory_import}`]: {
3129
3305
  key: "sys:inventory:import",
3130
3306
  name: "Import",
3131
3307
  permissions: Os
3132
3308
  },
3133
- [`set_${l.inventory_integration}`]: {
3309
+ [`set_${i.inventory_integration}`]: {
3134
3310
  key: "sys:inventory:integration",
3135
3311
  name: "Integration",
3136
3312
  permissions: Zs
3137
3313
  }
3138
3314
  };
3139
- var z = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e))(z || {});
3140
- const zs = {
3315
+ var N = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e))(N || {});
3316
+ const Ns = {
3141
3317
  /**
3142
3318
  * Triggered by: hrm_teamMember:manage (portal toggle)
3143
3319
  * Injects: team member list read + pos role read
3144
3320
  * Users who can manage team members need to see the team member list and assign POS roles.
3145
3321
  */
3146
- [`set_${l.hrm_teamMember}`]: {
3322
+ [`set_${i.hrm_teamMember}`]: {
3147
3323
  key: "sys:team_member_access",
3148
3324
  name: "Team Member Access",
3149
3325
  permissions: [
3150
3326
  {
3151
3327
  label: "Portal Users",
3152
- subject: z.hrm_portalUsers,
3328
+ subject: N.hrm_portalUsers,
3153
3329
  actions: [s.manage]
3154
3330
  },
3155
3331
  {
3156
3332
  label: "Role resource",
3157
- subject: l.role,
3333
+ subject: i.role,
3158
3334
  actions: [s.read, s.update]
3159
3335
  },
3160
3336
  {
3161
3337
  label: "Pos Role",
3162
- subject: z.hrm_posRole,
3338
+ subject: N.hrm_posRole,
3163
3339
  actions: [s.read]
3164
3340
  }
3165
3341
  ]
@@ -3168,23 +3344,23 @@ const zs = {
3168
3344
  * Triggered by: hrm_employee:manage (portal toggle)
3169
3345
  * Injects: pos role read + restaurant manage (cross-level: needed for employee–restaurant linking)
3170
3346
  */
3171
- [`set_${l.hrm_employee}`]: {
3347
+ [`set_${i.hrm_employee}`]: {
3172
3348
  key: "sys:employee_access",
3173
3349
  name: "Employee Access",
3174
3350
  permissions: [
3175
3351
  {
3176
3352
  label: "Portal Users",
3177
- subject: z.hrm_portalUsers,
3353
+ subject: N.hrm_portalUsers,
3178
3354
  actions: [s.read]
3179
3355
  },
3180
3356
  {
3181
3357
  label: "Restaurant resource",
3182
- subject: l.restaurant,
3358
+ subject: i.restaurant,
3183
3359
  actions: [s.read]
3184
3360
  },
3185
3361
  {
3186
3362
  label: "Pos Role",
3187
- subject: z.hrm_posRole,
3363
+ subject: N.hrm_posRole,
3188
3364
  actions: [s.manage]
3189
3365
  }
3190
3366
  ]
@@ -3195,22 +3371,22 @@ const zs = {
3195
3371
  * Uses HrmResource.hrm_portalUsers (not the module subject hrm_teamMember) to avoid
3196
3372
  * conflating the audit-log read dependency with the full team-management module grant.
3197
3373
  */
3198
- [`set_${l.hrm_auditLog}`]: {
3374
+ [`set_${i.hrm_auditLog}`]: {
3199
3375
  key: "sys:audit_log_access",
3200
3376
  name: "Audit Log Access",
3201
3377
  permissions: [
3202
3378
  {
3203
3379
  label: "Portal Users",
3204
- subject: z.hrm_portalUsers,
3380
+ subject: N.hrm_portalUsers,
3205
3381
  actions: [s.read]
3206
3382
  }
3207
3383
  ]
3208
3384
  }
3209
- }, Ns = {
3385
+ }, zs = {
3210
3386
  ...Is,
3211
- ...zs
3212
- }, Xr = Object.values(
3213
- Ns
3387
+ ...Ns
3388
+ }, Qr = Object.values(
3389
+ zs
3214
3390
  ).flatMap((e) => e.permissions ?? []).reduce(
3215
3391
  (e, o) => {
3216
3392
  var c;
@@ -3226,12 +3402,12 @@ function Ws(e) {
3226
3402
  }));
3227
3403
  }
3228
3404
  function Us(e) {
3229
- return new Gs(Ws(e));
3405
+ return new Ys(Ws(e));
3230
3406
  }
3231
3407
  function Rs(e, o, c) {
3232
- const r = Array.isArray(e) ? e : [e], A = Us(o), n = (D) => D.subject, u = (D) => A.can(D.action, n(D), D.field) ? !0 : D.coverSubject !== void 0 ? A.can(D.action, D.coverSubject, D.field) : !1, m = r.find((D) => !u(D));
3408
+ const r = Array.isArray(e) ? e : [e], a = Us(o), n = (D) => D.subject, u = (D) => a.can(D.action, n(D), D.field) ? !0 : D.coverSubject !== void 0 ? a.can(D.action, D.coverSubject, D.field) : !1, m = r.find((D) => !u(D));
3233
3409
  if (m) {
3234
- const D = A.relevantRuleFor(
3410
+ const D = a.relevantRuleFor(
3235
3411
  m.action,
3236
3412
  n(m),
3237
3413
  m.field
@@ -3242,7 +3418,7 @@ function Rs(e, o, c) {
3242
3418
  decisiveRule: D ?? null
3243
3419
  };
3244
3420
  }
3245
- const b = r[0], v = A.relevantRuleFor(b.action, n(b), b.field);
3421
+ const b = r[0], v = a.relevantRuleFor(b.action, n(b), b.field);
3246
3422
  return { granted: !0, decisivePermission: b, decisiveRule: v ?? null };
3247
3423
  }
3248
3424
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -3254,37 +3430,37 @@ function Ks(e, o, c) {
3254
3430
  evaluating: c
3255
3431
  } : r = {};
3256
3432
  const {
3257
- lazy: A = !1,
3433
+ lazy: a = !1,
3258
3434
  evaluating: n = void 0,
3259
3435
  shallow: u = !0,
3260
3436
  onError: m = Ts
3261
- } = r, b = T(!A), v = u ? dt(o) : T(o);
3437
+ } = r, b = T(!a), v = u ? dt(o) : T(o);
3262
3438
  let D = 0;
3263
- return he(async (C) => {
3439
+ return he(async (y) => {
3264
3440
  if (!b.value)
3265
3441
  return;
3266
3442
  D++;
3267
- const P = D;
3443
+ const H = D;
3268
3444
  let h = !1;
3269
3445
  n && Promise.resolve().then(() => {
3270
3446
  n.value = !0;
3271
3447
  });
3272
3448
  try {
3273
3449
  const j = await e((q) => {
3274
- C(() => {
3450
+ y(() => {
3275
3451
  n && (n.value = !1), h || q();
3276
3452
  });
3277
3453
  });
3278
- P === D && (v.value = j);
3454
+ H === D && (v.value = j);
3279
3455
  } catch (j) {
3280
3456
  m(j);
3281
3457
  } finally {
3282
- n && P === D && (n.value = !1), h = !0;
3458
+ n && H === D && (n.value = !1), h = !0;
3283
3459
  }
3284
- }), A ? ie(() => (b.value = !0, v.value)) : v;
3460
+ }), a ? ie(() => (b.value = !0, v.value)) : v;
3285
3461
  }
3286
3462
  async function Js(e) {
3287
- const { sessionUser: o, validationManifest: c } = e, { requiredRoles: r, requiredCaslPermissions: A, customValidationFunction: n } = c;
3463
+ const { sessionUser: o, validationManifest: c } = e, { requiredRoles: r, requiredCaslPermissions: a, customValidationFunction: n } = c;
3288
3464
  if (!o)
3289
3465
  return { canAccess: !1 };
3290
3466
  if (r && r.length > 0 && !r.includes(o._role || ""))
@@ -3292,8 +3468,8 @@ async function Js(e) {
3292
3468
  canAccess: !1,
3293
3469
  message: "User does not have permission to access"
3294
3470
  });
3295
- if (A && A.length > 0) {
3296
- const { granted: u } = Rs(A, o.permissions);
3471
+ if (a && a.length > 0) {
3472
+ const { granted: u } = Rs(a, o.permissions);
3297
3473
  if (!u)
3298
3474
  return Promise.resolve({
3299
3475
  canAccess: !1,
@@ -3318,7 +3494,7 @@ async function ks(e, o) {
3318
3494
  return {
3319
3495
  canAccess: !1,
3320
3496
  message: r.message,
3321
- redirectTo: ys
3497
+ redirectTo: Gs
3322
3498
  };
3323
3499
  }
3324
3500
  return {
@@ -3361,12 +3537,12 @@ const Ss = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
3361
3537
  subtitle: "哎呀!您沒有權限存取此頁面。"
3362
3538
  }, rr = {
3363
3539
  noPermission: sr
3364
- }, Ar = {
3540
+ }, ar = {
3365
3541
  title: "การเข้าถึงถูกปฏิเสธ",
3366
3542
  subtitle: "โอ้! คุณไม่มีสิทธิ์เข้าถึงหน้านี้"
3367
- }, ar = {
3368
- noPermission: Ar
3369
- }, nr = { class: "w-full h-full flex justify-center items-center" }, or = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, cr = { class: "w-[300px] h-[300px]" }, ir = ["src"], lr = { class: "text-2xl" }, ur = { class: "text-xl" }, gr = /* @__PURE__ */ N({
3543
+ }, Ar = {
3544
+ noPermission: ar
3545
+ }, nr = { class: "w-full h-full flex justify-center items-center" }, or = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, cr = { class: "w-[300px] h-[300px]" }, ir = ["src"], lr = { class: "text-2xl" }, ur = { class: "text-xl" }, gr = /* @__PURE__ */ z({
3370
3546
  __name: "NoPermission",
3371
3547
  setup(e) {
3372
3548
  const { t: o } = je({
@@ -3374,10 +3550,10 @@ const Ss = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
3374
3550
  "en-US": $s,
3375
3551
  "zh-CN": tr,
3376
3552
  "zh-Hant": rr,
3377
- "th-TH": ar
3553
+ "th-TH": Ar
3378
3554
  }
3379
3555
  });
3380
- return (c, r) => (W(), ye("div", nr, [
3556
+ return (c, r) => (W(), Ge("div", nr, [
3381
3557
  O("div", or, [
3382
3558
  O("div", cr, [
3383
3559
  O("img", {
@@ -3392,60 +3568,63 @@ const Ss = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
3392
3568
  ])
3393
3569
  ]));
3394
3570
  }
3395
- }), mr = /* @__PURE__ */ N({
3571
+ }), mr = /* @__PURE__ */ z({
3396
3572
  __name: "PermissionWrapper",
3397
3573
  setup(e) {
3398
3574
  const o = Ls();
3399
- return (c, r) => Z(o) === Z(ce).Denied ? (W(), $(gr, { key: 0 })) : Z(o) === Z(ce).Allowed ? Ge(c.$slots, "default", { key: 1 }) : Bt("", !0);
3575
+ return (c, r) => Z(o) === Z(ce).Denied ? (W(), $(gr, { key: 0 })) : Z(o) === Z(ce).Allowed ? Ye(c.$slots, "default", { key: 1 }) : Bt("", !0);
3400
3576
  }
3401
3577
  });
3402
3578
  function ee(e) {
3403
3579
  return {
3404
- render: () => fe(mr, {}, { default: () => fe(e) })
3580
+ inheritAttrs: !1,
3581
+ setup(o, { attrs: c }) {
3582
+ return () => fe(mr, {}, { default: () => fe(e, c) });
3583
+ }
3405
3584
  };
3406
3585
  }
3407
3586
  function dr(e, o) {
3408
3587
  const c = T({ top: 0, bottom: 0, left: 0, right: 0 });
3409
3588
  function r() {
3410
3589
  if (e.value) {
3411
- const A = e.value.getBoundingClientRect();
3590
+ const a = e.value.getBoundingClientRect();
3412
3591
  c.value = {
3413
- top: A.top,
3414
- bottom: A.bottom,
3415
- left: A.left,
3416
- right: A.right
3592
+ top: a.top,
3593
+ bottom: a.bottom,
3594
+ left: a.left,
3595
+ right: a.right
3417
3596
  };
3418
3597
  }
3419
3598
  }
3420
3599
  return De(o, async () => {
3421
3600
  await Me(), r();
3422
- }), De(e, async (A) => {
3423
- A && (await Me(), r());
3601
+ }), De(e, async (a) => {
3602
+ a && (await Me(), r());
3424
3603
  }), Ve(() => {
3425
3604
  window.addEventListener("resize", r);
3426
3605
  }), pt(() => {
3427
3606
  window.removeEventListener("resize", r);
3428
3607
  }), c;
3429
3608
  }
3430
- const Br = /* @__PURE__ */ N({
3609
+ const Br = /* @__PURE__ */ z({
3431
3610
  __name: "FullWrapper",
3432
3611
  setup(e) {
3433
- const o = Mt(), c = T(null), r = dr(c), A = ie(() => {
3612
+ const o = Mt(), c = T(null), r = dr(c), a = ie(() => {
3434
3613
  var m;
3435
3614
  const u = o.isAtMost("sm") ? 56 : 0;
3436
3615
  return {
3437
3616
  height: `calc(100dvh - ${((m = r.value) == null ? void 0 : m.top) + 24 + u}px)`
3438
3617
  };
3439
3618
  });
3440
- return (n, u) => (W(), ye("div", {
3619
+ return (n, u) => (W(), Ge("div", {
3441
3620
  ref_key: "wrapper",
3442
3621
  ref: c,
3443
- style: bt(A.value)
3622
+ style: bt(a.value)
3444
3623
  }, [
3445
- Ge(n.$slots, "default")
3624
+ Ye(n.$slots, "default")
3446
3625
  ], 4));
3447
3626
  }
3448
- }), pr = { class: "flex justify-center items-center h-full w-full" }, br = /* @__PURE__ */ N({
3627
+ }), pr = { class: "flex justify-center items-center h-full w-full" }, br = /* @__PURE__ */ z({
3449
3628
  __name: "PageLoading",
3450
3629
  setup(e) {
3451
3630
  return (o, c) => {
@@ -3460,12 +3639,12 @@ const Br = /* @__PURE__ */ N({
3460
3639
  });
3461
3640
  };
3462
3641
  }
3463
- }), X = (e) => Dt({
3642
+ }), F = (e) => Dt({
3464
3643
  loader: e,
3465
3644
  loadingComponent: br
3466
3645
  });
3467
- var y = /* @__PURE__ */ ((e) => (e.HOME = "home", e.EMPLOYEE = "employee", e.ROLE = "role", e.TIMESHEET = "timesheet", e.AUDIT_LOG = "audit-log", e.TEAM = "team", e.TEAM_MEMBER = "team-member", e.TEAM_ROLE = "team-role", e.POS_GRANT = "pos-grant", e))(y || {});
3468
- const Ae = (e) => ({
3646
+ var G = /* @__PURE__ */ ((e) => (e.HOME = "home", e.EMPLOYEE = "employee", e.ROLE = "role", e.TIMESHEET = "timesheet", e.AUDIT_LOG = "audit-log", e.TEAM = "team", e.TEAM_MEMBER = "team-member", e.TEAM_ROLE = "team-role", e.POS_GRANT = "pos-grant", e))(G || {});
3647
+ const ae = (e) => ({
3469
3648
  validationManifest: {
3470
3649
  requiredCaslPermissions: [
3471
3650
  {
@@ -3474,16 +3653,16 @@ const Ae = (e) => ({
3474
3653
  }
3475
3654
  ]
3476
3655
  }
3477
- }), fr = ee(X(() => import("./Main-BfDH3uAt.js"))), wr = ee(X(() => import("./Main-D4ueBOl0.js"))), Dr = ee(
3478
- X(() => import("./AuditLogList-YGP3G14A.js"))
3479
- ), Mr = ee(X(() => import("./Main-QpKV1hdj.js"))), vr = X(() => import("./EmployeeList-DuRlCrqN.js")), Cr = X(() => import("./RoleList-D4mup6LW.js")), Yr = X(() => import("./TimesheetList-CBudjg1y.js")), hr = X(() => import("./TeamMemberList-D9rTKS5N.js")), Gr = X(
3480
- () => import("./PermissionSetList-DfAZmUkI.js")
3481
- ), Hr = [
3656
+ }), fr = ee(F(() => import("./Main-DkkkR5h8.js"))), wr = ee(F(() => import("./Main-CZAGXvvi.js"))), Dr = ee(
3657
+ F(() => import("./AuditLogList-CYoUWLEX.js"))
3658
+ ), Mr = ee(F(() => import("./Main-C2gZX1AT.js"))), vr = F(() => import("./EmployeeList-DFocs_BJ.js")), yr = F(() => import("./RoleList-C21eCooe.js")), Cr = F(() => import("./TimesheetList-Bq0z6v_2.js")), hr = F(() => import("./TeamMemberList-BEJpfmbN.js")), Yr = F(
3659
+ () => import("./PermissionSetList-DZ2P4mKk.js")
3660
+ ), Xr = [
3482
3661
  {
3483
3662
  path: "/",
3484
3663
  name: "home",
3485
3664
  component: fr,
3486
- meta: Ae(S.Subject.Business.hrm_employee),
3665
+ meta: ae(S.Subject.Business.hrm_employee),
3487
3666
  redirect: {
3488
3667
  name: "employee"
3489
3668
  /* EMPLOYEE */
@@ -3497,12 +3676,12 @@ const Ae = (e) => ({
3497
3676
  {
3498
3677
  path: "role",
3499
3678
  name: "role",
3500
- component: Cr
3679
+ component: yr
3501
3680
  },
3502
3681
  {
3503
3682
  path: "timesheet",
3504
3683
  name: "timesheet",
3505
- component: Yr
3684
+ component: Cr
3506
3685
  }
3507
3686
  ]
3508
3687
  },
@@ -3510,13 +3689,13 @@ const Ae = (e) => ({
3510
3689
  path: "/audit-log",
3511
3690
  name: "audit-log",
3512
3691
  component: Dr,
3513
- meta: Ae(S.Subject.Business.hrm_auditLog)
3692
+ meta: ae(S.Subject.Business.hrm_auditLog)
3514
3693
  },
3515
3694
  {
3516
3695
  path: "/team",
3517
3696
  name: "team",
3518
3697
  component: wr,
3519
- meta: Ae(S.Subject.Business.hrm_teamMember),
3698
+ meta: ae(S.Subject.Business.hrm_teamMember),
3520
3699
  redirect: {
3521
3700
  name: "team-member"
3522
3701
  /* TEAM_MEMBER */
@@ -3530,7 +3709,7 @@ const Ae = (e) => ({
3530
3709
  {
3531
3710
  path: "role",
3532
3711
  name: "team-role",
3533
- component: Gr
3712
+ component: Yr
3534
3713
  }
3535
3714
  ]
3536
3715
  },
@@ -3539,121 +3718,122 @@ const Ae = (e) => ({
3539
3718
  name: "pos-grant",
3540
3719
  component: Mr
3541
3720
  }
3542
- ], yr = /* @__PURE__ */ N({
3721
+ ], Gr = /* @__PURE__ */ z({
3543
3722
  __name: "Navigator",
3544
3723
  emits: ["close-navigation"],
3545
3724
  setup(e, { emit: o }) {
3546
- const c = o, { t: r } = je(), A = Ct(), { sessionUser: n } = ue(), u = ie(() => {
3725
+ const c = o, { t: r } = je(), a = yt(), { sessionUser: n } = ue(), u = ie(() => {
3547
3726
  var v;
3548
3727
  const b = [];
3549
3728
  return b.push({
3550
3729
  label: r("hr.employee.title"),
3551
3730
  value: "employee",
3552
3731
  action: () => {
3553
- A.push({
3554
- name: y.EMPLOYEE,
3555
- query: A.currentRoute.value.query
3732
+ a.push({
3733
+ name: G.EMPLOYEE,
3734
+ query: a.currentRoute.value.query
3556
3735
  }), c("close-navigation");
3557
3736
  }
3558
3737
  }), b.push({
3559
3738
  label: r("team.title"),
3560
3739
  value: "team-member",
3561
3740
  action: () => {
3562
- A.push({
3563
- name: y.TEAM,
3564
- query: A.currentRoute.value.query
3741
+ a.push({
3742
+ name: G.TEAM,
3743
+ query: a.currentRoute.value.query
3565
3744
  }), c("close-navigation");
3566
3745
  }
3567
3746
  }), b.push({
3568
3747
  label: "Audit Log",
3569
3748
  value: "audit-log",
3570
3749
  action: () => {
3571
- A.push({
3572
- name: y.AUDIT_LOG
3750
+ a.push({
3751
+ name: G.AUDIT_LOG
3573
3752
  }), c("close-navigation");
3574
3753
  }
3575
3754
  }), (v = n.value) != null && v.role.isAdmin && b.push({
3576
3755
  label: r("grantUser.title"),
3577
3756
  value: "pos-grant",
3578
3757
  action: () => {
3579
- A.push({
3580
- name: y.POS_GRANT,
3581
- query: A.currentRoute.value.query
3758
+ a.push({
3759
+ name: G.POS_GRANT,
3760
+ query: a.currentRoute.value.query
3582
3761
  }), c("close-navigation");
3583
3762
  }
3584
3763
  }), b;
3585
3764
  }), m = T();
3586
3765
  return he(() => {
3587
3766
  var v;
3588
- let b = (v = A.currentRoute.value) == null ? void 0 : v.name;
3767
+ let b = (v = a.currentRoute.value) == null ? void 0 : v.name;
3589
3768
  switch (b) {
3590
- case y.EMPLOYEE:
3591
- case y.ROLE:
3592
- case y.TIMESHEET:
3593
- b = y.EMPLOYEE;
3769
+ case G.EMPLOYEE:
3770
+ case G.ROLE:
3771
+ case G.TIMESHEET:
3772
+ b = G.EMPLOYEE;
3594
3773
  break;
3595
- case y.TEAM_MEMBER:
3596
- case y.TEAM_ROLE:
3597
- b = y.TEAM_MEMBER;
3774
+ case G.TEAM_MEMBER:
3775
+ case G.TEAM_ROLE:
3776
+ b = G.TEAM_MEMBER;
3598
3777
  break;
3599
- case y.AUDIT_LOG:
3600
- b = y.AUDIT_LOG;
3778
+ case G.AUDIT_LOG:
3779
+ b = G.AUDIT_LOG;
3601
3780
  break;
3602
- case y.POS_GRANT:
3781
+ case G.POS_GRANT:
3603
3782
  b = "pos-grant";
3604
3783
  break;
3605
3784
  default:
3606
- b = y.EMPLOYEE;
3785
+ b = G.EMPLOYEE;
3607
3786
  }
3608
3787
  m.value !== b && (m.value = b);
3609
3788
  }), (b, v) => {
3610
3789
  const D = le("FmCollapsibleTabs");
3611
3790
  return W(), $(D, {
3612
3791
  modelValue: m.value,
3613
- "onUpdate:modelValue": v[0] || (v[0] = (C) => m.value = C),
3792
+ "onUpdate:modelValue": v[0] || (v[0] = (y) => m.value = y),
3614
3793
  items: u.value,
3615
3794
  class: "py-16"
3616
3795
  }, null, 8, ["modelValue", "items"]);
3617
3796
  };
3618
3797
  }
3619
- }), Fr = /* @__PURE__ */ N({
3798
+ }), Hr = /* @__PURE__ */ z({
3620
3799
  __name: "App",
3621
3800
  setup(e) {
3622
3801
  const o = ue();
3623
3802
  return Ve(() => {
3624
- o.registerSidebarComponent(yr);
3803
+ o.registerSidebarComponent(Gr);
3625
3804
  }), (c, r) => {
3626
- const A = le("RouterView");
3627
- return W(), $(A);
3805
+ const a = le("RouterView");
3806
+ return W(), $(a);
3628
3807
  };
3629
3808
  }
3630
- }), Pr = () => {
3631
- const e = [Lt, zt, qt, as], o = new Set(e.flatMap((c) => Object.keys(c)));
3809
+ }), Or = () => {
3810
+ const e = [Lt, Nt, qt, As], o = new Set(e.flatMap((c) => Object.keys(c)));
3632
3811
  return Array.from(o).reduce(
3633
3812
  (c, r) => {
3634
- const A = r;
3813
+ const a = r;
3635
3814
  return c[r] = e.reduce((n, u) => ({
3636
3815
  ...n,
3637
- ...u[A] || {}
3816
+ ...u[a] || {}
3638
3817
  }), {}), c;
3639
3818
  },
3640
3819
  {}
3641
3820
  );
3642
3821
  };
3643
3822
  export {
3644
- Xr as F,
3645
- Qr as N,
3646
- y as R,
3823
+ Qr as F,
3824
+ Fr as N,
3825
+ G as R,
3647
3826
  Br as _,
3648
- Ns as a,
3649
- s as b,
3827
+ zs as a,
3828
+ Vs as b,
3650
3829
  ns as c,
3651
- S as d,
3652
- Pr as e,
3653
- qr as f,
3830
+ Or as d,
3831
+ Hr as e,
3832
+ Pr as f,
3654
3833
  os as g,
3655
- Fr as h,
3834
+ qr as h,
3656
3835
  w as i,
3657
- Hr as r,
3658
- Vs as u
3836
+ Xr as r,
3837
+ S as u,
3838
+ s as y
3659
3839
  };