@realtek/core-theme-live 0.0.415 → 0.0.416

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.
@@ -1172,25 +1172,30 @@ function Yn(e, t = Kn()) {
1172
1172
  return a.join(r);
1173
1173
  }
1174
1174
  function Xn(e) {
1175
- return N = {
1175
+ let t = Wn(e);
1176
+ return Object.keys(t).forEach((e) => Zn.add(e)), N = {
1176
1177
  ...N,
1177
- ...Wn(e)
1178
+ ...t
1178
1179
  }, N;
1179
1180
  }
1180
- function Zn(e = !1) {
1181
+ var Zn = /* @__PURE__ */ new Set();
1182
+ function Qn() {
1183
+ return Zn.has("dateFormat") ? N.dateFormat : void 0;
1184
+ }
1185
+ function $n(e = !1) {
1181
1186
  return Un && !e || (Un = Promise.resolve().then(() => st()).then((e) => Xn(e)).catch(() => N)), Un;
1182
1187
  }
1183
1188
  T.extend(_e), T.extend(ve);
1184
- var Qn = null;
1185
- function $n() {
1186
- if (Qn === null) try {
1187
- Qn = T.tz.guess() || "UTC";
1189
+ var er = null;
1190
+ function tr() {
1191
+ if (er === null) try {
1192
+ er = T.tz.guess() || "UTC";
1188
1193
  } catch {
1189
- Qn = "UTC";
1194
+ er = "UTC";
1190
1195
  }
1191
- return Qn;
1196
+ return er;
1192
1197
  }
1193
- function er(e) {
1198
+ function nr(e) {
1194
1199
  let t = String(e ?? "").trim();
1195
1200
  if (!t || t !== "UTC" && !t.includes("/")) return !1;
1196
1201
  try {
@@ -1201,28 +1206,28 @@ function er(e) {
1201
1206
  }
1202
1207
  function F(e = P()) {
1203
1208
  let t = String(e?.timeZone ?? "").trim();
1204
- return er(t) ? t : $n();
1209
+ return nr(t) ? t : tr();
1205
1210
  }
1206
- function tr(e) {
1211
+ function rr(e) {
1207
1212
  return T().tz(F(e));
1208
1213
  }
1209
- function nr(e, t) {
1214
+ function ir(e, t) {
1210
1215
  let n = T(e?.$date ?? e);
1211
1216
  return n.isValid() ? n.tz(F(t)) : n;
1212
1217
  }
1213
- function rr(e, t, n = P()) {
1214
- let r = nr(e, n);
1218
+ function ar(e, t, n = P()) {
1219
+ let r = ir(e, n);
1215
1220
  return r.isValid() ? r.format(t || n?.dateFormat || "DD MMM YYYY") : "";
1216
1221
  }
1217
- function ir(e = P(), t) {
1218
- let n = F(e), r = fr(n, e);
1222
+ function or(e = P(), t) {
1223
+ let n = F(e), r = mr(n, e);
1219
1224
  if (r && r.includes("/")) {
1220
- let e = ar(n, t);
1225
+ let e = sr(n, t);
1221
1226
  if (e) return r.split("/").map((e) => e.trim()).find((t) => t.toUpperCase() === e.toUpperCase()) || e;
1222
1227
  }
1223
- return r || ar(n, t) || n;
1228
+ return r || sr(n, t) || n;
1224
1229
  }
1225
- function ar(e, t) {
1230
+ function sr(e, t) {
1226
1231
  try {
1227
1232
  let n = t === void 0 ? /* @__PURE__ */ new Date() : new Date(T(t?.$date ?? t).valueOf());
1228
1233
  if (Number.isNaN(n.valueOf())) return "";
@@ -1235,28 +1240,28 @@ function ar(e, t) {
1235
1240
  return "";
1236
1241
  }
1237
1242
  }
1238
- function or(e, t = P()) {
1239
- let n = rr(e, t?.dateTimeFormat || "MMM DD, YYYY | hh:mm A", t);
1243
+ function cr(e, t = P()) {
1244
+ let n = ar(e, t?.dateTimeFormat || "MMM DD, YYYY | hh:mm A", t);
1240
1245
  if (!n) return "";
1241
1246
  if (t?.showTimeZoneLabel === !1) return n;
1242
- let r = ir(t, e);
1247
+ let r = or(t, e);
1243
1248
  return r ? `${n} ${r}` : n;
1244
1249
  }
1245
- function sr(e) {
1250
+ function lr(e) {
1246
1251
  if (!e) return !1;
1247
1252
  if (e.tzAware === !0) return !0;
1248
1253
  if (e.tzAware === !1) return !1;
1249
1254
  let t = String(e.type ?? "").toLowerCase();
1250
1255
  return t === "datetime" || t === "time" || t === "datetime-local";
1251
1256
  }
1252
- function cr(e, t) {
1257
+ function ur(e, t) {
1253
1258
  if (e == null || e === "") return null;
1254
1259
  let n = T(e);
1255
1260
  if (!n.isValid()) return null;
1256
1261
  let r = F(t);
1257
1262
  return T.tz(n.format("YYYY-MM-DDTHH:mm:ss"), r);
1258
1263
  }
1259
- function lr(e = F()) {
1264
+ function dr(e = F()) {
1260
1265
  try {
1261
1266
  let t = T().tz(e).utcOffset(), n = t < 0 ? "-" : "+", r = Math.abs(t);
1262
1267
  return `UTC${n}${String(Math.floor(r / 60)).padStart(2, "0")}:${String(r % 60).padStart(2, "0")}`;
@@ -1264,11 +1269,11 @@ function lr(e = F()) {
1264
1269
  return "";
1265
1270
  }
1266
1271
  }
1267
- function ur(e = P()) {
1272
+ function fr(e = P()) {
1268
1273
  let t = F(e);
1269
- return `${fr(t, e) || t} (${lr(t)})`;
1274
+ return `${mr(t, e) || t} (${dr(t)})`;
1270
1275
  }
1271
- var dr = Object.freeze({
1276
+ var pr = Object.freeze({
1272
1277
  UTC: "UTC",
1273
1278
  "Asia/Kolkata": "IST",
1274
1279
  "Asia/Calcutta": "IST",
@@ -1283,10 +1288,10 @@ var dr = Object.freeze({
1283
1288
  "Asia/Tokyo": "JST",
1284
1289
  "Australia/Sydney": "AEST/AEDT"
1285
1290
  });
1286
- function fr(e, t = P()) {
1287
- return (t?.timeZoneAliases ?? {})[e] ?? dr[e] ?? "";
1291
+ function mr(e, t = P()) {
1292
+ return (t?.timeZoneAliases ?? {})[e] ?? pr[e] ?? "";
1288
1293
  }
1289
- function pr(e = P()) {
1294
+ function hr(e = P()) {
1290
1295
  let t = [];
1291
1296
  try {
1292
1297
  t = Intl.supportedValuesOf("timeZone") ?? [];
@@ -1295,17 +1300,17 @@ function pr(e = P()) {
1295
1300
  }
1296
1301
  let n = [
1297
1302
  "UTC",
1298
- ...Object.keys(dr),
1303
+ ...Object.keys(pr),
1299
1304
  ...Object.keys(e?.timeZoneAliases ?? {})
1300
1305
  ];
1301
- return [.../* @__PURE__ */ new Set([...n, ...t])].filter(er).map((t) => {
1306
+ return [.../* @__PURE__ */ new Set([...n, ...t])].filter(nr).map((t) => {
1302
1307
  let n = 0;
1303
1308
  try {
1304
1309
  n = T().tz(t).utcOffset();
1305
1310
  } catch {
1306
1311
  return null;
1307
1312
  }
1308
- let r = fr(t, e), i = lr(t);
1313
+ let r = mr(t, e), i = dr(t);
1309
1314
  return {
1310
1315
  value: t,
1311
1316
  alias: r,
@@ -1463,7 +1468,7 @@ var L = {
1463
1468
  avatarPurpleBg: "var(--color-avatar-purple-bg)",
1464
1469
  avatarMoreBg: "var(--color-avatar-more-bg)",
1465
1470
  avatarMoreText: "var(--color-avatar-more-text)"
1466
- }, { Text: mr, Title: hr, Paragraph: gr, Link: _r } = ie, vr = {
1471
+ }, { Text: gr, Title: _r, Paragraph: vr, Link: yr } = ie, br = {
1467
1472
  display: "h1",
1468
1473
  h1: "h1",
1469
1474
  h2: "h2",
@@ -1481,7 +1486,7 @@ var L = {
1481
1486
  metric: "span",
1482
1487
  helper: "span",
1483
1488
  link: "a"
1484
- }, yr = {
1489
+ }, xr = {
1485
1490
  xs: "var(--font-size-xs)",
1486
1491
  sm: "var(--font-size-sm)",
1487
1492
  md: "var(--font-size-md)",
@@ -1490,18 +1495,18 @@ var L = {
1490
1495
  "2xl": "var(--font-size-2xl)",
1491
1496
  "3xl": "var(--font-size-3xl)",
1492
1497
  "4xl": "var(--font-size-4xl)"
1493
- }, br = {
1498
+ }, Sr = {
1494
1499
  regular: "var(--font-weight-regular)",
1495
1500
  medium: "var(--font-weight-medium)",
1496
1501
  semibold: "var(--font-weight-semibold)",
1497
1502
  bold: "var(--font-weight-bold)",
1498
1503
  extrabold: "var(--font-weight-extrabold)"
1499
- }, xr = {
1504
+ }, Cr = {
1500
1505
  tight: "var(--line-height-tight)",
1501
1506
  snug: "var(--line-height-snug)",
1502
1507
  normal: "var(--line-height-normal)",
1503
1508
  relaxed: "var(--line-height-relaxed)"
1504
- }, Sr = {
1509
+ }, wr = {
1505
1510
  primary: L.textPrimary,
1506
1511
  secondary: L.textSecondary,
1507
1512
  muted: L.textMuted,
@@ -1511,37 +1516,37 @@ var L = {
1511
1516
  danger: L.danger,
1512
1517
  success: L.success
1513
1518
  };
1514
- function Cr(...e) {
1519
+ function Tr(...e) {
1515
1520
  return e.filter(Boolean).join(" ");
1516
1521
  }
1517
- function wr(e, t) {
1522
+ function Er(e, t) {
1518
1523
  if (e != null) return t[e] || e;
1519
1524
  }
1520
- function Tr(e, t) {
1521
- return t === "link" || e === "a" ? _r : e === "p" ? gr : [
1525
+ function Dr(e, t) {
1526
+ return t === "link" || e === "a" ? yr : e === "p" ? vr : [
1522
1527
  "h1",
1523
1528
  "h2",
1524
1529
  "h3",
1525
1530
  "h4",
1526
1531
  "h5"
1527
- ].includes(e) ? hr : mr;
1532
+ ].includes(e) ? _r : gr;
1528
1533
  }
1529
- function Er(e, t) {
1530
- let n = e || vr[t];
1534
+ function Or(e, t) {
1535
+ let n = e || br[t];
1531
1536
  if (n?.startsWith("h")) return Number(n.slice(1));
1532
1537
  }
1533
- function Dr({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a, lineHeight: o, align: s, truncate: c = !1, display: l, className: u, style: d, children: f, ...p }) {
1534
- let m = t || e || vr[n] || "span", h = Tr(m, n), g = Er(m, n), _ = {
1535
- color: wr(r, Sr),
1536
- fontSize: wr(i, yr),
1537
- fontWeight: wr(a, br),
1538
- lineHeight: wr(o, xr),
1538
+ function kr({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a, lineHeight: o, align: s, truncate: c = !1, display: l, className: u, style: d, children: f, ...p }) {
1539
+ let m = t || e || br[n] || "span", h = Dr(m, n), g = Or(m, n), _ = {
1540
+ color: Er(r, wr),
1541
+ fontSize: Er(i, xr),
1542
+ fontWeight: Er(a, Sr),
1543
+ lineHeight: Er(o, Cr),
1539
1544
  display: l,
1540
1545
  ...d
1541
1546
  };
1542
1547
  return /* @__PURE__ */ C(h, {
1543
1548
  ...g ? { level: g } : {},
1544
- className: Cr("app-typography", `app-typography--${n}`, r && Sr[r] && `app-typography--${r}`, s && `app-typography--${s}`, c && "app-typography--truncate", u),
1549
+ className: Tr("app-typography", `app-typography--${n}`, r && wr[r] && `app-typography--${r}`, s && `app-typography--${s}`, c && "app-typography--truncate", u),
1545
1550
  style: _,
1546
1551
  ...p,
1547
1552
  children: f
@@ -1549,13 +1554,13 @@ function Dr({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a,
1549
1554
  }
1550
1555
  //#endregion
1551
1556
  //#region src/components/TipTapEditor.jsx
1552
- var Or = (e = "") => e.trim().replace(/^\*\*(.*?)\*\*$/s, "$1").replace(/^__(.*?)__$/s, "$1"), kr = (e = []) => e.length > 0 && e.every((e) => /^:?-{3,}:?$/.test(String(e).trim())), Ar = (e = "") => {
1557
+ var Ar = (e = "") => e.trim().replace(/^\*\*(.*?)\*\*$/s, "$1").replace(/^__(.*?)__$/s, "$1"), jr = (e = []) => e.length > 0 && e.every((e) => /^:?-{3,}:?$/.test(String(e).trim())), Mr = (e = "") => {
1553
1558
  let t = String(e || "").replace(/\r\n?/g, "\n").trim();
1554
1559
  if (!t) return null;
1555
1560
  let n = t.split("\n").filter((e) => e.trim().length > 0);
1556
1561
  if (n.length < 2) return null;
1557
1562
  if (n.some((e) => e.includes(" "))) {
1558
- let e = n.map((e) => e.split(" ").map(Or)), t = Math.max(...e.map((e) => e.length));
1563
+ let e = n.map((e) => e.split(" ").map(Ar)), t = Math.max(...e.map((e) => e.length));
1559
1564
  return t < 2 ? null : {
1560
1565
  rows: e.map((e) => [...e, ...Array(t - e.length).fill("")]),
1561
1566
  hasHeaderRow: !0
@@ -1563,15 +1568,15 @@ var Or = (e = "") => e.trim().replace(/^\*\*(.*?)\*\*$/s, "$1").replace(/^__(.*?
1563
1568
  }
1564
1569
  let r = n.filter((e) => e.includes("|")).map((e) => {
1565
1570
  let t = e.trim();
1566
- return t.startsWith("|") && (t = t.slice(1)), t.endsWith("|") && (t = t.slice(0, -1)), t.split("|").map(Or);
1571
+ return t.startsWith("|") && (t = t.slice(1)), t.endsWith("|") && (t = t.slice(0, -1)), t.split("|").map(Ar);
1567
1572
  });
1568
1573
  if (r.length < 2) return null;
1569
- let i = r.findIndex(kr), a = r.filter((e, t) => t !== i), o = Math.max(...a.map((e) => e.length));
1574
+ let i = r.findIndex(jr), a = r.filter((e, t) => t !== i), o = Math.max(...a.map((e) => e.length));
1570
1575
  return a.length < 2 || o < 2 ? null : {
1571
1576
  rows: a.map((e) => [...e, ...Array(o - e.length).fill("")]),
1572
1577
  hasHeaderRow: i === 1
1573
1578
  };
1574
- }, jr = (e, t, n) => {
1579
+ }, Nr = (e, t, n) => {
1575
1580
  let { table: r, tableRow: i, tableHeader: a, tableCell: o, paragraph: s } = e.nodes;
1576
1581
  if (!r || !i || !o || !s) return null;
1577
1582
  let c = t.map((t, r) => {
@@ -1595,7 +1600,7 @@ function R({ onClick: e, active: t, disabled: n, title: r, children: i }) {
1595
1600
  children: i
1596
1601
  });
1597
1602
  }
1598
- function Mr({ editor: e, disabled: t }) {
1603
+ function Pr({ editor: e, disabled: t }) {
1599
1604
  return e ? /* @__PURE__ */ w("div", {
1600
1605
  className: `tte-toolbar${t ? " tte-toolbar--disabled" : ""}`,
1601
1606
  children: [
@@ -1735,7 +1740,7 @@ function Mr({ editor: e, disabled: t }) {
1735
1740
  ]
1736
1741
  }) : null;
1737
1742
  }
1738
- function Nr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = "" }) {
1743
+ function Fr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = "" }) {
1739
1744
  let i = h(e ?? ""), a = xe({
1740
1745
  extensions: [
1741
1746
  Se,
@@ -1757,9 +1762,9 @@ function Nr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = ""
1757
1762
  editorProps: {
1758
1763
  attributes: { class: "tte-content" },
1759
1764
  handlePaste: (e, t) => {
1760
- let n = Ar(t.clipboardData?.getData("text/plain") || "");
1765
+ let n = Mr(t.clipboardData?.getData("text/plain") || "");
1761
1766
  if (!n) return !1;
1762
- let r = jr(e.state.schema, n.rows, n.hasHeaderRow);
1767
+ let r = Nr(e.state.schema, n.rows, n.hasHeaderRow);
1763
1768
  if (!r) return !1;
1764
1769
  t.preventDefault();
1765
1770
  let i = e.state.tr.replaceSelectionWith(r, !1).scrollIntoView();
@@ -1780,7 +1785,7 @@ function Nr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = ""
1780
1785
  }, [n, a]), /* @__PURE__ */ w("div", {
1781
1786
  className: `tte-wrapper${n ? " tte-wrapper--disabled" : ""}`,
1782
1787
  children: [
1783
- /* @__PURE__ */ C(Mr, {
1788
+ /* @__PURE__ */ C(Pr, {
1784
1789
  editor: a,
1785
1790
  disabled: n
1786
1791
  }),
@@ -1794,7 +1799,7 @@ function Nr({ value: e = "", onChange: t, disabled: n = !1, placeholder: r = ""
1794
1799
  }
1795
1800
  //#endregion
1796
1801
  //#region src/utils/modulePath.js
1797
- function Pr(e) {
1802
+ function Ir(e) {
1798
1803
  let t = String(e ?? "").trim();
1799
1804
  if (!t) return {
1800
1805
  baseModule: "",
@@ -1806,35 +1811,35 @@ function Pr(e) {
1806
1811
  nestedPath: r.map((e) => e.trim()).filter(Boolean).join(".")
1807
1812
  };
1808
1813
  }
1809
- function Fr(e) {
1810
- return Pr(e).baseModule;
1814
+ function Lr(e) {
1815
+ return Ir(e).baseModule;
1811
1816
  }
1812
1817
  //#endregion
1813
1818
  //#region src/services/moduleDataApi.js
1814
- var Ir = "test-flows", Lr = "lms-flows";
1815
- function Rr(e) {
1819
+ var Rr = "test-flows", zr = "lms-flows";
1820
+ function Br(e) {
1816
1821
  let t = (Array.isArray(e) ? e : [e]).flat().map((e) => e && typeof e == "object" ? e.value ?? e.label ?? e.name ?? "" : e).map((e) => String(e ?? "").trim().toLowerCase()).filter(Boolean);
1817
1822
  return t.includes("dice") ? "dice" : t.includes("internal") ? "internal" : t[0] || "";
1818
1823
  }
1819
- function zr(...e) {
1824
+ function Vr(...e) {
1820
1825
  for (let t of e) {
1821
1826
  let e = Number(t);
1822
1827
  if (Number.isFinite(e)) return e;
1823
1828
  }
1824
1829
  }
1825
- function Br(e, t, n, r = "") {
1830
+ function Hr(e, t, n, r = "") {
1826
1831
  let i = e?.count, a = t?.count, o = String(r ?? "").trim().toLowerCase();
1827
1832
  if (i && typeof i == "object") {
1828
- let e = zr(o ? i[o] : void 0, i.total, i.searchCount, i.count);
1833
+ let e = Vr(o ? i[o] : void 0, i.total, i.searchCount, i.count);
1829
1834
  if (e !== void 0) return e;
1830
1835
  }
1831
1836
  if (a && typeof a == "object") {
1832
- let e = zr(o ? a[o] : void 0, a.total, a.searchCount, a.count);
1837
+ let e = Vr(o ? a[o] : void 0, a.total, a.searchCount, a.count);
1833
1838
  if (e !== void 0) return e;
1834
1839
  }
1835
- return zr(e?.total, typeof i == "object" ? void 0 : i, e?.totalCount, t?.total, typeof a == "object" ? void 0 : a, t?.totalCount, n.length) ?? 0;
1840
+ return Vr(e?.total, typeof i == "object" ? void 0 : i, e?.totalCount, t?.total, typeof a == "object" ? void 0 : a, t?.totalCount, n.length) ?? 0;
1836
1841
  }
1837
- function Vr(e, t) {
1842
+ function Ur(e, t) {
1838
1843
  let n = {};
1839
1844
  return [e?.count, t?.count].forEach((e) => {
1840
1845
  !e || typeof e != "object" || Object.entries(e).forEach(([e, t]) => {
@@ -1843,9 +1848,9 @@ function Vr(e, t) {
1843
1848
  });
1844
1849
  }), n;
1845
1850
  }
1846
- async function Hr(e, t, n = "", r = 50, i = 0, a = {}) {
1851
+ async function Wr(e, t, n = "", r = 50, i = 0, a = {}) {
1847
1852
  let c = new URLSearchParams({
1848
- module: Fr(e),
1853
+ module: Lr(e),
1849
1854
  field: t,
1850
1855
  value: n,
1851
1856
  limit: String(r),
@@ -1853,9 +1858,9 @@ async function Hr(e, t, n = "", r = 50, i = 0, a = {}) {
1853
1858
  });
1854
1859
  return a.dataSource && c.set("dataSource", a.dataSource), a.masterName && c.set("masterName", a.masterName), a.groupName && c.set("groupName", a.groupName), a.scope && c.set("scope", a.scope), a.arrayLabelField && c.set("arrayLabelField", a.arrayLabelField), a.arrayValueField && c.set("arrayValueField", a.arrayValueField), o(s, `/filter-dropdown-values?${c}`);
1855
1860
  }
1856
- async function Ur(e, t = 10, n = 0, r = {}) {
1861
+ async function Gr(e, t = 10, n = 0, r = {}) {
1857
1862
  let { scope: i = "", sort: o = "", sortDir: c = "", filters: l = [] } = r;
1858
- if (e === Ir) {
1863
+ if (e === Rr) {
1859
1864
  let { getTestFlows: e } = await import("./index.js").then((e) => e.t), r = await e({
1860
1865
  limit: t,
1861
1866
  offset: n
@@ -1872,7 +1877,7 @@ async function Ur(e, t = 10, n = 0, r = {}) {
1872
1877
  }]
1873
1878
  };
1874
1879
  }
1875
- if (e === Lr) {
1880
+ if (e === zr) {
1876
1881
  let { getLmsFlows: e } = await import("./index.js").then((e) => e.t), r = await e({
1877
1882
  limit: t,
1878
1883
  offset: n
@@ -1890,13 +1895,13 @@ async function Ur(e, t = 10, n = 0, r = {}) {
1890
1895
  };
1891
1896
  }
1892
1897
  let u = new URLSearchParams({
1893
- module: Fr(e),
1898
+ module: Lr(e),
1894
1899
  limit: String(t),
1895
1900
  offset: String(n)
1896
1901
  }), d = String(i ?? "").trim();
1897
1902
  return d && u.set("scope", d), o && u.set("sort", o), c && u.set("sortDir", c), Array.isArray(l) && l.some((e) => e?.field) && u.set("filters", JSON.stringify(l)), a(s, `/module-data-list?${u.toString()}`);
1898
1903
  }
1899
- async function Wr(e, t) {
1904
+ async function Kr(e, t) {
1900
1905
  if (!e || !t) return null;
1901
1906
  try {
1902
1907
  let n = await a(s, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`), r = n?.data?.data ?? n?.data ?? n, i = Array.isArray(r) ? r[0] : r;
@@ -1905,14 +1910,14 @@ async function Wr(e, t) {
1905
1910
  return null;
1906
1911
  }
1907
1912
  }
1908
- async function Gr(e, t = {}, n = {}, r = {}) {
1909
- let { limit: i = 10, offset: o = 0 } = n, { sort: c = "", sortDir: l = "", scope: u = "", filters: d = [] } = r, f = Rr(u || String(t.selectedSource ?? "").split(",")), p = new URLSearchParams();
1910
- p.append("module", Fr(e)), p.append("limit", String(i)), p.append("offset", String(o)), f && (p.set("scope", f), console.log("[searchModuleData] Adding scope to query:", f)), c && p.set("sort", c), l && p.set("sortDir", l), Array.isArray(d) && d.some((e) => e?.field) && p.set("filters", JSON.stringify(d)), console.log("[searchModuleData] Final query string:", p.toString()), Object.entries(t).forEach(([e, t]) => {
1913
+ async function qr(e, t = {}, n = {}, r = {}) {
1914
+ let { limit: i = 10, offset: o = 0 } = n, { sort: c = "", sortDir: l = "", scope: u = "", filters: d = [] } = r, f = Br(u || String(t.selectedSource ?? "").split(",")), p = new URLSearchParams();
1915
+ p.append("module", Lr(e)), p.append("limit", String(i)), p.append("offset", String(o)), f && (p.set("scope", f), console.log("[searchModuleData] Adding scope to query:", f)), c && p.set("sort", c), l && p.set("sortDir", l), Array.isArray(d) && d.some((e) => e?.field) && p.set("filters", JSON.stringify(d)), console.log("[searchModuleData] Final query string:", p.toString()), Object.entries(t).forEach(([e, t]) => {
1911
1916
  if (t == null || t === "") return;
1912
1917
  let n = t;
1913
1918
  n = typeof t == "object" ? t.value ?? t.label ?? t.name ?? String(t) : String(t), p.append(e, n);
1914
1919
  });
1915
- let m = await a(s, `/module-data-list?${p.toString()}`), h = m?.data ?? m, g = Array.isArray(h) ? h : h?.rows ?? h?.records ?? h?.items ?? h?.list ?? h?.data ?? [], _ = Br(m, h, g, f), v = Vr(m, h);
1920
+ let m = await a(s, `/module-data-list?${p.toString()}`), h = m?.data ?? m, g = Array.isArray(h) ? h : h?.rows ?? h?.records ?? h?.items ?? h?.list ?? h?.data ?? [], _ = Hr(m, h, g, f), v = Ur(m, h);
1916
1921
  f && v[f] === void 0 && Number.isFinite(_) && (v[f] = _);
1917
1922
  let y = g.some((e) => [
1918
1923
  e?.sourceType,
@@ -1925,9 +1930,9 @@ async function Gr(e, t = {}, n = {}, r = {}) {
1925
1930
  let { transformDiceResponseToInternalFormat: e } = await import("./diceCandidateMapper-DqBO4EhL.js").then((e) => e.t);
1926
1931
  b = e(m, m)?.data?.data ?? g;
1927
1932
  } catch (e) {
1928
- console.error("[searchModuleData] Dice transformation failed:", e), b = g.map(Jr);
1933
+ console.error("[searchModuleData] Dice transformation failed:", e), b = g.map(Xr);
1929
1934
  }
1930
- else b = Array.isArray(g) ? g.map(Jr) : [];
1935
+ else b = Array.isArray(g) ? g.map(Xr) : [];
1931
1936
  return {
1932
1937
  rows: b,
1933
1938
  total: Number(_) || 0,
@@ -1940,10 +1945,10 @@ async function Gr(e, t = {}, n = {}, r = {}) {
1940
1945
  columnActions: h?.columnActions ?? []
1941
1946
  };
1942
1947
  }
1943
- function Kr(e, t) {
1948
+ function Jr(e, t) {
1944
1949
  return String(t).split(".").reduce((e, t) => e?.[t], e);
1945
1950
  }
1946
- function qr(e, t, n) {
1951
+ function Yr(e, t, n) {
1947
1952
  let r = String(t).split(".").filter(Boolean);
1948
1953
  if (!r.length) return e;
1949
1954
  let i = { ...e }, a = i, o = e;
@@ -1952,7 +1957,7 @@ function qr(e, t, n) {
1952
1957
  a[e] = n, a = n, o = t;
1953
1958
  }), a[r[r.length - 1]] = n, i;
1954
1959
  }
1955
- function Jr(e) {
1960
+ function Xr(e) {
1956
1961
  if (!e || typeof e != "object") return e;
1957
1962
  let t = [
1958
1963
  "skills",
@@ -1962,11 +1967,11 @@ function Jr(e) {
1962
1967
  "customFields.diceProfileData.skills"
1963
1968
  ], n = e, r = null;
1964
1969
  if (t.forEach((e) => {
1965
- let t = Kr(n, e);
1970
+ let t = Jr(n, e);
1966
1971
  if (t == null) return;
1967
1972
  let i = c(t);
1968
- i.length === 0 && Array.isArray(t) && t.length > 0 || (r ??= i, n = qr(n, e, i));
1969
- }), r && Kr(n, "skills") === void 0 && (n = qr(n, "skills", r)), [
1973
+ i.length === 0 && Array.isArray(t) && t.length > 0 || (r ??= i, n = Yr(n, e, i));
1974
+ }), r && Jr(n, "skills") === void 0 && (n = Yr(n, "skills", r)), [
1970
1975
  n?.sourceType,
1971
1976
  n?.profileSource,
1972
1977
  n?.selectedSource,
@@ -1985,10 +1990,10 @@ function Jr(e) {
1985
1990
  }
1986
1991
  //#endregion
1987
1992
  //#region src/services/documentApi.js
1988
- function Yr(e) {
1993
+ function Zr(e) {
1989
1994
  return String(e ?? "").replace(/^__mw__.*?__/, "").replace(/\[\d+\]$/, "").trim() || "file";
1990
1995
  }
1991
- async function Xr(e, t, n = [], i = {}) {
1996
+ async function Qr(e, t, n = [], i = {}) {
1992
1997
  if (!e) throw Error("moduleName is required to upload documents");
1993
1998
  if (!t) throw Error("refId (created record id) is required to upload documents");
1994
1999
  if (!n.length) return {
@@ -1998,7 +2003,7 @@ async function Xr(e, t, n = [], i = {}) {
1998
2003
  let a = await r(), o = new FormData();
1999
2004
  n.forEach(({ formKey: e, file: t }) => {
2000
2005
  let n = t?.name ?? void 0;
2001
- o.append(Yr(e), t, n);
2006
+ o.append(Zr(e), t, n);
2002
2007
  }), i && Object.keys(i).length > 0 && o.append("metadata", JSON.stringify(i));
2003
2008
  let c = new URLSearchParams({
2004
2009
  module: e,
@@ -2014,7 +2019,7 @@ async function Xr(e, t, n = [], i = {}) {
2014
2019
  }
2015
2020
  return u?.data ?? u;
2016
2021
  }
2017
- async function Zr(e, t, n = "") {
2022
+ async function $r(e, t, n = "") {
2018
2023
  if (!e) throw Error("moduleName is required to fetch documents");
2019
2024
  if (!t) throw Error("refId is required to fetch documents");
2020
2025
  let r = new URLSearchParams({
@@ -2028,7 +2033,7 @@ async function Zr(e, t, n = "") {
2028
2033
  total: o?.total ?? 0
2029
2034
  };
2030
2035
  }
2031
- async function Qr(e) {
2036
+ async function ei(e) {
2032
2037
  if (!e) return !1;
2033
2038
  try {
2034
2039
  return await a(s, `/documents/${encodeURIComponent(String(e))}`, { method: "DELETE" }), !0;
@@ -2038,36 +2043,36 @@ async function Qr(e) {
2038
2043
  }
2039
2044
  //#endregion
2040
2045
  //#region src/services/detailedViewApi.js
2041
- var $r = {
2046
+ var ti = {
2042
2047
  job: { fetchUrl: (e) => `${n}/edit/detailed-view/${encodeURIComponent(e)}` },
2043
2048
  candidate: { fetchUrl: (e) => `${t}/edit/detailed-view?_id=${encodeURIComponent(e)}` },
2044
2049
  candidates: { fetchUrl: (e) => `${t}/edit/detailed-view?_id=${encodeURIComponent(e)}` },
2045
2050
  submission: { fetchUrl: (t) => `${e}/edit/detailed-view?_id=${encodeURIComponent(t)}` }
2046
2051
  };
2047
- async function ei(e, t) {
2052
+ async function ni(e, t) {
2048
2053
  let n = String(e ?? "").trim().toLowerCase();
2049
2054
  if (n === "job" || n === "jobs") {
2050
2055
  let { getJobDetailView: e } = await import("./index.js").then((e) => e.r);
2051
2056
  return e(t);
2052
2057
  }
2053
- if (n === "candidate" || n === "candidates") return ni(n === "candidate" ? "candidate" : "candidates", t);
2058
+ if (n === "candidate" || n === "candidates") return ii(n === "candidate" ? "candidate" : "candidates", t);
2054
2059
  let r = new URLSearchParams({
2055
2060
  module: String(e ?? ""),
2056
2061
  id: String(t)
2057
2062
  });
2058
2063
  return a(s, `/module-data-detail?${r.toString()}`);
2059
2064
  }
2060
- async function ti(e) {
2065
+ async function ri(e) {
2061
2066
  let t = await a(s, `/module-actions?module=${encodeURIComponent(e)}`), n = t?.data ?? t ?? {};
2062
2067
  return {
2063
2068
  actions: Array.isArray(n.actions) ? n.actions : [],
2064
2069
  actionRules: Array.isArray(n.actionRules) ? n.actionRules : []
2065
2070
  };
2066
2071
  }
2067
- async function ni(e, t) {
2072
+ async function ii(e, t) {
2068
2073
  if (!e) throw Error("module is required");
2069
2074
  if (!t) throw Error("id is required");
2070
- let n = $r[e];
2075
+ let n = ti[e];
2071
2076
  if (!n) throw Error(`No edit config for module: ${e}`);
2072
2077
  let i = await r(), a = await fetch(n.fetchUrl(t), {
2073
2078
  method: "GET",
@@ -2080,7 +2085,7 @@ async function ni(e, t) {
2080
2085
  let o = await a.json();
2081
2086
  return o.data ?? o;
2082
2087
  }
2083
- async function ri(e, t, n, i = []) {
2088
+ async function ai(e, t, n, i = []) {
2084
2089
  if (!e) throw Error("module is required");
2085
2090
  if (!t) throw Error("id is required");
2086
2091
  let a = await r(), o = new FormData();
@@ -2093,15 +2098,15 @@ async function ri(e, t, n, i = []) {
2093
2098
  if (!c.ok) {
2094
2099
  let e = await c.text();
2095
2100
  console.error("[updateRecord] Error response:", e);
2096
- let t = Error(ai(e) || `API ${c.status}: ${c.statusText}`);
2097
- throw t.status = c.status, t.response = ii(e), t;
2101
+ let t = Error(si(e) || `API ${c.status}: ${c.statusText}`);
2102
+ throw t.status = c.status, t.response = oi(e), t;
2098
2103
  }
2099
2104
  let { invalidateFormGroupsCache: l } = await import("./formGroupsCache-JeC59oNe.js").then((e) => e.n);
2100
2105
  l();
2101
2106
  let u = await c.json();
2102
2107
  return u.data ?? u;
2103
2108
  }
2104
- function ii(e) {
2109
+ function oi(e) {
2105
2110
  let t = String(e ?? "").trim();
2106
2111
  if (!t.startsWith("{")) return null;
2107
2112
  try {
@@ -2110,7 +2115,7 @@ function ii(e) {
2110
2115
  return null;
2111
2116
  }
2112
2117
  }
2113
- function ai(e) {
2118
+ function si(e) {
2114
2119
  let t = String(e ?? "").trim();
2115
2120
  if (!t.startsWith("{")) return t;
2116
2121
  try {
@@ -2120,22 +2125,22 @@ function ai(e) {
2120
2125
  return t;
2121
2126
  }
2122
2127
  }
2123
- var oi = (e) => e?.data ?? e;
2124
- async function si(e, t) {
2128
+ var ci = (e) => e?.data ?? e;
2129
+ async function li(e, t) {
2125
2130
  if (!e || !t) return [];
2126
2131
  let n = new URLSearchParams({
2127
2132
  module: e,
2128
2133
  id: String(t)
2129
- }), r = oi(await a(s, `/module-activity?${n.toString()}`));
2134
+ }), r = ci(await a(s, `/module-activity?${n.toString()}`));
2130
2135
  return Array.isArray(r) ? r : [];
2131
2136
  }
2132
- async function ci(e) {
2137
+ async function ui(e) {
2133
2138
  if (!e) return [];
2134
- let t = oi(await a(s, `/notes?relatedId=${encodeURIComponent(e)}`));
2139
+ let t = ci(await a(s, `/notes?relatedId=${encodeURIComponent(e)}`));
2135
2140
  return Array.isArray(t) ? t : [];
2136
2141
  }
2137
- async function li({ relatedId: e, notes: t, title: n, notesFor: r }) {
2138
- return oi(await a(s, "/notes", {
2142
+ async function di({ relatedId: e, notes: t, title: n, notesFor: r }) {
2143
+ return ci(await a(s, "/notes", {
2139
2144
  method: "POST",
2140
2145
  body: JSON.stringify({
2141
2146
  relatedId: e,
@@ -2147,19 +2152,19 @@ async function li({ relatedId: e, notes: t, title: n, notesFor: r }) {
2147
2152
  }
2148
2153
  //#endregion
2149
2154
  //#region src/utils/roleFormPermissionGate.js
2150
- function ui(e, t) {
2155
+ function fi(e, t) {
2151
2156
  if (!e) return !0;
2152
2157
  let n = e.find((e) => e.name === t);
2153
2158
  return !n || n.enabled !== !1;
2154
2159
  }
2155
- function di(e, t, n) {
2160
+ function pi(e, t, n) {
2156
2161
  if (!e) return !0;
2157
2162
  let r = e.find((e) => e.name === t);
2158
2163
  if (!r) return !0;
2159
2164
  let i = r.fields?.find((e) => e.field === n);
2160
2165
  return !i || i.locked ? !0 : i.enabled !== !1;
2161
2166
  }
2162
- function fi(e, t, n) {
2167
+ function mi(e, t, n) {
2163
2168
  if (!e) return !0;
2164
2169
  let r = e.find((e) => e.name === t);
2165
2170
  if (!r) return !0;
@@ -2169,7 +2174,7 @@ function fi(e, t, n) {
2169
2174
  }
2170
2175
  //#endregion
2171
2176
  //#region src/components/form/inputSecurity.js
2172
- var pi = [
2177
+ var hi = [
2173
2178
  "p",
2174
2179
  "br",
2175
2180
  "strong",
@@ -2191,12 +2196,12 @@ var pi = [
2191
2196
  "a",
2192
2197
  "code",
2193
2198
  "pre"
2194
- ], mi = [
2199
+ ], gi = [
2195
2200
  "href",
2196
2201
  "title",
2197
2202
  "target",
2198
2203
  "rel"
2199
- ], hi = /[\u200B-\u200D\u2060\uFEFF]/g, gi = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, _i = /^[\p{L}\p{M}\p{N} .'-]+$/u, vi = /^\+?[0-9 ()-]+$/, yi = /^-?(?:\d+|\d*\.\d+)$/, bi = [
2204
+ ], _i = /[\u200B-\u200D\u2060\uFEFF]/g, vi = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, yi = /^[\p{L}\p{M}\p{N} .'-]+$/u, bi = /^\+?[0-9 ()-]+$/, xi = /^-?(?:\d+|\d*\.\d+)$/, Si = [
2200
2205
  {
2201
2206
  re: /<\s*\/?\s*(?:script|iframe|object|embed|svg|img|form|input|style|link|meta|base|applet|frame|frameset)\b/i,
2202
2207
  message: "HTML/script content is not allowed"
@@ -2223,12 +2228,12 @@ var pi = [
2223
2228
  plainOnly: !0
2224
2229
  }
2225
2230
  ];
2226
- function xi(e) {
2231
+ function Ci(e) {
2227
2232
  if (typeof document > "u") return e;
2228
2233
  let t = document.createElement("textarea");
2229
2234
  return t.innerHTML = e, t.value;
2230
2235
  }
2231
- function Si(e) {
2236
+ function wi(e) {
2232
2237
  let t = String(e ?? "");
2233
2238
  for (let e = 0; e < 2; e += 1) try {
2234
2239
  let e = decodeURIComponent(t);
@@ -2237,12 +2242,12 @@ function Si(e) {
2237
2242
  } catch {
2238
2243
  break;
2239
2244
  }
2240
- return t = xi(t).replace(/\\x([0-9a-f]{2})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))).replace(/\\u([0-9a-f]{4})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))), t.normalize("NFC");
2245
+ return t = Ci(t).replace(/\\x([0-9a-f]{2})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))).replace(/\\u([0-9a-f]{4})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))), t.normalize("NFC");
2241
2246
  }
2242
- function Ci(e) {
2247
+ function Ti(e) {
2243
2248
  return ke.sanitize(String(e ?? ""), {
2244
- ALLOWED_TAGS: pi,
2245
- ALLOWED_ATTR: mi,
2249
+ ALLOWED_TAGS: hi,
2250
+ ALLOWED_ATTR: gi,
2246
2251
  ALLOW_DATA_ATTR: !1,
2247
2252
  FORBID_TAGS: [
2248
2253
  "script",
@@ -2262,35 +2267,35 @@ function Ci(e) {
2262
2267
  ]
2263
2268
  });
2264
2269
  }
2265
- function wi(e) {
2270
+ function Ei(e) {
2266
2271
  let t = (e.validations ?? []).find((e) => e?.type === "max"), n = Number(e.validator?.maxLength ?? t?.value ?? e.maxLength);
2267
2272
  return Number.isFinite(n) && n > 0 ? n : e.type === "email" || e.formatter === "email" ? 255 : e.formatter === "phone" || e.formatter === "digits" ? 32 : e.formatter === "name" ? 100 : e.type === "text-editor" ? 5e4 : (e.type, 5e3);
2268
2273
  }
2269
- function Ti(e) {
2274
+ function Di(e) {
2270
2275
  return e.type === "textarea" || e.type === "text-editor";
2271
2276
  }
2272
- function Ei(e, t = {}) {
2277
+ function Oi(e, t = {}) {
2273
2278
  if (typeof e != "string") return e;
2274
- if (t.type === "text-editor") return Ci(e.normalize("NFC"));
2275
- let n = e.normalize("NFC").replace(hi, "").replace(/\u00A0/g, " ").replace(gi, "");
2276
- return n = Ti(t) ? n.replace(/\r\n?/g, "\n").replace(/[ \t]{2,}/g, " ").trim() : n.replace(/\s+/g, " ").trim(), n;
2279
+ if (t.type === "text-editor") return Ti(e.normalize("NFC"));
2280
+ let n = e.normalize("NFC").replace(_i, "").replace(/\u00A0/g, " ").replace(vi, "");
2281
+ return n = Di(t) ? n.replace(/\r\n?/g, "\n").replace(/[ \t]{2,}/g, " ").trim() : n.replace(/\s+/g, " ").trim(), n;
2277
2282
  }
2278
- function Di(e, t = {}) {
2283
+ function ki(e, t = {}) {
2279
2284
  if (typeof e != "string" || e === "") return null;
2280
- let n = t.label || t.field || "Field", r = Si(e);
2285
+ let n = t.label || t.field || "Field", r = wi(e);
2281
2286
  if (r.includes("\0") || r.includes("\0")) return `${n} contains a null byte`;
2282
- let i = t.type === "text-editor", a = bi.find(({ re: e, plainOnly: t }) => (!t || !i) && e.test(r));
2287
+ let i = t.type === "text-editor", a = Si.find(({ re: e, plainOnly: t }) => (!t || !i) && e.test(r));
2283
2288
  if (a) return `${n}: ${a.message}`;
2284
- let o = Ei(e, t);
2285
- return [...o].length > wi(t) ? `${n} is too long` : t.formatter === "name" && o && !_i.test(o) ? `${n} allows only letters, numbers, spaces, apostrophes, hyphens and periods` : (t.formatter === "phone" || t.formatter === "digits") && o && !vi.test(o) ? `${n} contains invalid phone characters` : t.type === "number" && o && !yi.test(o) ? `${n} must contain only a valid number` : (t.type === "url" || t.formatter === "url") && o && !/^https?:\/\//i.test(o) ? `${n} must use http:// or https://` : null;
2289
+ let o = Oi(e, t);
2290
+ return [...o].length > Ei(t) ? `${n} is too long` : t.formatter === "name" && o && !yi.test(o) ? `${n} allows only letters, numbers, spaces, apostrophes, hyphens and periods` : (t.formatter === "phone" || t.formatter === "digits") && o && !bi.test(o) ? `${n} contains invalid phone characters` : t.type === "number" && o && !xi.test(o) ? `${n} must contain only a valid number` : (t.type === "url" || t.formatter === "url") && o && !/^https?:\/\//i.test(o) ? `${n} must use http:// or https://` : null;
2286
2291
  }
2287
- function Oi(e) {
2292
+ function Ai(e) {
2288
2293
  return { validator: (t, n) => {
2289
- let r = (Array.isArray(n) ? n : [n]).map((t) => Di(t, e)).find(Boolean);
2294
+ let r = (Array.isArray(n) ? n : [n]).map((t) => ki(t, e)).find(Boolean);
2290
2295
  return r ? Promise.reject(Error(r)) : Promise.resolve();
2291
2296
  } };
2292
2297
  }
2293
- function ki(e = []) {
2298
+ function ji(e = []) {
2294
2299
  let t = /* @__PURE__ */ new Map();
2295
2300
  return e.forEach((e) => {
2296
2301
  (e.fields ?? []).forEach((n) => {
@@ -2302,12 +2307,12 @@ function ki(e = []) {
2302
2307
  });
2303
2308
  }), t;
2304
2309
  }
2305
- function Ai(e, t = []) {
2306
- let n = ki(t), r = (e, t = "") => {
2310
+ function Mi(e, t = []) {
2311
+ let n = ji(t), r = (e, t = "") => {
2307
2312
  if (typeof e == "string") {
2308
- let r = n.get(t) ?? {}, i = Di(e, r);
2313
+ let r = n.get(t) ?? {}, i = ki(e, r);
2309
2314
  if (i) throw Error(i);
2310
- return Ei(e, r);
2315
+ return Oi(e, r);
2311
2316
  }
2312
2317
  return Array.isArray(e) ? e.map((e) => r(e, `${t}[]`)) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, n]) => {
2313
2318
  if (e.startsWith("$") || e.includes(".") || e.includes("\0")) throw Error(`Unsafe object key: ${e}`);
@@ -2319,23 +2324,23 @@ function Ai(e, t = []) {
2319
2324
  }
2320
2325
  //#endregion
2321
2326
  //#region src/components/form/validationOverride.js
2322
- var ji = (e) => e === !0 || e === 1 || e === "1" || e === "true";
2323
- function Mi(e) {
2327
+ var Ni = (e) => e === !0 || e === 1 || e === "1" || e === "true";
2328
+ function Pi(e) {
2324
2329
  let t = e?.overrideCheckbox;
2325
- return !t || typeof t != "object" ? null : Pi(e).size > 0 ? t : null;
2330
+ return !t || typeof t != "object" ? null : Ii(e).size > 0 ? t : null;
2326
2331
  }
2327
- function Ni(e) {
2332
+ function Fi(e) {
2328
2333
  return String(e?.overrideCheckbox?.field ?? "").trim() || `${String(e?.field ?? "").replace(/\./g, "_")}__override`;
2329
2334
  }
2330
- function Pi(e) {
2335
+ function Ii(e) {
2331
2336
  let t = e?.overrideCheckbox?.skipValidations, n = Array.isArray(t) ? t : String(t ?? "").split(",");
2332
2337
  return new Set(n.map((e) => String(e ?? "").trim()).filter(Boolean));
2333
2338
  }
2334
- function Fi(e) {
2339
+ function Li(e) {
2335
2340
  return e?.overrideCheckbox?.store !== !1;
2336
2341
  }
2337
- function Ii(e, t, n) {
2338
- let r = Ni(e);
2342
+ function Ri(e, t, n) {
2343
+ let r = Fi(e);
2339
2344
  if (typeof n == "function") {
2340
2345
  let e = n(r);
2341
2346
  if (Array.isArray(e) && e.length) return [...e, r];
@@ -2346,27 +2351,27 @@ function Ii(e, t, n) {
2346
2351
  r
2347
2352
  ] : [r];
2348
2353
  }
2349
- function Li(e, t) {
2354
+ function zi(e, t) {
2350
2355
  return (n) => {
2351
2356
  let r = !1;
2352
2357
  try {
2353
- r = ji(n?.getFieldValue?.(t));
2358
+ r = Ni(n?.getFieldValue?.(t));
2354
2359
  } catch {
2355
2360
  r = !1;
2356
2361
  }
2357
2362
  return r ? {} : e;
2358
2363
  };
2359
2364
  }
2360
- function Ri(e, t, n, r) {
2361
- if (!Mi(e)) return r;
2362
- let i = Pi(e), a = Ii(e, t, n);
2365
+ function Bi(e, t, n, r) {
2366
+ if (!Pi(e)) return r;
2367
+ let i = Ii(e), a = Ri(e, t, n);
2363
2368
  return (e) => {
2364
2369
  let t = r(e), n = typeof e == "string" ? e : e?.type;
2365
- return i.has(n) ? Li(t, a) : t;
2370
+ return i.has(n) ? zi(t, a) : t;
2366
2371
  };
2367
2372
  }
2368
- function zi(e) {
2369
- let t = Mi(e) ?? {}, n = e?.label ?? e?.field ?? "this field";
2373
+ function Vi(e) {
2374
+ let t = Pi(e) ?? {}, n = e?.label ?? e?.field ?? "this field";
2370
2375
  return {
2371
2376
  tone: t.tone ?? "overwrite",
2372
2377
  title: t.confirmTitle || "Remove the validation on this field?",
@@ -2377,12 +2382,12 @@ function zi(e) {
2377
2382
  }
2378
2383
  //#endregion
2379
2384
  //#region src/components/form/optionMatching.js
2380
- function Bi(e) {
2385
+ function Hi(e) {
2381
2386
  return String(e ?? "").normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "");
2382
2387
  }
2383
- function Vi(e) {
2388
+ function Ui(e) {
2384
2389
  let t = /* @__PURE__ */ new Map(), n = (e, n) => {
2385
- let r = Bi(e);
2390
+ let r = Hi(e);
2386
2391
  r && !t.has(r) && t.set(r, n);
2387
2392
  };
2388
2393
  return (Array.isArray(e?.options) ? e.options : []).forEach((e) => {
@@ -2390,39 +2395,39 @@ function Vi(e) {
2390
2395
  let t = typeof e == "object" ? e.value : e;
2391
2396
  t != null && t !== "" && (n(t, t), typeof e == "object" && e.label !== void 0 && n(e.label, t));
2392
2397
  }), Object.entries(e?.optionAliases ?? {}).forEach(([e, r]) => {
2393
- let i = t.get(Bi(r));
2398
+ let i = t.get(Hi(r));
2394
2399
  i !== void 0 && n(e, i);
2395
2400
  }), t;
2396
2401
  }
2397
- var Hi = (e) => Array.isArray(e?.options) && e.options.length > 0;
2398
- function Ui(e, t) {
2402
+ var Wi = (e) => Array.isArray(e?.options) && e.options.length > 0;
2403
+ function Gi(e, t) {
2399
2404
  if (t == null || t === "" || typeof t == "object") return t;
2400
- let n = e.get(Bi(t));
2405
+ let n = e.get(Hi(t));
2401
2406
  return n === void 0 ? t : n;
2402
2407
  }
2403
- function Wi(e, t) {
2404
- if (!Hi(e)) return t;
2405
- let n = Vi(e);
2406
- return n.size === 0 ? t : Array.isArray(t) ? t.map((e) => Ui(n, e)) : Ui(n, t);
2408
+ function Ki(e, t) {
2409
+ if (!Wi(e)) return t;
2410
+ let n = Ui(e);
2411
+ return n.size === 0 ? t : Array.isArray(t) ? t.map((e) => Gi(n, e)) : Gi(n, t);
2407
2412
  }
2408
2413
  //#endregion
2409
2414
  //#region src/components/form/mountDefaultValue.js
2410
- function Gi(e = {}) {
2415
+ function qi(e = {}) {
2411
2416
  let t = e?.defaultValue;
2412
2417
  if (t === void 0 || t === "") return;
2413
- if (e?.type === "time") return Ji(t);
2418
+ if (e?.type === "time") return Xi(t);
2414
2419
  if (e?.type !== "checkbox") return t;
2415
2420
  let n = Array.isArray(e.options) ? e.options : [];
2416
2421
  if (!n.length) return t;
2417
2422
  let r = n.map((e) => String(e && typeof e == "object" ? e.value : e));
2418
2423
  return (Array.isArray(t) ? t : [t]).some((e) => r.includes(String(e))) ? t : void 0;
2419
2424
  }
2420
- var Ki = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*([ap]\.?\s?m\.?)?$/i, qi = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;
2421
- function Ji(e) {
2425
+ var Ji = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*([ap]\.?\s?m\.?)?$/i, Yi = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;
2426
+ function Xi(e) {
2422
2427
  if (e == null || e === "") return;
2423
2428
  if (T.isDayjs(e)) return e.isValid() ? e : void 0;
2424
2429
  if (typeof e != "string") return;
2425
- let t = e.trim(), n = t.match(Ki);
2430
+ let t = e.trim(), n = t.match(Ji);
2426
2431
  if (n) {
2427
2432
  let e = Number(n[1]), t = Number(n[2]), r = Number(n[3] ?? 0), i = n[4]?.replace(/[.\s]/g, "").toLowerCase();
2428
2433
  if (i) {
@@ -2431,27 +2436,27 @@ function Ji(e) {
2431
2436
  }
2432
2437
  return e > 23 || t > 59 || r > 59 ? void 0 : T().hour(e).minute(t).second(r).millisecond(0);
2433
2438
  }
2434
- if (qi.test(t)) {
2439
+ if (Yi.test(t)) {
2435
2440
  let e = T(t);
2436
2441
  return e.isValid() ? e : void 0;
2437
2442
  }
2438
2443
  }
2439
2444
  //#endregion
2440
2445
  //#region src/components/form/payloadTransformer.js
2441
- var z = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0, Yi = (e) => e === !0 || e === 1 || e === "1", B = (e) => typeof e == "object" && !!e && !Array.isArray(e) && !Xi(e);
2442
- function Xi(e) {
2446
+ var z = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0, Zi = (e) => e === !0 || e === 1 || e === "1", B = (e) => typeof e == "object" && !!e && !Array.isArray(e) && !Qi(e);
2447
+ function Qi(e) {
2443
2448
  return e && typeof e == "object" && typeof e.format == "function" && typeof e.isValid == "function";
2444
2449
  }
2445
- function Zi(e) {
2446
- return Xi(e) || e instanceof Date;
2450
+ function $i(e) {
2451
+ return Qi(e) || e instanceof Date;
2447
2452
  }
2448
- function Qi(e) {
2449
- return e instanceof Date ? e.toISOString() : Xi(e) ? e.isValid() ? e.toISOString() : null : e;
2453
+ function ea(e) {
2454
+ return e instanceof Date ? e.toISOString() : Qi(e) ? e.isValid() ? e.toISOString() : null : e;
2450
2455
  }
2451
- function $i(e, t) {
2452
- if (!sr(t)) return Qi(e);
2453
- let n = cr(e);
2454
- return n ? n.toISOString() : Qi(e);
2456
+ function ta(e, t) {
2457
+ if (!lr(t)) return ea(e);
2458
+ let n = ur(e);
2459
+ return n ? n.toISOString() : ea(e);
2455
2460
  }
2456
2461
  function V(e, t) {
2457
2462
  if (!t) return;
@@ -2476,7 +2481,7 @@ function W(e, t, n) {
2476
2481
  }
2477
2482
  return i[r[r.length - 1]] = n, e;
2478
2483
  }
2479
- function ea(e, t, n) {
2484
+ function na(e, t, n) {
2480
2485
  let r = String(t).split("."), i = e;
2481
2486
  for (let e = 0; e < r.length - 1; e += 1) {
2482
2487
  let t = r[e];
@@ -2488,24 +2493,24 @@ function ea(e, t, n) {
2488
2493
  ...i[a]
2489
2494
  } : n, e;
2490
2495
  }
2491
- function ta(e) {
2496
+ function ra(e) {
2492
2497
  let t = Array.isArray(e) ? e : e == null ? [] : [e];
2493
2498
  if (!t.length || t.some((e) => e?.originFileObj)) return;
2494
2499
  let n = t.map((e) => e?.stored).filter((e) => e != null);
2495
2500
  if (n.length) return n.length === 1 && t.length === 1 ? n[0] : n;
2496
2501
  }
2497
- function na(e, t) {
2502
+ function ia(e, t) {
2498
2503
  return Object.entries(t ?? {}).forEach(([t, n]) => {
2499
- B(n) && B(e[t]) ? na(e[t], n) : e[t] = n;
2504
+ B(n) && B(e[t]) ? ia(e[t], n) : e[t] = n;
2500
2505
  }), e;
2501
2506
  }
2502
- function ra(e, t) {
2507
+ function aa(e, t) {
2503
2508
  let n = e.options ?? e.values ?? [];
2504
2509
  for (let e of n) if (typeof e == "string") {
2505
2510
  if (e === t) return e;
2506
2511
  } else if ((e.value ?? e.id ?? e.name ?? e.label) === t) return e.label ?? e.name ?? e.value;
2507
2512
  }
2508
- function ia(e, t) {
2513
+ function oa(e, t) {
2509
2514
  if (B(e)) {
2510
2515
  let n = (t.valueKey && e[t.valueKey]) ?? e.value ?? e.id ?? e._id ?? e.key ?? e.code;
2511
2516
  return {
@@ -2515,10 +2520,10 @@ function ia(e, t) {
2515
2520
  }
2516
2521
  return {
2517
2522
  value: e,
2518
- label: ra(t, e) ?? e
2523
+ label: aa(t, e) ?? e
2519
2524
  };
2520
2525
  }
2521
- function aa(e = {}) {
2526
+ function sa(e = {}) {
2522
2527
  if (e.dataType && e.dataType !== "auto") return e.dataType;
2523
2528
  if (e.multiSelect || e.mode === "multiple" || e.addRow) return "array";
2524
2529
  switch (e.type) {
@@ -2529,13 +2534,13 @@ function aa(e = {}) {
2529
2534
  }
2530
2535
  }
2531
2536
  function G(e, t, n = {}) {
2532
- if (Zi(e)) {
2533
- if (t === "string") return $i(e, n);
2537
+ if ($i(e)) {
2538
+ if (t === "string") return ta(e, n);
2534
2539
  if (t === "number") {
2535
- let t = Xi(e) ? e.valueOf() : e.getTime();
2540
+ let t = Qi(e) ? e.valueOf() : e.getTime();
2536
2541
  return Number.isNaN(t) ? null : t;
2537
2542
  }
2538
- if (t === "date" || t === "auto" || !t) return $i(e, n);
2543
+ if (t === "date" || t === "auto" || !t) return ta(e, n);
2539
2544
  }
2540
2545
  switch (t) {
2541
2546
  case "string": return e == null ? "" : String(e);
@@ -2550,14 +2555,14 @@ function G(e, t, n = {}) {
2550
2555
  return t = Array.isArray(e) ? e : z(e) ? [] : typeof e == "string" && e.includes(",") ? e.split(",").map((e) => e.trim()).filter(Boolean) : [e], n.elementType ? t.map((e) => G(e, n.elementType, {})).filter((e) => e != null && e !== "") : t;
2551
2556
  }
2552
2557
  case "object": return B(e), e;
2553
- case "date": return $i(e, n);
2558
+ case "date": return ta(e, n);
2554
2559
  case "custom":
2555
2560
  case "auto":
2556
2561
  case void 0:
2557
2562
  default: return e;
2558
2563
  }
2559
2564
  }
2560
- var oa = {
2565
+ var ca = {
2561
2566
  firstChecked: (e) => Array.isArray(e) ? e[0] : e,
2562
2567
  csvToArray: (e) => typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : e,
2563
2568
  arrayToCsv: (e) => Array.isArray(e) ? e.join(",") : e,
@@ -2565,11 +2570,11 @@ var oa = {
2565
2570
  upper: (e) => typeof e == "string" ? e.toUpperCase() : e,
2566
2571
  lower: (e) => typeof e == "string" ? e.toLowerCase() : e
2567
2572
  };
2568
- function sa(e, t) {
2573
+ function la(e, t) {
2569
2574
  if (!t) return e;
2570
2575
  let n = t;
2571
2576
  if (typeof n == "string") {
2572
- if (oa[n]) return oa[n](e);
2577
+ if (ca[n]) return ca[n](e);
2573
2578
  try {
2574
2579
  n = JSON.parse(n);
2575
2580
  } catch {
@@ -2577,14 +2582,14 @@ function sa(e, t) {
2577
2582
  }
2578
2583
  }
2579
2584
  let r = e;
2580
- if (n.name && oa[n.name] && (r = oa[n.name](r)), n.map && typeof n.map == "object") {
2585
+ if (n.name && ca[n.name] && (r = ca[n.name](r)), n.map && typeof n.map == "object") {
2581
2586
  let e = String(Array.isArray(r) ? r[0] : r);
2582
2587
  Object.prototype.hasOwnProperty.call(n.map, e) ? r = n.map[e] : n.default !== void 0 && (r = n.default);
2583
2588
  }
2584
2589
  return r;
2585
2590
  }
2586
- var ca = /\{\{\s*([\w.]+)\s*\}\}/g;
2587
- function la(e, t) {
2591
+ var ua = /\{\{\s*([\w.]+)\s*\}\}/g;
2592
+ function da(e, t) {
2588
2593
  let [n, ...r] = e.split("."), i;
2589
2594
  if (n === "value") i = t.value;
2590
2595
  else if (n === "label") i = t.label;
@@ -2592,24 +2597,24 @@ function la(e, t) {
2592
2597
  else return;
2593
2598
  return r.length ? V(i, r.join(".")) : i;
2594
2599
  }
2595
- function ua(e, t) {
2600
+ function fa(e, t) {
2596
2601
  if (typeof e == "string") {
2597
2602
  let n = e.match(/^\{\{\s*([\w.]+)\s*\}\}$/);
2598
- return n ? la(n[1], t) : e.replace(ca, (e, n) => {
2599
- let r = la(n, t);
2603
+ return n ? da(n[1], t) : e.replace(ua, (e, n) => {
2604
+ let r = da(n, t);
2600
2605
  return r == null ? "" : String(r);
2601
2606
  });
2602
2607
  }
2603
- if (Array.isArray(e)) return e.map((e) => ua(e, t));
2608
+ if (Array.isArray(e)) return e.map((e) => fa(e, t));
2604
2609
  if (B(e)) {
2605
2610
  let n = {};
2606
2611
  return Object.entries(e).forEach(([e, r]) => {
2607
- n[e] = ua(r, t);
2612
+ n[e] = fa(r, t);
2608
2613
  }), n;
2609
2614
  }
2610
2615
  return e;
2611
2616
  }
2612
- function da(e) {
2617
+ function pa(e) {
2613
2618
  if (!e) return null;
2614
2619
  if (typeof e == "string") try {
2615
2620
  return JSON.parse(e);
@@ -2618,8 +2623,8 @@ function da(e) {
2618
2623
  }
2619
2624
  return e;
2620
2625
  }
2621
- function fa(e, t) {
2622
- let n = e.payloadMode || "auto", r = aa(e), { value: i, label: a } = ia(t, e);
2626
+ function ma(e, t) {
2627
+ let n = e.payloadMode || "auto", r = sa(e), { value: i, label: a } = oa(t, e);
2623
2628
  switch (n) {
2624
2629
  case "value": return {
2625
2630
  kind: "scalar",
@@ -2641,12 +2646,12 @@ function fa(e, t) {
2641
2646
  }
2642
2647
  case "custom":
2643
2648
  case "template": {
2644
- let n = da(e.payloadTemplate);
2649
+ let n = pa(e.payloadTemplate);
2645
2650
  if (!n) return {
2646
2651
  kind: "scalar",
2647
2652
  out: G(i, r, e)
2648
2653
  };
2649
- let o = ua(n, {
2654
+ let o = fa(n, {
2650
2655
  value: G(i, e.elementType || "auto", {}),
2651
2656
  label: a,
2652
2657
  raw: t
@@ -2662,23 +2667,23 @@ function fa(e, t) {
2662
2667
  };
2663
2668
  }
2664
2669
  }
2665
- function pa(e = {}) {
2670
+ function ha(e = {}) {
2666
2671
  let t = e.defaultValue;
2667
- if (t !== void 0 && t !== "") return e.type === "time" ? Ji(t) : t;
2672
+ if (t !== void 0 && t !== "") return e.type === "time" ? Xi(t) : t;
2668
2673
  }
2669
- function ma(e, t) {
2674
+ function ga(e, t) {
2670
2675
  if (e.payloadMode === "skip") return { kind: "skip" };
2671
2676
  let n = t;
2672
2677
  if (z(n)) {
2673
- let t = pa(e);
2678
+ let t = ha(e);
2674
2679
  t !== void 0 && (n = t);
2675
2680
  }
2676
- return n = sa(n, e.transformRule), z(n) && e.omitEmpty ? { kind: "skip" } : Array.isArray(n) && (aa(e) === "array" || e.payloadMode === "object") && e.payloadMode && e.payloadMode !== "value" && e.payloadMode !== "auto" ? {
2681
+ return n = la(n, e.transformRule), z(n) && e.omitEmpty ? { kind: "skip" } : Array.isArray(n) && (sa(e) === "array" || e.payloadMode === "object") && e.payloadMode && e.payloadMode !== "value" && e.payloadMode !== "auto" ? {
2677
2682
  kind: "scalar",
2678
- out: n.map((t) => fa(e, t).out)
2679
- } : fa(e, n);
2683
+ out: n.map((t) => ma(e, t).out)
2684
+ } : ma(e, n);
2680
2685
  }
2681
- function ha(e = {}) {
2686
+ function _a(e = {}) {
2682
2687
  return !!e.richValue || [
2683
2688
  "label",
2684
2689
  "object",
@@ -2686,8 +2691,8 @@ function ha(e = {}) {
2686
2691
  "template"
2687
2692
  ].includes(e.payloadMode);
2688
2693
  }
2689
- function ga(e, t, n = []) {
2690
- if (!ha(e) || t == null) return t;
2694
+ function va(e, t, n = []) {
2695
+ if (!_a(e) || t == null) return t;
2691
2696
  let r = (e) => {
2692
2697
  if (B(e) && e.value !== void 0) return e;
2693
2698
  let t = n.find((t) => String(t?.value ?? "") === String(e) || String(t?.label ?? "") === String(e));
@@ -2698,7 +2703,7 @@ function ga(e, t, n = []) {
2698
2703
  };
2699
2704
  return Array.isArray(t) ? t.map(r) : r(t);
2700
2705
  }
2701
- function _a(e, t, n) {
2706
+ function ya(e, t, n) {
2702
2707
  if (!e?.field) return !0;
2703
2708
  let r = U(t, e.field) ? H(t, e.field) : H(n ?? t, e.field), i = () => String(e.value ?? "").split(",").map((e) => e.trim());
2704
2709
  switch (e.operator) {
@@ -2712,44 +2717,44 @@ function _a(e, t, n) {
2712
2717
  default: return !0;
2713
2718
  }
2714
2719
  }
2715
- function va(e) {
2720
+ function ba(e) {
2716
2721
  let t = [];
2717
2722
  return e?.field && t.push(e.field), Array.isArray(e?.conditions) && e.conditions.forEach((e) => {
2718
2723
  e?.field && t.push(e.field);
2719
2724
  }), t;
2720
2725
  }
2721
- function ya(e, t, n) {
2726
+ function xa(e, t, n) {
2722
2727
  if (!e) return !0;
2723
2728
  let r = Array.isArray(e.conditions) ? e.conditions.filter((e) => e?.field) : [];
2724
2729
  if (r.length) {
2725
- let i = r.map((e) => _a(e, t, n)), a = String(e.logic ?? "and").toLowerCase() === "or", o = a ? i.some(Boolean) : i.every(Boolean);
2730
+ let i = r.map((e) => ya(e, t, n)), a = String(e.logic ?? "and").toLowerCase() === "or", o = a ? i.some(Boolean) : i.every(Boolean);
2726
2731
  if (e.field) {
2727
- let r = _a(e, t, n);
2732
+ let r = ya(e, t, n);
2728
2733
  o = a ? o || r : o && r;
2729
2734
  }
2730
2735
  return o;
2731
2736
  }
2732
- return _a(e, t, n);
2737
+ return ya(e, t, n);
2733
2738
  }
2734
- function ba(e, t, n, r, i = /* @__PURE__ */ new Set()) {
2735
- let a = va(e?.showIf);
2736
- return !a.length || i.has(e.field) ? !0 : (i.add(e.field), ya(e.showIf, t, n) ? a.every((e) => {
2739
+ function Sa(e, t, n, r, i = /* @__PURE__ */ new Set()) {
2740
+ let a = ba(e?.showIf);
2741
+ return !a.length || i.has(e.field) ? !0 : (i.add(e.field), xa(e.showIf, t, n) ? a.every((e) => {
2737
2742
  let a = r?.get?.(e);
2738
- return !a || ba(a, t, n, r, i);
2743
+ return !a || Sa(a, t, n, r, i);
2739
2744
  }) : !1);
2740
2745
  }
2741
- function xa(e = []) {
2746
+ function Ca(e = []) {
2742
2747
  let t = /* @__PURE__ */ new Map();
2743
2748
  return e.forEach((e) => (e.fields ?? []).forEach((e) => {
2744
2749
  e?.field && !t.has(e.field) && t.set(e.field, e);
2745
2750
  })), t;
2746
2751
  }
2747
- function Sa(e = {}, { editing: t = !1 } = {}) {
2752
+ function wa(e = {}, { editing: t = !1 } = {}) {
2748
2753
  let n = {};
2749
2754
  return (e.fields ?? []).forEach((e) => {
2750
- if (!(!e.field || Ta(e)) && !(t && !e.defaultOnEdit) && e.defaultValue !== void 0 && e.defaultValue !== "") {
2755
+ if (!(!e.field || K(e)) && !(t && !e.defaultOnEdit) && e.defaultValue !== void 0 && e.defaultValue !== "") {
2751
2756
  if (e.type === "time") {
2752
- let t = Ji(e.defaultValue);
2757
+ let t = Xi(e.defaultValue);
2753
2758
  t !== void 0 && (n[e.field] = t);
2754
2759
  return;
2755
2760
  }
@@ -2757,7 +2762,7 @@ function Sa(e = {}, { editing: t = !1 } = {}) {
2757
2762
  }
2758
2763
  }), n;
2759
2764
  }
2760
- function Ca(e = []) {
2765
+ function Ta(e = []) {
2761
2766
  let t = [];
2762
2767
  return e.forEach((e) => {
2763
2768
  (e.fields ?? []).forEach((n) => {
@@ -2768,27 +2773,27 @@ function Ca(e = []) {
2768
2773
  });
2769
2774
  }), t;
2770
2775
  }
2771
- var wa = [
2776
+ var Ea = [
2772
2777
  "file",
2773
2778
  "document",
2774
2779
  "image",
2775
2780
  "upload",
2776
2781
  "attachment"
2777
2782
  ];
2778
- function Ta(e) {
2779
- return wa.includes(String(e?.type ?? "").trim().toLowerCase());
2783
+ function K(e) {
2784
+ return Ea.includes(String(e?.type ?? "").trim().toLowerCase());
2780
2785
  }
2781
- function Ea(e = []) {
2782
- return Ca(e).map(({ field: e }) => e).filter(Ta);
2786
+ function Da(e = []) {
2787
+ return Ta(e).map(({ field: e }) => e).filter(K);
2783
2788
  }
2784
- function Da(e) {
2789
+ function Oa(e) {
2785
2790
  return String(e ?? "").trim().toLowerCase();
2786
2791
  }
2787
- function Oa(e, t) {
2788
- return !!t && Da(e.moduleName) === t;
2792
+ function ka(e, t) {
2793
+ return !!t && Oa(e.moduleName) === t;
2789
2794
  }
2790
- function ka(e, t = [], n = {}) {
2791
- let r = [], i = n.scope ?? "all", a = Da(n.module), o = (e, t) => {
2795
+ function Aa(e, t = [], n = {}) {
2796
+ let r = [], i = n.scope ?? "all", a = Oa(n.module), o = (e, t) => {
2792
2797
  t != null && (Array.isArray(t) ? t : [t]).forEach((t) => {
2793
2798
  let n = t?.originFileObj || t;
2794
2799
  (typeof File < "u" && n instanceof File || typeof Blob < "u" && n instanceof Blob) && r.push({
@@ -2798,9 +2803,9 @@ function ka(e, t = [], n = {}) {
2798
2803
  });
2799
2804
  };
2800
2805
  return (t ?? []).forEach((t) => {
2801
- let r = (t.fields ?? []).filter(Ta);
2806
+ let r = (t.fields ?? []).filter(K);
2802
2807
  if (!r.length) return;
2803
- let s = t.moduleName && !Oa(t, a), c = (e) => s ? `__mw__${t.moduleName}__${e}` : e;
2808
+ let s = t.moduleName && !ka(t, a), c = (e) => s ? `__mw__${t.moduleName}__${e}` : e;
2804
2809
  if (t.addRow) {
2805
2810
  if (i === "flat") return;
2806
2811
  let a = e[t.name];
@@ -2820,12 +2825,12 @@ function ka(e, t = [], n = {}) {
2820
2825
  });
2821
2826
  }), r;
2822
2827
  }
2823
- function Aa(e, t, n = {}) {
2828
+ function ja(e, t, n = {}) {
2824
2829
  let r = B(n.base) ? structuredClone(n.base) : {};
2825
- Ea(t).forEach((e) => {
2826
- (e.payloadKey || e.field) && (Na(r, e.payloadKey || e.field), Na(r, e.field));
2830
+ Da(t).forEach((e) => {
2831
+ (e.payloadKey || e.field) && (Pa(r, e.payloadKey || e.field), Pa(r, e.field));
2827
2832
  });
2828
- let i = Da(n.module), a = xa(t), o = /* @__PURE__ */ new Map(), s = (e) => !e.moduleName || Oa(e, i) ? r : (o.has(e.moduleName) || o.set(e.moduleName, {}), o.get(e.moduleName));
2833
+ let i = Oa(n.module), a = Ca(t), o = /* @__PURE__ */ new Map(), s = (e) => !e.moduleName || ka(e, i) ? r : (o.has(e.moduleName) || o.set(e.moduleName, {}), o.get(e.moduleName));
2829
2834
  return (t ?? []).forEach((t) => {
2830
2835
  let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField && U(e, t.toggleField) ? !!H(e, t.toggleField) : !1;
2831
2836
  if (t.toggleEnabled && t.toggleField && U(e, t.toggleField) && (W(n, t.toggleField, i), i && t.addRow)) {
@@ -2835,29 +2840,29 @@ function Aa(e, t, n = {}) {
2835
2840
  if (t.addRow) {
2836
2841
  let i = e[t.name];
2837
2842
  if (!Array.isArray(i)) return;
2838
- W(n, t.payloadKey || t.name, i.map((t) => Ma(r, t, e, a)).filter((e) => e && Object.keys(e).length > 0));
2843
+ W(n, t.payloadKey || t.name, i.map((t) => Na(r, t, e, a)).filter((e) => e && Object.keys(e).length > 0));
2839
2844
  return;
2840
2845
  }
2841
- r.forEach((t) => ja(t, e, n, e, a));
2846
+ r.forEach((t) => Ma(t, e, n, e, a));
2842
2847
  }), o.size > 0 && (r.moduleWrites = Array.from(o, ([e, t]) => ({
2843
2848
  moduleName: e,
2844
2849
  data: t
2845
- }))), Ai(r, t);
2850
+ }))), Mi(r, t);
2846
2851
  }
2847
- function ja(e, t, n, r, i) {
2848
- if (Mi(e) && Fi(e)) {
2849
- let r = Ni(e);
2852
+ function Ma(e, t, n, r, i) {
2853
+ if (Pi(e) && Li(e)) {
2854
+ let r = Fi(e);
2850
2855
  U(t, r) && W(n, r, !!H(t, r));
2851
2856
  }
2852
- if (Ta(e)) {
2853
- let i = ta(H(t, e.field));
2857
+ if (K(e)) {
2858
+ let i = ra(H(t, e.field));
2854
2859
  if (i !== void 0) {
2855
2860
  let a = r !== void 0 && r !== t;
2856
- ea(n, e.payloadKey || (a ? e.field : e.fileKey || e.field), i);
2861
+ na(n, e.payloadKey || (a ? e.field : e.fileKey || e.field), i);
2857
2862
  }
2858
2863
  return;
2859
2864
  }
2860
- if (va(e.showIf).length && !ba(e, t, r, i)) {
2865
+ if (ba(e.showIf).length && !Sa(e, t, r, i)) {
2861
2866
  (r === void 0 || r === t) && U(t, e.field) && W(n, e.payloadKey || e.field, null);
2862
2867
  return;
2863
2868
  }
@@ -2865,30 +2870,30 @@ function ja(e, t, n, r, i) {
2865
2870
  if (!U(t, e.field)) return;
2866
2871
  let a = H(t, e.field);
2867
2872
  if (!Array.isArray(a)) return;
2868
- let o = a.map((t) => Ma(e.subFields, t, r, i)).filter((e) => e && Object.keys(e).length > 0);
2873
+ let o = a.map((t) => Na(e.subFields, t, r, i)).filter((e) => e && Object.keys(e).length > 0);
2869
2874
  W(n, e.payloadKey || e.field, o);
2870
2875
  return;
2871
2876
  }
2872
2877
  if (!U(t, e.field)) return;
2873
- if (Yi(e.addRow) && (!Array.isArray(e.subFields) || e.subFields.length === 0)) {
2874
- let r = H(t, e.field), i = Array.isArray(r) ? r : z(r) ? [] : [r], a = Fa(e), o = i.map((e) => ma(a, e)).filter((e) => e.kind !== "skip").map((e) => e.out);
2878
+ if (Zi(e.addRow) && (!Array.isArray(e.subFields) || e.subFields.length === 0)) {
2879
+ let r = H(t, e.field), i = Array.isArray(r) ? r : z(r) ? [] : [r], a = Ia(e), o = i.map((e) => ga(a, e)).filter((e) => e.kind !== "skip").map((e) => e.out);
2875
2880
  W(n, e.payloadKey || e.field, o);
2876
2881
  return;
2877
2882
  }
2878
- let a = ma(e, H(t, e.field));
2883
+ let a = ga(e, H(t, e.field));
2879
2884
  if (a.kind !== "skip") {
2880
2885
  if (a.kind === "spread" && B(a.out)) {
2881
- na(n, a.out);
2886
+ ia(n, a.out);
2882
2887
  return;
2883
2888
  }
2884
2889
  W(n, e.payloadKey || e.field, a.out);
2885
2890
  }
2886
2891
  }
2887
- function Ma(e, t, n, r) {
2892
+ function Na(e, t, n, r) {
2888
2893
  let i = {};
2889
- return e.forEach((e) => ja(e, t, i, n ?? t, r)), i;
2894
+ return e.forEach((e) => Ma(e, t, i, n ?? t, r)), i;
2890
2895
  }
2891
- function Na(e, t) {
2896
+ function Pa(e, t) {
2892
2897
  let n = String(t).split("."), r = e;
2893
2898
  for (let e = 0; e < n.length - 1; e += 1) {
2894
2899
  if (!B(r[n[e]])) return;
@@ -2896,7 +2901,7 @@ function Na(e, t) {
2896
2901
  }
2897
2902
  delete r[n[n.length - 1]];
2898
2903
  }
2899
- var Pa = /* @__PURE__ */ new Set([
2904
+ var Fa = /* @__PURE__ */ new Set([
2900
2905
  "text",
2901
2906
  "textarea",
2902
2907
  "email",
@@ -2908,11 +2913,11 @@ var Pa = /* @__PURE__ */ new Set([
2908
2913
  "datetime",
2909
2914
  "password"
2910
2915
  ]);
2911
- function K(e, t) {
2912
- let n = (t) => (Array.isArray(e.emptyValues) ? e.emptyValues : []).some((e) => String(e) === String(t)), r = () => e.defaultOnEdit ? pa(e) : void 0;
2916
+ function q(e, t) {
2917
+ let n = (t) => (Array.isArray(e.emptyValues) ? e.emptyValues : []).some((e) => String(e) === String(t)), r = () => e.defaultOnEdit ? ha(e) : void 0;
2913
2918
  if (t == null) return r() ?? t;
2914
2919
  if (n(t) || z(t) && r() !== void 0) return r();
2915
- if (Pa.has(e.type) && B(t)) {
2920
+ if (Fa.has(e.type) && B(t)) {
2916
2921
  let n = String(e.payloadKey || e.field || "").split(".").pop(), r = n ? t[n] : void 0;
2917
2922
  if (r === void 0 || B(r)) return;
2918
2923
  t = r;
@@ -2922,8 +2927,8 @@ function K(e, t) {
2922
2927
  let e = T(t);
2923
2928
  return e.isValid() ? e : null;
2924
2929
  }
2925
- t = Wi(e, t);
2926
- let i = (t) => B(t) ? (e.valueKey && t[e.valueKey]) ?? t.id ?? t._id ?? t.value ?? t.userId ?? t.recruiterId : t, a = e.type !== "radio" && aa(e) === "array", o = (t) => {
2930
+ t = Ki(e, t);
2931
+ let i = (t) => B(t) ? (e.valueKey && t[e.valueKey]) ?? t.id ?? t._id ?? t.value ?? t.userId ?? t.recruiterId : t, a = e.type !== "radio" && sa(e) === "array", o = (t) => {
2927
2932
  if (t == null || t === "" || !Array.isArray(e.options)) return t;
2928
2933
  let n = e.options.find((e) => String(e?.value ?? "").toLowerCase() === String(t).toLowerCase());
2929
2934
  return n ? n.value : t;
@@ -2935,7 +2940,7 @@ function K(e, t) {
2935
2940
  }
2936
2941
  return t;
2937
2942
  }
2938
- function Fa(e = {}) {
2943
+ function Ia(e = {}) {
2939
2944
  return {
2940
2945
  ...e,
2941
2946
  addRow: !1,
@@ -2944,26 +2949,26 @@ function Fa(e = {}) {
2944
2949
  dataType: void 0
2945
2950
  };
2946
2951
  }
2947
- function Ia(e, t) {
2952
+ function La(e, t) {
2948
2953
  let n = Math.max(0, Number(e.minRows ?? 0) || 0), r = e.initialRows !== void 0 && e.initialRows !== "" ? Math.max(n, Math.max(0, Number(e.initialRows) || 0)) : n;
2949
2954
  if (Array.isArray(e.subFields) && e.subFields.length > 0) {
2950
2955
  let i = [];
2951
2956
  Array.isArray(t) && (i = t.map((t) => {
2952
2957
  let n = {};
2953
2958
  return e.subFields.forEach((e) => {
2954
- if (!e.field || Ta(e)) return;
2959
+ if (!e.field || K(e)) return;
2955
2960
  let r = V(t ?? {}, e.field) ?? (t ?? {})[e.field];
2956
- r != null && (n[e.field] = K(e, r));
2961
+ r != null && (n[e.field] = q(e, r));
2957
2962
  }), n;
2958
2963
  }));
2959
2964
  let a = i.length > 0 ? n : Math.max(n, r);
2960
2965
  for (; i.length < a;) i.push({});
2961
2966
  return i;
2962
2967
  }
2963
- let i = Fa(e), a = [];
2964
- if (Array.isArray(t)) a = t.map((e) => K(i, e)).filter((e) => e != null && e !== "");
2968
+ let i = Ia(e), a = [];
2969
+ if (Array.isArray(t)) a = t.map((e) => q(i, e)).filter((e) => e != null && e !== "");
2965
2970
  else if (t != null && t !== "") {
2966
- let e = K(i, t);
2971
+ let e = q(i, t);
2967
2972
  e != null && e !== "" && (a = [e]);
2968
2973
  }
2969
2974
  let o = a.length > 0 ? n : Math.max(n, r);
@@ -2972,12 +2977,12 @@ function Ia(e, t) {
2972
2977
  }
2973
2978
  //#endregion
2974
2979
  //#region src/components/form/linkedAddRowGroups.js
2975
- var La = (e) => e === !0 || e === 1 || e === "1";
2976
- function Ra(e = []) {
2980
+ var Ra = (e) => e === !0 || e === 1 || e === "1";
2981
+ function za(e = []) {
2977
2982
  let t = /* @__PURE__ */ new Map();
2978
2983
  e.forEach((e) => {
2979
2984
  let n = e?.linkGroup;
2980
- !La(e?.addRow) || !n || (t.has(n) || t.set(n, []), t.get(n).push(e.name));
2985
+ !Ra(e?.addRow) || !n || (t.has(n) || t.set(n, []), t.get(n).push(e.name));
2981
2986
  });
2982
2987
  let n = /* @__PURE__ */ new Map();
2983
2988
  return t.forEach((e, t) => {
@@ -2987,11 +2992,11 @@ function Ra(e = []) {
2987
2992
  });
2988
2993
  }), n;
2989
2994
  }
2990
- function za(e, t) {
2995
+ function Ba(e, t) {
2991
2996
  for (let n of e.values()) if (n.memberNames.includes(t)) return n;
2992
2997
  return null;
2993
2998
  }
2994
- function Ba(e, t = {}) {
2999
+ function Va(e, t = {}) {
2995
3000
  let n = { ...t };
2996
3001
  return e.forEach(({ memberNames: e }) => {
2997
3002
  let t = Math.max(...e.map((e) => (n[e] ?? []).length));
@@ -3003,7 +3008,7 @@ function Ba(e, t = {}) {
3003
3008
  }
3004
3009
  //#endregion
3005
3010
  //#region src/components/form/formDecisionDialog.jsx
3006
- var Va = {
3011
+ var Ha = {
3007
3012
  duplicate: {
3008
3013
  className: "fdd-tone-amber",
3009
3014
  Icon: he
@@ -3021,8 +3026,8 @@ var Va = {
3021
3026
  Icon: de
3022
3027
  }
3023
3028
  };
3024
- function Ha({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText: i = "Continue", cancelText: a = "Cancel", danger: o = !1, footnote: s } = {}) {
3025
- let { className: c, Icon: l } = Va[e] ?? Va.suggestion, u = r.filter((e) => e && e.value !== void 0 && e.value !== null && String(e.value).trim() !== "");
3029
+ function Ua({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText: i = "Continue", cancelText: a = "Cancel", danger: o = !1, footnote: s } = {}) {
3030
+ let { className: c, Icon: l } = Ha[e] ?? Ha.suggestion, u = r.filter((e) => e && e.value !== void 0 && e.value !== null && String(e.value).trim() !== "");
3026
3031
  return new Promise((e) => {
3027
3032
  ee.confirm({
3028
3033
  icon: null,
@@ -3072,8 +3077,8 @@ function Ha({ tone: e = "suggestion", title: t, body: n, facts: r = [], okText:
3072
3077
  });
3073
3078
  });
3074
3079
  }
3075
- function Ua({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i = "Go back" } = {}) {
3076
- let { className: a, Icon: o } = Va[e] ?? Va.suggestion, s = r.filter((e) => e && String(e.value ?? "").trim() !== "");
3080
+ function Wa({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i = "Go back" } = {}) {
3081
+ let { className: a, Icon: o } = Ha[e] ?? Ha.suggestion, s = r.filter((e) => e && String(e.value ?? "").trim() !== "");
3077
3082
  return new Promise((e) => {
3078
3083
  ee.warning({
3079
3084
  icon: null,
@@ -3115,7 +3120,7 @@ function Ua({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i
3115
3120
  }
3116
3121
  //#endregion
3117
3122
  //#region src/services/aiActionApi.js
3118
- async function Wa({ module: e, group: t, field: n, actionKey: i, inputs: a = {}, files: o = {} }) {
3123
+ async function Ga({ module: e, group: t, field: n, actionKey: i, inputs: a = {}, files: o = {} }) {
3119
3124
  if (!e || !t || !n || !i) throw Error("module, group, field and actionKey are required to run an AI action");
3120
3125
  let c = await r(), l = new FormData();
3121
3126
  l.append("json", JSON.stringify({ inputs: a })), Object.entries(o).forEach(([e, t]) => {
@@ -3141,17 +3146,17 @@ async function Wa({ module: e, group: t, field: n, actionKey: i, inputs: a = {},
3141
3146
  }
3142
3147
  //#endregion
3143
3148
  //#region src/components/detail/phoneDisplay.js
3144
- var Ga = (e) => e == null || e === "";
3145
- function Ka(e, t) {
3149
+ var Ka = (e) => e == null || e === "";
3150
+ function qa(e, t) {
3146
3151
  return String(t ?? "").split(".").filter(Boolean).reduce((e, t) => e?.[t], e);
3147
3152
  }
3148
- function qa(e) {
3153
+ function Ja(e) {
3149
3154
  let t = String(e ?? "").trim().replace(/[\s()-]/g, "");
3150
3155
  if (!t) return "";
3151
3156
  let n = t.replace(/^\+/, "");
3152
3157
  return /^\d{1,4}$/.test(n) ? `+${n}` : "";
3153
3158
  }
3154
- function Ja(e) {
3159
+ function Ya(e) {
3155
3160
  let t = String(e?.field ?? "").trim(), n = t.replace(/(number|no|phone|mobile|contact)$/i, "");
3156
3161
  return [
3157
3162
  ...t ? [`${t}CountryCode`, `${t}Code`] : [],
@@ -3164,15 +3169,15 @@ function Ja(e) {
3164
3169
  "isdCode"
3165
3170
  ];
3166
3171
  }
3167
- function Ya(e, t, n = "") {
3168
- let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...Ja(e)] : Ja(e);
3172
+ function Xa(e, t, n = "") {
3173
+ let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...Ya(e)] : Ya(e);
3169
3174
  for (let e of i) {
3170
- let n = qa(Ka(t, e));
3175
+ let n = Ja(qa(t, e));
3171
3176
  if (n) return n;
3172
3177
  }
3173
- return qa(n);
3178
+ return Ja(n);
3174
3179
  }
3175
- function Xa(e) {
3180
+ function Za(e) {
3176
3181
  let t = String(e ?? "").trim(), n = t.match(/^(\+\d{1,4})[\s-]*(.*)$/);
3177
3182
  return n ? {
3178
3183
  code: n[1],
@@ -3182,17 +3187,17 @@ function Xa(e) {
3182
3187
  rest: t
3183
3188
  };
3184
3189
  }
3185
- function Za(e, t = "") {
3186
- if (Ga(e)) return "";
3187
- let { code: n, rest: r } = Xa(e), i = n || qa(t), a = Yn(r) || r;
3190
+ function Qa(e, t = "") {
3191
+ if (Ka(e)) return "";
3192
+ let { code: n, rest: r } = Za(e), i = n || Ja(t), a = Yn(r) || r;
3188
3193
  return `${i ? `${i} ` : ""}${a}`.trim();
3189
3194
  }
3190
- function Qa(e, t, n) {
3191
- return Za(t, Ya(e, n, qn()));
3195
+ function $a(e, t, n) {
3196
+ return Qa(t, Xa(e, n, qn()));
3192
3197
  }
3193
3198
  //#endregion
3194
3199
  //#region src/components/detail/renderConfig.js
3195
- var $a = [
3200
+ var eo = [
3196
3201
  {
3197
3202
  value: "auto",
3198
3203
  label: "Default (auto)"
@@ -3249,7 +3254,7 @@ var $a = [
3249
3254
  value: "html",
3250
3255
  label: "HTML"
3251
3256
  }
3252
- ], eo = [
3257
+ ], to = [
3253
3258
  {
3254
3259
  value: "preview",
3255
3260
  label: "Preview (viewer)"
@@ -3270,7 +3275,7 @@ var $a = [
3270
3275
  value: "text",
3271
3276
  label: "Text (filename)"
3272
3277
  }
3273
- ], to = [
3278
+ ], no = [
3274
3279
  {
3275
3280
  value: "none",
3276
3281
  label: "None"
@@ -3287,76 +3292,76 @@ var $a = [
3287
3292
  value: "title",
3288
3293
  label: "Title Case"
3289
3294
  }
3290
- ], no = [
3295
+ ], ro = [
3291
3296
  "location",
3292
3297
  "path",
3293
3298
  "url",
3294
3299
  "key"
3295
- ], ro = [
3300
+ ], io = [
3296
3301
  "location",
3297
3302
  "filepath",
3298
3303
  "path",
3299
3304
  "url",
3300
3305
  "key"
3301
- ], io = [
3306
+ ], ao = [
3302
3307
  "uploadedfilename",
3303
3308
  "uploadname",
3304
3309
  "originalname",
3305
3310
  "displayname",
3306
3311
  "documentname",
3307
3312
  "filename"
3308
- ], ao = ["name"], oo = (e) => String(e).toLowerCase(), so = (e) => e == null || e === "";
3309
- function co(e, t) {
3313
+ ], oo = ["name"], so = (e) => String(e).toLowerCase(), co = (e) => e == null || e === "";
3314
+ function lo(e, t) {
3310
3315
  for (let n of t) {
3311
3316
  let t = e[n];
3312
3317
  if (typeof t == "string" && t) return t;
3313
3318
  }
3314
3319
  return "";
3315
3320
  }
3316
- function lo(e, t) {
3317
- for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r && oo(t).endsWith(n)) return r;
3321
+ function uo(e, t) {
3322
+ for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r && so(t).endsWith(n)) return r;
3318
3323
  return "";
3319
3324
  }
3320
- function uo(e) {
3325
+ function fo(e) {
3321
3326
  if (!e) return "";
3322
3327
  let t = String(e).split("?")[0].split("#")[0];
3323
3328
  return decodeURIComponent(t.split("/").pop() || "");
3324
3329
  }
3325
- function fo(e) {
3330
+ function po(e) {
3326
3331
  if (!e) return "";
3327
3332
  let t = String(e);
3328
3333
  return /^https?:\/\//i.test(t) ? t : "";
3329
3334
  }
3330
- function po(e) {
3335
+ function mo(e) {
3331
3336
  let t = String(e ?? "").trim();
3332
3337
  return !t || /^https?:\/\//i.test(t) || t.startsWith("blob:") || t.startsWith("data:") ? !1 : t.includes("/");
3333
3338
  }
3334
- function mo(e) {
3335
- return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : co(e, no) || lo(e, ro);
3336
- }
3337
3339
  function ho(e) {
3338
- return e ? typeof e == "string" ? uo(e) || e : typeof e == "object" && (co(e, P().documentNameOrder ?? []) || lo(e, io) || uo(mo(e)) || lo(e, ao)) || "Document" : "Document";
3340
+ return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : lo(e, ro) || uo(e, io);
3339
3341
  }
3340
3342
  function go(e) {
3341
- if (so(e)) return [];
3343
+ return e ? typeof e == "string" ? fo(e) || e : typeof e == "object" && (lo(e, P().documentNameOrder ?? []) || uo(e, ao) || fo(ho(e)) || uo(e, oo)) || "Document" : "Document";
3344
+ }
3345
+ function _o(e) {
3346
+ if (co(e)) return [];
3342
3347
  let t = Array.isArray(e) ? e : [e], n = [];
3343
- for (let e of t) if (!so(e)) {
3348
+ for (let e of t) if (!co(e)) {
3344
3349
  if (typeof e == "string") {
3345
3350
  let t = e.includes("/") ? e : "";
3346
3351
  n.push({
3347
3352
  location: t,
3348
- name: uo(e) || e,
3349
- url: fo(t),
3350
- needsAuthFetch: po(t)
3353
+ name: fo(e) || e,
3354
+ url: po(t),
3355
+ needsAuthFetch: mo(t)
3351
3356
  });
3352
3357
  } else if (typeof e == "object") {
3353
- let t = mo(e), r = e.fileUrl || e.downloadUrl || e.signedUrl || "";
3358
+ let t = ho(e), r = e.fileUrl || e.downloadUrl || e.signedUrl || "";
3354
3359
  n.push({
3355
3360
  location: t,
3356
- name: ho(e),
3357
- url: r || fo(t),
3361
+ name: go(e),
3362
+ url: r || po(t),
3358
3363
  documentId: e.id || e._id || e.documentId || "",
3359
- needsAuthFetch: !r && po(t)
3364
+ needsAuthFetch: !r && mo(t)
3360
3365
  });
3361
3366
  }
3362
3367
  }
@@ -3364,24 +3369,24 @@ function go(e) {
3364
3369
  }
3365
3370
  //#endregion
3366
3371
  //#region src/components/form/repeatableRowShape.js
3367
- function _o(e) {
3372
+ function vo(e) {
3368
3373
  return e?.primaryField ? e.primaryField : (e?.fields ?? []).find((e) => e?.field)?.field ?? null;
3369
3374
  }
3370
- function vo(e, t) {
3375
+ function yo(e, t) {
3371
3376
  if (!Array.isArray(t) || t.length === 0) return t;
3372
- let n = _o(e);
3377
+ let n = vo(e);
3373
3378
  if (!n) return t;
3374
3379
  let r = !1, i = t.map((e) => typeof e == "object" && e && !Array.isArray(e) ? e : e == null || String(e).trim() === "" ? (r = !0, {}) : (r = !0, { [n]: e }));
3375
3380
  return r ? i : t;
3376
3381
  }
3377
3382
  //#endregion
3378
3383
  //#region src/components/form/applyGroupValues.js
3379
- var yo = (e) => e === !0 || e === 1 || e === "1", bo = (e) => e == null || e === "";
3380
- function xo(e) {
3384
+ var bo = (e) => e === !0 || e === 1 || e === "1", xo = (e) => e == null || e === "";
3385
+ function So(e) {
3381
3386
  return String(e ?? "").split(".").map((e) => e.trim()).filter(Boolean);
3382
3387
  }
3383
- function q(e, t, n) {
3384
- let r = Array.isArray(t) ? t : xo(t);
3388
+ function J(e, t, n) {
3389
+ let r = Array.isArray(t) ? t : So(t);
3385
3390
  if (!r.length) return e;
3386
3391
  let i = e;
3387
3392
  for (let e = 0; e < r.length - 1; e += 1) {
@@ -3390,23 +3395,23 @@ function q(e, t, n) {
3390
3395
  }
3391
3396
  return i[r[r.length - 1]] = n, e;
3392
3397
  }
3393
- function So(e, t = []) {
3398
+ function Co(e, t = []) {
3394
3399
  if (!(!e || typeof e != "object")) for (let n of t) {
3395
3400
  if (!n) continue;
3396
3401
  let t = V(e, n);
3397
- if (!bo(t)) return t;
3402
+ if (!xo(t)) return t;
3398
3403
  }
3399
3404
  }
3400
- function Co(e, t) {
3405
+ function wo(e, t) {
3401
3406
  if (!e || typeof e != "object") return;
3402
- let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !bo(n));
3407
+ let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !xo(n));
3403
3408
  if (r) return r[1];
3404
3409
  for (let [, e] of n) if (e && typeof e == "object" && !Array.isArray(e)) {
3405
- let n = Co(e, t);
3406
- if (!bo(n)) return n;
3410
+ let n = wo(e, t);
3411
+ if (!xo(n)) return n;
3407
3412
  }
3408
3413
  }
3409
- function wo(e, t) {
3414
+ function To(e, t) {
3410
3415
  let n = Array.isArray(e) ? e : e ? [e] : [];
3411
3416
  if (!n.length) return;
3412
3417
  let r = n.map((e, n) => {
@@ -3416,9 +3421,9 @@ function wo(e, t) {
3416
3421
  status: "done"
3417
3422
  };
3418
3423
  if (!e || typeof e != "object") return null;
3419
- let r = So(e, [t.fileUrlKey, t.locationKey]) ?? Co(e, /(location|url|path)$/i) ?? "", i = So(e, [t.fileNameKey]) ?? Co(e, /(uploadName|uploadedFileName|fileName|name)$/i) ?? "";
3424
+ let r = Co(e, [t.fileUrlKey, t.locationKey]) ?? wo(e, /(location|url|path)$/i) ?? "", i = Co(e, [t.fileNameKey]) ?? wo(e, /(uploadName|uploadedFileName|fileName|name)$/i) ?? "";
3420
3425
  if (!r && !i) return null;
3421
- let a = r && !String(r).startsWith("http") ? fo(r) : r;
3426
+ let a = r && !String(r).startsWith("http") ? po(r) : r;
3422
3427
  return {
3423
3428
  uid: String(e.id ?? e._id ?? e.uniqueName ?? e.documentCopyUniqueName ?? `${t.field}-${n}`),
3424
3429
  name: i || "file",
@@ -3430,11 +3435,11 @@ function wo(e, t) {
3430
3435
  }).filter(Boolean);
3431
3436
  return r.length ? r : void 0;
3432
3437
  }
3433
- function To(e, t) {
3438
+ function Eo(e, t) {
3434
3439
  if (!e || typeof e != "object") return;
3435
- let n = So(e, [t.fileNameKey, t.field]) ?? Co(e, /(uploadName|uploadedFileName|fileName|name)$/i), r = So(e, [t.fileUrlKey, t.locationKey]) ?? Co(e, /(location|url|path)$/i) ?? "";
3440
+ let n = Co(e, [t.fileNameKey, t.field]) ?? wo(e, /(uploadName|uploadedFileName|fileName|name)$/i), r = Co(e, [t.fileUrlKey, t.locationKey]) ?? wo(e, /(location|url|path)$/i) ?? "";
3436
3441
  if (!n && !r) return;
3437
- let i = r && !String(r).startsWith("http") ? fo(r) : r, a = e.documentCopyUniqueName ?? e.uniqueName ?? n ?? `${t.field}-0`;
3442
+ let i = r && !String(r).startsWith("http") ? po(r) : r, a = e.documentCopyUniqueName ?? e.uniqueName ?? n ?? `${t.field}-0`;
3438
3443
  return [{
3439
3444
  uid: String(a),
3440
3445
  name: n ?? "file",
@@ -3443,7 +3448,7 @@ function To(e, t) {
3443
3448
  url: i || void 0
3444
3449
  }];
3445
3450
  }
3446
- function Eo(e, t, n, r) {
3451
+ function Do(e, t, n, r) {
3447
3452
  (e.fields ?? []).forEach((e) => {
3448
3453
  e?.verifyAction && [
3449
3454
  e.verifyResultField,
@@ -3452,47 +3457,47 @@ function Eo(e, t, n, r) {
3452
3457
  ].map((e) => String(e ?? "").trim()).filter(Boolean).forEach((e) => {
3453
3458
  if (V(n, e) !== void 0) return;
3454
3459
  let i = r(t, { field: e });
3455
- i != null && q(n, e, i);
3460
+ i != null && J(n, e, i);
3456
3461
  });
3457
3462
  });
3458
3463
  }
3459
- function Do(e) {
3460
- let t = Array.isArray(e.rows) ? vo(e, e.rows) : null, n = Math.max(0, Number(e.minRows ?? 0) || 0), r = (t, n, r) => {
3464
+ function Oo(e) {
3465
+ let t = Array.isArray(e.rows) ? yo(e, e.rows) : null, n = Math.max(0, Number(e.minRows ?? 0) || 0), r = (t, n, r) => {
3461
3466
  let i = {};
3462
3467
  return (e.fields ?? []).forEach((e) => {
3463
3468
  if (!e.field) return;
3464
3469
  if (e.type === "file") {
3465
3470
  let r = n(t, e);
3466
- r && q(i, e.field, r);
3471
+ r && J(i, e.field, r);
3467
3472
  return;
3468
3473
  }
3469
3474
  let a = r(t, e);
3470
3475
  if (a == null) {
3471
- let t = e.defaultOnEdit ? pa(e) : void 0;
3472
- t !== void 0 && q(i, e.field, t);
3476
+ let t = e.defaultOnEdit ? ha(e) : void 0;
3477
+ t !== void 0 && J(i, e.field, t);
3473
3478
  return;
3474
3479
  }
3475
- q(i, e.field, yo(e.addRow) ? Ia(e, a) : K(e, a));
3476
- }), Eo(e, t, i, r), i;
3477
- }, i = Sa(e, { editing: !0 });
3480
+ J(i, e.field, bo(e.addRow) ? La(e, a) : q(e, a));
3481
+ }), Do(e, t, i, r), i;
3482
+ }, i = wa(e, { editing: !0 });
3478
3483
  if (t && t.length > 0) {
3479
- let e = t.map((e) => r(e, (e, t) => To(e, t), (e, t) => V(e, t.field)));
3484
+ let e = t.map((e) => r(e, (e, t) => Eo(e, t), (e, t) => V(e, t.field)));
3480
3485
  for (; e.length < n;) e.push({ ...i });
3481
3486
  return e;
3482
3487
  }
3483
- let a = r(e, (e, t) => wo(t.value, t), (e, t) => t.value), o = Object.keys(a).length > 0 ? [a] : [];
3488
+ let a = r(e, (e, t) => To(t.value, t), (e, t) => t.value), o = Object.keys(a).length > 0 ? [a] : [];
3484
3489
  for (; o.length < n;) o.push({ ...i });
3485
3490
  return o;
3486
3491
  }
3487
- function Oo(e, t = []) {
3492
+ function ko(e, t = []) {
3488
3493
  let n = {};
3489
3494
  return t.forEach((e) => {
3490
- e.toggleEnabled && e.toggleField && q(n, e.toggleField, !!e.toggleValue), !e.addRow && (e.fields ?? []).forEach((e) => {
3495
+ e.toggleEnabled && e.toggleField && J(n, e.toggleField, !!e.toggleValue), !e.addRow && (e.fields ?? []).forEach((e) => {
3491
3496
  if (!e.field || e.addRow) return;
3492
3497
  let t = e.value, r = e.field;
3493
3498
  if (e.type === "file") {
3494
- let i = wo(t, e);
3495
- i && q(n, r, i);
3499
+ let i = To(t, e);
3500
+ i && J(n, r, i);
3496
3501
  return;
3497
3502
  }
3498
3503
  if (t == null) return;
@@ -3500,43 +3505,43 @@ function Oo(e, t = []) {
3500
3505
  let i = e.transformRule?.map;
3501
3506
  if (i) {
3502
3507
  let e = Object.entries(i).find(([, e]) => String(e) === String(t));
3503
- q(n, r, e ? [e[0]] : []);
3504
- } else q(n, r, Wi(e, Array.isArray(t) ? t : [t]));
3508
+ J(n, r, e ? [e[0]] : []);
3509
+ } else J(n, r, Ki(e, Array.isArray(t) ? t : [t]));
3505
3510
  return;
3506
3511
  }
3507
3512
  let i = e.splitDialCodeInto;
3508
3513
  if (i && typeof t == "string") {
3509
- let { code: a, rest: o } = Xa(t), s = qa(a);
3510
- s && q(n, i, s), q(n, r, K(e, o || t));
3514
+ let { code: a, rest: o } = Za(t), s = Ja(a);
3515
+ s && J(n, i, s), J(n, r, q(e, o || t));
3511
3516
  return;
3512
3517
  }
3513
- q(n, r, K(e, t));
3518
+ J(n, r, q(e, t));
3514
3519
  });
3515
3520
  }), Object.keys(n).length > 0 && e.setFieldsValue(n), n;
3516
3521
  }
3517
3522
  //#endregion
3518
3523
  //#region src/components/form/useAiActions.js
3519
- function ko(e) {
3524
+ function Ao(e) {
3520
3525
  let t = document.createElement("div");
3521
3526
  return t.innerHTML = String(e ?? ""), t.textContent || t.innerText || "";
3522
3527
  }
3523
- function Ao(e, t) {
3524
- return t && t === "stripHtml" ? ko(e) : e;
3528
+ function jo(e, t) {
3529
+ return t && t === "stripHtml" ? Ao(e) : e;
3525
3530
  }
3526
- function jo(e) {
3531
+ function Mo(e) {
3527
3532
  return String(e ?? "").trim().split(/\s+/).filter(Boolean).length;
3528
3533
  }
3529
- function Mo(e) {
3534
+ function No(e) {
3530
3535
  return Object.values(e || {}).some((e) => e != null && e !== "");
3531
3536
  }
3532
- function No(e, t) {
3537
+ function Po(e, t) {
3533
3538
  if (e.kind === "file") return Array.isArray(t) ? t.length > 0 : !!t;
3534
- let n = Ao(t, e.transform), r = String(n ?? "").trim();
3539
+ let n = jo(t, e.transform), r = String(n ?? "").trim();
3535
3540
  if (!r) return !1;
3536
3541
  let i = Number(e.minWords) || 0;
3537
- return i > 0 ? jo(r) >= i : !0;
3542
+ return i > 0 ? Mo(r) >= i : !0;
3538
3543
  }
3539
- function Po(e, t) {
3544
+ function Fo(e, t) {
3540
3545
  let n = e.inputs || [];
3541
3546
  if (n.length === 0) return !0;
3542
3547
  let r = /* @__PURE__ */ new Map();
@@ -3544,10 +3549,10 @@ function Po(e, t) {
3544
3549
  let n = e.group || `__solo_${t}`;
3545
3550
  r.has(n) || r.set(n, []), r.get(n).push(e);
3546
3551
  });
3547
- for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) => No(e, t(e.sourceField)))) return !1;
3552
+ for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) => Po(e, t(e.sourceField)))) return !1;
3548
3553
  return !0;
3549
3554
  }
3550
- function Fo(e = []) {
3555
+ function Io(e = []) {
3551
3556
  let t = [];
3552
3557
  return e.forEach((e) => {
3553
3558
  if (e?.addRow) {
@@ -3560,32 +3565,32 @@ function Fo(e = []) {
3560
3565
  });
3561
3566
  }), t;
3562
3567
  }
3563
- function Io(e, t) {
3564
- return Fo(t).some((t) => {
3568
+ function Lo(e, t) {
3569
+ return Io(t).some((t) => {
3565
3570
  let n = e.getFieldValue(t);
3566
- return Array.isArray(n) ? n.some(Mo) : n != null && n !== "";
3571
+ return Array.isArray(n) ? n.some(No) : n != null && n !== "";
3567
3572
  });
3568
3573
  }
3569
- function Lo(e, t = [], { includeUntouched: n = !1 } = {}) {
3574
+ function Ro(e, t = [], { includeUntouched: n = !1 } = {}) {
3570
3575
  let r = e.getFieldsValue(!0) ?? {}, i = new Set([t].flat().filter(Boolean)), a = n || typeof e.isFieldTouched != "function" ? () => !0 : (t) => e.isFieldTouched(t), o = 0;
3571
3576
  return Object.entries(r).forEach(([e, t]) => {
3572
- if (!(i.has(e) || !a(e) || !Ro(t))) {
3577
+ if (!(i.has(e) || !a(e) || !zo(t))) {
3573
3578
  if (Array.isArray(t)) {
3574
- o += t.filter((e) => e && typeof e == "object" ? Mo(e) : !!e).length;
3579
+ o += t.filter((e) => e && typeof e == "object" ? No(e) : !!e).length;
3575
3580
  return;
3576
3581
  }
3577
3582
  o += 1;
3578
3583
  }
3579
3584
  }), o;
3580
3585
  }
3581
- function Ro(e) {
3582
- return e == null || e === "" ? !1 : Array.isArray(e) ? e.some((e) => e && typeof e == "object" ? Mo(e) : !!e) : typeof e != "object" || Object.values(e).some((e) => e != null && e !== "");
3586
+ function zo(e) {
3587
+ return e == null || e === "" ? !1 : Array.isArray(e) ? e.some((e) => e && typeof e == "object" ? No(e) : !!e) : typeof e != "object" || Object.values(e).some((e) => e != null && e !== "");
3583
3588
  }
3584
- function zo(e, t = [], { includeUntouched: n = !1 } = {}) {
3589
+ function Bo(e, t = [], { includeUntouched: n = !1 } = {}) {
3585
3590
  let r = e.getFieldsValue(!0) ?? {}, i = new Set([t].flat().filter(Boolean)), a = Object.keys(r).filter((e) => !i.has(e));
3586
- return n ? a.some((e) => Ro(r[e])) : typeof e.isFieldTouched == "function" ? a.some((t) => e.isFieldTouched(t) && Ro(r[t])) : a.some((e) => Ro(r[e]));
3591
+ return n ? a.some((e) => zo(r[e])) : typeof e.isFieldTouched == "function" ? a.some((t) => e.isFieldTouched(t) && zo(r[t])) : a.some((e) => zo(r[e]));
3587
3592
  }
3588
- function Bo(e = []) {
3593
+ function Vo(e = []) {
3589
3594
  let t = {};
3590
3595
  return (e ?? []).forEach((e) => {
3591
3596
  e?.addRow || (e?.fields ?? []).forEach((e) => {
@@ -3596,38 +3601,38 @@ function Bo(e = []) {
3596
3601
  });
3597
3602
  }), t;
3598
3603
  }
3599
- function Vo(e, t, n) {
3604
+ function Ho(e, t, n) {
3600
3605
  let r = e?.confirmWhen ?? "never";
3601
- return r === "never" ? !1 : r === "always" || Io(t, n);
3606
+ return r === "never" ? !1 : r === "always" || Lo(t, n);
3602
3607
  }
3603
- var Ho = [
3608
+ var Uo = [
3604
3609
  "top-left",
3605
3610
  "top-center",
3606
3611
  "top-right",
3607
3612
  "bottom-left",
3608
3613
  "bottom-center",
3609
3614
  "bottom-right"
3610
- ], Uo = "bottom-left";
3611
- function Wo(e = []) {
3615
+ ], Wo = "bottom-left";
3616
+ function Go(e = []) {
3612
3617
  let t = {};
3613
3618
  return e.forEach((e) => {
3614
- let n = Ho.includes(e.position) ? e.position : Uo;
3619
+ let n = Uo.includes(e.position) ? e.position : Wo;
3615
3620
  (t[n] ??= []).push(e);
3616
3621
  }), t;
3617
3622
  }
3618
- function Go({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPrefilledAsData: a = !1 }) {
3619
- let [o, s] = g(null), [c, l] = g(""), u = x.useWatch((e) => e, e), d = f((e) => Po(e, (e) => (u || {})[e]), [u]), p = f((t) => {
3623
+ function Ko({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPrefilledAsData: a = !1 }) {
3624
+ let [o, s] = g(null), [c, l] = g(""), u = x.useWatch((e) => e, e), d = f((e) => Fo(e, (e) => (u || {})[e]), [u]), p = f((t) => {
3620
3625
  if (!Array.isArray(t) || t.length === 0) return !1;
3621
- let n = Oo(e, t.filter((e) => !e.addRow)), r = Object.keys(n).length > 0;
3626
+ let n = ko(e, t.filter((e) => !e.addRow)), r = Object.keys(n).length > 0;
3622
3627
  return t.forEach((t) => {
3623
3628
  if (!t.addRow || !Array.isArray(t.rows) || t.rows.length === 0) return;
3624
- let n = Do(t);
3629
+ let n = Oo(t);
3625
3630
  if (n.length === 0) return;
3626
3631
  r = !0;
3627
- let i = () => e.setFieldsValue({ [t.name]: n }), a = (e.getFieldValue(t.name) || []).filter(Mo);
3632
+ let i = () => e.setFieldsValue({ [t.name]: n }), a = (e.getFieldValue(t.name) || []).filter(No);
3628
3633
  if (a.length) {
3629
3634
  let e = t.label || t.name;
3630
- Ha({
3635
+ Ua({
3631
3636
  tone: "overwrite",
3632
3637
  title: `Replace what's in ${e}?`,
3633
3638
  facts: [
@@ -3657,9 +3662,9 @@ function Go({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3657
3662
  return {
3658
3663
  runAction: f(async (t, o, c, u) => {
3659
3664
  let d = c?.confirmWhen ?? "never";
3660
- if (c?.trigger === "upload" && d !== "never" && (d === "always" || zo(e, [o?.field], { includeUntouched: a }))) {
3661
- let t = c.confirmMessages ?? {}, n = u?.name || e.getFieldValue(o?.field)?.slice?.(-1)?.[0]?.name, r = Lo(e, [o?.field], { includeUntouched: a });
3662
- if (!await Ha({
3665
+ if (c?.trigger === "upload" && d !== "never" && (d === "always" || Bo(e, [o?.field], { includeUntouched: a }))) {
3666
+ let t = c.confirmMessages ?? {}, n = u?.name || e.getFieldValue(o?.field)?.slice?.(-1)?.[0]?.name, r = Ro(e, [o?.field], { includeUntouched: a });
3667
+ if (!await Ua({
3663
3668
  tone: "overwrite",
3664
3669
  title: t.title || "Read this file and fill the form in?",
3665
3670
  facts: [{
@@ -3683,12 +3688,12 @@ function Go({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3683
3688
  r && (s[t.param] = r);
3684
3689
  } else {
3685
3690
  let n = e.getFieldValue(t.sourceField);
3686
- n != null && n !== "" && (a[t.param] = Ao(n, t.transform));
3691
+ n != null && n !== "" && (a[t.param] = jo(n, t.transform));
3687
3692
  }
3688
3693
  }), (c.inputs || []).forEach((e) => {
3689
3694
  !e.group || e.kind !== "text" || (c.inputs || []).some((t) => t.group === e.group && t.kind === "file" && s[t.param]) && delete a[e.param];
3690
3695
  });
3691
- let l = await Wa({
3696
+ let l = await Ga({
3692
3697
  module: n,
3693
3698
  group: t,
3694
3699
  field: o.field,
@@ -3696,9 +3701,9 @@ function Go({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3696
3701
  inputs: a,
3697
3702
  files: s
3698
3703
  }), d = c.label || "AI action", f = l?.groups;
3699
- if (c?.trigger !== "upload" && Vo(c, e, f)) {
3700
- let e = c.confirmMessages ?? {}, t = Fo(f).length;
3701
- if (!await Ha({
3704
+ if (c?.trigger !== "upload" && Ho(c, e, f)) {
3705
+ let e = c.confirmMessages ?? {}, t = Io(f).length;
3706
+ if (!await Ua({
3702
3707
  tone: "overwrite",
3703
3708
  title: e.title || `Fill the form in from ${d}?`,
3704
3709
  facts: [{
@@ -3719,7 +3724,7 @@ function Go({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3719
3724
  field: o,
3720
3725
  groupName: t,
3721
3726
  responseGroups: f,
3722
- payload: Bo(f)
3727
+ payload: Vo(f)
3723
3728
  });
3724
3729
  if (e === !1 || e === "abort") return l;
3725
3730
  }
@@ -3751,7 +3756,7 @@ function Go({ form: e, groups: t, module: n, onApplied: r, onParsed: i, treatPre
3751
3756
  }
3752
3757
  //#endregion
3753
3758
  //#region src/components/form/AiActionButtons.jsx
3754
- function Ko({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
3759
+ function qo({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
3755
3760
  if (!t || t.length === 0) return null;
3756
3761
  let a = e.endsWith("center") ? "center" : e.endsWith("right") ? "flex-end" : "flex-start";
3757
3762
  return /* @__PURE__ */ C(te, {
@@ -3772,18 +3777,18 @@ function Ko({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
3772
3777
  }
3773
3778
  //#endregion
3774
3779
  //#region src/components/form/emailValidator.js
3775
- function qo(e) {
3780
+ function Jo(e) {
3776
3781
  let t = String(e ?? "").trim(), n = /^([^\s@]+)@([^\s@]+)\.([A-Za-z]{2,})$/.exec(t);
3777
3782
  if (!n) return !1;
3778
3783
  let [, r, i] = n;
3779
3784
  return /[A-Za-z]/.test(r) && /[A-Za-z]/.test(i);
3780
3785
  }
3781
- function Jo(e = "Email", t) {
3782
- return { validator: (n, r) => r == null || r === "" || qo(r) ? Promise.resolve() : Promise.reject(Error(t ?? `Enter a valid ${e}; numeric-only email addresses are not allowed`)) };
3786
+ function Yo(e = "Email", t) {
3787
+ return { validator: (n, r) => r == null || r === "" || Jo(r) ? Promise.resolve() : Promise.reject(Error(t ?? `Enter a valid ${e}; numeric-only email addresses are not allowed`)) };
3783
3788
  }
3784
3789
  //#endregion
3785
3790
  //#region src/components/form/inputValidator.js
3786
- var Yo = [
3791
+ var Xo = [
3787
3792
  {
3788
3793
  label: "Only Numbers",
3789
3794
  value: "onlyNumber"
@@ -3856,7 +3861,7 @@ var Yo = [
3856
3861
  label: "Website URL",
3857
3862
  value: "websiteUrl"
3858
3863
  }
3859
- ], Xo = {
3864
+ ], Zo = {
3860
3865
  onlyNumber: /^[0-9]$/,
3861
3866
  experience: /^[0-9]$/,
3862
3867
  numericTwoDigits: /^[0-9]$/,
@@ -3872,10 +3877,10 @@ var Yo = [
3872
3877
  decimalRange: /^[0-9.]$/,
3873
3878
  contactNumber: /^[0-9()\-+\s]$/
3874
3879
  };
3875
- function Zo(e) {
3876
- return Xo[e] ?? null;
3880
+ function Qo(e) {
3881
+ return Zo[e] ?? null;
3877
3882
  }
3878
- function Qo(e, t = {}, n = "change") {
3883
+ function $o(e, t = {}, n = "change") {
3879
3884
  if (!t?.type || e == null) return {
3880
3885
  cleaned: e ?? "",
3881
3886
  error: null
@@ -3958,7 +3963,7 @@ function Qo(e, t = {}, n = "change") {
3958
3963
  break;
3959
3964
  }
3960
3965
  case "email":
3961
- c = n === "blur" ? r.trim() : r, c && !qo(c) && (l = `${s} must be a valid email address; numeric-only email addresses are not allowed.`);
3966
+ c = n === "blur" ? r.trim() : r, c && !Jo(c) && (l = `${s} must be a valid email address; numeric-only email addresses are not allowed.`);
3962
3967
  break;
3963
3968
  case "websiteUrl":
3964
3969
  c = n === "blur" ? r.trim() : r, c && !/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/i.test(c) && (l = `${s} must be a valid URL.`);
@@ -3970,21 +3975,21 @@ function Qo(e, t = {}, n = "change") {
3970
3975
  error: l
3971
3976
  };
3972
3977
  }
3973
- var $o = "This value is already present";
3974
- function es(e) {
3978
+ var es = "This value is already present";
3979
+ function ts(e) {
3975
3980
  return typeof e == "string" ? e : e?.type ?? e?.rule ?? e?.name;
3976
3981
  }
3977
- function ts(e) {
3978
- if (es(e) !== "unique") return null;
3982
+ function ns(e) {
3983
+ if (ts(e) !== "unique") return null;
3979
3984
  if (typeof e == "string") return {
3980
- message: $o,
3985
+ message: es,
3981
3986
  normalizer: "trim",
3982
3987
  skipBlank: !0,
3983
3988
  validateOn: "blur"
3984
3989
  };
3985
3990
  let t = e.value && typeof e.value == "object" ? e.value : e, n = String(t.validateOn ?? "blur").toLowerCase();
3986
3991
  return {
3987
- message: typeof e.message == "string" && e.message.trim() ? e.message.trim() : $o,
3992
+ message: typeof e.message == "string" && e.message.trim() ? e.message.trim() : es,
3988
3993
  collectionField: t.collectionField ?? "",
3989
3994
  normalizer: String(t.normalizer ?? "trim"),
3990
3995
  skipBlank: t.skipBlank !== !1,
@@ -3995,20 +4000,20 @@ function ts(e) {
3995
4000
  ].includes(n) ? n : "blur"
3996
4001
  };
3997
4002
  }
3998
- function ns(e) {
4003
+ function rs(e) {
3999
4004
  let t = e?.validations ?? e?.validation ?? e?.rules ?? [];
4000
4005
  if (!Array.isArray(t)) return null;
4001
4006
  for (let e of t) {
4002
- let t = ts(e);
4007
+ let t = ns(e);
4003
4008
  if (t) return t;
4004
4009
  }
4005
4010
  return null;
4006
4011
  }
4007
- function rs(e = []) {
4012
+ function is(e = []) {
4008
4013
  let t = [];
4009
4014
  return (Array.isArray(e) ? e : []).forEach((e) => {
4010
4015
  (e?.fields ?? []).forEach((e) => {
4011
- let n = ns(e);
4016
+ let n = rs(e);
4012
4017
  !n || !e?.field || t.push({
4013
4018
  field: e.field,
4014
4019
  label: e.label ?? e.field,
@@ -4017,10 +4022,10 @@ function rs(e = []) {
4017
4022
  });
4018
4023
  }), t;
4019
4024
  }
4020
- function is(e) {
4025
+ function as(e) {
4021
4026
  return e == null ? !0 : typeof e == "number" ? Number.isNaN(e) : typeof e == "boolean" ? !1 : Array.isArray(e) ? e.length === 0 : String(e).trim() === "";
4022
4027
  }
4023
- function as(e, t = "trim") {
4028
+ function os(e, t = "trim") {
4024
4029
  if (e == null) return "";
4025
4030
  let n = String(e);
4026
4031
  switch (String(t)) {
@@ -4032,34 +4037,34 @@ function as(e, t = "trim") {
4032
4037
  default: return n.trim();
4033
4038
  }
4034
4039
  }
4035
- function os(e, t) {
4036
- return !(!e || e.skipBlank !== !1 && is(t));
4040
+ function ss(e, t) {
4041
+ return !(!e || e.skipBlank !== !1 && as(t));
4037
4042
  }
4038
- function ss(e) {
4043
+ function cs(e) {
4039
4044
  return !e || e.validateOn === "submit" ? [] : e.validateOn === "change" ? ["onChange", "onBlur"] : ["onBlur"];
4040
4045
  }
4041
- var J = {
4046
+ var Y = {
4042
4047
  SKIPPED: "skipped",
4043
4048
  AVAILABLE: "available",
4044
4049
  DUPLICATE: "duplicate",
4045
4050
  STALE: "stale",
4046
4051
  ERROR: "error"
4047
4052
  };
4048
- function cs({ module: e, field: t, recordId: n, normalized: r }) {
4053
+ function ls({ module: e, field: t, recordId: n, normalized: r }) {
4049
4054
  return `${e}${t}${n ?? ""}${r}`;
4050
4055
  }
4051
- function ls({ checkFieldUnique: e, onPendingChange: t } = {}) {
4056
+ function us({ checkFieldUnique: e, onPendingChange: t } = {}) {
4052
4057
  let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = 0, a = 0;
4053
4058
  function o(e) {
4054
4059
  a = e, typeof t == "function" && t(a);
4055
4060
  }
4056
4061
  async function s({ module: t, field: s, rule: c, value: l, recordId: u, clientId: d, region: f } = {}) {
4057
- if (!c || !t || !s || typeof e != "function" || !os(c, l)) return { status: J.SKIPPED };
4058
- let p = cs({
4062
+ if (!c || !t || !s || typeof e != "function" || !ss(c, l)) return { status: Y.SKIPPED };
4063
+ let p = ls({
4059
4064
  module: t,
4060
4065
  field: s,
4061
4066
  recordId: u,
4062
- normalized: as(l, c.normalizer)
4067
+ normalized: os(l, c.normalizer)
4063
4068
  });
4064
4069
  if (n.has(p)) return n.get(p);
4065
4070
  i += 1;
@@ -4074,17 +4079,17 @@ function ls({ checkFieldUnique: e, onPendingChange: t } = {}) {
4074
4079
  clientId: d,
4075
4080
  region: f
4076
4081
  });
4077
- if (r.get(s) !== m) return { status: J.STALE };
4082
+ if (r.get(s) !== m) return { status: Y.STALE };
4078
4083
  let a = i?.available === !1 ? {
4079
- status: J.DUPLICATE,
4080
- message: us(i) || c.message || $o
4081
- } : { status: J.AVAILABLE };
4084
+ status: Y.DUPLICATE,
4085
+ message: ds(i) || c.message || es
4086
+ } : { status: Y.AVAILABLE };
4082
4087
  return n.set(p, a), a;
4083
4088
  } catch (e) {
4084
4089
  return r.get(s) === m ? {
4085
- status: J.ERROR,
4090
+ status: Y.ERROR,
4086
4091
  error: e
4087
- } : { status: J.STALE };
4092
+ } : { status: Y.STALE };
4088
4093
  } finally {
4089
4094
  o(Math.max(0, a - 1));
4090
4095
  }
@@ -4098,17 +4103,17 @@ function ls({ checkFieldUnique: e, onPendingChange: t } = {}) {
4098
4103
  }
4099
4104
  };
4100
4105
  }
4101
- function us(e) {
4106
+ function ds(e) {
4102
4107
  return (e?.errors ?? []).find((e) => e?.message)?.message || e?.message || "";
4103
4108
  }
4104
- var ds = "__uniqueRule";
4105
- function fs({ field: e, validation: t, context: n }) {
4106
- let r = ts(t);
4109
+ var fs = "__uniqueRule";
4110
+ function ps({ field: e, validation: t, context: n }) {
4111
+ let r = ns(t);
4107
4112
  if (!r) return { validator: () => Promise.resolve() };
4108
4113
  let i = e?.field ?? "";
4109
4114
  return !n?.checker || !n?.module || !i ? { validator: () => Promise.resolve() } : {
4110
- [ds]: r,
4111
- validateTrigger: ss(r),
4115
+ [fs]: r,
4116
+ validateTrigger: cs(r),
4112
4117
  validator: async (e, t) => {
4113
4118
  let a = await n.checker.check({
4114
4119
  module: n.module,
@@ -4119,26 +4124,26 @@ function fs({ field: e, validation: t, context: n }) {
4119
4124
  clientId: n.clientId,
4120
4125
  region: n.region
4121
4126
  });
4122
- return a.status === J.DUPLICATE ? Promise.reject(Error(a.message || r.message)) : Promise.resolve();
4127
+ return a.status === Y.DUPLICATE ? Promise.reject(Error(a.message || r.message)) : Promise.resolve();
4123
4128
  }
4124
4129
  };
4125
4130
  }
4126
- function ps(e = []) {
4131
+ function ms(e = []) {
4127
4132
  let t = Array.isArray(e) ? e : [];
4128
- if (!t.some((e) => e && e[ds])) return t;
4129
- let n = t.filter((e) => e && !e[ds]);
4133
+ if (!t.some((e) => e && e[fs])) return t;
4134
+ let n = t.filter((e) => e && !e[fs]);
4130
4135
  return t.map((e) => {
4131
- if (!e || !e[ds]) return e;
4136
+ if (!e || !e[fs]) return e;
4132
4137
  let t = e.validator;
4133
4138
  return {
4134
4139
  ...e,
4135
- validator: async (e, r) => await ms(n, r, e) ? Promise.resolve() : t(e, r)
4140
+ validator: async (e, r) => await hs(n, r, e) ? Promise.resolve() : t(e, r)
4136
4141
  };
4137
4142
  });
4138
4143
  }
4139
- async function ms(e = [], t, n = {}) {
4144
+ async function hs(e = [], t, n = {}) {
4140
4145
  for (let r of e) if (!(!r || typeof r == "string")) {
4141
- if (r.required && is(t) || !is(t) && (r.pattern instanceof RegExp && !new RegExp(r.pattern.source, r.pattern.flags).test(String(t)) || r.len != null && String(t).length !== Number(r.len))) return !0;
4146
+ if (r.required && as(t) || !as(t) && (r.pattern instanceof RegExp && !new RegExp(r.pattern.source, r.pattern.flags).test(String(t)) || r.len != null && String(t).length !== Number(r.len))) return !0;
4142
4147
  if (typeof r.validator == "function") try {
4143
4148
  await r.validator(n, t);
4144
4149
  } catch {
@@ -4147,7 +4152,7 @@ async function ms(e = [], t, n = {}) {
4147
4152
  }
4148
4153
  return !1;
4149
4154
  }
4150
- function hs(e) {
4155
+ function gs(e) {
4151
4156
  let t = String(e ?? "").trim();
4152
4157
  if (!t.startsWith("{")) return null;
4153
4158
  try {
@@ -4156,19 +4161,19 @@ function hs(e) {
4156
4161
  return null;
4157
4162
  }
4158
4163
  }
4159
- function gs(e) {
4164
+ function _s(e) {
4160
4165
  if (!e) return null;
4161
- if (typeof e == "string") return hs(e);
4166
+ if (typeof e == "string") return gs(e);
4162
4167
  let t = [
4163
4168
  e.data,
4164
4169
  e.response,
4165
4170
  e,
4166
- hs(e.message)
4171
+ gs(e.message)
4167
4172
  ];
4168
4173
  for (let e of t) if (!(!e || typeof e != "object") && (Array.isArray(e.errors) || e.code === "DUPLICATE_VALUE")) return e;
4169
4174
  return null;
4170
4175
  }
4171
- function _s({ field: e, group: t, rowIndex: n }) {
4176
+ function vs({ field: e, group: t, rowIndex: n }) {
4172
4177
  let r = String(e ?? ""), i = Number(n);
4173
4178
  return t && Number.isInteger(i) && i >= 0 ? [
4174
4179
  String(t),
@@ -4176,14 +4181,14 @@ function _s({ field: e, group: t, rowIndex: n }) {
4176
4181
  ...r.split(".")
4177
4182
  ] : r;
4178
4183
  }
4179
- function vs(e, { uniqueRules: t = [] } = {}) {
4180
- let n = gs(e);
4184
+ function ys(e, { uniqueRules: t = [] } = {}) {
4185
+ let n = _s(e);
4181
4186
  if (n) {
4182
4187
  let e = (Array.isArray(n.errors) ? n.errors : []).filter((e) => e?.field).map((e) => {
4183
4188
  let t = {
4184
4189
  field: e.field,
4185
- name: _s(e),
4186
- message: e.message || n.message || $o
4190
+ name: vs(e),
4191
+ message: e.message || n.message || es
4187
4192
  };
4188
4193
  return Array.isArray(t.name) && (t.group = String(e.group), t.rowIndex = Number(e.rowIndex)), t;
4189
4194
  });
@@ -4200,7 +4205,7 @@ function vs(e, { uniqueRules: t = [] } = {}) {
4200
4205
  }
4201
4206
  //#endregion
4202
4207
  //#region src/services/uniqueValidationApi.js
4203
- async function ys({ module: e, field: t, value: n, recordId: r, clientId: i, region: o } = {}) {
4208
+ async function bs({ module: e, field: t, value: n, recordId: r, clientId: i, region: o } = {}) {
4204
4209
  if (!e || !t) throw Error("module and field are required to check uniqueness");
4205
4210
  let c = {
4206
4211
  field: t,
@@ -4234,7 +4239,7 @@ async function ys({ module: e, field: t, value: n, recordId: r, clientId: i, reg
4234
4239
  throw e;
4235
4240
  }
4236
4241
  }
4237
- async function bs({ module: e, payload: t, excludeId: n } = {}) {
4242
+ async function xs({ module: e, payload: t, excludeId: n } = {}) {
4238
4243
  if (!e || !t) return { duplicate: !1 };
4239
4244
  try {
4240
4245
  let r = await a(s, `/module/duplicate-check?module=${encodeURIComponent(e)}`, {
@@ -4252,7 +4257,7 @@ async function bs({ module: e, payload: t, excludeId: n } = {}) {
4252
4257
  }
4253
4258
  //#endregion
4254
4259
  //#region src/components/form/uploadAccept.js
4255
- var xs = [
4260
+ var Ss = [
4256
4261
  "jpg",
4257
4262
  "jpeg",
4258
4263
  "png",
@@ -4261,18 +4266,18 @@ var xs = [
4261
4266
  "bmp",
4262
4267
  "svg",
4263
4268
  "avif"
4264
- ], Ss = [
4269
+ ], Cs = [
4265
4270
  "mp4",
4266
4271
  "webm",
4267
4272
  "ogg",
4268
4273
  "ogv",
4269
4274
  "mov",
4270
4275
  "m4v"
4271
- ], Cs = [
4276
+ ], ws = [
4272
4277
  "pdf",
4273
4278
  "doc",
4274
4279
  "docx"
4275
- ], ws = [
4280
+ ], Ts = [
4276
4281
  {
4277
4282
  label: "Any file",
4278
4283
  value: "any"
@@ -4297,45 +4302,45 @@ var xs = [
4297
4302
  label: "Images & Videos",
4298
4303
  value: "imagesAndVideos"
4299
4304
  }
4300
- ], Ts = {
4305
+ ], Es = {
4301
4306
  resume: {
4302
- exts: Cs,
4307
+ exts: ws,
4303
4308
  maxSizeMB: 2,
4304
4309
  hint: "PDF, DOC or DOCX",
4305
4310
  error: "Only PDF, DOC, and DOCX resume files are supported."
4306
4311
  },
4307
4312
  documents: {
4308
- exts: [...Cs, ...xs],
4313
+ exts: [...ws, ...Ss],
4309
4314
  hint: "PDF, DOC or image files",
4310
4315
  error: "Only document (PDF/DOC) or image files are allowed"
4311
4316
  },
4312
4317
  images: {
4313
- exts: xs,
4318
+ exts: Ss,
4314
4319
  hint: "Image files",
4315
4320
  error: "Only image files are allowed"
4316
4321
  },
4317
4322
  videos: {
4318
- exts: Ss,
4323
+ exts: Cs,
4319
4324
  hint: "Video files",
4320
4325
  error: "Only video files are allowed"
4321
4326
  },
4322
4327
  imagesAndVideos: {
4323
- exts: [...xs, ...Ss],
4328
+ exts: [...Ss, ...Cs],
4324
4329
  hint: "Image or video files",
4325
4330
  error: "Only image or video files are allowed"
4326
4331
  }
4327
4332
  };
4328
- function Es(e) {
4333
+ function Ds(e) {
4329
4334
  let t = String(e?.field ?? e?.payloadKey ?? "").toLowerCase();
4330
4335
  return t ? t.includes("resume") || t.includes("cv") || t.includes("curriculumvitae") : !1;
4331
4336
  }
4332
- function Ds(e) {
4337
+ function Os(e) {
4333
4338
  let t = String(e?.accept ?? "").trim();
4334
- return t && t !== "any" ? Ts[t] ?? null : !t && Es(e) ? Ts.resume : Ts[t] ?? null;
4339
+ return t && t !== "any" ? Es[t] ?? null : !t && Ds(e) ? Es.resume : Es[t] ?? null;
4335
4340
  }
4336
4341
  //#endregion
4337
4342
  //#region src/components/form/quickActionLabels.js
4338
- var Os = /* @__PURE__ */ new Set([
4343
+ var ks = /* @__PURE__ */ new Set([
4339
4344
  "of",
4340
4345
  "and",
4341
4346
  "the",
@@ -4344,7 +4349,7 @@ var Os = /* @__PURE__ */ new Set([
4344
4349
  "in",
4345
4350
  "a",
4346
4351
  "an"
4347
- ]), ks = {
4352
+ ]), As = {
4348
4353
  addresses: "address",
4349
4354
  branches: "branch",
4350
4355
  batches: "batch",
@@ -4355,38 +4360,38 @@ var Os = /* @__PURE__ */ new Set([
4355
4360
  people: "person",
4356
4361
  statuses: "status"
4357
4362
  };
4358
- function As(e) {
4363
+ function js(e) {
4359
4364
  let t = String(e ?? "").trim();
4360
4365
  if (!t) return "";
4361
4366
  if (t.length > 1 && t === t.toUpperCase() && /[A-Z]/.test(t)) return t;
4362
4367
  let n = t.toLowerCase();
4363
- return ks[n] ? ks[n] : /[^aeiou]ies$/i.test(t) ? t.slice(0, -3) + "y" : /(s|x|z|ch|sh)es$/i.test(t) ? t.slice(0, -2) : /[^s]s$/i.test(t) ? t.slice(0, -1) : t;
4368
+ return As[n] ? As[n] : /[^aeiou]ies$/i.test(t) ? t.slice(0, -3) + "y" : /(s|x|z|ch|sh)es$/i.test(t) ? t.slice(0, -2) : /[^s]s$/i.test(t) ? t.slice(0, -1) : t;
4364
4369
  }
4365
- function js(e) {
4370
+ function X(e) {
4366
4371
  let t = String(e ?? "").trim();
4367
4372
  if (!t) return "";
4368
4373
  let n = t.replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_\-.]+/g, " ").split(/\s+/).filter(Boolean);
4369
4374
  if (!n.length) return "";
4370
- let r = As(n[n.length - 1]);
4375
+ let r = js(n[n.length - 1]);
4371
4376
  return [...n.slice(0, -1), r].map((e, t) => {
4372
4377
  let n = e.toLowerCase();
4373
- return e.length > 1 && e === e.toUpperCase() ? e : t > 0 && Os.has(n) ? n : n.charAt(0).toUpperCase() + n.slice(1);
4378
+ return e.length > 1 && e === e.toUpperCase() ? e : t > 0 && ks.has(n) ? n : n.charAt(0).toUpperCase() + n.slice(1);
4374
4379
  }).join(" ");
4375
4380
  }
4376
4381
  function Ms(e, t) {
4377
4382
  let n = String(e?.quickCreateLabel ?? "").trim();
4378
4383
  if (n && n.toLowerCase() !== "add more") return n;
4379
- let r = js(e?.quickCreateModule || t);
4384
+ let r = X(e?.quickCreateModule || t);
4380
4385
  return r ? `Add New ${r}` : "Add New";
4381
4386
  }
4382
4387
  function Ns(e, t) {
4383
4388
  let n = String(e?.quickEditLabel ?? "").trim();
4384
4389
  if (n && n.toLowerCase() !== "add more") return n;
4385
- let r = js(e?.quickEditModule || t);
4390
+ let r = X(e?.quickEditModule || t);
4386
4391
  return r ? `Edit ${r}` : "Edit";
4387
4392
  }
4388
4393
  function Ps(e, t, n) {
4389
- let r = js((e === "create" ? t?.quickCreateModule : t?.quickEditModule) || n);
4394
+ let r = X((e === "create" ? t?.quickCreateModule : t?.quickEditModule) || n);
4390
4395
  return e === "create" ? String(t?.quickCreateTitle ?? "").trim() || (r ? `Add New ${r}` : Ms(t, n)) : String(t?.quickEditTitle ?? "").trim() || (r ? `Edit ${r}` : Ns(t, n));
4391
4396
  }
4392
4397
  //#endregion
@@ -4434,18 +4439,18 @@ function zs(e) {
4434
4439
  let n = a(s, `/get-detailed-view?userId=${encodeURIComponent(t)}`).then((e) => Is(e?.data ?? e ?? null)).catch(() => "");
4435
4440
  return Rs.set(t, n), n;
4436
4441
  }
4437
- var Y = (e) => e == null ? "" : String(e).trim();
4442
+ var Z = (e) => e == null ? "" : String(e).trim();
4438
4443
  function Bs(e) {
4439
4444
  let t = e?.quickCreateNotice;
4440
4445
  return !t || typeof t != "object" || t.enabled === !1 ? null : {
4441
4446
  enabled: !0,
4442
- title: Y(t.title) || "New record created",
4443
- message: Y(t.message) || "A new client has been created successfully. Please contact your Organization Admin to configure the required forms, workflows, permissions, and client-specific details before proceeding with further operations.",
4447
+ title: Z(t.title) || "New record created",
4448
+ message: Z(t.message) || "A new client has been created successfully. Please contact your Organization Admin to configure the required forms, workflows, permissions, and client-specific details before proceeding with further operations.",
4444
4449
  showCreator: t.showCreator !== !1,
4445
4450
  showRecordName: t.showRecordName !== !1,
4446
- recordNameField: Y(t.recordNameField),
4447
- recordLabel: Y(t.recordLabel) || "Record name",
4448
- creatorLabel: Y(t.creatorLabel) || "Created by"
4451
+ recordNameField: Z(t.recordNameField),
4452
+ recordLabel: Z(t.recordLabel) || "Record name",
4453
+ creatorLabel: Z(t.creatorLabel) || "Created by"
4449
4454
  };
4450
4455
  }
4451
4456
  var Vs = [
@@ -4460,7 +4465,7 @@ var Vs = [
4460
4465
  "vendorName"
4461
4466
  ], Hs = (e, t) => {
4462
4467
  if (!(!e || !t)) return String(t).split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e);
4463
- }, Us = (e) => typeof e == "string" || typeof e == "number" ? Y(e) : e && typeof e == "object" ? Y(e.label ?? e.name ?? e.title ?? "") : "";
4468
+ }, Us = (e) => typeof e == "string" || typeof e == "number" ? Z(e) : e && typeof e == "object" ? Z(e.label ?? e.name ?? e.title ?? "") : "";
4464
4469
  function Ws(e, { recordNameField: t = "", displayField: n = "" } = {}) {
4465
4470
  if (!e || typeof e != "object") return "";
4466
4471
  for (let r of [
@@ -4473,7 +4478,7 @@ function Ws(e, { recordNameField: t = "", displayField: n = "" } = {}) {
4473
4478
  if (t) return t;
4474
4479
  }
4475
4480
  let r = Object.keys(e).find((t) => /name$/i.test(t) && typeof e[t] == "string" && e[t].trim());
4476
- return r ? Y(e[r]) : "";
4481
+ return r ? Z(e[r]) : "";
4477
4482
  }
4478
4483
  function Gs(e) {
4479
4484
  if (!e || typeof e != "object") return "";
@@ -4488,11 +4493,11 @@ function Gs(e) {
4488
4493
  for (let e of t) {
4489
4494
  if (e == null || e === "") continue;
4490
4495
  if (typeof e == "object") {
4491
- let t = Y(e.$oid ?? e.userId ?? e._id ?? e.id);
4496
+ let t = Z(e.$oid ?? e.userId ?? e._id ?? e.id);
4492
4497
  if (t) return t;
4493
4498
  continue;
4494
4499
  }
4495
- let t = Y(e);
4500
+ let t = Z(e);
4496
4501
  if (t) return t;
4497
4502
  }
4498
4503
  return "";
@@ -4522,7 +4527,7 @@ async function Js({ module: e, recordId: t, notice: n, displayField: r = "", dep
4522
4527
  if (n?.showCreator !== !1) {
4523
4528
  let e = Gs(l);
4524
4529
  if (e) try {
4525
- d = Y(await s(e));
4530
+ d = Z(await s(e));
4526
4531
  } catch {
4527
4532
  d = "";
4528
4533
  }
@@ -4617,7 +4622,7 @@ function ec({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4617
4622
  icon: /* @__PURE__ */ C(oe, {}),
4618
4623
  onClick: re,
4619
4624
  disabled: !v,
4620
- title: v ? void 0 : `Choose a ${js(_) || "record"} above first, then edit it here`,
4625
+ title: v ? void 0 : `Choose a ${X(_) || "record"} above first, then edit it here`,
4621
4626
  children: Ns(e, _)
4622
4627
  })]
4623
4628
  })
@@ -4854,7 +4859,7 @@ function vc(e, t) {
4854
4859
  //#endregion
4855
4860
  //#region src/components/form/ValidationOverrideCheckbox.jsx
4856
4861
  function yc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
4857
- let a = Mi(t), o = x.useWatch(n, e);
4862
+ let a = Pi(t), o = x.useWatch(n, e);
4858
4863
  if (!a) return null;
4859
4864
  let s = a.label || "Allow beyond the limit", c = () => {
4860
4865
  setTimeout(() => {
@@ -4865,7 +4870,7 @@ function yc({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
4865
4870
  e.setFieldValue(n, !1), c();
4866
4871
  return;
4867
4872
  }
4868
- let i = await Ha(zi(t));
4873
+ let i = await Ua(Vi(t));
4869
4874
  e.setFieldValue(n, !!i), c();
4870
4875
  }, u = a.help ? `${s} — ${a.help}` : s;
4871
4876
  return /* @__PURE__ */ C(re, {
@@ -4910,7 +4915,7 @@ function wc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMism
4910
4915
  }
4911
4916
  //#endregion
4912
4917
  //#region src/components/form/optionConstraints.js
4913
- var X = (e) => String(e ?? "").trim().toLowerCase();
4918
+ var Q = (e) => String(e ?? "").trim().toLowerCase();
4914
4919
  function Tc(e) {
4915
4920
  let t = Array.isArray(e) ? e : [e], n = [];
4916
4921
  return t.forEach((e) => {
@@ -4923,24 +4928,24 @@ function Tc(e) {
4923
4928
  e.label,
4924
4929
  e.name
4925
4930
  ].forEach((e) => {
4926
- e != null && e !== "" && n.push(X(e));
4931
+ e != null && e !== "" && n.push(Q(e));
4927
4932
  });
4928
4933
  return;
4929
4934
  }
4930
- n.push(X(e));
4935
+ n.push(Q(e));
4931
4936
  }
4932
4937
  }), n;
4933
4938
  }
4934
4939
  function Ec(e = [], t) {
4935
4940
  let n = Tc(t);
4936
4941
  if (!n.length || !Array.isArray(e) || e.length === 0) return e;
4937
- let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(X(e.value)) || r.has(X(e.label)) : r.has(X(e)));
4942
+ 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)));
4938
4943
  return i.length > 0 ? i : e;
4939
4944
  }
4940
4945
  function Dc(e) {
4941
4946
  let t = [];
4942
4947
  return [e?.setValue, e?.setValueLabel].forEach((e) => {
4943
- e != null && e !== "" && t.push(X(e));
4948
+ e != null && e !== "" && t.push(Q(e));
4944
4949
  }), t;
4945
4950
  }
4946
4951
  function Oc(e, t = {}) {
@@ -4957,16 +4962,16 @@ function kc(e = [], t, n) {
4957
4962
  let r = Oc(t, n);
4958
4963
  if (!r.length || !Array.isArray(e) || e.length === 0) return e;
4959
4964
  let i = new Set(r);
4960
- return e.filter((e) => e == null ? !0 : typeof e == "object" ? !(i.has(X(e.value)) || i.has(X(e.label))) : !i.has(X(e)));
4965
+ return e.filter((e) => e == null ? !0 : typeof e == "object" ? !(i.has(Q(e.value)) || i.has(Q(e.label))) : !i.has(Q(e)));
4961
4966
  }
4962
4967
  function Ac(e, t = {}, n) {
4963
4968
  let r = Array.isArray(e) ? e : [];
4964
4969
  if (n == null || n === "") return [];
4965
- let i = X(n), a = [], o = /* @__PURE__ */ new Set();
4970
+ let i = Q(n), a = [], o = /* @__PURE__ */ new Set();
4966
4971
  return r.forEach((e) => {
4967
4972
  if (!e || e.clearValue) return;
4968
4973
  let { setValue: n, setValueLabel: r } = e;
4969
- n != null && n !== "" && r && X(n) === i && Cc(e, t) && (o.has(X(n)) || (o.add(X(n)), a.push({
4974
+ n != null && n !== "" && r && Q(n) === i && Cc(e, t) && (o.has(Q(n)) || (o.add(Q(n)), a.push({
4970
4975
  value: n,
4971
4976
  label: r
4972
4977
  })));
@@ -5120,37 +5125,37 @@ function al(e, t = {}) {
5120
5125
  }
5121
5126
  //#endregion
5122
5127
  //#region src/components/form/educationRules.js
5123
- var Z = (e) => e == null ? "" : String(e).trim();
5124
- function ol(e, t) {
5128
+ var ol = (e) => e == null ? "" : String(e).trim();
5129
+ function sl(e, t) {
5125
5130
  let n = e?.regionRules;
5126
5131
  if (!n || typeof n != "object") return e ?? {};
5127
- let r = Z(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
5132
+ let r = ol(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
5128
5133
  return !i || typeof i != "object" ? e ?? {} : {
5129
5134
  ...e,
5130
5135
  ...i
5131
5136
  };
5132
5137
  }
5133
- function sl(e) {
5134
- return e?.allowInProgress !== !1;
5135
- }
5136
5138
  function cl(e) {
5137
- return sl(e) ? "" : dl(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.";
5139
+ return e?.allowInProgress !== !1;
5138
5140
  }
5139
5141
  function ll(e) {
5140
- return sl(e) ? "allow" : Z(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
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.";
5141
5143
  }
5142
5144
  function ul(e) {
5143
- return ll(e) === "block";
5145
+ return cl(e) ? "allow" : ol(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
5144
5146
  }
5145
5147
  function dl(e) {
5146
- return ll(e) === "warn";
5148
+ return ul(e) === "block";
5147
5149
  }
5148
5150
  function fl(e) {
5149
- if (!ul(e)) return null;
5150
- let t = cl(e);
5151
+ return ul(e) === "warn";
5152
+ }
5153
+ function pl(e) {
5154
+ if (!dl(e)) return null;
5155
+ let t = ll(e);
5151
5156
  return { validator: (e, n) => n === !0 ? Promise.reject(Error(t)) : Promise.resolve() };
5152
5157
  }
5153
- function pl(e, t = {}) {
5158
+ function ml(e, t = {}) {
5154
5159
  let n = t.tieBreak ?? "endDate", r = t.field ?? "startDate";
5155
5160
  for (let t of [n, r]) {
5156
5161
  let n = e?.[t];
@@ -5160,50 +5165,50 @@ function pl(e, t = {}) {
5160
5165
  }
5161
5166
  return null;
5162
5167
  }
5163
- function ml(e, t = {}) {
5168
+ function hl(e, t = {}) {
5164
5169
  let n = t.inProgressField ?? "currentStudyingHere";
5165
5170
  return !!e?.[n];
5166
5171
  }
5167
- function hl(e = [], t = {}) {
5172
+ function gl(e = [], t = {}) {
5168
5173
  let n = (t.direction ?? "desc") === "desc";
5169
5174
  return e.map((e, n) => ({
5170
5175
  index: n,
5171
- key: pl(e, t),
5172
- ongoing: t.inProgressFirst !== !1 && ml(e, t)
5176
+ key: ml(e, t),
5177
+ ongoing: t.inProgressFirst !== !1 && hl(e, t)
5173
5178
  })).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);
5174
5179
  }
5175
- function gl(e, t, n = {}) {
5180
+ function _l(e, t, n = {}) {
5176
5181
  if (!Array.isArray(e) || e.length < 2 || t == null || t < 0 || t >= e.length) return null;
5177
- let r = hl(e, n).indexOf(t);
5182
+ let r = gl(e, n).indexOf(t);
5178
5183
  return r === -1 || r === t ? null : {
5179
5184
  from: t,
5180
5185
  to: r,
5181
- reason: ml(e[t], n) ? "inProgress" : "outOfOrder"
5186
+ reason: hl(e[t], n) ? "inProgress" : "outOfOrder"
5182
5187
  };
5183
5188
  }
5184
- var _l = Object.freeze({
5189
+ var vl = Object.freeze({
5185
5190
  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.",
5186
5191
  outOfOrder: "These dates make this the most recent one. Shall we move it to the top? This list reads best newest first.",
5187
5192
  ok: "Yes, move it up",
5188
5193
  keep: "No, leave it here"
5189
5194
  });
5190
- function vl(e, t = {}) {
5195
+ function yl(e, t = {}) {
5191
5196
  let n = {
5192
- ..._l,
5197
+ ...vl,
5193
5198
  ...t.messages ?? {}
5194
5199
  };
5195
5200
  return n[e] ?? n.outOfOrder;
5196
5201
  }
5197
- function yl(e, t = {}) {
5198
- let n = t.levelField ?? "qualification", r = Z(e?.[n]);
5202
+ function bl(e, t = {}) {
5203
+ let n = t.levelField ?? "qualification", r = ol(e?.[n]);
5199
5204
  if (!r) return null;
5200
5205
  let i = t.levels ?? {}, a = i[r] ?? i[r.toLowerCase()] ?? i[r.toUpperCase()];
5201
- return Number.isFinite(Number(a)) ? Number(a) : bl(r, t);
5206
+ return Number.isFinite(Number(a)) ? Number(a) : xl(r, t);
5202
5207
  }
5203
- function bl(e, t) {
5208
+ function xl(e, t) {
5204
5209
  let n = Array.isArray(t?.levelPatterns) ? t.levelPatterns : [], r = e.toLowerCase();
5205
5210
  for (let e of n) {
5206
- let t = Z(e?.match);
5211
+ let t = ol(e?.match);
5207
5212
  if (!t) continue;
5208
5213
  let n;
5209
5214
  try {
@@ -5215,14 +5220,14 @@ function bl(e, t) {
5215
5220
  }
5216
5221
  return null;
5217
5222
  }
5218
- function xl(e, t = {}) {
5219
- return Z((t?.levelLabels ?? {})[e]) || Z(e);
5223
+ function Sl(e, t = {}) {
5224
+ return ol((t?.levelLabels ?? {})[e]) || ol(e);
5220
5225
  }
5221
- function Sl(e = [], t = {}) {
5226
+ function Cl(e = [], t = {}) {
5222
5227
  if (!t || t.requireBelow === !1) return [];
5223
5228
  let n = t.levels ?? {}, r = t.requiredLevels ?? [];
5224
5229
  if (!r.length) return [];
5225
- let i = e.map((e) => yl(e, t)).filter((e) => e !== null);
5230
+ let i = e.map((e) => bl(e, t)).filter((e) => e !== null);
5226
5231
  if (!i.length) return [];
5227
5232
  let a = Math.max(...i), o = [];
5228
5233
  return r.forEach((e) => {
@@ -5230,43 +5235,43 @@ function Sl(e = [], t = {}) {
5230
5235
  Number.isFinite(r) && (r >= a || i.includes(r) || o.push(t));
5231
5236
  }), o;
5232
5237
  }
5233
- function Cl(e, t = {}) {
5234
- let n = Sl(e, t);
5238
+ function wl(e, t = {}) {
5239
+ let n = Cl(e, t);
5235
5240
  if (!n.length) return "";
5236
- let r = n.map((e) => xl(e, t)).join(", ");
5241
+ let r = n.map((e) => Sl(e, t)).join(", ");
5237
5242
  return (t.message || "You’ve added a higher qualification but not the {missing} below it. Please add that too.").replace("{missing}", r);
5238
5243
  }
5239
- async function wl({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
5244
+ async function Tl({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
5240
5245
  let a = e?.orderBy;
5241
5246
  if (!a || a.confirmMove === !1 || typeof r != "function") return !1;
5242
- let o = gl(t, n, a);
5247
+ let o = _l(t, n, a);
5243
5248
  if (!o) return !1;
5244
5249
  let s = {
5245
- ..._l,
5250
+ ...vl,
5246
5251
  ...a.messages ?? {}
5247
5252
  };
5248
5253
  return await i({
5249
5254
  reason: o.reason,
5250
5255
  title: o.reason === "inProgress" ? "This looks like the most recent one" : "These dates make this the most recent one",
5251
- body: vl(o.reason, a),
5256
+ body: yl(o.reason, a),
5252
5257
  okText: s.ok,
5253
5258
  cancelText: s.keep,
5254
5259
  from: o.from,
5255
5260
  to: o.to
5256
5261
  }) ? (r(o.from, o.to), !0) : !1;
5257
5262
  }
5258
- function Tl(e, t) {
5259
- let n = ol(e, t), r = n?.orderBy?.inProgressField;
5263
+ function El(e, t) {
5264
+ let n = sl(e, t), r = n?.orderBy?.inProgressField;
5260
5265
  return r ? {
5261
5266
  name: n.name,
5262
5267
  label: n.label ?? n.name,
5263
5268
  rowsKey: n.payloadKey || n.name,
5264
5269
  inProgressField: r,
5265
- severity: ll(n),
5266
- message: cl(n)
5270
+ severity: ul(n),
5271
+ message: ll(n)
5267
5272
  } : null;
5268
5273
  }
5269
- function El(e = [], t, n) {
5274
+ function Dl(e = [], t, n) {
5270
5275
  if (!n) return {
5271
5276
  severity: "allow",
5272
5277
  message: "",
@@ -5274,8 +5279,8 @@ function El(e = [], t, n) {
5274
5279
  };
5275
5280
  let r = null;
5276
5281
  for (let i of e) {
5277
- let e = Tl(i, t);
5278
- if (!(!e || e.severity === "allow") && Dl(n, e.rowsKey).some((t) => ml(t, e))) {
5282
+ let e = El(i, t);
5283
+ if (!(!e || e.severity === "allow") && Ol(n, e.rowsKey).some((t) => hl(t, e))) {
5279
5284
  if (e.severity === "block") return {
5280
5285
  severity: "block",
5281
5286
  message: e.message,
@@ -5294,23 +5299,23 @@ function El(e = [], t, n) {
5294
5299
  group: null
5295
5300
  };
5296
5301
  }
5297
- function Dl(e, t) {
5302
+ function Ol(e, t) {
5298
5303
  let n = e?.[t];
5299
5304
  return Array.isArray(n) ? n : Array.isArray(n?.rows) ? n.rows : [];
5300
5305
  }
5301
- function Ol(e) {
5306
+ function kl(e) {
5302
5307
  return String(e?.severity ?? "").toLowerCase() === "block" ? "block" : "warn";
5303
5308
  }
5304
- function kl(e = [], t = {}) {
5309
+ function Al(e = [], t = {}) {
5305
5310
  let n = null;
5306
5311
  for (let r of e) {
5307
5312
  let e = r?.levelRule;
5308
5313
  if (!e) continue;
5309
- let i = Al(t, r);
5314
+ let i = jl(t, r);
5310
5315
  if (!i.length) continue;
5311
- let a = Cl(i, e);
5316
+ let a = wl(i, e);
5312
5317
  if (a) {
5313
- if (Ol(e) === "block") return {
5318
+ if (kl(e) === "block") return {
5314
5319
  severity: "block",
5315
5320
  message: a,
5316
5321
  group: r
@@ -5328,7 +5333,7 @@ function kl(e = [], t = {}) {
5328
5333
  group: null
5329
5334
  };
5330
5335
  }
5331
- function Al(e, t) {
5336
+ function jl(e, t) {
5332
5337
  for (let n of [t?.name, t?.payloadKey]) {
5333
5338
  if (!n) continue;
5334
5339
  let t = e?.[n];
@@ -5338,10 +5343,10 @@ function Al(e, t) {
5338
5343
  }
5339
5344
  //#endregion
5340
5345
  //#region src/components/form/clearGroupOnChange.js
5341
- function jl(e, t) {
5346
+ function Ml(e, t) {
5342
5347
  return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), t] : [t];
5343
5348
  }
5344
- function Ml(e, t) {
5349
+ function Nl(e, t) {
5345
5350
  let n = e?.field, r = [];
5346
5351
  e?.clearGroupOnChange && (t instanceof Set ? [...t] : t ?? []).forEach((e) => {
5347
5352
  e && e !== n && r.push(e);
@@ -5351,24 +5356,24 @@ function Ml(e, t) {
5351
5356
  e && e !== n && r.push(e);
5352
5357
  }) : typeof i == "string" && i.trim() && i.trim() !== n && r.push(i.trim()), [...new Set(r)];
5353
5358
  }
5354
- function Nl(e, t, n, r) {
5355
- let i = Ml(t, r).map((e) => jl(n, e));
5359
+ function Pl(e, t, n, r) {
5360
+ let i = Nl(t, r).map((e) => Ml(n, e));
5356
5361
  return i.forEach((t) => e.setFieldValue(t, null)), i;
5357
5362
  }
5358
5363
  //#endregion
5359
5364
  //#region src/components/form/resolveStoredOptions.js
5360
- function Pl(e) {
5365
+ function Fl(e) {
5361
5366
  return (Array.isArray(e) ? e : [e]).map((e) => e && typeof e == "object" ? e.value ?? e.key ?? e.id : e).filter((e) => e != null && e !== "");
5362
5367
  }
5363
- function Fl(e, t = []) {
5368
+ function Il(e, t = []) {
5364
5369
  let n = new Set((t ?? []).map((e) => String(e?.value))), r = [];
5365
- for (let t of Pl(e)) {
5370
+ for (let t of Fl(e)) {
5366
5371
  let e = String(t);
5367
5372
  !n.has(e) && !r.includes(e) && r.push(e);
5368
5373
  }
5369
5374
  return r;
5370
5375
  }
5371
- async function Il(e, t) {
5376
+ async function Ll(e, t) {
5372
5377
  if (!e?.lookupCollection || !t?.length) return [];
5373
5378
  let n = new URLSearchParams({
5374
5379
  collection: e.lookupCollection,
@@ -5380,7 +5385,7 @@ async function Il(e, t) {
5380
5385
  let r = await a(s, `/admin/lookup-dropdown-values?${n}`), i = r?.data ?? r ?? [];
5381
5386
  return Array.isArray(i) ? i : [];
5382
5387
  }
5383
- function Ll(e = [], t = []) {
5388
+ function Rl(e = [], t = []) {
5384
5389
  if (!t.length) return e;
5385
5390
  let n = new Set((e ?? []).map((e) => String(e?.value))), r = t.filter((e) => !n.has(String(e?.value))).map((e) => ({
5386
5391
  ...e,
@@ -5390,25 +5395,25 @@ function Ll(e = [], t = []) {
5390
5395
  }
5391
5396
  //#endregion
5392
5397
  //#region src/components/form/requireAnyOf.js
5393
- var Rl = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || e === !1;
5394
- function zl(e) {
5398
+ var zl = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || e === !1;
5399
+ function Bl(e) {
5395
5400
  let t = e?.requireAnyOf;
5396
5401
  return Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim() !== "") : [];
5397
5402
  }
5398
- function Bl(e) {
5399
- return !e || typeof e != "object" ? !1 : Object.values(e).some((e) => !Rl(e));
5403
+ function Vl(e) {
5404
+ return !e || typeof e != "object" ? !1 : Object.values(e).some((e) => !zl(e));
5400
5405
  }
5401
- function Vl({ field: e, getRow: t }) {
5402
- let n = zl(e);
5406
+ function Hl({ field: e, getRow: t }) {
5407
+ let n = Bl(e);
5403
5408
  if (n.length === 0 || !n.includes(e?.field)) return;
5404
5409
  let r = e.requireAnyOfMessage || `Select at least one of ${n.join(", ")}.`;
5405
5410
  return { validator: async () => {
5406
5411
  let e = t?.() ?? {};
5407
- return Bl(e) ? n.some((t) => !Rl(e[t])) ? Promise.resolve() : Promise.reject(Error(r)) : Promise.resolve();
5412
+ return Vl(e) ? n.some((t) => !zl(e[t])) ? Promise.resolve() : Promise.reject(Error(r)) : Promise.resolve();
5408
5413
  } };
5409
5414
  }
5410
- function Hl(e, t = []) {
5411
- let n = zl(e);
5415
+ function Ul(e, t = []) {
5416
+ let n = Bl(e);
5412
5417
  return n.length === 0 ? t : t.map((t) => n.includes(t?.field) ? {
5413
5418
  ...t,
5414
5419
  requireAnyOf: n,
@@ -5417,8 +5422,8 @@ function Hl(e, t = []) {
5417
5422
  }
5418
5423
  //#endregion
5419
5424
  //#region src/components/form/dateRules.js
5420
- var Ul = (e) => e == null || e === "";
5421
- function Wl(e) {
5425
+ var Wl = (e) => e == null || e === "";
5426
+ function Gl(e) {
5422
5427
  if (!e) return null;
5423
5428
  if (typeof e.valueOf == "function") {
5424
5429
  let t = e.valueOf();
@@ -5427,17 +5432,17 @@ function Wl(e) {
5427
5432
  let t = new Date(e).getTime();
5428
5433
  return Number.isNaN(t) ? null : t;
5429
5434
  }
5430
- function Q(e) {
5435
+ function $(e) {
5431
5436
  if (!e) return null;
5432
5437
  let t = T(e);
5433
5438
  return t.isValid() ? t.startOf("day").valueOf() : null;
5434
5439
  }
5435
- function Gl(e) {
5440
+ function Kl(e) {
5436
5441
  if (!e) return null;
5437
5442
  let t = T(e);
5438
5443
  return t.isValid() ? t.hour() * 60 + t.minute() : null;
5439
5444
  }
5440
- var Kl = {
5445
+ var ql = {
5441
5446
  d: "day",
5442
5447
  day: "day",
5443
5448
  days: "day",
@@ -5453,13 +5458,13 @@ var Kl = {
5453
5458
  year: "year",
5454
5459
  years: "year"
5455
5460
  };
5456
- function ql(e) {
5461
+ function Jl(e) {
5457
5462
  if (e == null || e === "") return null;
5458
5463
  if (typeof e == "object" && !Array.isArray(e)) {
5459
5464
  let t = Number(e.value ?? e.count ?? e.amount);
5460
5465
  return !Number.isFinite(t) || t <= 0 ? null : {
5461
5466
  value: t,
5462
- unit: Kl[String(e.unit ?? "month").toLowerCase()] ?? "month"
5467
+ unit: ql[String(e.unit ?? "month").toLowerCase()] ?? "month"
5463
5468
  };
5464
5469
  }
5465
5470
  let t = String(e).trim().toLowerCase();
@@ -5469,73 +5474,73 @@ function ql(e) {
5469
5474
  let r = Number(n[1]);
5470
5475
  return !Number.isFinite(r) || r <= 0 ? null : {
5471
5476
  value: r,
5472
- unit: Kl[n[2]] ?? "month"
5477
+ unit: ql[n[2]] ?? "month"
5473
5478
  };
5474
5479
  }
5475
- function Jl(e, t) {
5480
+ function Yl(e, t) {
5476
5481
  let n = e?.minGapFrom ?? e?.gapFrom;
5477
5482
  if (n && typeof t == "function") {
5478
- let e = ql(t(n));
5483
+ let e = Jl(t(n));
5479
5484
  if (e) return e;
5480
5485
  }
5481
- return ql(e?.minGap);
5486
+ return Jl(e?.minGap);
5482
5487
  }
5483
- function Yl(e, t, n, r) {
5488
+ function Xl(e, t, n, r) {
5484
5489
  if (t === null) return null;
5485
- let i = Jl(n, r), a = T(t);
5490
+ let i = Yl(n, r), a = T(t);
5486
5491
  return i && (a = e === "dateAfterField" ? a.add(i.value, i.unit) : a.subtract(i.value, i.unit)), a.startOf("day").valueOf();
5487
5492
  }
5488
- function Xl(e, t, n, r, i) {
5493
+ function Zl(e, t, n, r, i) {
5489
5494
  if (t === null || n === null) return !1;
5490
- let a = Yl(e, n, r, i);
5495
+ let a = Xl(e, n, r, i);
5491
5496
  if (a === null) return !1;
5492
- let o = !!r?.strict && !Jl(r, i);
5497
+ let o = !!r?.strict && !Yl(r, i);
5493
5498
  return e === "dateAfterField" ? o ? t <= a : t < a : o ? t >= a : t > a;
5494
5499
  }
5495
- function Zl(e, t, n, r) {
5500
+ function Ql(e, t, n, r) {
5496
5501
  if (n?.message) return n.message;
5497
- let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = Jl(n, r);
5502
+ let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = Yl(n, r);
5498
5503
  if (a) {
5499
5504
  let n = a.value === 1 ? a.unit : `${a.unit}s`;
5500
5505
  return e === "dateAfterField" ? `${t} must be at least ${a.value} ${n} after ${i}` : `${t} must be at least ${a.value} ${n} before ${i}`;
5501
5506
  }
5502
5507
  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}`;
5503
5508
  }
5504
- function Ql({ type: e, label: t, rule: n, readSibling: r }) {
5509
+ function $l({ type: e, label: t, rule: n, readSibling: r }) {
5505
5510
  return { validator: async (i, a) => {
5506
5511
  let o = n?.value ?? n?.compareField ?? n?.field;
5507
- if (!o || Ul(a)) return Promise.resolve();
5512
+ if (!o || Wl(a)) return Promise.resolve();
5508
5513
  let s = r(o);
5509
- if (Ul(s)) return Promise.resolve();
5510
- let c = Q(a), l = Q(s);
5511
- return c === null || l === null ? Promise.resolve() : Xl(e, c, l, n, r) ? Promise.reject(Error(Zl(e, t, n, r))) : Promise.resolve();
5514
+ if (Wl(s)) return Promise.resolve();
5515
+ 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();
5512
5517
  } };
5513
5518
  }
5514
- function $l(e, t, { rows: n, rowIndex: r } = {}) {
5519
+ function eu(e, t, { rows: n, rowIndex: r } = {}) {
5515
5520
  if (e === null || !t || !Array.isArray(n) || r == null || (t.mode ?? "newestFirst") !== "newestFirst") return !1;
5516
5521
  let i = t.startField ?? "startDate", a = t.endField ?? "endDate", o = n[r - 1];
5517
5522
  if (o) {
5518
- let t = Q(o[i]);
5523
+ let t = $(o[i]);
5519
5524
  if (t !== null && e >= t) return !0;
5520
5525
  }
5521
5526
  let s = n[r + 1];
5522
5527
  if (s) {
5523
- let t = Q(s[a]) ?? Q(s[i]);
5528
+ let t = $(s[a]) ?? $(s[i]);
5524
5529
  if (t !== null && e <= t) return !0;
5525
5530
  }
5526
5531
  return !1;
5527
5532
  }
5528
- function eu(e, t = "above", n = void 0) {
5533
+ function tu(e, t = "above", n = void 0) {
5529
5534
  let r = e?.messages ?? {}, i = t === "below";
5530
5535
  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.");
5531
5536
  }
5532
- function tu({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = tr }) {
5537
+ function nu({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = rr }) {
5533
5538
  let a = e?.validations ?? e?.validation ?? e?.rules ?? [], o = [];
5534
5539
  for (let e of a) {
5535
5540
  let n = typeof e == "string" ? { type: e } : e, r = n?.type;
5536
- if (r === "noPastDate" && o.push((e) => e ? Q(e) < i().startOf("day").valueOf() : !1), r === "noFutureDate" && o.push((e) => e ? Q(e) > i().startOf("day").valueOf() : !1), r === "minAge") {
5541
+ if (r === "noPastDate" && o.push((e) => e ? $(e) < i().startOf("day").valueOf() : !1), r === "noFutureDate" && o.push((e) => e ? $(e) > i().startOf("day").valueOf() : !1), r === "minAge") {
5537
5542
  let e = Number(n?.value ?? 18);
5538
- o.push((t) => t ? Q(t) > i().subtract(e, "year").startOf("day").valueOf() : !1);
5543
+ o.push((t) => t ? $(t) > i().subtract(e, "year").startOf("day").valueOf() : !1);
5539
5544
  }
5540
5545
  if (r === "dateAfterField" || r === "dateBeforeField") {
5541
5546
  let e = n?.value ?? n?.compareField ?? n?.field;
@@ -5543,17 +5548,17 @@ function tu({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = tr }) {
5543
5548
  o.push((i) => {
5544
5549
  if (!i) return !1;
5545
5550
  let a = t(e);
5546
- return !Ul(a) && Xl(r, Q(i), Q(a), n, t);
5551
+ return !Wl(a) && Zl(r, $(i), $(a), n, t);
5547
5552
  });
5548
5553
  }
5549
5554
  }
5550
- return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? $l(Q(t), e.rowHierarchy, {
5555
+ return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? eu($(t), e.rowHierarchy, {
5551
5556
  rows: n,
5552
5557
  rowIndex: r
5553
5558
  }) : !1), o.length ? (e) => o.some((t) => t(e)) : void 0;
5554
5559
  }
5555
- function nu(e, t = tr, n = void 0) {
5556
- if (!Ul(n) && Q(n) !== null) return;
5560
+ function ru(e, t = rr, n = void 0) {
5561
+ if (!Wl(n) && $(n) !== null) return;
5557
5562
  let r = e?.validations ?? e?.validation ?? e?.rules ?? [];
5558
5563
  for (let e of r) {
5559
5564
  let n = typeof e == "string" ? { type: e } : e;
@@ -5561,7 +5566,7 @@ function nu(e, t = tr, n = void 0) {
5561
5566
  if (n?.type === "noFutureDate" || n?.type === "noPastDate") return t();
5562
5567
  }
5563
5568
  }
5564
- function ru({ field: e, name: t, rows: n }) {
5569
+ function iu({ field: e, name: t, rows: n }) {
5565
5570
  if (!Array.isArray(t) || t.length === 0) return [];
5566
5571
  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 ?? [];
5567
5572
  for (let e of o) {
@@ -5590,44 +5595,44 @@ function ru({ field: e, name: t, rows: n }) {
5590
5595
  ]));
5591
5596
  return u;
5592
5597
  }
5593
- function iu({ field: e, rows: t, rowIndex: n }) {
5598
+ function au({ field: e, rows: t, rowIndex: n }) {
5594
5599
  let r = e?.rowHierarchy;
5595
5600
  return { validator: async (i, a) => {
5596
- if (!r || Ul(a) || !Array.isArray(t) || n == null) return Promise.resolve();
5597
- let o = Q(a);
5598
- if (o === null || !$l(o, r, {
5601
+ if (!r || Wl(a) || !Array.isArray(t) || n == null) return Promise.resolve();
5602
+ let o = $(a);
5603
+ if (o === null || !eu(o, r, {
5599
5604
  rows: t,
5600
5605
  rowIndex: n
5601
5606
  })) return Promise.resolve();
5602
- let s = r.startField ?? "startDate", c = t[n - 1], l = c ? Q(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;
5603
- return Promise.reject(Error(eu(r, u, p)));
5607
+ 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)));
5604
5609
  } };
5605
5610
  }
5606
5611
  //#endregion
5607
5612
  //#region src/utils/submitMessages.js
5608
- function au(e) {
5613
+ function ou(e) {
5609
5614
  return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
5610
5615
  }
5611
- function $(e) {
5616
+ function su(e) {
5612
5617
  let t = String(e ?? "").trim();
5613
5618
  return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
5614
5619
  }
5615
- function ou(e, t) {
5616
- return String(e).replaceAll("${module}", $(t)).replaceAll("${moduleName}", $(t));
5620
+ function cu(e, t) {
5621
+ return String(e).replaceAll("${module}", su(t)).replaceAll("${moduleName}", su(t));
5617
5622
  }
5618
- function su(e, t, n) {
5619
- let r = au(e);
5623
+ function lu(e, t, n) {
5624
+ let r = ou(e);
5620
5625
  if (r?.suppress) return null;
5621
5626
  let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
5622
- return i && String(i).trim() ? ou(i, t) : n === "edit" ? `${$(t)} has Updated successfully` : `${$(t)} has added successfully`;
5627
+ return i && String(i).trim() ? cu(i, t) : n === "edit" ? `${su(t)} has Updated successfully` : `${su(t)} has added successfully`;
5623
5628
  }
5624
- function cu(e, t, n, r) {
5625
- let i = au(e), a = n === "edit" ? i?.editError : i?.addError;
5626
- return a && String(a).trim() ? ou(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${$(t)}` : `Failed to create ${$(t)}`;
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)}`;
5627
5632
  }
5628
5633
  //#endregion
5629
5634
  //#region src/utils/scrollToFirstFormError.js
5630
- function lu({ errorFields: e } = {}, t, { root: n = document } = {}) {
5635
+ function du({ errorFields: e } = {}, t, { root: n = document } = {}) {
5631
5636
  if (!e?.length) return;
5632
5637
  let r = e[0]?.name;
5633
5638
  setTimeout(() => {
@@ -5652,10 +5657,10 @@ function lu({ errorFields: e } = {}, t, { root: n = document } = {}) {
5652
5657
  }
5653
5658
  //#endregion
5654
5659
  //#region src/components/form/conditionalFieldLabel.js
5655
- function uu(e) {
5660
+ function fu(e) {
5656
5661
  return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
5657
5662
  }
5658
- function du(e, t) {
5663
+ function pu(e, t) {
5659
5664
  if (!e?.field) return !1;
5660
5665
  switch (e.operator ?? "eq") {
5661
5666
  case "eq": return String(t ?? "") === String(e.value ?? "");
@@ -5663,66 +5668,66 @@ function du(e, t) {
5663
5668
  case "truthy": return t != null && t !== "" && t !== !1;
5664
5669
  case "falsy": return t == null || t === "" || t === !1;
5665
5670
  case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
5666
- case "in": return uu(e.value).includes(String(t ?? ""));
5667
- case "notIn": return !uu(e.value).includes(String(t ?? ""));
5671
+ case "in": return fu(e.value).includes(String(t ?? ""));
5672
+ case "notIn": return !fu(e.value).includes(String(t ?? ""));
5668
5673
  default: return !1;
5669
5674
  }
5670
5675
  }
5671
- function fu(e, t, n = !1) {
5676
+ function mu(e, t, n = !1) {
5672
5677
  let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
5673
- return du(i, t) && i?.label ? i.label : r;
5678
+ return pu(i, t) && i?.label ? i.label : r;
5674
5679
  }
5675
- function pu(e) {
5680
+ function hu(e) {
5676
5681
  return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
5677
5682
  }
5678
- function mu(e, t) {
5679
- let n = pu(e);
5683
+ function gu(e, t) {
5684
+ let n = hu(e);
5680
5685
  if (!n.length) return !0;
5681
- let r = n.map((e) => du(e, t(e.field)));
5686
+ let r = n.map((e) => pu(e, t(e.field)));
5682
5687
  return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
5683
5688
  }
5684
- function hu(e) {
5689
+ function _u(e) {
5685
5690
  let t = e?.colWhen;
5686
5691
  return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
5687
5692
  }
5688
- function gu(e, t, n) {
5689
- for (let t of hu(e)) if (du(t, n(t))) return Number(t.col);
5693
+ function vu(e, t, n) {
5694
+ for (let t of _u(e)) if (pu(t, n(t))) return Number(t.col);
5690
5695
  return t;
5691
5696
  }
5692
- function _u(e, t) {
5697
+ function yu(e, t) {
5693
5698
  return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
5694
5699
  }
5695
5700
  //#endregion
5696
5701
  //#region src/components/form/conditionalRequired.js
5697
- function vu(e, t) {
5702
+ function bu(e, t) {
5698
5703
  return (n) => {
5699
5704
  if (!e || !n) return;
5700
5705
  let r = Array.isArray(t) && t.length > 1 ? [...t.slice(0, -1), n] : [n], i = e.getFieldValue(r);
5701
5706
  return i === void 0 ? e.getFieldValue([n]) : i;
5702
5707
  };
5703
5708
  }
5704
- function yu(e, t, n) {
5709
+ function xu(e, t, n) {
5705
5710
  let r = e?.requiredWhen;
5706
- return !r || !t || !r.field && !(r.conditions ?? []).some((e) => e?.field) ? !1 : mu(r, vu(t, n));
5711
+ return !r || !t || !r.field && !(r.conditions ?? []).some((e) => e?.field) ? !1 : gu(r, bu(t, n));
5707
5712
  }
5708
- function bu(e, t, n) {
5713
+ function Su(e, t, n) {
5709
5714
  return { validator: (r, i) => {
5710
- if (!yu(e, t, n) || !(i == null || i === "" || Array.isArray(i) && i.length === 0)) return Promise.resolve();
5715
+ if (!xu(e, t, n) || !(i == null || i === "" || Array.isArray(i) && i.length === 0)) return Promise.resolve();
5711
5716
  let a = e?.label ?? e?.field ?? "This field";
5712
5717
  return Promise.reject(Error(e?.requiredWhen?.message ?? `${a} is required`));
5713
5718
  } };
5714
5719
  }
5715
5720
  //#endregion
5716
5721
  //#region src/components/Breadcrumb.jsx
5717
- function xu({ items: e = [] }) {
5718
- let t = e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(Dr, {
5722
+ function Cu({ items: e = [] }) {
5723
+ let t = e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(kr, {
5719
5724
  variant: "body",
5720
5725
  weight: "medium",
5721
5726
  color: "link",
5722
5727
  children: t.label
5723
5728
  }) : /* @__PURE__ */ w(ye, {
5724
5729
  to: t.href,
5725
- children: [/* @__PURE__ */ C(Dr, {
5730
+ children: [/* @__PURE__ */ C(kr, {
5726
5731
  variant: "body",
5727
5732
  color: "secondary",
5728
5733
  children: t.label
@@ -5732,34 +5737,34 @@ function xu({ items: e = [] }) {
5732
5737
  }
5733
5738
  //#endregion
5734
5739
  //#region src/components/form/canonicalOption.js
5735
- var Su = (e) => String(e ?? "").trim().replace(/\s+/g, " ").toLowerCase();
5736
- function Cu(e = []) {
5740
+ var wu = (e) => String(e ?? "").trim().replace(/\s+/g, " ").toLowerCase();
5741
+ function Tu(e = []) {
5737
5742
  let t = /* @__PURE__ */ new Map();
5738
5743
  for (let n of e) {
5739
5744
  if (n == null) continue;
5740
5745
  let e = typeof n == "object" ? n.value : n;
5741
5746
  if (e != null && e !== "") for (let r of [n?.label, e]) {
5742
- let n = Su(r);
5747
+ let n = wu(r);
5743
5748
  n && !t.has(n) && t.set(n, e);
5744
5749
  }
5745
5750
  }
5746
5751
  return t;
5747
5752
  }
5748
- function wu(e, t) {
5753
+ function Eu(e, t) {
5749
5754
  if (!Array.isArray(e)) {
5750
- let n = wu([e], t);
5755
+ let n = Eu([e], t);
5751
5756
  return n.length ? n[0] : e;
5752
5757
  }
5753
- let n = Cu(t), r = /* @__PURE__ */ new Set(), i = [];
5758
+ let n = Tu(t), r = /* @__PURE__ */ new Set(), i = [];
5754
5759
  for (let t of e) {
5755
- let e = typeof t == "object" && t ? t.value : t, a = n.get(Su(e)) ?? e, o = Su(a);
5760
+ let e = typeof t == "object" && t ? t.value : t, a = n.get(wu(e)) ?? e, o = wu(a);
5756
5761
  o && r.has(o) || (o && r.add(o), i.push(a));
5757
5762
  }
5758
5763
  return i;
5759
5764
  }
5760
5765
  //#endregion
5761
5766
  //#region src/components/form/dependencyBusy.js
5762
- function Tu(e, t = []) {
5767
+ function Du(e, t = []) {
5763
5768
  if (!e) return [];
5764
5769
  let n = /* @__PURE__ */ new Set();
5765
5770
  for (let r of t) for (let t of r?.fields ?? []) if (t?.field) {
@@ -5769,16 +5774,16 @@ function Tu(e, t = []) {
5769
5774
  }
5770
5775
  return n.delete(e), [...n];
5771
5776
  }
5772
- function Eu(e, t = []) {
5773
- return e?.blockWhileResolving ? Tu(e.field, t).length > 0 : !1;
5777
+ function Ou(e, t = []) {
5778
+ return e?.blockWhileResolving ? Du(e.field, t).length > 0 : !1;
5774
5779
  }
5775
- function Du(e) {
5780
+ function ku(e) {
5776
5781
  let t = String(e?.label ?? "").trim();
5777
5782
  return t ? `Applying ${t}…` : "Applying your selection…";
5778
5783
  }
5779
- function Ou(e, t = []) {
5784
+ function Au(e, t = []) {
5780
5785
  if (!e?.field) return [];
5781
- let n = new Set(Tu(e.field, t));
5786
+ let n = new Set(Du(e.field, t));
5782
5787
  if (n.size === 0) return [];
5783
5788
  let r = [];
5784
5789
  for (let e of t) {
@@ -5787,17 +5792,17 @@ function Ou(e, t = []) {
5787
5792
  }
5788
5793
  return r;
5789
5794
  }
5790
- function ku(e) {
5795
+ function ju(e) {
5791
5796
  return String(e?.blockScope ?? "").toLowerCase() === "group";
5792
5797
  }
5793
5798
  //#endregion
5794
5799
  //#region src/components/form/LinkedRecordFileField.jsx
5795
- var Au = d(() => import("./index.js").then((e) => e.n)), ju = d(() => import("./DocumentViewer-DSxsilzL.js").then((e) => e.n));
5796
- function Mu(e) {
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) {
5797
5802
  let t = String(e ?? "").split(".").pop()?.toLowerCase();
5798
5803
  return C(t === "pdf" ? ue : t === "doc" || t === "docx" ? fe : le, { className: "v1-file-chip__icon" });
5799
5804
  }
5800
- function Nu({ field: e, recordMeta: t }) {
5805
+ function Fu({ field: e, recordMeta: t }) {
5801
5806
  let n = e?.linkedModule, r = e?.linkedFileField, i = m(() => {
5802
5807
  let r = fc(n, t);
5803
5808
  if (r) return r;
@@ -5819,7 +5824,7 @@ function Nu({ field: e, recordMeta: t }) {
5819
5824
  ...e,
5820
5825
  loading: !0
5821
5826
  }));
5822
- }), Wr(n, i).then((t) => {
5827
+ }), Kr(n, i).then((t) => {
5823
5828
  e || o({
5824
5829
  loading: !1,
5825
5830
  fileValue: t?.[r] ?? null
@@ -5833,7 +5838,7 @@ function Nu({ field: e, recordMeta: t }) {
5833
5838
  r,
5834
5839
  f
5835
5840
  ]);
5836
- let v = m(() => go(a.fileValue), [a.fileValue])[0], y = !!v, b = e?.label ?? "File", x = js(n) || "record";
5841
+ let v = m(() => _o(a.fileValue), [a.fileValue])[0], y = !!v, b = e?.label ?? "File", x = X(n) || "record";
5837
5842
  if (!i) return /* @__PURE__ */ C("div", {
5838
5843
  className: "v1-linked-file v1-linked-file--empty",
5839
5844
  children: /* @__PURE__ */ C("span", { children: e?.unlinkedText ?? `Not available until the ${x} is set.` })
@@ -5861,7 +5866,7 @@ function Nu({ field: e, recordMeta: t }) {
5861
5866
  onClick: () => y && c(!0),
5862
5867
  title: y ? `Preview or download ${v.name}` : ie,
5863
5868
  children: [
5864
- y ? Mu(v.name) : /* @__PURE__ */ C(le, { className: "v1-file-chip__icon" }),
5869
+ y ? Pu(v.name) : /* @__PURE__ */ C(le, { className: "v1-file-chip__icon" }),
5865
5870
  /* @__PURE__ */ C("span", {
5866
5871
  className: "v1-file-chip__name",
5867
5872
  children: y ? v.name : ie
@@ -5885,7 +5890,7 @@ function Nu({ field: e, recordMeta: t }) {
5885
5890
  }),
5886
5891
  s && te && /* @__PURE__ */ C(u, {
5887
5892
  fallback: null,
5888
- children: /* @__PURE__ */ C(ju, {
5893
+ children: /* @__PURE__ */ C(Nu, {
5889
5894
  open: s,
5890
5895
  onClose: () => c(!1),
5891
5896
  documents: [te]
@@ -5916,7 +5921,7 @@ function Nu({ field: e, recordMeta: t }) {
5916
5921
  },
5917
5922
  children: /* @__PURE__ */ C(ne, {})
5918
5923
  }),
5919
- children: /* @__PURE__ */ C(Au, {
5924
+ children: /* @__PURE__ */ C(Mu, {
5920
5925
  moduleName: n,
5921
5926
  recordId: i,
5922
5927
  embedded: !0,
@@ -5930,7 +5935,7 @@ function Nu({ field: e, recordMeta: t }) {
5930
5935
  })
5931
5936
  ] });
5932
5937
  }
5933
- Nu.propTypes = {
5938
+ Fu.propTypes = {
5934
5939
  field: E.shape({
5935
5940
  label: E.string,
5936
5941
  linkedModule: E.string,
@@ -5942,8 +5947,8 @@ Nu.propTypes = {
5942
5947
  reuploadWarning: E.string
5943
5948
  }).isRequired,
5944
5949
  recordMeta: E.object
5945
- }, Nu.defaultProps = { recordMeta: void 0 };
5950
+ }, Fu.defaultProps = { recordMeta: void 0 };
5946
5951
  //#endregion
5947
- export { Bc as $, nr as $n, Ct as $r, fo as $t, Il as A, Wt as Ai, si as An, Zt as Ar, bs as At, kl as B, bn as Bi, Ur as Bn, Ut as Br, Jo as Bt, nu as C, it as Ci, Ci as Cn, $e as Cr, Ls as Ct, ru as D, rn as Di, fi as Dn, gn as Dr, Ns as Dt, Ul as E, Be as Ei, di as En, xt as Er, Ms as Et, Tl as F, hn as Fi, ri as Fn, Ye as Fr, ls as Ft, nl as G, an as Gi, Dr as Gn, _t as Gr, Oo as Gt, ol as H, At as Hi, Fr as Hn, on as Hr, Ko as Ht, sl as I, dn as Ii, Qr as In, Je as Ir, vs as It, qc as J, tr as Jn, rt as Jr, q as Jt, Zc as K, L as Kn, sn as Kr, Do as Kt, ul as L, Fn as Li, Zr as Ln, ut as Lr, Yo as Lt, Fl as M, St as Mi, ei as Mn, jn as Mr, ps as Mt, Nl as N, Qe as Ni, ci as Nn, at as Nr, fs as Nt, Hl as O, Re as Oi, ui as On, fn as Or, ws as Ot, fl as P, wn as Pi, ni as Pn, qt as Pr, rs as Pt, Vc as Q, pr as Qn, vt as Qr, to as Qt, cl as R, Xt as Ri, Xr as Rn, Et as Rr, Qo as Rt, iu as S, gt as Si, Ri as Sn, kn as Sr, zs as St, Gl as T, bt as Ti, Di as Tn, Tn as Tr, js as Tt, al as U, Ht as Ui, Pr as Un, Ve as Ur, Wo as Ut, wl as V, An as Vi, Gr as Vn, cn as Vr, qo as Vt, tl as W, Kt as Wi, Nr as Wn, ht as Wr, Go as Wt, Kc as X, or as Xn, Gt as Xr, eo as Xt, Xc as Y, rr as Yn, st as Yr, vo as Yt, Wc as Z, F as Zn, yt as Zr, $a as Zt, lu as _, Le as _i, ga as _n, Cn as _r, ac as _t, Eu as a, Ie as ai, Ra as an, P as ar, wc as at, tu as b, et as bi, Mi as bn, Pn as br, nc as bt, yu as c, Xe as ci, K as cn, Jn as cr, fc as ct, _u as d, Mt as di, ka as dn, Bn as dr, mc as dt, Qt as ei, go as en, ur as er, Ec as et, du as f, Nt as fi, aa as fn, zn as fr, vc as ft, pu as g, Jt as gi, Fa as gn, Ze as gr, oc as gt, gu as h, Pt as hi, Sa as hn, wt as hr, sc as ht, Du as i, Nn as ii, Ua as in, Yn as ir, Sc as it, Ll as j, pt as ji, ti as jn, ze as jr, ys as jt, Vl as k, Vt as ki, li as kn, In as kr, Ds as kt, bu as l, Bt as li, Aa as ln, Ln as lr, hc as lt, mu as m, On as mi, Ta as mn, tt as mr, lc as mt, ku as n, pn as ni, Qa as nn, Hn as nr, kc as nt, wu as o, He as oi, za as on, Zn as or, yc as ot, fu as p, yn as pi, V as pn, Vn as pr, _c as pt, el as q, I as qn, Sn as qr, xo as qt, Ou as r, ln as ri, Ha as rn, Xn as rr, xc as rt, xu as s, nn as si, Ba as sn, Gn as sr, pc as st, Nu as t, $t as ti, Ja as tn, ir as tr, Ac as tt, hu as u, M as ui, Ia as un, Rn as ur, gc as ut, cu as v, en as vi, ha as vn, mn as vr, ic as vt, Wl as w, ct as wi, Oi as wn, ft as wr, Fs as wt, Ql as x, dt as xi, Ii as xn, Yt as xr, ec as xt, su as y, tn as yi, Gi as yn, un as yr, rc as yt, El as z, Lt as zi, Hr as zn, kt as zr, Zo as zt };
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 };
5948
5953
 
5949
- //# sourceMappingURL=LinkedRecordFileField-2AYqqIuN.js.map
5954
+ //# sourceMappingURL=LinkedRecordFileField-dTfQ1QAj.js.map