@feedmepos/mf-hrm-portal 2.3.0-dev.12 → 2.3.0-dev.14

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 (42) hide show
  1. package/dist/{ApprovalCodeList--NA0toYU.js → ApprovalCodeList-C9dauQ81.js} +4 -4
  2. package/dist/{AuditLogList-B-NaB6OX.js → AuditLogList-zW_N_ECT.js} +17 -18
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-AEr2bDPY.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DJuO1qPX.js} +2 -2
  4. package/dist/{EmployeeList-idO38m7y.js → EmployeeList-8jkHTd7q.js} +255 -267
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js → FormItem.vue_vue_type_script_setup_true_lang-CJc_g0tW.js} +6 -6
  6. package/dist/{GrantUserList-B1S7yDKu.js → GrantUserList-Dj55GA7O.js} +5 -5
  7. package/dist/{Main-mcCvBPvJ.js → Main-0TfvGJ4N.js} +5 -5
  8. package/dist/{Main-D5cWrqP3.js → Main-BQNkTyET.js} +9 -9
  9. package/dist/{Main-cdf9NV8P.js → Main-CuUG6svQ.js} +2 -2
  10. package/dist/{PermissionSetList-3_f6sJpK.js → PermissionSetList-BsLi-TOK.js} +5 -5
  11. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Cmin3rlY.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C2l8nWx2.js} +888 -888
  12. package/dist/{RoleList-ByQelhuG.js → RoleList-DLDcyVWT.js} +7 -7
  13. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-e4YOu59G.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CUXUPfRc.js} +190 -181
  14. package/dist/{ScheduleGeneralPage-TKWgkAoE.js → ScheduleGeneralPage-BhYI6O9g.js} +132 -133
  15. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-6bTAsmpp.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BLBLBtNG.js} +669 -646
  16. package/dist/{SchedulePage-BpvgQYqL.js → SchedulePage-DPU4taJt.js} +7416 -7360
  17. package/dist/{SchedulePositionPage-BjvKTHyY.js → SchedulePositionPage-Byt6nmUj.js} +82 -84
  18. package/dist/{SelectFilter-CG13h83-.js → SelectFilter-1fh00OZW.js} +1 -1
  19. package/dist/{TeamMemberList-CJzF0wNK.js → TeamMemberList-CyUX8Afk.js} +35 -36
  20. package/dist/{TimesheetList-CJcSs_B1.js → TimesheetList-Q4FeNgOT.js} +52 -53
  21. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-zttvxhi-.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C3iU4Zmc.js} +2 -2
  22. package/dist/{app-DLiYhsK2.js → app-TuHQoM7K.js} +781 -741
  23. package/dist/app.js +1 -1
  24. package/dist/{dayjs.min-ar-wg1yi.js → dayjs.min-DXnA8GYn.js} +1 -1
  25. package/dist/{employee-CmUfaF0i.js → employee-Ctnil3cD.js} +3 -3
  26. package/dist/{iteration-uWvyRKkX.js → iteration-BxOzv27y.js} +1 -1
  27. package/dist/{lodash-BzVEbSHJ.js → lodash-CKT_RxJs.js} +1 -1
  28. package/dist/object-Dwyg2LgX.js +16 -0
  29. package/dist/{role-R2KDFlIY.js → role-CNEJPyaD.js} +1 -1
  30. package/dist/{rule-C6ELRd3E.js → rule-FbuHv6Gh.js} +2 -2
  31. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +2 -1
  32. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +4 -2
  33. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +3 -1
  34. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +2 -0
  35. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +3 -1
  36. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +1 -1
  37. package/dist/src/views/scheduling/data.d.ts +17 -0
  38. package/dist/style.css +1 -1
  39. package/dist/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/{useReportPermissions-B2U347Ey.js → useReportPermissions-lemBrd1S.js} +3 -3
  41. package/package.json +3 -3
  42. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
@@ -1,7 +1,7 @@
1
1
  var La = Object.defineProperty;
2
2
  var Ka = (e, t, s) => t in e ? La(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var Yt = (e, t, s) => Ka(e, typeof t != "symbol" ? t + "" : t, s);
4
- import { isRef as Ja, ref as Ue, shallowRef as _a, watchEffect as hn, computed as Is, h as Rt, defineComponent as at, createBlock as $t, renderSlot as Ts, createCommentVNode as $a, unref as $e, openBlock as rt, createElementBlock as qs, createElementVNode as Xe, toDisplayString as sn, watch as er, nextTick as fn, onMounted as yn, onBeforeUnmount as tr, normalizeStyle as sr, resolveComponent as Ns, withCtx as nr, createVNode as ar, defineAsyncComponent as rr, readonly as Ds } from "vue";
3
+ var Vt = (e, t, s) => Ka(e, typeof t != "symbol" ? t + "" : t, s);
4
+ import { isRef as Ja, ref as Ue, shallowRef as _a, watchEffect as hn, computed as Is, h as At, defineComponent as at, createBlock as $t, renderSlot as Ts, createCommentVNode as $a, unref as $e, openBlock as rt, createElementBlock as qs, createElementVNode as Xe, toDisplayString as sn, watch as er, nextTick as fn, onMounted as yn, onBeforeUnmount as tr, normalizeStyle as sr, resolveComponent as Ns, withCtx as nr, createVNode as ar, defineAsyncComponent as rr, readonly as Ds } from "vue";
5
5
  import { useBreakpoints as or } from "@feedmepos/ui-library";
6
6
  import { useRoute as ir, useRouter as lr } from "vue-router";
7
7
  import { useCoreStore as bn, useI18n as vn } from "@feedmepos/mf-common";
@@ -21,7 +21,7 @@ const v = {
21
21
  miniProgram: "Mini Program",
22
22
  media: "Media"
23
23
  }, cr = "access-denied";
24
- var U;
24
+ var z;
25
25
  (function(e) {
26
26
  function t(a) {
27
27
  }
@@ -55,8 +55,8 @@ var U;
55
55
  return a.map((l) => typeof l == "string" ? `'${l}'` : l).join(r);
56
56
  }
57
57
  e.joinValues = n;
58
- })(U || (U = {}));
59
- const x = U.arrayToEnum([
58
+ })(z || (z = {}));
59
+ const x = z.arrayToEnum([
60
60
  "string",
61
61
  "nan",
62
62
  "number",
@@ -96,7 +96,7 @@ const x = U.arrayToEnum([
96
96
  default:
97
97
  return x.unknown;
98
98
  }
99
- }, M = U.arrayToEnum([
99
+ }, M = z.arrayToEnum([
100
100
  "invalid_type",
101
101
  "invalid_literal",
102
102
  "custom",
@@ -140,10 +140,10 @@ class Ie extends Error {
140
140
  else if (l.path.length === 0)
141
141
  n._errors.push(s(l));
142
142
  else {
143
- let c = n, h = 0;
144
- for (; h < l.path.length; ) {
145
- const y = l.path[h];
146
- h === l.path.length - 1 ? (c[y] = c[y] || { _errors: [] }, c[y]._errors.push(s(l))) : c[y] = c[y] || { _errors: [] }, c = c[y], h++;
143
+ let c = n, w = 0;
144
+ for (; w < l.path.length; ) {
145
+ const y = l.path[w];
146
+ w === l.path.length - 1 ? (c[y] = c[y] || { _errors: [] }, c[y]._errors.push(s(l))) : c[y] = c[y] || { _errors: [] }, c = c[y], w++;
147
147
  }
148
148
  }
149
149
  };
@@ -169,7 +169,7 @@ class Ie extends Error {
169
169
  }
170
170
  }
171
171
  Ie.create = (e) => new Ie(e);
172
- const jt = (e, t) => {
172
+ const Et = (e, t) => {
173
173
  let s;
174
174
  switch (e.code) {
175
175
  case M.invalid_type:
@@ -179,16 +179,16 @@ const jt = (e, t) => {
179
179
  s = `Invalid literal value, expected ${JSON.stringify(e.expected, Xs)}`;
180
180
  break;
181
181
  case M.unrecognized_keys:
182
- s = `Unrecognized key(s) in object: ${U.joinValues(e.keys, ", ")}`;
182
+ s = `Unrecognized key(s) in object: ${z.joinValues(e.keys, ", ")}`;
183
183
  break;
184
184
  case M.invalid_union:
185
185
  s = "Invalid input";
186
186
  break;
187
187
  case M.invalid_union_discriminator:
188
- s = `Invalid discriminator value. Expected ${U.joinValues(e.options)}`;
188
+ s = `Invalid discriminator value. Expected ${z.joinValues(e.options)}`;
189
189
  break;
190
190
  case M.invalid_enum_value:
191
- s = `Invalid enum value. Expected ${U.joinValues(e.options)}, received '${e.received}'`;
191
+ s = `Invalid enum value. Expected ${z.joinValues(e.options)}, received '${e.received}'`;
192
192
  break;
193
193
  case M.invalid_arguments:
194
194
  s = "Invalid function arguments";
@@ -200,7 +200,7 @@ const jt = (e, t) => {
200
200
  s = "Invalid date";
201
201
  break;
202
202
  case M.invalid_string:
203
- typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` : U.assertNever(e.validation) : e.validation !== "regex" ? s = `Invalid ${e.validation}` : s = "Invalid";
203
+ typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` : z.assertNever(e.validation) : e.validation !== "regex" ? s = `Invalid ${e.validation}` : s = "Invalid";
204
204
  break;
205
205
  case M.too_small:
206
206
  e.type === "array" ? s = `Array must contain ${e.inclusive ? "at least" : "more than"} ${e.minimum} element(s)` : e.type === "string" ? s = `String must contain ${e.inclusive ? "at least" : "over"} ${e.minimum} character(s)` : e.type === "number" ? s = `Number must be greater than ${e.inclusive ? "or equal to " : ""}${e.minimum}` : e.type === "date" ? s = `Date must be greater than ${e.inclusive ? "or equal to " : ""}${new Date(e.minimum)}` : s = "Invalid input";
@@ -218,11 +218,11 @@ const jt = (e, t) => {
218
218
  s = `Number must be a multiple of ${e.multipleOf}`;
219
219
  break;
220
220
  default:
221
- s = t.defaultError, U.assertNever(e);
221
+ s = t.defaultError, z.assertNever(e);
222
222
  }
223
223
  return { message: s };
224
224
  };
225
- let Bn = jt;
225
+ let Bn = Et;
226
226
  function dr(e) {
227
227
  Bn = e;
228
228
  }
@@ -235,8 +235,8 @@ const It = (e) => {
235
235
  path: r
236
236
  };
237
237
  let c = "";
238
- const h = n.filter((y) => !!y).slice().reverse();
239
- for (const y of h)
238
+ const w = n.filter((y) => !!y).slice().reverse();
239
+ for (const y of w)
240
240
  c = y(l, { data: t, defaultError: c }).message;
241
241
  return {
242
242
  ...a,
@@ -253,7 +253,7 @@ function P(e, t) {
253
253
  e.common.contextualErrorMap,
254
254
  e.schemaErrorMap,
255
255
  Ht(),
256
- jt
256
+ Et
257
257
  ].filter((n) => !!n)
258
258
  });
259
259
  e.common.issues.push(s);
@@ -300,11 +300,11 @@ class le {
300
300
  const I = Object.freeze({
301
301
  status: "aborted"
302
302
  }), Ar = (e) => ({ status: "dirty", value: e }), ce = (e) => ({ status: "valid", value: e }), js = (e) => e.status === "aborted", Es = (e) => e.status === "dirty", Tt = (e) => e.status === "valid", Ps = (e) => typeof Promise !== void 0 && e instanceof Promise, Xs = (e, t) => typeof t == "bigint" ? t.toString() : t;
303
- var Q;
303
+ var Z;
304
304
  (function(e) {
305
305
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
306
- })(Q || (Q = {}));
307
- class Ye {
306
+ })(Z || (Z = {}));
307
+ class Ve {
308
308
  constructor(t, s, n, a) {
309
309
  this.parent = t, this.data = s, this._path = n, this._key = a;
310
310
  }
@@ -420,21 +420,21 @@ class q {
420
420
  code: M.custom,
421
421
  ...n(a)
422
422
  });
423
- return typeof Promise < "u" && l instanceof Promise ? l.then((h) => h ? !0 : (c(), !1)) : l ? !0 : (c(), !1);
423
+ return typeof Promise < "u" && l instanceof Promise ? l.then((w) => w ? !0 : (c(), !1)) : l ? !0 : (c(), !1);
424
424
  });
425
425
  }
426
426
  refinement(t, s) {
427
427
  return this._refinement((n, a) => t(n) ? !0 : (a.addIssue(typeof s == "function" ? s(n, a) : s), !1));
428
428
  }
429
429
  _refinement(t) {
430
- return new Se({
430
+ return new ke({
431
431
  schema: this,
432
432
  typeName: H.ZodEffects,
433
433
  effect: { type: "refinement", refinement: t }
434
434
  });
435
435
  }
436
436
  optional() {
437
- return Ge.create(this);
437
+ return Ye.create(this);
438
438
  }
439
439
  nullable() {
440
440
  return nt.create(this);
@@ -443,19 +443,19 @@ class q {
443
443
  return this.optional().nullable();
444
444
  }
445
445
  array() {
446
- return Ve.create(this);
446
+ return Fe.create(this);
447
447
  }
448
448
  promise() {
449
- return pt.create(this);
449
+ return ht.create(this);
450
450
  }
451
451
  or(t) {
452
- return Et.create([this, t]);
452
+ return Pt.create([this, t]);
453
453
  }
454
454
  and(t) {
455
- return Pt.create(this, t);
455
+ return Ot.create(this, t);
456
456
  }
457
457
  transform(t) {
458
- return new Se({
458
+ return new ke({
459
459
  schema: this,
460
460
  typeName: H.ZodEffects,
461
461
  effect: { type: "transform", transform: t }
@@ -489,8 +489,8 @@ class ze extends q {
489
489
  super(...arguments), this._regex = (t, s, n) => this.refinement((a) => t.test(a), {
490
490
  validation: s,
491
491
  code: M.invalid_string,
492
- ...Q.errToObj(n)
493
- }), this.nonempty = (t) => this.min(1, Q.errToObj(t)), this.trim = () => new ze({
492
+ ...Z.errToObj(n)
493
+ }), this.nonempty = (t) => this.min(1, Z.errToObj(t)), this.trim = () => new ze({
494
494
  ...this._def,
495
495
  checks: [...this._def.checks, { kind: "trim" }]
496
496
  });
@@ -567,7 +567,7 @@ class ze extends q {
567
567
  code: M.invalid_string,
568
568
  validation: { endsWith: r.value },
569
569
  message: r.message
570
- }), n.dirty()) : U.assertNever(r);
570
+ }), n.dirty()) : z.assertNever(r);
571
571
  return { status: n.value, value: t.data };
572
572
  }
573
573
  _addCheck(t) {
@@ -577,50 +577,50 @@ class ze extends q {
577
577
  });
578
578
  }
579
579
  email(t) {
580
- return this._addCheck({ kind: "email", ...Q.errToObj(t) });
580
+ return this._addCheck({ kind: "email", ...Z.errToObj(t) });
581
581
  }
582
582
  url(t) {
583
- return this._addCheck({ kind: "url", ...Q.errToObj(t) });
583
+ return this._addCheck({ kind: "url", ...Z.errToObj(t) });
584
584
  }
585
585
  uuid(t) {
586
- return this._addCheck({ kind: "uuid", ...Q.errToObj(t) });
586
+ return this._addCheck({ kind: "uuid", ...Z.errToObj(t) });
587
587
  }
588
588
  cuid(t) {
589
- return this._addCheck({ kind: "cuid", ...Q.errToObj(t) });
589
+ return this._addCheck({ kind: "cuid", ...Z.errToObj(t) });
590
590
  }
591
591
  regex(t, s) {
592
592
  return this._addCheck({
593
593
  kind: "regex",
594
594
  regex: t,
595
- ...Q.errToObj(s)
595
+ ...Z.errToObj(s)
596
596
  });
597
597
  }
598
598
  startsWith(t, s) {
599
599
  return this._addCheck({
600
600
  kind: "startsWith",
601
601
  value: t,
602
- ...Q.errToObj(s)
602
+ ...Z.errToObj(s)
603
603
  });
604
604
  }
605
605
  endsWith(t, s) {
606
606
  return this._addCheck({
607
607
  kind: "endsWith",
608
608
  value: t,
609
- ...Q.errToObj(s)
609
+ ...Z.errToObj(s)
610
610
  });
611
611
  }
612
612
  min(t, s) {
613
613
  return this._addCheck({
614
614
  kind: "min",
615
615
  value: t,
616
- ...Q.errToObj(s)
616
+ ...Z.errToObj(s)
617
617
  });
618
618
  }
619
619
  max(t, s) {
620
620
  return this._addCheck({
621
621
  kind: "max",
622
622
  value: t,
623
- ...Q.errToObj(s)
623
+ ...Z.errToObj(s)
624
624
  });
625
625
  }
626
626
  length(t, s) {
@@ -676,7 +676,7 @@ class et extends q {
676
676
  let n;
677
677
  const a = new le();
678
678
  for (const r of this._def.checks)
679
- r.kind === "int" ? U.isInteger(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
679
+ r.kind === "int" ? z.isInteger(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
680
680
  code: M.invalid_type,
681
681
  expected: "integer",
682
682
  received: "float",
@@ -697,20 +697,20 @@ class et extends q {
697
697
  code: M.not_multiple_of,
698
698
  multipleOf: r.value,
699
699
  message: r.message
700
- }), a.dirty()) : U.assertNever(r);
700
+ }), a.dirty()) : z.assertNever(r);
701
701
  return { status: a.value, value: t.data };
702
702
  }
703
703
  gte(t, s) {
704
- return this.setLimit("min", t, !0, Q.toString(s));
704
+ return this.setLimit("min", t, !0, Z.toString(s));
705
705
  }
706
706
  gt(t, s) {
707
- return this.setLimit("min", t, !1, Q.toString(s));
707
+ return this.setLimit("min", t, !1, Z.toString(s));
708
708
  }
709
709
  lte(t, s) {
710
- return this.setLimit("max", t, !0, Q.toString(s));
710
+ return this.setLimit("max", t, !0, Z.toString(s));
711
711
  }
712
712
  lt(t, s) {
713
- return this.setLimit("max", t, !1, Q.toString(s));
713
+ return this.setLimit("max", t, !1, Z.toString(s));
714
714
  }
715
715
  setLimit(t, s, n, a) {
716
716
  return new et({
@@ -721,7 +721,7 @@ class et extends q {
721
721
  kind: t,
722
722
  value: s,
723
723
  inclusive: n,
724
- message: Q.toString(a)
724
+ message: Z.toString(a)
725
725
  }
726
726
  ]
727
727
  });
@@ -735,7 +735,7 @@ class et extends q {
735
735
  int(t) {
736
736
  return this._addCheck({
737
737
  kind: "int",
738
- message: Q.toString(t)
738
+ message: Z.toString(t)
739
739
  });
740
740
  }
741
741
  positive(t) {
@@ -743,7 +743,7 @@ class et extends q {
743
743
  kind: "min",
744
744
  value: 0,
745
745
  inclusive: !1,
746
- message: Q.toString(t)
746
+ message: Z.toString(t)
747
747
  });
748
748
  }
749
749
  negative(t) {
@@ -751,7 +751,7 @@ class et extends q {
751
751
  kind: "max",
752
752
  value: 0,
753
753
  inclusive: !1,
754
- message: Q.toString(t)
754
+ message: Z.toString(t)
755
755
  });
756
756
  }
757
757
  nonpositive(t) {
@@ -759,7 +759,7 @@ class et extends q {
759
759
  kind: "max",
760
760
  value: 0,
761
761
  inclusive: !0,
762
- message: Q.toString(t)
762
+ message: Z.toString(t)
763
763
  });
764
764
  }
765
765
  nonnegative(t) {
@@ -767,14 +767,14 @@ class et extends q {
767
767
  kind: "min",
768
768
  value: 0,
769
769
  inclusive: !0,
770
- message: Q.toString(t)
770
+ message: Z.toString(t)
771
771
  });
772
772
  }
773
773
  multipleOf(t, s) {
774
774
  return this._addCheck({
775
775
  kind: "multipleOf",
776
776
  value: t,
777
- message: Q.toString(s)
777
+ message: Z.toString(s)
778
778
  });
779
779
  }
780
780
  get minValue() {
@@ -832,7 +832,7 @@ Nt.create = (e) => new Nt({
832
832
  typeName: H.ZodBoolean,
833
833
  ...N(e)
834
834
  });
835
- class At extends q {
835
+ class gt extends q {
836
836
  _parse(t) {
837
837
  if (this._getType(t) !== x.date) {
838
838
  const r = this._getOrReturnCtx(t);
@@ -863,14 +863,14 @@ class At extends q {
863
863
  inclusive: !0,
864
864
  maximum: r.value,
865
865
  type: "date"
866
- }), n.dirty()) : U.assertNever(r);
866
+ }), n.dirty()) : z.assertNever(r);
867
867
  return {
868
868
  status: n.value,
869
869
  value: new Date(t.data.getTime())
870
870
  };
871
871
  }
872
872
  _addCheck(t) {
873
- return new At({
873
+ return new gt({
874
874
  ...this._def,
875
875
  checks: [...this._def.checks, t]
876
876
  });
@@ -879,14 +879,14 @@ class At extends q {
879
879
  return this._addCheck({
880
880
  kind: "min",
881
881
  value: t.getTime(),
882
- message: Q.toString(s)
882
+ message: Z.toString(s)
883
883
  });
884
884
  }
885
885
  max(t, s) {
886
886
  return this._addCheck({
887
887
  kind: "max",
888
888
  value: t.getTime(),
889
- message: Q.toString(s)
889
+ message: Z.toString(s)
890
890
  });
891
891
  }
892
892
  get minDate() {
@@ -902,7 +902,7 @@ class At extends q {
902
902
  return t != null ? new Date(t) : null;
903
903
  }
904
904
  }
905
- At.create = (e) => new At({
905
+ gt.create = (e) => new gt({
906
906
  checks: [],
907
907
  typeName: H.ZodDate,
908
908
  ...N(e)
@@ -941,7 +941,7 @@ Qt.create = (e) => new Qt({
941
941
  typeName: H.ZodNull,
942
942
  ...N(e)
943
943
  });
944
- class gt extends q {
944
+ class pt extends q {
945
945
  constructor() {
946
946
  super(...arguments), this._any = !0;
947
947
  }
@@ -949,7 +949,7 @@ class gt extends q {
949
949
  return ce(t.data);
950
950
  }
951
951
  }
952
- gt.create = (e) => new gt({
952
+ pt.create = (e) => new pt({
953
953
  typeName: H.ZodAny,
954
954
  ...N(e)
955
955
  });
@@ -996,7 +996,7 @@ Zt.create = (e) => new Zt({
996
996
  typeName: H.ZodVoid,
997
997
  ...N(e)
998
998
  });
999
- class Ve extends q {
999
+ class Fe extends q {
1000
1000
  _parse(t) {
1001
1001
  const { ctx: s, status: n } = this._processInputParams(t), a = this._def;
1002
1002
  if (s.parsedType !== x.array)
@@ -1018,23 +1018,23 @@ class Ve extends q {
1018
1018
  inclusive: !0,
1019
1019
  message: a.maxLength.message
1020
1020
  }), n.dirty()), s.common.async)
1021
- return Promise.all(s.data.map((l, c) => a.type._parseAsync(new Ye(s, l, s.path, c)))).then((l) => le.mergeArray(n, l));
1022
- const r = s.data.map((l, c) => a.type._parseSync(new Ye(s, l, s.path, c)));
1021
+ return Promise.all(s.data.map((l, c) => a.type._parseAsync(new Ve(s, l, s.path, c)))).then((l) => le.mergeArray(n, l));
1022
+ const r = s.data.map((l, c) => a.type._parseSync(new Ve(s, l, s.path, c)));
1023
1023
  return le.mergeArray(n, r);
1024
1024
  }
1025
1025
  get element() {
1026
1026
  return this._def.type;
1027
1027
  }
1028
1028
  min(t, s) {
1029
- return new Ve({
1029
+ return new Fe({
1030
1030
  ...this._def,
1031
- minLength: { value: t, message: Q.toString(s) }
1031
+ minLength: { value: t, message: Z.toString(s) }
1032
1032
  });
1033
1033
  }
1034
1034
  max(t, s) {
1035
- return new Ve({
1035
+ return new Fe({
1036
1036
  ...this._def,
1037
- maxLength: { value: t, message: Q.toString(s) }
1037
+ maxLength: { value: t, message: Z.toString(s) }
1038
1038
  });
1039
1039
  }
1040
1040
  length(t, s) {
@@ -1044,7 +1044,7 @@ class Ve extends q {
1044
1044
  return this.min(1, t);
1045
1045
  }
1046
1046
  }
1047
- Ve.create = (e, t) => new Ve({
1047
+ Fe.create = (e, t) => new Fe({
1048
1048
  type: e,
1049
1049
  minLength: null,
1050
1050
  maxLength: null,
@@ -1070,13 +1070,13 @@ function mt(e) {
1070
1070
  const t = {};
1071
1071
  for (const s in e.shape) {
1072
1072
  const n = e.shape[s];
1073
- t[s] = Ge.create(mt(n));
1073
+ t[s] = Ye.create(mt(n));
1074
1074
  }
1075
1075
  return new ee({
1076
1076
  ...e._def,
1077
1077
  shape: () => t
1078
1078
  });
1079
- } else return e instanceof Ve ? Ve.create(mt(e.element)) : e instanceof Ge ? Ge.create(mt(e.unwrap())) : e instanceof nt ? nt.create(mt(e.unwrap())) : e instanceof Fe ? Fe.create(e.items.map((t) => mt(t))) : e;
1079
+ } else return e instanceof Fe ? Fe.create(mt(e.element)) : e instanceof Ye ? Ye.create(mt(e.unwrap())) : e instanceof nt ? nt.create(mt(e.unwrap())) : e instanceof Se ? Se.create(e.items.map((t) => mt(t))) : e;
1080
1080
  }
1081
1081
  class ee extends q {
1082
1082
  constructor() {
@@ -1085,7 +1085,7 @@ class ee extends q {
1085
1085
  _getCached() {
1086
1086
  if (this._cached !== null)
1087
1087
  return this._cached;
1088
- const t = this._def.shape(), s = U.objectKeys(t);
1088
+ const t = this._def.shape(), s = z.objectKeys(t);
1089
1089
  return this._cached = { shape: t, keys: s };
1090
1090
  }
1091
1091
  _parse(t) {
@@ -1100,22 +1100,22 @@ class ee extends q {
1100
1100
  const { status: n, ctx: a } = this._processInputParams(t), { shape: r, keys: l } = this._getCached(), c = [];
1101
1101
  for (const y in a.data)
1102
1102
  l.includes(y) || c.push(y);
1103
- const h = [];
1103
+ const w = [];
1104
1104
  for (const y of l) {
1105
- const w = r[y], V = a.data[y];
1106
- h.push({
1105
+ const f = r[y], O = a.data[y];
1106
+ w.push({
1107
1107
  key: { status: "valid", value: y },
1108
- value: w._parse(new Ye(a, V, a.path, y)),
1108
+ value: f._parse(new Ve(a, O, a.path, y)),
1109
1109
  alwaysSet: y in a.data
1110
1110
  });
1111
1111
  }
1112
1112
  if (this._def.catchall instanceof We) {
1113
1113
  const y = this._def.unknownKeys;
1114
1114
  if (y === "passthrough")
1115
- for (const w of c)
1116
- h.push({
1117
- key: { status: "valid", value: w },
1118
- value: { status: "valid", value: a.data[w] }
1115
+ for (const f of c)
1116
+ w.push({
1117
+ key: { status: "valid", value: f },
1118
+ value: { status: "valid", value: a.data[f] }
1119
1119
  });
1120
1120
  else if (y === "strict")
1121
1121
  c.length > 0 && (P(a, {
@@ -1125,46 +1125,46 @@ class ee extends q {
1125
1125
  else if (y !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1126
1126
  } else {
1127
1127
  const y = this._def.catchall;
1128
- for (const w of c) {
1129
- const V = a.data[w];
1130
- h.push({
1131
- key: { status: "valid", value: w },
1128
+ for (const f of c) {
1129
+ const O = a.data[f];
1130
+ w.push({
1131
+ key: { status: "valid", value: f },
1132
1132
  value: y._parse(
1133
- new Ye(a, V, a.path, w)
1133
+ new Ve(a, O, a.path, f)
1134
1134
  //, ctx.child(key), value, getParsedType(value)
1135
1135
  ),
1136
- alwaysSet: w in a.data
1136
+ alwaysSet: f in a.data
1137
1137
  });
1138
1138
  }
1139
1139
  }
1140
1140
  return a.common.async ? Promise.resolve().then(async () => {
1141
1141
  const y = [];
1142
- for (const w of h) {
1143
- const V = await w.key;
1142
+ for (const f of w) {
1143
+ const O = await f.key;
1144
1144
  y.push({
1145
- key: V,
1146
- value: await w.value,
1147
- alwaysSet: w.alwaysSet
1145
+ key: O,
1146
+ value: await f.value,
1147
+ alwaysSet: f.alwaysSet
1148
1148
  });
1149
1149
  }
1150
1150
  return y;
1151
- }).then((y) => le.mergeObjectSync(n, y)) : le.mergeObjectSync(n, h);
1151
+ }).then((y) => le.mergeObjectSync(n, y)) : le.mergeObjectSync(n, w);
1152
1152
  }
1153
1153
  get shape() {
1154
1154
  return this._def.shape();
1155
1155
  }
1156
1156
  strict(t) {
1157
- return Q.errToObj, new ee({
1157
+ return Z.errToObj, new ee({
1158
1158
  ...this._def,
1159
1159
  unknownKeys: "strict",
1160
1160
  ...t !== void 0 ? {
1161
1161
  errorMap: (s, n) => {
1162
1162
  var a, r, l, c;
1163
- const h = (l = (r = (a = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(a, s, n).message) !== null && l !== void 0 ? l : n.defaultError;
1163
+ const w = (l = (r = (a = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(a, s, n).message) !== null && l !== void 0 ? l : n.defaultError;
1164
1164
  return s.code === "unrecognized_keys" ? {
1165
- message: (c = Q.errToObj(t).message) !== null && c !== void 0 ? c : h
1165
+ message: (c = Z.errToObj(t).message) !== null && c !== void 0 ? c : w
1166
1166
  } : {
1167
- message: h
1167
+ message: w
1168
1168
  };
1169
1169
  }
1170
1170
  } : {}
@@ -1206,7 +1206,7 @@ class ee extends q {
1206
1206
  }
1207
1207
  pick(t) {
1208
1208
  const s = {};
1209
- return U.objectKeys(t).map((n) => {
1209
+ return z.objectKeys(t).map((n) => {
1210
1210
  this.shape[n] && (s[n] = this.shape[n]);
1211
1211
  }), new ee({
1212
1212
  ...this._def,
@@ -1215,8 +1215,8 @@ class ee extends q {
1215
1215
  }
1216
1216
  omit(t) {
1217
1217
  const s = {};
1218
- return U.objectKeys(this.shape).map((n) => {
1219
- U.objectKeys(t).indexOf(n) === -1 && (s[n] = this.shape[n]);
1218
+ return z.objectKeys(this.shape).map((n) => {
1219
+ z.objectKeys(t).indexOf(n) === -1 && (s[n] = this.shape[n]);
1220
1220
  }), new ee({
1221
1221
  ...this._def,
1222
1222
  shape: () => s
@@ -1228,8 +1228,8 @@ class ee extends q {
1228
1228
  partial(t) {
1229
1229
  const s = {};
1230
1230
  if (t)
1231
- return U.objectKeys(this.shape).map((n) => {
1232
- U.objectKeys(t).indexOf(n) === -1 ? s[n] = this.shape[n] : s[n] = this.shape[n].optional();
1231
+ return z.objectKeys(this.shape).map((n) => {
1232
+ z.objectKeys(t).indexOf(n) === -1 ? s[n] = this.shape[n] : s[n] = this.shape[n].optional();
1233
1233
  }), new ee({
1234
1234
  ...this._def,
1235
1235
  shape: () => s
@@ -1247,7 +1247,7 @@ class ee extends q {
1247
1247
  const t = {};
1248
1248
  for (const s in this.shape) {
1249
1249
  let a = this.shape[s];
1250
- for (; a instanceof Ge; )
1250
+ for (; a instanceof Ye; )
1251
1251
  a = a._def.innerType;
1252
1252
  t[s] = a;
1253
1253
  }
@@ -1257,7 +1257,7 @@ class ee extends q {
1257
1257
  });
1258
1258
  }
1259
1259
  keyof() {
1260
- return Cn(U.objectKeys(this.shape));
1260
+ return Cn(z.objectKeys(this.shape));
1261
1261
  }
1262
1262
  }
1263
1263
  ee.create = (e, t) => new ee({
@@ -1281,7 +1281,7 @@ ee.lazycreate = (e, t) => new ee({
1281
1281
  typeName: H.ZodObject,
1282
1282
  ...N(t)
1283
1283
  });
1284
- class Et extends q {
1284
+ class Pt extends q {
1285
1285
  _parse(t) {
1286
1286
  const { ctx: s } = this._processInputParams(t), n = this._def.options;
1287
1287
  function a(r) {
@@ -1319,7 +1319,7 @@ class Et extends q {
1319
1319
  {
1320
1320
  let r;
1321
1321
  const l = [];
1322
- for (const h of n) {
1322
+ for (const w of n) {
1323
1323
  const y = {
1324
1324
  ...s,
1325
1325
  common: {
@@ -1327,18 +1327,18 @@ class Et extends q {
1327
1327
  issues: []
1328
1328
  },
1329
1329
  parent: null
1330
- }, w = h._parseSync({
1330
+ }, f = w._parseSync({
1331
1331
  data: s.data,
1332
1332
  path: s.path,
1333
1333
  parent: y
1334
1334
  });
1335
- if (w.status === "valid")
1336
- return w;
1337
- w.status === "dirty" && !r && (r = { result: w, ctx: y }), y.common.issues.length && l.push(y.common.issues);
1335
+ if (f.status === "valid")
1336
+ return f;
1337
+ f.status === "dirty" && !r && (r = { result: f, ctx: y }), y.common.issues.length && l.push(y.common.issues);
1338
1338
  }
1339
1339
  if (r)
1340
1340
  return s.common.issues.push(...r.ctx.common.issues), r.result;
1341
- const c = l.map((h) => new Ie(h));
1341
+ const c = l.map((w) => new Ie(w));
1342
1342
  return P(s, {
1343
1343
  code: M.invalid_union,
1344
1344
  unionErrors: c
@@ -1349,7 +1349,7 @@ class Et extends q {
1349
1349
  return this._def.options;
1350
1350
  }
1351
1351
  }
1352
- Et.create = (e, t) => new Et({
1352
+ Pt.create = (e, t) => new Pt({
1353
1353
  options: e,
1354
1354
  typeName: H.ZodUnion,
1355
1355
  ...N(t)
@@ -1420,12 +1420,12 @@ function Os(e, t) {
1420
1420
  if (e === t)
1421
1421
  return { valid: !0, data: e };
1422
1422
  if (s === x.object && n === x.object) {
1423
- const a = U.objectKeys(t), r = U.objectKeys(e).filter((c) => a.indexOf(c) !== -1), l = { ...e, ...t };
1423
+ const a = z.objectKeys(t), r = z.objectKeys(e).filter((c) => a.indexOf(c) !== -1), l = { ...e, ...t };
1424
1424
  for (const c of r) {
1425
- const h = Os(e[c], t[c]);
1426
- if (!h.valid)
1425
+ const w = Os(e[c], t[c]);
1426
+ if (!w.valid)
1427
1427
  return { valid: !1 };
1428
- l[c] = h.data;
1428
+ l[c] = w.data;
1429
1429
  }
1430
1430
  return { valid: !0, data: l };
1431
1431
  } else if (s === x.array && n === x.array) {
@@ -1433,15 +1433,15 @@ function Os(e, t) {
1433
1433
  return { valid: !1 };
1434
1434
  const a = [];
1435
1435
  for (let r = 0; r < e.length; r++) {
1436
- const l = e[r], c = t[r], h = Os(l, c);
1437
- if (!h.valid)
1436
+ const l = e[r], c = t[r], w = Os(l, c);
1437
+ if (!w.valid)
1438
1438
  return { valid: !1 };
1439
- a.push(h.data);
1439
+ a.push(w.data);
1440
1440
  }
1441
1441
  return { valid: !0, data: a };
1442
1442
  } else return s === x.date && n === x.date && +e == +t ? { valid: !0, data: e } : { valid: !1 };
1443
1443
  }
1444
- class Pt extends q {
1444
+ class Ot extends q {
1445
1445
  _parse(t) {
1446
1446
  const { status: s, ctx: n } = this._processInputParams(t), a = (r, l) => {
1447
1447
  if (js(r) || js(l))
@@ -1473,13 +1473,13 @@ class Pt extends q {
1473
1473
  }));
1474
1474
  }
1475
1475
  }
1476
- Pt.create = (e, t, s) => new Pt({
1476
+ Ot.create = (e, t, s) => new Ot({
1477
1477
  left: e,
1478
1478
  right: t,
1479
1479
  typeName: H.ZodIntersection,
1480
1480
  ...N(s)
1481
1481
  });
1482
- class Fe extends q {
1482
+ class Se extends q {
1483
1483
  _parse(t) {
1484
1484
  const { status: s, ctx: n } = this._processInputParams(t);
1485
1485
  if (n.parsedType !== x.array)
@@ -1502,8 +1502,8 @@ class Fe extends q {
1502
1502
  type: "array"
1503
1503
  }), s.dirty());
1504
1504
  const r = n.data.map((l, c) => {
1505
- const h = this._def.items[c] || this._def.rest;
1506
- return h ? h._parse(new Ye(n, l, n.path, c)) : null;
1505
+ const w = this._def.items[c] || this._def.rest;
1506
+ return w ? w._parse(new Ve(n, l, n.path, c)) : null;
1507
1507
  }).filter((l) => !!l);
1508
1508
  return n.common.async ? Promise.all(r).then((l) => le.mergeArray(s, l)) : le.mergeArray(s, r);
1509
1509
  }
@@ -1511,19 +1511,19 @@ class Fe extends q {
1511
1511
  return this._def.items;
1512
1512
  }
1513
1513
  rest(t) {
1514
- return new Fe({
1514
+ return new Se({
1515
1515
  ...this._def,
1516
1516
  rest: t
1517
1517
  });
1518
1518
  }
1519
1519
  }
1520
- Fe.create = (e, t) => new Fe({
1520
+ Se.create = (e, t) => new Se({
1521
1521
  items: e,
1522
1522
  typeName: H.ZodTuple,
1523
1523
  rest: null,
1524
1524
  ...N(t)
1525
1525
  });
1526
- class Ot extends q {
1526
+ class Gt extends q {
1527
1527
  get keySchema() {
1528
1528
  return this._def.keyType;
1529
1529
  }
@@ -1541,8 +1541,8 @@ class Ot extends q {
1541
1541
  const a = [], r = this._def.keyType, l = this._def.valueType;
1542
1542
  for (const c in n.data)
1543
1543
  a.push({
1544
- key: r._parse(new Ye(n, c, n.path, c)),
1545
- value: l._parse(new Ye(n, n.data[c], n.path, c))
1544
+ key: r._parse(new Ve(n, c, n.path, c)),
1545
+ value: l._parse(new Ve(n, n.data[c], n.path, c))
1546
1546
  });
1547
1547
  return n.common.async ? le.mergeObjectAsync(s, a) : le.mergeObjectSync(s, a);
1548
1548
  }
@@ -1550,12 +1550,12 @@ class Ot extends q {
1550
1550
  return this._def.valueType;
1551
1551
  }
1552
1552
  static create(t, s, n) {
1553
- return s instanceof q ? new Ot({
1553
+ return s instanceof q ? new Gt({
1554
1554
  keyType: t,
1555
1555
  valueType: s,
1556
1556
  typeName: H.ZodRecord,
1557
1557
  ...N(n)
1558
- }) : new Ot({
1558
+ }) : new Gt({
1559
1559
  keyType: ze.create(),
1560
1560
  valueType: t,
1561
1561
  typeName: H.ZodRecord,
@@ -1572,28 +1572,28 @@ class zt extends q {
1572
1572
  expected: x.map,
1573
1573
  received: n.parsedType
1574
1574
  }), I;
1575
- const a = this._def.keyType, r = this._def.valueType, l = [...n.data.entries()].map(([c, h], y) => ({
1576
- key: a._parse(new Ye(n, c, n.path, [y, "key"])),
1577
- value: r._parse(new Ye(n, h, n.path, [y, "value"]))
1575
+ const a = this._def.keyType, r = this._def.valueType, l = [...n.data.entries()].map(([c, w], y) => ({
1576
+ key: a._parse(new Ve(n, c, n.path, [y, "key"])),
1577
+ value: r._parse(new Ve(n, w, n.path, [y, "value"]))
1578
1578
  }));
1579
1579
  if (n.common.async) {
1580
1580
  const c = /* @__PURE__ */ new Map();
1581
1581
  return Promise.resolve().then(async () => {
1582
- for (const h of l) {
1583
- const y = await h.key, w = await h.value;
1584
- if (y.status === "aborted" || w.status === "aborted")
1582
+ for (const w of l) {
1583
+ const y = await w.key, f = await w.value;
1584
+ if (y.status === "aborted" || f.status === "aborted")
1585
1585
  return I;
1586
- (y.status === "dirty" || w.status === "dirty") && s.dirty(), c.set(y.value, w.value);
1586
+ (y.status === "dirty" || f.status === "dirty") && s.dirty(), c.set(y.value, f.value);
1587
1587
  }
1588
1588
  return { status: s.value, value: c };
1589
1589
  });
1590
1590
  } else {
1591
1591
  const c = /* @__PURE__ */ new Map();
1592
- for (const h of l) {
1593
- const y = h.key, w = h.value;
1594
- if (y.status === "aborted" || w.status === "aborted")
1592
+ for (const w of l) {
1593
+ const y = w.key, f = w.value;
1594
+ if (y.status === "aborted" || f.status === "aborted")
1595
1595
  return I;
1596
- (y.status === "dirty" || w.status === "dirty") && s.dirty(), c.set(y.value, w.value);
1596
+ (y.status === "dirty" || f.status === "dirty") && s.dirty(), c.set(y.value, f.value);
1597
1597
  }
1598
1598
  return { status: s.value, value: c };
1599
1599
  }
@@ -1629,28 +1629,28 @@ class tt extends q {
1629
1629
  message: a.maxSize.message
1630
1630
  }), s.dirty());
1631
1631
  const r = this._def.valueType;
1632
- function l(h) {
1632
+ function l(w) {
1633
1633
  const y = /* @__PURE__ */ new Set();
1634
- for (const w of h) {
1635
- if (w.status === "aborted")
1634
+ for (const f of w) {
1635
+ if (f.status === "aborted")
1636
1636
  return I;
1637
- w.status === "dirty" && s.dirty(), y.add(w.value);
1637
+ f.status === "dirty" && s.dirty(), y.add(f.value);
1638
1638
  }
1639
1639
  return { status: s.value, value: y };
1640
1640
  }
1641
- const c = [...n.data.values()].map((h, y) => r._parse(new Ye(n, h, n.path, y)));
1642
- return n.common.async ? Promise.all(c).then((h) => l(h)) : l(c);
1641
+ const c = [...n.data.values()].map((w, y) => r._parse(new Ve(n, w, n.path, y)));
1642
+ return n.common.async ? Promise.all(c).then((w) => l(w)) : l(c);
1643
1643
  }
1644
1644
  min(t, s) {
1645
1645
  return new tt({
1646
1646
  ...this._def,
1647
- minSize: { value: t, message: Q.toString(s) }
1647
+ minSize: { value: t, message: Z.toString(s) }
1648
1648
  });
1649
1649
  }
1650
1650
  max(t, s) {
1651
1651
  return new tt({
1652
1652
  ...this._def,
1653
- maxSize: { value: t, message: Q.toString(s) }
1653
+ maxSize: { value: t, message: Z.toString(s) }
1654
1654
  });
1655
1655
  }
1656
1656
  size(t, s) {
@@ -1679,7 +1679,7 @@ class st extends q {
1679
1679
  expected: x.function,
1680
1680
  received: s.parsedType
1681
1681
  }), I;
1682
- function n(c, h) {
1682
+ function n(c, w) {
1683
1683
  return It({
1684
1684
  data: c,
1685
1685
  path: s.path,
@@ -1687,15 +1687,15 @@ class st extends q {
1687
1687
  s.common.contextualErrorMap,
1688
1688
  s.schemaErrorMap,
1689
1689
  Ht(),
1690
- jt
1690
+ Et
1691
1691
  ].filter((y) => !!y),
1692
1692
  issueData: {
1693
1693
  code: M.invalid_arguments,
1694
- argumentsError: h
1694
+ argumentsError: w
1695
1695
  }
1696
1696
  });
1697
1697
  }
1698
- function a(c, h) {
1698
+ function a(c, w) {
1699
1699
  return It({
1700
1700
  data: c,
1701
1701
  path: s.path,
@@ -1703,30 +1703,30 @@ class st extends q {
1703
1703
  s.common.contextualErrorMap,
1704
1704
  s.schemaErrorMap,
1705
1705
  Ht(),
1706
- jt
1706
+ Et
1707
1707
  ].filter((y) => !!y),
1708
1708
  issueData: {
1709
1709
  code: M.invalid_return_type,
1710
- returnTypeError: h
1710
+ returnTypeError: w
1711
1711
  }
1712
1712
  });
1713
1713
  }
1714
1714
  const r = { errorMap: s.common.contextualErrorMap }, l = s.data;
1715
- return this._def.returns instanceof pt ? ce(async (...c) => {
1716
- const h = new Ie([]), y = await this._def.args.parseAsync(c, r).catch((Z) => {
1717
- throw h.addIssue(n(c, Z)), h;
1718
- }), w = await l(...y);
1719
- return await this._def.returns._def.type.parseAsync(w, r).catch((Z) => {
1720
- throw h.addIssue(a(w, Z)), h;
1715
+ return this._def.returns instanceof ht ? ce(async (...c) => {
1716
+ const w = new Ie([]), y = await this._def.args.parseAsync(c, r).catch((X) => {
1717
+ throw w.addIssue(n(c, X)), w;
1718
+ }), f = await l(...y);
1719
+ return await this._def.returns._def.type.parseAsync(f, r).catch((X) => {
1720
+ throw w.addIssue(a(f, X)), w;
1721
1721
  });
1722
1722
  }) : ce((...c) => {
1723
- const h = this._def.args.safeParse(c, r);
1724
- if (!h.success)
1725
- throw new Ie([n(c, h.error)]);
1726
- const y = l(...h.data), w = this._def.returns.safeParse(y, r);
1723
+ const w = this._def.args.safeParse(c, r);
1727
1724
  if (!w.success)
1728
- throw new Ie([a(y, w.error)]);
1729
- return w.data;
1725
+ throw new Ie([n(c, w.error)]);
1726
+ const y = l(...w.data), f = this._def.returns.safeParse(y, r);
1727
+ if (!f.success)
1728
+ throw new Ie([a(y, f.error)]);
1729
+ return f.data;
1730
1730
  });
1731
1731
  }
1732
1732
  parameters() {
@@ -1738,7 +1738,7 @@ class st extends q {
1738
1738
  args(...t) {
1739
1739
  return new st({
1740
1740
  ...this._def,
1741
- args: Fe.create(t).rest(Ze.create())
1741
+ args: Se.create(t).rest(Ze.create())
1742
1742
  });
1743
1743
  }
1744
1744
  returns(t) {
@@ -1755,7 +1755,7 @@ class st extends q {
1755
1755
  }
1756
1756
  }
1757
1757
  st.create = (e, t, s) => new st({
1758
- args: e ? e.rest(Ze.create()) : Fe.create([]).rest(Ze.create()),
1758
+ args: e ? e.rest(Ze.create()) : Se.create([]).rest(Ze.create()),
1759
1759
  returns: t || Ze.create(),
1760
1760
  typeName: H.ZodFunction,
1761
1761
  ...N(s)
@@ -1806,7 +1806,7 @@ class ts extends q {
1806
1806
  if (typeof t.data != "string") {
1807
1807
  const s = this._getOrReturnCtx(t), n = this._def.values;
1808
1808
  return P(s, {
1809
- expected: U.joinValues(n),
1809
+ expected: z.joinValues(n),
1810
1810
  received: s.parsedType,
1811
1811
  code: M.invalid_type
1812
1812
  }), I;
@@ -1846,17 +1846,17 @@ class ts extends q {
1846
1846
  ts.create = Cn;
1847
1847
  class Kt extends q {
1848
1848
  _parse(t) {
1849
- const s = U.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(t);
1849
+ const s = z.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(t);
1850
1850
  if (n.parsedType !== x.string && n.parsedType !== x.number) {
1851
- const a = U.objectValues(s);
1851
+ const a = z.objectValues(s);
1852
1852
  return P(n, {
1853
- expected: U.joinValues(a),
1853
+ expected: z.joinValues(a),
1854
1854
  received: n.parsedType,
1855
1855
  code: M.invalid_type
1856
1856
  }), I;
1857
1857
  }
1858
1858
  if (s.indexOf(t.data) === -1) {
1859
- const a = U.objectValues(s);
1859
+ const a = z.objectValues(s);
1860
1860
  return P(n, {
1861
1861
  received: n.data,
1862
1862
  code: M.invalid_enum_value,
@@ -1874,7 +1874,7 @@ Kt.create = (e, t) => new Kt({
1874
1874
  typeName: H.ZodNativeEnum,
1875
1875
  ...N(t)
1876
1876
  });
1877
- class pt extends q {
1877
+ class ht extends q {
1878
1878
  _parse(t) {
1879
1879
  const { ctx: s } = this._processInputParams(t);
1880
1880
  if (s.parsedType !== x.promise && s.common.async === !1)
@@ -1890,12 +1890,12 @@ class pt extends q {
1890
1890
  })));
1891
1891
  }
1892
1892
  }
1893
- pt.create = (e, t) => new pt({
1893
+ ht.create = (e, t) => new ht({
1894
1894
  type: e,
1895
1895
  typeName: H.ZodPromise,
1896
1896
  ...N(t)
1897
1897
  });
1898
- class Se extends q {
1898
+ class ke extends q {
1899
1899
  innerType() {
1900
1900
  return this._def.schema;
1901
1901
  }
@@ -1923,10 +1923,10 @@ class Se extends q {
1923
1923
  };
1924
1924
  if (r.addIssue = r.addIssue.bind(r), a.type === "refinement") {
1925
1925
  const l = (c) => {
1926
- const h = a.refinement(c, r);
1926
+ const w = a.refinement(c, r);
1927
1927
  if (n.common.async)
1928
- return Promise.resolve(h);
1929
- if (h instanceof Promise)
1928
+ return Promise.resolve(w);
1929
+ if (w instanceof Promise)
1930
1930
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
1931
1931
  return c;
1932
1932
  };
@@ -1955,22 +1955,22 @@ class Se extends q {
1955
1955
  return { status: s.value, value: c };
1956
1956
  } else
1957
1957
  return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((l) => Tt(l) ? Promise.resolve(a.transform(l.value, r)).then((c) => ({ status: s.value, value: c })) : l);
1958
- U.assertNever(a);
1958
+ z.assertNever(a);
1959
1959
  }
1960
1960
  }
1961
- Se.create = (e, t, s) => new Se({
1961
+ ke.create = (e, t, s) => new ke({
1962
1962
  schema: e,
1963
1963
  typeName: H.ZodEffects,
1964
1964
  effect: t,
1965
1965
  ...N(s)
1966
1966
  });
1967
- Se.createWithPreprocess = (e, t, s) => new Se({
1967
+ ke.createWithPreprocess = (e, t, s) => new ke({
1968
1968
  schema: t,
1969
1969
  effect: { type: "preprocess", transform: e },
1970
1970
  typeName: H.ZodEffects,
1971
1971
  ...N(s)
1972
1972
  });
1973
- class Ge extends q {
1973
+ class Ye extends q {
1974
1974
  _parse(t) {
1975
1975
  return this._getType(t) === x.undefined ? ce(void 0) : this._def.innerType._parse(t);
1976
1976
  }
@@ -1978,7 +1978,7 @@ class Ge extends q {
1978
1978
  return this._def.innerType;
1979
1979
  }
1980
1980
  }
1981
- Ge.create = (e, t) => new Ge({
1981
+ Ye.create = (e, t) => new Ye({
1982
1982
  innerType: e,
1983
1983
  typeName: H.ZodOptional,
1984
1984
  ...N(t)
@@ -2010,7 +2010,7 @@ class Qs extends q {
2010
2010
  return this._def.innerType;
2011
2011
  }
2012
2012
  }
2013
- Qs.create = (e, t) => new Ge({
2013
+ Qs.create = (e, t) => new Ye({
2014
2014
  innerType: e,
2015
2015
  typeName: H.ZodOptional,
2016
2016
  ...N(t)
@@ -2032,12 +2032,12 @@ Jt.create = (e) => new Jt({
2032
2032
  typeName: H.ZodNaN,
2033
2033
  ...N(e)
2034
2034
  });
2035
- const Mn = (e, t = {}, s) => e ? gt.create().superRefine((n, a) => {
2035
+ const Mn = (e, t = {}, s) => e ? pt.create().superRefine((n, a) => {
2036
2036
  if (!e(n)) {
2037
2037
  const r = typeof t == "function" ? t(n) : t, l = typeof r == "string" ? { message: r } : r;
2038
2038
  a.addIssue({ code: "custom", ...l, fatal: s });
2039
2039
  }
2040
- }) : gt.create(), yr = {
2040
+ }) : pt.create(), yr = {
2041
2041
  object: ee.lazycreate
2042
2042
  };
2043
2043
  var H;
@@ -2046,8 +2046,8 @@ var H;
2046
2046
  })(H || (H = {}));
2047
2047
  const br = (e, t = {
2048
2048
  message: `Input not instance of ${e.name}`
2049
- }) => Mn((s) => s instanceof e, t, !0), Dn = ze.create, xn = et.create, vr = Jt.create, wr = qt.create, jn = Nt.create, Br = At.create, Cr = Xt.create, Mr = Qt.create, Dr = gt.create, xr = Ze.create, jr = We.create, Er = Zt.create, Pr = Ve.create, Or = ee.create, Gr = ee.strictCreate, Yr = Et.create, Vr = es.create, Fr = Pt.create, Sr = Fe.create, kr = Ot.create, Rr = zt.create, Hr = tt.create, Ir = st.create, Tr = Wt.create, qr = Lt.create, Nr = ts.create, Xr = Kt.create, Qr = pt.create, rn = Se.create, Zr = Ge.create, Ur = nt.create, zr = Se.createWithPreprocess, Wr = () => Dn().optional(), Lr = () => xn().optional(), Kr = () => jn().optional();
2050
- var Ct = /* @__PURE__ */ Object.freeze({
2049
+ }) => Mn((s) => s instanceof e, t, !0), Dn = ze.create, xn = et.create, vr = Jt.create, wr = qt.create, jn = Nt.create, Br = gt.create, Cr = Xt.create, Mr = Qt.create, Dr = pt.create, xr = Ze.create, jr = We.create, Er = Zt.create, Pr = Fe.create, Or = ee.create, Gr = ee.strictCreate, Yr = Pt.create, Vr = es.create, Fr = Ot.create, Sr = Se.create, kr = Gt.create, Rr = zt.create, Hr = tt.create, Ir = st.create, Tr = Wt.create, qr = Lt.create, Nr = ts.create, Xr = Kt.create, Qr = ht.create, rn = ke.create, Zr = Ye.create, Ur = nt.create, zr = ke.createWithPreprocess, Wr = () => Dn().optional(), Lr = () => xn().optional(), Kr = () => jn().optional();
2050
+ var Mt = /* @__PURE__ */ Object.freeze({
2051
2051
  __proto__: null,
2052
2052
  getParsedType: Qe,
2053
2053
  ZodParsedType: x,
@@ -2068,23 +2068,23 @@ var Ct = /* @__PURE__ */ Object.freeze({
2068
2068
  ZodNumber: et,
2069
2069
  ZodBigInt: qt,
2070
2070
  ZodBoolean: Nt,
2071
- ZodDate: At,
2071
+ ZodDate: gt,
2072
2072
  ZodUndefined: Xt,
2073
2073
  ZodNull: Qt,
2074
- ZodAny: gt,
2074
+ ZodAny: pt,
2075
2075
  ZodUnknown: Ze,
2076
2076
  ZodNever: We,
2077
2077
  ZodVoid: Zt,
2078
- ZodArray: Ve,
2078
+ ZodArray: Fe,
2079
2079
  get objectUtil() {
2080
2080
  return Ut;
2081
2081
  },
2082
2082
  ZodObject: ee,
2083
- ZodUnion: Et,
2083
+ ZodUnion: Pt,
2084
2084
  ZodDiscriminatedUnion: es,
2085
- ZodIntersection: Pt,
2086
- ZodTuple: Fe,
2087
- ZodRecord: Ot,
2085
+ ZodIntersection: Ot,
2086
+ ZodTuple: Se,
2087
+ ZodRecord: Gt,
2088
2088
  ZodMap: zt,
2089
2089
  ZodSet: tt,
2090
2090
  ZodFunction: st,
@@ -2092,10 +2092,10 @@ var Ct = /* @__PURE__ */ Object.freeze({
2092
2092
  ZodLiteral: Lt,
2093
2093
  ZodEnum: ts,
2094
2094
  ZodNativeEnum: Kt,
2095
- ZodPromise: pt,
2096
- ZodEffects: Se,
2097
- ZodTransformer: Se,
2098
- ZodOptional: Ge,
2095
+ ZodPromise: ht,
2096
+ ZodEffects: ke,
2097
+ ZodTransformer: ke,
2098
+ ZodOptional: Ye,
2099
2099
  ZodNullable: nt,
2100
2100
  ZodDefault: Qs,
2101
2101
  ZodNaN: Jt,
@@ -2146,7 +2146,7 @@ var Ct = /* @__PURE__ */ Object.freeze({
2146
2146
  ZodIssueCode: M,
2147
2147
  quotelessJson: ur,
2148
2148
  ZodError: Ie,
2149
- defaultErrorMap: jt,
2149
+ defaultErrorMap: Et,
2150
2150
  setErrorMap: dr,
2151
2151
  getErrorMap: Ht
2152
2152
  });
@@ -2234,7 +2234,7 @@ function to(e, t) {
2234
2234
  function so(e, t) {
2235
2235
  return e.fields.filter((s) => to(s, t));
2236
2236
  }
2237
- function $c(e, t) {
2237
+ function tu(e, t) {
2238
2238
  const s = { ...t };
2239
2239
  for (const n of so(e, s))
2240
2240
  (s[n.key] === void 0 || s[n.key] === null) && n.default !== void 0 && (s[n.key] = n.default);
@@ -2267,7 +2267,7 @@ function ao(e) {
2267
2267
  const t = e == null ? void 0 : e.shape;
2268
2268
  return t ? Object.keys(t) : void 0;
2269
2269
  }
2270
- const Pn = /* @__PURE__ */ new Map(), St = [], ro = /* @__PURE__ */ new Map(), on = "prefix:";
2270
+ const Pn = /* @__PURE__ */ new Map(), kt = [], ro = /* @__PURE__ */ new Map(), on = "prefix:";
2271
2271
  function oo(e) {
2272
2272
  for (const [t, s] of Object.entries(e))
2273
2273
  io([t], s);
@@ -2278,8 +2278,8 @@ function io(e, t) {
2278
2278
  for (const n of s) ro.set(n.builderKey, n);
2279
2279
  for (const n of e)
2280
2280
  if (n.startsWith(on)) {
2281
- const a = n.slice(on.length), r = St.findIndex((l) => l.prefix === a);
2282
- r >= 0 ? St[r] = { prefix: a, builders: s } : St.push({ prefix: a, builders: s });
2281
+ const a = n.slice(on.length), r = kt.findIndex((l) => l.prefix === a);
2282
+ r >= 0 ? kt[r] = { prefix: a, builders: s } : kt.push({ prefix: a, builders: s });
2283
2283
  } else
2284
2284
  Pn.set(n, s);
2285
2285
  }
@@ -2303,19 +2303,19 @@ function co(e) {
2303
2303
  const t = Pn.get(e);
2304
2304
  if (t) return t;
2305
2305
  let s;
2306
- for (const n of St)
2306
+ for (const n of kt)
2307
2307
  e.startsWith(n.prefix) && (!s || n.prefix.length > s.prefix.length) && (s = n);
2308
2308
  return (s == null ? void 0 : s.builders) ?? [];
2309
2309
  }
2310
- const uo = "business::report::reports::", mo = Ct.object({
2310
+ const uo = "business::report::reports::", mo = Mt.object({
2311
2311
  /** Requested report date, normalized to a UTC ISO string. */
2312
- reportDate: Ct.string().refine((e) => !Number.isNaN(Date.parse(e))),
2312
+ reportDate: Mt.string().refine((e) => !Number.isNaN(Date.parse(e))),
2313
2313
  /** Whole UTC days between now and the report date. */
2314
- reportAgeDays: Ct.number().int().min(0),
2314
+ reportAgeDays: Mt.number().int().min(0),
2315
2315
  /** Whole UTC months between now and the report date. */
2316
- reportAgeMonths: Ct.number().int().min(0),
2316
+ reportAgeMonths: Mt.number().int().min(0),
2317
2317
  /** Whole UTC years between now and the report date. */
2318
- reportAgeYears: Ct.number().int().min(0)
2318
+ reportAgeYears: Mt.number().int().min(0)
2319
2319
  }), Ao = 864e5;
2320
2320
  function ln(e, t) {
2321
2321
  const s = new Date(e);
@@ -2370,18 +2370,18 @@ function vo(e, t) {
2370
2370
  return e.slice(0, 10);
2371
2371
  }
2372
2372
  }
2373
- const xt = "conditionBuilder.reportAccessWindow", un = {
2374
- days: `${xt}.inheritedLastDays`,
2375
- months: `${xt}.inheritedLastMonths`,
2376
- years: `${xt}.inheritedLastYears`
2373
+ const jt = "conditionBuilder.reportAccessWindow", un = {
2374
+ days: `${jt}.inheritedLastDays`,
2375
+ months: `${jt}.inheritedLastMonths`,
2376
+ years: `${jt}.inheritedLastYears`
2377
2377
  };
2378
2378
  function wo(e, t) {
2379
2379
  if (!(!e || typeof e != "object")) {
2380
2380
  if (e.mode === "unrestricted")
2381
- return { labelKey: `${xt}.unrestricted` };
2381
+ return { labelKey: `${jt}.unrestricted` };
2382
2382
  if (e.mode === "since" && typeof e.sinceAtUtc == "string")
2383
2383
  return {
2384
- labelKey: `${xt}.inheritedSince`,
2384
+ labelKey: `${jt}.inheritedSince`,
2385
2385
  params: { date: vo(e.sinceAtUtc, t.timeZone) }
2386
2386
  };
2387
2387
  if (e.mode === "last" && typeof e.amount == "number" && typeof e.unit == "string" && e.unit in un)
@@ -2486,7 +2486,7 @@ const Bo = {
2486
2486
  report: Je
2487
2487
  };
2488
2488
  oo(Mo);
2489
- function eu(e, t) {
2489
+ function su(e, t) {
2490
2490
  if (!e) return {};
2491
2491
  const s = new Set(t.ownedFields);
2492
2492
  return Object.fromEntries(Object.entries(e).filter(([n]) => s.has(n)));
@@ -2496,7 +2496,7 @@ function Do(e, t) {
2496
2496
  const s = new Set(t.flatMap((n) => n.ownedFields));
2497
2497
  return Object.fromEntries(Object.entries(e).filter(([n]) => !s.has(n)));
2498
2498
  }
2499
- function tu(e, t) {
2499
+ function nu(e, t) {
2500
2500
  return Object.assign(
2501
2501
  Do(
2502
2502
  e,
@@ -6782,8 +6782,8 @@ const On = {
6782
6782
  "th-TH": Hi,
6783
6783
  "zh-Hant": Ni
6784
6784
  };
6785
- var S = /* @__PURE__ */ ((e) => (e.Order = "order", e.Refund = "refund", e.Drawer = "drawer", e.Menu = "menu", e.Inventory = "inventory", e.Deposit = "deposit", e.Delivery = "delivery", e.CounterRecord = "counterRecord", e.Counter = "counter", e.RestaurantSetting = "restaurantSetting", e.Display = "display", e.Printer = "printer", e.Table = "table", e.Employee = "employee", e.System = "system", e.Tax = "tax", e.PaymentType = "paymentType", e.FaceId = "faceId", e.MallIntegration = "mallIntegration", e.Report = "report", e))(S || {}), Re = /* @__PURE__ */ ((e) => (e.Discount = "discount", e.Payment = "payment", e.ClaimDeposit = "claimDeposit", e.ChangePrice = "changePrice", e.Void = "void_", e.WaiveServiceCharge = "waiveServiceCharge", e.Resend = "resend", e.ChangePaymentType = "changePaymentType", e))(Re || {}), k = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(k || {}), re = /* @__PURE__ */ ((e) => (e.Closeup = "closeup", e.Counter = "counter", e.HourlySales = "hourlySales", e.DailySales = "dailySales", e.ProductSales = "productSales", e.SourceProductSales = "sourceProductSales", e.UserProductSales = "userProductSales", e.CategorySales = "categorySales", e.AddonSales = "addonSales", e.SlotSales = "slotSales", e.Drawer = "drawer", e.Discount = "discount", e.Refund = "refund", e.Void = "void_", e.Timesheet = "timesheet", e.CounterPayment = "counterPayment", e))(re || {});
6786
- const su = {
6785
+ var S = /* @__PURE__ */ ((e) => (e.Order = "order", e.Refund = "refund", e.Drawer = "drawer", e.Menu = "menu", e.Inventory = "inventory", e.Deposit = "deposit", e.Delivery = "delivery", e.CounterRecord = "counterRecord", e.Counter = "counter", e.RestaurantSetting = "restaurantSetting", e.Display = "display", e.Printer = "printer", e.Table = "table", e.Employee = "employee", e.System = "system", e.Tax = "tax", e.PaymentType = "paymentType", e.FaceId = "faceId", e.MallIntegration = "mallIntegration", e.Report = "report", e))(S || {}), He = /* @__PURE__ */ ((e) => (e.Discount = "discount", e.Payment = "payment", e.ClaimDeposit = "claimDeposit", e.ChangePrice = "changePrice", e.Void = "void_", e.WaiveServiceCharge = "waiveServiceCharge", e.Resend = "resend", e.ChangePaymentType = "changePaymentType", e))(He || {}), k = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(k || {}), re = /* @__PURE__ */ ((e) => (e.Closeup = "closeup", e.Counter = "counter", e.HourlySales = "hourlySales", e.DailySales = "dailySales", e.ProductSales = "productSales", e.SourceProductSales = "sourceProductSales", e.UserProductSales = "userProductSales", e.CategorySales = "categorySales", e.AddonSales = "addonSales", e.SlotSales = "slotSales", e.Drawer = "drawer", e.Discount = "discount", e.Refund = "refund", e.Void = "void_", e.Timesheet = "timesheet", e.CounterPayment = "counterPayment", e))(re || {});
6786
+ const au = {
6787
6787
  // General
6788
6788
  restaurant: {
6789
6789
  label: "Restaurant Owner",
@@ -7450,13 +7450,13 @@ const su = {
7450
7450
  category: v.media,
7451
7451
  showByFeatureFlag: "hrm_enable_media_permission"
7452
7452
  }
7453
- }, nu = [
7453
+ }, ru = [
7454
7454
  {
7455
7455
  label: "",
7456
7456
  subject: S.Order,
7457
7457
  actions: [k.update],
7458
7458
  conditions: {
7459
- operation: Re.Discount,
7459
+ operation: He.Discount,
7460
7460
  adjustment: {
7461
7461
  $lte: 1
7462
7462
  }
@@ -7468,7 +7468,7 @@ const su = {
7468
7468
  label: "",
7469
7469
  subject: S.Order,
7470
7470
  actions: [k.update],
7471
- conditions: { operation: Re.ChangePrice },
7471
+ conditions: { operation: He.ChangePrice },
7472
7472
  inverted: !1,
7473
7473
  reason: null
7474
7474
  },
@@ -7480,7 +7480,7 @@ const su = {
7480
7480
  // 'void' is a reserved word in the POS Flutter/Dart client, so the identifier
7481
7481
  // POS actually evaluates against (and sends to the approval-code validate
7482
7482
  // endpoint) is already 'void_'. Keep in sync with approval-code-rules.ts.
7483
- conditions: { operation: Re.Void },
7483
+ conditions: { operation: He.Void },
7484
7484
  inverted: !1,
7485
7485
  reason: null
7486
7486
  },
@@ -7488,7 +7488,7 @@ const su = {
7488
7488
  label: "",
7489
7489
  subject: S.Order,
7490
7490
  actions: [k.update],
7491
- conditions: { operation: Re.WaiveServiceCharge },
7491
+ conditions: { operation: He.WaiveServiceCharge },
7492
7492
  inverted: !1,
7493
7493
  reason: null
7494
7494
  },
@@ -7496,7 +7496,7 @@ const su = {
7496
7496
  label: "",
7497
7497
  subject: S.Order,
7498
7498
  actions: [k.update],
7499
- conditions: { operation: Re.Payment },
7499
+ conditions: { operation: He.Payment },
7500
7500
  inverted: !1,
7501
7501
  reason: null
7502
7502
  },
@@ -7504,7 +7504,7 @@ const su = {
7504
7504
  label: "",
7505
7505
  subject: S.Order,
7506
7506
  actions: [k.update],
7507
- conditions: { operation: Re.ClaimDeposit },
7507
+ conditions: { operation: He.ClaimDeposit },
7508
7508
  inverted: !1,
7509
7509
  reason: null
7510
7510
  },
@@ -7512,7 +7512,7 @@ const su = {
7512
7512
  label: "",
7513
7513
  subject: S.Order,
7514
7514
  actions: [k.update],
7515
- conditions: { operation: Re.Resend },
7515
+ conditions: { operation: He.Resend },
7516
7516
  inverted: !1,
7517
7517
  reason: null
7518
7518
  },
@@ -7520,7 +7520,7 @@ const su = {
7520
7520
  label: "",
7521
7521
  subject: S.Order,
7522
7522
  actions: [k.update],
7523
- conditions: { operation: Re.ChangePaymentType },
7523
+ conditions: { operation: He.ChangePaymentType },
7524
7524
  inverted: !1,
7525
7525
  reason: null
7526
7526
  },
@@ -7800,18 +7800,18 @@ const su = {
7800
7800
  reason: ""
7801
7801
  }
7802
7802
  ];
7803
- var z = /* @__PURE__ */ ((e) => (e.crm = "crm", e.crm_user = "crm::user", e.crm_segmentation = "crm::segmentation", e.crm_queue = "crm::queue", e.crm_transaction = "crm::transaction", e.crm_store = "crm::store", e.crm_location = "crm::location", e.crm_effect = "crm::effect", e.crm_setting = "crm::setting", e.crm_reward = "crm::reward", e.crm_campaign = "crm::campaign", e.crm_referral = "crm::referral", e.crm_marketingMaterial = "crm::marketingMaterial", e.crm_voucher = "crm::voucher", e.crm_membership = "crm::membership", e.crm_analytic = "crm::analytic", e.crm_tier = "crm::tier", e.crm_title = "crm::title", e.crm_broadcast = "crm::broadcast", e.crm_point = "crm::point", e.crm_credit = "crm::credit", e.crm_experience = "crm::experience", e.crm_game = "crm::game", e.crm_mission = "crm::mission", e.crm_loyaltyMember = "crm::loyaltyMember", e.crm_loyaltySegment = "crm::loyaltySegment", e.crm_loyaltyCard = "crm::loyaltyCard", e.crm_bin = "crm::bin", e))(z || {});
7803
+ var W = /* @__PURE__ */ ((e) => (e.crm = "crm", e.crm_user = "crm::user", e.crm_segmentation = "crm::segmentation", e.crm_queue = "crm::queue", e.crm_transaction = "crm::transaction", e.crm_store = "crm::store", e.crm_location = "crm::location", e.crm_effect = "crm::effect", e.crm_setting = "crm::setting", e.crm_reward = "crm::reward", e.crm_campaign = "crm::campaign", e.crm_referral = "crm::referral", e.crm_marketingMaterial = "crm::marketingMaterial", e.crm_voucher = "crm::voucher", e.crm_membership = "crm::membership", e.crm_analytic = "crm::analytic", e.crm_tier = "crm::tier", e.crm_title = "crm::title", e.crm_broadcast = "crm::broadcast", e.crm_point = "crm::point", e.crm_credit = "crm::credit", e.crm_experience = "crm::experience", e.crm_game = "crm::game", e.crm_mission = "crm::mission", e.crm_loyaltyMember = "crm::loyaltyMember", e.crm_loyaltySegment = "crm::loyaltySegment", e.crm_loyaltyCard = "crm::loyaltyCard", e.crm_bin = "crm::bin", e))(W || {});
7804
7804
  const J = [
7805
7805
  {
7806
7806
  label: "CRM",
7807
- subject: z.crm,
7807
+ subject: W.crm,
7808
7808
  actions: [o.read]
7809
7809
  }
7810
7810
  ], ge = (...e) => e.flat(), Qi = [
7811
7811
  ...J,
7812
7812
  {
7813
7813
  label: "User",
7814
- subject: z.crm_user,
7814
+ subject: W.crm_user,
7815
7815
  actions: [
7816
7816
  o.read,
7817
7817
  o.create,
@@ -7823,7 +7823,7 @@ const J = [
7823
7823
  ...J,
7824
7824
  {
7825
7825
  label: "Segmentation",
7826
- subject: z.crm_segmentation,
7826
+ subject: W.crm_segmentation,
7827
7827
  actions: [
7828
7828
  o.read,
7829
7829
  o.create,
@@ -7835,7 +7835,7 @@ const J = [
7835
7835
  ...J,
7836
7836
  {
7837
7837
  label: "Transaction",
7838
- subject: z.crm_transaction,
7838
+ subject: W.crm_transaction,
7839
7839
  actions: [
7840
7840
  o.read,
7841
7841
  o.create,
@@ -7847,7 +7847,7 @@ const J = [
7847
7847
  ...J,
7848
7848
  {
7849
7849
  label: "Store",
7850
- subject: z.crm_store,
7850
+ subject: W.crm_store,
7851
7851
  actions: [
7852
7852
  o.read,
7853
7853
  o.create,
@@ -7859,7 +7859,7 @@ const J = [
7859
7859
  ...J,
7860
7860
  {
7861
7861
  label: "Location",
7862
- subject: z.crm_location,
7862
+ subject: W.crm_location,
7863
7863
  actions: [
7864
7864
  o.read,
7865
7865
  o.create,
@@ -7871,7 +7871,7 @@ const J = [
7871
7871
  ...J,
7872
7872
  {
7873
7873
  label: "Effect",
7874
- subject: z.crm_effect,
7874
+ subject: W.crm_effect,
7875
7875
  actions: [
7876
7876
  o.read,
7877
7877
  o.create,
@@ -7883,14 +7883,14 @@ const J = [
7883
7883
  ...J,
7884
7884
  {
7885
7885
  label: "Setting",
7886
- subject: z.crm_setting,
7886
+ subject: W.crm_setting,
7887
7887
  actions: [o.read, o.update]
7888
7888
  }
7889
7889
  ], Li = [
7890
7890
  ...J,
7891
7891
  {
7892
7892
  label: "Reward",
7893
- subject: z.crm_reward,
7893
+ subject: W.crm_reward,
7894
7894
  actions: [
7895
7895
  o.read,
7896
7896
  o.create,
@@ -7902,7 +7902,7 @@ const J = [
7902
7902
  ...J,
7903
7903
  {
7904
7904
  label: "Campaign",
7905
- subject: z.crm_campaign,
7905
+ subject: W.crm_campaign,
7906
7906
  actions: [
7907
7907
  o.read,
7908
7908
  o.create,
@@ -7914,7 +7914,7 @@ const J = [
7914
7914
  ...J,
7915
7915
  {
7916
7916
  label: "Referral",
7917
- subject: z.crm_referral,
7917
+ subject: W.crm_referral,
7918
7918
  actions: [
7919
7919
  o.read,
7920
7920
  o.create,
@@ -7926,7 +7926,7 @@ const J = [
7926
7926
  ...J,
7927
7927
  {
7928
7928
  label: "Marketing Material",
7929
- subject: z.crm_marketingMaterial,
7929
+ subject: W.crm_marketingMaterial,
7930
7930
  actions: [
7931
7931
  o.read,
7932
7932
  o.create,
@@ -7938,14 +7938,14 @@ const J = [
7938
7938
  ...J,
7939
7939
  {
7940
7940
  label: "Analytic",
7941
- subject: z.crm_analytic,
7941
+ subject: W.crm_analytic,
7942
7942
  actions: [o.read]
7943
7943
  }
7944
7944
  ], Ki = [
7945
7945
  ...J,
7946
7946
  {
7947
7947
  label: "Tier",
7948
- subject: z.crm_tier,
7948
+ subject: W.crm_tier,
7949
7949
  actions: [
7950
7950
  o.read,
7951
7951
  o.create,
@@ -7957,7 +7957,7 @@ const J = [
7957
7957
  ...J,
7958
7958
  {
7959
7959
  label: "Title",
7960
- subject: z.crm_title,
7960
+ subject: W.crm_title,
7961
7961
  actions: [
7962
7962
  o.read,
7963
7963
  o.create,
@@ -7969,7 +7969,7 @@ const J = [
7969
7969
  ...J,
7970
7970
  {
7971
7971
  label: "Broadcast",
7972
- subject: z.crm_broadcast,
7972
+ subject: W.crm_broadcast,
7973
7973
  actions: [
7974
7974
  o.read,
7975
7975
  o.create,
@@ -7981,7 +7981,7 @@ const J = [
7981
7981
  ...J,
7982
7982
  {
7983
7983
  label: "Point",
7984
- subject: z.crm_point,
7984
+ subject: W.crm_point,
7985
7985
  actions: [
7986
7986
  o.read,
7987
7987
  o.create,
@@ -7993,7 +7993,7 @@ const J = [
7993
7993
  ...J,
7994
7994
  {
7995
7995
  label: "Credit",
7996
- subject: z.crm_credit,
7996
+ subject: W.crm_credit,
7997
7997
  actions: [
7998
7998
  o.read,
7999
7999
  o.create,
@@ -8005,7 +8005,7 @@ const J = [
8005
8005
  ...J,
8006
8006
  {
8007
8007
  label: "Experience",
8008
- subject: z.crm_experience,
8008
+ subject: W.crm_experience,
8009
8009
  actions: [
8010
8010
  o.read,
8011
8011
  o.create,
@@ -8017,7 +8017,7 @@ const J = [
8017
8017
  ...J,
8018
8018
  {
8019
8019
  label: "Game",
8020
- subject: z.crm_game,
8020
+ subject: W.crm_game,
8021
8021
  actions: [
8022
8022
  o.read,
8023
8023
  o.create,
@@ -8029,7 +8029,7 @@ const J = [
8029
8029
  ...J,
8030
8030
  {
8031
8031
  label: "Mission",
8032
- subject: z.crm_mission,
8032
+ subject: W.crm_mission,
8033
8033
  actions: [
8034
8034
  o.read,
8035
8035
  o.create,
@@ -8041,7 +8041,7 @@ const J = [
8041
8041
  ...J,
8042
8042
  {
8043
8043
  label: "Loyalty Member",
8044
- subject: z.crm_loyaltyMember,
8044
+ subject: W.crm_loyaltyMember,
8045
8045
  actions: [
8046
8046
  o.read,
8047
8047
  o.create,
@@ -8053,7 +8053,7 @@ const J = [
8053
8053
  ...J,
8054
8054
  {
8055
8055
  label: "Loyalty Segment",
8056
- subject: z.crm_loyaltySegment,
8056
+ subject: W.crm_loyaltySegment,
8057
8057
  actions: [
8058
8058
  o.read,
8059
8059
  o.create,
@@ -8065,7 +8065,7 @@ const J = [
8065
8065
  ...J,
8066
8066
  {
8067
8067
  label: "Loyalty Card",
8068
- subject: z.crm_loyaltyCard,
8068
+ subject: W.crm_loyaltyCard,
8069
8069
  actions: [
8070
8070
  o.read,
8071
8071
  o.create,
@@ -8077,7 +8077,7 @@ const J = [
8077
8077
  ...J,
8078
8078
  {
8079
8079
  label: "Bin",
8080
- subject: z.crm_bin,
8080
+ subject: W.crm_bin,
8081
8081
  actions: [o.read, o.update, o.delete]
8082
8082
  }
8083
8083
  ], Da = ge(
@@ -8114,7 +8114,7 @@ const J = [
8114
8114
  ...J,
8115
8115
  {
8116
8116
  label: "Voucher",
8117
- subject: z.crm_voucher,
8117
+ subject: W.crm_voucher,
8118
8118
  actions: [
8119
8119
  o.read,
8120
8120
  o.create,
@@ -8126,7 +8126,7 @@ const J = [
8126
8126
  ...J,
8127
8127
  {
8128
8128
  label: "Membership",
8129
- subject: z.crm_membership,
8129
+ subject: W.crm_membership,
8130
8130
  actions: [
8131
8131
  o.read,
8132
8132
  o.create,
@@ -8275,54 +8275,54 @@ const J = [
8275
8275
  permissions: ba
8276
8276
  }
8277
8277
  };
8278
- var Y = /* @__PURE__ */ ((e) => (e.inventory = "inventory", e.inventory_stock = "inventory::stock", e.inventory_stockAdjustment = "inventory::stockAdjustment", e.inventory_stockAdjustmentReason = "inventory::stockAdjustmentReason", e.inventory_stockRecalculation = "inventory::stockRecalculation", e.inventory_unitCostHistory = "inventory::unitCostHistory", e.inventory_wastageTemplate = "inventory::wastageTemplate", e.inventory_closing = "inventory::closing", e.inventory_closingDraft = "inventory::closingDraft", e.inventory_closingTemplate = "inventory::closingTemplate", e.inventory_ingredient = "inventory::ingredient", e.inventory_ingredientGroup = "inventory::ingredientGroup", e.inventory_recipe = "inventory::recipe", e.inventory_unit = "inventory::unit", e.inventory_orderTemplate = "inventory::orderTemplate", e.inventory_orderDraft = "inventory::orderDraft", e.inventory_printTemplate = "inventory::printTemplate", e.inventory_purchaseOrder = "inventory::purchaseOrder", e.inventory_transferOutApproval = "inventory::transferOutApproval", e.inventory_adjustmentTemplate = "inventory::adjustmentTemplate", e.inventory_surcharge = "inventory::surcharge", e.inventory_supplier = "inventory::supplier", e.inventory_warehouse = "inventory::warehouse", e.inventory_publish = "inventory::publish", e.inventory_integration = "inventory::integration", e.inventory_deliveryOrder = "inventory::deliveryOrder", e.inventory_shipment = "inventory::shipment", e.inventory_orderDraftApproval = "inventory::orderDraftApproval", e))(Y || {});
8278
+ var V = /* @__PURE__ */ ((e) => (e.inventory = "inventory", e.inventory_stock = "inventory::stock", e.inventory_stockAdjustment = "inventory::stockAdjustment", e.inventory_stockAdjustmentReason = "inventory::stockAdjustmentReason", e.inventory_stockRecalculation = "inventory::stockRecalculation", e.inventory_unitCostHistory = "inventory::unitCostHistory", e.inventory_wastageTemplate = "inventory::wastageTemplate", e.inventory_closing = "inventory::closing", e.inventory_closingDraft = "inventory::closingDraft", e.inventory_closingTemplate = "inventory::closingTemplate", e.inventory_ingredient = "inventory::ingredient", e.inventory_ingredientGroup = "inventory::ingredientGroup", e.inventory_recipe = "inventory::recipe", e.inventory_unit = "inventory::unit", e.inventory_orderTemplate = "inventory::orderTemplate", e.inventory_orderDraft = "inventory::orderDraft", e.inventory_printTemplate = "inventory::printTemplate", e.inventory_purchaseOrder = "inventory::purchaseOrder", e.inventory_transferOutApproval = "inventory::transferOutApproval", e.inventory_adjustmentTemplate = "inventory::adjustmentTemplate", e.inventory_surcharge = "inventory::surcharge", e.inventory_supplier = "inventory::supplier", e.inventory_warehouse = "inventory::warehouse", e.inventory_publish = "inventory::publish", e.inventory_integration = "inventory::integration", e.inventory_deliveryOrder = "inventory::deliveryOrder", e.inventory_shipment = "inventory::shipment", e.inventory_orderDraftApproval = "inventory::orderDraftApproval", e))(V || {});
8279
8279
  const ue = [
8280
8280
  {
8281
8281
  label: "Inventory",
8282
- subject: Y.inventory,
8282
+ subject: V.inventory,
8283
8283
  actions: [o.read]
8284
8284
  }
8285
8285
  ], Us = [
8286
8286
  ...ue,
8287
8287
  {
8288
8288
  label: "Stock",
8289
- subject: Y.inventory_stock,
8289
+ subject: V.inventory_stock,
8290
8290
  actions: [o.read, o.create, o.update]
8291
8291
  },
8292
8292
  {
8293
8293
  label: "Stock Adjustment",
8294
- subject: Y.inventory_stockAdjustment,
8294
+ subject: V.inventory_stockAdjustment,
8295
8295
  actions: [o.read, o.update]
8296
8296
  },
8297
8297
  {
8298
8298
  label: "Stock Recalculation",
8299
- subject: Y.inventory_stockRecalculation,
8299
+ subject: V.inventory_stockRecalculation,
8300
8300
  actions: [o.update]
8301
8301
  },
8302
8302
  {
8303
8303
  label: "Unit Cost History",
8304
- subject: Y.inventory_unitCostHistory,
8304
+ subject: V.inventory_unitCostHistory,
8305
8305
  actions: [o.read]
8306
8306
  }
8307
8307
  ], ml = [
8308
8308
  ...ue,
8309
8309
  {
8310
8310
  label: "Stock Adjustment",
8311
- subject: Y.inventory_stockAdjustment,
8311
+ subject: V.inventory_stockAdjustment,
8312
8312
  actions: [o.update]
8313
8313
  }
8314
8314
  ], Fa = [
8315
8315
  ...ue,
8316
8316
  {
8317
8317
  label: "Unit Cost History",
8318
- subject: Y.inventory_unitCostHistory,
8318
+ subject: V.inventory_unitCostHistory,
8319
8319
  actions: [o.read, o.update]
8320
8320
  }
8321
8321
  ], Sa = [
8322
8322
  ...ue,
8323
8323
  {
8324
8324
  label: "Wastage Template",
8325
- subject: Y.inventory_wastageTemplate,
8325
+ subject: V.inventory_wastageTemplate,
8326
8326
  actions: [
8327
8327
  o.read,
8328
8328
  o.create,
@@ -8340,51 +8340,51 @@ const zs = [
8340
8340
  ...ue,
8341
8341
  {
8342
8342
  label: "Closing",
8343
- subject: Y.inventory_closing,
8343
+ subject: V.inventory_closing,
8344
8344
  actions: [o.read, o.create]
8345
8345
  },
8346
8346
  {
8347
8347
  label: "Stock Recalculation",
8348
- subject: Y.inventory_stockRecalculation,
8348
+ subject: V.inventory_stockRecalculation,
8349
8349
  actions: [o.read, o.update]
8350
8350
  },
8351
8351
  {
8352
8352
  label: "Closing Draft",
8353
- subject: Y.inventory_closingDraft,
8353
+ subject: V.inventory_closingDraft,
8354
8354
  actions: [o.read]
8355
8355
  }
8356
8356
  ], ka = [
8357
8357
  ...ue,
8358
8358
  {
8359
8359
  label: "Closing Draft",
8360
- subject: Y.inventory_closingDraft,
8360
+ subject: V.inventory_closingDraft,
8361
8361
  actions: [o.read, o.create, o.update]
8362
8362
  },
8363
8363
  {
8364
8364
  label: "Closing",
8365
- subject: Y.inventory_closing,
8365
+ subject: V.inventory_closing,
8366
8366
  actions: [o.read]
8367
8367
  },
8368
8368
  {
8369
8369
  label: "Stock Recalculation",
8370
- subject: Y.inventory_stockRecalculation,
8370
+ subject: V.inventory_stockRecalculation,
8371
8371
  actions: [o.read, o.update]
8372
8372
  },
8373
8373
  {
8374
8374
  label: "Stock",
8375
- subject: Y.inventory_stock,
8375
+ subject: V.inventory_stock,
8376
8376
  actions: [o.read]
8377
8377
  },
8378
8378
  {
8379
8379
  label: "Stock Adjustment",
8380
- subject: Y.inventory_stockAdjustment,
8380
+ subject: V.inventory_stockAdjustment,
8381
8381
  actions: [o.read]
8382
8382
  }
8383
8383
  ], Ra = [
8384
8384
  ...ue,
8385
8385
  {
8386
8386
  label: "Closing Template",
8387
- subject: Y.inventory_closingTemplate,
8387
+ subject: V.inventory_closingTemplate,
8388
8388
  actions: [
8389
8389
  o.read,
8390
8390
  o.create,
@@ -8394,7 +8394,7 @@ const zs = [
8394
8394
  },
8395
8395
  {
8396
8396
  label: "Closing",
8397
- subject: Y.inventory_closing,
8397
+ subject: V.inventory_closing,
8398
8398
  actions: [o.read]
8399
8399
  }
8400
8400
  ];
@@ -8406,109 +8406,109 @@ const zs = [
8406
8406
  const Al = [
8407
8407
  {
8408
8408
  label: "Inventory",
8409
- subject: Y.inventory,
8409
+ subject: V.inventory,
8410
8410
  actions: [o.read, o.update]
8411
8411
  },
8412
8412
  {
8413
8413
  label: "Order Template",
8414
- subject: Y.inventory_orderTemplate,
8414
+ subject: V.inventory_orderTemplate,
8415
8415
  actions: [o.read, o.update]
8416
8416
  },
8417
8417
  {
8418
8418
  label: "Wastage Template",
8419
- subject: Y.inventory_wastageTemplate,
8419
+ subject: V.inventory_wastageTemplate,
8420
8420
  actions: [o.read, o.update]
8421
8421
  },
8422
8422
  {
8423
8423
  label: "Closing Template",
8424
- subject: Y.inventory_closingTemplate,
8424
+ subject: V.inventory_closingTemplate,
8425
8425
  actions: [o.read, o.update]
8426
8426
  }
8427
8427
  ], gl = [
8428
8428
  {
8429
8429
  label: "Inventory",
8430
- subject: Y.inventory,
8430
+ subject: V.inventory,
8431
8431
  actions: [o.read, o.update]
8432
8432
  }
8433
8433
  ], pl = [
8434
8434
  {
8435
8435
  label: "Inventory",
8436
- subject: Y.inventory,
8436
+ subject: V.inventory,
8437
8437
  actions: [o.read, o.update]
8438
8438
  }
8439
8439
  ], hl = [
8440
8440
  {
8441
8441
  label: "Inventory",
8442
- subject: Y.inventory,
8442
+ subject: V.inventory,
8443
8443
  actions: [o.read, o.update]
8444
8444
  }
8445
8445
  ], Ha = [
8446
8446
  {
8447
8447
  label: "Purchase Order",
8448
- subject: Y.inventory_purchaseOrder,
8448
+ subject: V.inventory_purchaseOrder,
8449
8449
  actions: [o.read, o.create, o.update]
8450
8450
  },
8451
8451
  {
8452
8452
  label: "Inventory",
8453
- subject: Y.inventory,
8453
+ subject: V.inventory,
8454
8454
  actions: [o.read, o.create, o.update]
8455
8455
  },
8456
8456
  {
8457
8457
  label: "Closing",
8458
- subject: Y.inventory_closing,
8458
+ subject: V.inventory_closing,
8459
8459
  actions: [o.read]
8460
8460
  },
8461
8461
  {
8462
8462
  label: "Order Template",
8463
- subject: Y.inventory_orderTemplate,
8463
+ subject: V.inventory_orderTemplate,
8464
8464
  actions: [o.read]
8465
8465
  },
8466
8466
  {
8467
8467
  label: "Supplier",
8468
- subject: Y.inventory_supplier,
8468
+ subject: V.inventory_supplier,
8469
8469
  actions: [o.read]
8470
8470
  },
8471
8471
  {
8472
8472
  label: "Surcharge",
8473
- subject: Y.inventory_surcharge,
8473
+ subject: V.inventory_surcharge,
8474
8474
  actions: [o.read]
8475
8475
  },
8476
8476
  {
8477
8477
  label: "Delivery Order",
8478
- subject: Y.inventory_deliveryOrder,
8478
+ subject: V.inventory_deliveryOrder,
8479
8479
  actions: [o.read, o.create, o.update]
8480
8480
  },
8481
8481
  {
8482
8482
  label: "Shipment",
8483
- subject: Y.inventory_shipment,
8483
+ subject: V.inventory_shipment,
8484
8484
  actions: [o.read, o.update]
8485
8485
  }
8486
8486
  ], Ia = [
8487
8487
  {
8488
8488
  label: "Purchase Order",
8489
- subject: Y.inventory_purchaseOrder,
8489
+ subject: V.inventory_purchaseOrder,
8490
8490
  actions: [o.read, o.update]
8491
8491
  },
8492
8492
  {
8493
8493
  label: "Inventory",
8494
- subject: Y.inventory,
8494
+ subject: V.inventory,
8495
8495
  actions: [o.read, o.create, o.update]
8496
8496
  },
8497
8497
  {
8498
8498
  label: "Delivery Order",
8499
- subject: Y.inventory_deliveryOrder,
8499
+ subject: V.inventory_deliveryOrder,
8500
8500
  actions: [o.read, o.create, o.update]
8501
8501
  },
8502
8502
  {
8503
8503
  label: "Shipment",
8504
- subject: Y.inventory_shipment,
8504
+ subject: V.inventory_shipment,
8505
8505
  actions: [o.read, o.update]
8506
8506
  }
8507
8507
  ], Ta = [
8508
8508
  ...ue,
8509
8509
  {
8510
8510
  label: "Surcharge",
8511
- subject: Y.inventory_surcharge,
8511
+ subject: V.inventory_surcharge,
8512
8512
  actions: [
8513
8513
  o.read,
8514
8514
  o.create,
@@ -8518,14 +8518,14 @@ const Al = [
8518
8518
  },
8519
8519
  {
8520
8520
  label: "Supplier",
8521
- subject: Y.inventory_supplier,
8521
+ subject: V.inventory_supplier,
8522
8522
  actions: [o.read]
8523
8523
  }
8524
8524
  ], qa = [
8525
8525
  ...ue,
8526
8526
  {
8527
8527
  label: "Order Template",
8528
- subject: Y.inventory_orderTemplate,
8528
+ subject: V.inventory_orderTemplate,
8529
8529
  actions: [
8530
8530
  o.read,
8531
8531
  o.create,
@@ -8535,19 +8535,19 @@ const Al = [
8535
8535
  },
8536
8536
  {
8537
8537
  label: "Supplier",
8538
- subject: Y.inventory_supplier,
8538
+ subject: V.inventory_supplier,
8539
8539
  actions: [o.read]
8540
8540
  },
8541
8541
  {
8542
8542
  label: "Shipment",
8543
- subject: Y.inventory_shipment,
8543
+ subject: V.inventory_shipment,
8544
8544
  actions: [o.read, o.update]
8545
8545
  }
8546
8546
  ], fl = [
8547
8547
  ...ue,
8548
8548
  {
8549
8549
  label: "Order Draft Approval",
8550
- subject: Y.inventory_orderDraftApproval,
8550
+ subject: V.inventory_orderDraftApproval,
8551
8551
  actions: [o.update]
8552
8552
  }
8553
8553
  ];
@@ -8561,7 +8561,7 @@ const yl = [
8561
8561
  ...ue,
8562
8562
  {
8563
8563
  label: "Supplier",
8564
- subject: Y.inventory_supplier,
8564
+ subject: V.inventory_supplier,
8565
8565
  actions: [
8566
8566
  o.read,
8567
8567
  o.create,
@@ -8571,14 +8571,14 @@ const yl = [
8571
8571
  },
8572
8572
  {
8573
8573
  label: "Order Template",
8574
- subject: Y.inventory_orderTemplate,
8574
+ subject: V.inventory_orderTemplate,
8575
8575
  actions: [o.read, o.update]
8576
8576
  }
8577
8577
  ], bl = [
8578
8578
  ...ue,
8579
8579
  {
8580
8580
  label: "Warehouse",
8581
- subject: Y.inventory_warehouse,
8581
+ subject: V.inventory_warehouse,
8582
8582
  actions: [
8583
8583
  o.read,
8584
8584
  o.create,
@@ -8589,21 +8589,21 @@ const yl = [
8589
8589
  ], vl = [
8590
8590
  {
8591
8591
  label: "Inventory",
8592
- subject: Y.inventory,
8592
+ subject: V.inventory,
8593
8593
  actions: [o.read, o.update]
8594
8594
  }
8595
8595
  ], wl = [
8596
8596
  ...ue,
8597
8597
  {
8598
8598
  label: "Inventory",
8599
- subject: Y.inventory,
8599
+ subject: V.inventory,
8600
8600
  actions: [o.update]
8601
8601
  }
8602
8602
  ], Bl = [
8603
8603
  ...ue,
8604
8604
  {
8605
8605
  label: "Integration",
8606
- subject: Y.inventory_integration,
8606
+ subject: V.inventory_integration,
8607
8607
  actions: [o.read, o.create, o.update]
8608
8608
  }
8609
8609
  ];
@@ -8719,7 +8719,7 @@ const Cl = {
8719
8719
  permissions: Bl
8720
8720
  }
8721
8721
  };
8722
- var He = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e.hrm_restaurant = "hrm::restaurant", e))(He || {});
8722
+ var xe = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e.hrm_restaurant = "hrm::restaurant", e))(xe || {});
8723
8723
  const Ml = {
8724
8724
  /**
8725
8725
  * Triggered by: hrm_teamMember:manage (portal toggle)
@@ -8732,7 +8732,7 @@ const Ml = {
8732
8732
  permissions: [
8733
8733
  {
8734
8734
  label: "Portal Users",
8735
- subject: He.hrm_portalUsers,
8735
+ subject: xe.hrm_portalUsers,
8736
8736
  actions: [o.manage]
8737
8737
  },
8738
8738
  {
@@ -8742,12 +8742,12 @@ const Ml = {
8742
8742
  },
8743
8743
  {
8744
8744
  label: "Pos Role",
8745
- subject: He.hrm_posRole,
8745
+ subject: xe.hrm_posRole,
8746
8746
  actions: [o.read]
8747
8747
  },
8748
8748
  {
8749
8749
  label: "Restaurant resource",
8750
- subject: He.hrm_restaurant,
8750
+ subject: xe.hrm_restaurant,
8751
8751
  actions: [o.read]
8752
8752
  }
8753
8753
  ]
@@ -8762,17 +8762,17 @@ const Ml = {
8762
8762
  permissions: [
8763
8763
  {
8764
8764
  label: "Portal Users",
8765
- subject: He.hrm_portalUsers,
8765
+ subject: xe.hrm_portalUsers,
8766
8766
  actions: [o.read]
8767
8767
  },
8768
8768
  {
8769
8769
  label: "Restaurant resource",
8770
- subject: He.hrm_restaurant,
8770
+ subject: xe.hrm_restaurant,
8771
8771
  actions: [o.read]
8772
8772
  },
8773
8773
  {
8774
8774
  label: "Pos Role",
8775
- subject: He.hrm_posRole,
8775
+ subject: xe.hrm_posRole,
8776
8776
  actions: [o.manage]
8777
8777
  }
8778
8778
  ]
@@ -8789,7 +8789,7 @@ const Ml = {
8789
8789
  permissions: [
8790
8790
  {
8791
8791
  label: "Portal Users",
8792
- subject: He.hrm_portalUsers,
8792
+ subject: xe.hrm_portalUsers,
8793
8793
  actions: [o.read]
8794
8794
  }
8795
8795
  ]
@@ -8804,7 +8804,37 @@ const Ml = {
8804
8804
  permissions: [
8805
8805
  {
8806
8806
  label: "Restaurant resource",
8807
- subject: He.hrm_restaurant,
8807
+ subject: xe.hrm_restaurant,
8808
+ actions: [o.read]
8809
+ }
8810
+ ]
8811
+ },
8812
+ /**
8813
+ * Triggered by: hrm_scheduling:manage (portal toggle)
8814
+ * Injects: restaurant read + pos role read + employee read
8815
+ * The schedule page loads the outlet picker from hr-restaurants and the POS role list for the
8816
+ * add-employee and POS access forms. The board's roster and the business employee list are read
8817
+ * from /pos-users/paged, which is gated by hrm_employee read. Read (not manage) is injected so
8818
+ * hrm_employee's own system set is not triggered. Creating/updating employees from the schedule
8819
+ * still requires the real Employee permission. Schedule endpoints themselves are guarded by hrm_scheduling.
8820
+ */
8821
+ [`set_${d.hrm_scheduling}`]: {
8822
+ key: "sys:scheduling_access",
8823
+ name: "Scheduling Access",
8824
+ permissions: [
8825
+ {
8826
+ label: "Restaurant resource",
8827
+ subject: xe.hrm_restaurant,
8828
+ actions: [o.read]
8829
+ },
8830
+ {
8831
+ label: "Pos Role",
8832
+ subject: xe.hrm_posRole,
8833
+ actions: [o.read]
8834
+ },
8835
+ {
8836
+ label: "Employee",
8837
+ subject: d.hrm_employee,
8808
8838
  actions: [o.read]
8809
8839
  }
8810
8840
  ]
@@ -8838,7 +8868,7 @@ const dn = [
8838
8868
  ...Cl,
8839
8869
  ...Ml,
8840
8870
  ...Dl
8841
- }, au = Object.values(
8871
+ }, ou = Object.values(
8842
8872
  xl
8843
8873
  ).flatMap((e) => e.permissions ?? []).reduce(
8844
8874
  (e, t) => {
@@ -8871,7 +8901,7 @@ const dn = [
8871
8901
  [ne.orderDraft]: d.inventory_orderDraftApproval,
8872
8902
  [ne.unitCostHistory]: d.inventory_unitCostHistory
8873
8903
  };
8874
- var Dt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8904
+ var xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8875
8905
  function jl(e) {
8876
8906
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
8877
8907
  }
@@ -8879,7 +8909,7 @@ var Qa = { exports: {} };
8879
8909
  (function(e, t) {
8880
8910
  (function(s, n) {
8881
8911
  e.exports = n();
8882
- })(Dt, function() {
8912
+ })(xt, function() {
8883
8913
  return function(s) {
8884
8914
  var n = {};
8885
8915
  function a(r) {
@@ -8895,13 +8925,13 @@ var Qa = { exports: {} };
8895
8925
  if (1 & l && (r = a(r)), 8 & l || 4 & l && typeof r == "object" && r && r.__esModule) return r;
8896
8926
  var c = /* @__PURE__ */ Object.create(null);
8897
8927
  if (a.r(c), Object.defineProperty(c, "default", { enumerable: !0, value: r }), 2 & l && typeof r != "string")
8898
- for (var h in r)
8928
+ for (var w in r)
8899
8929
  a.d(
8900
8930
  c,
8901
- h,
8931
+ w,
8902
8932
  (function(y) {
8903
8933
  return r[y];
8904
- }).bind(null, h)
8934
+ }).bind(null, w)
8905
8935
  );
8906
8936
  return c;
8907
8937
  }, a.n = function(r) {
@@ -8933,55 +8963,55 @@ var Qa = { exports: {} };
8933
8963
  };
8934
8964
  }
8935
8965
  a.r(n), a.d(n, "default", function() {
8936
- return Gt;
8966
+ return Yt;
8937
8967
  }), a.d(n, "compare", function() {
8938
- return ft;
8939
- }), a.d(n, "comparable", function() {
8940
8968
  return yt;
8969
+ }), a.d(n, "comparable", function() {
8970
+ return bt;
8941
8971
  });
8942
- var c = l("Array"), h = l("Object"), y = l("Function");
8943
- function w(A, p) {
8972
+ var c = l("Array"), w = l("Object"), y = l("Function");
8973
+ function f(A, p) {
8944
8974
  return y(A.get) ? A.get(p) : A[p];
8945
8975
  }
8946
- function V(A) {
8976
+ function O(A) {
8947
8977
  return function(p, B) {
8948
8978
  if (!c(B) || !B.length) return A(p, B);
8949
8979
  for (var D = 0, E = B.length; D < E; D++)
8950
- if (A(p, w(B, D))) return !0;
8980
+ if (A(p, f(B, D))) return !0;
8951
8981
  return !1;
8952
8982
  };
8953
8983
  }
8954
- function Z(A) {
8984
+ function X(A) {
8955
8985
  return function(p, B) {
8956
8986
  if (!c(B) || !B.length) return A(p, B);
8957
8987
  for (var D = 0, E = B.length; D < E; D++)
8958
- if (!A(p, w(B, D))) return !1;
8988
+ if (!A(p, f(B, D))) return !1;
8959
8989
  return !0;
8960
8990
  };
8961
8991
  }
8962
- function W(A, p, B, D) {
8992
+ function U(A, p, B, D) {
8963
8993
  return A.validate(A.options, p, B, D);
8964
8994
  }
8965
8995
  var se = {
8966
- $eq: V(function(A, p) {
8996
+ $eq: O(function(A, p) {
8967
8997
  return A(p);
8968
8998
  }),
8969
- $ne: Z(function(A, p) {
8999
+ $ne: X(function(A, p) {
8970
9000
  return A(p);
8971
9001
  }),
8972
- $gt: V(function(A, p) {
9002
+ $gt: O(function(A, p) {
8973
9003
  return A(p);
8974
9004
  }),
8975
- $gte: V(function(A, p) {
9005
+ $gte: O(function(A, p) {
8976
9006
  return A(p);
8977
9007
  }),
8978
- $lt: V(function(A, p) {
9008
+ $lt: O(function(A, p) {
8979
9009
  return A(p);
8980
9010
  }),
8981
- $lte: V(function(A, p) {
9011
+ $lte: O(function(A, p) {
8982
9012
  return A(p);
8983
9013
  }),
8984
- $mod: V(function(A, p) {
9014
+ $mod: O(function(A, p) {
8985
9015
  return A(p);
8986
9016
  }),
8987
9017
  $in: function(A, p) {
@@ -9003,30 +9033,30 @@ var Qa = { exports: {} };
9003
9033
  return !!p && A === p.length;
9004
9034
  },
9005
9035
  $or: function(A, p, B, D) {
9006
- for (var E = 0, O = A.length; E < O; E++)
9007
- if (W(w(A, E), p, B, D)) return !0;
9036
+ for (var E = 0, G = A.length; E < G; E++)
9037
+ if (U(f(A, E), p, B, D)) return !0;
9008
9038
  return !1;
9009
9039
  },
9010
9040
  $nor: function(A, p, B, D) {
9011
9041
  return !se.$or(A, p, B, D);
9012
9042
  },
9013
9043
  $and: function(A, p, B, D) {
9014
- for (var E = 0, O = A.length; E < O; E++)
9015
- if (!W(w(A, E), p, B, D)) return !1;
9044
+ for (var E = 0, G = A.length; E < G; E++)
9045
+ if (!U(f(A, E), p, B, D)) return !1;
9016
9046
  return !0;
9017
9047
  },
9018
- $regex: V(function(A, p) {
9048
+ $regex: O(function(A, p) {
9019
9049
  return typeof p == "string" && A.test(p);
9020
9050
  }),
9021
9051
  $where: function(A, p, B, D) {
9022
9052
  return A.call(p, p, B, D);
9023
9053
  },
9024
9054
  $elemMatch: function(A, p, B, D) {
9025
- return c(p) ? !!~function(E, O) {
9055
+ return c(p) ? !!~function(E, G) {
9026
9056
  for (var R = 0; R < E.length; R++)
9027
- if (w(E, R), W(O, w(E, R))) return R;
9057
+ if (f(E, R), U(G, f(E, R))) return R;
9028
9058
  return -1;
9029
- }(p, A) : W(A, p, B, D);
9059
+ }(p, A) : U(A, p, B, D);
9030
9060
  },
9031
9061
  $exists: function(A, p, B, D) {
9032
9062
  return D.hasOwnProperty(B) === A;
@@ -9034,71 +9064,71 @@ var Qa = { exports: {} };
9034
9064
  }, oe = {
9035
9065
  $eq: function(A, p, B) {
9036
9066
  var D = B.comparable, E = B.compare;
9037
- return A instanceof RegExp ? V(function(O) {
9038
- return typeof O == "string" && A.test(O);
9039
- }) : A instanceof Function ? V(A) : c(A) && !A.length ? V(function(O) {
9040
- return c(O) && !O.length;
9041
- }) : V(
9042
- A === null ? function(O) {
9043
- return O == null;
9044
- } : function(O) {
9045
- return E(D(O), D(A)) === 0;
9067
+ return A instanceof RegExp ? O(function(G) {
9068
+ return typeof G == "string" && A.test(G);
9069
+ }) : A instanceof Function ? O(A) : c(A) && !A.length ? O(function(G) {
9070
+ return c(G) && !G.length;
9071
+ }) : O(
9072
+ A === null ? function(G) {
9073
+ return G == null;
9074
+ } : function(G) {
9075
+ return E(D(G), D(A)) === 0;
9046
9076
  }
9047
9077
  );
9048
9078
  },
9049
9079
  $gt: function(A, p, B) {
9050
9080
  var D = B.comparable, E = B.compare;
9051
- return function(O) {
9052
- return E(D(O), D(A)) > 0;
9081
+ return function(G) {
9082
+ return E(D(G), D(A)) > 0;
9053
9083
  };
9054
9084
  },
9055
9085
  $gte: function(A, p, B) {
9056
9086
  var D = B.comparable, E = B.compare;
9057
- return function(O) {
9058
- return E(D(O), D(A)) >= 0;
9087
+ return function(G) {
9088
+ return E(D(G), D(A)) >= 0;
9059
9089
  };
9060
9090
  },
9061
9091
  $lt: function(A, p, B) {
9062
9092
  var D = B.comparable, E = B.compare;
9063
- return function(O) {
9064
- return E(D(O), D(A)) < 0;
9093
+ return function(G) {
9094
+ return E(D(G), D(A)) < 0;
9065
9095
  };
9066
9096
  },
9067
9097
  $lte: function(A, p, B) {
9068
9098
  var D = B.comparable, E = B.compare;
9069
- return function(O) {
9070
- return E(D(O), D(A)) <= 0;
9099
+ return function(G) {
9100
+ return E(D(G), D(A)) <= 0;
9071
9101
  };
9072
9102
  },
9073
9103
  $in: function(A, p, B) {
9074
9104
  var D = B.comparable;
9075
9105
  return function(E) {
9076
9106
  if (!(E instanceof Array)) {
9077
- var O = D(E);
9078
- if (O === E && r(E) === "object") {
9107
+ var G = D(E);
9108
+ if (G === E && r(E) === "object") {
9079
9109
  for (T = A.length; T--; )
9080
9110
  if (String(A[T]) === String(E) && String(E) !== "[object Object]")
9081
9111
  return !0;
9082
9112
  }
9083
- if (O === void 0) {
9113
+ if (G === void 0) {
9084
9114
  for (T = A.length; T--; ) if (A[T] == null) return !0;
9085
9115
  }
9086
9116
  for (T = A.length; T--; ) {
9087
- var R = W(ht(w(A, T), B), O, T, A);
9088
- if (R && String(R) !== "[object Object]" && String(O) !== "[object Object]")
9117
+ var R = U(ft(f(A, T), B), G, T, A);
9118
+ if (R && String(R) !== "[object Object]" && String(G) !== "[object Object]")
9089
9119
  return !0;
9090
9120
  }
9091
- return !!~A.indexOf(O);
9121
+ return !!~A.indexOf(G);
9092
9122
  }
9093
9123
  for (var T = E.length; T--; )
9094
- if (~A.indexOf(D(w(E, T)))) return !0;
9124
+ if (~A.indexOf(D(f(E, T)))) return !0;
9095
9125
  return !1;
9096
9126
  };
9097
9127
  },
9098
9128
  $nin: function(A, p, B) {
9099
9129
  var D = oe.$in(A, p, B);
9100
- return function(E, O, R, T) {
9101
- return !D(E, O, R, T);
9130
+ return function(E, G, R, T) {
9131
+ return !D(E, G, R, T);
9102
9132
  };
9103
9133
  },
9104
9134
  $mod: function(A) {
@@ -9108,8 +9138,8 @@ var Qa = { exports: {} };
9108
9138
  },
9109
9139
  $ne: function(A, p, B) {
9110
9140
  var D = oe.$eq(A, p, B);
9111
- return Z(function(E, O, R, T) {
9112
- return !D(E, O, R, T);
9141
+ return X(function(E, G, R, T) {
9142
+ return !D(E, G, R, T);
9113
9143
  });
9114
9144
  },
9115
9145
  $and: function(A, p, B) {
@@ -9126,8 +9156,8 @@ var Qa = { exports: {} };
9126
9156
  },
9127
9157
  $not: function(A, p, B) {
9128
9158
  var D = Ce(B)(A);
9129
- return function(E, O, R) {
9130
- return !W(D, E, O, R);
9159
+ return function(E, G, R) {
9160
+ return !U(D, E, G, R);
9131
9161
  };
9132
9162
  },
9133
9163
  $type: function(A) {
@@ -9155,20 +9185,20 @@ var Qa = { exports: {} };
9155
9185
  return { options: A, validate: p };
9156
9186
  }
9157
9187
  function ie(A, p) {
9158
- var B = A.keyPath, D = A.child, E = A.query, O = [];
9159
- if (function i(g, m, b, C, G) {
9188
+ var B = A.keyPath, D = A.child, E = A.query, G = [];
9189
+ if (function i(g, m, b, C, Y) {
9160
9190
  if (b === m.length || g == null)
9161
- return void G.push([g, m[b - 1], C]);
9162
- var F = w(m, b);
9191
+ return void Y.push([g, m[b - 1], C]);
9192
+ var F = f(m, b);
9163
9193
  if (c(g) && isNaN(Number(F)))
9164
- for (var X = 0, j = g.length; X < j; X++) i(w(g, X), m, b, g, G);
9165
- else i(w(g, F), m, b + 1, g, G);
9166
- }(p, B, 0, p, O), O.length === 1) {
9167
- var R = O[0];
9168
- return W(D, R[0], R[1], R[2]);
9194
+ for (var Q = 0, j = g.length; Q < j; Q++) i(f(g, Q), m, b, g, Y);
9195
+ else i(f(g, F), m, b + 1, g, Y);
9196
+ }(p, B, 0, p, G), G.length === 1) {
9197
+ var R = G[0];
9198
+ return U(D, R[0], R[1], R[2]);
9169
9199
  }
9170
- for (var T = E && E.$ne !== void 0, te = T, ae = 0; ae < O.length; ae++) {
9171
- var f = O[ae], u = W(D, f[0], f[1], f[2]);
9200
+ for (var T = E && E.$ne !== void 0, te = T, ae = 0; ae < G.length; ae++) {
9201
+ var h = G[ae], u = U(D, h[0], h[1], h[2]);
9172
9202
  T ? te &= u : te |= u;
9173
9203
  }
9174
9204
  return te;
@@ -9186,21 +9216,21 @@ var Qa = { exports: {} };
9186
9216
  for (var te in R) {
9187
9217
  var ae = R[te];
9188
9218
  if (te !== "$options") {
9189
- var f = se[te] || A && B && B[te];
9190
- if (f) oe[te] && (ae = oe[te](ae, R, A)), T.push(fe(p(ae), f));
9219
+ var h = se[te] || A && B && B[te];
9220
+ if (h) oe[te] && (ae = oe[te](ae, R, A)), T.push(fe(p(ae), h));
9191
9221
  else {
9192
9222
  if (te.charCodeAt(0) === 36)
9193
9223
  throw new Error("Unknown operation " + te);
9194
9224
  var u = te.split(".");
9195
- T.push(ss(u, O(ae), ae));
9225
+ T.push(ss(u, G(ae), ae));
9196
9226
  }
9197
9227
  }
9198
9228
  }
9199
9229
  return T.length === 1 ? T[0] : fe(T, se.$and);
9200
- }, O = function(R) {
9230
+ }, G = function(R) {
9201
9231
  return R = D(R), function T(te, ae) {
9202
- if (!h(te)) return ae;
9203
- for (var f in te) ae.push(f), T(te[f], ae);
9232
+ if (!w(te)) return ae;
9233
+ for (var h in te) ae.push(h), T(te[h], ae);
9204
9234
  return ae;
9205
9235
  }(R, []).join(",").search(/[$.]/) === -1 ? fe(R, Le) : E(R);
9206
9236
  };
@@ -9211,7 +9241,7 @@ var Qa = { exports: {} };
9211
9241
  function Le(A, p) {
9212
9242
  if (Object.prototype.toString.call(A) !== Object.prototype.toString.call(p))
9213
9243
  return !1;
9214
- if (h(A)) {
9244
+ if (w(A)) {
9215
9245
  if (Object.keys(A).length !== Object.keys(p).length) return !1;
9216
9246
  for (var B in A) if (!Le(A[B], p[B])) return !1;
9217
9247
  return !0;
@@ -9224,30 +9254,30 @@ var Qa = { exports: {} };
9224
9254
  }
9225
9255
  return A === p;
9226
9256
  }
9227
- function ht(A, p) {
9257
+ function ft(A, p) {
9228
9258
  var B = Ce(p)(A);
9229
9259
  return p && p.select && (B = {
9230
9260
  options: B,
9231
- validate: function(D, E, O, R) {
9232
- return W(D, E && p.select(E), O, R);
9261
+ validate: function(D, E, G, R) {
9262
+ return U(D, E && p.select(E), G, R);
9233
9263
  }
9234
9264
  }), B;
9235
9265
  }
9236
- function Gt(A, p) {
9237
- var B = ht(A, p = Object.assign({ compare: ft, comparable: yt }, p));
9238
- return function(D, E, O) {
9239
- return W(B, D, E, O);
9266
+ function Yt(A, p) {
9267
+ var B = ft(A, p = Object.assign({ compare: yt, comparable: bt }, p));
9268
+ return function(D, E, G) {
9269
+ return U(B, D, E, G);
9240
9270
  };
9241
9271
  }
9242
- function ft(A, p) {
9272
+ function yt(A, p) {
9243
9273
  if (Le(A, p)) return 0;
9244
9274
  if (r(A) === r(p)) {
9245
9275
  if (A > p) return 1;
9246
9276
  if (A < p) return -1;
9247
9277
  }
9248
9278
  }
9249
- function yt(A) {
9250
- return A instanceof Date ? A.getTime() : c(A) ? A.map(yt) : A && typeof A.toJSON == "function" ? A.toJSON() : A;
9279
+ function bt(A) {
9280
+ return A instanceof Date ? A.getTime() : c(A) ? A.map(bt) : A && typeof A.toJSON == "function" ? A.toJSON() : A;
9251
9281
  }
9252
9282
  }
9253
9283
  ]);
@@ -9287,13 +9317,13 @@ function Vl() {
9287
9317
  return !1;
9288
9318
  }
9289
9319
  }
9290
- function kt(e, t, s) {
9291
- return Vl() ? kt = Reflect.construct : kt = function(a, r, l) {
9320
+ function Rt(e, t, s) {
9321
+ return Vl() ? Rt = Reflect.construct : Rt = function(a, r, l) {
9292
9322
  var c = [null];
9293
9323
  c.push.apply(c, r);
9294
- var h = Function.bind.apply(a, c), y = new h();
9324
+ var w = Function.bind.apply(a, c), y = new w();
9295
9325
  return l && _t(y, l.prototype), y;
9296
- }, kt.apply(null, arguments);
9326
+ }, Rt.apply(null, arguments);
9297
9327
  }
9298
9328
  function Fl(e) {
9299
9329
  return Function.toString.call(e).indexOf("[native code]") !== -1;
@@ -9309,7 +9339,7 @@ function Fs(e) {
9309
9339
  t.set(n, a);
9310
9340
  }
9311
9341
  function a() {
9312
- return kt(n, arguments, Vs(this).constructor);
9342
+ return Rt(n, arguments, Vs(this).constructor);
9313
9343
  }
9314
9344
  return a.prototype = Object.create(n.prototype, {
9315
9345
  constructor: {
@@ -9328,9 +9358,9 @@ function mn(e) {
9328
9358
  }
9329
9359
  var Za = function(t) {
9330
9360
  return 'Cannot execute "' + t.action + '" on "' + t.subjectName + '"';
9331
- }, Vt = Za, Sl = /* @__PURE__ */ function(e) {
9361
+ }, Ft = Za, Sl = /* @__PURE__ */ function(e) {
9332
9362
  Yl(t, e), t.setDefaultMessage = function(a) {
9333
- a === null ? Vt = Za : Vt = typeof a == "string" ? function() {
9363
+ a === null ? Ft = Za : Ft = typeof a == "string" ? function() {
9334
9364
  return a;
9335
9365
  } : a;
9336
9366
  }, t.from = function(a) {
@@ -9341,7 +9371,7 @@ var Za = function(t) {
9341
9371
  };
9342
9372
  function t(n, a) {
9343
9373
  var r;
9344
- return a === void 0 && (a = {}), r = e.call(this, n) || this, r._setMetadata(a), r.message = n || Vt(mn(r)), r._customMessage = null, typeof Error.captureStackTrace == "function" && (r.name = r.constructor.name, Error.captureStackTrace(mn(r), r.constructor)), r;
9374
+ return a === void 0 && (a = {}), r = e.call(this, n) || this, r._setMetadata(a), r.message = n || Ft(mn(r)), r._customMessage = null, typeof Error.captureStackTrace == "function" && (r.name = r.constructor.name, Error.captureStackTrace(mn(r), r.constructor)), r;
9345
9375
  }
9346
9376
  var s = t.prototype;
9347
9377
  return s.setMessage = function(a) {
@@ -9357,8 +9387,8 @@ var Za = function(t) {
9357
9387
  field: l,
9358
9388
  subjectName: this.ability.subjectName(r)
9359
9389
  });
9360
- var h = c ? c.reason : "";
9361
- throw this.message = this._customMessage || h || Vt(this), this;
9390
+ var w = c ? c.reason : "";
9391
+ throw this.message = this._customMessage || w || Ft(this), this;
9362
9392
  }
9363
9393
  }, s._setMetadata = function(a) {
9364
9394
  this.subject = a.subject, this.subjectName = a.subjectName, this.action = a.action, this.field = a.field;
@@ -9446,15 +9476,15 @@ var Ul = /* @__PURE__ */ function() {
9446
9476
  var r = this.buildIndexFor(n);
9447
9477
  return this[he].indexedRules = r.rules, this[he].hasPerFieldRules = r.hasPerFieldRules, this.emit("updated", a), this;
9448
9478
  }, t.buildIndexFor = function(n) {
9449
- for (var a = /* @__PURE__ */ Object.create(null), r = this[he].RuleType, l = !0, c = !1, h = 0; h < n.length; h++) {
9450
- var y = new r(n[h]), w = this.expandActions(y.actions), V = Ss(y.subject), Z = n.length - h - 1;
9479
+ for (var a = /* @__PURE__ */ Object.create(null), r = this[he].RuleType, l = !0, c = !1, w = 0; w < n.length; w++) {
9480
+ var y = new r(n[w]), f = this.expandActions(y.actions), O = Ss(y.subject), X = n.length - w - 1;
9451
9481
  l = !!(l && y.inverted), !c && y.fields && (c = !0);
9452
- for (var W = 0; W < V.length; W++) {
9453
- var se = V[W];
9482
+ for (var U = 0; U < O.length; U++) {
9483
+ var se = O[U];
9454
9484
  a[se] = a[se] || /* @__PURE__ */ Object.create(null);
9455
- for (var oe = 0; oe < w.length; oe++) {
9456
- var fe = w[oe];
9457
- a[se][fe] = a[se][fe] || /* @__PURE__ */ Object.create(null), a[se][fe][Z] = y;
9485
+ for (var oe = 0; oe < f.length; oe++) {
9486
+ var fe = f[oe];
9487
+ a[se][fe] = a[se][fe] || /* @__PURE__ */ Object.create(null), a[se][fe][X] = y;
9458
9488
  }
9459
9489
  }
9460
9490
  }
@@ -9483,8 +9513,8 @@ var Ul = /* @__PURE__ */ function() {
9483
9513
  var r = this.subjectName(a), l = this[he].mergedRules, c = r + "_" + n;
9484
9514
  return l[c] || (l[c] = this.mergeRulesFor(n, r)), l[c];
9485
9515
  }, t.mergeRulesFor = function(n, a) {
9486
- var r = this[he].indexedRules, l = [a, "all"].reduce(function(c, h) {
9487
- var y = r[h];
9516
+ var r = this[he].indexedRules, l = [a, "all"].reduce(function(c, w) {
9517
+ var y = r[w];
9488
9518
  return y ? Object.assign(c, y[n], y.manage) : c;
9489
9519
  }, []);
9490
9520
  return l.filter(Boolean);
@@ -9524,7 +9554,7 @@ var Ul = /* @__PURE__ */ function() {
9524
9554
  function zl(e) {
9525
9555
  return Xa[e] ?? e;
9526
9556
  }
9527
- function ru(e) {
9557
+ function iu(e) {
9528
9558
  const t = Object.entries(Xa).find(([, s]) => s === e);
9529
9559
  return t ? t[0] : e;
9530
9560
  }
@@ -9568,13 +9598,13 @@ function Kl(e, t) {
9568
9598
  const n = Ua(t), a = za(n, e) ? e.coverSubject : void 0, r = [e.subject, a].filter(
9569
9599
  (l) => l !== void 0
9570
9600
  ).flatMap((l) => {
9571
- const c = co(l).filter((h) => {
9601
+ const c = co(l).filter((w) => {
9572
9602
  var y;
9573
- return ((y = h.appliesToActions) == null ? void 0 : y.call(h, [e.action])) ?? !0;
9574
- }).flatMap((h) => h.ownedFields);
9575
- return c.length === 0 ? [] : n.rulesFor(e.action, l, e.field).filter((h) => !h.inverted).map((h) => ({ rule: h, ownedFields: c }));
9603
+ return ((y = w.appliesToActions) == null ? void 0 : y.call(w, [e.action])) ?? !0;
9604
+ }).flatMap((w) => w.ownedFields);
9605
+ return c.length === 0 ? [] : n.rulesFor(e.action, l, e.field).filter((w) => !w.inverted).map((w) => ({ rule: w, ownedFields: c }));
9576
9606
  });
9577
- return r.length === 0 ? { ...s, conditionEvaluation: "not_enforced" } : r.some(({ rule: l, ownedFields: c }) => !(l.conditions ? Object.keys(l.conditions) : []).some((h) => c.includes(h))) ? { ...s, conditionEvaluation: "not_enforced" } : {
9607
+ return r.length === 0 ? { ...s, conditionEvaluation: "not_enforced" } : r.some(({ rule: l, ownedFields: c }) => !(l.conditions ? Object.keys(l.conditions) : []).some((w) => c.includes(w))) ? { ...s, conditionEvaluation: "not_enforced" } : {
9578
9608
  granted: !1,
9579
9609
  decisivePermission: e,
9580
9610
  decisiveRule: null,
@@ -9598,30 +9628,30 @@ function $l(e, t, s) {
9598
9628
  evaluating: r = void 0,
9599
9629
  shallow: l = !0,
9600
9630
  onError: c = _l
9601
- } = n, h = Ue(!a), y = l ? _a(t) : Ue(t);
9602
- let w = 0;
9603
- return hn(async (V) => {
9604
- if (!h.value)
9631
+ } = n, w = Ue(!a), y = l ? _a(t) : Ue(t);
9632
+ let f = 0;
9633
+ return hn(async (O) => {
9634
+ if (!w.value)
9605
9635
  return;
9606
- w++;
9607
- const Z = w;
9608
- let W = !1;
9636
+ f++;
9637
+ const X = f;
9638
+ let U = !1;
9609
9639
  r && Promise.resolve().then(() => {
9610
9640
  r.value = !0;
9611
9641
  });
9612
9642
  try {
9613
9643
  const se = await e((oe) => {
9614
- V(() => {
9615
- r && (r.value = !1), W || oe();
9644
+ O(() => {
9645
+ r && (r.value = !1), U || oe();
9616
9646
  });
9617
9647
  });
9618
- Z === w && (y.value = se);
9648
+ X === f && (y.value = se);
9619
9649
  } catch (se) {
9620
9650
  c(se);
9621
9651
  } finally {
9622
- r && Z === w && (r.value = !1), W = !0;
9652
+ r && X === f && (r.value = !1), U = !0;
9623
9653
  }
9624
- }), a ? Is(() => (h.value = !0, y.value)) : y;
9654
+ }), a ? Is(() => (w.value = !0, y.value)) : y;
9625
9655
  }
9626
9656
  async function ec(e) {
9627
9657
  const { sessionUser: t, validationManifest: s } = e, { requiredRoles: n, requiredCaslPermissions: a, customValidationFunction: r } = s;
@@ -9743,7 +9773,7 @@ function ot(e) {
9743
9773
  return {
9744
9774
  inheritAttrs: !1,
9745
9775
  setup(t, { attrs: s }) {
9746
- return () => Rt(bc, {}, { default: () => Rt(e, s) });
9776
+ return () => At(bc, {}, { default: () => At(e, s) });
9747
9777
  }
9748
9778
  };
9749
9779
  }
@@ -9819,7 +9849,7 @@ function Ws(e) {
9819
9849
  return {
9820
9850
  inheritAttrs: !1,
9821
9851
  setup(t, { attrs: s }) {
9822
- return () => Rt(xc, {}, { default: () => Rt(e, s) });
9852
+ return () => At(xc, {}, { default: () => At(e, s) });
9823
9853
  }
9824
9854
  };
9825
9855
  }
@@ -9833,17 +9863,17 @@ const _e = (e) => ({
9833
9863
  }
9834
9864
  ]
9835
9865
  }
9836
- }), jc = ot(pe(() => import("./Main-D5cWrqP3.js"))), Ec = ot(pe(() => import("./Main-mcCvBPvJ.js"))), Pc = ot(
9837
- pe(() => import("./AuditLogList-B-NaB6OX.js"))
9838
- ), Oc = ot(pe(() => import("./Main-cdf9NV8P.js"))), Gc = pe(() => import("./ApprovalCodeList--NA0toYU.js")), Yc = pe(() => import("./GrantUserList-B1S7yDKu.js")), Vc = pe(() => import("./EmployeeList-idO38m7y.js")), Fc = pe(() => import("./RoleList-ByQelhuG.js")), Sc = pe(() => import("./TimesheetList-CJcSs_B1.js")), kc = pe(() => import("./TeamMemberList-CJzF0wNK.js")), Rc = pe(
9839
- () => import("./PermissionSetList-3_f6sJpK.js")
9866
+ }), jc = ot(pe(() => import("./Main-BQNkTyET.js"))), Ec = ot(pe(() => import("./Main-0TfvGJ4N.js"))), Pc = ot(
9867
+ pe(() => import("./AuditLogList-zW_N_ECT.js"))
9868
+ ), Oc = ot(pe(() => import("./Main-CuUG6svQ.js"))), Gc = pe(() => import("./ApprovalCodeList-C9dauQ81.js")), Yc = pe(() => import("./GrantUserList-Dj55GA7O.js")), Vc = pe(() => import("./EmployeeList-8jkHTd7q.js")), Fc = pe(() => import("./RoleList-DLDcyVWT.js")), Sc = pe(() => import("./TimesheetList-Q4FeNgOT.js")), kc = pe(() => import("./TeamMemberList-CyUX8Afk.js")), Rc = pe(
9869
+ () => import("./PermissionSetList-BsLi-TOK.js")
9840
9870
  ), Hc = Ws(
9841
- ot(pe(() => import("./SchedulePage-BpvgQYqL.js")))
9871
+ ot(pe(() => import("./SchedulePage-DPU4taJt.js")))
9842
9872
  ), Ic = Ws(
9843
- ot(pe(() => import("./SchedulePositionPage-BjvKTHyY.js")))
9873
+ ot(pe(() => import("./SchedulePositionPage-Byt6nmUj.js")))
9844
9874
  ), Tc = Ws(
9845
- ot(pe(() => import("./ScheduleGeneralPage-TKWgkAoE.js")))
9846
- ), ou = [
9875
+ ot(pe(() => import("./ScheduleGeneralPage-BhYI6O9g.js")))
9876
+ ), lu = [
9847
9877
  {
9848
9878
  path: "/",
9849
9879
  name: "home",
@@ -9956,179 +9986,188 @@ const _e = (e) => ({
9956
9986
  __name: "Navigator",
9957
9987
  emits: ["close-navigation"],
9958
9988
  setup(e, { emit: t }) {
9959
- const s = t, { t: n } = vn(), a = lr();
9960
- async function r(h) {
9961
- await a.push({ name: h, query: a.currentRoute.value.query }), await fn(), s("close-navigation");
9989
+ const s = t, { t: n } = vn(), a = lr(), r = () => At("span", { class: "sch-badge page-tag-premium page-tag-premium-nav", "data-color": "brand" }, "Premium"), l = () => At("span", { class: "sch-badge page-tag-premium page-tag-premium-nav page-tag-premium-section", "data-color": "brand" }, "Premium");
9990
+ async function c(f) {
9991
+ await a.push({ name: f, query: a.currentRoute.value.query }), await fn(), s("close-navigation");
9962
9992
  }
9963
- const l = Is(() => {
9964
- const h = [];
9965
- return h.push({
9993
+ const w = Is(() => {
9994
+ const f = [];
9995
+ return f.push({
9966
9996
  label: n("hr.employee.title"),
9967
9997
  value: "employee",
9968
9998
  action: () => {
9969
- r($.EMPLOYEE);
9999
+ c($.EMPLOYEE);
9970
10000
  }
9971
- }), h.push({
10001
+ }), f.push({
9972
10002
  label: n("team.title"),
9973
10003
  value: "team-member",
9974
10004
  action: () => {
9975
- r($.TEAM);
10005
+ c($.TEAM);
9976
10006
  }
9977
- }), h.push({
10007
+ }), f.push({
9978
10008
  label: n("auditLog.title"),
9979
10009
  value: "audit-log",
9980
10010
  action: () => {
9981
- r($.AUDIT_LOG);
10011
+ c($.AUDIT_LOG);
9982
10012
  }
9983
- }), h.push({
10013
+ }), f.push({
9984
10014
  label: n("posAccess.title"),
9985
10015
  value: "pos-access",
9986
10016
  action: () => {
9987
- r($.APPROVAL_CODE);
10017
+ c($.APPROVAL_CODE);
9988
10018
  }
9989
- }), h.push({
10019
+ }), f.push({
9990
10020
  label: n("scheduling.nav.section"),
9991
10021
  value: "schedule-group",
10022
+ badge: l,
9992
10023
  children: [
9993
10024
  {
9994
10025
  label: n("scheduling.nav.board"),
9995
10026
  value: "schedule",
10027
+ badge: r,
9996
10028
  action: () => {
9997
- r($.SCHEDULE);
10029
+ c($.SCHEDULE);
9998
10030
  }
9999
10031
  },
10000
10032
  {
10001
10033
  label: n("scheduling.nav.general"),
10002
10034
  value: "schedule-general",
10035
+ badge: r,
10003
10036
  action: () => {
10004
- r($.SCHEDULE_GENERAL);
10037
+ c($.SCHEDULE_GENERAL);
10005
10038
  }
10006
10039
  },
10007
10040
  {
10008
10041
  label: n("scheduling.nav.position"),
10009
10042
  value: "schedule-position",
10043
+ badge: r,
10010
10044
  action: () => {
10011
- r($.SCHEDULE_POSITION);
10045
+ c($.SCHEDULE_POSITION);
10012
10046
  }
10013
10047
  }
10014
10048
  ]
10015
- }), h;
10016
- }), c = Ue();
10049
+ }), f;
10050
+ }), y = Ue();
10017
10051
  return hn(() => {
10018
- var y;
10019
- let h = (y = a.currentRoute.value) == null ? void 0 : y.name;
10020
- switch (h) {
10052
+ var O;
10053
+ let f = (O = a.currentRoute.value) == null ? void 0 : O.name;
10054
+ switch (f) {
10021
10055
  case $.EMPLOYEE:
10022
10056
  case $.ROLE:
10023
10057
  case $.TIMESHEET:
10024
- h = $.EMPLOYEE;
10058
+ f = $.EMPLOYEE;
10025
10059
  break;
10026
10060
  case $.TEAM_MEMBER:
10027
10061
  case $.TEAM_ROLE:
10028
- h = $.TEAM_MEMBER;
10062
+ f = $.TEAM_MEMBER;
10029
10063
  break;
10030
10064
  case $.SCHEDULE:
10031
- h = "schedule";
10065
+ f = "schedule";
10032
10066
  break;
10033
10067
  case $.SCHEDULE_POSITION:
10034
- h = "schedule-position";
10068
+ f = "schedule-position";
10035
10069
  break;
10036
10070
  case $.SCHEDULE_GENERAL:
10037
- h = "schedule-general";
10071
+ f = "schedule-general";
10038
10072
  break;
10039
10073
  case $.AUDIT_LOG:
10040
- h = $.AUDIT_LOG;
10074
+ f = $.AUDIT_LOG;
10041
10075
  break;
10042
10076
  case $.APPROVAL_CODE:
10043
10077
  case $.POS_GRANT:
10044
10078
  case $.POS_ACCESS:
10045
- h = "pos-access";
10079
+ f = "pos-access";
10046
10080
  break;
10047
10081
  default:
10048
- h = $.EMPLOYEE;
10082
+ f = $.EMPLOYEE;
10049
10083
  }
10050
- c.value !== h && (c.value = h);
10051
- }), (h, y) => {
10052
- const w = Ns("FmCollapsibleTabs");
10053
- return rt(), $t(w, {
10054
- modelValue: c.value,
10055
- "onUpdate:modelValue": y[0] || (y[0] = (V) => c.value = V),
10056
- items: l.value,
10084
+ y.value !== f && (y.value = f);
10085
+ }), (f, O) => {
10086
+ const X = Ns("FmCollapsibleTabs");
10087
+ return rt(), $t(X, {
10088
+ modelValue: y.value,
10089
+ "onUpdate:modelValue": O[0] || (O[0] = (U) => y.value = U),
10090
+ items: w.value,
10057
10091
  class: "py-16"
10058
10092
  }, null, 8, ["modelValue", "items"]);
10059
10093
  };
10060
10094
  }
10061
- });
10095
+ }), Nc = (e, t) => {
10096
+ const s = e.__vccOpts || e;
10097
+ for (const [n, a] of t)
10098
+ s[n] = a;
10099
+ return s;
10100
+ }, Xc = /* @__PURE__ */ Nc(qc, [["__scopeId", "data-v-94921122"]]);
10062
10101
  var Hs = { exports: {} };
10063
10102
  (function(e, t) {
10064
10103
  (function(s, n) {
10065
10104
  n(t);
10066
- })(Dt, function(s) {
10067
- var n = { getItemSync: function(f) {
10105
+ })(xt, function(s) {
10106
+ var n = { getItemSync: function(h) {
10068
10107
  try {
10069
- return localStorage.getItem(f) || null;
10108
+ return localStorage.getItem(h) || null;
10070
10109
  } catch {
10071
10110
  return null;
10072
10111
  }
10073
- }, getItem: function(f, u) {
10112
+ }, getItem: function(h, u) {
10074
10113
  var i = this;
10075
10114
  return new Promise(function(g, m) {
10076
10115
  try {
10077
- var b = i.getItemSync(f);
10116
+ var b = i.getItemSync(h);
10078
10117
  u == null || u(null, b), g(b);
10079
10118
  } catch (C) {
10080
10119
  u && u(C, null), m(C);
10081
10120
  }
10082
10121
  });
10083
- }, setItem: function(f, u, i) {
10122
+ }, setItem: function(h, u, i) {
10084
10123
  return new Promise(function(g, m) {
10085
10124
  try {
10086
- localStorage.setItem(f, u), i && i(null, u), g(u);
10125
+ localStorage.setItem(h, u), i && i(null, u), g(u);
10087
10126
  } catch (b) {
10088
10127
  i && i(b, null), m(b);
10089
10128
  }
10090
10129
  });
10091
10130
  } }, a = function() {
10092
- return a = Object.assign || function(f) {
10093
- for (var u, i = 1, g = arguments.length; i < g; i++) for (var m in u = arguments[i]) Object.prototype.hasOwnProperty.call(u, m) && (f[m] = u[m]);
10094
- return f;
10131
+ return a = Object.assign || function(h) {
10132
+ for (var u, i = 1, g = arguments.length; i < g; i++) for (var m in u = arguments[i]) Object.prototype.hasOwnProperty.call(u, m) && (h[m] = u[m]);
10133
+ return h;
10095
10134
  }, a.apply(this, arguments);
10096
10135
  };
10097
- function r(f, u, i, g) {
10136
+ function r(h, u, i, g) {
10098
10137
  return new (i || (i = Promise))(function(m, b) {
10099
- function C(X) {
10138
+ function C(Q) {
10100
10139
  try {
10101
- F(g.next(X));
10140
+ F(g.next(Q));
10102
10141
  } catch (j) {
10103
10142
  b(j);
10104
10143
  }
10105
10144
  }
10106
- function G(X) {
10145
+ function Y(Q) {
10107
10146
  try {
10108
- F(g.throw(X));
10147
+ F(g.throw(Q));
10109
10148
  } catch (j) {
10110
10149
  b(j);
10111
10150
  }
10112
10151
  }
10113
- function F(X) {
10152
+ function F(Q) {
10114
10153
  var j;
10115
- X.done ? m(X.value) : (j = X.value, j instanceof i ? j : new i(function(L) {
10154
+ Q.done ? m(Q.value) : (j = Q.value, j instanceof i ? j : new i(function(L) {
10116
10155
  L(j);
10117
- })).then(C, G);
10156
+ })).then(C, Y);
10118
10157
  }
10119
- F((g = g.apply(f, [])).next());
10158
+ F((g = g.apply(h, [])).next());
10120
10159
  });
10121
10160
  }
10122
- function l(f, u) {
10161
+ function l(h, u) {
10123
10162
  var i, g, m, b, C = { label: 0, sent: function() {
10124
10163
  if (1 & m[0]) throw m[1];
10125
10164
  return m[1];
10126
10165
  }, trys: [], ops: [] };
10127
- return b = { next: G(0), throw: G(1), return: G(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
10166
+ return b = { next: Y(0), throw: Y(1), return: Y(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
10128
10167
  return this;
10129
10168
  }), b;
10130
- function G(F) {
10131
- return function(X) {
10169
+ function Y(F) {
10170
+ return function(Q) {
10132
10171
  return function(j) {
10133
10172
  if (i) throw new TypeError("Generator is already executing.");
10134
10173
  for (; C; ) try {
@@ -10166,7 +10205,7 @@ var Hs = { exports: {} };
10166
10205
  m[2] && C.ops.pop(), C.trys.pop();
10167
10206
  continue;
10168
10207
  }
10169
- j = u.call(f, C);
10208
+ j = u.call(h, C);
10170
10209
  } catch (L) {
10171
10210
  j = [6, L], g = 0;
10172
10211
  } finally {
@@ -10174,22 +10213,22 @@ var Hs = { exports: {} };
10174
10213
  }
10175
10214
  if (5 & j[0]) throw j[1];
10176
10215
  return { value: j[0] ? j[1] : void 0, done: !0 };
10177
- }([F, X]);
10216
+ }([F, Q]);
10178
10217
  };
10179
10218
  }
10180
10219
  }
10181
- function c(f, u, i) {
10220
+ function c(h, u, i) {
10182
10221
  for (var g, m = 0, b = u.length; m < b; m++) !g && m in u || (g || (g = Array.prototype.slice.call(u, 0, m)), g[m] = u[m]);
10183
- return f.concat(g || Array.prototype.slice.call(u));
10222
+ return h.concat(g || Array.prototype.slice.call(u));
10184
10223
  }
10185
- var h = function f(u, i) {
10224
+ var w = function h(u, i) {
10186
10225
  if (u === i) return !0;
10187
10226
  if (u && i && typeof u == "object" && typeof i == "object") {
10188
10227
  if (u.constructor !== i.constructor) return !1;
10189
10228
  var g, m, b;
10190
10229
  if (Array.isArray(u)) {
10191
10230
  if ((g = u.length) != i.length) return !1;
10192
- for (m = g; m-- != 0; ) if (!f(u[m], i[m])) return !1;
10231
+ for (m = g; m-- != 0; ) if (!h(u[m], i[m])) return !1;
10193
10232
  return !0;
10194
10233
  }
10195
10234
  if (u.constructor === RegExp) return u.source === i.source && u.flags === i.flags;
@@ -10199,66 +10238,66 @@ var Hs = { exports: {} };
10199
10238
  for (m = g; m-- != 0; ) if (!Object.prototype.hasOwnProperty.call(i, b[m])) return !1;
10200
10239
  for (m = g; m-- != 0; ) {
10201
10240
  var C = b[m];
10202
- if (!f(u[C], i[C])) return !1;
10241
+ if (!h(u[C], i[C])) return !1;
10203
10242
  }
10204
10243
  return !0;
10205
10244
  }
10206
10245
  return u != u && i != i;
10207
10246
  };
10208
- function y(f, u) {
10247
+ function y(h, u) {
10209
10248
  var i = Object.keys(u || {}).filter(function(g) {
10210
- var m = f == null ? void 0 : f[g], b = u == null ? void 0 : u[g];
10211
- return !h(m, b);
10249
+ var m = h == null ? void 0 : h[g], b = u == null ? void 0 : u[g];
10250
+ return !w(m, b);
10212
10251
  });
10213
- return Object.keys(f || {}).filter(function(g) {
10252
+ return Object.keys(h || {}).filter(function(g) {
10214
10253
  Object.keys(u || {}).includes(g) || i.push(g);
10215
10254
  }), Object.keys(i).length ? i : null;
10216
10255
  }
10217
- var w, V;
10218
- function Z(f, u, i) {
10256
+ var f, O;
10257
+ function X(h, u, i) {
10219
10258
  var g = "shortString", m = !0;
10220
- typeof i == "number" && (g = "javaDouble", m = !1), f[g] = f[g] || {}, f[g][u] = m ? i + "" : i;
10259
+ typeof i == "number" && (g = "javaDouble", m = !1), h[g] = h[g] || {}, h[g][u] = m ? i + "" : i;
10221
10260
  }
10222
- function W(f) {
10223
- return !!f && typeof f == "object" && f.value !== void 0;
10261
+ function U(h) {
10262
+ return !!h && typeof h == "object" && h.value !== void 0;
10224
10263
  }
10225
- function se(f) {
10226
- return Object.fromEntries(Object.entries(f).map(function(u) {
10264
+ function se(h) {
10265
+ return Object.fromEntries(Object.entries(h).map(function(u) {
10227
10266
  var i = u[0], g = u[1];
10228
- return [i, W(g) ? g : { value: g }];
10267
+ return [i, U(g) ? g : { value: g }];
10229
10268
  }));
10230
10269
  }
10231
- function oe(f) {
10232
- return a(a({}, f), { identity: f.identity ? a(a({}, f.identity), { traits: se(f.identity.traits || {}) }) : void 0 });
10270
+ function oe(h) {
10271
+ return a(a({}, h), { identity: h.identity ? a(a({}, h.identity), { traits: se(h.identity.traits || {}) }) : void 0 });
10233
10272
  }
10234
- (function(f) {
10235
- f.NONE = "NONE", f.DEFAULT_FLAGS = "DEFAULT_FLAGS", f.CACHE = "CACHE", f.SERVER = "SERVER";
10236
- })(w || (w = {}));
10237
- var fe, ie = null, ss = "FLAGSMITH_EVENT", Ce = ss, Le = "https://edge.api.flagsmith.com/api/v1/", ht = "flagsmith_value_", Gt = "flagsmith_enabled_", ft = "flagsmith_trait_", yt = function() {
10238
- function f(u) {
10273
+ (function(h) {
10274
+ h.NONE = "NONE", h.DEFAULT_FLAGS = "DEFAULT_FLAGS", h.CACHE = "CACHE", h.SERVER = "SERVER";
10275
+ })(f || (f = {}));
10276
+ var fe, ie = null, ss = "FLAGSMITH_EVENT", Ce = ss, Le = "https://edge.api.flagsmith.com/api/v1/", ft = "flagsmith_value_", Yt = "flagsmith_enabled_", yt = "flagsmith_trait_", bt = function() {
10277
+ function h(u) {
10239
10278
  var i = this;
10240
10279
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
10241
10280
  var g = i, m = g.api, b = g.evaluationContext;
10242
10281
  i.log("Get Flags"), i.isLoading = !0, i.loadingState.isFetching || i.setLoadingState(a(a({}, i.loadingState), { isFetching: !0 }));
10243
- var C = "".concat(i.getContext().identity), G = function(F) {
10244
- var X, j, L, de;
10282
+ var C = "".concat(i.getContext().identity), Y = function(F) {
10283
+ var Q, j, L, de;
10245
10284
  if (F && C === "".concat(i.getContext().identity)) {
10246
- var xe = F.flags, ye = F.traits, Me = F.identifier;
10285
+ var je = F.flags, ye = F.traits, Me = F.identifier;
10247
10286
  i.isLoading = !1;
10248
10287
  var be = {}, ve = {};
10249
- ye = ye || [], (xe = xe || []).forEach(function(K) {
10288
+ ye = ye || [], (je = je || []).forEach(function(K) {
10250
10289
  be[K.feature.name.toLowerCase().replace(/ /g, "_")] = { id: K.feature.id, enabled: K.enabled, value: K.feature_state_value };
10251
10290
  }), ye.forEach(function(K) {
10252
10291
  ve[K.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: K.transient, value: K.trait_value };
10253
10292
  }), i.oldFlags = a({}, i.flags);
10254
- var je = y(i.oldFlags, be), bt = y((X = i.evaluationContext.identity) === null || X === void 0 ? void 0 : X.traits, ve);
10255
- if ((Me || Object.keys(ve).length) && (i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: ve }), Me && (i.evaluationContext.identity.identifier = Me)), i.flags = be, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: je, traitsChanged: bt }, i._loadedState(null, w.SERVER)), i.datadogRum) try {
10293
+ var Ee = y(i.oldFlags, be), vt = y((Q = i.evaluationContext.identity) === null || Q === void 0 ? void 0 : Q.traits, ve);
10294
+ if ((Me || Object.keys(ve).length) && (i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: ve }), Me && (i.evaluationContext.identity.identifier = Me)), i.flags = be, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: Ee, traitsChanged: vt }, i._loadedState(null, f.SERVER)), i.datadogRum) try {
10256
10295
  if (i.datadogRum.trackTraits) {
10257
- var vt = {};
10296
+ var wt = {};
10258
10297
  Object.keys(((j = i.evaluationContext.identity) === null || j === void 0 ? void 0 : j.traits) || {}).map(function(K) {
10259
- vt[ft + K] = i.getTrait(K);
10298
+ wt[yt + K] = i.getTrait(K);
10260
10299
  });
10261
- var it = a(a(a({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((L = i.evaluationContext.identity) === null || L === void 0 ? void 0 : L.identifier) }), vt);
10300
+ var it = a(a(a({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((L = i.evaluationContext.identity) === null || L === void 0 ? void 0 : L.identifier) }), wt);
10262
10301
  i.log("Setting Datadog user", it), i.datadogRum.client.setUser(it);
10263
10302
  }
10264
10303
  } catch (K) {
@@ -10267,9 +10306,9 @@ var Hs = { exports: {} };
10267
10306
  if (i.dtrum) try {
10268
10307
  var me = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
10269
10308
  Object.keys(i.flags).map(function(K) {
10270
- Z(me, ht + K, i.getValue(K, { skipAnalytics: !0 })), Z(me, Gt + K, i.hasFeature(K, { skipAnalytics: !0 }));
10309
+ X(me, ft + K, i.getValue(K, { skipAnalytics: !0 })), X(me, Yt + K, i.hasFeature(K, { skipAnalytics: !0 }));
10271
10310
  }), Object.keys(((de = i.evaluationContext.identity) === null || de === void 0 ? void 0 : de.traits) || {}).map(function(K) {
10272
- Z(me, ft + K, i.getTrait(K));
10311
+ X(me, yt + K, i.getTrait(K));
10273
10312
  }), i.log("Sending javaLongOrObject traits to dynatrace", me.javaLongOrObject), i.log("Sending date traits to dynatrace", me.date), i.log("Sending shortString traits to dynatrace", me.shortString), i.log("Sending javaDouble to dynatrace", me.javaDouble), i.dtrum.sendSessionProperties(me.javaLongOrObject, me.date, me.shortString, me.javaDouble);
10274
10313
  } catch (K) {
10275
10314
  console.error(K);
@@ -10277,17 +10316,17 @@ var Hs = { exports: {} };
10277
10316
  }
10278
10317
  };
10279
10318
  return b.identity ? Promise.all([b.identity.traits && Object.keys(b.identity.traits).length || !b.identity.identifier ? i.getJSON(m + "identities/", "POST", JSON.stringify({ identifier: b.identity.identifier, transient: b.identity.transient, traits: Object.entries(b.identity.traits).map(function(F) {
10280
- var X = F[0], j = F[1];
10281
- return { trait_key: X, trait_value: j == null ? void 0 : j.value, transient: j == null ? void 0 : j.transient };
10319
+ var Q = F[0], j = F[1];
10320
+ return { trait_key: Q, trait_value: j == null ? void 0 : j.value, transient: j == null ? void 0 : j.transient };
10282
10321
  }).filter(function(F) {
10283
10322
  return F.trait_value !== void 0 || (i.log("Warning - attempted to set an undefined trait value for key", F.trait_key), !1);
10284
10323
  }) })) : i.getJSON(m + "identities/?identifier=" + encodeURIComponent(b.identity.identifier) + (b.identity.transient ? "&transient=true" : ""))]).then(function(F) {
10285
- return i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: {} }), G(F == null ? void 0 : F[0]);
10324
+ return i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: {} }), Y(F == null ? void 0 : F[0]);
10286
10325
  }).catch(function(F) {
10287
- var X = F.message, j = new Error(X);
10326
+ var Q = F.message, j = new Error(Q);
10288
10327
  return Promise.reject(j);
10289
10328
  }) : i.getJSON(m + "flags/").then(function(F) {
10290
- return G({ flags: F, traits: void 0 });
10329
+ return Y({ flags: F, traits: void 0 });
10291
10330
  });
10292
10331
  }, this.analyticsFlags = function() {
10293
10332
  var g = i.api;
@@ -10299,15 +10338,15 @@ var Hs = { exports: {} };
10299
10338
  }).catch(function(m) {
10300
10339
  i.log("Exception fetching evaluationEvent", m);
10301
10340
  }) : void 0;
10302
- }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: w.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g, m, b) {
10303
- var C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = null;
10304
- if (C && (G = C.value), m != null && m.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), G === null && (m == null ? void 0 : m.fallback) !== void 0) return m.fallback;
10341
+ }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: f.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g, m, b) {
10342
+ var C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], Y = null;
10343
+ if (C && (Y = C.value), m != null && m.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), Y === null && (m == null ? void 0 : m.fallback) !== void 0) return m.fallback;
10305
10344
  if (m != null && m.json) try {
10306
- return G === null ? (i.log("Tried to parse null flag as JSON: " + g), null) : JSON.parse(G);
10345
+ return Y === null ? (i.log("Tried to parse null flag as JSON: " + g), null) : JSON.parse(Y);
10307
10346
  } catch {
10308
10347
  return m.fallback;
10309
10348
  }
10310
- return G;
10349
+ return Y;
10311
10350
  }, this.getTrait = function(g) {
10312
10351
  var m, b;
10313
10352
  return ((m = i.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits) && ((b = i.evaluationContext.identity.traits[g.toLowerCase().replace(/ /g, "_")]) === null || b === void 0 ? void 0 : b.value);
@@ -10330,26 +10369,26 @@ var Hs = { exports: {} };
10330
10369
  }, this.setTraits = function(g) {
10331
10370
  var m;
10332
10371
  if (i.api) return i.setContext(a(a({}, i.evaluationContext), { identity: a(a({}, i.evaluationContext.identity), { traits: a(a({}, (m = i.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits), Object.fromEntries(Object.entries(g).map(function(b) {
10333
- var C = b[0], G = b[1];
10334
- return [C, W(G) ? G : { value: G }];
10372
+ var C = b[0], Y = b[1];
10373
+ return [C, U(Y) ? Y : { value: Y }];
10335
10374
  }))) }) }));
10336
10375
  console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.");
10337
10376
  }, this.hasFeature = function(g, m) {
10338
- var b = typeof m == "object", C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = !1;
10339
- return !C && b && m.fallback !== void 0 ? G = m == null ? void 0 : m.fallback : C && C.enabled && (G = !0), (b && !m.skipAnalytics || !m) && i.evaluateFlag(g, "ENABLED"), G;
10377
+ var b = typeof m == "object", C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], Y = !1;
10378
+ return !C && b && m.fallback !== void 0 ? Y = m == null ? void 0 : m.fallback : C && C.enabled && (Y = !0), (b && !m.skipAnalytics || !m) && i.evaluateFlag(g, "ENABLED"), Y;
10340
10379
  }, this.getStorageKey = function() {
10341
10380
  var g, m;
10342
10381
  return ((g = i.cacheOptions) === null || g === void 0 ? void 0 : g.storageKey) || "FLAGSMITH_DB_" + ((m = i.evaluationContext.environment) === null || m === void 0 ? void 0 : m.apiKey);
10343
10382
  }, this.getJSON = function(g, m, b) {
10344
- var C, G = i;
10345
- G.evaluationContext;
10346
- var F = G.headers, X = { method: m || "GET", body: b, cache: "no-cache", headers: {} };
10347
- i.evaluationContext.environment && (X.headers["X-Environment-Key"] = i.evaluationContext.environment.apiKey), m && m !== "GET" && (X.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(X.headers, F), V || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
10383
+ var C, Y = i;
10384
+ Y.evaluationContext;
10385
+ var F = Y.headers, Q = { method: m || "GET", body: b, cache: "no-cache", headers: {} };
10386
+ i.evaluationContext.environment && (Q.headers["X-Environment-Key"] = i.evaluationContext.environment.apiKey), m && m !== "GET" && (Q.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(Q.headers, F), O || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
10348
10387
  var j = "".concat((C = i.evaluationContext.identity) === null || C === void 0 ? void 0 : C.identifier);
10349
- return V(g, X).then(function(L) {
10350
- var de, xe, ye = "".concat((de = i.evaluationContext.identity) === null || de === void 0 ? void 0 : de.identifier);
10388
+ return O(g, Q).then(function(L) {
10389
+ var de, je, ye = "".concat((de = i.evaluationContext.identity) === null || de === void 0 ? void 0 : de.identifier);
10351
10390
  if (j === ye) {
10352
- var Me = (xe = L.headers) === null || xe === void 0 ? void 0 : xe.get("x-flagsmith-document-updated-at");
10391
+ var Me = (je = L.headers) === null || je === void 0 ? void 0 : je.get("x-flagsmith-document-updated-at");
10353
10392
  if (Me) try {
10354
10393
  var be = parseFloat(Me);
10355
10394
  if (isNaN(be)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
@@ -10358,57 +10397,57 @@ var Hs = { exports: {} };
10358
10397
  i.log(ve, "Failed to parse x-flagsmith-document-updated-at", Me);
10359
10398
  }
10360
10399
  return i.log("Fetch response: " + L.status + " " + (m || "GET") + 0 + g), L.text().then(function(ve) {
10361
- var je = ve;
10400
+ var Ee = ve;
10362
10401
  try {
10363
- je = JSON.parse(ve);
10402
+ Ee = JSON.parse(ve);
10364
10403
  } catch {
10365
10404
  }
10366
- return !je && L.status && (je = "API Response: ".concat(L.status)), L.status && L.status >= 200 && L.status < 300 ? je : Promise.reject(new Error(je));
10405
+ return !Ee && L.status && (Ee = "API Response: ".concat(L.status)), L.status && L.status >= 200 && L.status < 300 ? Ee : Promise.reject(new Error(Ee));
10367
10406
  });
10368
10407
  }
10369
10408
  i.log("Received response with identity mismatch, ignoring response. Requested: ".concat(j, ", Current: ").concat(ye));
10370
10409
  });
10371
10410
  }, this.evaluateFlag = function(g, m) {
10372
- if (i.datadogRum && (i.datadogRum.client.addFeatureFlagEvaluation ? m === "VALUE" ? i.datadogRum.client.addFeatureFlagEvaluation(ht + g, i.getValue(g, {}, !0)) : i.datadogRum.client.addFeatureFlagEvaluation(Gt + g, i.hasFeature(g, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), i.enableAnalytics) {
10411
+ if (i.datadogRum && (i.datadogRum.client.addFeatureFlagEvaluation ? m === "VALUE" ? i.datadogRum.client.addFeatureFlagEvaluation(ft + g, i.getValue(g, {}, !0)) : i.datadogRum.client.addFeatureFlagEvaluation(Yt + g, i.hasFeature(g, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), i.enableAnalytics) {
10373
10412
  if (!i.evaluationEvent || !i.evaluationContext.environment) return;
10374
10413
  i.evaluationEvent[i.evaluationContext.environment.apiKey] || (i.evaluationEvent[i.evaluationContext.environment.apiKey] = {}), i.evaluationEvent[i.evaluationContext.environment.apiKey][g] === void 0 && (i.evaluationEvent[i.evaluationContext.environment.apiKey][g] = 0), i.evaluationEvent[i.evaluationContext.environment.apiKey][g] += 1;
10375
10414
  }
10376
10415
  i.updateEventStorage();
10377
10416
  }, this._onChange = function(g, m, b) {
10378
- var C, G;
10379
- i.setLoadingState(b), (C = i.onChange) === null || C === void 0 || C.call(i, g, m, i.loadingState), (G = i._trigger) === null || G === void 0 || G.call(i);
10380
- }, V = u.fetch ? u.fetch : typeof fetch < "u" ? fetch : Dt == null ? void 0 : Dt.fetch, this.canUseStorage = typeof window < "u" || !!u.browserlessStorage, this.log("Constructing flagsmith instance " + u), u.eventSource && (fe = u.eventSource), u.AsyncStorage && (ie = u.AsyncStorage);
10417
+ var C, Y;
10418
+ i.setLoadingState(b), (C = i.onChange) === null || C === void 0 || C.call(i, g, m, i.loadingState), (Y = i._trigger) === null || Y === void 0 || Y.call(i);
10419
+ }, O = u.fetch ? u.fetch : typeof fetch < "u" ? fetch : xt == null ? void 0 : xt.fetch, this.canUseStorage = typeof window < "u" || !!u.browserlessStorage, this.log("Constructing flagsmith instance " + u), u.eventSource && (fe = u.eventSource), u.AsyncStorage && (ie = u.AsyncStorage);
10381
10420
  }
10382
- return f.prototype.init = function(u) {
10421
+ return h.prototype.init = function(u) {
10383
10422
  var i, g, m;
10384
10423
  return r(this, void 0, void 0, function() {
10385
- var b, C, G, F, X, j, L, de, xe, ye, Me, be, ve, je, bt, vt, it, me, K, ns, wt, Ls, lt, as, Ks, Js, rs, _s, os, Bt, ct, $s, Ae = this;
10424
+ var b, C, Y, F, Q, j, L, de, je, ye, Me, be, ve, Ee, vt, wt, it, me, K, ns, Bt, Ls, lt, as, Ks, Js, rs, _s, os, Ct, ct, $s, Ae = this;
10386
10425
  return l(this, function(De) {
10387
10426
  switch (De.label) {
10388
10427
  case 0:
10389
10428
  b = oe(u.evaluationContext || this.evaluationContext), De.label = 1;
10390
10429
  case 1:
10391
- if (De.trys.push([1, 13, , 14]), C = u.environmentID, G = u.api, F = G === void 0 ? Le : G, X = u.headers, j = u.onChange, L = u.cacheFlags, de = u.datadogRum, xe = u.onError, ye = u.defaultFlags, Me = u.fetch, be = u.preventFetch, ve = u.enableLogs, je = u.enableDynatrace, bt = u.enableAnalytics, vt = u.realtime, it = u.eventSourceUrl, me = it === void 0 ? "https://realtime.flagsmith.com/" : it, K = u.AsyncStorage, ns = u.identity, wt = u.traits, Ls = u.state, lt = u.cacheOptions, as = u.angularHttpClient, Ks = u._trigger, Js = u._triggerLoadingState, b.environment = C ? { apiKey: C } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
10392
- if (b.identity = ns || wt ? { identifier: ns, traits: wt ? Object.fromEntries(Object.entries(wt).map(function(we) {
10430
+ if (De.trys.push([1, 13, , 14]), C = u.environmentID, Y = u.api, F = Y === void 0 ? Le : Y, Q = u.headers, j = u.onChange, L = u.cacheFlags, de = u.datadogRum, je = u.onError, ye = u.defaultFlags, Me = u.fetch, be = u.preventFetch, ve = u.enableLogs, Ee = u.enableDynatrace, vt = u.enableAnalytics, wt = u.realtime, it = u.eventSourceUrl, me = it === void 0 ? "https://realtime.flagsmith.com/" : it, K = u.AsyncStorage, ns = u.identity, Bt = u.traits, Ls = u.state, lt = u.cacheOptions, as = u.angularHttpClient, Ks = u._trigger, Js = u._triggerLoadingState, b.environment = C ? { apiKey: C } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
10431
+ if (b.identity = ns || Bt ? { identifier: ns, traits: Bt ? Object.fromEntries(Object.entries(Bt).map(function(we) {
10393
10432
  return [we[0], { value: we[1] }];
10394
- })) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers = X, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = j, rs = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Ks || this._trigger, this._triggerLoadingState = Js || this._triggerLoadingState, this.onError = function(we) {
10395
- Ae.setLoadingState(a(a({}, Ae.loadingState), { isFetching: !1, isLoading: !1, error: we })), xe == null || xe(we);
10396
- }, this.enableLogs = ve || !1, this.cacheOptions = lt ? { skipAPI: !!lt.skipAPI, ttl: lt.ttl || 0, storageKey: lt.storageKey, loadStale: !!lt.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), Me && (V = Me), this.enableAnalytics = bt || !1, this.flags = Object.assign({}, ye) || {}, this.datadogRum = de || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ie !== void 0 && !!L, Ce = "FLAGSMITH_EVENT_" + b.environment.apiKey, K && (ie = K), vt && typeof window < "u" && this.setupRealtime(me, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = a(a({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Ls), this.log("Initialising with properties", u, this), je && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), as && (V = /* @__PURE__ */ function(we) {
10397
- return function(Ee, Pe) {
10398
- var Te = Pe.headers, _ = Pe.method, ut = Pe.body;
10433
+ })) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers = Q, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = j, rs = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Ks || this._trigger, this._triggerLoadingState = Js || this._triggerLoadingState, this.onError = function(we) {
10434
+ Ae.setLoadingState(a(a({}, Ae.loadingState), { isFetching: !1, isLoading: !1, error: we })), je == null || je(we);
10435
+ }, this.enableLogs = ve || !1, this.cacheOptions = lt ? { skipAPI: !!lt.skipAPI, ttl: lt.ttl || 0, storageKey: lt.storageKey, loadStale: !!lt.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), Me && (O = Me), this.enableAnalytics = vt || !1, this.flags = Object.assign({}, ye) || {}, this.datadogRum = de || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ie !== void 0 && !!L, Ce = "FLAGSMITH_EVENT_" + b.environment.apiKey, K && (ie = K), wt && typeof window < "u" && this.setupRealtime(me, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = a(a({}, this.loadingState), { isLoading: !1, source: f.DEFAULT_FLAGS })), this.setState(Ls), this.log("Initialising with properties", u, this), Ee && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), as && (O = /* @__PURE__ */ function(we) {
10436
+ return function(Pe, Oe) {
10437
+ var Te = Oe.headers, _ = Oe.method, ut = Oe.body;
10399
10438
  return new Promise(function(Ke) {
10400
10439
  switch (_) {
10401
10440
  case "GET":
10402
- return we.get(Ee, { headers: Te }).subscribe(function(ke) {
10441
+ return we.get(Pe, { headers: Te }).subscribe(function(Re) {
10403
10442
  Ke({ ok: !0, text: function() {
10404
- return Promise.resolve(ke);
10443
+ return Promise.resolve(Re);
10405
10444
  } });
10406
10445
  });
10407
10446
  case "POST":
10408
10447
  case "PUT":
10409
- return we.post(Ee, ut, { headers: Te }).subscribe(function(ke) {
10448
+ return we.post(Pe, ut, { headers: Te }).subscribe(function(Re) {
10410
10449
  Ke({ ok: !0, text: function() {
10411
- return Promise.resolve(ke);
10450
+ return Promise.resolve(Re);
10412
10451
  } });
10413
10452
  });
10414
10453
  }
@@ -10421,26 +10460,26 @@ var Hs = { exports: {} };
10421
10460
  Ae.evaluationEvent = {};
10422
10461
  }
10423
10462
  Ae.analyticsInterval = setInterval(Ae.analyticsFlags, Ae.ticks);
10424
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), ie && this.canUseStorage && ie.getItem(Ce, function(we, Ee) {
10425
- if (Ee && Ae.evaluationContext.environment) {
10426
- var Pe = JSON.parse(Ee);
10427
- if (Pe[Ae.evaluationContext.environment.apiKey]) {
10463
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), ie && this.canUseStorage && ie.getItem(Ce, function(we, Pe) {
10464
+ if (Pe && Ae.evaluationContext.environment) {
10465
+ var Oe = JSON.parse(Pe);
10466
+ if (Oe[Ae.evaluationContext.environment.apiKey]) {
10428
10467
  var Te = Ae.getState();
10429
- Ae.log("Retrieved events from cache", Ee), Ae.setState(a(a({}, Te), { evaluationEvent: Pe[Ae.evaluationContext.environment.apiKey] }));
10468
+ Ae.log("Retrieved events from cache", Pe), Ae.setState(a(a({}, Te), { evaluationEvent: Oe[Ae.evaluationContext.environment.apiKey] }));
10430
10469
  }
10431
10470
  }
10432
10471
  })), !L) return [3, 9];
10433
10472
  if (!ie || !this.canUseStorage) return [3, 8];
10434
- _s = function(we, Ee) {
10473
+ _s = function(we, Pe) {
10435
10474
  return r(Ae, void 0, void 0, function() {
10436
- var Pe, Te, _, ut, Ke, ke, is, en, ls, cs, us, ds, ms, As, gs, ps, hs, fs, ys, bs, vs, ws, Bs, Cs, tn = this;
10475
+ var Oe, Te, _, ut, Ke, Re, is, en, ls, cs, us, ds, ms, As, gs, ps, hs, fs, ys, bs, vs, ws, Bs, Cs, tn = this;
10437
10476
  return l(this, function(qe) {
10438
10477
  switch (qe.label) {
10439
10478
  case 0:
10440
- if (!Ee) return [3, 7];
10441
- Pe = null, Te = null, qe.label = 1;
10479
+ if (!Pe) return [3, 7];
10480
+ Oe = null, Te = null, qe.label = 1;
10442
10481
  case 1:
10443
- return qe.trys.push([1, 5, , 6]), _ = JSON.parse(Ee), ut = !1, Ke = !1, _ && _.api === this.api && ((cs = (ls = _.evaluationContext) === null || ls === void 0 ? void 0 : ls.environment) === null || cs === void 0 ? void 0 : cs.apiKey) === ((us = this.evaluationContext.environment) === null || us === void 0 ? void 0 : us.apiKey) && (ke = !0, this.evaluationContext.identity && ((ms = (ds = _.evaluationContext) === null || ds === void 0 ? void 0 : ds.identity) === null || ms === void 0 ? void 0 : ms.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((gs = (As = _.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || gs === void 0 ? void 0 : gs.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !1), this.cacheOptions.ttl && (!_.ts || (/* @__PURE__ */ new Date()).valueOf() - _.ts > this.cacheOptions.ttl) && (_.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), ke = !1) : _.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), Ke = !0, ke = !0)), ke && (ut = !0, Te = y((ps = this.evaluationContext.identity) === null || ps === void 0 ? void 0 : ps.traits, (fs = (hs = _.evaluationContext) === null || hs === void 0 ? void 0 : hs.identity) === null || fs === void 0 ? void 0 : fs.traits), Pe = y(this.flags, _.flags), this.setState(a(a({}, _), { evaluationContext: oe(a(a({}, _.evaluationContext), { identity: !((ys = _.evaluationContext) === null || ys === void 0) && ys.identity ? a(a({}, (bs = _.evaluationContext) === null || bs === void 0 ? void 0 : bs.identity), { traits: a(a({}, ((ws = (vs = _.evaluationContext) === null || vs === void 0 ? void 0 : vs.identity) === null || ws === void 0 ? void 0 : ws.traits) || {}), wt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", _))), ut ? (is = !be && (!this.cacheOptions.skipAPI || Ke), this._onChange(null, { isFromServer: !1, flagsChanged: Pe, traitsChanged: Te }, this._loadedState(null, w.CACHE, is)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && ut && !Ke && this.log("Skipping API, using cache"), is && this.getFlags().catch(function(Wa) {
10482
+ return qe.trys.push([1, 5, , 6]), _ = JSON.parse(Pe), ut = !1, Ke = !1, _ && _.api === this.api && ((cs = (ls = _.evaluationContext) === null || ls === void 0 ? void 0 : ls.environment) === null || cs === void 0 ? void 0 : cs.apiKey) === ((us = this.evaluationContext.environment) === null || us === void 0 ? void 0 : us.apiKey) && (Re = !0, this.evaluationContext.identity && ((ms = (ds = _.evaluationContext) === null || ds === void 0 ? void 0 : ds.identity) === null || ms === void 0 ? void 0 : ms.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((gs = (As = _.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || gs === void 0 ? void 0 : gs.identifier) + " to " + this.evaluationContext.identity.identifier), Re = !1), this.cacheOptions.ttl && (!_.ts || (/* @__PURE__ */ new Date()).valueOf() - _.ts > this.cacheOptions.ttl) && (_.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), Re = !1) : _.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), Ke = !0, Re = !0)), Re && (ut = !0, Te = y((ps = this.evaluationContext.identity) === null || ps === void 0 ? void 0 : ps.traits, (fs = (hs = _.evaluationContext) === null || hs === void 0 ? void 0 : hs.identity) === null || fs === void 0 ? void 0 : fs.traits), Oe = y(this.flags, _.flags), this.setState(a(a({}, _), { evaluationContext: oe(a(a({}, _.evaluationContext), { identity: !((ys = _.evaluationContext) === null || ys === void 0) && ys.identity ? a(a({}, (bs = _.evaluationContext) === null || bs === void 0 ? void 0 : bs.identity), { traits: a(a({}, ((ws = (vs = _.evaluationContext) === null || vs === void 0 ? void 0 : vs.identity) === null || ws === void 0 ? void 0 : ws.traits) || {}), Bt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", _))), ut ? (is = !be && (!this.cacheOptions.skipAPI || Ke), this._onChange(null, { isFromServer: !1, flagsChanged: Oe, traitsChanged: Te }, this._loadedState(null, f.CACHE, is)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && ut && !Ke && this.log("Skipping API, using cache"), is && this.getFlags().catch(function(Wa) {
10444
10483
  var Ms;
10445
10484
  (Ms = tn.onError) === null || Ms === void 0 || Ms.call(tn, Wa);
10446
10485
  }), [3, 4]) : [3, 2];
@@ -10459,10 +10498,10 @@ var Hs = { exports: {} };
10459
10498
  case 8:
10460
10499
  return qe.sent(), [3, 10];
10461
10500
  case 9:
10462
- if (ye) this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Bs = this.evaluationContext.identity) === null || Bs === void 0 ? void 0 : Bs.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
10501
+ if (ye) this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Bs = this.evaluationContext.identity) === null || Bs === void 0 ? void 0 : Bs.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
10463
10502
  else {
10464
10503
  if (!this.flags) throw new Error(rs);
10465
- this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Cs = this.evaluationContext.identity) === null || Cs === void 0 ? void 0 : Cs.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
10504
+ this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Cs = this.evaluationContext.identity) === null || Cs === void 0 ? void 0 : Cs.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
10466
10505
  }
10467
10506
  qe.label = 10;
10468
10507
  case 10:
@@ -10489,8 +10528,8 @@ var Hs = { exports: {} };
10489
10528
  case 10:
10490
10529
  return De.sent(), [3, 12];
10491
10530
  case 11:
10492
- if (ye) this._onChange(null, { isFromServer: !1, flagsChanged: y({}, ye), traitsChanged: y({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
10493
- else if (this.flags && (Bt = null, Object.keys(this.flags).length === 0 && (Bt = rs), this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (g = b.identity) === null || g === void 0 ? void 0 : g.traits) }, this._loadedState(Bt, w.DEFAULT_FLAGS)), Bt)) throw new Error(Bt);
10531
+ if (ye) this._onChange(null, { isFromServer: !1, flagsChanged: y({}, ye), traitsChanged: y({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null, f.DEFAULT_FLAGS));
10532
+ else if (this.flags && (Ct = null, Object.keys(this.flags).length === 0 && (Ct = rs), this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (g = b.identity) === null || g === void 0 ? void 0 : g.traits) }, this._loadedState(Ct, f.DEFAULT_FLAGS)), Ct)) throw new Error(Ct);
10494
10533
  De.label = 12;
10495
10534
  case 12:
10496
10535
  return [3, 14];
@@ -10501,88 +10540,88 @@ var Hs = { exports: {} };
10501
10540
  }
10502
10541
  });
10503
10542
  });
10504
- }, f.prototype.getAllFlags = function() {
10543
+ }, h.prototype.getAllFlags = function() {
10505
10544
  return this.flags;
10506
- }, f.prototype.identify = function(u, i, g) {
10545
+ }, h.prototype.identify = function(u, i, g) {
10507
10546
  return this.evaluationContext.identity = { identifier: u, transient: g, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == u ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = u, this.log("Identify: " + this.evaluationContext.identity.identifier), i && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(i).map(function(m) {
10508
10547
  var b = m[0], C = m[1];
10509
- return [b, W(C) ? C : { value: C }];
10548
+ return [b, U(C) ? C : { value: C }];
10510
10549
  }))), this.initialised ? this.getFlags() : Promise.resolve();
10511
- }, f.prototype.getState = function() {
10550
+ }, h.prototype.getState = function() {
10512
10551
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
10513
- }, f.prototype.setState = function(u) {
10552
+ }, h.prototype.setState = function(u) {
10514
10553
  u && (this.initialised = !0, this.api = u.api || this.api || Le, this.flags = u.flags || this.flags, this.evaluationContext = u.evaluationContext || this.evaluationContext, this.evaluationEvent = u.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
10515
- }, f.prototype.logout = function() {
10554
+ }, h.prototype.logout = function() {
10516
10555
  return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
10517
- }, f.prototype.startListening = function(u) {
10556
+ }, h.prototype.startListening = function(u) {
10518
10557
  u === void 0 && (u = 1e3), this.getFlagInterval && clearInterval(this.getFlagInterval), this.getFlagInterval = setInterval(this.getFlags, u);
10519
- }, f.prototype.stopListening = function() {
10558
+ }, h.prototype.stopListening = function() {
10520
10559
  this.getFlagInterval && (clearInterval(this.getFlagInterval), this.getFlagInterval = null);
10521
- }, f.prototype._loadedState = function(u, i, g) {
10560
+ }, h.prototype._loadedState = function(u, i, g) {
10522
10561
  return u === void 0 && (u = null), g === void 0 && (g = !1), { error: u, isFetching: g, isLoading: !1, source: i };
10523
- }, f.prototype.log = function() {
10562
+ }, h.prototype.log = function() {
10524
10563
  for (var u = [], i = 0; i < arguments.length; i++) u[i] = arguments[i];
10525
10564
  this.enableLogs && console.log.apply(this, c(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], u));
10526
- }, f.prototype.updateStorage = function() {
10565
+ }, h.prototype.updateStorage = function() {
10527
10566
  if (this.cacheFlags) {
10528
10567
  this.ts = (/* @__PURE__ */ new Date()).valueOf();
10529
10568
  var u = JSON.stringify(this.getState());
10530
10569
  this.log("Setting storage", u), ie.setItem(this.getStorageKey(), u);
10531
10570
  }
10532
- }, f.prototype.updateEventStorage = function() {
10571
+ }, h.prototype.updateEventStorage = function() {
10533
10572
  if (this.enableAnalytics) {
10534
10573
  var u = JSON.stringify(this.getState().evaluationEvent);
10535
10574
  ie.setItem(Ce, u).catch(function(i) {
10536
10575
  return console.error("Flagsmith: Error setting item in async storage", i);
10537
10576
  });
10538
10577
  }
10539
- }, f.prototype.setLoadingState = function(u) {
10578
+ }, h.prototype.setLoadingState = function(u) {
10540
10579
  var i;
10541
- h(u, this.loadingState) || (this.loadingState = a({}, u), this.log("Loading state changed", u), (i = this._triggerLoadingState) === null || i === void 0 || i.call(this));
10542
- }, f.prototype.setupRealtime = function(u, i) {
10580
+ w(u, this.loadingState) || (this.loadingState = a({}, u), this.log("Loading state changed", u), (i = this._triggerLoadingState) === null || i === void 0 || i.call(this));
10581
+ }, h.prototype.setupRealtime = function(u, i) {
10543
10582
  var g = this, m = u + "sse/environments/" + i + "/stream";
10544
10583
  fe ? this.eventSource || (this.log("Creating event source with url " + m), this.eventSource = new fe(m), this.eventSource.addEventListener("environment_updated", function(b) {
10545
10584
  var C;
10546
10585
  try {
10547
10586
  C = JSON.parse(b.data).updated_at;
10548
- } catch (G) {
10549
- g.log("Could not parse sse event", G);
10587
+ } catch (Y) {
10588
+ g.log("Could not parse sse event", Y);
10550
10589
  }
10551
10590
  C ? !g.timestamp || C > g.timestamp ? g.isLoading ? g.log("updated_at is new, but flags are loading", b.data, g.timestamp) : (g.log("updated_at is new, fetching flags", b.data, g.timestamp), g.getFlags()) : g.log("updated_at is outdated, skipping get flags", b.data, g.timestamp) : g.log("No updated_at received, fetching flags", b);
10552
10591
  })) : this.log("Error, EventSource is undefined");
10553
- }, f;
10592
+ }, h;
10554
10593
  }();
10555
- function A(f) {
10556
- var u = f.fetch, i = f.AsyncStorage, g = f.eventSource;
10557
- return new yt({ fetch: u, AsyncStorage: i, eventSource: g });
10594
+ function A(h) {
10595
+ var u = h.fetch, i = h.AsyncStorage, g = h.eventSource;
10596
+ return new bt({ fetch: u, AsyncStorage: i, eventSource: g });
10558
10597
  }
10559
- var p, B = (p = function(f, u) {
10598
+ var p, B = (p = function(h, u) {
10560
10599
  return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, g) {
10561
10600
  i.__proto__ = g;
10562
10601
  } || function(i, g) {
10563
10602
  for (var m in g) Object.prototype.hasOwnProperty.call(g, m) && (i[m] = g[m]);
10564
- }, p(f, u);
10565
- }, function(f, u) {
10603
+ }, p(h, u);
10604
+ }, function(h, u) {
10566
10605
  if (typeof u != "function" && u !== null) throw new TypeError("Class extends value " + String(u) + " is not a constructor or null");
10567
10606
  function i() {
10568
- this.constructor = f;
10607
+ this.constructor = h;
10569
10608
  }
10570
- p(f, u), f.prototype = u === null ? Object.create(u) : (i.prototype = u.prototype, new i());
10571
- }), D = function(f) {
10572
- var u = typeof Symbol == "function" && Symbol.iterator, i = u && f[u], g = 0;
10573
- if (i) return i.call(f);
10574
- if (f && typeof f.length == "number") return { next: function() {
10575
- return f && g >= f.length && (f = void 0), { value: f && f[g++], done: !f };
10609
+ p(h, u), h.prototype = u === null ? Object.create(u) : (i.prototype = u.prototype, new i());
10610
+ }), D = function(h) {
10611
+ var u = typeof Symbol == "function" && Symbol.iterator, i = u && h[u], g = 0;
10612
+ if (i) return i.call(h);
10613
+ if (h && typeof h.length == "number") return { next: function() {
10614
+ return h && g >= h.length && (h = void 0), { value: h && h[g++], done: !h };
10576
10615
  } };
10577
10616
  throw new TypeError(u ? "Object is not iterable." : "Symbol.iterator is not defined.");
10578
- }, E = function(f, u) {
10579
- var i = typeof Symbol == "function" && f[Symbol.iterator];
10580
- if (!i) return f;
10581
- var g, m, b = i.call(f), C = [];
10617
+ }, E = function(h, u) {
10618
+ var i = typeof Symbol == "function" && h[Symbol.iterator];
10619
+ if (!i) return h;
10620
+ var g, m, b = i.call(h), C = [];
10582
10621
  try {
10583
10622
  for (; (u === void 0 || u-- > 0) && !(g = b.next()).done; ) C.push(g.value);
10584
- } catch (G) {
10585
- m = { error: G };
10623
+ } catch (Y) {
10624
+ m = { error: Y };
10586
10625
  } finally {
10587
10626
  try {
10588
10627
  g && !g.done && (i = b.return) && i.call(b);
@@ -10591,26 +10630,26 @@ var Hs = { exports: {} };
10591
10630
  }
10592
10631
  }
10593
10632
  return C;
10594
- }, O = function(f, u, i) {
10633
+ }, G = function(h, u, i) {
10595
10634
  if (arguments.length === 2) for (var g, m = 0, b = u.length; m < b; m++) !g && m in u || (g || (g = Array.prototype.slice.call(u, 0, m)), g[m] = u[m]);
10596
- return f.concat(g || Array.prototype.slice.call(u));
10597
- }, R = function(f) {
10635
+ return h.concat(g || Array.prototype.slice.call(u));
10636
+ }, R = function(h) {
10598
10637
  function u() {
10599
- return f.call(this, `EventSource not available.
10638
+ return h.call(this, `EventSource not available.
10600
10639
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
10601
10640
  }
10602
- return B(u, f), u;
10641
+ return B(u, h), u;
10603
10642
  }(Error), T = function() {
10604
- function f(u, i) {
10643
+ function h(u, i) {
10605
10644
  var g = this;
10606
10645
  if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = i != null ? Object.assign({}, i) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = u.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new R();
10607
10646
  this._onevent_wrapped = function(m) {
10608
10647
  g._onevent(m);
10609
10648
  }, this._start();
10610
10649
  }
10611
- return f.prototype.dispatchEvent = function(u) {
10650
+ return h.prototype.dispatchEvent = function(u) {
10612
10651
  throw new Error("Method not implemented.");
10613
- }, f.prototype._start = function() {
10652
+ }, h.prototype._start = function() {
10614
10653
  var u, i, g = this, m = this.url;
10615
10654
  this._lastEventId && (m.indexOf("?") === -1 ? m += "?" : m += "&", m += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(m, this._configuration), this._eventSource.onopen = function(F) {
10616
10655
  g._onopen(F);
@@ -10621,8 +10660,8 @@ Consider loading an EventSource polyfill and making it available globally as Eve
10621
10660
  };
10622
10661
  try {
10623
10662
  for (var b = D(Object.keys(this._listeners)), C = b.next(); !C.done; C = b.next()) {
10624
- var G = C.value;
10625
- this._eventSource.addEventListener(G, this._onevent_wrapped);
10663
+ var Y = C.value;
10664
+ this._eventSource.addEventListener(Y, this._onevent_wrapped);
10626
10665
  }
10627
10666
  } catch (F) {
10628
10667
  u = { error: F };
@@ -10633,9 +10672,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
10633
10672
  if (u) throw u.error;
10634
10673
  }
10635
10674
  }
10636
- }, f.prototype._onopen = function(u) {
10675
+ }, h.prototype._onopen = function(u) {
10637
10676
  this.readyState === 0 && (this.readyState = 1, this.onopen(u));
10638
- }, f.prototype._onerror = function(u) {
10677
+ }, h.prototype._onerror = function(u) {
10639
10678
  var i = this;
10640
10679
  if (this.readyState === 1 && (this.readyState = 0, this.onerror(u)), this._eventSource) {
10641
10680
  this._eventSource.close(), this._eventSource = null;
@@ -10644,15 +10683,15 @@ Consider loading an EventSource polyfill and making it available globally as Eve
10644
10683
  return i._start();
10645
10684
  }, g);
10646
10685
  }
10647
- }, f.prototype._onevent = function(u) {
10686
+ }, h.prototype._onevent = function(u) {
10648
10687
  var i, g;
10649
10688
  u && u.lastEventId && (this._lastEventId = u.lastEventId);
10650
10689
  var m = this._listeners[u.type];
10651
10690
  if (m != null) try {
10652
- for (var b = D(O([], E(m), !1)), C = b.next(); !C.done; C = b.next())
10691
+ for (var b = D(G([], E(m), !1)), C = b.next(); !C.done; C = b.next())
10653
10692
  C.value.call(this, u);
10654
- } catch (G) {
10655
- i = { error: G };
10693
+ } catch (Y) {
10694
+ i = { error: Y };
10656
10695
  } finally {
10657
10696
  try {
10658
10697
  C && !C.done && (g = b.return) && g.call(b);
@@ -10661,26 +10700,26 @@ Consider loading an EventSource polyfill and making it available globally as Eve
10661
10700
  }
10662
10701
  }
10663
10702
  u.type === "message" && this.onmessage(u);
10664
- }, f.prototype.onopen = function(u) {
10665
- }, f.prototype.onerror = function(u) {
10666
- }, f.prototype.onmessage = function(u) {
10667
- }, f.prototype.close = function() {
10703
+ }, h.prototype.onopen = function(u) {
10704
+ }, h.prototype.onerror = function(u) {
10705
+ }, h.prototype.onmessage = function(u) {
10706
+ }, h.prototype.close = function() {
10668
10707
  this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
10669
- }, f.prototype.addEventListener = function(u, i, g) {
10708
+ }, h.prototype.addEventListener = function(u, i, g) {
10670
10709
  this._listeners[u] == null && (this._listeners[u] = [], this._eventSource != null && this._eventSource.addEventListener(u, this._onevent_wrapped));
10671
10710
  var m = this._listeners[u];
10672
- m.includes(i) || (this._listeners[u] = O(O([], E(m), !1), [i], !1));
10673
- }, f.prototype.removeEventListener = function(u, i, g) {
10711
+ m.includes(i) || (this._listeners[u] = G(G([], E(m), !1), [i], !1));
10712
+ }, h.prototype.removeEventListener = function(u, i, g) {
10674
10713
  var m = this._listeners[u];
10675
10714
  this._listeners[u] = m.filter(function(b) {
10676
10715
  return b !== i;
10677
10716
  });
10678
- }, f;
10717
+ }, h;
10679
10718
  }();
10680
10719
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
10681
- var te = function(f, u) {
10720
+ var te = function(h, u) {
10682
10721
  return u = u || {}, new Promise(function(i, g) {
10683
- var m = new XMLHttpRequest(), b = [], C = [], G = {}, F = function() {
10722
+ var m = new XMLHttpRequest(), b = [], C = [], Y = {}, F = function() {
10684
10723
  return { ok: (m.status / 100 | 0) == 2, statusText: m.statusText, status: m.status, url: m.responseURL, text: function() {
10685
10724
  return Promise.resolve(m.responseText);
10686
10725
  }, json: function() {
@@ -10692,16 +10731,16 @@ Consider loading an EventSource polyfill and making it available globally as Eve
10692
10731
  }, entries: function() {
10693
10732
  return C;
10694
10733
  }, get: function(j) {
10695
- return G[j.toLowerCase()];
10734
+ return Y[j.toLowerCase()];
10696
10735
  }, has: function(j) {
10697
- return j.toLowerCase() in G;
10736
+ return j.toLowerCase() in Y;
10698
10737
  } } };
10699
10738
  };
10700
- for (var X in m.open(u.method || "get", f, !0), m.onload = function() {
10739
+ for (var Q in m.open(u.method || "get", h, !0), m.onload = function() {
10701
10740
  m.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, L, de) {
10702
- b.push(L = L.toLowerCase()), C.push([L, de]), G[L] = G[L] ? G[L] + "," + de : de;
10741
+ b.push(L = L.toLowerCase()), C.push([L, de]), Y[L] = Y[L] ? Y[L] + "," + de : de;
10703
10742
  }), i(F());
10704
- }, m.onerror = g, m.withCredentials = u.credentials == "include", u.headers) m.setRequestHeader(X, u.headers[X]);
10743
+ }, m.onerror = g, m.withCredentials = u.credentials == "include", u.headers) m.setRequestHeader(Q, u.headers[Q]);
10705
10744
  m.send(u.body || null);
10706
10745
  });
10707
10746
  }, ae = A({ AsyncStorage: n, fetch: te, eventSource: T });
@@ -10710,24 +10749,24 @@ Consider loading an EventSource polyfill and making it available globally as Eve
10710
10749
  }, s.default = ae, Object.defineProperty(s, "__esModule", { value: !0 });
10711
10750
  });
10712
10751
  })(Hs, Hs.exports);
10713
- var Nc = Hs.exports, Xc = {
10752
+ var Qc = Hs.exports, Zc = {
10714
10753
  NOT_INITIALIZED: "FeatureFlag not initialized. Call init() first."
10715
- }, pn = "business", Oe, Qc = (Oe = class {
10754
+ }, pn = "business", Ge, Uc = (Ge = class {
10716
10755
  constructor() {
10717
- Yt(this, "flagsmithClient", null);
10718
- Yt(this, "userContext", null);
10756
+ Vt(this, "flagsmithClient", null);
10757
+ Vt(this, "userContext", null);
10719
10758
  }
10720
10759
  static getInstance() {
10721
- return Oe.instance || (Oe.instance = new Oe()), Oe.instance;
10760
+ return Ge.instance || (Ge.instance = new Ge()), Ge.instance;
10722
10761
  }
10723
10762
  ensureInitialized() {
10724
10763
  if (!this.flagsmithClient)
10725
- throw new Error(Xc.NOT_INITIALIZED);
10764
+ throw new Error(Zc.NOT_INITIALIZED);
10726
10765
  }
10727
10766
  async init(t, s = []) {
10728
10767
  if (!this.flagsmithClient)
10729
10768
  try {
10730
- this.flagsmithClient = Nc.createFlagsmithInstance();
10769
+ this.flagsmithClient = Qc.createFlagsmithInstance();
10731
10770
  const n = s.reduce((a, r) => (a[r.feature.name] = r, a), {});
10732
10771
  await this.flagsmithClient.init({
10733
10772
  environmentID: t.apiKey,
@@ -10814,58 +10853,58 @@ var Nc = Hs.exports, Xc = {
10814
10853
  reset() {
10815
10854
  this.flagsmithClient = null, this.userContext = null;
10816
10855
  }
10817
- }, Yt(Oe, "instance"), Oe), Zc = Qc.getInstance(), Mt = Ue(!1), Ft = Ue([]), dt = Ue(null);
10818
- function Uc(e = Zc) {
10819
- const t = () => Mt.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (w, V = []) => {
10820
- if (Mt.value) {
10856
+ }, Vt(Ge, "instance"), Ge), zc = Uc.getInstance(), Dt = Ue(!1), St = Ue([]), dt = Ue(null);
10857
+ function Wc(e = zc) {
10858
+ const t = () => Dt.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (f, O = []) => {
10859
+ if (Dt.value) {
10821
10860
  console.warn("FeatureFlag is already initialized.");
10822
10861
  return;
10823
10862
  }
10824
10863
  try {
10825
- await e.init(w, V), Ft.value = await e.getFlags(), Mt.value = !0, dt.value = null;
10826
- } catch (Z) {
10827
- console.error("Failed to initialize feature flags:", Z), dt.value = Z;
10864
+ await e.init(f, O), St.value = await e.getFlags(), Dt.value = !0, dt.value = null;
10865
+ } catch (X) {
10866
+ console.error("Failed to initialize feature flags:", X), dt.value = X;
10828
10867
  }
10829
- }, n = async (w) => {
10868
+ }, n = async (f) => {
10830
10869
  if (t())
10831
10870
  try {
10832
- await e.setUser(w), Ft.value = await e.getFlags(), dt.value = null;
10833
- } catch (V) {
10834
- console.error("Failed to set user:", V), dt.value = V;
10871
+ await e.setUser(f), St.value = await e.getFlags(), dt.value = null;
10872
+ } catch (O) {
10873
+ console.error("Failed to set user:", O), dt.value = O;
10835
10874
  }
10836
- }, a = async (w) => n(`${pn}-${w}`), r = (w, V, Z = null) => {
10837
- if (!t()) return Z;
10875
+ }, a = async (f) => n(`${pn}-${f}`), r = (f, O, X = null) => {
10876
+ if (!t()) return X;
10838
10877
  try {
10839
- return e.getFlagValue(w, V) ?? Z;
10840
- } catch (W) {
10841
- return console.error(`Error getting flag value for ${w}:`, W), Z;
10878
+ return e.getFlagValue(f, O) ?? X;
10879
+ } catch (U) {
10880
+ return console.error(`Error getting flag value for ${f}:`, U), X;
10842
10881
  }
10843
- }, l = (w, V) => {
10844
- if (!t()) return V ?? null;
10882
+ }, l = (f, O) => {
10883
+ if (!t()) return O ?? null;
10845
10884
  try {
10846
- return e.getFlag(w) ?? V ?? null;
10847
- } catch (Z) {
10848
- return console.error(`Error getting flag for ${w}:`, Z), V ?? null;
10885
+ return e.getFlag(f) ?? O ?? null;
10886
+ } catch (X) {
10887
+ return console.error(`Error getting flag for ${f}:`, X), O ?? null;
10849
10888
  }
10850
- }, c = async (w, V, Z = null, W) => {
10851
- if (!t()) return Z;
10889
+ }, c = async (f, O, X = null, U) => {
10890
+ if (!t()) return X;
10852
10891
  try {
10853
- return await e.getUserFlagValue(w, V, Z, W);
10892
+ return await e.getUserFlagValue(f, O, X, U);
10854
10893
  } catch (se) {
10855
- return console.error(`Error getting user flag value for ${V}:`, se), Z;
10894
+ return console.error(`Error getting user flag value for ${O}:`, se), X;
10856
10895
  }
10857
- }, h = async (w, V, Z = null, W) => c(`${pn}-${w}`, V, Z, W), y = () => {
10896
+ }, w = async (f, O, X = null, U) => c(`${pn}-${f}`, O, X, U), y = () => {
10858
10897
  try {
10859
10898
  e.reset();
10860
- } catch (w) {
10861
- console.error("Error resetting feature flags:", w);
10899
+ } catch (f) {
10900
+ console.error("Error resetting feature flags:", f);
10862
10901
  } finally {
10863
- Ft.value = [], Mt.value = !1, dt.value = null;
10902
+ St.value = [], Dt.value = !1, dt.value = null;
10864
10903
  }
10865
10904
  };
10866
10905
  return {
10867
- flags: Ds(Ft),
10868
- isInitialized: Ds(Mt),
10906
+ flags: Ds(St),
10907
+ isInitialized: Ds(Dt),
10869
10908
  error: Ds(dt),
10870
10909
  init: s,
10871
10910
  setUser: n,
@@ -10873,17 +10912,17 @@ function Uc(e = Zc) {
10873
10912
  getFlagValue: r,
10874
10913
  getFlag: l,
10875
10914
  getUserFlagValue: c,
10876
- getBusinessFlagValue: h,
10915
+ getBusinessFlagValue: w,
10877
10916
  reset: y
10878
10917
  };
10879
10918
  }
10880
- var zc = () => Uc();
10881
- const iu = /* @__PURE__ */ at({
10919
+ var Lc = () => Wc();
10920
+ const cu = /* @__PURE__ */ at({
10882
10921
  __name: "App",
10883
10922
  setup(e) {
10884
- const t = bn(), { init: s } = zc();
10923
+ const t = bn(), { init: s } = Lc();
10885
10924
  return yn(async () => {
10886
- t.registerSidebarComponent(qc), await s({
10925
+ t.registerSidebarComponent(Xc), await s({
10887
10926
  apiKey: t.namespace.value === "prod" ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
10888
10927
  });
10889
10928
  }), (n, a) => {
@@ -10892,14 +10931,14 @@ const iu = /* @__PURE__ */ at({
10892
10931
  };
10893
10932
  }
10894
10933
  });
10895
- var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.3.0-dev.12", mode: "fmmf" };
10934
+ var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.3.0-dev.14", mode: "fmmf" };
10896
10935
  console.log(
10897
10936
  `%c${xs.name}%c v${xs.version} %c${xs.mode}`,
10898
10937
  "background:#1f1f1f;color:#fff;padding:2px 6px;border-radius:3px 0 0 3px",
10899
10938
  "background:#42b883;color:#1f1f1f;padding:2px 6px",
10900
10939
  "background:#555;color:#fff;padding:2px 6px;border-radius:0 3px 3px 0"
10901
10940
  );
10902
- const lu = () => {
10941
+ const uu = () => {
10903
10942
  const e = [
10904
10943
  ii,
10905
10944
  _o,
@@ -10922,28 +10961,29 @@ const lu = () => {
10922
10961
  );
10923
10962
  };
10924
10963
  export {
10925
- eu as A,
10926
- au as B,
10927
- nu as D,
10928
- $c as G,
10929
- su as O,
10964
+ su as A,
10965
+ ou as B,
10966
+ ru as D,
10967
+ tu as G,
10968
+ au as O,
10930
10969
  $ as R,
10931
- tu as S,
10970
+ nu as S,
10932
10971
  eo as U,
10933
10972
  wc as _,
10934
- Cc as a,
10935
- xl as b,
10936
- Ne as c,
10937
- so as d,
10938
- zl as e,
10939
- Dt as f,
10940
- jl as g,
10941
- iu as h,
10942
- lu as i,
10973
+ Nc as a,
10974
+ Cc as b,
10975
+ xl as c,
10976
+ Ne as d,
10977
+ so as e,
10978
+ zl as f,
10979
+ xt as g,
10980
+ jl as h,
10981
+ uu as i,
10982
+ cu as j,
10943
10983
  co as k,
10944
- ru as m,
10984
+ iu as m,
10945
10985
  o as n,
10946
- ou as r,
10947
- zc as u,
10986
+ lu as r,
10987
+ Lc as u,
10948
10988
  v
10949
10989
  };