@realtek/core-theme-live 0.0.418 → 0.0.419

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.
@@ -4538,19 +4538,31 @@ async function Js({ module: e, recordId: t, notice: n, displayField: r = "", dep
4538
4538
  creatorName: d
4539
4539
  };
4540
4540
  }
4541
+ var Ys = (e, t) => e?.quickCreate ? e.quickCreateOnType === !0 || e.quickCreateOnType !== !1 && t === "submissions" && e.quickCreateModule === "employers" : !1;
4542
+ function Xs(e) {
4543
+ return String(e ?? "").trim().replace(/\s+/g, " ");
4544
+ }
4545
+ var Zs = (e) => Xs(e).toLowerCase();
4546
+ function Qs(e, t) {
4547
+ let n = Zs(e);
4548
+ return !n || !Array.isArray(t) ? null : t.find((e) => Zs(e?.label) === n) ?? null;
4549
+ }
4550
+ function $s({ text: e, disabled: t = !1, modalOpen: n = !1 }) {
4551
+ return t || n ? !1 : Xs(e).length >= 3;
4552
+ }
4541
4553
  //#endregion
4542
4554
  //#region src/components/form/QuickCreateEditField.jsx
4543
- var Ys = d(() => import("./index.js").then((e) => e.i)), Xs = d(() => import("./index.js").then((e) => e.n)), Zs = (e) => e == null || e === "", Qs = (e) => typeof e == "string" && e.includes(".") ? e.split(".") : [e];
4544
- function $s(e, t, n, r, i) {
4555
+ var ec = d(() => import("./index.js").then((e) => e.i)), tc = d(() => import("./index.js").then((e) => e.n)), nc = (e) => e == null || e === "", rc = (e) => typeof e == "string" && e.includes(".") ? e.split(".") : [e];
4556
+ function ic(e, t, n, r, i) {
4545
4557
  let a = e.quickEditIdFrom;
4546
4558
  if (a) {
4547
- let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...Qs(a)] : Qs(a), i = t?.getFieldValue?.(e);
4548
- return Zs(i) && (i = r?.[a]), Zs(i) ? null : i;
4559
+ let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...rc(a)] : rc(a), i = t?.getFieldValue?.(e);
4560
+ return nc(i) && (i = r?.[a]), nc(i) ? null : i;
4549
4561
  }
4550
- return i && typeof i == "object" ? i.value ?? null : Zs(i) ? null : i;
4562
+ return i && typeof i == "object" ? i.value ?? null : nc(i) ? null : i;
4551
4563
  }
4552
- function ec({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValue: a, onDone: o }) {
4553
- let [s, c] = g(null), [l, d] = g(null), f = !!e?.quickCreate, p = !!e?.quickEdit, h = e?.quickCreateModule || e?.lookupCollection || "", _ = e?.quickEditModule || e?.lookupCollection || "", v = m(() => p ? $s(e, t, n, i, a) : null, [
4564
+ function ac({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValue: a, onDone: o }) {
4565
+ let [s, c] = g(null), [l, d] = g(null), f = !!e?.quickCreate, p = !!e?.quickEdit, h = e?.quickCreateModule || e?.lookupCollection || "", _ = e?.quickEditModule || e?.lookupCollection || "", v = m(() => p ? ic(e, t, n, i, a) : null, [
4554
4566
  p,
4555
4567
  e,
4556
4568
  t,
@@ -4560,9 +4572,11 @@ function ec({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4560
4572
  ]);
4561
4573
  if (!f && !p) return {
4562
4574
  footer: null,
4563
- modal: null
4575
+ modal: null,
4576
+ openCreateWith: null,
4577
+ isModalOpen: !1
4564
4578
  };
4565
- let b = () => c(null), x = () => {
4579
+ let b = Ys(e, r), x = () => c(null), re = () => {
4566
4580
  if (e?.quickCreateOnClick) {
4567
4581
  e.quickCreateOnClick(), document.activeElement?.blur?.();
4568
4582
  return;
@@ -4575,11 +4589,17 @@ function ec({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4575
4589
  mode: "create",
4576
4590
  module: h
4577
4591
  });
4578
- }, re = () => _ && v && c({
4592
+ }, ie = (e) => {
4593
+ s || !h || c({
4594
+ mode: "create",
4595
+ module: h,
4596
+ prefill: e ?? null
4597
+ });
4598
+ }, S = () => _ && v && c({
4579
4599
  mode: "edit",
4580
4600
  module: _,
4581
4601
  recordId: String(v)
4582
- }), ie = (t) => {
4602
+ }), ae = (t) => {
4583
4603
  let n = Bs(e);
4584
4604
  n && (d({
4585
4605
  ...n,
@@ -4597,7 +4617,7 @@ function ec({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4597
4617
  creatorName: t
4598
4618
  });
4599
4619
  }).catch(() => {}));
4600
- }, S = /* @__PURE__ */ C("div", {
4620
+ }, ce = f && !b, le = !ce && !p ? null : /* @__PURE__ */ C("div", {
4601
4621
  className: "v1-quick-actions",
4602
4622
  role: "presentation",
4603
4623
  onMouseDown: (e) => e.preventDefault(),
@@ -4609,31 +4629,31 @@ function ec({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4609
4629
  },
4610
4630
  children: /* @__PURE__ */ w(te, {
4611
4631
  size: 8,
4612
- children: [f && /* @__PURE__ */ C(y, {
4632
+ children: [ce && /* @__PURE__ */ C(y, {
4613
4633
  type: "link",
4614
4634
  size: "small",
4615
4635
  icon: /* @__PURE__ */ C(me, {}),
4616
- onClick: x,
4636
+ onClick: re,
4617
4637
  style: { paddingLeft: 0 },
4618
4638
  children: Ms(e, h)
4619
4639
  }), p && /* @__PURE__ */ C(y, {
4620
4640
  type: "link",
4621
4641
  size: "small",
4622
4642
  icon: /* @__PURE__ */ C(oe, {}),
4623
- onClick: re,
4643
+ onClick: S,
4624
4644
  disabled: !v,
4625
4645
  title: v ? void 0 : `Choose a ${X(_) || "record"} above first, then edit it here`,
4626
4646
  children: Ns(e, _)
4627
4647
  })]
4628
4648
  })
4629
- }), ae = s ? /* @__PURE__ */ C(ee, {
4649
+ }), ue = s ? /* @__PURE__ */ C(ee, {
4630
4650
  open: !0,
4631
4651
  title: Ps(s.mode, e, s.mode === "create" ? h : _),
4632
4652
  width: "min(1080px, 96vw)",
4633
4653
  footer: null,
4634
4654
  destroyOnClose: !0,
4635
4655
  maskClosable: !1,
4636
- onCancel: b,
4656
+ onCancel: x,
4637
4657
  styles: { body: {
4638
4658
  maxHeight: "78vh",
4639
4659
  overflowY: "auto"
@@ -4646,26 +4666,27 @@ function ec({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4646
4666
  },
4647
4667
  children: /* @__PURE__ */ C(ne, {})
4648
4668
  }),
4649
- children: s.mode === "create" ? /* @__PURE__ */ C(Ys, {
4669
+ children: s.mode === "create" ? /* @__PURE__ */ C(ec, {
4650
4670
  moduleName: s.module,
4651
4671
  embedded: !0,
4652
4672
  breadcrumbItems: [],
4653
- onCancel: b,
4673
+ initialRecord: s.prefill ?? void 0,
4674
+ onCancel: x,
4654
4675
  onSuccess: (e) => {
4655
- b(), ie(e), o?.("create", e);
4676
+ x(), ae(e), o?.("create", e);
4656
4677
  }
4657
- }) : /* @__PURE__ */ C(Xs, {
4678
+ }) : /* @__PURE__ */ C(tc, {
4658
4679
  moduleName: s.module,
4659
4680
  recordId: s.recordId,
4660
4681
  embedded: !0,
4661
4682
  breadcrumbItems: [],
4662
- onCancel: b,
4683
+ onCancel: x,
4663
4684
  onSuccess: (e) => {
4664
- b(), o?.("edit", e);
4685
+ x(), o?.("edit", e);
4665
4686
  }
4666
4687
  })
4667
4688
  })
4668
- }) : null, ce = l ? /* @__PURE__ */ w(ee, {
4689
+ }) : null, de = l ? /* @__PURE__ */ w(ee, {
4669
4690
  open: !0,
4670
4691
  title: /* @__PURE__ */ w("span", {
4671
4692
  style: {
@@ -4709,14 +4730,16 @@ function ec({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4709
4730
  })]
4710
4731
  }) : null;
4711
4732
  return {
4712
- footer: S,
4713
- modal: ae || ce ? /* @__PURE__ */ w(ge, { children: [ae, ce] }) : null
4733
+ footer: le,
4734
+ modal: ue || de ? /* @__PURE__ */ w(ge, { children: [ue, de] }) : null,
4735
+ openCreateWith: ie,
4736
+ isModalOpen: !!s
4714
4737
  };
4715
4738
  }
4716
4739
  //#endregion
4717
4740
  //#region src/components/form/crossFieldRules.js
4718
- var tc = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0;
4719
- function nc(e, t, n) {
4741
+ var oc = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0;
4742
+ function sc(e, t, n) {
4720
4743
  let r = String(t ?? "").includes(".") ? String(t).split(".") : [t];
4721
4744
  if (typeof n == "function") {
4722
4745
  let e = n(t);
@@ -4724,23 +4747,23 @@ function nc(e, t, n) {
4724
4747
  }
4725
4748
  return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), ...r] : r;
4726
4749
  }
4727
- function rc({ label: e, message: t, rule: n = {}, value: r, form: i, name: a, prefixFor: o }) {
4750
+ function cc({ label: e, message: t, rule: n = {}, value: r, form: i, name: a, prefixFor: o }) {
4728
4751
  let s = n.field ?? n.compareField ?? r;
4729
4752
  return { validator: async (n, r) => {
4730
- if (!s || tc(r)) return Promise.resolve();
4731
- let c = i?.getFieldValue?.(nc(a, s, o));
4732
- if (tc(c)) return Promise.resolve();
4753
+ if (!s || oc(r)) return Promise.resolve();
4754
+ let c = i?.getFieldValue?.(sc(a, s, o));
4755
+ if (oc(c)) return Promise.resolve();
4733
4756
  let l = Number(c), u = Number(r);
4734
4757
  return Number.isNaN(l) || Number.isNaN(u) || u <= l ? Promise.resolve() : Promise.reject(Error(t ?? `${e} must not exceed ${s}`));
4735
4758
  } };
4736
4759
  }
4737
- function ic(e = {}, t, n) {
4760
+ function lc(e = {}, t, n) {
4738
4761
  let r = e.field ?? e.compareField ?? e.value;
4739
- return r ? nc(t, r, n) : null;
4762
+ return r ? sc(t, r, n) : null;
4740
4763
  }
4741
4764
  //#endregion
4742
4765
  //#region src/components/form/maxCeiling.js
4743
- function ac(e, t) {
4766
+ function uc(e, t) {
4744
4767
  let n = String(t).split(".").filter(Boolean);
4745
4768
  if (!Array.isArray(e)) return n.length > 1 ? n : t;
4746
4769
  if (n.length > 1) {
@@ -4753,14 +4776,14 @@ function ac(e, t) {
4753
4776
  let r = [...e];
4754
4777
  return r[r.length - 1] = n[0], r;
4755
4778
  }
4756
- function oc(e, t, n) {
4757
- let r = e?.getFieldValue?.(ac(t, n));
4779
+ function dc(e, t, n) {
4780
+ let r = e?.getFieldValue?.(uc(t, n));
4758
4781
  return r != null && r !== "" ? r : e?.getFieldValue?.(n);
4759
4782
  }
4760
- function sc(e) {
4783
+ function fc(e) {
4761
4784
  return String(e ?? "").split(",").map((e) => e.trim()).filter(Boolean);
4762
4785
  }
4763
- function cc(e, t) {
4786
+ function pc(e, t) {
4764
4787
  for (let n of e ?? []) {
4765
4788
  let e = t(n);
4766
4789
  if (e == null || e === "") continue;
@@ -4772,14 +4795,14 @@ function cc(e, t) {
4772
4795
  }
4773
4796
  return null;
4774
4797
  }
4775
- function lc({ input: e, compareFields: t, readValue: n }) {
4798
+ function mc({ input: e, compareFields: t, readValue: n }) {
4776
4799
  let r = {
4777
4800
  ok: !0,
4778
4801
  field: null,
4779
4802
  maximum: null
4780
4803
  };
4781
4804
  if (e == null || e === "") return r;
4782
- let i = cc(t, n);
4805
+ let i = pc(t, n);
4783
4806
  if (!i) return r;
4784
4807
  let a = Number(e);
4785
4808
  return Number.isFinite(a) ? {
@@ -4790,39 +4813,39 @@ function lc({ input: e, compareFields: t, readValue: n }) {
4790
4813
  }
4791
4814
  //#endregion
4792
4815
  //#region src/components/form/contextPrefill.js
4793
- var uc = { candidates: ["applicantId"] };
4794
- function dc(e) {
4816
+ var hc = { candidates: ["applicantId"] };
4817
+ function gc(e) {
4795
4818
  let t = String(e ?? "").trim();
4796
4819
  if (!t) return [];
4797
4820
  let n = t.endsWith("s") ? t.slice(0, -1) : t;
4798
4821
  return [.../* @__PURE__ */ new Set([
4799
4822
  `${n}Id`,
4800
4823
  `${t}Id`,
4801
- ...uc[t] ?? []
4824
+ ...hc[t] ?? []
4802
4825
  ])];
4803
4826
  }
4804
- function fc(e, t) {
4827
+ function _c(e, t) {
4805
4828
  if (!t) return "";
4806
4829
  let n = (e) => e && typeof e == "object" ? e.id ?? e.value ?? "" : e ?? "";
4807
- for (let r of dc(e)) {
4830
+ for (let r of gc(e)) {
4808
4831
  let e = String(n(t[r]) || "");
4809
4832
  if (e) return e;
4810
4833
  }
4811
4834
  return "";
4812
4835
  }
4813
- function pc(e, t) {
4836
+ function vc(e, t) {
4814
4837
  let n = /* @__PURE__ */ new Set();
4815
4838
  return (e ?? []).forEach((e) => (e.fields ?? []).forEach((e) => {
4816
4839
  e?.prefillFromModule && n.add(t(e.prefillFromModule));
4817
4840
  })), [...n];
4818
4841
  }
4819
- function mc(e) {
4842
+ function yc(e) {
4820
4843
  return e?.payloadMode === "skip";
4821
4844
  }
4822
- function hc(e) {
4845
+ function bc(e) {
4823
4846
  return Array.isArray(e) ? e : Array.isArray(e?.groups) ? e.groups : Array.isArray(e?.data) ? e.data : Array.isArray(e?.data?.groups) ? e.data.groups : [];
4824
4847
  }
4825
- function gc(e) {
4848
+ function xc(e) {
4826
4849
  let t = {};
4827
4850
  return (e ?? []).forEach((e) => {
4828
4851
  e?.addRow || (e?.fields ?? []).forEach((e) => {
@@ -4830,7 +4853,7 @@ function gc(e) {
4830
4853
  });
4831
4854
  }), t;
4832
4855
  }
4833
- function _c(e, t) {
4856
+ function Sc(e, t) {
4834
4857
  if (!e || !t) return;
4835
4858
  let n = e;
4836
4859
  for (let e of String(t).split(".")) {
@@ -4845,7 +4868,7 @@ function _c(e, t) {
4845
4868
  }
4846
4869
  return n;
4847
4870
  }
4848
- function vc(e, t) {
4871
+ function Cc(e, t) {
4849
4872
  if (!(!e || !t)) for (let n of [
4850
4873
  t.prefillFrom,
4851
4874
  t.field,
@@ -4853,12 +4876,12 @@ function vc(e, t) {
4853
4876
  ]) {
4854
4877
  if (!n) continue;
4855
4878
  let t = e[n];
4856
- if (t ??= V(e, n), t ??= _c(e, n), t != null) return t;
4879
+ if (t ??= V(e, n), t ??= Sc(e, n), t != null) return t;
4857
4880
  }
4858
4881
  }
4859
4882
  //#endregion
4860
4883
  //#region src/components/form/ValidationOverrideCheckbox.jsx
4861
- function yc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
4884
+ function wc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
4862
4885
  let a = Pi(t), o = x.useWatch(n, e);
4863
4886
  if (!a) return null;
4864
4887
  let s = a.label || "Allow beyond the limit", c = () => {
@@ -4889,34 +4912,34 @@ function yc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
4889
4912
  }
4890
4913
  //#endregion
4891
4914
  //#region src/components/form/prefillWhenRules.js
4892
- var bc = (e) => String(e ?? "");
4893
- function xc(e) {
4915
+ var Tc = (e) => String(e ?? "");
4916
+ function Ec(e) {
4894
4917
  let t = /* @__PURE__ */ new Set(), n = [];
4895
4918
  return (Array.isArray(e) ? e : []).forEach((e) => {
4896
4919
  let r = e?.field;
4897
4920
  !r || t.has(r) || (t.add(r), n.push(r));
4898
4921
  }), n;
4899
4922
  }
4900
- function Sc(e, t, n, r) {
4901
- return xc(e).map((e) => ({
4923
+ function Dc(e, t, n, r) {
4924
+ return Ec(e).map((e) => ({
4902
4925
  field: e,
4903
4926
  path: n(t, e, r)
4904
4927
  }));
4905
4928
  }
4906
- function Cc(e, t = {}) {
4907
- return !e || !e.field ? !1 : bc(t[e.field]) === bc(e.value);
4929
+ function Oc(e, t = {}) {
4930
+ return !e || !e.field ? !1 : Tc(t[e.field]) === Tc(e.value);
4908
4931
  }
4909
- function wc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMismatch: i = !0, initial: a = !1 } = {}) {
4910
- let o = (Array.isArray(e) ? e : []).find((e) => Cc(e, t));
4932
+ function kc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMismatch: i = !0, initial: a = !1 } = {}) {
4933
+ let o = (Array.isArray(e) ? e : []).find((e) => Oc(e, t));
4911
4934
  return o ? o.clearValue ? a ? { action: "none" } : { action: "clear" } : {
4912
4935
  action: "set",
4913
4936
  value: o.setValue
4914
- } : i && r !== void 0 && bc(n) === bc(r) ? { action: "clear" } : { action: "none" };
4937
+ } : i && r !== void 0 && Tc(n) === Tc(r) ? { action: "clear" } : { action: "none" };
4915
4938
  }
4916
4939
  //#endregion
4917
4940
  //#region src/components/form/optionConstraints.js
4918
4941
  var Q = (e) => String(e ?? "").trim().toLowerCase();
4919
- function Tc(e) {
4942
+ function Ac(e) {
4920
4943
  let t = Array.isArray(e) ? e : [e], n = [];
4921
4944
  return t.forEach((e) => {
4922
4945
  if (e != null && e !== "") {
@@ -4936,42 +4959,42 @@ function Tc(e) {
4936
4959
  }
4937
4960
  }), n;
4938
4961
  }
4939
- function Ec(e = [], t) {
4940
- let n = Tc(t);
4962
+ function jc(e = [], t) {
4963
+ let n = Ac(t);
4941
4964
  if (!n.length || !Array.isArray(e) || e.length === 0) return e;
4942
4965
  let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(Q(e.value)) || r.has(Q(e.label)) : r.has(Q(e)));
4943
4966
  return i.length > 0 ? i : e;
4944
4967
  }
4945
- function Dc(e) {
4968
+ function Mc(e) {
4946
4969
  let t = [];
4947
4970
  return [e?.setValue, e?.setValueLabel].forEach((e) => {
4948
4971
  e != null && e !== "" && t.push(Q(e));
4949
4972
  }), t;
4950
4973
  }
4951
- function Oc(e, t = {}) {
4974
+ function Nc(e, t = {}) {
4952
4975
  let n = Array.isArray(e) ? e : [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
4953
4976
  return n.forEach((e) => {
4954
4977
  if (!e || e.clearValue) return;
4955
- let n = Dc(e);
4978
+ let n = Mc(e);
4956
4979
  if (!n.length) return;
4957
- let a = Cc(e, t) ? i : r;
4980
+ let a = Oc(e, t) ? i : r;
4958
4981
  n.forEach((e) => a.add(e));
4959
4982
  }), i.forEach((e) => r.delete(e)), [...r];
4960
4983
  }
4961
- function kc(e = [], t, n) {
4962
- let r = Oc(t, n);
4984
+ function Pc(e = [], t, n) {
4985
+ let r = Nc(t, n);
4963
4986
  if (!r.length || !Array.isArray(e) || e.length === 0) return e;
4964
4987
  let i = new Set(r);
4965
4988
  return e.filter((e) => e == null ? !0 : typeof e == "object" ? !(i.has(Q(e.value)) || i.has(Q(e.label))) : !i.has(Q(e)));
4966
4989
  }
4967
- function Ac(e, t = {}, n) {
4990
+ function Fc(e, t = {}, n) {
4968
4991
  let r = Array.isArray(e) ? e : [];
4969
4992
  if (n == null || n === "") return [];
4970
4993
  let i = Q(n), a = [], o = /* @__PURE__ */ new Set();
4971
4994
  return r.forEach((e) => {
4972
4995
  if (!e || e.clearValue) return;
4973
4996
  let { setValue: n, setValueLabel: r } = e;
4974
- n != null && n !== "" && r && Q(n) === i && Cc(e, t) && (o.has(Q(n)) || (o.add(Q(n)), a.push({
4997
+ n != null && n !== "" && r && Q(n) === i && Oc(e, t) && (o.has(Q(n)) || (o.add(Q(n)), a.push({
4975
4998
  value: n,
4976
4999
  label: r
4977
5000
  })));
@@ -4979,8 +5002,8 @@ function Ac(e, t = {}, n) {
4979
5002
  }
4980
5003
  //#endregion
4981
5004
  //#region src/components/form/optionRowFilters.js
4982
- var jc = 64;
4983
- function Mc(e) {
5005
+ var Ic = 64;
5006
+ function Lc(e) {
4984
5007
  if (String(e ?? "").trim() !== "currentUserId") return "";
4985
5008
  try {
4986
5009
  return typeof localStorage > "u" ? "" : String(localStorage.getItem("userId") ?? "").trim();
@@ -4988,34 +5011,34 @@ function Mc(e) {
4988
5011
  return "";
4989
5012
  }
4990
5013
  }
4991
- var Nc = (e) => String(e ?? "").trim().toLowerCase(), Pc = (e) => e != null && String(e).trim() !== "";
4992
- function Fc(e) {
5014
+ var Rc = (e) => String(e ?? "").trim().toLowerCase(), zc = (e) => e != null && String(e).trim() !== "";
5015
+ function Bc(e) {
4993
5016
  let t = Array.isArray(e) ? e : String(e ?? "").split(",");
4994
- return new Set(t.map(Nc).filter((e) => e !== ""));
5017
+ return new Set(t.map(Rc).filter((e) => e !== ""));
4995
5018
  }
4996
- function Ic(e, t) {
4997
- return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) => Pc(e?.extraData?.[t]));
5019
+ function Vc(e, t) {
5020
+ return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) => zc(e?.extraData?.[t]));
4998
5021
  }
4999
- function Lc(e, t, n) {
5022
+ function Hc(e, t, n) {
5000
5023
  let r = e?.extraData?.[t];
5001
- if (!Pc(n)) return r === !0;
5002
- let i = Fc(n);
5003
- return i.size === 0 ? r === !0 : i.has(Nc(r));
5024
+ if (!zc(n)) return r === !0;
5025
+ let i = Bc(n);
5026
+ return i.size === 0 ? r === !0 : i.has(Rc(r));
5004
5027
  }
5005
- function Rc(e, t) {
5028
+ function Uc(e, t) {
5006
5029
  let n = /* @__PURE__ */ new Map();
5007
5030
  return (Array.isArray(e) ? e : []).forEach((e) => {
5008
- let r = Nc(e?.value);
5009
- r && n.set(r, Nc(e?.extraData?.[t]));
5031
+ let r = Rc(e?.value);
5032
+ r && n.set(r, Rc(e?.extraData?.[t]));
5010
5033
  }), n;
5011
5034
  }
5012
- function zc(e, t, n) {
5013
- let r = Nc(n);
5035
+ function Wc(e, t, n) {
5036
+ let r = Rc(n);
5014
5037
  if (!r) return !1;
5015
- let i = /* @__PURE__ */ new Set(), a = Nc(e);
5038
+ let i = /* @__PURE__ */ new Set(), a = Rc(e);
5016
5039
  if (!a) return !1;
5017
5040
  i.add(a);
5018
- for (let e = 0; e < jc; e += 1) {
5041
+ for (let e = 0; e < Ic; e += 1) {
5019
5042
  let e = t.get(a);
5020
5043
  if (!e) return !1;
5021
5044
  if (e === r) return !0;
@@ -5024,74 +5047,74 @@ function zc(e, t, n) {
5024
5047
  }
5025
5048
  return !1;
5026
5049
  }
5027
- function Bc(e = {}) {
5050
+ function Gc(e = {}) {
5028
5051
  let t = [], n = (e) => {
5029
5052
  let n = String(e ?? "").trim();
5030
5053
  n && !t.includes(n) && t.push(n);
5031
5054
  };
5032
5055
  return (Array.isArray(e.extraFields) ? e.extraFields : []).forEach(n), n(e.optionsRequireExtraField), n(e.optionsHierarchyParentField), t;
5033
5056
  }
5034
- function Vc(e, t = {}, n = {}) {
5057
+ function Kc(e, t = {}, n = {}) {
5035
5058
  if (!Array.isArray(e) || e.length === 0) return e;
5036
5059
  let r = n.source ? `[${n.source}]` : "[optionRowFilters]", i = t.field ?? t.label ?? "(unnamed field)", a = typeof n.warn == "function" ? n.warn : (e) => {
5037
5060
  typeof console < "u" && console.warn(e);
5038
5061
  }, o = e, s = String(t.optionsRequireExtraField ?? "").trim();
5039
- s && (Ic(o, s) ? o = o.filter((e) => Lc(e, s, t.optionsRequireExtraValue)) : a(`${r} "${i}": option filter SKIPPED — no option carried extraData["${s}"], so the value filter could not be applied (the lookup API returned no such extra field). Showing the unfiltered list; this is NOT "nothing matched".`));
5062
+ s && (Vc(o, s) ? o = o.filter((e) => Hc(e, s, t.optionsRequireExtraValue)) : a(`${r} "${i}": option filter SKIPPED — no option carried extraData["${s}"], so the value filter could not be applied (the lookup API returned no such extra field). Showing the unfiltered list; this is NOT "nothing matched".`));
5040
5063
  let c = String(t.optionsHierarchyParentField ?? "").trim();
5041
5064
  if (c) {
5042
- let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s = Mc(n);
5065
+ let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s = Lc(n);
5043
5066
  if (!s) a(`${r} "${i}": hierarchy filter SKIPPED — identity "${n}" could not be resolved (no signed-in user id available). Showing the list unrestricted by reporting line.`);
5044
- else if (!Ic(e, c)) a(`${r} "${i}": hierarchy filter SKIPPED — no option carried extraData["${c}"], so the reporting chain could not be walked (the lookup API returned no such extra field). Showing the list unrestricted by reporting line; this is NOT "nobody reports to you".`);
5067
+ else if (!Vc(e, c)) a(`${r} "${i}": hierarchy filter SKIPPED — no option carried extraData["${c}"], so the reporting chain could not be walked (the lookup API returned no such extra field). Showing the list unrestricted by reporting line; this is NOT "nobody reports to you".`);
5045
5068
  else {
5046
- let t = Rc(e, c);
5047
- o = o.filter((e) => zc(e?.value, t, s));
5069
+ let t = Uc(e, c);
5070
+ o = o.filter((e) => Wc(e?.value, t, s));
5048
5071
  }
5049
5072
  }
5050
5073
  return o;
5051
5074
  }
5052
5075
  //#endregion
5053
5076
  //#region src/components/form/fieldTooltip.js
5054
- var Hc = (e) => e == null || String(e).trim() === "", Uc = (e) => e === !0 || e === 1 || e === "1" || e === "true";
5055
- function Wc(e) {
5056
- return Hc(e?.tooltip) ? Uc(e?.infoEnabled) && !Hc(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
5077
+ var qc = (e) => e == null || String(e).trim() === "", Jc = (e) => e === !0 || e === 1 || e === "1" || e === "true";
5078
+ function Yc(e) {
5079
+ return qc(e?.tooltip) ? Jc(e?.infoEnabled) && !qc(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
5057
5080
  }
5058
5081
  //#endregion
5059
5082
  //#region src/components/form/autofillValue.js
5060
- var Gc = (e) => e == null || typeof e == "string" && e.trim() === "";
5061
- function Kc(e, t = {}, n = () => void 0) {
5083
+ var Xc = (e) => e == null || typeof e == "string" && e.trim() === "";
5084
+ function Zc(e, t = {}, n = () => void 0) {
5062
5085
  let { optionKey: r } = t, i = (e ? n(e, r) : void 0) ?? e?.extraData?.[r] ?? null, { fallback: a } = t;
5063
- return Gc(i) && a != null && a !== "" ? a : i;
5086
+ return Xc(i) && a != null && a !== "" ? a : i;
5064
5087
  }
5065
5088
  //#endregion
5066
5089
  //#region src/components/form/dependentLookupReset.js
5067
- var qc = Symbol("parentFilterUnseen"), Jc = (e) => e == null || e === "", Yc = (e, t) => String(e ?? "") === String(t ?? "");
5068
- function Xc({ previous: e, next: t, currentValue: n, scoped: r = !0 }) {
5069
- return !(!r || e === qc || Yc(e, t) || Jc(e) || Jc(n));
5090
+ var Qc = Symbol("parentFilterUnseen"), $c = (e) => e == null || e === "", el = (e, t) => String(e ?? "") === String(t ?? "");
5091
+ function tl({ previous: e, next: t, currentValue: n, scoped: r = !0 }) {
5092
+ return !(!r || e === Qc || el(e, t) || $c(e) || $c(n));
5070
5093
  }
5071
5094
  //#endregion
5072
5095
  //#region src/utils/roleAllowsAction.js
5073
- function Zc(e) {
5074
- return e == null ? !0 : typeof e == "object" ? Zc(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
5096
+ function nl(e) {
5097
+ return e == null ? !0 : typeof e == "object" ? nl(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
5075
5098
  }
5076
- function Qc(e, t) {
5099
+ function rl(e, t) {
5077
5100
  let n = String(t ?? "").trim().toLowerCase();
5078
5101
  if (!(!n || !e || typeof e != "object")) for (let [t, r] of Object.entries(e)) {
5079
5102
  let e = String(t).trim().toLowerCase();
5080
5103
  if (e === n || e === `${n}s` || `${e}s` === n) return r && typeof r == "object" ? r : void 0;
5081
5104
  }
5082
5105
  }
5083
- function $c(e, t) {
5106
+ function il(e, t) {
5084
5107
  if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
5085
5108
  let n = `${t}Access`;
5086
5109
  if (Object.prototype.hasOwnProperty.call(e, n)) return e[n];
5087
5110
  }
5088
- function el(e, t) {
5111
+ function al(e, t) {
5089
5112
  if (!e) return !0;
5090
5113
  try {
5091
5114
  let n = JSON.parse(localStorage.getItem("menuPermission") || "{}"), [r, i] = String(e).split("."), a = i ?? r, o = i ? [r, t] : [t];
5092
5115
  for (let e of o) {
5093
- let t = Qc(n, e);
5094
- if (t) return Zc($c(t, a));
5116
+ let t = rl(n, e);
5117
+ if (t) return nl(il(t, a));
5095
5118
  }
5096
5119
  return !0;
5097
5120
  } catch {
@@ -5100,10 +5123,10 @@ function el(e, t) {
5100
5123
  }
5101
5124
  //#endregion
5102
5125
  //#region src/utils/afterSubmitNav.js
5103
- function tl(e) {
5126
+ function ol(e) {
5104
5127
  return (e ?? []).filter((e) => e?.afterSubmit?.mode).sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.afterSubmit ?? null;
5105
5128
  }
5106
- function nl(e, t, n) {
5129
+ function sl(e, t, n) {
5107
5130
  let r = String(e ?? "").trim();
5108
5131
  return !r || !r.startsWith("/") || r.startsWith("//") || /^[a-z][a-z0-9+.-]*:/i.test(r) ? null : r.replace(/:([A-Za-z_][\w]*)/g, (e, r) => {
5109
5132
  let i = r === "id" ? t : n?.[r];
@@ -5112,50 +5135,50 @@ function nl(e, t, n) {
5112
5135
  }
5113
5136
  //#endregion
5114
5137
  //#region src/utils/backNav.js
5115
- function rl(e = typeof window < "u" ? window : void 0) {
5138
+ function cl(e = typeof window < "u" ? window : void 0) {
5116
5139
  let t = e?.history?.state?.idx;
5117
5140
  return typeof t == "number" && t > 0;
5118
5141
  }
5119
- function il({ cancelPath: e, cancelPathPriority: t = !1, fallbackPath: n = "/", win: r = typeof window < "u" ? window : void 0 } = {}) {
5120
- return t && e ? { path: e } : rl(r) ? { back: !0 } : e ? { path: e } : { path: n };
5142
+ function ll({ cancelPath: e, cancelPathPriority: t = !1, fallbackPath: n = "/", win: r = typeof window < "u" ? window : void 0 } = {}) {
5143
+ return t && e ? { path: e } : cl(r) ? { back: !0 } : e ? { path: e } : { path: n };
5121
5144
  }
5122
- function al(e, t = {}) {
5123
- let n = il(t);
5145
+ function ul(e, t = {}) {
5146
+ let n = ll(t);
5124
5147
  return n.back ? e(-1) : e(n.path), n;
5125
5148
  }
5126
5149
  //#endregion
5127
5150
  //#region src/components/form/educationRules.js
5128
- var ol = (e) => e == null ? "" : String(e).trim();
5129
- function sl(e, t) {
5151
+ var dl = (e) => e == null ? "" : String(e).trim();
5152
+ function fl(e, t) {
5130
5153
  let n = e?.regionRules;
5131
5154
  if (!n || typeof n != "object") return e ?? {};
5132
- let r = ol(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
5155
+ let r = dl(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
5133
5156
  return !i || typeof i != "object" ? e ?? {} : {
5134
5157
  ...e,
5135
5158
  ...i
5136
5159
  };
5137
5160
  }
5138
- function cl(e) {
5161
+ function pl(e) {
5139
5162
  return e?.allowInProgress !== !1;
5140
5163
  }
5141
- function ll(e) {
5142
- return cl(e) ? "" : fl(e) ? e?.inProgressWarningMessage || e?.inProgressMessage || "In this region an unfinished qualification is not usually accepted when a candidate is put forward for a role. You can still record it here — just be aware it will have to be completed before they can be submitted." : e?.inProgressMessage || "This one needs to be finished before the application can go ahead. Please untick “still ongoing”, or remove the row.";
5164
+ function ml(e) {
5165
+ return pl(e) ? "" : _l(e) ? e?.inProgressWarningMessage || e?.inProgressMessage || "In this region an unfinished qualification is not usually accepted when a candidate is put forward for a role. You can still record it here — just be aware it will have to be completed before they can be submitted." : e?.inProgressMessage || "This one needs to be finished before the application can go ahead. Please untick “still ongoing”, or remove the row.";
5143
5166
  }
5144
- function ul(e) {
5145
- return cl(e) ? "allow" : ol(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
5167
+ function hl(e) {
5168
+ return pl(e) ? "allow" : dl(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
5146
5169
  }
5147
- function dl(e) {
5148
- return ul(e) === "block";
5170
+ function gl(e) {
5171
+ return hl(e) === "block";
5149
5172
  }
5150
- function fl(e) {
5151
- return ul(e) === "warn";
5173
+ function _l(e) {
5174
+ return hl(e) === "warn";
5152
5175
  }
5153
- function pl(e) {
5154
- if (!dl(e)) return null;
5155
- let t = ll(e);
5176
+ function vl(e) {
5177
+ if (!gl(e)) return null;
5178
+ let t = ml(e);
5156
5179
  return { validator: (e, n) => n === !0 ? Promise.reject(Error(t)) : Promise.resolve() };
5157
5180
  }
5158
- function ml(e, t = {}) {
5181
+ function yl(e, t = {}) {
5159
5182
  let n = t.tieBreak ?? "endDate", r = t.field ?? "startDate";
5160
5183
  for (let t of [n, r]) {
5161
5184
  let n = e?.[t];
@@ -5165,50 +5188,50 @@ function ml(e, t = {}) {
5165
5188
  }
5166
5189
  return null;
5167
5190
  }
5168
- function hl(e, t = {}) {
5191
+ function bl(e, t = {}) {
5169
5192
  let n = t.inProgressField ?? "currentStudyingHere";
5170
5193
  return !!e?.[n];
5171
5194
  }
5172
- function gl(e = [], t = {}) {
5195
+ function xl(e = [], t = {}) {
5173
5196
  let n = (t.direction ?? "desc") === "desc";
5174
5197
  return e.map((e, n) => ({
5175
5198
  index: n,
5176
- key: ml(e, t),
5177
- ongoing: t.inProgressFirst !== !1 && hl(e, t)
5199
+ key: yl(e, t),
5200
+ ongoing: t.inProgressFirst !== !1 && bl(e, t)
5178
5201
  })).slice().sort((e, t) => e.ongoing === t.ongoing ? e.key === null && t.key === null ? e.index - t.index : e.key === null ? 1 : t.key === null ? -1 : e.key === t.key ? e.index - t.index : n ? t.key - e.key : e.key - t.key : e.ongoing ? -1 : 1).map((e) => e.index);
5179
5202
  }
5180
- function _l(e, t, n = {}) {
5203
+ function Sl(e, t, n = {}) {
5181
5204
  if (!Array.isArray(e) || e.length < 2 || t == null || t < 0 || t >= e.length) return null;
5182
- let r = gl(e, n).indexOf(t);
5205
+ let r = xl(e, n).indexOf(t);
5183
5206
  return r === -1 || r === t ? null : {
5184
5207
  from: t,
5185
5208
  to: r,
5186
- reason: hl(e[t], n) ? "inProgress" : "outOfOrder"
5209
+ reason: bl(e[t], n) ? "inProgress" : "outOfOrder"
5187
5210
  };
5188
5211
  }
5189
- var vl = Object.freeze({
5212
+ var Cl = Object.freeze({
5190
5213
  inProgress: "You’ve marked this one as still ongoing, so it’s the most recent. Shall we move it to the top? This list reads best newest first.",
5191
5214
  outOfOrder: "These dates make this the most recent one. Shall we move it to the top? This list reads best newest first.",
5192
5215
  ok: "Yes, move it up",
5193
5216
  keep: "No, leave it here"
5194
5217
  });
5195
- function yl(e, t = {}) {
5218
+ function wl(e, t = {}) {
5196
5219
  let n = {
5197
- ...vl,
5220
+ ...Cl,
5198
5221
  ...t.messages ?? {}
5199
5222
  };
5200
5223
  return n[e] ?? n.outOfOrder;
5201
5224
  }
5202
- function bl(e, t = {}) {
5203
- let n = t.levelField ?? "qualification", r = ol(e?.[n]);
5225
+ function Tl(e, t = {}) {
5226
+ let n = t.levelField ?? "qualification", r = dl(e?.[n]);
5204
5227
  if (!r) return null;
5205
5228
  let i = t.levels ?? {}, a = i[r] ?? i[r.toLowerCase()] ?? i[r.toUpperCase()];
5206
- return Number.isFinite(Number(a)) ? Number(a) : xl(r, t);
5229
+ return Number.isFinite(Number(a)) ? Number(a) : El(r, t);
5207
5230
  }
5208
- function xl(e, t) {
5231
+ function El(e, t) {
5209
5232
  let n = Array.isArray(t?.levelPatterns) ? t.levelPatterns : [], r = e.toLowerCase();
5210
5233
  for (let e of n) {
5211
- let t = ol(e?.match);
5234
+ let t = dl(e?.match);
5212
5235
  if (!t) continue;
5213
5236
  let n;
5214
5237
  try {
@@ -5220,14 +5243,14 @@ function xl(e, t) {
5220
5243
  }
5221
5244
  return null;
5222
5245
  }
5223
- function Sl(e, t = {}) {
5224
- return ol((t?.levelLabels ?? {})[e]) || ol(e);
5246
+ function Dl(e, t = {}) {
5247
+ return dl((t?.levelLabels ?? {})[e]) || dl(e);
5225
5248
  }
5226
- function Cl(e = [], t = {}) {
5249
+ function Ol(e = [], t = {}) {
5227
5250
  if (!t || t.requireBelow === !1) return [];
5228
5251
  let n = t.levels ?? {}, r = t.requiredLevels ?? [];
5229
5252
  if (!r.length) return [];
5230
- let i = e.map((e) => bl(e, t)).filter((e) => e !== null);
5253
+ let i = e.map((e) => Tl(e, t)).filter((e) => e !== null);
5231
5254
  if (!i.length) return [];
5232
5255
  let a = Math.max(...i), o = [];
5233
5256
  return r.forEach((e) => {
@@ -5235,43 +5258,43 @@ function Cl(e = [], t = {}) {
5235
5258
  Number.isFinite(r) && (r >= a || i.includes(r) || o.push(t));
5236
5259
  }), o;
5237
5260
  }
5238
- function wl(e, t = {}) {
5239
- let n = Cl(e, t);
5261
+ function kl(e, t = {}) {
5262
+ let n = Ol(e, t);
5240
5263
  if (!n.length) return "";
5241
- let r = n.map((e) => Sl(e, t)).join(", ");
5264
+ let r = n.map((e) => Dl(e, t)).join(", ");
5242
5265
  return (t.message || "You’ve added a higher qualification but not the {missing} below it. Please add that too.").replace("{missing}", r);
5243
5266
  }
5244
- async function Tl({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
5267
+ async function Al({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
5245
5268
  let a = e?.orderBy;
5246
5269
  if (!a || a.confirmMove === !1 || typeof r != "function") return !1;
5247
- let o = _l(t, n, a);
5270
+ let o = Sl(t, n, a);
5248
5271
  if (!o) return !1;
5249
5272
  let s = {
5250
- ...vl,
5273
+ ...Cl,
5251
5274
  ...a.messages ?? {}
5252
5275
  };
5253
5276
  return await i({
5254
5277
  reason: o.reason,
5255
5278
  title: o.reason === "inProgress" ? "This looks like the most recent one" : "These dates make this the most recent one",
5256
- body: yl(o.reason, a),
5279
+ body: wl(o.reason, a),
5257
5280
  okText: s.ok,
5258
5281
  cancelText: s.keep,
5259
5282
  from: o.from,
5260
5283
  to: o.to
5261
5284
  }) ? (r(o.from, o.to), !0) : !1;
5262
5285
  }
5263
- function El(e, t) {
5264
- let n = sl(e, t), r = n?.orderBy?.inProgressField;
5286
+ function jl(e, t) {
5287
+ let n = fl(e, t), r = n?.orderBy?.inProgressField;
5265
5288
  return r ? {
5266
5289
  name: n.name,
5267
5290
  label: n.label ?? n.name,
5268
5291
  rowsKey: n.payloadKey || n.name,
5269
5292
  inProgressField: r,
5270
- severity: ul(n),
5271
- message: ll(n)
5293
+ severity: hl(n),
5294
+ message: ml(n)
5272
5295
  } : null;
5273
5296
  }
5274
- function Dl(e = [], t, n) {
5297
+ function Ml(e = [], t, n) {
5275
5298
  if (!n) return {
5276
5299
  severity: "allow",
5277
5300
  message: "",
@@ -5279,8 +5302,8 @@ function Dl(e = [], t, n) {
5279
5302
  };
5280
5303
  let r = null;
5281
5304
  for (let i of e) {
5282
- let e = El(i, t);
5283
- if (!(!e || e.severity === "allow") && Ol(n, e.rowsKey).some((t) => hl(t, e))) {
5305
+ let e = jl(i, t);
5306
+ if (!(!e || e.severity === "allow") && Nl(n, e.rowsKey).some((t) => bl(t, e))) {
5284
5307
  if (e.severity === "block") return {
5285
5308
  severity: "block",
5286
5309
  message: e.message,
@@ -5299,23 +5322,23 @@ function Dl(e = [], t, n) {
5299
5322
  group: null
5300
5323
  };
5301
5324
  }
5302
- function Ol(e, t) {
5325
+ function Nl(e, t) {
5303
5326
  let n = e?.[t];
5304
5327
  return Array.isArray(n) ? n : Array.isArray(n?.rows) ? n.rows : [];
5305
5328
  }
5306
- function kl(e) {
5329
+ function Pl(e) {
5307
5330
  return String(e?.severity ?? "").toLowerCase() === "block" ? "block" : "warn";
5308
5331
  }
5309
- function Al(e = [], t = {}) {
5332
+ function Fl(e = [], t = {}) {
5310
5333
  let n = null;
5311
5334
  for (let r of e) {
5312
5335
  let e = r?.levelRule;
5313
5336
  if (!e) continue;
5314
- let i = jl(t, r);
5337
+ let i = Il(t, r);
5315
5338
  if (!i.length) continue;
5316
- let a = wl(i, e);
5339
+ let a = kl(i, e);
5317
5340
  if (a) {
5318
- if (kl(e) === "block") return {
5341
+ if (Pl(e) === "block") return {
5319
5342
  severity: "block",
5320
5343
  message: a,
5321
5344
  group: r
@@ -5333,7 +5356,7 @@ function Al(e = [], t = {}) {
5333
5356
  group: null
5334
5357
  };
5335
5358
  }
5336
- function jl(e, t) {
5359
+ function Il(e, t) {
5337
5360
  for (let n of [t?.name, t?.payloadKey]) {
5338
5361
  if (!n) continue;
5339
5362
  let t = e?.[n];
@@ -5343,10 +5366,10 @@ function jl(e, t) {
5343
5366
  }
5344
5367
  //#endregion
5345
5368
  //#region src/components/form/clearGroupOnChange.js
5346
- function Ml(e, t) {
5369
+ function Ll(e, t) {
5347
5370
  return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), t] : [t];
5348
5371
  }
5349
- function Nl(e, t) {
5372
+ function Rl(e, t) {
5350
5373
  let n = e?.field, r = [];
5351
5374
  e?.clearGroupOnChange && (t instanceof Set ? [...t] : t ?? []).forEach((e) => {
5352
5375
  e && e !== n && r.push(e);
@@ -5356,24 +5379,24 @@ function Nl(e, t) {
5356
5379
  e && e !== n && r.push(e);
5357
5380
  }) : typeof i == "string" && i.trim() && i.trim() !== n && r.push(i.trim()), [...new Set(r)];
5358
5381
  }
5359
- function Pl(e, t, n, r) {
5360
- let i = Nl(t, r).map((e) => Ml(n, e));
5382
+ function zl(e, t, n, r) {
5383
+ let i = Rl(t, r).map((e) => Ll(n, e));
5361
5384
  return i.forEach((t) => e.setFieldValue(t, null)), i;
5362
5385
  }
5363
5386
  //#endregion
5364
5387
  //#region src/components/form/resolveStoredOptions.js
5365
- function Fl(e) {
5388
+ function Bl(e) {
5366
5389
  return (Array.isArray(e) ? e : [e]).map((e) => e && typeof e == "object" ? e.value ?? e.key ?? e.id : e).filter((e) => e != null && e !== "");
5367
5390
  }
5368
- function Il(e, t = []) {
5391
+ function Vl(e, t = []) {
5369
5392
  let n = new Set((t ?? []).map((e) => String(e?.value))), r = [];
5370
- for (let t of Fl(e)) {
5393
+ for (let t of Bl(e)) {
5371
5394
  let e = String(t);
5372
5395
  !n.has(e) && !r.includes(e) && r.push(e);
5373
5396
  }
5374
5397
  return r;
5375
5398
  }
5376
- async function Ll(e, t) {
5399
+ async function Hl(e, t) {
5377
5400
  if (!e?.lookupCollection || !t?.length) return [];
5378
5401
  let n = new URLSearchParams({
5379
5402
  collection: e.lookupCollection,
@@ -5385,7 +5408,7 @@ async function Ll(e, t) {
5385
5408
  let r = await a(s, `/admin/lookup-dropdown-values?${n}`), i = r?.data ?? r ?? [];
5386
5409
  return Array.isArray(i) ? i : [];
5387
5410
  }
5388
- function Rl(e = [], t = []) {
5411
+ function Ul(e = [], t = []) {
5389
5412
  if (!t.length) return e;
5390
5413
  let n = new Set((e ?? []).map((e) => String(e?.value))), r = t.filter((e) => !n.has(String(e?.value))).map((e) => ({
5391
5414
  ...e,
@@ -5395,25 +5418,25 @@ function Rl(e = [], t = []) {
5395
5418
  }
5396
5419
  //#endregion
5397
5420
  //#region src/components/form/requireAnyOf.js
5398
- var zl = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || e === !1;
5399
- function Bl(e) {
5421
+ var Wl = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || e === !1;
5422
+ function Gl(e) {
5400
5423
  let t = e?.requireAnyOf;
5401
5424
  return Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim() !== "") : [];
5402
5425
  }
5403
- function Vl(e) {
5404
- return !e || typeof e != "object" ? !1 : Object.values(e).some((e) => !zl(e));
5426
+ function Kl(e) {
5427
+ return !e || typeof e != "object" ? !1 : Object.values(e).some((e) => !Wl(e));
5405
5428
  }
5406
- function Hl({ field: e, getRow: t }) {
5407
- let n = Bl(e);
5429
+ function ql({ field: e, getRow: t }) {
5430
+ let n = Gl(e);
5408
5431
  if (n.length === 0 || !n.includes(e?.field)) return;
5409
5432
  let r = e.requireAnyOfMessage || `Select at least one of ${n.join(", ")}.`;
5410
5433
  return { validator: async () => {
5411
5434
  let e = t?.() ?? {};
5412
- return Vl(e) ? n.some((t) => !zl(e[t])) ? Promise.resolve() : Promise.reject(Error(r)) : Promise.resolve();
5435
+ return Kl(e) ? n.some((t) => !Wl(e[t])) ? Promise.resolve() : Promise.reject(Error(r)) : Promise.resolve();
5413
5436
  } };
5414
5437
  }
5415
- function Ul(e, t = []) {
5416
- let n = Bl(e);
5438
+ function Jl(e, t = []) {
5439
+ let n = Gl(e);
5417
5440
  return n.length === 0 ? t : t.map((t) => n.includes(t?.field) ? {
5418
5441
  ...t,
5419
5442
  requireAnyOf: n,
@@ -5422,8 +5445,8 @@ function Ul(e, t = []) {
5422
5445
  }
5423
5446
  //#endregion
5424
5447
  //#region src/components/form/dateRules.js
5425
- var Wl = (e) => e == null || e === "";
5426
- function Gl(e) {
5448
+ var Yl = (e) => e == null || e === "";
5449
+ function Xl(e) {
5427
5450
  if (!e) return null;
5428
5451
  if (typeof e.valueOf == "function") {
5429
5452
  let t = e.valueOf();
@@ -5437,12 +5460,12 @@ function $(e) {
5437
5460
  let t = T(e);
5438
5461
  return t.isValid() ? t.startOf("day").valueOf() : null;
5439
5462
  }
5440
- function Kl(e) {
5463
+ function Zl(e) {
5441
5464
  if (!e) return null;
5442
5465
  let t = T(e);
5443
5466
  return t.isValid() ? t.hour() * 60 + t.minute() : null;
5444
5467
  }
5445
- var ql = {
5468
+ var Ql = {
5446
5469
  d: "day",
5447
5470
  day: "day",
5448
5471
  days: "day",
@@ -5458,13 +5481,13 @@ var ql = {
5458
5481
  year: "year",
5459
5482
  years: "year"
5460
5483
  };
5461
- function Jl(e) {
5484
+ function $l(e) {
5462
5485
  if (e == null || e === "") return null;
5463
5486
  if (typeof e == "object" && !Array.isArray(e)) {
5464
5487
  let t = Number(e.value ?? e.count ?? e.amount);
5465
5488
  return !Number.isFinite(t) || t <= 0 ? null : {
5466
5489
  value: t,
5467
- unit: ql[String(e.unit ?? "month").toLowerCase()] ?? "month"
5490
+ unit: Ql[String(e.unit ?? "month").toLowerCase()] ?? "month"
5468
5491
  };
5469
5492
  }
5470
5493
  let t = String(e).trim().toLowerCase();
@@ -5474,49 +5497,49 @@ function Jl(e) {
5474
5497
  let r = Number(n[1]);
5475
5498
  return !Number.isFinite(r) || r <= 0 ? null : {
5476
5499
  value: r,
5477
- unit: ql[n[2]] ?? "month"
5500
+ unit: Ql[n[2]] ?? "month"
5478
5501
  };
5479
5502
  }
5480
- function Yl(e, t) {
5503
+ function eu(e, t) {
5481
5504
  let n = e?.minGapFrom ?? e?.gapFrom;
5482
5505
  if (n && typeof t == "function") {
5483
- let e = Jl(t(n));
5506
+ let e = $l(t(n));
5484
5507
  if (e) return e;
5485
5508
  }
5486
- return Jl(e?.minGap);
5509
+ return $l(e?.minGap);
5487
5510
  }
5488
- function Xl(e, t, n, r) {
5511
+ function tu(e, t, n, r) {
5489
5512
  if (t === null) return null;
5490
- let i = Yl(n, r), a = T(t);
5513
+ let i = eu(n, r), a = T(t);
5491
5514
  return i && (a = e === "dateAfterField" ? a.add(i.value, i.unit) : a.subtract(i.value, i.unit)), a.startOf("day").valueOf();
5492
5515
  }
5493
- function Zl(e, t, n, r, i) {
5516
+ function nu(e, t, n, r, i) {
5494
5517
  if (t === null || n === null) return !1;
5495
- let a = Xl(e, n, r, i);
5518
+ let a = tu(e, n, r, i);
5496
5519
  if (a === null) return !1;
5497
- let o = !!r?.strict && !Yl(r, i);
5520
+ let o = !!r?.strict && !eu(r, i);
5498
5521
  return e === "dateAfterField" ? o ? t <= a : t < a : o ? t >= a : t > a;
5499
5522
  }
5500
- function Ql(e, t, n, r) {
5523
+ function ru(e, t, n, r) {
5501
5524
  if (n?.message) return n.message;
5502
- let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = Yl(n, r);
5525
+ let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = eu(n, r);
5503
5526
  if (a) {
5504
5527
  let n = a.value === 1 ? a.unit : `${a.unit}s`;
5505
5528
  return e === "dateAfterField" ? `${t} must be at least ${a.value} ${n} after ${i}` : `${t} must be at least ${a.value} ${n} before ${i}`;
5506
5529
  }
5507
5530
  return n?.strict ? e === "dateAfterField" ? `${t} must be after ${i}` : `${t} must be before ${i}` : e === "dateAfterField" ? `${t} must be on or after ${i}` : `${t} must be on or before ${i}`;
5508
5531
  }
5509
- function $l({ type: e, label: t, rule: n, readSibling: r }) {
5532
+ function iu({ type: e, label: t, rule: n, readSibling: r }) {
5510
5533
  return { validator: async (i, a) => {
5511
5534
  let o = n?.value ?? n?.compareField ?? n?.field;
5512
- if (!o || Wl(a)) return Promise.resolve();
5535
+ if (!o || Yl(a)) return Promise.resolve();
5513
5536
  let s = r(o);
5514
- if (Wl(s)) return Promise.resolve();
5537
+ if (Yl(s)) return Promise.resolve();
5515
5538
  let c = $(a), l = $(s);
5516
- return c === null || l === null ? Promise.resolve() : Zl(e, c, l, n, r) ? Promise.reject(Error(Ql(e, t, n, r))) : Promise.resolve();
5539
+ return c === null || l === null ? Promise.resolve() : nu(e, c, l, n, r) ? Promise.reject(Error(ru(e, t, n, r))) : Promise.resolve();
5517
5540
  } };
5518
5541
  }
5519
- function eu(e, t, { rows: n, rowIndex: r } = {}) {
5542
+ function au(e, t, { rows: n, rowIndex: r } = {}) {
5520
5543
  if (e === null || !t || !Array.isArray(n) || r == null || (t.mode ?? "newestFirst") !== "newestFirst") return !1;
5521
5544
  let i = t.startField ?? "startDate", a = t.endField ?? "endDate", o = n[r - 1];
5522
5545
  if (o) {
@@ -5530,11 +5553,11 @@ function eu(e, t, { rows: n, rowIndex: r } = {}) {
5530
5553
  }
5531
5554
  return !1;
5532
5555
  }
5533
- function tu(e, t = "above", n = void 0) {
5556
+ function ou(e, t = "above", n = void 0) {
5534
5557
  let r = e?.messages ?? {}, i = t === "below";
5535
5558
  return (n === "start" ? i ? r.belowStart : r.aboveStart : n === "end" ? i ? r.belowEnd : r.aboveEnd : void 0) || (i ? r.below || "Start date must be after the end date of the entry below it." : n === "end" ? r.above || "End date must be before the start date of the entry above it." : r.above || "This period overlaps the entry above it. Please adjust the dates.");
5536
5559
  }
5537
- function nu({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = rr }) {
5560
+ function su({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = rr }) {
5538
5561
  let a = e?.validations ?? e?.validation ?? e?.rules ?? [], o = [];
5539
5562
  for (let e of a) {
5540
5563
  let n = typeof e == "string" ? { type: e } : e, r = n?.type;
@@ -5548,17 +5571,17 @@ function nu({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = rr }) {
5548
5571
  o.push((i) => {
5549
5572
  if (!i) return !1;
5550
5573
  let a = t(e);
5551
- return !Wl(a) && Zl(r, $(i), $(a), n, t);
5574
+ return !Yl(a) && nu(r, $(i), $(a), n, t);
5552
5575
  });
5553
5576
  }
5554
5577
  }
5555
- return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? eu($(t), e.rowHierarchy, {
5578
+ return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? au($(t), e.rowHierarchy, {
5556
5579
  rows: n,
5557
5580
  rowIndex: r
5558
5581
  }) : !1), o.length ? (e) => o.some((t) => t(e)) : void 0;
5559
5582
  }
5560
- function ru(e, t = rr, n = void 0) {
5561
- if (!Wl(n) && $(n) !== null) return;
5583
+ function cu(e, t = rr, n = void 0) {
5584
+ if (!Yl(n) && $(n) !== null) return;
5562
5585
  let r = e?.validations ?? e?.validation ?? e?.rules ?? [];
5563
5586
  for (let e of r) {
5564
5587
  let n = typeof e == "string" ? { type: e } : e;
@@ -5566,7 +5589,7 @@ function ru(e, t = rr, n = void 0) {
5566
5589
  if (n?.type === "noFutureDate" || n?.type === "noPastDate") return t();
5567
5590
  }
5568
5591
  }
5569
- function iu({ field: e, name: t, rows: n }) {
5592
+ function lu({ field: e, name: t, rows: n }) {
5570
5593
  if (!Array.isArray(t) || t.length === 0) return [];
5571
5594
  let r = t[t.length - 1], i = t.length >= 3 && typeof t[1] == "number", a = /* @__PURE__ */ new Set(), o = e?.validations ?? e?.validation ?? e?.rules ?? [];
5572
5595
  for (let e of o) {
@@ -5595,44 +5618,44 @@ function iu({ field: e, name: t, rows: n }) {
5595
5618
  ]));
5596
5619
  return u;
5597
5620
  }
5598
- function au({ field: e, rows: t, rowIndex: n }) {
5621
+ function uu({ field: e, rows: t, rowIndex: n }) {
5599
5622
  let r = e?.rowHierarchy;
5600
5623
  return { validator: async (i, a) => {
5601
- if (!r || Wl(a) || !Array.isArray(t) || n == null) return Promise.resolve();
5624
+ if (!r || Yl(a) || !Array.isArray(t) || n == null) return Promise.resolve();
5602
5625
  let o = $(a);
5603
- if (o === null || !eu(o, r, {
5626
+ if (o === null || !au(o, r, {
5604
5627
  rows: t,
5605
5628
  rowIndex: n
5606
5629
  })) return Promise.resolve();
5607
5630
  let s = r.startField ?? "startDate", c = t[n - 1], l = c ? $(c[s]) : null, u = l !== null && o >= l ? "above" : "below", d = r.endField ?? "endDate", f = e?.field, p = f === s ? "start" : f === d ? "end" : void 0;
5608
- return Promise.reject(Error(tu(r, u, p)));
5631
+ return Promise.reject(Error(ou(r, u, p)));
5609
5632
  } };
5610
5633
  }
5611
5634
  //#endregion
5612
5635
  //#region src/utils/submitMessages.js
5613
- function ou(e) {
5636
+ function du(e) {
5614
5637
  return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
5615
5638
  }
5616
- function su(e) {
5639
+ function fu(e) {
5617
5640
  let t = String(e ?? "").trim();
5618
5641
  return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
5619
5642
  }
5620
- function cu(e, t) {
5621
- return String(e).replaceAll("${module}", su(t)).replaceAll("${moduleName}", su(t));
5643
+ function pu(e, t) {
5644
+ return String(e).replaceAll("${module}", fu(t)).replaceAll("${moduleName}", fu(t));
5622
5645
  }
5623
- function lu(e, t, n) {
5624
- let r = ou(e);
5646
+ function mu(e, t, n) {
5647
+ let r = du(e);
5625
5648
  if (r?.suppress) return null;
5626
5649
  let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
5627
- return i && String(i).trim() ? cu(i, t) : n === "edit" ? `${su(t)} has Updated successfully` : `${su(t)} has added successfully`;
5650
+ return i && String(i).trim() ? pu(i, t) : n === "edit" ? `${fu(t)} has Updated successfully` : `${fu(t)} has added successfully`;
5628
5651
  }
5629
- function uu(e, t, n, r) {
5630
- let i = ou(e), a = n === "edit" ? i?.editError : i?.addError;
5631
- return a && String(a).trim() ? cu(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${su(t)}` : `Failed to create ${su(t)}`;
5652
+ function hu(e, t, n, r) {
5653
+ let i = du(e), a = n === "edit" ? i?.editError : i?.addError;
5654
+ return a && String(a).trim() ? pu(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${fu(t)}` : `Failed to create ${fu(t)}`;
5632
5655
  }
5633
5656
  //#endregion
5634
5657
  //#region src/utils/scrollToFirstFormError.js
5635
- function du({ errorFields: e } = {}, t, { root: n = document } = {}) {
5658
+ function gu({ errorFields: e } = {}, t, { root: n = document } = {}) {
5636
5659
  if (!e?.length) return;
5637
5660
  let r = e[0]?.name;
5638
5661
  setTimeout(() => {
@@ -5657,10 +5680,10 @@ function du({ errorFields: e } = {}, t, { root: n = document } = {}) {
5657
5680
  }
5658
5681
  //#endregion
5659
5682
  //#region src/components/form/conditionalFieldLabel.js
5660
- function fu(e) {
5683
+ function _u(e) {
5661
5684
  return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
5662
5685
  }
5663
- function pu(e, t) {
5686
+ function vu(e, t) {
5664
5687
  if (!e?.field) return !1;
5665
5688
  switch (e.operator ?? "eq") {
5666
5689
  case "eq": return String(t ?? "") === String(e.value ?? "");
@@ -5668,58 +5691,58 @@ function pu(e, t) {
5668
5691
  case "truthy": return t != null && t !== "" && t !== !1;
5669
5692
  case "falsy": return t == null || t === "" || t === !1;
5670
5693
  case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
5671
- case "in": return fu(e.value).includes(String(t ?? ""));
5672
- case "notIn": return !fu(e.value).includes(String(t ?? ""));
5694
+ case "in": return _u(e.value).includes(String(t ?? ""));
5695
+ case "notIn": return !_u(e.value).includes(String(t ?? ""));
5673
5696
  default: return !1;
5674
5697
  }
5675
5698
  }
5676
- function mu(e, t, n = !1) {
5699
+ function yu(e, t, n = !1) {
5677
5700
  let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
5678
- return pu(i, t) && i?.label ? i.label : r;
5701
+ return vu(i, t) && i?.label ? i.label : r;
5679
5702
  }
5680
- function hu(e) {
5703
+ function bu(e) {
5681
5704
  return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
5682
5705
  }
5683
- function gu(e, t) {
5684
- let n = hu(e);
5706
+ function xu(e, t) {
5707
+ let n = bu(e);
5685
5708
  if (!n.length) return !0;
5686
- let r = n.map((e) => pu(e, t(e.field)));
5709
+ let r = n.map((e) => vu(e, t(e.field)));
5687
5710
  return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
5688
5711
  }
5689
- function _u(e) {
5712
+ function Su(e) {
5690
5713
  let t = e?.colWhen;
5691
5714
  return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
5692
5715
  }
5693
- function vu(e, t, n) {
5694
- for (let t of _u(e)) if (pu(t, n(t))) return Number(t.col);
5716
+ function Cu(e, t, n) {
5717
+ for (let t of Su(e)) if (vu(t, n(t))) return Number(t.col);
5695
5718
  return t;
5696
5719
  }
5697
- function yu(e, t) {
5720
+ function wu(e, t) {
5698
5721
  return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
5699
5722
  }
5700
5723
  //#endregion
5701
5724
  //#region src/components/form/conditionalRequired.js
5702
- function bu(e, t) {
5725
+ function Tu(e, t) {
5703
5726
  return (n) => {
5704
5727
  if (!e || !n) return;
5705
5728
  let r = Array.isArray(t) && t.length > 1 ? [...t.slice(0, -1), n] : [n], i = e.getFieldValue(r);
5706
5729
  return i === void 0 ? e.getFieldValue([n]) : i;
5707
5730
  };
5708
5731
  }
5709
- function xu(e, t, n) {
5732
+ function Eu(e, t, n) {
5710
5733
  let r = e?.requiredWhen;
5711
- return !r || !t || !r.field && !(r.conditions ?? []).some((e) => e?.field) ? !1 : gu(r, bu(t, n));
5734
+ return !r || !t || !r.field && !(r.conditions ?? []).some((e) => e?.field) ? !1 : xu(r, Tu(t, n));
5712
5735
  }
5713
- function Su(e, t, n) {
5736
+ function Du(e, t, n) {
5714
5737
  return { validator: (r, i) => {
5715
- if (!xu(e, t, n) || !(i == null || i === "" || Array.isArray(i) && i.length === 0)) return Promise.resolve();
5738
+ if (!Eu(e, t, n) || !(i == null || i === "" || Array.isArray(i) && i.length === 0)) return Promise.resolve();
5716
5739
  let a = e?.label ?? e?.field ?? "This field";
5717
5740
  return Promise.reject(Error(e?.requiredWhen?.message ?? `${a} is required`));
5718
5741
  } };
5719
5742
  }
5720
5743
  //#endregion
5721
5744
  //#region src/components/Breadcrumb.jsx
5722
- function Cu({ items: e = [] }) {
5745
+ function Ou({ items: e = [] }) {
5723
5746
  let t = e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(kr, {
5724
5747
  variant: "body",
5725
5748
  weight: "medium",
@@ -5737,34 +5760,34 @@ function Cu({ items: e = [] }) {
5737
5760
  }
5738
5761
  //#endregion
5739
5762
  //#region src/components/form/canonicalOption.js
5740
- var wu = (e) => String(e ?? "").trim().replace(/\s+/g, " ").toLowerCase();
5741
- function Tu(e = []) {
5763
+ var ku = (e) => String(e ?? "").trim().replace(/\s+/g, " ").toLowerCase();
5764
+ function Au(e = []) {
5742
5765
  let t = /* @__PURE__ */ new Map();
5743
5766
  for (let n of e) {
5744
5767
  if (n == null) continue;
5745
5768
  let e = typeof n == "object" ? n.value : n;
5746
5769
  if (e != null && e !== "") for (let r of [n?.label, e]) {
5747
- let n = wu(r);
5770
+ let n = ku(r);
5748
5771
  n && !t.has(n) && t.set(n, e);
5749
5772
  }
5750
5773
  }
5751
5774
  return t;
5752
5775
  }
5753
- function Eu(e, t) {
5776
+ function ju(e, t) {
5754
5777
  if (!Array.isArray(e)) {
5755
- let n = Eu([e], t);
5778
+ let n = ju([e], t);
5756
5779
  return n.length ? n[0] : e;
5757
5780
  }
5758
- let n = Tu(t), r = /* @__PURE__ */ new Set(), i = [];
5781
+ let n = Au(t), r = /* @__PURE__ */ new Set(), i = [];
5759
5782
  for (let t of e) {
5760
- let e = typeof t == "object" && t ? t.value : t, a = n.get(wu(e)) ?? e, o = wu(a);
5783
+ let e = typeof t == "object" && t ? t.value : t, a = n.get(ku(e)) ?? e, o = ku(a);
5761
5784
  o && r.has(o) || (o && r.add(o), i.push(a));
5762
5785
  }
5763
5786
  return i;
5764
5787
  }
5765
5788
  //#endregion
5766
5789
  //#region src/components/form/dependencyBusy.js
5767
- function Du(e, t = []) {
5790
+ function Mu(e, t = []) {
5768
5791
  if (!e) return [];
5769
5792
  let n = /* @__PURE__ */ new Set();
5770
5793
  for (let r of t) for (let t of r?.fields ?? []) if (t?.field) {
@@ -5774,16 +5797,16 @@ function Du(e, t = []) {
5774
5797
  }
5775
5798
  return n.delete(e), [...n];
5776
5799
  }
5777
- function Ou(e, t = []) {
5778
- return e?.blockWhileResolving ? Du(e.field, t).length > 0 : !1;
5800
+ function Nu(e, t = []) {
5801
+ return e?.blockWhileResolving ? Mu(e.field, t).length > 0 : !1;
5779
5802
  }
5780
- function ku(e) {
5803
+ function Pu(e) {
5781
5804
  let t = String(e?.label ?? "").trim();
5782
5805
  return t ? `Applying ${t}…` : "Applying your selection…";
5783
5806
  }
5784
- function Au(e, t = []) {
5807
+ function Fu(e, t = []) {
5785
5808
  if (!e?.field) return [];
5786
- let n = new Set(Du(e.field, t));
5809
+ let n = new Set(Mu(e.field, t));
5787
5810
  if (n.size === 0) return [];
5788
5811
  let r = [];
5789
5812
  for (let e of t) {
@@ -5792,19 +5815,19 @@ function Au(e, t = []) {
5792
5815
  }
5793
5816
  return r;
5794
5817
  }
5795
- function ju(e) {
5818
+ function Iu(e) {
5796
5819
  return String(e?.blockScope ?? "").toLowerCase() === "group";
5797
5820
  }
5798
5821
  //#endregion
5799
5822
  //#region src/components/form/LinkedRecordFileField.jsx
5800
- var Mu = d(() => import("./index.js").then((e) => e.n)), Nu = d(() => import("./DocumentViewer-DSxsilzL.js").then((e) => e.n));
5801
- function Pu(e) {
5823
+ var Lu = d(() => import("./index.js").then((e) => e.n)), Ru = d(() => import("./DocumentViewer-DSxsilzL.js").then((e) => e.n));
5824
+ function zu(e) {
5802
5825
  let t = String(e ?? "").split(".").pop()?.toLowerCase();
5803
5826
  return C(t === "pdf" ? ue : t === "doc" || t === "docx" ? fe : le, { className: "v1-file-chip__icon" });
5804
5827
  }
5805
- function Fu({ field: e, recordMeta: t }) {
5828
+ function Bu({ field: e, recordMeta: t }) {
5806
5829
  let n = e?.linkedModule, r = e?.linkedFileField, i = m(() => {
5807
- let r = fc(n, t);
5830
+ let r = _c(n, t);
5808
5831
  if (r) return r;
5809
5832
  let i = e?.linkedIdField, a = i ? t?.[i] : "";
5810
5833
  return a ? String(a) : "";
@@ -5866,7 +5889,7 @@ function Fu({ field: e, recordMeta: t }) {
5866
5889
  onClick: () => y && c(!0),
5867
5890
  title: y ? `Preview or download ${v.name}` : ie,
5868
5891
  children: [
5869
- y ? Pu(v.name) : /* @__PURE__ */ C(le, { className: "v1-file-chip__icon" }),
5892
+ y ? zu(v.name) : /* @__PURE__ */ C(le, { className: "v1-file-chip__icon" }),
5870
5893
  /* @__PURE__ */ C("span", {
5871
5894
  className: "v1-file-chip__name",
5872
5895
  children: y ? v.name : ie
@@ -5890,7 +5913,7 @@ function Fu({ field: e, recordMeta: t }) {
5890
5913
  }),
5891
5914
  s && te && /* @__PURE__ */ C(u, {
5892
5915
  fallback: null,
5893
- children: /* @__PURE__ */ C(Nu, {
5916
+ children: /* @__PURE__ */ C(Ru, {
5894
5917
  open: s,
5895
5918
  onClose: () => c(!1),
5896
5919
  documents: [te]
@@ -5921,7 +5944,7 @@ function Fu({ field: e, recordMeta: t }) {
5921
5944
  },
5922
5945
  children: /* @__PURE__ */ C(ne, {})
5923
5946
  }),
5924
- children: /* @__PURE__ */ C(Mu, {
5947
+ children: /* @__PURE__ */ C(Lu, {
5925
5948
  moduleName: n,
5926
5949
  recordId: i,
5927
5950
  embedded: !0,
@@ -5935,7 +5958,7 @@ function Fu({ field: e, recordMeta: t }) {
5935
5958
  })
5936
5959
  ] });
5937
5960
  }
5938
- Fu.propTypes = {
5961
+ Bu.propTypes = {
5939
5962
  field: E.shape({
5940
5963
  label: E.string,
5941
5964
  linkedModule: E.string,
@@ -5947,8 +5970,8 @@ Fu.propTypes = {
5947
5970
  reuploadWarning: E.string
5948
5971
  }).isRequired,
5949
5972
  recordMeta: E.object
5950
- }, Fu.defaultProps = { recordMeta: void 0 };
5973
+ }, Bu.defaultProps = { recordMeta: void 0 };
5951
5974
  //#endregion
5952
- export { Bc as $, ir as $n, vt as $r, po as $t, Ll as A, Vt as Ai, li as An, In as Ar, xs as At, Al as B, Lt as Bi, Gr as Bn, kt as Br, Yo as Bt, ru as C, gt as Ci, Ti as Cn, kn as Cr, Ls as Ct, iu as D, Be as Di, mi as Dn, xt as Dr, Ns as Dt, Wl as E, bt as Ei, pi as En, Tn as Er, Ms as Et, El as F, wn as Fi, ai as Fn, qt as Fr, us as Ft, nl as G, Kt as Gi, kr as Gn, ht as Gr, ko as Gt, sl as H, An as Hi, Lr as Hn, cn as Hr, qo as Ht, cl as I, hn as Ii, ei as In, Ye as Ir, ys as It, qc as J, rr as Jn, Sn as Jr, J as Jt, Zc as K, an as Ki, L as Kn, _t as Kr, Oo as Kt, dl as L, dn as Li, $r as Ln, Je as Lr, Xo as Lt, Il as M, pt as Mi, ni as Mn, ze as Mr, ms as Mt, Pl as N, St as Ni, ui as Nn, jn as Nr, ps as Nt, Ul as O, rn as Oi, fi as On, gn as Or, Ts as Ot, pl as P, Qe as Pi, ii as Pn, at as Pr, is as Pt, Vc as Q, hr as Qn, yt as Qr, no as Qt, ll as R, Fn as Ri, Qr as Rn, ut as Rr, $o as Rt, au as S, dt as Si, Bi as Sn, Yt as Sr, zs as St, Kl as T, ct as Ti, ki as Tn, ft as Tr, X as Tt, al as U, At as Ui, Ir as Un, on as Ur, Go as Ut, Tl as V, bn as Vi, qr as Vn, Ut as Vr, Jo as Vt, tl as W, Ht as Wi, Fr as Wn, Ve as Wr, Ko as Wt, Kc as X, cr as Xn, st as Xr, to as Xt, Xc as Y, ar as Yn, rt as Yr, yo as Yt, Wc as Z, F as Zn, Gt as Zr, eo as Zt, du as _, Jt as _i, va as _n, Ze as _r, ac as _t, Ou as a, Nn as ai, za as an, Qn as ar, wc as at, nu as b, tn as bi, Pi as bn, un as br, nc as bt, xu as c, nn as ci, q as cn, Gn as cr, fc as ct, yu as d, M as di, Aa as dn, Rn as dr, mc as dt, Ct as ei, _o as en, fr as er, Ec as et, pu as f, Mt as fi, sa as fn, Bn as fr, vc as ft, hu as g, Pt as gi, Ia as gn, wt as gr, oc as gt, vu as h, On as hi, wa as hn, tt as hr, sc as ht, ku as i, ln as ii, Wa as in, Yn as ir, Sc as it, Rl as j, Wt as ji, ri as jn, Zt as jr, bs as jt, Hl as k, Re as ki, di as kn, fn as kr, Os as kt, Su as l, Xe as li, ja as ln, Jn as lr, hc as lt, gu as m, yn as mi, K as mn, Vn as mr, lc as mt, ju as n, $t as ni, $a as nn, Hn as nr, kc as nt, Eu as o, Ie as oi, Ba as on, P as or, yc as ot, mu as p, Nt as pi, V as pn, zn as pr, _c as pt, el as q, I as qn, sn as qr, So as qt, Au as r, pn as ri, Ua as rn, Xn as rr, xc as rt, Cu as s, He as si, Va as sn, $n as sr, pc as st, Fu as t, Qt as ti, Ya as tn, or as tr, Ac as tt, _u as u, Bt as ui, La as un, Ln as ur, gc as ut, uu as v, Le as vi, _a as vn, Cn as vr, ic as vt, Gl as w, it as wi, Ai as wn, $e as wr, Fs as wt, $l as x, et as xi, Ri as xn, Pn as xr, ec as xt, lu as y, en as yi, qi as yn, mn as yr, rc as yt, Dl as z, Xt as zi, Wr as zn, Et as zr, Qo as zt };
5975
+ export { Gc as $, ar as $n, rt as $r, yo as $t, Hl as A, bt as Ai, pi as An, Tn as Ar, Ms as At, Fl as B, hn as Bi, ei as Bn, Ye as Br, ys as Bt, cu as C, en as Ci, qi as Cn, mn as Cr, Qs as Ct, lu as D, gt as Di, Ti as Dn, kn as Dr, Ls as Dt, Yl as E, dt as Ei, Bi as En, Yt as Er, zs as Et, jl as F, Wt as Fi, ri as Fn, Zt as Fr, bs as Ft, sl as G, bn as Gi, qr as Gn, Ut as Gr, Jo as Gt, fl as H, Fn as Hi, Qr as Hn, ut as Hr, $o as Ht, pl as I, pt as Ii, ni as In, ze as Ir, ms as It, Qc as J, Ht as Ji, Fr as Jn, Ve as Jr, Ko as Jt, nl as K, An as Ki, Lr as Kn, cn as Kr, qo as Kt, gl as L, St as Li, ui as Ln, jn as Lr, ps as Lt, Vl as M, rn as Mi, fi as Mn, gn as Mr, Ts as Mt, zl as N, Re as Ni, di as Nn, fn as Nr, Os as Nt, Jl as O, it as Oi, Ai as On, $e as Or, Fs as Ot, vl as P, Vt as Pi, li as Pn, In as Pr, xs as Pt, Kc as Q, rr as Qn, Sn as Qr, J as Qt, ml as R, Qe as Ri, ii as Rn, at as Rr, is as Rt, uu as S, Le as Si, _a as Sn, Cn as Sr, $s as St, Zl as T, et as Ti, Ri as Tn, Pn as Tr, Xs as Tt, ul as U, Xt as Ui, Wr as Un, Et as Ur, Qo as Ut, Al as V, dn as Vi, $r as Vn, Je as Vr, Xo as Vt, ol as W, Lt as Wi, Gr as Wn, kt as Wr, Yo as Wt, Zc as X, an as Xi, L as Xn, _t as Xr, Oo as Xt, tl as Y, Kt as Yi, kr as Yn, ht as Yr, ko as Yt, Yc as Z, I as Zn, sn as Zr, So as Zt, gu as _, Nt as _i, V as _n, zn as _r, uc as _t, Nu as a, Qt as ai, Ya as an, or as ar, kc as at, su as b, Pt as bi, Ia as bn, wt as br, sc as bt, Eu as c, ln as ci, Wa as cn, Yn as cr, _c as ct, wu as d, He as di, Va as dn, $n as dr, yc as dt, st as ei, to as en, cr as er, jc as et, vu as f, nn as fi, q as fn, Gn as fr, Cc as ft, bu as g, Mt as gi, sa as gn, Bn as gr, dc as gt, Cu as h, M as hi, Aa as hn, Rn as hr, fc as ht, Pu as i, Ct as ii, _o as in, fr as ir, Dc as it, Ul as j, Be as ji, mi as jn, xt as jr, Ns as jt, ql as k, ct as ki, ki as kn, ft as kr, X as kt, Du as l, Nn as li, za as ln, Qn as lr, bc as lt, xu as m, Bt as mi, La as mn, Ln as mr, mc as mt, Iu as n, yt as ni, no as nn, hr as nr, Pc as nt, ju as o, $t as oi, $a as on, Hn as or, wc as ot, yu as p, Xe as pi, ja as pn, Jn as pr, Sc as pt, al as q, At as qi, Ir as qn, on as qr, Go as qt, Fu as r, vt as ri, po as rn, ir as rr, Ec as rt, Ou as s, pn as si, Ua as sn, Xn as sr, vc as st, Bu as t, Gt as ti, eo as tn, F as tr, Fc as tt, Su as u, Ie as ui, Ba as un, P as ur, xc as ut, hu as v, yn as vi, K as vn, Vn as vr, lc as vt, Xl as w, tn as wi, Pi as wn, un as wr, Ys as wt, iu as x, Jt as xi, va as xn, Ze as xr, ac as xt, mu as y, On as yi, wa as yn, tt as yr, cc as yt, Ml as z, wn as zi, ai as zn, qt as zr, us as zt };
5953
5976
 
5954
- //# sourceMappingURL=LinkedRecordFileField-dTfQ1QAj.js.map
5977
+ //# sourceMappingURL=LinkedRecordFileField-Djv6GnfU.js.map